|
|
| Author |
Message |
IRCd Networks none

Joined: 27 Apr 2007 Posts: 3
|
Posted: Oct 26, 2008 5:35pm Post subject: POSIX BOPM Expressions |
|
|
I am hoping someone here is familer or knows a good resource online about these. I am currently running our own variant of bahamut, and really didn't think about this when adding the feature to see global connections. Instead of recompiling the ircds was hoping someone could help out.
This is the original I was using for local connections.
connregex = "\\*\\*\\* Client -- Client connecting: ([^ ]+) \\(([^@]+)@([^\\)]+)\\) \\[([0-9\\.]+)\\].*";
*** Client -- Client connecting: scrawl64 (~scrawl@data.searchirc.org) [72.64.145.20] {144945408}
This is for global connections, which obviously doesn't work with the above expression.
*** Global Connections -- from irc.shelleh.com: Client connecting: scrawl33 (~scrawl@data.searchirc.org) [72.64.145.20] {users}
Is there a way for the expression to identify both of these lines? I was thinking some sort of wildcard between the '***' and 'Client connecting:'. Will this work? How would I go about doing that?
Thanks for your help. |
|
| Back to top |
|
 |
Katlyn Newbie

Joined: 30 Sep 2006 Posts: 71
|
Posted: Oct 26, 2008 6:35pm Post subject: |
|
|
Hi,
I think you could just use:
| Code: |
connregex = "Client connecting: ([^ ]+) \\(([^@]+)@([^\\)]+)\\) \\[([0-9\\.]+)\\].*";
|
(The beginning part doesn't need to be there)
I tested it and it seems to work, or maybe if you want the beginning stuff to be there you could use something like
| Code: |
connregex = "\\*\\*\\* .+ Client connecting: ([^ ]+) \\(([^@]+)@([^\\)]+)\\) \\[([0-9\\.]+)\\].*";
|
|
|
| Back to top |
|
 |
Katlyn Newbie

Joined: 30 Sep 2006 Posts: 71
|
Posted: Oct 26, 2008 6:41pm Post subject: |
|
|
Sorry, apparently the bopm regex doesn't allow .+
the second one should be:
| Code: |
connregex = "\\*\\*\\* .* Client connecting: ([^ ]+) \\(([^@]+)@([^\\)]+)\\) \\[([0-9\\.]+)\\].*"; |
seems to work for me (but i suck at regex) |
|
| Back to top |
|
 |
IRCd Networks none

Joined: 27 Apr 2007 Posts: 3
|
Posted: Oct 27, 2008 1:37pm Post subject: |
|
|
| Thank you very much for your quick response to that. Your recommendations worked perfectly! |
|
| Back to top |
|
 |
|