From 5f66da051a4e20b33855a47a5ca2bd7fcaaae4f4 Mon Sep 17 00:00:00 2001 From: Kyep Date: Mon, 16 Oct 2017 22:20:48 -0700 Subject: [PATCH] Also tells you if you're toggling on/off --- code/modules/admin/topic.dm | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/code/modules/admin/topic.dm b/code/modules/admin/topic.dm index f3b45e343a1..f1880dff270 100644 --- a/code/modules/admin/topic.dm +++ b/code/modules/admin/topic.dm @@ -249,10 +249,14 @@ var/new_permission = input("Select a permission to turn on/off", adm_ckey + "'s Permissions", null, null) as null|anything in permissionlist if(!new_permission) return + var oldrights = D.rights + var toggleresult = "ON" D.rights ^= permissionlist[new_permission] + if(oldrights > D.rights) + toggleresult = "OFF" - message_admins("[key_name_admin(usr)] toggled the [new_permission] permission of [adm_ckey]") - log_admin("[key_name(usr)] toggled the [new_permission] permission of [adm_ckey]") + message_admins("[key_name_admin(usr)] toggled the [new_permission] permission of [adm_ckey] to [toggleresult]") + log_admin("[key_name(usr)] toggled the [new_permission] permission of [adm_ckey] to [toggleresult]") log_admin_permission_modification(adm_ckey, permissionlist[new_permission])