This repository has been archived on 2025-03-02. You can view files and clone it, but cannot push or open issues or pull requests.
curunir/modules/log.py
Matthias Schiffer d537d4b69b Added log module
2010-05-02 21:19:21 +02:00

10 lines
408 B
Python

from base import ModuleBase
class Module(ModuleBase):
def __init__(self, manager):
ModuleBase.__init__(self, manager)
self.db = manager.get('mysql').db
def groupchat(self, room, message_from, message_body, reply):
cursor = self.db.cursor()
cursor.execute('INSERT INTO log (time, room, nick, text) VALUES (NOW(), %s, %s, %s)', (room, message_from, message_body))