Author: Ghostwolf <foxxe@wtfs.net>
[ircu2.10.12-pk.git] / ircd / m_whois.c
index 5a5d8cb3809ed10e52c79af1f4215f485ae83c83..79a7205deb9865f2af543bcea53ba7c32badce0a 100644 (file)
  */
 #include "config.h"
 
-#if 0
-/*
- * No need to include handlers.h here the signatures must match
- * and we don't need to force a rebuild of all the handlers everytime
- * we add a new one to the list. --Bleep
- */
-#include "handlers.h"
-#endif /* 0 */
 #include "channel.h"
 #include "client.h"
 #include "hash.h"
@@ -193,8 +185,8 @@ static void do_whois(struct Client* sptr, struct Client *acptr, int parc)
 
 #ifdef HEAD_IN_SAND_WHOIS_SERVERNAME
   if (!IsAnOper(sptr) && sptr != acptr)
-    send_reply(sptr, RPL_WHOISSERVER, name, "*.undernet.org",
-              "The Undernet Underworld");
+    send_reply(sptr, RPL_WHOISSERVER, name, HEAD_IN_SAND_SERVERNAME,
+              HEAD_IN_SAND_SERVERINFO);
   else
 #endif
     send_reply(sptr, RPL_WHOISSERVER, name, cli_name(a2cptr),
@@ -208,6 +200,13 @@ static void do_whois(struct Client* sptr, struct Client *acptr, int parc)
     if (IsAnOper(acptr) && (HasPriv(acptr, PRIV_DISPLAY) ||
                            HasPriv(sptr, PRIV_SEE_OPERS)))
        send_reply(sptr, RPL_WHOISOPERATOR, name);
+
+    if (IsAccount(acptr))
+      send_reply(sptr, RPL_WHOISACCOUNT, name, user->account);
+
+    if (HasHiddenHost(acptr) && IsAnOper(sptr))
+      send_reply(sptr, RPL_WHOISACTUALLY, name, user->username,
+        user->realhost, ircd_ntoa((const char*) &(cli_ip(acptr))));
    
     /* Hint: if your looking to add more flags to a user, eg +h, here's
      *       probably a good place to add them :)