Badwords Execution Order

These are old archives. They are kept for historic purposes only.
Post Reply
MrBugSir
Posts: 29
Joined: Fri Feb 25, 2005 9:19 pm
Location: Seattle, Washington, USA, Earth
Contact:

Badwords Execution Order

Post 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?
Syzop
UnrealIRCd head coder
Posts: 2179
Joined: Sat Mar 06, 2004 8:57 pm
Location: .nl
Contact:

Post 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.
Post Reply