Timed Ban & Kick Script

By Henco on Mar 30, 2010

Syntax is !kb

have fun

;###### TIMED BAN SCRIPT - COPYRIGHT 2010 HENRY COLE ######
;###### MORE INFO & HELP IN #HENCO ON IRC.INFINITYIRC.COM ######

on *:text:!kb *:#: {
  if ($nick isop $chan || $nick ishop $chan) {
    if (!$2) || ($2 !ison $chan) { 
msg $chan $iif(!$2,Syntax is !kb nick time-in-minutes reason 
}
elseif (!$3) || ($3 !isnum 1-1440) { 
msg $chan Please enter a number between 1 and 1440. This is the number of minutes to ban for. 1440 = 24 hours 
} 
else { 
   msg $chan $2 has been banned for $3 minutes. $iif($4, Reason for ban: $4-)
   ban -ku $+ $calc($3 * 60) $chan $2 2 BANNED! User has been banned from $chan $+ . Reason for ban: $4-
    }
  }
}

Comments

Sign in to comment.
WorldDMT   -  Mar 30, 2010

you'r welcome

 Respond  
Henco   -  Mar 30, 2010

thanks for the info WorldDMT :)

 Respond  
WorldDMT   -  Mar 30, 2010

yes as usual :)

 Respond  
Jethro   -  Mar 30, 2010

WorldDMT, nice instruction. :-)

But they'll just tell you that's "horrible" to read, and they only do it that way because that's how they were taught. :/

 Respond  
WorldDMT   -  Mar 30, 2010

hi
if ($nick isop $chan || $nick ishop $chan) {
can be
if $nick(#,$nick,oh) {

msg $chan $iif(!$2,Syntax is !kb nick time-in-minutes reason <== you forgot a parenthesis

so i think that have to be

msg # $iif(!$2,Syntax is !kb nick time-in-minutes reason,nick must be on #)

better to put $iif($4, Reason for ban: $4-) in the msg afer kick

you have to add an antiflood

on *:text:!kb *:#:{
  if !%wfld {
    set -u2 %wfld 1
    if $nick(#,$nick,oh) {
      if (!$2) || ($2 !ison #) {
      ...
    ...
 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.