Merge branch 'master' into upstream-merge-29611

This commit is contained in:
LetterJay
2017-08-15 18:55:12 -05:00
committed by GitHub
246 changed files with 3752 additions and 1365 deletions
+8 -8
View File
@@ -83,10 +83,10 @@
var/a_computerid
var/a_ip
if(src.owner && istype(src.owner, /client))
a_ckey = src.owner:ckey
a_computerid = src.owner:computer_id
a_ip = src.owner:address
if(istype(owner))
a_ckey = owner.ckey
a_computerid = owner.computer_id
a_ip = owner.address
if(blockselfban)
if(a_ckey == ckey)
@@ -309,12 +309,12 @@
to_chat(usr, "<span class='danger'>Database update failed due to multiple bans having the same ID. Contact the database admin.</span>")
return
if(!src.owner || !istype(src.owner, /client))
if(!istype(owner))
return
var/unban_ckey = src.owner:ckey
var/unban_computerid = src.owner:computer_id
var/unban_ip = src.owner:address
var/unban_ckey = owner.ckey
var/unban_computerid = owner.computer_id
var/unban_ip = owner.address
var/sql_update = "UPDATE [format_table_name("ban")] SET unbanned = 1, unbanned_datetime = Now(), unbanned_ckey = '[unban_ckey]', unbanned_computerid = '[unban_computerid]', unbanned_ip = INET_ATON('[unban_ip]') WHERE id = [id]"
var/datum/DBQuery/query_unban = SSdbcore.NewQuery(sql_update)
+1 -1
View File
@@ -5,7 +5,7 @@
F << "<small>[time_stamp()] \ref[src] ([x],[y],[z])</small> || [src] [message]<br>"
/client/proc/investigate_show(subject in list("hrefs","notes, memos, watchlist", INVESTIGATE_PORTAL, INVESTIGATE_SINGULO, INVESTIGATE_WIRES, INVESTIGATE_TELESCI, INVESTIGATE_GRAVITY, INVESTIGATE_RECORDS, INVESTIGATE_CARGO, INVESTIGATE_SUPERMATTER, INVESTIGATE_ATMOS, INVESTIGATE_EXPERIMENTOR, INVESTIGATE_BOTANY) )
/client/proc/investigate_show(subject in list("hrefs","notes, memos, watchlist", INVESTIGATE_PORTAL, INVESTIGATE_SINGULO, INVESTIGATE_WIRES, INVESTIGATE_TELESCI, INVESTIGATE_GRAVITY, INVESTIGATE_RECORDS, INVESTIGATE_CARGO, INVESTIGATE_SUPERMATTER, INVESTIGATE_ATMOS, INVESTIGATE_EXPERIMENTOR, INVESTIGATE_BOTANY, INVESTIGATE_HALLUCINATIONS) )
set name = "Investigate"
set category = "Admin"
if(!holder)
+1 -10
View File
@@ -1,10 +1 @@
diff a/code/modules/admin/admin_investigate.dm b/code/modules/admin/admin_investigate.dm (rejected hunks)
@@ -2,7 +2,7 @@
if(!message || !subject)
return
var/F = file("[GLOB.log_directory]/[subject].html")
- F << "<small>[time_stamp()] \ref[src] ([x],[y],[z])</small> || [src] [message]<br>"
+ WRITE_FILE(F, "<small>[time_stamp()] \ref[src] ([x],[y],[z])</small> || [src] [message]<br>")
/client/proc/investigate_show(subject in list("hrefs","notes, memos, watchlist", INVESTIGATE_PORTAL, INVESTIGATE_SINGULO, INVESTIGATE_WIRES, INVESTIGATE_TELESCI, INVESTIGATE_GRAVITY, INVESTIGATE_RECORDS, INVESTIGATE_CARGO, INVESTIGATE_SUPERMATTER, INVESTIGATE_ATMOS, INVESTIGATE_EXPERIMENTOR, INVESTIGATE_BOTANY, INVESTIGATE_HALLUCINATIONS) )
garbage
+3 -2
View File
@@ -17,6 +17,7 @@ GLOBAL_LIST_INIT(admin_verbs_default, world.AVerbsDefault())
/client/proc/cmd_admin_pm_context, /*right-click adminPM interface*/
/client/proc/cmd_admin_pm_panel, /*admin-pm list*/
/client/proc/cmd_admin_ticket_panel,
/client/proc/panicbunker,
/client/proc/stop_sounds
)
GLOBAL_PROTECT(admin_verbs_admin)
@@ -114,7 +115,6 @@ GLOBAL_LIST_INIT(admin_verbs_server, world.AVerbsServer())
/client/proc/toggle_random_events,
/client/proc/forcerandomrotate,
/client/proc/adminchangemap,
/client/proc/panicbunker,
/client/proc/toggle_hub
)
GLOBAL_PROTECT(admin_verbs_debug)
@@ -296,7 +296,8 @@ GLOBAL_LIST_INIT(admin_verbs_hideable, list(
/client/proc/startSinglo,
/client/proc/set_server_fps,
/client/proc/cmd_admin_grantfullaccess,
/client/proc/cmd_admin_areatest,
/client/proc/cmd_admin_areatest_all,
/client/proc/cmd_admin_areatest_station,
/client/proc/readmin
)
if(holder)
+2 -2
View File
@@ -214,7 +214,7 @@
if("moveferry")
if(!check_rights(R_ADMIN))
return
SSblackbox.add_details("admin_secrets_fun_used","Send Centcom Ferry")
SSblackbox.add_details("admin_secrets_fun_used","Send CentCom Ferry")
if(!SSshuttle.toggleShuttle("ferry","ferry_home","ferry_away"))
message_admins("[key_name_admin(usr)] moved the centcom ferry")
log_admin("[key_name(usr)] moved the centcom ferry")
@@ -457,7 +457,7 @@
if(W.z == ZLEVEL_STATION && !istype(get_area(W), /area/bridge) && !istype(get_area(W), /area/crew_quarters) && !istype(get_area(W), /area/security/prison))
W.req_access = list()
message_admins("[key_name_admin(usr)] activated Egalitarian Station mode")
priority_announce("Centcom airlock control override activated. Please take this time to get acquainted with your coworkers.", null, 'sound/ai/commandreport.ogg')
priority_announce("CentCom airlock control override activated. Please take this time to get acquainted with your coworkers.", null, 'sound/ai/commandreport.ogg')
if("guns")
if(!check_rights(R_FUN))
+13 -13
View File
@@ -6,7 +6,7 @@
log_admin("[key_name(usr)] tried to use the admin panel without authorization.")
return
if(href_list["ahelp"])
if(!check_rights(R_ADMIN))
if(!check_rights(R_ADMIN, TRUE))
return
var/ahelp_ref = href_list["ahelp"]
@@ -102,13 +102,13 @@
message_admins("[key_name(usr)] tried to create gangs. Unfortunately, there were not enough candidates available.")
log_admin("[key_name(usr)] failed create gangs.")
if("centcom")
message_admins("[key_name(usr)] is creating a Centcom response team...")
message_admins("[key_name(usr)] is creating a CentCom response team...")
if(src.makeEmergencyresponseteam())
message_admins("[key_name(usr)] created a Centcom response team.")
log_admin("[key_name(usr)] created a Centcom response team.")
message_admins("[key_name(usr)] created a CentCom response team.")
log_admin("[key_name(usr)] created a CentCom response team.")
else
message_admins("[key_name_admin(usr)] tried to create a Centcom response team. Unfortunately, there were not enough candidates available.")
log_admin("[key_name(usr)] failed to create a Centcom response team.")
message_admins("[key_name_admin(usr)] tried to create a CentCom response team. Unfortunately, there were not enough candidates available.")
log_admin("[key_name(usr)] failed to create a CentCom response team.")
if("abductors")
message_admins("[key_name(usr)] is creating an abductor team...")
if(src.makeAbductorTeam())
@@ -1710,8 +1710,8 @@
usr.client.smite(H)
else if(href_list["CentcommReply"])
var/mob/living/carbon/human/H = locate(href_list["CentcommReply"]) in GLOB.mob_list
else if(href_list["CentComReply"])
var/mob/living/carbon/human/H = locate(href_list["CentComReply"]) in GLOB.mob_list
if(!istype(H))
to_chat(usr, "This can only be used on instances of type /mob/living/carbon/human")
return
@@ -1719,15 +1719,15 @@
to_chat(usr, "The person you are trying to contact is not wearing a headset.")
return
message_admins("[src.owner] has started answering [key_name(H)]'s Centcomm request.")
var/input = input(src.owner, "Please enter a message to reply to [key_name(H)] via their headset.","Outgoing message from Centcom", "")
message_admins("[src.owner] has started answering [key_name(H)]'s CentCom request.")
var/input = input(src.owner, "Please enter a message to reply to [key_name(H)] via their headset.","Outgoing message from CentCom", "")
if(!input)
message_admins("[src.owner] decided not to answer [key_name(H)]'s Centcomm request.")
message_admins("[src.owner] decided not to answer [key_name(H)]'s CentCom request.")
return
to_chat(src.owner, "You sent [input] to [H] via a secure channel.")
log_admin("[src.owner] replied to [key_name(H)]'s Centcom message with the message [input].")
message_admins("[src.owner] replied to [key_name(H)]'s Centcom message with: \"[input]\"")
log_admin("[src.owner] replied to [key_name(H)]'s CentCom message with the message [input].")
message_admins("[src.owner] replied to [key_name(H)]'s CentCom message with: \"[input]\"")
to_chat(H, "You hear something crackle in your ears for a moment before a voice speaks. \"Please stand by for a message from Central Command. Message as follows. [input]. Message ends.\"")
else if(href_list["SyndicateReply"])
+6 -5
View File
@@ -194,7 +194,7 @@ GLOBAL_DATUM_INIT(ahelp_tickets, /datum/admin_help_tickets, new)
AddInteraction("<font color='blue'>[key_name_admin(usr)] PM'd [LinkedReplyName()]</font>")
message_admins("<font color='blue'>Ticket [TicketHref("#[id]")] created</font>")
else
MessageNoRecipient(parsed_message)
MessageNoRecipient(msg, parsed_message)
//send it to irc if nobody is on and tell us how many were on
var/admin_number_present = send2irc_adminless_only(initiator_ckey, "Ticket #[id]: [name]")
@@ -249,18 +249,19 @@ GLOBAL_DATUM_INIT(ahelp_tickets, /datum/admin_help_tickets, new)
//message from the initiator without a target, all admins will see this
//won't bug irc
/datum/admin_help/proc/MessageNoRecipient(msg)
/datum/admin_help/proc/MessageNoRecipient(msg, parsed_msg)
var/ref_src = "\ref[src]"
var/chat_msg = "<span class='adminnotice'><span class='adminhelp'>Ticket [TicketHref("#[id]", ref_src)]</span><b>: [LinkedReplyName(ref_src)] [FullMonty(ref_src)]:</b> [msg]</span>"
//Message to be sent to all admins
var/admin_msg = "<span class='adminnotice'><span class='adminhelp'>Ticket [TicketHref("#[id]", ref_src)]</span><b>: [LinkedReplyName(ref_src)] [FullMonty(ref_src)]:</b> [parsed_msg]</span>"
AddInteraction("<font color='red'>[LinkedReplyName(ref_src)]: [msg]</font>")
//send this msg to all admins
for(var/client/X in GLOB.admins)
if(X.prefs.toggles & SOUND_ADMINHELP)
SEND_SOUND(X, sound('sound/effects/adminhelp.ogg'))
window_flash(X, ignorepref = TRUE)
to_chat(X, chat_msg)
to_chat(X, admin_msg)
//show it to the person adminhelping too
to_chat(initiator, "<span class='adminnotice'>PM to-<b>Admins</b>: [msg]</span>")
+2 -2
View File
@@ -84,11 +84,11 @@
var/list/keys = list()
for(var/mob/M in GLOB.player_list)
keys += M.client
var/selection = input("Please, select a player!", "Admin Jumping", null, null) as null|anything in sortKey(keys)
var/client/selection = input("Please, select a player!", "Admin Jumping", null, null) as null|anything in sortKey(keys)
if(!selection)
to_chat(src, "No keys found.")
return
var/mob/M = selection:mob
var/mob/M = selection.mob
log_admin("[key_name(usr)] jumped to [key_name(M)]")
message_admins("[key_name_admin(usr)] jumped to [key_name_admin(M)]")
+29 -16
View File
@@ -316,10 +316,8 @@ GLOBAL_PROTECT(AdminProcCallCount)
alert("Wait until the game starts")
return
if(ishuman(M))
log_admin("[key_name(src)] has alienized [M.key].")
spawn(0)
M:Alienize()
SSblackbox.add_details("admin_verb","Make Alien") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc!
INVOKE_ASYNC(M, /mob/living/carbon/human/proc/Alienize)
SSblackbox.add_details("admin_verb","Make Alien") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc!
log_admin("[key_name(usr)] made [key_name(M)] into an alien.")
message_admins("<span class='adminnotice'>[key_name_admin(usr)] made [key_name(M)] into an alien.</span>")
else
@@ -333,10 +331,8 @@ GLOBAL_PROTECT(AdminProcCallCount)
alert("Wait until the game starts")
return
if(ishuman(M))
log_admin("[key_name(src)] has slimeized [M.key].")
spawn(0)
M:slimeize()
SSblackbox.add_details("admin_verb","Make Slime") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc!
INVOKE_ASYNC(M, /mob/living/carbon/human/proc/slimeize)
SSblackbox.add_details("admin_verb","Make Slime") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc!
log_admin("[key_name(usr)] made [key_name(M)] into a slime.")
message_admins("<span class='adminnotice'>[key_name_admin(usr)] made [key_name(M)] into a slime.</span>")
else
@@ -461,12 +457,14 @@ GLOBAL_PROTECT(AdminProcCallCount)
if(worn)
if(istype(worn, /obj/item/device/pda))
worn:id = id
id.loc = worn
var/obj/item/device/pda/PDA = worn
PDA.id = id
id.forceMove(PDA)
else if(istype(worn, /obj/item/weapon/storage/wallet))
worn:front_id = id
id.loc = worn
worn.update_icon()
var/obj/item/weapon/storage/wallet/W = worn
W.front_id = id
id.forceMove(W)
W.update_icon()
else
H.equip_to_slot(id,slot_wear_id)
@@ -495,9 +493,9 @@ GLOBAL_PROTECT(AdminProcCallCount)
qdel(adminmob)
SSblackbox.add_details("admin_verb","Assume Direct Control") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc!
/client/proc/cmd_admin_areatest()
/client/proc/cmd_admin_areatest(on_station)
set category = "Mapping"
set name = "Test areas"
set name = "Test Areas"
var/list/areas_all = list()
var/list/areas_with_APC = list()
@@ -509,7 +507,12 @@ GLOBAL_PROTECT(AdminProcCallCount)
var/list/areas_with_camera = list()
for(var/area/A in world)
if(!(A.type in areas_all))
if(on_station)
var/turf/picked = safepick(get_area_turfs(A.type))
if(picked && (picked.z == ZLEVEL_STATION))
if(!(A.type in areas_all))
areas_all.Add(A.type)
else if(!(A.type in areas_all))
areas_all.Add(A.type)
for(var/obj/machinery/power/apc/APC in GLOB.apcs_list)
@@ -583,6 +586,16 @@ GLOBAL_PROTECT(AdminProcCallCount)
for(var/areatype in areas_without_camera)
to_chat(world, "* [areatype]")
/client/proc/cmd_admin_areatest_station()
set category = "Mapping"
set name = "Test Areas (STATION Z)"
cmd_admin_areatest(TRUE)
/client/proc/cmd_admin_areatest_all()
set category = "Mapping"
set name = "Test Areas (ALL)"
cmd_admin_areatest(FALSE)
/client/proc/cmd_admin_dress(mob/living/carbon/human/M in GLOB.mob_list)
set category = "Fun"
set name = "Select equipment"
+3 -2
View File
@@ -78,8 +78,9 @@
continue
output += "&nbsp;&nbsp;[filters[filter]]: [f.len]<br>"
for (var/device in f)
if (isobj(device))
output += "&nbsp;&nbsp;&nbsp;&nbsp;[device] ([device:x],[device:y],[device:z] in area [get_area(device:loc)])<br>"
if (istype(device, /atom))
var/atom/A = device
output += "&nbsp;&nbsp;&nbsp;&nbsp;[device] ([A.x],[A.y],[A.z] in area [get_area(device)])<br>"
else
output += "&nbsp;&nbsp;&nbsp;&nbsp;[device]<br>"
+29 -3
View File
@@ -13,7 +13,17 @@
return
message_admins("[key_name_admin(src)] accessed file: [path]")
src << ftp(file(path))
//this is copypasta because making it a proc would mean locking out adminproccalls,
// and that system is buggy enough with false positives that I don't want to risk locking admins out of legit calls.
switch(alert("View (in game), Open (in your system's text editor), or Download file [path]?", "Log File Opening", "View", "Open", "Download"))
if ("View")
src << browse("<pre style='word-wrap: break-word;'>[html_encode(file2text(file(path)))]</pre>", list2params(list("window" = "viewfile.[path]")))
if ("Open")
src << run(file(path))
if ("Download")
src << ftp(file(path))
else
return
to_chat(src, "Attempting to send file, this may take a fair few minutes if the file is very large.")
return
@@ -27,7 +37,15 @@
set desc = "Shows server log for this round."
if(fexists("[GLOB.world_game_log]"))
src << ftp(GLOB.world_game_log)
switch(alert("View (in game), Open (in your system's text editor), or Download file [GLOB.world_game_log]?", "Log File Opening", "View", "Open", "Download"))
if ("View")
src << browse("<pre style='word-wrap: break-word;'>[html_encode(file2text(GLOB.world_game_log))]</pre>", list2params(list("window" = "viewfile.[GLOB.world_game_log]")))
if ("Open")
src << run(GLOB.world_game_log)
if ("Download")
src << ftp(GLOB.world_game_log)
else
return
else
to_chat(src, "<font color='red'>Server log not found, try using .getserverlog.</font>")
return
@@ -41,7 +59,15 @@
set desc = "Shows server attack log for this round."
if(fexists("[GLOB.world_attack_log]"))
src << ftp(GLOB.world_attack_log)
switch(alert("View (in game), Open (in your system's text editor), or Download file [GLOB.world_attack_log]?", "Log File Opening", "View", "Open", "Download"))
if ("View")
src << browse("<pre style='word-wrap: break-word;'>[html_encode(file2text(GLOB.world_attack_log))]</pre>", list2params(list("window" = "viewfile.[GLOB.world_attack_log]")))
if ("Open")
src << run(GLOB.world_attack_log)
if ("Download")
src << ftp(GLOB.world_attack_log)
else
return
else
to_chat(src, "<font color='red'>Server attack log not found, try using .getserverlog.</font>")
return
+2 -1
View File
@@ -34,7 +34,8 @@ GLOBAL_LIST_INIT(admin_verbs_debug_mapping, list(
/client/proc/startSinglo,
/client/proc/set_server_fps, //allows you to set the ticklag.
/client/proc/cmd_admin_grantfullaccess,
/client/proc/cmd_admin_areatest,
/client/proc/cmd_admin_areatest_all,
/client/proc/cmd_admin_areatest_station,
/client/proc/cmd_admin_rejuvenate,
/datum/admins/proc/show_traitor_panel,
/client/proc/disable_communication,
+8 -8
View File
@@ -20,7 +20,7 @@
<a href='?src=\ref[src];makeAntag=gangs'>Make Gangsters</a><br>
<a href='?src=\ref[src];makeAntag=wizard'>Make Wizard (Requires Ghosts)</a><br>
<a href='?src=\ref[src];makeAntag=nukeops'>Make Nuke Team (Requires Ghosts)</a><br>
<a href='?src=\ref[src];makeAntag=centcom'>Make Centcom Response Team (Requires Ghosts)</a><br>
<a href='?src=\ref[src];makeAntag=centcom'>Make CentCom Response Team (Requires Ghosts)</a><br>
<a href='?src=\ref[src];makeAntag=abductors'>Make Abductor Team (Requires Ghosts)</a><br>
<a href='?src=\ref[src];makeAntag=revenant'>Make Revenant (Requires Ghost)</a><br>
"}
@@ -397,7 +397,7 @@
/datum/admins/proc/makeOfficial()
var/mission = input("Assign a task for the official", "Assign Task", "Conduct a routine preformance review of [station_name()] and its Captain.")
var/list/mob/dead/observer/candidates = pollGhostCandidates("Do you wish to be considered to be a Centcom Official?", "deathsquad")
var/list/mob/dead/observer/candidates = pollGhostCandidates("Do you wish to be considered to be a CentCom Official?", "deathsquad")
if(candidates.len)
var/mob/dead/observer/chosen_candidate = pick(candidates)
@@ -408,7 +408,7 @@
newmob.real_name = newmob.dna.species.random_name(newmob.gender,1)
newmob.dna.update_dna_identity()
newmob.key = chosen_candidate.key
newmob.mind.assigned_role = "Centcom Official"
newmob.mind.assigned_role = "CentCom Official"
newmob.equipOutfit(/datum/outfit/centcom_official)
//Assign antag status and the mission
@@ -424,12 +424,12 @@
newmob.set_species(/datum/species/human)
//Greet the official
to_chat(newmob, "<B><font size=3 color=red>You are a Centcom Official.</font></B>")
to_chat(newmob, "<B><font size=3 color=red>You are a CentCom Official.</font></B>")
to_chat(newmob, "<BR>Central Command is sending you to [station_name()] with the task: [mission]")
//Logging and cleanup
message_admins("Centcom Official [key_name_admin(newmob)] has spawned with the task: [mission]")
log_game("[key_name(newmob)] has been selected as a Centcom Official")
message_admins("CentCom Official [key_name_admin(newmob)] has spawned with the task: [mission]")
log_game("[key_name(newmob)] has been selected as a CentCom Official")
return 1
@@ -437,7 +437,7 @@
// CENTCOM RESPONSE TEAM
/datum/admins/proc/makeEmergencyresponseteam()
var/alert = input("Which team should we send?", "Select Response Level") as null|anything in list("Green: Centcom Official", "Blue: Light ERT (No Armoury Access)", "Amber: Full ERT (Armoury Access)", "Red: Elite ERT (Armoury Access + Pulse Weapons)", "Delta: Deathsquad")
var/alert = input("Which team should we send?", "Select Response Level") as null|anything in list("Green: CentCom Official", "Blue: Light ERT (No Armoury Access)", "Amber: Full ERT (Armoury Access)", "Red: Elite ERT (Armoury Access + Pulse Weapons)", "Delta: Deathsquad")
if(!alert)
return
switch(alert)
@@ -449,7 +449,7 @@
alert = "Amber"
if("Blue: Light ERT (No Armoury Access)")
alert = "Blue"
if("Green: Centcom Official")
if("Green: CentCom Official")
return makeOfficial()
var/teamcheck = input("Maximum size of team? (7 max)", "Select Team Size",4) as null|num
if(isnull(teamcheck))
+1 -1
View File
@@ -46,7 +46,7 @@
SSblackbox.add_details("admin_verb","Prayer") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc!
//log_admin("HELP: [key_name(src)]: [msg]")
/proc/Centcomm_announce(text , mob/Sender)
/proc/CentCom_announce(text , mob/Sender)
var/msg = copytext(sanitize(text), 1, MAX_MESSAGE_LEN)
msg = "<span class='adminnotice'><b><font color=orange>CENTCOM:</font>[ADMIN_FULLMONTY(Sender)] [ADMIN_CENTCOM_REPLY(Sender)]:</b> [msg]</span>"
to_chat(GLOB.admins, msg)
+2 -2
View File
@@ -1208,6 +1208,6 @@ GLOBAL_LIST_EMPTY(custom_outfits) //Admin created outfits
if(!message)
return
message_admins("[key_name_admin(usr)] triggered a Centcom recall, with the admiral message of: [message]")
log_game("[key_name(usr)] triggered a Centcom recall, with the message of: [message]")
message_admins("[key_name_admin(usr)] triggered a CentCom recall, with the admiral message of: [message]")
log_game("[key_name(usr)] triggered a CentCom recall, with the message of: [message]")
SSshuttle.centcom_recall(SSshuttle.emergency.timer, message)