tglogo.png
0 LIKES

Snippet


Simple Blacklist

In Category Sparkpea Posted by err0r On 04/12/10

This is a very simple blacklist. Uses @window for easy management.

Requested by Johnson for Sparkpea. Feel free to edit/improve this.
menu nicklist {
  BlackList Options
  .$iif($me !isop $chan,$style(2)) Blacklist User: { auser Blacklisted $address($$1,1) $$1 | access $chan ADD DENY $address($$1,1) 60 : $$1 Blacklisted | kick $chan $$1 Blacklisted }
  .Manual Add: { var %ba $?="Add Gate To Blacklist" | $iif(%ba != $null,auser Blacklisted %ba) }
  .View Blacklist: { getblacklist }
}
menu @Blacklist { $iif($sline(@Blacklist,1).ln < 2,$style(2)) Remove Selected: bl.remove }
on Blacklisted:JOIN:#: { if ($me isop $chan) { access $chan ADD DENY $address($nick,1) 60 : $nick Blacklisted | kick $chan $nick Blacklisted } }
alias getblacklist {
  $iif(!$window(@Blacklist),window -blk -t22 +benstx @Blacklist,/window -a @Blacklist)
  clear @Blacklist | aline @Blacklist Gate $chr(9) Nick
  var %f 1
  while ($ulist(*,Blacklisted,%f)) {
    aline @Blacklist $v1 $chr(9) $ulist(*,Blacklisted,%f).info
    inc %f
  }
}
alias bl.remove {
  var %s 1
  while ($sline(@Blacklist,%s).ln) {
    .ruser Blacklisted $gettok($line(@blacklist,$v1),1,32)
    inc %s
  }
  getblacklist
}


Comments 6

guest - Saturday, 4 September, 2010
thanks a lot error
[::X-System::] - Saturday, 1 May, 2010
you could use on @!*:JOIN:#: the @ in the event means it'll only trigger if u're op'd, now you wont need if ($me isop #) any more wink
Paige - Wednesday, 21 April, 2010
Ya thanks a lot error, i put it in the sparkpea script im remaking.
guest - Monday, 12 April, 2010
This is way better than the one I wouldve submitted as mine was messy lol!!!
err0r - Monday, 12 April, 2010
you are welcome

Please note that on our website we use cookies necessary for the functioning of our website, cookies that optimize the performance. To learn more about our cookies, how we use them and their benefits, please read our Cookie Policy.
I Understand