From d77431cdddaa2cb628628261aef97201cfe4f4c1 Mon Sep 17 00:00:00 2001 From: skull132 Date: Sun, 31 May 2015 15:53:28 +0300 Subject: [PATCH] Adminhelp Dibs! Adds a dibs feature for claiming adminhelps. * admin.dm modified with a new get_options_bar state * admin\topic.dm modified with the new href * adminhelp.dm modified to include a new adminhelped var state, and to toss around the information available When an issue is adminhelped, the links displayed are "?", "DIBS", "PP" and "JMP". Following that, an issue can be claimed by clicking DIBS, at which point both admins and mods are informed of who and what. After DIBS is called, the tending staff member gets additional options for the target mob and the player gets a response, saying that their issue will be handled by so and so. Beyond that, every works as normal. If DIBS is bypassed with a regular PM to the target, it'll revert adminhelped to 0, and still give the massive red block of, "Click the admin's name to reply, please!" so that feature is still intact. --- code/modules/admin/admin.dm | 2 ++ code/modules/admin/topic.dm | 17 +++++++++++++++++ code/modules/admin/verbs/adminhelp.dm | 10 ++++++++-- 3 files changed, 27 insertions(+), 2 deletions(-) diff --git a/code/modules/admin/admin.dm b/code/modules/admin/admin.dm index c13ba057..498c0647 100644 --- a/code/modules/admin/admin.dm +++ b/code/modules/admin/admin.dm @@ -1290,6 +1290,8 @@ var/global/floorIsLava = 0 if(2) var/ref_mob = "\ref[M]" return "[key_name(C, link, name)](?) (PP) (VV) (SM) (JMP) (CA)" + if(3) + return "[key_name(C, link, name)](?) (DIBS) (PP) (JMP)" diff --git a/code/modules/admin/topic.dm b/code/modules/admin/topic.dm index 2cbb0efd..1156cc24 100644 --- a/code/modules/admin/topic.dm +++ b/code/modules/admin/topic.dm @@ -2819,4 +2819,21 @@ var/playerckey = href_list["warnsearchckey"] warning_panel(adminckey, playerckey) + return + + else if(href_list["admindibs"]) + if(!check_rights(R_ADMIN|R_MOD)) return + var/mob/M = locate(href_list["admindibs"]) + + if(M.client.adminhelped == 2) + log_admin("[key_name(usr)] called dibs on [key_name(M)]'s adminhelp!") + message_admins("[key_name_admin(usr)] has called dibs on [key_name_admin(M)]'s adminhelp!") + message_mods("[key_name_admin(usr)] has called dibs on [key_name_admin(M)]'s adminhelp!") + usr << "You have taken over [key_name_admin(M)]'s adminhelp." + usr << "[get_options_bar(M, 2, 1, 1)]" + + M << "Your adminhelp will be tended to [usr.client.holder.fakekey ? "shortly" : "by [key_name(usr, 0, 0)]"]. Please allow the staff member a minute or two to type up a response." + M.client.adminhelped = 1 + else + usr << "The adminhelp has already been claimed." return \ No newline at end of file diff --git a/code/modules/admin/verbs/adminhelp.dm b/code/modules/admin/verbs/adminhelp.dm index a35c8aa1..41ff2003 100644 --- a/code/modules/admin/verbs/adminhelp.dm +++ b/code/modules/admin/verbs/adminhelp.dm @@ -18,7 +18,13 @@ var/list/adminhelp_ignored_words = list("unknown","the","a","an","of","monkey"," if(src.handle_spam_prevention(msg,MUTE_ADMINHELP)) return - adminhelped = 1 //Determines if they get the message to reply by clicking the name. + adminhelped = 2 //Determines if they get the message to reply by clicking the name. + + /*A wee bit of an update here: we're using the following table for adminhelped values: + 2 - Adminhelp has not been claimed by anyone. + 1 - Adminhelp has been claimed, initial message has not been sent. + 0 - Adminhelp has been claimed, initial message has been sent. + */ /**src.verbs -= /client/verb/adminhelp @@ -91,7 +97,7 @@ var/list/adminhelp_ignored_words = list("unknown","the","a","an","of","monkey"," if(!mob) return //this doesn't happen var/ref_mob = "\ref[mob]" - msg = "\blue HELP: [get_options_bar(mob, 2, 1, 1)][ai_found ? " (CL)" : ""]: [msg]" + msg = "\blue HELP: [get_options_bar(mob, 3, 1, 1)][ai_found ? " (CL)" : ""]: [msg]" //send this msg to all admins var/admin_number_present = 0