if (word(2 $loadinfo()) != [pf]) { load -pf $word(1 $loadinfo()); return; }; # Copyright (c) 2004 BlackJac@EFNet # # Version: 2.2.2004.05.06.1 # # This script will automatically perform a WHOIS on anyone sending you a # private message or performing a WHOIS on you (assuming you have the # ability to see that). package autowhois; # Available settings: # 0 - feature is disabled # 1 - whois anyone sending you a private message # 2 - whois anyone performing a whois on you # 3 - whois anyone sending you a private message or performing a whois on you assign AUTOWHOIS 3; # Number of seconds since the last private message or whois request before # automatically doing another whois on the person if they send you another pri- # vate message or do another whois on you. assign AUTOWHOIS_RECHECK 1800; alias autowhois.whois (nick, void) { if (nick) { fe ($getarrays(autowhois.array.*)) aa { if (time() - getitem($aa 0) > AUTOWHOIS_RECHECK) { @ delarray($aa); }; }; if (!listarray(autowhois.array.$nick)) { whois $nick; }; @ setitem(autowhois.array.$nick 0 $time()); }; }; on #-msg 414 "*" { if (AUTOWHOIS == 1 || AUTOWHOIS == 3) { autowhois.whois $0; }; }; on #-server_notice 414 "* Notice -- % % is doing a *whois on you*" { if (AUTOWHOIS > 1) { autowhois.whois $4; }; };