- Fixed some odd behavior with the spam filter for admin pm-s.

git-svn-id: http://tgstation13.googlecode.com/svn/trunk@3895 316c924e-a436-60f5-8080-3fe189b3f50e
This commit is contained in:
baloh.matevz
2012-06-23 16:34:23 +00:00
parent ffbed502f1
commit 90041eaba4

View File

@@ -40,9 +40,6 @@
src << "<font color='red'>Error: Admin-PM: You are unable to use admin PM-s (muted by admins).</font>"
return
if (src.handle_spam_prevention(msg,MUTE_ADMINHELP))
return
if( !C || !istype(C,/client) )
if(holder) src << "<font color='red'>Error: Admin-PM: Client not found.</font>"
else adminhelp(msg) //admin we are replying to left. adminhelp instead
@@ -51,12 +48,16 @@
//get message text, limit it's length.and clean/escape html
if(!msg)
msg = input(src,"Message:", "Private message to [C.key]") as text|null
if(!msg) return
if(!C)
if(holder) src << "<font color='red'>Error: Admin-PM: Client not found.</font>"
else adminhelp(msg) //admin we are replying to has vanished, adminhelp instead
return
if (src.handle_spam_prevention(msg,MUTE_ADMINHELP))
return
//clean the message if it's not sent by a GA or GM
if( !holder || !(holder.rank in list("Game Admin", "Game Master")) )
msg = sanitize(copytext(msg,1,MAX_MESSAGE_LEN))