summaryrefslogtreecommitdiff
path: root/kike.c
diff options
context:
space:
mode:
authorPřemysl Janouch <p@janouch.name>2018-08-01 09:28:41 +0200
committerPřemysl Janouch <p@janouch.name>2018-10-21 05:40:24 +0200
commitf80226620c3dd349337ffbe41db6dcbec2bf56fb (patch)
treeb1fb444bd3ef1b1c467678942669244007737dc6 /kike.c
parent2fccfb10f701f3b38eb7555e0f192f267f850001 (diff)
downloadxK-f80226620c3dd349337ffbe41db6dcbec2bf56fb.tar.gz
xK-f80226620c3dd349337ffbe41db6dcbec2bf56fb.tar.xz
xK-f80226620c3dd349337ffbe41db6dcbec2bf56fb.zip
kike: fix wildcard handling in WHOIS
Diffstat (limited to 'kike.c')
-rw-r--r--kike.c12
1 files changed, 6 insertions, 6 deletions
diff --git a/kike.c b/kike.c
index 64bebc9..d0aa6a3 100644
--- a/kike.c
+++ b/kike.c
@@ -2459,12 +2459,12 @@ irc_handle_whois (const struct irc_message *msg, struct client *c)
{
struct str_map_iter iter = str_map_iter_make (&c->ctx->users);
bool found = false;
- while ((target = str_map_iter_next (&iter))
- && !irc_fnmatch (mask, target->nickname))
- {
- irc_send_whois_reply (c, target);
- found = true;
- }
+ while ((target = str_map_iter_next (&iter)))
+ if (!irc_fnmatch (mask, target->nickname))
+ {
+ irc_send_whois_reply (c, target);
+ found = true;
+ }
if (!found)
irc_send_reply (c, IRC_ERR_NOSUCHNICK, mask);
}