#include <unistd.h> // access
#include <cassert>
+#include <cstdlib>
#include "user_impl.h"
#include "users.h"
const ADMIN * a,
const USERS * u)
: users(u),
- property(s),
+ property(s->GetScriptsDir()),
WriteServLog(GetStgLogger()),
login(),
id(0),
//-----------------------------------------------------------------------------
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),
if (!fakeConnect)
{
- string scriptOnConnect = settings->GetScriptDir() + "/OnConnect";
+ string scriptOnConnect = settings->GetScriptsDir() + "/OnConnect";
if (access(scriptOnConnect.c_str(), X_OK) == 0)
{
if (!fakeDisconnect)
{
- string scriptOnDisonnect = settings->GetScriptDir() + "/OnDisconnect";
+ string scriptOnDisonnect = settings->GetScriptsDir() + "/OnDisconnect";
if (access(scriptOnDisonnect.c_str(), X_OK) == 0)
{
{
STG_LOCKER lock(&mutex, __FILE__, __LINE__);
-string scriptOnAdd = settings->GetScriptDir() + "/OnUserAdd";
+string scriptOnAdd = settings->GetScriptsDir() + "/OnUserAdd";
if (access(scriptOnAdd.c_str(), X_OK) == 0)
{
{
STG_LOCKER lock(&mutex, __FILE__, __LINE__);
-string scriptOnDel = settings->GetScriptDir() + "/OnUserDel";
+string scriptOnDel = settings->GetScriptsDir() + "/OnUserDel";
if (access(scriptOnDel.c_str(), X_OK) == 0)
{