diff --git a/code/controllers/configuration.dm b/code/controllers/configuration.dm index a77a76f67b7..78190314f96 100644 --- a/code/controllers/configuration.dm +++ b/code/controllers/configuration.dm @@ -220,6 +220,9 @@ var/list/gamemode_cache = list() var/client_error_message = "" var/client_warn_version = 0 var/client_warn_message = "" +#if DM_VERSION > 511 + var/list/client_blacklist_version = list() +#endif //Mark-up enabling var/allow_chat_markup = 0 @@ -764,6 +767,11 @@ var/list/gamemode_cache = list() if("client_warn_message") config.client_warn_message = value +#if DM_VERSION > 511 + if("client_blacklist_version") + config.client_blacklist_version = splittext(value, ";") +#endif + if("allow_chat_markup") config.allow_chat_markup = 1 @@ -836,7 +844,7 @@ var/list/gamemode_cache = list() if ("explosion_z_threshold") iterative_explosives_z_threshold = text2num(value) - + if ("explosion_z_mult") iterative_explosives_z_multiplier = text2num(value) diff --git a/code/modules/client/client procs.dm b/code/modules/client/client procs.dm index cd18138e987..17f77eb45c3 100644 --- a/code/modules/client/client procs.dm +++ b/code/modules/client/client procs.dm @@ -328,9 +328,22 @@ if (holder) src << "Admins get a free pass. However, please update your BYOND as soon as possible. Certain things may cause crashes if you play with your present version." else + log_access("Failed Login: [key] [computer_id] [address] - Outdated BYOND major version: [byond_version].") del(src) return 0 +#if DM_VERSION > 511 + if (LAZYLEN(config.client_blacklist_version)) + var/client_version = "[byond_version].[byond_build]" + if (client_version in config.client_blacklist_version) + src << "Your version of BYOND is explicitly blacklisted from joining this server!" + src << "Your current version: [client_version]." + src << "Visit http://www.byond.com/download/ to download a different version. Try looking for a newer one, or go one lower." + log_access("Failed Login: [key] [computer_id] [address] - Blacklisted BYOND version: [client_version].") + del(src) + return 0 +#endif + //preferences datum - also holds some persistant data for the client (because we may as well keep these datums to a minimum) prefs = preferences_datums[ckey] if(!prefs) diff --git a/config/example/config.txt b/config/example/config.txt index e702a751c0f..efa4c41b255 100644 --- a/config/example/config.txt +++ b/config/example/config.txt @@ -5,7 +5,7 @@ ALERT_GREEN All threats to the station have passed. Security may not have weapons visible, privacy laws are once again fully enforced. ALERT_BLUE_UPTO The station has received reliable information about possible hostile activity on the station. Security staff may have weapons visible, random searches are permitted. ALERT_BLUE_DOWNTO The immediate threat has passed. Security may no longer have weapons drawn at all times, but may continue to have them visible. Random searches are still allowed. -ALERT_YELLOW_TO The station is now under an elevated alert status due to a confirmed biological hazard. All crew are to follow command instruction in order to ensure a safe return to standard operations. +ALERT_YELLOW_TO The station is now under an elevated alert status due to a confirmed biological hazard. All crew are to follow command instruction in order to ensure a safe return to standard operations. ALERT_RED_UPTO There is an immediate serious threat to the station. Security may have weapons unholstered at all times. Random searches are allowed and advised. ALERT_RED_DOWNTO The self-destruct mechanism has been deactivated, there is still however an immediate serious threat to the station. Security may have weapons unholstered at all times, random searches are allowed and advised. ALERT_DELTA The station's self-destruct mechanism has been engaged. All crew are instructed to obey all instructions given by heads of staff. Any violations of these orders can be punished by death. This is not a drill. @@ -436,6 +436,9 @@ MERCHANT_CHANCE 20 #CLIENT_ERROR_MESSAGE Your version of BYOND is not supported. Please upgrade. #CLIENT_WARN_VERSION 510 #CLIENT_WARN_MESSAGE BYOND is really close to releasing 510 beta as a stable release, please take time to try it out. Reports are that the client preforms better then the version you are using, and also handles network lag better. Shortly after it's release we will end up using 510 client features and you will be forced to update. +## These versions are never permitted to join. Only works if the server is compiled in and running 512. +## Keep the list semi-colon separated, in format of MAJOR.MINOR;MAJOR.MINOR +#CLIENT_BLACKLIST_VERSION 123.4567 ## Uncomment to enable simple Skype/Discord style markup over OOC, LOOC, and say. #ALLOW_CHAT_MARKUP diff --git a/html/templates/welcome_screen.html b/html/templates/welcome_screen.html index 87f824f50bd..80beb9bb15f 100644 --- a/html/templates/welcome_screen.html +++ b/html/templates/welcome_screen.html @@ -163,11 +163,15 @@ window.location = command; }); + // Operations before closing. $(window).unload(function() { - window.location = '?JSlink=updateHashes;' + jQuery.param(hashesToUpdate); + try { + window.location = '?JSlink=updateHashes;' + jQuery.param(hashesToUpdate); + } catch (e) { } }); + var edat = getCookie('E-DAT'); if (!edat) {