Merge pull request #3449 from Mloc/nudge2

Another tiny change to IRC nudge.
This commit is contained in:
Zuhayr
2013-08-06 08:27:12 -07:00
+8 -4
View File
@@ -1,15 +1,19 @@
#!/usr/bin/env python2
# Two arguments, channel and message.
# EG: "ircbot_message.py #adminchannel ADMINHELP, people are killing me!"
# Four arguments, password host channel and message.
# EG: "ircbot_message.py hunter2 example.com #adminchannel ADMINHELP, people are killing me!"
import sys,cPickle,socket
import sys,cPickle,socket,HTMLParser
def pack():
ht = HTMLParser.HTMLParser()
passwd = sys.argv[1]
ip = sys.argv[3]
try:
data = sys.argv[4:] #The rest of the arguments is data
data = []
for in_data in sys.argv[4:]: #The rest of the arguments is data
data += {ht.unescape(in_data)}
except:
data = "NO DATA SPECIFIED"
dictionary = {"ip":ip,"data":[passwd] + data}