summaryrefslogtreecommitdiffstats
path: root/modules/log.py
diff options
context:
space:
mode:
authorMatthias Schiffer <matthias@gamezock.de>2010-05-02 21:18:09 +0200
committerMatthias Schiffer <matthias@gamezock.de>2010-05-02 21:19:21 +0200
commitd537d4b69b4547814f2d01bc18ce2c472b978647 (patch)
tree444f07b95e0e2333f9d5d264a8917dfbd7230f6a /modules/log.py
parent0277a779c9dff841e04a08a5c39fe07faa92cfe8 (diff)
downloadcurunir-d537d4b69b4547814f2d01bc18ce2c472b978647.tar
curunir-d537d4b69b4547814f2d01bc18ce2c472b978647.zip
Added log module
Diffstat (limited to 'modules/log.py')
-rw-r--r--modules/log.py10
1 files changed, 10 insertions, 0 deletions
diff --git a/modules/log.py b/modules/log.py
new file mode 100644
index 0000000..3280d27
--- /dev/null
+++ b/modules/log.py
@@ -0,0 +1,10 @@
+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))