当前位置: 首页>>代码示例>>Python>>正文


Python ext.passCensor函数代码示例

本文整理汇总了Python中messenger.ext.passCensor函数的典型用法代码示例。如果您正苦于以下问题:Python passCensor函数的具体用法?Python passCensor怎么用?Python passCensor使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。


在下文中一共展示了passCensor函数的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。

示例1: __init__

 def __init__(self, cfdUnitID, unitMgrID = 0, cmdrRating = 0, peripheryID = 0, unit = None, **kwargs):
     super(UnitsListItem, self).__init__()
     playersCount = 0
     commandSize = 0
     state = 0
     isRosterSet = False
     creator = None
     description = None
     if unit:
         creator = unit.getCreator()
         if creator is not None:
             creator = PlayerUnitInfo(unit.getCreatorDBID(), cfdUnitID, unit, **creator)
         freeSlots = unit.getFreeSlots()
         playersSlots = unit.getPlayerSlots()
         state = unit.getState()
         playersCount = len(playersSlots)
         commandSize = len(playersSlots) + len(freeSlots)
         isRosterSet = unit.isRosterSet(ignored=CREATOR_ROSTER_SLOT_INDEXES)
         description = passCensor(unit.getComment())
     self.cfdUnitID = cfdUnitID
     self.unitMgrID = unitMgrID
     self.creator = creator
     self.rating = cmdrRating
     self.peripheryID = peripheryID
     self.playersCount = playersCount
     self.commandSize = commandSize
     self.state = UnitState(state)
     self.isRosterSet = isRosterSet
     self.description = description
     return
开发者ID:webiumsk,项目名称:WoT,代码行数:30,代码来源:unit_seqs.py

示例2: __showSettings

 def __showSettings(self, functional):
     settings = functional.getSettings()
     if settings is None:
         return
     else:
         isCreator = functional.isCreator()
         permissions = functional.getPermissions()
         arenaTypeID = settings['arenaTypeID']
         arenaType = ArenaType.g_cache.get(arenaTypeID)
         if isCreator:
             comment = settings['comment']
         else:
             comment = passCensor(settings['comment'])
         self.as_setInfoS({'isCreator': isCreator,
          'creator': settings[PREBATTLE_SETTING_NAME.CREATOR],
          'title': formatters.getTrainingRoomTitle(arenaType),
          'arenaName': arenaType.name,
          'arenaTypeID': arenaTypeID,
          'arenaSubType': formatters.getArenaSubTypeString(arenaTypeID),
          'description': arenaType.description,
          'maxPlayersCount': arenaType.maxPlayersInTeam * 2,
          'roundLenString': formatters.getRoundLenString(settings['roundLength']),
          'comment': comment,
          'arenaVoipChannels': settings[PREBATTLE_SETTING_NAME.ARENA_VOIP_CHANNELS],
          'canChangeArenaVOIP': permissions.canChangeArenaVOIP()})
         return
开发者ID:19colt87,项目名称:WOTDecompiled,代码行数:26,代码来源:trainingroom.py

示例3: update

 def update(self, cmdrRating = 0, unit = None, **kwargs):
     self.rating = cmdrRating
     if unit:
         creatorDBID = unit.getCreatorDBID()
         if self.creator.dbID != creatorDBID:
             isChanged = True
             data = unit.getCreator()
             if data:
                 self.creator = PlayerUnitInfo(creatorDBID, self.cfdUnitID, unit, **data)
             else:
                 self.creator = None
         self.state = UnitState(unit.getState())
         freeSlots = unit.getFreeSlots()
         playersSlots = unit.getPlayerSlots()
         self.playersCount = len(playersSlots)
         self.commandSize = len(playersSlots) + len(freeSlots)
         self.isRosterSet = unit.isRosterSet(ignored=CREATOR_ROSTER_SLOT_INDEXES)
         self.description = passCensor(unit.getComment())
     else:
         self.creator = None
         self.playersCount = 0
         self.commandSize = 0
         self.state = UnitState(0)
         self.isRosterSet = False
         self.description = None
     return
开发者ID:webiumsk,项目名称:WoT,代码行数:26,代码来源:unit_seqs.py

示例4: onSettingUpdated

 def onSettingUpdated(self, functional, settingName, settingValue):
     if settingName == PREBATTLE_SETTING_NAME.DIVISION:
         if not functional.isCreator():
             self.as_setDivisionS(settingValue)
     elif settingName == PREBATTLE_SETTING_NAME.IS_OPENED:
         if not functional.isCreator():
             self.as_setOpenedS(settingValue)
     elif settingName == PREBATTLE_SETTING_NAME.COMMENT:
         if not functional.isCreator():
             self.as_setCommentS(passCensor(settingValue))
     elif settingName == PREBATTLE_SETTING_NAME.LIMITS:
         self.__setLimits(functional.getRosters(), functional.getSettings().getTeamLimits(1))
开发者ID:webiumsk,项目名称:WOT-0.9.12,代码行数:12,代码来源:companywindow.py

示例5: __showSettings

 def __showSettings(self, functional):
     settings = functional.getSettings()
     if settings is None:
         return
     isCreator = functional.isCreator()
     permissions = functional.getPermissions()
     arenaTypeID = settings["arenaTypeID"]
     arenaType = ArenaType.g_cache.get(arenaTypeID)
     if isCreator:
         comment = settings["comment"]
     else:
         comment = passCensor(settings["comment"])
     creatorFullName, creatorClan, creatorRegion, creatorIgrType = (None, None, None, 0)
     creator = self.__getCreatorFromRosters()
     if creator:
         creatorFullName = creator.getFullName()
         creatorClan = creator.clanAbbrev
         creatorRegion = g_lobbyContext.getRegionCode(creator.dbID)
         creatorIgrType = creator.igrType
     self.as_setInfoS(
         {
             "isCreator": isCreator,
             "creator": settings[PREBATTLE_SETTING_NAME.CREATOR],
             "creatorFullName": creatorFullName,
             "creatorClan": creatorClan,
             "creatorRegion": creatorRegion,
             "creatorIgrType": creatorIgrType,
             "title": formatters.getTrainingRoomTitle(arenaType),
             "arenaName": arenaType.name,
             "arenaTypeID": arenaTypeID,
             "arenaSubType": formatters.getArenaSubTypeString(arenaTypeID),
             "description": arenaType.description,
             "maxPlayersCount": arenaType.maxPlayersInTeam * 2,
             "roundLenString": formatters.getRoundLenString(settings["roundLength"]),
             "comment": comment,
             "arenaVoipChannels": settings[PREBATTLE_SETTING_NAME.ARENA_VOIP_CHANNELS],
             "canChangeArenaVOIP": permissions.canChangeArenaVOIP(),
             "isObserverModeEnabled": self.__isObserverModeEnabled(),
         }
     )
开发者ID:kblw,项目名称:wot_client,代码行数:40,代码来源:trainingroom.py

示例6: __showSettings

 def __showSettings(self, functional):
     settings = functional.getSettings()
     if settings is None:
         return
     else:
         isCreator = functional.isCreator()
         permissions = functional.getPermissions()
         arenaTypeID = settings['arenaTypeID']
         arenaType = ArenaType.g_cache.get(arenaTypeID)
         if isCreator:
             comment = settings['comment']
         else:
             comment = passCensor(settings['comment'])
         creatorFullName, creatorClan, creatorRegion, creatorIgrType = (None, None, None, 0)
         creator = self.__getCreatorFromRosters()
         if creator:
             creatorFullName = creator.getFullName()
             creatorClan = creator.clanAbbrev
             creatorRegion = g_lobbyContext.getRegionCode(creator.dbID)
             creatorIgrType = creator.igrType
         self.as_setInfoS({'isCreator': isCreator,
          'creator': settings[PREBATTLE_SETTING_NAME.CREATOR],
          'creatorFullName': creatorFullName,
          'creatorClan': creatorClan,
          'creatorRegion': creatorRegion,
          'creatorIgrType': creatorIgrType,
          'title': formatters.getTrainingRoomTitle(arenaType),
          'arenaName': arenaType.name,
          'arenaTypeID': arenaTypeID,
          'arenaSubType': formatters.getArenaSubTypeString(arenaTypeID),
          'description': arenaType.description,
          'maxPlayersCount': arenaType.maxPlayersInTeam * 2,
          'roundLenString': formatters.getRoundLenString(settings['roundLength']),
          'comment': comment,
          'arenaVoipChannels': settings[PREBATTLE_SETTING_NAME.ARENA_VOIP_CHANNELS],
          'canChangeArenaVOIP': permissions.canChangeArenaVOIP(),
          'isObserverModeEnabled': self.__isObserverModeEnabled()})
         return
开发者ID:webiumsk,项目名称:WOT-0.9.15.1,代码行数:38,代码来源:trainingroom.py

示例7: getClanMotto

 def getClanMotto(self):
     return passCensor(self.motto)
开发者ID:webiumsk,项目名称:WOT0.10.0,代码行数:2,代码来源:items.py

示例8: getClanAbbrev

 def getClanAbbrev(self):
     return passCensor(self.tag)
开发者ID:webiumsk,项目名称:WOT0.10.0,代码行数:2,代码来源:items.py

示例9: getClanName

 def getClanName(self):
     return passCensor(self.name)
开发者ID:webiumsk,项目名称:WOT0.10.0,代码行数:2,代码来源:items.py

示例10: getTag

 def getTag(self):
     return passCensor(self.tag)
开发者ID:webiumsk,项目名称:WOT0.10.0,代码行数:2,代码来源:items.py

示例11: _formatString

def _formatString(value):
    if not value or not len(value):
        return clans_fmts.DUMMY_UNAVAILABLE_DATA
    return passCensor(value)
开发者ID:webiumsk,项目名称:WOT0.10.0,代码行数:4,代码来源:items.py

示例12: getComment

 def getComment(self, invite):
     comment = passCensor(invite.comment)
     if not comment:
         return ''
     return makeHtmlString('html_templates:lobby/prebattle', 'inviteComment', {'comment': i18n.makeString(I18N_INVITES.INVITES_COMMENT, comment=html.escape(comment))})
开发者ID:webiumsk,项目名称:WOT-0.9.12-CT,代码行数:5,代码来源:invites.py

示例13: getClanName

 def getClanName(self):
     return passCensor(html.escape(self.itemData.clanName))
开发者ID:webiumsk,项目名称:WOT-0.9.14-CT,代码行数:2,代码来源:fort_seqs.py

示例14: getClanDescr

 def getClanDescr(self):
     return passCensor(html.escape(self.itemData.clanDescr))
开发者ID:webiumsk,项目名称:WOT-0.9.14-CT,代码行数:2,代码来源:fort_seqs.py

示例15: getClanAbbrev

 def getClanAbbrev(self):
     return passCensor(self._getClanInfoValue(1, ''))
开发者ID:webiumsk,项目名称:WOT-0.9.12,代码行数:2,代码来源:clan_account_profile.py


注:本文中的messenger.ext.passCensor函数示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。