Permalink
Browse files

autojoin channel for invitation.

  • Loading branch information...
1 parent 72e8b9b commit b0677bc0c692fa33bf1df0d1da2dea63c3a4c676 @walf443 walf443 committed with psychs Apr 29, 2010
Showing with 8 additions and 0 deletions.
  1. +8 −0 Classes/IRC/IRCClient.m
View
@@ -2971,6 +2971,14 @@ - (void)receiveInvite:(IRCMessage*)m
NSString* text = [NSString stringWithFormat:@"%@ has invited you to %@", nick, chname];
[self printBoth:self type:LINE_TYPE_INVITE text:text];
+ IRCChannel* c = [self findChannel: chname];
+ if ( !c ) {
+ IRCChannelConfig* seed = [[IRCChannelConfig new] autorelease];
+ seed.name = chname;
+ c = [world createChannel:seed client:self reload:YES adjust:YES];
+ [world save];
+ [self joinChannel: c];
+ }
[self notifyEvent:GROWL_INVITED target:nil nick:nick text:chname];
[SoundPlayer play:[Preferences soundForEvent:GROWL_INVITED]];

0 comments on commit b0677bc

Please sign in to comment.