]> git.stg.codes - stg.git/blobdiff - projects/stargazer/plugins/configuration/rpcconfig/messages_methods.cpp
Move projects back into subfolder.
[stg.git] / projects / stargazer / plugins / configuration / rpcconfig / messages_methods.cpp
index e6a4df6f0773bb6cfd9d423da1431b76e3f7bf01..854b2767262b7a3f1bff89f10fdf660f0bf9c4b8 100644 (file)
@@ -1,11 +1,14 @@
-#include <ostream> // xmlrpc-c devs have missed something :)
+#include "messages_methods.h"
+#include "rpcconfig.h"
 
+#include "stg/users.h"
+#include "stg/user.h"
 #include "stg/message.h"
 #include "stg/common.h"
-#include "messages_methods.h"
-#include "rpcconfig.h"
 
-extern const volatile time_t stgTime;
+#include <ostream> // xmlrpc-c devs have missed something :)
+
+extern volatile time_t stgTime;
 
 //------------------------------------------------------------------------------
 
@@ -25,7 +28,7 @@ if (config->GetAdminInfo(cookie, &adminInfo))
     return;
     }
 
-STG_MSG message;
+STG::Message message;
 
 std::map<std::string, xmlrpc_c::value>::iterator it;
 
@@ -75,13 +78,14 @@ if ((it = msgInfo.find("text")) == msgInfo.end())
     }
 message.text = IconvString(xmlrpc_c::value_string(it->second), "UTF-8", "CP1251");
 
-message.header.creationTime = stgTime;
+message.header.creationTime = static_cast<int>(stgTime);
 message.header.lastSendTime = 0;
 
 std::vector<xmlrpc_c::value>::iterator lit;
 for (lit = logins.begin(); lit != logins.end(); ++lit)
     {
-    USER_PTR ui;
+    using UserPtr = STG::User*;
+    UserPtr ui;
     if (users->FindByName(xmlrpc_c::value_string(*lit), &ui))
         {
         printfd(__FILE__, "METHOD_MESSAGE_SEND::execute(): 'User '%s' not found'\n", std::string(xmlrpc_c::value_string(*lit)).c_str());