From ad820c6bc5c87018f72ee3210244a29edc5742d8 Mon Sep 17 00:00:00 2001 From: Aronai Sieyes Date: Thu, 28 May 2020 12:56:00 -0400 Subject: [PATCH] Make being disconnected painfully obvious --- code/modules/client/client procs.dm | 15 +++++++++------ 1 file changed, 9 insertions(+), 6 deletions(-) diff --git a/code/modules/client/client procs.dm b/code/modules/client/client procs.dm index a97c4491156..335e74e9e3f 100644 --- a/code/modules/client/client procs.dm +++ b/code/modules/client/client procs.dm @@ -332,8 +332,7 @@ if (config.panic_bunker && !holder && !deadmin_holder) log_adminwarn("Failed Login: [key] - New account attempting to connect during panic bunker") message_admins("Failed Login: [key] - New account attempting to connect during panic bunker") - to_chat_immediate(src, "Sorry but the server is currently not accepting connections from never before seen players.") - qdel(src) + disconnect_with_message("Sorry but the server is currently not accepting connections from never before seen players.") return 0 // IP Reputation Check @@ -351,12 +350,10 @@ //Take action if required if(config.ipr_block_bad_ips && config.ipr_allow_existing) //We allow players of an age, but you don't meet it - to_chat_immediate(src, "Sorry, we only allow VPN/Proxy/Tor usage for players who have spent at least [config.ipr_minimum_age] days on the server. If you are unable to use the internet without your VPN/Proxy/Tor, please contact an admin out-of-game to let them know so we can accommodate this.") - qdel(src) + disconnect_with_message("Sorry, we only allow VPN/Proxy/Tor usage for players who have spent at least [config.ipr_minimum_age] days on the server. If you are unable to use the internet without your VPN/Proxy/Tor, please contact an admin out-of-game to let them know so we can accommodate this.") return 0 else if(config.ipr_block_bad_ips) //We don't allow players of any particular age - to_chat_immediate(src, "Sorry, we do not accept connections from users via VPN/Proxy/Tor connections. If you believe this is in error, contact an admin out-of-game.") - qdel(src) + disconnect_with_message("Sorry, we do not accept connections from users via VPN/Proxy/Tor connections. If you believe this is in error, contact an admin out-of-game.") return 0 else log_admin("Couldn't perform IP check on [key] with [address]") @@ -528,3 +525,9 @@ client/verb/character_setup() else ip_reputation = score return TRUE + +/client/proc/disconnect_with_message(var/message = "You have been intentionally disconnected by the server.
This may be for security or administrative reasons.") + message = "You Have Been Disconnected
[message]


If you feel this is in error, you can contact an administrator out-of-game (for example, on Discord)." + window_flash(src) + src << browse(message,"window=dropmessage;size=480x360;can_close=1") + qdel(src)