aboutsummaryrefslogtreecommitdiffstats
path: root/irc_im.c
diff options
context:
space:
mode:
authorWilmer van der Gaast <wilmer@gaast.net>2010-07-25 11:11:48 +0200
committerWilmer van der Gaast <wilmer@gaast.net>2010-07-25 11:11:48 +0200
commit51a3d12c3187bb0af530bbf36cf8619b57d0ea1a (patch)
tree93543747ec22abc084f128f16f75c64ed55837c0 /irc_im.c
parent5588edf5779d449f0f1ed1b2ef6f2af510d92632 (diff)
Allow change nicknames when moving contacts between groups. Also fixing a
bug that caused many empty channel mode changes being sent.
Diffstat (limited to 'irc_im.c')
-rw-r--r--irc_im.c11
1 files changed, 11 insertions, 0 deletions
diff --git a/irc_im.c b/irc_im.c
index 2033b1a8..d2898db4 100644
--- a/irc_im.c
+++ b/irc_im.c
@@ -287,10 +287,21 @@ static gboolean bee_irc_user_group( bee_t *bee, bee_user_t *bu )
{
irc_user_t *iu = (irc_user_t *) bu->ui_data;
irc_t *irc = (irc_t *) bee->ui_data;
+ bee_user_flags_t online;
+
+ /* Take the user offline temporarily so we can change the nick (if necessary). */
+ if( ( online = bu->flags & BEE_USER_ONLINE ) )
+ bu->flags &= ~BEE_USER_ONLINE;
bee_irc_channel_update( irc, NULL, iu );
bee_irc_user_nick_update( iu );
+ if( online )
+ {
+ bu->flags |= online;
+ bee_irc_channel_update( irc, NULL, iu );
+ }
+
return TRUE;
}