diff options
author | michael <michael@82007160-df01-0410-b94d-b575c5fd34c7> | 2013-11-08 17:51:38 +0000 |
---|---|---|
committer | michael <michael@82007160-df01-0410-b94d-b575c5fd34c7> | 2013-11-08 17:51:38 +0000 |
commit | ac7f555ff35a091d8a641f6795d15ed059508339 (patch) | |
tree | 1cd1c5771ae63174db8c318767a041e54d68ffd7 /modules | |
parent | 040365d88ab2187347e94fa561e7887f140f7fff (diff) |
- Administrators are now able to see user modes a user has set via /whois
git-svn-id: svn://svn.ircd-hybrid.org/svnroot/ircd-hybrid/branches/8.1.x@2530 82007160-df01-0410-b94d-b575c5fd34c7
Diffstat (limited to 'modules')
-rw-r--r-- | modules/m_whois.c | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/modules/m_whois.c b/modules/m_whois.c index e01901b..95ee280 100644 --- a/modules/m_whois.c +++ b/modules/m_whois.c @@ -33,6 +33,7 @@ #include "conf.h" #include "s_misc.h" #include "s_serv.h" +#include "s_user.h" #include "send.h" #include "irc_string.h" #include "parse.h" @@ -134,6 +135,21 @@ whois_person(struct Client *source_p, struct Client *target_p) me.name, source_p->name, target_p->name, "User connected using a webirc gateway"); + if (HasUMode(source_p, UMODE_ADMIN) || source_p == target_p) + { + unsigned int i = 0; + char *m = buf; + *m++ = '+'; + + for (i = 0; i < 128; ++i) + if (HasUMode(target_p, user_modes[i])) + *m++ = (char)i; + *m = '\0'; + + sendto_one(source_p, form_str(RPL_WHOISMODES), me.name, + source_p->name, target_p->name, buf); + } + if (target_p->sockhost[0] && strcmp(target_p->sockhost, "0")) { if (HasUMode(source_p, UMODE_ADMIN) || source_p == target_p) |