240
241
242
243
244
245
246
247
248
249
250
251
252
253
|
@selector(connection:didSeeUser:leaveChannel:
withReason:)])
[delegate connection: self
didSeeUser: user
leaveChannel: channel
withReason: reason];
continue;
}
/* QUIT */
if ([action isEqual: @"QUIT"] && split.count >= 2) {
OFString *who = [split objectAtIndex: 0];
IRCUser *user;
|
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
|
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
|
@selector(connection:didSeeUser:leaveChannel:
withReason:)])
[delegate connection: self
didSeeUser: user
leaveChannel: channel
withReason: reason];
continue;
}
/* KICK */
if ([action isEqual: @"KICK"] && split.count >= 4) {
OFString *who = [split objectAtIndex: 0];
OFString *where = [split objectAtIndex: 2];
OFString *whom = [split objectAtIndex: 3];
IRCUser *user;
IRCChannel *channel;
OFString *reason = nil;
size_t pos = who.length + 1 +
[[split objectAtIndex: 1] length] + 1 +
where.length + 1 + whom.length;
who = [who substringWithRange:
of_range(1, who.length - 1)];
user = [IRCUser IRCUserWithString: who];
channel = [channels objectForKey: where];
if (split.count > 4)
reason = [line substringWithRange:
of_range(pos + 2, line.length - pos - 2)];
if ([delegate respondsToSelector:
@selector(connection:didSeeUser:kickUser:
fromChannel:withReason:)])
[delegate connection: self
didSeeUser: user
kickUser: whom
fromChannel: channel
withReason: reason];
continue;
}
/* QUIT */
if ([action isEqual: @"QUIT"] && split.count >= 2) {
OFString *who = [split objectAtIndex: 0];
IRCUser *user;
|