sourcemm/vsp_listener.h
author Pavol Marko <pavolmarko@gmail.com>
Sat May 12 09:03:57 2007 +0000 (2007-05-12)
changeset 331 40467046ea05
parent 282 7a237e9ea5a1
permissions -rw-r--r--
no comment
     1 /* ======== SourceMM ========
     2  * Copyright (C) 2004-2007 Metamod:Source Development Team
     3  * No warranties of any kind
     4  *
     5  * License: zlib/libpng
     6  *
     7  * Author(s): David "BAILOPAN" Anderson
     8  * ============================
     9  */
    10 
    11 #ifndef _INCLUDE_SOURCEMM_VSPLISTENER_H_
    12 #define _INCLUDE_SOURCEMM_VSPLISTENER_H_
    13 
    14 #include "sourcemm.h"
    15 #include "iserverplugin.h"
    16 
    17 class VSPListener : public IServerPluginCallbacks
    18 {
    19 public:
    20 	VSPListener();
    21 public:
    22 	virtual bool Load(CreateInterfaceFn interfaceFactory, CreateInterfaceFn gameServerFactory);
    23 	virtual void Unload();
    24 	virtual void Pause();
    25 	virtual void UnPause();
    26 	virtual const char *GetPluginDescription();
    27 	virtual void LevelInit(char const *pMapName);
    28 	virtual void ServerActivate(edict_t *pEdictList, int edictCount, int clientMax);
    29 	virtual void GameFrame(bool simulating);
    30 	virtual void LevelShutdown(void);
    31 	virtual void ClientActive(edict_t *pEntity);
    32 	virtual void ClientDisconnect(edict_t *pEntity);
    33 	virtual void ClientPutInServer(edict_t *pEntity, char const *playername);
    34 	virtual void SetCommandClient(int index);
    35 	virtual void ClientSettingsChanged(edict_t *pEdict);
    36 	virtual PLUGIN_RESULT ClientConnect(bool *bAllowConnect, edict_t *pEntity, const char *pszName, const char *pszAddress, char *reject, int maxrejectlen);
    37 	virtual PLUGIN_RESULT ClientCommand(edict_t *pEntity);
    38 	virtual PLUGIN_RESULT NetworkIDValidated(const char *pszUserName, const char *pszNetworkID);
    39 public:
    40 	bool IsLoaded();
    41 	void SetLoadable(bool loadable);
    42 private:
    43 	bool m_Loaded;
    44 	bool m_Loadable;
    45 };
    46 
    47 extern VSPListener g_VspListener;
    48 
    49 #endif //_INCLUDE_SOURCEMM_VSPLISTENER_H_