Merge branch 'master' into upstream-merge-37623
This commit is contained in:
@@ -39,7 +39,7 @@
|
||||
return list("reason"="guest", "desc"="\nReason: Guests not allowed. Please sign in with a byond account.")
|
||||
if (CONFIG_GET(flag/panic_bunker) && SSdbcore.Connect())
|
||||
log_access("Failed Login: [key] - Guests not allowed during panic bunker")
|
||||
return list("reason"="guest", "desc"="\nReason: You must first join the Discord to verify your account before joining this server. Please ping an admin once you've joined and read the rules. https://discord.gg/E6SQuhz")
|
||||
return list("reason"="guest", "desc"="\nReason: You must first sign into your BYOND account or join the Discord to verify your account before joining this server. Please ping an admin once you've joined and read the rules. https://discord.gg/E6SQuhz")
|
||||
|
||||
//Population Cap Checking
|
||||
var/extreme_popcap = CONFIG_GET(number/extreme_popcap)
|
||||
|
||||
@@ -434,7 +434,7 @@
|
||||
return
|
||||
|
||||
var/list/options = list("Regular Restart", "Hard Restart (No Delay/Feeback Reason)", "Hardest Restart (No actions, just reboot)")
|
||||
if(SERVER_TOOLS_PRESENT)
|
||||
if(world.TgsAvailable())
|
||||
options += "Server Restart (Kill and restart DD)";
|
||||
|
||||
var/rebootconfirm
|
||||
@@ -459,7 +459,7 @@
|
||||
world.Reboot(fast_track = TRUE)
|
||||
if("Server Restart (Kill and restart DD)")
|
||||
to_chat(world, "Server restart - [init_by]")
|
||||
SERVER_TOOLS_REBOOT_BYOND
|
||||
world.TgsEndProcess()
|
||||
|
||||
/datum/admins/proc/end_round()
|
||||
set category = "Server"
|
||||
|
||||
@@ -242,7 +242,6 @@ GLOBAL_PROTECT(protected_ranks)
|
||||
var/skip
|
||||
if(rank_names[admin_rank] == null)
|
||||
message_admins("[admin_ckey] loaded with invalid admin rank [admin_rank].")
|
||||
log_sql("[admin_ckey] loaded with invalid admin rank [admin_rank].")
|
||||
skip = 1
|
||||
if(GLOB.admin_datums[admin_ckey] || GLOB.deadmins[admin_ckey])
|
||||
skip = 1
|
||||
|
||||
@@ -93,6 +93,7 @@ GLOBAL_LIST_INIT(admin_verbs_fun, list(
|
||||
/client/proc/forceEvent,
|
||||
/client/proc/admin_change_sec_level,
|
||||
/client/proc/toggle_nuke,
|
||||
/client/proc/run_weather,
|
||||
/client/proc/mass_zombie_infection,
|
||||
/client/proc/mass_zombie_cure,
|
||||
/client/proc/polymorph_all,
|
||||
|
||||
@@ -1,12 +1,12 @@
|
||||
#define IRC_STATUS_THROTTLE 5
|
||||
|
||||
/datum/server_tools_command/ircstatus
|
||||
/datum/tgs_chat_command/ircstatus
|
||||
name = "status"
|
||||
help_text = "Gets the admincount, playercount, gamemode, and true game mode of the server"
|
||||
admin_only = TRUE
|
||||
var/static/last_irc_status = 0
|
||||
var/last_irc_status = 0
|
||||
|
||||
/datum/server_tools_command/ircstatus/Run(sender, params)
|
||||
/datum/tgs_chat_command/ircstatus/Run(datum/tgs_chat_user/sender, params)
|
||||
var/rtod = REALTIMEOFDAY
|
||||
if(rtod - last_irc_status < IRC_STATUS_THROTTLE)
|
||||
return
|
||||
@@ -17,12 +17,12 @@
|
||||
status += "Players: [GLOB.clients.len] (Active: [get_active_player_count(0,1,0)]). Mode: [SSticker.mode ? SSticker.mode.name : "Not started"]."
|
||||
return status
|
||||
|
||||
/datum/server_tools_command/irccheck
|
||||
/datum/tgs_chat_command/irccheck
|
||||
name = "check"
|
||||
help_text = "Gets the playercount, gamemode, and address of the server"
|
||||
var/static/last_irc_check = 0
|
||||
var/last_irc_check = 0
|
||||
|
||||
/datum/server_tools_command/irccheck/Run(sender, params)
|
||||
/datum/tgs_chat_command/irccheck/Run(datum/tgs_chat_user/sender, params)
|
||||
var/rtod = REALTIMEOFDAY
|
||||
if(rtod - last_irc_check < IRC_STATUS_THROTTLE)
|
||||
return
|
||||
@@ -30,14 +30,15 @@
|
||||
var/server = CONFIG_GET(string/server)
|
||||
return "[GLOB.round_id ? "Round #[GLOB.round_id]: " : ""][GLOB.clients.len] players on [SSmapping.config.map_name]; Round [SSticker.HasRoundStarted() ? (SSticker.IsRoundInProgress() ? "Active" : "Finishing") : "Starting"] -- [server ? server : "[world.internet_address]:[world.port]"]" //CIT CHANGE - obfuscates the current gamemode from players
|
||||
|
||||
/datum/server_tools_command/ahelp
|
||||
/datum/tgs_chat_command/ahelp
|
||||
name = "ahelp"
|
||||
help_text = "<ckey|ticket #> <message|ticket <close|resolve|icissue|reject|reopen <ticket #>|list>>"
|
||||
required_parameters = 2
|
||||
admin_only = TRUE
|
||||
|
||||
/datum/server_tools_command/ahelp/Run(sender, params)
|
||||
/datum/tgs_chat_command/ahelp/Run(datum/tgs_chat_user/sender, params)
|
||||
var/list/all_params = splittext(params, " ")
|
||||
if(all_params.len < 2)
|
||||
return "Insufficient parameters"
|
||||
var/target = all_params[1]
|
||||
all_params.Cut(1, 2)
|
||||
var/id = text2num(target)
|
||||
@@ -47,52 +48,54 @@
|
||||
target = AH.initiator_ckey
|
||||
else
|
||||
return "Ticket #[id] not found!"
|
||||
var/res = IrcPm(target, all_params.Join(" "), sender)
|
||||
var/res = IrcPm(target, all_params.Join(" "), sender.friendly_name)
|
||||
if(res != "Message Successful")
|
||||
return res
|
||||
|
||||
/datum/server_tools_command/namecheck
|
||||
/datum/tgs_chat_command/namecheck
|
||||
name = "namecheck"
|
||||
help_text = "Returns info on the specified target"
|
||||
required_parameters = 1
|
||||
admin_only = TRUE
|
||||
|
||||
/datum/server_tools_command/namecheck/Run(sender, params)
|
||||
log_admin("Chat Name Check: [sender] on [params]")
|
||||
message_admins("Name checking [params] from [sender]")
|
||||
/datum/tgs_chat_command/namecheck/Run(datum/tgs_chat_user/sender, params)
|
||||
params = trim(params)
|
||||
if(!params)
|
||||
return "Insufficient parameters"
|
||||
log_admin("Chat Name Check: [sender.friendly_name] on [params]")
|
||||
message_admins("Name checking [params] from [sender.friendly_name]")
|
||||
return keywords_lookup(params, 1)
|
||||
|
||||
/datum/server_tools_command/adminwho
|
||||
/datum/tgs_chat_command/adminwho
|
||||
name = "adminwho"
|
||||
help_text = "Lists administrators currently on the server"
|
||||
admin_only = TRUE
|
||||
|
||||
/datum/server_tools_command/adminwho/Run(sender, params)
|
||||
/datum/tgs_chat_command/adminwho/Run(datum/tgs_chat_user/sender, params)
|
||||
return ircadminwho()
|
||||
|
||||
GLOBAL_LIST(round_end_notifiees)
|
||||
|
||||
/datum/server_tools_command/notify
|
||||
/datum/tgs_chat_command/notify
|
||||
name = "notify"
|
||||
help_text = "Pings the invoker when the round ends"
|
||||
admin_only = TRUE
|
||||
|
||||
/datum/server_tools_command/notify/Run(sender, params)
|
||||
/datum/tgs_chat_command/notify/Run(datum/tgs_chat_user/sender, params)
|
||||
if(!SSticker.IsRoundInProgress() && SSticker.HasRoundStarted())
|
||||
return "[sender], the round has already ended!"
|
||||
return "[sender.mention], the round has already ended!"
|
||||
LAZYINITLIST(GLOB.round_end_notifiees)
|
||||
GLOB.round_end_notifiees[sender] = TRUE
|
||||
return "I will notify [sender] when the round ends."
|
||||
return "I will notify [sender.mention] when the round ends."
|
||||
|
||||
/datum/server_tools_command/sdql
|
||||
/datum/tgs_chat_command/sdql
|
||||
name = "sdql"
|
||||
help_text = "Runs an SDQL query"
|
||||
admin_only = TRUE
|
||||
|
||||
/datum/server_tools_command/sdql/Run(sender, params)
|
||||
/datum/tgs_chat_command/sdql/Run(datum/tgs_chat_user/sender, params)
|
||||
if(GLOB.AdminProcCaller)
|
||||
return "Unable to run query, another admin proc call is in progress. Try again later."
|
||||
GLOB.AdminProcCaller = "CHAT_[sender]" //_ won't show up in ckeys so it'll never match with a real admin
|
||||
GLOB.AdminProcCaller = "CHAT_[sender.friendly_name]" //_ won't show up in ckeys so it'll never match with a real admin
|
||||
var/list/results = world.SDQL2_query(params, GLOB.AdminProcCaller, GLOB.AdminProcCaller)
|
||||
GLOB.AdminProcCaller = null
|
||||
if(!results)
|
||||
@@ -100,13 +103,13 @@ GLOBAL_LIST(round_end_notifiees)
|
||||
var/list/text_res = results.Copy(1, 3)
|
||||
var/list/refs = results.len > 3 ? results.Copy(4) : null
|
||||
. = "[text_res.Join("\n")][refs ? "\nRefs: [refs.Join(" ")]" : ""]"
|
||||
|
||||
/datum/server_tools_command/reload_admins
|
||||
|
||||
/datum/tgs_chat_command/reload_admins
|
||||
name = "reload_admins"
|
||||
help_text = "Forces the server to reload admins."
|
||||
admin_only = TRUE
|
||||
|
||||
/datum/server_tools_command/reload_admins/Run(sender, params)
|
||||
/datum/tgs_chat_command/reload_admins/Run(datum/tgs_chat_user/sender, params)
|
||||
load_admins()
|
||||
log_admin("[sender] reloaded admins via chat command.")
|
||||
log_admin("[sender.friendly_name] reloaded admins via chat command.")
|
||||
return "Admins reloaded."
|
||||
|
||||
@@ -22,6 +22,17 @@
|
||||
H.facial_hair_color = H.hair_color
|
||||
H.eye_color = random_eye_color()
|
||||
H.dna.blood_type = random_blood_type()
|
||||
|
||||
// Mutant randomizing, doesn't affect the mob appearance unless it's the specific mutant.
|
||||
H.dna.features["mcolor"] = random_short_color()
|
||||
H.dna.features["tail_lizard"] = pick(GLOB.tails_list_lizard)
|
||||
H.dna.features["snout"] = pick(GLOB.snouts_list)
|
||||
H.dna.features["horns"] = pick(GLOB.horns_list)
|
||||
H.dna.features["frills"] = pick(GLOB.frills_list)
|
||||
H.dna.features["spines"] = pick(GLOB.spines_list)
|
||||
H.dna.features["body_markings"] = pick(GLOB.body_markings_list)
|
||||
H.dna.features["moth_wings"] = pick(GLOB.moth_wings_list)
|
||||
|
||||
H.update_body()
|
||||
H.update_hair()
|
||||
H.update_body_parts()
|
||||
@@ -73,7 +73,7 @@
|
||||
if(!option)
|
||||
return
|
||||
option = sanitizeSQL(option)
|
||||
var/default_percentage_calc
|
||||
var/default_percentage_calc = 0
|
||||
if(polltype != POLLTYPE_IRV)
|
||||
switch(alert("Should this option be included by default when poll result percentages are generated?",,"Yes","No","Cancel"))
|
||||
if("Yes")
|
||||
|
||||
@@ -6,7 +6,7 @@
|
||||
return
|
||||
usr.client.holder.edit_admin_permissions()
|
||||
|
||||
/datum/admins/proc/edit_admin_permissions()
|
||||
/datum/admins/proc/edit_admin_permissions(action, target, operation, page)
|
||||
if(!check_rights(R_PERMISSIONS))
|
||||
return
|
||||
var/list/output = list("<link rel='stylesheet' type='text/css' href='panels.css'><a href='?_src_=holder;[HrefToken()];editrightsbrowser=1'>\[Permissions\]</a>")
|
||||
@@ -205,7 +205,7 @@
|
||||
var/datum/DBQuery/query_add_admin = SSdbcore.NewQuery("INSERT INTO [format_table_name("admin")] (ckey, rank) VALUES ('[.]', 'NEW ADMIN')")
|
||||
if(!query_add_admin.warn_execute())
|
||||
return FALSE
|
||||
var/datum/DBQuery/query_add_admin_log = SSdbcore.NewQuery("INSERT INTO [format_table_name("admin_log")] (datetime, adminckey, adminip, operation, log) VALUES ('[SQLtime()]', '[sanitizeSQL(usr.ckey)]', INET_ATON('[sanitizeSQL(usr.client.address)]'), 'add admin', 'New admin added: [.]')")
|
||||
var/datum/DBQuery/query_add_admin_log = SSdbcore.NewQuery("INSERT INTO [format_table_name("admin_log")] (datetime, round_id, adminckey, adminip, operation, target, log) VALUES ('[SQLtime()]', '[GLOB.round_id]', '[sanitizeSQL(usr.ckey)]', INET_ATON('[sanitizeSQL(usr.client.address)]'), 'add admin', '[.]', 'New admin added: [.]')")
|
||||
if(!query_add_admin_log.warn_execute())
|
||||
return FALSE
|
||||
|
||||
@@ -213,12 +213,13 @@
|
||||
if(alert("Are you sure you want to remove [admin_ckey]?","Confirm Removal","Do it","Cancel") == "Do it")
|
||||
GLOB.admin_datums -= admin_ckey
|
||||
GLOB.deadmins -= admin_ckey
|
||||
D.disassociate()
|
||||
if(D)
|
||||
D.disassociate()
|
||||
if(use_db)
|
||||
var/datum/DBQuery/query_add_rank = SSdbcore.NewQuery("DELETE FROM [format_table_name("admin")] WHERE ckey = '[admin_ckey]'")
|
||||
if(!query_add_rank.warn_execute())
|
||||
return
|
||||
var/datum/DBQuery/query_add_rank_log = SSdbcore.NewQuery("INSERT INTO [format_table_name("admin_log")] (datetime, adminckey, adminip, operation, log) VALUES ('[SQLtime()]', '[sanitizeSQL(usr.ckey)]', INET_ATON('[sanitizeSQL(usr.client.address)]'), 'remove admin', 'Admin removed: [admin_ckey]')")
|
||||
var/datum/DBQuery/query_add_rank_log = SSdbcore.NewQuery("INSERT INTO [format_table_name("admin_log")] (datetime, round_id, adminckey, adminip, operation, target, log) VALUES ('[SQLtime()]', '[GLOB.round_id]', '[sanitizeSQL(usr.ckey)]', INET_ATON('[sanitizeSQL(usr.client.address)]'), 'remove admin', '[admin_ckey]', 'Admin removed: [admin_ckey]')")
|
||||
if(!query_add_rank_log.warn_execute())
|
||||
return
|
||||
message_admins("[key_name_admin(usr)] removed [admin_ckey] from the admins list [use_db ? "permanently" : "temporarily"]")
|
||||
@@ -276,13 +277,13 @@
|
||||
var/datum/DBQuery/query_add_rank = SSdbcore.NewQuery("INSERT INTO [format_table_name("admin_ranks")] (rank, flags, exclude_flags, can_edit_flags) VALUES ('[new_rank]', '0', '0', '0')")
|
||||
if(!query_add_rank.warn_execute())
|
||||
return
|
||||
var/datum/DBQuery/query_add_rank_log = SSdbcore.NewQuery("INSERT INTO [format_table_name("admin_log")] (datetime, adminckey, adminip, operation, log) VALUES ('[SQLtime()]', '[sanitizeSQL(usr.ckey)]', INET_ATON('[sanitizeSQL(usr.client.address)]'), 'add rank', 'New rank added: [admin_ckey]')")
|
||||
var/datum/DBQuery/query_add_rank_log = SSdbcore.NewQuery("INSERT INTO [format_table_name("admin_log")] (datetime, round_id, adminckey, adminip, operation, target, log) VALUES ('[SQLtime()]', '[GLOB.round_id]', '[sanitizeSQL(usr.ckey)]', INET_ATON('[sanitizeSQL(usr.client.address)]'), 'add rank', '[new_rank]', 'New rank added: [new_rank]')")
|
||||
if(!query_add_rank_log.warn_execute())
|
||||
return
|
||||
var/datum/DBQuery/query_change_rank = SSdbcore.NewQuery("UPDATE [format_table_name("admin")] SET rank = '[new_rank]' WHERE ckey = '[admin_ckey]'")
|
||||
if(!query_change_rank.warn_execute())
|
||||
return
|
||||
var/datum/DBQuery/query_change_rank_log = SSdbcore.NewQuery("INSERT INTO [format_table_name("admin_log")] (datetime, adminckey, adminip, operation, log) VALUES ('[SQLtime()]', '[sanitizeSQL(usr.ckey)]', INET_ATON('[sanitizeSQL(usr.client.address)]'), 'change admin rank', 'Rank of [admin_ckey] changed from [old_rank] to [new_rank]')")
|
||||
var/datum/DBQuery/query_change_rank_log = SSdbcore.NewQuery("INSERT INTO [format_table_name("admin_log")] (datetime, round_id, adminckey, adminip, operation, target, log) VALUES ('[SQLtime()]', '[GLOB.round_id]', '[sanitizeSQL(usr.ckey)]', INET_ATON('[sanitizeSQL(usr.client.address)]'), 'change admin rank', '[admin_ckey]', 'Rank of [admin_ckey] changed from [old_rank] to [new_rank]')")
|
||||
if(!query_change_rank_log.warn_execute())
|
||||
return
|
||||
if(D) //they were previously an admin
|
||||
@@ -319,7 +320,7 @@
|
||||
var/datum/DBQuery/query_change_rank_flags = SSdbcore.NewQuery("UPDATE [format_table_name("admin_ranks")] SET flags = '[new_flags]', exclude_flags = '[new_exclude_flags]', can_edit_flags = '[new_can_edit_flags]' WHERE rank = '[D.rank.name]'")
|
||||
if(!query_change_rank_flags.warn_execute())
|
||||
return
|
||||
var/datum/DBQuery/query_change_rank_flags_log = SSdbcore.NewQuery("INSERT INTO [format_table_name("admin_log")] (datetime, adminckey, adminip, operation, log) VALUES ('[SQLtime()]', '[sanitizeSQL(usr.ckey)]', INET_ATON('[sanitizeSQL(usr.client.address)]'), 'change rank flags', 'Permissions of [admin_ckey] changed from[rights2text(old_flags," ")][rights2text(old_exclude_flags," ", "-")][rights2text(old_can_edit_flags," ", "*")] to[rights2text(new_flags," ")][rights2text(new_exclude_flags," ", "-")][rights2text(new_can_edit_flags," ", "*")]')")
|
||||
var/datum/DBQuery/query_change_rank_flags_log = SSdbcore.NewQuery("INSERT INTO [format_table_name("admin_log")] (datetime, round_id, adminckey, adminip, operation, target, log) VALUES ('[SQLtime()]', '[GLOB.round_id]', '[sanitizeSQL(usr.ckey)]', INET_ATON('[sanitizeSQL(usr.client.address)]'), 'change rank flags', '[D.rank.name]', 'Permissions of [D.rank.name] changed from[rights2text(old_flags," ")][rights2text(old_exclude_flags," ", "-")][rights2text(old_can_edit_flags," ", "*")] to[rights2text(new_flags," ")][rights2text(new_exclude_flags," ", "-")][rights2text(new_can_edit_flags," ", "*")]')")
|
||||
if(!query_change_rank_flags_log.warn_execute())
|
||||
return
|
||||
for(var/datum/admin_rank/R in GLOB.admin_ranks)
|
||||
@@ -354,6 +355,36 @@
|
||||
message_admins("[key_name_admin(usr)] edited the permissions of [use_db ? " rank [D.rank.name] permanently" : "[admin_ckey] temporarily"]")
|
||||
log_admin("[key_name(usr)] edited the permissions of [use_db ? " rank [D.rank.name] permanently" : "[admin_ckey] temporarily"]")
|
||||
|
||||
/datum/admins/proc/remove_rank(admin_rank)
|
||||
if(!admin_rank)
|
||||
return
|
||||
for(var/datum/admin_rank/R in GLOB.admin_ranks)
|
||||
if(R.name == admin_rank && (!(R.rights & usr.client.holder.rank.can_edit_rights) == R.rights))
|
||||
to_chat(usr, "<span class='admin prefix'>You don't have edit rights to all the rights this rank has, rank deletion not permitted.</span>")
|
||||
return
|
||||
if(!CONFIG_GET(flag/admin_legacy_system) && CONFIG_GET(flag/protect_legacy_ranks) && (admin_rank in GLOB.protected_ranks))
|
||||
to_chat(usr, "<span class='admin prefix'>Deletion of protected ranks is not permitted, it must be removed from admin_ranks.txt.</span>")
|
||||
return
|
||||
if(CONFIG_GET(flag/load_legacy_ranks_only))
|
||||
to_chat(usr, "<span class='admin prefix'>Rank deletion not permitted while database rank loading is disabled.</span>")
|
||||
return
|
||||
admin_rank = sanitizeSQL(admin_rank)
|
||||
var/datum/DBQuery/query_admins_with_rank = SSdbcore.NewQuery("SELECT 1 FROM [format_table_name("admin")] WHERE rank = '[admin_rank]'")
|
||||
if(!query_admins_with_rank.warn_execute())
|
||||
return
|
||||
if(query_admins_with_rank.NextRow())
|
||||
to_chat(usr, "<span class='danger'>Error: Rank deletion attempted while rank still used; Tell a coder, this shouldn't happen.</span>")
|
||||
return
|
||||
if(alert("Are you sure you want to remove [admin_rank]?","Confirm Removal","Do it","Cancel") == "Do it")
|
||||
var/datum/DBQuery/query_add_rank = SSdbcore.NewQuery("DELETE FROM [format_table_name("admin_ranks")] WHERE rank = '[admin_rank]'")
|
||||
if(!query_add_rank.warn_execute())
|
||||
return
|
||||
var/datum/DBQuery/query_add_rank_log = SSdbcore.NewQuery("INSERT INTO [format_table_name("admin_log")] (datetime, round_id, adminckey, adminip, operation, target, log) VALUES ('[SQLtime()]', '[GLOB.round_id]', '[sanitizeSQL(usr.ckey)]', INET_ATON('[sanitizeSQL(usr.client.address)]'), 'remove rank', '[admin_rank]', 'Rank removed: [admin_rank]')")
|
||||
if(!query_add_rank_log.warn_execute())
|
||||
return
|
||||
message_admins("[key_name_admin(usr)] removed rank [admin_rank] permanently")
|
||||
log_admin("[key_name(usr)] removed rank [admin_rank] permanently")
|
||||
|
||||
/datum/admins/proc/sync_lastadminrank(admin_ckey, datum/admins/D)
|
||||
var/sqlrank = sanitizeSQL(D.rank.name)
|
||||
admin_ckey = sanitizeSQL(admin_ckey)
|
||||
|
||||
@@ -430,7 +430,7 @@
|
||||
var/obj/item/clothing/under/schoolgirl/I = new seifuku
|
||||
var/olduniform = H.w_uniform
|
||||
H.temporarilyRemoveItemFromInventory(H.w_uniform, TRUE, FALSE)
|
||||
H.equip_to_slot_or_del(I, slot_w_uniform)
|
||||
H.equip_to_slot_or_del(I, SLOT_W_UNIFORM)
|
||||
qdel(olduniform)
|
||||
if(droptype == "Yes")
|
||||
I.flags_1 |= NODROP_1
|
||||
|
||||
@@ -273,6 +273,21 @@
|
||||
return
|
||||
create_message("note", banckey, null, banreason, null, null, 0, 0)
|
||||
|
||||
else if(href_list["editrightsbrowser"])
|
||||
edit_admin_permissions(0)
|
||||
|
||||
else if(href_list["editrightsbrowserlog"])
|
||||
edit_admin_permissions(1, href_list["editrightstarget"], href_list["editrightsoperation"], href_list["editrightspage"])
|
||||
|
||||
if(href_list["editrightsbrowsermanage"])
|
||||
if(href_list["editrightschange"])
|
||||
change_admin_rank(href_list["editrightschange"], TRUE)
|
||||
else if(href_list["editrightsremove"])
|
||||
remove_admin(href_list["editrightsremove"], TRUE)
|
||||
else if(href_list["editrightsremoverank"])
|
||||
remove_rank(href_list["editrightsremoverank"])
|
||||
edit_admin_permissions(2)
|
||||
|
||||
else if(href_list["editrights"])
|
||||
edit_rights_topic(href_list)
|
||||
|
||||
@@ -1493,8 +1508,8 @@
|
||||
|
||||
if(ishuman(L))
|
||||
var/mob/living/carbon/human/observer = L
|
||||
observer.equip_to_slot_or_del(new /obj/item/clothing/under/suit_jacket(observer), slot_w_uniform)
|
||||
observer.equip_to_slot_or_del(new /obj/item/clothing/shoes/sneakers/black(observer), slot_shoes)
|
||||
observer.equip_to_slot_or_del(new /obj/item/clothing/under/suit_jacket(observer), SLOT_W_UNIFORM)
|
||||
observer.equip_to_slot_or_del(new /obj/item/clothing/shoes/sneakers/black(observer), SLOT_SHOES)
|
||||
L.Unconscious(100)
|
||||
sleep(5)
|
||||
L.forceMove(pick(GLOB.tdomeobserve))
|
||||
@@ -2448,6 +2463,19 @@
|
||||
usr.client.cmd_admin_mod_antag_rep(C, href_list["modantagrep"])
|
||||
show_player_panel(M)
|
||||
|
||||
else if(href_list["slowquery"])
|
||||
if(!check_rights(R_ADMIN))
|
||||
return
|
||||
var/answer = href_list["slowquery"]
|
||||
if(answer == "yes")
|
||||
log_query_debug("[usr.key] | Reported a server hang")
|
||||
if(alert(usr, "Had you just press any admin buttons?", "Query server hang report", "Yes", "No") == "Yes")
|
||||
var/response = input(usr,"What were you just doing?","Query server hang report") as null|text
|
||||
if(response)
|
||||
log_query_debug("[usr.key] | [response]")
|
||||
else if(answer == "no")
|
||||
log_query_debug("[usr.key] | Reported no server hang")
|
||||
|
||||
/datum/admins/proc/HandleCMode()
|
||||
if(!check_rights(R_ADMIN))
|
||||
return
|
||||
|
||||
@@ -594,7 +594,7 @@ GLOBAL_DATUM_INIT(ahelp_tickets, /datum/admin_help_tickets, new)
|
||||
/proc/send2irc(msg,msg2)
|
||||
msg = replacetext(replacetext(msg, "\proper", ""), "\improper", "")
|
||||
msg2 = replacetext(replacetext(msg2, "\proper", ""), "\improper", "")
|
||||
SERVER_TOOLS_RELAY_BROADCAST("[msg] | [msg2]")
|
||||
world.TgsTargetedChatBroadcast("[msg] | [msg2]", TRUE)
|
||||
|
||||
/proc/send2otherserver(source,msg,type = "Ahelp")
|
||||
var/comms_key = CONFIG_GET(string/comms_key)
|
||||
|
||||
@@ -95,7 +95,7 @@
|
||||
|
||||
SSblackbox.record_feedback("tally", "admin_verb", 1, "Jump To Key") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc!
|
||||
|
||||
/client/proc/Getmob(mob/M in GLOB.mob_list)
|
||||
/client/proc/Getmob(mob/M in GLOB.mob_list - GLOB.dummy_mob_list)
|
||||
set category = "Admin"
|
||||
set name = "Get Mob"
|
||||
set desc = "Mob to teleport"
|
||||
|
||||
@@ -27,7 +27,7 @@
|
||||
if(isnewplayer(M))
|
||||
continue
|
||||
if (M.stat == DEAD || (M.client && M.client.holder && (M.client.prefs.chat_toggles & CHAT_DEAD))) //admins can toggle deadchat on and off. This is a proc in admin.dm and is only give to Administrators and above
|
||||
M.show_message(rendered, 2)
|
||||
to_chat(M, rendered)
|
||||
|
||||
SSblackbox.record_feedback("tally", "admin_verb", 1, "Dsay") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc!
|
||||
|
||||
|
||||
@@ -110,10 +110,14 @@ GLOBAL_PROTECT(LastAdminCalledProc)
|
||||
GLOBAL_LIST_EMPTY(AdminProcCallSpamPrevention)
|
||||
GLOBAL_PROTECT(AdminProcCallSpamPrevention)
|
||||
|
||||
/proc/WrapAdminProcCall(target, procname, list/arguments)
|
||||
/proc/WrapAdminProcCall(datum/target, procname, list/arguments)
|
||||
if(target && procname == "Del")
|
||||
to_chat(usr, "Calling Del() is not allowed")
|
||||
return
|
||||
|
||||
if(!target.CanProcCall(procname))
|
||||
to_chat(usr, "Proccall on [target.type]/proc/[procname] is disallowed!")
|
||||
return
|
||||
var/current_caller = GLOB.AdminProcCaller
|
||||
var/ckey = usr ? usr.client.ckey : GLOB.AdminProcCaller
|
||||
if(!ckey)
|
||||
@@ -137,7 +141,7 @@ GLOBAL_PROTECT(AdminProcCallSpamPrevention)
|
||||
GLOB.AdminProcCaller = null
|
||||
|
||||
//adv proc call this, ya nerds
|
||||
/world/proc/WrapAdminProcCall(target, procname, list/arguments)
|
||||
/world/proc/WrapAdminProcCall(datum/target, procname, list/arguments)
|
||||
if(target == GLOBAL_PROC)
|
||||
return call(procname)(arglist(arguments))
|
||||
else if(target != world)
|
||||
@@ -476,7 +480,7 @@ GLOBAL_PROTECT(AdminProcCallSpamPrevention)
|
||||
id.forceMove(W)
|
||||
W.update_icon()
|
||||
else
|
||||
H.equip_to_slot(id,slot_wear_id)
|
||||
H.equip_to_slot(id,SLOT_WEAR_ID)
|
||||
|
||||
else
|
||||
alert("Invalid mob")
|
||||
|
||||
@@ -1043,6 +1043,30 @@ GLOBAL_LIST_EMPTY(custom_outfits) //Admin created outfits
|
||||
for(var/obj/machinery/shuttle_manipulator/M in GLOB.machines)
|
||||
M.ui_interact(usr)
|
||||
|
||||
/client/proc/run_weather()
|
||||
set category = "Fun"
|
||||
set name = "Run Weather"
|
||||
set desc = "Triggers a weather on the z-level you choose."
|
||||
|
||||
if(!holder)
|
||||
return
|
||||
|
||||
var/weather_type = input("Choose a weather", "Weather") as null|anything in subtypesof(/datum/weather)
|
||||
if(!weather_type)
|
||||
return
|
||||
|
||||
var/z_level = input("Z-Level to target? Leave blank to target current Z-Level.", "Z-Level") as num|null
|
||||
if(!isnum(z_level))
|
||||
if(!src.mob)
|
||||
return
|
||||
z_level = src.mob.z
|
||||
|
||||
SSweather.run_weather(weather_type, z_level)
|
||||
|
||||
message_admins("[key_name_admin(usr)] started weather of type [weather_type] on the z-level [z_level].")
|
||||
log_admin("[key_name(usr)] started weather of type [weather_type] on the z-level [z_level].")
|
||||
SSblackbox.record_feedback("tally", "admin_verb", 1, "Run Weather")
|
||||
|
||||
/client/proc/mass_zombie_infection()
|
||||
set category = "Fun"
|
||||
set name = "Mass Zombie Infection"
|
||||
|
||||
Reference in New Issue
Block a user