]> jfr.im git - solanum.git/blobdiff - extensions/sno_whois.c
Merge pull request #288 from edk0/umode-o-split
[solanum.git] / extensions / sno_whois.c
index 3e6e7203c6c3aa5eb8f8694a55b21d350549adf7..eebc4d4ecb8fa8fa2caeb651b43ef2e84861b83f 100644 (file)
 #include "client.h"
 #include "ircd.h"
 #include "send.h"
+#include "s_newconf.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[] = {
@@ -38,7 +48,7 @@ fini(void)
        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 +58,7 @@ show_whois(hook_data_client *data)
 
        if(MyClient(target_p) &&
 #ifdef OPERONLY
-          IsOper(target_p) &&
+          IsOperGeneral(target_p) &&
 #endif
           (source_p != target_p) &&
           (target_p->snomask & snomask_modes['W']))