

def process_message(self, connection, event):
    request = IRCRequest(event, self.config['magic_token'], connection.get_nickname())
    try:
        controller = IRCController(request, self.config['manifest'], self.config['model_mock'])
        result = controller.get_response()
    except Exception as exc:
        cls = exc.__class__.__name__
        connection.privmsg(request.sent_to, ('\x0304%s - %s: %s' % (request.program, cls, exc)))
        traceback.print_exc(file=sys.stdout)
    else:
        msg = ('%s: %s' % (request.username, msg['response']))
        if request.private_message:
            for m in msg.split('\n'):
                connection.privmsg(request.username, m)
        else:
            for m in msg.split('\n'):
                connection.privmsg(request.sent_to, m)

dataset/ETHPy150Open priestc/giotto/giotto/controllers/irc_.py IrcBot.process_message/VarMisuse@132/177 `result`->`msg`