Core/Auth: Fix the "Added realm" spam
This commit is contained in:
1 parent
6cd63ca3d4
commit
7b687be4ba
2 files changed
+6
-5
No files matched your search
@@ -38,7 +38,7 @@ void RealmList::Initialize(boost::asio::io_service& ioService, uint32 updateInte
|
||||
_resolver = new boost::asio::ip::tcp::resolver(ioService);
|
||||
|
||||
// Get the content of the realmlist table in the database
|
||||
UpdateRealms(boost::system::error_code());
|
||||
UpdateRealms(true, boost::system::error_code());
|
||||
}
|
||||
|
||||
void RealmList::Close()
|
||||
@@ -67,7 +67,7 @@ void RealmList::UpdateRealm(RealmHandle const& id, uint32 build, const std::stri
|
||||
realm.Port = port;
|
||||
}
|
||||
|
||||
void RealmList::UpdateRealms(boost::system::error_code const& error)
|
||||
void RealmList::UpdateRealms(bool init, boost::system::error_code const& error)
|
||||
{
|
||||
if (error)
|
||||
return;
|
||||
@@ -138,7 +138,8 @@ void RealmList::UpdateRealms(boost::system::error_code const& error)
|
||||
UpdateRealm(id, build, name, externalAddress, localAddress, localSubmask, port, icon, flag,
|
||||
timezone, (allowedSecurityLevel <= SEC_ADMINISTRATOR ? AccountTypes(allowedSecurityLevel) : SEC_ADMINISTRATOR), pop);
|
||||
|
||||
TC_LOG_INFO("server.authserver", "Added realm \"%s\" at %s:%u.", name.c_str(), externalAddress.to_string().c_str(), port);
|
||||
if (init)
|
||||
TC_LOG_INFO("server.authserver", "Added realm \"%s\" at %s:%u.", name.c_str(), externalAddress.to_string().c_str(), port);
|
||||
}
|
||||
catch (std::exception& ex)
|
||||
{
|
||||
@@ -152,7 +153,7 @@ void RealmList::UpdateRealms(boost::system::error_code const& error)
|
||||
if (_updateInterval)
|
||||
{
|
||||
_updateTimer->expires_from_now(boost::posix_time::seconds(_updateInterval));
|
||||
_updateTimer->async_wait(std::bind(&RealmList::UpdateRealms, this, std::placeholders::_1));
|
||||
_updateTimer->async_wait(std::bind(&RealmList::UpdateRealms, this, false, std::placeholders::_1));
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -51,7 +51,7 @@ public:
|
||||
private:
|
||||
RealmList();
|
||||
|
||||
void UpdateRealms(boost::system::error_code const& error);
|
||||
void UpdateRealms(bool init, boost::system::error_code const& error);
|
||||
void UpdateRealm(RealmHandle const& id, uint32 build, const std::string& name, ip::address const& address, ip::address const& localAddr,
|
||||
ip::address const& localSubmask, uint16 port, uint8 icon, RealmFlags flag, uint8 timezone, AccountTypes allowedSecurityLevel, float population);
|
||||
|
||||
|
||||
Reference in new issue
Block a user