]> git.stg.codes - stg.git/blobdiff - projects/stargazer/plugins/other/radius/radius.cpp
Tariff users table index fixed
[stg.git] / projects / stargazer / plugins / other / radius / radius.cpp
index afcc46fd65d446265436146d47211e8a2f098f26..1dfff791afe4eb386a19ee0d34f19aebbdb17611 100644 (file)
@@ -34,6 +34,7 @@
 #include "stg/common.h"
 #include "stg/user_conf.h"
 #include "stg/user_property.h"
+#include "stg/plugin_creator.h"
 #include "radius.h"
 
 extern volatile const time_t stgTime;
@@ -45,29 +46,7 @@ void Encrypt(BLOWFISH_CTX * ctx, char * dst, const char * src, int len8);
 //-----------------------------------------------------------------------------
 //-----------------------------------------------------------------------------
 //-----------------------------------------------------------------------------
-class RAD_CREATOR {
-private:
-    RADIUS * rad;
-
-public:
-    RAD_CREATOR()
-        : rad(new RADIUS())
-        {
-        }
-    ~RAD_CREATOR()
-        {
-        delete rad;
-        }
-
-    RADIUS * GetPlugin()
-        {
-        return rad;
-        }
-};
-//-----------------------------------------------------------------------------
-//-----------------------------------------------------------------------------
-//-----------------------------------------------------------------------------
-RAD_CREATOR radc;
+PLUGIN_CREATOR<RADIUS> radc;
 //-----------------------------------------------------------------------------
 //-----------------------------------------------------------------------------
 //-----------------------------------------------------------------------------