summaryrefslogtreecommitdiffstats
path: root/wmd
diff options
context:
space:
mode:
authorjason2012-08-08 23:47:39 -0600
committerjason2012-08-08 23:47:39 -0600
commit24fb94e2d803f13058195c6629311d00bbafd00e (patch)
tree103c6f22a37ffe801e0cc51e9ab8bd30ddc91ec0 /wmd
parent6cd2f3389f82a8f3b4b2c928d40b692332e850ac (diff)
downloadwarmachine-24fb94e2d803f13058195c6629311d00bbafd00e.tar.gz
warmachine-24fb94e2d803f13058195c6629311d00bbafd00e.zip
added a module to rejoin on kick.
Diffstat (limited to 'wmd')
-rw-r--r--wmd/actions/passive/rejoin_on_kick.py20
1 files changed, 20 insertions, 0 deletions
diff --git a/wmd/actions/passive/rejoin_on_kick.py b/wmd/actions/passive/rejoin_on_kick.py
new file mode 100644
index 0000000..21cbc91
--- /dev/null
+++ b/wmd/actions/passive/rejoin_on_kick.py
@@ -0,0 +1,20 @@
1import time
2from wmd.actions import Action
3
4import settings
5
6class RejoinOnKick(Action):
7 def recv_msg(self, irc, obj_data):
8 if obj_data.command == "KICK":
9 (channel, nickname, message) = obj_data.params.strip().split(" ")
10 if nickname == settings.NICKNAME:
11 time.sleep(10) # TODO: Make this a setting
12 irc.join(channel)
13 self.log("Rejoined %s" % channel)
14# if obj_data.params[0] == ":":
15# server = obj_data.params[1:]
16# else:
17# server = obj_data.params
18# msg = "PONG :%s" % server
19# self.log(msg)
20# irc.rawsend(msg) \ No newline at end of file