]> git.stg.codes - stg.git/blobdiff - projects/stargazer/plugins/authorization/inetaccess/inetaccess.cpp
Start replacing notifiers with subscriptions.
[stg.git] / projects / stargazer / plugins / authorization / inetaccess / inetaccess.cpp
index 01162875c466e26c14c53b1f01554136d0062722..3c6a687cefdea5e23cc33ec4c638a987fcce95d3 100644 (file)
@@ -290,7 +290,6 @@ AUTH_IA::AUTH_IA()
       stgSettings(NULL),
       listenSocket(-1),
       enabledDirs(0xFFffFFff),
-      onDelUserNotifier(*this),
       logger(STG::PluginLogger::get("auth_ia"))
 {
 InitContext("pr7Hhen", 7, &ctxS);
@@ -341,12 +340,10 @@ AUTH_IA::~AUTH_IA()
 //-----------------------------------------------------------------------------
 int AUTH_IA::Start()
 {
-users->AddNotifierUserDel(&onDelUserNotifier);
+m_onDelUserConn = users->onUserDel([this](auto user){ DelUser(user); });
 
 if (PrepareNet())
-    {
     return -1;
-    }
 
 if (!m_thread.joinable())
     m_thread = std::jthread([this](auto token){ Run(std::move(token)); });
@@ -394,7 +391,7 @@ if (isRunningRunTimeouter)
         }
     }
 
-users->DelNotifierUserDel(&onDelUserNotifier);
+m_onDelUserConn.disconnect();
 
 if (isRunningRun)
     m_thread.detach();