X-Git-Url: https://git.stg.codes/stg.git/blobdiff_plain/ebd170a764ab9660adee464588cda1801c7986b4..46d0fa38003ef0b122fea77dfaa252fa832cb5a3:/projects/stargazer/plugins/other/radius/radius.h?ds=inline

diff --git a/projects/stargazer/plugins/other/radius/radius.h b/projects/stargazer/plugins/other/radius/radius.h
index 4cc84e26..4e06e463 100644
--- a/projects/stargazer/plugins/other/radius/radius.h
+++ b/projects/stargazer/plugins/other/radius/radius.h
@@ -1,7 +1,11 @@
 #pragma once
 
 #include "stg/auth.h"
+#include "stg/logger.h"
+
 #include <string>
+#include <mutex>
+#include <jthread.hpp>
 
 namespace STG
 {
@@ -10,12 +14,13 @@ namespace STG
         public:
             RADIUS();
 
-            int Start() override { return 0; }
-            int Stop() override { return 0; }
+            int Start() override;
+            int Stop() override;
             int Reload(const ModuleSettings & /*ms*/) override { return 0; }
-            bool IsRunning() override { return isRunning; }
+            bool IsRunning() override;
+            void SetRunning(bool val);
             int ParseSettings() override { return 0; }
-            const std::string & GetStrError() const override { return errorStr; }
+            const std::string & GetStrError() const override { return m_errorStr; }
             std::string GetVersion() const override;
             uint16_t GetStartPosition() const override { return 0; }
             uint16_t GetStopPosition() const override { return 0; }
@@ -23,8 +28,12 @@ namespace STG
             int SendMessage(const Message & msg, uint32_t ip) const override { return 0; }
 
         private:
-            mutable std::string errorStr;
-            bool isRunning;
+            std::mutex m_mutex;
+            mutable std::string m_errorStr;
+            std::jthread m_thread;
+            bool m_running;
+            PluginLogger m_logger;
 
+            int Run(std::stop_token token);
     };
 }