@@ -182,16 +182,16 @@ [self sendLine: line]; objc_autoreleasePoolPop(pool); } -- (void)sendMessage: (OFString *)msg +- (void)sendMessage: (OFString *)message to: (OFString *)to { void *pool = objc_autoreleasePoolPush(); - for (OFString *line in [msg componentsSeparatedByString: @"\n"]) + for (OFString *line in [message componentsSeparatedByString: @"\n"]) [self sendLineWithFormat: @"PRIVMSG %@ :%@", to, line]; objc_autoreleasePoolPop(pool); } @@ -480,32 +480,32 @@ /* PRIVMSG */ if ([action isEqual: @"PRIVMSG"] && [components count] >= 4) { OFString *from = [components objectAtIndex: 0]; OFString *to = [components objectAtIndex: 2]; IRCUser *user; - OFString *msg; + OFString *message; size_t pos = [from length] + 1 + [[components objectAtIndex: 1] length] + 1 + [to length]; from = [from substringWithRange: of_range(1, [from length] - 1)]; - msg = [line substringWithRange: + message = [line substringWithRange: of_range(pos + 2, [line length] - pos - 2)]; user = [IRCUser IRCUserWithString: from]; if (![to isEqual: _nickname]) { if ([_delegate respondsToSelector: @selector(connection: didReceiveMessage:channel:user:)]) [_delegate connection: self - didReceiveMessage: msg + didReceiveMessage: message channel: to user: user]; } else { if ([_delegate respondsToSelector: @selector(connection: didReceivePrivateMessage:user:)]) [_delegate connection: self - didReceivePrivateMessage: msg + didReceivePrivateMessage: message user: user]; } return; } @@ -591,11 +591,12 @@ if (line != nil) { [self IRC_processLine: line]; [socket asyncReadLineWithTarget: self selector: @selector(socket: didReceiveLine: - exception:)]; + exception:) + context: nil]; } return false; } @@ -612,11 +613,12 @@ [socket asyncReadLineWithEncoding: _fallbackEncoding target: self selector: @selector(socket: didReceiveWronglyEncodedLine: - exception:)]; + exception:) + context: nil]; return false; } if ([_delegate respondsToSelector: @selector(connectionWasClosed:)]) [_delegate connectionWasClosed: self]; @@ -633,13 +635,14 @@ - (void)handleConnection { [_socket asyncReadLineWithTarget: self selector: @selector(socket:didReceiveLine: - exception:)]; + exception:) + context: nil]; } - (OFSet OF_GENERIC(OFString *) *)usersInChannel: (OFString *)channel { return [[[_channels objectForKey: channel] copy] autorelease]; } @end