Global Blacklist.

By UK-Sw1ft on Jul 13, 2005

Here's a global blacklist i made ( with help from wiebe, thx fella )
its a global blacklist for a ot, commands are below, hf ;o

;# Global Blacklist v0.01
;# Commands
;
;# $gb <nick> ( if on channel )
;# $add gb <address($nick,1) >
;# $scan gb ( just incase they manged to get past it if it wasnt opped )
;# $removegb <address>
;# $global banned < says address who are blacklisted.)
;# $cleargb < Removes all blacklists.

;#The Code.

on 1:TEXT:$($!gb*):#:{
  if ($nick isop $chan) {
    if ($istok(%gb, $address($2,1), 32)) { msg # ( $+ $2 $+ ) Is allready Globally Blacklisted With Me. | halt }
    set %gb $addtok(%gb, $address($2,1), 32)
    var %a = $comchan($2,0) 
    while (%a) { 
      if ($me isop $comchan($2,%a)) { 
        ban -k $comchan($2,%a) $2 Global Blacklisted. 
      } 
      dec %a 
    }
  }
}

on 1:TEXT:$($!add gb*):#:{
  if ($nick isop $chan) {
    if ($istok(%gb, $3, 32)) { msg # ( $+ $3 $+ ) Is allready Globally Blacklisted With Me. | halt }
    set %gb $addtok(%gb, $3, 32)
    msg # Successfully Added ( $+ $3 $+ ) To Global Blacklist. | halt
  }
}

on 1:TEXT:$($!scan gb):#:{
  if ($nick isop $chan) {
    msg # Scanning For Globally Blacklisted.
    timergb 1 5 msg # Scan Complete, Total Found %banned | set %banned 0
    .quote WHO $+(:,$chan)
    var %i = $nick($chan,0) 
    while (%i) { 
      if ($istok(%gb,$address($nick($chan,%i),1),32)) { 
        inc %banned
        ban -k $chan $nick($chan,%i) 1 Global Blacklisted 
      } 
      dec %i 
    }
  } 
}

on me:*:JOIN:#:.quote WHO $+(:,$chan)
on *:OP:#: { 
  if ($opnick == $me) { 
    msg # Scanning For Globally Blacklisted.
    timergb 1 5 msg # Scan Complete, Total Found %banned | set %banned 0
    var %i = $nick($chan,0) 
    while (%i) { 
      if ($istok(%gb,$address($nick($chan,%i),1),32)) { 
        inc %banned
        ban -k $chan $nick($chan,%i) 1 Global Blacklisted 
      } 
      dec %i 
    }
  } 
}
on 1:JOIN:#:{
  if ($istok(%gb, $address($nick,1), 32)) {
    ban -k $chan $nick Global Blacklisted.
  } 
}

on 1:TEXT:$($!cleargb):#:{
  if ($nick isop $chan) {
    unset %gb
    msg # Global Blacklist Clear.
  }
}

on 1:TEXT:$($!global banned):#:{
  if ($nick isop $chan) {
    if (!%gb) { msg # Error: Global Blacklist Is Empty. | halt }
    else {
      msg # Users Globally Blacklisted: %gb
    }
  }
}
on 1:TEXT:$($!removegb*):#:{
  if ($nick isop $chan) {
    if (!$istok(%gb, $2, 32)) { msg # ( $+ $2 $+ ) Is'nt Globally Blacklisted With Me. | halt }
    else {
      set %gb $remtok(%gb, $2, 32)
      msg # ( $+ $2 $+ ) Removed.
    }
  }
}

Comments

Sign in to comment.
Smoke*bud   -  Oct 29, 2008

doesn't work.

 Respond  
opticlens   -  Dec 23, 2007

Not a wise idea to use a global var. because the list could get tremendous and cause errors. If it were me, I would use mIRC\'s address book to save the data. My second choice would be hash tables.

$() can be used to join multiple things together in a match text, though $($) actually says that there is a dollar sign at the beginning.. That was the author\'s intention. ;P

 Respond  
Lindrian   -  Dec 23, 2007

$() is short for $eval() btw..

 Respond  
Gummo   -  Dec 23, 2007

$() can be used to join multiple things together in a match text, though $($) actually says that there is a dollar sign at the beginning..

 Respond  
LikWydd   -  Jul 18, 2006

nice code, worked well for me. i changed some of it to suit myself

i also added this part, means when u remove a blacklist the user is unbanned from all the channels they wer globally blacklisted on

alias remfromall {
while (%a > 0) {
if ($me isop $chan(%a)) {
mode $chan(%a) -b %remadd
}
dec %a
}
}

 Respond  
ttteesstteerr   -  Sep 04, 2005

very good but it kick ops. some ops want to play with it and the bad thing is that they can

 Respond  
henrikthesexy   -  Jul 13, 2005

i have seen bether, but it\'s okey:)

 Respond  
henrikthesexy   -  Jul 13, 2005

i have seen bether, but it\'s okey:)

 Respond  
aeros   -  Jul 13, 2005

dont think u need $($ before every trigger u set. u did this for ur guess number script i believe and it didn\'t work until i removed the $($ before every trigger.

but its just me and nice work

 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.