with this you can either set a permeant ban or a timed ban.
commands:
!kb - sets a regular ban
!ban - sets a timed ban
!kick - kicks
this also takes off +e on someone's name/address so they will be banned/kicked no matter what. (only if the bot is halfop+)
edited: cleaned it up a little bit.
on $*:TEXT:/^[!@.]ban/Si:#: {
if ($nick isop $chan) || ($nick ishop $chan) {
if ($1 != !ban) { halt
}
if ($2 == $null) {
notice $nick please enter a nick to ban! | halt
}
if ($2 isop $chan) && ($nick ishop $chan) || ($address($2,2) == $address($me,2)) {
notice $nick you cannot ban $2 from $chan | halt
}
if ($3 != $null) {
ban -ku $+ $calc($3 * 60) $chan $address($2,2) $4-
.kick $chan $2 14you've been banned for4 $3 14$iif($3 == 1,minute,minutes) $+ . reason:4 $iif($4- == $null,no reason.,$4-) | halt
}
if ($3 == $null) {
notice $nick 14if the ban time in seconds is not specified the default is4 120 14seconds
ban -ku120 $chan $address($2,2)
kick $chan $2 14 you've been banned for2 14minutes. reason: $iif($4- == $null,no reason.,$4-) | halt
}
}
else notice $nick access denied
}
on $*:TEXT:/^[!@]kb/Si:#: {
if ($2 == $null) {
notice $nick you must enter a nick to kb! | halt
}
if ($2 isop $chan) && ($nick ishop $chan) {
notice $nick you cannot ban $2 from $chan | halt
}
if ($nick isop $chan) || ($nick ishop $chan) || ($wildsite == $address($me,2)) {
mode $chan -e $address($2,2)
mode $chan -e $2
ban $chan $address($2,2)
kick $chan $2 $iif($3- == $null,no reason.,$3-)
}
}
on $*:TEXT:/^[!@](k|ick)/Si:#: {
if ($2 == $null) {
notice $nick you must enter a nick to kick! | halt
}
if ($1 == $kill) { halt }
if ($2 isop $chan) && ($nick ishop $chan) || ($address($2,2) == $address($me,2)) {
notice $nick you cannot kick $2 from $chan | halt
}
if ($nick isop $chan) || ($nick ishop $chan) || ($wildsite == $address($me,2)) {
.kick $chan $2 $iif($3- == $null,no reason.,$3-)
}
}
on *:BAN:#: {
if ($me isop $chan) {
mode $chan -e $address($2,2)
mode $chan -e $2
}
}
on *:KICK:#: {
if ($me isop $chan) {
mode $chan -e $2
mode $chan -e $address($2,2)
}
}
The halt was stopping it from banning and kicking that is what i noticed because when i tried banning it said can not kick [nick] from [#channel]