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)
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)
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)
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)