Ejemplo n.º 1
0
    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)
Ejemplo n.º 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)
Ejemplo n.º 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)
Ejemplo n.º 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)