on *:TEXT:!blacklist*:#: {
if ($nick !isop #) { return }
var %file blacklist.ini
if ($2 == add) {
if ($ini(%file,#,$3) == $null) {
writeini %file # $3 1
describe # + $3 has been added to the Blacklist.
}
else {
msg # $3 is already on the Blacklist.
}
}
elseif ($2 == del) {
if ($ini(%file,#,$3) != $null) {
remini %file # $3
describe # - $3 has been removed from the Blacklist.
}
else {
msg # Sorry, $3 was not found on the Blacklist.
}
}
else {
msg # Usage: !blacklist $chr(91) add $chr(124) del $chr(93)
}
}
on *:TEXT:*:#: {
if ($nick isop #) { return }
var %i 1 | while $ini(blacklist.ini,#,%i) {
var %list %list $v1
inc %i
}
var %j = 0
while (%j < $numtok(%list,32)) {
inc %j
var %words = $gettok(%list,%j,32)
if (%words isin $strip($1-)) {
.msg # /timeout $nick 1
msg # Please don't use blacklisted words/phrases, $nick [Blacklist] [Warning]
return
}
}
}