aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorShane Synan <digitalcircuit36939@gmail.com>2016-02-04 02:17:46 -0600
committerShane Synan <digitalcircuit36939@gmail.com>2016-02-04 02:17:46 -0600
commit4543356cfb5b8de4ec4f54d8375945bb695ec9dd (patch)
tree072c89c6d8edb2c622079419115b7e303ce08f74
parentdb5ef3a204c3a518adb7cedde0ffb067d6336add (diff)
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.
-rw-r--r--irc_im.c12
1 files 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;
}