diff options
| author | jason | 2012-07-21 09:58:19 -0600 |
|---|---|---|
| committer | jason | 2012-07-21 09:58:19 -0600 |
| commit | 77a4c5bf530a45a7be5bbeb435916f8997d83ecc (patch) | |
| tree | 079bbc688684fa71dd7684279317d720e0d087b2 | |
| parent | 5dcb09d279791bbbaa0df685076411fa9326b7af (diff) | |
| download | warmachine-77a4c5bf530a45a7be5bbeb435916f8997d83ecc.tar.gz warmachine-77a4c5bf530a45a7be5bbeb435916f8997d83ecc.zip | |
Removed all of the old actions
| -rw-r--r-- | actions/ActionMap.py | 16 | ||||
| -rw-r--r-- | actions/__init__.py | 0 | ||||
| -rw-r--r-- | actions/coin.py | 17 | ||||
| -rw-r--r-- | actions/deop.py | 9 | ||||
| -rw-r--r-- | actions/devoice.py | 9 | ||||
| -rw-r--r-- | actions/join.py | 8 | ||||
| -rw-r--r-- | actions/kick.py | 10 | ||||
| -rw-r--r-- | actions/op.py | 9 | ||||
| -rw-r--r-- | actions/part.py | 8 | ||||
| -rw-r--r-- | actions/pythondoc.py | 22 | ||||
| -rw-r--r-- | actions/quit.py | 7 | ||||
| -rw-r--r-- | actions/say.py | 15 | ||||
| -rw-r--r-- | actions/settopic.py | 15 | ||||
| -rw-r--r-- | actions/voice.py | 9 | ||||
| -rw-r--r-- | passiveactions/PassiveActionMap.py | 8 | ||||
| -rw-r--r-- | passiveactions/__init__.py | 0 | ||||
| -rw-r--r-- | passiveactions/autoop.py | 17 | ||||
| -rw-r--r-- | passiveactions/logtoconsole.py | 11 | ||||
| -rw-r--r-- | passiveactions/pong.py | 16 | ||||
| -rw-r--r-- | passiveactions/rootcheck.py | 19 | ||||
| -rw-r--r-- | passiveactions/spy.py | 22 |
21 files changed, 0 insertions, 247 deletions
diff --git a/actions/ActionMap.py b/actions/ActionMap.py deleted file mode 100644 index 4c8431f..0000000 --- a/actions/ActionMap.py +++ /dev/null | |||
| @@ -1,16 +0,0 @@ | |||
| 1 | import say, op, deop, quit, part, voice, devoice | ||
| 2 | import join, kick, pythondoc, settopic, coin | ||
| 3 | |||
| 4 | actions = {} | ||
| 5 | actions['say'] = say.say() | ||
| 6 | actions['op'] = op.op() | ||
| 7 | actions['deop'] = deop.deop() | ||
| 8 | actions['quit'] = quit.quit() | ||
| 9 | actions['part'] = part.part() | ||
| 10 | actions['voice'] = voice.voice() | ||
| 11 | actions['devoice'] = devoice.devoice() | ||
| 12 | actions['kick'] = kick.kick() | ||
| 13 | actions['join'] = join.join() | ||
| 14 | actions['pythondoc'] = pythondoc.pythondoc() | ||
| 15 | actions['settopic'] = settopic.settopic() | ||
| 16 | actions['coin'] = coin.coin() | ||
diff --git a/actions/__init__.py b/actions/__init__.py deleted file mode 100644 index e69de29..0000000 --- a/actions/__init__.py +++ /dev/null | |||
diff --git a/actions/coin.py b/actions/coin.py deleted file mode 100644 index 36392af..0000000 --- a/actions/coin.py +++ /dev/null | |||
| @@ -1,17 +0,0 @@ | |||
| 1 | import random | ||
| 2 | |||
| 3 | class coin: | ||
| 4 | |||
| 5 | def __init__(self): | ||
| 6 | self = [] | ||
| 7 | |||
| 8 | def getAction(self, data): | ||
| 9 | ret = int(random.random()*10) | ||
| 10 | print ret | ||
| 11 | thecoin = 'The coin lands on it\'s SIDE!!!' | ||
| 12 | if ret >= 6: | ||
| 13 | thecoin = "The coin lands on HEAD." | ||
| 14 | else: | ||
| 15 | thecoin = "The coin lands on TAILS." | ||
| 16 | channel = data.params[0:data.params.index(' ')] | ||
| 17 | return 'PRIVMSG ' + channel + ' :' + thecoin | ||
diff --git a/actions/deop.py b/actions/deop.py deleted file mode 100644 index 38d54ca..0000000 --- a/actions/deop.py +++ /dev/null | |||
| @@ -1,9 +0,0 @@ | |||
| 1 | class deop: | ||
| 2 | |||
| 3 | def __init__(self): | ||
| 4 | self = [] | ||
| 5 | |||
| 6 | def getAction(self, data): | ||
| 7 | channel = data.params[0:data.params.index(' ')] | ||
| 8 | user = data.params.split(' ')[3] | ||
| 9 | return 'MODE ' + channel + ' -o ' + user | ||
diff --git a/actions/devoice.py b/actions/devoice.py deleted file mode 100644 index e820466..0000000 --- a/actions/devoice.py +++ /dev/null | |||
| @@ -1,9 +0,0 @@ | |||
| 1 | class devoice: | ||
| 2 | |||
| 3 | def __init__(self): | ||
| 4 | self = [] | ||
| 5 | |||
| 6 | def getAction(self, data): | ||
| 7 | channel = data.params[0:data.params.index(' ')] | ||
| 8 | user = data.params.split(' ')[3] | ||
| 9 | return 'MODE ' + channel + ' -v ' + user | ||
diff --git a/actions/join.py b/actions/join.py deleted file mode 100644 index 44246be..0000000 --- a/actions/join.py +++ /dev/null | |||
| @@ -1,8 +0,0 @@ | |||
| 1 | class join: | ||
| 2 | |||
| 3 | def __init__(self): | ||
| 4 | self = [] | ||
| 5 | |||
| 6 | def getAction(self, data): | ||
| 7 | channel = data.params.split(' ')[3] | ||
| 8 | return 'JOIN ' + channel | ||
diff --git a/actions/kick.py b/actions/kick.py deleted file mode 100644 index 0725ef5..0000000 --- a/actions/kick.py +++ /dev/null | |||
| @@ -1,10 +0,0 @@ | |||
| 1 | class kick: | ||
| 2 | |||
| 3 | def __init__(self): | ||
| 4 | self = [] | ||
| 5 | |||
| 6 | def getAction(self, data): | ||
| 7 | channel = data.params[0:data.params.index(' ')] | ||
| 8 | user = data.params.split(' ')[3] | ||
| 9 | return 'KICK ' + channel + ' ' + user | ||
| 10 | |||
diff --git a/actions/op.py b/actions/op.py deleted file mode 100644 index 9c9df6c..0000000 --- a/actions/op.py +++ /dev/null | |||
| @@ -1,9 +0,0 @@ | |||
| 1 | class op: | ||
| 2 | |||
| 3 | def __init__(self): | ||
| 4 | self = [] | ||
| 5 | |||
| 6 | def getAction(self, data): | ||
| 7 | channel = data.params[0:data.params.index(' ')] | ||
| 8 | user = data.params.split(' ')[3] | ||
| 9 | return 'MODE ' + channel + ' +o ' + user | ||
diff --git a/actions/part.py b/actions/part.py deleted file mode 100644 index 508a44a..0000000 --- a/actions/part.py +++ /dev/null | |||
| @@ -1,8 +0,0 @@ | |||
| 1 | class part: | ||
| 2 | |||
| 3 | def __init__(self): | ||
| 4 | self = [] | ||
| 5 | |||
| 6 | def getAction(self, data): | ||
| 7 | channel = data.params.split(' ')[3] | ||
| 8 | return 'PART ' + channel | ||
diff --git a/actions/pythondoc.py b/actions/pythondoc.py deleted file mode 100644 index e420723..0000000 --- a/actions/pythondoc.py +++ /dev/null | |||
| @@ -1,22 +0,0 @@ | |||
| 1 | import os | ||
| 2 | |||
| 3 | class pythondoc: | ||
| 4 | |||
| 5 | def __init__(self): | ||
| 6 | self = [] | ||
| 7 | |||
| 8 | def getAction(self, data): | ||
| 9 | try: | ||
| 10 | input = data.split(' ') | ||
| 11 | module = input[5].replace(' ', '') | ||
| 12 | try: | ||
| 13 | module2 = input[6][0:-2] | ||
| 14 | execstring = "python -c \"from " + module + " import " + module2 + "\nprint " + module2 + ".__doc__\n\" > /tmp/wmpycmd" | ||
| 15 | except: | ||
| 16 | module = input[5][0:-2] | ||
| 17 | execstring = "python -c \"import " + module + "\nprint " + module + ".__doc__\n\" > /tmp/wmpycmd" | ||
| 18 | os.system(execstring) | ||
| 19 | doc = file('/tmp/wmpycmd').read().replace("\n", " ") | ||
| 20 | except: | ||
| 21 | doc = "I don't know nuthn about that." | ||
| 22 | return 'PRIVMSG ' + input[2] + ' :' + doc | ||
diff --git a/actions/quit.py b/actions/quit.py deleted file mode 100644 index c945f5d..0000000 --- a/actions/quit.py +++ /dev/null | |||
| @@ -1,7 +0,0 @@ | |||
| 1 | class quit: | ||
| 2 | |||
| 3 | def __init__(self): | ||
| 4 | self = [] | ||
| 5 | |||
| 6 | def getAction(self, data): | ||
| 7 | return 'QUIT\r\n' | ||
diff --git a/actions/say.py b/actions/say.py deleted file mode 100644 index 1d2a916..0000000 --- a/actions/say.py +++ /dev/null | |||
| @@ -1,15 +0,0 @@ | |||
| 1 | class say: | ||
| 2 | |||
| 3 | def __init__(self): | ||
| 4 | self = [] | ||
| 5 | |||
| 6 | def getAction(self, data): | ||
| 7 | channel = data.params.split(' ')[3] | ||
| 8 | words = data.params.split(' ')[4:] | ||
| 9 | |||
| 10 | |||
| 11 | say = "" | ||
| 12 | for word in words: | ||
| 13 | say += word + " " | ||
| 14 | |||
| 15 | return 'PRIVMSG ' + channel + ' :' + say | ||
diff --git a/actions/settopic.py b/actions/settopic.py deleted file mode 100644 index 91ecc6c..0000000 --- a/actions/settopic.py +++ /dev/null | |||
| @@ -1,15 +0,0 @@ | |||
| 1 | class settopic: | ||
| 2 | |||
| 3 | def __init__(self): | ||
| 4 | self = [] | ||
| 5 | |||
| 6 | def getAction(self, data): | ||
| 7 | channel = data.params.split(' ')[3] | ||
| 8 | words = data.params.split(' ')[4:] | ||
| 9 | |||
| 10 | |||
| 11 | say = "" | ||
| 12 | for word in words: | ||
| 13 | say += word + " " | ||
| 14 | |||
| 15 | return 'TOPIC ' + channel + ' :' + say | ||
diff --git a/actions/voice.py b/actions/voice.py deleted file mode 100644 index ea72d4f..0000000 --- a/actions/voice.py +++ /dev/null | |||
| @@ -1,9 +0,0 @@ | |||
| 1 | class voice: | ||
| 2 | |||
| 3 | def __init__(self): | ||
| 4 | self = [] | ||
| 5 | |||
| 6 | def getAction(self, data): | ||
| 7 | channel = data.params[0:data.params.index(' ')] | ||
| 8 | user = data.params.split(' ')[3] | ||
| 9 | return 'MODE ' + channel + ' +v ' + user | ||
diff --git a/passiveactions/PassiveActionMap.py b/passiveactions/PassiveActionMap.py deleted file mode 100644 index 087754c..0000000 --- a/passiveactions/PassiveActionMap.py +++ /dev/null | |||
| @@ -1,8 +0,0 @@ | |||
| 1 | import pong, spy, rootcheck, autoop, logtoconsole | ||
| 2 | |||
| 3 | passiveactions = {} | ||
| 4 | passiveactions['pong'] = pong.pong() | ||
| 5 | passiveactions['spy'] = spy.spy() | ||
| 6 | passiveactions['rootcheck'] = rootcheck.rootcheck() | ||
| 7 | passiveactions['autoop'] = autoop.autoop() | ||
| 8 | passiveactions['logtoconsole'] = logtoconsole.logtoconsole() | ||
diff --git a/passiveactions/__init__.py b/passiveactions/__init__.py deleted file mode 100644 index e69de29..0000000 --- a/passiveactions/__init__.py +++ /dev/null | |||
diff --git a/passiveactions/autoop.py b/passiveactions/autoop.py deleted file mode 100644 index 7492c28..0000000 --- a/passiveactions/autoop.py +++ /dev/null | |||
| @@ -1,17 +0,0 @@ | |||
| 1 | class autoop: | ||
| 2 | |||
| 3 | def __init__(self): | ||
| 4 | self = [] | ||
| 5 | |||
| 6 | def getAction(self, data, users): | ||
| 7 | try: | ||
| 8 | if data.command == 'JOIN': | ||
| 9 | user = data.getUsername() | ||
| 10 | if user in users: | ||
| 11 | print "autoop" | ||
| 12 | |||
| 13 | if data.params[0] == ':': | ||
| 14 | data.params = data.params[1:] | ||
| 15 | return 'MODE ' + data.params + ' +o ' + user | ||
| 16 | except Exception,e: | ||
| 17 | return False | ||
diff --git a/passiveactions/logtoconsole.py b/passiveactions/logtoconsole.py deleted file mode 100644 index d3a0bc0..0000000 --- a/passiveactions/logtoconsole.py +++ /dev/null | |||
| @@ -1,11 +0,0 @@ | |||
| 1 | class logtoconsole: | ||
| 2 | |||
| 3 | def __init__(self): | ||
| 4 | self = [] | ||
| 5 | |||
| 6 | def getAction(self, data, users): | ||
| 7 | try: | ||
| 8 | #print data | ||
| 9 | return False | ||
| 10 | except: | ||
| 11 | return False | ||
diff --git a/passiveactions/pong.py b/passiveactions/pong.py deleted file mode 100644 index 3e6def6..0000000 --- a/passiveactions/pong.py +++ /dev/null | |||
| @@ -1,16 +0,0 @@ | |||
| 1 | class pong: | ||
| 2 | |||
| 3 | def __init__(self): | ||
| 4 | self = [] | ||
| 5 | |||
| 6 | def getAction(self, data, users): | ||
| 7 | try: | ||
| 8 | if data.command == 'PING': | ||
| 9 | if data.params[0] == ':': | ||
| 10 | server = data.params[1:] | ||
| 11 | else: | ||
| 12 | server = data.params | ||
| 13 | print 'Ponged ' + server | ||
| 14 | return 'PONG ' + server | ||
| 15 | except: | ||
| 16 | return False | ||
diff --git a/passiveactions/rootcheck.py b/passiveactions/rootcheck.py deleted file mode 100644 index 2f20fb2..0000000 --- a/passiveactions/rootcheck.py +++ /dev/null | |||
| @@ -1,19 +0,0 @@ | |||
| 1 | class rootcheck: | ||
| 2 | |||
| 3 | def __init__(self): | ||
| 4 | self = [] | ||
| 5 | |||
| 6 | def getAction(self, data, users): | ||
| 7 | try: | ||
| 8 | user = data.getUsername() | ||
| 9 | if 'JOIN' in data.command: | ||
| 10 | if 'root' in data.prefix: | ||
| 11 | if data.params[0] == ':': | ||
| 12 | data.params = data.params[1:] | ||
| 13 | |||
| 14 | cmd = "PRIVMSG " + data.params + " :" + user +": Root?!?!?!!??!" | ||
| 15 | cmd += "\r\nKICK " + data.params + " " + user + " :Root + irc = kick" | ||
| 16 | return cmd | ||
| 17 | except: | ||
| 18 | return False | ||
| 19 | |||
diff --git a/passiveactions/spy.py b/passiveactions/spy.py deleted file mode 100644 index 56956ad..0000000 --- a/passiveactions/spy.py +++ /dev/null | |||
| @@ -1,22 +0,0 @@ | |||
| 1 | spyusers = [] | ||
| 2 | spyusers.append('stevetest') | ||
| 3 | |||
| 4 | spymaster = "" | ||
| 5 | |||
| 6 | class spy: | ||
| 7 | |||
| 8 | def __init__(self): | ||
| 9 | self = [] | ||
| 10 | |||
| 11 | def getAction(self, data, users): | ||
| 12 | try: | ||
| 13 | user = data.getUsername() | ||
| 14 | if user in spyusers: | ||
| 15 | if user in data.params: | ||
| 16 | words = "" | ||
| 17 | for word in data.prefix.split(' ')[1:]: | ||
| 18 | words += ' ' + word | ||
| 19 | return 'PRIVMSG ' + spymaster + ' :' + user + ' in ' + data.prefix.split(' ')[0] + ' said "' + words[2:] + '"' | ||
| 20 | except: | ||
| 21 | return False | ||
| 22 | |||