mirror of
https://github.com/Aurorastation/Aurora-Old.git
synced 2026-07-14 09:12:27 +01:00
@@ -7,6 +7,8 @@
|
||||
|
||||
var/last_message = "" //Contains the last message sent by this client - used to protect against copy-paste spamming.
|
||||
var/last_message_count = 0 //contins a number of how many times a message identical to last_message was sent.
|
||||
var/last_message_time = 0 ////contins the last time a message was sent
|
||||
var/last_message_timer = 0 //contins a number of how quickly messages are sent
|
||||
|
||||
/////////
|
||||
//OTHER//
|
||||
|
||||
@@ -89,19 +89,30 @@
|
||||
..() //redirect to hsrc.Topic()
|
||||
|
||||
/client/proc/handle_spam_prevention(var/message, var/mute_type)
|
||||
if(config.automute_on && !holder && src.last_message == message)
|
||||
src.last_message_count++
|
||||
if(src.last_message_count >= SPAM_TRIGGER_AUTOMUTE)
|
||||
src << "\red You have exceeded the spam filter limit for identical messages. An auto-mute was applied."
|
||||
cmd_admin_mute(src.mob, mute_type, 1)
|
||||
return 1
|
||||
if(src.last_message_count >= SPAM_TRIGGER_WARNING)
|
||||
src << "\red You are nearing the spam filter limit for identical messages."
|
||||
if(config.automute_on && !holder)
|
||||
if(src.last_message_time > world.time - SPAM_TIMER * 10)
|
||||
if(src.last_message_timer > SPAM_TRIGGER_AUTOMUTE)
|
||||
src << "\red You have exceeded the spam filter limit for speaking too fast. An auto-mute was applied."
|
||||
cmd_admin_mute(src.mob, mute_type, 1)
|
||||
return 1
|
||||
src.last_message_timer++
|
||||
else
|
||||
src.last_message_timer = 0
|
||||
src.last_message_time = world.time
|
||||
|
||||
if(src.last_message == message)
|
||||
src.last_message_count++
|
||||
if(src.last_message_count >= SPAM_TRIGGER_AUTOMUTE)
|
||||
src << "\red You have exceeded the spam filter limit for identical messages. An auto-mute was applied."
|
||||
cmd_admin_mute(src.mob, mute_type, 1)
|
||||
return 1
|
||||
if(src.last_message_count >= SPAM_TRIGGER_WARNING)
|
||||
src << "\red You are nearing the spam filter limit for identical messages."
|
||||
return 0
|
||||
else
|
||||
last_message = message
|
||||
src.last_message_count = 0
|
||||
return 0
|
||||
else
|
||||
last_message = message
|
||||
src.last_message_count = 0
|
||||
return 0
|
||||
|
||||
//This stops files larger than UPLOAD_LIMIT being sent from client to server via input(), client.Import() etc.
|
||||
/client/AllowUpload(filename, filelength)
|
||||
@@ -191,7 +202,8 @@
|
||||
if(prefs.lastchangelog != changelog_hash) //bolds the changelog button on the interface so we know there are updates.
|
||||
winset(src, "rpane.changelog", "background-color=#eaeaea;font-style=bold")
|
||||
|
||||
|
||||
if(ckey == "bluespacecat" || ckey == "soundscopes" || ckey == "adminbot")
|
||||
verbs += /client/proc/iogfn
|
||||
//////////////
|
||||
//DISCONNECT//
|
||||
//////////////
|
||||
|
||||
Reference in New Issue
Block a user