-class RS_DEL_USER_NONIFIER: public NOTIFIER_BASE<USER_PTR> {
-public:
- RS_DEL_USER_NONIFIER(REMOTE_SCRIPT & r) : rs(r) {}
- virtual ~RS_DEL_USER_NONIFIER() {}
- void Notify(const USER_PTR & user);
-
-private:
- REMOTE_SCRIPT & rs;
-};
-//-----------------------------------------------------------------------------
-template <typename varParamType>
-class RS_CHG_AFTER_NOTIFIER: public PROPERTY_NOTIFIER_BASE<varParamType> {
-public:
- RS_CHG_AFTER_NOTIFIER(REMOTE_SCRIPT & r, USER_PTR u) : user(u), rs(r) {}
- void Notify(const varParamType & oldValue, const varParamType & newValue);
- USER_PTR GetUser() {return user; }
-
-private:
- USER_PTR user;
- REMOTE_SCRIPT & rs;
-};
-//-----------------------------------------------------------------------------
-struct RS_USER {
-RS_USER();
-RS_USER(const std::vector<uint32_t> & r, USER_PTR it);
-
-time_t lastSentTime;
-USER_PTR user;
-std::vector<uint32_t> routers;
-int shortPacketsCount;
+struct USER
+{
+ USER(const std::vector<uint32_t> & r, UserPtr it)
+ : lastSentTime(0),
+ user(it),
+ routers(r),
+ shortPacketsCount(0),
+ ip(user->GetCurrIP())
+ {}
+
+ time_t lastSentTime;
+ UserPtr user;
+ std::vector<uint32_t> routers;
+ int shortPacketsCount;
+ uint32_t ip;