diff options
author | dequis <dx@dxzone.com.ar> | 2015-08-02 16:21:56 -0300 |
---|---|---|
committer | dequis <dx@dxzone.com.ar> | 2015-08-08 01:29:49 -0300 |
commit | 6b56512c9f8c38b71195f75b414f79f73ecbb701 (patch) | |
tree | 770cdefa69e20152a198f1ecda2e3dda5e78620f | |
parent | 4850065cf2518aa26b22b5609bda2459ac22f403 (diff) |
Pass 'reason' values around in imcb_chat_remove_buddy/chat_remove_user
-rw-r--r-- | irc_im.c | 4 | ||||
-rw-r--r-- | protocols/bee.h | 2 | ||||
-rw-r--r-- | protocols/bee_chat.c | 2 |
3 files changed, 4 insertions, 4 deletions
@@ -653,7 +653,7 @@ static gboolean bee_irc_chat_add_user(bee_t *bee, struct groupchat *c, bee_user_ return TRUE; } -static gboolean bee_irc_chat_remove_user(bee_t *bee, struct groupchat *c, bee_user_t *bu) +static gboolean bee_irc_chat_remove_user(bee_t *bee, struct groupchat *c, bee_user_t *bu, const char *reason) { irc_t *irc = bee->ui_data; irc_channel_t *ic = c->ui_data; @@ -665,7 +665,7 @@ static gboolean bee_irc_chat_remove_user(bee_t *bee, struct groupchat *c, bee_us /* TODO: Possible bug here: If a module removes $user here instead of just using imcb_chat_free() and the channel was IRC_CHANNEL_TEMP, we get into a broken state around here. */ - irc_channel_del_user(ic, bu == bee->user ? irc->user : bu->ui_data, IRC_CDU_PART, NULL); + irc_channel_del_user(ic, bu == bee->user ? irc->user : bu->ui_data, IRC_CDU_PART, reason); return TRUE; } diff --git a/protocols/bee.h b/protocols/bee.h index afe22c95..4a23d00c 100644 --- a/protocols/bee.h +++ b/protocols/bee.h @@ -118,7 +118,7 @@ typedef struct bee_ui_funcs { gboolean (*chat_log)(bee_t *bee, struct groupchat *c, const char *text); gboolean (*chat_msg)(bee_t *bee, struct groupchat *c, bee_user_t *bu, const char *msg, time_t sent_at); gboolean (*chat_add_user)(bee_t *bee, struct groupchat *c, bee_user_t *bu); - gboolean (*chat_remove_user)(bee_t *bee, struct groupchat *c, bee_user_t *bu); + gboolean (*chat_remove_user)(bee_t *bee, struct groupchat *c, bee_user_t *bu, const char *reason); gboolean (*chat_topic)(bee_t *bee, struct groupchat *c, const char *new_topic, bee_user_t *bu); gboolean (*chat_name_hint)(bee_t *bee, struct groupchat *c, const char *name); gboolean (*chat_invite)(bee_t *bee, bee_user_t *bu, const char *name, const char *msg); diff --git a/protocols/bee_chat.c b/protocols/bee_chat.c index be193405..6ea86c3a 100644 --- a/protocols/bee_chat.c +++ b/protocols/bee_chat.c @@ -229,7 +229,7 @@ void imcb_chat_remove_buddy(struct groupchat *c, const char *handle, const char } if (bee->ui->chat_remove_user && bu) { - bee->ui->chat_remove_user(bee, c, bu); + bee->ui->chat_remove_user(bee, c, bu, reason); } } |