diff --git a/core/CLogger.cpp b/core/CLogger.cpp index c6a6bb71..1c2bb2bb 100644 --- a/core/CLogger.cpp +++ b/core/CLogger.cpp @@ -1,5 +1,9 @@ +#include +#include "sourcemod.h" +#include "sourcemm_api.h" #include "CLogger.h" #include "systems/Librarysys.h" +#include "sm_version.h" CLogger g_Logger; @@ -293,4 +297,48 @@ void CLogger::_PrintToHL2Log(const char *fmt, va_list ap) msg[len] = '\0'; engine->LogPrint(msg); -} \ No newline at end of file +} + +const char *CLogger::GetLogFileName(LogType type) const +{ + switch (type) + { + case LogType_Normal: + { + return m_NrmFileName.c_str(); + } + case LogType_Error: + { + return m_ErrFileName.c_str(); + } + default: + { + return ""; + } + } +} + +LoggingMode CLogger::GetLoggingMode() const +{ + return m_mode; +} + +void CLogger::EnableLogging() +{ + if (m_Active) + { + return; + } + m_Active = true; + LogMessage("Logging enabled manually by user."); +} + +void CLogger::DisableLogging() +{ + if (!m_Active) + { + return; + } + LogMessage("Logging disabled manually by user."); + m_Active = false; +} diff --git a/core/CLogger.h b/core/CLogger.h index e08a8cb8..89ad0175 100644 --- a/core/CLogger.h +++ b/core/CLogger.h @@ -1,12 +1,8 @@ #ifndef _INCLUDE_SOURCEMOD_CLOGGER_H_ #define _INCLUDE_SOURCEMOD_CLOGGER_H_ -#include "sm_globals.h" -#include -#include "sourcemm_api.h" #include -#include "sourcemod.h" -#include "sm_version.h" +#include "sm_globals.h" using namespace SourceHook; @@ -58,48 +54,4 @@ private: extern CLogger g_Logger; -inline const char *CLogger::GetLogFileName(LogType type) const -{ - switch (type) - { - case LogType_Normal: - { - return m_NrmFileName.c_str(); - } - case LogType_Error: - { - return m_ErrFileName.c_str(); - } - default: - { - return ""; - } - } -} - -inline LoggingMode CLogger::GetLoggingMode() const -{ - return m_mode; -} - -inline void CLogger::EnableLogging() -{ - if (m_Active) - { - return; - } - m_Active = true; - LogMessage("Logging enabled manually by user."); -} - -inline void CLogger::DisableLogging() -{ - if (!m_Active) - { - return; - } - LogMessage("Logging disabled manually by user."); - m_Active = false; -} - -#endif // _INCLUDE_SOURCEMOD_CLOGGER_H_ \ No newline at end of file +#endif // _INCLUDE_SOURCEMOD_CLOGGER_H_ diff --git a/core/CTranslator.cpp b/core/CTranslator.cpp index 723a984a..80caa037 100644 --- a/core/CTranslator.cpp +++ b/core/CTranslator.cpp @@ -1,9 +1,11 @@ #include +#include #include "CTranslator.h" #include "CLogger.h" #include "CTextParsers.h" #include "LibrarySys.h" #include "sm_stringutil.h" +#include "sourcemod.h" CTranslator g_Translator;