示例#1
0
文件: ctcp.py 项目: bethebunny/mircy
    def nctcp_in(self, event):
        """Check message for NCTCP (incoming) and dispatch if necessary."""
        ctcp = CTCPMessage.parse(event.line)
        if not ctcp:
            return

        command = ctcp.command
        self.call_event("commands_ctcp", command, ctcp, event.line)
示例#2
0
    def nctcp_in(self, _, line):
        """Check message for NCTCP (incoming) and dispatch if necessary."""
        ctcp = CTCPMessage.parse(line)
        if not ctcp:
            return

        command = ctcp.command
        self.call_event("commands_ctcp", command, ctcp, line)
示例#3
0
    def nctcp(self, target, command, param=None):
        """Reply to a CTCP."""
        ctcp = CTCPMessage("NOTICE", command.upper(), target, param)
        line = ctcp.line

        self.send(line.command, line.params)
示例#4
0
    def ctcp(self, target, command, param=None):
        """CTCP a target a given command."""
        ctcp = CTCPMessage("PRIVMSG", command.upper(), target, param)
        line = ctcp.line

        self.send(line.command, line.params)