mirror of
https://github.com/Citadel-Station-13/Citadel-Station-13-RP.git
synced 2026-08-28 07:56:50 +01:00
various fixes (#6252)
see commits fixes stuff in maintainer bug triage --------- Co-authored-by: silicons <no@you.cat>
This commit is contained in:
@@ -149,11 +149,18 @@
|
||||
return 1
|
||||
|
||||
|
||||
|
||||
///////////
|
||||
//CONNECT//
|
||||
///////////
|
||||
|
||||
/**
|
||||
* Linter check, do not call.
|
||||
*/
|
||||
/proc/lint__check_client_new_doesnt_sleep()
|
||||
SHOULD_NOT_SLEEP(TRUE)
|
||||
var/client/C
|
||||
C.New()
|
||||
|
||||
/client/New(TopicData)
|
||||
//* pre-connect-ish
|
||||
// set appadmin for profiling or it might not work (?) (this is old code we just assume it's here for a reason)
|
||||
@@ -165,9 +172,12 @@
|
||||
return null
|
||||
// kick out guests
|
||||
if(!config_legacy.guests_allowed && is_guest() && !is_localhost())
|
||||
alert(src,"This server doesn't allow guest accounts to play. Please go to http://www.byond.com/ and register for a key.","Guest","OK")
|
||||
del(src)
|
||||
return
|
||||
security_kick(
|
||||
message = "This server doesn't allow guest accounts to play. Please go to http://www.byond.com/ and register for a key.",
|
||||
tell_user = TRUE,
|
||||
immediate = TRUE,
|
||||
)
|
||||
return null
|
||||
// pre-connect greeting
|
||||
to_chat(src, "<font color='red'>If the title screen is black, resources are still downloading. Please be patient until the title screen appears.</font>")
|
||||
// register in globals
|
||||
@@ -195,11 +205,11 @@
|
||||
//* Setup user interface
|
||||
// todo: move top level menu here, for now it has to be under prefs.
|
||||
// Instantiate statpanel
|
||||
statpanel_boot()
|
||||
addtimer(CALLBACK(src, PROC_REF(statpanel_boot)), 0)
|
||||
// Instantiate tgui panel
|
||||
tgui_panel = new(src, "browseroutput")
|
||||
// Instantiate cutscene system
|
||||
init_cutscene_system()
|
||||
addtimer(CALLBACK(src, PROC_REF(init_cutscene_system)), 0)
|
||||
|
||||
//* Setup admin tooling
|
||||
GLOB.ahelp_tickets.ClientLogin(src)
|
||||
@@ -262,10 +272,7 @@
|
||||
// start caching it immediately
|
||||
INVOKE_ASYNC(SSipintel, TYPE_PROC_REF(/datum/controller/subsystem/ipintel, vpn_connection_check), address, ckey)
|
||||
// run onboarding gauntlet
|
||||
if(!onboarding())
|
||||
if(!queued_security_kick)
|
||||
security_kick("Unknown error during client init. Contact staff on Discord.", TRUE)
|
||||
return FALSE
|
||||
INVOKE_ASYNC(src, PROC_REF(onboarding))
|
||||
|
||||
//* Initialize Input
|
||||
if(SSinput.initialized)
|
||||
@@ -276,7 +283,7 @@
|
||||
// initialize statbrowser
|
||||
// (we don't, the JS does it for us. by signalling statpanel_ready().)
|
||||
// Initialize tgui panel
|
||||
tgui_panel.initialize()
|
||||
INVOKE_ASYNC(tgui_panel, TYPE_PROC_REF(/datum/tgui_panel, initialize))
|
||||
// initialize cutscene browser
|
||||
// (we don't, the JS does it for us.)
|
||||
|
||||
@@ -325,12 +332,13 @@
|
||||
to_chat(src, "<span class='info'>You have unread updates in the changelog.</span>")
|
||||
winset(src, "infowindow.changelog", "background-color=#eaeaea;font-style=bold")
|
||||
if(config_legacy.aggressive_changelog)
|
||||
changelog()
|
||||
changelog_async()
|
||||
|
||||
if(!winexists(src, "asset_cache_browser")) // The client is using a custom skin, tell them.
|
||||
to_chat(src, "<span class='warning'>Unable to access asset cache browser, if you are using a custom skin file, please allow DS to download the updated version, if you are not, then make a bug report. This is not a critical issue but can cause issues with resource downloading, as it is impossible to know when extra resources arrived to you.</span>")
|
||||
// ensure asset cache is there
|
||||
INVOKE_ASYNC(src, PROC_REF(warn_if_no_asset_cache_browser))
|
||||
|
||||
hook_vr("client_new",list(src))
|
||||
// todo: fuck you voreprefs
|
||||
prefs_vr = new /datum/vore_preferences(src)
|
||||
|
||||
if(config_legacy.paranoia_logging)
|
||||
if(isnum(player.player_age) && player.player_age == -1)
|
||||
@@ -353,6 +361,14 @@
|
||||
//DISCONNECT//
|
||||
//////////////
|
||||
|
||||
/**
|
||||
* Linter check, do not call.
|
||||
*/
|
||||
/proc/lint__check_client_del_doesnt_sleep()
|
||||
SHOULD_NOT_SLEEP(TRUE)
|
||||
var/client/C
|
||||
C.Del()
|
||||
|
||||
/client/Del()
|
||||
if(!gc_destroyed)
|
||||
Destroy() //Clean up signals and timers.
|
||||
|
||||
@@ -21,9 +21,9 @@ GLOBAL_LIST_EMPTY(client_data)
|
||||
var/key
|
||||
/// absolutely, positively annihilated
|
||||
var/ligma = FALSE
|
||||
/// byond account join date
|
||||
/// byond account join date; null = not loaded
|
||||
var/account_join
|
||||
/// byond account age
|
||||
/// byond account age; null = not loaded
|
||||
var/account_age
|
||||
/// is guest
|
||||
var/is_guest
|
||||
@@ -47,7 +47,7 @@ GLOBAL_LIST_EMPTY(client_data)
|
||||
|
||||
is_guest = IsGuestKey(key)
|
||||
|
||||
load_account_age()
|
||||
INVOKE_ASYNC(src, PROC_REF(load_account_age))
|
||||
|
||||
var/list/the_cheese_touch = CONFIG_GET(keyed_list/shadowban)
|
||||
var/client/C = GLOB.directory[src.ckey]
|
||||
|
||||
@@ -4,10 +4,6 @@
|
||||
* client should already be logged to DB at this point.
|
||||
*/
|
||||
/client/proc/onboarding()
|
||||
if(!security_checks())
|
||||
return FALSE
|
||||
if(!panic_bunker())
|
||||
return FALSE
|
||||
if(!age_verification())
|
||||
return FALSE
|
||||
return TRUE
|
||||
security_checks()
|
||||
panic_bunker()
|
||||
age_verification()
|
||||
|
||||
@@ -1,4 +1,8 @@
|
||||
/client/proc/age_verification()
|
||||
set waitfor = FALSE
|
||||
age_verification_impl()
|
||||
|
||||
/client/proc/age_verification_impl()
|
||||
if(!SSdbcore.Connect())
|
||||
return TRUE
|
||||
if(!player.block_on_available(10 SECONDS))
|
||||
|
||||
@@ -5,6 +5,10 @@ GLOBAL_LIST_INIT(blacklisted_builds, list(
|
||||
))
|
||||
|
||||
/client/proc/security_checks()
|
||||
set waitfor = FALSE
|
||||
security_checks_impl()
|
||||
|
||||
/client/proc/security_checks_impl()
|
||||
if(byond_version < 513)
|
||||
security_kick("BYOND 512 and prior clients are too outdated.", tell_user = TRUE)
|
||||
return FALSE
|
||||
|
||||
@@ -31,7 +31,7 @@
|
||||
* queues a security kick
|
||||
* ensures the client's around for atleast delay or after current proc chain is over
|
||||
*/
|
||||
/client/proc/queue_security_kick(delay)
|
||||
/client/proc/queue_security_kick(delay = 0)
|
||||
var/left = isnull(queued_security_kick)? null : timeleft(queued_security_kick)
|
||||
if(isnull(left) || left < delay)
|
||||
deltimer(queued_security_kick)
|
||||
|
||||
@@ -127,6 +127,9 @@
|
||||
ooc_style = "admin"
|
||||
|
||||
for(var/client/target in GLOB.clients)
|
||||
if(!target.initialized)
|
||||
continue
|
||||
|
||||
if(target.is_preference_enabled(/datum/client_preference/show_ooc))
|
||||
if(target.is_key_ignored(key)) // If we're ignored by this person, then do nothing.
|
||||
continue
|
||||
|
||||
Reference in New Issue
Block a user