]> git.stg.codes - stg.git/blobdiff - projects/stargazer/plugins/configuration/sgconfig/parser_message.cpp
Use std::lock_guard instead of STG_LOCKER.
[stg.git] / projects / stargazer / plugins / configuration / sgconfig / parser_message.cpp
index 2279aae6c6519e8968007a215426208b5424a069..161190f548acdd39e0894258fc6ca858d0d89071 100644 (file)
@@ -22,8 +22,9 @@
 #include "parser_message.h"
 
 #include "stg/users.h"
+#include "stg/user.h"
 
-extern volatile time_t stgTime; // So sad...
+#include <cstring>
 
 using STG::PARSER::SEND_MESSAGE;
 
@@ -97,12 +98,11 @@ int SEND_MESSAGE::End(void *, const char *el)
             printfd(__FILE__, "User not found. %s\n", m_logins[i].c_str());
             continue;
         }
-        m_msg.header.creationTime = static_cast<unsigned int>(stgTime);
+        m_msg.header.creationTime = static_cast<unsigned int>(time(NULL));
         m_user->AddMessage(&m_msg);
         m_result = res_ok;
     }
     CreateAnswer();
-    m_done = true;
     return 0;
 }