︙ | | |
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
|
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
|
-
+
|
if ([action isEqual: @"JOIN"] && components.count == 3) {
OFString *who = [components objectAtIndex: 0];
OFString *where = [components objectAtIndex: 2];
IRCUser *user;
OFMutableSet *channel;
who = [who substringFromIndex: 1];
user = [IRCUser IRCUserWithString: who];
user = [IRCUser userWithString: who];
if ([who hasPrefix:
[_nickname stringByAppendingString: @"!"]]) {
channel = [OFMutableSet set];
[_channels setObject: channel forKey: where];
} else
channel = [_channels objectForKey: where];
|
︙ | | |
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
|
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
|
-
+
|
IRCUser *user;
OFMutableSet *channel;
OFString *reason = nil;
size_t pos = who.length + 1 +
[[components objectAtIndex: 1] length] + 1 + where.length;
who = [who substringFromIndex: 1];
user = [IRCUser IRCUserWithString: who];
user = [IRCUser userWithString: who];
channel = [_channels objectForKey: where];
if (components.count > 3)
reason = [line substringFromIndex: pos + 2];
[channel removeObject: user.nickname];
|
︙ | | |
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
|
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
|
-
+
|
OFMutableSet *channel;
OFString *reason = nil;
size_t pos = who.length + 1 +
[[components objectAtIndex: 1] length] + 1 +
where.length + 1 + whom.length;
who = [who substringFromIndex: 1];
user = [IRCUser IRCUserWithString: who];
user = [IRCUser userWithString: who];
channel = [_channels objectForKey: where];
if (components.count > 4)
reason = [line substringFromIndex: pos + 2];
[channel removeObject: user.nickname];
|
︙ | | |
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
|
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
|
-
+
|
OFString *who = [components objectAtIndex: 0];
IRCUser *user;
OFString *reason = nil;
size_t pos = who.length + 1 +
[[components objectAtIndex: 1] length];
who = [who substringFromIndex: 1];
user = [IRCUser IRCUserWithString: who];
user = [IRCUser userWithString: who];
if ([components count] > 2)
reason = [line substringFromIndex: pos + 2];
for (OFString *channel in _channels)
[[_channels objectForKey: channel]
removeObject: user.nickname];
|
︙ | | |
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
|
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
|
-
+
|
OFString *who = [components objectAtIndex: 0];
OFString *nickname = [components objectAtIndex: 2];
IRCUser *user;
who = [who substringFromIndex: 1];
nickname = [nickname substringFromIndex: 1];
user = [IRCUser IRCUserWithString: who];
user = [IRCUser userWithString: who];
if ([user.nickname isEqual: _nickname]) {
[_nickname release];
_nickname = [nickname copy];
}
for (OFMutableSet *channel in _channels) {
|
︙ | | |
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
|
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
|
-
+
|
IRCUser *user;
OFString *message;
size_t pos = from.length + 1 +
[[components objectAtIndex: 1] length] + 1 + to.length;
from = [from substringFromIndex: 1];
message = [line substringFromIndex: pos + 2];
user = [IRCUser IRCUserWithString: from];
user = [IRCUser userWithString: from];
if (![to isEqual: _nickname]) {
if ([_delegate respondsToSelector: @selector(connection:
didReceiveMessage:channel:user:)])
[_delegate connection: self
didReceiveMessage: message
channel: to
|
︙ | | |
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
|
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
|
-
+
|
notice = [line substringFromIndex: pos + 2];
if (![from containsString: @"!"] || [to isEqual: @"*"]) {
/* System message - ignore for now */
return;
}
user = [IRCUser IRCUserWithString: from];
user = [IRCUser userWithString: from];
if (![to isEqual: _nickname]) {
if ([_delegate respondsToSelector: @selector(connection:
didReceiveNotice:channel:user:)])
[_delegate connection: self
didReceiveNotice: notice
channel: to
|
︙ | | |