From d9da2290e84dd7652397bdeb63229627fa2ec99f Mon Sep 17 00:00:00 2001 From: MrStonedOne Date: Sat, 27 Jun 2015 13:03:47 -0700 Subject: [PATCH] Cleans up adminhelp keyword searcher and changelog for #10196. --- code/modules/admin/verbs/adminhelp.dm | 7 +--- code/modules/admin/verbs/adminsay.dm | 2 +- .../MrStonedOne-adminhelp-pr10196.yml | 38 +++++++++++++++++++ 3 files changed, 41 insertions(+), 6 deletions(-) create mode 100644 html/changelogs/MrStonedOne-adminhelp-pr10196.yml diff --git a/code/modules/admin/verbs/adminhelp.dm b/code/modules/admin/verbs/adminhelp.dm index 2531a0df089..55bb6ae84c8 100644 --- a/code/modules/admin/verbs/adminhelp.dm +++ b/code/modules/admin/verbs/adminhelp.dm @@ -1,4 +1,4 @@ -/proc/keywords_lookup(var/msg, var/followlink = 1) +/proc/keywords_lookup(var/msg) //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", "i") @@ -52,10 +52,7 @@ mobs_found += found if(!ai_found && isAI(found)) ai_found = 1 - if (followlink) - msg += "[original_word](?) (FLW) " - else - msg += "[original_word](?) " + msg += "[original_word](?|F) " continue msg += "[original_word] " return msg diff --git a/code/modules/admin/verbs/adminsay.dm b/code/modules/admin/verbs/adminsay.dm index d764f4c02fd..ff1e0cf97a3 100644 --- a/code/modules/admin/verbs/adminsay.dm +++ b/code/modules/admin/verbs/adminsay.dm @@ -8,7 +8,7 @@ if(!msg) return log_admin("[key_name(src)] : [msg]") - msg = keywords_lookup(msg,0) + msg = keywords_lookup(msg) if(check_rights(R_ADMIN,0)) msg = "ADMIN: [key_name(usr, 1)] (FLW): [msg]" admins << msg diff --git a/html/changelogs/MrStonedOne-adminhelp-pr10196.yml b/html/changelogs/MrStonedOne-adminhelp-pr10196.yml new file mode 100644 index 00000000000..a418c843fbe --- /dev/null +++ b/html/changelogs/MrStonedOne-adminhelp-pr10196.yml @@ -0,0 +1,38 @@ +################################ +# Example Changelog File +# +# Note: This file, and files beginning with ".", and files that don't end in ".yml" will not be read. If you change this file, you will look really dumb. +# +# Your changelog will be merged with a master changelog. (New stuff added only, and only on the date entry for the day it was merged.) +# When it is, any changes listed below will disappear. +# +# Valid Prefixes: +# bugfix +# wip (For works in progress) +# tweak +# soundadd +# sounddel +# rscadd (general adding of nice things) +# rscdel (general deleting of nice things) +# imageadd +# imagedel +# spellcheck (typo fixes) +# experiment +# tgs (TG-ported fixes?) +################################# + +# Your name. +author: MrStonedOne + +# Optional: Remove this file after generating master changelog. Useful for PR changelogs that won't get used again. +delete-after: True + +# Any changes you've made. See valid prefix list above. +# INDENT WITH TWO SPACES. NOT TABS. SPACES. +# SCREW THIS UP AND IT WON'T WORK. +# Also, this gets changed to [] after reading. Just remove the brackets when you add new shit. +# Please surround your changes in double quotes ("). It works without them, but if you use certain characters it screws up compiling. The quotes will not show up in the changelog. +changes: + - tweak: "Admins will now receive a notification when one of them starts to reply to an adminhelp to cut down on multiple responses to adminhelps and let admins know when an adminhelp isn't getting replied to." + - rscadd: "The keyword finder in admin helps (adds a (?) link next to player names in the text of adminhelps) has been added for all player to admin pms, as well as admin say." +