EPOE2.1 - Server administration helper and script debugging buddy

EPOE (Enhanced Perception Of Errors) is a debugging console for multiplayer.

EPOE has moved to GitHub: https://github.com/Metastruct/EPOE

SVN is still possible by checking out https://github.com/Metastruct/EPOE/trunk instead

Been using the version that Caps sent with the chatbox, I found the addon extremely useful when debugging :smiley:

Found errors I never knew existed (and have for like 6 months loL), not to mention it’s sexy and shows up only when there’s an error :eng101:

[editline]4th December 2011[/editline]

Awww :frowning:


Sorry, wrong url >.< Fixed now :v:

[sp]Also, damn you CapsAdmin and your weird release places. We have the svn so we could release stuff and not give out weird zip files :v:[/sp]

Awesome, using this! Thanks!

Things don’t always go too smoothly.

Fixed a startup mistake I couldn’t replicate while live testing: The GUI should work again and is now more clean from within the code plus more error resistant.
It also fixes the slightly odd scrollbar placement (it’s still odd but direction is better :p)

Enjoy :slight_smile:

Can you add some sort of filter? I’m sick of hearing how a weapon has an invalid position or whatever

Yeah the spam has been bothering me too so I guess I’ll set something up to block it.

[editline]6th December 2011[/editline]

I really dislike adding one more hook just to add this feature but it’s the cleanest way as we don’t have hook priorities by default.

[editline]6th December 2011[/editline]

Okay, after some testing I’ll commit a new hook called “ShouldEPOE” which takes the same parameters the normal hook does. If you return false in the hook the specific message won’t print.

Okay, I wasn’t THAT lazy. There’s now a file called epoe_filters.txt on data folder. The format is following:

Every string is trimmed from left, so tabs won’t matter.
Commenting is supported
^ in the beginning of a line means regex (I chose ^ because you can mark the beginning of a regex with it, it won’t use that for matching though so if you want to match the beginning of a line you need to write ^^ on the line)
"string" matches string on any part of the message, excluding the quotes.
! Matches full string and full string alone.

TODO: Add possibility to filter by message type (print/msg/error). This will requires radical rewrite of the format so I’ll probably have to rewrite this thing before I commit it…

Example file:

# Welcome to EPOE Filtering file
# ^REGEX = Regex match
# "STRING" = Find within string
# !STRING = Match full string
# -- = Comment

### Example filters ###
  # Filter the startup filters message
     "[EPOE] Filters: "


  # Filter EVERYTHING again


  # Filter empty strings

  # Ignore ignoring

Any comments on the format?

Commenting because python told me to.
Also because it’s totally awesome in connection with LuaDev and generally it gives me a boner.

I think I fixed beta compatibility. At least it doesn’t crash now.
What I did was write a quickfix for enginespew. If you don’t trust my modified module wait for chrisaster’s official fix.
And yes, linux only. Windows should work already.
What I did was write Linux compatibility for the code that was supposed to ignore all threads, 3 lines.

Still no comments on the EPOE’s filter format? Guess I’ll go test it then…

Anyone tested in beta? It should work mostly. Patches are accepted if something doesn’t work :v:

I forgot about this thread, sorry Python :(.

I’m updating my server now and will report back how filtering works (I am terrible with Regex, I cry to you and Caps whenever I try to use it)

Fixed a long term bug. Basically print(nil) will now print that nil :slight_smile:

Just a heads up for now. GMOD 13 version locates in svn:// but will move back to srvaddons right after gmod 13 is official

Bad news, EngineSpew and therefore EPOE won’t work with new Lua errors unless Garry does certain changes to his Lua errors:

I’ll look into alternative ways to grab the errors if Garry doesn’t do my request.

Right, compiled EngineSpew for linux srcds for gmod13. Sorry Windows people!
Made heuristics analysis for lua errors.
It’s taking wild guesses but is pretty good at them.

Should work pretty well for GMod13 now, except fonts. Suggest some font configs/names and I’ll add them.

Does that mean windows cannot use that or am I just retarded?

Windows cannot use it, for now. I’ll compile enginespew for windows right when I have time again.
Right now EPOE will work for Lua printing, but won’t display any errors since enginespew is required for that.


I uploaded a mega experimental windows build for GM13, haven’t tested it but if I didn’t forget to link something it should build.

Modified EngineSpew source code:

#include <tier0/dbg.h>

#include "ILuaModuleManager.h"

#ifdef _WIN32
	#include <Windows.h>
	#include <pthread.h>

GMOD_MODULE( Load, Shutdown );

SpewOutputFunc_t g_fnOldSpew = NULL;

// which thread
#ifdef _WIN32
	int g_iMainThread;
	pthread_t g_iMainThread;

ILuaInterface* gLua = NULL;
volatile bool inspew=false;
SpewRetval_t LuaSpew( SpewType_t spewType, const char *pMsg )
#ifdef _WIN32
	if ( GetCurrentThreadId() != g_iMainThread )
	if ( pthread_self() != g_iMainThread )
		return g_fnOldSpew( spewType, pMsg );

	if ( !pMsg || inspew )
		return g_fnOldSpew( spewType, pMsg );

	// test
	ILuaObject *hookTable = gLua->GetGlobal( "hook" );
	ILuaObject *hookCallFunc = hookTable->GetMember( "Call" );
	gLua->Push( hookCallFunc );

	gLua->Push( "EngineSpew" );


	gLua->Push( (double) spewType  );
	gLua->Push( pMsg  );
	gLua->Push( GetSpewOutputGroup()  );
	gLua->Push( (double) GetSpewOutputLevel() );

		gLua->Call( 6, 1 );



	ILuaObject *_return = gLua->GetReturn( 0 );

	bool isNil = _return->isNil();

	if ( !isNil )
	return g_fnOldSpew( spewType, pMsg );

int Load( lua_State *L )
	gLua = Lua();

#ifdef _WIN32
	g_iMainThread = GetCurrentThreadId();
	g_iMainThread = pthread_self();;

	g_fnOldSpew = GetSpewOutputFunc();

	SpewOutputFunc( LuaSpew );

	return 0;

int Shutdown( lua_State *L )
	// should we just disable our part of spewing?
	SpewOutputFunc( g_fnOldSpew );

	return 0;

I may be able to test it if I knew what to do :tinfoil:.
@dame If your so smart you do it.