]> jfr.im git - solanum.git/blobdiff - modules/m_whois.c
whois: list active operator block and privset when appropriate
[solanum.git] / modules / m_whois.c
index 1fec224699a67f63184bcabd069cf124161df985..c58f7d83b31ab5297d419bb89033b296bd3fac2a 100644 (file)
@@ -319,6 +319,16 @@ single_whois(struct Client *source_p, struct Client *target_p, int operspy)
                                    GlobalSetOptions.operstring));
        }
 
+       if(MyClient(target_p) && !EmptyString(target_p->localClient->opername) &&
+          (IsOperAdmin(source_p) || IsAdmin(source_p) || (source_p == target_p)))
+       {
+               char buf[512];
+               rb_snprintf(buf, sizeof(buf), "Opered as %s, privset %s",
+                           target_p->localClient->opername, target_p->localClient->privset->name);
+               sendto_one_numeric(source_p, RPL_WHOISSPECIAL, form_str(RPL_WHOISSPECIAL),
+                                  target_p->name, buf);
+       }
+
        if(IsSSLClient(target_p))
        {
                char cbuf[256] = "is using a secure connection";