This script allows your mIRC bot to kick or ban users on your command. This is similar to
BotServ Fantasy commands and
I strongly suggest you use botserv's fantasy commands in place of this script:
/msg botserv set #yourchannel fantasy onIf you still want to use this, first copy this line to your
Variables and change the example protectednicks to nicks of users you never want kicked or banned. If you don't have any just leave the variable empty. If you have more then you may add more. All nicks should be separated by a space.
%nickwhitelist protectednick1 protectednick2 protectednick3
Copy this code to your
Remote tab and change #YOURCHANNEL to your channel's name.
on !*:TEXT:!ban*:#YOURCHANNEL:{
if (($2 != $me) && (, $+ $2 $+ , !isin %nickwhitelist)) {
if ($nick isop $chan) {
if ($3) {
ban -ku $+ $3 $chan $2 $4-
}
if (!$3) {
msg $nick $2 banned for 300 seconds since you didn't include how many seconds the ban should last.
ban -ku300 $chan $2
}
if (!$2) {
msg $nick you need to specify a nick! Proper syntax is !ban <nick> <timeinseconds> e.g. !ban nick 300
}
}
}
on !*:TEXT:!kick*:#YOURCHANNEL:{
if (($2 != $me) && (, $+ $2 $+ , !isin %nickwhitelist)) {
if ($nick isop $chan) {
if ($3) {
kick $chan $2 $3
}
if (!$3) {
kick $chan $2 Stop it!
}
if (!$2) {
msg $nick you need to specify a nick! Proper syntax is !kick <nick> <reason> e.g. !kick nick Don't spam
}
}
}
The ban script is used by typing !ban nick time
If time isn't include the user will only be banned for 300 seconds. (You may not use this script to permamently ban any user.)
The kick script is used by typing !kick nick reason
If a reason isn't provided, "Stop it!" will be used.
Feel free to edit this script if it doesn't meet your needs.