inline tstring GetTimeString() const
{
using namespace boost::posix_time;
- ptime now = second_clock::universal_time();
+ ptime now = second_clock::local_time();
return unicode::ToTString(to_iso_extended_string(now));
}
inline std::string GetLogFileName() const
{
using namespace boost::posix_time;
- ptime now = second_clock::universal_time();
+ ptime now = second_clock::local_time();
std::string date_string = to_iso_extended_string(now);
boost::algorithm::replace_all(date_string, ":", "_");
return "log_" + date_string + ".txt";
void Set(UserID user_id, AccountProperty property, T value, bool revision = true)
{
if (user_id == 0) {
+ Logger::Error(_T("Invalid session id"));
return;
}
});
sessions_.erase(it, sessions_.end());
- Logger::Info("Active sessoin: %d", sessions_.size() - 1);
+ Logger::Info("Active connection: %d", sessions_.size() - 1);
}
void Server::SendAll(const Command& command)
{
if (auto session = c.session().lock()) {
unsigned int id = static_cast<unsigned int>(session->id());
- assert(id > 0);
+ if (id == 0) {
+ Logger::Error(_T("Invalid session id"));
+ break;
+ }
ptime now = second_clock::universal_time();
auto time_string = to_iso_extended_string(now);
#define MMO_VERSION_MAJOR 0
#define MMO_VERSION_MINOR 1
-#define MMO_VERSION_REVISION 3
+#define MMO_VERSION_REVISION 4
#ifdef MMO_VERSION_BUILD
#define MMO_VERSION_BUILD_TEXT " Build " MMO_VERSION_TOSTRING(MMO_VERSION_BUILD)