diff options
author | Wilmer van der Gaast <wilmer@gaast.net> | 2010-05-14 00:34:38 +0100 |
---|---|---|
committer | Wilmer van der Gaast <wilmer@gaast.net> | 2010-05-14 00:34:38 +0100 |
commit | 7b71feb6f88b7e14199b8f7e9930f76d5324e356 (patch) | |
tree | 2aadf040f7c2b29d6457fbf2ca265a804c75a193 /irc_channel.c | |
parent | ad404ab26aa3cfdfc3c76f6926e556e333d02753 (diff) |
Just enough code to join named chatrooms again. This UI is *not* final, the "chat"
command will probably mostly stick around for bw compatibility. Still thinking
about how this should work eventually.
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, |