diff --git a/code/modules/admin/verbs/adminpm.dm b/code/modules/admin/verbs/adminpm.dm index 3894a31bed2..897257de402 100644 --- a/code/modules/admin/verbs/adminpm.dm +++ b/code/modules/admin/verbs/adminpm.dm @@ -40,9 +40,6 @@ src << "Error: Admin-PM: You are unable to use admin PM-s (muted by admins)." return - if (src.handle_spam_prevention(msg,MUTE_ADMINHELP)) - return - if( !C || !istype(C,/client) ) if(holder) src << "Error: Admin-PM: Client not found." 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 << "Error: Admin-PM: Client not found." 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))