def appeal(self, uid, userName, topic): topicID = self.DENUNCIATIONS.get(topic) if topicID is not None: BigWorld.player().makeDenunciation(uid, topicID, constants.VIOLATOR_KIND.UNKNOWN) topicStr = i18n.makeString(MENU.denunciation(topicID)) sysMsg = i18n.makeString(SYSTEM_MESSAGES.DENUNCIATION_SUCCESS) % {'name': userName, 'topic': topicStr} SystemMessages.pushMessage(sysMsg, type=SystemMessages.SM_TYPE.Information)
def appeal(self, uid, userName, topic): topicID = self.DENUNCIATIONS.get(topic) if topicID is not None: BigWorld.player().makeDenunciation(uid, topicID, constants.VIOLATOR_KIND.UNKNOWN) topicStr = i18n.makeString(MENU.denunciation(topicID)) sysMsg = i18n.makeString(SYSTEM_MESSAGES.DENUNCIATION_SUCCESS) % { 'name': userName, 'topic': topicStr } SystemMessages.pushMessage(sysMsg, type=SystemMessages.SM_TYPE.Information) return
def makeAppeal(self, violatorID, userName, topic): topicID = _DENUNCIATIONS_MAP.get(topic) player = BigWorld.player() violatorKind = self._getViolatorKind(player, violatorID) try: player.makeDenunciation(violatorID, topicID, violatorKind) except (AttributeError, TypeError): LOG_ERROR('Cannot make a denunciation') return topicStr = i18n.makeString(MENU.denunciation(topicID)) message = i18n.makeString(SYSTEM_MESSAGES.DENUNCIATION_SUCCESS) message = message % {'name': userName, 'topic': topicStr} self._makeNotification(message)
def _makeAppeal(self, appealID): BigWorld.player().makeDenunciation(self.databaseID, appealID, constants.VIOLATOR_KIND.UNKNOWN) topicStr = i18n.makeString(MENU.denunciation(appealID)) sysMsg = i18n.makeString(SYSTEM_MESSAGES.DENUNCIATION_SUCCESS) % {'name': self.userName, 'topic': topicStr} SystemMessages.pushMessage(sysMsg, type=SystemMessages.SM_TYPE.Information)