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


Python CUT.join方法代码示例

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


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

示例1: names

# 需要导入模块: from Core.chanusertracker import CUT [as 别名]
# 或者: from Core.chanusertracker.CUT import join [as 别名]
def names(message):
    # List of users in a channel
    for nick in message.get_msg().split():
        if nick == "@"+Merlin.nick:
            CUT.opped(message.get_chan(), True)
        if nick[0] in ("@","+"): nick = nick[1:]
        CUT.join(message.get_chan(), nick)
        if Config.get("Misc","usercache") == "join":
            # Use whois to get the user's pnick
            message.write("WHOIS %s" % (nick,))
开发者ID:Go3Media,项目名称:merlin,代码行数:12,代码来源:chanusertracker.py

示例2: join

# 需要导入模块: from Core.chanusertracker import CUT [as 别名]
# 或者: from Core.chanusertracker.CUT import join [as 别名]
def join(message):
    # Someone is joining a channel
    if message.get_nick() == Merlin.nick:
        # Bot is joining the channel, so add a new object to the dict
        CUT.new_chan(message.get_chan())
    else:
        # Someone is joining a channel we're in
        CUT.join(message.get_chan(), message.get_nick())
        if Config.get("Misc","usercache") == "join":
            # Set the user's pnick
            CUT.get_user(message.get_nick(), pnickf=message.get_pnick)
开发者ID:Go3Media,项目名称:merlin,代码行数:13,代码来源:chanusertracker.py

示例3: join

# 需要导入模块: from Core.chanusertracker import CUT [as 别名]
# 或者: from Core.chanusertracker.CUT import join [as 别名]
def join(message):
    # Someone is joining a channel
    if message.get_nick() == Merlin.nick:
        # Bot is joining the channel, so add a new object to the dict
        CUT.new_chan(message.get_chan())
    else:
        # Someone is joining a channel we're in
        CUT.join(message.get_chan(), message.get_nick())
        if CUT.mode_is("rapid", "join"):
            # Set the user's pnick
            CUT.get_user(message.get_nick(), message.get_chan(), pnickf=message.get_pnick)
开发者ID:JDD,项目名称:DLR,代码行数:13,代码来源:chanusertracker.py

示例4: names

# 需要导入模块: from Core.chanusertracker import CUT [as 别名]
# 或者: from Core.chanusertracker.CUT import join [as 别名]
def names(message):
    # List of users in a channel
    for nick in message.get_msg().split():
        modes, nick = modesre.match(nick).groups()
        if nick == Merlin.nick and "@" in modes:
            CUT.opped(message.get_chan(), True)
        elif nick == Merlin.nick:
            CUT.opped(message.get_chan(), False)
        if CUT.mode_is("rapid") and CUT.Nicks.get(nick) is None:
            # Use whois to get the user's pnick
            message.write("WHOIS %s" % (nick,))
        CUT.join(message.get_chan(), nick)
开发者ID:Hardware-Hacks,项目名称:merlin,代码行数:14,代码来源:chanusertracker.py

示例5: names

# 需要导入模块: from Core.chanusertracker import CUT [as 别名]
# 或者: from Core.chanusertracker.CUT import join [as 别名]
def names(message):
    # List of users in a channel
    for nick in message.get_msg().split():
        if nick == "@"+Merlin.nick:
            CUT.opped(message.get_chan(), True)
        elif nick == "+"+Merlin.nick or nick == Merlin.nick:
            CUT.opped(message.get_chan(), False)
        if nick[0] in ("@","+"): nick = nick[1:]
        CUT.join(message.get_chan(), nick)
        if CUT.mode_is("rapid"):
            # Use whois to get the user's pnick
            message.write("WHOIS %s" % (nick,))
开发者ID:JDD,项目名称:DLR,代码行数:14,代码来源:chanusertracker.py

示例6: join

# 需要导入模块: from Core.chanusertracker import CUT [as 别名]
# 或者: from Core.chanusertracker.CUT import join [as 别名]
def join(message):
    # Someone is joining a channel
    try:
        chan = message.get_msg()
    except MsgParseError:
        chan = message.get_chan()
    
    if message.get_nick() == Merlin.nick:
        # Bot is joining the channel, so add a new object to the dict
        CUT.new_chan(chan)
    else:
        # Someone is joining a channel we're in
        CUT.join(chan, message.get_nick())
        if CUT.mode_is("rapid", "join"):
            # Set the user's pnick
            CUT.get_user(message.get_nick(), chan, pnickf=message.get_pnick)
开发者ID:Hardware-Hacks,项目名称:merlin,代码行数:18,代码来源:chanusertracker.py


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