(self, user, channel, message)
handle a new msg on irc
handle a new msg on irc
handle a new msg on irc
def privmsg(self, user, channel, message):
        """
        handle a new msg on irc
        """
        log.msg('privmsg - user: {0!r}, channel: {1!r}, msg: {2!r}'.format(user, channel, message),
                logLevel=logging.DEBUG)

        nick, _, host = user.partition('!')
        message = message.strip()

        #command, sep, rest = message.lstrip('!').partition(' ')

        event_data = {'type': 'priv_msg',
                      'channel': channel,
                      'meta': {
                          'user': user,
                          'msg': message}}

        self._botte_event(event_data)
def privmsg ( self , user , channel , message ) : log . msg ( 'privmsg - user: {0!r}, channel: {1!r}, msg: {2!r}' . format ( user , channel , message ) , logLevel = logging . DEBUG ) nick , _ , host = user . partition ( '!' ) message = message . strip ( ) #command, sep, rest = message.lstrip('!').partition(' ') event_data = { 'type' : 'priv_msg' , 'channel' : channel , 'meta' : { 'user' : user , 'msg' : message } } self . _botte_event ( event_data )