This is the new home of the egghelp.org community forum.
All data has been migrated (including user logins/passwords) to a new phpBB version.
For more information, see this announcement post . Click the X in the top right-corner of this box to dismiss this message.
Help for those learning Tcl or writing their own scripts.
romprod
Halfop
Posts: 49 Joined: Fri Oct 19, 2001 8:00 pm
Post
by romprod » Fri Dec 28, 2012 5:09 pm
I'm using mc.bad_words.tcl to filter out spammers etc which seems to be working fine but I've noticed that it misses a certain 'badword' if it's said with colour codes.
Does anyone know how to fix the script to make it pickup on the colour codes or is there something I can do to make it see the colour codes?
I'm running Bad Words v5.1.12 with Eggdrop 1.6.20
Thnx for the help.
romprod
Halfop
Posts: 49 Joined: Fri Oct 19, 2001 8:00 pm
Post
by romprod » Fri Dec 28, 2012 5:20 pm
It looks like both repeating the badword and using colour codes will escape the script from actioning the badword.
I'll try wildcards tomorrow but not sure how I would go about including the colour codes in this wildcard somehow?
caesar
Mint Rubber
Posts: 3778 Joined: Sun Oct 14, 2001 8:00 pm
Location: Mint Factory
Post
by caesar » Sat Dec 29, 2012 4:43 am
I guess you can safely replace his
mc:bw:mirc_strip function with a new one:
Code: Select all
proc mc:bw:mirc_strip {str} {
regsub -all {\002|\003([0-9]{1,2}(,[0-9]{1,2})?)?|\017|\026|\037} $str "" str
return $str
}
I can't test it nor debug it cos that thing is huge and would take quite a lot of time..
Once the game is over, the king and the pawn go back in the same box.