From 83b19b7c5a002a64259441f4dc4af743b560eafd Mon Sep 17 00:00:00 2001 From: Arnaud Cornet Date: Wed, 8 Oct 2008 01:04:14 +0200 Subject: [PATCH] Hack around to make halfop support actually work. --- src/irc.c | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/src/irc.c b/src/irc.c index a6973ab..42493c5 100644 --- a/src/irc.c +++ b/src/irc.c @@ -270,6 +270,9 @@ static int who_arg_to_ovmask(char *str) ovmask |= NICKOP; if (strchr(str, '+')) ovmask |= NICKVOICED; + /* most likely useless */ + if (strchr(str, '%')) + ovmask |= NICKHALFOP; return ovmask; } @@ -296,7 +299,10 @@ static int irc_352(struct link_server *server, struct line *line) if (!nick) return OK_COPY_WHO; - nick->ovmask = who_arg_to_ovmask(line->elemv[7]); + /* it seems halfop status is not reported in whoreply messages + * do we really need to parse this ? */ + nick->ovmask &= NICKHALFOP; + nick->ovmask |= who_arg_to_ovmask(line->elemv[7]); } return OK_COPY_WHO;