From 4543356cfb5b8de4ec4f54d8375945bb695ec9dd Mon Sep 17 00:00:00 2001 From: Shane Synan Date: Thu, 4 Feb 2016 02:17:46 -0600 Subject: Send away-notify after join/part from IRC channel Move irc_send_away_notify below bee_irc_channel_update to delay sending the updated away-notify status until after any nicks have joined/quit. Otherwise, some IRC clients will drop the status messages as they go to nicks that the client doesn't know about. --- irc_im.c | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/irc_im.c b/irc_im.c index 72a0d8ce..3b049462 100644 --- a/irc_im.c +++ b/irc_im.c @@ -119,12 +119,6 @@ static gboolean bee_irc_user_status(bee_t *bee, bee_user_t *bu, bee_user_t *old) iu->flags |= IRC_USER_AWAY; } - if ((irc->caps & CAP_AWAY_NOTIFY) && - ((bu->flags & BEE_USER_AWAY) != (old->flags & BEE_USER_AWAY) || - (bu->flags & BEE_USER_ONLINE) != (old->flags & BEE_USER_ONLINE))) { - irc_send_away_notify(iu); - } - if ((bu->flags & BEE_USER_ONLINE) != (old->flags & BEE_USER_ONLINE)) { if (bu->flags & BEE_USER_ONLINE) { if (g_hash_table_lookup(irc->watches, iu->key)) { @@ -153,6 +147,12 @@ static gboolean bee_irc_user_status(bee_t *bee, bee_user_t *bu, bee_user_t *old) bee_irc_channel_update(irc, NULL, iu); + if ((irc->caps & CAP_AWAY_NOTIFY) && + ((bu->flags & BEE_USER_AWAY) != (old->flags & BEE_USER_AWAY) || + (bu->flags & BEE_USER_ONLINE) != (old->flags & BEE_USER_ONLINE))) { + irc_send_away_notify(iu); + } + return TRUE; } -- cgit v1.2.3