mirror of
https://github.com/EQEmu/Server.git
synced 2026-08-28 20:07:56 +00:00
[Bots] Cleanup and remove preprocessors. (#2757)
* [Bots] Cleanup and remove preprocessors. - Removes every `#ifdef BOTS` we have and locks bots behind `Bots:AllowBots` rule. - Bot updates are now done by default similar to regular database updates. - Modify `CMakeLists.txt`, `.drone.yml`, and `BUILD.md` to match the removal of `EQEMU_ENABLE_BOTS`. * Cleanup - Add SQL for enabling bots for servers with bots. - Add message that tells players/operators bots are disabled. * Suggested changes. * Bot injection stuff * Change SQL to bot SQL. * Tweaks * Remove `is_bot` * Update version.h * Update main.cpp * Update database.cpp * Fix name availability crash * Remove bots from update script Co-authored-by: Akkadius <akkadius1@gmail.com>
This commit is contained in:
+11
-10
@@ -77,26 +77,27 @@ void WorldBoot::GMSayHookCallBackProcessWorld(uint16 log_category, const char *f
|
||||
|
||||
bool WorldBoot::HandleCommandInput(int argc, char **argv)
|
||||
{
|
||||
// database version
|
||||
uint32 database_version = CURRENT_BINARY_DATABASE_VERSION;
|
||||
uint32 bots_database_version = CURRENT_BINARY_BOTS_DATABASE_VERSION;
|
||||
if (argc >= 2) {
|
||||
if (strcasecmp(argv[1], "db_version") == 0) {
|
||||
std::cout << "Binary Database Version: " << database_version << " : " << bots_database_version << std::endl;
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
||||
// command handler
|
||||
if (argc > 1) {
|
||||
LogSys.SilenceConsoleLogging();
|
||||
path.LoadPaths();
|
||||
WorldConfig::LoadConfig();
|
||||
LoadDatabaseConnections();
|
||||
RuleManager::Instance()->LoadRules(&database, "default", false);
|
||||
LogSys.EnableConsoleLogging();
|
||||
WorldserverCLI::CommandHandler(argc, argv);
|
||||
}
|
||||
|
||||
// database version
|
||||
uint32 database_version = CURRENT_BINARY_DATABASE_VERSION;
|
||||
uint32 bots_database_version = RuleB(Bots, Enabled) ? CURRENT_BINARY_BOTS_DATABASE_VERSION : 0;
|
||||
if (argc >= 2) {
|
||||
if (strcasecmp(argv[1], "db_version") == 0) {
|
||||
std::cout << "Binary Database Version: " << database_version << " : " << bots_database_version << std::endl;
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user