Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
40 changes: 10 additions & 30 deletions code/modules/ext_scripts/irc.dm
Original file line number Diff line number Diff line change
@@ -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

7 changes: 3 additions & 4 deletions code/modules/ext_scripts/python.dm
Original file line number Diff line number Diff line change
Expand Up @@ -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)
shell("[command]")
return
6 changes: 3 additions & 3 deletions code/modules/reagents/reagent_containers/syringes.dm
Original file line number Diff line number Diff line change
Expand Up @@ -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()
Expand All @@ -221,7 +221,7 @@
else
to_chat(user, "<span class='notice'>The syringe is empty.</span>")

dirty(target,affected) //VOREStation Add
// dirty(target,affected) //VOREStation Add // ARFS REMOVED *dab*

return
/* VOREStation Edit - See syringes_vr.dm
Expand Down
14 changes: 10 additions & 4 deletions code/modules/reagents/reagent_containers/syringes_vr.dm
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down Expand Up @@ -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)
Expand All @@ -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
Expand Down Expand Up @@ -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]"
Expand Down
29 changes: 14 additions & 15 deletions scripts/ircbot_message.py
Original file line number Diff line number Diff line change
@@ -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()