Skip to content
TG007 community snippet #32

Simple Blacklist

This is a very simple blacklist. Uses @window for easy management. Requested by Johnson for Sparkpea. Feel free to edit/improve this.

By err0r Added Apr 11, 2010 Updated Jan 13, 2015
Sparkpea All snippets
mIRC script 26 lines
About this snippet

Overview

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

Requested by Johnson for Sparkpea. Feel free to edit/improve this.
Source code

mIRC script

26 lines · 1,066 characters
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
}
Community

Comments

Want to join the discussion? Sign in to TG007.
guestFriday, 3 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
PaigeWednesday, 21 April, 2010
Ya thanks a lot error, i put it in the sparkpea script im remaking.
guestMonday, 12 April, 2010
This is way better than the one I wouldve submitted as mine was messy lol!!!
err0rMonday, 12 April, 2010
you are welcome
View 1 older comment
JOhnsonMonday, 12 April, 2010
A very good snippet and really works well and thank you err0r