def main(*args, **kwargs): """ mainly used for logging chat """ writer = kwargs.pop('writer') if kwargs.pop('log', True): # log message Message.create( name=kwargs.pop('nick', '***'), message=' '.join(kwargs.pop('line', ['blank'])) )
def message(self, text): # include gouda messages in db Message.create(name=self.nick, message=text) self._write('PRIVMSG %s :%s' % (self.channel, text))