Bot Warn System
Platform: mIRC
Published Jun 20, 2009
Updated Jun 21, 2009
This is a warn system for your bot. If someone is abusing your bot, you can warn them. People get 4 chances before the bot ignores them.
All you have to do is paste this code into your remotes.
After you do that, make sure to type /auser 10 YourNick - This will make it so only you (the bot owner) can warn people.
Then, to warn someone, type !warn <nick>
Thanks to Jethro for helping me with this script.
on *:EXIT:save
on *:START:make
on me:*:QUIT:save
on *:CONNECT:make
on *:DISONNECT:save
on me:*:PART:#:save
on 10:TEXT:!warn*:#: {
$iif(!$2,.msg # $nick $+ $chr(44) please enter !warn Nick_Here,hinc -m warn $2)
if ($hget(warn,$2) == 1) {
.msg # 4 $+ $2 $+ , you have been warned for the $ord($v1) time. $&
You have 2 warns left before you will be banned from using me.
}
if ($hget(warn,$2) == 2) {
.msg # 4 $+ $2 $+ , you have been warned for the $ord($v1) time. $&
You have 1 warn left before you will be banned from using me.
}
if ($hget(warn,$2) == 3) {
.msg # 4 $+ $2 $+ , you have been warned for the $ord($v1) time. $&
You have no more warnings remaining, this is your last chance.
}
if ($hget(warn,$2) >= 4) {
msg # 4 $+ $2 $+ , you have been banned. Bye. | ignore $address($2,2) | hdel warn $2
}
}
alias -l make {
if (!$hget(warn)) { hmake warn 100 }
if ($isfile($qt($scriptdirwarn.txt))) { .hload warn $qt($scriptdirwarn.txt) }
}
alias -l save {
hsave warn $qt($scriptdirwarn.txt)
}