X-Git-Url: https://git.stg.codes/stg.git/blobdiff_plain/78c67dad18539233b81cfb16144339dc389d5981..8c7a6befad791ac242f15233365893b18953a627:/projects/stargazer/plugins/configuration/rpcconfig/messages_methods.cpp diff --git a/projects/stargazer/plugins/configuration/rpcconfig/messages_methods.cpp b/projects/stargazer/plugins/configuration/rpcconfig/messages_methods.cpp index e4d05636..854b2767 100644 --- a/projects/stargazer/plugins/configuration/rpcconfig/messages_methods.cpp +++ b/projects/stargazer/plugins/configuration/rpcconfig/messages_methods.cpp @@ -1,12 +1,14 @@ -#include // 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 "utils.h" -#include "messages_methods.h" -#include "rpcconfig.h" -extern const volatile time_t stgTime; +#include // xmlrpc-c devs have missed something :) + +extern volatile time_t stgTime; //------------------------------------------------------------------------------ @@ -26,7 +28,7 @@ if (config->GetAdminInfo(cookie, &adminInfo)) return; } -STG_MSG message; +STG::Message message; std::map::iterator it; @@ -76,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(stgTime); message.header.lastSendTime = 0; std::vector::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());