Added macro so that ConCommands created with the SDK's CON_COMMAND and CON_COMMAND_F macros can be properly registered and unregisterd
1 /* ======== stub_mm ========
2 * Copyright (C) 2004-2005 Metamod:Source Development Team
3 * No warranties of any kind
7 * Author(s): David "BAILOPAN" Anderson
8 * ============================
14 StubPlugin g_StubPlugin;
16 PLUGIN_EXPOSE(SamplePlugin, g_StubPlugin);
18 //This has all of the necessary hook declarations. Read it!
19 #include "meta_hooks.h"
21 void ServerActivate_handler(edict_t *pEdictList, int edictCount, int clientMax)
23 META_LOG(g_PLAPI, "ServerActivate() called: edictCount=%d, clientMax=%d", edictCount, clientMax);
24 RETURN_META(MRES_IGNORED);
27 bool StubPlugin::Load(PluginId id, ISmmAPI *ismm, factories *list, char *error, size_t maxlen)
31 m_ServerDll = (IServerGameDLL *)((ismm->serverFactory())(INTERFACEVERSION_SERVERGAMEDLL, NULL));
35 snprintf(error, maxlen, "Could not find interface %s", INTERFACEVERSION_SERVERGAMEDLL);
39 SH_ADD_HOOK_STATICFUNC(IServerGameDLL, ServerActivate, m_ServerDll, ServerActivate_handler, true);
44 bool StubPlugin::Unload(char *error, size_t maxlen)
46 SH_REMOVE_HOOK_STATICFUNC(IServerGameDLL, ServerActivate, m_ServerDll, ServerActivate_handler, true);
51 bool StubPlugin::Pause(char *error, size_t maxlen)
56 bool StubPlugin::Unpause(char *error, size_t maxlen)
61 void StubPlugin::AllPluginsLoaded()
66 const char *StubPlugin::GetAuthor()
71 const char *StubPlugin::GetName()
76 const char *StubPlugin::GetDescription()
81 const char *StubPlugin::GetURL()
83 return "http://www.mysite.com/";
86 const char *StubPlugin::GetLicense()
91 const char *StubPlugin::GetVersion()
96 const char *StubPlugin::GetDate()
101 const char *StubPlugin::GetLogTag()