← Back to team overview

linuxdcpp-team team mailing list archive

[Bug 888280] Re: reg exp in bans lua

 

Indeed, I have managed to solve my problem with Lua patterns:

+bannickre 1 <[^%]]$> some reason
+bannickre 1 <[^1234].$> some reason
+bannickre 1 <[^SK]..$> some reason
+bannickre 1 <[^DA]...$> some reason
+bannickre 1 <[^%[]....$> some reason

and so forth (exceptions, etc...)

However, I've encountered anoter issue:
+banmsgre 10 <%>%>%>> some reason
<Hub> Messages that match "%" will be blocked (Level: 10) (Reason: %>%>> some reason) (Expires: never) (Bans for 10 minutes)

+banmsgre 10 <%>%>%>> some reason 0
 <Hub> Messages that match "%" won't be blocked anymore

So, it looks like its not posisble to use patterns that include the ">"
delimiter, even with an escape character. Other tested symbols, like
"<", "*" and "%s", do work.

Including POSIX regexes in the next release would be a great feature :).

-- 
You received this bug notification because you are a member of
Dcplusplus-team, which is subscribed to ADCH++.
https://bugs.launchpad.net/bugs/888280

Title:
  reg exp in bans lua

Status in ADCH++:
  New

Bug description:
  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...

To manage notifications about this bug go to:
https://bugs.launchpad.net/adchpp/+bug/888280/+subscriptions


References