@@ -128,11 +128,11 @@ - (void)handleConnection { OFAutoreleasePool *pool = [[OFAutoreleasePool alloc] init]; OFString *line; - OFArray *splitted; + OFArray *split; for (;;) { @try { line = [sock readLine]; } @catch (OFInvalidEncodingException *e) { @@ -147,38 +147,37 @@ if ([delegate respondsToSelector: @selector(connection:didReceiveLine:)]) [delegate connection: self didReceiveLine: line]; - splitted = [line componentsSeparatedByString: @" "]; + split = [line componentsSeparatedByString: @" "]; /* PING */ - if (splitted.count == 2 && - [splitted.firstObject isEqual: @"PING"]) { + if (split.count == 2 && [split.firstObject isEqual: @"PING"]) { OFMutableString *s = [[line mutableCopy] autorelease]; [s replaceOccurrencesOfString: @"PING" withString: @"PONG"]; [self sendLine: s]; continue; } /* Connected */ - if (splitted.count >= 4 && - [[splitted objectAtIndex: 1] isEqual: @"001"]) { + if (split.count >= 4 && + [[split objectAtIndex: 1] isEqual: @"001"]) { if ([delegate respondsToSelector: @selector(connectionWasEstablished:)]) [delegate connectionWasEstablished: self]; continue; } /* JOIN */ - if (splitted.count == 3 && - [[splitted objectAtIndex: 1] isEqual: @"JOIN"]) { - OFString *who = [splitted objectAtIndex: 0]; - OFString *where = [splitted objectAtIndex: 2]; + if (split.count == 3 && + [[split objectAtIndex: 1] isEqual: @"JOIN"]) { + OFString *who = [split objectAtIndex: 0]; + OFString *where = [split objectAtIndex: 2]; IRCUser *user; IRCChannel *channel; who = [who substringWithRange: of_range(1, who.length - 1)]; @@ -200,27 +199,27 @@ continue; } /* PART */ - if (splitted.count >= 3 && - [[splitted objectAtIndex: 1] isEqual: @"PART"]) { - OFString *who = [splitted objectAtIndex: 0]; - OFString *where = [splitted objectAtIndex: 2]; + if (split.count >= 3 && + [[split objectAtIndex: 1] isEqual: @"PART"]) { + OFString *who = [split objectAtIndex: 0]; + OFString *where = [split objectAtIndex: 2]; IRCUser *user; IRCChannel *channel; OFString *reason = nil; size_t pos = who.length + 1 + - [[splitted objectAtIndex: 1] length] + 1 + + [[split objectAtIndex: 1] length] + 1 + where.length; who = [who substringWithRange: of_range(1, who.length - 1)]; user = [IRCUser IRCUserWithString: who]; channel = [channels objectForKey: where]; - if (splitted.count > 3) + if (split.count > 3) reason = [line substringWithRange: of_range(pos + 2, line.length - pos - 2)]; if ([delegate respondsToSelector: @selector(connection:didSeeUser:leaveChannel: @@ -232,24 +231,23 @@ continue; } /* QUIT */ - if (splitted.count >= 2 && - [[splitted objectAtIndex: 1] isEqual: @"QUIT"]) { - OFString *who = [splitted objectAtIndex: 0]; + if (split.count >= 2 && + [[split objectAtIndex: 1] isEqual: @"QUIT"]) { + OFString *who = [split objectAtIndex: 0]; IRCUser *user; OFString *reason = nil; size_t pos = who.length + 1 + - [[splitted objectAtIndex: 1] length]; + [[split objectAtIndex: 1] length]; who = [who substringWithRange: of_range(1, who.length - 1)]; - user = [IRCUser IRCUserWithString: who]; - if (splitted.count > 2) + if (split.count > 2) reason = [line substringWithRange: of_range(pos + 2, line.length - pos - 2)]; if ([delegate respondsToSelector: @selector(connection:didSeeUserQuit:withReason:)]) @@ -259,18 +257,18 @@ continue; } /* PRIVMSG */ - if (splitted.count >= 4 && - [[splitted objectAtIndex: 1] isEqual: @"PRIVMSG"]) { - OFString *from = [splitted objectAtIndex: 0]; - OFString *to = [splitted objectAtIndex: 2]; + if (split.count >= 4 && + [[split objectAtIndex: 1] isEqual: @"PRIVMSG"]) { + OFString *from = [split objectAtIndex: 0]; + OFString *to = [split objectAtIndex: 2]; IRCUser *user; OFString *msg; size_t pos = from.length + 1 + - [[splitted objectAtIndex: 1] length] + 1 + + [[split objectAtIndex: 1] length] + 1 + to.length; from = [from substringWithRange: of_range(1, from.length - 1)]; msg = [line substringWithRange: