1
0
mirror of https://github.com/alliedmodders/metamod-source.git synced 2024-11-30 12:24:20 +01:00
HLMetaModOfficial/sourcemm/vsp_listener.cpp
David Anderson 0f5c4ca912 added experimental API for hooking VSP interface calls
updated file license headers

--HG--
extra : convert_revision : svn%3Ac2935e3e-5518-0410-8daf-afa5dab7d4e3/trunk%40332
2007-02-10 00:31:34 +00:00

124 lines
2.1 KiB
C++

/* ======== SourceMM ========
* Copyright (C) 2004-2007 Metamod:Source Development Team
* No warranties of any kind
*
* License: zlib/libpng
*
* Author(s): David "BAILOPAN" Anderson
* ============================
*/
#include "vsp_listener.h"
VSPListener g_VspListener;
VSPListener::VSPListener()
{
m_Loaded = false;
m_Loadable = false;
}
void VSPListener::ClientActive(edict_t *pEntity)
{
}
PLUGIN_RESULT VSPListener::ClientCommand(edict_t *pEntity)
{
return PLUGIN_CONTINUE;
}
PLUGIN_RESULT VSPListener::ClientConnect(bool *bAllowConnect, edict_t *pEntity, const char *pszName, const char *pszAddress, char *reject, int maxrejectlen)
{
return PLUGIN_CONTINUE;
}
void VSPListener::ClientDisconnect(edict_t *pEntity)
{
}
void VSPListener::ClientPutInServer(edict_t *pEntity, char const *playername)
{
}
void VSPListener::ClientSettingsChanged(edict_t *pEdict)
{
}
void VSPListener::SetCommandClient(int index)
{
}
void VSPListener::GameFrame(bool simulating)
{
}
const char *VSPListener::GetPluginDescription()
{
return "Metamod:Source Interface v" SOURCEMM_VERSION;
}
bool VSPListener::IsLoaded()
{
return m_Loaded;
}
void VSPListener::LevelInit(char const *pMapName)
{
}
void VSPListener::LevelShutdown()
{
}
PLUGIN_RESULT VSPListener::NetworkIDValidated(const char *pszUserName, const char *pszNetworkID)
{
return PLUGIN_CONTINUE;
}
void VSPListener::Pause()
{
}
void VSPListener::UnPause()
{
}
void VSPListener::ServerActivate(edict_t *pEdictList, int edictCount, int clientMax)
{
}
void VSPListener::Unload()
{
}
void VSPListener::SetLoadable(bool set)
{
m_Loadable = set;
}
bool VSPListener::Load(CreateInterfaceFn interfaceFactory, CreateInterfaceFn gameServerFactory)
{
if (!g_GameDll.loaded)
{
Error("Metamod:Source is not a Valve Server Plugin\n");
return false;
}
if (!m_Loadable)
{
Warning("Do not manually load Metamod:Source as a Valve Server Plugin\n");
return false;
}
if (m_Loaded)
{
return false;
}
m_Loaded = true;
return true;
}