mirror of
https://github.com/VOREStation/VOREStation.git
synced 2025-12-16 04:42:53 +00:00
Another tiny change to IRC nudge.
HTML entities are now unescaped so that they show up correctly on IRC. Signed-off-by: Mloc-Argent <colmohici@gmail.com>
This commit is contained in:
@@ -1,15 +1,19 @@
|
|||||||
#!/usr/bin/env python2
|
#!/usr/bin/env python2
|
||||||
|
|
||||||
# Two arguments, channel and message.
|
# Four arguments, password host channel and message.
|
||||||
# EG: "ircbot_message.py #adminchannel ADMINHELP, people are killing me!"
|
# EG: "ircbot_message.py hunter2 example.com #adminchannel ADMINHELP, people are killing me!"
|
||||||
|
|
||||||
import sys,cPickle,socket
|
import sys,cPickle,socket,HTMLParser
|
||||||
|
|
||||||
def pack():
|
def pack():
|
||||||
|
ht = HTMLParser.HTMLParser()
|
||||||
|
|
||||||
passwd = sys.argv[1]
|
passwd = sys.argv[1]
|
||||||
ip = sys.argv[3]
|
ip = sys.argv[3]
|
||||||
try:
|
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:
|
except:
|
||||||
data = "NO DATA SPECIFIED"
|
data = "NO DATA SPECIFIED"
|
||||||
dictionary = {"ip":ip,"data":[passwd] + data}
|
dictionary = {"ip":ip,"data":[passwd] + data}
|
||||||
|
|||||||
Reference in New Issue
Block a user