Page 1 of 1

Badwords Execution Order

Posted: Wed Nov 16, 2005 6:30 am
by MrBugSir
Pardon my use of proper proigramming terms, but how does the ircd interpret the badwords block? Is it top to bottom, bottom to top, or some other method?

This is the scenario:

I want to wild card *shit* but wanted certain words such as "shitzu" to be allowed (we have a host that talks about his dog).

How strange and embarrassing if he said in the G-Rated channel:
I have the sweetest little shitzu. He's cute and cuddly!
And it comes out as:
I have the sweetest little *bleep*. He's cute and cuddly!
So I put the *shit* badword filter at the bottom on the list of blocks (I modified the file: badwords.channel.conf that comes with the UnrealIRCd distribution) and put at the top of the list the block:

Code: Select all

badword channel { word "shitzu"; replace "shitzu"; };
I hoped the ircd would read the first line, see the match, and stop looking, like a router access-list. Instead, it prefered the wildcarded block, since the wildcarded block replaced the curse with *bleep*

Does any one have any insight or advice?

Posted: Wed Nov 16, 2005 4:41 pm
by Syzop
I'm afraid there's no badwords exceptions list atm :p.

The trick you want does not work because badwords cannot simply stop matching, since there might be another "bad word" in it. So the (whole) string gets re-evalueted for the rest of the badwords.