diff options
| author | FluorescentCIAAfricanAmerican <[email protected]> | 2020-04-22 12:56:21 -0400 |
|---|---|---|
| committer | FluorescentCIAAfricanAmerican <[email protected]> | 2020-04-22 12:56:21 -0400 |
| commit | 3bf9df6b2785fa6d951086978a3e66f49427166a (patch) | |
| tree | 2c0f1f0c63c4832882bc93814ebd2c2b1c6224e5 /game/server/tfc/tfc_eventlog.cpp | |
| download | archived-source-engine-2018-hl2-src-master.tar.xz archived-source-engine-2018-hl2-src-master.zip | |
Diffstat (limited to 'game/server/tfc/tfc_eventlog.cpp')
| -rw-r--r-- | game/server/tfc/tfc_eventlog.cpp | 56 |
1 files changed, 56 insertions, 0 deletions
diff --git a/game/server/tfc/tfc_eventlog.cpp b/game/server/tfc/tfc_eventlog.cpp new file mode 100644 index 0000000..a75fa45 --- /dev/null +++ b/game/server/tfc/tfc_eventlog.cpp @@ -0,0 +1,56 @@ +//========= Copyright Valve Corporation, All rights reserved. ============// +// +// Purpose: +// +// $NoKeywords: $ +// +//=============================================================================// +#include "cbase.h" +#include "../EventLog.h" +#include "KeyValues.h" + +class CTFCEventLog : public CEventLog +{ +private: + typedef CEventLog BaseClass; + +public: + virtual ~CTFCEventLog() {}; + +public: + bool PrintEvent( KeyValues * event ) // override virtual function + { + if ( BaseClass::PrintEvent( event ) ) + { + return true; + } + + if ( Q_strcmp(event->GetName(), "cstrike_") == 0 ) + { + return PrintCStrikeEvent( event ); + } + + return false; + } + +protected: + + bool PrintCStrikeEvent( KeyValues * event ) // print Mod specific logs + { + // const char * name = event->GetName() + Q_strlen("cstrike_"); // remove prefix + + return false; + } + +}; + +CTFCEventLog g_TFCEventLog; + +//----------------------------------------------------------------------------- +// Singleton access +//----------------------------------------------------------------------------- +IGameSystem* GameLogSystem() +{ + return &g_TFCEventLog; +} + |