Index: src/IRCConnection.m ================================================================== --- src/IRCConnection.m +++ src/IRCConnection.m @@ -230,12 +230,12 @@ /* PING */ if ([components count] == 2 && [[components firstObject] isEqual: @"PING"]) { OFMutableString *s = [[line mutableCopy] autorelease]; - [s replaceOccurrencesOfString: @"PING" - withString: @"PONG"]; + [s replaceCharactersInRange: of_range(0, 4) + withString: @"PONG"]; [self sendLine: s]; return; }