All pastes #564420 Raw Edit

Mine

public text v1 · immutable
·published 2007-06-13 16:13 UTC
rendered paste body
;-----------------------------------------------------------------------------;
;*Timeban script v0.1 by Kiddo*                                               ;
;!Tb <time in minutes> <nick> (Ex: !Tb 1 kiddo (will ban kiddo for 1 minute)) ;
;!Tb.stats will show how many timebans there have been in that channel.       ;
;-----------------------------------------------------------------------------;
alias c1 { return $+($chr(3),04,$1-) } 
alias c2 { return $+($chr(3),07,$1-) } 
alias c3 { return $+($chr(3),02,$1-) } 
On *:Text:!tb*:#: { 
  If ($1 == !tb) {
    if ($me isop $chan) || ($me ishop $chan) {
      if ($2 isop $chan) || ($2 ishop $chan) {
        msg $chan $c3(Sorry) $c2($nick) $c3(but I can't use this command on Ops or Halfops.)
      }
      Elseif ($nick isvoice $chan) || ($nick isreg $chan) { 
        notice $nick $c3(You need to be halfop or op to use this command.) 
      }
    }
  }
  ElseIf ($nick isop $chan) || ($nick ishop $chan) {
    Inc %kick. [ $+ [ $chan ] ] 
    Ban -ku $+ $calc( $3 * 60 ) $chan $2 $c3(You have been banned for) $c1($3 Minutes) $c3(Score:) $c2(%Kick. [ $+ [ $chan ] ]) 
  }     
  Else { 
    msg $Chan $c3(I need to be) $c1(Op) $c3(Or) $c2(Halfop) $c3(To timeban people in a chat.) 
  }
  Else { notice $nick $c3(Sorry but) $c2($2) $c3(is not on) $c2($chan) $c3(at the moment.)
  }
  Elseif ($1 == !Tb.Stats) { /msg $chan $c3(I banned) $c1(%kick. [ $+ [ $chan ] ]) $c3(People on this channel.)
  }
}