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


Python CUT.list_user_nicks方法代码示例

本文整理汇总了Python中Core.chanusertracker.CUT.list_user_nicks方法的典型用法代码示例。如果您正苦于以下问题:Python CUT.list_user_nicks方法的具体用法?Python CUT.list_user_nicks怎么用?Python CUT.list_user_nicks使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在Core.chanusertracker.CUT的用法示例。


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

示例1: robocop

# 需要导入模块: from Core.chanusertracker import CUT [as 别名]
# 或者: from Core.chanusertracker.CUT import list_user_nicks [as 别名]
 def robocop(self, message, request_id, mode):
     request = Request.load(request_id, active=False)
     if request is None:
         return
     
     if mode == "cancel":
         reply = "Cancelled scan request %s" % (request.id,)
         message.privmsg(reply, self.scanchan())
         nicks = CUT.list_user_nicks(request.user.name)
         for nick in nicks:
             message.privmsg(reply, nick)
         return
     
     if mode == "block":
         reply = "Updated request %s dists to %s" % (request.id, request.dists,)
         message.privmsg(reply, self.scanchan())
         nicks = CUT.list_user_nicks(request.user.name)
         for nick in nicks:
             message.privmsg(reply, nick)
         return
     
     user = request.user
     planet = request.target
     dists_intel = planet.intel.dists if planet.intel else 0
     message.privmsg("[%s] %s requested a %s Scan of %s:%s:%s Dists(i:%s/r:%s) " % (request.id, user.name, request.type, planet.x,planet.y,planet.z, dists_intel, request.dists,) + request.link, self.scanchan())
开发者ID:JDD,项目名称:DLR,代码行数:27,代码来源:request.py

示例2: robocop

# 需要导入模块: from Core.chanusertracker import CUT [as 别名]
# 或者: from Core.chanusertracker.CUT import list_user_nicks [as 别名]
 def robocop(self, message, scantype, pa_id, x, y, z, names):
     nicks = []
     [nicks.extend(nick) for nick in [CUT.list_user_nicks(name) for name in names.split(",")]]
     
     reply = "%s on %s:%s:%s " % (PA.get(scantype,"name"),x,y,z,)
     reply+= Config.get("URL","viewscan") % (pa_id,)
     for nick in nicks:
         message.privmsg(reply, nick)
     
     reply = "%s on %s:%s:%s " % (PA.get(scantype,"name"),x,y,z,)
     reply+= "delivered to: "
     reply+= ", ".join(nicks)
     from Hooks.scans.request import request
     message.privmsg(reply, request().scanchan())
开发者ID:JDD,项目名称:DLR,代码行数:16,代码来源:scans.py

示例3: blocks

# 需要导入模块: from Core.chanusertracker import CUT [as 别名]
# 或者: from Core.chanusertracker.CUT import list_user_nicks [as 别名]
 def blocks(self, message, user, params):
     id = params.group(1)
     dists = int(params.group(2))
     request = Request.load(id)
     if request is None:
         message.reply("No open request number %s exists (idiot)."%(id,))
         return
     
     request.dists = max(request.dists, dists)
     session.commit()
     
     reply = "Updated request %s dists to %s" % (id, request.dists,)
     message.reply(reply)
     if message.get_chan() != self.scanchan():
         message.privmsg(reply, self.scanchan())
     
     nicks = CUT.list_user_nicks(request.user.name)
     if message.get_nick() not in nicks:
         for nick in nicks:
             message.privmsg(reply, nick)
开发者ID:JDD,项目名称:DLR,代码行数:22,代码来源:request.py

示例4: cancel

# 需要导入模块: from Core.chanusertracker import CUT [as 别名]
# 或者: from Core.chanusertracker.CUT import list_user_nicks [as 别名]
 def cancel(self, message, user, params):
     id = params.group(1)
     request = Request.load(id)
     if request is None:
         message.reply("No open request number %s exists (idiot)."%(id,))
         return
     if request.user is not user and not user.is_admin() and not self.is_chan(message, self.scanchan()):
         message.reply("Only %s may cancel request %s."%(request.user.name,id))
         return
     
     request.active = False
     session.commit()
     
     reply = "Cancelled scan request %s" % (id,)
     message.reply(reply)
     if message.get_chan() != self.scanchan():
         message.privmsg(reply, self.scanchan())
     
     nicks = CUT.list_user_nicks(request.user.name)
     if message.get_nick() not in nicks:
         for nick in nicks:
             message.privmsg(reply, nick)
开发者ID:JDD,项目名称:DLR,代码行数:24,代码来源:request.py

示例5: robocop

# 需要导入模块: from Core.chanusertracker import CUT [as 别名]
# 或者: from Core.chanusertracker.CUT import list_user_nicks [as 别名]
 def robocop(self, message, scantype, pa_id, x, y, z, names):
     reply = "%s on %s:%s:%s " % (PA.get(scantype,"name"),x,y,z,)
     reply+= Config.get("URL","viewscan") % (pa_id,)
     for name in names.split(","):
         for nick in CUT.list_user_nicks(name):
             message.privmsg(reply, nick)
开发者ID:Go3Media,项目名称:merlin,代码行数:8,代码来源:scans.py


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