mirror of
https://github.com/Sneed-Group/Poodletooth-iLand
synced 2024-10-31 00:37:54 +00:00
16 lines
423 B
Python
Executable file
16 lines
423 B
Python
Executable file
class ShardStatusReceiver:
|
|
def __init__(self, air):
|
|
self.air = air
|
|
|
|
self.shards = {}
|
|
|
|
# Accept the shardStatus event:
|
|
self.air.accept('shardStatus', self.handleShardStatus)
|
|
|
|
self.air.sendNetEvent('queryShardStatus')
|
|
|
|
def handleShardStatus(self, channel, status):
|
|
self.shards.setdefault(channel, {}).update(status)
|
|
|
|
def getShards(self):
|
|
return self.shards
|