diff options
author | dequis <dx@dxzone.com.ar> | 2015-10-08 04:40:03 -0300 |
---|---|---|
committer | dequis <dx@dxzone.com.ar> | 2015-10-08 04:43:45 -0300 |
commit | 2f736927554d588d00d31f367cd07b9845036e09 (patch) | |
tree | 345d4cf442e9fc64e66f6465e07ff272f8a200d9 /irc_send.c | |
parent | 687ec880201e4872a9abf72f5efe135164fc349b (diff) |
irc_send_who: move the iu->flags check after iu has a value...
Moving this was suggested during the review of the multi-prefix patch as
ordering the sets of status_prefix... and it seemed reasonable to me.
Thanks valgrind.
Diffstat (limited to 'irc_send.c')
-rw-r--r-- | irc_send.c | 6 |
1 files changed, 3 insertions, 3 deletions
@@ -294,9 +294,6 @@ void irc_send_who(irc_t *irc, GSList *l, const char *channel) * { <H|G>, <@|%|+|\0>, \0 } */ char status_prefix[3] = {0}; - /* rfc1459 doesn't mention this: G means gone, H means here */ - status_prefix[0] = iu->flags & IRC_USER_AWAY ? 'G' : 'H'; - if (is_channel) { irc_channel_user_t *icu = l->data; status_prefix[1] = irc_channel_user_get_prefix(icu); @@ -305,6 +302,9 @@ void irc_send_who(irc_t *irc, GSList *l, const char *channel) iu = l->data; } + /* rfc1459 doesn't mention this: G means gone, H means here */ + status_prefix[0] = iu->flags & IRC_USER_AWAY ? 'G' : 'H'; + irc_send_num(irc, 352, "%s %s %s %s %s %s :0 %s", is_channel ? channel : "*", iu->user, iu->host, irc->root->host, iu->nick, status_prefix, iu->fullname); |