aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorWilmer van der Gaast <wilmer@gaast.net>2010-06-05 01:35:17 +0100
committerWilmer van der Gaast <wilmer@gaast.net>2010-06-05 01:35:17 +0100
commit7e83e8e47ff1ba031928e1e46bf16ec53ca53117 (patch)
tree5dfc12faaba5f53f254154de4f49aeb8c71275b3
parent2b8473c72b730085c8d6aef3df8fef55c7002080 (diff)
Inform the UI about group changes. This is important if the user has
group channels.
-rw-r--r--irc_im.c11
-rw-r--r--protocols/bee.h1
-rw-r--r--protocols/nogaim.c3
3 files changed, 15 insertions, 0 deletions
diff --git a/irc_im.c b/irc_im.c
index bdfbc597..818495dd 100644
--- a/irc_im.c
+++ b/irc_im.c
@@ -258,6 +258,16 @@ static gboolean bee_irc_user_fullname( bee_t *bee, bee_user_t *bu )
return TRUE;
}
+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_irc_channel_update( irc, NULL, iu );
+
+ return TRUE;
+}
+
/* IRC->IM calls */
static gboolean bee_irc_user_privmsg( irc_user_t *iu, const char *msg )
@@ -543,6 +553,7 @@ const struct bee_ui_funcs irc_ui_funcs = {
bee_irc_user_new,
bee_irc_user_free,
bee_irc_user_fullname,
+ bee_irc_user_group,
bee_irc_user_status,
bee_irc_user_msg,
bee_irc_user_typing,
diff --git a/protocols/bee.h b/protocols/bee.h
index e421db57..5701ea60 100644
--- a/protocols/bee.h
+++ b/protocols/bee.h
@@ -82,6 +82,7 @@ typedef struct bee_ui_funcs
gboolean (*user_new)( bee_t *bee, struct bee_user *bu );
gboolean (*user_free)( bee_t *bee, struct bee_user *bu );
gboolean (*user_fullname)( bee_t *bee, bee_user_t *bu );
+ gboolean (*user_group)( bee_t *bee, bee_user_t *bu );
gboolean (*user_status)( bee_t *bee, struct bee_user *bu, struct bee_user *old );
gboolean (*user_msg)( bee_t *bee, bee_user_t *bu, const char *msg, time_t sent_at );
gboolean (*user_typing)( bee_t *bee, bee_user_t *bu, guint32 flags );
diff --git a/protocols/nogaim.c b/protocols/nogaim.c
index 00fe0ebf..df97393d 100644
--- a/protocols/nogaim.c
+++ b/protocols/nogaim.c
@@ -378,6 +378,9 @@ void imcb_add_buddy( struct im_connection *ic, const char *handle, const char *g
bu = bee_user_new( bee, ic, handle, 0 );
bu->group = bee_group_by_name( bee, group, TRUE );
+
+ if( bee->ui->user_group )
+ bee->ui->user_group( bee, bu );
}
void imcb_rename_buddy( struct im_connection *ic, const char *handle, const char *fullname )