diff -r 4a937e6e6f11 -r 2b8c2ea08b6d sourcemm/episode2/provider_ep2.cpp --- a/sourcemm/episode2/provider_ep2.cpp Thu Oct 04 19:04:56 2007 +0000 +++ b/sourcemm/episode2/provider_ep2.cpp Thu Oct 04 19:18:19 2007 +0000 @@ -58,7 +58,6 @@ #undef CommandLine DLL_IMPORT ICommandLine *CommandLine(); /* Functions */ -CONPRINTF_FUNC ExtractRemotePrinter(void *addr); bool CacheUserMessages(); void ClientCommand(edict_t *pEdict, const CCommand &args); void LocalCommand_Meta(const CCommand &args); @@ -66,7 +65,6 @@ /* Variables */ bool usermsgs_extracted = false; CVector usermsgs_list; -CONPRINTF_FUNC echo_msg_func = NULL; ICvar *icvar = NULL; ISmmAPI *metamod_api = NULL; IVEngineServer *engine = NULL; @@ -81,14 +79,7 @@ void BaseProvider::ConsolePrint(const char *str) { - if (echo_msg_func != NULL) - { - ConMsg("%s", str); - } - else - { - Msg("%s", str); - } + ConMsg("%s", str); } void BaseProvider::Notify_DLLInit_Pre(void *gamedll, @@ -118,7 +109,6 @@ RegisterConCommandBase(&meta_local_cmd); conbases_unreg.push_back(&meta_local_cmd); - echo_msg_func = ExtractRemotePrinter(engineFactory); usermsgs_extracted = CacheUserMessages(); if (gameclients) @@ -141,7 +131,7 @@ bool BaseProvider::IsRemotePrintingAvailable() { - return (echo_msg_func != NULL); + return true; } void BaseProvider::ClientConsolePrint(edict_t *client, const char *message) @@ -428,46 +418,6 @@ return true; } -/* :TODO: I hope we can get rid of this in the future */ -CONPRINTF_FUNC ExtractRemotePrinter(void *addr) -{ - char path[256+10]; - if (!GetFileOfAddress(addr, path, sizeof(path))) - { - return NULL; - } - - char *ptr = NULL; -#if defined __linux__ - ptr = strstr(path, "engine_i486.so"); -#else - ptr = strstr(path, "engine.dll"); -#endif - - if (ptr == NULL) - { - return NULL; - } - -#if defined __linux__ - strcpy(ptr, "tier0_i486.so"); -#else - strcpy(ptr, "tier0.dll"); -#endif - - HINSTANCE handle = dlmount(path); - if (handle == NULL) - { - return NULL; - } - - void *func = dlsym(handle, "ConMsg"); - - dlclose(handle); - - return (CONPRINTF_FUNC)func; -} - ////////////////////////////////////////////////////////////////////// // EVEN MORE HACKS HERE! YOU HAVE BEEN WARNED! // // Signatures necessary in finding the pointer to the CUtlDict that //