summaryrefslogtreecommitdiff
path: root/game/server/tfc/tfc_eventlog.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'game/server/tfc/tfc_eventlog.cpp')
-rw-r--r--game/server/tfc/tfc_eventlog.cpp56
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;
+}
+