From 2f736927554d588d00d31f367cd07b9845036e09 Mon Sep 17 00:00:00 2001 From: dequis Date: Thu, 8 Oct 2015 04:40:03 -0300 Subject: 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. --- irc_send.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'irc_send.c') diff --git a/irc_send.c b/irc_send.c index 4dbc82d5..e2ec0f59 100644 --- a/irc_send.c +++ b/irc_send.c @@ -294,9 +294,6 @@ void irc_send_who(irc_t *irc, GSList *l, const char *channel) * { , <@|%|+|\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); -- cgit v1.2.3