Bug in Punkbuster regex?

Topics: Admin Tool, Developers
Jan 15, 2012 at 5:45 PM
Edited Jan 16, 2012 at 5:25 AM

Hi Timiz0r,

I think you have a problem in you punkbuster Regex code (I'm a regex noob) ...

 

static Regex PunkBusterPlayerListRegex = new Regex(@"^PunkBuster Server: \d+  [0-9a-f]{32}\(-\) (?<ip>\d+\.\d+\.\d+\.\d+):\d+ OK   1 \d+\.\d+ \d+ \(W\) ""(?<name>[^""]+)""", RegexOptions.Compiled);

 

It seams like only matching player 1 till 9 .... player number >= 10 is ignored.

Is there a bug in the regex above?

Thanks! 

:)

Mojo

Coordinator
Jan 16, 2012 at 1:48 PM
Edited Jan 16, 2012 at 4:03 PM

A month or two ago, I changed around how players were handled, which should have caused all of that to break. Without going through the code to check, either no player will ever have IPs or newly connection players wont have IPs. I've been a little busy the past 2 days, but I'll see if I can fix IPs today, right after I finish the heavily-delayed roundover event.

Actually some corrections:
First, everything actually does update (ftw), so you can ignore everything above this. Next, for players >= 10, I just noticed that the extra space after the player id is there because of PB formatting; since there's documentation for the plist command, I had to guess what everything would look like. After I eat, I'll think up a graceful way of fixing it.

Jan 16, 2012 at 4:00 PM

Don't stress yourself!!

I am (we are) grateful to you for your time and effort you put into this project, so just take your time. 

:)

Mojo

Coordinator
Jan 16, 2012 at 4:15 PM

Just put up the changes :D

Jan 16, 2012 at 4:51 PM

Cool it works!! :) Thanks!

Jan 17, 2012 at 6:53 PM

Hi Timiz0r,

I get a couple of these (I masked out with xxx in respect to the player)...

PunkBusterMessage: PunkBuster Server: 7  c231a71497153669f6dc7908xxxxxa69(-) 62.xx.238.xxx:3659 UPDT 1 0.0 0 ( ) "xxxx"

Please notice that the player has a "( )" and not a "(W)" - dunno what it means, but it doesn't match the regex.

I dunno much about regex, but can it be like (?) instead?

:)

Mojo

Coordinator
Jan 17, 2012 at 11:17 PM

I went ahead and made the regex more general since that line you gave me had multiple differences. The latest code has the changes.

Jan 19, 2012 at 4:01 PM

Works fine - thanks :)