from b3.parsers.frostbite.util import PlayerInfoBlock
pib = PlayerInfoBlock(self.console.write(('admin.listPlayers', 'all')))
for p in pib:
playerlist = self.console.clients.getByMagic(p['name'])
client = playerlist
client.setvar(self, 'score', int(p['score']) )
I am no expert coder but this way of obtaining player score and making it usable does not seem very efficient. It has to send a lengthy rcon request every time.
Is there any more efficient or more natural approach to this? What am I missing?