]> jfr.im git - irc/quakenet/snircd.git/blobdiff - ircd/m_whois.c
fixed autochanmodes code so it works for channel modes +CN
[irc/quakenet/snircd.git] / ircd / m_whois.c
index fec4b53074d7e78829c013e2bbaac3467153ec72..8a2a4304af041afc5229402700ce27f28ef079f5 100644 (file)
@@ -211,10 +211,13 @@ static void do_whois(struct Client* sptr, struct Client *acptr, int parc)
     if (IsAccount(acptr))
       send_reply(sptr, RPL_WHOISACCOUNT, name, user->account);
 
-    if (HasHiddenHost(acptr) && (IsAnOper(sptr) || acptr == sptr))
-      send_reply(sptr, RPL_WHOISACTUALLY, name, user->username,
+    if ((HasHiddenHost(acptr) || HasSetHost(acptr)) && (IsAnOper(sptr) || acptr == sptr))
+      send_reply(sptr, RPL_WHOISACTUALLY, name, user->realusername,
                  user->realhost, ircd_ntoa(&cli_ip(acptr)));
 
+    if (!IsAnOper(sptr) && IsParanoid(acptr) && IsAnOper(acptr))
+      sendcmdto_one(&me, CMD_NOTICE, acptr, "%C :whois: %s performed a /WHOIS on you.", acptr, cli_name(sptr));
+    
     /* Hint: if your looking to add more flags to a user, eg +h, here's
      *       probably a good place to add them :)
      */