How to write Regular expressions that work?

Asked by lrm

I tried to use +bannickre and +banmsge in development code, using:

+banmsgre 30 <.*\n.*\n.*> some reason
+bannickre 1440 <.+(?<!(\[DS[1234]\]|\[AK[12]\]))> some reason

As in the above example, I want to ban people writing multi-newline messages and force a certain username format. In my opinion and according to ADCH++ documentation, those regular expressions should work, but they don't. How can i use regular expressions in this functions properly? I also tried with Lua patterns, to no effect. Please tell me how can I use those functions...

Question information

Language:
English Edit question
Status:
Answered
For:
ADCH++ Edit question
Assignee:
No assignee Edit question
Last query:
Last reply:
Revision history for this message
lrm (lrmucha) said :
#1

+banmsgre 30 <.*[\n]*.*> some reason

has banned most if not all people trying to connect to the hub. Please, supply more acurate documentation with lots of examples on how to use this feature.

Revision history for this message
Pirre (pierreparys) said :
#2

According to the help doc , deliverd with your hub all of these should work:

http://www.regular-expressions.info/

ps: the latest vesrions have a different handeling regarding those re bans, you can now specify a action to take. just block, tmpban, ban

Can you help with this problem?

Provide an answer of your own, or ask lrm for more information if necessary.

To post a message you must log in.