- for (IRCClient* client in _world.clients)
- [client changeNick:[NSString stringWithFormat:@"%@|%@", client.config.nick, [self idleSuffix]]];
+ for (IRCClient* client in _world.clients) {
+ NSMutableString* nick = [NSMutableString stringWithString:client.localNickname];
+ NSString* suffix = [@"|" stringByAppendingString:[self idleSuffix]];
+ [nick replaceOccurrencesOfString:suffix withString:@"" options:0 range:NSMakeRange(0, [nick length])];
+ [nick appendString:suffix];
+ [client printDebugInformation:[@"BetterAway setting nickname to " stringByAppendingString:nick]];
+ [client changeNick:nick];
+ }