From 7629c5d4a361024e1002afb8512c3fa146f09c4f Mon Sep 17 00:00:00 2001 From: Limeliz Date: Sun, 1 Dec 2013 23:18:59 +0100 Subject: [PATCH] I found #1870 in more places. Replaced [key_name_admin(usr)] with [key_name(usr)] in all logging, to remove href-tags from logfiles. --- code/game/machinery/computer/arcade.dm | 2 +- code/game/machinery/computer/robot.dm | 2 +- code/modules/admin/NewBan.dm | 4 +-- code/modules/admin/admin_ranks.dm | 36 +++++++++++++------------- code/modules/admin/newbanjob.dm | 6 ++--- code/modules/admin/topic.dm | 10 +++---- 6 files changed, 30 insertions(+), 30 deletions(-) diff --git a/code/game/machinery/computer/arcade.dm b/code/game/machinery/computer/arcade.dm index 97d21c9fecf..2eff6aad2a7 100644 --- a/code/game/machinery/computer/arcade.dm +++ b/code/game/machinery/computer/arcade.dm @@ -154,7 +154,7 @@ new /obj/effect/spawner/newbomb/timer/syndicate(src.loc) new /obj/item/clothing/head/collectable/petehat(src.loc) message_admins("[key_name_admin(usr)] has outbombed Cuban Pete and been awarded a bomb.") - log_game("[key_name_admin(usr)] has outbombed Cuban Pete and been awarded a bomb.") + log_game("[key_name(usr)] has outbombed Cuban Pete and been awarded a bomb.") src.New() emagged = 0 else if(!contents.len) diff --git a/code/game/machinery/computer/robot.dm b/code/game/machinery/computer/robot.dm index a02adde4d09..1499eb08075 100644 --- a/code/game/machinery/computer/robot.dm +++ b/code/game/machinery/computer/robot.dm @@ -160,7 +160,7 @@ else message_admins("\blue [key_name_admin(usr)] detonated [R.name]!") - log_game("\blue [key_name_admin(usr)] detonated [R.name]!") + log_game("\blue [key_name(usr)] detonated [R.name]!") R.self_destruct() else usr << "\red Access Denied." diff --git a/code/modules/admin/NewBan.dm b/code/modules/admin/NewBan.dm index 5402e8b3f1f..38a4334fae7 100644 --- a/code/modules/admin/NewBan.dm +++ b/code/modules/admin/NewBan.dm @@ -134,8 +134,8 @@ var/savefile/Banlist log_admin("Ban Expired: [key]") message_admins("Ban Expired: [key]") else - ban_unban_log_save("[key_name_admin(usr)] unbanned [key]") - log_admin("[key_name_admin(usr)] unbanned [key]") + ban_unban_log_save("[key_name(usr)] unbanned [key]") + log_admin("[key_name(usr)] unbanned [key]") message_admins("[key_name_admin(usr)] unbanned: [key]") feedback_inc("ban_unban",1) usr.client.holder.DB_ban_unban( ckey(key), BANTYPE_ANY_FULLBAN) diff --git a/code/modules/admin/admin_ranks.dm b/code/modules/admin/admin_ranks.dm index e8cd48844c5..b678d99d560 100644 --- a/code/modules/admin/admin_ranks.dm +++ b/code/modules/admin/admin_ranks.dm @@ -3,7 +3,7 @@ var/list/admin_ranks = list() //list of all admin_rank datums /datum/admin_rank var/name = "NoRank" var/rights = 0 - var/list/adds + var/list/adds var/list/subs /datum/admin_rank/New(init_name, init_rights, list/init_adds, list/init_subs) @@ -74,7 +74,7 @@ var/list/admin_ranks = list() //list of all admin_rank datums next = findchar(line, "+-", prev+1, 0) R.process_keyword(copytext(line, prev, next), previous_rights) prev = next - + previous_rights = R.rights else establish_db_connection() @@ -117,7 +117,7 @@ var/list/admin_ranks = list() //list of all admin_rank datums var/list/rank_names = list() for(var/datum/admin_rank/R in admin_ranks) rank_names[R.name] = R - + if(config.admin_legacy_system) //load text from file var/list/Lines = file2list("config/admins.txt") @@ -214,7 +214,7 @@ var/list/admin_ranks = list() //list of all admin_rank datums return var/datum/admins/D = admin_datums[adm_ckey] - + switch(task) if("remove") if(alert("Are you sure you want to remove [adm_ckey]?","Message","Yes","Cancel") == "Yes") @@ -228,57 +228,57 @@ var/list/admin_ranks = list() //list of all admin_rank datums if("rank") var/datum/admin_rank/R - + var/list/rank_names = list("*New Rank*") for(R in admin_ranks) rank_names[R.name] = R - + var/new_rank = input("Please select a rank", "New rank", null, null) as null|anything in rank_names - + switch(new_rank) if(null) return if("*New Rank*") new_rank = ckeyEx(input("Please input a new rank", "New custom rank", null, null) as null|text) if(!new_rank) return - + R = rank_names[new_rank] if(!R) //rank with that name doesn't exist yet - make it if(D) R = new(new_rank, D.rank.rights, D.rank.adds, D.rank.subs) //duplicate our previous admin_rank but with a new name else R = new(new_rank) //blank new admin_rank admin_ranks += R - + if(D) //they were previously an admin D.disassociate() //existing admin needs to be disassociated D.rank = R //set the admin_rank as our rank else D = new(R,adm_ckey) //new admin - + 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 - + 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) if("permissions") if(!D) return //they're not an admin! - + var/keyword = input("Input permission keyword (one at a time):\ne.g. +BAN or -FUN or +/client/proc/someverb", "Permission toggle", null, null) as null|text if(!keyword) return - + D.disassociate() - + if(!findtext(D.rank.name, "([adm_ckey])")) //not a modified subrank, need to duplicate the admin_rank datum to prevent modifying others too D.rank = new("[D.rank.name]([adm_ckey])", D.rank.rights, D.rank.adds, D.rank.subs) //duplicate our previous admin_rank but with a new name //we don't add this clone to the admin_ranks list, as it is unique to that ckey - + D.rank.process_keyword(keyword) - + 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 - + message_admins("[key_name(usr)] added keyword [keyword] to permission of [adm_ckey]") log_admin("[key_name(usr)] added keyword [keyword] to permission of [adm_ckey]") log_admin_permission_modification(adm_ckey, D.rank.rights) - + edit_admin_permissions() \ No newline at end of file diff --git a/code/modules/admin/newbanjob.dm b/code/modules/admin/newbanjob.dm index 3ba12599ba7..289d4833f37 100644 --- a/code/modules/admin/newbanjob.dm +++ b/code/modules/admin/newbanjob.dm @@ -175,9 +175,9 @@ var/savefile/Banlistjob log_admin("Banjob Expired: [key]") message_admins("Banjob Expired: [key]") else - log_admin("[key_name_admin(usr)] unjobbanned [key] from [rank]") - message_admins("[key_name_admin(usr)] unjobbanned:[key] from [rank]") - ban_unban_log_save("[key_name_admin(usr)] unjobbanned [key] from [rank]") + log_admin("[key_name(usr)] unjobbanned [key] from [rank]") + message_admins("[key_name(usr)] unjobbanned:[key] from [rank]") + ban_unban_log_save("[key_name(usr)] unjobbanned [key] from [rank]") feedback_inc("ban_job_unban",1) feedback_add_details("ban_job_unban","- [rank]") diff --git a/code/modules/admin/topic.dm b/code/modules/admin/topic.dm index 0034cf3b2fe..7a207b8a1e9 100644 --- a/code/modules/admin/topic.dm +++ b/code/modules/admin/topic.dm @@ -1671,7 +1671,7 @@ MAX_EX_HEAVY_RANGE = 7 MAX_EX_DEVESTATION_RANGE = 3 message_admins("\red [key_name_admin(usr)] changed the bomb cap to [MAX_EX_DEVESTATION_RANGE], [MAX_EX_HEAVY_RANGE], [MAX_EX_LIGHT_RANGE]", 1) - log_admin("[key_name_admin(usr)] changed the bomb cap to [MAX_EX_DEVESTATION_RANGE], [MAX_EX_HEAVY_RANGE], [MAX_EX_LIGHT_RANGE]") + log_admin("[key_name(usr)] changed the bomb cap to [MAX_EX_DEVESTATION_RANGE], [MAX_EX_HEAVY_RANGE], [MAX_EX_LIGHT_RANGE]") if("wave") feedback_inc("admin_secrets_fun_used",1) @@ -1944,7 +1944,7 @@ for(var/name in listkicked) strkicked += "[name], " message_admins("[key_name_admin(usr)] has kicked [afkonly ? "all AFK" : "all"] clients from the lobby. [length(listkicked)] clients kicked: [strkicked ? strkicked : "--"]", 1) - log_admin("[key_name_admin(usr)] has kicked [afkonly ? "all AFK" : "all"] clients from the lobby. [length(listkicked)] clients kicked: [strkicked ? strkicked : "--"]") + log_admin("[key_name(usr)] has kicked [afkonly ? "all AFK" : "all"] clients from the lobby. [length(listkicked)] clients kicked: [strkicked ? strkicked : "--"]") else usr << "You may only use this when the game is running" if("showailaws") @@ -2070,7 +2070,7 @@ newChannel.is_admin_channel = 1 feedback_inc("newscaster_channels",1) news_network.network_channels += newChannel //Adding channel to the global network - log_admin("[key_name_admin(usr)] created command feed channel: [src.admincaster_feed_channel.channel_name]!") + log_admin("[key_name(usr)] created command feed channel: [src.admincaster_feed_channel.channel_name]!") src.admincaster_screen=5 src.access_news_network() @@ -2105,7 +2105,7 @@ for(var/obj/machinery/newscaster/NEWSCASTER in allCasters) NEWSCASTER.newsAlert(src.admincaster_feed_channel.channel_name) - log_admin("[key_name_admin(usr)] submitted a feed story to channel: [src.admincaster_feed_channel.channel_name]!") + log_admin("[key_name(usr)] submitted a feed story to channel: [src.admincaster_feed_channel.channel_name]!") src.access_news_network() else if(href_list["ac_create_channel"]) @@ -2170,7 +2170,7 @@ news_network.wanted_issue.body = src.admincaster_feed_message.body news_network.wanted_issue.backup_author = src.admincaster_feed_message.backup_author src.admincaster_screen = 19 - log_admin("[key_name_admin(usr)] issued a Station-wide Wanted Notification for [src.admincaster_feed_message.author]!") + log_admin("[key_name(usr)] issued a Station-wide Wanted Notification for [src.admincaster_feed_message.author]!") src.access_news_network() else if(href_list["ac_cancel_wanted"])