diff options
author | Shane Synan <digitalcircuit36939@gmail.com> | 2016-02-29 15:24:01 -0600 |
---|---|---|
committer | dequis <dx@dxzone.com.ar> | 2016-03-20 00:58:05 -0300 |
commit | f892236adc18544c0ff424a18e21f98c5962ce12 (patch) | |
tree | f85943414f61dd54de361a1cd55d173070a43332 /irc_im.c | |
parent | 4e0e5909c201ecce6a927dcda91c3e3e457faa2a (diff) |
Send new away message when message changes
Send new away message when away-notify is enabled and the status
changes (e.g. "Away" to "Mobile") or the status message changes
without returning from away.
Fixes IRC clients with away-notify persisting old away messages.
Diffstat (limited to 'irc_im.c')
-rw-r--r-- | irc_im.c | 9 |
1 files changed, 8 insertions, 1 deletions
@@ -147,9 +147,16 @@ 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 away-notify enabled, send status updates when: + * Away or Online state changes + * Status changes (e.g. "Away" to "Mobile") + * Status message changes + */ 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))) { + (bu->flags & BEE_USER_ONLINE) != (old->flags & BEE_USER_ONLINE) || + (g_strcmp0(bu->status, old->status) != 0) || + (g_strcmp0(bu->status_msg, old->status_msg) != 0))) { irc_send_away_notify(iu); } |