X-Git-Url: https://jfr.im/git/irc/rqf/shadowircd.git/blobdiff_plain/9e6feafe2978a83bf2f0d1d7105ca1cbd3003181..5274a6d761a756725be24da301b61f94ea87f63e:/extensions/sno_whois.c diff --git a/extensions/sno_whois.c b/extensions/sno_whois.c index 6fed63c..cc81942 100644 --- a/extensions/sno_whois.c +++ b/extensions/sno_whois.c @@ -2,9 +2,10 @@ * +W snomask: Displays if a local user has done a WHOIS request on you. * derived from spy_whois_notice.c. * - * If #define OPERONLY is removed, then any user can use this snomask. + * 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 3468 2007-05-24 03:58:27Z nenolod $ + * $Id: sno_whois.c 3498 2007-05-30 10:22:25Z jilles $ */ #include "stdinc.h" @@ -21,6 +22,7 @@ void show_whois(hook_data_client *); mapi_hfn_list_av1 whois_hfnlist[] = { {"doing_whois", (hookfn) show_whois}, + {"doing_whois_global", (hookfn) show_whois}, {NULL, NULL} }; @@ -38,7 +40,7 @@ fini(void) snomask_modes['W'] = find_snomask_slot(); } -DECLARE_MODULE_AV1(sno_whois, init, fini, NULL, NULL, whois_hfnlist, "$Revision: 3468 $"); +DECLARE_MODULE_AV1(sno_whois, init, fini, NULL, NULL, whois_hfnlist, "$Revision: 3498 $"); void show_whois(hook_data_client *data) @@ -46,7 +48,6 @@ show_whois(hook_data_client *data) struct Client *source_p = data->client; struct Client *target_p = data->target; - /* source being MyConnect() is implicit here from m_whois.c --fl */ if(MyClient(target_p) && #ifdef OPERONLY IsOper(target_p) && @@ -58,6 +59,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); } }