-void REMOTE_SCRIPT::ChangedIP(USER_PTR u, uint32_t oldIP, uint32_t newIP)
-{
-/*
- * When ip changes process looks like:
- * old => 0, 0 => new
- *
- */
-if (newIP)
- {
- RS_USER rsu(IP2Routers(newIP), u);
- Send(newIP, rsu);
-
- STG_LOCKER lock(&mutex, __FILE__, __LINE__);
- authorizedUsers[newIP] = rsu;
- }
-else
- {
- STG_LOCKER lock(&mutex, __FILE__, __LINE__);
- const map<uint32_t, RS_USER>::iterator it(
- authorizedUsers.find(oldIP)
- );
- if (it != authorizedUsers.end())
- {
- Send(oldIP, it->second, true);
- authorizedUsers.erase(it);
- }
- }
-}
-//-----------------------------------------------------------------------------