; - A Remote script for Bad Words in Nicks & Addresses. - Version 2 -
on 1:start:{ if $exists(swear.lst) == $false { sksetup }
else { echo 10 -a Protected by SwearKick - B 0,15 0,10 10,1 Channel8,1Eye15,1® 1,10 0,15 }
}
on +1:NICK:{
set %nck.lines $lines(swear.lst)
set %nck.line 1
:next
if %nck.line > %nck.lines { goto end }
if $read -l $+ %nck.line swear.lst isin $newnick { set %nck.chan 1 | goto nckick }
inc %nck.line
goto next
:nckick
if %nck.chan > $comchan($newnick,0) { goto end }
if $me isop $comchan($newnick,%nck.chan) { goto kb }
if $me !isop $comchan($newnick,%nck.chan) echo 12 -a $newnick 2Bad nickname 0,15 0,10 10,1 Channel8,1Eye15,1® 1,10 0,15
inc %nck.chan 1
goto nckick
:kb
ban -u16 $comchan($newnick,%nck.chan) $newnick 9
kick $comchan($newnick,%nck.chan) $newnick 2Bad Food nickname change 0,15 0,10 10,1 Channel8,1Eye15,1® 1,10 0,15
inc %nck.chan 1
goto nckick
:end
unset %nck*
}
on +1:JOIN:#:{
set %njk.lines $lines(swear.lst)
set %njk.line 1
:next
if %njk.line > %njk.lines { goto end }
if $read -l $+ %njk.line swear.lst isin $address($nick,5) { goto njkick }
inc %njk.line
goto next
:njkick
if $me isop $chan {
ban -u300 $chan $nick 8
kick $chan $nick 2Bad Nick/Addy - 0,15 0,10 3,1 Channel8,1Eye15,1® 1,10 0,15
}
else echo 12 -a **NOTE4 $address($nick,5) 12had bad Nick/Addy! Joining.
:end
unset %njk*
}
alias sksetup {
window -a @SwearKick 100 50 450 400
aline @SwearKick 10** SwearKick 4 Setup **
aline @SwearKick 10 =============================
aline @SwearKick 13Features:
aline @SwearKick -
aline @SwearKick 13* Protects from offensive nicknames/addresses joining your channel.
aline @SwearKick 13* Protects your channel from a user changing his/her nick to an
aline @SwearKick 13 offensive one.
aline @SwearKick 10 =============================
aline @SwearKick 12** Enter the offensive words you wish to protect your channel against
aline @SwearKick 12 one at a time.
aline @SwearKick -
aline @SwearKick 12** SwearKick will protect your channel from ALL forms of the word. ie:
aline @SwearKick 12 if you enter "screw", the script will trigger on "screwing" "screwball" etc..
aline @SwearKick -
aline @SwearKick 12** Enter "Done" (without the quotes) when finished.
aline @SwearKick -
:addwords
set %sktempword $?="Enter Offensive Word Here"
if %sktempword == done { goto done }
if %sktempword == $null { aline @SwearKick 4**Please enter an offensive word or type done | goto addwords }
aline @SwearKick 12 You Entered the word $+ %sktempword $+ - Is this correct?
set %sktempconfirm $$?="Is [ %sktempword ] Correct? (y/n)"
if %sktempconfirm == n {
aline @SwearKick 12 $+ %sktempword $+ not added.
unset %sktempconfirm
unset %sktempword
goto addwords
}
aline @SwearKick 12** [ %sktempword ] Added.
unset %tempconfirm
write swear.lst %sktempword
unset %sktempword
goto addwords
:done
unset %sktempword
aline @SwearKick 10=============================
aline @SwearKick 6 ** Setup complete **
aline @SwearKick -
aline @SwearKick 6 Here is the list of words you entered:
set %sk1 1
:list
if %sk1 > $lines(swear.lst) { goto end }
aline @SwearKick 6 $read -l [ $+ [ %sk1 ] swear.lst ]
inc %sk1 1
goto list
:end
unset %sk1
aline @SwearKick -
aline @SwearKick 6** You can modify this list at any time by via the SwearKick popup menu
aline @SwearKick 10=============================
aline @SwearKick 10* Send all bug reports (as if!<G>), problems, suggestions, praises, money,
aline @SwearKick 10 etc. to #beginner's web site or you may be able to track us down at
aline @SwearKick 10 #beginner
aline @SwearKick -
aline @SwearKick 10* The newest version can be found at
aline @SwearKick 10 http://www.ircbeginner.com/index.html
aline @SwearKick -
aline @SwearKick 10** Thank you for choosing SwearKick **
}
menu status {
-
SwearKick
.Modify SwearList:sklist
}
menu channel {
-
SwearKick
.Modify SwearList:sklist
}
menu menubar {
-
SwearKick
.Modify SwearList:sklist
}
alias sklist {
window -l @SwearKick_List 100 50 210 300 @SwearKick_list
sline @SwearKick_List 1
set %sk2 1
:list
if %sk2 > $lines(swear.lst) { goto end }
aline @SwearKick_list $read -l [ $+ [ %sk2 ] swear.lst ]
inc %sk2 1
goto list
:end
unset %sk2
sline @SwearKick_List 1
}
menu @SwearKick_list {
Add:skadd
Delete:skdel
Close:window -c @swearkick_List
}
alias skadd {
:add
set %sktempword $?="Enter word to add to list"
set %skcheck $?="Add [ %sktempword ] ? (y/n)"
if n isin %skcheck { goto end }
write swear.lst %sktempword
unset %sktempword %skcheck
window -c @SwearKick_list
sklist
:end
unset %sktempword %skcheck
}
alias skdel {
:delete
set %skdel $sline(@SwearKick_list,1)
set %skcheck $?="Delete [ $sline(@SwearKick_list,1) ] ? (y/n)"
if n isin %skcheck { goto end }
write -ds [ $+ [ %skdel ] ] swear.lst
unset %skdel %skcheck
window -c @SwearKick_list
sklist
:end
unset %skcheck
}
;