diff --git a/src/IRCConnection.m b/src/IRCConnection.m index 7ad5ce6..b8de851 100644 --- a/src/IRCConnection.m +++ b/src/IRCConnection.m @@ -232,8 +232,8 @@ 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;