Fixed config error
This commit is contained in:
parent
aa08bfbf1b
commit
fd36ce87cf
@ -320,7 +320,7 @@ shared_ptr<VirtualServer> 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)
|
||||
if(!prop_copy)
|
||||
logCritical(LOG_GENERAL, "Failed to copy default server properties: {}", prop_copy.fmtStr());
|
||||
|
||||
auto server = make_shared<VirtualServer>(serverId, this->handle->getSql());
|
||||
@ -330,10 +330,12 @@ shared_ptr<VirtualServer> VirtualServerManager::create_server(std::string hosts,
|
||||
}
|
||||
server->properties()[property::VIRTUALSERVER_HOST] = hosts;
|
||||
server->properties()[property::VIRTUALSERVER_PORT] = port;
|
||||
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);
|
||||
this->instances.push_back(server);
|
||||
|
Loading…
Reference in New Issue
Block a user