153
154
155
156
157
158
159
160
161
162
163
164
165
166
|
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
|
+
+
+
+
+
|
- (void)kickUser: (IRCUser*)user
fromChannel: (IRCChannel*)channel
withReason: (OFString*)reason
{
[self sendLineWithFormat: @"KICK %@ %@ :%@",
channel.name, user.nickname, reason];
}
- (void)changeNicknameTo: (OFString*)nickname_
{
[self sendLineWithFormat: @"NICK %@", nickname_];
}
- (void)handleConnection
{
OFAutoreleasePool *pool = [[OFAutoreleasePool alloc] init];
OFString *line;
OFArray *split;
|
333
334
335
336
337
338
339
340
341
342
343
344
345
346
|
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
|
+
+
+
+
+
|
who = [who substringWithRange:
of_range(1, who.length - 1)];
newNickname = [newNickname substringWithRange:
of_range(1, newNickname.length - 1)];
user = [IRCUser IRCUserWithString: who];
if ([user.nickname isEqual: nickname]) {
[nickname release];
nickname = [user.nickname copy];
}
if ([delegate respondsToSelector:
@selector(connection:didSeeUser:changeNicknameTo:)])
[delegate connection: self
didSeeUser: user
changeNicknameTo: newNickname];
}
|