All pastes #760313 Raw Edit

Blist

public text v1 · immutable
·published 2007-11-03 22:17 UTC
rendered paste body
alias blacklist { 
    write bl.txt $1
    amsg I have just globally banned $2 Reason: $3- 
    var %a 1 | while ($chan(%a)) { if ($me isop $chan(%a)) || ($me ishop $chan(%a)) { cs akick $chan(%a) add $$1 2 $iif($2,$2-,No reason given) (global akick) } | inc %a } 
inc %blisted
} 
alias unblacklist { 
    write -ds $+ $1 bl.txt 
    amsg I have just globally unbanned $2 reason: $3- 
    var %a 1 | while (%chan(%a)) { if ($Me isop $chan(%a)) || ($me ishop $chan(%a)) { cs akick $chan(%a) del $$1 2 } | inc %a } 
dec %blisted
} 
on *:JOIN:#: { 
  if ($me isop $chan) || ($me ishop $chan) { 
    if ($nick isin $read(bl.txt,w,* $+ $nick $+ *)) { 
      ban -k $chan $nick You are on my blacklist /ms send $me to get unblacklisted 
    } 
  } 
} 
alias listblacklist { 
var %x = 1
while (%x < %blisted) {
echo -a $read(bl.txt, %x)
inc %x
}
}