X-Git-Url: https://git.stg.codes/stg.git/blobdiff_plain/ede91934442fd804d7b818971a44e3ad795cb01f..6d2d8f97a73949a7776f67ded7f36bbfe4bba980:/projects/stargazer/user_impl.cpp?ds=inline diff --git a/projects/stargazer/user_impl.cpp b/projects/stargazer/user_impl.cpp index 0d6cfa84..ae77da4f 100644 --- a/projects/stargazer/user_impl.cpp +++ b/projects/stargazer/user_impl.cpp @@ -36,23 +36,24 @@ #include // access #include +#include #include "user_impl.h" #include "users.h" #include "common.h" -#include "settings.h" +#include "settings_impl.h" #include "script_executer.h" #include "tariff.h" #include "tariffs.h" #include "admin.h" -USER_IMPL::USER_IMPL(const SETTINGS * s, +USER_IMPL::USER_IMPL(const SETTINGS_IMPL * s, const STORE * st, const TARIFFS * t, - const ADMIN & a, + const ADMIN * a, const USERS * u) : users(u), - property(s), + property(s->GetScriptsDir()), WriteServLog(GetStgLogger()), login(), id(0), @@ -132,7 +133,7 @@ pthread_mutex_init(&mutex, &attr); //----------------------------------------------------------------------------- USER_IMPL::USER_IMPL(const USER_IMPL & u) : users(u.users), - property(u.settings), + property(u.settings->GetScriptsDir()), WriteServLog(GetStgLogger()), login(u.login), id(u.id), @@ -458,7 +459,7 @@ STG_LOCKER lock(&mutex, __FILE__, __LINE__); if (!fakeConnect) { - string scriptOnConnect = settings->GetScriptDir() + "/OnConnect"; + string scriptOnConnect = settings->GetScriptsDir() + "/OnConnect"; if (access(scriptOnConnect.c_str(), X_OK) == 0) { @@ -515,7 +516,7 @@ if (!lastIPForDisconnect) if (!fakeDisconnect) { - string scriptOnDisonnect = settings->GetScriptDir() + "/OnDisconnect"; + string scriptOnDisonnect = settings->GetScriptsDir() + "/OnDisconnect"; if (access(scriptOnDisonnect.c_str(), X_OK) == 0) { @@ -911,7 +912,7 @@ void USER_IMPL::OnAdd() { STG_LOCKER lock(&mutex, __FILE__, __LINE__); -string scriptOnAdd = settings->GetScriptDir() + "/OnUserAdd"; +string scriptOnAdd = settings->GetScriptsDir() + "/OnUserAdd"; if (access(scriptOnAdd.c_str(), X_OK) == 0) { @@ -933,7 +934,7 @@ void USER_IMPL::OnDelete() { STG_LOCKER lock(&mutex, __FILE__, __LINE__); -string scriptOnDel = settings->GetScriptDir() + "/OnUserDel"; +string scriptOnDel = settings->GetScriptsDir() + "/OnUserDel"; if (access(scriptOnDel.c_str(), X_OK) == 0) {