def outgoing (self, msg):
        try:
            channel = msg.irc_channel
        except __HOLE__:
            channel = self.channels[0]
        if channel:
            target = channel
        else:
            target = msg.connection.identity
        response = "%s: %s" % (msg.connection.identity, msg.text)
        self.info("sending to %s: %s", target, response)
        self.server.privmsg(target, response)
dataset/ETHPy150Open rapidsms/rapidsms-core-dev/lib/rapidsms/backends/irc.py/Backend.outgoing