X-Git-Url: https://git.stg.codes/stg.git/blobdiff_plain/e9cb0683c0b33d8458c1d9b2558bbeb5d101e680..9447011b1029f3fcd82f05632673d3a85a4ae5d4:/projects/stargazer/plugins/other/rscript/rscript.cpp?ds=sidebyside

diff --git a/projects/stargazer/plugins/other/rscript/rscript.cpp b/projects/stargazer/plugins/other/rscript/rscript.cpp
index fb8cb57c..3bc90792 100644
--- a/projects/stargazer/plugins/other/rscript/rscript.cpp
+++ b/projects/stargazer/plugins/other/rscript/rscript.cpp
@@ -629,14 +629,25 @@ authorizedUsers.insert(std::make_pair(user->GetCurrIP(), rsu));
 void REMOTE_SCRIPT::DelRSU(USER_PTR user)
 {
 STG_LOCKER lock(&mutex, __FILE__, __LINE__);
-const std::map<uint32_t, RS::USER>::iterator it(
+std::map<uint32_t, RS::USER>::iterator it(authorizedUsers.begin());
+while (it != authorizedUsers.end())
+    {
+    if (it->second.user == user)
+        {
+        Send(it->second, true);
+        authorizedUsers.erase(it);
+        return;
+        }
+    ++it;
+    }
+/*const std::map<uint32_t, RS::USER>::iterator it(
         authorizedUsers.find(user->GetCurrIP())
         );
 if (it != authorizedUsers.end())
     {
     Send(it->second, true);
     authorizedUsers.erase(it);
-    }
+    }*/
 }
 //-----------------------------------------------------------------------------
 void RS::IP_NOTIFIER::Notify(const uint32_t & /*oldValue*/, const uint32_t & newValue)