|
|
@ -5,11 +5,22 @@ use crate::config::Player;
|
|
|
|
// this global stuff is so that we can load up the config and check stuff without
|
|
|
|
// this global stuff is so that we can load up the config and check stuff without
|
|
|
|
// being part of the Game struct
|
|
|
|
// being part of the Game struct
|
|
|
|
thread_local! {
|
|
|
|
thread_local! {
|
|
|
|
|
|
|
|
/// Minimum length for name
|
|
|
|
static NAME_MIN: RefCell<usize> = RefCell::new(0);
|
|
|
|
static NAME_MIN: RefCell<usize> = RefCell::new(0);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
/// Maximum length for name
|
|
|
|
static NAME_MAX: RefCell<usize> = RefCell::new(0);
|
|
|
|
static NAME_MAX: RefCell<usize> = RefCell::new(0);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
/// Characters allowed to be in name
|
|
|
|
static NAME_CHARS: RefCell<&'static str> = RefCell::new("");
|
|
|
|
static NAME_CHARS: RefCell<&'static str> = RefCell::new("");
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
/// Password minimum length
|
|
|
|
static PASS_MIN: RefCell<usize> = RefCell::new(0);
|
|
|
|
static PASS_MIN: RefCell<usize> = RefCell::new(0);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
/// Password maximum length
|
|
|
|
static PASS_MAX: RefCell<usize> = RefCell::new(0);
|
|
|
|
static PASS_MAX: RefCell<usize> = RefCell::new(0);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
/// Password allowed characters
|
|
|
|
static PASS_CHARS: RefCell<&'static str> = RefCell::new("");
|
|
|
|
static PASS_CHARS: RefCell<&'static str> = RefCell::new("");
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|