mirror of
https://github.com/Aurorastation/Aurora.3.git
synced 2025-12-26 18:12:40 +00:00
* Your unbeatable smile wrecks the media We wanna know your secret, so mysterious * Even the things she lacks end up in her area Such a perfect liar, you are * Miss ingenious, godly idol! (You're my savior, you're my saving grace) * So, what'd you eat today? What's your favorite book? * And if you wanna go to play, where are you gonna go? I haven't eaten at all * That's a secret No matter what you ask * She's elusive, evasive * So nonchalant Yet still shining bright; * Her secret: out of sight, as if visible, has the taste of honey There is none, none, none of this * And also none, none, none of that What type of guy do you like? * Who is your partner? Come on, answer me * "I don't understand what falling in love with someone else is like" (Hey! Hey!) I cannot tell what is true from what is a lie (Hey! Hey! Hey! Hey!) * And yet again, someone falls for such words (Hey! Hey! Hey! Hey!) Gently lulled into love * Drawing everyone's eyes You are the perfect, ultimate idol * Never to appear again A reincarnation of Venus * With that smile, with that "I love you" You captivate everyone * Even if those eyes, those words, are false They make up a perfect love (Ai) * Yeah, yeah, that girl stands out, exceptional We were extras from the beginning * BS that acted as adornments for the star's leading role Everything we've accomplished is thanks to her — no! * How impudent How could envy and jealousy not exist? * examine * This isn't some made-up drama for appearances So I cannot forgive * You're not perfect, I cannot forgive you I cannot forgive myself * I cannot accept any version of you other than the one stronger than everyone else * Everybody trusts and worships The very strongest, most invincible idol * Weaknesses and whatnot are not to be found Carrying the morning star within * Showing any weakness is no good, no good (Hey! Hey!) Don't let them see anything that they don't want to know (Hey! Hey! Hey! Hey!) * Anything but being one-of-a-kind is a definite no, no (Hey! Hey! Hey! Hey!) That is the real love (Hey!) * can commune fixes * can commune rename * fix is psi blocked * fixes agian * My signature smile that fires up the media The only secret that I shall keep is this: * My career was built upon fake "I love you"s This is love, in my own way * Even the flowing sweats are beautiful Aqua These eyelids that hid the Ruby within * Sing, dance, flutter, I am Maria — Right, lying is the most exquisite form of love * I have never been loved by anyone Nor have I loved anyone else * That such lies of mine will become true someday I trust in it * Someday, surely, I will have it all in hand I am such a greedy idol * Because I wish to love everybody properly in a life-sized way I shall lie today as well (Hey! Hey! Hey! Hey!) * a * b * c * d * And yet, still, (Hey! Hey!) I have been unable to tell you, and you, alone (Hey! Hey! Hey! Hey!) * jesus christ * Update code/controllers/subsystems/processing/psi.dm Co-authored-by: Fluffy <65877598+FluffyGhoster@users.noreply.github.com> * Update code/controllers/subsystems/processing/psi.dm Co-authored-by: Fluffy <65877598+FluffyGhoster@users.noreply.github.com> * Update code/controllers/subsystems/processing/psi.dm Co-authored-by: Fluffy <65877598+FluffyGhoster@users.noreply.github.com> * Update code/game/gamemodes/technomancer/spell_objs.dm Co-authored-by: Fluffy <65877598+FluffyGhoster@users.noreply.github.com> * Update code/modules/mob/living/carbon/human/human.dm Co-authored-by: Fluffy <65877598+FluffyGhoster@users.noreply.github.com> * Update code/modules/mob/living/carbon/human/human_helpers.dm Co-authored-by: Fluffy <65877598+FluffyGhoster@users.noreply.github.com> * Update code/modules/organs/organ_external.dm Co-authored-by: Fluffy <65877598+FluffyGhoster@users.noreply.github.com> * Update code/modules/psionics/abilities/assay.dm Co-authored-by: Fluffy <65877598+FluffyGhoster@users.noreply.github.com> * Update code/modules/psionics/abilities/command.dm Co-authored-by: Fluffy <65877598+FluffyGhoster@users.noreply.github.com> * Update code/modules/psionics/abilities/emotional_suggestion.dm Co-authored-by: Fluffy <65877598+FluffyGhoster@users.noreply.github.com> * Update code/modules/psionics/abilities/grip.dm Co-authored-by: Fluffy <65877598+FluffyGhoster@users.noreply.github.com> * Update code/modules/psionics/abilities/grip.dm Co-authored-by: Fluffy <65877598+FluffyGhoster@users.noreply.github.com> * Update code/modules/psionics/abilities/mend.dm Co-authored-by: Fluffy <65877598+FluffyGhoster@users.noreply.github.com> * Update code/modules/psionics/abilities/mend.dm Co-authored-by: Fluffy <65877598+FluffyGhoster@users.noreply.github.com> * Update code/modules/psionics/abilities/mend.dm Co-authored-by: Fluffy <65877598+FluffyGhoster@users.noreply.github.com> * Update code/modules/psionics/abilities/psi_search.dm Co-authored-by: Fluffy <65877598+FluffyGhoster@users.noreply.github.com> * Update code/modules/psionics/abilities/shockwave.dm Co-authored-by: Fluffy <65877598+FluffyGhoster@users.noreply.github.com> * Update code/modules/psionics/abilities/shockwave.dm Co-authored-by: Fluffy <65877598+FluffyGhoster@users.noreply.github.com> * Update code/modules/psionics/abilities/singularity.dm Co-authored-by: Fluffy <65877598+FluffyGhoster@users.noreply.github.com> * Update code/modules/psionics/abilities/time_stop.dm Co-authored-by: Fluffy <65877598+FluffyGhoster@users.noreply.github.com> * Update code/modules/psionics/events/mini_spasm.dm Co-authored-by: Fluffy <65877598+FluffyGhoster@users.noreply.github.com> * Update code/modules/psionics/interface/ui_hub.dm Co-authored-by: Fluffy <65877598+FluffyGhoster@users.noreply.github.com> * Update code/modules/psionics/interface/ui_hub.dm Co-authored-by: Fluffy <65877598+FluffyGhoster@users.noreply.github.com> * Update code/modules/psionics/interface/ui_hub.dm Co-authored-by: Fluffy <65877598+FluffyGhoster@users.noreply.github.com> * Update code/modules/psionics/interface/ui_hub.dm Co-authored-by: Fluffy <65877598+FluffyGhoster@users.noreply.github.com> * Update code/modules/psionics/interface/ui_hub.dm Co-authored-by: Fluffy <65877598+FluffyGhoster@users.noreply.github.com> * Update code/modules/psionics/interface/ui_hub.dm Co-authored-by: Fluffy <65877598+FluffyGhoster@users.noreply.github.com> * cl update --------- Co-authored-by: Matt Atlas <liermattia@gmail.com> Co-authored-by: Fluffy <65877598+FluffyGhoster@users.noreply.github.com>
1515 lines
56 KiB
Plaintext
1515 lines
56 KiB
Plaintext
/datum/admins/Topic(href, href_list)
|
|
..()
|
|
|
|
if(usr.client != src.owner || !check_rights(0))
|
|
log_admin("[key_name(usr)] tried to use the admin panel without authorization.",admin_key=key_name(usr))
|
|
message_admins("[usr.key] has attempted to override the admin panel!")
|
|
return
|
|
|
|
if(SSticker.mode && SSticker.mode.check_antagonists_topic(href, href_list))
|
|
var/static/datum/tgui_module/moderator/shared/check_antagonists/global_check_antags = new()
|
|
global_check_antags.ui_interact(usr)
|
|
return
|
|
|
|
else if(href_list["stickyban"])
|
|
stickyban(href_list["stickyban"],href_list)
|
|
|
|
if(href_list["dbsearchckey"] || href_list["dbsearchadmin"])
|
|
|
|
var/adminckey = href_list["dbsearchadmin"]
|
|
var/playerckey = href_list["dbsearchckey"]
|
|
var/playerip = href_list["dbsearchip"]
|
|
var/playercid = href_list["dbsearchcid"]
|
|
var/dbbantype = text2num(href_list["dbsearchbantype"])
|
|
var/match = 0
|
|
|
|
if("dbmatch" in href_list)
|
|
match = 1
|
|
|
|
DB_ban_panel(playerckey, adminckey, playerip, playercid, dbbantype, match)
|
|
return
|
|
|
|
else if(href_list["dbbanedit"])
|
|
var/banedit = href_list["dbbanedit"]
|
|
var/banid = text2num(href_list["dbbanid"])
|
|
if(!banedit || !banid)
|
|
return
|
|
|
|
DB_ban_edit(banid, banedit)
|
|
return
|
|
|
|
else if(href_list["dbbanaddtype"])
|
|
|
|
var/bantype = text2num(href_list["dbbanaddtype"])
|
|
var/banckey = href_list["dbbanaddckey"]
|
|
var/banip = href_list["dbbanaddip"]
|
|
var/bancid = href_list["dbbanaddcid"]
|
|
var/banduration = text2num(href_list["dbbaddduration"])
|
|
var/banjob = href_list["dbbanaddjob"]
|
|
var/banreason = href_list["dbbanreason"]
|
|
|
|
banckey = ckey(banckey)
|
|
|
|
switch(bantype)
|
|
if(BANTYPE_PERMA)
|
|
if(!banckey || !banreason)
|
|
to_chat(usr, "Not enough parameters (Requires ckey and reason)")
|
|
return
|
|
banduration = null
|
|
banjob = null
|
|
if(BANTYPE_TEMP)
|
|
if(!banckey || !banreason || !banduration)
|
|
to_chat(usr, "Not enough parameters (Requires ckey, reason and duration)")
|
|
return
|
|
banjob = null
|
|
if(BANTYPE_JOB_PERMA)
|
|
if(!banckey || !banreason || !banjob)
|
|
to_chat(usr, "Not enough parameters (Requires ckey, reason and job)")
|
|
return
|
|
banduration = null
|
|
if(BANTYPE_JOB_TEMP)
|
|
if(!banckey || !banreason || !banjob || !banduration)
|
|
to_chat(usr, "Not enough parameters (Requires ckey, reason and job)")
|
|
return
|
|
|
|
var/mob/playermob
|
|
|
|
for(var/mob/M in player_list)
|
|
if(M.ckey == banckey)
|
|
playermob = M
|
|
break
|
|
|
|
|
|
banreason = "(MANUAL BAN) "+banreason
|
|
|
|
if(!playermob)
|
|
if(banip)
|
|
banreason = "[banreason] (CUSTOM IP)"
|
|
if(bancid)
|
|
banreason = "[banreason] (CUSTOM CID)"
|
|
else
|
|
message_admins("Ban process: A mob matching [playermob.ckey] was found at location [playermob.x], [playermob.y], [playermob.z]. Custom ip and computer id fields replaced with the ip and computer id from the located mob")
|
|
|
|
if (config.ban_legacy_system)
|
|
notes_add(banckey,banreason,usr)
|
|
else
|
|
notes_add_sql(banckey, banreason, usr, banip, bancid)
|
|
|
|
DB_ban_record(bantype, playermob, banduration, banreason, banjob, null, banckey, banip, bancid )
|
|
|
|
else if(href_list["dbbanmirrors"])
|
|
display_mirrors_panel(usr, text2num(href_list["dbbanmirrors"]))
|
|
return
|
|
|
|
else if(href_list["dbbanmirroract"])
|
|
// Mirror act contains the ID of the mirror being acted upon.
|
|
var/mirror_id = text2num(href_list["dbbanmirroract"])
|
|
if (href_list["mirrorckeys"])
|
|
display_mirrors_ckeys(usr, mirror_id)
|
|
else if (href_list["mirrorstatus"])
|
|
toggle_mirror_status(usr, mirror_id, text2num(href_list["mirrorstatus"]))
|
|
return
|
|
|
|
else if(href_list["call_shuttle"])
|
|
if(!check_rights(R_ADMIN)) return
|
|
|
|
switch(href_list["call_shuttle"])
|
|
if("1")
|
|
if (evacuation_controller.call_evacuation(usr, TRUE))
|
|
log_admin("[key_name(usr)] called an evacuation.")
|
|
message_admins("[key_name_admin(usr)] called an evacuation.", 1)
|
|
|
|
if("2")
|
|
if (evacuation_controller.call_evacuation(usr, TRUE))
|
|
log_admin("[key_name(usr)] called an evacuation.")
|
|
message_admins("[key_name_admin(usr)] called an evacuation.", 1)
|
|
else if (evacuation_controller.cancel_evacuation())
|
|
log_admin("[key_name(usr)] cancelled an evacuation.")
|
|
message_admins("[key_name_admin(usr)] cancelled an evacuation.", 1)
|
|
|
|
href_list["secretsadmin"] = "check_antagonist"
|
|
|
|
else if(href_list["delay_round_end"])
|
|
if(!check_rights(R_SERVER)) return
|
|
|
|
SSticker.delay_end = !SSticker.delay_end
|
|
log_admin("[key_name(usr)] [SSticker.delay_end ? "delayed the round end" : "has made the round end normally"].",admin_key=key_name(usr))
|
|
message_admins("<span class='notice'>[key_name(usr)] [SSticker.delay_end ? "delayed the round end" : "has made the round end normally"].</span>", 1)
|
|
href_list["secretsadmin"] = "check_antagonist"
|
|
|
|
else if(href_list["simplemake"])
|
|
|
|
if(!check_rights(R_SPAWN)) return
|
|
|
|
var/mob/M = locate(href_list["mob"])
|
|
if(!ismob(M))
|
|
to_chat(usr, "This can only be used on instances of type /mob")
|
|
return
|
|
|
|
var/delmob = 0
|
|
switch(alert("Delete old mob?","Message","Yes","No","Cancel"))
|
|
if("Cancel") return
|
|
if("Yes") delmob = 1
|
|
|
|
log_admin("[key_name(usr)] has used rudimentary transformation on [key_name(M)]. Transforming to [href_list["simplemake"]]; deletemob=[delmob]",admin_key=key_name(usr))
|
|
message_admins("<span class='notice'>[key_name_admin(usr)] has used rudimentary transformation on [key_name_admin(M)]. Transforming to [href_list["simplemake"]]; deletemob=[delmob]</span>", 1)
|
|
|
|
switch(href_list["simplemake"])
|
|
if("observer") M.change_mob_type( /mob/abstract/observer , null, null, delmob )
|
|
if("nymph") M.change_mob_type( /mob/living/carbon/alien/diona , null, null, delmob )
|
|
if("human") spawn_humanoid_species_admin(usr, M, delmob)
|
|
if("slime") M.change_mob_type( /mob/living/carbon/slime , null, null, delmob )
|
|
if("ai") M.change_mob_type( /mob/living/silicon/ai , null, null, delmob )
|
|
if("robot") M.change_mob_type( /mob/living/silicon/robot , null, null, delmob )
|
|
if("cat") M.change_mob_type( /mob/living/simple_animal/cat , null, null, delmob )
|
|
if("runtime") M.change_mob_type( /mob/living/simple_animal/cat/fluff/Runtime , null, null, delmob )
|
|
if("corgi") M.change_mob_type( /mob/living/simple_animal/corgi , null, null, delmob )
|
|
if("ian") M.change_mob_type( /mob/living/simple_animal/corgi/Ian , null, null, delmob )
|
|
if("crab") M.change_mob_type( /mob/living/simple_animal/crab , null, null, delmob )
|
|
if("parrot") M.change_mob_type( /mob/living/simple_animal/parrot , null, null, delmob )
|
|
if("constructarmored") M.change_mob_type( /mob/living/simple_animal/construct/armored , null, null, delmob )
|
|
if("constructbuilder") M.change_mob_type( /mob/living/simple_animal/construct/builder , null, null, delmob )
|
|
if("constructwraith") M.change_mob_type( /mob/living/simple_animal/construct/wraith , null, null, delmob )
|
|
if("shade") M.change_mob_type( /mob/living/simple_animal/shade , null, null, delmob )
|
|
|
|
/////////////////////////////////////new ban stuff
|
|
else if(href_list["unbanf"])
|
|
if(!check_rights(R_BAN)) return
|
|
|
|
var/banfolder = href_list["unbanf"]
|
|
Banlist.cd = "/base/[banfolder]"
|
|
var/key = Banlist["key"]
|
|
if(alert(usr, "Are you sure you want to unban [key]?", "Confirmation", "Yes", "No") == "Yes")
|
|
if(RemoveBan(banfolder))
|
|
unbanpanel()
|
|
else
|
|
alert(usr, "This ban has already been lifted / does not exist.", "Error", "Ok")
|
|
unbanpanel()
|
|
|
|
else if(href_list["warn"])
|
|
usr.client.warn(href_list["warn"])
|
|
|
|
else if(href_list["unbane"])
|
|
if(!check_rights(R_BAN)) return
|
|
|
|
UpdateTime()
|
|
var/reason
|
|
|
|
var/banfolder = href_list["unbane"]
|
|
Banlist.cd = "/base/[banfolder]"
|
|
var/reason2 = Banlist["reason"]
|
|
var/temp = Banlist["temp"]
|
|
|
|
var/minutes = Banlist["minutes"]
|
|
|
|
var/banned_key = Banlist["key"]
|
|
Banlist.cd = "/base"
|
|
|
|
var/duration
|
|
|
|
switch(alert("Temporary Ban?",,"Yes","No"))
|
|
if("Yes")
|
|
temp = 1
|
|
var/mins = 0
|
|
if(minutes > CMinutes)
|
|
mins = minutes - CMinutes
|
|
mins = input(usr,"How long (in minutes)? (Default: 1440)","Ban time",mins ? mins : 1440) as num|null
|
|
if(!mins) return
|
|
mins = min(525599,mins)
|
|
minutes = CMinutes + mins
|
|
duration = GetExp(minutes)
|
|
reason = sanitize(input(usr,"Reason?","reason",reason2) as text|null)
|
|
if(!reason) return
|
|
if("No")
|
|
temp = 0
|
|
duration = "Perma"
|
|
reason = sanitize(input(usr,"Reason?","reason",reason2) as text|null)
|
|
if(!reason) return
|
|
|
|
log_admin("[key_name(usr)] edited [banned_key]'s ban. Reason: [reason] Duration: [duration]",admin_key=key_name(usr))
|
|
ban_unban_log_save("[key_name(usr)] edited [banned_key]'s ban. Reason: [reason] Duration: [duration]")
|
|
message_admins("<span class='notice'>[key_name_admin(usr)] edited [banned_key]'s ban. Reason: [reason] Duration: [duration]</span>", 1)
|
|
Banlist.cd = "/base/[banfolder]"
|
|
Banlist["reason"] << reason
|
|
Banlist["temp"] << temp
|
|
Banlist["minutes"] << minutes
|
|
Banlist["bannedby"] << usr.ckey
|
|
Banlist.cd = "/base"
|
|
feedback_inc("ban_edit",1)
|
|
unbanpanel()
|
|
|
|
/////////////////////////////////////new ban stuff
|
|
|
|
else if(href_list["jobban_panel"])
|
|
jobban_panel(href_list["jobban_panel"])
|
|
return
|
|
|
|
// JOBBAN'S INNARDS
|
|
// Are now moved to banjob.dm. For use with the newer system.
|
|
else if(href_list["jobban_job"])
|
|
return jobban_handle(href_list["jobban_tgt"], href_list["jobban_job"])
|
|
|
|
else if(href_list["jobban_search"])
|
|
if (!check_rights(R_MOD|R_ADMIN))
|
|
return
|
|
|
|
var/ckey = ckey(input("Please specify the ckey you want to search for:", "ckey") as text)
|
|
if (!ckey)
|
|
to_chat(usr, "<span class='notice'>Cancelled.</span>")
|
|
return
|
|
|
|
jobban_panel(ckey)
|
|
return
|
|
|
|
else if(href_list["boot2"])
|
|
var/mob/M = locate(href_list["boot2"])
|
|
if (ismob(M))
|
|
if(!check_rights(R_MOD|R_ADMIN, 0))
|
|
to_chat(usr, "<span class='warning'>You do not have the appropriate permissions to boot users!</span>")
|
|
return
|
|
if(!check_if_greater_rights_than(M.client))
|
|
return
|
|
var/reason = sanitize(input("Please enter reason"))
|
|
if(!reason)
|
|
to_chat_immediate(M, "<span class='danger'>You have been kicked from the server</span>")
|
|
else
|
|
to_chat_immediate(M, "<span class='danger'>You have been kicked from the server: [reason]</span>")
|
|
log_admin("[key_name(usr)] booted [key_name(M)].",admin_key=key_name(usr),ckey=key_name(M))
|
|
message_admins("<span class='notice'>[key_name_admin(usr)] booted [key_name_admin(M)].</span>", 1)
|
|
//M.client = null
|
|
qdel(M.client)
|
|
|
|
else if(href_list["newban"])
|
|
if(!check_rights(R_MOD,0) && !check_rights(R_BAN, 0))
|
|
to_chat(usr, "<span class='warning'>You do not have the appropriate permissions to add bans!</span>")
|
|
return
|
|
|
|
if(check_rights(R_MOD,0) && !check_rights(R_ADMIN, 0) && !config.mods_can_job_tempban) // If mod and tempban disabled
|
|
to_chat(usr, "<span class='warning'>Mod jobbanning is disabled!</span>")
|
|
return
|
|
|
|
var/mob/M = locate(href_list["newban"])
|
|
if(!ismob(M)) return
|
|
|
|
if(M.client && M.client.holder) return //admins cannot be banned. Even if they could, the ban doesn't affect them anyway
|
|
|
|
switch(alert("Temporary Ban?",,"Yes","No", "Cancel"))
|
|
if("Yes")
|
|
var/mins = input(usr,"How long (in minutes)?","Ban time",1440) as num|null
|
|
if(!mins)
|
|
return
|
|
if(check_rights(R_MOD, 0) && !check_rights(R_BAN, 0) && mins > config.mod_tempban_max)
|
|
to_chat(usr, "<span class='warning'>Moderators can only job tempban up to [config.mod_tempban_max] minutes!</span>")
|
|
return
|
|
if(mins >= 525600) mins = 525599
|
|
var/reason = sanitize(input(usr,"Reason?","reason","Griefer") as text|null)
|
|
if(!reason)
|
|
return
|
|
AddBan(M.ckey, M.computer_id, reason, usr.ckey, 1, mins)
|
|
ban_unban_log_save("[usr.client.ckey] has banned [M.ckey]. - Reason: [reason] - This will be removed in [mins] minutes.")
|
|
if (config.ban_legacy_system)
|
|
notes_add(M.ckey,"[usr.client.ckey] has banned [M.ckey]. - Reason: [reason] - This will be removed in [mins] minutes.",usr)
|
|
else
|
|
notes_add_sql(M.ckey, "[usr.client.ckey] has banned [M.ckey]. - Reason: [reason] - This will be removed in [mins] minutes.", usr, M.lastKnownIP, M.computer_id)
|
|
to_chat_immediate(M, "<span class='danger'><BIG>You have been banned by [usr.client.ckey].\nReason: [reason].</BIG></span>")
|
|
to_chat_immediate(M, "<span class='danger'>This is a temporary ban, it will be removed in [mins] minutes.</span>")
|
|
feedback_inc("ban_tmp",1)
|
|
DB_ban_record(BANTYPE_TEMP, M, mins, reason)
|
|
feedback_inc("ban_tmp_mins",mins)
|
|
if(config.banappeals)
|
|
to_chat_immediate(M, "<span class='warning'>To try to resolve this matter head to [config.banappeals]</span>")
|
|
else
|
|
to_chat_immediate(M, "<span class='warning'>No ban appeals URL has been set.</span>")
|
|
log_admin("[usr.client.ckey] has banned [M.ckey].\nReason: [reason]\nThis will be removed in [mins] minutes.",admin_key=key_name(usr),ckey=key_name(M))
|
|
message_admins("<span class='notice'>[usr.client.ckey] has banned [M.ckey].\nReason: [reason]\nThis will be removed in [mins] minutes.</span>")
|
|
|
|
qdel(M.client)
|
|
//qdel(M) // See no reason why to delete mob. Important stuff can be lost. And ban can be lifted before round ends.
|
|
if("No")
|
|
if(!check_rights(R_BAN)) return
|
|
var/reason = sanitize(input(usr,"Reason?","reason","Griefer") as text|null)
|
|
if(!reason)
|
|
return
|
|
switch(alert(usr,"IP ban?",,"Yes","No","Cancel"))
|
|
if("Cancel") return
|
|
if("Yes")
|
|
AddBan(M.ckey, M.computer_id, reason, usr.ckey, 0, 0, M.lastKnownIP)
|
|
if("No")
|
|
AddBan(M.ckey, M.computer_id, reason, usr.ckey, 0, 0)
|
|
to_chat(M, "<span class='danger'><BIG>You have been banned by [usr.client.ckey].\nReason: [reason].</BIG></span>")
|
|
to_chat(M, "<span class='warning'>This is a permanent ban.</span>")
|
|
if(config.banappeals)
|
|
to_chat(M, "<span class='warning'>To try to resolve this matter head to [config.banappeals]</span>")
|
|
else
|
|
to_chat(M, "<span class='warning'>No ban appeals URL has been set.</span>")
|
|
ban_unban_log_save("[usr.client.ckey] has permabanned [M.ckey]. - Reason: [reason] - This is a permanent ban.")
|
|
if (config.ban_legacy_system)
|
|
notes_add(M.ckey,"[usr.client.ckey] has permabanned [M.ckey]. - Reason: [reason] - This is a permanent ban.",usr)
|
|
else
|
|
notes_add_sql(M.ckey, "[usr.client.ckey] has permabanned [M.ckey]. - Reason: [reason] - This is a permanent ban.", usr, M.lastKnownIP, M.computer_id)
|
|
log_admin("[usr.client.ckey] has banned [M.ckey].\nReason: [reason]\nThis is a permanent ban.",admin_key=key_name(usr),ckey=key_name(M))
|
|
message_admins("<span class='notice'>[usr.client.ckey] has banned [M.ckey].\nReason: [reason]\nThis is a permanent ban.</span>")
|
|
feedback_inc("ban_perma",1)
|
|
DB_ban_record(BANTYPE_PERMA, M, -1, reason)
|
|
|
|
qdel(M.client)
|
|
//qdel(M)
|
|
if("Cancel")
|
|
return
|
|
|
|
else if(href_list["mute"])
|
|
if(!check_rights(R_MOD,0) && !check_rights(R_ADMIN)) return
|
|
|
|
var/mob/M = locate(href_list["mute"])
|
|
if(!ismob(M)) return
|
|
if(!M.client) return
|
|
|
|
var/mute_type = href_list["mute_type"]
|
|
if(istext(mute_type)) mute_type = text2num(mute_type)
|
|
if(!isnum(mute_type)) return
|
|
|
|
cmd_admin_mute(M, mute_type)
|
|
|
|
else if(href_list["c_mode"])
|
|
if(!check_rights(R_ADMIN)) return
|
|
|
|
if(ROUND_IS_STARTED)
|
|
return alert(usr, "The game has already started.", null, null, null, null)
|
|
var/dat = {"<B>What mode do you wish to play?</B><HR>"}
|
|
for(var/mode in config.modes)
|
|
dat += {"<A href='?src=\ref[src];c_mode2=[mode]'>[config.mode_names[mode]]</A><br>"}
|
|
dat += {"<A href='?src=\ref[src];c_mode2=secret'>Secret</A><br>"}
|
|
dat += {"<A href='?src=\ref[src];c_mode2=random'>Random</A><br>"}
|
|
dat += {"Now: [master_mode]"}
|
|
usr << browse(dat, "window=c_mode")
|
|
|
|
else if(href_list["f_secret"])
|
|
if(!check_rights(R_ADMIN)) return
|
|
|
|
if(ROUND_IS_STARTED)
|
|
return alert(usr, "The game has already started.", null, null, null, null)
|
|
if(master_mode != ROUNDTYPE_STR_SECRET && master_mode != ROUNDTYPE_STR_MIXED_SECRET)
|
|
return alert(usr, "The game mode has to be secret!", null, null, null, null)
|
|
var/dat = {"<B>What game mode do you want to force secret to be? Use this if you want to change the game mode, but want the players to believe it's secret. This will only work if the current game mode is secret.</B><HR>"}
|
|
for(var/mode in config.modes)
|
|
dat += {"<A href='?src=\ref[src];f_secret2=[mode]'>[config.mode_names[mode]]</A><br>"}
|
|
dat += {"<A href='?src=\ref[src];f_secret2=secret'>Random (default)</A><br>"}
|
|
dat += {"Now: [secret_force_mode]"}
|
|
usr << browse(dat, "window=f_secret")
|
|
|
|
else if(href_list["c_mode2"])
|
|
if(!check_rights(R_ADMIN|R_SERVER)) return
|
|
|
|
if (ROUND_IS_STARTED)
|
|
return alert(usr, "The game has already started.", null, null, null, null)
|
|
master_mode = href_list["c_mode2"]
|
|
log_admin("[key_name(usr)] set the mode as [master_mode].",admin_key=key_name(usr))
|
|
message_admins("<span class='notice'>[key_name_admin(usr)] set the mode as [master_mode].</span>", 1)
|
|
to_world("<span class='notice'><b>The mode is now: [master_mode]</b></span>")
|
|
Game() // updates the main game menu
|
|
SSpersist_config.last_gamemode = master_mode
|
|
.(href, list("c_mode"=1))
|
|
|
|
else if(href_list["f_secret2"])
|
|
if(!check_rights(R_ADMIN|R_SERVER)) return
|
|
|
|
if(ROUND_IS_STARTED)
|
|
return alert(usr, "The game has already started.", null, null, null, null)
|
|
if(master_mode != "secret")
|
|
return alert(usr, "The game mode has to be secret!", null, null, null, null)
|
|
secret_force_mode = href_list["f_secret2"]
|
|
log_admin("[key_name(usr)] set the forced secret mode as [secret_force_mode].",admin_key=key_name(usr))
|
|
message_admins("<span class='notice'>[key_name_admin(usr)] set the forced secret mode as [secret_force_mode].</span>", 1)
|
|
Game() // updates the main game menu
|
|
.(href, list("f_secret"=1))
|
|
|
|
else if(href_list["remove_psionics"])
|
|
var/datum/psi_complexus/psi = locate(href_list["remove_psionics"])
|
|
if(psi && psi.owner && !QDELETED(psi))
|
|
to_chat(psi.owner, SPAN_NOTICE("<b>Your psionic powers vanish abruptly, leaving you cold and empty.</b>"))
|
|
log_and_message_admins("removed all psionics from [key_name(psi.owner)].")
|
|
QDEL_NULL(psi)
|
|
|
|
else if(href_list["trigger_psi_latencies"])
|
|
var/datum/psi_complexus/psi = locate(href_list["trigger_psi_latencies"])
|
|
log_and_message_admins("triggered psionics for [key_name(psi.owner)].")
|
|
psi.check_psionic_trigger(100, "outside intervention", redactive = TRUE)
|
|
|
|
else if(href_list["monkeyone"])
|
|
if(!check_rights(R_SPAWN)) return
|
|
|
|
var/mob/living/carbon/human/H = locate(href_list["monkeyone"])
|
|
if(!istype(H))
|
|
to_chat(usr, "This can only be used on instances of type /mob/living/carbon/human")
|
|
return
|
|
|
|
log_admin("[key_name(usr)] attempting to monkeyize [key_name(H)]",admin_key=key_name(usr))
|
|
message_admins("<span class='notice'>[key_name_admin(usr)] attempting to monkeyize [key_name_admin(H)]</span>", 1)
|
|
H.monkeyize()
|
|
|
|
else if(href_list["corgione"])
|
|
if(!check_rights(R_SPAWN)) return
|
|
|
|
var/mob/living/carbon/human/H = locate(href_list["corgione"])
|
|
if(!istype(H))
|
|
to_chat(usr, "This can only be used on instances of type /mob/living/carbon/human")
|
|
return
|
|
|
|
log_admin("[key_name(usr)] attempting to corgize [key_name(H)]",admin_key=key_name(usr),ckey=key_name(H))
|
|
message_admins("<span class='notice'>[key_name_admin(usr)] attempting to corgize [key_name_admin(H)]</span>", 1)
|
|
H.corgize()
|
|
|
|
else if(href_list["forcespeech"])
|
|
if(!check_rights(R_FUN)) return
|
|
|
|
var/mob/M = locate(href_list["forcespeech"])
|
|
if(!ismob(M))
|
|
to_chat(usr, "this can only be used on instances of type /mob")
|
|
|
|
var/speech = input("What will [key_name(M)] say?.", "Force speech", "")// Don't need to sanitize, since it does that in say(), we also trust our admins.
|
|
if(!speech) return
|
|
M.say(speech)
|
|
speech = sanitize(speech) // Nah, we don't trust them
|
|
log_admin("[key_name(usr)] forced [key_name(M)] to say: [speech]",admin_key=key_name(usr))
|
|
message_admins("<span class='notice'>[key_name_admin(usr)] forced [key_name_admin(M)] to say: [speech]</span>")
|
|
|
|
else if(href_list["sendbacktolobby"])
|
|
if(!check_rights(R_ADMIN))
|
|
return
|
|
|
|
var/mob/M = locate(href_list["sendbacktolobby"])
|
|
|
|
if(!isobserver(M))
|
|
to_chat(usr, "<span class='notice'>You can only send ghost players back to the Lobby.</span>")
|
|
return
|
|
|
|
if(!M.client)
|
|
to_chat(usr, "<span class='warning'>[M] doesn't seem to have an active client.</span>")
|
|
return
|
|
|
|
if(alert(usr, "Send [key_name(M)] back to Lobby?", "Message", "Yes", "No") != "Yes")
|
|
return
|
|
|
|
log_admin("[key_name(usr)] has sent [key_name(M)] back to the Lobby.")
|
|
message_admins("[key_name(usr)] has sent [key_name(M)] back to the Lobby.")
|
|
|
|
var/mob/abstract/new_player/NP = new /mob/abstract/new_player()
|
|
NP.key = M.ckey
|
|
qdel(M)
|
|
|
|
else if(href_list["tdome1"])
|
|
if(!check_rights(R_FUN)) return
|
|
|
|
if(alert(usr, "Confirm?", "Message", "Yes", "No") != "Yes")
|
|
return
|
|
|
|
var/mob/M = locate(href_list["tdome1"])
|
|
if(!ismob(M))
|
|
to_chat(usr, "This can only be used on instances of type /mob")
|
|
return
|
|
if(istype(M, /mob/living/silicon/ai))
|
|
to_chat(usr, "This cannot be used on instances of type /mob/living/silicon/ai")
|
|
return
|
|
|
|
for(var/obj/item/I in M)
|
|
M.drop_from_inventory(I)
|
|
|
|
M.Paralyse(5)
|
|
sleep(5)
|
|
M.forceMove(pick(tdome1))
|
|
spawn(50)
|
|
to_chat(M, "<span class='notice'>You have been sent to the Thunderdome.</span>")
|
|
log_admin("[key_name(usr)] has sent [key_name(M)] to the thunderdome. (Team 1)",admin_key=key_name(usr),ckey=key_name(M))
|
|
message_admins("[key_name_admin(usr)] has sent [key_name_admin(M)] to the thunderdome. (Team 1)", 1)
|
|
|
|
else if(href_list["tdome2"])
|
|
if(!check_rights(R_FUN)) return
|
|
|
|
if(alert(usr, "Confirm?", "Message", "Yes", "No") != "Yes")
|
|
return
|
|
|
|
var/mob/M = locate(href_list["tdome2"])
|
|
if(!ismob(M))
|
|
to_chat(usr, "This can only be used on instances of type /mob")
|
|
return
|
|
if(istype(M, /mob/living/silicon/ai))
|
|
to_chat(usr, "This cannot be used on instances of type /mob/living/silicon/ai")
|
|
return
|
|
|
|
for(var/obj/item/I in M)
|
|
M.drop_from_inventory(I)
|
|
|
|
M.Paralyse(5)
|
|
sleep(5)
|
|
M.forceMove(pick(tdome2))
|
|
spawn(50)
|
|
to_chat(M, "<span class='notice'>You have been sent to the Thunderdome.</span>")
|
|
log_admin("[key_name(usr)] has sent [key_name(M)] to the thunderdome. (Team 2)",admin_key=key_name(usr),ckey=key_name(M))
|
|
message_admins("[key_name_admin(usr)] has sent [key_name_admin(M)] to the thunderdome. (Team 2)", 1)
|
|
|
|
else if(href_list["tdomeadmin"])
|
|
if(!check_rights(R_FUN)) return
|
|
|
|
if(alert(usr, "Confirm?", "Message", "Yes", "No") != "Yes")
|
|
return
|
|
|
|
var/mob/M = locate(href_list["tdomeadmin"])
|
|
if(!ismob(M))
|
|
to_chat(usr, "This can only be used on instances of type /mob")
|
|
return
|
|
if(istype(M, /mob/living/silicon/ai))
|
|
to_chat(usr, "This cannot be used on instances of type /mob/living/silicon/ai")
|
|
return
|
|
|
|
M.Paralyse(5)
|
|
sleep(5)
|
|
M.forceMove(pick(tdomeadmin))
|
|
spawn(50)
|
|
to_chat(M, "<span class='notice'>You have been sent to the Thunderdome.</span>")
|
|
log_admin("[key_name(usr)] has sent [key_name(M)] to the thunderdome. (Admin.)",admin_key=key_name(usr),ckey=key_name(M))
|
|
message_admins("[key_name_admin(usr)] has sent [key_name_admin(M)] to the thunderdome. (Admin.)", 1)
|
|
|
|
else if(href_list["tdomeobserve"])
|
|
if(!check_rights(R_FUN)) return
|
|
|
|
if(alert(usr, "Confirm?", "Message", "Yes", "No") != "Yes")
|
|
return
|
|
|
|
var/mob/M = locate(href_list["tdomeobserve"])
|
|
if(!ismob(M))
|
|
to_chat(usr, "This can only be used on instances of type /mob")
|
|
return
|
|
if(istype(M, /mob/living/silicon/ai))
|
|
to_chat(usr, "This cannot be used on instances of type /mob/living/silicon/ai")
|
|
return
|
|
|
|
for(var/obj/item/I in M)
|
|
M.drop_from_inventory(I)
|
|
|
|
if(istype(M, /mob/living/carbon/human))
|
|
var/mob/living/carbon/human/observer = M
|
|
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/black(observer), slot_shoes)
|
|
M.Paralyse(5)
|
|
sleep(5)
|
|
M.forceMove(pick(tdomeobserve))
|
|
spawn(50)
|
|
to_chat(M, "<span class='notice'>You have been sent to the Thunderdome.</span>")
|
|
log_admin("[key_name(usr)] has sent [key_name(M)] to the thunderdome. (Observer.)",admin_key=key_name(usr),ckey=key_name(M))
|
|
message_admins("[key_name_admin(usr)] has sent [key_name_admin(M)] to the thunderdome. (Observer.)", 1)
|
|
|
|
else if(href_list["revive"])
|
|
if(!check_rights(R_REJUVINATE)) return
|
|
|
|
var/mob/living/L = locate(href_list["revive"])
|
|
if(!istype(L))
|
|
to_chat(usr, "This can only be used on instances of type /mob/living")
|
|
return
|
|
|
|
if(config.allow_admin_rev)
|
|
L.revive()
|
|
message_admins("<span class='danger'>Admin [key_name_admin(usr)] healed / revived [key_name_admin(L)]!</span>", 1)
|
|
log_admin("[key_name(usr)] healed / Revived [key_name(L)]",admin_key=key_name(usr),ckey=key_name(L))
|
|
else
|
|
to_chat(usr, "Admin Rejuvinates have been disabled")
|
|
|
|
else if(href_list["makeai"])
|
|
if(!check_rights(R_SPAWN)) return
|
|
|
|
var/mob/living/carbon/human/H = locate(href_list["makeai"])
|
|
if(!istype(H))
|
|
to_chat(usr, "This can only be used on instances of type /mob/living/carbon/human")
|
|
return
|
|
|
|
message_admins("<span class='danger'>Admin [key_name_admin(usr)] AIized [key_name_admin(H)]!</span>", 1)
|
|
log_admin("[key_name(usr)] AIized [key_name(H)]",admin_key=key_name(usr),ckey=key_name(H))
|
|
H.AIize()
|
|
|
|
else if(href_list["makeslime"])
|
|
if(!check_rights(R_SPAWN)) return
|
|
|
|
var/mob/living/carbon/human/H = locate(href_list["makeslime"])
|
|
if(!istype(H))
|
|
to_chat(usr, "This can only be used on instances of type /mob/living/carbon/human")
|
|
return
|
|
|
|
usr.client.cmd_admin_slimeize(H)
|
|
|
|
else if(href_list["makerobot"])
|
|
if(!check_rights(R_SPAWN)) return
|
|
|
|
var/mob/living/carbon/human/H = locate(href_list["makerobot"])
|
|
if(!istype(H))
|
|
to_chat(usr, "This can only be used on instances of type /mob/living/carbon/human")
|
|
return
|
|
|
|
usr.client.cmd_admin_robotize(H)
|
|
|
|
else if(href_list["makeanimal"])
|
|
if(!check_rights(R_SPAWN)) return
|
|
|
|
var/mob/M = locate(href_list["makeanimal"])
|
|
if(istype(M, /mob/abstract/new_player))
|
|
to_chat(usr, "This cannot be used on instances of type /mob/abstract/new_player")
|
|
return
|
|
|
|
usr.client.cmd_admin_animalize(M)
|
|
|
|
else if(href_list["togmutate"])
|
|
if(!check_rights(R_SPAWN)) return
|
|
|
|
var/mob/living/carbon/human/H = locate(href_list["togmutate"])
|
|
if(!istype(H))
|
|
to_chat(usr, "This can only be used on instances of type /mob/living/carbon/human")
|
|
return
|
|
var/block=text2num(href_list["block"])
|
|
//testing("togmutate([href_list["block"]] -> [block])")
|
|
usr.client.cmd_admin_toggle_block(H,block)
|
|
show_player_panel(H)
|
|
//H.regenerate_icons()
|
|
|
|
else if(href_list["adminplayeropts"])
|
|
var/mob/M = locate(href_list["adminplayeropts"])
|
|
show_player_panel(M)
|
|
|
|
else if(href_list["adminplayerobservejump"])
|
|
if(!check_rights(R_MOD|R_ADMIN)) return
|
|
var/client/C = usr.client
|
|
|
|
var/mob/M = locate(href_list["adminplayerobservejump"])
|
|
|
|
if(!isobserver(usr)) C.admin_ghost()
|
|
sleep(2)
|
|
C.jumptomob(M)
|
|
|
|
else if(href_list["check_antagonist"])
|
|
var/static/datum/tgui_module/moderator/shared/check_antagonists/global_check_antags = new()
|
|
global_check_antags.ui_interact(usr)
|
|
|
|
else if(href_list["adminplayerobservecoodjump"])
|
|
if(!check_rights(R_ADMIN|R_MOD))
|
|
return
|
|
if(isnewplayer(usr))
|
|
return
|
|
|
|
var/x = text2num(href_list["X"])
|
|
var/y = text2num(href_list["Y"])
|
|
var/z = text2num(href_list["Z"])
|
|
|
|
var/client/C = usr.client
|
|
if(!isobserver(usr))
|
|
C.admin_ghost()
|
|
C.jumptocoord(x,y,z)
|
|
|
|
else if(href_list["take_ticket"])
|
|
var/datum/ticket/ticket = locate(href_list["take_ticket"])
|
|
|
|
if(!istype(ticket))
|
|
return
|
|
|
|
ticket.take(usr.client)
|
|
|
|
else if(href_list["adminchecklaws"])
|
|
output_ai_laws()
|
|
|
|
else if(href_list["adminmoreinfo"])
|
|
var/mob/M = locate(href_list["adminmoreinfo"])
|
|
if(!ismob(M))
|
|
to_chat(usr, "This can only be used on instances of type /mob")
|
|
return
|
|
|
|
var/location_description = ""
|
|
var/special_role_description = ""
|
|
var/health_description = ""
|
|
var/gender_description = ""
|
|
var/species_description = "N/A"
|
|
var/turf/T = get_turf(M)
|
|
|
|
//Location
|
|
if(isturf(T))
|
|
if(isarea(T.loc))
|
|
location_description = "([M.loc == T ? "at coordinates " : "in [M.loc] at coordinates "] [T.x], [T.y], [T.z] in area <b>[T.loc]</b>)"
|
|
else
|
|
location_description = "([M.loc == T ? "at coordinates " : "in [M.loc] at coordinates "] [T.x], [T.y], [T.z])"
|
|
|
|
//Job + antagonist
|
|
if(M.mind)
|
|
special_role_description = "Role: <b>[M.mind.assigned_role]</b>; Antagonist: <span class='warning'><b>[M.mind.special_role]</b></span>; Has been rev: [(M.mind.has_been_rev)?"Yes":"No"]"
|
|
else
|
|
special_role_description = "Role: <i>Mind datum missing</i> Antagonist: <i>Mind datum missing</i>; Has been rev: <i>Mind datum missing</i>;"
|
|
|
|
//Health
|
|
if(isliving(M))
|
|
var/mob/living/L = M
|
|
var/status
|
|
switch (M.stat)
|
|
if (0) status = "Alive"
|
|
if (1) status = "<font color='orange'><b>Unconscious</b></font>"
|
|
if (2) status = "<span class='warning'><b>Dead</b></span>"
|
|
health_description = "Status: [status]"
|
|
health_description += "<BR>Oxy: [L.getOxyLoss()] - Tox: [L.getToxLoss()] - Fire: [L.getFireLoss()] - Brute: [L.getBruteLoss()] - Clone: [L.getCloneLoss()] - Brain: [L.getBrainLoss()]"
|
|
else
|
|
health_description = "This mob type has no health to speak of."
|
|
|
|
//Species
|
|
if (ishuman(M))
|
|
var/mob/living/carbon/human/H = M
|
|
if (H.species)
|
|
species_description = "<b>[H.species.name]</b>"
|
|
|
|
//GenDer
|
|
switch(M.gender)
|
|
if(MALE,FEMALE) gender_description = "[M.gender]"
|
|
else gender_description = "<span class='warning'><b>[M.gender]</b></span>"
|
|
|
|
var/dat = "<b>Info about [M.name]:</b><br>"
|
|
dat += "Mob type: [M.type]<br>"
|
|
if(species_description)
|
|
dat += "Species: [M.type]<br>"
|
|
if(gender_description)
|
|
dat += "Gender: [gender_description]<br>"
|
|
dat += "Damage: [health_description]<br>"
|
|
dat += "Real Name: [M.real_name]<br>"
|
|
dat += "Mind Name: [M.mind?"[M.mind.name]":""]<br>"
|
|
dat += "Key: <b>[M.key]</b><br>"
|
|
dat += "Location: [location_description]<br>"
|
|
if(special_role_description)
|
|
dat += "Special Role Desc: [special_role_description]<br>"
|
|
dat += "(<a href='?src=\ref[usr];priv_msg=\ref[M]'>PM</a>) (<A HREF='?src=\ref[src];adminplayeropts=\ref[M]'>PP</A>) (<A HREF='?_src_=vars;Vars=\ref[M]'>VV</A>) (<A HREF='?src=\ref[src];subtlemessage=\ref[M]'>SM</A>) ([admin_jump_link(M, src)]) (<A HREF='?src=\ref[src];secretsadmin=check_antagonist'>CA</A>)"
|
|
|
|
var/datum/browser/extrainfo_win = new(usr, "extrainfo", "Extra Info (M.name)", 450, 500)
|
|
extrainfo_win.set_content(dat)
|
|
extrainfo_win.open()
|
|
|
|
else if(href_list["adminspawncookie"])
|
|
if(!check_rights(R_ADMIN|R_FUN)) return
|
|
|
|
var/mob/living/carbon/human/H = locate(href_list["adminspawncookie"])
|
|
if(!ishuman(H))
|
|
to_chat(usr, "This can only be used on instances of type /mob/living/carbon/human")
|
|
return
|
|
|
|
H.equip_to_slot_or_del( new /obj/item/reagent_containers/food/snacks/cookie(H), slot_l_hand )
|
|
if(!(istype(H.l_hand,/obj/item/reagent_containers/food/snacks/cookie)))
|
|
H.equip_to_slot_or_del( new /obj/item/reagent_containers/food/snacks/cookie(H), slot_r_hand )
|
|
if(!(istype(H.r_hand,/obj/item/reagent_containers/food/snacks/cookie)))
|
|
log_admin("[key_name(H)] has their hands full, so they did not receive their cookie, spawned by [key_name(src.owner)].",admin_key=key_name(src.owner),ckey=key_name(H))
|
|
message_admins("[key_name(H)] has their hands full, so they did not receive their cookie, spawned by [key_name(src.owner)].")
|
|
return
|
|
else
|
|
H.update_inv_r_hand()//To ensure the icon appears in the HUD
|
|
else
|
|
H.update_inv_l_hand()
|
|
log_admin("[key_name(H)] got their cookie, spawned by [key_name(src.owner)]",admin_key=key_name(src.owner),ckey=key_name(H))
|
|
message_admins("[key_name(H)] got their cookie, spawned by [key_name(src.owner)]")
|
|
feedback_inc("admin_cookies_spawned",1)
|
|
to_chat(H, "<span class='notice'>Your prayers have been answered!! You received the <b>best cookie</b>!</span>")
|
|
|
|
else if(href_list["BlueSpaceArtillery"])
|
|
if(!check_rights(R_ADMIN|R_FUN)) return
|
|
|
|
var/mob/living/M = locate(href_list["BlueSpaceArtillery"])
|
|
if(!isliving(M))
|
|
to_chat(usr, "This can only be used on instances of type /mob/living")
|
|
return
|
|
|
|
if(alert(src.owner, "Are you sure you wish to hit [key_name(M)] with Blue Space Artillery?", "Confirm Firing?" , "Yes" , "No") != "Yes")
|
|
return
|
|
|
|
if(BSACooldown)
|
|
to_chat(src.owner, "Standby! Reload cycle in progress! Gunnary crews ready in five seconds!")
|
|
return
|
|
|
|
BSACooldown = 1
|
|
spawn(50)
|
|
BSACooldown = 0
|
|
|
|
to_chat(M, "You've been hit by bluespace artillery!")
|
|
log_admin("[key_name(M)] has been hit by Bluespace Artillery fired by [src.owner]",admin_key=key_name(src.owner),ckey=key_name(M))
|
|
message_admins("[key_name_admin(M)] has been hit by Bluespace Artillery fired by [src.owner]")
|
|
|
|
M.canmove = FALSE
|
|
spawn(20)
|
|
if (M)
|
|
M.canmove = initial(M.canmove)
|
|
|
|
var/turf/simulated/floor/T = get_turf(M)
|
|
if(istype(T))
|
|
if(prob(80)) T.break_tile_to_plating()
|
|
else T.break_tile()
|
|
|
|
playsound(T, 'sound/effects/yamato_fire.ogg', 75, 1)
|
|
|
|
if(M.health == 1)
|
|
M.gib()
|
|
else
|
|
M.adjustBruteLoss( min( 99 , (M.health - 1) ) )
|
|
M.Stun(20)
|
|
M.Weaken(20)
|
|
M.stuttering = 20
|
|
|
|
else if(href_list["CentcommReply"])
|
|
var/mob/living/L = locate(href_list["CentcommReply"])
|
|
if(!istype(L))
|
|
to_chat(usr, "This can only be used on instances of type /mob/living/")
|
|
return
|
|
|
|
if(L.can_centcom_reply())
|
|
var/input = sanitize(input(src.owner, "Please enter a message to reply to [key_name(L)] via their headset.","Outgoing message from Centcomm", ""))
|
|
if(!input) return
|
|
|
|
to_chat(src.owner, "You sent [input] to [L] via a secure channel.")
|
|
log_admin("[src.owner] replied to [key_name(L)]'s Centcomm message with the message [input].",admin_key=key_name(src.owner),ckey=key_name(L))
|
|
message_admins("[src.owner] replied to [key_name(L)]'s Centcom message with: \"[input]\"")
|
|
if(!isAI(L))
|
|
to_chat(L, "<span class='info'>You hear something crackle in your headset for a moment before a voice speaks.</span>")
|
|
to_chat(L, "<span class='info'>Please stand by for a message from Central Command.</span>")
|
|
to_chat(L, "<span class='info'>Message as follows.</span>")
|
|
to_chat(L, "<span class='notice'>[input]</span>")
|
|
to_chat(L, "<span class='info'>Message ends.</span>")
|
|
else
|
|
to_chat(src.owner, "The person you are trying to contact does not have functional radio equipment.")
|
|
|
|
|
|
else if(href_list["SyndicateReply"])
|
|
var/mob/living/carbon/human/H = locate(href_list["SyndicateReply"])
|
|
if(!istype(H))
|
|
to_chat(usr, "This can only be used on instances of type /mob/living/carbon/human")
|
|
return
|
|
if(!istype(H.l_ear, /obj/item/device/radio/headset) && !istype(H.r_ear, /obj/item/device/radio/headset))
|
|
to_chat(usr, "The person you are trying to contact is not wearing a headset")
|
|
return
|
|
|
|
var/input = sanitize(input(src.owner, "Please enter a message to reply to [key_name(H)] via their headset.","Outgoing message from a shadowy figure...", ""))
|
|
if(!input) return
|
|
|
|
to_chat(src.owner, "You sent [input] to [H] via a secure channel.")
|
|
log_admin("[src.owner] replied to [key_name(H)]'s illegal message with the message [input].", admin_key=key_name(src.owner), ckey=key_name(H))
|
|
to_chat(H, "You hear something crackle in your headset for a moment before a voice speaks. \"Please stand by for a message from your benefactor. Message as follows, agent. <b>\"[input]\"</b> Message ends.\"")
|
|
|
|
else if(href_list["AdminFaxView"])
|
|
var/obj/item/fax = locate(href_list["AdminFaxView"])
|
|
if (istype(fax, /obj/item/paper))
|
|
var/obj/item/paper/P = fax
|
|
P.show_content(usr,1)
|
|
else if (istype(fax, /obj/item/photo))
|
|
var/obj/item/photo/H = fax
|
|
H.show(usr)
|
|
else if (istype(fax, /obj/item/paper_bundle))
|
|
//having multiple people turning pages on a paper_bundle can cause issues
|
|
//open a browse window listing the contents instead
|
|
var/data = ""
|
|
var/obj/item/paper_bundle/B = fax
|
|
|
|
for (var/page = 1, page <= B.pages.len, page++)
|
|
var/obj/pageobj = B.pages[page]
|
|
data += "<A href='?src=\ref[src];AdminFaxViewPage=[page];paper_bundle=\ref[B]'>Page [page] - [pageobj.name]</A><BR>"
|
|
|
|
usr << browse(data, "window=[B.name]")
|
|
else
|
|
to_chat(usr, "<span class='warning'>The faxed item is not viewable. This is probably a bug, and should be reported on the tracker: [fax.type]</span>")
|
|
|
|
else if (href_list["AdminFaxViewPage"])
|
|
var/page = text2num(href_list["AdminFaxViewPage"])
|
|
var/obj/item/paper_bundle/bundle = locate(href_list["paper_bundle"])
|
|
|
|
if (!bundle) return
|
|
|
|
if (istype(bundle.pages[page], /obj/item/paper))
|
|
var/obj/item/paper/P = bundle.pages[page]
|
|
P.show_content(src.owner.mob, 1)
|
|
else if (istype(bundle.pages[page], /obj/item/photo))
|
|
var/obj/item/photo/H = bundle.pages[page]
|
|
H.show(src.owner.mob)
|
|
return
|
|
|
|
else if(href_list["CentcommFaxReply"])
|
|
|
|
var/department = null
|
|
if (href_list["faxMachine"])
|
|
var/obj/machinery/photocopier/faxmachine/fax = locate(href_list["faxMachine"])
|
|
department = fax.department
|
|
else
|
|
department = input("Choose the target department.", "Target Department", null) in alldepartments
|
|
|
|
create_admin_fax(department)
|
|
|
|
return
|
|
|
|
else if(href_list["jumpto"])
|
|
if(!check_rights(R_ADMIN)) return
|
|
|
|
var/mob/M = locate(href_list["jumpto"])
|
|
usr.client.jumptomob(M)
|
|
|
|
else if(href_list["getmob"])
|
|
if(!check_rights(R_ADMIN)) return
|
|
|
|
if(alert(usr, "Confirm?", "Message", "Yes", "No") != "Yes") return
|
|
var/mob/M = locate(href_list["getmob"])
|
|
usr.client.Getmob(M)
|
|
|
|
else if(href_list["sendmob"])
|
|
if(!check_rights(R_ADMIN)) return
|
|
|
|
var/mob/M = locate(href_list["sendmob"])
|
|
usr.client.sendmob(M)
|
|
|
|
else if(href_list["narrateto"])
|
|
if(!check_rights(R_ADMIN)) return
|
|
|
|
var/mob/M = locate(href_list["narrateto"])
|
|
usr.client.cmd_admin_direct_narrate(M)
|
|
|
|
else if(href_list["subtlemessage"])
|
|
if(!check_rights(R_MOD,0) && !check_rights(R_ADMIN)) return
|
|
|
|
var/mob/M = locate(href_list["subtlemessage"])
|
|
usr.client.cmd_admin_subtle_message(M)
|
|
|
|
else if(href_list["traitor"])
|
|
if(!check_rights(R_ADMIN|R_MOD)) return
|
|
|
|
if(!ROUND_IS_STARTED)
|
|
alert("The game hasn't started yet!")
|
|
return
|
|
|
|
var/mob/M = locate(href_list["traitor"])
|
|
if(!ismob(M))
|
|
to_chat(usr, "This can only be used on instances of type /mob.")
|
|
return
|
|
show_traitor_panel(M)
|
|
|
|
else if(href_list["create_object"])
|
|
if(!check_rights(R_SPAWN)) return
|
|
return create_object(usr)
|
|
|
|
else if(href_list["create_turf"])
|
|
if(!check_rights(R_SPAWN)) return
|
|
return create_turf(usr)
|
|
|
|
else if(href_list["create_mob"])
|
|
if(!check_rights(R_SPAWN)) return
|
|
return create_mob(usr)
|
|
|
|
else if(href_list["object_list"]) //this is the laggiest thing ever
|
|
if(!check_rights(R_SPAWN)) return
|
|
|
|
if(!config.allow_admin_spawning)
|
|
to_chat(usr, "Spawning of items is not allowed.")
|
|
return
|
|
|
|
var/atom/loc = usr.loc
|
|
|
|
var/dirty_paths
|
|
if (istext(href_list["object_list"]))
|
|
dirty_paths = list(href_list["object_list"])
|
|
else if (istype(href_list["object_list"], /list))
|
|
dirty_paths = href_list["object_list"]
|
|
|
|
var/paths = list()
|
|
var/removed_paths = list()
|
|
|
|
for(var/dirty_path in dirty_paths)
|
|
var/path = text2path(dirty_path)
|
|
if(!path)
|
|
removed_paths += dirty_path
|
|
continue
|
|
else if(!ispath(path, /obj) && !ispath(path, /turf) && !ispath(path, /mob))
|
|
removed_paths += dirty_path
|
|
continue
|
|
else if(ispath(path, /obj/item/gun/energy/pulse))
|
|
if(!check_rights(R_FUN,0))
|
|
removed_paths += dirty_path
|
|
continue
|
|
else if(ispath(path, /obj/item/melee/energy/blade))//Not an item one should be able to spawn./N
|
|
if(!check_rights(R_FUN,0))
|
|
removed_paths += dirty_path
|
|
continue
|
|
else if(ispath(path, /obj/effect/bhole))
|
|
if(!check_rights(R_FUN,0))
|
|
removed_paths += dirty_path
|
|
continue
|
|
paths += path
|
|
|
|
if(!paths)
|
|
alert("The path list you sent is empty")
|
|
return
|
|
if(length(paths) > 5)
|
|
alert("Select fewer object types, (max 5)")
|
|
return
|
|
else if(length(removed_paths))
|
|
alert("Removed:\n" + jointext(removed_paths, "\n"))
|
|
|
|
var/list/offset = text2list(href_list["offset"],",")
|
|
var/number = dd_range(1, 100, text2num(href_list["object_count"]))
|
|
var/X = offset.len > 0 ? text2num(offset[1]) : 0
|
|
var/Y = offset.len > 1 ? text2num(offset[2]) : 0
|
|
var/Z = offset.len > 2 ? text2num(offset[3]) : 0
|
|
var/tmp_dir = href_list["object_dir"]
|
|
var/obj_dir = tmp_dir ? text2num(tmp_dir) : 2
|
|
if(!obj_dir || !(obj_dir in list(1,2,4,8,5,6,9,10)))
|
|
obj_dir = 2
|
|
var/obj_name = sanitize(href_list["object_name"])
|
|
var/where = href_list["object_where"]
|
|
if (!( where in list("onfloor","inhand","inmarked") ))
|
|
where = "onfloor"
|
|
|
|
if( where == "inhand" )
|
|
to_chat(usr, "Support for inhand not available yet. Will spawn on floor.")
|
|
where = "onfloor"
|
|
|
|
if ( where == "inhand" ) //Can only give when human or monkey
|
|
if ( !( ishuman(usr) || issmall(usr) ) )
|
|
to_chat(usr, "Can only spawn in hand when you're a human or a monkey.")
|
|
where = "onfloor"
|
|
else if ( usr.get_active_hand() )
|
|
to_chat(usr, "Your active hand is full. Spawning on floor.")
|
|
where = "onfloor"
|
|
|
|
if ( where == "inmarked" )
|
|
if ( !marked_datum )
|
|
to_chat(usr, "You don't have any object marked. Abandoning spawn.")
|
|
return
|
|
else
|
|
if ( !istype(marked_datum,/atom) )
|
|
to_chat(usr, "The object you have marked cannot be used as a target. Target must be of type /atom. Abandoning spawn.")
|
|
return
|
|
|
|
var/atom/target //Where the object will be spawned
|
|
switch ( where )
|
|
if ( "onfloor" )
|
|
switch (href_list["offset_type"])
|
|
if ("absolute")
|
|
target = locate(0 + X,0 + Y,0 + Z)
|
|
if ("relative")
|
|
target = locate(loc.x + X,loc.y + Y,loc.z + Z)
|
|
if ( "inmarked" )
|
|
target = marked_datum
|
|
|
|
if(target)
|
|
for (var/path in paths)
|
|
for (var/i = 0; i < number; i++)
|
|
if(path in typesof(/turf))
|
|
var/turf/O = target
|
|
var/turf/N = O.ChangeTurf(path)
|
|
if(N)
|
|
if(obj_name)
|
|
N.name = obj_name
|
|
else
|
|
var/atom/O = new path(target)
|
|
if(O)
|
|
O.set_dir(obj_dir)
|
|
if(obj_name)
|
|
O.name = obj_name
|
|
if(istype(O,/mob))
|
|
var/mob/M = O
|
|
M.real_name = obj_name
|
|
|
|
log_and_message_admins("created [number] [english_list(paths)]")
|
|
return
|
|
|
|
else if(href_list["admin_secrets"])
|
|
var/datum/admin_secret_item/item = locate(href_list["admin_secrets"]) in admin_secrets.items
|
|
item.execute(usr)
|
|
|
|
else if(href_list["ac_view_wanted"]) //Admin newscaster Topic() stuff be here
|
|
src.admincaster_screen = 18 //The ac_ prefix before the hrefs stands for AdminCaster.
|
|
src.access_news_network()
|
|
|
|
else if(href_list["ac_set_channel_name"])
|
|
src.admincaster_feed_channel.channel_name = sanitizeSafe(input(usr, "Provide a Feed Channel Name", "Network Channel Handler", ""))
|
|
src.access_news_network()
|
|
|
|
else if(href_list["ac_set_channel_lock"])
|
|
src.admincaster_feed_channel.locked = !src.admincaster_feed_channel.locked
|
|
src.access_news_network()
|
|
|
|
else if(href_list["ac_submit_new_channel"])
|
|
var/check = 0
|
|
for(var/channel in SSnews.network_channels)
|
|
var/datum/feed_channel/FC = SSnews.GetFeedChannel(channel)
|
|
if(FC.channel_name == src.admincaster_feed_channel.channel_name)
|
|
check = 1
|
|
break
|
|
if(src.admincaster_feed_channel.channel_name == "" || src.admincaster_feed_channel.channel_name == "\[REDACTED\]" || check )
|
|
src.admincaster_screen=7
|
|
else
|
|
var/choice = alert("Please confirm Feed channel creation","Network Channel Handler","Confirm","Cancel")
|
|
if(choice=="Confirm")
|
|
SSnews.CreateFeedChannel(admincaster_feed_channel.channel_name, admincaster_signature, admincaster_feed_channel.locked, 1)
|
|
feedback_inc("newscaster_channels",1) //Adding channel to the global network
|
|
log_admin("[key_name_admin(usr)] created command feed channel: [src.admincaster_feed_channel.channel_name]!",admin_key=key_name(usr))
|
|
src.admincaster_screen=5
|
|
src.access_news_network()
|
|
|
|
else if(href_list["ac_set_channel_receiving"])
|
|
var/list/available_channels = list()
|
|
for(var/channel in SSnews.network_channels)
|
|
var/datum/feed_channel/FC = SSnews.GetFeedChannel(channel)
|
|
available_channels += FC.channel_name
|
|
src.admincaster_feed_channel.channel_name = sanitizeSafe(input(usr, "Choose receiving Feed Channel", "Network Channel Handler") in available_channels )
|
|
src.access_news_network()
|
|
|
|
else if(href_list["ac_set_new_message"])
|
|
src.admincaster_feed_message.body = sanitize(input(usr, "Write your Feed story", "Network Channel Handler", ""))
|
|
src.access_news_network()
|
|
|
|
else if(href_list["ac_submit_new_message"])
|
|
if(src.admincaster_feed_message.body =="" || src.admincaster_feed_message.body =="\[REDACTED\]" || src.admincaster_feed_channel.channel_name == "" )
|
|
src.admincaster_screen = 6
|
|
else
|
|
feedback_inc("newscaster_stories",1)
|
|
var/datum/feed_channel/ch = SSnews.GetFeedChannel(src.admincaster_feed_channel.channel_name)
|
|
SSnews.SubmitArticle(src.admincaster_feed_message.body, src.admincaster_signature, ch, null, 1)
|
|
src.admincaster_screen=4
|
|
|
|
log_admin("[key_name_admin(usr)] submitted a feed story to channel: [src.admincaster_feed_channel.channel_name]!",admin_key=key_name(usr))
|
|
src.access_news_network()
|
|
|
|
else if(href_list["ac_create_channel"])
|
|
src.admincaster_screen=2
|
|
src.access_news_network()
|
|
|
|
else if(href_list["ac_create_feed_story"])
|
|
src.admincaster_screen=3
|
|
src.access_news_network()
|
|
|
|
else if(href_list["ac_menu_censor_story"])
|
|
src.admincaster_screen=10
|
|
src.access_news_network()
|
|
|
|
else if(href_list["ac_menu_censor_channel"])
|
|
src.admincaster_screen=11
|
|
src.access_news_network()
|
|
|
|
else if(href_list["ac_menu_wanted"])
|
|
var/already_wanted = 0
|
|
if(SSnews.wanted_issue)
|
|
already_wanted = 1
|
|
|
|
if(already_wanted)
|
|
src.admincaster_feed_message.author = SSnews.wanted_issue.author
|
|
src.admincaster_feed_message.body = SSnews.wanted_issue.body
|
|
src.admincaster_screen = 14
|
|
src.access_news_network()
|
|
|
|
else if(href_list["ac_set_wanted_name"])
|
|
src.admincaster_feed_message.author = sanitize(input(usr, "Provide the name of the Wanted person", "Network Security Handler", ""))
|
|
src.access_news_network()
|
|
|
|
else if(href_list["ac_set_wanted_desc"])
|
|
src.admincaster_feed_message.body = sanitize(input(usr, "Provide the a description of the Wanted person and any other details you deem important", "Network Security Handler", ""))
|
|
src.access_news_network()
|
|
|
|
else if(href_list["ac_submit_wanted"])
|
|
var/input_param = text2num(href_list["ac_submit_wanted"])
|
|
if(src.admincaster_feed_message.author == "" || src.admincaster_feed_message.body == "")
|
|
src.admincaster_screen = 16
|
|
else
|
|
var/choice = alert("Please confirm Wanted Issue [(input_param==1) ? ("creation.") : ("edit.")]","Network Security Handler","Confirm","Cancel")
|
|
if(choice=="Confirm")
|
|
if(input_param==1) //If input_param == 1 we're submitting a new wanted issue. At 2 we're just editing an existing one. See the else below
|
|
var/datum/feed_message/WANTED = new /datum/feed_message
|
|
WANTED.author = src.admincaster_feed_message.author //Wanted name
|
|
WANTED.body = src.admincaster_feed_message.body //Wanted desc
|
|
WANTED.backup_author = src.admincaster_signature //Submitted by
|
|
WANTED.is_admin_message = 1
|
|
SSnews.wanted_issue = WANTED
|
|
for(var/obj/machinery/newscaster/NEWSCASTER in allCasters)
|
|
NEWSCASTER.newsAlert()
|
|
NEWSCASTER.update_icon()
|
|
src.admincaster_screen = 15
|
|
else
|
|
SSnews.wanted_issue.author = src.admincaster_feed_message.author
|
|
SSnews.wanted_issue.body = src.admincaster_feed_message.body
|
|
SSnews.wanted_issue.backup_author = src.admincaster_feed_message.backup_author
|
|
src.admincaster_screen = 19
|
|
log_admin("[key_name_admin(usr)] issued a Station-wide Wanted Notification for [src.admincaster_feed_message.author]!",admin_key=key_name(usr))
|
|
src.access_news_network()
|
|
|
|
else if(href_list["ac_cancel_wanted"])
|
|
var/choice = alert("Please confirm Wanted Issue removal","Network Security Handler","Confirm","Cancel")
|
|
if(choice=="Confirm")
|
|
SSnews.wanted_issue = null
|
|
for(var/obj/machinery/newscaster/NEWSCASTER in allCasters)
|
|
NEWSCASTER.update_icon()
|
|
src.admincaster_screen=17
|
|
src.access_news_network()
|
|
|
|
else if(href_list["ac_censor_channel_author"])
|
|
var/datum/feed_channel/FC = locate(href_list["ac_censor_channel_author"])
|
|
if(FC.author != "<B>\[REDACTED\]</B>")
|
|
FC.backup_author = FC.author
|
|
FC.author = "<B>\[REDACTED\]</B>"
|
|
else
|
|
FC.author = FC.backup_author
|
|
src.access_news_network()
|
|
|
|
else if(href_list["ac_censor_channel_story_author"])
|
|
var/datum/feed_message/MSG = locate(href_list["ac_censor_channel_story_author"])
|
|
if(MSG.author != "<B>\[REDACTED\]</B>")
|
|
MSG.backup_author = MSG.author
|
|
MSG.author = "<B>\[REDACTED\]</B>"
|
|
else
|
|
MSG.author = MSG.backup_author
|
|
src.access_news_network()
|
|
|
|
else if(href_list["ac_censor_channel_story_body"])
|
|
var/datum/feed_message/MSG = locate(href_list["ac_censor_channel_story_body"])
|
|
if(MSG.body != "<B>\[REDACTED\]</B>")
|
|
MSG.backup_body = MSG.body
|
|
MSG.body = "<B>\[REDACTED\]</B>"
|
|
else
|
|
MSG.body = MSG.backup_body
|
|
src.access_news_network()
|
|
|
|
else if(href_list["ac_pick_d_notice"])
|
|
var/datum/feed_channel/FC = locate(href_list["ac_pick_d_notice"])
|
|
src.admincaster_feed_channel = FC
|
|
src.admincaster_screen=13
|
|
src.access_news_network()
|
|
|
|
else if(href_list["ac_toggle_d_notice"])
|
|
var/datum/feed_channel/FC = locate(href_list["ac_toggle_d_notice"])
|
|
FC.censored = !FC.censored
|
|
src.access_news_network()
|
|
|
|
else if(href_list["ac_view"])
|
|
src.admincaster_screen=1
|
|
src.access_news_network()
|
|
|
|
else if(href_list["ac_setScreen"]) //Brings us to the main menu and resets all fields~
|
|
src.admincaster_screen = text2num(href_list["ac_setScreen"])
|
|
if (src.admincaster_screen == 0)
|
|
if(src.admincaster_feed_channel)
|
|
src.admincaster_feed_channel = new /datum/feed_channel
|
|
if(src.admincaster_feed_message)
|
|
src.admincaster_feed_message = new /datum/feed_message
|
|
src.access_news_network()
|
|
|
|
else if(href_list["ac_show_channel"])
|
|
var/datum/feed_channel/FC = locate(href_list["ac_show_channel"])
|
|
src.admincaster_feed_channel = FC
|
|
src.admincaster_screen = 9
|
|
src.access_news_network()
|
|
|
|
else if(href_list["ac_pick_censor_channel"])
|
|
var/datum/feed_channel/FC = locate(href_list["ac_pick_censor_channel"])
|
|
src.admincaster_feed_channel = FC
|
|
src.admincaster_screen = 12
|
|
src.access_news_network()
|
|
|
|
else if(href_list["ac_refresh"])
|
|
src.access_news_network()
|
|
|
|
else if(href_list["ac_set_signature"])
|
|
src.admincaster_signature = sanitize(input(usr, "Provide your desired signature", "Network Identity Handler", ""))
|
|
src.access_news_network()
|
|
|
|
else if(href_list["ac_add_comment"])
|
|
var/com_msg = sanitize(input(usr, "Write your Comment", "Network Comment Handler", "") as message, encode = 0, trim = 0, extra = 0)
|
|
var/datum/feed_message/viewing_story = locate(href_list["ac_story"])
|
|
if(!istype(viewing_story))
|
|
return
|
|
var/datum/feed_comment/comment = new
|
|
comment.author = src.admincaster_signature
|
|
comment.message = com_msg
|
|
comment.posted = "[worldtime2text()]"
|
|
viewing_story.comments += comment
|
|
to_chat(usr, "Comment successfully added!")
|
|
src.admincaster_screen = 20
|
|
src.access_news_network()
|
|
|
|
else if(href_list["ac_view_comments"])
|
|
var/datum/feed_message/viewing_story = locate(href_list["ac_story"])
|
|
if(!istype(viewing_story))
|
|
return
|
|
src.admincaster_screen = 20
|
|
src.admincaster_viewing_message = viewing_story
|
|
src.access_news_network()
|
|
|
|
else if(href_list["ac_like"])
|
|
var/datum/feed_message/viewing_story = locate(href_list["ac_story"])
|
|
if((src.admincaster_signature in viewing_story.interacted) || !istype(viewing_story))
|
|
return
|
|
viewing_story.interacted += src.admincaster_signature
|
|
viewing_story.likes += 1
|
|
src.access_news_network()
|
|
|
|
else if(href_list["ac_dislike"])
|
|
var/datum/feed_message/viewing_story = locate(href_list["ac_story"])
|
|
if((src.admincaster_signature in viewing_story.interacted) || !istype(viewing_story))
|
|
return
|
|
viewing_story.interacted += src.admincaster_signature
|
|
viewing_story.dislikes += 1
|
|
src.access_news_network()
|
|
|
|
else if(href_list["ac_setlikes"])
|
|
var/datum/feed_message/viewing_story = locate(href_list["ac_story"])
|
|
if(!istype(viewing_story))
|
|
return
|
|
var/amount = input(usr, "Provide your desired number of likes", "Network Social Manager", "") as num
|
|
viewing_story.likes = amount
|
|
src.access_news_network()
|
|
else if(href_list["ac_setdislikes"])
|
|
var/datum/feed_message/viewing_story = locate(href_list["ac_story"])
|
|
if(!istype(viewing_story))
|
|
return
|
|
var/amount = input(usr, "Provide your desired number of dislikes", "Network Social Manager", "") as num
|
|
viewing_story.dislikes = amount
|
|
src.access_news_network()
|
|
else if(href_list["ac_censorcomment"])
|
|
var/datum/feed_comment/comment = locate(href_list["ac_comment"])
|
|
if(!istype(comment))
|
|
return
|
|
comment.message = "\[REDACTED\]"
|
|
src.admincaster_screen = 20
|
|
src.access_news_network()
|
|
|
|
else if(href_list["vsc"])
|
|
if(check_rights(R_ADMIN|R_SERVER))
|
|
if(href_list["vsc"] == "airflow")
|
|
vsc.ChangeSettingsDialog(usr,vsc.settings)
|
|
if(href_list["vsc"] == GAS_PHORON)
|
|
vsc.ChangeSettingsDialog(usr,vsc.plc.settings)
|
|
if(href_list["vsc"] == "default")
|
|
vsc.SetDefault(usr)
|
|
|
|
else if(href_list["toglang"])
|
|
if(check_rights(R_SPAWN))
|
|
var/mob/M = locate(href_list["toglang"])
|
|
if(!istype(M))
|
|
to_chat(usr, "[M] is illegal type, must be /mob!")
|
|
return
|
|
var/lang2toggle = href_list["lang"]
|
|
var/datum/language/L = all_languages[lang2toggle]
|
|
|
|
if(L in M.languages)
|
|
if(!M.remove_language(lang2toggle))
|
|
to_chat(usr, "Failed to remove language '[lang2toggle]' from \the [M]!")
|
|
else
|
|
if(!M.add_language(lang2toggle))
|
|
to_chat(usr, "Failed to add language '[lang2toggle]' from \the [M]!")
|
|
|
|
show_player_panel(M)
|
|
|
|
// player info stuff
|
|
|
|
if(href_list["add_player_info"])
|
|
var/key = href_list["add_player_info"]
|
|
var/add = sanitize(input("Add Player Info") as null|text)
|
|
if(!add) return
|
|
|
|
if (config.ban_legacy_system)
|
|
notes_add(key,add,usr)
|
|
else
|
|
notes_add_sql(key, add, usr)
|
|
show_player_info(key)
|
|
|
|
if(href_list["remove_player_info"])
|
|
var/key = href_list["remove_player_info"]
|
|
var/index = text2num(href_list["remove_index"])
|
|
|
|
notes_del(key, index)
|
|
show_player_info(key)
|
|
|
|
if(href_list["notes"])
|
|
var/ckey = href_list["ckey"]
|
|
if(!ckey)
|
|
var/mob/M = locate(href_list["mob"])
|
|
if(ismob(M))
|
|
ckey = M.ckey
|
|
|
|
switch(href_list["notes"])
|
|
if("show")
|
|
show_player_info(ckey)
|
|
if("list")
|
|
PlayerNotesPage(text2num(href_list["index"]))
|
|
return
|
|
|
|
else if(href_list["warnsearchckey"] || href_list["warnsearchadmin"])
|
|
var/adminckey = href_list["warnsearchadmin"]
|
|
var/playerckey = href_list["warnsearchckey"]
|
|
|
|
warning_panel(adminckey, playerckey)
|
|
return
|
|
|
|
else if(href_list["dbwarningedit"])
|
|
var/warningEdit = href_list["dbwarningedit"]
|
|
var/warningId = text2num(href_list["dbwarningid"])
|
|
if(!warningEdit || !warningId)
|
|
return
|
|
|
|
warningsEdit(warningId, warningEdit)
|
|
return
|
|
|
|
else if(href_list["dbnoteedit"])
|
|
var/noteedit = href_list["dbnoteedit"]
|
|
var/noteid = text2num(href_list["dbnoteid"])
|
|
if(!noteedit || !noteid)
|
|
return
|
|
|
|
notes_edit_sql(noteid, noteedit)
|
|
return
|
|
|
|
else if(href_list["notessearchckey"] || href_list["notessearchadmin"])
|
|
var/adminckey = href_list["notessearchadmin"]
|
|
var/playerckey = href_list["notessearchckey"]
|
|
|
|
show_notes_sql(playerckey, adminckey)
|
|
return
|
|
|
|
else if(href_list["admin_wind_player"])
|
|
|
|
var/mob/M = locate(href_list["admin_wind_player"])
|
|
if(!ismob(M))
|
|
to_chat(usr, "This can only be used on instances of type /mob")
|
|
return
|
|
|
|
paralyze_mob(M)
|
|
|
|
else if(href_list["access_control"])
|
|
access_control_topic(href_list["access_control"])
|
|
return
|
|
|
|
/mob/living/proc/can_centcom_reply()
|
|
return 0
|
|
|
|
/mob/living/carbon/human/can_centcom_reply()
|
|
return istype(l_ear, /obj/item/device/radio/headset) || istype(r_ear, /obj/item/device/radio/headset)
|
|
|
|
/mob/living/silicon/ai/can_centcom_reply()
|
|
return common_radio != null && !check_unable(2)
|
|
|
|
/client/proc/extra_admin_link()
|
|
return
|
|
|
|
/atom/proc/extra_admin_link()
|
|
return
|
|
|
|
/mob/extra_admin_link(var/source)
|
|
if(client && eyeobj)
|
|
return "|<A HREF='?[source];adminplayerobservejump=\ref[eyeobj]'>EYE</A>"
|
|
|
|
/mob/abstract/observer/extra_admin_link(var/source)
|
|
if(mind && mind.current)
|
|
return "|<A HREF='?[source];adminplayerobservejump=\ref[mind.current]'>BDY</A>"
|
|
|
|
/proc/admin_jump_link(var/atom/target, var/source)
|
|
if(!target) return
|
|
// The way admin jump links handle their src is weirdly inconsistent...
|
|
if(istype(source, /datum/admins))
|
|
source = "src=\ref[source]"
|
|
else
|
|
source = "_src_=holder"
|
|
|
|
. = "<A HREF='?[source];adminplayerobservejump=\ref[target]'>JMP</A>"
|
|
. += target.extra_admin_link(source)
|
|
|
|
/proc/spawn_humanoid_species_admin(var/mob/user, var/mob/M, var/delmob)
|
|
var/input = input(user, "Select a species:") as null|anything in all_species
|
|
if(!input)
|
|
return
|
|
M.change_mob_type( /mob/living/carbon/human , null, null, delmob, input)
|