1.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000
1.2 +++ b/sourcemm/vsp_listener.h Sat Feb 10 00:31:34 2007 +0000
1.3 @@ -0,0 +1,49 @@
1.4 +/* ======== SourceMM ========
1.5 + * Copyright (C) 2004-2007 Metamod:Source Development Team
1.6 + * No warranties of any kind
1.7 + *
1.8 + * License: zlib/libpng
1.9 + *
1.10 + * Author(s): David "BAILOPAN" Anderson
1.11 + * ============================
1.12 + */
1.13 +
1.14 +#ifndef _INCLUDE_SOURCEMM_VSPLISTENER_H_
1.15 +#define _INCLUDE_SOURCEMM_VSPLISTENER_H_
1.16 +
1.17 +#include "sourcemm.h"
1.18 +#include "iserverplugin.h"
1.19 +
1.20 +class VSPListener : public IServerPluginCallbacks
1.21 +{
1.22 +public:
1.23 + VSPListener();
1.24 +public:
1.25 + virtual bool Load(CreateInterfaceFn interfaceFactory, CreateInterfaceFn gameServerFactory);
1.26 + virtual void Unload();
1.27 + virtual void Pause();
1.28 + virtual void UnPause();
1.29 + virtual const char *GetPluginDescription();
1.30 + virtual void LevelInit(char const *pMapName);
1.31 + virtual void ServerActivate(edict_t *pEdictList, int edictCount, int clientMax);
1.32 + virtual void GameFrame(bool simulating);
1.33 + virtual void LevelShutdown(void);
1.34 + virtual void ClientActive(edict_t *pEntity);
1.35 + virtual void ClientDisconnect(edict_t *pEntity);
1.36 + virtual void ClientPutInServer(edict_t *pEntity, char const *playername);
1.37 + virtual void SetCommandClient(int index);
1.38 + virtual void ClientSettingsChanged(edict_t *pEdict);
1.39 + virtual PLUGIN_RESULT ClientConnect(bool *bAllowConnect, edict_t *pEntity, const char *pszName, const char *pszAddress, char *reject, int maxrejectlen);
1.40 + virtual PLUGIN_RESULT ClientCommand(edict_t *pEntity);
1.41 + virtual PLUGIN_RESULT NetworkIDValidated(const char *pszUserName, const char *pszNetworkID);
1.42 +public:
1.43 + bool IsLoaded();
1.44 + void SetLoadable(bool loadable);
1.45 +private:
1.46 + bool m_Loaded;
1.47 + bool m_Loadable;
1.48 +};
1.49 +
1.50 +extern VSPListener g_VspListener;
1.51 +
1.52 +#endif //_INCLUDE_SOURCEMM_VSPLISTENER_H_