on $*:TEXT:/^[!@](TempBan|tb) */Si:#:{
var %minutes = $calc($3 * 60)
if ($nick !isop $chan) { .notice $nick You are not authorized to do that. | halt }
if ($me !isop $chan) && ($me !ishop $chan) { .notice $nick Sorry $nick $+ , I must be a halfop or op to Temp-ban. | Halt }
if (!$2) { .notice $nick No Name Given | Halt }
if (!$3) { .notice $nick No Time Given | Halt }
if ($2 == $me) || ($2 == %owner) { .notice $nick I'm not going to tempban myself. | Halt }
elseif ($address($nick,2) == $address($me,2)) || ($nick isop $chan) { .mode $chan +b $address($2,2) | .k $2 $2 Temp Banned for $3 $iif($3 == 1,minute,minutes) by $+($nick,.) $iif($4 != $null,Reason: $4-,No Reason Given) | .notice $2 You have been banned from $chan for $3 Minutes By $+($nick,.) $iif($4 != $null,Reason: $4-,No Reason Given) }
.timer 1 %minutes { .mode $chan -b $address($2,2) | .notice $2 You have been unbanned from $+($chan,.) }
}