def _send_response(self, message, original_sender=None, destination=None): """ Sends a response to the correct location, whether a channel or query""" if destination is not None and destination[ 0] == '#' and message is not None: pass elif original_sender is not None and message is not None: destination = original_sender else: destination = None if destination is not None: msg = Irc.privmsg(destination, message) self._send_message(msg) self.send_event("send_privmsg", str(message), self.config['nick'], destination)