mirror of
https://github.com/alliedmodders/metamod-source.git
synced 2025-02-26 19:54:14 +01:00
updated changelog, added new formatting for meta list
--HG-- branch : sourcemm-1.4.3 extra : convert_revision : svn%3Ac2935e3e-5518-0410-8daf-afa5dab7d4e3/branches/sourcemm-1.4.3%40602
This commit is contained in:
parent
cf6b8f8378
commit
7cc4820b04
@ -665,3 +665,34 @@ void CPluginManager::UnregAllConCmds(CPlugin *pl)
|
|||||||
|
|
||||||
pl->m_Cmds.clear();
|
pl->m_Cmds.clear();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
const char *CPluginManager::GetStatusText(CPlugin *pl)
|
||||||
|
{
|
||||||
|
switch (pl->m_Status)
|
||||||
|
{
|
||||||
|
case Pl_NotFound:
|
||||||
|
return "NOFILE";
|
||||||
|
case Pl_Error:
|
||||||
|
return "ERROR";
|
||||||
|
case Pl_Refused:
|
||||||
|
return "FAILED";
|
||||||
|
case Pl_Paused:
|
||||||
|
return "PAUSED";
|
||||||
|
case Pl_Running:
|
||||||
|
{
|
||||||
|
if (pl->m_API && pl->m_API->QueryRunning(NULL, 0))
|
||||||
|
{
|
||||||
|
return "STOPPED";
|
||||||
|
} else {
|
||||||
|
return "RUNNING";
|
||||||
|
}
|
||||||
|
}
|
||||||
|
default:
|
||||||
|
return "-";
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
unsigned int CPluginManager::GetPluginCount()
|
||||||
|
{
|
||||||
|
return (unsigned int)m_Plugins.size();
|
||||||
|
}
|
||||||
|
@ -132,6 +132,8 @@ namespace SourceMM
|
|||||||
SourceHook::List<SourceMM::CPluginManager::CPlugin *>::iterator _end();
|
SourceHook::List<SourceMM::CPluginManager::CPlugin *>::iterator _end();
|
||||||
|
|
||||||
void SetVSPAsLoaded();
|
void SetVSPAsLoaded();
|
||||||
|
unsigned int GetPluginCount();
|
||||||
|
const char *CPluginManager::GetStatusText(CPlugin *pl);
|
||||||
private:
|
private:
|
||||||
//These are identical internal functions for the wrappers above.
|
//These are identical internal functions for the wrappers above.
|
||||||
CPlugin *_Load(const char *file, PluginId source, char *error, size_t maxlen);
|
CPlugin *_Load(const char *file, PluginId source, char *error, size_t maxlen);
|
||||||
|
@ -1,3 +1,10 @@
|
|||||||
|
2007/12/24 1.4.3:
|
||||||
|
- Metamod:Source can now be loaded via a .vdf instead of gameinfo.txt.
|
||||||
|
- Added new plugin loading mechanism via .vdf files in the metamod folder.
|
||||||
|
- Changed "meta list" output to look similar to Metamod:Source 1.6.
|
||||||
|
- Plugins which need a VSP pointer can now receive it on late load.
|
||||||
|
- Fixed a rare memory corruption bug in the CVector class.
|
||||||
|
|
||||||
2007/06/26 1.4.2:
|
2007/06/26 1.4.2:
|
||||||
- Fixed a bug where unloading all plugins could crash if one plugin had child plugins.
|
- Fixed a bug where unloading all plugins could crash if one plugin had child plugins.
|
||||||
|
|
||||||
|
@ -154,11 +154,11 @@ CON_COMMAND(meta, "Metamod:Source Menu")
|
|||||||
CONMSG("Metamod:Source version %s\n", SOURCEMM_VERSION);
|
CONMSG("Metamod:Source version %s\n", SOURCEMM_VERSION);
|
||||||
if (g_VspListener.IsRootLoadMethod())
|
if (g_VspListener.IsRootLoadMethod())
|
||||||
{
|
{
|
||||||
CONMSG("Load Method: Valve Server Plugin\n");
|
CONMSG("Loaded As: Valve Server Plugin\n");
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
CONMSG("Load Method: GameDLL (gameinfo.txt)\n");
|
CONMSG("Loaded As: GameDLL (gameinfo.txt)\n");
|
||||||
}
|
}
|
||||||
CONMSG("Compiled on: %s\n", SOURCEMM_DATE);
|
CONMSG("Compiled on: %s\n", SOURCEMM_DATE);
|
||||||
CONMSG("Plugin interface version: %d:%d\n", PLAPI_VERSION, PLAPI_MIN_VERSION);
|
CONMSG("Plugin interface version: %d:%d\n", PLAPI_VERSION, PLAPI_MIN_VERSION);
|
||||||
@ -208,58 +208,64 @@ CON_COMMAND(meta, "Metamod:Source Menu")
|
|||||||
|
|
||||||
return;
|
return;
|
||||||
} else if (strcmp(command, "list") == 0) {
|
} else if (strcmp(command, "list") == 0) {
|
||||||
SourceMM::CPluginManager::CPlugin *pl;
|
size_t len;
|
||||||
PluginIter i;
|
PluginIter i;
|
||||||
const char *status="";
|
char buffer[255];
|
||||||
const char *version=NULL;
|
ISmmPlugin *plapi;
|
||||||
const char *name=NULL;
|
const char *plname;
|
||||||
const char *author=NULL;
|
SourceMM::CPluginManager::CPlugin *pl;
|
||||||
|
unsigned int plnum = g_PluginMngr.GetPluginCount();
|
||||||
|
|
||||||
|
#define IS_STR_FILLED(var) (var != NULL && var[0] != '\0')
|
||||||
|
|
||||||
|
if (!plnum)
|
||||||
|
{
|
||||||
|
CONMSG("No plugins loaded.\n");
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
CONMSG("Listing %d plugin%s:\n", plnum, (plnum > 1) ? "s" : "");
|
||||||
|
}
|
||||||
|
|
||||||
CONMSG("-Id- %-20.19s %-10.9s %-20.19s %-8.7s\n", "Name", "Version", "Author", "Status");
|
|
||||||
for (i=g_PluginMngr._begin(); i!=g_PluginMngr._end(); i++)
|
for (i=g_PluginMngr._begin(); i!=g_PluginMngr._end(); i++)
|
||||||
{
|
{
|
||||||
pl = (*i);
|
pl = (*i);
|
||||||
if (!pl)
|
if (!pl)
|
||||||
|
{
|
||||||
break;
|
break;
|
||||||
if (pl->m_Status == Pl_Paused)
|
|
||||||
{
|
|
||||||
status = "PAUSE";
|
|
||||||
} else if (pl->m_Status == Pl_Running) {
|
|
||||||
if (pl->m_API && pl->m_API->QueryRunning(NULL, 0))
|
|
||||||
status = "RUN";
|
|
||||||
else
|
|
||||||
status = "STOPPED";
|
|
||||||
} else if (pl->m_Status == Pl_Refused) {
|
|
||||||
status = "FAIL";
|
|
||||||
} else if (pl->m_Status == Pl_Error) {
|
|
||||||
status = "ERROR";
|
|
||||||
} else if (pl->m_Status == Pl_NotFound) {
|
|
||||||
status = "NOFILE";
|
|
||||||
}
|
}
|
||||||
|
|
||||||
if (pl->m_API)
|
len = 0;
|
||||||
|
|
||||||
|
if (pl->m_Status != Pl_Running)
|
||||||
{
|
{
|
||||||
version = pl->m_API->GetVersion();
|
len += UTIL_Format(buffer, sizeof(buffer), " [%02d] <%s>", pl->m_Id, g_PluginMngr.GetStatusText(pl));
|
||||||
author = pl->m_API->GetAuthor();
|
}
|
||||||
name = pl->m_API->GetName();
|
else
|
||||||
} else {
|
{
|
||||||
version = "-";
|
len += UTIL_Format(buffer, sizeof(buffer), " [%02d]", pl->m_Id);
|
||||||
author = "-";
|
|
||||||
name = "-";
|
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!version)
|
if ((plapi = pl->m_API))
|
||||||
version = "-";
|
{
|
||||||
if (!author)
|
plname = IS_STR_FILLED(plapi->GetName()) ? plapi->GetName() : pl->m_File.c_str();
|
||||||
author = "-";
|
len += UTIL_Format(&buffer[len], sizeof(buffer)-len, " %s", plname);
|
||||||
if (!name)
|
|
||||||
name = pl->m_File.c_str();
|
|
||||||
|
|
||||||
|
if (IS_STR_FILLED(plapi->GetVersion()))
|
||||||
|
{
|
||||||
|
len += UTIL_Format(&buffer[len], sizeof(buffer)-len, " (%s)", plapi->GetVersion());
|
||||||
|
}
|
||||||
|
if (IS_STR_FILLED(plapi->GetAuthor()))
|
||||||
|
{
|
||||||
|
UTIL_Format(&buffer[len], sizeof(buffer)-len, " by %s", plapi->GetAuthor());
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
CONMSG("[%02d] %-20.19s %-10.9s %-20.19s %-8.7s\n", pl->m_Id, name, version, author, status);
|
CONMSG("%s\n", buffer);
|
||||||
}
|
}
|
||||||
|
|
||||||
//CONMSG("\n");
|
#undef IS_STR_FILLED
|
||||||
|
|
||||||
return;
|
return;
|
||||||
} else if (strcmp(command, "cmds") == 0) {
|
} else if (strcmp(command, "cmds") == 0) {
|
||||||
|
@ -5,9 +5,9 @@
|
|||||||
|
|
||||||
#define SVN_PRODUCT_VERSION "1.4.3"
|
#define SVN_PRODUCT_VERSION "1.4.3"
|
||||||
|
|
||||||
#define SVN_REVISION 600
|
#define SVN_REVISION 602
|
||||||
#define SVN_REVISION_STRING "600"
|
#define SVN_REVISION_STRING "602"
|
||||||
#define SVN_FILE_VERSION 1,4,3,600
|
#define SVN_FILE_VERSION 1,4,3,602
|
||||||
#define SVN_FILE_VERSION_STRING "1.4.3.600"
|
#define SVN_FILE_VERSION_STRING "1.4.3.602"
|
||||||
|
|
||||||
#endif //_INCLUDE_SVN_VERSION_H_
|
#endif //_INCLUDE_SVN_VERSION_H_
|
||||||
|
@ -173,6 +173,13 @@ bool VSPListener::Load(CreateInterfaceFn interfaceFactory, CreateInterfaceFn gam
|
|||||||
SH_ADD_HOOK_STATICFUNC(ConCommand, Dispatch, g_plugin_unload, InterceptPluginUnloads, false);
|
SH_ADD_HOOK_STATICFUNC(ConCommand, Dispatch, g_plugin_unload, InterceptPluginUnloads, false);
|
||||||
SH_ADD_HOOK_STATICFUNC(ConCommand, Dispatch, g_plugin_unload, InterceptPluginUnloads_Post, true);
|
SH_ADD_HOOK_STATICFUNC(ConCommand, Dispatch, g_plugin_unload, InterceptPluginUnloads_Post, true);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/* Ho ho ho... if we get here, set a new cvar version. */
|
||||||
|
extern ConVar metamod_version;
|
||||||
|
char buffer[255];
|
||||||
|
|
||||||
|
UTIL_Format(buffer, sizeof(buffer), "%sV", metamod_version.GetString());
|
||||||
|
metamod_version.SetValue(buffer);
|
||||||
}
|
}
|
||||||
|
|
||||||
m_Loaded = true;
|
m_Loaded = true;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user