-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, *this);
- Send(newIP, rsu);
-
- STG_LOCKER lock(&mutex, __FILE__, __LINE__);
- authorizedUsers.insert(std::make_pair(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);
- }
- }
-}
-//-----------------------------------------------------------------------------