Replace Words
Posted: Fri May 12, 2006 1:45 pm
Ok i've found a way to replace words not only bad words but all the words that i would like to replace.
I've created a file called wordreplace.conf and included it in the unrealircd.conf
include "wordreplace.conf";
Where in the wordreplace.conf are this commands:
badword channel {
word ^(a);
replace A;
};
This one replac the first letter (a) at the beginning with the big (A)
Example:
User wrote: | 15:29:41 | <nickname> amin my bro
Other users see this: | 15:29:41 | <nickname> Amin my bro
badword channel {
word (aaa*);
replace aaa;
};
And here User wrote: | 15:29:41 | <nickname> aaaaaaaaaaaaaaa
Other users see this: | 15:29:41 | <nickname> aaa
Or here User wrote: | 15:37:17 | <nickname> jaaaaaaaaaaaaaaa
Other users see this: | 15:37:17 | <nickname> Jaaa
I would like to replace also the characters ??? !!! --- *** tu replace it shourter, but it tells me: badword::word contains an invalid regex: Regular expression is too broad.
I dont have any problems here it works well for me with the first and second one. The point is i would like to add more thinks like: Replace all caps, replace only a word etc. with a simple regex not adding all of them on by on. It takes alote of time and work.
I know this is not the right place to ask about badword, its only for spamfilter, but you guys helped me alote with spamfilter, so i though its better to post my request here.
And is there also a special documentation with regex for badword like the one for spamfilter?
Thank you very much in advance!!!
I've created a file called wordreplace.conf and included it in the unrealircd.conf
include "wordreplace.conf";
Where in the wordreplace.conf are this commands:
badword channel {
word ^(a);
replace A;
};
This one replac the first letter (a) at the beginning with the big (A)
Example:
User wrote: | 15:29:41 | <nickname> amin my bro
Other users see this: | 15:29:41 | <nickname> Amin my bro
badword channel {
word (aaa*);
replace aaa;
};
And here User wrote: | 15:29:41 | <nickname> aaaaaaaaaaaaaaa
Other users see this: | 15:29:41 | <nickname> aaa
Or here User wrote: | 15:37:17 | <nickname> jaaaaaaaaaaaaaaa
Other users see this: | 15:37:17 | <nickname> Jaaa
I would like to replace also the characters ??? !!! --- *** tu replace it shourter, but it tells me: badword::word contains an invalid regex: Regular expression is too broad.
I dont have any problems here it works well for me with the first and second one. The point is i would like to add more thinks like: Replace all caps, replace only a word etc. with a simple regex not adding all of them on by on. It takes alote of time and work.
I know this is not the right place to ask about badword, its only for spamfilter, but you guys helped me alote with spamfilter, so i though its better to post my request here.
And is there also a special documentation with regex for badword like the one for spamfilter?
Thank you very much in advance!!!