I need help with a !tb <-- Time Ban script. I want it to be like !tb 1 (d,w,y) Any Ideas?
Here it is!
On $*:Text:/^[@!.](Timeban|tb)/Si:#:{
if ($2 == -s) {
set %o.1 $iif($left($1,1) == @, msg $chan, notice $nick)
%o.1 $logo(timebans) I've did %timebans timebans.
unset %o.*
}
else {
if ($nick isop $chan) || ($nick ishop $chan) {
if ($me ishop $chan || $me isop $chan) {
inc %timebans 1
set %tb.dur $calc( $3 * 9999 )
set %tb.reason $iif($left($4,1) == $null, No reason given, $4-)
/ban $+(-ku,%tb.dur) $chan $2 $2 3has been timebanned for $3 $+ 3mins! Reason: %tb.reason
unset %tb.*
}
}
else { notice $nick $logo(error) You must be a channel operator (+o) or an channel halfop (+h) to use this command. $+([) $+ $scripter $+ $+(]) }
}
}
ON :TEXT::#: {
if ($strip($1) == !tb) {
if ($nick isop $chan) || ($nick ishop $chan) {
if ($me isop $chan) || ($me ishop $chan) {
var %d = $iif($strip($3) > 0, $calc($v1 86400), 0)
var %w = $iif($strip($4) > 0, $calc($v1 604800), 0)
var %y = $iif($strip($5) > 0, $calc($v1 * 3153600), 0)
var %secs = $calc(%d + %w +%y)
ban $+(-u,%secs) $chan $strip($2)
kick $chan $strip($2) $strip($2) Is Banned For %y Years, %w Weeks, %d Days.
}
}
}
}
-----------NOT TESTED-----------
Type !tb nick day(s) week(s) year(s)
For 0 days/weeks/years use 0 .
I didn't add the counting part.. and the !isop you can add them easily though.. or not add them.. npt so important
Sorry for the messy format i'm on Android right now..