Files
vgstation13/code/modules/admin/verbs/adminsay.dm
baloh.matevz@gmail.com 9a94312431 - Added spam-prevention code. If someone sends the same message 5 times in a row, they will get the message "You are nearing the spam filter limit for identical messages." If they continue to send the same message (if they send it 10 times in total) they will get an auto-mute for the channel they are sending it through. The number of identical messages which triggers a warning and automute can be configured in setup.dm
- Added channel-specific admin muting. Admins can now mute someone from IC (say, me and whisper), OOC, PRAY, ADMINHELP (adminhelp, admin pm and asay) and DEADCHAT (say while dead and dsay)
- Added a (?) to adminhelps and prayers which displays the same quick overview that all the other (?)-s show, but for the person adminhelping or praying.

git-svn-id: http://tgstation13.googlecode.com/svn/trunk@3888 316c924e-a436-60f5-8080-3fe189b3f50e
2012-06-22 05:54:43 +00:00

32 lines
1.2 KiB
Plaintext

/client/proc/cmd_admin_say(msg as text)
set category = "Special Verbs"
set name = "Asay" //Gave this shit a shorter name so you only have to time out "asay" rather than "admin say" to use it --NeoFite
set hidden = 1
if (!src.holder)
src << "Only administrators may use this command."
return
if (src.muted_adminhelp)
src << "You cannot send ASAY messages (muted by admins)."
return
if (src.handle_spam_prevention(msg,MUTE_ADMINHELP))
return
msg = copytext(sanitize(msg), 1, MAX_MESSAGE_LEN)
log_admin("[key_name(src)] : [msg]")
if (!msg)
return
feedback_add_details("admin_verb","M") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc!
for (var/mob/M in world)
if (M.client && M.client.holder)
if (src.holder.rank == "Admin Observer")
M << "<span class='adminobserver'><span class='prefix'>ADMIN:</span> <EM>[key_name(usr, M)]:</EM> <span class='message'>[msg]</span></span>"
else
M << "<span class='admin'><span class='prefix'>ADMIN:</span> <EM>[key_name(usr, M)]</EM> (<A HREF='?src=\ref[M.client.holder];adminplayerobservejump=\ref[mob]'>JMP</A>): <span class='message'>[msg]</span></span>"