]> jfr.im git - solanum.git/blobdiff - extensions/sno_whois.c
extensions/extb_ssl.c: make certfp parameter case-insensitive
[solanum.git] / extensions / sno_whois.c
index d02c6f6a322bdeee64c4e75355e4c4b01a77d763..f5c69d92c1accca3567d4cc6b367536467c1f1df 100644 (file)
@@ -4,8 +4,6 @@
  *
  * If #define OPERONLY is removed, then any user can use this snomask
  * (you need to put ~servnotice in oper_only_umodes for this to work).
- *
- * $Id: sno_whois.c 3498 2007-05-30 10:22:25Z jilles $
  */
 
 #include "stdinc.h"
 /* undefine this to allow anyone to receive whois notifications */
 #define OPERONLY
 
+static const char sno_desc[] =
+       "Adds server notice mask +W that allows "
+#ifdef OPERONLY
+       "operators"
+#else
+       "users"
+#endif
+       " to receive notices for when a WHOIS has been done on them";
+
 void show_whois(hook_data_client *);
 
 mapi_hfn_list_av1 whois_hfnlist[] = {
@@ -37,10 +44,10 @@ init(void)
 static void
 fini(void)
 {
-       snomask_modes['W'] = find_snomask_slot();
+       snomask_modes['W'] = 0;
 }
 
-DECLARE_MODULE_AV1(sno_whois, init, fini, NULL, NULL, whois_hfnlist, "$Revision: 3498 $");
+DECLARE_MODULE_AV2(sno_whois, init, fini, NULL, NULL, whois_hfnlist, NULL, NULL, sno_desc);
 
 void
 show_whois(hook_data_client *data)
@@ -48,7 +55,7 @@ show_whois(hook_data_client *data)
        struct Client *source_p = data->client;
        struct Client *target_p = data->target;
 
-       if(MyClient(target_p) && 
+       if(MyClient(target_p) &&
 #ifdef OPERONLY
           IsOper(target_p) &&
 #endif
@@ -59,6 +66,6 @@ show_whois(hook_data_client *data)
                                ":*** Notice -- %s (%s@%s) is doing a whois on you [%s]",
                                source_p->name,
                                source_p->username, source_p->host,
-                               source_p->user->server);
+                               source_p->servptr->name);
        }
 }