isRunning(false),
users(nullptr),
sock(0),
- onAddUserNotifier(*this),
- onDelUserNotifier(*this),
logger(STG::PluginLogger::get("rscript"))
{
}
InitEncrypt(rsSettings.GetPassword());
-users->AddNotifierUserAdd(&onAddUserNotifier);
-users->AddNotifierUserDel(&onDelUserNotifier);
+m_onAddUserConn = users->onAdd([this](auto user){ AddUser(user); });
+m_onDelUserConn = users->onDel([this](auto user){ DelUser(user); });
if (GetUsers())
return -1;
}
}
-users->DelNotifierUserDel(&onDelUserNotifier);
-users->DelNotifierUserAdd(&onAddUserNotifier);
-
if (isRunning)
{
logger("Cannot stop thread.");
}*/
}
//-----------------------------------------------------------------------------
-void RS::IP_NOTIFIER::Notify(const uint32_t & /*oldValue*/, const uint32_t & newValue)
+void RS::IP_NOTIFIER::notify(const uint32_t & /*oldValue*/, const uint32_t & newValue)
{
if (newValue != 0)
rs.AddRSU(user);
rs.DelRSU(user);
}
//-----------------------------------------------------------------------------
-void RS::CONNECTED_NOTIFIER::Notify(const bool & /*oldValue*/, const bool & newValue)
+void RS::CONNECTED_NOTIFIER::notify(const bool & /*oldValue*/, const bool & newValue)
{
if (newValue)
rs.AddRSU(user);