All pastes #564468 Raw Edit

Unnamed

public text v1 · immutable
·published 2007-06-13 16:34 UTC
rendered paste body
# cyanide's anti-whois script. usable only by ircops and above or if your server allows you to set mode +W (Letting you see when people do /whois on you)
#
# Plugin tested in Windows Vista with XChat 2.6.8-1 (SilvereX's build), ActivePerl 5.8.8 build 819.
#
# Some code borrowed from Apache-User's Anti Whois script [ apache-user@public-files.de ]
#
# Code is provided as-is with no support or guarantee of proper functioning.
# Please direct your support requests, feature suggestions and general whining to /dev/null

$SCRIPTNAME = "cyanide's Anti-whois script";  $VERSION = "0.2";
IRC::register($SCRIPTNAME,$VERSION,"","");

IRC::print("Loaded $SCRIPTNAME $VERSION \n");
IRC::add_message_handler("NOTICE", "whois_handler");

sub whois_handler {
	$who_cmd = "/whois";
	$output = "@_";
	@whois = split / /, $output;
	$nick = "@whois[4]";
	$command = "@whois[8]";

	if ($command eq $who_cmd) {
		if ($nick eq "cyanide" || $nick eq "banHAMMER" || $nick eq "harleyg" || $nick eq "jas0nuk" || $nick eq "Mathieulh" || $nick eq "robertfisk" || $nick eq "x3sphere" || $nick eq "Axionkt" || $nick eq "corpdecker" || $nick eq "mr_dank" || $nick eq "dank_bnc" || $nick eq "MrTuto_Alek" || $nick eq "Reggie" || $nick eq "SiLoSe" || $nick eq "wakAwooki" || $nick eq "uberfry" || $nick eq "ALoGeNo") {
			IRC::command("/notice $nick dood i rock");
		} else {
			my $log_to = "-whois";
			IRC::command("/QUERY -nofocus $log_to");
			IRC::command("/ctcp $nick version");
			IRC::command("/whois $nick");
#			IRC::command("/msg $nick Don't whois IRCops and Server Admins, you will be banned!");
			IRC::print_with_channel("PMed : $nick\n", "$log_to", '');
#			IRC::command("/whois $nick");
		}
	}
return 0;
}