rendered paste body;mattbuck's AfterNET anticurse script, v1.1, 06/06/07
on *:TEXT:*:#:{
var %tempc = $read(fbomb.txt,s,[Channels]), %cstart = $in($readn,1), %tempw = $read(fbomb.txt,s,[Wordlist]), %wstart = $in($readn,1), %tempb = $read(fbomb.txt,s,[Banlist]), $&
%bstart = $in($readn,1), %cend = $de(%wstart,2), %wend = $de(%bstart,2), %bend = $lines(fbomb.txt), %line = %cstart, %chancheck = $read(fbomb.txt,s,$chan)
if ($readn != 0) {
:wordcheck
%line = %wstart
if ($read(fbomb.txt,%line) isin $1-) {
:banmask
var %banmask = $address($nick,3)
if (%banmask == $null) {
echo Error - unable to retrieve address for $nick
.msg x3 atl $chan $nick 1d $me $+ 's anticurse script ( $+ $nick $+ )
}
elseif ($address($nick,4) == *!*@*.Users.AfterNET.Org) { %banmask = $address($nick,2) }
else { .msg x3 atl $chan $nick 1d $me $+ 's anticurse script ( $+ $nick $+ ) }
.msg $me Banned $nick for the word " $+ $read(fbomb.txt,%line) $+ " in $chan
write -il $+ %bstart fbomb.txt $nick - %banmask - $chan - $time(dd/mm/yy---HH:nn:ss) - $read(fbomb.txt,%line) - $in($ctime,86400)
}
elseif (%line < %wend) { inc %line 1 | goto wordcheck }
}
}
on *:LOAD:{
if ($exists(fbomb.txt) == $true && $?!="Overwrite previous settings file?" == $true) { goto write }
elseif ($exists(fbomb.txt) != $true) {
:write
write -c fbomb.txt [Channels]
write fbomb.txt #neveron
write fbomb.txt [Wordlist]
write fbomb.txt fuck
write fbomb.txt [Banlist]
}
echo Loaded mattbuck's AfterNET anticurse script, v1.1, 06/06/07
}
on *:UNLOAD:{
if ($?!="Delete settings file?" == $true) { remove fbomb.txt }
echo Unloaded mattbuck's AfterNET anticurse script, v1.1, 06/06/07
}
menu channel {
AntiCurse
.Channel Status {
var %temp = $read(fbomb.txt,s,$chan), %tempc = $read(fbomb.txt,s,[Channels]), %cstart = $in($readn,1)
if ($readn != 0 && $?!="Anticurse is enabled on $chan $+ . Do you wish to disable it?" == $true) { write -dl $+ $readn fbomb.txt }
elseif ($readn == 0 && $?!="Anticurse is disabled on $chan $+ . Do you wish to enable it?" == $true) { write -il %+ %cstart fbomb.txt $chan }
}
.-
.List censored channels {
var %tempc = $read(fbomb.txt,s,[Channels]), %line = $in($readn,1), %tempw = $read(fbomb.txt,s,[Wordlist]), %cend = $de($readn,1), %string
:lcc
%string = %string $read(fbomb.txt,%line)
if (%line < %cend) { inc %line 1 | goto lcc }
echo Censored channels: %string
}
.List cursewords {
var %tempw = $read(fbomb.txt,s,[Wordlist]), %line = $in($readn,1), %tempb = $read(fbomb.txt,s,[Banlist]), %wend = $de($readn,1), %string
:lcw
%string = %string $read(fbomb.txt,%line)
if (%line < %wend) { inc %line 1 | goto lcw }
echo Censored words: %string
}
.List current bans {
var %tempb = $read(fbomb.txt,s,[Banlist]), %line = $in($readn,1), %end = $lines(fbomb.txt), %cont
echo Current bans:
:lcb
if ($evret($read(fbomb.txt,%line)) > $ctime) { echo $read(fbomb.txt,%line) | %cont = $true }
else { %cont = $false }
if (%line < %end && %cont == $true) { inc %line 1 | goto lcb }
elseif (%cont == $false) {
:del
write -dl $+ %line fbomb.txt
if ($lines(fbomb.txt) >= %line) { goto del }
}
}
.-
.Add curseword {
var %tempw = $read(fbomb.txt,s,[Wordlist]), %wstart = $in($readn,1)
:cwcheckadd
var %add = $$?="Please input word to censor", %check = $read(fbomb.txt,s,%add)
if ($readn != 0 && $?!=" $+ %add is already censored, do you wish to specify another word?" == $true) { goto cwcheckadd }
elseif ($readn == 0) { write -il $+ %wstart fbomb.txt %add | echo %add has been added to my list of curses. }
}
.Remove curseword {
var %tempw = $read(fbomb.txt,s,[Wordlist]), %wstart = $in($readn,1)
:cwcheckdel
var %del = $$?="Please input word to uncensor", %check = $read(fbomb.txt,s,%add)
if ($readn == 0 && $?!=" $+ %del is already uncensored, do you wish to specify another word?" == $true) { goto cwcheckdel }
elseif ($readn != 0) { write -dl $+ $readn fbomb.txt | echo %del has been removed from my list of curses. }
}
.Edit settings:/run fbomb.txt
}
alias de {
if ($1 isnum && $2 isnum) { return $calc($1 - $2) }
}
alias in {
if ($1 isnum && $2 isnum) { return $calc($1 + $2) }
}
alias evret { return $11 }
;