Go to the documentation of this file.00001 '''
00002 Anoria (c) Gsk 2010
00003 '''
00004
00005
00006 import BigWorld
00007
00008
00009 class ChatChannel(BigWorld.Base):
00010 def __init__(self):
00011 BigWorld.Base.__init__(self)
00012 self.dSubs = {}
00013 print 'ChatChannel.__init__(): channelId=%d' % (self.channelId)
00014
00015 def subscribe(self, entity):
00016 print 'ChatChannel.subscribe(): processing subscription request entity=%d' % (entity.id)
00017 if self.dSubs.has_key(entity.id): return
00018 self.dSubs[entity.id] = entity
00019
00020 def unsubscribe(self, entity):
00021 print 'ChatChannel.unsubscribe(): processing unsubscription request entity=%d' % (entity.id)
00022 if self.dSubs.has_key(entity.id):
00023 del self.dSubs[entity.id]
00024
00025 def chatText(self, text):
00026
00027 for entity in self.dSubs.values():
00028 entity.client.rpc_chatText(text, self.channelId)
00029
00030
00031
00032