X-Git-Url: https://jfr.im/git/solanum.git/blobdiff_plain/c88cdb00957d1bafae4587343b5ab7df14b75f8b..9dd128b4da6e54ca9f97cfcd48e345a57790ffbe:/extensions/sno_whois.c diff --git a/extensions/sno_whois.c b/extensions/sno_whois.c index cc819427..eebc4d4e 100644 --- a/extensions/sno_whois.c +++ b/extensions/sno_whois.c @@ -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" @@ -14,10 +12,20 @@ #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[] = { @@ -37,10 +45,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,9 +56,9 @@ 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) && + IsOperGeneral(target_p) && #endif (source_p != target_p) && (target_p->snomask & snomask_modes['W']))