In our support boards we aim to provide support for the B3 core in its current state. Older releases of B3 are NOT supported. Check our front page for the latest version. You may post feature requests in our General Discussion board. Modifications and Hacks of the core B3 code are NOT supported.
Before you ask for support: [ Read the Support Instructions ] - More info: [ Full Support Disclaimer ]

Pages: 1 [2]   Go Down
  Print  
Author Topic: COD4 Parser Issue  (Read 585 times) Bookmark and Share
Dev. Team
*
OS: Windows
Type: Gameserver Rental Co.
Gameservers: COD2,COD4,COD5
Posts: 1096
Offline Offline
« Reply #15 on: January 18, 2012, 09:22:47 AM »

Python doesn't take self as a specified argument in a call, its implied in all calls. So you just need self.sync(), and not self.sync(self)

You seem to have done pretty well for learning the language at the same time!

I'll take a look at the code itself later today.
Logged

Jr. Member
**
OS: Windows
Type: Renting Server, no B3
Gameservers: COD2, COD4, COD5, COD BlackOps, COD MW3, BF3, Crysis Wars
Posts: 30
Offline Offline
« Reply #16 on: January 18, 2012, 11:32:13 AM »

Python doesn't take self as a specified argument in a call, its implied in all calls. So you just need self.sync(), and not self.sync(self)

You seem to have done pretty well for learning the language at the same time!

I'll take a look at the code itself later today.

Thanks very much, All I know is self taught.. I have (limited) knowledge in C#.NET, VB.NET and Lua.. Although python syntax differs it has enough similarities for me to be able to read and understand it Smiley

Duc.
Logged
Dev. Team
*
OS: Windows
Type: Gameserver Rental Co.
Gameservers: COD2,COD4,COD5
Posts: 1096
Offline Offline
« Reply #17 on: January 18, 2012, 03:13:30 PM »

I don't think that the code as you have it will work correctly.

The SYNC will only be run if victim (or attacker) is already authenticated, which is not what is needed.

If you rewrote the OnJ method (which is inherited from the cod parser cod.py) so that if the guid is not found when it is called (either because it is from the join line in the log, or because it has been called from another method and it wasn't supplied to that method) and to try and get the guid from the results of an rcon status. This would take care of all the other places where OnJ is called because the client isn't known yet.

One of the nice things about python is that you can rewrite any of the code that is inherited by including a method with the same name, so an OnJ method in a modified cod4 parser will replace the one in the cod parser.

By the way which freetag mod are you using, the only one I could find seems to correctly supply the guids?

And that's how I started programming with python as well, although my prior languages go back a few more years than yours.....  Grin
« Last Edit: January 18, 2012, 03:16:11 PM by 82ndAB.Bravo17 » Logged
Jr. Member
**
OS: Windows
Type: Renting Server, no B3
Gameservers: COD2, COD4, COD5, COD BlackOps, COD MW3, BF3, Crysis Wars
Posts: 30
Offline Offline
« Reply #18 on: January 18, 2012, 04:52:39 PM »

The server where I was having this issue runs the openwarfare MW2 mod with a freezetag mod:



The reason I added this code in:

Code:
        if victim:
            if victim.name != match.group('name'):
                self.debug('SYNC REQUIRED!')
                mlist = self.sync(self)
                return None

Is because there is no disconnect message logged anywhere when the player leaves the server. The client object is removed when the server runs a scheduled sync which is fine however makes the xlrstats webfront look dirty (player score is n/a after they disconnect but they are still displayed).

Now if the server is full and someone disconnects and then someone connects before a sync update the client object still exists, this code checks the matched name against the clients stored name which triggers the sync update if they differ.. this prevents data from the previous client to be used.

Having it like this means that there is no risk of data corruption when kills are made, also as 'sync' is called more often it keeps the stats frontend clean. Although if a player disconnects and no-one connects it looks dirty until the sync is called.

The stats are now being collected ok: http://banbutton.com/xlrstats/?config=5 so I think i'll leave it be unless any problems arise.

Thanks again, Duc.
Logged
Dev. Team
*
OS: Windows
Type: Gameserver Rental Co.
Gameservers: COD2,COD4,COD5
Posts: 1096
Offline Offline
« Reply #19 on: January 18, 2012, 07:28:32 PM »

I guess I should have read further!

What happens with the D (Damage) lines in the log, are they present, because if so you may have the same issue there as well.....

Do you have any idea why they removed the guids from the log lines?
Logged
Jr. Member
**
OS: Windows
Type: Renting Server, no B3
Gameservers: COD2, COD4, COD5, COD BlackOps, COD MW3, BF3, Crysis Wars
Posts: 30
Offline Offline
« Reply #20 on: January 18, 2012, 08:38:47 PM »

No the damage log lines seem to have been removed :/

I truly have no idea why some log lines have been removed and why some have been altered, makes no sense :/

The code im using has successfully parsed and entered 178 players and 8930 kills since lunchtime with no errors in the B3 log so it seems to be working fine Smiley

now to make a parser for crysis.. :/

Duc

Logged
Tags:
Pages: 1 [2]   Go Up
  Print  
 
Jump to:  


Rate this page +1 at Google Search


SimplePortal 2.3.1 © 2008-2009, SimplePortal