mirror of
https://github.com/CHOMPStation2/CHOMPStation2.git
synced 2025-12-11 18:53:06 +00:00
[MIRROR] no empty passwords ... (#10162)
Co-authored-by: Kashargul <144968721+Kashargul@users.noreply.github.com>
This commit is contained in:
committed by
GitHub
parent
edffc6a1a5
commit
f66c9de1bf
@@ -378,3 +378,13 @@ Proc for attack log creation, because really why not
|
||||
to_chat(user, span_warning("Please set informative OOC notes related to RP/ERP preferences. Set them using the 'OOC Notes' button on the 'General' tab in character setup."))
|
||||
return TRUE
|
||||
return FALSE
|
||||
|
||||
///Makes a call in the context of a different usr. Use sparingly
|
||||
/world/proc/push_usr(mob/user_mob, datum/callback/invoked_callback, ...)
|
||||
var/temp = usr
|
||||
usr = user_mob
|
||||
if (length(args) > 2)
|
||||
. = invoked_callback.Invoke(arglist(args.Copy(3)))
|
||||
else
|
||||
. = invoked_callback.Invoke()
|
||||
usr = temp
|
||||
|
||||
@@ -72,7 +72,7 @@ GLOBAL_REAL(Master, /datum/controller/master) = new
|
||||
// Highlander-style: there can only be one! Kill off the old and replace it with the new.
|
||||
|
||||
if(!random_seed)
|
||||
#ifdef UNIT_TESTS
|
||||
#ifdef UNIT_TEST
|
||||
random_seed = 29051994 // How about 22475?
|
||||
#else
|
||||
random_seed = rand(1, 1e9)
|
||||
|
||||
@@ -78,7 +78,7 @@ SUBSYSTEM_DEF(verb_manager)
|
||||
|
||||
//we want unit tests to be able to directly call verbs that attempt to queue, and since unit tests should test internal behavior, we want the queue
|
||||
//to happen as if it was actually from player input if its called on a mob.
|
||||
#ifdef UNIT_TESTS
|
||||
#ifdef UNIT_TEST
|
||||
if(QDELETED(usr) && ismob(incoming_callback.object))
|
||||
incoming_callback.user = WEAKREF(incoming_callback.object)
|
||||
var/datum/callback/new_us = CALLBACK(arglist(list(GLOBAL_PROC, GLOBAL_PROC_REF(_queue_verb)) + args.Copy()))
|
||||
|
||||
@@ -280,7 +280,8 @@ var/world_topic_spam_protect_time = world.timeofday
|
||||
|
||||
else if(copytext(T,1,5) == "info")
|
||||
var/input[] = params2list(T)
|
||||
if(input["key"] != CONFIG_GET(string/comms_password))
|
||||
var/password = CONFIG_GET(string/comms_password)
|
||||
if(!password || input["key"] != password)
|
||||
if(world_topic_spam_protect_ip == addr && abs(world_topic_spam_protect_time - world.time) < 50)
|
||||
|
||||
spawn(50)
|
||||
@@ -367,7 +368,8 @@ var/world_topic_spam_protect_time = world.timeofday
|
||||
|
||||
|
||||
var/input[] = params2list(T)
|
||||
if(input["key"] != CONFIG_GET(string/comms_password))
|
||||
var/password = CONFIG_GET(string/comms_password)
|
||||
if(!password || input["key"] != password)
|
||||
if(world_topic_spam_protect_ip == addr && abs(world_topic_spam_protect_time - world.time) < 50)
|
||||
|
||||
spawn(50)
|
||||
@@ -417,7 +419,8 @@ var/world_topic_spam_protect_time = world.timeofday
|
||||
2. validationkey = the key the bot has, it should match the gameservers commspassword in it's configuration.
|
||||
*/
|
||||
var/input[] = params2list(T)
|
||||
if(input["key"] != CONFIG_GET(string/comms_password))
|
||||
var/password = CONFIG_GET(string/comms_password)
|
||||
if(!password || input["key"] != password)
|
||||
if(world_topic_spam_protect_ip == addr && abs(world_topic_spam_protect_time - world.time) < 50)
|
||||
|
||||
spawn(50)
|
||||
@@ -432,7 +435,8 @@ var/world_topic_spam_protect_time = world.timeofday
|
||||
|
||||
else if(copytext(T,1,4) == "age")
|
||||
var/input[] = params2list(T)
|
||||
if(input["key"] != CONFIG_GET(string/comms_password))
|
||||
var/password = CONFIG_GET(string/comms_password)
|
||||
if(!password || input["key"] != password)
|
||||
if(world_topic_spam_protect_ip == addr && abs(world_topic_spam_protect_time - world.time) < 50)
|
||||
spawn(50)
|
||||
world_topic_spam_protect_time = world.time
|
||||
|
||||
@@ -11,7 +11,7 @@
|
||||
|
||||
/// Don't instantiate these yourself, use uni_icon.
|
||||
/datum/universal_icon/New(icon/icon_file, icon_state="", dir=SOUTH, frame=1, datum/icon_transformer/transform=null, color=null)
|
||||
#ifdef UNIT_TESTS
|
||||
#ifdef UNIT_TEST
|
||||
// This check is kinda slow and shouldn't fail unless a developer makes a mistake. So it'll get caught in unit tests.
|
||||
if(!isicon(icon_file) || !isfile(icon_file) || "[icon_file]" == "/icon")
|
||||
// bad! use 'icons/path_to_dmi.dmi' format only
|
||||
|
||||
@@ -85,7 +85,7 @@
|
||||
/// asset_list - A list of asset filenames to be sent to the client. Can optionally be assoicated with the asset's asset_cache_item datum.
|
||||
/// Returns TRUE if any assets were sent.
|
||||
/datum/asset_transport/proc/send_assets(client/client, list/asset_list)
|
||||
#if defined(UNIT_TESTS)
|
||||
#if defined(UNIT_TEST)
|
||||
return
|
||||
#endif
|
||||
if (!istype(client))
|
||||
|
||||
Reference in New Issue
Block a user