• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    公众号

Python ext.passCensor函数代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

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



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


示例16: getClanName

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


示例17: __setSettings

 def __setSettings(self):
     settings = self.prbFunctional.getSettings()
     self.as_setOpenedS(settings[PREBATTLE_SETTING_NAME.IS_OPENED])
     self.as_setCommentS(passCensor(settings[PREBATTLE_SETTING_NAME.COMMENT]))
     self.as_setDivisionsListS(companies_dps.getDivisionsList(addAll=False), settings[PREBATTLE_SETTING_NAME.DIVISION])
开发者ID:webiumsk,项目名称:WOT-0.9.12,代码行数:5,代码来源:companywindow.py


示例18: getComment

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


示例19: getClanMotto

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


示例20: clanName

 def clanName(self):
     return passCensor(html.escape(self.clanInfo[0]))
开发者ID:webiumsk,项目名称:WOT0.10.0,代码行数:2,代码来源:clancache.py



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


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
Python channel_num_gen.getClientID4LazyChannel函数代码示例发布时间:2022-05-27
下一篇:
Python _xml_helpers.readNoEmptyStr函数代码示例发布时间:2022-05-27
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap