def __AOGAS_onNotifyAccount(self, message): self.proto.serviceChannel.pushClientMessage( message, SCH_CLIENT_MSG_TYPE.AOGAS_NOTIFY_TYPE, isAlert=True, auxData=SessionControlAuxData(SESSION_CONTROL_TYPE.AOGAS, message.timeout))
def atCall(self, cd): auxData = cd.findArg(3, 'auxData') if not isinstance(auxData, SessionControlAuxData): return if auxData.type != SESSION_CONTROL_TYPE.KOREA_PARENTAL_CONTROL: return newTimeout = GameSessionController.NOTIFY_PERIOD * _MS_IN_SEC return cd.changeArgs((2, 'isAlert', True), (3, 'auxData', SessionControlAuxData(auxData.type, newTimeout)))
def atCall(self, cd): auxData = cd.findArg(3, 'auxData') if not isinstance(auxData, SessionControlAuxData): return elif auxData.type != SESSION_CONTROL_TYPE.AOGAS: return else: message = cd.findArg(0, 'message') newTimeout = self.NEXT_NOTIFICATION_PERIOD_SEC.get(message.name()) if newTimeout is None: return newTimeout *= _MS_IN_SEC return cd.changeArgs((3, 'auxData', SessionControlAuxData(auxData.type, newTimeout)))
def __gameSession_onClientNotify(self, sessionDuration, timeTillMidnight, playTimeLeft): LOG_DEBUG('onGameSessionNotification', sessionDuration, timeTillMidnight, playTimeLeft) if getClientLanguage() == 'ko': key = '#system_messages:gameSessionControl/korea/{0:>s}' msgList = [ i18n.makeString(key.format('sessionTime'), sessionTime=time.strftime( '%H:%M', time.gmtime(sessionDuration))), i18n.makeString(key.format('note')) ] self.proto.serviceChannel.pushClientMessage( '\n'.join(msgList), SCH_CLIENT_MSG_TYPE.KOREA_PARENTAL_CONTROL_TYPE, auxData=SessionControlAuxData( SESSION_CONTROL_TYPE.KOREA_PARENTAL_CONTROL, timeoutMS=0))