summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPřemysl Eric Janouch <p@janouch.name>2020-10-19 04:21:52 +0200
committerPřemysl Eric Janouch <p@janouch.name>2020-10-19 04:21:52 +0200
commit474657c7b30949ae6cff429082f3ab648d83caa0 (patch)
tree7194bed73238d9888ec9573f3e014e3c7a5fd073
parent323a3723893f98465af349d16d42e4da332a93ee (diff)
downloadxK-474657c7b30949ae6cff429082f3ab648d83caa0.tar.gz
xK-474657c7b30949ae6cff429082f3ab648d83caa0.tar.xz
xK-474657c7b30949ae6cff429082f3ab648d83caa0.zip
degesch: fix processing WHO replies
We don't want to print the reply for ourselves nor for unknown or PM-only users.
-rw-r--r--degesch.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/degesch.c b/degesch.c
index e47cb23..aa23b2d 100644
--- a/degesch.c
+++ b/degesch.c
@@ -7510,12 +7510,12 @@ irc_handle_rpl_whoreply (struct server *s, const struct irc_message *msg)
struct user *user = str_map_find (&s->irc_users, nickname);
// This makes sense to set only with the away-notify capability so far.
- // We track ourselves by other means and we can't track PM-only users yet.
- if (!channel || !channel->show_names_after_who
- || !user || user == s->irc_user || !user->channels)
+ if (!channel || !channel->show_names_after_who)
return false;
- user->away = *chars == 'G';
+ // We track ourselves by other means and we can't track PM-only users yet.
+ if (user && user != s->irc_user && user->channels)
+ user->away = *chars == 'G';
return true;
}