X-Git-Url: https://git.stg.codes/stg.git/blobdiff_plain/e767204dbf56ac466489c142f0acdaebd5d0b935..d30add64d1fb2fd48ae5fe991166070684b0865f:/projects/stargazer/user_impl.cpp?ds=sidebyside diff --git a/projects/stargazer/user_impl.cpp b/projects/stargazer/user_impl.cpp index 6ef806f2..eace1afb 100644 --- a/projects/stargazer/user_impl.cpp +++ b/projects/stargazer/user_impl.cpp @@ -36,6 +36,7 @@ #include // access #include +#include #include "user_impl.h" #include "users.h" @@ -52,7 +53,7 @@ USER_IMPL::USER_IMPL(const SETTINGS * s, 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) {