error if using known placeholder server_name, log if using debug build
Signed-off-by: strawberry <strawberry@puppygock.gay>
This commit is contained in:
parent
d1f55b59cf
commit
63bb00d902
1 changed files with 10 additions and 0 deletions
10
src/main.rs
10
src/main.rs
|
@ -153,6 +153,16 @@ async fn main() {
|
||||||
|
|
||||||
/* ad-hoc config validation/checks */
|
/* ad-hoc config validation/checks */
|
||||||
|
|
||||||
|
// yeah, unless the user built a debug build hopefully for local testing only
|
||||||
|
if config.server_name == "your.server.name" && !cfg!(debug_assertions) {
|
||||||
|
error!("You must specify a valid server name for production usage of conduwuit.");
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
if cfg!(debug_assertions) {
|
||||||
|
info!("Note: conduwuit was built without optimisations (i.e. debug build)");
|
||||||
|
}
|
||||||
|
|
||||||
// check if the user specified a registration token as `""`
|
// check if the user specified a registration token as `""`
|
||||||
if config.registration_token == Some(String::new()) {
|
if config.registration_token == Some(String::new()) {
|
||||||
error!("Registration token was specified but is empty (\"\")");
|
error!("Registration token was specified but is empty (\"\")");
|
||||||
|
|
Loading…
Add table
Reference in a new issue