]> git.stg.codes - stg.git/blobdiff - projects/stargazer/plugins/authorization/inetaccess/inetaccess.h
Headers moved to subdir stg
[stg.git] / projects / stargazer / plugins / authorization / inetaccess / inetaccess.h
index 7bc704db8f7d0db62406996783522a5fc9422cbf..2d932d54c1ba519f5495256c49762b47ba54a958 100644 (file)
@@ -118,7 +118,8 @@ private:
 //-----------------------------------------------------------------------------
 struct IA_USER {
     IA_USER()
-        : lastSendAlive(0),
+        : user(NULL),
+          lastSendAlive(0),
           rnd(random()),
           port(0),
           protoVer(0),
@@ -185,8 +186,20 @@ private:
     FREEMB          freeMbShowType;
 };
 //-----------------------------------------------------------------------------
+class AUTH_IA;
+//-----------------------------------------------------------------------------
+class DEL_USER_NOTIFIER: public NOTIFIER_BASE<USER_PTR> {
+public:
+    DEL_USER_NOTIFIER(AUTH_IA & a) : auth(a) {}
+    virtual ~DEL_USER_NOTIFIER() {}
+
+    void Notify(const USER_PTR & user);
+private:
+    AUTH_IA & auth;
+};
+//-----------------------------------------------------------------------------
 class AUTH_IA :public AUTH {
-friend class DEL_USER_NONIFIER;
+friend class DEL_USER_NOTIFIER;
 public:
                         AUTH_IA();
     virtual             ~AUTH_IA();
@@ -316,19 +329,7 @@ private:
 
     uint32_t            enabledDirs;
 
-    class DEL_USER_NONIFIER: public NOTIFIER_BASE<USER_PTR> {
-    public:
-        DEL_USER_NONIFIER(AUTH_IA & a) : auth(a) {}
-        virtual ~DEL_USER_NONIFIER() {}
-
-        void Notify(const USER_PTR & user)
-            {
-            auth.DelUser(user);
-            }
-
-    private:
-        AUTH_IA & auth;
-    } onDelUserNotifier;
+    DEL_USER_NOTIFIER   onDelUserNotifier;
 
     class UnauthorizeUser : std::unary_function<const std::pair<uint32_t, IA_USER> &, void> {
         public:
@@ -343,5 +344,10 @@ private:
 
 };
 //-----------------------------------------------------------------------------
+inline
+void DEL_USER_NOTIFIER::Notify(const USER_PTR & user)
+{
+    auth.DelUser(user);
+}
 
 #endif