mirror of
https://github.com/Bubberstation/Bubberstation.git
synced 2026-08-29 08:08:49 +01:00
Some changes suggested by lummox
This commit is contained in:
@@ -5,7 +5,7 @@
|
||||
set hidden = TRUE
|
||||
|
||||
client_keysend_amount += 1
|
||||
|
||||
|
||||
var/cache = client_keysend_amount
|
||||
|
||||
if(keysend_tripped && next_keysend_trip_reset <= world.time)
|
||||
@@ -20,12 +20,12 @@
|
||||
//don't want to kick people if a lag spike results in a huge flood of commands being sent
|
||||
if(cache >= MAX_KEYPRESS_AUTOKICK)
|
||||
if(!keysend_tripped)
|
||||
keysend_tripped = TRUE
|
||||
keysend_tripped = TRUE
|
||||
next_keysend_trip_reset = world.time + (2 SECONDS)
|
||||
else
|
||||
log_admin("Client [ckey] was just autokicked for flooding keysends; likely abuse but potentially lagspike.")
|
||||
message_admins("Client [ckey] was just autokicked for flooding keysends; likely abuse but potentially lagspike.")
|
||||
QDEL_IN(src, 1)
|
||||
qdel(src)
|
||||
return
|
||||
|
||||
///Check if the key is short enough to even be a real key
|
||||
@@ -33,9 +33,9 @@
|
||||
to_chat(src, "<span class='userdanger'>Invalid KeyDown detected! You have been disconnected from the server automatically.</span>")
|
||||
log_admin("Client [ckey] just attempted to send an invalid keypress. Keymessage was over [MAX_KEYPRESS_COMMANDLENGTH] characters, autokicking due to likely abuse.")
|
||||
message_admins("Client [ckey] just attempted to send an invalid keypress. Keymessage was over [MAX_KEYPRESS_COMMANDLENGTH] characters, autokicking due to likely abuse.")
|
||||
QDEL_IN(src, 1)
|
||||
qdel(src)
|
||||
return
|
||||
|
||||
|
||||
//Focus Chat failsafe. Overrides movement checks to prevent WASD.
|
||||
if(!prefs.hotkeys && length(_key) == 1 && _key != "Alt" && _key != "Ctrl" && _key != "Shift")
|
||||
winset(src, null, "input.focus=true ; input.text=[url_encode(_key)]")
|
||||
|
||||
Reference in New Issue
Block a user