From 7b71feb6f88b7e14199b8f7e9930f76d5324e356 Mon Sep 17 00:00:00 2001 From: Wilmer van der Gaast Date: Fri, 14 May 2010 00:34:38 +0100 Subject: 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. --- irc_channel.c | 20 +++++++++++++++++++- 1 file changed, 19 insertions(+), 1 deletion(-) (limited to 'irc_channel.c') 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, -- cgit v1.2.3