mirror of
https://github.com/vgstation-coders/vgstation13.git
synced 2025-12-10 18:32:03 +00:00
- 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:
@@ -40,9 +40,6 @@
|
|||||||
src << "<font color='red'>Error: Admin-PM: You are unable to use admin PM-s (muted by admins).</font>"
|
src << "<font color='red'>Error: Admin-PM: You are unable to use admin PM-s (muted by admins).</font>"
|
||||||
return
|
return
|
||||||
|
|
||||||
if (src.handle_spam_prevention(msg,MUTE_ADMINHELP))
|
|
||||||
return
|
|
||||||
|
|
||||||
if( !C || !istype(C,/client) )
|
if( !C || !istype(C,/client) )
|
||||||
if(holder) src << "<font color='red'>Error: Admin-PM: Client not found.</font>"
|
if(holder) src << "<font color='red'>Error: Admin-PM: Client not found.</font>"
|
||||||
else adminhelp(msg) //admin we are replying to left. adminhelp instead
|
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
|
//get message text, limit it's length.and clean/escape html
|
||||||
if(!msg)
|
if(!msg)
|
||||||
msg = input(src,"Message:", "Private message to [C.key]") as text|null
|
msg = input(src,"Message:", "Private message to [C.key]") as text|null
|
||||||
|
|
||||||
if(!msg) return
|
if(!msg) return
|
||||||
if(!C)
|
if(!C)
|
||||||
if(holder) src << "<font color='red'>Error: Admin-PM: Client not found.</font>"
|
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
|
else adminhelp(msg) //admin we are replying to has vanished, adminhelp instead
|
||||||
return
|
return
|
||||||
|
|
||||||
|
if (src.handle_spam_prevention(msg,MUTE_ADMINHELP))
|
||||||
|
return
|
||||||
|
|
||||||
//clean the message if it's not sent by a GA or GM
|
//clean the message if it's not sent by a GA or GM
|
||||||
if( !holder || !(holder.rank in list("Game Admin", "Game Master")) )
|
if( !holder || !(holder.rank in list("Game Admin", "Game Master")) )
|
||||||
msg = sanitize(copytext(msg,1,MAX_MESSAGE_LEN))
|
msg = sanitize(copytext(msg,1,MAX_MESSAGE_LEN))
|
||||||
|
|||||||
Reference in New Issue
Block a user