Message before disconnecting

This commit is contained in:
Kyep
2019-05-30 18:06:10 -07:00
parent 6fe42d596d
commit cbfe1ce906
+7 -3
View File
@@ -572,9 +572,13 @@
if(ip_intel >= config.ipintel_rating_bad)
var/detailsurl = config.ipintel_detailsurl ? "(<a href='[config.ipintel_detailsurl][address]'>IP Info</a>)" : ""
if(config.ipintel_whitelist)
message_admins("<span class='adminnotice'>IPIntel: [key_name_admin(src)] on IP [address] was rejected. [detailsurl]</span>")
// Don't send them a message. They won't see it at this stage. Instead, they see a message when they try to reconnect.
qdel(src)
spawn(40) // This is necessary because without it, they won't see the message, and addtimer cannot be used because the timer system may not have initialized yet
message_admins("<span class='adminnotice'>IPIntel: [key_name_admin(src)] on IP [address] was rejected. [detailsurl]</span>")
var/blockmsg = "<B>Error: proxy/VPN detected. Proxy/VPN use is not allowed here. Deactivate it before you reconnect.</B>"
if(config.banappeals)
blockmsg += "\nIf you are not actually using a proxy/VPN, or have no choice but to use one, request whitelisting at: [config.banappeals]"
to_chat(src, blockmsg)
qdel(src)
else
message_admins("<span class='adminnotice'>IPIntel: [key_name_admin(src)] on IP [address] is likely to be using a Proxy/VPN. [detailsurl]</span>")