Simple auto kick-ban For bot
this snippet does not work with nicks without status
Only works woth @Op | %HalfOp | +Voice
SyntaX = !ban [reason]
EnjoY :D
#####Auto kick-ban | Put in your remote (Alt +R)
on *:TEXT:!ban *:#:{
if ($nick == $nick) { halt }
if ($me ishop $chan || $me isop $chan) {
if ($$2 ishop $chan || $$2 isop $chan) { halt }
elseif ($nick !ishop $chan || $nick !isop $chan) && ($$2 ison $chan && $$3 isnum) {
set %reason. [ $+ [ $$2 ] ] $4-
if (%reason. [ $+ [ $$2 ] ] == $null) { set %reason. [ $+ [ $$2 ] ] No Reason }
inc %kcount
ban -ku $+ $calc($3 * 60) $chan $$2 2 10Reason: %reason. [ $+ [ $$2 ] ] 1¤3 $$3 Minute Ban 1¤6 Requested By: $nick 1¤12 Noobs Pwnt: %kcount
unset %reason. [ $+ [ $$2 ] ]
}
}
}
on *:TEXT:!banhelp:#: {
if ($nick == $nick) { halt }
if ($me isop $chan) { notice $nick *** SYNTAX [TEMPBAN]: !ban <nick> <minutes> [reason] }
if ($nick isop $chan) { notice $nick *** SYNTAX [TEMPBAN]: !ban <nick> <minutes> [reason] }
if ($nick ishop $chan) { notice $nick *** SYNTAX [TEMPBAN]: !ban <nick> <minutes> [reason] }
if ($nick isvoice $chan) { notice $nick *** SYNTAX [TEMPBAN]: !ban <nick> <minutes> [reason] }
if ($nick isvoice $chan) { notice $nick *** SYNTAX [TEMPBAN]: !ban <nick> <minutes> [reason] }
if ($nick == $nick) { notice $nick Sorry, but you are not op/halfop/voice in this channel }
}
on *:TEXT:!ban:#: {
if ($nick == $nick) { notice $nick Sorry, but you are not op/halfop/voice in this channel to use that command }
}
I should avoid repetition :
if ($me isop $chan) { notice $nick SYNTAX [TEMPBAN]: !ban [reason] }
if ($nick isop $chan) { notice $nick SYNTAX [TEMPBAN]: !ban [reason] }
if ($nick ishop $chan) { notice $nick SYNTAX [TEMPBAN]: !ban [reason] }
if ($nick isvoice $chan) { notice $nick SYNTAX [TEMPBAN]: !ban [reason] }
if ($nick isvoice $chan) { notice $nick *** SYNTAX [TEMPBAN]: !ban [reason] }
if ($nick == $nick) { notice $nick Sorry, but you are not op/halfop/voice in this channel }
Epid has a point:
if ($nick !isreg $chan) {
notice $nick *** SYNTAX [TEMPBAN]: !ban <nick> <minutes> [reason]
}
else {
notice $nick Sorry, but you are not op/halfop/voice in this channel
}
You have the same command for !ban. Only the first text event will trigger. You either need to incorporate that into one event or use a different trigger to bypass that. The code routine in your first text event is rather redundant and needing some improvement.