2 * +W snomask: Displays if a local user has done a WHOIS request on you.
3 * derived from spy_whois_notice.c.
5 * If #define OPERONLY is removed, then any user can use this snomask.
7 * $Id: sno_whois.c 3470 2007-05-24 04:01:12Z nenolod $
17 /* undefine this to allow anyone to receive whois notifications */
20 void show_whois(hook_data_client
*);
22 mapi_hfn_list_av1 whois_hfnlist
[] = {
23 {"doing_whois", (hookfn
) show_whois
},
24 {"doing_whois_global", (hookfn
) show_whois
},
31 snomask_modes
['W'] = find_snomask_slot();
39 snomask_modes
['W'] = find_snomask_slot();
42 DECLARE_MODULE_AV1(sno_whois
, init
, fini
, NULL
, NULL
, whois_hfnlist
, "$Revision: 3470 $");
45 show_whois(hook_data_client
*data
)
47 struct Client
*source_p
= data
->client
;
48 struct Client
*target_p
= data
->target
;
50 /* source being MyConnect() is implicit here from m_whois.c --fl */
51 if(MyClient(target_p
) &&
55 (source_p
!= target_p
) &&
56 (target_p
->snomask
& snomask_modes
['W']))
58 sendto_one_notice(target_p
,
59 ":*** Notice -- %s (%s@%s) is doing a whois on you [%s]",
61 source_p
->username
, source_p
->host
,
62 source_p
->user
->server
);