All pastes #126928 Raw Edit

Stuff

public text v1 · immutable
·published 2006-08-11 22:25 UTC
rendered paste body
on *:text:!tb *:#:{
  if ($nick isprotect $chan) {
    if ($2 == $me) { /notice $nick I wont kick myself }
    elseif ($2 == $null) { /notice $nick Error in syntax: no target specifed }
    else {
      if ($3 == $null) { /notice $nick Error in syntax: no time specified }
      else {
        if ($4 == $null) { 
          /mode $chan +b $address($2,2) 
          /kick $chan $2 Time ban will last: $3 $+, reason for ban: Requested by $nick $+ .
          /timertimeban 1 $3 /mode $chan -b $address($2,2)
          invite $2 $chan  
        }
        else {
          /mode $chan +b $address($2,2) 
          /kick $chan $2 Time ban will last: $3 $+, reason for ban: $4 $+ .
          /timertimeban 1 $3 /mode $chan -b $address($2,2)
          invite $2 $chan 
        }
      }
    }
  }
  elseif ($nick isop $chan) {
    if ($2 == $null) { /notice $nick Error in syntax: no target specified }
    elseif ($2 == $me) { /notice $nick Can't ban me }
    elseif ($nick isprotect $chan) { /notice $nick You can't ban an admin }
    else {
      if ($3 == $null) { /notice $nick Erro in syntax: no time specified }
      else {
        if ($4 == $null) {
          /mode $chan +b $address($2,2)
          /kick $chan $2 Time ban will last: $3 $+ , reason for ban: requested by $nick $+ .
          /timertimeban 1 $3 /mode $chan -b $address($2,2)
          /invite $2 $chan
        }
        else {
          /mode $chan +b $address($2,2)
          /kick $chan $2 Time ban will last: $3 $+ , reason for ban: $4 $+ .
          /timertimeban 1 $3 /mode $chan -b $address($2,2)
          /invite $2 $chan
        }
      }
    }
  }
  elseif ($nick ishop $chan) {
    if ($2 == $null) { /notice $nick Error in syntax: no target specified. }
    elseif ($2 == $me) { /notice $nick You can't ban me. }
    elseif ($2 isprotect $chan) { /notice $nick You can't an admin. }
    elseif ($2 isop $chan) { /notice $nick You can't ban a fullop. }
    elseif ($2 ishop $chan) { /notice $nick You can't ban another halfop. }
    else {
      if ($3 == $null) { /notice $nick Error in syntax: no time specified. }
      else {
        if ($4 == $null) {
          /mode $chan +b $address($2,2)
          /kick $chan $2 Time ban will last: $3 $+ , reason for ban: requested by $nick $+ .
          /timertimeban 1 $3 /mode $chan -b $address($2,2)
          /invite $2 $chan
        }
        else {
          /mode $chan +b $address($2,2)
          /kick $chan $2 Time ban will last: $3 $+ , reason for ban: $4 $+ .
          /timertimeban 1 $3 /mode $chan -b $address($2,2)
          /invite $2 $chan
        }
      }
    }
  }
  else { /notice $nick Only admins, operators, and halfop may use this command. }