on *:TEXT:`warn*:#:{ if ($me isop $chan && $Nick isop $chan) { if (on iswm $2) { if (%warn [ $+ [ $chan ] ] == $null) || (%warn [ $+ [ $chan ] ] == off) { set %warn [ $+ [ $chan ] ] on msg $chan Warning System is now turned to ON. msg $chan When a user joins the channel, they will be given a Warning Level of 0. When the user gets 3 warnings, they are kick-banned from the channel. An op must remove this ban in order for the user to return. msg $chan To deactivate the Warning System, simply type `warn off. halt } elseif (%warn [ $+ [ $chan ] ] == on) { .msg $chan The Warning System is already on. halt } } if (off iswm $2) { if (%warn [ $+ [ $chan ] ] == on) { set %warn [ $+ [ $chan ] ] off msg $chan Warning System is now turned to OFF. msg $chan To reactivate the Warning System, please type `warn on. halt } elseif (%warn [ $+ [ $chan ] ] == off) { .msg $chan The Warning System is already turned off. halt } } if (%warn [ $+ [ $chan ] ] == on) { if ($me isop $chan) && (($nick isop #) || ($nick ishop #)) { inc %warn [ $+ [ $2 ] ] if (%warn [ $+ [ $2 ] ] < 3) { msg $chan $2 has been warned. $2's current warning level is %warn [ $+ [ $2 ] ] $+ . msg $chan $2 has $calc( 3 - %warn [ $+ [ $2 ] ] ) more warns before they are banned. notice $2 You've been warned %warn [ $+ [ $2 ] ] times. 3 warns, and you're out. } if (%warn [ $+ [ $2 ] ] == 3) { msg $chan $2 has been warned enough times. Now for a kickban ^^ .ban -k # $2 You've been warned enough. You're gone } } } } } on *:TEXT:`clearwarn*:#:{ if ($nick isop $chan || $nick ishop $chan || $nick == ``Matt || $nick == KiLikuS) { if (%warn [ $+ [ $2 ] ] isnum 1-3) { set %warn [ $+ [ $2 ] ] 0 msg $chan $2 $+ 's Warning Level has been reset. Current Warning Level is %warn [ $+ [ $2 ] ] $+ . notice $2 Your Warning Level has been reset. Current Warning Level is %warn [ $+ [ $2 ] ] $+ . } } } on *:JOIN:#:{ if (%warn [ $+ [ $chan ] ] == on) { if ($nick == $me || $nick == ``Matt || $nick == KiLikuS) { halt } set %warn [ $+ [ $nick ] ] 0 notice $nick your current warning level is %warn [ $+ [ $nick ] ] } }