fixed up bad includes

--HG--
extra : convert_revision : svn%3A39bc706e-5318-0410-9160-8a85361fbb7c/trunk%40305
This commit is contained in:
David Anderson 2007-01-16 20:36:09 +00:00
parent e4602813e8
commit 4a1c111350
3 changed files with 53 additions and 51 deletions

View File

@ -1,5 +1,9 @@
#include <time.h>
#include "sourcemod.h"
#include "sourcemm_api.h"
#include "CLogger.h" #include "CLogger.h"
#include "systems/Librarysys.h" #include "systems/Librarysys.h"
#include "sm_version.h"
CLogger g_Logger; CLogger g_Logger;
@ -293,4 +297,48 @@ void CLogger::_PrintToHL2Log(const char *fmt, va_list ap)
msg[len] = '\0'; msg[len] = '\0';
engine->LogPrint(msg); engine->LogPrint(msg);
} }
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;
}

View File

@ -1,12 +1,8 @@
#ifndef _INCLUDE_SOURCEMOD_CLOGGER_H_ #ifndef _INCLUDE_SOURCEMOD_CLOGGER_H_
#define _INCLUDE_SOURCEMOD_CLOGGER_H_ #define _INCLUDE_SOURCEMOD_CLOGGER_H_
#include "sm_globals.h"
#include <time.h>
#include "sourcemm_api.h"
#include <sh_string.h> #include <sh_string.h>
#include "sourcemod.h" #include "sm_globals.h"
#include "sm_version.h"
using namespace SourceHook; using namespace SourceHook;
@ -58,48 +54,4 @@ private:
extern CLogger g_Logger; extern CLogger g_Logger;
inline const char *CLogger::GetLogFileName(LogType type) const #endif // _INCLUDE_SOURCEMOD_CLOGGER_H_
{
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_

View File

@ -1,9 +1,11 @@
#include <stdarg.h> #include <stdarg.h>
#include <stdlib.h>
#include "CTranslator.h" #include "CTranslator.h"
#include "CLogger.h" #include "CLogger.h"
#include "CTextParsers.h" #include "CTextParsers.h"
#include "LibrarySys.h" #include "LibrarySys.h"
#include "sm_stringutil.h" #include "sm_stringutil.h"
#include "sourcemod.h"
CTranslator g_Translator; CTranslator g_Translator;