diff --git a/code/modules/ext_scripts/irc.dm b/code/modules/ext_scripts/irc.dm index e76c2055b7..d1c3eb94ff 100644 --- a/code/modules/ext_scripts/irc.dm +++ b/code/modules/ext_scripts/irc.dm @@ -1,40 +1,20 @@ -/proc/send2irc(var/channel, var/msg) - return // VOREStation Edit - Can't exploit shell if we never call shell! - if (config.use_irc_bot) - if (config.use_node_bot) - shell("node bridge.js -h \"[config.irc_bot_host]\" -p \"[config.irc_bot_port]\" -c \"[channel]\" -m \"[escape_shell_arg(msg)]\"") - else - if (config.irc_bot_host) - if(config.irc_bot_export) - spawn(-1) // spawn here prevents hanging in the case that the bot isn't reachable - world.Export("http://[config.irc_bot_host]:45678?[list2params(list(pwd=config.comms_password, chan=channel, mesg=msg))]") - else - if(config.use_lib_nudge) - var/nudge_lib - if(world.system_type == MS_WINDOWS) - nudge_lib = "lib\\nudge.dll" - else - nudge_lib = "lib/nudge.so" - - spawn(0) - call(nudge_lib, "nudge")("[config.comms_password]","[config.irc_bot_host]","[channel]","[escape_shell_arg(msg)]") - else - spawn(0) - ext_python("ircbot_message.py", "[config.comms_password] [config.irc_bot_host] [channel] [escape_shell_arg(msg)]") +/proc/send2irc(var/msg, var/admin = 0) + if(config.use_irc_bot) + reject_bad_text(msg) + if(admin) + msg = "ADMIN - [msg]" + // 3rd param is unused in the bot, would spend time to fix this but I'm lazy. - Jon + ext_python("ircbot_message.py", "[config.comms_password] [config.irc_bot_host] null [msg]") return /proc/send2mainirc(var/msg) - if(config.main_irc) - send2irc(config.main_irc, msg) + send2irc(msg) return /proc/send2adminirc(var/msg) - if(config.admin_irc) - send2irc(config.admin_irc, msg) + send2irc(msg, 1) return - /hook/startup/proc/ircNotify() - send2mainirc("Server starting up on byond://[config.serverurl ? config.serverurl : (config.server ? config.server : "[world.address]:[world.port]")]") + send2mainirc("Server starting up on [config.server? "byond://[config.server]" : "byond://[world.address]:[world.port]"]") return 1 - diff --git a/code/modules/ext_scripts/python.dm b/code/modules/ext_scripts/python.dm index eb6e61aea2..bdb25d6900 100644 --- a/code/modules/ext_scripts/python.dm +++ b/code/modules/ext_scripts/python.dm @@ -17,12 +17,11 @@ return arg /proc/ext_python(var/script, var/args, var/scriptsprefix = 1) - return // VOREStation Edit - Can't exploit shell if we never call shell! - if(scriptsprefix) - script = "scripts/" + script + if(scriptsprefix) script = "scripts/" + script if(world.system_type == MS_WINDOWS) script = replacetext(script, "/", "\\") var/command = config.python_path + " " + script + " " + args - return shell(command) \ No newline at end of file + shell("[command]") + return diff --git a/code/modules/reagents/reagent_containers/syringes.dm b/code/modules/reagents/reagent_containers/syringes.dm index 68cc9d6921..4f3e92f955 100644 --- a/code/modules/reagents/reagent_containers/syringes.dm +++ b/code/modules/reagents/reagent_containers/syringes.dm @@ -203,13 +203,13 @@ var/contained = reagentlist() while(reagents.total_volume) if(ismob(target)) - trans += reagents.trans_to_mob(target, amount_per_transfer_from_this, CHEM_BLOOD) + trans += reagents.trans_to_mob(target, amount_per_transfer_from_this, CHEM_BLOOD) else trans += reagents.trans_to_obj(target, amount_per_transfer_from_this) update_icon() if(!reagents.total_volume || !do_after(user,cycle_time,target)) break - + if (reagents.total_volume <= 0 && mode == SYRINGE_INJECT) mode = SYRINGE_DRAW update_icon() @@ -221,7 +221,7 @@ else to_chat(user, "The syringe is empty.") - dirty(target,affected) //VOREStation Add +// dirty(target,affected) //VOREStation Add // ARFS REMOVED *dab* return /* VOREStation Edit - See syringes_vr.dm diff --git a/code/modules/reagents/reagent_containers/syringes_vr.dm b/code/modules/reagents/reagent_containers/syringes_vr.dm index b3c9688919..b08a17718f 100644 --- a/code/modules/reagents/reagent_containers/syringes_vr.dm +++ b/code/modules/reagents/reagent_containers/syringes_vr.dm @@ -23,6 +23,9 @@ processing_objects -= src return 1 +// ARF EDIT - Removes the infection after a used syringe. + +/* /obj/item/weapon/reagent_containers/syringe/proc/dirty(var/mob/living/carbon/human/target, var/obj/item/organ/external/eo) if(!ishuman(loc)) return //Avoid borg syringe problems. @@ -64,7 +67,10 @@ var/obj/item/organ/external/found_limb = limb_ref.resolve() if(istype(found_limb)) eo.germ_level += INFECTION_LEVEL_ONE+30 - +*/ + +// ARF EDIT END + //Allow for capped syringe mode /obj/item/weapon/reagent_containers/syringe/attack_self(mob/user as mob) switch(mode) @@ -79,10 +85,10 @@ return update_icon() -//Allow for capped syringes +//Allow for capped syringes /obj/item/weapon/reagent_containers/syringe/update_icon() cut_overlays(src) - + var/matrix/tf = matrix() if(isstorage(loc)) tf.Turn(-90) //Vertical for storing compact-ly @@ -112,7 +118,7 @@ if (SYRINGE_INJECT) injoverlay = "inject" new_overlays += injoverlay - + add_overlay(new_overlays) icon_state = "[rounded_vol]" item_state = "syringe_[rounded_vol]" diff --git a/scripts/ircbot_message.py b/scripts/ircbot_message.py index 4339019e03..fc029772f9 100644 --- a/scripts/ircbot_message.py +++ b/scripts/ircbot_message.py @@ -1,31 +1,30 @@ -#!/usr/bin/env python2 +#!/usr/bin/env python3 # Four arguments, password host channel and message. # EG: "ircbot_message.py hunter2 example.com #adminchannel ADMINHELP, people are killing me!" -import sys,cPickle,socket,HTMLParser +import sys +import socket def pack(): - ht = HTMLParser.HTMLParser() - - passwd = sys.argv[1] - ip = sys.argv[3] + try: - data = [] - for in_data in sys.argv[4:]: #The rest of the arguments is data - data += {ht.unescape(in_data)} + data = sys.argv[4:] + print(data) except: data = "NO DATA SPECIFIED" - dictionary = {"ip":ip,"data":[passwd] + data} - pickled = cPickle.dumps(dictionary) - nudge(pickled) + data = str(data) + data = bytes(data, "ascii") + print(data) + nudge(data) + def nudge(data): HOST = sys.argv[2] PORT = 45678 s = socket.socket(socket.AF_INET, socket.SOCK_STREAM) - s.connect((HOST,PORT)) + s.connect((HOST, PORT)) s.send(data) s.close() -if __name__ == "__main__" and len(sys.argv) > 1: # If not imported and more than one argument - pack() +if __name__ == "__main__" and len(sys.argv) > 1: # If not imported and more than one argument + pack() \ No newline at end of file