diff options
author | Wilmer van der Gaast <wilmer@gaast.net> | 2010-05-08 22:52:25 +0100 |
---|---|---|
committer | Wilmer van der Gaast <wilmer@gaast.net> | 2010-05-08 22:52:25 +0100 |
commit | 66b9e36aa9dfd123c66194d645a3c60cc3dc49bc (patch) | |
tree | 5904f3b20882b6f30cbe3ddf8c975c1aa015ae7f /irc_im.c | |
parent | e68565706f0c2ea710e7ea83cd5a69e538eb061c (diff) |
Restored /invite for groupchats.
Diffstat (limited to 'irc_im.c')
-rw-r--r-- | irc_im.c | 15 |
1 files changed, 15 insertions, 0 deletions
@@ -412,11 +412,26 @@ static gboolean bee_irc_channel_chat_topic( irc_channel_t *ic, const char *new ) return TRUE; } +static gboolean bee_irc_channel_chat_invite( irc_channel_t *ic, irc_user_t *iu ) +{ + struct groupchat *c = ic->data; + + if( iu->bu->ic != c->ic ) + irc_send_num( ic->irc, 482, "%s :Can't mix different IM networks in one groupchat", ic->name ); + else if( c->ic->acc->prpl->chat_invite ) + c->ic->acc->prpl->chat_invite( c, iu->bu->handle, NULL ); + else + irc_send_num( ic->irc, 482, "%s :IM protocol does not support room invitations", ic->name ); + + return TRUE; +} + static const struct irc_channel_funcs irc_channel_im_chat_funcs = { bee_irc_channel_chat_privmsg, NULL, /* join */ bee_irc_channel_chat_part, bee_irc_channel_chat_topic, + bee_irc_channel_chat_invite, }; |