本文整理汇总了Python中Core.chanusertracker.CUT.part方法的典型用法代码示例。如果您正苦于以下问题:Python CUT.part方法的具体用法?Python CUT.part怎么用?Python CUT.part使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Core.chanusertracker.CUT
的用法示例。
在下文中一共展示了CUT.part方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: part
# 需要导入模块: from Core.chanusertracker import CUT [as 别名]
# 或者: from Core.chanusertracker.CUT import part [as 别名]
def part(message):
# Someone is leaving a channel
if message.get_nick() == Merlin.nick:
# Bot is leaving the channel
CUT.del_chan(message.get_chan())
else:
# Someone is leaving a channel we're in
CUT.part(message.get_chan(), message.get_nick())
示例2: kick
# 需要导入模块: from Core.chanusertracker import CUT [as 别名]
# 或者: from Core.chanusertracker.CUT import part [as 别名]
def kick(message):
# Someone is kicked
kname = message.line.split()[3]
if Merlin.nick == kname:
# Bot is kicked from the channel
CUT.del_chan(message.get_chan())
else:
# Someone is kicked from a channel we're in
CUT.part(message.get_chan(), kname)