Timed Ban

By sunslayer on Jan 25, 2009

i havnt really posted anything on here for a while so here it is :D
it will ban someone for a certain amount of time if u dont specify how long it will default to 30 minutes
load into ur remotes (alt + r)
to use it do /tb nick time reason
to ban in seconds end the time in s minutes end in m and hours end in h ex: /tb bob 1m testing... will ban them for one minute any probs tell me :D

you can anything u want

;Alias

alias tb {
  if ($me isop # || $me ishop #) {
    if ($2 isalnum) {
      if ($mid($2,-1,1) == $chr(115)) {
        ban -ku $+ $remove($2,s) # $1 2 1,4Banned for $remove($2,s) $iif($remove($2,s) <= 1,Second:,Seconds:) $iif($3,$3-,11Flying monkies stole my reason. 2Damn them 4-.-)
      }
      if ($mid($2,-1,1) == $chr(109)) {
        ban -ku $+ $calc($remove($2,m) * 60) # $1 2 1,4Banned for $calc($remove($2,s) * 60) $iif($remove($2,h) <= 1,Minute:,Minutes:) $iif($3,$3-,11Flying monkies stole my reason. 2Damn them 4-.-)
      }
      if ($mid($2,-1,1) == $chr(104)) {
        ban -ku $+ $calc($remove($2,h) * 3600) # $1 2 1,4Banned for $remove($2,h) $iif($remove($2,h) <= 1,Hour:,Hours:) $iif($3,$3-,11Flying monkies stole my reason. 2Damn them 4-.-)
      }
      if ($mid($2,-1,1) isnum) {
        ban -ku $+ $calc($2 * 60) # $1 2 1,4Banned for $calc($2 * 60) $+ $iif($remove($2,h) 1) <= 60,Minutes:,Minute:) $iif($3,$3-,11Flying monkies stole my reason. 2Damn them 4-.-)
      }
    }
    if ($mid($2,1,1) isalpha) {
      ban -ku1800 # $1 2 $iif($2,$2-,11Flying monkies stole my reason. 2Damn them 4-.-)
    }
    HALT
  }
  HALT
}

;On Text Event

on $*:TEXT:/^[!.`~]t(b|ime(d)(ban(ned)?))/Si:#: {
  if ($nick(#,$nick,oh)) {
    if ($3 isalnum) {
      if ($mid($3,-1,1) == $chr(115)) {
        ban -ku $+ $remove($3,s) # $2 2 $iif($4-,$4,11Flying monkies stole my reason. 2Damn them 4-.-) Banned for $remove($3,s) $iif($remove($3,s) <= 1,Second,Seconds)
      }
      if ($mid($3,-1,1) == $chr(109)) {
        ban -ku $+ $calc($remove($3,m) * 60) # $2 2 $iif($4-,$4,11Flying monkies stole my reason. 2Damn them 4-.-) Banned for $calc($remove($3,s) * 60) $iif($calc($remove($3,h) * 3600) <= 60,Minute,Minutes)
      }
      if ($mid($3,-1,1) == $chr(104)) {
        ban -ku $+ $calc($remove($3,h) * 3600) # $2 2 $iif($4-,$4,11Flying monkies stole my reason. 2Damn them 4-.-) Banned for $calc($remove($3,h) * 3600) $iif($calc($remove($3,h) * 3600) <= 3600,Hour,Hours)
      }
      if ($mid($3,-1,1) isnum) {
        ban -ku $+ $calc($3 * 60) # $2 2 $iif($4-,$4,11Flying monkies stole my reason. 2Damn them 4-.-) Banned for $calc($3 * 60) $iif($calc($3 * 60) <= 60,Minute,Minutes)
      }
    }
    if ($mid($3,1,1) isalpha) {
      ban -k # $2 2 $iif($4-,$4,11Flying monkies stole my reason. 2Damn them 4-.-)
    }
    HALT
  }
  HALT
}

;input

on *:input:#: {
  if ($regex($1,/^[!.`~]t(b|ime(d)(ban(ned)?))/Si)) {
    if (!$ctrlenter) {
      if ($me isop # || $me ishop #) {
        if ($3 isalnum) {
          if ($mid($3,-1,1) == $chr(115)) {
            ban -ku $+ $remove($3,s) # $2 2 $iif($4-,$4,11Flying monkies stole my reason. 2Damn them 4-.-) Banned for $remove($3,s) $iif($remove($3,s) <= 1,Second,Seconds)
          }
          if ($mid($3,-1,1) == $chr(109)) {
            ban -ku $+ $calc($remove($3,m) * 60) # $2 2 $iif($4-,$4,11Flying monkies stole my reason. 2Damn them 4-.-) Banned for $calc($remove($3,s) * 60) $iif($calc($remove($3,h) * 3600) <= 60,Minute,Minutes)
          }
          if ($mid($3,-1,1) == $chr(104)) {
            ban -ku $+ $calc($remove($3,h) * 3600) # $2 2 $iif($4-,$4,11Flying monkies stole my reason. 2Damn them 4-.-) Banned for $calc($remove($3,h) * 3600) $iif($calc($remove($3,h) * 3600) <= 3600,Hour,Hours)
          }
          if ($mid($3,-1,1) isnum) {
            ban -ku $+ $calc($3 * 60) # $2 2 $iif($4-,$4,11Flying monkies stole my reason. 2Damn them 4-.-) Banned for $calc($3 * 60) $iif($calc($3 * 60) <= 60,Minute,Minutes)
          }
        }
        if ($mid($3,1,1) isalpha) {
          ban -k # $2 2 $iif($4-,$4,11Flying monkies stole my reason. 2Damn them 4-.-)
        }
        HALT
      }
      HALT
    }
  }
}

Comments

Sign in to comment.
sunslayer   -  Jan 29, 2009

k added the !tb nick time reason same format as alias just use ! instead of / and it goes in ur bots remotes

 Respond  
Bluepower10   -  Jan 28, 2009

You should also make it so ops can do it by saying !tb nick time reason :)

 Respond  
sunslayer   -  Jan 25, 2009

lol fixed the prob where only one word of the reason would work

edit: if anyone wants to test out the hour to make sure it works that'd be great :D

 Respond  
TheNitelyfe   -  Jan 25, 2009

6:07(33) pm SunSlayer sets mode: +b !@Swift-DBBA621B.dsl.sfldmi.ameritech.net
6:07(33) pm
You were kicked by SunSlayer (Banned for 1000 Minutes: you)

<3

 Respond  
Are you sure you want to unfollow this person?
Are you sure you want to delete this?
Click "Unsubscribe" to stop receiving notices pertaining to this post.
Click "Subscribe" to resume notices pertaining to this post.