UnReal IRCd Silencer

By enexif on Jul 06, 2005

This will utilize the ~q ban mask on UnReal IRCd to give you ebtter control over silencing people.

The documentation on how to use this command is in the snippit at the top.

I know it's server specific, but UnReal IRCd is what my server i go on uses, I've seen other UnReal IRCd related stuff on mIRC Script sites before.

; /silence Nick [minutes]
; /silence -u Nick (unsilence)
; /silence [Addr Number:]Nick [minutes]
; /silence Address [minutes]
; /silence -u [Addr Number:]Nick
; /silence Address

; Example:
; /silence bob 5 - Silences bob for 5 minutes
; /silence 2:Bob - Silences the host mask of bob (2nd type)
; /silence *.staff.mugglenet.com 10 - Silences *.staff.mugglenet.com for 10 minutes
; /silence -u 2:bob - Unsilences the host mask of bob (2nd type)
; /silence -u * - Unsilences *!*@* 

Silence { 
  if ($1 == -u) { 
    if ($2) { 
      if ($numtok($2,$asc(:)) > 1) { 
        tokenize 32 $address($gettok($2,2,$asc(:)),$gettok($2,1,$asc(:))) 
        if ($1) { 
          mode $active -b ~q: $+ $1
        }

      }
      else { if ($1) { mode $active -b ~q: $+ $2 } } 
    } 
  }
  else {
    if ($numtok($1,$asc(:)) > 1) { 
      var %nick = $gettoK($1,2,$asc(:)) 
      tokenize 32 $address($gettok($1,2,$asc(:)),$gettok($1,1,$asc(:))) $2
      if ($1) { 
        mode $active +b ~q: $+ $1 
        if ($2) { .timer $+ $1 1 $calc(60 * $2) mode $active -b ~q: $+ $1 } 
      }
    }
    else {
      if ($1) {  
        mode $active +b ~q: $+ $1 | if ($2) { timer $+ $1 1 $calc(60 * $2) mode $active -b ~q: $+ $1 } 
      }
    }
  }
}

Comments

Sign in to comment.
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.