diff options
Diffstat (limited to 'irc_channel.c')
-rw-r--r-- | irc_channel.c | 20 |
1 files changed, 19 insertions, 1 deletions
diff --git a/irc_channel.c b/irc_channel.c index 28cd7d43..a3a7e1ee 100644 --- a/irc_channel.c +++ b/irc_channel.c @@ -312,9 +312,27 @@ static gboolean groupchat_stub_invite( irc_channel_t *ic, irc_user_t *iu ) } } +static gboolean groupchat_stub_join( irc_channel_t *ic ) +{ + struct irc_groupchat_stub *igs = ic->data; + + if( igs && igs->acc->ic && igs->acc->prpl->chat_join ) + { + ic->flags |= IRC_CHANNEL_CHAT_PICKME; + igs->acc->prpl->chat_join( igs->acc->ic, igs->room, ic->irc->user->nick, NULL ); + ic->flags &= ~IRC_CHANNEL_CHAT_PICKME; + return FALSE; + } + else + { + irc_send_num( ic->irc, 403, "%s :Can't join channel, account offline?", ic->name ); + return FALSE; + } +} + static const struct irc_channel_funcs groupchat_stub_funcs = { NULL, - NULL, + groupchat_stub_join, NULL, NULL, groupchat_stub_invite, |