X-Git-Url: https://git.stg.codes/stg.git/blobdiff_plain/c59911ca3cd38cf4ab36d2cc62686f97395899f9..ee1709cd231588fe672d0bd2546ef69ee87ff88c:/projects/stargazer/plugins/other/rscript/rscript.cpp diff --git a/projects/stargazer/plugins/other/rscript/rscript.cpp b/projects/stargazer/plugins/other/rscript/rscript.cpp index 7f0f4bc4..d54c800e 100644 --- a/projects/stargazer/plugins/other/rscript/rscript.cpp +++ b/projects/stargazer/plugins/other/rscript/rscript.cpp @@ -160,8 +160,6 @@ REMOTE_SCRIPT::REMOTE_SCRIPT() isRunning(false), users(nullptr), sock(0), - onAddUserNotifier(*this), - onDelUserNotifier(*this), logger(STG::PluginLogger::get("rscript")) { } @@ -201,8 +199,8 @@ netRouters = rsSettings.GetSubnetsMap(); InitEncrypt(rsSettings.GetPassword()); -users->AddNotifierUserAdd(&onAddUserNotifier); -users->AddNotifierUserDel(&onDelUserNotifier); +m_onAddUserConn = users->onUserAdd([this](auto user){ AddUser(user); }); +m_onDelUserConn = users->onUserDel([this](auto user){ DelUser(user); }); if (GetUsers()) return -1; @@ -242,9 +240,6 @@ if (isRunning) } } -users->DelNotifierUserDel(&onDelUserNotifier); -users->DelNotifierUserAdd(&onAddUserNotifier); - if (isRunning) { logger("Cannot stop thread.");