diff --git a/server/src/VirtualServerManager.cpp b/server/src/VirtualServerManager.cpp index 63f2e53..6a53526 100644 --- a/server/src/VirtualServerManager.cpp +++ b/server/src/VirtualServerManager.cpp @@ -320,8 +320,8 @@ shared_ptr VirtualServerManager::create_server(std::string hosts, auto prop_copy = sql::command(this->handle->getSql(), "INSERT INTO `properties` (`serverId`, `type`, `id`, `key`, `value`) SELECT :target_sid AS `serverId`, `type`, `id`, `key`, `value` FROM `properties` WHERE `type` = :type AND `id` = 0 AND `serverId` = 0;", variable{":target_sid", serverId}, variable{":type", property::PROP_TYPE_SERVER}).execute(); - if(!prop_copy.success) - logCritical(LOG_GENERAL, "Failed to copy default server properties: {}", prop_copy.fmtStr()); + if(!prop_copy) + logCritical(LOG_GENERAL, "Failed to copy default server properties: {}", prop_copy.fmtStr()); auto server = make_shared(serverId, this->handle->getSql()); server->self = server; @@ -330,9 +330,11 @@ shared_ptr VirtualServerManager::create_server(std::string hosts, } server->properties()[property::VIRTUALSERVER_HOST] = hosts; server->properties()[property::VIRTUALSERVER_PORT] = port; - auto bot = server->musicManager->createBot(0); - if(!bot) { - logCritical(server->getServerId(), "Failed to create default music bot!"); + if(!config::server::default_music_bot) { + auto bot = server->musicManager->createBot(0); + if(!bot) { + logCritical(server->getServerId(), "Failed to create default music bot!"); + } } { threads::MutexLock l(this->instanceLock);