diff options
author | Wilmer van der Gaast <wilmer@gaast.net> | 2010-05-09 00:54:37 +0100 |
---|---|---|
committer | Wilmer van der Gaast <wilmer@gaast.net> | 2010-05-09 00:54:37 +0100 |
commit | eb37735451207895e7e1b5b3dcc0f9cbe178ad38 (patch) | |
tree | 0e64d60cc7fdefc9d6fd8f6a4d7d789612a62d89 /irc_im.c | |
parent | 66b9e36aa9dfd123c66194d645a3c60cc3dc49bc (diff) |
This is how you now start groupchats: /join #channel, /invite people.
Diffstat (limited to 'irc_im.c')
-rw-r--r-- | irc_im.c | 13 |
1 files changed, 12 insertions, 1 deletions
@@ -258,9 +258,20 @@ static gboolean bee_irc_chat_new( bee_t *bee, struct groupchat *c ) irc_t *irc = bee->ui_data; irc_channel_t *ic; char *topic; + GSList *l; int i; - for( i = 0; i <= 999; i ++ ) + /* Try to find a channel that expects to receive a groupchat. + This flag is set by groupchat_stub_invite(). */ + for( l = irc->channels; l; l = l->next ) + { + ic = l->data; + if( ic->flags & IRC_CHANNEL_CHAT_PICKME ) + break; + } + + /* If we found none, just generate some stupid name. */ + if( l == NULL ) for( i = 0; i <= 999; i ++ ) { char name[16]; sprintf( name, "&chat_%03d", i ); |