From 9e40851998ddc523b434cf2b4ca341e63657748b Mon Sep 17 00:00:00 2001 From: Amunak Date: Fri, 28 Nov 2014 12:02:04 +0100 Subject: [PATCH] Moved formatting of admin and mod say channels to stylesheet + added chattags This actually removes some stuff from asay and msay. The only place where admins and mods(/mentors/whatever) are distinct now is msay, and only in name: admins have their nick colored like their OOC chat (though this can be changed in stylesheet.dm). Also added the feedback thingy proc call and did some code cleanup. --- code/modules/admin/verbs/adminsay.dm | 23 +++++++---------------- code/stylesheet.dm | 4 ++++ 2 files changed, 11 insertions(+), 16 deletions(-) diff --git a/code/modules/admin/verbs/adminsay.dm b/code/modules/admin/verbs/adminsay.dm index 83254f6e0d0..acb194e792f 100644 --- a/code/modules/admin/verbs/adminsay.dm +++ b/code/modules/admin/verbs/adminsay.dm @@ -9,15 +9,10 @@ log_admin("[key_name(src)] : [msg]") - var/color = "adminsay" - if(ishost(usr)) - color = "headminsay" - if(check_rights(R_ADMIN,0)) - msg = "ADMIN: [key_name(usr, 1)] (JMP): [msg]" for(var/client/C in admins) if(R_ADMIN & C.holder.rights) - C << msg + C << "" + create_text_tag("admin", "ADMIN:", C) + " [key_name(usr, 1)](JMP): [msg]" feedback_add_details("admin_verb","M") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc! @@ -33,15 +28,11 @@ if (!msg) return - var/color = "mod" - if (check_rights(R_ADMIN,0)) - color = "adminmod" - var/channel = "MOD:" - if(config.mods_are_mentors) - channel = "MENTOR:" + var/sender_name = src.key + if(check_rights(R_ADMIN, 0)) + sender_name = "[sender_name]" for(var/client/C in admins) - if((R_ADMIN|R_MOD) & C.holder.rights) - C << "[channel] [key_name(src,1)] (JMP): [msg]" - else // Mentors get same message without fancy coloring of name if special_role. - C << "[channel] [key_name(src,1,1,0)] (JMP): [msg]" + C << "" + create_text_tag("mod", "MOD:", C) + " [sender_name](JMP): [msg]" + + feedback_add_details("admin_verb","MS") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc! diff --git a/code/stylesheet.dm b/code/stylesheet.dm index 89343ce89ff..8c196c88e92 100644 --- a/code/stylesheet.dm +++ b/code/stylesheet.dm @@ -25,6 +25,10 @@ em {font-style: normal; font-weight: bold;} .ooc .developer {color: #719300;} .ooc .admin {color: #e40045;} +/* Admin: Channels */ +.mod_channel {color: #735638; font-weight: bold;} +.mod_channel .admin {color: #e40045; font-weight: bold;} +.admin_channel {color: #9611D4; font-weight: bold;} /* Radio: Misc */ .deadsay {color: #530FAD;}