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: Storing name colour codes (exactName)  (Read 1130 times) Bookmark and Share
Jr. Member
**
OS: Windows
Type: Owner dedicated server(s)
Gameservers: CoD2, CoD4, CoD5
Posts: 20
Offline Offline
WWW
« on: October 09, 2010, 01:03:27 PM »

I would like to store a player's full name including colour codes for use on my clan website.

I believed that this was stored in the exactName property of a client, so I just added an extra field to the database and saved this variable alongside all the other client data when updating the clients table. (storage.py -> setClient

However the database is only storing the 'cleaned' name (no colour codes) but with an additional ^7 on the end.

I have noticed that in game the colour codes seem to disappear from the B3 output as well. For instance upon first connecting using !regtest returns my name with full colour, however after waiting a few seconds and trying the command again the name appears plain white.

This is a fresh install on Windows 2003, interfacing with a CoD2 server.

I have tried to follow the code flow through, but I can't find where it might be going wrong as I can't find anywhere that the exactName property is been set to a cleaned version of the name. I only have a tiny bit of experience with python which probably doesn't help!

Any advice would be appreciated.
Logged


Senior Dev.
*
OS: Linux
Type: Home user
Posts: 3478
Offline Offline
WWW
Support Specialty: B3-Core, UrT/SmG/BFBC2 parsers, Plugin development
« Reply #1 on: October 09, 2010, 01:43:59 PM »

The way the exactName and name Client properties are set is a bit tricky. I'll try to explain here how it flows.

Let say you have a Client instance 'c'

whenever you see
Code: python
c.exactName = '^4j^3o^5e'
, the
Code: python
c._set_name('^4j^3o^5e')
is run. This is because the _set_name method is declared as the setter method for the exactName property (see line 425)

The same method is also run where you see
Code: python
c.name = '^4j^3o^5e'
for the same reasons (see line 424)

When examining the _set_name(name) method, you see that its parameter 'name' is used to fill the exactName property.
If you loose the color codes in exactName, this means that the _set_name method was called with a name that had no color code as its parameter.

I hope I haven't lost you until here Smiley
Now to discover the source of the issue, you have to scrutinize the parsers code for
Code: python
c.name = 'something with no color code'
or
Code: python
c.exactName = 'name with no color code'

EDIT: I've made a small change to the way _set_name works regarding exactName in this commit. Could you try it out and report if it does improve things or not (or make the whole thing worst)
« Last Edit: October 09, 2010, 02:09:57 PM by Courgette » Logged

Jr. Member
**
OS: Windows
Type: Owner dedicated server(s)
Gameservers: CoD2, CoD4, CoD5
Posts: 20
Offline Offline
WWW
« Reply #2 on: October 09, 2010, 02:29:16 PM »

Thanks for the info!

I can follow how all that works, but I still haven't managed to track down a source.

I have tried your modified code and there is a slight improvement.

The colours are saved correctly when the player first connects, however upon starting the next round (search and destroy gametype) the colour codes are removed again. This is an improvement as before the colours were removed without finishing the round.
Logged

Senior Dev.
*
OS: Linux
Type: Home user
Posts: 3478
Offline Offline
WWW
Support Specialty: B3-Core, UrT/SmG/BFBC2 parsers, Plugin development
« Reply #3 on: October 09, 2010, 02:40:17 PM »

Good, we're on the right direction.

One other path to follow is to start from the game log file. Extract from the game log all lines regarding the player you are tracking.
highlight all lines that mention his name without the color codes
Logged

Jr. Member
**
OS: Windows
Type: Owner dedicated server(s)
Gameservers: CoD2, CoD4, CoD5
Posts: 20
Offline Offline
WWW
« Reply #4 on: October 09, 2010, 02:43:08 PM »

I thought I would have a look through the server log and I think I have found the cause.

It has nothing to do with the new rounds.

Most CoD2 (will need to check other variants) log lines print the coloured name, however two types of log lines do not.

These are the chat and weapon pickup ones. eg:

Code:
3724:08 say;********;2;FSL|CdSgt.Winter|4; you know ?
3724:09 K;227575;3;allies;^9FSL|^4Cpl.^9Alcool0^4|23;********;6;axis;^9FSL^4^9|^4Pvt.^9Thom's^41;mp44_mp;78;MOD_RIFLE_BULLET;torso_lower
3724:09 Weapon;********;6;FSL|Pvt.Thom's1;smoke_grenade_american_mp
3724:09 W;axis;********;^9FSL|^4Pvt.^9Cojack^4|2;********;^9FSL|^4PM.Bestaflex|Srv;********;^9FSL^4^9|^4Pvt.^9Thom's^41
3724:09 L;allies;********;^9FSL|^4CdSgt.^9Winter^4|4;********;^9FSL|^4Cpl.^9Alcool0^4|23;********;Luckless^1[^7xD^1]
3724:16 say;********;2;FSL|CdSgt.Winter|4;no rng

It appears that as soon as a client types, the colours are stripped from their name.

Edit: looks like you beat me to the reply ;-)
Logged

Senior Dev.
*
OS: Linux
Type: Home user
Posts: 3478
Offline Offline
WWW
Support Specialty: B3-Core, UrT/SmG/BFBC2 parsers, Plugin development
« Reply #5 on: October 09, 2010, 02:48:42 PM »

could you replace _set_name with the code below in client.py, it just adds debug messages that will confirm this behaviour

Code: python
    def _set_name(self, name):
       if self.console:
           self.console.debug('_set_name("%s"), current _exactName is "%s"' % (name, self._exactName))
           newName = self.console.stripColors(name)
       else:
           newName = name.strip()

       if self._name == newName:
           self.console.verbose2('Aborted Making Alias for cid: %s, name is the same' % self.cid)
           return
       if self.cid == '-1' or self.cid == 'Server': # bfbc2 addition
           self.console.verbose2('Aborted Making Alias for cid: %s, must be B3' % self.cid)
           return
       
       self.makeAlias(self._name)
       self._name = newName
       
       # only if current exactName does not match the current newName
       if self.console:
           ename = self.console.stripColors(self._exactName)
           self.console.debug('ename : "%s", newName : "%s"' % (ename, newName))
       else:
           ename = self._exactName
       if ename != newName:
           if self.console:
               self.console.debug('updating _exactName')
           self._exactName = name + '^7'
           
       if self.console and self.authed:
           self.console.queueEvent(b3.events.Event(b3.events.EVT_CLIENT_NAME_CHANGE, self.name, self))

EDIT : I've edited the code above. Make sure you code the last one
« Last Edit: October 09, 2010, 02:51:06 PM by Courgette » Logged

Jr. Member
**
OS: Windows
Type: Owner dedicated server(s)
Gameservers: CoD2, CoD4, CoD5
Posts: 20
Offline Offline
WWW
« Reply #6 on: October 09, 2010, 03:13:18 PM »

Here's the log: (I've trimmed out some of the non-applicable lines regarding other plugins)

Code:
101009 23:56:01    BOT        Start reading...
101009 23:56:01    VERBOSE    RCON sending (217.146.90.108:28960) status
101009 23:56:02    ERROR    Error executing crontab <bound method StatusPlugin.update of <b3.plugins.status.StatusPlugin instance at 0x01064C88>>: [Errno 2] No such file or directory: 'c:/services/CoD2/server28960/status.xml'
[('C:\\services\\B3\\b3\\cron.py', 233, 'run', 'c.run()'), ('C:\\services\\B3\\b3\\cron.py', 171, 'run', 'CronTab.run(self)'), ('C:\\services\\B3\\b3\\cron.py', 60, 'run', 'self.command()'), ('C:\\services\\B3\\b3\\plugins\\status.py', 203, 'update', 'self.writeXML(xml.toprettyxml(indent="        "))'), ('C:\\services\\B3\\b3\\plugins\\status.py', 216, 'writeXML', "f = file(self._outputFile, 'w')")]
101009 23:56:17    CONSOLE    307:58 ShutdownGame:
101009 23:56:17    CONSOLE    307:58 ------------------------------------------------------------
101009 23:56:17    CONSOLE    307:58 ------------------------------------------------------------
101009 23:56:17    CONSOLE    307:58 InitGame: \fs_game\brothers_wrm3\g_antilag\1\g_gametype\sd\gamename\Call of Duty 2\mapname\mp_eindhoven\protocol\118\scr_friendlyfire\1\scr_killcam\0\shortversion\1.3\sv_allowAnonymous\0\sv_floodProtect\1\sv_hostname\|Brothers|-Realism ^1WRM^2 (B3)\sv_maxclients\34\sv_maxPing\500\sv_maxRate\25000\sv_minPing\0\sv_privateClients\2\sv_punkbuster\1\sv_pure\1\sv_voice\1
101009 23:56:17    VERBOSE    ...self.console.game.gameType: sd
101009 23:56:47    DEBUG    Synchronising Clients.
101009 23:56:47    VERBOSE    RCON sending (217.146.90.108:28960) PB_SV_PList
101009 23:56:48    CONSOLE    308:29 J;186758;2;|^4Brothers^7|-^12Lt^7.Robinson
101009 23:56:48    DEBUG    |^4Brothers^7|-^12Lt^7.Robinson connected, waiting for Authentication...
101009 23:56:48    DEBUG    Our Authentication queue: {'2': 1}
101009 23:56:50    DEBUG    newClient: 2, 186758, |^4Brothers^7|-^12Lt^7.Robinson
101009 23:56:50    VERBOSE    RCON sending (217.146.90.108:28960) PB_SV_PList
101009 23:56:51    VERBOSE    connectClient() = {2: {'slot': '3', 'status': 'OK', 'name': '|^4Brothers^7|-^12Lt^7.Robinson', 'power': '1', 'ss': '0', 'ip': '87.194.***.58', 'auth': '0.0', 'pbid': '485c7fa2a4d2a2628bab362339aa5585', 'guid': '485c7fa2a4d2a2628bab362339aa5585', 'os': 'W', 'port': '65381'}}
101009 23:56:51    DEBUG    |^4Brothers^7|-^12Lt^7.Robinson found in status/playerList
101009 23:56:51    DEBUG    sp: {'slot': '3', 'status': 'OK', 'name': '|^4Brothers^7|-^12Lt^7.Robinson', 'power': '1', 'ss': '0', 'ip': '87.194.***.58', 'auth': '0.0', 'pbid': '485c7fa2a4d2a2628bab362339aa5585', 'guid': '485c7fa2a4d2a2628bab362339aa5585', 'os': 'W', 'port': '65381'}
101009 23:56:51    DEBUG    _set_name("|^4Brothers^7|-^12Lt^7.Robinson"), current _exactName is ""
101009 23:56:51    DEBUG    ename : "", newName : "|Brothers|-2Lt.Robinson"
101009 23:56:51    DEBUG    updating _exactName
101009 23:56:51    VERBOSE    0 cid changed from None to 2
101009 23:56:51    DEBUG    Client Connected: [2] |Brothers|-2Lt.Robinson - 485c7fa2a4d2a2628bab362339aa5585 ({'codguid': '186758'})
101009 23:56:51    DEBUG    Storage: getClient <b3.clients.Client object at 0x010E5230>
101009 23:56:51    DEBUG    _set_name("|Brothers|-2Lt.Robinson"), current _exactName is "|^4Brothers^7|-^12Lt^7.Robinson^7"
101009 23:56:51    DEBUG    _set_name("|Brothers|-2Lt.Robinson^7"), current _exactName is "|^4Brothers^7|-^12Lt^7.Robinson^7"
101009 23:56:51    BOT        Client found in storage 2, welcome back |Brothers|-2Lt.Robinson
101009 23:56:51    DEBUG    _set_name("|Brothers|-2Lt.Robinson"), current _exactName is "|^4Brothers^7|-^12Lt^7.Robinson^7"
101009 23:56:51    DEBUG    Storage: setClient <b3.clients.Client object at 0x010E5230>
101009 23:56:51    DEBUG    Storage: setClient data {'time_add': 1286646675, 'time_edit': 1286665011, 'name': '|Brothers|-2Lt.Robinson', 'group_bits': 128, 'ip': '87.194.***.58', 'auto_login': 1, 'greeting': '', 'pbid': '485c7fa2a4d2a2628bab362339aa5585', 'connections': 134, 'mask_level': 0, 'exact_name': '|^4Brothers^7|-^12Lt^7.Robinson^7', 'guid': '485c7fa2a4d2a2628bab362339aa5585', 'id': 2}
101009 23:56:51    DEBUG    Client Authorized: [2] |Brothers|-2Lt.Robinson - 485c7fa2a4d2a2628bab362339aa5585
101009 23:56:51    VERBOSE    Queueing event Client Authenticated <b3.clients.Client object at 0x010E5230>
101009 23:56:51    VERBOSE    Parsing Event: Client Authenticated: CensorPlugin
101009 23:57:00    VERBOSE    RCON sending (217.146.90.108:28960) say ^7|^4B3^7|: This is a Tactical Realism server. Type ^1!rules^7 in ^1chat^7 for more info.
101009 23:57:00    VERBOSE    RCON sending (217.146.90.108:28960) status
101009 23:57:01    ERROR    Error executing crontab <bound method StatusPlugin.update of <b3.plugins.status.StatusPlugin instance at 0x01064C88>>: [Errno 2] No such file or directory: 'c:/services/CoD2/server28960/status.xml'
[('C:\\services\\B3\\b3\\cron.py', 233, 'run', 'c.run()'), ('C:\\services\\B3\\b3\\cron.py', 171, 'run', 'CronTab.run(self)'), ('C:\\services\\B3\\b3\\cron.py', 60, 'run', 'self.command()'), ('C:\\services\\B3\\b3\\plugins\\status.py', 203, 'update', 'self.writeXML(xml.toprettyxml(indent="        "))'), ('C:\\services\\B3\\b3\\plugins\\status.py', 216, 'writeXML', "f = file(self._outputFile, 'w')")]
101009 23:57:50    CONSOLE    309:31 K;186758;2;allies;|^4Brothers^7|-^12Lt^7.Robinson;186758;2;allies;|^4Brothers^7|-^12Lt^7.Robinson;none;100000;MOD_SUICIDE;none
101009 23:57:50    DEBUG    _set_name("|^4Brothers^7|-^12Lt^7.Robinson"), current _exactName is "|^4Brothers^7|-^12Lt^7.Robinson^7"
101009 23:57:50    DEBUG    _set_name("|^4Brothers^7|-^12Lt^7.Robinson"), current _exactName is "|^4Brothers^7|-^12Lt^7.Robinson^7"
101009 23:57:50    CONSOLE    309:31 W;axis
101009 23:57:50    VERBOSE    line did not match format: W;axis
101009 23:57:50    CONSOLE    309:31 L;allies;186758;|^4Brothers^7|-^12Lt^7.Robinson
101009 23:57:50    VERBOSE    line did not match format: L;allies;186758;|^4Brothers^7|-^12Lt^7.Robinson
101009 23:57:57    CONSOLE    309:38 ShutdownGame:
101009 23:57:57    CONSOLE    309:38 ------------------------------------------------------------
101009 23:57:57    CONSOLE    309:38 ------------------------------------------------------------
101009 23:57:57    CONSOLE    309:38 InitGame: \fs_game\brothers_wrm3\g_antilag\1\g_gametype\sd\gamename\Call of Duty 2\mapname\mp_eindhoven\protocol\118\scr_friendlyfire\1\scr_killcam\0\shortversion\1.3\sv_allowAnonymous\0\sv_floodProtect\1\sv_hostname\|Brothers|-Realism ^1WRM^2 (B3)\sv_maxclients\34\sv_maxPing\500\sv_maxRate\25000\sv_minPing\0\sv_privateClients\2\sv_punkbuster\1\sv_pure\1\sv_voice\1
101009 23:57:57    VERBOSE    ...self.console.game.gameType: sd
101009 23:57:57    CONSOLE    309:39 J;186758;2;|^4Brothers^7|-^12Lt^7.Robinson
101009 23:57:57    DEBUG    This is not the correct client (186758 <> 485c7fa2a4d2a2628bab362339aa5585), disconnecting
101009 23:57:57    VERBOSE    Queueing event Client Disconnect 2
101009 23:57:57    VERBOSE    Parsing Event: Client Disconnect: TkPlugin
101009 23:58:00    VERBOSE    RCON sending (217.146.90.108:28960) status
101009 23:58:00    ERROR    Error executing crontab <bound method StatusPlugin.update of <b3.plugins.status.StatusPlugin instance at 0x01064C88>>: [Errno 2] No such file or directory: 'c:/services/CoD2/server28960/status.xml'
[('C:\\services\\B3\\b3\\cron.py', 233, 'run', 'c.run()'), ('C:\\services\\B3\\b3\\cron.py', 171, 'run', 'CronTab.run(self)'), ('C:\\services\\B3\\b3\\cron.py', 60, 'run', 'self.command()'), ('C:\\services\\B3\\b3\\plugins\\status.py', 203, 'update', 'self.writeXML(xml.toprettyxml(indent="        "))'), ('C:\\services\\B3\\b3\\plugins\\status.py', 216, 'writeXML', "f = file(self._outputFile, 'w')")]
101009 23:58:09    CONSOLE    309:51 say;186758;2;|Brothers|-2Lt.Robinson;!leveltest
101009 23:58:09    DEBUG    No client - attempt join
101009 23:58:09    DEBUG    |Brothers|-2Lt.Robinson connected, waiting for Authentication...
101009 23:58:09    DEBUG    Our Authentication queue: {'2': 1}
101009 23:58:11    DEBUG    newClient: 2, 186758, |Brothers|-2Lt.Robinson
101009 23:58:11    VERBOSE    RCON sending (217.146.90.108:28960) PB_SV_PList
101009 23:58:12    VERBOSE    connectClient() = {2: {'slot': '3', 'status': 'OK', 'name': '|^4Brothers^7|-^12Lt^7.Robinson', 'power': '1', 'ss': '0', 'ip': '87.194.***.58', 'auth': '3.8', 'pbid': '485c7fa2a4d2a2628bab362339aa5585', 'guid': '485c7fa2a4d2a2628bab362339aa5585', 'os': 'W', 'port': '65381'}}
101009 23:58:12    DEBUG    |^4Brothers^7|-^12Lt^7.Robinson found in status/playerList
101009 23:58:12    DEBUG    sp: {'slot': '3', 'status': 'OK', 'name': '|^4Brothers^7|-^12Lt^7.Robinson', 'power': '1', 'ss': '0', 'ip': '87.194.***.58', 'auth': '3.8', 'pbid': '485c7fa2a4d2a2628bab362339aa5585', 'guid': '485c7fa2a4d2a2628bab362339aa5585', 'os': 'W', 'port': '65381'}
101009 23:58:12    DEBUG    _set_name("|Brothers|-2Lt.Robinson"), current _exactName is ""
101009 23:58:12    DEBUG    ename : "", newName : "|Brothers|-2Lt.Robinson"
101009 23:58:12    DEBUG    updating _exactName
101009 23:58:12    VERBOSE    0 cid changed from None to 2
101009 23:58:12    DEBUG    Client Connected: [2] |Brothers|-2Lt.Robinson - 485c7fa2a4d2a2628bab362339aa5585 ({'codguid': '186758'})
101009 23:58:12    DEBUG    Storage: getClient <b3.clients.Client object at 0x010D1690>
101009 23:58:12    DEBUG    _set_name("|Brothers|-2Lt.Robinson"), current _exactName is "|Brothers|-2Lt.Robinson^7"
101009 23:58:12    DEBUG    _set_name("|^4Brothers^7|-^12Lt^7.Robinson^7"), current _exactName is "|Brothers|-2Lt.Robinson^7"
101009 23:58:12    BOT        Client found in storage 2, welcome back |Brothers|-2Lt.Robinson
101009 23:58:12    DEBUG    _set_name("|Brothers|-2Lt.Robinson"), current _exactName is "|Brothers|-2Lt.Robinson^7"
101009 23:58:12    DEBUG    Storage: setClient <b3.clients.Client object at 0x010D1690>
101009 23:58:12    DEBUG    Storage: setClient data {'time_add': 1286646675, 'time_edit': 1286665092, 'name': '|Brothers|-2Lt.Robinson', 'group_bits': 128, 'ip': '87.194.***.58', 'auto_login': 1, 'greeting': '', 'pbid': '485c7fa2a4d2a2628bab362339aa5585', 'connections': 135, 'mask_level': 0, 'exact_name': '|Brothers|-2Lt.Robinson^7', 'guid': '485c7fa2a4d2a2628bab362339aa5585', 'id': 2}
101009 23:58:12    DEBUG    Client Authorized: [2] |Brothers|-2Lt.Robinson - 485c7fa2a4d2a2628bab362339aa5585
101009 23:58:12    VERBOSE    Queueing event Client Authenticated <b3.clients.Client object at 0x010D1690>
101009 23:58:12    VERBOSE    Parsing Event: Client Authenticated: CensorPlugin
101009 23:58:13    CONSOLE    309:55 say;186758;2;|Brothers|-2Lt.Robinson;!regtest
101009 23:58:13    DEBUG    _set_name("|Brothers|-2Lt.Robinson"), current _exactName is "|Brothers|-2Lt.Robinson^7"
101009 23:58:13    VERBOSE    Queueing event Say !regtest
101009 23:58:13    VERBOSE    Parsing Event: Say: CensorPlugin
101009 23:58:13    VERBOSE    Parsing Event: Say: SpamcontrolPlugin
101009 23:58:13    VERBOSE    Parsing Event: Say: AdminPlugin
101009 23:58:13    DEBUG    AdminPlugin: OnSay handle 5:"!regtest"
101009 23:58:13    DEBUG    AdminPlugin: Handle command !regtest
101009 23:58:13    VERBOSE    RCON sending (217.146.90.108:28960) tell 2 ^7|^4B3^7|: ^3[pm]^7 ^7|Brothers|-2Lt.Robinson^7 ^7(^3@2^7) is a ^3Super Admin ^7[^2100^7] since 05:51PM GMT 09/10/10
101009 23:58:25    CONSOLE    310:06 K;186758;2;allies;|^4Brothers^7|-^12Lt^7.Robinson;186758;2;allies;|^4Brothers^7|-^12Lt^7.Robinson;none;100000;MOD_SUICIDE;none
101009 23:58:25    DEBUG    _set_name("|^4Brothers^7|-^12Lt^7.Robinson"), current _exactName is "|Brothers|-2Lt.Robinson^7"
101009 23:58:25    DEBUG    _set_name("|^4Brothers^7|-^12Lt^7.Robinson"), current _exactName is "|Brothers|-2Lt.Robinson^7"
101009 23:58:25    CONSOLE    310:06 W;axis
101009 23:58:25    VERBOSE    line did not match format: W;axis
101009 23:58:25    CONSOLE    310:06 L;allies;186758;|^4Brothers^7|-^12Lt^7.Robinson
101009 23:58:25    VERBOSE    line did not match format: L;allies;186758;|^4Brothers^7|-^12Lt^7.Robinson
101009 23:58:27    DEBUG    Synchronising Clients.
101009 23:58:27    VERBOSE    RCON sending (217.146.90.108:28960) PB_SV_PList
101009 23:58:28    DEBUG    in-sync 485c7fa2a4d2a2628bab362339aa5585 == 485c7fa2a4d2a2628bab362339aa5585
101009 23:58:30    VERBOSE    RCON sending (217.146.90.108:28960) status
101009 23:58:32    CONSOLE    310:13 ShutdownGame:
101009 23:58:32    CONSOLE    310:13 ------------------------------------------------------------
101009 23:58:32    CONSOLE    310:13 ------------------------------------------------------------
101009 23:58:32    CONSOLE    310:13 InitGame: \fs_game\brothers_wrm3\g_antilag\1\g_gametype\sd\gamename\Call of Duty 2\mapname\mp_eindhoven\protocol\118\scr_friendlyfire\1\scr_killcam\0\shortversion\1.3\sv_allowAnonymous\0\sv_floodProtect\1\sv_hostname\|Brothers|-Realism ^1WRM^2 (B3)\sv_maxclients\34\sv_maxPing\500\sv_maxRate\25000\sv_minPing\0\sv_privateClients\2\sv_punkbuster\1\sv_pure\1\sv_voice\1
101009 23:58:32    VERBOSE    ...self.console.game.gameType: sd
101009 23:58:32    CONSOLE    310:14 J;186758;2;|^4Brothers^7|-^12Lt^7.Robinson
101009 23:58:32    DEBUG    This is not the correct client (186758 <> 485c7fa2a4d2a2628bab362339aa5585), disconnecting
101009 23:58:32    VERBOSE    Queueing event Client Disconnect 2
101009 23:58:32    VERBOSE    Parsing Event: Client Disconnect: TkPlugin
101009 23:58:42    CONSOLE    310:24 Q;186758;2;|^4Brothers^7|-^12Lt^7.Robinson

What seems a little odd to me are lines 51-52 there

Code:
101009 23:57:57    CONSOLE    309:39 J;186758;2;|^4Brothers^7|-^12Lt^7.Robinson
101009 23:57:57    DEBUG    This is not the correct client (186758 <> 485c7fa2a4d2a2628bab362339aa5585), disconnecting
« Last Edit: October 09, 2010, 04:15:51 PM by Robbo » Logged

Senior Dev.
*
OS: Linux
Type: Home user
Posts: 3478
Offline Offline
WWW
Support Specialty: B3-Core, UrT/SmG/BFBC2 parsers, Plugin development
« Reply #7 on: October 09, 2010, 03:57:59 PM »

Your analysis is right (to me anyway).
The issue source is now identified withing the cod parser.
Unfortunately, I'm not the right guy to take over from there as I have no experience at all with the cod# parsers.

From what I've seen, there are a few questions that must be answered :

1) why This is not the correct client (186758 <> 485c7fa2a4d2a2628bab362339aa5585), disconnecting ? from the code, I thought this would be run only if punkbuster is disabled
2) in OnSay, if client does not exists, the code passes the data to onJ. But data[name] in OnSay contains a uncolorized player name while OnJ assumes it is colorized. Is there an other way to deal with such situations (with and without PB)
Logged

[ www.xlrstats.com ]
Project Lead
*
OS: Linux
Type: Owner dedicated server(s)
Gameservers: CoD, CoD2, CoD5, UrT
Posts: 2022
Offline Offline
WWW
Support Specialty: B3-Core, CoD/UrT/WoP/ETPro parsers, Plugin development
« Reply #8 on: October 10, 2010, 12:13:25 AM »

1) Disconnect bug was a known issue and fixed in v1.4.13 of the cod.py in august. That patch is in the next release of B3 (Commit 08/10/2010: Cod series parsers: Fixed a bug where clients would be disconnected after mapchange on PB enabled servers.)

2) This is a bit more tricky. With issue 1 being fixed the passalong to onJoin will most likely not happen very often, unless B3 was blind for a while Wink. We'll need to know if this only applies to cod2 where the Say line holds a 'cleaned' name, and if yes, does this apply to all versions of cod2?
Logged

Jr. Member
**
OS: Windows
Type: Owner dedicated server(s)
Gameservers: CoD2, CoD4, CoD5
Posts: 20
Offline Offline
WWW
« Reply #9 on: October 10, 2010, 08:55:40 AM »

The clean names are true for both CoD1 (and I assume UO) as well as CoD2 v1.3. I would expect it to also be the same for all other CoD2 versions as if it has made it from vCoD to CoD2 1.3 I don't see why it would be different. CoD4 and W@W didn't support coloured names so there is no issue there.
Logged

[ www.xlrstats.com ]
Project Lead
*
OS: Linux
Type: Owner dedicated server(s)
Gameservers: CoD, CoD2, CoD5, UrT
Posts: 2022
Offline Offline
WWW
Support Specialty: B3-Core, CoD/UrT/WoP/ETPro parsers, Plugin development
« Reply #10 on: October 10, 2010, 09:22:19 AM »

If I get you a version of cod.py would you be able to test this quickly?
Logged

Jr. Member
**
OS: Windows
Type: Owner dedicated server(s)
Gameservers: CoD2, CoD4, CoD5
Posts: 20
Offline Offline
WWW
« Reply #11 on: October 10, 2010, 09:32:00 AM »

I certainly could yes.
Logged

[ www.xlrstats.com ]
Project Lead
*
OS: Linux
Type: Owner dedicated server(s)
Gameservers: CoD, CoD2, CoD5, UrT
Posts: 2022
Offline Offline
WWW
Support Specialty: B3-Core, CoD/UrT/WoP/ETPro parsers, Plugin development
« Reply #12 on: October 10, 2010, 09:47:46 AM »

Here's one quick draw to test.

[attachment deleted by admin]
Logged

Jr. Member
**
OS: Windows
Type: Owner dedicated server(s)
Gameservers: CoD2, CoD4, CoD5
Posts: 20
Offline Offline
WWW
« Reply #13 on: October 10, 2010, 09:59:59 AM »

That certainly appears to be working. Regardless of what I do / say / kill the colours remain. The disconnected error is also gone.

I am still running Courgette's _set_name function.

Currently this install of B3 is on a new dedi server which will be going public tomorrow at some point so there should be more traffic to verify that it doesn't glitch.

Logged

Senior Dev.
*
OS: Linux
Type: Home user
Posts: 3478
Offline Offline
WWW
Support Specialty: B3-Core, UrT/SmG/BFBC2 parsers, Plugin development
« Reply #14 on: October 10, 2010, 10:06:15 AM »

you can revert to the original _set_name. My modification introduce a new issue : in the case a player change his name by just changing the colors
Logged

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


Rate this page +1 at Google Search


SimplePortal 2.3.1 © 2008-2009, SimplePortal