Changeset 7821ee8 for irc_im.c


Ignore:
Timestamp:
2015-01-29T19:24:17Z (9 years ago)
Author:
jgeboski <jgeboski@…>
Branches:
master
Children:
e41cc40
Parents:
7b8238d
git-author:
jgeboski <jgeboski@…> (28-01-15 23:40:47)
git-committer:
jgeboski <jgeboski@…> (29-01-15 19:24:17)
Message:

irc_commands: implemented KICK support

With similar commands being supported, such as INVITE, the KICK command
should be supported as well. The key motivation behind supporting KICK
is having for having a way to remove users from group chats. As of now,
there is no way for a bitlbee user to remove a user from a group chat.
With no current KICK implementation, it made using this command a prime
candidate for the UI side of this implementation. In addition, the KICK
command has been supported in the control channel as well. This is to
keep the INVITE/KICK pair consistent.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • irc_im.c

    r7b8238d r7821ee8  
    972972}
    973973
     974static void bee_irc_channel_chat_kick( irc_channel_t *ic, irc_user_t *iu, const char *msg )
     975{
     976        struct groupchat *c = ic->data;
     977        bee_user_t *bu = iu->bu;
     978       
     979        if( ( c == NULL ) || ( bu == NULL ) )
     980                return;
     981       
     982        if( !c->ic->acc->prpl->chat_kick )
     983        {
     984                irc_send_num( ic->irc, 482, "%s :IM protocol does not support room kicking", ic->name );
     985                return;
     986        }
     987       
     988        c->ic->acc->prpl->chat_kick( c, iu->bu->handle, msg );
     989}
     990
    974991static char *set_eval_room_account( set_t *set, char *value );
    975992static char *set_eval_chat_type( set_t *set, char *value );
     
    10561073        bee_irc_channel_chat_topic,
    10571074        bee_irc_channel_chat_invite,
     1075        bee_irc_channel_chat_kick,
    10581076
    10591077        bee_irc_channel_init,
Note: See TracChangeset for help on using the changeset viewer.