mirror of
https://github.com/DarkflameUniverse/DarkflameServer.git
synced 2025-07-02 01:29:51 +00:00
Add bounds check for cli command
Output a message if a bad command is used. Update MasterServer.cpp
This commit is contained in:
parent
9f156d59e1
commit
520bddecc3
@ -211,13 +211,15 @@ int main(int argc, char** argv) {
|
||||
if (strcmp(argv[2], "TruncateBrokenModels") == 0) {
|
||||
uint32_t numberOfTruncatedModels = BrickByBrickFix::TruncateBrokenBrickByBrickXml();
|
||||
Game::logger->Log("MasterServer", "%i models were truncated from the database.", numberOfTruncatedModels);
|
||||
}
|
||||
|
||||
} else if (strcmp(argv[2], "UpdateOldModels") == 0) {
|
||||
// Updates old Brick-by-Brick models to use sd0 compression
|
||||
// as opposed to zlib compression
|
||||
if (strcmp(argv[2], "UpdateOldModels") == 0) {
|
||||
uint32_t numberOfUpdatedModels = BrickByBrickFix::UpdateBrickByBrickModelsToSd0();
|
||||
Game::logger->Log("MasterServer", "%i models were updated from zlib to sd0.", numberOfUpdatedModels);
|
||||
} else {
|
||||
Game::logger->Log(
|
||||
"MasterServer", "Invalid brick-by-brick command <%s>."
|
||||
"Valid commands are TruncateBrokenModels and UpdateOldModels", argv[2]);
|
||||
}
|
||||
FinalizeShutdown();
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user