Home | Networks | Community | Need Help? 

 
 Quick search

 
 
 RegisterRegister   Log inLog in 

POSIX BOPM Expressions

 
Post new topic   Reply to topic    SearchIRC Forum Index -> IRC Help
Author Message
IRCd Networks
none
none


Joined: 27 Apr 2007
Posts: 3

PostPosted: Oct 26, 2008 5:35pm    Post subject: POSIX BOPM Expressions Reply with quote

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
Newbie


Joined: 30 Sep 2006
Posts: 69

PostPosted: Oct 26, 2008 6:35pm    Post subject: Reply with quote

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
Newbie


Joined: 30 Sep 2006
Posts: 69

PostPosted: Oct 26, 2008 6:41pm    Post subject: Reply with quote

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
none


Joined: 27 Apr 2007
Posts: 3

PostPosted: Oct 27, 2008 1:37pm    Post subject: Reply with quote

Thank you very much for your quick response to that. Your recommendations worked perfectly!
Back to top
Display posts from previous:   
Post new topic   Reply to topic    SearchIRC Forum Index -> IRC Help All times are GMT - 6 Hours
Page 1 of 1

 
 
Forum powered by phpBB
 
 © 2000 - 2008 EverythingIRC, Inc. All rights reserved. Please read our disclaimer