summaryrefslogtreecommitdiffstats
path: root/wmd
diff options
context:
space:
mode:
authorjason2012-08-09 00:21:59 -0600
committerjason2012-08-09 00:21:59 -0600
commit28f95d662ca2385661053ef6ea5ad1db665b0fc7 (patch)
treef4aada470502999be5fd0a3baf6fc6a57f4f71b0 /wmd
parent972a7cc25b8c9599a904655600123fe054436dae (diff)
downloadwarmachine-28f95d662ca2385661053ef6ea5ad1db665b0fc7.tar.gz
warmachine-28f95d662ca2385661053ef6ea5ad1db665b0fc7.zip
added a simple topic archiving module.
Diffstat (limited to 'wmd')
-rw-r--r--wmd/actions/passive/topic_archive.py13
1 files changed, 13 insertions, 0 deletions
diff --git a/wmd/actions/passive/topic_archive.py b/wmd/actions/passive/topic_archive.py
new file mode 100644
index 0000000..ba0bf3c
--- /dev/null
+++ b/wmd/actions/passive/topic_archive.py
@@ -0,0 +1,13 @@
1from wmd.actions import Action
2
3import settings
4
5class TopicArchive(Action):
6 def recv_msg(self, irc, obj_data):
7 if obj_data.command == "TOPIC":
8 (channel, topic) = obj_data.params.strip().split(" ", 1)
9 topic = topic[1:]
10
11 f = open("topic_archive.log", "a+")
12 f.write("%s %s %s" % (channel, obj_data.prefix, topic))
13 f.close() \ No newline at end of file