summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--actions/ActionMap.py16
-rw-r--r--actions/__init__.py0
-rw-r--r--actions/coin.py17
-rw-r--r--actions/deop.py9
-rw-r--r--actions/devoice.py9
-rw-r--r--actions/join.py8
-rw-r--r--actions/kick.py10
-rw-r--r--actions/op.py9
-rw-r--r--actions/part.py8
-rw-r--r--actions/pythondoc.py22
-rw-r--r--actions/quit.py7
-rw-r--r--actions/say.py15
-rw-r--r--actions/settopic.py15
-rw-r--r--actions/voice.py9
-rw-r--r--passiveactions/PassiveActionMap.py8
-rw-r--r--passiveactions/__init__.py0
-rw-r--r--passiveactions/autoop.py17
-rw-r--r--passiveactions/logtoconsole.py11
-rw-r--r--passiveactions/pong.py16
-rw-r--r--passiveactions/rootcheck.py19
-rw-r--r--passiveactions/spy.py22
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 @@
1import say, op, deop, quit, part, voice, devoice
2import join, kick, pythondoc, settopic, coin
3
4actions = {}
5actions['say'] = say.say()
6actions['op'] = op.op()
7actions['deop'] = deop.deop()
8actions['quit'] = quit.quit()
9actions['part'] = part.part()
10actions['voice'] = voice.voice()
11actions['devoice'] = devoice.devoice()
12actions['kick'] = kick.kick()
13actions['join'] = join.join()
14actions['pythondoc'] = pythondoc.pythondoc()
15actions['settopic'] = settopic.settopic()
16actions['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 @@
1import random
2
3class 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 @@
1class 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 @@
1class 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 @@
1class 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 @@
1class 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 @@
1class 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 @@
1class 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 @@
1import os
2
3class 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 @@
1class 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 @@
1class 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 @@
1class 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 @@
1class 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 @@
1import pong, spy, rootcheck, autoop, logtoconsole
2
3passiveactions = {}
4passiveactions['pong'] = pong.pong()
5passiveactions['spy'] = spy.spy()
6passiveactions['rootcheck'] = rootcheck.rootcheck()
7passiveactions['autoop'] = autoop.autoop()
8passiveactions['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 @@
1class 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 @@
1class 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 @@
1class 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 @@
1class 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 @@
1spyusers = []
2spyusers.append('stevetest')
3
4spymaster = ""
5
6class 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