def switch(self, scope): if scope is MESSENGER_SCOPE.BATTLE: self.__limits = limits.BattleLimits() self.exitFromLazyChannels() else: self.__limits = limits.LobbyLimits() self.__removeBattleChannels()
def __init__(self): ChatActionsListener.__init__(self, {CHAT_RESPONSES.channelNotExists: '_ChannelsManager__onChannelNotExists', CHAT_RESPONSES.commandInCooldown: '_ChannelsManager__onCommandInCooldown'}) self.__eventManager = Event.EventManager() self.onRequestChannelsComplete = Event.Event(self.__eventManager) self.onChannelExcludeFromSearch = Event.Event(self.__eventManager) self.onFindChannelsFailed = Event.Event(self.__eventManager) self.__filtersChain = None self.__limits = limits.LobbyLimits() self.__channels = {} self.__creationInfo = {} self.__messagesQueue = [] self.__isMessageEnabled = False return