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

11 lines
408 B
Python
Raw Normal View History

2010-05-02 21:18:09 +02:00
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))