def send_message(self, target, message, to_service=False): """ Sends a message to the specified target. If it is a service, it uses SQUERY instead. """ message = ctcp.low_level_quote(message) if to_service: self.conn.execute("SQUERY", target, message) else: self.conn.execute("PRIVMSG", target, trailing=message)
def send_notice(self, target, message): """ Sends a NOTICE to the specified target. """ message = ctcp.low_level_quote(message) self.conn.execute("NOTICE", target, trailing=message)