#define AHELP_ADMIN 1 #define AHELP_MENTOR 2 #define AHELP_DEV 3 //This is a list of words which are ignored by the parser when comparing message contents for names. MUST BE IN LOWER CASE! var/list/adminhelp_ignored_words = list("unknown","the","a","an","of","monkey","alien","as") var/list/adminhelp_categories = list("Mentor - Gameplay/Roleplay question" = AHELP_MENTOR,\ "Admin - Rule/Gameplay issue" = AHELP_ADMIN,\ "Dev - Bug report" = AHELP_DEV) /client/proc/adminhelp_admin(message) adminhelp("Admin - Rule/Gameplay issue", message) /client/verb/adminhelp(selected_type in adminhelp_categories, msg as text) set category = "Admin" set name = "Adminhelp" if(say_disabled) //This is here to try to identify lag problems usr << "\red Speech is currently admin-disabled." return //handle muting and automuting if(prefs.muted & MUTE_ADMINHELP) src << "Error: Admin-PM: You cannot send adminhelps (Muted)." return adminhelped = 1 //Determines if they get the message to reply by clicking the name. /**src.verbs -= /client/verb/adminhelp spawn(1200) src.verbs += /client/verb/adminhelp // 2 minute cool-down for adminhelps src.verbs += /client/verb/adminhelp // 2 minute cool-down for adminhelps//Go to hell **/ if(!msg || alert("The following message will be sent to staff that administers\n the '[selected_type]' category:\n\n[msg]\n", "Admin Help", "Ok", "Cancel") == "Cancel") return var/selected_upper = uppertext(selected_type) if(src.handle_spam_prevention(msg,MUTE_ADMINHELP)) return //clean the input msg if(!msg) return msg = sanitize(copytext(msg,1,MAX_MESSAGE_LEN)) if(!msg) return var/original_msg = msg //explode the input msg into a list var/list/msglist = text2list(msg, " ") //generate keywords lookup var/list/surnames = list() var/list/forenames = list() var/list/ckeys = list() for(var/mob/M in mob_list) var/list/indexing = list(M.real_name, M.name) if(M.mind) indexing += M.mind.name for(var/string in indexing) var/list/L = text2list(string, " ") var/surname_found = 0 //surnames for(var/i=L.len, i>=1, i--) var/word = ckey(L[i]) if(word) surnames[word] = M surname_found = i break //forenames for(var/i=1, iPM to-Staff ([selected_type]): [original_msg]" var/admin_number_present = admins.len - admin_number_afk log_admin("HELP: [key_name(src)]: [original_msg] - heard by [admin_number_present] non-AFK admins.") if(admin_number_present <= 0) send2adminirc("[selected_upper] from [key_name(src)]: [html_decode(original_msg)] - !![admin_number_afk ? "All admins AFK ([admin_number_afk])" : "No admins online"]!!") else send2adminirc("[selected_upper] from [key_name(src)]: [html_decode(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 #undef AHELP_ADMIN #undef AHELP_MENTOR #undef AHELP_DEV