A simple spam blocker. Uses Regex and Hash Table. Warns the $nick if he has spammed. Kicks the $nick if he has already being warned and is still spamming. Bans the $nick if he has already being kicked and is still spamming. Unbans the nick after 15 minutes.
Usage: To set ON/OFF, click on channel, select Spam Blocker and there you go.
/*
Spam Blocker
Written by: Siddhant Sutar
Email: siddhantsutar@yahoo.com
IRC: irc.DuelZone.org/irc.netstable.net
*/
on *:START: hfree Spam
#spam on
on *:TEXT:*:#:{
if ($regex($strip($1-),/[A-Z]/g) >= $int($calc($len($1-) / 0.5))) && ($nick !isop $chan) {
hinc -um60 Spam $+($server,.,$chan,.,$wildsite)
if ($hget(Spam,$($+($server,.,$chan,.,$wildsite),2)) == 1) msg $chan $+($nick,:) Stop spamming.
if ($hget(Spam,$($+($server,.,$chan,.,$wildsite),2)) == 2) kick $chan $nick Spamming.
if ($hget(Spam,$($+($server,.,$chan,.,$wildsite),2)) >= 3) ban -ku900 $chan $nick 2 Spamming.
}
}
#spam end
menu channel {
.Spam Blocker
..$iif($group(#spam) == on,$style(2)) Enable:.enable #spam | echo -a Spam Blocker is now ON.
..$iif($group(#spam) == off,$style(2)) Disable:.disable #spam | echo -a Spam Blocker is now OFF.
}