diff options
| author | RblSb <msrblsb@gmail.com> | 2020-03-31 22:44:53 +0300 |
|---|---|---|
| committer | RblSb <msrblsb@gmail.com> | 2020-03-31 22:44:53 +0300 |
| commit | a630cd235f8ee81922f541e19ef741812613ff50 (patch) | |
| tree | 03ea19ed58e73d18d432f11c6dff89f65557ed0f /src | |
| parent | f7b2ea74895bf01a84797c001754f79d22af6de2 (diff) | |
Emote copy warning
Diffstat (limited to 'src')
| -rw-r--r-- | src/server/Main.hx | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/src/server/Main.hx b/src/server/Main.hx index 696651c..90dfe2f 100644 --- a/src/server/Main.hx +++ b/src/server/Main.hx @@ -24,6 +24,7 @@ using Lambda; class Main { final rootDir = '$__dirname/..'; + final verbose:Bool; final statePath:String; final wss:WSServer; final localIp:String; @@ -43,6 +44,7 @@ class Main { static function main():Void new Main(); function new() { + verbose = Sys.args().has("--verbose"); statePath = '$rootDir/user/state.json'; // process.on("exit", exit); process.on("SIGINT", exit); // ctrl+c @@ -133,6 +135,14 @@ class Main { if (Reflect.field(config, field) == null) trace('Warning: config field "$field" is unknown'); Reflect.setField(config, field, Reflect.field(customConfig, field)); } + final emoteCopies:Map<String, Bool> = []; + for (emote in config.emotes) { + if (emoteCopies[emote.name]) trace('Warning: emote name "${emote.name}" has copy'); + emoteCopies[emote.name] = true; + if (!verbose) continue; + if (emoteCopies[emote.image]) trace('Warning: emote url of name "${emote.name}" has copy'); + emoteCopies[emote.image] = true; + } return config; } |
