From a397c730b5063546cfd140d24bb537c5c49772c9 Mon Sep 17 00:00:00 2001 From: Markolie Date: Sun, 16 Aug 2015 23:28:02 +0200 Subject: [PATCH 01/10] Admin jump overhaul, add watchlist functionality, other admin updates --- SQL/paradise_schema.sql | 17 +++ code/__HELPERS/mobs.dm | 8 +- code/__HELPERS/text.dm | 3 + code/__HELPERS/unsorted.dm | 11 +- code/_globalvars/database.dm | 1 + code/_globalvars/lists/mobs.dm | 1 + code/controllers/configuration.dm | 2 + code/defines/procs/statistics.dm | 4 +- code/game/dna/genes/goon_disabilities.dm | 4 +- code/game/dna/genes/goon_powers.dm | 12 +-- code/game/gamemodes/cult/ritual.dm | 6 +- code/game/gamemodes/nuclear/nuclearbomb.dm | 2 +- code/game/gamemodes/revolution/revolution.dm | 2 +- code/game/machinery/atmoalter/canister.dm | 18 +++- code/game/machinery/computer/robot.dm | 30 +++--- code/game/machinery/computer/shuttle.dm | 12 ++- code/game/machinery/cryopod.dm | 5 +- code/game/machinery/doors/airlock.dm | 4 +- code/game/machinery/kitchen/gibber.dm | 2 +- code/game/machinery/machinery.dm | 2 +- code/game/machinery/syndicatebomb.dm | 6 +- .../machinery/telecomms/telecomunications.dm | 11 +- code/game/mecha/equipment/tools/tools.dm | 2 + code/game/mecha/equipment/weapons/weapons.dm | 9 ++ code/game/objects/effects/effect_system.dm | 2 +- code/game/objects/items.dm | 6 +- code/game/objects/items/devices/aicard.dm | 6 +- code/game/objects/items/devices/pizza_bomb.dm | 4 +- code/game/objects/items/devices/powersink.dm | 2 + .../objects/items/devices/transfer_valve.dm | 10 +- code/game/objects/items/robot/robot_items.dm | 6 +- code/game/objects/items/weapons/explosives.dm | 10 +- .../objects/items/weapons/flamethrower.dm | 1 + .../items/weapons/grenades/chem_grenade.dm | 21 ++-- .../items/weapons/grenades/ghettobomb.dm | 2 +- .../objects/items/weapons/grenades/grenade.dm | 7 +- .../game/objects/items/weapons/hydroponics.dm | 6 +- .../objects/items/weapons/implants/implant.dm | 4 +- .../items/weapons/implants/implanter.dm | 6 +- code/game/objects/items/weapons/legcuffs.dm | 16 +-- code/game/objects/items/weapons/weaponry.dm | 6 +- code/game/objects/structures/false_walls.dm | 8 ++ code/game/objects/structures/mineral_doors.dm | 8 +- code/game/objects/structures/morgue.dm | 48 +++++++++ .../stool_bed_chair_nest/wheelchair.dm | 6 +- code/game/turfs/simulated/walls_mineral.dm | 2 + code/game/verbs/ooc.dm | 9 +- code/modules/admin/DB ban/functions.dm | 18 ++-- code/modules/admin/IsBanned.dm | 2 +- code/modules/admin/admin.dm | 9 +- code/modules/admin/admin_investigate.dm | 2 +- code/modules/admin/admin_ranks.dm | 3 +- code/modules/admin/admin_verbs.dm | 102 +++++++++++++++++- code/modules/admin/banappearance.dm | 4 +- code/modules/admin/banjob.dm | 4 +- code/modules/admin/holder2.dm | 12 ++- .../admin/permissionverbs/permissionedit.dm | 32 ++++-- code/modules/admin/player_panel.dm | 4 +- code/modules/admin/topic.dm | 82 ++++++++++++-- code/modules/admin/verbs/adminhelp.dm | 30 +++++- .../admin/verbs/check_customitem_activity.dm | 4 +- code/modules/admin/verbs/mapping.dm | 46 ++++---- code/modules/assembly/timer.dm | 5 + code/modules/client/client procs.dm | 22 ++-- code/modules/client/preferences_mysql.dm | 6 +- code/modules/mining/mine_turfs.dm | 2 +- code/modules/mining/ore.dm | 4 +- code/modules/mob/dead/observer/observer.dm | 16 ++- code/modules/mob/living/carbon/carbon.dm | 6 +- .../mob/living/carbon/human/human_defense.dm | 15 ++- code/modules/mob/living/living_defense.dm | 9 +- .../modules/mob/living/simple_animal/borer.dm | 4 +- code/modules/mob/login.dm | 27 +---- code/modules/mob/logout.dm | 27 +---- code/modules/mob/mob_helpers.dm | 4 +- code/modules/mob/new_player/login.dm | 2 + code/modules/mob/new_player/new_player.dm | 6 +- code/modules/mob/new_player/poll.dm | 42 ++++---- code/modules/organs/organ.dm | 6 +- code/modules/power/singularity/emitter.dm | 12 +-- .../particle_accelerator/particle_control.dm | 17 +-- code/modules/power/supermatter/supermatter.dm | 2 +- code/modules/projectiles/projectile.dm | 10 +- code/modules/reagents/dartgun.dm | 6 +- .../reagents/reagent_containers/dropper.dm | 10 +- .../reagents/reagent_containers/drugs.dm | 4 +- .../reagent_containers/food/condiment.dm | 6 +- .../reagent_containers/food/drinks.dm | 6 +- .../reagent_containers/food/drinks/bottle.dm | 6 +- .../reagent_containers/glass_containers.dm | 10 +- .../reagents/reagent_containers/hypospray.dm | 6 +- .../reagents/reagent_containers/pill.dm | 6 +- .../reagent_containers/robodropper.dm | 10 +- .../reagents/reagent_containers/spray.dm | 8 +- .../reagents/reagent_containers/syringes.dm | 12 +-- code/modules/recycling/disposal.dm | 6 +- code/modules/research/message_server.dm | 4 +- code/modules/scripting/IDE.dm | 3 +- .../security levels/keycard authentication.dm | 2 +- code/modules/surgery/braincore.dm | 6 +- code/modules/vehicle/train/train.dm | 2 +- .../modules/vehicle/train/trains/ambulance.dm | 6 +- code/modules/vehicle/train/trains/janicart.dm | 6 +- config/example/dbconfig.txt | 1 + 104 files changed, 707 insertions(+), 387 deletions(-) diff --git a/SQL/paradise_schema.sql b/SQL/paradise_schema.sql index c05e74a467a..c9e1dc00373 100644 --- a/SQL/paradise_schema.sql +++ b/SQL/paradise_schema.sql @@ -438,4 +438,21 @@ CREATE TABLE `whitelist` ( /*!40101 SET COLLATION_CONNECTION=@OLD_COLLATION_CONNECTION */; /*!40111 SET SQL_NOTES=@OLD_SQL_NOTES */; +-- +-- Table structure for table `watch` +-- + +DROP TABLE IF EXISTS `erro_watch`; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8 */; +CREATE TABLE `erro_watch` ( + `id` int(11) NOT NULL AUTO_INCREMENT, + `ckey` varchar(32) NOT NULL, + `reason` text NOT NULL, + PRIMARY KEY (`id`) +) ENGINE=InnoDB DEFAULT CHARSET=latin1; +/*!40101 SET character_set_client = @saved_cs_client */; + +-- Dump completed on 2013-03-24 18:02:35 + -- Dump completed on 2015-05-28 19:57:44 diff --git a/code/__HELPERS/mobs.dm b/code/__HELPERS/mobs.dm index 4658e6691ea..a37ab3f94d2 100644 --- a/code/__HELPERS/mobs.dm +++ b/code/__HELPERS/mobs.dm @@ -136,14 +136,14 @@ proc/add_logs(mob/target, mob/user, what_done, var/object=null, var/addition=nul if(!user) return if(ismob(user)) - user.attack_log += text("\[[time_stamp()]\] Has [what_done] [target.name][ismob(target) ? "([target.ckey])" : ""][object ? " with [object]" : " "][addition]") + user.attack_log += text("\[[time_stamp()]\] Has [what_done] [key_name(target)][object ? " with [object]" : " "][addition]") if(ismob(target)) - target.attack_log += text("\[[time_stamp()]\] Has been [what_done] by [user.name][ismob(user) ? "([user.ckey])" : ""][object ? " with [object]" : " "][addition]") + target.attack_log += text("\[[time_stamp()]\] Has been [what_done] by [key_name(user)][object ? " with [object]" : " "][addition]") if(admin) - log_attack("[user.name][ismob(user) ? "([user.ckey])" : ""] [what_done] [target.name][ismob(target) ? "([target.ckey])" : ""][object ? " with [object]" : " "][addition]") + log_attack("[key_name(user)] [what_done] [key_name(target)][object ? " with [object]" : " "][addition]") if(target.client) if(what_done in ignore) return if(target == user)return if(!admin) return - msg_admin_attack("[user.name][ismob(user) ? "([user.ckey])" : ""][isAntag(user) ? "(ANTAG)" : ""] [what_done] [target.name][ismob(target) ? "([target.ckey])" : ""][object ? " with [object]" : " "][addition](JMP)") + msg_admin_attack("[key_name_admin(user)](?) ([admin_jump_link(user, "holder")]) [what_done] [key_name_admin(target)][object ? " with [object]" : " "][addition]") diff --git a/code/__HELPERS/text.dm b/code/__HELPERS/text.dm index 2b840e6759c..8deb1acbc16 100644 --- a/code/__HELPERS/text.dm +++ b/code/__HELPERS/text.dm @@ -18,6 +18,9 @@ var/sqltext = dbcon.Quote(t); return copytext(sqltext, 2, lentext(sqltext));//Quote() adds quotes around input, we already do that +/proc/format_table_name(table as text) + return sqlfdbktableprefix + table + /* * Text sanitization */ diff --git a/code/__HELPERS/unsorted.dm b/code/__HELPERS/unsorted.dm index e5219516f27..713c2965335 100644 --- a/code/__HELPERS/unsorted.dm +++ b/code/__HELPERS/unsorted.dm @@ -653,7 +653,16 @@ Turf and target are seperate in case you want to teleport some distance from a t return . /proc/key_name_admin(var/whom, var/include_name = 1) - return key_name(whom, 1, include_name) + var/message = "[key_name(whom, 1, include_name)][isAntag(whom) ? " (ANTAG)" : ""](?) ([admin_jump_link(whom, "holder")])" + return message + +/proc/get_mob_by_ckey(key) + if(!key) + return + var/list/mobs = sortmobs() + for(var/mob/M in mobs) + if(M.ckey == key) + return M // Returns the atom sitting on the turf. // For example, using this on a disk, which is in a bag, on a mob, will return the mob because it's on the turf. diff --git a/code/_globalvars/database.dm b/code/_globalvars/database.dm index 437f479f99c..987b31b9ff7 100644 --- a/code/_globalvars/database.dm +++ b/code/_globalvars/database.dm @@ -9,6 +9,7 @@ var/sqlpass = "example" var/sqlfdbkdb = "paradise" var/sqlfdbklogin = "root" var/sqlfdbkpass = "example" +var/sqlfdbktableprefix = "erro_" //backwords compatibility with downstream server hosts var/sqllogging = 0 // Should we log deaths, population stats, etc? diff --git a/code/_globalvars/lists/mobs.dm b/code/_globalvars/lists/mobs.dm index b2ddadd7404..9d2e9fc5c89 100644 --- a/code/_globalvars/lists/mobs.dm +++ b/code/_globalvars/lists/mobs.dm @@ -8,6 +8,7 @@ var/global/list/whitelisted_species = list() var/list/clients = list() //list of all clients var/list/admins = list() //list of all clients whom are admins +var/list/deadmins = list() //list of all clients who have used the de-admin verb. var/list/directory = list() //list of all ckeys with associated client //Since it didn't really belong in any other category, I'm putting this here diff --git a/code/controllers/configuration.dm b/code/controllers/configuration.dm index c727a275a0b..f1be6012a4a 100644 --- a/code/controllers/configuration.dm +++ b/code/controllers/configuration.dm @@ -630,6 +630,8 @@ sqlfdbklogin = value if ("feedback_password") sqlfdbkpass = value + if("feedback_tableprefix") + sqlfdbktableprefix = value if ("enable_stat_tracking") sqllogging = 1 else diff --git a/code/defines/procs/statistics.dm b/code/defines/procs/statistics.dm index 91d065e5279..52c0af1af82 100644 --- a/code/defines/procs/statistics.dm +++ b/code/defines/procs/statistics.dm @@ -140,7 +140,7 @@ proc/sql_commit_feedback() log_game("SQL ERROR during feedback reporting. Failed to connect.") else - var/DBQuery/max_query = dbcon.NewQuery("SELECT MAX(roundid) AS max_round_id FROM erro_feedback") + var/DBQuery/max_query = dbcon.NewQuery("SELECT MAX(roundid) AS max_round_id FROM [format_table_name("feedback")]") max_query.Execute() var/newroundid @@ -160,7 +160,7 @@ proc/sql_commit_feedback() var/variable = item.get_variable() var/value = item.get_value() - var/DBQuery/query = dbcon.NewQuery("INSERT INTO erro_feedback (id, roundid, time, variable, value) VALUES (null, [newroundid], Now(), '[variable]', '[value]')") + var/DBQuery/query = dbcon.NewQuery("INSERT INTO [format_table_name("feedback")] (id, roundid, time, variable, value) VALUES (null, [newroundid], Now(), '[variable]', '[value]')") if(!query.Execute()) var/err = query.ErrorMsg() log_game("SQL ERROR during death reporting. Error : \[[err]\]\n") \ No newline at end of file diff --git a/code/game/dna/genes/goon_disabilities.dm b/code/game/dna/genes/goon_disabilities.dm index db34ccbdbbb..3762e0a4e54 100644 --- a/code/game/dna/genes/goon_disabilities.dm +++ b/code/game/dna/genes/goon_disabilities.dm @@ -335,8 +335,8 @@ var/mob/living/carbon/L = usr if(L) - usr.attack_log += text("\[[time_stamp()]\] [usr.real_name] ([usr.ckey]) cast the spell [name] on [L.real_name] ([L.ckey]).") - msg_admin_attack("[usr.real_name] ([usr.ckey])[isAntag(usr) ? "(ANTAG)" : ""] has cast the spell [name] on [L.real_name] ([L.ckey]) (JMP)") + usr.attack_log += text("\[[time_stamp()]\] [key_name(usr)] cast the spell [name] on [key_name(L)]") + msg_admin_attack("[key_name_admin(usr)](?) ([admin_jump_link(usr, "holder")]) has cast the spell [name] on [key_name_admin(L)]") L.adjust_fire_stacks(0.5) L.visible_message("\red [L.name] suddenly bursts into flames!") diff --git a/code/game/dna/genes/goon_powers.dm b/code/game/dna/genes/goon_powers.dm index 452a8cd6c8d..63567f802c9 100644 --- a/code/game/dna/genes/goon_powers.dm +++ b/code/game/dna/genes/goon_powers.dm @@ -169,13 +169,13 @@ if(H.internal) H.visible_message("\red [usr] sprays a cloud of fine ice crystals, engulfing [H]!", "[usr] sprays a cloud of fine ice crystals over your [H.head]'s visor.") - log_admin("[ckey(usr.key)] has used cryokinesis on [ckey(C.key)], internals yes, suit yes") - msg_admin_attack("[usr.real_name] ([usr.ckey])[isAntag(usr) ? "(ANTAG)" : ""] has cast cryokinesis on [C.real_name] ([C.ckey]), (JMP)") + log_admin("[key_name(usr)] has used cryokinesis on [key_name(C)] while wearing internals and a suit") + msg_admin_attack("[key_name_admin(usr)](?) ([admin_jump_link(usr, "holder")]) has cast cryokinesis on [key_name_admin(C)]") else H.visible_message("\red [usr] sprays a cloud of fine ice crystals engulfing, [H]!", "[usr] sprays a cloud of fine ice crystals cover your [H.head]'s visor and make it into your air vents!.") - log_admin("[usr.real_name] ([ckey(usr.key)]) has used cryokinesis on [C.real_name] ([ckey(C.key)]), ()") - msg_admin_attack("[usr.real_name] ([usr.ckey])[isAntag(usr) ? "(ANTAG)" : ""] has cast cryokinesis on [C.real_name] ([C.ckey]), (JMP)") + log_admin("[key_name(usr)] has used cryokinesis on [key_name(C)]") + msg_admin_attack("[key_name_admin(usr)](?) ([admin_jump_link(usr, "holder")]) has cast cryokinesis on [key_name_admin(C)]") H.bodytemperature = max(0, H.bodytemperature - 50) H.adjustFireLoss(5) if(!handle_suit) @@ -184,8 +184,8 @@ C.ExtinguishMob() C.visible_message("\red [usr] sprays a cloud of fine ice crystals, engulfing [C]!") - log_admin("[ckey(usr.key)] has used cryokinesis on [ckey(C.key)], internals no, suit no") - msg_admin_attack("[usr.real_name] ([usr.ckey])[isAntag(usr) ? "(ANTAG)" : ""] has cast cryokinesis on [C.real_name] ([C.ckey]), (JMP)") + log_admin("[key_name(usr)] has used cryokinesis on [key_name(C)] without internals or a suit") + msg_admin_attack("[key_name_admin(usr)](?) ([admin_jump_link(usr, "holder")]) has cast cryokinesis on [key_name_admin(C)]") //playsound(usr.loc, 'bamf.ogg', 50, 0) diff --git a/code/game/gamemodes/cult/ritual.dm b/code/game/gamemodes/cult/ritual.dm index 98451fe2ee7..4727b93ea9f 100644 --- a/code/game/gamemodes/cult/ritual.dm +++ b/code/game/gamemodes/cult/ritual.dm @@ -330,9 +330,9 @@ var/engwords = list("travel", "blood", "join", "hell", "destroy", "technology", attack(mob/living/M as mob, mob/living/user as mob) - M.attack_log += text("\[[time_stamp()]\] Has had the [name] used on him by [user.name] ([user.ckey])") - user.attack_log += text("\[[time_stamp()]\] Used [name] on [M.name] ([M.ckey])") - msg_admin_attack("[user.name] ([user.ckey])[isAntag(user) ? "(ANTAG)" : ""] used [name] on [M.name] ([M.ckey]) (JMP)") + M.attack_log += text("\[[time_stamp()]\] Has had the [name] used on him by [key_name(user)]") + user.attack_log += text("\[[time_stamp()]\] Used [name] on [key_name(M)]") + msg_admin_attack("[key_name_admin(user)](?) ([admin_jump_link(user, "holder")]) used [name] on [key_name_admin(M)]") if(!iscarbon(M)) M.LAssailant = null else diff --git a/code/game/gamemodes/nuclear/nuclearbomb.dm b/code/game/gamemodes/nuclear/nuclearbomb.dm index e9752e1e65b..6ea43ceac50 100644 --- a/code/game/gamemodes/nuclear/nuclearbomb.dm +++ b/code/game/gamemodes/nuclear/nuclearbomb.dm @@ -328,7 +328,7 @@ obj/machinery/nuclearbomb/proc/nukehack_win(mob/user as mob) lastentered = text("[]", href_list["type"]) if (text2num(lastentered) == null) var/turf/LOC = get_turf(usr) - message_admins("[key_name_admin(usr)] tried to exploit a nuclear bomb by entering non-numerical codes: [lastentered]! ([LOC ? "JMP" : "null"])", 0) + message_admins("[key_name_admin(usr)] ([admin_jump_link(usr, "holder")]) tried to exploit a nuclear bomb by entering non-numerical codes: [lastentered]! ([LOC ? "JMP" : "null"])", 0) log_admin("EXPLOIT: [key_name(usr)] tried to exploit a nuclear bomb by entering non-numerical codes: [lastentered]!") else src.code += lastentered diff --git a/code/game/gamemodes/revolution/revolution.dm b/code/game/gamemodes/revolution/revolution.dm index 591d5f8f5ba..63b36a11e35 100644 --- a/code/game/gamemodes/revolution/revolution.dm +++ b/code/game/gamemodes/revolution/revolution.dm @@ -250,7 +250,7 @@ if(beingborged) rev_mind.current << "\red The frame's firmware detects and deletes your neural reprogramming! You remember nothing from the moment you were flashed until now." - + message_admins("[key_name_admin(rev_mind.current)] ? (FLW) has been borged while being a member of the revolution.") else rev_mind.current << "\red You have been brainwashed! You are no longer a revolutionary! Your memory is hazy from the time you were a rebel...the only thing you remember is the name of the one who brainwashed you..." diff --git a/code/game/machinery/atmoalter/canister.dm b/code/game/machinery/atmoalter/canister.dm index 27a825e2d5c..ab9c6353c7c 100644 --- a/code/game/machinery/atmoalter/canister.dm +++ b/code/game/machinery/atmoalter/canister.dm @@ -438,16 +438,26 @@ update_flag menu = text2num(href_list["mode_target"]) if(href_list["toggle"]) + var/logmsg if (valve_open) if (holding) - release_log += "Valve was closed by [usr] ([usr.ckey]), stopping the transfer into the [holding]
" + logmsg = "Valve was closed by [usr] ([usr.ckey]), stopping the transfer into the [holding]
" else - release_log += "Valve was closed by [usr] ([usr.ckey]), stopping the transfer into the air
" + logmsg = "Valve was closed by [usr] ([usr.ckey]), stopping the transfer into the air
" else if (holding) - release_log += "Valve was opened by [usr] ([usr.ckey]), starting the transfer into the [holding]
" + logmsg = "Valve was opened by [usr] ([usr.ckey]), starting the transfer into the [holding]
" else - release_log += "Valve was opened by [usr] ([usr.ckey]), starting the transfer into the air
" + logmsg = "Valve was opened by [usr] ([usr.ckey]), starting the transfer into the air
" + if(air_contents.toxins > 0) + message_admins("[key_name_admin(usr)](?) ([admin_jump_link(usr, "holder")]) opened a canister that contains plasma! (JMP)") + log_admin("[key_name(usr)] opened a canister that contains plasma at [x], [y], [z]") + var/datum/gas/sleeping_agent = locate(/datum/gas/sleeping_agent) in air_contents.trace_gases + if(sleeping_agent && (sleeping_agent.moles > 1)) + message_admins("[key_name_admin(usr)](?) ([admin_jump_link(usr, "holder")]) opened a canister that contains N2O! (JMP)") + log_admin("[key_name(usr)] opened a canister that contains N2O at [x], [y], [z]") + investigate_log(logmsg, "atmos") + release_log += logmsg valve_open = !valve_open if (href_list["remove_tank"]) diff --git a/code/game/machinery/computer/robot.dm b/code/game/machinery/computer/robot.dm index ba3727ee30b..d352d969de3 100644 --- a/code/game/machinery/computer/robot.dm +++ b/code/game/machinery/computer/robot.dm @@ -72,14 +72,14 @@ target << "Extreme danger. Termination codes detected. Scrambling security codes and automatic AI unlink triggered." target.ResetSecurityCodes() else - message_admins("\blue [key_name_admin(usr)] detonated [target.name]!") - log_game("\blue [key_name_admin(usr)] detonated [target.name]!") + message_admins("[key_name_admin(usr)] ([admin_jump_link(usr, "holder")]) detonated [key_name(target, target.client)](JMP)!") + log_game("\[key_name(usr)] detonated [key_name(target)]!") target << "Self-destruct command received." + if(target.connected_ai) + target.connected_ai << "

ALERT - Cyborg detonation detected: [target.name]
" spawn(10) target.self_destruct() - - // Locks or unlocks the cyborg else if (href_list["lockdown"]) var/mob/living/silicon/robot/target = get_cyborg_by_name(href_list["lockdown"]) @@ -101,15 +101,13 @@ if(!target || !istype(target)) return - message_admins("\blue [key_name_admin(usr)] [target.canmove ? "locked down" : "released"] [target.name]!") - log_game("[key_name(usr)] [target.canmove ? "locked down" : "released"] [target.name]!") + message_admins("[key_name_admin(usr)] ([admin_jump_link(usr, "holder")]) [target.canmove ? "locked down" : "released"] [key_name(target, target.client)]([admin_jump_link(usr, "holder")])!") + log_game("[key_name(usr)] [target.canmove ? "locked down" : "released"] [key_name(target)]!") target.canmove = !target.canmove - if (target.lockcharge) - target.lockcharge = !target.lockcharge - target << "Your lockdown has been lifted!" - else - target.lockcharge = !target.lockcharge - target << "You have been locked down!" + target.lockcharge = !target.lockcharge + target << "[!target.lockcharge ? "Your lockdown has been lifted!" : "You have been locked down!"]" + if(target.connected_ai) + target.connected_ai << "[!target.lockcharge ? "NOTICE - Cyborg lockdown lifted" : "ALERT - Cyborg lockdown detected"]: [target.name]
" // Remotely hacks the cyborg. Only antag AIs can do this and only to linked cyborgs. else if (href_list["hack"]) @@ -160,9 +158,9 @@ user << "Self-destruct aborted - safety active" return - message_admins("\blue [key_name_admin(usr)] detonated all cyborgs!") - log_game("[key_name(usr)] detonated all cyborgs!") - + message_admins("[key_name_admin(usr)] ([admin_jump_link(usr, "holder")]) detonated all cyborgs!") + log_game("\[key_name(usr)] detonated all cyborgs!") + for(var/mob/living/silicon/robot/R in mob_list) if(istype(R, /mob/living/silicon/robot/drone)) continue @@ -170,6 +168,8 @@ if(R.scrambledcodes) continue R << "Self-destruct command received." + if(R.connected_ai) + R.connected_ai << "

ALERT - Cyborg detonation detected: [R.name]
" spawn(10) R.self_destruct() diff --git a/code/game/machinery/computer/shuttle.dm b/code/game/machinery/computer/shuttle.dm index d9f3dcd996e..20d8f30f044 100644 --- a/code/game/machinery/computer/shuttle.dm +++ b/code/game/machinery/computer/shuttle.dm @@ -37,12 +37,12 @@ src.authorized -= W:registered_name src.authorized += W:registered_name if (src.auth_need - src.authorized.len > 0) - message_admins("[key_name_admin(user)] has authorized early shuttle launch") - log_game("[user.ckey] has authorized early shuttle launch") + message_admins("[key_name_admin(user.client)](?) ([admin_jump_link(user, "holder")]) has authorized early shuttle launch ",0,1) + log_game("[key_name(user)] has authorized early shuttle launch in ([x],[y],[z])") world << text("\blue Alert: [] authorizations needed until shuttle is launched early", src.auth_need - src.authorized.len) else - message_admins("[key_name_admin(user)] has launched the shuttle") - log_game("[user.ckey] has launched the shuttle early") + message_admins("[key_name_admin(user.client)](?) ([admin_jump_link(user, "holder")]) has launched the emergency shuttle before launch.",0,1) + log_game("[key_name(user)] has launched the emergency shuttle before launch in ([x],[y],[z]).") world << "\blue Alert: Shuttle launch time shortened to 10 seconds!" emergency_shuttle.set_launch_countdown(10) //src.authorized = null @@ -59,13 +59,15 @@ src.authorized = list( ) return - emag_act(user as mob) + emag_act(mob/user as mob) if (!emagged) var/choice = alert(user, "Would you like to launch the shuttle?","Shuttle control", "Launch", "Cancel") if(!emagged && !emergency_shuttle.location()) switch(choice) if("Launch") + message_admins("[key_name_admin(user.client)](?) ([admin_jump_link(user, "holder")]) has emagged the emergency shuttle before launch.",0,1) + log_game("[key_name(user)] has emagged the emergency shuttle in ([x],[y],[z]) before launch.") world << "\blue Alert: Shuttle launch time shortened to 10 seconds!" emergency_shuttle.set_launch_countdown(10) emagged = 1 diff --git a/code/game/machinery/cryopod.dm b/code/game/machinery/cryopod.dm index d52c6d2adf7..8fbcb1de902 100644 --- a/code/game/machinery/cryopod.dm +++ b/code/game/machinery/cryopod.dm @@ -488,9 +488,8 @@ Gh << "Warning: Your body has entered cryostorage." // Book keeping! - var/turf/location = get_turf(src) - log_admin("[key_name_admin(M)] has entered a stasis pod. (JMP)") - message_admins("[key_name_admin(M)] has entered a stasis pod.") + log_admin("[key_name(M)] has entered a stasis pod.") + message_admins("[key_name_admin(user)](?) ([admin_jump_link(user, "holder")]) has entered a stasis pod. (JMP)") //Despawning occurs when process() is called with an occupant without a client. src.add_fingerprint(M) diff --git a/code/game/machinery/doors/airlock.dm b/code/game/machinery/doors/airlock.dm index 6eaa50bc1f1..d32ca1a1a93 100644 --- a/code/game/machinery/doors/airlock.dm +++ b/code/game/machinery/doors/airlock.dm @@ -851,7 +851,9 @@ About the new airlock wires panel: return /obj/machinery/door/airlock/plasma/attackby(C as obj, mob/user as mob, params) - if(C) + if(is_hot(C) > 300) + message_admins("Plasma airlock ignited by [key_name_admin(user)](?) ([admin_jump_link(user, "holder")]) in ([x],[y],[z] - JMP)") + log_game("Plasma wall ignited by [key_name(user)] in ([x],[y],[z])") ignite(is_hot(C)) ..() diff --git a/code/game/machinery/kitchen/gibber.dm b/code/game/machinery/kitchen/gibber.dm index df6727ce3f8..d84a9186ab2 100644 --- a/code/game/machinery/kitchen/gibber.dm +++ b/code/game/machinery/kitchen/gibber.dm @@ -339,7 +339,7 @@ return if(UserOverride) - msg_admin_attack("[occupant] ([occupant.ckey]) was gibbed by an autogibber (\the [src]) at (JMP)") + msg_admin_attack("[key_name_admin(occupant)](?) ([admin_jump_link(occupant, "holder")]) was gibbed by an autogibber (\the [src]) (JMP)") if(src.operating) return diff --git a/code/game/machinery/machinery.dm b/code/game/machinery/machinery.dm index eda2aeeda99..b964ff0baf0 100644 --- a/code/game/machinery/machinery.dm +++ b/code/game/machinery/machinery.dm @@ -220,7 +220,7 @@ Class Procs: var/re_init=0 if("set_tag" in href_list) if(!(href_list["set_tag"] in settagwhitelist))//I see you're trying Href exploits, I see you're failing, I SEE ADMIN WARNING. (seriously though, this is a powerfull HREF, I originally found this loophole, I'm not leaving it in on my PR) - message_admins("set_tag HREF (var attempted to edit: [href_list["set_tag"]]) exploit attempted by [key_name(user, user.client)] (?) on [src] ([x],[y],[z] - JMP)") + message_admins("set_tag HREF (var attempted to edit: [href_list["set_tag"]]) exploit attempted by [key_name_admin(user)](?) ([admin_jump_link(user, "holder")]) on [src] (JMP)") return 1 if(!(href_list["set_tag"] in vars)) usr << "Something went wrong: Unable to find [href_list["set_tag"]] in vars!" diff --git a/code/game/machinery/syndicatebomb.dm b/code/game/machinery/syndicatebomb.dm index 7ad9f121d06..2504e4349b7 100644 --- a/code/game/machinery/syndicatebomb.dm +++ b/code/game/machinery/syndicatebomb.dm @@ -138,7 +138,7 @@ var/turf/bombturf = get_turf(src) var/area/A = get_area(bombturf) if(payload && !istype(payload, /obj/item/weapon/bombcore/training)) - msg_admin_attack("[key_name(user)][isAntag(user) ? "(ANTAG)" : ""]? has primed a [name] ([payload]) for detonation at [A.name] (JMP).") + msg_admin_attack("[key_name_admin(user)]? ([admin_jump_link(user, "holder")]) has primed a [name] ([payload]) for detonation at [A.name] (JMP).") log_game("[key_name(user)] has primed a [name] ([payload]) for detonation at [A.name]([bombturf.x],[bombturf.y],[bombturf.z])") payload.adminlog = "The [src.name] that [key_name(user)] had primed detonated!" @@ -311,10 +311,10 @@ var/turf/T = get_turf(src) var/area/A = get_area(T) detonated-- - var/log_str = "[key_name(user)]? has remotely detonated [detonated ? "syndicate bombs" : "a syndicate bomb"] using a [name] at [A.name] (JMP)." + var/log_str = "[key_name_admin(user)]? has remotely detonated [detonated ? "syndicate bombs" : "a syndicate bomb"] using a [name] at [A.name] (JMP)." bombers += log_str message_admins(log_str) - log_game("[key_name(user)] has remotely detonated [detonated ? "syndicate bombs" : "a syndicate bomb"] using a [name] at [A.name]([T.x],[T.y],[T.z])") + log_game("[key_name(user)] ([admin_jump_link(user, "holder")]) has remotely detonated [detonated ? "syndicate bombs" : "a syndicate bomb"] using a [name] at [A.name]([T.x],[T.y],[T.z])") detonated = 0 existant = 0 cooldown = 1 diff --git a/code/game/machinery/telecomms/telecomunications.dm b/code/game/machinery/telecomms/telecomunications.dm index 3657410b400..5f01ae0b7dc 100644 --- a/code/game/machinery/telecomms/telecomunications.dm +++ b/code/game/machinery/telecomms/telecomunications.dm @@ -604,8 +604,9 @@ var/global/list/obj/machinery/telecomms/telecomms_list = list() if(istext(t)) rawcode = t -/obj/machinery/telecomms/server/proc/compile() +/obj/machinery/telecomms/server/proc/compile(mob/user as mob) if(Compiler) + admin_log(user) return Compiler.Compile(rawcode) /obj/machinery/telecomms/server/proc/update_logs() @@ -627,8 +628,14 @@ var/global/list/obj/machinery/telecomms/telecomms_list = list() log_entries.Add(log) update_logs() +/obj/machinery/telecomms/server/proc/admin_log(var/mob/mob) - + var/msg="[key_name(mob)] has compiled a script to server [src]:" + diary << msg + diary << rawcode + src.investigate_log("[msg]
[rawcode]", "ntsl") + if(length(rawcode)) // Let's not bother the admins for empty code. + message_admins("[key_name_admin(mob)] ([admin_jump_link(usr, "holder")]) has compiled and uploaded a NTSL script to [src.id]",0,1) // Simple log entry datum diff --git a/code/game/mecha/equipment/tools/tools.dm b/code/game/mecha/equipment/tools/tools.dm index 90db7efaec9..458c8a369cb 100644 --- a/code/game/mecha/equipment/tools/tools.dm +++ b/code/game/mecha/equipment/tools/tools.dm @@ -443,6 +443,8 @@ P.failchance = 0 P.icon_state = "anom" P.name = "wormhole" + message_admins("[key_name_admin(chassis.occupant, chassis.occupant.client)](?) (FLW) used a Wormhole Generator in ([T.x],[T.y],[T.z] - JMP)",0,1) + log_game("[key_name(chassis.occupant)] used a Wormhole Generator in ([T.x],[T.y],[T.z])") do_after_cooldown() src = null spawn(rand(150,300)) diff --git a/code/game/mecha/equipment/weapons/weapons.dm b/code/game/mecha/equipment/weapons/weapons.dm index 1aec90c414f..1727a4f25fa 100644 --- a/code/game/mecha/equipment/weapons/weapons.dm +++ b/code/game/mecha/equipment/weapons/weapons.dm @@ -166,6 +166,9 @@ chassis.use_power(energy_drain) log_message("Honked from [src.name]. HONK!") + var/turf/T = get_turf(src) + message_admins("[key_name_admin(chassis.occupant, chassis.occupant.client)](?) (FLW) used a Mecha Honker in ([T.x],[T.y],[T.z] - JMP)",0,1) + log_game("[chassis.occupant.ckey]([chassis.occupant]) used a Mecha Honker in ([T.x],[T.y],[T.z])") do_after_cooldown() return @@ -238,6 +241,9 @@ sleep(2) set_ready_state(0) log_message("Fired from [src.name], targeting [target].") + var/turf/T = get_turf(src) + message_admins("[key_name(chassis.occupant, chassis.occupant.client)](?) fired a [src] in ([T.x],[T.y],[T.z] - JMP)",0,1) + log_game("[key_name(chassis.occupant)] fired a [src] ([T.x],[T.y],[T.z])") do_after_cooldown() return @@ -351,6 +357,9 @@ M.throw_at(target, missile_range, missile_speed, chassis) projectiles-- log_message("Fired from [src.name], targeting [target].") + var/turf/T = get_turf(src) + message_admins("[key_name(chassis.occupant, chassis.occupant.client)](?) (FLW) fired a [src] in ([T.x],[T.y],[T.z] - JMP)",0,1) + log_game("[key_name(chassis.occupant)] fired a [src] ([T.x],[T.y],[T.z])") do_after_cooldown() return diff --git a/code/game/objects/effects/effect_system.dm b/code/game/objects/effects/effect_system.dm index 1d25b822d9b..df860d5b70f 100644 --- a/code/game/objects/effects/effect_system.dm +++ b/code/game/objects/effects/effect_system.dm @@ -483,7 +483,7 @@ steam.start() -- spawns the effect var/mob/M = get_mob_by_key(carry.my_atom.fingerprintslast) var/more = "" if(M) - more = "(?)" + more = "(?) ([admin_jump_link(M, "holder")]) " msg_admin_attack("A chemical smoke reaction has taken place in ([whereLink])[contained]. Last associated key is [carry.my_atom.fingerprintslast][more].", 0, 1) log_game("A chemical smoke reaction has taken place in ([where])[contained]. Last associated key is [carry.my_atom.fingerprintslast].") else diff --git a/code/game/objects/items.dm b/code/game/objects/items.dm index 6e8df50c0e7..3f497e1cac1 100644 --- a/code/game/objects/items.dm +++ b/code/game/objects/items.dm @@ -599,10 +599,10 @@ user << "\red You cannot locate any eyes on this creature!" return - user.attack_log += "\[[time_stamp()]\] Attacked [M.name] ([M.ckey]) with [src.name] (INTENT: [uppertext(user.a_intent)])" - M.attack_log += "\[[time_stamp()]\] Attacked by [user.name] ([user.ckey]) with [src.name] (INTENT: [uppertext(user.a_intent)])" + user.attack_log += "\[[time_stamp()]\] Attacked [key_name(M)] with [src.name] (INTENT: [uppertext(user.a_intent)])" + M.attack_log += "\[[time_stamp()]\] Attacked by [key_name(user)] with [src.name] (INTENT: [uppertext(user.a_intent)])" if(M.ckey) - msg_admin_attack("[user.name] ([user.ckey])[isAntag(user) ? "(ANTAG)" : ""] attacked [M.name] ([M.ckey]) with [src.name] (INTENT: [uppertext(user.a_intent)]) (JMP)") //BS12 EDIT ALG + msg_admin_attack("[key_name_admin(user)](?) ([admin_jump_link(user, "holder")]) attacked [key_name_admin(M)] with [src.name] (INTENT: [uppertext(user.a_intent)])") //BS12 EDIT ALG if(!iscarbon(user)) M.LAssailant = null diff --git a/code/game/objects/items/devices/aicard.dm b/code/game/objects/items/devices/aicard.dm index ff16cf9e43c..914459e59fb 100644 --- a/code/game/objects/items/devices/aicard.dm +++ b/code/game/objects/items/devices/aicard.dm @@ -13,9 +13,9 @@ if(!istype(M, /mob/living/silicon/ai))//If target is not an AI. return ..() - M.attack_log += text("\[[time_stamp()]\] Has been carded with [src.name] by [user.name] ([user.ckey])") - user.attack_log += text("\[[time_stamp()]\] Used the [src.name] to card [M.name] ([M.ckey])") - msg_admin_attack("[user.name] ([user.ckey])[isAntag(user) ? "(ANTAG)" : ""] used the [src.name] to card [M.name] ([M.ckey]) (JMP)") + M.attack_log += text("\[[time_stamp()]\] Has been carded with [src.name] by [key_name(user)]") + user.attack_log += text("\[[time_stamp()]\] Used the [src.name] to card [key_name(M)]") + msg_admin_attack("[key_name_admin(user)](?) ([admin_jump_link(user, "holder")]) used the [src.name] to card [M.name] ([M.ckey])") transfer_ai("AICORE", "AICARD", M, user) return diff --git a/code/game/objects/items/devices/pizza_bomb.dm b/code/game/objects/items/devices/pizza_bomb.dm index 9a3180a15e8..78f8009711a 100644 --- a/code/game/objects/items/devices/pizza_bomb.dm +++ b/code/game/objects/items/devices/pizza_bomb.dm @@ -30,7 +30,7 @@ timer = Clamp(timer, 10, 100) icon_state = "pizzabox1" user << "You set the timer to [timer / 10] before activating the payload and closing \the [src]." - message_admins("[key_name(usr)]? has set a timer on a pizza bomb to [timer/10] seconds at (JMP).") + message_admins("[key_name_admin(usr)]? ([admin_jump_link(usr, "holder")]) has set a timer on a pizza bomb to [timer/10] seconds at (JMP).") log_game("[key_name(usr)] has set the timer on a pizza bomb to [timer/10] seconds ([loc.x],[loc.y],[loc.z]).") armer = usr name = "pizza box" @@ -42,7 +42,7 @@ icon_state = "pizzabox_bomb" audible_message("\icon[src] *beep* *beep*") user << "That's no pizza! That's a bomb!" - message_admins("[key_name(usr)]? has triggered a pizza bomb armed by [armer] at (JMP).") + message_admins("[key_name_admin(usr)]? ([admin_jump_link(usr, "holder")]) has triggered a pizza bomb armed by [armer] at (JMP).") log_game("[key_name(usr)] has triggered a pizza bomb armed by [armer] ([loc.x],[loc.y],[loc.z]).") primed = 1 sleep(timer) diff --git a/code/game/objects/items/devices/powersink.dm b/code/game/objects/items/devices/powersink.dm index 7db62612994..bcaf7e74f0a 100644 --- a/code/game/objects/items/devices/powersink.dm +++ b/code/game/objects/items/devices/powersink.dm @@ -42,6 +42,8 @@ anchored = 1 mode = 1 src.visible_message("[user] attaches [src] to the cable!") + message_admins("Power sink activated by [key_name_admin(user)](?) ([admin_jump_link(user, "holder")]) at ([x],[y],[z] - JMP)") + log_game("Power sink activated by [key_name(user)] at ([x],[y],[z])") return else user << "Device must be placed over an exposed cable to attach to it." diff --git a/code/game/objects/items/devices/transfer_valve.dm b/code/game/objects/items/devices/transfer_valve.dm index ee4f96b9230..bb1dda94e59 100644 --- a/code/game/objects/items/devices/transfer_valve.dm +++ b/code/game/objects/items/devices/transfer_valve.dm @@ -51,7 +51,7 @@ A.toggle_secure() //this calls update_icon(), which calls update_icon() on the holder (i.e. the bomb). bombers += "[key_name(user)] attached a [item] to a transfer valve." - msg_admin_attack("[key_name_admin(user)][isAntag(user) ? "(ANTAG)" : ""] attached [item] to a transfer valve.") + msg_admin_attack("[key_name_admin(user)]attached [item] to a transfer valve.") log_game("[key_name_admin(user)] attached [item] to a transfer valve.") attacher = user nanomanager.update_uis(src) // update all UIs attached to src @@ -179,20 +179,20 @@ if(!attacher) attacher_name = "Unknown" else - attacher_name = "[attacher.name]([attacher.ckey])" + attacher_name = "[key_name_admin(attacher)]" var/log_str = "Bomb valve opened in [A.name] " log_str += "with [attached_device ? attached_device : "no device"] attacher: [attacher_name]" if(attacher) - log_str += "(?)" + log_str += "(?) ([admin_jump_link(attacher, "holder")])" var/mob/mob = get_mob_by_key(src.fingerprintslast) var/last_touch_info = "" if(mob) - last_touch_info = "(?)" + last_touch_info = "(?) ([admin_jump_link(attacher, "holder")])" - log_str += " Last touched by: [src.fingerprintslast][last_touch_info]" + log_str += " Last touched by: [key_name_admin(mob)][last_touch_info]" bombers += log_str msg_admin_attack(log_str, 0, 1) log_game(log_str) diff --git a/code/game/objects/items/robot/robot_items.dm b/code/game/objects/items/robot/robot_items.dm index d8baba60d41..eb312962d0b 100644 --- a/code/game/objects/items/robot/robot_items.dm +++ b/code/game/objects/items/robot/robot_items.dm @@ -10,10 +10,10 @@ icon_state = "shock" attack(mob/M as mob, mob/living/silicon/robot/user as mob) - M.attack_log += text("\[[time_stamp()]\] Has been attacked with [src.name] by [user.name] ([user.ckey])") - user.attack_log += text("\[[time_stamp()]\] Used the [src.name] to attack [M.name] ([M.ckey])") + M.attack_log += text("\[[time_stamp()]\] Has been attacked with [src.name] by [key_name(user)]") + user.attack_log += text("\[[time_stamp()]\] Used the [src.name] to attack [key_name(M)]") if(M.ckey) - msg_admin_attack("[user.name] ([user.ckey])[isAntag(user) ? "(ANTAG)" : ""] used the [src.name] to attack [M.name] ([M.ckey]) (JMP)") + msg_admin_attack("[key_name_admin(user)](?) ([admin_jump_link(user, "holder")]) used the [src.name] to attack [key_name_admin(M)]") if(!iscarbon(user)) M.LAssailant = null diff --git a/code/game/objects/items/weapons/explosives.dm b/code/game/objects/items/weapons/explosives.dm index 8c2bb4fe51e..a4a232db53a 100644 --- a/code/game/objects/items/weapons/explosives.dm +++ b/code/game/objects/items/weapons/explosives.dm @@ -41,6 +41,8 @@ user.say(message_say) target = user + message_admins("[key_name_admin(user)](?) ([admin_jump_link(user, "holder")]) suicided with [src.name] at ([x],[y],[z] - JMP)",0,1) + message_admins("[key_name(user)] suicided with [src.name] at ([x],[y],[z])") explode(get_turf(user)) return . @@ -78,12 +80,12 @@ if (ismob(target)) add_logs(target, user, "planted [name] on") user.visible_message("\red [user.name] finished planting an explosive on [target.name]!") - message_admins("[key_name(user, user.client)](?) planted C4 on [key_name(target)](?) with [timer] second fuse",0,1) - log_game("[key_name(user)] planted C4 on [key_name(target)] with [timer] second fuse") + message_admins("[key_name_admin(user)](?) ([admin_jump_link(user, "holder")]) planted [src.name] on [key_name_admin(target)](?) ([admin_jump_link(target, "holder")]) with [timer] second fuse",0,1) + log_game("[key_name(user)] planted [src.name] on [key_name(target)] with [timer] second fuse") else - message_admins("[key_name(user, user.client)](?) planted C4 on [target.name] at ([target.x],[target.y],[target.z] - JMP) with [timer] second fuse",0,1) - log_game("[key_name(user)] planted C4 on [target.name] at ([target.x],[target.y],[target.z]) with [timer] second fuse") + message_admins("[key_name_admin(user)](?) ([admin_jump_link(user, "holder")]) planted [src.name] on [target.name] at ([target.x],[target.y],[target.z] - JMP) with [timer] second fuse",0,1) + log_game("[key_name(user)] planted [src.name] on [target.name] at ([target.x],[target.y],[target.z]) with [timer] second fuse") target.overlays += image('icons/obj/assemblies.dmi', "plastic-explosive2") user << "Bomb has been planted. Timer counting down from [timer]." diff --git a/code/game/objects/items/weapons/flamethrower.dm b/code/game/objects/items/weapons/flamethrower.dm index 9e81b02d31c..57aec40f09e 100644 --- a/code/game/objects/items/weapons/flamethrower.dm +++ b/code/game/objects/items/weapons/flamethrower.dm @@ -66,6 +66,7 @@ var/turf/target_turf = get_turf(target) if(target_turf) var/turflist = getline(user, target_turf) + add_logs(user, target, "flamethrowered", addition="at [target.x],[target.y],[target.z]") flame_turf(turflist) /obj/item/weapon/flamethrower/attackby(obj/item/W as obj, mob/user as mob, params) diff --git a/code/game/objects/items/weapons/grenades/chem_grenade.dm b/code/game/objects/items/weapons/grenades/chem_grenade.dm index 28bea3240a3..71ddb1bf455 100644 --- a/code/game/objects/items/weapons/grenades/chem_grenade.dm +++ b/code/game/objects/items/weapons/grenades/chem_grenade.dm @@ -18,7 +18,7 @@ var/affected_area = 3 var/obj/item/device/assembly_holder/nadeassembly = null var/label = null - + var/assemblyattacher /obj/item/weapon/grenade/chem_grenade/New() create_reagents(1000) @@ -90,7 +90,7 @@ update_icon() else if(clown_check(user)) // This used to go before the assembly check, but that has absolutely zero to do with priming the damn thing. You could spam the admins with it. - var/log_str = "[key_name(usr)][isAntag(usr) ? "(ANTAG)" : ""]? has primed a [name] for detonation at [A.name] (JMP)." + var/log_str = "[key_name_admin(usr)]? ([admin_jump_link(usr, "holder")]) has primed a [name] for detonation at [A.name] (JMP)." msg_admin_attack(log_str) log_game(log_str) bombers += "[log_str]" @@ -138,9 +138,8 @@ contained = "\[[contained]\]" var/turf/bombturf = get_turf(loc) var/area/A = bombturf.loc - var/log_str = "[key_name(usr)][isAntag(usr) ? "(ANTAG)" : ""]? has completed [name] at [A.name] (JMP) [contained]." - msg_admin_attack(log_str) - log_game(log_str) + message_admins("[key_name_admin(usr)]? ([admin_jump_link(usr, "holder")]) has completed [name] at [A.name] (JMP) [contained].") + log_game("[key_name(usr)] has completed [name] at [bombturf.x], [bombturf.y], [bombturf.z].") else user << "You need to add at least one beaker before locking the assembly." else if(stage == READY && !nadeassembly) @@ -173,7 +172,7 @@ nadeassembly = A A.master = src A.loc = src - + assemblyattacher = user.ckey stage = WIRED user << "You add [A] to [src]!" update_icon() @@ -259,7 +258,15 @@ if(!has_reagents) playsound(loc, 'sound/items/Screwdriver2.ogg', 50, 1) - return + return + + if(nadeassembly) + var/mob/M = get_mob_by_ckey(assemblyattacher) + var/mob/last = get_mob_by_ckey(nadeassembly.fingerprintslast) + var/turf/T = get_turf(src) + var/area/A = get_area(T) + message_admins("grenade primed by an assembly, attached by [key_name_admin(M)](?) ([admin_jump_link(M, "holder")]) and last touched by [key_name_admin(last)](?) ([admin_jump_link(last, "holder")]) ([nadeassembly.a_left.name] and [nadeassembly.a_right.name]) at [A.name] (JMP).") + log_game("grenade primed by an assembly, attached by [key_name(M)] and last touched by [key_name(last)] ([nadeassembly.a_left.name] and [nadeassembly.a_right.name]) at [A.name] ([T.x], [T.y], [T.z])") playsound(loc, 'sound/effects/bamf.ogg', 50, 1) diff --git a/code/game/objects/items/weapons/grenades/ghettobomb.dm b/code/game/objects/items/weapons/grenades/ghettobomb.dm index bdbfd1fd4ea..dad7be5c780 100644 --- a/code/game/objects/items/weapons/grenades/ghettobomb.dm +++ b/code/game/objects/items/weapons/grenades/ghettobomb.dm @@ -112,7 +112,7 @@ var/turf/bombturf = get_turf(src) var/area/A = get_area(bombturf) - message_admins("[key_name(usr)]? has primed a [name] for detonation at [A.name] (JMP).") + message_admins("[key_name_admin(usr)](?) ([admin_jump_link(usr, "holder")]) has primed a [name] for detonation at [A.name] (JMP).") log_game("[key_name(usr)] has primed a [name] for detonation at [A.name] ([bombturf.x],[bombturf.y],[bombturf.z]).") if(iscarbon(user)) var/mob/living/carbon/C = user diff --git a/code/game/objects/items/weapons/grenades/grenade.dm b/code/game/objects/items/weapons/grenades/grenade.dm index 2d5f6ac0d90..9d234d3ff7b 100644 --- a/code/game/objects/items/weapons/grenades/grenade.dm +++ b/code/game/objects/items/weapons/grenades/grenade.dm @@ -63,10 +63,9 @@ add_fingerprint(user) var/turf/bombturf = get_turf(src) var/area/A = get_area(bombturf) - var/log_str = "[key_name(usr)][isAntag(usr) ? "(ANTAG)" : ""]? has primed a [name] for detonation at [A.name] (JMP)." - msg_admin_attack(log_str) - log_game(log_str) - bombers += "[log_str]" + message_admins("[key_name_admin(usr)](?) ([admin_jump_link(usr, "holder")]) has primed a [name] for detonation at [A.name] (JMP).") + log_game("[key_name(usr)] has primed a [name] for detonation at [A.name] ([bombturf.x],[bombturf.y],[bombturf.z]).") + bombers += "[key_name(usr)] has primed a [name] for detonation at [A.name] ([bombturf.x],[bombturf.y],[bombturf.z])." if(iscarbon(user)) var/mob/living/carbon/C = user C.throw_mode_on() diff --git a/code/game/objects/items/weapons/hydroponics.dm b/code/game/objects/items/weapons/hydroponics.dm index 9b34938d480..d25b6a29aa0 100644 --- a/code/game/objects/items/weapons/hydroponics.dm +++ b/code/game/objects/items/weapons/hydroponics.dm @@ -196,9 +196,9 @@ if(istype(M, /mob/living)) M << "\red You are stunned by the powerful acid of the Deathnettle!" - M.attack_log += text("\[[time_stamp()]\] Had the [src.name] used on them by [user.name] ([user.ckey])") - user.attack_log += text("\[[time_stamp()]\] Used the [src.name] on [M.name] ([M.ckey])") - msg_admin_attack("[user.name] ([user.ckey])[isAntag(user) ? "(ANTAG)" : ""] used the [src.name] on [M.name] ([M.ckey]) (JMP)") + M.attack_log += text("\[[time_stamp()]\] Had the [src.name] used on them by [key_name(user)]") + user.attack_log += text("\[[time_stamp()]\] Used the [src.name] on [key_name(M)]") + msg_admin_attack("[key_name_admin(user)](?) ([admin_jump_link(user, "holder")]) used the [src.name] on [key_name_admin(M)]") if(!iscarbon(user)) M.LAssailant = null diff --git a/code/game/objects/items/weapons/implants/implant.dm b/code/game/objects/items/weapons/implants/implant.dm index e9a58e5307d..64cfa9b497e 100644 --- a/code/game/objects/items/weapons/implants/implant.dm +++ b/code/game/objects/items/weapons/implants/implant.dm @@ -162,8 +162,8 @@ Implant Specifics:
"} var/need_gib = null if(istype(imp_in, /mob/)) var/mob/T = imp_in - message_admins("Explosive implant triggered in [T] ([T.key]). (JMP) ") - log_game("Explosive implant triggered in [T] ([T.key]).") + message_admins("Explosive implant triggered in [key_name_admin(T)](?) ([admin_jump_link(T, "holder")])") + log_game("Explosive implant triggered in [key_name(T)].") need_gib = 1 if(ishuman(imp_in)) diff --git a/code/game/objects/items/weapons/implants/implanter.dm b/code/game/objects/items/weapons/implants/implanter.dm index 7e9b207ea4b..a6ef3256d28 100644 --- a/code/game/objects/items/weapons/implants/implanter.dm +++ b/code/game/objects/items/weapons/implants/implanter.dm @@ -32,9 +32,9 @@ for (var/mob/O in viewers(M, null)) O.show_message("\red [M] has been implanted by [user].", 1) - M.attack_log += text("\[[time_stamp()]\] Implanted with [src.name] ([src.imp.name]) by [user.name] ([user.ckey])") - user.attack_log += text("\[[time_stamp()]\] Used the [src.name] ([src.imp.name]) to implant [M.name] ([M.ckey])") - msg_admin_attack("[user.name] ([user.ckey])[isAntag(user) ? "(ANTAG)" : ""] implanted [M.name] ([M.ckey]) with [src.name] (INTENT: [uppertext(user.a_intent)]) (JMP)") + M.attack_log += text("\[[time_stamp()]\] Implanted with [src.name] ([src.imp.name]) by [key_name(user)]") + user.attack_log += text("\[[time_stamp()]\] Used the [src.name] ([src.imp.name]) to implant [key_name(M)]") + msg_admin_attack("[key_name_admin(user)](?) ([admin_jump_link(user, "holder")]) implanted [M.name] ([M.ckey]) with [src.name] (INTENT: [uppertext(user.a_intent)])") user.show_message("\red You implanted the implant into [M].") if(src.imp.implanted(M, user)) diff --git a/code/game/objects/items/weapons/legcuffs.dm b/code/game/objects/items/weapons/legcuffs.dm index 207deb0bfc7..96bd885ab03 100644 --- a/code/game/objects/items/weapons/legcuffs.dm +++ b/code/game/objects/items/weapons/legcuffs.dm @@ -44,11 +44,8 @@ if(2,3) user.drop_item(src) I.loc = src - var/turf/bombturf = get_turf(src) - var/area/A = get_area(bombturf) - var/log_str = "[key_name(usr)]? has rigged a beartrap with an IED at [A.name] (JMP)." - message_admins(log_str) - log_game(log_str) + message_admins("[key_name_admin(user)](?) ([admin_jump_link(user, "holder")]) has rigged a beartrap with an IED.") + log_game("[key_name(user)] has rigged a beartrap with an IED.") user << "You sneak the [IED] underneath the pressure plate and connect the trigger wire." desc = "A trap used to catch bears and other legged creatures. There is an IED hooked up to it." else @@ -70,11 +67,8 @@ IED.overlays -= image('icons/obj/grenade.dmi', icon_state = "improvised_grenade_filled") IED.icon_state = initial(icon_state) + "_active" IED.assembled = 3 - var/turf/bombturf = get_turf(src) - var/area/A = get_area(bombturf) - var/log_str = "[key_name(usr)]? has triggered an IED-rigged [name] at [A.name] (JMP)." - message_admins(log_str) - log_game(log_str) + message_admins("[key_name_admin(usr)](?) ([admin_jump_link(usr, "holder")]) has triggered an IED-rigged [name].") + log_game("[key_name(usr)] has triggered an IED-rigged [name].") spawn(IED.det_time) IED.prime() if(ishuman(AM)) @@ -95,7 +89,7 @@ H.update_inv_legcuffed() H << "You step on \the [src]!" if(IED && IED.active) - H << "The [src]'s IED has been activated!" + H << "\The [src]'s IED has been activated!" feedback_add_details("handcuffs","B") //Yes, I know they're legcuffs. Don't change this, no need for an extra variable. The "B" is used to tell them apart. for(var/mob/O in viewers(H, null)) if(O == H) diff --git a/code/game/objects/items/weapons/weaponry.dm b/code/game/objects/items/weapons/weaponry.dm index 56a31ed5284..cb22ce2add2 100644 --- a/code/game/objects/items/weapons/weaponry.dm +++ b/code/game/objects/items/weapons/weaponry.dm @@ -41,11 +41,7 @@ else M.LAssailant = user - msg_admin_attack("[user.name] ([user.ckey])[isAntag(user) ? "(ANTAG)" : ""] attacked [M.name] ([M.ckey]) with [src.name] (INTENT: [uppertext(user.a_intent)]) (JMP)") - - if (!(istype(user, /mob/living/carbon/human) || ticker) && ticker.mode.name != "monkey") - user << "\red You don't have the dexterity to do this!" - return + msg_admin_attack("[key_name_admin(user)](?) ([admin_jump_link(user, "holder")]) attacked [key_name_admin(M)] with [src.name] (INTENT: [uppertext(user.a_intent)])") if ((CLUMSY in user.mutations) && prob(50)) user << "\red The rod slips out of your hand and hits your head." diff --git a/code/game/objects/structures/false_walls.dm b/code/game/objects/structures/false_walls.dm index 967b96d2c05..e548194c2dc 100644 --- a/code/game/objects/structures/false_walls.dm +++ b/code/game/objects/structures/false_walls.dm @@ -221,6 +221,14 @@ icon_state = "" mineral = "plasma" walltype = "plasma" + +/obj/structure/falsewall/plasma/attackby(obj/item/weapon/W, mob/user, params) + if(is_hot(W) > 300) + message_admins("Plasma falsewall ignited by [key_name_admin(user)](?) ([admin_jump_link(user, "holder")]) in ([x],[y],[z] - JMP)",0,1) + log_game("Plasma falsewall ignited by [key_name(user)] in ([x],[y],[z])") + burnbabyburn() + return + ..() /obj/structure/falsewall/plasma/proc/burnbabyburn(user) playsound(src, 'sound/items/Welder.ogg', 100, 1) diff --git a/code/game/objects/structures/mineral_doors.dm b/code/game/objects/structures/mineral_doors.dm index 69508a41940..e6f2d29b801 100644 --- a/code/game/objects/structures/mineral_doors.dm +++ b/code/game/objects/structures/mineral_doors.dm @@ -194,10 +194,10 @@ mineralType = "plasma" attackby(obj/item/weapon/W as obj, mob/user as mob) - if(istype(W,/obj/item/weapon/weldingtool)) - var/obj/item/weapon/weldingtool/WT = W - if(WT.remove_fuel(0, user)) - TemperatureAct(100) + if(is_hot(W)) + message_admins("Plasma mineral door ignited by [key_name_admin(user)](?) ([admin_jump_link(user, "holder")]) in ([x],[y],[z] - JMP)",0,1) + log_game("Plasma mineral door ignited by [key_name(user)] in ([x],[y],[z])") + TemperatureAct(100) ..() temperature_expose(datum/gas_mixture/air, exposed_temperature, exposed_volume) diff --git a/code/game/objects/structures/morgue.dm b/code/game/objects/structures/morgue.dm index 35c57a0f9f8..ee2b57d19d7 100644 --- a/code/game/objects/structures/morgue.dm +++ b/code/game/objects/structures/morgue.dm @@ -417,3 +417,51 @@ usr << "\red Access denied." return +/hook/Login/proc/update_morgue(var/client/client, var/mob/L) + //Update morgues on login/logout + if (L.stat == DEAD) + var/obj/structure/morgue/Morgue = null + var/mob/living/carbon/human/C = null + if (istype(L,/mob/dead/observer)) //We're a ghost, let's find our corpse + var/mob/dead/observer/G = L + if(!G.mind) //This'll probably break morgue sprites, but the line under the next If statement causes runtimes with Assume Direct Control. + return + if (G.can_reenter_corpse && G.mind.current) + C = G.mind.current + else if (istype(L,/mob/living/carbon/human)) + C = L + + if (C) //We found our corpse, is it inside a morgue? + if (istype(C.loc,/obj/structure/morgue)) + Morgue = C.loc + else if (istype(C.loc,/obj/structure/closet/body_bag)) + var/obj/structure/closet/body_bag/B = C.loc + if (istype(B.loc,/obj/structure/morgue)) + Morgue = B.loc + if (Morgue) + Morgue.update() + +/hook/Logout/proc/update_morgue(var/client/client, var/mob/L) + //Update morgues on login/logout + if (L.stat == DEAD) + var/obj/structure/morgue/Morgue = null + var/mob/living/carbon/human/C = null + if (istype(L,/mob/dead/observer)) //We're a ghost, let's find our corpse + var/mob/dead/observer/G = L + if(!G.mind) //This'll probably break morgue sprites, but the line under the next If statement causes runtimes with Assume Direct Control. + return 1 + if (G.can_reenter_corpse && G.mind.current) + C = G.mind.current + else if (istype(L,/mob/living/carbon/human)) + C = L + + if (C) //We found our corpse, is it inside a morgue? + if (istype(C.loc,/obj/structure/morgue)) + Morgue = C.loc + else if (istype(C.loc,/obj/structure/closet/body_bag)) + var/obj/structure/closet/body_bag/B = C.loc + if (istype(B.loc,/obj/structure/morgue)) + Morgue = B.loc + if (Morgue) + Morgue.update() + diff --git a/code/game/objects/structures/stool_bed_chair_nest/wheelchair.dm b/code/game/objects/structures/stool_bed_chair_nest/wheelchair.dm index 334086d5f36..066698a8cd2 100644 --- a/code/game/objects/structures/stool_bed_chair_nest/wheelchair.dm +++ b/code/game/objects/structures/stool_bed_chair_nest/wheelchair.dm @@ -155,9 +155,9 @@ if(pulling) occupant.visible_message("[pulling] has thrusted \the [name] into \the [A], throwing \the [occupant] out of it!") - pulling.attack_log += "\[[time_stamp()]\] Crashed [occupant.name]'s ([occupant.ckey]) [name] into \a [A]" - occupant.attack_log += "\[[time_stamp()]\] Thrusted into \a [A] by [pulling.name] ([pulling.ckey]) with \the [name]" - msg_admin_attack("[pulling.name] ([pulling.ckey])[isAntag(pulling) ? "(ANTAG)" : ""] has thrusted [occupant.name]'s ([occupant.ckey]) [name] into \a [A] (JMP)") + pulling.attack_log += "\[[time_stamp()]\] Crashed [key_name(occupant)] [name] into \a [A]" + occupant.attack_log += "\[[time_stamp()]\] Thrusted into \a [A] by [key_name(pulling)] with \the [name]" + msg_admin_attack("[key_name_admin(pulling)](?) ([admin_jump_link(pulling, "holder")]) has thrusted [key_name_admin(occupant)] [name] into \a [A]") else occupant.visible_message("[occupant] crashed into \the [A]!") diff --git a/code/game/turfs/simulated/walls_mineral.dm b/code/game/turfs/simulated/walls_mineral.dm index 20d476238cb..4001a200ee4 100644 --- a/code/game/turfs/simulated/walls_mineral.dm +++ b/code/game/turfs/simulated/walls_mineral.dm @@ -89,6 +89,8 @@ /turf/simulated/wall/mineral/plasma/attackby(obj/item/weapon/W as obj, mob/user as mob) if(is_hot(W) > 300)//If the temperature of the object is over 300, then ignite + message_admins("Plasma wall ignited by [key_name_admin(user)](?) ([admin_jump_link(user, "holder")]) in ([x],[y],[z] - JMP)",0,1) + log_game("Plasma wall ignited by [key_name(user)] in ([x],[y],[z])") ignite(is_hot(W)) return ..() diff --git a/code/game/verbs/ooc.dm b/code/game/verbs/ooc.dm index 1cf5e73bc19..afbb84847f5 100644 --- a/code/game/verbs/ooc.dm +++ b/code/game/verbs/ooc.dm @@ -17,7 +17,7 @@ var/global/normal_ooc_colour = "#002eb8" src << "\red You have OOC muted." return - if(!(holder && holder.rights && (holder.rights & R_MOD))) + if(!check_rights(R_MOD,0)) if(!ooc_allowed) src << "\red OOC is globally muted" return @@ -141,9 +141,8 @@ var/global/normal_ooc_colour = "#002eb8" if(!M.client) continue var/client/C = M.client - if(C in admins) - if(C.holder.rights | R_MENTOR) - continue //they are handled after that + if(check_rights(R_MENTOR,0)) + continue //they are handled after that if(C.prefs.toggles & CHAT_LOOC) if(holder) @@ -160,7 +159,7 @@ var/global/normal_ooc_colour = "#002eb8" display_name = "[S.name]/([S.key])" for(var/client/C in admins) - if(C.holder.rights | R_MENTOR) + if(check_rights(R_MENTOR,0)) if(C.prefs.toggles & CHAT_LOOC) var/prefix = "(R)LOOC" if (C.mob in heard) diff --git a/code/modules/admin/DB ban/functions.dm b/code/modules/admin/DB ban/functions.dm index da0c6d64e60..8cd511a3c9a 100644 --- a/code/modules/admin/DB ban/functions.dm +++ b/code/modules/admin/DB ban/functions.dm @@ -48,7 +48,7 @@ datum/admins/proc/DB_ban_record(var/bantype, var/mob/banned_mob, var/duration = computerid = bancid ip = banip - var/DBQuery/query = dbcon.NewQuery("SELECT id FROM erro_player WHERE ckey = '[ckey]'") + var/DBQuery/query = dbcon.NewQuery("SELECT id FROM [format_table_name("player")] WHERE ckey = '[ckey]'") query.Execute() var/validckey = 0 if(query.NextRow()) @@ -83,7 +83,7 @@ datum/admins/proc/DB_ban_record(var/bantype, var/mob/banned_mob, var/duration = reason = sql_sanitize_text(reason) - var/sql = "INSERT INTO erro_ban (`id`,`bantime`,`serverip`,`bantype`,`reason`,`job`,`duration`,`rounds`,`expiration_time`,`ckey`,`computerid`,`ip`,`a_ckey`,`a_computerid`,`a_ip`,`who`,`adminwho`,`edits`,`unbanned`,`unbanned_datetime`,`unbanned_ckey`,`unbanned_computerid`,`unbanned_ip`) VALUES (null, Now(), '[serverip]', '[bantype_str]', '[reason]', '[job]', [(duration)?"[duration]":"0"], [(rounds)?"[rounds]":"0"], Now() + INTERVAL [(duration>0) ? duration : 0] MINUTE, '[ckey]', '[computerid]', '[ip]', '[a_ckey]', '[a_computerid]', '[a_ip]', '[who]', '[adminwho]', '', null, null, null, null, null)" + var/sql = "INSERT INTO [format_table_name("ban")] (`id`,`bantime`,`serverip`,`bantype`,`reason`,`job`,`duration`,`rounds`,`expiration_time`,`ckey`,`computerid`,`ip`,`a_ckey`,`a_computerid`,`a_ip`,`who`,`adminwho`,`edits`,`unbanned`,`unbanned_datetime`,`unbanned_ckey`,`unbanned_computerid`,`unbanned_ip`) VALUES (null, Now(), '[serverip]', '[bantype_str]', '[reason]', '[job]', [(duration)?"[duration]":"0"], [(rounds)?"[rounds]":"0"], Now() + INTERVAL [(duration>0) ? duration : 0] MINUTE, '[ckey]', '[computerid]', '[ip]', '[a_ckey]', '[a_computerid]', '[a_ip]', '[who]', '[adminwho]', '', null, null, null, null, null)" var/DBQuery/query_insert = dbcon.NewQuery(sql) query_insert.Execute() usr << "\blue Ban saved to database." @@ -125,7 +125,7 @@ datum/admins/proc/DB_ban_unban(var/ckey, var/bantype, var/job = "") else bantype_sql = "bantype = '[bantype_str]'" - var/sql = "SELECT id FROM erro_ban WHERE ckey = '[ckey]' AND [bantype_sql] AND (unbanned is null OR unbanned = false)" + var/sql = "SELECT id FROM [format_table_name("ban")] WHERE ckey = '[ckey]' AND [bantype_sql] AND (unbanned is null OR unbanned = false)" if(job) sql += " AND job = '[job]'" @@ -166,7 +166,7 @@ datum/admins/proc/DB_ban_edit(var/banid = null, var/param = null) usr << "Cancelled" return - var/DBQuery/query = dbcon.NewQuery("SELECT ckey, duration, reason FROM erro_ban WHERE id = [banid]") + var/DBQuery/query = dbcon.NewQuery("SELECT ckey, duration, reason FROM [format_table_name("ban")] WHERE id = [banid]") query.Execute() var/eckey = usr.ckey //Editing admin ckey @@ -194,7 +194,7 @@ datum/admins/proc/DB_ban_edit(var/banid = null, var/param = null) usr << "Cancelled" return - var/DBQuery/update_query = dbcon.NewQuery("UPDATE erro_ban SET reason = '[value]', edits = CONCAT(edits,'- [eckey] changed ban reason from \\\"[reason]\\\" to \\\"[value]\\\"
') WHERE id = [banid]") + var/DBQuery/update_query = dbcon.NewQuery("UPDATE [format_table_name("ban")] SET reason = '[value]', edits = CONCAT(edits,'- [eckey] changed ban reason from \\\"[reason]\\\" to \\\"[value]\\\"
') WHERE id = [banid]") update_query.Execute() message_admins("[key_name_admin(usr)] has edited a ban for [pckey]'s reason from [reason] to [value]",1) if("duration") @@ -204,7 +204,7 @@ datum/admins/proc/DB_ban_edit(var/banid = null, var/param = null) usr << "Cancelled" return - var/DBQuery/update_query = dbcon.NewQuery("UPDATE erro_ban SET duration = [value], edits = CONCAT(edits,'- [eckey] changed ban duration from [duration] to [value]
'), expiration_time = DATE_ADD(bantime, INTERVAL [value] MINUTE) WHERE id = [banid]") + var/DBQuery/update_query = dbcon.NewQuery("UPDATE [format_table_name("ban")] SET duration = [value], edits = CONCAT(edits,'- [eckey] changed ban duration from [duration] to [value]
'), expiration_time = DATE_ADD(bantime, INTERVAL [value] MINUTE) WHERE id = [banid]") message_admins("[key_name_admin(usr)] has edited a ban for [pckey]'s duration from [duration] to [value]",1) update_query.Execute() if("unban") @@ -222,7 +222,7 @@ datum/admins/proc/DB_ban_unban_by_id(var/id) if(!check_rights(R_BAN)) return - var/sql = "SELECT ckey FROM erro_ban WHERE id = [id]" + var/sql = "SELECT ckey FROM [format_table_name("ban")] WHERE id = [id]" establish_db_connection() if(!dbcon.IsConnected()) @@ -252,7 +252,7 @@ datum/admins/proc/DB_ban_unban_by_id(var/id) var/unban_computerid = src.owner:computer_id var/unban_ip = src.owner:address - var/sql_update = "UPDATE erro_ban SET unbanned = 1, unbanned_datetime = Now(), unbanned_ckey = '[unban_ckey]', unbanned_computerid = '[unban_computerid]', unbanned_ip = '[unban_ip]' WHERE id = [id]" + var/sql_update = "UPDATE [format_table_name("ban")] SET unbanned = 1, unbanned_datetime = Now(), unbanned_ckey = '[unban_ckey]', unbanned_computerid = '[unban_computerid]', unbanned_ip = '[unban_ip]' WHERE id = [id]" message_admins("[key_name_admin(usr)] has lifted [pckey]'s ban.",1) var/DBQuery/query_update = dbcon.NewQuery(sql_update) @@ -410,7 +410,7 @@ datum/admins/proc/DB_ban_unban_by_id(var/id) bantypesearch += "'PERMABAN' " - var/DBQuery/select_query = dbcon.NewQuery("SELECT id, bantime, bantype, reason, job, duration, expiration_time, ckey, a_ckey, unbanned, unbanned_ckey, unbanned_datetime, edits, ip, computerid FROM erro_ban WHERE 1 [playersearch] [adminsearch] [ipsearch] [cidsearch] [bantypesearch] ORDER BY bantime DESC LIMIT 100") + var/DBQuery/select_query = dbcon.NewQuery("SELECT id, bantime, bantype, reason, job, duration, expiration_time, ckey, a_ckey, unbanned, unbanned_ckey, unbanned_datetime, edits, ip, computerid FROM [format_table_name("ban")] WHERE 1 [playersearch] [adminsearch] [ipsearch] [cidsearch] [bantypesearch] ORDER BY bantime DESC LIMIT 100") select_query.Execute() while(select_query.NextRow()) diff --git a/code/modules/admin/IsBanned.dm b/code/modules/admin/IsBanned.dm index 29f745a8c17..a9041e7be2a 100644 --- a/code/modules/admin/IsBanned.dm +++ b/code/modules/admin/IsBanned.dm @@ -51,7 +51,7 @@ world/IsBanned(key,address,computer_id) failedcid = 0 cidquery = " OR computerid = '[computer_id]' " - var/DBQuery/query = dbcon.NewQuery("SELECT ckey, ip, computerid, a_ckey, reason, expiration_time, duration, bantime, bantype FROM erro_ban WHERE (ckey = '[ckeytext]' [ipquery] [cidquery]) AND (bantype = 'PERMABAN' OR (bantype = 'TEMPBAN' AND expiration_time > Now())) AND isnull(unbanned)") + var/DBQuery/query = dbcon.NewQuery("SELECT ckey, ip, computerid, a_ckey, reason, expiration_time, duration, bantime, bantype FROM [format_table_name("ban")] WHERE (ckey = '[ckeytext]' [ipquery] [cidquery]) AND (bantype = 'PERMABAN' OR (bantype = 'TEMPBAN' AND expiration_time > Now())) AND isnull(unbanned)") query.Execute() diff --git a/code/modules/admin/admin.dm b/code/modules/admin/admin.dm index 050e21a8e17..c1e261bba66 100644 --- a/code/modules/admin/admin.dm +++ b/code/modules/admin/admin.dm @@ -44,7 +44,7 @@ var/global/nologevent = 0 body += "Options panel for [M]" if(M.client) body += " played by [M.client] " - body += "\[[M.client.holder ? M.client.holder.rank : "Player"]\]" + body += "\[[M.client.holder ? M.client.holder.rank : "Player"]\]" if(istype(M, /mob/new_player)) body += " Hasn't Entered Game " @@ -64,7 +64,8 @@ var/global/nologevent = 0 Ban | Jobban | Appearance Ban | - Notes + Notes | + Watchlist Flag "} if(M.client) @@ -1006,7 +1007,6 @@ proc/formatPlayerPanel(var/mob/U,var/text="PP") if (!frommob.ckey) return 0 - var/question = "" if (tomob.ckey) question = "This mob already has a user ([tomob.key]) in control of it! " @@ -1029,4 +1029,5 @@ proc/formatPlayerPanel(var/mob/U,var/text="PP") tomob.ckey = frommob.ckey qdel(frommob) - return 1 \ No newline at end of file + return 1 + \ No newline at end of file diff --git a/code/modules/admin/admin_investigate.dm b/code/modules/admin/admin_investigate.dm index 4323644b480..214686f0b2c 100644 --- a/code/modules/admin/admin_investigate.dm +++ b/code/modules/admin/admin_investigate.dm @@ -23,7 +23,7 @@ if(!message) return var/F = investigate_subject2file(subject) if(!F) return - F << "[time2text(world.timeofday,"hh:mm")] \ref[src] ([x],[y],[z]) || [src] [message]
" + F << "[time_stamp()] \ref[src] ([x],[y],[z]) || [src] [message]
" //ADMINVERBS /client/proc/investigate_show( subject in list("hrefs","pda","singulo","gold core","cult") ) diff --git a/code/modules/admin/admin_ranks.dm b/code/modules/admin/admin_ranks.dm index d9f5d7d54ba..b6aaada625c 100644 --- a/code/modules/admin/admin_ranks.dm +++ b/code/modules/admin/admin_ranks.dm @@ -61,6 +61,7 @@ var/list/admin_ranks = list() //list of all ranks with associated rights //clear the datums references admin_datums.Cut() for(var/client/C in admins) + C.remove_admin_verbs() C.holder = null admins.Cut() @@ -108,7 +109,7 @@ var/list/admin_ranks = list() //list of all ranks with associated rights load_admins() return - var/DBQuery/query = dbcon.NewQuery("SELECT ckey, rank, level, flags FROM erro_admin") + var/DBQuery/query = dbcon.NewQuery("SELECT ckey, rank, level, flags FROM [format_table_name("admin")]") query.Execute() while(query.NextRow()) var/ckey = query.item[1] diff --git a/code/modules/admin/admin_verbs.dm b/code/modules/admin/admin_verbs.dm index 71990e49d55..b5274601aa3 100644 --- a/code/modules/admin/admin_verbs.dm +++ b/code/modules/admin/admin_verbs.dm @@ -2,6 +2,7 @@ var/list/admin_verbs_default = list( // /datum/admins/proc/show_player_panel, /*shows an interface for individual players, with various links (links require additional flags*/ /client/proc/deadmin_self, /*destroys our own admin datum so we can play as a regular player*/ + /client/proc/hide_verbs, /*hides all our adminverbs*/ // /client/proc/check_antagonists, /*shows all antags*/ // /client/proc/deadchat /*toggles deadchat on/off*/ /client/proc/cmd_mentor_check_new_players @@ -202,6 +203,48 @@ var/list/admin_verbs_mentor = list( if(holder.rights & R_SPAWN) verbs += admin_verbs_spawn if(holder.rights & R_MOD) verbs += admin_verbs_mod if(holder.rights & R_MENTOR) verbs += admin_verbs_mentor + +/client/proc/remove_admin_verbs() + verbs.Remove( + admin_verbs_default, + /client/proc/togglebuildmodeself, + admin_verbs_admin, + admin_verbs_ban, + admin_verbs_event, + admin_verbs_server, + admin_verbs_debug, + admin_verbs_possess, + admin_verbs_permissions, + /client/proc/stealth, + admin_verbs_rejuv, + admin_verbs_sounds, + admin_verbs_spawn, + admin_verbs_mod, + admin_verbs_mentor, + admin_verbs_show_debug_verbs, + /client/proc/readmin, + ) + +/client/proc/hide_verbs() + set name = "Adminverbs - Hide All" + set category = "Admin" + + remove_admin_verbs() + verbs += /client/proc/show_verbs + + src << "Almost all of your adminverbs have been hidden." + feedback_add_details("admin_verb","TAVVH") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc! + return + +/client/proc/show_verbs() + set name = "Adminverbs - Show" + set category = "Admin" + + verbs -= /client/proc/show_verbs + add_admin_verbs() + + src << "All of your adminverbs are now visible." + feedback_add_details("admin_verb","TAVVS") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc! /client/proc/admin_ghost() set category = "Admin" @@ -526,12 +569,61 @@ var/list/admin_verbs_mentor = list( set category = "Admin" if(holder) - if(alert("Confirm self-deadmin for the round? You can't re-admin yourself without someont promoting you.",,"Yes","No") == "Yes") - log_admin("[src] deadmined themself.") - message_admins("[src] deadmined themself.", 1) - deadmin() - src << "You are now a normal player." + log_admin("[src] deadmined themself.") + message_admins("[src] deadmined themself.") + deadmin() + verbs += /client/proc/readmin + deadmins += ckey + src << "You are now a normal player." feedback_add_details("admin_verb","DAS") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc! + +/client/proc/readmin() + set name = "Re-admin self" + set category = "Admin" + set desc = "Regain your admin powers." + var/datum/admins/D = admin_datums[ckey] + var/rank = null + if(config.admin_legacy_system) + //load text from file + var/list/Lines = file2list("config/admins.txt") + for(var/line in Lines) + var/list/splitline = text2list(line, " - ") + if(n_lower(splitline[1]) == ckey) + if(splitline.len >= 2) + rank = ckeyEx(splitline[2]) + break + continue + else + if(!dbcon.IsConnected()) + message_admins("Warning, mysql database is not connected.") + src << "Warning, mysql database is not connected." + return + var/sql_ckey = sanitizeSQL(ckey) + var/DBQuery/query = dbcon.NewQuery("SELECT rank FROM [format_table_name("admin")] WHERE ckey = '[sql_ckey]'") + query.Execute() + while(query.NextRow()) + rank = ckeyEx(query.item[1]) + if(!D) + if(admin_ranks[rank] == null) + var/error_extra = "" + if(!config.admin_legacy_system) + error_extra = " Check mysql DB connection." + error("Error while re-adminning [src], admin rank ([rank]) does not exist.[error_extra]") + src << "Error while re-adminning, admin rank ([rank]) does not exist.[error_extra]" + return + D = new(rank,admin_ranks[rank],ckey) + var/client/C = directory[ckey] + D.associate(C) + message_admins("[src] re-adminned themselves.") + log_admin("[src] re-adminned themselves.") + deadmins -= ckey + feedback_add_details("admin_verb","RAS") + return + else + src << "You are already an admin." + verbs -= /client/proc/readmin + deadmins -= ckey + return /client/proc/toggle_log_hrefs() set name = "Toggle href logging" diff --git a/code/modules/admin/banappearance.dm b/code/modules/admin/banappearance.dm index 3262fb66219..bc5b5c4827b 100644 --- a/code/modules/admin/banappearance.dm +++ b/code/modules/admin/banappearance.dm @@ -59,7 +59,7 @@ DEBUG return //appearance bans - var/DBQuery/query = dbcon.NewQuery("SELECT ckey FROM erro_ban WHERE bantype = 'APPEARANCE_BAN' AND NOT unbanned = 1") + var/DBQuery/query = dbcon.NewQuery("SELECT ckey FROM [format_table_name("ban")] WHERE bantype = 'APPEARANCE_BAN' AND NOT unbanned = 1") query.Execute() while(query.NextRow()) @@ -101,7 +101,7 @@ proc/DB_ban_isappearancebanned(var/playerckey) var/sqlplayerckey = sql_sanitize_text(ckey(playerckey)) - var/DBQuery/query = dbcon.NewQuery("SELECT id FROM erro_ban WHERE CKEY = '[sqlplayerckey]' AND ((bantype = 'APPEARANCE_BAN') OR (bantype = 'APPEARANCE_TEMPBAN' AND expiration_time > Now())) AND unbanned != 1") + var/DBQuery/query = dbcon.NewQuery("SELECT id FROM [format_table_name("ban")] WHERE CKEY = '[sqlplayerckey]' AND ((bantype = 'APPEARANCE_BAN') OR (bantype = 'APPEARANCE_TEMPBAN' AND expiration_time > Now())) AND unbanned != 1") query.Execute() while(query.NextRow()) return 1 diff --git a/code/modules/admin/banjob.dm b/code/modules/admin/banjob.dm index 3ae14b22a31..9319919a422 100644 --- a/code/modules/admin/banjob.dm +++ b/code/modules/admin/banjob.dm @@ -71,7 +71,7 @@ DEBUG return //Job permabans - var/DBQuery/query = dbcon.NewQuery("SELECT ckey, job FROM erro_ban WHERE bantype = 'JOB_PERMABAN' AND isnull(unbanned)") + var/DBQuery/query = dbcon.NewQuery("SELECT ckey, job FROM [format_table_name("ban")] WHERE bantype = 'JOB_PERMABAN' AND isnull(unbanned)") query.Execute() while(query.NextRow()) @@ -81,7 +81,7 @@ DEBUG jobban_keylist.Add("[ckey] - [job]") //Job tempbans - var/DBQuery/query1 = dbcon.NewQuery("SELECT ckey, job FROM erro_ban WHERE bantype = 'JOB_TEMPBAN' AND isnull(unbanned) AND expiration_time > Now()") + var/DBQuery/query1 = dbcon.NewQuery("SELECT ckey, job FROM [format_table_name("ban")] WHERE bantype = 'JOB_TEMPBAN' AND isnull(unbanned) AND expiration_time > Now()") query1.Execute() while(query1.NextRow()) diff --git a/code/modules/admin/holder2.dm b/code/modules/admin/holder2.dm index 33fc2240830..17a2fc42239 100644 --- a/code/modules/admin/holder2.dm +++ b/code/modules/admin/holder2.dm @@ -28,11 +28,13 @@ var/list/admin_datums = list() owner = C owner.holder = src owner.add_admin_verbs() //TODO + owner.verbs -= /client/proc/readmin admins |= C /datum/admins/proc/disassociate() if(owner) admins -= owner + owner.remove_admin_verbs() owner.holder = null owner = null @@ -78,11 +80,17 @@ you will have to do something like if(client.holder.rights & R_ADMIN) yourself. usr << "Error: Cannot proceed. They have more or equal rights to us." return 0 - - /client/proc/deadmin() admin_datums -= ckey if(holder) holder.disassociate() del(holder) return 1 + +//This proc checks whether subject has at least ONE of the rights specified in rights_required. +/proc/check_rights_for(client/subject, rights_required) + if(subject && subject.holder) + if(rights_required && !(rights_required & subject.holder.rights)) + return 0 + return 1 + return 0 diff --git a/code/modules/admin/permissionverbs/permissionedit.dm b/code/modules/admin/permissionverbs/permissionedit.dm index fbd33cf0734..e53d4644c33 100644 --- a/code/modules/admin/permissionverbs/permissionedit.dm +++ b/code/modules/admin/permissionverbs/permissionedit.dm @@ -76,7 +76,7 @@ if(!istext(adm_ckey) || !istext(new_rank)) return - var/DBQuery/select_query = dbcon.NewQuery("SELECT id FROM erro_admin WHERE ckey = '[adm_ckey]'") + var/DBQuery/select_query = dbcon.NewQuery("SELECT id FROM [format_table_name("admin")] WHERE ckey = '[adm_ckey]'") select_query.Execute() var/new_admin = 1 @@ -86,16 +86,16 @@ admin_id = text2num(select_query.item[1]) if(new_admin) - var/DBQuery/insert_query = dbcon.NewQuery("INSERT INTO `erro_admin` (`id`, `ckey`, `rank`, `level`, `flags`) VALUES (null, '[adm_ckey]', '[new_rank]', -1, 0)") + var/DBQuery/insert_query = dbcon.NewQuery("INSERT INTO [format_table_name("admin")] (`id`, `ckey`, `rank`, `level`, `flags`) VALUES (null, '[adm_ckey]', '[new_rank]', -1, 0)") insert_query.Execute() - var/DBQuery/log_query = dbcon.NewQuery("INSERT INTO `test`.`erro_admin_log` (`id` ,`datetime` ,`adminckey` ,`adminip` ,`log` ) VALUES (NULL , NOW( ) , '[usr.ckey]', '[usr.client.address]', 'Added new admin [adm_ckey] to rank [new_rank]');") + var/DBQuery/log_query = dbcon.NewQuery("INSERT INTO `test`.[format_table_name("admin_log")] (`id` ,`datetime` ,`adminckey` ,`adminip` ,`log` ) VALUES (NULL , NOW( ) , '[usr.ckey]', '[usr.client.address]', 'Added new admin [adm_ckey] to rank [new_rank]');") log_query.Execute() usr << "\blue New admin added." else if(!isnull(admin_id) && isnum(admin_id)) - var/DBQuery/insert_query = dbcon.NewQuery("UPDATE `erro_admin` SET rank = '[new_rank]' WHERE id = [admin_id]") + var/DBQuery/insert_query = dbcon.NewQuery("UPDATE [format_table_name("admin")] SET rank = '[new_rank]' WHERE id = [admin_id]") insert_query.Execute() - var/DBQuery/log_query = dbcon.NewQuery("INSERT INTO `test`.`erro_admin_log` (`id` ,`datetime` ,`adminckey` ,`adminip` ,`log` ) VALUES (NULL , NOW( ) , '[usr.ckey]', '[usr.client.address]', 'Edited the rank of [adm_ckey] to [new_rank]');") + var/DBQuery/log_query = dbcon.NewQuery("INSERT INTO `test`.[format_table_name("admin_log")] (`id` ,`datetime` ,`adminckey` ,`adminip` ,`log` ) VALUES (NULL , NOW( ) , '[usr.ckey]', '[usr.client.address]', 'Edited the rank of [adm_ckey] to [new_rank]');") log_query.Execute() usr << "\blue Admin rank changed." @@ -128,7 +128,7 @@ if(!istext(adm_ckey) || !isnum(new_permission)) return - var/DBQuery/select_query = dbcon.NewQuery("SELECT id, flags FROM erro_admin WHERE ckey = '[adm_ckey]'") + var/DBQuery/select_query = dbcon.NewQuery("SELECT id, flags FROM [format_table_name("admin")] WHERE ckey = '[adm_ckey]'") select_query.Execute() var/admin_id @@ -141,14 +141,24 @@ return if(admin_rights & new_permission) //This admin already has this permission, so we are removing it. - var/DBQuery/insert_query = dbcon.NewQuery("UPDATE `erro_admin` SET flags = [admin_rights & ~new_permission] WHERE id = [admin_id]") + var/DBQuery/insert_query = dbcon.NewQuery("UPDATE [format_table_name("admin")] SET flags = [admin_rights & ~new_permission] WHERE id = [admin_id]") insert_query.Execute() - var/DBQuery/log_query = dbcon.NewQuery("INSERT INTO `test`.`erro_admin_log` (`id` ,`datetime` ,`adminckey` ,`adminip` ,`log` ) VALUES (NULL , NOW( ) , '[usr.ckey]', '[usr.client.address]', 'Removed permission [rights2text(new_permission)] (flag = [new_permission]) to admin [adm_ckey]');") + var/DBQuery/log_query = dbcon.NewQuery("INSERT INTO `test`.[format_table_name("admin_log")] (`id` ,`datetime` ,`adminckey` ,`adminip` ,`log` ) VALUES (NULL , NOW( ) , '[usr.ckey]', '[usr.client.address]', 'Removed permission [rights2text(new_permission)] (flag = [new_permission]) to admin [adm_ckey]');") log_query.Execute() usr << "\blue Permission removed." else //This admin doesn't have this permission, so we are adding it. - var/DBQuery/insert_query = dbcon.NewQuery("UPDATE `erro_admin` SET flags = '[admin_rights | new_permission]' WHERE id = [admin_id]") + var/DBQuery/insert_query = dbcon.NewQuery("UPDATE [format_table_name("admin")] SET flags = '[admin_rights | new_permission]' WHERE id = [admin_id]") insert_query.Execute() - var/DBQuery/log_query = dbcon.NewQuery("INSERT INTO `test`.`erro_admin_log` (`id` ,`datetime` ,`adminckey` ,`adminip` ,`log` ) VALUES (NULL , NOW( ) , '[usr.ckey]', '[usr.client.address]', 'Added permission [rights2text(new_permission)] (flag = [new_permission]) to admin [adm_ckey]')") + var/DBQuery/log_query = dbcon.NewQuery("INSERT INTO `test`.[format_table_name("admin_log")] (`id` ,`datetime` ,`adminckey` ,`adminip` ,`log` ) VALUES (NULL , NOW( ) , '[usr.ckey]', '[usr.client.address]', 'Added permission [rights2text(new_permission)] (flag = [new_permission]) to admin [adm_ckey]')") log_query.Execute() - usr << "\blue Permission added." \ No newline at end of file + usr << "\blue Permission added." + +/datum/admins/proc/updateranktodb(ckey,newrank) + establish_db_connection() + if (!dbcon.IsConnected()) + return + var/sql_ckey = sanitizeSQL(ckey) + var/sql_admin_rank = sanitizeSQL(newrank) + + var/DBQuery/query_update = dbcon.NewQuery("UPDATE [format_table_name("player")] SET lastadminrank = '[sql_admin_rank]' WHERE ckey = '[sql_ckey]'") + query_update.Execute() \ No newline at end of file diff --git a/code/modules/admin/player_panel.dm b/code/modules/admin/player_panel.dm index 8d9a61b10e9..8873f385d90 100644 --- a/code/modules/admin/player_panel.dm +++ b/code/modules/admin/player_panel.dm @@ -81,9 +81,9 @@ body += "TP - " body += "PM - " body += "SM - " - body += "JMP" + body += "FLW" if(eyeref) - body += "|EYE" + body += "|EYE" body += "
" if(antagonist > 0) body += "Antagonist"; diff --git a/code/modules/admin/topic.dm b/code/modules/admin/topic.dm index a0ce958a5f4..78d99749fe4 100644 --- a/code/modules/admin/topic.dm +++ b/code/modules/admin/topic.dm @@ -160,6 +160,7 @@ admin_datums -= adm_ckey D.disassociate() + updateranktodb(adm_ckey, "player") message_admins("[key_name_admin(usr)] removed [adm_ckey] from the admins list") log_admin("[key_name(usr)] removed [adm_ckey] from the admins list") log_admin_rank_modification(adm_ckey, "Removed") @@ -204,6 +205,7 @@ var/client/C = directory[adm_ckey] //find the client with the specified ckey (if they are logged in) D.associate(C) //link up with the client and add verbs + updateranktodb(adm_ckey, new_rank) message_admins("[key_name_admin(usr)] edited the admin rank of [adm_ckey] to [new_rank]") log_admin("[key_name(usr)] edited the admin rank of [adm_ckey] to [new_rank]") log_admin_rank_modification(adm_ckey, new_rank) @@ -1032,6 +1034,63 @@ if("Cancel") return + //Watchlist + else if(href_list["watchlist"]) + if(!check_rights(R_ADMIN)) return + var/mob/M = locate(href_list["watchlist"]) + if(!dbcon.IsConnected()) + usr << "Failed to establish database connection." + return + if(!ismob(M)) + usr << "This can only be used on instances of type /mob" + return + if(!M.ckey) + usr << "This mob has no ckey" + return + var/sql_ckey = sanitizeSQL(M.ckey) + var/DBQuery/query = dbcon.NewQuery("SELECT ckey FROM [format_table_name("watch")] WHERE (ckey = '[sql_ckey]')") + query.Execute() + if(query.NextRow()) + switch(alert(usr, "Ckey already flagged", "[sql_ckey] is already on the watchlist, do you want to:", "Remove", "Edit reason", "Cancel")) + if("Cancel") + return + if("Remove") + var/DBQuery/query_watchdel = dbcon.NewQuery("DELETE FROM [format_table_name("watch")] WHERE ckey = '[sql_ckey]'") + if(!query_watchdel.Execute()) + var/err = query_watchdel.ErrorMsg() + log_game("SQL ERROR during removing watch entry. Error : \[[err]\]\n") + return + log_admin("[key_name_admin(usr)] has removed [key_name_admin(M)] from the watchlist") + message_admins("[key_name_admin(usr)] has removed [key_name_admin(M)] from the watchlist", 1) + if("Edit reason") + var/DBQuery/query_reason = dbcon.NewQuery("SELECT ckey, reason FROM [format_table_name("watch")] WHERE (ckey = '[sql_ckey]')") + query_reason.Execute() + if(query_reason.NextRow()) + var/watch_reason = query_reason.item[2] + var/new_reason = input("Insert new reason", "New Reason", "[watch_reason]", null) as null|text + new_reason = sanitizeSQL(new_reason) + if(!new_reason) + return + var/DBQuery/update_query = dbcon.NewQuery("UPDATE [format_table_name("watch")] SET reason = '[new_reason]' WHERE (ckey = '[sql_ckey]')") + if(!update_query.Execute()) + var/err = update_query.ErrorMsg() + log_game("SQL ERROR during edit watch entry reason. Error : \[[err]\]\n") + return + log_admin("[key_name_admin(usr)] has edited [sql_ckey]'s reason from [watch_reason] to [new_reason]",1) + message_admins("[key_name_admin(usr)] has edited [sql_ckey]'s reason from [watch_reason] to [new_reason]",1) + else + var/reason = input(usr,"Reason?","reason","Metagaming") as text|null + if(!reason) + return + reason = sanitizeSQL(reason) + var/DBQuery/query_watchadd = dbcon.NewQuery("INSERT INTO [format_table_name("watch")] (ckey, reason) VALUES ('[sql_ckey]', '[reason]')") + if(!query_watchadd.Execute()) + var/err = query_watchadd.ErrorMsg() + log_game("SQL ERROR during adding new watch entry. Error : \[[err]\]\n") + return + log_admin("[key_name_admin(usr)] has added [key_name_admin(M)] to the watchlist - Reason: [reason]") + message_admins("[key_name_admin(usr)] has added [key_name_admin(M)] to the watchlist - Reason: [reason]", 1) + else if(href_list["mute"]) if(!check_rights(R_MOD)) return @@ -1452,6 +1511,17 @@ if(!isobserver(usr)) C.admin_ghost() sleep(2) C.jumptomob(M) + + else if(href_list["adminplayerobservefollow"]) + if(!check_rights(R_MOD,0) && !check_rights(R_ADMIN)) return + + var/mob/M = locate(href_list["adminplayerobservefollow"]) + + var/client/C = usr.client + if(!isobserver(usr)) C.admin_ghost() + var/mob/dead/observer/A = C.mob + sleep(2) + A.ManualFollow(M) else if(href_list["check_antagonist"]) check_antagonists() @@ -1519,7 +1589,7 @@ src.owner << "Name = [M.name]; Real_name = [M.real_name]; Mind_name = [M.mind?"[M.mind.name]":""]; Key = [M.key];" src.owner << "Location = [location_description];" src.owner << "[special_role_description]" - src.owner << "(PM) (PP) (VV) (SM) ([admin_jump_link(M, src)]) (CA)" + src.owner << "(PM) (PP) (VV) (SM) (FLW) (CA)" else if(href_list["adminspawncookie"]) if(!check_rights(R_ADMIN|R_EVENT)) return @@ -2992,15 +3062,15 @@ if(isAI(target)) // AI core/eye follow links var/mob/living/silicon/ai/A = target - . = "JMP" + . = "FLW" if(A.client && A.eyeobj) // No point following clientless AI eyes - . += "|EYE" + . += "|EYE" return else if(istype(target, /mob/dead/observer)) var/mob/dead/observer/O = target - . = "JMP" + . = "FLW" if(O.mind && O.mind.current) - . += "|BDY" + . += "|BDY" return else - return "JMP" + return "FLW" diff --git a/code/modules/admin/verbs/adminhelp.dm b/code/modules/admin/verbs/adminhelp.dm index 0a4b63a6892..6b5fc5952ff 100644 --- a/code/modules/admin/verbs/adminhelp.dm +++ b/code/modules/admin/verbs/adminhelp.dm @@ -87,7 +87,7 @@ var/list/adminhelp_ignored_words = list("unknown","the","a","an","of","monkey"," mobs_found += found if(!ai_found && isAI(found)) ai_found = 1 - msg += "[original_word] (?) " + msg += "[original_word] (?) ([admin_jump_link(found, "holder")]) " continue msg += "[original_word] " @@ -147,3 +147,31 @@ var/list/adminhelp_ignored_words = list("unknown","the","a","an","of","monkey"," send2adminirc("[selected_type] from [key_name(src)]: [original_msg]") feedback_add_details("admin_verb","AH") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc! return + +/proc/send2irc_adminless_only(source, msg, requiredflags = R_BAN) + var/admin_number_total = 0 //Total number of admins + var/admin_number_afk = 0 //Holds the number of admins who are afk + var/admin_number_ignored = 0 //Holds the number of admins without +BAN (so admins who are not really admins) + var/admin_number_decrease = 0 //Holds the number of admins with are afk, ignored or both + for(var/client/X in admins) + admin_number_total++; + var/invalid = 0 + if(requiredflags != 0 && !check_rights_for(X, requiredflags)) + admin_number_ignored++ + invalid = 1 + if(X.is_afk()) + admin_number_afk++ + invalid = 1 + if(X.holder.fakekey) + admin_number_ignored++ + invalid = 1 + if(invalid) + admin_number_decrease++ + var/admin_number_present = admin_number_total - admin_number_decrease //Number of admins who are neither afk nor invalid + if(admin_number_present <= 0) + if(!admin_number_afk && !admin_number_ignored) + send2irc(source, "[msg] - No admins online") + else + send2irc(source, "[msg] - All admins AFK ([admin_number_afk]/[admin_number_total]) or skipped ([admin_number_ignored]/[admin_number_total])") + return admin_number_present + \ No newline at end of file diff --git a/code/modules/admin/verbs/check_customitem_activity.dm b/code/modules/admin/verbs/check_customitem_activity.dm index 19dfd6bbdce..18a796a0b08 100644 --- a/code/modules/admin/verbs/check_customitem_activity.dm +++ b/code/modules/admin/verbs/check_customitem_activity.dm @@ -55,7 +55,7 @@ var/inactive_keys = "None
" //run a query to get all ckeys inactive for over 2 months var/list/inactive_ckeys = list() if(ckeys_with_customitems.len) - var/DBQuery/query_inactive = dbcon.NewQuery("SELECT ckey, lastseen FROM erro_player WHERE datediff(Now(), lastseen) > 60") + var/DBQuery/query_inactive = dbcon.NewQuery("SELECT ckey, lastseen FROM [format_table_name("player")] WHERE datediff(Now(), lastseen) > 60") query_inactive.Execute() while(query_inactive.NextRow()) var/cur_ckey = query_inactive.item[1] @@ -67,7 +67,7 @@ var/inactive_keys = "None
" //if there are ckeys left over, check whether they have a database entry at all if(ckeys_with_customitems.len) for(var/cur_ckey in ckeys_with_customitems) - var/DBQuery/query_inactive = dbcon.NewQuery("SELECT ckey FROM erro_player WHERE ckey = '[cur_ckey]'") + var/DBQuery/query_inactive = dbcon.NewQuery("SELECT ckey FROM [format_table_name("player")] WHERE ckey = '[cur_ckey]'") query_inactive.Execute() if(!query_inactive.RowCount()) inactive_ckeys += cur_ckey diff --git a/code/modules/admin/verbs/mapping.dm b/code/modules/admin/verbs/mapping.dm index 319c76a6974..5acf6c21b44 100644 --- a/code/modules/admin/verbs/mapping.dm +++ b/code/modules/admin/verbs/mapping.dm @@ -118,33 +118,37 @@ var/intercom_range_display_status = 0 del(F) feedback_add_details("admin_verb","mIRD") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc! +var/list/admin_verbs_show_debug_verbs = list( + /client/proc/camera_view, //-errorage + /client/proc/sec_camera_report, //-errorage + /client/proc/intercom_view, //-errorage + /client/proc/Cell, //More air things + /client/proc/atmosscan, //check plumbing + /client/proc/powerdebug, //check power + /client/proc/count_objects_on_z_level, + /client/proc/count_objects_all, + /client/proc/cmd_assume_direct_control, //-errorage + /client/proc/startSinglo, + /client/proc/ticklag, + /client/proc/cmd_admin_grantfullaccess, +// /client/proc/splash, + /client/proc/cmd_admin_areatest, + /client/proc/cmd_admin_rejuvenate, + /datum/admins/proc/show_traitor_panel, + /client/proc/print_jobban_old, + /client/proc/print_jobban_old_filter, + /client/proc/forceEvent, + ///client/proc/cmd_admin_rejuvenate, + /client/proc/nanomapgen_DumpImage +) + /client/proc/enable_debug_verbs() set category = "Debug" set name = "Debug verbs" if(!check_rights(R_DEBUG)) return - src.verbs += /client/proc/camera_view //-errorage - src.verbs += /client/proc/sec_camera_report //-errorage - src.verbs += /client/proc/intercom_view //-errorage - src.verbs += /client/proc/Cell //More air things - src.verbs += /client/proc/atmosscan //check plumbing - src.verbs += /client/proc/powerdebug //check power - src.verbs += /client/proc/count_objects_on_z_level - src.verbs += /client/proc/count_objects_all - src.verbs += /client/proc/cmd_assume_direct_control //-errorage - src.verbs += /client/proc/startSinglo - src.verbs += /client/proc/ticklag - src.verbs += /client/proc/cmd_admin_grantfullaccess -// src.verbs += /client/proc/splash - src.verbs += /client/proc/cmd_admin_areatest - src.verbs += /client/proc/cmd_admin_rejuvenate - src.verbs += /datum/admins/proc/show_traitor_panel - src.verbs += /client/proc/print_jobban_old - src.verbs += /client/proc/print_jobban_old_filter - src.verbs += /client/proc/forceEvent - //src.verbs += /client/proc/cmd_admin_rejuvenate - src.verbs += /client/proc/nanomapgen_DumpImage + verbs += admin_verbs_show_debug_verbs feedback_add_details("admin_verb","mDV") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc! diff --git a/code/modules/assembly/timer.dm b/code/modules/assembly/timer.dm index f773d23229f..24e9a33a170 100644 --- a/code/modules/assembly/timer.dm +++ b/code/modules/assembly/timer.dm @@ -110,6 +110,11 @@ if(href_list["time"]) timing = !timing + if(timing && istype(holder, /obj/item/device/transfer_valve)) + var/timer_message = "[key_name_admin(usr)](?) ([admin_jump_link(usr, "holder")]) activated [src] attachment on [holder]." + message_admins(timer_message) + bombers += timer_message + log_game("[key_name(usr)] activated [src] attachment for [loc]") update_icon() if(href_list["reset"]) time = set_time diff --git a/code/modules/client/client procs.dm b/code/modules/client/client procs.dm index 2efc59f66c5..9605e25e54f 100644 --- a/code/modules/client/client procs.dm +++ b/code/modules/client/client procs.dm @@ -303,7 +303,7 @@ var/sql_ckey = sql_sanitize_text(src.ckey) - var/DBQuery/query = dbcon.NewQuery("SELECT id, datediff(Now(),firstseen) as age FROM erro_player WHERE ckey = '[sql_ckey]'") + var/DBQuery/query = dbcon.NewQuery("SELECT id, datediff(Now(),firstseen) as age FROM [format_table_name("player")] WHERE ckey = '[sql_ckey]'") query.Execute() var/sql_id = 0 player_age = 0 // New players won't have an entry so knowing we have a connection we set this to zero to be updated if their is a record. @@ -312,24 +312,30 @@ player_age = text2num(query.item[2]) break - var/DBQuery/query_ip = dbcon.NewQuery("SELECT ckey FROM erro_player WHERE ip = '[address]'") + var/DBQuery/query_ip = dbcon.NewQuery("SELECT ckey FROM [format_table_name("player")] WHERE ip = '[address]'") query_ip.Execute() related_accounts_ip = list() while(query_ip.NextRow()) if(ckey != query_ip.item[1]) related_accounts_ip.Add("[query_ip.item[1]]") - var/DBQuery/query_cid = dbcon.NewQuery("SELECT ckey FROM erro_player WHERE computerid = '[computer_id]'") + var/DBQuery/query_cid = dbcon.NewQuery("SELECT ckey FROM [format_table_name("player")] WHERE computerid = '[computer_id]'") query_cid.Execute() related_accounts_cid = list() while(query_cid.NextRow()) if(ckey != query_cid.item[1]) - related_accounts_cid.Add("[query_cid.item[1]]") - + related_accounts_cid.Add("[query_cid.item[1]]") + //Log all the alts if(related_accounts_cid.len) log_access("Alts: [key_name(src)]:[list2text(related_accounts_cid, " - ")]") + var/DBQuery/query_watch = dbcon.NewQuery("SELECT ckey, reason FROM [format_table_name("watch")] WHERE (ckey = '[sql_ckey]')") + query_watch.Execute() + if(query_watch.NextRow()) + message_admins("Notice: [key_name_admin(src)] is flagged for watching and has just connected - Reason: [query_watch.item[2]]") + send2irc_adminless_only("Watchlist", "[key_name_admin(src)] is flagged for watching and has just connected - Reason: [query_watch.item[2]]") + //Just the standard check to see if it's actually a number if(sql_id) if(istext(sql_id)) @@ -348,16 +354,16 @@ if(sql_id) //Player already identified previously, we need to just update the 'lastseen', 'ip' and 'computer_id' variables - var/DBQuery/query_update = dbcon.NewQuery("UPDATE erro_player SET lastseen = Now(), ip = '[sql_ip]', computerid = '[sql_computerid]', lastadminrank = '[sql_admin_rank]' WHERE id = [sql_id]") + var/DBQuery/query_update = dbcon.NewQuery("UPDATE [format_table_name("player")] SET lastseen = Now(), ip = '[sql_ip]', computerid = '[sql_computerid]', lastadminrank = '[sql_admin_rank]' WHERE id = [sql_id]") query_update.Execute() else //New player!! Need to insert all the stuff - var/DBQuery/query_insert = dbcon.NewQuery("INSERT INTO erro_player (id, ckey, firstseen, lastseen, ip, computerid, lastadminrank) VALUES (null, '[sql_ckey]', Now(), Now(), '[sql_ip]', '[sql_computerid]', '[sql_admin_rank]')") + var/DBQuery/query_insert = dbcon.NewQuery("INSERT INTO [format_table_name("player")] (id, ckey, firstseen, lastseen, ip, computerid, lastadminrank) VALUES (null, '[sql_ckey]', Now(), Now(), '[sql_ip]', '[sql_computerid]', '[sql_admin_rank]')") query_insert.Execute() //Logging player access var/serverip = "[world.internet_address]:[world.port]" - var/DBQuery/query_accesslog = dbcon.NewQuery("INSERT INTO `erro_connection_log`(`id`,`datetime`,`serverip`,`ckey`,`ip`,`computerid`) VALUES(null,Now(),'[serverip]','[sql_ckey]','[sql_ip]','[sql_computerid]');") + var/DBQuery/query_accesslog = dbcon.NewQuery("INSERT INTO `[format_table_name("connection_log")]`(`id`,`datetime`,`serverip`,`ckey`,`ip`,`computerid`) VALUES(null,Now(),'[serverip]','[sql_ckey]','[sql_ip]','[sql_computerid]');") query_accesslog.Execute() diff --git a/code/modules/client/preferences_mysql.dm b/code/modules/client/preferences_mysql.dm index f098ff77989..d78a28d8c59 100644 --- a/code/modules/client/preferences_mysql.dm +++ b/code/modules/client/preferences_mysql.dm @@ -1,6 +1,6 @@ /datum/preferences/proc/load_preferences(client/C) - var/DBQuery/query = dbcon.NewQuery("SELECT ooccolor,UI_style,UI_style_color,UI_style_alpha,be_special,default_slot,toggles,sound,randomslot,volume FROM erro_player WHERE ckey='[C.ckey]'") + var/DBQuery/query = dbcon.NewQuery("SELECT ooccolor,UI_style,UI_style_color,UI_style_alpha,be_special,default_slot,toggles,sound,randomslot,volume FROM [format_table_name("player")] WHERE ckey='[C.ckey]'") if(!query.Execute()) var/err = query.ErrorMsg() log_game("SQL ERROR during loading player preferences. Error : \[[err]\]\n") @@ -37,7 +37,7 @@ /datum/preferences/proc/save_preferences(client/C) - var/DBQuery/query = dbcon.NewQuery("UPDATE erro_player SET ooccolor='[ooccolor]',UI_style='[UI_style]',UI_style_color='[UI_style_color]',UI_style_alpha='[UI_style_alpha]',be_special='[be_special]',default_slot='[default_slot]',toggles='[toggles]',sound='[sound]',randomslot='[randomslot]',volume='[volume]' WHERE ckey='[C.ckey]'") + var/DBQuery/query = dbcon.NewQuery("UPDATE [format_table_name("player")] SET ooccolor='[ooccolor]',UI_style='[UI_style]',UI_style_color='[UI_style_color]',UI_style_alpha='[UI_style_alpha]',be_special='[be_special]',default_slot='[default_slot]',toggles='[toggles]',sound='[sound]',randomslot='[randomslot]',volume='[volume]' WHERE ckey='[C.ckey]'") if(!query.Execute()) var/err = query.ErrorMsg() log_game("SQL ERROR during saving player preferences. Error : \[[err]\]\n") @@ -51,7 +51,7 @@ slot = sanitize_integer(slot, 1, MAX_SAVE_SLOTS, initial(default_slot)) if(slot != default_slot) default_slot = slot - var/DBQuery/firstquery = dbcon.NewQuery("UPDATE erro_player SET default_slot=[slot] WHERE ckey='[C.ckey]'") + var/DBQuery/firstquery = dbcon.NewQuery("UPDATE [format_table_name("player")] SET default_slot=[slot] WHERE ckey='[C.ckey]'") firstquery.Execute() var/DBQuery/query = dbcon.NewQuery("SELECT * FROM characters WHERE ckey='[C.ckey]' AND slot='[slot]'") diff --git a/code/modules/mining/mine_turfs.dm b/code/modules/mining/mine_turfs.dm index f23bdb4d25a..88bd7029803 100644 --- a/code/modules/mining/mine_turfs.dm +++ b/code/modules/mining/mine_turfs.dm @@ -287,7 +287,7 @@ var/global/list/rockTurfEdgeCache if(z != 5) notify_admins = 1 if(!triggered_by_explosion) - message_admins("[key_name_admin(user)]? (FLW) has triggered a gibtonite deposit reaction at [A.name] (JMP).") + message_admins("[key_name_admin(user)]? ([admin_jump_link(user, "holder")]) has triggered a gibtonite deposit reaction at [A.name] (JMP).") else message_admins("An explosion has triggered a gibtonite deposit reaction at [A.name] (JMP).") diff --git a/code/modules/mining/ore.dm b/code/modules/mining/ore.dm index cf66bdce72e..0ad8d89cfe9 100644 --- a/code/modules/mining/ore.dm +++ b/code/modules/mining/ore.dm @@ -174,9 +174,9 @@ if(triggered_by == 1) message_admins("An explosion has triggered a [name] to detonate at [A.name] (JMP).") else if(triggered_by == 2) - message_admins("A signal has triggered a [name] to detonate at [A.name] (JMP). Igniter attacher: [key_name_admin(attacher)]? (FLW)") + message_admins("A signal has triggered a [name] to detonate at [A.name] (JMP). Igniter attacher: [key_name_admin(attacher)]? ([admin_jump_link(attacher, "holder")])") else - message_admins("[key_name_admin(user)]? (FLW) has triggered a [name] to detonate at [A.name] (JMP).") + message_admins("[key_name_admin(user)]? ([admin_jump_link(user, "holder")]) has triggered a [name] to detonate at [A.name] (JMP).") if(triggered_by == 1) log_game("An explosion has primed a [name] for detonation at [A.name]([bombturf.x],[bombturf.y],[bombturf.z])") else if(triggered_by == 2) diff --git a/code/modules/mob/dead/observer/observer.dm b/code/modules/mob/dead/observer/observer.dm index 84209d2ef37..eba5d9ce5a7 100644 --- a/code/modules/mob/dead/observer/observer.dm +++ b/code/modules/mob/dead/observer/observer.dm @@ -311,13 +311,13 @@ This is the proc mobs get to turn into a ghost. Forked from ghostize due to comp if(jobban_isbanned(M, "AntagHUD")) src << "\red You have been banned from using this feature" return - if(config.antag_hud_restricted && !M.has_enabled_antagHUD &&!client.holder) + if(config.antag_hud_restricted && !M.has_enabled_antagHUD && !check_rights(R_MOD,0)) var/response = alert(src, "If you turn this on, you will not be able to take any part in the round.","Are you sure you want to turn this feature on?","Yes","No") if(response == "No") return M.can_reenter_corpse = 0 if(M in respawnable_list) respawnable_list -= M - if(!M.has_enabled_antagHUD && !client.holder) + if(!M.has_enabled_antagHUD && !check_rights(R_MOD,0)) M.has_enabled_antagHUD = 1 if(M.antagHUD) M.antagHUD = 0 @@ -598,4 +598,14 @@ This is the proc mobs get to turn into a ghost. Forked from ghostize due to comp //add images for the 60inv things ghosts can normally see when darkness is enabled so they can see them now client.images |= ghost_darkness_images if (ghostimage) - client.images -= ghostimage //remove ourself \ No newline at end of file + client.images -= ghostimage //remove ourself + +//this is called when a ghost is drag clicked to something. +/mob/dead/observer/MouseDrop(atom/over) + if(!usr || !over) return + if (isobserver(usr) && usr.client.holder && isliving(over)) + if (usr.client.holder.cmd_ghost_drag(src,over)) + return + + return ..() + \ No newline at end of file diff --git a/code/modules/mob/living/carbon/carbon.dm b/code/modules/mob/living/carbon/carbon.dm index b67e2ad878e..1ec1dc2608e 100644 --- a/code/modules/mob/living/carbon/carbon.dm +++ b/code/modules/mob/living/carbon/carbon.dm @@ -452,9 +452,9 @@ var/list/ventcrawl_machinery = list(/obj/machinery/atmospherics/unary/vent_pump, var/start_T_descriptor = "tile at [start_T.x], [start_T.y], [start_T.z] in area [get_area(start_T)]" var/end_T_descriptor = "tile at [end_T.x], [end_T.y], [end_T.z] in area [get_area(end_T)]" - M.attack_log += text("\[[time_stamp()]\] Has been thrown by [usr.name] ([usr.ckey]) from [start_T_descriptor] with the target [end_T_descriptor]") - usr.attack_log += text("\[[time_stamp()]\] Has thrown [M.name] ([M.ckey]) from [start_T_descriptor] with the target [end_T_descriptor]") - msg_admin_attack("[usr.name] ([usr.ckey])[isAntag(usr) ? "(ANTAG)" : ""] has thrown [M.name] ([M.ckey]) from [start_T_descriptor] with the target [end_T_descriptor] (JMP)") + M.attack_log += text("\[[time_stamp()]\] Has been thrown by [key_name(usr)] from [start_T_descriptor] with the target [end_T_descriptor]") + usr.attack_log += text("\[[time_stamp()]\] Has thrown [key_name(M)] from [start_T_descriptor] with the target [end_T_descriptor]") + msg_admin_attack("[key_name_admin(usr)](?) ([admin_jump_link(usr, "holder")]) has thrown [key_name_admin(M)] from [start_T_descriptor] with the target [end_T_descriptor]") if(!iscarbon(usr)) M.LAssailant = null diff --git a/code/modules/mob/living/carbon/human/human_defense.dm b/code/modules/mob/living/carbon/human/human_defense.dm index bccf63c73de..96f0b4fd04d 100644 --- a/code/modules/mob/living/carbon/human/human_defense.dm +++ b/code/modules/mob/living/carbon/human/human_defense.dm @@ -239,9 +239,9 @@ emp_act --src.meatleft user << "\red You hack off a chunk of meat from [src.name]" if(!src.meatleft) - src.attack_log += "\[[time_stamp()]\] Was chopped up into meat by [user]/[user.ckey]" - user.attack_log += "\[[time_stamp()]\] Chopped up [src]/[src.ckey] into meat" - msg_admin_attack("[user.name] ([user.ckey])[isAntag(user) ? "(ANTAG)" : ""] chopped up [src] ([src.ckey]) into meat (JMP)") + src.attack_log += "\[[time_stamp()]\] Was chopped up into meat by [key_name(user)]" + user.attack_log += "\[[time_stamp()]\] Chopped up [key_name(src)] into meat" + msg_admin_attack("[key_name_admin(user)](?) ([admin_jump_link(user, "holder")]) chopped up [key_name_admin(src)] into meat") if(!iscarbon(user)) LAssailant = null else @@ -394,12 +394,11 @@ emp_act if(ismob(O.thrower)) var/mob/M = O.thrower - var/client/assailant = M.client - if(assailant) - src.attack_log += text("\[[time_stamp()]\] Has been hit with a [O], thrown by [M.name] ([assailant.ckey])") - M.attack_log += text("\[[time_stamp()]\] Hit [src.name] ([src.ckey]) with a thrown [O]") + if(M) + src.attack_log += text("\[[time_stamp()]\] Has been hit with a [O], thrown by [key_name(M)]") + M.attack_log += text("\[[time_stamp()]\] Hit [key_name(src)] with a thrown [O]") if(!istype(src,/mob/living/simple_animal/mouse)) - msg_admin_attack("[src.name] ([src.ckey]) was hit by a [O], thrown by [M.name] ([assailant.ckey])[isAntag(M) ? "(ANTAG)" : ""] (JMP)") + msg_admin_attack("[key_name_admin(src)](?) ([admin_jump_link(src, "holder")]) was hit by a [O], thrown by [key_name_admin(M)]") //thrown weapon embedded object code. if(dtype == BRUTE && istype(O,/obj/item)) diff --git a/code/modules/mob/living/living_defense.dm b/code/modules/mob/living/living_defense.dm index 5c94d8d5dbd..55578172f3f 100644 --- a/code/modules/mob/living/living_defense.dm +++ b/code/modules/mob/living/living_defense.dm @@ -115,12 +115,11 @@ if(ismob(O.thrower)) var/mob/M = O.thrower - var/client/assailant = M.client - if(assailant) - src.attack_log += text("\[[time_stamp()]\] Has been hit with a [O], thrown by [M.name] ([assailant.ckey])") - M.attack_log += text("\[[time_stamp()]\] Hit [src.name] ([src.ckey]) with a thrown [O]") + if(M) + src.attack_log += text("\[[time_stamp()]\] Has been hit with a [O], thrown by [key_name(M)]") + M.attack_log += text("\[[time_stamp()]\] Hit [key_name(src)] with a thrown [O]") if(!istype(src,/mob/living/simple_animal/mouse)) - msg_admin_attack("[src.name] ([src.ckey]) was hit by a [O], thrown by [M.name] ([assailant.ckey])[isAntag(M) ? "(ANTAG)" : ""] (JMP)") + msg_admin_attack("[key_name_admin(src)](?) ([admin_jump_link(src, "holder")]) was hit by a [O], thrown by [key_name_admin(M)]") // Begin BS12 momentum-transfer code. if(O.throw_source && speed >= 15) diff --git a/code/modules/mob/living/simple_animal/borer.dm b/code/modules/mob/living/simple_animal/borer.dm index 5863daece9a..2e2a969b98c 100644 --- a/code/modules/mob/living/simple_animal/borer.dm +++ b/code/modules/mob/living/simple_animal/borer.dm @@ -196,8 +196,8 @@ src << "\red You plunge your probosci deep into the cortex of the host brain, interfacing directly with their nervous system." host << "\red You feel a strange shifting sensation behind your eyes as an alien consciousness displaces yours." var/borer_key = src.key - host.attack_log += text("\[[time_stamp()]\] [src.name] ([src.ckey]) has assumed control of [host.name] ([host.ckey])") - msg_admin_attack("[src.name] ([src.ckey]) has assumed control of [host.name] ([host.ckey]) (JMP)") + host.attack_log += text("\[[time_stamp()]\] [key_name(src)] has assumed control of [key_name(host)]") + msg_admin_attack("[key_name_admin(src)](?) ([admin_jump_link(src, "holder")]) has assumed control of [key_name_admin(host)]") // host -> brain var/h2b_id = host.computer_id var/h2b_ip= host.lastKnownIP diff --git a/code/modules/mob/login.dm b/code/modules/mob/login.dm index 39a1fb53631..e72157aedfb 100644 --- a/code/modules/mob/login.dm +++ b/code/modules/mob/login.dm @@ -45,6 +45,9 @@ client.perspective = MOB_PERSPECTIVE + if(ckey in deadmins) + verbs += /client/proc/readmin + //Clear ability list and update from mob. client.verbs -= ability_verbs @@ -57,27 +60,3 @@ client.verbs |= H.species.abilities CallHook("Login", list("client" = src.client, "mob" = src)) - - //Update morgues on login/logout - if (stat == DEAD) - var/obj/structure/morgue/Morgue = null - var/mob/living/carbon/human/C = null - if (istype(src,/mob/dead/observer)) //We're a ghost, let's find our corpse - var/mob/dead/observer/G = src - if(!G.mind) //This'll probably break morgue sprites, but the line under the next If statement causes runtimes with Assume Direct Control. - return - if (G.can_reenter_corpse && G.mind.current) - C = G.mind.current - else if (istype(src,/mob/living/carbon/human)) - C = src - - if (C) //We found our corpse, is it inside a morgue? - if (istype(C.loc,/obj/structure/morgue)) - Morgue = C.loc - else if (istype(C.loc,/obj/structure/closet/body_bag)) - var/obj/structure/closet/body_bag/B = C.loc - if (istype(B.loc,/obj/structure/morgue)) - Morgue = B.loc - if (Morgue) - Morgue.update() - diff --git a/code/modules/mob/logout.dm b/code/modules/mob/logout.dm index 36df2619e38..8be55390b17 100644 --- a/code/modules/mob/logout.dm +++ b/code/modules/mob/logout.dm @@ -10,28 +10,7 @@ if(admins_number == 0) //Apparently the admin logging out is no longer an admin at this point, so we have to check this towards 0 and not towards 1. Awell. send2adminirc("[key_name(src)] logged out - no more admins online.") ..() - - //Update morgues on login/logout - if (stat == DEAD) - var/obj/structure/morgue/Morgue = null - var/mob/living/carbon/human/C = null - if (istype(src,/mob/dead/observer)) //We're a ghost, let's find our corpse - var/mob/dead/observer/G = src - if(!G.mind) //This'll probably break morgue sprites, but the line under the next If statement causes runtimes with Assume Direct Control. - return 1 - if (G.can_reenter_corpse && G.mind.current) - C = G.mind.current - else if (istype(src,/mob/living/carbon/human)) - C = src - - if (C) //We found our corpse, is it inside a morgue? - if (istype(C.loc,/obj/structure/morgue)) - Morgue = C.loc - else if (istype(C.loc,/obj/structure/closet/body_bag)) - var/obj/structure/closet/body_bag/B = C.loc - if (istype(B.loc,/obj/structure/morgue)) - Morgue = B.loc - if (Morgue) - Morgue.update() - + + CallHook("Logout", list("client" = src.client, "mob" = src)) + return 1 \ No newline at end of file diff --git a/code/modules/mob/mob_helpers.dm b/code/modules/mob/mob_helpers.dm index 953a898e25b..4416a6f33db 100644 --- a/code/modules/mob/mob_helpers.dm +++ b/code/modules/mob/mob_helpers.dm @@ -470,7 +470,7 @@ var/list/intents = list("help","disarm","grab","harm") name = realname for(var/mob/M in player_list) - if(M.client && ((!istype(M, /mob/new_player) && M.stat == DEAD) || (M.client.holder && (M.client.holder.rights & R_MOD))) && (M.client.prefs.toggles & CHAT_DEAD)) + if(M.client && ((!istype(M, /mob/new_player) && M.stat == DEAD) || check_rights(R_MOD,0)) && (M.client.prefs.toggles & CHAT_DEAD)) var/follow var/lname if(subject) @@ -481,7 +481,7 @@ var/list/intents = list("help","disarm","grab","harm") var/mob/dead/observer/DM if(istype(subject, /mob/dead/observer)) DM = subject - if(M.client.holder) // What admins see + if(check_rights(R_MOD,0)) // What admins see lname = "[keyname][(DM && DM.anonsay) ? "*" : (DM ? "" : "^")] ([name])" else if(DM && DM.anonsay) // If the person is actually observer they have the option to be anonymous diff --git a/code/modules/mob/new_player/login.dm b/code/modules/mob/new_player/login.dm index 53946a3eb1d..8c8e10493dc 100644 --- a/code/modules/mob/new_player/login.dm +++ b/code/modules/mob/new_player/login.dm @@ -30,6 +30,8 @@ CallHook("Login", list("client" = src.client, "mob" = src)) new_player_panel() + if(ckey in deadmins) + verbs += /client/proc/readmin spawn(40) if(client) handle_privacy_poll() diff --git a/code/modules/mob/new_player/new_player.dm b/code/modules/mob/new_player/new_player.dm index 15456b3fa7c..c7cebaa3acf 100644 --- a/code/modules/mob/new_player/new_player.dm +++ b/code/modules/mob/new_player/new_player.dm @@ -43,7 +43,7 @@ var/isadmin = 0 if(src.client && src.client.holder) isadmin = 1 - var/DBQuery/query = dbcon.NewQuery("SELECT id FROM erro_poll_question WHERE [(isadmin ? "" : "adminonly = false AND")] Now() BETWEEN starttime AND endtime AND id NOT IN (SELECT pollid FROM erro_poll_vote WHERE ckey = \"[ckey]\") AND id NOT IN (SELECT pollid FROM erro_poll_textreply WHERE ckey = \"[ckey]\")") + var/DBQuery/query = dbcon.NewQuery("SELECT id FROM [format_table_name("poll_question")] WHERE [(isadmin ? "" : "adminonly = false AND")] Now() BETWEEN starttime AND endtime AND id NOT IN (SELECT pollid FROM [format_table_name("poll_vote")] WHERE ckey = \"[ckey]\") AND id NOT IN (SELECT pollid FROM [format_table_name("poll_textreply")] WHERE ckey = \"[ckey]\")") query.Execute() var/newpoll = 0 while(query.NextRow()) @@ -178,7 +178,7 @@ var/voted = 0 //First check if the person has not voted yet. - var/DBQuery/query = dbcon.NewQuery("SELECT * FROM erro_privacy WHERE ckey='[src.ckey]'") + var/DBQuery/query = dbcon.NewQuery("SELECT * FROM [format_table_name("privacy")] WHERE ckey='[src.ckey]'") query.Execute() while(query.NextRow()) voted = 1 @@ -203,7 +203,7 @@ return if(!voted) - var/sql = "INSERT INTO erro_privacy VALUES (null, Now(), '[src.ckey]', '[option]')" + var/sql = "INSERT INTO [format_table_name("privacy")] VALUES (null, Now(), '[src.ckey]', '[option]')" var/DBQuery/query_insert = dbcon.NewQuery(sql) query_insert.Execute() usr << "Thank you for your vote!" diff --git a/code/modules/mob/new_player/poll.dm b/code/modules/mob/new_player/poll.dm index 884b7ffc4ee..4786537d36b 100644 --- a/code/modules/mob/new_player/poll.dm +++ b/code/modules/mob/new_player/poll.dm @@ -5,7 +5,7 @@ return var/voted = 0 - var/DBQuery/query = dbcon.NewQuery("SELECT * FROM erro_privacy WHERE ckey='[src.ckey]'") + var/DBQuery/query = dbcon.NewQuery("SELECT * FROM [format_table_name("privacy")] WHERE ckey='[src.ckey]'") query.Execute() while(query.NextRow()) voted = 1 @@ -53,7 +53,7 @@ if(src.client && src.client.holder) isadmin = 1 - var/DBQuery/select_query = dbcon.NewQuery("SELECT id, question FROM erro_poll_question WHERE [(isadmin ? "" : "adminonly = false AND")] Now() BETWEEN starttime AND endtime") + var/DBQuery/select_query = dbcon.NewQuery("SELECT id, question FROM [format_table_name("poll_question")] WHERE [(isadmin ? "" : "adminonly = false AND")] Now() BETWEEN starttime AND endtime") select_query.Execute() var/output = "
Player polls" @@ -84,7 +84,7 @@ establish_db_connection() if(dbcon.IsConnected()) - var/DBQuery/select_query = dbcon.NewQuery("SELECT starttime, endtime, question, polltype, multiplechoiceoptions FROM erro_poll_question WHERE id = [pollid]") + var/DBQuery/select_query = dbcon.NewQuery("SELECT starttime, endtime, question, polltype, multiplechoiceoptions FROM [format_table_name("poll_question")] WHERE id = [pollid]") select_query.Execute() var/pollstarttime = "" @@ -109,7 +109,7 @@ switch(polltype) //Polls that have enumerated options if("OPTION") - var/DBQuery/voted_query = dbcon.NewQuery("SELECT optionid FROM erro_poll_vote WHERE pollid = [pollid] AND ckey = '[usr.ckey]'") + var/DBQuery/voted_query = dbcon.NewQuery("SELECT optionid FROM [format_table_name("poll_vote")] WHERE pollid = [pollid] AND ckey = '[usr.ckey]'") voted_query.Execute() var/voted = 0 @@ -121,7 +121,7 @@ var/list/datum/polloption/options = list() - var/DBQuery/options_query = dbcon.NewQuery("SELECT id, text FROM erro_poll_option WHERE pollid = [pollid]") + var/DBQuery/options_query = dbcon.NewQuery("SELECT id, text FROM [format_table_name("poll_option")] WHERE pollid = [pollid]") options_query.Execute() while(options_query.NextRow()) var/datum/polloption/PO = new() @@ -162,7 +162,7 @@ //Polls with a text input if("TEXT") - var/DBQuery/voted_query = dbcon.NewQuery("SELECT replytext FROM erro_poll_textreply WHERE pollid = [pollid] AND ckey = '[usr.ckey]'") + var/DBQuery/voted_query = dbcon.NewQuery("SELECT replytext FROM [format_table_name("poll_textreply")] WHERE pollid = [pollid] AND ckey = '[usr.ckey]'") voted_query.Execute() var/voted = 0 @@ -204,7 +204,7 @@ //Polls with a text input if("NUMVAL") - var/DBQuery/voted_query = dbcon.NewQuery("SELECT o.text, v.rating FROM erro_poll_option o, erro_poll_vote v WHERE o.pollid = [pollid] AND v.ckey = '[usr.ckey]' AND o.id = v.optionid") + var/DBQuery/voted_query = dbcon.NewQuery("SELECT o.text, v.rating FROM [format_table_name("poll_option")] o, erro_poll_vote v WHERE o.pollid = [pollid] AND v.ckey = '[usr.ckey]' AND o.id = v.optionid") voted_query.Execute() var/output = "
Player poll" @@ -230,7 +230,7 @@ var/minid = 999999 var/maxid = 0 - var/DBQuery/option_query = dbcon.NewQuery("SELECT id, text, minval, maxval, descmin, descmid, descmax FROM erro_poll_option WHERE pollid = [pollid]") + var/DBQuery/option_query = dbcon.NewQuery("SELECT id, text, minval, maxval, descmin, descmid, descmax FROM [format_table_name("poll_option")] WHERE pollid = [pollid]") option_query.Execute() while(option_query.NextRow()) var/optionid = text2num(option_query.item[1]) @@ -273,7 +273,7 @@ src << browse(output,"window=playerpoll;size=500x500") if("MULTICHOICE") - var/DBQuery/voted_query = dbcon.NewQuery("SELECT optionid FROM erro_poll_vote WHERE pollid = [pollid] AND ckey = '[usr.ckey]'") + var/DBQuery/voted_query = dbcon.NewQuery("SELECT optionid FROM [format_table_name("poll_vote")] WHERE pollid = [pollid] AND ckey = '[usr.ckey]'") voted_query.Execute() var/list/votedfor = list() @@ -286,7 +286,7 @@ var/maxoptionid = 0 var/minoptionid = 0 - var/DBQuery/options_query = dbcon.NewQuery("SELECT id, text FROM erro_poll_option WHERE pollid = [pollid]") + var/DBQuery/options_query = dbcon.NewQuery("SELECT id, text FROM [format_table_name("poll_option")] WHERE pollid = [pollid]") options_query.Execute() while(options_query.NextRow()) var/datum/polloption/PO = new() @@ -345,7 +345,7 @@ establish_db_connection() if(dbcon.IsConnected()) - var/DBQuery/select_query = dbcon.NewQuery("SELECT starttime, endtime, question, polltype, multiplechoiceoptions FROM erro_poll_question WHERE id = [pollid] AND Now() BETWEEN starttime AND endtime") + var/DBQuery/select_query = dbcon.NewQuery("SELECT starttime, endtime, question, polltype, multiplechoiceoptions FROM [format_table_name("poll_question")] WHERE id = [pollid] AND Now() BETWEEN starttime AND endtime") select_query.Execute() var/validpoll = 0 @@ -363,7 +363,7 @@ usr << "\red Poll is not valid." return - var/DBQuery/select_query2 = dbcon.NewQuery("SELECT id FROM erro_poll_option WHERE id = [optionid] AND pollid = [pollid]") + var/DBQuery/select_query2 = dbcon.NewQuery("SELECT id FROM [format_table_name("poll_option")] WHERE id = [optionid] AND pollid = [pollid]") select_query2.Execute() var/validoption = 0 @@ -378,7 +378,7 @@ var/alreadyvoted = 0 - var/DBQuery/voted_query = dbcon.NewQuery("SELECT id FROM erro_poll_vote WHERE pollid = [pollid] AND ckey = '[usr.ckey]'") + var/DBQuery/voted_query = dbcon.NewQuery("SELECT id FROM [format_table_name("poll_vote")] WHERE pollid = [pollid] AND ckey = '[usr.ckey]'") voted_query.Execute() while(voted_query.NextRow()) @@ -399,7 +399,7 @@ adminrank = usr.client.holder.rank - var/DBQuery/insert_query = dbcon.NewQuery("INSERT INTO erro_poll_vote (id ,datetime ,pollid ,optionid ,ckey ,ip ,adminrank) VALUES (null, Now(), [pollid], [optionid], '[usr.ckey]', '[usr.client.address]', '[adminrank]')") + var/DBQuery/insert_query = dbcon.NewQuery("INSERT INTO [format_table_name("poll_vote")] (id ,datetime ,pollid ,optionid ,ckey ,ip ,adminrank) VALUES (null, Now(), [pollid], [optionid], '[usr.ckey]', '[usr.client.address]', '[adminrank]')") insert_query.Execute() usr << "\blue Vote successful." @@ -415,7 +415,7 @@ establish_db_connection() if(dbcon.IsConnected()) - var/DBQuery/select_query = dbcon.NewQuery("SELECT starttime, endtime, question, polltype FROM erro_poll_question WHERE id = [pollid] AND Now() BETWEEN starttime AND endtime") + var/DBQuery/select_query = dbcon.NewQuery("SELECT starttime, endtime, question, polltype FROM [format_table_name("poll_question")] WHERE id = [pollid] AND Now() BETWEEN starttime AND endtime") select_query.Execute() var/validpoll = 0 @@ -432,7 +432,7 @@ var/alreadyvoted = 0 - var/DBQuery/voted_query = dbcon.NewQuery("SELECT id FROM erro_poll_textreply WHERE pollid = [pollid] AND ckey = '[usr.ckey]'") + var/DBQuery/voted_query = dbcon.NewQuery("SELECT id FROM [format_table_name("poll_textreply")] WHERE pollid = [pollid] AND ckey = '[usr.ckey]'") voted_query.Execute() while(voted_query.NextRow()) @@ -457,7 +457,7 @@ usr << "The text you entered was blank, contained illegal characters or was too long. Please correct the text and submit again." return - var/DBQuery/insert_query = dbcon.NewQuery("INSERT INTO erro_poll_textreply (id ,datetime ,pollid ,ckey ,ip ,replytext ,adminrank) VALUES (null, Now(), [pollid], '[usr.ckey]', '[usr.client.address]', '[replytext]', '[adminrank]')") + var/DBQuery/insert_query = dbcon.NewQuery("INSERT INTO [format_table_name("poll_textreply")] (id ,datetime ,pollid ,ckey ,ip ,replytext ,adminrank) VALUES (null, Now(), [pollid], '[usr.ckey]', '[usr.client.address]', '[replytext]', '[adminrank]')") insert_query.Execute() usr << "\blue Feedback logging successful." @@ -473,7 +473,7 @@ establish_db_connection() if(dbcon.IsConnected()) - var/DBQuery/select_query = dbcon.NewQuery("SELECT starttime, endtime, question, polltype FROM erro_poll_question WHERE id = [pollid] AND Now() BETWEEN starttime AND endtime") + var/DBQuery/select_query = dbcon.NewQuery("SELECT starttime, endtime, question, polltype FROM [format_table_name("poll_question")] WHERE id = [pollid] AND Now() BETWEEN starttime AND endtime") select_query.Execute() var/validpoll = 0 @@ -488,7 +488,7 @@ usr << "\red Poll is not valid." return - var/DBQuery/select_query2 = dbcon.NewQuery("SELECT id FROM erro_poll_option WHERE id = [optionid] AND pollid = [pollid]") + var/DBQuery/select_query2 = dbcon.NewQuery("SELECT id FROM [format_table_name("poll_option")] WHERE id = [optionid] AND pollid = [pollid]") select_query2.Execute() var/validoption = 0 @@ -503,7 +503,7 @@ var/alreadyvoted = 0 - var/DBQuery/voted_query = dbcon.NewQuery("SELECT id FROM erro_poll_vote WHERE optionid = [optionid] AND ckey = '[usr.ckey]'") + var/DBQuery/voted_query = dbcon.NewQuery("SELECT id FROM [format_table_name("poll_vote")] WHERE optionid = [optionid] AND ckey = '[usr.ckey]'") voted_query.Execute() while(voted_query.NextRow()) @@ -519,7 +519,7 @@ adminrank = usr.client.holder.rank - var/DBQuery/insert_query = dbcon.NewQuery("INSERT INTO erro_poll_vote (id ,datetime ,pollid ,optionid ,ckey ,ip ,adminrank, rating) VALUES (null, Now(), [pollid], [optionid], '[usr.ckey]', '[usr.client.address]', '[adminrank]', [(isnull(rating)) ? "null" : rating])") + var/DBQuery/insert_query = dbcon.NewQuery("INSERT INTO [format_table_name("poll_vote")] (id ,datetime ,pollid ,optionid ,ckey ,ip ,adminrank, rating) VALUES (null, Now(), [pollid], [optionid], '[usr.ckey]', '[usr.client.address]', '[adminrank]', [(isnull(rating)) ? "null" : rating])") insert_query.Execute() usr << "\blue Vote successful." diff --git a/code/modules/organs/organ.dm b/code/modules/organs/organ.dm index 08a946e547c..ed7b6adfb9a 100644 --- a/code/modules/organs/organ.dm +++ b/code/modules/organs/organ.dm @@ -236,9 +236,9 @@ var/list/organ_cache = list() if(owner && vital) if(user) - user.attack_log += "\[[time_stamp()]\] removed a vital organ ([src]) from [owner.name] ([owner.ckey]) (INTENT: [uppertext(user.a_intent)])" - owner.attack_log += "\[[time_stamp()]\] had a vital organ ([src]) removed by [user.name] ([user.ckey]) (INTENT: [uppertext(user.a_intent)])" - msg_admin_attack("[user.name] ([user.ckey])[isAntag(user) ? "(ANTAG)" : ""] removed a vital organ ([src]) from [owner.name] ([owner.ckey]) (INTENT: [uppertext(user.a_intent)]) (JMP)") + user.attack_log += "\[[time_stamp()]\] removed a vital organ ([src]) from [key_name(owner)] (INTENT: [uppertext(user.a_intent)])" + owner.attack_log += "\[[time_stamp()]\] had a vital organ ([src]) removed by [key_name(user)] (INTENT: [uppertext(user.a_intent)])" + msg_admin_attack("[key_name_admin(user)](?) ([admin_jump_link(user, "holder")]) removed a vital organ ([src]) from [key_name_admin(owner)]") owner.death() owner = null diff --git a/code/modules/power/singularity/emitter.dm b/code/modules/power/singularity/emitter.dm index a30d2de451e..4a3217f0dab 100644 --- a/code/modules/power/singularity/emitter.dm +++ b/code/modules/power/singularity/emitter.dm @@ -107,17 +107,17 @@ if(src.active==1) src.active = 0 user << "You turn off the [src]." - msg_admin_attack("Emitter turned off by [key_name(user, user.client)][isAntag(user) ? "(ANTAG)" : ""](?) in ([x],[y],[z] - JMP)",0,1) - log_game("Emitter turned off by [user.ckey]([user]) in ([x],[y],[z])") - investigate_log("turned off by [user.key]","singulo") + message_admins("Emitter turned off by [key_name_admin(user)](?) ([admin_jump_link(user, "holder")]) in ([x],[y],[z] - JMP)",0,1) + log_game("Emitter turned off by [key_name(user)] in ([x],[y],[z])") + investigate_log("turned off by [key_name(usr)]","singulo") else src.active = 1 user << "You turn on the [src]." src.shot_number = 0 src.fire_delay = 100 - msg_admin_attack("Emitter turned on by [key_name(user, user.client)][isAntag(user) ? "(ANTAG)" : ""](?) in ([x],[y],[z] - JMP)",0,1) - log_game("Emitter turned on by [user.ckey]([user]) in ([x],[y],[z])") - investigate_log("turned on by [user.key]","singulo") + message_admins("Emitter turned on by [key_name_admin(user)](?) ([admin_jump_link(user, "holder")]) in ([x],[y],[z] - JMP)",0,1) + log_game("Emitter turned on by [key_name(user)] in ([x],[y],[z])") + investigate_log("turned on by [key_name(usr)]","singulo") update_icon() else user << "\red The controls are locked!" diff --git a/code/modules/power/singularity/particle_accelerator/particle_control.dm b/code/modules/power/singularity/particle_accelerator/particle_control.dm index 05543580e79..e1ce3a75a4a 100644 --- a/code/modules/power/singularity/particle_accelerator/particle_control.dm +++ b/code/modules/power/singularity/particle_accelerator/particle_control.dm @@ -122,9 +122,11 @@ if(strength > strength_upper_limit) strength = strength_upper_limit else - msg_admin_attack("PA Control Computer increased to [strength] by [key_name(usr, usr.client)][isAntag(usr) ? "(ANTAG)" : ""](?) in ([x],[y],[z] - JMP)",0,1) - log_game("PA Control Computer increased to [strength] by [usr.ckey]([usr]) in ([x],[y],[z])") - use_log += text("\[[time_stamp()]\] [usr.name] ([usr.ckey]) has increased the PA Control Computer to [strength].") + message_admins("PA Control Computer increased to [strength] by [key_name_admin(usr)](?) ([admin_jump_link(usr, "holder")]) in ([x],[y],[z] - JMP)",0,1) + log_game("PA Control Computer increased to [strength] by [key_name(usr)] in ([x],[y],[z])") + investigate_log("increased to [strength] by [key_name(usr)]","singulo") + use_log += text("\[[time_stamp()]\] [usr.name] ([key_name(usr)]) has increased the PA Control Computer to [strength].") + investigate_log("increased to [strength] by [usr.key]","singulo") strength_change() @@ -134,8 +136,11 @@ if(strength < 0) strength = 0 else - investigate_log("decreased to [strength] by [usr.key]","singulo") - use_log += text("\[[time_stamp()]\] [usr.name] ([usr.ckey]) has decreased the PA Control Computer to [strength].") + message_admins("PA Control Computer decreased to [strength] by [key_name_admin(usr)](?) ([admin_jump_link(usr, "holder")]) in ([x],[y],[z] - JMP)",0,1) + log_game("PA Control Computer decreased to [strength] by [key_name(usr)] in ([x],[y],[z])") + investigate_log("decreased to [strength] by [key_name(usr)]","singulo") + use_log += text("\[[time_stamp()]\] [usr.name] ([key_name(usr)]) has decreased the PA Control Computer to [strength].") + strength_change() /obj/machinery/particle_accelerator/control_box/power_change() @@ -215,7 +220,7 @@ src.active = !src.active investigate_log("turned [active?"ON":"OFF"] by [usr ? usr.key : "outside forces"]","singulo") if (active) - msg_admin_attack("PA Control Computer turned ON by [key_name(usr, usr.client)][isAntag(usr) ? "(ANTAG)" : ""](?) in ([x],[y],[z] - JMP)",0,1) + msg_admin_attack("PA Control Computer turned ON by [key_name(usr, usr.client)](?) in ([x],[y],[z] - JMP)",0,1) log_game("PA Control Computer turned ON by [usr.ckey]([usr]) in ([x],[y],[z])") use_log += text("\[[time_stamp()]\] [usr.name] ([usr.ckey]) has turned on the PA Control Computer.") if(src.active) diff --git a/code/modules/power/supermatter/supermatter.dm b/code/modules/power/supermatter/supermatter.dm index 5fc9e1ae4b0..32f7d023e92 100644 --- a/code/modules/power/supermatter/supermatter.dm +++ b/code/modules/power/supermatter/supermatter.dm @@ -313,7 +313,7 @@ var/mob/living/user = AM user.dust() power += 200 - message_admins("[src] has consumed [key_name_admin(user)]? (FLW) (JMP).") + message_admins("[src] has consumed [key_name_admin(user)]? ([admin_jump_link(user, "holder")]) (JMP).") investigate_log("has consumed [key_name(user)].", "supermatter") else if(isobj(AM) && !istype(AM, /obj/effect)) investigate_log("has consumed [AM].", "supermatter") diff --git a/code/modules/projectiles/projectile.dm b/code/modules/projectiles/projectile.dm index 9453212b48d..23dac03dc56 100644 --- a/code/modules/projectiles/projectile.dm +++ b/code/modules/projectiles/projectile.dm @@ -137,18 +137,18 @@ playsound(loc, hitsound, 20, 1, -1) visible_message("\red [A.name] is hit by the [src.name] in the [parse_zone(def_zone)]!")//X has fired Y is now given by the guns so you cant tell who shot you if you could not see the shooter if(istype(firer, /mob)) - M.attack_log += "\[[time_stamp()]\] [firer]/[firer.ckey] shot [M]/[M.ckey] with a [src.type][reagent_note]" - firer.attack_log += "\[[time_stamp()]\] [firer]/[firer.ckey] shot [M]/[M.ckey] with a [src.type][reagent_note]" + M.attack_log += "\[[time_stamp()]\] [key_name(firer)] shot [M]/[M.ckey] with a [src.type][reagent_note]" + firer.attack_log += "\[[time_stamp()]\] [key_name(firer)] shot [M]/[M.ckey] with a [src.type][reagent_note]" if(M.ckey && chatlog_attacks) - msg_admin_attack("[firer] ([firer.ckey])[isAntag(firer) ? "(ANTAG)" : ""] shot [M] ([M.ckey]) with a [src][reagent_note] (JMP)") //BS12 EDIT ALG + msg_admin_attack("[key_name_admin(firer)](?) ([admin_jump_link(firer, "holder")]) shot [key_name_admin(M)] with a [src][reagent_note]") //BS12 EDIT ALG if(!iscarbon(firer)) M.LAssailant = null else M.LAssailant = firer else - M.attack_log += "\[[time_stamp()]\] UNKNOWN SUBJECT (No longer exists) shot [M]/[M.ckey] with a [src][reagent_note]" + M.attack_log += "\[[time_stamp()]\] UNKNOWN SUBJECT (No longer exists) shot [key_name(M)] with a [src][reagent_note]" if(M.ckey && chatlog_attacks) - msg_admin_attack("UNKNOWN shot [M] ([M.ckey]) with a [src][reagent_note] (JMP)") //BS12 EDIT ALG + msg_admin_attack("UNKNOWN shot [key_name_admin(M)] with a [src][reagent_note] (JMP)") //BS12 EDIT ALG spawn(0) if(A) diff --git a/code/modules/reagents/dartgun.dm b/code/modules/reagents/dartgun.dm index 75825c4939c..3842293f143 100644 --- a/code/modules/reagents/dartgun.dm +++ b/code/modules/reagents/dartgun.dm @@ -180,15 +180,15 @@ M.attack_log += "\[[time_stamp()]\] [user]/[user.ckey] shot [M]/[M.ckey] with a dartgun ([R])" user.attack_log += "\[[time_stamp()]\] [user]/[user.ckey] shot [M]/[M.ckey] with a dartgun ([R])" if(M.ckey) - msg_admin_attack("[user] ([user.ckey])[isAntag(user) ? "(ANTAG)" : ""] shot [M] ([M.ckey]) with a dartgun ([R]) (JMP)") + msg_admin_attack("[key_name_admin(user)](?) ([admin_jump_link(user, "holder")]) shot [M] ([M.ckey]) with a dartgun ([R]).") if(!iscarbon(user)) M.LAssailant = null else M.LAssailant = user else - M.attack_log += "\[[time_stamp()]\] UNKNOWN SUBJECT (No longer exists) shot [M]/[M.ckey] with a dartgun ([R])" - msg_admin_attack("UNKNOWN shot [M] ([M.ckey]) with a dartgun ([R]) (JMP)") + M.attack_log += "\[[time_stamp()]\] UNKNOWN SUBJECT (No longer exists) shot [key_name_admin(M)] with a dartgun ([R])" + msg_admin_attack("UNKNOWN shot [key_name(M)] with a dartgun ([R]) (JMP)") if(D.reagents) D.reagents.trans_to(M, 15) diff --git a/code/modules/reagents/reagent_containers/dropper.dm b/code/modules/reagents/reagent_containers/dropper.dm index 253613a7360..b07864544e8 100644 --- a/code/modules/reagents/reagent_containers/dropper.dm +++ b/code/modules/reagents/reagent_containers/dropper.dm @@ -70,10 +70,10 @@ for(var/datum/reagent/R in src.reagents.reagent_list) injected += R.name var/contained = english_list(injected) - M.attack_log += text("\[[time_stamp()]\] Has been squirted with [src.name] by [user.name] ([user.ckey]). Reagents: [contained]") - user.attack_log += text("\[[time_stamp()]\] Used the [src.name] to squirt [M.name] ([M.key]). Reagents: [contained]") + M.attack_log += text("\[[time_stamp()]\] Has been squirted with [src.name] by [key_name(user)]. Reagents: [contained]") + user.attack_log += text("\[[time_stamp()]\] Used the [src.name] to squirt [key_name(M)]. Reagents: [contained]") if(M.ckey) - msg_admin_attack("[user.name] ([user.ckey])[isAntag(user) ? "(ANTAG)" : ""] squirted [M.name] ([M.key]) with [src.name]. Reagents: [contained] (INTENT: [uppertext(user.a_intent)]) (JMP)") + msg_admin_attack("[key_name_admin(user)](?) ([admin_jump_link(user, "holder")]) squirted [key_name(M)] with [src.name]. Reagents: [contained] (INTENT: [uppertext(user.a_intent)])") if(!iscarbon(user)) M.LAssailant = null else @@ -88,8 +88,8 @@ badshit += reagents_to_log[bad_reagent] if(badshit.len) var/hl="\red ([english_list(badshit)]) \black" - message_admins("[user.name] ([user.ckey]) added [reagents.get_reagent_ids(1)] to \a [target] with [src].[hl] (JMP)") - log_game("[user.name] ([user.ckey]) added [reagents.get_reagent_ids(1)] to \a [target] with [src].") + message_admins("[key_name_admin(user)](?) ([admin_jump_link(user, "holder")]) added [reagents.get_reagent_ids(1)] to \a [target] with [src].[hl]") + log_game("[key_name(user)] added [reagents.get_reagent_ids(1)] to \a [target] with [src].") trans = src.reagents.trans_to(target, amount_per_transfer_from_this) user << "\blue You transfer [trans] units of the solution." diff --git a/code/modules/reagents/reagent_containers/drugs.dm b/code/modules/reagents/reagent_containers/drugs.dm index d6804f54778..31bcc1012de 100644 --- a/code/modules/reagents/reagent_containers/drugs.dm +++ b/code/modules/reagents/reagent_containers/drugs.dm @@ -67,8 +67,8 @@ badshit += reagents_to_log[bad_reagent] if(badshit.len) var/hl="\red ([english_list(badshit)]) \black" - message_admins("[user.name] ([user.ckey]) added [reagents.get_reagent_ids(1)] to \a [target] with [src].[hl] (JMP)") - log_game("[user.name] ([user.ckey]) added [reagents.get_reagent_ids(1)] to \a [target] with [src].") + message_admins("[key_name_admin(user)](?) ([admin_jump_link(user, "holder")]) added [reagents.get_reagent_ids(1)] to \a [target] with [src].[hl]") + log_game("[key_name(user)] added [reagents.get_reagent_ids(1)] to \a [target] with [src].") var/trans = src.reagents.trans_to(target, amount_per_transfer_from_this) user << "\blue You transfer [trans] units of the solution to [target]." diff --git a/code/modules/reagents/reagent_containers/food/condiment.dm b/code/modules/reagents/reagent_containers/food/condiment.dm index f79dc8ded09..ffe920bbf69 100644 --- a/code/modules/reagents/reagent_containers/food/condiment.dm +++ b/code/modules/reagents/reagent_containers/food/condiment.dm @@ -48,10 +48,10 @@ for(var/mob/O in viewers(world.view, user)) O.show_message("\red [user] feeds [M] [src].", 1) - M.attack_log += text("\[[time_stamp()]\] Has been fed [src.name] by [user.name] ([user.ckey]) Reagents: [reagentlist(src)]") - user.attack_log += text("\[[time_stamp()]\] Fed [src.name] by [M.name] ([M.ckey]) Reagents: [reagentlist(src)]") + M.attack_log += text("\[[time_stamp()]\] Has been fed [src.name] by [key_name(user)] Reagents: [reagentlist(src)]") + user.attack_log += text("\[[time_stamp()]\] Fed [src.name] by [key_name(M)] Reagents: [reagentlist(src)]") if(M.ckey) - msg_admin_attack("[user.name] ([user.ckey])[isAntag(user) ? "(ANTAG)" : ""] fed [M.name] ([M.ckey]) with [src.name] (INTENT: [uppertext(user.a_intent)]) (JMP)") + msg_admin_attack("[key_name_admin(user)](?) ([admin_jump_link(user, "holder")]) fed [key_name_admin(M)] with [src.name] (INTENT: [uppertext(user.a_intent)])") if(!iscarbon(user)) M.LAssailant = null else diff --git a/code/modules/reagents/reagent_containers/food/drinks.dm b/code/modules/reagents/reagent_containers/food/drinks.dm index 15f585051e6..f289f891a67 100644 --- a/code/modules/reagents/reagent_containers/food/drinks.dm +++ b/code/modules/reagents/reagent_containers/food/drinks.dm @@ -55,9 +55,9 @@ for(var/mob/O in viewers(world.view, user)) O.show_message("\red [user] feeds [M] [src].", 1) - M.attack_log += text("\[[time_stamp()]\] Has been fed [src.name] by [user.name] ([user.ckey]) Reagents: [reagentlist(src)]") - user.attack_log += text("\[[time_stamp()]\] Fed [M.name] by [M.name] ([M.ckey]) Reagents: [reagentlist(src)]") - log_attack("[user.name] ([user.ckey]) fed [M.name] ([M.ckey]) with [src.name] Reagents: [reagentlist(src)] (INTENT: [uppertext(user.a_intent)]) (JMP)") + M.attack_log += text("\[[time_stamp()]\] Has been fed [src.name] by [key_name(user)] Reagents: [reagentlist(src)]") + user.attack_log += text("\[[time_stamp()]\] Fed [M.name] by [key_name(M)] Reagents: [reagentlist(src)]") + log_attack("[key_name_admin(user)](?) ([admin_jump_link(user, "holder")]) fed [key_name_admin(M)] with [src.name] Reagents: [reagentlist(src)] (INTENT: [uppertext(user.a_intent)])") if(!iscarbon(user)) M.LAssailant = null else diff --git a/code/modules/reagents/reagent_containers/food/drinks/bottle.dm b/code/modules/reagents/reagent_containers/food/drinks/bottle.dm index 20da18a668f..5d5791c2329 100644 --- a/code/modules/reagents/reagent_containers/food/drinks/bottle.dm +++ b/code/modules/reagents/reagent_containers/food/drinks/bottle.dm @@ -97,10 +97,10 @@ else O.show_message(text("\red [target] has attacked himself with a bottle of [src.name]!"), 1) //Attack logs - user.attack_log += text("\[[time_stamp()]\] Has attacked [target.name] ([target.ckey]) with a bottle!") - target.attack_log += text("\[[time_stamp()]\] Has been smashed with a bottle by [user.name] ([user.ckey])") + user.attack_log += text("\[[time_stamp()]\] Has attacked [key_name(target)] with a bottle!") + target.attack_log += text("\[[time_stamp()]\] Has been smashed with a bottle by [key_name(user)]") if(target.ckey) - msg_admin_attack("[user.name] ([user.ckey])[isAntag(user) ? "(ANTAG)" : ""] attacked [target.name] ([target.ckey]) with a bottle. (INTENT: [uppertext(user.a_intent)]) (JMP)") + msg_admin_attack("[key_name_admin(user)](?) ([admin_jump_link(user, "holder")]) attacked [key_name_admin(target)] with a bottle. (INTENT: [uppertext(user.a_intent)])") if(!iscarbon(user)) target.LAssailant = null else diff --git a/code/modules/reagents/reagent_containers/glass_containers.dm b/code/modules/reagents/reagent_containers/glass_containers.dm index cf4f8794bf0..1ac3027d8c7 100644 --- a/code/modules/reagents/reagent_containers/glass_containers.dm +++ b/code/modules/reagents/reagent_containers/glass_containers.dm @@ -85,10 +85,10 @@ for(var/datum/reagent/R in src.reagents.reagent_list) injected += R.name var/contained = english_list(injected) - M.attack_log += text("\[[time_stamp()]\] Has been splashed with [src.name] by [user.name] ([user.ckey]). Reagents: [contained]") - user.attack_log += text("\[[time_stamp()]\] Used the [src.name] to splash [M.name] ([M.key]). Reagents: [contained]") + M.attack_log += text("\[[time_stamp()]\] Has been splashed with [src.name] by [key_name(user)]. Reagents: [contained]") + user.attack_log += text("\[[time_stamp()]\] Used the [src.name] to splash [key_name(M)]. Reagents: [contained]") if(M.ckey) - msg_admin_attack("[user.name] ([user.ckey])[isAntag(user) ? "(ANTAG)" : ""] splashed [M.name] ([M.key]) with [src.name]. Reagents: [contained] (INTENT: [uppertext(user.a_intent)]) (JMP)") + msg_admin_attack("[key_name_admin(user)](?) ([admin_jump_link(user, "holder")]) splashed [key_name_admin(M)] with [src.name]. Reagents: [contained] (INTENT: [uppertext(user.a_intent)])") if(!iscarbon(user)) M.LAssailant = null else @@ -129,8 +129,8 @@ badshit += reagents_to_log[bad_reagent] if(badshit.len) var/hl="\red ([english_list(badshit)]) \black" - message_admins("[user.name] ([user.ckey]) added [reagents.get_reagent_ids(1)] to \a [target] with [src].[hl] (JMP)") - log_game("[user.name] ([user.ckey]) added [reagents.get_reagent_ids(1)] to \a [target] with [src].") + message_admins("[key_name_admin(user)](?) ([admin_jump_link(user, "holder")]) added [reagents.get_reagent_ids(1)] to \a [target] with [src].[hl]") + log_game("[key_name(user)] added [reagents.get_reagent_ids(1)] to \a [target] with [src].") var/trans = src.reagents.trans_to(target, amount_per_transfer_from_this) user << "\blue You transfer [trans] units of the solution to [target]." diff --git a/code/modules/reagents/reagent_containers/hypospray.dm b/code/modules/reagents/reagent_containers/hypospray.dm index e24378fb137..e96582b9ac0 100644 --- a/code/modules/reagents/reagent_containers/hypospray.dm +++ b/code/modules/reagents/reagent_containers/hypospray.dm @@ -33,10 +33,10 @@ for(var/datum/reagent/R in src.reagents.reagent_list) injected += R.name var/contained = english_list(injected) - M.attack_log += text("\[[time_stamp()]\] Has been injected with [src.name] by [user.name] ([user.ckey]). Reagents: [contained]") - user.attack_log += text("\[[time_stamp()]\] Used the [src.name] to inject [M.name] ([M.key]). Reagents: [contained]") + M.attack_log += text("\[[time_stamp()]\] Has been injected with [src.name] by [key_name(user)]. Reagents: [contained]") + user.attack_log += text("\[[time_stamp()]\] Used the [src.name] to inject [key_name(M)]. Reagents: [contained]") if(M.ckey) - msg_admin_attack("[user.name] ([user.ckey])[isAntag(user) ? "(ANTAG)" : ""] injected [M.name] ([M.key]) with [src.name]. Reagents: [contained] (INTENT: [uppertext(user.a_intent)]) (JMP)") + msg_admin_attack("[key_name_admin(user)](?) ([admin_jump_link(user, "holder")]) injected [key_name_admin(M)] with [src.name]. Reagents: [contained] (INTENT: [uppertext(user.a_intent)])") if(!iscarbon(user)) M.LAssailant = null else diff --git a/code/modules/reagents/reagent_containers/pill.dm b/code/modules/reagents/reagent_containers/pill.dm index e56d26560f7..a7b2c82757c 100644 --- a/code/modules/reagents/reagent_containers/pill.dm +++ b/code/modules/reagents/reagent_containers/pill.dm @@ -54,10 +54,10 @@ for(var/mob/O in viewers(world.view, user)) O.show_message("[user] forces [M] to [apply_method] [src].", 1) - M.attack_log += text("\[[time_stamp()]\] Has been fed [src.name] by [user.name] ([user.ckey]) Reagents: [reagentlist(src)]") - user.attack_log += text("\[[time_stamp()]\] Fed [M.name] by [M.name] ([M.ckey]) Reagents: [reagentlist(src)]") + M.attack_log += text("\[[time_stamp()]\] Has been fed [src.name] by [key_name(user)] Reagents: [reagentlist(src)]") + user.attack_log += text("\[[time_stamp()]\] Fed [M.name] by [key_name(M)]) Reagents: [reagentlist(src)]") if(M.ckey) - msg_admin_attack("[user.name] ([user.ckey])[isAntag(user) ? "(ANTAG)" : ""] fed [M.name] ([M.ckey]) with [src.name] Reagents: [reagentlist(src)] (INTENT: [uppertext(user.a_intent)]) (JMP)") + msg_admin_attack("[key_name_admin(user)](?) ([admin_jump_link(user, "holder")]) fed [key_name(M)] with [src.name] Reagents: [reagentlist(src)] (INTENT: [uppertext(user.a_intent)])") if(!iscarbon(user)) M.LAssailant = null else diff --git a/code/modules/reagents/reagent_containers/robodropper.dm b/code/modules/reagents/reagent_containers/robodropper.dm index 8f2a1d4e9e5..cacc020244b 100644 --- a/code/modules/reagents/reagent_containers/robodropper.dm +++ b/code/modules/reagents/reagent_containers/robodropper.dm @@ -33,8 +33,8 @@ badshit += reagents_to_log[bad_reagent] if(badshit.len) var/hl="\red ([english_list(badshit)]) \black" - message_admins("[user.name] ([user.ckey]) added [reagents.get_reagent_ids(1)] to \a [target] with [src].[hl] (JMP)") - log_game("[user.name] ([user.ckey]) added [reagents.get_reagent_ids(1)] to \a [target] with [src].") + message_admins("[key_name_admin(user)](?) ([admin_jump_link(user, "holder")]) added [reagents.get_reagent_ids(1)] to \a [target] with [src].[hl]") + log_game("[key_name(user)] added [reagents.get_reagent_ids(1)] to \a [target] with [src].") else if(ismob(target)) if(istype(target , /mob/living/carbon/human)) @@ -78,10 +78,10 @@ for(var/datum/reagent/R in src.reagents.reagent_list) injected += R.name var/contained = english_list(injected) - M.attack_log += text("\[[time_stamp()]\] Has been squirted with [src.name] by [user.name] ([user.ckey]). Reagents: [contained]") - user.attack_log += text("\[[time_stamp()]\] Used the [src.name] to squirt [M.name] ([M.key]). Reagents: [contained]") + M.attack_log += text("\[[time_stamp()]\] Has been squirted with [src.name] by [key_name(user)]. Reagents: [contained]") + user.attack_log += text("\[[time_stamp()]\] Used the [src.name] to squirt [key_name(M)]. Reagents: [contained]") if(M.ckey) - msg_admin_attack("[user.name] ([user.ckey])[isAntag(user) ? "(ANTAG)" : ""] squirted [M.name] ([M.key]) with [src.name]. Reagents: [contained] (INTENT: [uppertext(user.a_intent)]) (JMP)") + msg_admin_attack("[key_name_admin(user)](?) ([admin_jump_link(user, "holder")]) squirted [M.name] ([M.key]) with [src.name]. Reagents: [contained] (INTENT: [uppertext(user.a_intent)])") if(!iscarbon(user)) M.LAssailant = null else diff --git a/code/modules/reagents/reagent_containers/spray.dm b/code/modules/reagents/reagent_containers/spray.dm index fe255c9caf7..cae6f76b1db 100644 --- a/code/modules/reagents/reagent_containers/spray.dm +++ b/code/modules/reagents/reagent_containers/spray.dm @@ -48,13 +48,13 @@ user.changeNext_move(CLICK_CD_RANGE*2) if(reagents.has_reagent("sacid")) - message_admins("[key_name_admin(user)] fired sulphuric acid from \a [src].") - log_game("[key_name(user)] fired sulphuric acid from \a [src].") + message_admins("[key_name_admin(user)](?) ([admin_jump_link(user, "holder")]) fired sulphuric acid from \a [src].") + log_game("[key_name(user)](?) ([admin_jump_link(user, "holder")]) fired sulphuric acid from \a [src].") if(reagents.has_reagent("facid")) - message_admins("[key_name_admin(user)] fired Fluorosulfuric Acid from \a [src].") + message_admins("[key_name_admin(user)](?) ([admin_jump_link(user, "holder")]) fired fluorosulfuric acid from \a [src].") log_game("[key_name(user)] fired Fluorosulfuric Acid from \a [src].") if(reagents.has_reagent("lube")) - message_admins("[key_name_admin(user)] fired Space lube from \a [src].") + message_admins("[key_name_admin(user)](?) ([admin_jump_link(user, "holder")]) fired space lube from \a [src].") log_game("[key_name(user)] fired Space lube from \a [src].") return diff --git a/code/modules/reagents/reagent_containers/syringes.dm b/code/modules/reagents/reagent_containers/syringes.dm index ab2040ffd1a..3a4f7ff13ab 100644 --- a/code/modules/reagents/reagent_containers/syringes.dm +++ b/code/modules/reagents/reagent_containers/syringes.dm @@ -193,10 +193,10 @@ for(var/datum/reagent/R in src.reagents.reagent_list) injected += R.name var/contained = english_list(injected) - M.attack_log += text("\[[time_stamp()]\] Has been injected with [src.name] by [user.name] ([user.ckey]). Reagents: [contained]") - user.attack_log += text("\[[time_stamp()]\] Used the [src.name] to inject [M.name] ([M.key]). Reagents: [contained]") + M.attack_log += text("\[[time_stamp()]\] Has been injected with [src.name] by [key_name(user)]. Reagents: [contained]") + user.attack_log += text("\[[time_stamp()]\] Used the [src.name] to inject [key_name(M)]. Reagents: [contained]") if(M.ckey) - msg_admin_attack("[user.name] ([user.ckey])[isAntag(user) ? "(ANTAG)" : ""] injected [M.name] ([M.key]) with [src.name]. Reagents: [contained] (INTENT: [uppertext(user.a_intent)]) (JMP)") + msg_admin_attack("[key_name_admin(user)](?) ([admin_jump_link(user, "holder")]) injected [key_name_admin(M)] with [src.name]. Reagents: [contained] (INTENT: [uppertext(user.a_intent)])") if(!iscarbon(user)) M.LAssailant = null else @@ -215,8 +215,8 @@ badshit += reagents_to_log[bad_reagent] if(badshit.len) var/hl="\red ([english_list(badshit)]) \black" - message_admins("[user.name] ([user.ckey]) added [reagents.get_reagent_ids(1)] to \a [target] with [src].[hl] (JMP)") - log_game("[user.name] ([user.ckey]) added [reagents.get_reagent_ids(1)] to \a [target] with [src].") + message_admins("[key_name_admin(user)](?) ([admin_jump_link(user, "holder")]) added [reagents.get_reagent_ids(1)] to \a [target] with [src].[hl] ") + log_game("[key_name(user)] added [reagents.get_reagent_ids(1)] to \a [target] with [src].") spawn(5) var/datum/reagent/blood/B @@ -281,7 +281,7 @@ user.attack_log += "\[[time_stamp()]\] Attacked [target.name] ([target.ckey]) with [src.name] (INTENT: [uppertext(user.a_intent)])" target.attack_log += "\[[time_stamp()]\] Attacked by [user.name] ([user.ckey]) with [src.name] (INTENT: [uppertext(user.a_intent)])" if(target.ckey) - msg_admin_attack("[user.name] ([user.ckey])[isAntag(user) ? "(ANTAG)" : ""] attacked [target.name] ([target.ckey]) with [src.name] (INTENT: [uppertext(user.a_intent)]) (JMP)") + msg_admin_attack("[key_name_admin(user)](?) ([admin_jump_link(user, "holder")]) attacked [key_name_admin(target)] with [src.name] (INTENT: [uppertext(user.a_intent)])") if(!iscarbon(user)) target.LAssailant = null else diff --git a/code/modules/recycling/disposal.dm b/code/modules/recycling/disposal.dm index e810847876e..3b99bb95f6f 100644 --- a/code/modules/recycling/disposal.dm +++ b/code/modules/recycling/disposal.dm @@ -124,10 +124,10 @@ for (var/mob/C in viewers(src)) C.show_message("\red [GM.name] has been placed in the [src] by [user].", 3) qdel(G) - usr.attack_log += text("\[[time_stamp()]\] Has placed [GM.name] ([GM.ckey]) in disposals.") - GM.attack_log += text("\[[time_stamp()]\] Has been placed in disposals by [usr.name] ([usr.ckey])") + usr.attack_log += text("\[[time_stamp()]\] Has placed [key_name(GM)] in disposals.") + GM.attack_log += text("\[[time_stamp()]\] Has been placed in disposals by [key_name(user)]") if(GM.ckey) - msg_admin_attack("[usr] ([usr.ckey])[isAntag(usr) ? "(ANTAG)" : ""] placed [GM] ([GM.ckey]) in a disposals unit. (JMP)") + msg_admin_attack("[key_name_admin(user)](?) ([admin_jump_link(user, "holder")]) placed [key_name_admin(GM)] in a disposals unit. (JMP)") return if(!I) return diff --git a/code/modules/research/message_server.dm b/code/modules/research/message_server.dm index da6bf1244bf..34a10b97f1d 100644 --- a/code/modules/research/message_server.dm +++ b/code/modules/research/message_server.dm @@ -295,7 +295,7 @@ var/obj/machinery/blackbox_recorder/blackbox if(!dbcon.IsConnected()) return var/round_id - var/DBQuery/query = dbcon.NewQuery("SELECT MAX(round_id) AS round_id FROM erro_feedback") + var/DBQuery/query = dbcon.NewQuery("SELECT MAX(round_id) AS round_id FROM [format_table_name("feedback")]") query.Execute() while(query.NextRow()) round_id = query.item[1] @@ -305,7 +305,7 @@ var/obj/machinery/blackbox_recorder/blackbox round_id++ for(var/datum/feedback_variable/FV in feedback) - var/sql = "INSERT INTO erro_feedback VALUES (null, Now(), [round_id], \"[FV.get_variable()]\", [FV.get_value()], \"[FV.get_details()]\")" + var/sql = "INSERT INTO [format_table_name("feedback")] VALUES (null, Now(), [round_id], \"[FV.get_variable()]\", [FV.get_value()], \"[FV.get_details()]\")" var/DBQuery/query_insert = dbcon.NewQuery(sql) query_insert.Execute() diff --git a/code/modules/scripting/IDE.dm b/code/modules/scripting/IDE.dm index b9b53b274d2..1733895a91f 100644 --- a/code/modules/scripting/IDE.dm +++ b/code/modules/scripting/IDE.dm @@ -11,7 +11,6 @@ client/verb/tcssave() var/tcscode=winget(src, "tcscode", "text") var/msg="[mob.name] is adding script to server [Server]: [tcscode]" diary << msg - message_admins("[mob.name] has uploaded a NTLS script to [Machine.SelectedServer] ([mob.x],[mob.y],[mob.z] - JMP)",0,1) Server.setcode( tcscode ) // this actually saves the code from input to the server src << output(null, "tcserror") // clear the errors else @@ -36,7 +35,7 @@ client/verb/tcscompile() if(Machine.SelectedServer) var/obj/machinery/telecomms/server/Server = Machine.SelectedServer Server.setcode( winget(src, "tcscode", "text") ) // save code first - var/list/compileerrors = Server.compile() // then compile the code! + var/list/compileerrors = Server.compile(usr) // then compile the code! // Output all the compile-time errors src << output(null, "tcserror") diff --git a/code/modules/security levels/keycard authentication.dm b/code/modules/security levels/keycard authentication.dm index 0950f5d1594..8164fca3f39 100644 --- a/code/modules/security levels/keycard authentication.dm +++ b/code/modules/security levels/keycard authentication.dm @@ -122,7 +122,7 @@ confirmed = 0 trigger_event(event) log_game("[key_name(event_triggered_by)] triggered and [key_name(event_confirmed_by)] confirmed event [event]") - message_admins("[key_name(event_triggered_by)] triggered and [key_name(event_confirmed_by)] confirmed event [event]", 1) + message_admins("[key_name_admin(event_triggered_by)] ([admin_jump_link(event_triggered_by, "holder")]) triggered and [key_name_admin(event_confirmed_by)] ([admin_jump_link(event_confirmed_by, "holder")]) confirmed event [event]", 1) reset() /obj/machinery/keycard_auth/proc/receive_request(var/obj/machinery/keycard_auth/source) diff --git a/code/modules/surgery/braincore.dm b/code/modules/surgery/braincore.dm index a11df776f3a..23e2d982740 100644 --- a/code/modules/surgery/braincore.dm +++ b/code/modules/surgery/braincore.dm @@ -92,9 +92,9 @@ if(borer) borer.detatch() //Should remove borer if the brain is removed - RR - user.attack_log += "\[[time_stamp()]\] Debrained [target.name] ([target.ckey]) with [tool.name] (INTENT: [uppertext(user.a_intent)])" - target.attack_log += "\[[time_stamp()]\] Debrained by [user.name] ([user.ckey]) with [tool.name] (INTENT: [uppertext(user.a_intent)])" - msg_admin_attack("[user.name] ([user.ckey]) debrained [target.name] ([target.ckey]) with [tool.name] (INTENT: [uppertext(user.a_intent)]) (JMP)") + user.attack_log += "\[[time_stamp()]\] Debrained [key_name(target)] with [tool.name] (INTENT: [uppertext(user.a_intent)])" + target.attack_log += "\[[time_stamp()]\] Debrained by [key_name(user)] with [tool.name] (INTENT: [uppertext(user.a_intent)])" + msg_admin_attack("[key_name_admin(user)](?) ([admin_jump_link(user, "holder")]) debrained [key_name_admin(target)] with [tool.name]") var/obj/item/organ/brain/B = target.internal_organs_by_name["brain"] if(B && istype(B)) diff --git a/code/modules/vehicle/train/train.dm b/code/modules/vehicle/train/train.dm index e180b52ee0f..e2316738c48 100644 --- a/code/modules/vehicle/train/train.dm +++ b/code/modules/vehicle/train/train.dm @@ -55,7 +55,7 @@ if(istype(load, /mob/living/carbon/human)) var/mob/living/D = load D << "\red You hit [M]!" - msg_admin_attack("[D.name] ([D.ckey])[isAntag(D) ? "(ANTAG)" : ""] hit [M.name] ([M.ckey]) with [src]. (JMP)") + msg_admin_attack("[key_name_admin(D)](?) ([admin_jump_link(D, "holder")]) hit [key_name_admin(M)] with [src].") //------------------------------------------- diff --git a/code/modules/vehicle/train/trains/ambulance.dm b/code/modules/vehicle/train/trains/ambulance.dm index a6ba690d166..175ebf905b5 100644 --- a/code/modules/vehicle/train/trains/ambulance.dm +++ b/code/modules/vehicle/train/trains/ambulance.dm @@ -162,10 +162,10 @@ var/mob/living/carbon/human/D = load D << "\red \b You ran over [H]!" visible_message("\red \The [src] ran over [H]!") - attack_log += text("\[[time_stamp()]\] ran over [H.name] ([H.ckey]), driven by [D.name] ([D.ckey])") - msg_admin_attack("[D.name] ([D.ckey])[isAntag(D) ? "(ANTAG)" : ""] ran over [H.name] ([H.ckey]). (JMP)") + attack_log += text("\[[time_stamp()]\] ran over [key_name(H)], driven by [key_name(D)]") + msg_admin_attack("[key_name_admin(D)](?) ([admin_jump_link(D, "holder")]) ran over [key_name_admin(H)]") else - attack_log += text("\[[time_stamp()]\] ran over [H.name] ([H.ckey])") + attack_log += text("\[[time_stamp()]\] ran over [key_name(H)]") //------------------------------------------- diff --git a/code/modules/vehicle/train/trains/janicart.dm b/code/modules/vehicle/train/trains/janicart.dm index 11fdf993b0b..6fc08ef71b3 100644 --- a/code/modules/vehicle/train/trains/janicart.dm +++ b/code/modules/vehicle/train/trains/janicart.dm @@ -212,10 +212,10 @@ var/mob/living/carbon/human/D = load D << "\red \b You ran over [H]!" visible_message("\red \The [src] ran over [H]!") - attack_log += text("\[[time_stamp()]\] ran over [H.name] ([H.ckey]), driven by [D.name] ([D.ckey])") - msg_admin_attack("[D.name] ([D.ckey])[isAntag(D) ? "(ANTAG)" : ""] ran over [H.name] ([H.ckey]). (JMP)") + attack_log += text("\[[time_stamp()]\] ran over [key_name(H)], driven by [key_name(D)]") + msg_admin_attack("[key_name_admin(D)](?) ([admin_jump_link(D, "holder")]) ran over [key_name_admin(H)]") else - attack_log += text("\[[time_stamp()]\] ran over [H.name] ([H.ckey])") + attack_log += text("\[[time_stamp()]\] ran over [key_name(H)]") //------------------------------------------- diff --git a/config/example/dbconfig.txt b/config/example/dbconfig.txt index 4bb4e58b096..a5a547679e1 100644 --- a/config/example/dbconfig.txt +++ b/config/example/dbconfig.txt @@ -20,6 +20,7 @@ PASSWORD mypassword FEEDBACK_DATABASE paradise FEEDBACK_LOGIN mylogin FEEDBACK_PASSWORD mypassword +FEEDBACK_TABLEPREFIX myprefix # Track population and death statistics # Comment this out to disable From 5eee6170635e99f1a800a5366c50c2be0a8854c6 Mon Sep 17 00:00:00 2001 From: Markolie Date: Mon, 17 Aug 2015 00:13:53 +0200 Subject: [PATCH 02/10] Consolidate ?/FLW links under key_name_admin --- code/__HELPERS/mobs.dm | 2 +- code/__HELPERS/unsorted.dm | 2 +- code/game/dna/genes/goon_disabilities.dm | 2 +- code/game/dna/genes/goon_powers.dm | 6 +++--- code/game/gamemodes/cult/ritual.dm | 2 +- code/game/gamemodes/nuclear/nuclearbomb.dm | 2 +- code/game/machinery/atmoalter/canister.dm | 4 ++-- code/game/machinery/computer/robot.dm | 10 +++++----- code/game/machinery/computer/shuttle.dm | 6 +++--- code/game/machinery/cryopod.dm | 2 +- code/game/machinery/doors/airlock.dm | 2 +- code/game/machinery/kitchen/gibber.dm | 2 +- code/game/machinery/machinery.dm | 2 +- code/game/machinery/syndicatebomb.dm | 9 ++++----- code/game/machinery/telecomms/telecomunications.dm | 2 +- code/game/objects/effects/effect_system.dm | 2 +- code/game/objects/items.dm | 2 +- code/game/objects/items/devices/aicard.dm | 2 +- code/game/objects/items/devices/pizza_bomb.dm | 4 ++-- code/game/objects/items/devices/powersink.dm | 2 +- code/game/objects/items/devices/transfer_valve.dm | 4 ++-- code/game/objects/items/robot/robot_items.dm | 2 +- code/game/objects/items/weapons/explosives.dm | 6 +++--- .../objects/items/weapons/grenades/chem_grenade.dm | 4 ++-- .../game/objects/items/weapons/grenades/ghettobomb.dm | 2 +- code/game/objects/items/weapons/grenades/grenade.dm | 2 +- code/game/objects/items/weapons/hydroponics.dm | 2 +- code/game/objects/items/weapons/implants/implant.dm | 2 +- code/game/objects/items/weapons/implants/implanter.dm | 2 +- code/game/objects/items/weapons/legcuffs.dm | 4 ++-- code/game/objects/items/weapons/weaponry.dm | 2 +- code/game/objects/structures/false_walls.dm | 2 +- code/game/objects/structures/mineral_doors.dm | 2 +- .../structures/stool_bed_chair_nest/wheelchair.dm | 2 +- code/game/turfs/simulated/walls_mineral.dm | 2 +- code/modules/admin/admin_investigate.dm | 9 ++++++++- code/modules/admin/verbs/adminhelp.dm | 2 +- code/modules/assembly/timer.dm | 2 +- code/modules/mining/mine_turfs.dm | 2 +- code/modules/mining/ore.dm | 4 ++-- code/modules/mob/dead/observer/observer.dm | 11 +---------- code/modules/mob/living/carbon/carbon.dm | 2 +- code/modules/mob/living/carbon/human/human_defense.dm | 11 ++++++++--- code/modules/mob/living/living_defense.dm | 2 +- code/modules/mob/living/simple_animal/borer.dm | 2 +- code/modules/organs/organ.dm | 2 +- code/modules/power/singularity/emitter.dm | 4 ++-- .../particle_accelerator/particle_control.dm | 4 ++-- code/modules/power/supermatter/supermatter.dm | 2 +- code/modules/projectiles/projectile.dm | 2 +- code/modules/reagents/dartgun.dm | 2 +- code/modules/reagents/reagent_containers/dropper.dm | 4 ++-- code/modules/reagents/reagent_containers/drugs.dm | 2 +- .../reagents/reagent_containers/food/condiment.dm | 2 +- .../reagents/reagent_containers/food/drinks.dm | 2 +- .../reagents/reagent_containers/food/drinks/bottle.dm | 2 +- .../reagents/reagent_containers/glass_containers.dm | 4 ++-- code/modules/reagents/reagent_containers/hypospray.dm | 2 +- code/modules/reagents/reagent_containers/pill.dm | 4 ++-- .../reagents/reagent_containers/robodropper.dm | 4 ++-- code/modules/reagents/reagent_containers/spray.dm | 8 ++++---- code/modules/reagents/reagent_containers/syringes.dm | 6 +++--- code/modules/recycling/disposal.dm | 2 +- code/modules/surgery/braincore.dm | 2 +- code/modules/vehicle/train/train.dm | 2 +- code/modules/vehicle/train/trains/ambulance.dm | 2 +- code/modules/vehicle/train/trains/janicart.dm | 2 +- config/example/dbconfig.txt | 3 ++- 68 files changed, 113 insertions(+), 110 deletions(-) diff --git a/code/__HELPERS/mobs.dm b/code/__HELPERS/mobs.dm index a37ab3f94d2..09725ec06d3 100644 --- a/code/__HELPERS/mobs.dm +++ b/code/__HELPERS/mobs.dm @@ -145,5 +145,5 @@ proc/add_logs(mob/target, mob/user, what_done, var/object=null, var/addition=nul if(what_done in ignore) return if(target == user)return if(!admin) return - msg_admin_attack("[key_name_admin(user)](?) ([admin_jump_link(user, "holder")]) [what_done] [key_name_admin(target)][object ? " with [object]" : " "][addition]") + msg_admin_attack("[key_name_admin(user)] [what_done] [key_name_admin(target)][object ? " with [object]" : " "][addition]") diff --git a/code/__HELPERS/unsorted.dm b/code/__HELPERS/unsorted.dm index 713c2965335..764ffbe9450 100644 --- a/code/__HELPERS/unsorted.dm +++ b/code/__HELPERS/unsorted.dm @@ -653,7 +653,7 @@ Turf and target are seperate in case you want to teleport some distance from a t return . /proc/key_name_admin(var/whom, var/include_name = 1) - var/message = "[key_name(whom, 1, include_name)][isAntag(whom) ? " (ANTAG)" : ""](?) ([admin_jump_link(whom, "holder")])" + var/message = "[key_name(whom, 1, include_name)](?) [isAntag(whom) ? "(ANTAG)" : ""] ([admin_jump_link(whom, "holder")])" return message /proc/get_mob_by_ckey(key) diff --git a/code/game/dna/genes/goon_disabilities.dm b/code/game/dna/genes/goon_disabilities.dm index 3762e0a4e54..7ea73a79ddd 100644 --- a/code/game/dna/genes/goon_disabilities.dm +++ b/code/game/dna/genes/goon_disabilities.dm @@ -336,7 +336,7 @@ if(L) usr.attack_log += text("\[[time_stamp()]\] [key_name(usr)] cast the spell [name] on [key_name(L)]") - msg_admin_attack("[key_name_admin(usr)](?) ([admin_jump_link(usr, "holder")]) has cast the spell [name] on [key_name_admin(L)]") + msg_admin_attack("[key_name_admin(usr)] has cast the spell [name] on [key_name_admin(L)]") L.adjust_fire_stacks(0.5) L.visible_message("\red [L.name] suddenly bursts into flames!") diff --git a/code/game/dna/genes/goon_powers.dm b/code/game/dna/genes/goon_powers.dm index 63567f802c9..06a16390fa7 100644 --- a/code/game/dna/genes/goon_powers.dm +++ b/code/game/dna/genes/goon_powers.dm @@ -170,12 +170,12 @@ H.visible_message("\red [usr] sprays a cloud of fine ice crystals, engulfing [H]!", "[usr] sprays a cloud of fine ice crystals over your [H.head]'s visor.") log_admin("[key_name(usr)] has used cryokinesis on [key_name(C)] while wearing internals and a suit") - msg_admin_attack("[key_name_admin(usr)](?) ([admin_jump_link(usr, "holder")]) has cast cryokinesis on [key_name_admin(C)]") + msg_admin_attack("[key_name_admin(usr)] has cast cryokinesis on [key_name_admin(C)]") else H.visible_message("\red [usr] sprays a cloud of fine ice crystals engulfing, [H]!", "[usr] sprays a cloud of fine ice crystals cover your [H.head]'s visor and make it into your air vents!.") log_admin("[key_name(usr)] has used cryokinesis on [key_name(C)]") - msg_admin_attack("[key_name_admin(usr)](?) ([admin_jump_link(usr, "holder")]) has cast cryokinesis on [key_name_admin(C)]") + msg_admin_attack("[key_name_admin(usr)] has cast cryokinesis on [key_name_admin(C)]") H.bodytemperature = max(0, H.bodytemperature - 50) H.adjustFireLoss(5) if(!handle_suit) @@ -185,7 +185,7 @@ C.visible_message("\red [usr] sprays a cloud of fine ice crystals, engulfing [C]!") log_admin("[key_name(usr)] has used cryokinesis on [key_name(C)] without internals or a suit") - msg_admin_attack("[key_name_admin(usr)](?) ([admin_jump_link(usr, "holder")]) has cast cryokinesis on [key_name_admin(C)]") + msg_admin_attack("[key_name_admin(usr)] has cast cryokinesis on [key_name_admin(C)]") //playsound(usr.loc, 'bamf.ogg', 50, 0) diff --git a/code/game/gamemodes/cult/ritual.dm b/code/game/gamemodes/cult/ritual.dm index 4727b93ea9f..f58a93b931f 100644 --- a/code/game/gamemodes/cult/ritual.dm +++ b/code/game/gamemodes/cult/ritual.dm @@ -332,7 +332,7 @@ var/engwords = list("travel", "blood", "join", "hell", "destroy", "technology", M.attack_log += text("\[[time_stamp()]\] Has had the [name] used on him by [key_name(user)]") user.attack_log += text("\[[time_stamp()]\] Used [name] on [key_name(M)]") - msg_admin_attack("[key_name_admin(user)](?) ([admin_jump_link(user, "holder")]) used [name] on [key_name_admin(M)]") + msg_admin_attack("[key_name_admin(user)] used [name] on [key_name_admin(M)]") if(!iscarbon(M)) M.LAssailant = null else diff --git a/code/game/gamemodes/nuclear/nuclearbomb.dm b/code/game/gamemodes/nuclear/nuclearbomb.dm index 6ea43ceac50..e9752e1e65b 100644 --- a/code/game/gamemodes/nuclear/nuclearbomb.dm +++ b/code/game/gamemodes/nuclear/nuclearbomb.dm @@ -328,7 +328,7 @@ obj/machinery/nuclearbomb/proc/nukehack_win(mob/user as mob) lastentered = text("[]", href_list["type"]) if (text2num(lastentered) == null) var/turf/LOC = get_turf(usr) - message_admins("[key_name_admin(usr)] ([admin_jump_link(usr, "holder")]) tried to exploit a nuclear bomb by entering non-numerical codes: [lastentered]! ([LOC ? "JMP" : "null"])", 0) + message_admins("[key_name_admin(usr)] tried to exploit a nuclear bomb by entering non-numerical codes: [lastentered]! ([LOC ? "JMP" : "null"])", 0) log_admin("EXPLOIT: [key_name(usr)] tried to exploit a nuclear bomb by entering non-numerical codes: [lastentered]!") else src.code += lastentered diff --git a/code/game/machinery/atmoalter/canister.dm b/code/game/machinery/atmoalter/canister.dm index ab9c6353c7c..702f7512535 100644 --- a/code/game/machinery/atmoalter/canister.dm +++ b/code/game/machinery/atmoalter/canister.dm @@ -450,11 +450,11 @@ update_flag else logmsg = "Valve was opened by [usr] ([usr.ckey]), starting the transfer into the air
" if(air_contents.toxins > 0) - message_admins("[key_name_admin(usr)](?) ([admin_jump_link(usr, "holder")]) opened a canister that contains plasma! (JMP)") + message_admins("[key_name_admin(usr)] opened a canister that contains plasma! (JMP)") log_admin("[key_name(usr)] opened a canister that contains plasma at [x], [y], [z]") var/datum/gas/sleeping_agent = locate(/datum/gas/sleeping_agent) in air_contents.trace_gases if(sleeping_agent && (sleeping_agent.moles > 1)) - message_admins("[key_name_admin(usr)](?) ([admin_jump_link(usr, "holder")]) opened a canister that contains N2O! (JMP)") + message_admins("[key_name_admin(usr)] opened a canister that contains N2O! (JMP)") log_admin("[key_name(usr)] opened a canister that contains N2O at [x], [y], [z]") investigate_log(logmsg, "atmos") release_log += logmsg diff --git a/code/game/machinery/computer/robot.dm b/code/game/machinery/computer/robot.dm index d352d969de3..4fda7a334d3 100644 --- a/code/game/machinery/computer/robot.dm +++ b/code/game/machinery/computer/robot.dm @@ -72,7 +72,7 @@ target << "Extreme danger. Termination codes detected. Scrambling security codes and automatic AI unlink triggered." target.ResetSecurityCodes() else - message_admins("[key_name_admin(usr)] ([admin_jump_link(usr, "holder")]) detonated [key_name(target, target.client)](JMP)!") + message_admins("[key_name_admin(usr)] detonated [key_name_admin(target)] (JMP)!") log_game("\[key_name(usr)] detonated [key_name(target)]!") target << "Self-destruct command received." if(target.connected_ai) @@ -101,7 +101,7 @@ if(!target || !istype(target)) return - message_admins("[key_name_admin(usr)] ([admin_jump_link(usr, "holder")]) [target.canmove ? "locked down" : "released"] [key_name(target, target.client)]([admin_jump_link(usr, "holder")])!") + message_admins("[key_name_admin(usr)] [target.canmove ? "locked down" : "released"] [key_name_admin(target)]!") log_game("[key_name(usr)] [target.canmove ? "locked down" : "released"] [key_name(target)]!") target.canmove = !target.canmove target.lockcharge = !target.lockcharge @@ -135,8 +135,8 @@ if(!target || !istype(target)) return - message_admins("\blue [key_name_admin(usr)] emagged [target.name] using robotic console!") - log_game("[key_name(usr)] emagged [target.name] using robotic console!") + message_admins("\blue [key_name_admin(usr)] emagged [key_name_admin(target)] using robotic console!") + log_game("[key_name(usr)] emagged [key_name(target)] using robotic console!") target.emagged = 1 target << "Failsafe protocols overriden. New tools available." @@ -158,7 +158,7 @@ user << "Self-destruct aborted - safety active" return - message_admins("[key_name_admin(usr)] ([admin_jump_link(usr, "holder")]) detonated all cyborgs!") + message_admins("[key_name_admin(usr)] detonated all cyborgs!") log_game("\[key_name(usr)] detonated all cyborgs!") for(var/mob/living/silicon/robot/R in mob_list) diff --git a/code/game/machinery/computer/shuttle.dm b/code/game/machinery/computer/shuttle.dm index 20d8f30f044..28125a24c96 100644 --- a/code/game/machinery/computer/shuttle.dm +++ b/code/game/machinery/computer/shuttle.dm @@ -37,11 +37,11 @@ src.authorized -= W:registered_name src.authorized += W:registered_name if (src.auth_need - src.authorized.len > 0) - message_admins("[key_name_admin(user.client)](?) ([admin_jump_link(user, "holder")]) has authorized early shuttle launch ",0,1) + message_admins("[key_name_admin(user.client)] has authorized early shuttle launch ",0,1) log_game("[key_name(user)] has authorized early shuttle launch in ([x],[y],[z])") world << text("\blue Alert: [] authorizations needed until shuttle is launched early", src.auth_need - src.authorized.len) else - message_admins("[key_name_admin(user.client)](?) ([admin_jump_link(user, "holder")]) has launched the emergency shuttle before launch.",0,1) + message_admins("[key_name_admin(user.client)] has launched the emergency shuttle before launch.",0,1) log_game("[key_name(user)] has launched the emergency shuttle before launch in ([x],[y],[z]).") world << "\blue Alert: Shuttle launch time shortened to 10 seconds!" emergency_shuttle.set_launch_countdown(10) @@ -66,7 +66,7 @@ if(!emagged && !emergency_shuttle.location()) switch(choice) if("Launch") - message_admins("[key_name_admin(user.client)](?) ([admin_jump_link(user, "holder")]) has emagged the emergency shuttle before launch.",0,1) + message_admins("[key_name_admin(user.client)] has emagged the emergency shuttle before launch.",0,1) log_game("[key_name(user)] has emagged the emergency shuttle in ([x],[y],[z]) before launch.") world << "\blue Alert: Shuttle launch time shortened to 10 seconds!" emergency_shuttle.set_launch_countdown(10) diff --git a/code/game/machinery/cryopod.dm b/code/game/machinery/cryopod.dm index 8fbcb1de902..c28edd89e55 100644 --- a/code/game/machinery/cryopod.dm +++ b/code/game/machinery/cryopod.dm @@ -489,7 +489,7 @@ // Book keeping! log_admin("[key_name(M)] has entered a stasis pod.") - message_admins("[key_name_admin(user)](?) ([admin_jump_link(user, "holder")]) has entered a stasis pod. (JMP)") + message_admins("[key_name_admin(user)] has entered a stasis pod. (JMP)") //Despawning occurs when process() is called with an occupant without a client. src.add_fingerprint(M) diff --git a/code/game/machinery/doors/airlock.dm b/code/game/machinery/doors/airlock.dm index d32ca1a1a93..abc14227433 100644 --- a/code/game/machinery/doors/airlock.dm +++ b/code/game/machinery/doors/airlock.dm @@ -852,7 +852,7 @@ About the new airlock wires panel: /obj/machinery/door/airlock/plasma/attackby(C as obj, mob/user as mob, params) if(is_hot(C) > 300) - message_admins("Plasma airlock ignited by [key_name_admin(user)](?) ([admin_jump_link(user, "holder")]) in ([x],[y],[z] - JMP)") + message_admins("Plasma airlock ignited by [key_name_admin(user)] in ([x],[y],[z] - JMP)") log_game("Plasma wall ignited by [key_name(user)] in ([x],[y],[z])") ignite(is_hot(C)) ..() diff --git a/code/game/machinery/kitchen/gibber.dm b/code/game/machinery/kitchen/gibber.dm index d84a9186ab2..db49facd824 100644 --- a/code/game/machinery/kitchen/gibber.dm +++ b/code/game/machinery/kitchen/gibber.dm @@ -339,7 +339,7 @@ return if(UserOverride) - msg_admin_attack("[key_name_admin(occupant)](?) ([admin_jump_link(occupant, "holder")]) was gibbed by an autogibber (\the [src]) (JMP)") + msg_admin_attack("[key_name_admin(occupant)] was gibbed by an autogibber (\the [src]) (JMP)") if(src.operating) return diff --git a/code/game/machinery/machinery.dm b/code/game/machinery/machinery.dm index b964ff0baf0..b1507fcb63d 100644 --- a/code/game/machinery/machinery.dm +++ b/code/game/machinery/machinery.dm @@ -220,7 +220,7 @@ Class Procs: var/re_init=0 if("set_tag" in href_list) if(!(href_list["set_tag"] in settagwhitelist))//I see you're trying Href exploits, I see you're failing, I SEE ADMIN WARNING. (seriously though, this is a powerfull HREF, I originally found this loophole, I'm not leaving it in on my PR) - message_admins("set_tag HREF (var attempted to edit: [href_list["set_tag"]]) exploit attempted by [key_name_admin(user)](?) ([admin_jump_link(user, "holder")]) on [src] (JMP)") + message_admins("set_tag HREF (var attempted to edit: [href_list["set_tag"]]) exploit attempted by [key_name_admin(user)] on [src] (JMP)") return 1 if(!(href_list["set_tag"] in vars)) usr << "Something went wrong: Unable to find [href_list["set_tag"]] in vars!" diff --git a/code/game/machinery/syndicatebomb.dm b/code/game/machinery/syndicatebomb.dm index 2504e4349b7..398759d80b6 100644 --- a/code/game/machinery/syndicatebomb.dm +++ b/code/game/machinery/syndicatebomb.dm @@ -138,7 +138,7 @@ var/turf/bombturf = get_turf(src) var/area/A = get_area(bombturf) if(payload && !istype(payload, /obj/item/weapon/bombcore/training)) - msg_admin_attack("[key_name_admin(user)]? ([admin_jump_link(user, "holder")]) has primed a [name] ([payload]) for detonation at [A.name] (JMP).") + msg_admin_attack("[key_name_admin(user)] has primed a [name] ([payload]) for detonation at [A.name] (JMP).") log_game("[key_name(user)] has primed a [name] ([payload]) for detonation at [A.name]([bombturf.x],[bombturf.y],[bombturf.z])") payload.adminlog = "The [src.name] that [key_name(user)] had primed detonated!" @@ -311,10 +311,9 @@ var/turf/T = get_turf(src) var/area/A = get_area(T) detonated-- - var/log_str = "[key_name_admin(user)]? has remotely detonated [detonated ? "syndicate bombs" : "a syndicate bomb"] using a [name] at [A.name] (JMP)." - bombers += log_str - message_admins(log_str) - log_game("[key_name(user)] ([admin_jump_link(user, "holder")]) has remotely detonated [detonated ? "syndicate bombs" : "a syndicate bomb"] using a [name] at [A.name]([T.x],[T.y],[T.z])") + message_admins("[key_name_admin(user)] has remotely detonated [detonated ? "syndicate bombs" : "a syndicate bomb"] using a [name] at [A.name] (JMP).") + bombers += "[key_name(user)] has remotely detonated [detonated ? "syndicate bombs" : "a syndicate bomb"] using a [name] at [A.name]([T.x],[T.y],[T.z])" + log_game("[key_name(user)] has remotely detonated [detonated ? "syndicate bombs" : "a syndicate bomb"] using a [name] at [A.name]([T.x],[T.y],[T.z])") detonated = 0 existant = 0 cooldown = 1 diff --git a/code/game/machinery/telecomms/telecomunications.dm b/code/game/machinery/telecomms/telecomunications.dm index 5f01ae0b7dc..9856f482b0b 100644 --- a/code/game/machinery/telecomms/telecomunications.dm +++ b/code/game/machinery/telecomms/telecomunications.dm @@ -635,7 +635,7 @@ var/global/list/obj/machinery/telecomms/telecomms_list = list() diary << rawcode src.investigate_log("[msg]
[rawcode]", "ntsl") if(length(rawcode)) // Let's not bother the admins for empty code. - message_admins("[key_name_admin(mob)] ([admin_jump_link(usr, "holder")]) has compiled and uploaded a NTSL script to [src.id]",0,1) + message_admins("[key_name_admin(mob)] has compiled and uploaded a NTSL script to [src.id]",0,1) // Simple log entry datum diff --git a/code/game/objects/effects/effect_system.dm b/code/game/objects/effects/effect_system.dm index df860d5b70f..d992c1e8e86 100644 --- a/code/game/objects/effects/effect_system.dm +++ b/code/game/objects/effects/effect_system.dm @@ -483,7 +483,7 @@ steam.start() -- spawns the effect var/mob/M = get_mob_by_key(carry.my_atom.fingerprintslast) var/more = "" if(M) - more = "(?) ([admin_jump_link(M, "holder")]) " + more = " " msg_admin_attack("A chemical smoke reaction has taken place in ([whereLink])[contained]. Last associated key is [carry.my_atom.fingerprintslast][more].", 0, 1) log_game("A chemical smoke reaction has taken place in ([where])[contained]. Last associated key is [carry.my_atom.fingerprintslast].") else diff --git a/code/game/objects/items.dm b/code/game/objects/items.dm index 3f497e1cac1..842fa1edb45 100644 --- a/code/game/objects/items.dm +++ b/code/game/objects/items.dm @@ -602,7 +602,7 @@ user.attack_log += "\[[time_stamp()]\] Attacked [key_name(M)] with [src.name] (INTENT: [uppertext(user.a_intent)])" M.attack_log += "\[[time_stamp()]\] Attacked by [key_name(user)] with [src.name] (INTENT: [uppertext(user.a_intent)])" if(M.ckey) - msg_admin_attack("[key_name_admin(user)](?) ([admin_jump_link(user, "holder")]) attacked [key_name_admin(M)] with [src.name] (INTENT: [uppertext(user.a_intent)])") //BS12 EDIT ALG + msg_admin_attack("[key_name_admin(user)] attacked [key_name_admin(M)] with [src.name] (INTENT: [uppertext(user.a_intent)])") //BS12 EDIT ALG if(!iscarbon(user)) M.LAssailant = null diff --git a/code/game/objects/items/devices/aicard.dm b/code/game/objects/items/devices/aicard.dm index 914459e59fb..2e6a91b6909 100644 --- a/code/game/objects/items/devices/aicard.dm +++ b/code/game/objects/items/devices/aicard.dm @@ -15,7 +15,7 @@ M.attack_log += text("\[[time_stamp()]\] Has been carded with [src.name] by [key_name(user)]") user.attack_log += text("\[[time_stamp()]\] Used the [src.name] to card [key_name(M)]") - msg_admin_attack("[key_name_admin(user)](?) ([admin_jump_link(user, "holder")]) used the [src.name] to card [M.name] ([M.ckey])") + msg_admin_attack("[key_name_admin(user)] used the [src.name] to card [M.name] ([M.ckey])") transfer_ai("AICORE", "AICARD", M, user) return diff --git a/code/game/objects/items/devices/pizza_bomb.dm b/code/game/objects/items/devices/pizza_bomb.dm index 78f8009711a..1f1b362078d 100644 --- a/code/game/objects/items/devices/pizza_bomb.dm +++ b/code/game/objects/items/devices/pizza_bomb.dm @@ -30,7 +30,7 @@ timer = Clamp(timer, 10, 100) icon_state = "pizzabox1" user << "You set the timer to [timer / 10] before activating the payload and closing \the [src]." - message_admins("[key_name_admin(usr)]? ([admin_jump_link(usr, "holder")]) has set a timer on a pizza bomb to [timer/10] seconds at (JMP).") + message_admins("[key_name_admin(usr)] has set a timer on a pizza bomb to [timer/10] seconds at (JMP).") log_game("[key_name(usr)] has set the timer on a pizza bomb to [timer/10] seconds ([loc.x],[loc.y],[loc.z]).") armer = usr name = "pizza box" @@ -42,7 +42,7 @@ icon_state = "pizzabox_bomb" audible_message("\icon[src] *beep* *beep*") user << "That's no pizza! That's a bomb!" - message_admins("[key_name_admin(usr)]? ([admin_jump_link(usr, "holder")]) has triggered a pizza bomb armed by [armer] at (JMP).") + message_admins("[key_name_admin(usr)] has triggered a pizza bomb armed by [armer] at (JMP).") log_game("[key_name(usr)] has triggered a pizza bomb armed by [armer] ([loc.x],[loc.y],[loc.z]).") primed = 1 sleep(timer) diff --git a/code/game/objects/items/devices/powersink.dm b/code/game/objects/items/devices/powersink.dm index bcaf7e74f0a..ab61e766c91 100644 --- a/code/game/objects/items/devices/powersink.dm +++ b/code/game/objects/items/devices/powersink.dm @@ -42,7 +42,7 @@ anchored = 1 mode = 1 src.visible_message("[user] attaches [src] to the cable!") - message_admins("Power sink activated by [key_name_admin(user)](?) ([admin_jump_link(user, "holder")]) at ([x],[y],[z] - JMP)") + message_admins("Power sink activated by [key_name_admin(user)] at ([x],[y],[z] - JMP)") log_game("Power sink activated by [key_name(user)] at ([x],[y],[z])") return else diff --git a/code/game/objects/items/devices/transfer_valve.dm b/code/game/objects/items/devices/transfer_valve.dm index bb1dda94e59..4736ce9d745 100644 --- a/code/game/objects/items/devices/transfer_valve.dm +++ b/code/game/objects/items/devices/transfer_valve.dm @@ -185,12 +185,12 @@ log_str += "with [attached_device ? attached_device : "no device"] attacher: [attacher_name]" if(attacher) - log_str += "(?) ([admin_jump_link(attacher, "holder")])" + log_str += "" var/mob/mob = get_mob_by_key(src.fingerprintslast) var/last_touch_info = "" if(mob) - last_touch_info = "(?) ([admin_jump_link(attacher, "holder")])" + last_touch_info = "" log_str += " Last touched by: [key_name_admin(mob)][last_touch_info]" bombers += log_str diff --git a/code/game/objects/items/robot/robot_items.dm b/code/game/objects/items/robot/robot_items.dm index eb312962d0b..3d496ca3b86 100644 --- a/code/game/objects/items/robot/robot_items.dm +++ b/code/game/objects/items/robot/robot_items.dm @@ -13,7 +13,7 @@ M.attack_log += text("\[[time_stamp()]\] Has been attacked with [src.name] by [key_name(user)]") user.attack_log += text("\[[time_stamp()]\] Used the [src.name] to attack [key_name(M)]") if(M.ckey) - msg_admin_attack("[key_name_admin(user)](?) ([admin_jump_link(user, "holder")]) used the [src.name] to attack [key_name_admin(M)]") + msg_admin_attack("[key_name_admin(user)] used the [src.name] to attack [key_name_admin(M)]") if(!iscarbon(user)) M.LAssailant = null diff --git a/code/game/objects/items/weapons/explosives.dm b/code/game/objects/items/weapons/explosives.dm index a4a232db53a..45ed9da7217 100644 --- a/code/game/objects/items/weapons/explosives.dm +++ b/code/game/objects/items/weapons/explosives.dm @@ -41,7 +41,7 @@ user.say(message_say) target = user - message_admins("[key_name_admin(user)](?) ([admin_jump_link(user, "holder")]) suicided with [src.name] at ([x],[y],[z] - JMP)",0,1) + message_admins("[key_name_admin(user)] suicided with [src.name] at ([x],[y],[z] - JMP)",0,1) message_admins("[key_name(user)] suicided with [src.name] at ([x],[y],[z])") explode(get_turf(user)) return . @@ -80,11 +80,11 @@ if (ismob(target)) add_logs(target, user, "planted [name] on") user.visible_message("\red [user.name] finished planting an explosive on [target.name]!") - message_admins("[key_name_admin(user)](?) ([admin_jump_link(user, "holder")]) planted [src.name] on [key_name_admin(target)](?) ([admin_jump_link(target, "holder")]) with [timer] second fuse",0,1) + message_admins("[key_name_admin(user)] planted [src.name] on [key_name_admin(target)] with [timer] second fuse",0,1) log_game("[key_name(user)] planted [src.name] on [key_name(target)] with [timer] second fuse") else - message_admins("[key_name_admin(user)](?) ([admin_jump_link(user, "holder")]) planted [src.name] on [target.name] at ([target.x],[target.y],[target.z] - JMP) with [timer] second fuse",0,1) + message_admins("[key_name_admin(user)] planted [src.name] on [target.name] at ([target.x],[target.y],[target.z] - JMP) with [timer] second fuse",0,1) log_game("[key_name(user)] planted [src.name] on [target.name] at ([target.x],[target.y],[target.z]) with [timer] second fuse") target.overlays += image('icons/obj/assemblies.dmi', "plastic-explosive2") diff --git a/code/game/objects/items/weapons/grenades/chem_grenade.dm b/code/game/objects/items/weapons/grenades/chem_grenade.dm index 71ddb1bf455..a3fdc63db4c 100644 --- a/code/game/objects/items/weapons/grenades/chem_grenade.dm +++ b/code/game/objects/items/weapons/grenades/chem_grenade.dm @@ -90,7 +90,7 @@ update_icon() else if(clown_check(user)) // This used to go before the assembly check, but that has absolutely zero to do with priming the damn thing. You could spam the admins with it. - var/log_str = "[key_name_admin(usr)]? ([admin_jump_link(usr, "holder")]) has primed a [name] for detonation at [A.name] (JMP)." + var/log_str = "[key_name_admin(usr)] has primed a [name] for detonation at [A.name] (JMP)." msg_admin_attack(log_str) log_game(log_str) bombers += "[log_str]" @@ -138,7 +138,7 @@ contained = "\[[contained]\]" var/turf/bombturf = get_turf(loc) var/area/A = bombturf.loc - message_admins("[key_name_admin(usr)]? ([admin_jump_link(usr, "holder")]) has completed [name] at [A.name] (JMP) [contained].") + message_admins("[key_name_admin(usr)] has completed [name] at [A.name] (JMP) [contained].") log_game("[key_name(usr)] has completed [name] at [bombturf.x], [bombturf.y], [bombturf.z].") else user << "You need to add at least one beaker before locking the assembly." diff --git a/code/game/objects/items/weapons/grenades/ghettobomb.dm b/code/game/objects/items/weapons/grenades/ghettobomb.dm index dad7be5c780..25235ee9e7b 100644 --- a/code/game/objects/items/weapons/grenades/ghettobomb.dm +++ b/code/game/objects/items/weapons/grenades/ghettobomb.dm @@ -112,7 +112,7 @@ var/turf/bombturf = get_turf(src) var/area/A = get_area(bombturf) - message_admins("[key_name_admin(usr)](?) ([admin_jump_link(usr, "holder")]) has primed a [name] for detonation at [A.name] (JMP).") + message_admins("[key_name_admin(usr)] has primed a [name] for detonation at [A.name] (JMP).") log_game("[key_name(usr)] has primed a [name] for detonation at [A.name] ([bombturf.x],[bombturf.y],[bombturf.z]).") if(iscarbon(user)) var/mob/living/carbon/C = user diff --git a/code/game/objects/items/weapons/grenades/grenade.dm b/code/game/objects/items/weapons/grenades/grenade.dm index 9d234d3ff7b..ff92ee0b29c 100644 --- a/code/game/objects/items/weapons/grenades/grenade.dm +++ b/code/game/objects/items/weapons/grenades/grenade.dm @@ -63,7 +63,7 @@ add_fingerprint(user) var/turf/bombturf = get_turf(src) var/area/A = get_area(bombturf) - message_admins("[key_name_admin(usr)](?) ([admin_jump_link(usr, "holder")]) has primed a [name] for detonation at [A.name] (JMP).") + message_admins("[key_name_admin(usr)] has primed a [name] for detonation at [A.name] (JMP).") log_game("[key_name(usr)] has primed a [name] for detonation at [A.name] ([bombturf.x],[bombturf.y],[bombturf.z]).") bombers += "[key_name(usr)] has primed a [name] for detonation at [A.name] ([bombturf.x],[bombturf.y],[bombturf.z])." if(iscarbon(user)) diff --git a/code/game/objects/items/weapons/hydroponics.dm b/code/game/objects/items/weapons/hydroponics.dm index d25b6a29aa0..f622a516b82 100644 --- a/code/game/objects/items/weapons/hydroponics.dm +++ b/code/game/objects/items/weapons/hydroponics.dm @@ -198,7 +198,7 @@ M.attack_log += text("\[[time_stamp()]\] Had the [src.name] used on them by [key_name(user)]") user.attack_log += text("\[[time_stamp()]\] Used the [src.name] on [key_name(M)]") - msg_admin_attack("[key_name_admin(user)](?) ([admin_jump_link(user, "holder")]) used the [src.name] on [key_name_admin(M)]") + msg_admin_attack("[key_name_admin(user)] used the [src.name] on [key_name_admin(M)]") if(!iscarbon(user)) M.LAssailant = null diff --git a/code/game/objects/items/weapons/implants/implant.dm b/code/game/objects/items/weapons/implants/implant.dm index 64cfa9b497e..2d2be9fe495 100644 --- a/code/game/objects/items/weapons/implants/implant.dm +++ b/code/game/objects/items/weapons/implants/implant.dm @@ -162,7 +162,7 @@ Implant Specifics:
"} var/need_gib = null if(istype(imp_in, /mob/)) var/mob/T = imp_in - message_admins("Explosive implant triggered in [key_name_admin(T)](?) ([admin_jump_link(T, "holder")])") + message_admins("Explosive implant triggered in [key_name_admin(T)]") log_game("Explosive implant triggered in [key_name(T)].") need_gib = 1 diff --git a/code/game/objects/items/weapons/implants/implanter.dm b/code/game/objects/items/weapons/implants/implanter.dm index a6ef3256d28..4de580b70de 100644 --- a/code/game/objects/items/weapons/implants/implanter.dm +++ b/code/game/objects/items/weapons/implants/implanter.dm @@ -34,7 +34,7 @@ M.attack_log += text("\[[time_stamp()]\] Implanted with [src.name] ([src.imp.name]) by [key_name(user)]") user.attack_log += text("\[[time_stamp()]\] Used the [src.name] ([src.imp.name]) to implant [key_name(M)]") - msg_admin_attack("[key_name_admin(user)](?) ([admin_jump_link(user, "holder")]) implanted [M.name] ([M.ckey]) with [src.name] (INTENT: [uppertext(user.a_intent)])") + msg_admin_attack("[key_name_admin(user)] implanted [M.name] ([M.ckey]) with [src.name] (INTENT: [uppertext(user.a_intent)])") user.show_message("\red You implanted the implant into [M].") if(src.imp.implanted(M, user)) diff --git a/code/game/objects/items/weapons/legcuffs.dm b/code/game/objects/items/weapons/legcuffs.dm index 96bd885ab03..1925455529c 100644 --- a/code/game/objects/items/weapons/legcuffs.dm +++ b/code/game/objects/items/weapons/legcuffs.dm @@ -44,7 +44,7 @@ if(2,3) user.drop_item(src) I.loc = src - message_admins("[key_name_admin(user)](?) ([admin_jump_link(user, "holder")]) has rigged a beartrap with an IED.") + message_admins("[key_name_admin(user)] has rigged a beartrap with an IED.") log_game("[key_name(user)] has rigged a beartrap with an IED.") user << "You sneak the [IED] underneath the pressure plate and connect the trigger wire." desc = "A trap used to catch bears and other legged creatures. There is an IED hooked up to it." @@ -67,7 +67,7 @@ IED.overlays -= image('icons/obj/grenade.dmi', icon_state = "improvised_grenade_filled") IED.icon_state = initial(icon_state) + "_active" IED.assembled = 3 - message_admins("[key_name_admin(usr)](?) ([admin_jump_link(usr, "holder")]) has triggered an IED-rigged [name].") + message_admins("[key_name_admin(usr)] has triggered an IED-rigged [name].") log_game("[key_name(usr)] has triggered an IED-rigged [name].") spawn(IED.det_time) IED.prime() diff --git a/code/game/objects/items/weapons/weaponry.dm b/code/game/objects/items/weapons/weaponry.dm index cb22ce2add2..ee6fb876f05 100644 --- a/code/game/objects/items/weapons/weaponry.dm +++ b/code/game/objects/items/weapons/weaponry.dm @@ -41,7 +41,7 @@ else M.LAssailant = user - msg_admin_attack("[key_name_admin(user)](?) ([admin_jump_link(user, "holder")]) attacked [key_name_admin(M)] with [src.name] (INTENT: [uppertext(user.a_intent)])") + msg_admin_attack("[key_name_admin(user)] attacked [key_name_admin(M)] with [src.name] (INTENT: [uppertext(user.a_intent)])") if ((CLUMSY in user.mutations) && prob(50)) user << "\red The rod slips out of your hand and hits your head." diff --git a/code/game/objects/structures/false_walls.dm b/code/game/objects/structures/false_walls.dm index e548194c2dc..21208b26ca6 100644 --- a/code/game/objects/structures/false_walls.dm +++ b/code/game/objects/structures/false_walls.dm @@ -224,7 +224,7 @@ /obj/structure/falsewall/plasma/attackby(obj/item/weapon/W, mob/user, params) if(is_hot(W) > 300) - message_admins("Plasma falsewall ignited by [key_name_admin(user)](?) ([admin_jump_link(user, "holder")]) in ([x],[y],[z] - JMP)",0,1) + message_admins("Plasma falsewall ignited by [key_name_admin(user)] in ([x],[y],[z] - JMP)",0,1) log_game("Plasma falsewall ignited by [key_name(user)] in ([x],[y],[z])") burnbabyburn() return diff --git a/code/game/objects/structures/mineral_doors.dm b/code/game/objects/structures/mineral_doors.dm index e6f2d29b801..3a792030371 100644 --- a/code/game/objects/structures/mineral_doors.dm +++ b/code/game/objects/structures/mineral_doors.dm @@ -195,7 +195,7 @@ attackby(obj/item/weapon/W as obj, mob/user as mob) if(is_hot(W)) - message_admins("Plasma mineral door ignited by [key_name_admin(user)](?) ([admin_jump_link(user, "holder")]) in ([x],[y],[z] - JMP)",0,1) + message_admins("Plasma mineral door ignited by [key_name_admin(user)] in ([x],[y],[z] - JMP)",0,1) log_game("Plasma mineral door ignited by [key_name(user)] in ([x],[y],[z])") TemperatureAct(100) ..() diff --git a/code/game/objects/structures/stool_bed_chair_nest/wheelchair.dm b/code/game/objects/structures/stool_bed_chair_nest/wheelchair.dm index 066698a8cd2..956bc6d7d07 100644 --- a/code/game/objects/structures/stool_bed_chair_nest/wheelchair.dm +++ b/code/game/objects/structures/stool_bed_chair_nest/wheelchair.dm @@ -157,7 +157,7 @@ pulling.attack_log += "\[[time_stamp()]\] Crashed [key_name(occupant)] [name] into \a [A]" occupant.attack_log += "\[[time_stamp()]\] Thrusted into \a [A] by [key_name(pulling)] with \the [name]" - msg_admin_attack("[key_name_admin(pulling)](?) ([admin_jump_link(pulling, "holder")]) has thrusted [key_name_admin(occupant)] [name] into \a [A]") + msg_admin_attack("[key_name_admin(pulling)] has thrusted [key_name_admin(occupant)] [name] into \a [A]") else occupant.visible_message("[occupant] crashed into \the [A]!") diff --git a/code/game/turfs/simulated/walls_mineral.dm b/code/game/turfs/simulated/walls_mineral.dm index 4001a200ee4..1c2605238e0 100644 --- a/code/game/turfs/simulated/walls_mineral.dm +++ b/code/game/turfs/simulated/walls_mineral.dm @@ -89,7 +89,7 @@ /turf/simulated/wall/mineral/plasma/attackby(obj/item/weapon/W as obj, mob/user as mob) if(is_hot(W) > 300)//If the temperature of the object is over 300, then ignite - message_admins("Plasma wall ignited by [key_name_admin(user)](?) ([admin_jump_link(user, "holder")]) in ([x],[y],[z] - JMP)",0,1) + message_admins("Plasma wall ignited by [key_name_admin(user)] in ([x],[y],[z] - JMP)",0,1) log_game("Plasma wall ignited by [key_name(user)] in ([x],[y],[z])") ignite(is_hot(W)) return diff --git a/code/modules/admin/admin_investigate.dm b/code/modules/admin/admin_investigate.dm index 214686f0b2c..56cf1a1a837 100644 --- a/code/modules/admin/admin_investigate.dm +++ b/code/modules/admin/admin_investigate.dm @@ -26,7 +26,7 @@ F << "[time_stamp()] \ref[src] ([x],[y],[z]) || [src] [message]
" //ADMINVERBS -/client/proc/investigate_show( subject in list("hrefs","pda","singulo","gold core","cult") ) +/client/proc/investigate_show( subject in list("hrefs","pda","singulo","atmos","gold core","cult") ) set name = "Investigate" set category = "Admin" if(!holder) return @@ -57,6 +57,13 @@ src << browse(F,"window=investigate[subject];size=800x300") if("cult") + var/F = investigate_subject2file(subject) + if(!F) + src << "Error: admin_investigate: [INVESTIGATE_DIR][subject] is an invalid path or cannot be accessed." + return + src << browse(F,"window=investigate[subject];size=800x300") + + if("atmos") var/F = investigate_subject2file(subject) if(!F) src << "Error: admin_investigate: [INVESTIGATE_DIR][subject] is an invalid path or cannot be accessed." diff --git a/code/modules/admin/verbs/adminhelp.dm b/code/modules/admin/verbs/adminhelp.dm index 6b5fc5952ff..1d7196c0d97 100644 --- a/code/modules/admin/verbs/adminhelp.dm +++ b/code/modules/admin/verbs/adminhelp.dm @@ -87,7 +87,7 @@ var/list/adminhelp_ignored_words = list("unknown","the","a","an","of","monkey"," mobs_found += found if(!ai_found && isAI(found)) ai_found = 1 - msg += "[original_word] (?) ([admin_jump_link(found, "holder")]) " + msg += "[original_word] " continue msg += "[original_word] " diff --git a/code/modules/assembly/timer.dm b/code/modules/assembly/timer.dm index 24e9a33a170..ebb151bb6cd 100644 --- a/code/modules/assembly/timer.dm +++ b/code/modules/assembly/timer.dm @@ -111,7 +111,7 @@ if(href_list["time"]) timing = !timing if(timing && istype(holder, /obj/item/device/transfer_valve)) - var/timer_message = "[key_name_admin(usr)](?) ([admin_jump_link(usr, "holder")]) activated [src] attachment on [holder]." + var/timer_message = "[key_name_admin(usr)] activated [src] attachment on [holder]." message_admins(timer_message) bombers += timer_message log_game("[key_name(usr)] activated [src] attachment for [loc]") diff --git a/code/modules/mining/mine_turfs.dm b/code/modules/mining/mine_turfs.dm index 88bd7029803..96f23aaea0f 100644 --- a/code/modules/mining/mine_turfs.dm +++ b/code/modules/mining/mine_turfs.dm @@ -287,7 +287,7 @@ var/global/list/rockTurfEdgeCache if(z != 5) notify_admins = 1 if(!triggered_by_explosion) - message_admins("[key_name_admin(user)]? ([admin_jump_link(user, "holder")]) has triggered a gibtonite deposit reaction at [A.name] (JMP).") + message_admins("[key_name_admin(user)] has triggered a gibtonite deposit reaction at [A.name] (JMP).") else message_admins("An explosion has triggered a gibtonite deposit reaction at [A.name] (JMP).") diff --git a/code/modules/mining/ore.dm b/code/modules/mining/ore.dm index 0ad8d89cfe9..2815d1c5da7 100644 --- a/code/modules/mining/ore.dm +++ b/code/modules/mining/ore.dm @@ -174,9 +174,9 @@ if(triggered_by == 1) message_admins("An explosion has triggered a [name] to detonate at [A.name] (JMP).") else if(triggered_by == 2) - message_admins("A signal has triggered a [name] to detonate at [A.name] (JMP). Igniter attacher: [key_name_admin(attacher)]? ([admin_jump_link(attacher, "holder")])") + message_admins("A signal has triggered a [name] to detonate at [A.name] (JMP). Igniter attacher: [key_name_admin(attacher)]") else - message_admins("[key_name_admin(user)]? ([admin_jump_link(user, "holder")]) has triggered a [name] to detonate at [A.name] (JMP).") + message_admins("[key_name_admin(user)] has triggered a [name] to detonate at [A.name] (JMP).") if(triggered_by == 1) log_game("An explosion has primed a [name] for detonation at [A.name]([bombturf.x],[bombturf.y],[bombturf.z])") else if(triggered_by == 2) diff --git a/code/modules/mob/dead/observer/observer.dm b/code/modules/mob/dead/observer/observer.dm index eba5d9ce5a7..0406f46cc22 100644 --- a/code/modules/mob/dead/observer/observer.dm +++ b/code/modules/mob/dead/observer/observer.dm @@ -599,13 +599,4 @@ This is the proc mobs get to turn into a ghost. Forked from ghostize due to comp client.images |= ghost_darkness_images if (ghostimage) client.images -= ghostimage //remove ourself - -//this is called when a ghost is drag clicked to something. -/mob/dead/observer/MouseDrop(atom/over) - if(!usr || !over) return - if (isobserver(usr) && usr.client.holder && isliving(over)) - if (usr.client.holder.cmd_ghost_drag(src,over)) - return - - return ..() - \ No newline at end of file + \ No newline at end of file diff --git a/code/modules/mob/living/carbon/carbon.dm b/code/modules/mob/living/carbon/carbon.dm index 1ec1dc2608e..b0b7d85e97e 100644 --- a/code/modules/mob/living/carbon/carbon.dm +++ b/code/modules/mob/living/carbon/carbon.dm @@ -454,7 +454,7 @@ var/list/ventcrawl_machinery = list(/obj/machinery/atmospherics/unary/vent_pump, M.attack_log += text("\[[time_stamp()]\] Has been thrown by [key_name(usr)] from [start_T_descriptor] with the target [end_T_descriptor]") usr.attack_log += text("\[[time_stamp()]\] Has thrown [key_name(M)] from [start_T_descriptor] with the target [end_T_descriptor]") - msg_admin_attack("[key_name_admin(usr)](?) ([admin_jump_link(usr, "holder")]) has thrown [key_name_admin(M)] from [start_T_descriptor] with the target [end_T_descriptor]") + msg_admin_attack("[key_name_admin(usr)] has thrown [key_name_admin(M)] from [start_T_descriptor] with the target [end_T_descriptor]") if(!iscarbon(usr)) M.LAssailant = null diff --git a/code/modules/mob/living/carbon/human/human_defense.dm b/code/modules/mob/living/carbon/human/human_defense.dm index 96f0b4fd04d..1304dfd77ed 100644 --- a/code/modules/mob/living/carbon/human/human_defense.dm +++ b/code/modules/mob/living/carbon/human/human_defense.dm @@ -241,7 +241,7 @@ emp_act if(!src.meatleft) src.attack_log += "\[[time_stamp()]\] Was chopped up into meat by [key_name(user)]" user.attack_log += "\[[time_stamp()]\] Chopped up [key_name(src)] into meat" - msg_admin_attack("[key_name_admin(user)](?) ([admin_jump_link(user, "holder")]) chopped up [key_name_admin(src)] into meat") + msg_admin_attack("[key_name_admin(user)] chopped up [key_name_admin(src)] into meat") if(!iscarbon(user)) LAssailant = null else @@ -398,7 +398,7 @@ emp_act src.attack_log += text("\[[time_stamp()]\] Has been hit with a [O], thrown by [key_name(M)]") M.attack_log += text("\[[time_stamp()]\] Hit [key_name(src)] with a thrown [O]") if(!istype(src,/mob/living/simple_animal/mouse)) - msg_admin_attack("[key_name_admin(src)](?) ([admin_jump_link(src, "holder")]) was hit by a [O], thrown by [key_name_admin(M)]") + msg_admin_attack("[key_name_admin(src)] was hit by a [O], thrown by [key_name_admin(M)]") //thrown weapon embedded object code. if(dtype == BRUTE && istype(O,/obj/item)) @@ -496,7 +496,12 @@ emp_act M.occupant_message("You hit [src].") visible_message("[src] has been hit by [M.name].", \ "[src] has been hit by [M.name].") - add_logs(M.occupant, src, "attacked", object=M, addition="(INTENT: [uppertext(M.occupant.a_intent)]) (DAMTYPE: [uppertext(M.damtype)])") + + attack_log += text("\[[time_stamp()]\] Has been attacked by \the [M] controlled by [key_name(M.occupant)]") + M.occupant.attack_log += text("\[[time_stamp()]\] Attacked [src] with \the [M]") + if(M.ckey) + msg_admin_attack("[key_name_admin(M.occupant)] attacked [key_name_admin(src)] with \the [M]") + else ..() diff --git a/code/modules/mob/living/living_defense.dm b/code/modules/mob/living/living_defense.dm index 55578172f3f..353c350fd36 100644 --- a/code/modules/mob/living/living_defense.dm +++ b/code/modules/mob/living/living_defense.dm @@ -119,7 +119,7 @@ src.attack_log += text("\[[time_stamp()]\] Has been hit with a [O], thrown by [key_name(M)]") M.attack_log += text("\[[time_stamp()]\] Hit [key_name(src)] with a thrown [O]") if(!istype(src,/mob/living/simple_animal/mouse)) - msg_admin_attack("[key_name_admin(src)](?) ([admin_jump_link(src, "holder")]) was hit by a [O], thrown by [key_name_admin(M)]") + msg_admin_attack("[key_name_admin(src)] was hit by a [O], thrown by [key_name_admin(M)]") // Begin BS12 momentum-transfer code. if(O.throw_source && speed >= 15) diff --git a/code/modules/mob/living/simple_animal/borer.dm b/code/modules/mob/living/simple_animal/borer.dm index 2e2a969b98c..0397fee8924 100644 --- a/code/modules/mob/living/simple_animal/borer.dm +++ b/code/modules/mob/living/simple_animal/borer.dm @@ -197,7 +197,7 @@ host << "\red You feel a strange shifting sensation behind your eyes as an alien consciousness displaces yours." var/borer_key = src.key host.attack_log += text("\[[time_stamp()]\] [key_name(src)] has assumed control of [key_name(host)]") - msg_admin_attack("[key_name_admin(src)](?) ([admin_jump_link(src, "holder")]) has assumed control of [key_name_admin(host)]") + msg_admin_attack("[key_name_admin(src)] has assumed control of [key_name_admin(host)]") // host -> brain var/h2b_id = host.computer_id var/h2b_ip= host.lastKnownIP diff --git a/code/modules/organs/organ.dm b/code/modules/organs/organ.dm index ed7b6adfb9a..d2ccb0a698c 100644 --- a/code/modules/organs/organ.dm +++ b/code/modules/organs/organ.dm @@ -238,7 +238,7 @@ var/list/organ_cache = list() if(user) user.attack_log += "\[[time_stamp()]\] removed a vital organ ([src]) from [key_name(owner)] (INTENT: [uppertext(user.a_intent)])" owner.attack_log += "\[[time_stamp()]\] had a vital organ ([src]) removed by [key_name(user)] (INTENT: [uppertext(user.a_intent)])" - msg_admin_attack("[key_name_admin(user)](?) ([admin_jump_link(user, "holder")]) removed a vital organ ([src]) from [key_name_admin(owner)]") + msg_admin_attack("[key_name_admin(user)] removed a vital organ ([src]) from [key_name_admin(owner)]") owner.death() owner = null diff --git a/code/modules/power/singularity/emitter.dm b/code/modules/power/singularity/emitter.dm index 4a3217f0dab..8f228eb30f4 100644 --- a/code/modules/power/singularity/emitter.dm +++ b/code/modules/power/singularity/emitter.dm @@ -107,7 +107,7 @@ if(src.active==1) src.active = 0 user << "You turn off the [src]." - message_admins("Emitter turned off by [key_name_admin(user)](?) ([admin_jump_link(user, "holder")]) in ([x],[y],[z] - JMP)",0,1) + message_admins("Emitter turned off by [key_name_admin(user)] in ([x],[y],[z] - JMP)",0,1) log_game("Emitter turned off by [key_name(user)] in ([x],[y],[z])") investigate_log("turned off by [key_name(usr)]","singulo") else @@ -115,7 +115,7 @@ user << "You turn on the [src]." src.shot_number = 0 src.fire_delay = 100 - message_admins("Emitter turned on by [key_name_admin(user)](?) ([admin_jump_link(user, "holder")]) in ([x],[y],[z] - JMP)",0,1) + message_admins("Emitter turned on by [key_name_admin(user)] in ([x],[y],[z] - JMP)",0,1) log_game("Emitter turned on by [key_name(user)] in ([x],[y],[z])") investigate_log("turned on by [key_name(usr)]","singulo") update_icon() diff --git a/code/modules/power/singularity/particle_accelerator/particle_control.dm b/code/modules/power/singularity/particle_accelerator/particle_control.dm index e1ce3a75a4a..490af2d6fb9 100644 --- a/code/modules/power/singularity/particle_accelerator/particle_control.dm +++ b/code/modules/power/singularity/particle_accelerator/particle_control.dm @@ -122,7 +122,7 @@ if(strength > strength_upper_limit) strength = strength_upper_limit else - message_admins("PA Control Computer increased to [strength] by [key_name_admin(usr)](?) ([admin_jump_link(usr, "holder")]) in ([x],[y],[z] - JMP)",0,1) + message_admins("PA Control Computer increased to [strength] by [key_name_admin(usr)] in ([x],[y],[z] - JMP)",0,1) log_game("PA Control Computer increased to [strength] by [key_name(usr)] in ([x],[y],[z])") investigate_log("increased to [strength] by [key_name(usr)]","singulo") use_log += text("\[[time_stamp()]\] [usr.name] ([key_name(usr)]) has increased the PA Control Computer to [strength].") @@ -136,7 +136,7 @@ if(strength < 0) strength = 0 else - message_admins("PA Control Computer decreased to [strength] by [key_name_admin(usr)](?) ([admin_jump_link(usr, "holder")]) in ([x],[y],[z] - JMP)",0,1) + message_admins("PA Control Computer decreased to [strength] by [key_name_admin(usr)] in ([x],[y],[z] - JMP)",0,1) log_game("PA Control Computer decreased to [strength] by [key_name(usr)] in ([x],[y],[z])") investigate_log("decreased to [strength] by [key_name(usr)]","singulo") use_log += text("\[[time_stamp()]\] [usr.name] ([key_name(usr)]) has decreased the PA Control Computer to [strength].") diff --git a/code/modules/power/supermatter/supermatter.dm b/code/modules/power/supermatter/supermatter.dm index 32f7d023e92..12dd496303d 100644 --- a/code/modules/power/supermatter/supermatter.dm +++ b/code/modules/power/supermatter/supermatter.dm @@ -313,7 +313,7 @@ var/mob/living/user = AM user.dust() power += 200 - message_admins("[src] has consumed [key_name_admin(user)]? ([admin_jump_link(user, "holder")]) (JMP).") + message_admins("[src] has consumed [key_name_admin(user)] (JMP).") investigate_log("has consumed [key_name(user)].", "supermatter") else if(isobj(AM) && !istype(AM, /obj/effect)) investigate_log("has consumed [AM].", "supermatter") diff --git a/code/modules/projectiles/projectile.dm b/code/modules/projectiles/projectile.dm index 23dac03dc56..d4204d7535e 100644 --- a/code/modules/projectiles/projectile.dm +++ b/code/modules/projectiles/projectile.dm @@ -140,7 +140,7 @@ M.attack_log += "\[[time_stamp()]\] [key_name(firer)] shot [M]/[M.ckey] with a [src.type][reagent_note]" firer.attack_log += "\[[time_stamp()]\] [key_name(firer)] shot [M]/[M.ckey] with a [src.type][reagent_note]" if(M.ckey && chatlog_attacks) - msg_admin_attack("[key_name_admin(firer)](?) ([admin_jump_link(firer, "holder")]) shot [key_name_admin(M)] with a [src][reagent_note]") //BS12 EDIT ALG + msg_admin_attack("[key_name_admin(firer)] shot [key_name_admin(M)] with a [src][reagent_note]") //BS12 EDIT ALG if(!iscarbon(firer)) M.LAssailant = null else diff --git a/code/modules/reagents/dartgun.dm b/code/modules/reagents/dartgun.dm index 3842293f143..585e468c70e 100644 --- a/code/modules/reagents/dartgun.dm +++ b/code/modules/reagents/dartgun.dm @@ -180,7 +180,7 @@ M.attack_log += "\[[time_stamp()]\] [user]/[user.ckey] shot [M]/[M.ckey] with a dartgun ([R])" user.attack_log += "\[[time_stamp()]\] [user]/[user.ckey] shot [M]/[M.ckey] with a dartgun ([R])" if(M.ckey) - msg_admin_attack("[key_name_admin(user)](?) ([admin_jump_link(user, "holder")]) shot [M] ([M.ckey]) with a dartgun ([R]).") + msg_admin_attack("[key_name_admin(user)] shot [M] ([M.ckey]) with a dartgun ([R]).") if(!iscarbon(user)) M.LAssailant = null else diff --git a/code/modules/reagents/reagent_containers/dropper.dm b/code/modules/reagents/reagent_containers/dropper.dm index b07864544e8..0097cf45907 100644 --- a/code/modules/reagents/reagent_containers/dropper.dm +++ b/code/modules/reagents/reagent_containers/dropper.dm @@ -73,7 +73,7 @@ M.attack_log += text("\[[time_stamp()]\] Has been squirted with [src.name] by [key_name(user)]. Reagents: [contained]") user.attack_log += text("\[[time_stamp()]\] Used the [src.name] to squirt [key_name(M)]. Reagents: [contained]") if(M.ckey) - msg_admin_attack("[key_name_admin(user)](?) ([admin_jump_link(user, "holder")]) squirted [key_name(M)] with [src.name]. Reagents: [contained] (INTENT: [uppertext(user.a_intent)])") + msg_admin_attack("[key_name_admin(user)] squirted [key_name_admin(M)] with [src.name]. Reagents: [contained] (INTENT: [uppertext(user.a_intent)])") if(!iscarbon(user)) M.LAssailant = null else @@ -88,7 +88,7 @@ badshit += reagents_to_log[bad_reagent] if(badshit.len) var/hl="\red ([english_list(badshit)]) \black" - message_admins("[key_name_admin(user)](?) ([admin_jump_link(user, "holder")]) added [reagents.get_reagent_ids(1)] to \a [target] with [src].[hl]") + message_admins("[key_name_admin(user)] added [reagents.get_reagent_ids(1)] to \a [target] with [src].[hl]") log_game("[key_name(user)] added [reagents.get_reagent_ids(1)] to \a [target] with [src].") trans = src.reagents.trans_to(target, amount_per_transfer_from_this) diff --git a/code/modules/reagents/reagent_containers/drugs.dm b/code/modules/reagents/reagent_containers/drugs.dm index 31bcc1012de..312cbf297a2 100644 --- a/code/modules/reagents/reagent_containers/drugs.dm +++ b/code/modules/reagents/reagent_containers/drugs.dm @@ -67,7 +67,7 @@ badshit += reagents_to_log[bad_reagent] if(badshit.len) var/hl="\red ([english_list(badshit)]) \black" - message_admins("[key_name_admin(user)](?) ([admin_jump_link(user, "holder")]) added [reagents.get_reagent_ids(1)] to \a [target] with [src].[hl]") + message_admins("[key_name_admin(user)] added [reagents.get_reagent_ids(1)] to \a [target] with [src].[hl]") log_game("[key_name(user)] added [reagents.get_reagent_ids(1)] to \a [target] with [src].") var/trans = src.reagents.trans_to(target, amount_per_transfer_from_this) diff --git a/code/modules/reagents/reagent_containers/food/condiment.dm b/code/modules/reagents/reagent_containers/food/condiment.dm index ffe920bbf69..309f928288b 100644 --- a/code/modules/reagents/reagent_containers/food/condiment.dm +++ b/code/modules/reagents/reagent_containers/food/condiment.dm @@ -51,7 +51,7 @@ M.attack_log += text("\[[time_stamp()]\] Has been fed [src.name] by [key_name(user)] Reagents: [reagentlist(src)]") user.attack_log += text("\[[time_stamp()]\] Fed [src.name] by [key_name(M)] Reagents: [reagentlist(src)]") if(M.ckey) - msg_admin_attack("[key_name_admin(user)](?) ([admin_jump_link(user, "holder")]) fed [key_name_admin(M)] with [src.name] (INTENT: [uppertext(user.a_intent)])") + msg_admin_attack("[key_name_admin(user)] fed [key_name_admin(M)] with [src.name] (INTENT: [uppertext(user.a_intent)])") if(!iscarbon(user)) M.LAssailant = null else diff --git a/code/modules/reagents/reagent_containers/food/drinks.dm b/code/modules/reagents/reagent_containers/food/drinks.dm index f289f891a67..7396f307955 100644 --- a/code/modules/reagents/reagent_containers/food/drinks.dm +++ b/code/modules/reagents/reagent_containers/food/drinks.dm @@ -57,7 +57,7 @@ M.attack_log += text("\[[time_stamp()]\] Has been fed [src.name] by [key_name(user)] Reagents: [reagentlist(src)]") user.attack_log += text("\[[time_stamp()]\] Fed [M.name] by [key_name(M)] Reagents: [reagentlist(src)]") - log_attack("[key_name_admin(user)](?) ([admin_jump_link(user, "holder")]) fed [key_name_admin(M)] with [src.name] Reagents: [reagentlist(src)] (INTENT: [uppertext(user.a_intent)])") + log_attack("[key_name_admin(user)] fed [key_name_admin(M)] with [src.name] Reagents: [reagentlist(src)] (INTENT: [uppertext(user.a_intent)])") if(!iscarbon(user)) M.LAssailant = null else diff --git a/code/modules/reagents/reagent_containers/food/drinks/bottle.dm b/code/modules/reagents/reagent_containers/food/drinks/bottle.dm index 5d5791c2329..205837633de 100644 --- a/code/modules/reagents/reagent_containers/food/drinks/bottle.dm +++ b/code/modules/reagents/reagent_containers/food/drinks/bottle.dm @@ -100,7 +100,7 @@ user.attack_log += text("\[[time_stamp()]\] Has attacked [key_name(target)] with a bottle!") target.attack_log += text("\[[time_stamp()]\] Has been smashed with a bottle by [key_name(user)]") if(target.ckey) - msg_admin_attack("[key_name_admin(user)](?) ([admin_jump_link(user, "holder")]) attacked [key_name_admin(target)] with a bottle. (INTENT: [uppertext(user.a_intent)])") + msg_admin_attack("[key_name_admin(user)] attacked [key_name_admin(target)] with a bottle. (INTENT: [uppertext(user.a_intent)])") if(!iscarbon(user)) target.LAssailant = null else diff --git a/code/modules/reagents/reagent_containers/glass_containers.dm b/code/modules/reagents/reagent_containers/glass_containers.dm index 1ac3027d8c7..608fbc405be 100644 --- a/code/modules/reagents/reagent_containers/glass_containers.dm +++ b/code/modules/reagents/reagent_containers/glass_containers.dm @@ -88,7 +88,7 @@ M.attack_log += text("\[[time_stamp()]\] Has been splashed with [src.name] by [key_name(user)]. Reagents: [contained]") user.attack_log += text("\[[time_stamp()]\] Used the [src.name] to splash [key_name(M)]. Reagents: [contained]") if(M.ckey) - msg_admin_attack("[key_name_admin(user)](?) ([admin_jump_link(user, "holder")]) splashed [key_name_admin(M)] with [src.name]. Reagents: [contained] (INTENT: [uppertext(user.a_intent)])") + msg_admin_attack("[key_name_admin(user)] splashed [key_name_admin(M)] with [src.name]. Reagents: [contained] (INTENT: [uppertext(user.a_intent)])") if(!iscarbon(user)) M.LAssailant = null else @@ -129,7 +129,7 @@ badshit += reagents_to_log[bad_reagent] if(badshit.len) var/hl="\red ([english_list(badshit)]) \black" - message_admins("[key_name_admin(user)](?) ([admin_jump_link(user, "holder")]) added [reagents.get_reagent_ids(1)] to \a [target] with [src].[hl]") + message_admins("[key_name_admin(user)] added [reagents.get_reagent_ids(1)] to \a [target] with [src].[hl]") log_game("[key_name(user)] added [reagents.get_reagent_ids(1)] to \a [target] with [src].") var/trans = src.reagents.trans_to(target, amount_per_transfer_from_this) diff --git a/code/modules/reagents/reagent_containers/hypospray.dm b/code/modules/reagents/reagent_containers/hypospray.dm index e96582b9ac0..72d4c18297c 100644 --- a/code/modules/reagents/reagent_containers/hypospray.dm +++ b/code/modules/reagents/reagent_containers/hypospray.dm @@ -36,7 +36,7 @@ M.attack_log += text("\[[time_stamp()]\] Has been injected with [src.name] by [key_name(user)]. Reagents: [contained]") user.attack_log += text("\[[time_stamp()]\] Used the [src.name] to inject [key_name(M)]. Reagents: [contained]") if(M.ckey) - msg_admin_attack("[key_name_admin(user)](?) ([admin_jump_link(user, "holder")]) injected [key_name_admin(M)] with [src.name]. Reagents: [contained] (INTENT: [uppertext(user.a_intent)])") + msg_admin_attack("[key_name_admin(user)] injected [key_name_admin(M)] with [src.name]. Reagents: [contained] (INTENT: [uppertext(user.a_intent)])") if(!iscarbon(user)) M.LAssailant = null else diff --git a/code/modules/reagents/reagent_containers/pill.dm b/code/modules/reagents/reagent_containers/pill.dm index a7b2c82757c..0e706d5ebe5 100644 --- a/code/modules/reagents/reagent_containers/pill.dm +++ b/code/modules/reagents/reagent_containers/pill.dm @@ -55,9 +55,9 @@ O.show_message("[user] forces [M] to [apply_method] [src].", 1) M.attack_log += text("\[[time_stamp()]\] Has been fed [src.name] by [key_name(user)] Reagents: [reagentlist(src)]") - user.attack_log += text("\[[time_stamp()]\] Fed [M.name] by [key_name(M)]) Reagents: [reagentlist(src)]") + user.attack_log += text("\[[time_stamp()]\] Fed [src.name] to [key_name(M)]) Reagents: [reagentlist(src)]") if(M.ckey) - msg_admin_attack("[key_name_admin(user)](?) ([admin_jump_link(user, "holder")]) fed [key_name(M)] with [src.name] Reagents: [reagentlist(src)] (INTENT: [uppertext(user.a_intent)])") + msg_admin_attack("[key_name_admin(user)] fed [key_name_admin(M)] with [src.name] Reagents: [reagentlist(src)] (INTENT: [uppertext(user.a_intent)])") if(!iscarbon(user)) M.LAssailant = null else diff --git a/code/modules/reagents/reagent_containers/robodropper.dm b/code/modules/reagents/reagent_containers/robodropper.dm index cacc020244b..c5da1639304 100644 --- a/code/modules/reagents/reagent_containers/robodropper.dm +++ b/code/modules/reagents/reagent_containers/robodropper.dm @@ -33,7 +33,7 @@ badshit += reagents_to_log[bad_reagent] if(badshit.len) var/hl="\red ([english_list(badshit)]) \black" - message_admins("[key_name_admin(user)](?) ([admin_jump_link(user, "holder")]) added [reagents.get_reagent_ids(1)] to \a [target] with [src].[hl]") + message_admins("[key_name_admin(user)] added [reagents.get_reagent_ids(1)] to \a [target] with [src].[hl]") log_game("[key_name(user)] added [reagents.get_reagent_ids(1)] to \a [target] with [src].") else if(ismob(target)) @@ -81,7 +81,7 @@ M.attack_log += text("\[[time_stamp()]\] Has been squirted with [src.name] by [key_name(user)]. Reagents: [contained]") user.attack_log += text("\[[time_stamp()]\] Used the [src.name] to squirt [key_name(M)]. Reagents: [contained]") if(M.ckey) - msg_admin_attack("[key_name_admin(user)](?) ([admin_jump_link(user, "holder")]) squirted [M.name] ([M.key]) with [src.name]. Reagents: [contained] (INTENT: [uppertext(user.a_intent)])") + msg_admin_attack("[key_name_admin(user)] squirted [key_name_admin(M)] with [src.name]. Reagents: [contained] (INTENT: [uppertext(user.a_intent)])") if(!iscarbon(user)) M.LAssailant = null else diff --git a/code/modules/reagents/reagent_containers/spray.dm b/code/modules/reagents/reagent_containers/spray.dm index cae6f76b1db..252f7ed0208 100644 --- a/code/modules/reagents/reagent_containers/spray.dm +++ b/code/modules/reagents/reagent_containers/spray.dm @@ -48,13 +48,13 @@ user.changeNext_move(CLICK_CD_RANGE*2) if(reagents.has_reagent("sacid")) - message_admins("[key_name_admin(user)](?) ([admin_jump_link(user, "holder")]) fired sulphuric acid from \a [src].") - log_game("[key_name(user)](?) ([admin_jump_link(user, "holder")]) fired sulphuric acid from \a [src].") + message_admins("[key_name_admin(user)] fired sulphuric acid from \a [src].") + log_game("[key_name(user)] fired sulphuric acid from \a [src].") if(reagents.has_reagent("facid")) - message_admins("[key_name_admin(user)](?) ([admin_jump_link(user, "holder")]) fired fluorosulfuric acid from \a [src].") + message_admins("[key_name_admin(user)] fired fluorosulfuric acid from \a [src].") log_game("[key_name(user)] fired Fluorosulfuric Acid from \a [src].") if(reagents.has_reagent("lube")) - message_admins("[key_name_admin(user)](?) ([admin_jump_link(user, "holder")]) fired space lube from \a [src].") + message_admins("[key_name_admin(user)] fired space lube from \a [src].") log_game("[key_name(user)] fired Space lube from \a [src].") return diff --git a/code/modules/reagents/reagent_containers/syringes.dm b/code/modules/reagents/reagent_containers/syringes.dm index 3a4f7ff13ab..8211ff7f8d7 100644 --- a/code/modules/reagents/reagent_containers/syringes.dm +++ b/code/modules/reagents/reagent_containers/syringes.dm @@ -196,7 +196,7 @@ M.attack_log += text("\[[time_stamp()]\] Has been injected with [src.name] by [key_name(user)]. Reagents: [contained]") user.attack_log += text("\[[time_stamp()]\] Used the [src.name] to inject [key_name(M)]. Reagents: [contained]") if(M.ckey) - msg_admin_attack("[key_name_admin(user)](?) ([admin_jump_link(user, "holder")]) injected [key_name_admin(M)] with [src.name]. Reagents: [contained] (INTENT: [uppertext(user.a_intent)])") + msg_admin_attack("[key_name_admin(user)] injected [key_name_admin(M)] with [src.name]. Reagents: [contained] (INTENT: [uppertext(user.a_intent)])") if(!iscarbon(user)) M.LAssailant = null else @@ -215,7 +215,7 @@ badshit += reagents_to_log[bad_reagent] if(badshit.len) var/hl="\red ([english_list(badshit)]) \black" - message_admins("[key_name_admin(user)](?) ([admin_jump_link(user, "holder")]) added [reagents.get_reagent_ids(1)] to \a [target] with [src].[hl] ") + message_admins("[key_name_admin(user)] added [reagents.get_reagent_ids(1)] to \a [target] with [src].[hl] ") log_game("[key_name(user)] added [reagents.get_reagent_ids(1)] to \a [target] with [src].") spawn(5) @@ -281,7 +281,7 @@ user.attack_log += "\[[time_stamp()]\] Attacked [target.name] ([target.ckey]) with [src.name] (INTENT: [uppertext(user.a_intent)])" target.attack_log += "\[[time_stamp()]\] Attacked by [user.name] ([user.ckey]) with [src.name] (INTENT: [uppertext(user.a_intent)])" if(target.ckey) - msg_admin_attack("[key_name_admin(user)](?) ([admin_jump_link(user, "holder")]) attacked [key_name_admin(target)] with [src.name] (INTENT: [uppertext(user.a_intent)])") + msg_admin_attack("[key_name_admin(user)] attacked [key_name_admin(target)] with [src.name] (INTENT: [uppertext(user.a_intent)])") if(!iscarbon(user)) target.LAssailant = null else diff --git a/code/modules/recycling/disposal.dm b/code/modules/recycling/disposal.dm index 3b99bb95f6f..84855355677 100644 --- a/code/modules/recycling/disposal.dm +++ b/code/modules/recycling/disposal.dm @@ -127,7 +127,7 @@ usr.attack_log += text("\[[time_stamp()]\] Has placed [key_name(GM)] in disposals.") GM.attack_log += text("\[[time_stamp()]\] Has been placed in disposals by [key_name(user)]") if(GM.ckey) - msg_admin_attack("[key_name_admin(user)](?) ([admin_jump_link(user, "holder")]) placed [key_name_admin(GM)] in a disposals unit. (JMP)") + msg_admin_attack("[key_name_admin(user)] placed [key_name_admin(GM)] in a disposals unit. (JMP)") return if(!I) return diff --git a/code/modules/surgery/braincore.dm b/code/modules/surgery/braincore.dm index 23e2d982740..3a12e06abbe 100644 --- a/code/modules/surgery/braincore.dm +++ b/code/modules/surgery/braincore.dm @@ -94,7 +94,7 @@ user.attack_log += "\[[time_stamp()]\] Debrained [key_name(target)] with [tool.name] (INTENT: [uppertext(user.a_intent)])" target.attack_log += "\[[time_stamp()]\] Debrained by [key_name(user)] with [tool.name] (INTENT: [uppertext(user.a_intent)])" - msg_admin_attack("[key_name_admin(user)](?) ([admin_jump_link(user, "holder")]) debrained [key_name_admin(target)] with [tool.name]") + msg_admin_attack("[key_name_admin(user)] debrained [key_name_admin(target)] with [tool.name]") var/obj/item/organ/brain/B = target.internal_organs_by_name["brain"] if(B && istype(B)) diff --git a/code/modules/vehicle/train/train.dm b/code/modules/vehicle/train/train.dm index e2316738c48..aaf88bdbd18 100644 --- a/code/modules/vehicle/train/train.dm +++ b/code/modules/vehicle/train/train.dm @@ -55,7 +55,7 @@ if(istype(load, /mob/living/carbon/human)) var/mob/living/D = load D << "\red You hit [M]!" - msg_admin_attack("[key_name_admin(D)](?) ([admin_jump_link(D, "holder")]) hit [key_name_admin(M)] with [src].") + msg_admin_attack("[key_name_admin(D)] hit [key_name_admin(M)] with [src].") //------------------------------------------- diff --git a/code/modules/vehicle/train/trains/ambulance.dm b/code/modules/vehicle/train/trains/ambulance.dm index 175ebf905b5..36baeecd86a 100644 --- a/code/modules/vehicle/train/trains/ambulance.dm +++ b/code/modules/vehicle/train/trains/ambulance.dm @@ -163,7 +163,7 @@ D << "\red \b You ran over [H]!" visible_message("\red \The [src] ran over [H]!") attack_log += text("\[[time_stamp()]\] ran over [key_name(H)], driven by [key_name(D)]") - msg_admin_attack("[key_name_admin(D)](?) ([admin_jump_link(D, "holder")]) ran over [key_name_admin(H)]") + msg_admin_attack("[key_name_admin(D)] ran over [key_name_admin(H)]") else attack_log += text("\[[time_stamp()]\] ran over [key_name(H)]") diff --git a/code/modules/vehicle/train/trains/janicart.dm b/code/modules/vehicle/train/trains/janicart.dm index 6fc08ef71b3..0894d1b9e44 100644 --- a/code/modules/vehicle/train/trains/janicart.dm +++ b/code/modules/vehicle/train/trains/janicart.dm @@ -213,7 +213,7 @@ D << "\red \b You ran over [H]!" visible_message("\red \The [src] ran over [H]!") attack_log += text("\[[time_stamp()]\] ran over [key_name(H)], driven by [key_name(D)]") - msg_admin_attack("[key_name_admin(D)](?) ([admin_jump_link(D, "holder")]) ran over [key_name_admin(H)]") + msg_admin_attack("[key_name_admin(D)] ran over [key_name_admin(H)]") else attack_log += text("\[[time_stamp()]\] ran over [key_name(H)]") diff --git a/config/example/dbconfig.txt b/config/example/dbconfig.txt index a5a547679e1..01d38fd1c56 100644 --- a/config/example/dbconfig.txt +++ b/config/example/dbconfig.txt @@ -20,7 +20,8 @@ PASSWORD mypassword FEEDBACK_DATABASE paradise FEEDBACK_LOGIN mylogin FEEDBACK_PASSWORD mypassword -FEEDBACK_TABLEPREFIX myprefix +# Table prefix - make sure you properly prefix the tables currently marked as erro_ in the .sql file as this is not fully implemented +FEEDBACK_TABLEPREFIX erro # Track population and death statistics # Comment this out to disable From 6a5ceb10b1e5286272e85180355c10932e24355d Mon Sep 17 00:00:00 2001 From: Markolie Date: Mon, 17 Aug 2015 00:15:19 +0200 Subject: [PATCH 03/10] Fix compile error --- code/modules/mob/living/carbon/human/human_defense.dm | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/code/modules/mob/living/carbon/human/human_defense.dm b/code/modules/mob/living/carbon/human/human_defense.dm index 1304dfd77ed..53afa864754 100644 --- a/code/modules/mob/living/carbon/human/human_defense.dm +++ b/code/modules/mob/living/carbon/human/human_defense.dm @@ -499,7 +499,7 @@ emp_act attack_log += text("\[[time_stamp()]\] Has been attacked by \the [M] controlled by [key_name(M.occupant)]") M.occupant.attack_log += text("\[[time_stamp()]\] Attacked [src] with \the [M]") - if(M.ckey) + if(ckey) msg_admin_attack("[key_name_admin(M.occupant)] attacked [key_name_admin(src)] with \the [M]") From 8af3c8c47a16f3343737797d0850da3c625dfe19 Mon Sep 17 00:00:00 2001 From: Markolie Date: Mon, 17 Aug 2015 00:32:50 +0200 Subject: [PATCH 04/10] Final fixes/mech attack update --- code/__HELPERS/unsorted.dm | 2 +- code/game/objects/structures/tables_racks.dm | 12 +++++++++--- .../modules/mob/living/carbon/human/human_defense.dm | 8 +++----- code/modules/mob/living/living_defense.dm | 7 +++++-- 4 files changed, 18 insertions(+), 11 deletions(-) diff --git a/code/__HELPERS/unsorted.dm b/code/__HELPERS/unsorted.dm index 764ffbe9450..bb246f61379 100644 --- a/code/__HELPERS/unsorted.dm +++ b/code/__HELPERS/unsorted.dm @@ -653,7 +653,7 @@ Turf and target are seperate in case you want to teleport some distance from a t return . /proc/key_name_admin(var/whom, var/include_name = 1) - var/message = "[key_name(whom, 1, include_name)](?) [isAntag(whom) ? "(ANTAG)" : ""] ([admin_jump_link(whom, "holder")])" + var/message = "[key_name(whom, 1, include_name)](?)[isAntag(whom) ? " (ANTAG)" : ""] ([admin_jump_link(whom, "holder")])" return message /proc/get_mob_by_ckey(key) diff --git a/code/game/objects/structures/tables_racks.dm b/code/game/objects/structures/tables_racks.dm index 06e878f5d2f..a0255e1344f 100644 --- a/code/game/objects/structures/tables_racks.dm +++ b/code/game/objects/structures/tables_racks.dm @@ -299,6 +299,10 @@ user.do_attack_animation(src) visible_message("[user] slices [src] apart!") destroy() + +/obj/structure/table/mech_melee_attack(obj/mecha/M) + visible_message("[M] smashes [src] apart!") + destroy() /obj/structure/table/attack_animal(mob/living/simple_animal/user) if(user.environment_smash) @@ -905,13 +909,15 @@ W.Move(loc) return -/obj/structure/table/attack_hand(mob/user) +/obj/structure/rack/attack_hand(mob/user) if(HULK in user.mutations) visible_message("[user] smashes [src] apart!") user.say(pick(";RAAAAAAAARGH!", ";HNNNNNNNNNGGGGGGH!", ";GWAAAAAAAARRRHHH!", "NNNNNNNNGGGGGGGGHH!", ";AAAAAAARRRGH!" )) destroy() - - + +/obj/structure/rack/mech_melee_attack(obj/mecha/M) + visible_message("[M] smashes [src] apart!") + destroy() /obj/structure/rack/attack_alien(mob/living/user) user.do_attack_animation(src) diff --git a/code/modules/mob/living/carbon/human/human_defense.dm b/code/modules/mob/living/carbon/human/human_defense.dm index 53afa864754..21b554bde94 100644 --- a/code/modules/mob/living/carbon/human/human_defense.dm +++ b/code/modules/mob/living/carbon/human/human_defense.dm @@ -497,12 +497,10 @@ emp_act visible_message("[src] has been hit by [M.name].", \ "[src] has been hit by [M.name].") - attack_log += text("\[[time_stamp()]\] Has been attacked by \the [M] controlled by [key_name(M.occupant)]") - M.occupant.attack_log += text("\[[time_stamp()]\] Attacked [src] with \the [M]") - if(ckey) - msg_admin_attack("[key_name_admin(M.occupant)] attacked [key_name_admin(src)] with \the [M]") + attack_log += text("\[[time_stamp()]\] Has been attacked by \the [M] controlled by [key_name(M.occupant)] (INTENT: [uppertext(M.occupant.a_intent)])") + M.occupant.attack_log += text("\[[time_stamp()]\] Attacked [src] with \the [M] (INTENT: [uppertext(M.occupant.a_intent)])") + msg_admin_attack("[key_name_admin(M.occupant)] attacked [key_name_admin(src)] with \the [M] (INTENT: [uppertext(M.occupant.a_intent)])") - else ..() diff --git a/code/modules/mob/living/living_defense.dm b/code/modules/mob/living/living_defense.dm index 353c350fd36..d1017431eb8 100644 --- a/code/modules/mob/living/living_defense.dm +++ b/code/modules/mob/living/living_defense.dm @@ -165,13 +165,16 @@ M.occupant_message("You hit [src].") visible_message("[src] has been hit by [M.name].", \ "[src] has been hit by [M.name].") - add_logs(M.occupant, src, "attacked", object=M, addition="(INTENT: [uppertext(M.occupant.a_intent)]) (DAMTYPE: [uppertext(M.damtype)])") + attack_log += text("\[[time_stamp()]\] Has been attacked by \the [M] controlled by [key_name(M.occupant)] (INTENT: [uppertext(M.occupant.a_intent)])") + M.occupant.attack_log += text("\[[time_stamp()]\] Attacked [src] with \the [M] (INTENT: [uppertext(M.occupant.a_intent)])") + msg_admin_attack("[key_name_admin(M.occupant)] attacked [key_name_admin(src)] with \the [M] (INTENT: [uppertext(M.occupant.a_intent)])") + else + step_away(src,M) add_logs(M.occupant, src, "pushed", object=M, admin=0) M.occupant_message("You push [src] out of the way.") visible_message("[M] pushes [src] out of the way.") - return //Mobs on Fire From 381c3f0c925c3b0de47336315d41f62133bfdd3a Mon Sep 17 00:00:00 2001 From: Markolie Date: Mon, 17 Aug 2015 01:01:30 +0200 Subject: [PATCH 05/10] Consistent bomb logging --- code/game/machinery/syndicatebeacon.dm | 2 +- code/game/machinery/syndicatebomb.dm | 4 ++-- code/game/objects/items/devices/transfer_valve.dm | 15 ++++----------- .../items/weapons/grenades/chem_grenade.dm | 7 +++---- .../objects/items/weapons/grenades/ghettobomb.dm | 4 ++-- .../objects/items/weapons/grenades/grenade.dm | 6 +++--- code/modules/assembly/timer.dm | 5 ++--- 7 files changed, 17 insertions(+), 26 deletions(-) diff --git a/code/game/machinery/syndicatebeacon.dm b/code/game/machinery/syndicatebeacon.dm index 915def6bdda..11ec8837c87 100644 --- a/code/game/machinery/syndicatebeacon.dm +++ b/code/game/machinery/syndicatebeacon.dm @@ -87,7 +87,7 @@ M << "You have joined the ranks of the Syndicate and become a traitor to the station!" - message_admins("[N]/([N.ckey]) has accepted a traitor objective from a syndicate beacon.") + message_admins("[key_name_admin(N)] has accepted a traitor objective from a syndicate beacon.") var/obj_count = 1 for(var/datum/objective/OBJ in M.mind.objectives) diff --git a/code/game/machinery/syndicatebomb.dm b/code/game/machinery/syndicatebomb.dm index 398759d80b6..04a5d3e45dd 100644 --- a/code/game/machinery/syndicatebomb.dm +++ b/code/game/machinery/syndicatebomb.dm @@ -312,8 +312,8 @@ var/area/A = get_area(T) detonated-- message_admins("[key_name_admin(user)] has remotely detonated [detonated ? "syndicate bombs" : "a syndicate bomb"] using a [name] at [A.name] (JMP).") - bombers += "[key_name(user)] has remotely detonated [detonated ? "syndicate bombs" : "a syndicate bomb"] using a [name] at [A.name]([T.x],[T.y],[T.z])" - log_game("[key_name(user)] has remotely detonated [detonated ? "syndicate bombs" : "a syndicate bomb"] using a [name] at [A.name]([T.x],[T.y],[T.z])") + bombers += "[key_name(user)] has remotely detonated [detonated ? "syndicate bombs" : "a syndicate bomb"] using a [name] at [A.name] ([T.x],[T.y],[T.z])" + log_game("[key_name(user)] has remotely detonated [detonated ? "syndicate bombs" : "a syndicate bomb"] using a [name] at [A.name] ([T.x],[T.y],[T.z])") detonated = 0 existant = 0 cooldown = 1 diff --git a/code/game/objects/items/devices/transfer_valve.dm b/code/game/objects/items/devices/transfer_valve.dm index 4736ce9d745..26b2849c698 100644 --- a/code/game/objects/items/devices/transfer_valve.dm +++ b/code/game/objects/items/devices/transfer_valve.dm @@ -181,21 +181,14 @@ else attacher_name = "[key_name_admin(attacher)]" - var/log_str = "Bomb valve opened in [A.name] " - log_str += "with [attached_device ? attached_device : "no device"] attacher: [attacher_name]" - if(attacher) log_str += "" var/mob/mob = get_mob_by_key(src.fingerprintslast) - var/last_touch_info = "" - if(mob) - last_touch_info = "" - - log_str += " Last touched by: [key_name_admin(mob)][last_touch_info]" - bombers += log_str - msg_admin_attack(log_str, 0, 1) - log_game(log_str) + + bombers += "Bomb valve opened at [A.name] ([bombturf.x],[bombturf.y],[bombturf.z]) with [attached_device ? attached_device : "no device"], attached by [attacher_name]. Last touched by: [key_name(mob)]" + message_admins("Bomb valve opened at [A.name] (JMP) with [attached_device ? attached_device : "no device"], attached by [attacher_name]. Last touched by: [key_name_admin(mob)]") + log_game("Bomb valve opened at [A.name] ([bombturf.x],[bombturf.y],[bombturf.z]) with [attached_device ? attached_device : "no device"], attached by [attacher_name]. Last touched by: [key_name(mob)]") merge_gases() spawn(20) // In case one tank bursts for (var/i=0,i<5,i++) diff --git a/code/game/objects/items/weapons/grenades/chem_grenade.dm b/code/game/objects/items/weapons/grenades/chem_grenade.dm index a3fdc63db4c..c5705d31069 100644 --- a/code/game/objects/items/weapons/grenades/chem_grenade.dm +++ b/code/game/objects/items/weapons/grenades/chem_grenade.dm @@ -90,10 +90,9 @@ update_icon() else if(clown_check(user)) // This used to go before the assembly check, but that has absolutely zero to do with priming the damn thing. You could spam the admins with it. - var/log_str = "[key_name_admin(usr)] has primed a [name] for detonation at [A.name] (JMP)." - msg_admin_attack(log_str) - log_game(log_str) - bombers += "[log_str]" + message_admins("[key_name_admin(usr)] has primed a [name] for detonation at [A.name] (JMP)") + log_game("[key_name(usr)] has primed a [name] for detonation at [A.name] ([bombturf.x],[bombturf.y],[bombturf.z])") + bombers += "[key_name(usr)] has primed a [name] for detonation at [A.name] ([bombturf.x],[bombturf.y],[bombturf.z])" user << "You prime the [name]! [det_time / 10] second\s!" active = 1 update_icon() diff --git a/code/game/objects/items/weapons/grenades/ghettobomb.dm b/code/game/objects/items/weapons/grenades/ghettobomb.dm index 25235ee9e7b..d7d3dfb88e2 100644 --- a/code/game/objects/items/weapons/grenades/ghettobomb.dm +++ b/code/game/objects/items/weapons/grenades/ghettobomb.dm @@ -112,8 +112,8 @@ var/turf/bombturf = get_turf(src) var/area/A = get_area(bombturf) - message_admins("[key_name_admin(usr)] has primed a [name] for detonation at [A.name] (JMP).") - log_game("[key_name(usr)] has primed a [name] for detonation at [A.name] ([bombturf.x],[bombturf.y],[bombturf.z]).") + message_admins("[key_name_admin(usr)] has primed a [name] for detonation at [A.name] (JMP)") + log_game("[key_name(usr)] has primed a [name] for detonation at [A.name] ([bombturf.x],[bombturf.y],[bombturf.z])") if(iscarbon(user)) var/mob/living/carbon/C = user C.throw_mode_on() diff --git a/code/game/objects/items/weapons/grenades/grenade.dm b/code/game/objects/items/weapons/grenades/grenade.dm index ff92ee0b29c..a2b5dccd963 100644 --- a/code/game/objects/items/weapons/grenades/grenade.dm +++ b/code/game/objects/items/weapons/grenades/grenade.dm @@ -63,9 +63,9 @@ add_fingerprint(user) var/turf/bombturf = get_turf(src) var/area/A = get_area(bombturf) - message_admins("[key_name_admin(usr)] has primed a [name] for detonation at [A.name] (JMP).") - log_game("[key_name(usr)] has primed a [name] for detonation at [A.name] ([bombturf.x],[bombturf.y],[bombturf.z]).") - bombers += "[key_name(usr)] has primed a [name] for detonation at [A.name] ([bombturf.x],[bombturf.y],[bombturf.z])." + message_admins("[key_name_admin(usr)] has primed a [name] for detonation at [A.name] (JMP)") + log_game("[key_name(usr)] has primed a [name] for detonation at [A.name] ([bombturf.x],[bombturf.y],[bombturf.z])") + bombers += "[key_name(usr)] has primed a [name] for detonation at [A.name] ([bombturf.x],[bombturf.y],[bombturf.z])" if(iscarbon(user)) var/mob/living/carbon/C = user C.throw_mode_on() diff --git a/code/modules/assembly/timer.dm b/code/modules/assembly/timer.dm index ebb151bb6cd..8e17227c0a2 100644 --- a/code/modules/assembly/timer.dm +++ b/code/modules/assembly/timer.dm @@ -111,9 +111,8 @@ if(href_list["time"]) timing = !timing if(timing && istype(holder, /obj/item/device/transfer_valve)) - var/timer_message = "[key_name_admin(usr)] activated [src] attachment on [holder]." - message_admins(timer_message) - bombers += timer_message + message_admins("[key_name_admin(usr)] activated [src] attachment on [holder].") + bombers += "[key_name(usr)] activated [src] attachment for [loc]" log_game("[key_name(usr)] activated [src] attachment for [loc]") update_icon() if(href_list["reset"]) From 6018e851288338442adb217c94574578992aee87 Mon Sep 17 00:00:00 2001 From: Markolie Date: Mon, 17 Aug 2015 01:03:34 +0200 Subject: [PATCH 06/10] Fix compile error --- code/game/objects/items/devices/transfer_valve.dm | 3 --- 1 file changed, 3 deletions(-) diff --git a/code/game/objects/items/devices/transfer_valve.dm b/code/game/objects/items/devices/transfer_valve.dm index 26b2849c698..a533efe0a58 100644 --- a/code/game/objects/items/devices/transfer_valve.dm +++ b/code/game/objects/items/devices/transfer_valve.dm @@ -181,9 +181,6 @@ else attacher_name = "[key_name_admin(attacher)]" - if(attacher) - log_str += "" - var/mob/mob = get_mob_by_key(src.fingerprintslast) bombers += "Bomb valve opened at [A.name] ([bombturf.x],[bombturf.y],[bombturf.z]) with [attached_device ? attached_device : "no device"], attached by [attacher_name]. Last touched by: [key_name(mob)]" From 52fbcb9e896fa6b9c270530d696d43a0d3dd8e23 Mon Sep 17 00:00:00 2001 From: Markolie Date: Mon, 17 Aug 2015 02:23:34 +0200 Subject: [PATCH 07/10] Minor consistency changes --- code/datums/datumvars.dm | 2 +- code/game/gamemodes/nuclear/nuclearbomb.dm | 4 ++-- code/modules/admin/admin.dm | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/code/datums/datumvars.dm b/code/datums/datumvars.dm index e0672681da8..9d5207e5493 100644 --- a/code/datums/datumvars.dm +++ b/code/datums/datumvars.dm @@ -270,7 +270,7 @@ client body += "" body += "" body += "" - body += "" + body += "" body += "" body += "" if(isobj(D)) diff --git a/code/game/gamemodes/nuclear/nuclearbomb.dm b/code/game/gamemodes/nuclear/nuclearbomb.dm index e9752e1e65b..5f6f25b7096 100644 --- a/code/game/gamemodes/nuclear/nuclearbomb.dm +++ b/code/game/gamemodes/nuclear/nuclearbomb.dm @@ -479,8 +479,8 @@ obj/machinery/nuclearbomb/proc/nukehack_win(mob/user as mob) var/obj/item/weapon/disk/nuclear/NEWDISK = new(pick(blobstart)) transfer_fingerprints_to(NEWDISK) var/turf/diskturf = get_turf(src) - message_admins("[src] has been destroyed in ([diskturf.x], [diskturf.y] ,[diskturf.z] - JMP). Moving it to ([NEWDISK.x], [NEWDISK.y], [NEWDISK.z] - JMP).") - log_game("[src] has been destroyed in ([diskturf.x], [diskturf.y] ,[diskturf.z]). Moving it to ([NEWDISK.x], [NEWDISK.y], [NEWDISK.z]).") + message_admins("[src] has been destroyed at ([diskturf.x], [diskturf.y], [diskturf.z] - JMP). Moving it to ([NEWDISK.x], [NEWDISK.y], [NEWDISK.z] - JMP).") + log_game("[src] has been destroyed in ([diskturf.x], [diskturf.y], [diskturf.z]). Moving it to ([NEWDISK.x], [NEWDISK.y], [NEWDISK.z]).") return QDEL_HINT_HARDDEL_NOW else error("[src] was supposed to be destroyed, but we were unable to locate a blobstart landmark to spawn a new one.") diff --git a/code/modules/admin/admin.dm b/code/modules/admin/admin.dm index c1e261bba66..060518108a1 100644 --- a/code/modules/admin/admin.dm +++ b/code/modules/admin/admin.dm @@ -122,7 +122,7 @@ var/global/nologevent = 0 Make Mask | Make Robot | Make Alien | - Make slime + Make Slime | Make Superhero "} From 190187192666c5a1ee5b496fa91f9a6914884559 Mon Sep 17 00:00:00 2001 From: Markolie Date: Mon, 17 Aug 2015 16:22:52 +0200 Subject: [PATCH 08/10] Overlooked key_name_admin --- code/game/gamemodes/revolution/revolution.dm | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/code/game/gamemodes/revolution/revolution.dm b/code/game/gamemodes/revolution/revolution.dm index 63b36a11e35..099a8e61bad 100644 --- a/code/game/gamemodes/revolution/revolution.dm +++ b/code/game/gamemodes/revolution/revolution.dm @@ -250,7 +250,7 @@ if(beingborged) rev_mind.current << "\red The frame's firmware detects and deletes your neural reprogramming! You remember nothing from the moment you were flashed until now." - message_admins("[key_name_admin(rev_mind.current)] ? (FLW) has been borged while being a member of the revolution.") + message_admins("[key_name_admin(rev_mind.current)] has been borged while being a member of the revolution.") else rev_mind.current << "\red You have been brainwashed! You are no longer a revolutionary! Your memory is hazy from the time you were a rebel...the only thing you remember is the name of the one who brainwashed you..." From dc99702b9d130388be43fc393821d4965cfd57c7 Mon Sep 17 00:00:00 2001 From: Markolie Date: Mon, 17 Aug 2015 16:54:11 +0200 Subject: [PATCH 09/10] Logging improvements --- code/__HELPERS/unsorted.dm | 3 +-- code/game/machinery/telecomms/telecomunications.dm | 3 +-- code/modules/admin/admin_investigate.dm | 9 ++++++++- 3 files changed, 10 insertions(+), 5 deletions(-) diff --git a/code/__HELPERS/unsorted.dm b/code/__HELPERS/unsorted.dm index bb246f61379..682d76d513b 100644 --- a/code/__HELPERS/unsorted.dm +++ b/code/__HELPERS/unsorted.dm @@ -659,8 +659,7 @@ Turf and target are seperate in case you want to teleport some distance from a t /proc/get_mob_by_ckey(key) if(!key) return - var/list/mobs = sortmobs() - for(var/mob/M in mobs) + for(var/mob/M in mobs_list) if(M.ckey == key) return M diff --git a/code/game/machinery/telecomms/telecomunications.dm b/code/game/machinery/telecomms/telecomunications.dm index 9856f482b0b..f3b84e75f89 100644 --- a/code/game/machinery/telecomms/telecomunications.dm +++ b/code/game/machinery/telecomms/telecomunications.dm @@ -629,13 +629,12 @@ var/global/list/obj/machinery/telecomms/telecomms_list = list() update_logs() /obj/machinery/telecomms/server/proc/admin_log(var/mob/mob) - var/msg="[key_name(mob)] has compiled a script to server [src]:" diary << msg diary << rawcode src.investigate_log("[msg]
[rawcode]", "ntsl") if(length(rawcode)) // Let's not bother the admins for empty code. - message_admins("[key_name_admin(mob)] has compiled and uploaded a NTSL script to [src.id]",0,1) + message_admins("[key_name_admin(mob)] has compiled and uploaded a NTSL script to [src.id] (JMP)") // Simple log entry datum diff --git a/code/modules/admin/admin_investigate.dm b/code/modules/admin/admin_investigate.dm index 56cf1a1a837..aea9f51f715 100644 --- a/code/modules/admin/admin_investigate.dm +++ b/code/modules/admin/admin_investigate.dm @@ -26,7 +26,7 @@ F << "[time_stamp()] \ref[src] ([x],[y],[z]) || [src] [message]
" //ADMINVERBS -/client/proc/investigate_show( subject in list("hrefs","pda","singulo","atmos","gold core","cult") ) +/client/proc/investigate_show( subject in list("hrefs","pda","singulo","atmos","ntsl","gold core","cult") ) set name = "Investigate" set category = "Admin" if(!holder) return @@ -64,6 +64,13 @@ src << browse(F,"window=investigate[subject];size=800x300") if("atmos") + var/F = investigate_subject2file(subject) + if(!F) + src << "Error: admin_investigate: [INVESTIGATE_DIR][subject] is an invalid path or cannot be accessed." + return + src << browse(F,"window=investigate[subject];size=800x300") + + if("ntsl") var/F = investigate_subject2file(subject) if(!F) src << "Error: admin_investigate: [INVESTIGATE_DIR][subject] is an invalid path or cannot be accessed." From 23237582a9bc5f7945ee83e2d34ee9abc24a75f6 Mon Sep 17 00:00:00 2001 From: Markolie Date: Mon, 17 Aug 2015 17:30:40 +0200 Subject: [PATCH 10/10] Fix typo --- code/__HELPERS/unsorted.dm | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/code/__HELPERS/unsorted.dm b/code/__HELPERS/unsorted.dm index 682d76d513b..3612c4d8c4d 100644 --- a/code/__HELPERS/unsorted.dm +++ b/code/__HELPERS/unsorted.dm @@ -659,7 +659,7 @@ Turf and target are seperate in case you want to teleport some distance from a t /proc/get_mob_by_ckey(key) if(!key) return - for(var/mob/M in mobs_list) + for(var/mob/M in mob_list) if(M.ckey == key) return M