I looked at the log and moved some things around so my code is executed first upon that event, but it's still doing a lot of extra stuff before it gets around to my code. Here is part of b3.log where that event is cued. Also, the EVT_CLIENT_JOIN event is getting called every time the TS round begins; is this normal? Its also causing quite a big of delay.
110912 08:32:15 CONSOLE '1170:43------------------------------------------------------------'
110912 08:32:15 CONSOLE '1170:43InitRound: \\sv_allowdownload\\0-....blah blah blah all my server info here'
110912 08:32:15 DEBUG 'EVENT: OnInitround'
110912 08:32:15 VERBOSE '...self.console.game.gameType: ts'
110912 08:32:15 DEBUG 'Synchronizing client info'
110912 08:32:15 VERBOSE "RCON sending (173.236.38.244:27961) 'status'"
110912 08:32:16 DEBUG 'in-sync 93.104.167.40 == 93.104.167.40'
110912 08:32:16 DEBUG 'in-sync 96.32.81.107 == 96.32.81.107'
110912 08:32:16 DEBUG 'Joining Players'
110912 08:32:16 DEBUG 'Joining {Z9}VanilleOfDead'
110912 08:32:16 VERBOSE 'Queueing event Client Join Team None'
110912 08:32:16 DEBUG 'Joining {C9}Leito{Z9}'
110912 08:32:16 VERBOSE 'Queueing event Client Join Team None'
110912 08:32:16 VERBOSE 'Parsing Event: Client Join Team: LeitoPlugin'
110912 08:32:16 VERBOSE 'Queueing event Game Round Start <b3.game.Game object at 0x2483f10>'
110912 08:32:16 VERBOSE 'Parsing Event: Client Join Team: LeitoPlugin'
110912 08:32:16 DEBUG 'LeitoPlugin: Client gear : GeIOXAA'
110912 08:32:16 DEBUG "LeitoPlugin: Bad gear: ['e', 'O']"
110912 08:32:16 VERBOSE 'Parsing Event: Game Round Start: LeitoPlugin'
110912 08:32:16 VERBOSE "RCON sending (173.236.38.244:27961) 'give 0 gift'"
110912 08:32:16 VERBOSE 'Parsing Event: Game Round Start: PoweradminurtPlugin'
110912 08:32:16 VERBOSE 'Parsing Event: Game Round Start: RewardsPlugin'
The line I care about is the RCON line which is the 3rd from last.
I'm really looking for speed here because my function involves giving gifts to clients at the beginning of each round. Here is my code:
elif event.type == b3.events.EVT_GAME_ROUND_START:
for c in self.console.clients.getList():
self.distributeGifts(c)
and then:
def distributeGifts(self, client):
if client.isvar(self, 'hasgifts'):
client.giveGifts(client.var(self, 'hasgifts').value)
Is this the fastest way of distributing the gifts to the clients when the round begins?
Thanks,
Leito