本文整理汇总了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())
示例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())
示例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)
示例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)
示例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)