Ban script with remove times
Platform: mIRC
Published Jan 07, 2010
Updated Jan 07, 2010
Just a little script i made to help making bans. You can ban someone, and set a time for how long they are banned for. When the time is up, the ban will be removed. You can specify your own message, or leave the message part blank, and the kick will have a generic kick message.
How to use:
/b <nickname> <reason> | Bans nickname without auto removing the ban. Reason optional.
/b <nickname> <N> <s|second|seconds> <reason> | Bans nickname for N seconds and then removes the ban. Reason optional.
/b <nickname> <N> <m|minute|minutes> <reason> | Same as before, this time with minutes.
/b <nickname> <N> <h|hour|hours> <reason> | Same as before, this time with hours.
alias b {
if $2 == $null {
/mode $chan +b $address($$1, 2)
/kick $chan $$1 Banned from $chan
}
if ($3 == s) || ($3 == seconds) || ($3 == second) {
/mode $chan +b $address($$1, 2)
timer 1 $$2 /mode $chan -b $address($$1, 2)
if ($4- == $null) {
/kick $chan $$1 Banned from $chan for $$2 Seconds
}
if ($4- != $null) {
/kick $chan $$1 $4-
}
}
if ($3 == m) || ($3 == minutes) || ($3 == minute) {
/mode $chan +b $address($$1, 2)
set %minutes $calc( $$2 * 60)
timer 1 %minutes /mode $chan -b $address($$1, 2)
if ($4- == $null) {
/kick $chan $$1 Banned from $chan for $$2 Minutes
}
if ($4- != $null) {
/kick $chan $$1 $4-
}
/unset %minutes
}
if ($3 == h) || ($3 == hours) || ($3 == hour) {
/mode $chan +b $address($$1, 2)
set %hours $calc( $$2 * 3600)
timer 1 %hours /mode $chan -b $address($$1, 2)
if ($4- == $null) {
/kick $chan $$1 Banned from $chan for $$2 Hours
}
if ($4- != $null) {
/kick $chan $$1 $4-
}
/unset %hours
}
else {
/mode $chan +b $address($$1, 2)
/kick $chan $$1 $2-
}
}