mirror of
https://github.com/Bubberstation/Bubberstation.git
synced 2025-12-11 10:11:09 +00:00
[s] disables the Middle Mouse Button exploit (#42594)
* disables the MMB exploit * Adds a config option to set a minimum build, with the recommended minimum build for 512 users being 1421 * readds the post-block detection, and changes MMB -> Middle Mouse Button * Makes it the standard, I guess Co-Authored-By: nichlas0010 <nichlas00100@gmail.com> * Update client_procs.dm
This commit is contained in:
committed by
Jordan Brown
parent
5c62effc23
commit
3ec4eb619f
@@ -354,6 +354,10 @@
|
|||||||
/datum/config_entry/string/client_error_message
|
/datum/config_entry/string/client_error_message
|
||||||
config_entry_value = "Your version of byond is too old, may have issues, and is blocked from accessing this server."
|
config_entry_value = "Your version of byond is too old, may have issues, and is blocked from accessing this server."
|
||||||
|
|
||||||
|
/datum/config_entry/number/client_error_build
|
||||||
|
config_entry_value = null
|
||||||
|
min_val = 0
|
||||||
|
|
||||||
/datum/config_entry/number/minute_topic_limit
|
/datum/config_entry/number/minute_topic_limit
|
||||||
config_entry_value = null
|
config_entry_value = null
|
||||||
min_val = 0
|
min_val = 0
|
||||||
|
|||||||
@@ -273,12 +273,13 @@ GLOBAL_LIST_EMPTY(external_rsc_urls)
|
|||||||
connection_timeofday = world.timeofday
|
connection_timeofday = world.timeofday
|
||||||
winset(src, null, "command=\".configure graphics-hwmode on\"")
|
winset(src, null, "command=\".configure graphics-hwmode on\"")
|
||||||
var/cev = CONFIG_GET(number/client_error_version)
|
var/cev = CONFIG_GET(number/client_error_version)
|
||||||
|
var/ceb = CONFIG_GET(number/client_error_build)
|
||||||
var/cwv = CONFIG_GET(number/client_warn_version)
|
var/cwv = CONFIG_GET(number/client_warn_version)
|
||||||
if (byond_version < cev) //Out of date client.
|
if (byond_version < cev || byond_build < ceb) //Out of date client.
|
||||||
to_chat(src, "<span class='danger'><b>Your version of BYOND is too old:</b></span>")
|
to_chat(src, "<span class='danger'><b>Your version of BYOND is too old:</b></span>")
|
||||||
to_chat(src, CONFIG_GET(string/client_error_message))
|
to_chat(src, CONFIG_GET(string/client_error_message))
|
||||||
to_chat(src, "Your version: [byond_version]")
|
to_chat(src, "Your version: [byond_version].[byond_build]")
|
||||||
to_chat(src, "Required version: [cev] or later")
|
to_chat(src, "Required version: [cev].[ceb] or later")
|
||||||
to_chat(src, "Visit <a href=\"https://secure.byond.com/download\">BYOND's website</a> to get the latest version of BYOND.")
|
to_chat(src, "Visit <a href=\"https://secure.byond.com/download\">BYOND's website</a> to get the latest version of BYOND.")
|
||||||
if (connecting_admin)
|
if (connecting_admin)
|
||||||
to_chat(src, "Because you are an admin, you are being allowed to walk past this limitation, But it is still STRONGLY suggested you upgrade")
|
to_chat(src, "Because you are an admin, you are being allowed to walk past this limitation, But it is still STRONGLY suggested you upgrade")
|
||||||
@@ -697,8 +698,14 @@ GLOBAL_LIST_EMPTY(external_rsc_urls)
|
|||||||
/client/Click(atom/object, atom/location, control, params)
|
/client/Click(atom/object, atom/location, control, params)
|
||||||
var/ab = FALSE
|
var/ab = FALSE
|
||||||
var/list/L = params2list(params)
|
var/list/L = params2list(params)
|
||||||
|
|
||||||
|
var/dragged = L["drag"]
|
||||||
|
if(dragged && !L[dragged])
|
||||||
|
return
|
||||||
|
|
||||||
if (object && object == middragatom && L["left"])
|
if (object && object == middragatom && L["left"])
|
||||||
ab = max(0, 5 SECONDS-(world.time-middragtime)*0.1)
|
ab = max(0, 5 SECONDS-(world.time-middragtime)*0.1)
|
||||||
|
|
||||||
var/mcl = CONFIG_GET(number/minute_click_limit)
|
var/mcl = CONFIG_GET(number/minute_click_limit)
|
||||||
if (!holder && mcl)
|
if (!holder && mcl)
|
||||||
var/minute = round(world.time, 600)
|
var/minute = round(world.time, 600)
|
||||||
@@ -718,7 +725,6 @@ GLOBAL_LIST_EMPTY(external_rsc_urls)
|
|||||||
log_game("[key_name(src)] is using the middle click aimbot exploit")
|
log_game("[key_name(src)] is using the middle click aimbot exploit")
|
||||||
message_admins("[ADMIN_LOOKUPFLW(src)] [ADMIN_KICK(usr)] is using the middle click aimbot exploit</span>")
|
message_admins("[ADMIN_LOOKUPFLW(src)] [ADMIN_KICK(usr)] is using the middle click aimbot exploit</span>")
|
||||||
add_system_note("aimbot", "Is using the middle click aimbot exploit")
|
add_system_note("aimbot", "Is using the middle click aimbot exploit")
|
||||||
|
|
||||||
log_game("[key_name(src)] Has hit the per-minute click limit of [mcl] clicks in a given game minute")
|
log_game("[key_name(src)] Has hit the per-minute click limit of [mcl] clicks in a given game minute")
|
||||||
message_admins("[ADMIN_LOOKUPFLW(src)] [ADMIN_KICK(usr)] Has hit the per-minute click limit of [mcl] clicks in a given game minute")
|
message_admins("[ADMIN_LOOKUPFLW(src)] [ADMIN_KICK(usr)] Has hit the per-minute click limit of [mcl] clicks in a given game minute")
|
||||||
to_chat(src, "<span class='danger'>[msg]</span>")
|
to_chat(src, "<span class='danger'>[msg]</span>")
|
||||||
|
|||||||
@@ -386,6 +386,8 @@ AUTOADMIN_RANK Game Master
|
|||||||
#CLIENT_WARN_MESSAGE Byond released 511 as the stable release. You can set the framerate your client runs at, which makes the game feel very different and cool. Shortly after its release we will end up using 511 client features and you will be forced to update.
|
#CLIENT_WARN_MESSAGE Byond released 511 as the stable release. You can set the framerate your client runs at, which makes the game feel very different and cool. Shortly after its release we will end up using 511 client features and you will be forced to update.
|
||||||
CLIENT_ERROR_VERSION 511
|
CLIENT_ERROR_VERSION 511
|
||||||
CLIENT_ERROR_MESSAGE Your version of byond is not supported. Please upgrade.
|
CLIENT_ERROR_MESSAGE Your version of byond is not supported. Please upgrade.
|
||||||
|
## The minimum build needed for joining the server, if using 512, a good minimum build would be 1421 as that disables the Middle Mouse Button exploit.
|
||||||
|
CLIENT_ERROR_BUILD 1421
|
||||||
|
|
||||||
## TOPIC RATE LIMITING
|
## TOPIC RATE LIMITING
|
||||||
## This allows you to limit how many topic calls (clicking on an interface window) the client can do in any given game second and/or game minute.
|
## This allows you to limit how many topic calls (clicking on an interface window) the client can do in any given game second and/or game minute.
|
||||||
|
|||||||
Reference in New Issue
Block a user