diff options
| author | jason | 2012-08-09 00:21:59 -0600 |
|---|---|---|
| committer | jason | 2012-08-09 00:21:59 -0600 |
| commit | 28f95d662ca2385661053ef6ea5ad1db665b0fc7 (patch) | |
| tree | f4aada470502999be5fd0a3baf6fc6a57f4f71b0 /wmd | |
| parent | 972a7cc25b8c9599a904655600123fe054436dae (diff) | |
| download | warmachine-28f95d662ca2385661053ef6ea5ad1db665b0fc7.tar.gz warmachine-28f95d662ca2385661053ef6ea5ad1db665b0fc7.zip | |
added a simple topic archiving module.
Diffstat (limited to 'wmd')
| -rw-r--r-- | wmd/actions/passive/topic_archive.py | 13 |
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 @@ | |||
| 1 | from wmd.actions import Action | ||
| 2 | |||
| 3 | import settings | ||
| 4 | |||
| 5 | class 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 | ||