X-Git-Url: https://git.stg.codes/stg.git/blobdiff_plain/70778b6263943f67b0e85aa50a16d48805d714e5..2cb51233d326dc99fa8aefafa72c1ecefb605d02:/projects/stargazer/plugins/configuration/rpcconfig/rpcconfig.cpp diff --git a/projects/stargazer/plugins/configuration/rpcconfig/rpcconfig.cpp b/projects/stargazer/plugins/configuration/rpcconfig/rpcconfig.cpp index 46905b15..7d764a7d 100644 --- a/projects/stargazer/plugins/configuration/rpcconfig/rpcconfig.cpp +++ b/projects/stargazer/plugins/configuration/rpcconfig/rpcconfig.cpp @@ -3,14 +3,9 @@ #include "rpcconfig.h" -#include "../../../admin.h" -#include "../../../admins.h" -#include "../../../users.h" -#include "../../../tariffs.h" -#include "../../../traffcounter.h" -#include "../../../settings.h" -#include "base_store.h" -#include "base_settings.h" +#include "admin.h" +#include "module_settings.h" +#include "common.h" #include "info_methods.h" #include "users_methods.h" @@ -18,8 +13,7 @@ #include "admins_methods.h" #include "messages_methods.h" -class RPC_CONFIG_CREATOR -{ +class RPC_CONFIG_CREATOR { private: RPC_CONFIG * rpcconfig; @@ -27,16 +21,16 @@ public: RPC_CONFIG_CREATOR() : rpcconfig(new RPC_CONFIG()) { - }; + } ~RPC_CONFIG_CREATOR() { delete rpcconfig; - }; + } RPC_CONFIG * GetPlugin() { return rpcconfig; - }; + } }; RPC_CONFIG_CREATOR rpcc; @@ -48,7 +42,7 @@ RPC_CONFIG_SETTINGS::RPC_CONFIG_SETTINGS() { } -int RPC_CONFIG_SETTINGS::ParseIntInRange(const string & str, +int RPC_CONFIG_SETTINGS::ParseIntInRange(const std::string & str, int min, int max, int * val) @@ -113,9 +107,15 @@ return rpcc.GetPlugin(); } RPC_CONFIG::RPC_CONFIG() - : rpcServer(NULL) + : users(NULL), + admins(NULL), + tariffs(NULL), + store(NULL), + stgSettings(NULL), + rpcServer(NULL), + running(false), + stopped(true) { - } RPC_CONFIG::~RPC_CONFIG()