Compare commits
58
Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
5a2852755d | ||
|
|
946e4ab58a | ||
|
|
71e89f75ae | ||
|
|
f0be909d31 | ||
|
|
f31969dbc4 | ||
|
|
94c4b4c691 | ||
|
|
09a80ee8c1 | ||
|
|
2cf9140ecf | ||
|
|
3e8077d59c | ||
|
|
1c975da26f | ||
|
|
fbc29dce23 | ||
|
|
cc0f68f94e | ||
|
|
2d78224b91 | ||
|
|
0bd866d9b5 | ||
|
|
ed51e958e0 | ||
|
|
f74aed3db2 | ||
|
|
2e8282dab5 | ||
|
|
2ab49e966a | ||
|
|
b364544776 | ||
|
|
c791f7f720 | ||
|
|
18bec9f901 | ||
|
|
39c3ad0194 | ||
|
|
d6cd6bd5a9 | ||
|
|
f2dd5f6914 | ||
|
|
3754c63e24 | ||
|
|
28c4f423b0 | ||
|
|
82d949b34e | ||
|
|
775d22a5ca | ||
|
|
8968f50577 | ||
|
|
7d42655e8f | ||
|
|
e6a84801d2 | ||
|
|
b58e7177ed | ||
|
|
6e0f4ee665 | ||
|
|
ab690bfdd9 | ||
|
|
b21b24830e | ||
|
|
e6cec6528c | ||
|
|
1c08ddc939 | ||
|
|
bc6b3495be | ||
|
|
83b59da392 | ||
|
|
53fc8657bf | ||
|
|
a4bf30ac1b | ||
|
|
82cb558335 | ||
|
|
50327a252a | ||
|
|
954a130d07 | ||
|
|
a17b0abfe4 | ||
|
|
93d0362a70 | ||
|
|
7eafc21a47 | ||
|
|
8c36966d89 | ||
|
|
299a17cd26 | ||
|
|
3edc824bc2 | ||
|
|
22ec5c2e71 | ||
|
|
c337bc512c | ||
|
|
42f01878f4 | ||
|
|
995a0545a9 | ||
|
|
59b64ff19f | ||
|
|
f1f4b3df44 | ||
|
|
af813cc71c | ||
|
|
65a98212a7 |
@@ -0,0 +1,75 @@
|
||||
SourceMod Changelog
|
||||
|
||||
----------------------------
|
||||
|
||||
SourceMod 1.0.3 [2008-06-21]
|
||||
|
||||
Changes:
|
||||
|
||||
- Fixed SDKTools compatibility for latest TF2 update.
|
||||
- Fixed amb1750: OnAutoConfigsBuffered() inserted before "exec server.cfg".
|
||||
- Fixed a logic bug where OnConfigsExecuted() could be executed before "exec server.cfg" finished.
|
||||
- Fixed a rare crash in the event manager that manifested on Zombie Panic! Source.
|
||||
|
||||
----------------------------
|
||||
|
||||
SourceMod 1.0.2 [2008-05-31]
|
||||
|
||||
Changes:
|
||||
|
||||
- The admin menu is now user-modifiable (the "Dynamic Admin Menu").
|
||||
- Added a TF2 extension with Team Fortress functions.
|
||||
- Added a RegEx extension with regular expression functions.
|
||||
- Added functions to SDKTools for hooking entity outputs.
|
||||
- Added preliminary support for the DoD:S Orange Box beta.
|
||||
- Added a forward for map config plugins for preventing race conditions.
|
||||
- Added a %b format specifier for binary printing.
|
||||
- Added sm_dump_datamaps command (SDKTools) for enumerating datamap properties.
|
||||
- Added sm_dump_admcache command for debugging the admin cache.
|
||||
- Added amb1715 - TraceHull functions to SDKTools (complementing TraceRay).
|
||||
- Added amb1694 - FindCharInString() function.
|
||||
- Added amb1685 - GetTickInterval() function.
|
||||
- Added amb1620 - ActivateEntity() function to SDKTools (for Orange Box particle system).
|
||||
- Added amb1610 - StripQuotes() function.
|
||||
- Added amb1558 - Compiler now has __BINARY_PATH__ and __BINARY_FILE__ macros.
|
||||
- Fixed amb1686 - ReplaceString* with an empty search string crashed; it now throws an error.
|
||||
- Fixed amb1684 - Blank passwords required an empty but set password.
|
||||
- Fixed amb1595 - Extension load failures did not show a platform error message.
|
||||
- Fixed amb1583 - MySQL string fetch from prepared queries returned corrupted data.
|
||||
- Fixed amb1358 - Timeleft did not reset on TF2 restarts.
|
||||
- Fixed cases where the JIT was too cautious in space optimizations.
|
||||
- Fixed TF2/Cstrike extensions being loadable on incompatible games.
|
||||
- Fixed various documentation inconsistencies and typos.
|
||||
- Fixed internal bugs with file extension handling.
|
||||
|
||||
Notes:
|
||||
|
||||
There is a possible compatibility regression from amb1684. SetAdminPassword()
|
||||
has been modified to remove any set password when given an empty string. Previously,
|
||||
a blank password ("") would force an admin to use "setinfo" to set an empty password,
|
||||
but this functionality was deemed unuseful and unintended. Blank passwords now
|
||||
remove any set password.
|
||||
|
||||
----------------------------
|
||||
|
||||
SourceMod 1.0.1 [2008-05-20]
|
||||
|
||||
Changes:
|
||||
|
||||
- Fixed SDKTools compatibility for latest TF2 update.
|
||||
- Removed GivePlayerItem from TF2 (TF2 update broke functionality).
|
||||
- Fixed amb1688: GivePlayerItem offset was wrong for DoD:S Linux.
|
||||
- Fixed amb1657: Server console did not see admin version of sm_who.
|
||||
- Fixed amb1648: Stack corruption from GetClientEyeAngles() on Windows.
|
||||
- Fixed amb1646: NetFlow_Both did not work for client network statistics.
|
||||
- Fixed amb1601: Vote FF menu reading from sv_alltalk cvar instead of mp_friendlyfire.
|
||||
- Fixed amb1591: Fixed listen server crashes on mods like IOS:S which pre-add more than one bot.
|
||||
- Fixed amb1586: GetTeamName() could crash the server if called on load.
|
||||
- Fixed mapchooser's round counting for TF2.
|
||||
- Fixed a bug where an RTE on plugin load would throw a message referring to the plugin as "-1".
|
||||
- Symbols are no longer stripped on Linux.
|
||||
- Minor SourceMod SDK fixes.
|
||||
|
||||
Notes:
|
||||
|
||||
The extension interface version has been bumped. Any extensions compiled against 1.0.1 will require 1.0.1 or higher to run. Extensions against 1.0.0 will continue to run normally.
|
||||
@@ -162,8 +162,6 @@ private:
|
||||
|
||||
c -= (unsigned)'a';
|
||||
|
||||
assert(c >= 0 && c < 26);
|
||||
|
||||
if (!g_Admins.FindFlag(key, &g_FlagLetters[c]))
|
||||
{
|
||||
ParseError(states, "Unrecognized admin level \"%s\"", key);
|
||||
|
||||
+26
-1
@@ -296,7 +296,32 @@ void ConCmdManager::InternalDispatch(const CCommand &command)
|
||||
ConCmdInfo *pInfo;
|
||||
if (!sm_trie_retrieve(m_pCmds, cmd, (void **)&pInfo))
|
||||
{
|
||||
return;
|
||||
/* Unfortunately, we now have to do a slow lookup because Valve made client commands
|
||||
* case-insensitive. We can't even use our sortedness.
|
||||
*/
|
||||
if (client == 0 && !engine->IsDedicatedServer())
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
List<ConCmdInfo *>::iterator iter;
|
||||
|
||||
pInfo = NULL;
|
||||
iter = m_CmdList.begin();
|
||||
while (iter != m_CmdList.end())
|
||||
{
|
||||
if (strcasecmp((*iter)->pCmd->GetName(), cmd) == 0)
|
||||
{
|
||||
pInfo = (*iter);
|
||||
break;
|
||||
}
|
||||
iter++;
|
||||
}
|
||||
|
||||
if (pInfo == NULL)
|
||||
{
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
/* This is a hack to prevent say triggers from firing on messages that were
|
||||
|
||||
+112
-5
@@ -2,7 +2,7 @@
|
||||
* vim: set ts=4 :
|
||||
* =============================================================================
|
||||
* SourceMod
|
||||
* Copyright (C) 2004-2007 AlliedModders LLC. All rights reserved.
|
||||
* Copyright (C) 2004-2008 AlliedModders LLC. All rights reserved.
|
||||
* =============================================================================
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify it under
|
||||
@@ -40,6 +40,7 @@
|
||||
#include "Logger.h"
|
||||
#include "PluginSys.h"
|
||||
#include "ForwardSys.h"
|
||||
#include "frame_hooks.h"
|
||||
|
||||
#ifdef PLATFORM_WINDOWS
|
||||
ConVar sm_corecfgfile("sm_corecfgfile", "addons\\sourcemod\\configs\\core.cfg", 0, "SourceMod core configuration file");
|
||||
@@ -52,6 +53,63 @@ IForward *g_pOnConfigsExecuted = NULL;
|
||||
IForward *g_pOnAutoConfigsBuffered = NULL;
|
||||
CoreConfig g_CoreConfig;
|
||||
bool g_bConfigsExecd = false;
|
||||
bool g_bServerExecd = false;
|
||||
bool g_bGotServerStart = false;
|
||||
bool g_bGotTrigger = false;
|
||||
ConCommand *g_pExecPtr = NULL;
|
||||
ConVar *g_ServerCfgFile = NULL;
|
||||
|
||||
void CheckAndFinalizeConfigs();
|
||||
|
||||
#if defined ORANGEBOX_BUILD
|
||||
SH_DECL_EXTERN1_void(ConCommand, Dispatch, SH_NOATTRIB, false, const CCommand &);
|
||||
void Hook_ExecDispatchPre(const CCommand &cmd)
|
||||
#else
|
||||
extern bool __SourceHook_FHAddConCommandDispatch(void *,bool,class fastdelegate::FastDelegate0<void>);
|
||||
extern bool __SourceHook_FHRemoveConCommandDispatch(void *,bool,class fastdelegate::FastDelegate0<void>);
|
||||
void Hook_ExecDispatchPre()
|
||||
#endif
|
||||
{
|
||||
#if !defined ORANGEBOX_BUILD
|
||||
CCommand cmd;
|
||||
#endif
|
||||
|
||||
const char *arg = cmd.Arg(1);
|
||||
|
||||
if (!g_bServerExecd
|
||||
&& arg != NULL
|
||||
&& strcmp(arg, g_ServerCfgFile->GetString()) == 0)
|
||||
{
|
||||
g_bGotTrigger = true;
|
||||
}
|
||||
}
|
||||
|
||||
#if defined ORANGEBOX_BUILD
|
||||
void Hook_ExecDispatchPost(const CCommand &cmd)
|
||||
#else
|
||||
void Hook_ExecDispatchPost()
|
||||
#endif
|
||||
{
|
||||
if (g_bGotTrigger)
|
||||
{
|
||||
g_bGotTrigger = false;
|
||||
g_bServerExecd = true;
|
||||
CheckAndFinalizeConfigs();
|
||||
}
|
||||
}
|
||||
|
||||
void CheckAndFinalizeConfigs()
|
||||
{
|
||||
if ((g_bServerExecd || g_ServerCfgFile == NULL)
|
||||
&& g_bGotServerStart)
|
||||
{
|
||||
#if defined ORANGEBOX_BUILD
|
||||
g_PendingInternalPush = true;
|
||||
#else
|
||||
SM_InternalCmdTrigger();
|
||||
#endif
|
||||
}
|
||||
}
|
||||
|
||||
void CoreConfig::OnSourceModAllInitialized()
|
||||
{
|
||||
@@ -67,11 +125,52 @@ void CoreConfig::OnSourceModShutdown()
|
||||
g_Forwards.ReleaseForward(g_pOnServerCfg);
|
||||
g_Forwards.ReleaseForward(g_pOnConfigsExecuted);
|
||||
g_Forwards.ReleaseForward(g_pOnAutoConfigsBuffered);
|
||||
|
||||
if (g_pExecPtr != NULL)
|
||||
{
|
||||
SH_REMOVE_HOOK_STATICFUNC(ConCommand, Dispatch, g_pExecPtr, Hook_ExecDispatchPre, false);
|
||||
SH_REMOVE_HOOK_STATICFUNC(ConCommand, Dispatch, g_pExecPtr, Hook_ExecDispatchPost, true);
|
||||
g_pExecPtr = NULL;
|
||||
}
|
||||
}
|
||||
|
||||
void CoreConfig::OnSourceModLevelChange(const char *mapName)
|
||||
{
|
||||
static bool already_checked = false;
|
||||
|
||||
if (!already_checked)
|
||||
{
|
||||
g_ServerCfgFile = icvar->FindVar("servercfgfile");
|
||||
if (g_ServerCfgFile != NULL)
|
||||
{
|
||||
ConCommandBase *pBase = icvar->GetCommands();
|
||||
while (pBase != NULL)
|
||||
{
|
||||
if (pBase->IsCommand() && strcmp(pBase->GetName(), "exec") == 0)
|
||||
{
|
||||
break;
|
||||
}
|
||||
pBase = const_cast<ConCommandBase *>(pBase->GetNext());
|
||||
}
|
||||
|
||||
g_pExecPtr = (ConCommand *)pBase;
|
||||
if (g_pExecPtr != NULL)
|
||||
{
|
||||
SH_ADD_HOOK_STATICFUNC(ConCommand, Dispatch, g_pExecPtr, Hook_ExecDispatchPre, false);
|
||||
SH_ADD_HOOK_STATICFUNC(ConCommand, Dispatch, g_pExecPtr, Hook_ExecDispatchPost, true);
|
||||
}
|
||||
else
|
||||
{
|
||||
g_ServerCfgFile = NULL;
|
||||
}
|
||||
}
|
||||
already_checked = true;
|
||||
}
|
||||
|
||||
g_bConfigsExecd = false;
|
||||
g_bServerExecd = false;
|
||||
g_bGotServerStart = false;
|
||||
g_bGotTrigger = false;
|
||||
}
|
||||
|
||||
void CoreConfig::OnRootConsoleCommand(const char *cmdname, const CCommand &command)
|
||||
@@ -385,7 +484,7 @@ void SM_ExecuteForPlugin(IPluginContext *ctx)
|
||||
|
||||
void SM_ExecuteAllConfigs()
|
||||
{
|
||||
if (g_bConfigsExecd)
|
||||
if (g_bGotServerStart)
|
||||
{
|
||||
return;
|
||||
}
|
||||
@@ -406,9 +505,8 @@ void SM_ExecuteAllConfigs()
|
||||
}
|
||||
iter->Release();
|
||||
|
||||
g_pOnAutoConfigsBuffered->Execute(NULL);
|
||||
|
||||
engine->ServerCommand("sm internal 1\n");
|
||||
g_bGotServerStart = true;
|
||||
CheckAndFinalizeConfigs();
|
||||
}
|
||||
|
||||
void SM_ConfigsExecuted_Global()
|
||||
@@ -423,3 +521,12 @@ void SM_ConfigsExecuted_Global()
|
||||
g_pOnServerCfg->Execute(NULL);
|
||||
g_pOnConfigsExecuted->Execute(NULL);
|
||||
}
|
||||
|
||||
void SM_InternalCmdTrigger()
|
||||
{
|
||||
/* Order is important here. We need to buffer things before we send the command out. */
|
||||
g_pOnAutoConfigsBuffered->Execute(NULL);
|
||||
engine->ServerCommand("sm internal 1\n");
|
||||
g_PendingInternalPush = false;
|
||||
}
|
||||
|
||||
|
||||
+2
-1
@@ -2,7 +2,7 @@
|
||||
* vim: set ts=4 :
|
||||
* =============================================================================
|
||||
* SourceMod
|
||||
* Copyright (C) 2004-2007 AlliedModders LLC. All rights reserved.
|
||||
* Copyright (C) 2004-2008 AlliedModders LLC. All rights reserved.
|
||||
* =============================================================================
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify it under
|
||||
@@ -68,6 +68,7 @@ extern void SM_ExecuteAllConfigs();
|
||||
extern void SM_ExecuteForPlugin(IPluginContext *ctx);
|
||||
extern void SM_ConfigsExecuted_Global();
|
||||
extern void SM_ConfigsExecuted_Plugin(unsigned int serial);
|
||||
extern void SM_InternalCmdTrigger();
|
||||
|
||||
extern CoreConfig g_CoreConfig;
|
||||
|
||||
|
||||
@@ -359,6 +359,12 @@ bool EventManager::OnFireEvent(IGameEvent *pEvent, bool bDontBroadcast)
|
||||
IChangeableForward *pForward;
|
||||
const char *name;
|
||||
cell_t res = Pl_Continue;
|
||||
|
||||
/* The engine accepts NULL without crashing, so to prevent a crash in SM we ignore these */
|
||||
if (!pEvent)
|
||||
{
|
||||
RETURN_META_VALUE(MRES_IGNORED, false);
|
||||
}
|
||||
|
||||
/* Get the event name, we're going to need this for passing to post hooks */
|
||||
name = pEvent->GetName();
|
||||
@@ -407,6 +413,12 @@ bool EventManager::OnFireEvent_Post(IGameEvent *pEvent, bool bDontBroadcast)
|
||||
const char *name;
|
||||
Handle_t hndl = 0;
|
||||
|
||||
/* The engine accepts NULL without crashing, so to prevent a crash in SM we ignore these */
|
||||
if (!pEvent)
|
||||
{
|
||||
RETURN_META_VALUE(MRES_IGNORED, false);
|
||||
}
|
||||
|
||||
name = m_EventNames.front();
|
||||
|
||||
if (sm_trie_retrieve(m_EventHooks, name, reinterpret_cast<void **>(&pHook)))
|
||||
|
||||
@@ -220,6 +220,7 @@ SMCResult CGameConfig::ReadSMC_NewSection(const SMCStates *states, const char *n
|
||||
s_ServerBinCRC = UTIL_CRC32(buffer, size);
|
||||
free(buffer);
|
||||
s_ServerBinCRC_Ok = true;
|
||||
fclose(fp);
|
||||
}
|
||||
}
|
||||
if (error[0] != '\0')
|
||||
|
||||
+29
-1
@@ -2,7 +2,7 @@
|
||||
* vim: set ts=4 :
|
||||
* =============================================================================
|
||||
* SourceMod
|
||||
* Copyright (C) 2004-2007 AlliedModders LLC. All rights reserved.
|
||||
* Copyright (C) 2004-2008 AlliedModders LLC. All rights reserved.
|
||||
* =============================================================================
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify it under
|
||||
@@ -511,3 +511,31 @@ const char *CHalfLife2::CurrentCommandName()
|
||||
return m_CommandStack.front().cmd;
|
||||
#endif
|
||||
}
|
||||
|
||||
void CHalfLife2::AddDelayedKick(int client, int userid, const char *msg)
|
||||
{
|
||||
DelayedKickInfo kick;
|
||||
|
||||
kick.client = client;
|
||||
kick.userid = userid;
|
||||
UTIL_Format(kick.buffer, sizeof(kick.buffer), "%s", msg);
|
||||
|
||||
m_DelayedKicks.push(kick);
|
||||
}
|
||||
|
||||
void CHalfLife2::ProcessDelayedKicks()
|
||||
{
|
||||
while (!m_DelayedKicks.empty())
|
||||
{
|
||||
DelayedKickInfo info = m_DelayedKicks.first();
|
||||
m_DelayedKicks.pop();
|
||||
|
||||
CPlayer *player = g_Players.GetPlayerByIndex(info.client);
|
||||
if (player == NULL || player->GetUserId() != info.userid)
|
||||
{
|
||||
continue;
|
||||
}
|
||||
|
||||
player->Kick(info.buffer);
|
||||
}
|
||||
}
|
||||
|
||||
+11
-1
@@ -2,7 +2,7 @@
|
||||
* vim: set ts=4 :
|
||||
* =============================================================================
|
||||
* SourceMod
|
||||
* Copyright (C) 2004-2007 AlliedModders LLC. All rights reserved.
|
||||
* Copyright (C) 2004-2008 AlliedModders LLC. All rights reserved.
|
||||
* =============================================================================
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify it under
|
||||
@@ -79,6 +79,13 @@ struct CachedCommandInfo
|
||||
#endif
|
||||
};
|
||||
|
||||
struct DelayedKickInfo
|
||||
{
|
||||
int userid;
|
||||
int client;
|
||||
char buffer[384];
|
||||
};
|
||||
|
||||
class CHalfLife2 :
|
||||
public SMGlobalClass,
|
||||
public IGameHelpers
|
||||
@@ -110,6 +117,8 @@ public:
|
||||
void PopCommandStack();
|
||||
const CCommand *PeekCommandStack();
|
||||
const char *CurrentCommandName();
|
||||
void AddDelayedKick(int client, int userid, const char *msg);
|
||||
void ProcessDelayedKicks();
|
||||
#if !defined METAMOD_PLAPI_VERSION
|
||||
bool IsOriginalEngine();
|
||||
#endif
|
||||
@@ -125,6 +134,7 @@ private:
|
||||
Queue<DelayedFakeCliCmd *> m_CmdQueue;
|
||||
CStack<DelayedFakeCliCmd *> m_FreeCmds;
|
||||
CStack<CachedCommandInfo> m_CommandStack;
|
||||
Queue<DelayedKickInfo> m_DelayedKicks;
|
||||
};
|
||||
|
||||
extern CHalfLife2 g_HL2;
|
||||
|
||||
+1
-1
@@ -59,7 +59,7 @@ endif
|
||||
ifeq "$(ENGINE)" "orangebox"
|
||||
HL2SDK = $(HL2SDK_OB)
|
||||
HL2PUB = $(HL2SDK_OB)/public
|
||||
HL2LIB = $(HL2SDK_OB)/linux_sdk
|
||||
HL2LIB = $(HL2SDK_OB)/lib/linux
|
||||
CFLAGS += -DORANGEBOX_BUILD
|
||||
METAMOD = $(SOURCEMM16)
|
||||
INCLUDE += -I$(HL2SDK)/public/game/server
|
||||
|
||||
+77
-59
@@ -121,7 +121,7 @@ void PlayerManager::OnSourceModAllInitialized()
|
||||
ParamType p1[] = {Param_Cell, Param_String, Param_Cell};
|
||||
ParamType p2[] = {Param_Cell};
|
||||
|
||||
m_clconnect = g_Forwards.CreateForward("OnClientConnect", ET_Event, 3, p1);
|
||||
m_clconnect = g_Forwards.CreateForward("OnClientConnect", ET_LowEvent, 3, p1);
|
||||
m_clputinserver = g_Forwards.CreateForward("OnClientPutInServer", ET_Ignore, 1, p2);
|
||||
m_cldisconnect = g_Forwards.CreateForward("OnClientDisconnect", ET_Ignore, 1, p2);
|
||||
m_cldisconnect_post = g_Forwards.CreateForward("OnClientDisconnect_Post", ET_Ignore, 1, p2);
|
||||
@@ -288,7 +288,7 @@ void PlayerManager::RunAuthChecks()
|
||||
unsigned int removed = 0;
|
||||
for (unsigned int i=1; i<=m_AuthQueue[0]; i++)
|
||||
{
|
||||
pPlayer = GetPlayerByIndex(m_AuthQueue[i]);
|
||||
pPlayer = &m_Players[m_AuthQueue[i]];
|
||||
authstr = engine->GetPlayerNetworkIDString(pPlayer->m_pEdict);
|
||||
if (authstr && authstr[0] != '\0'
|
||||
&& (strcmp(authstr, "STEAM_ID_PENDING") != 0))
|
||||
@@ -362,6 +362,7 @@ void PlayerManager::RunAuthChecks()
|
||||
bool PlayerManager::OnClientConnect(edict_t *pEntity, const char *pszName, const char *pszAddress, char *reject, int maxrejectlen)
|
||||
{
|
||||
int client = engine->IndexOfEdict(pEntity);
|
||||
CPlayer *pPlayer = &m_Players[client];
|
||||
|
||||
List<IClientListener *>::iterator iter;
|
||||
IClientListener *pListener = NULL;
|
||||
@@ -376,26 +377,29 @@ bool PlayerManager::OnClientConnect(edict_t *pEntity, const char *pszName, const
|
||||
|
||||
cell_t res = 1;
|
||||
|
||||
m_Players[client].Initialize(pszName, pszAddress, pEntity);
|
||||
pPlayer->Initialize(pszName, pszAddress, pEntity);
|
||||
m_clconnect->PushCell(client);
|
||||
m_clconnect->PushStringEx(reject, maxrejectlen, SM_PARAM_STRING_UTF8, SM_PARAM_COPYBACK);
|
||||
m_clconnect->PushCell(maxrejectlen);
|
||||
m_clconnect->Execute(&res, NULL);
|
||||
m_clconnect->Execute(&res);
|
||||
|
||||
if (res)
|
||||
{
|
||||
if (!m_Players[client].IsAuthorized())
|
||||
if (!pPlayer->IsAuthorized())
|
||||
{
|
||||
m_AuthQueue[++m_AuthQueue[0]] = client;
|
||||
}
|
||||
|
||||
m_UserIdLookUp[engine->GetPlayerUserId(pEntity)] = client;
|
||||
}
|
||||
else
|
||||
{
|
||||
RETURN_META_VALUE(MRES_SUPERCEDE, false);
|
||||
if (!pPlayer->IsFakeClient())
|
||||
{
|
||||
RETURN_META_VALUE(MRES_SUPERCEDE, false);
|
||||
}
|
||||
}
|
||||
|
||||
m_UserIdLookUp[engine->GetPlayerUserId(pEntity)] = client;
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
@@ -403,7 +407,7 @@ bool PlayerManager::OnClientConnect_Post(edict_t *pEntity, const char *pszName,
|
||||
{
|
||||
int client = engine->IndexOfEdict(pEntity);
|
||||
bool orig_value = META_RESULT_ORIG_RET(bool);
|
||||
CPlayer *pPlayer = GetPlayerByIndex(client);
|
||||
CPlayer *pPlayer = &m_Players[client];
|
||||
|
||||
if (orig_value)
|
||||
{
|
||||
@@ -418,13 +422,17 @@ bool PlayerManager::OnClientConnect_Post(edict_t *pEntity, const char *pszName,
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if (!pPlayer->IsFakeClient()
|
||||
&& m_bIsListenServer
|
||||
&& strncmp(pszAddress, "127.0.0.1", 9) == 0)
|
||||
if (!pPlayer->IsFakeClient()
|
||||
&& m_bIsListenServer
|
||||
&& strncmp(pszAddress, "127.0.0.1", 9) == 0)
|
||||
{
|
||||
m_ListenClient = client;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
m_ListenClient = client;
|
||||
InvalidatePlayer(pPlayer);
|
||||
}
|
||||
|
||||
return true;
|
||||
@@ -434,8 +442,8 @@ void PlayerManager::OnClientPutInServer(edict_t *pEntity, const char *playername
|
||||
{
|
||||
cell_t res;
|
||||
int client = engine->IndexOfEdict(pEntity);
|
||||
CPlayer *pPlayer = &m_Players[client];
|
||||
|
||||
CPlayer *pPlayer = GetPlayerByIndex(client);
|
||||
/* If they're not connected, they're a bot */
|
||||
if (!pPlayer->IsConnected())
|
||||
{
|
||||
@@ -443,6 +451,7 @@ void PlayerManager::OnClientPutInServer(edict_t *pEntity, const char *playername
|
||||
char error[255];
|
||||
const char *authid = engine->GetPlayerNetworkIDString(pEntity);
|
||||
pPlayer->Authorize(authid);
|
||||
pPlayer->m_bFakeClient = true;
|
||||
if (!OnClientConnect(pEntity, playername, "127.0.0.1", error, sizeof(error)))
|
||||
{
|
||||
/* :TODO: kick the bot if it's rejected */
|
||||
@@ -494,7 +503,7 @@ void PlayerManager::OnClientPutInServer(edict_t *pEntity, const char *playername
|
||||
}
|
||||
}
|
||||
|
||||
m_Players[client].Connect();
|
||||
pPlayer->Connect();
|
||||
m_PlayerCount++;
|
||||
|
||||
List<IClientListener *>::iterator iter;
|
||||
@@ -508,9 +517,9 @@ void PlayerManager::OnClientPutInServer(edict_t *pEntity, const char *playername
|
||||
m_clputinserver->PushCell(client);
|
||||
m_clputinserver->Execute(&res, NULL);
|
||||
|
||||
if (m_Players[client].IsAuthorized())
|
||||
if (pPlayer->IsAuthorized())
|
||||
{
|
||||
m_Players[client].DoPostConnectAuthorization();
|
||||
pPlayer->DoPostConnectAuthorization();
|
||||
}
|
||||
}
|
||||
|
||||
@@ -531,8 +540,9 @@ void PlayerManager::OnClientDisconnect(edict_t *pEntity)
|
||||
{
|
||||
cell_t res;
|
||||
int client = engine->IndexOfEdict(pEntity);
|
||||
CPlayer *pPlayer = &m_Players[client];
|
||||
|
||||
if (m_Players[client].IsConnected())
|
||||
if (pPlayer->IsConnected())
|
||||
{
|
||||
m_cldisconnect->PushCell(client);
|
||||
m_cldisconnect->Execute(&res, NULL);
|
||||
@@ -543,7 +553,7 @@ void PlayerManager::OnClientDisconnect(edict_t *pEntity)
|
||||
return;
|
||||
}
|
||||
|
||||
if (m_Players[client].WasCountedAsInGame())
|
||||
if (pPlayer->WasCountedAsInGame())
|
||||
{
|
||||
m_PlayerCount--;
|
||||
}
|
||||
@@ -556,29 +566,7 @@ void PlayerManager::OnClientDisconnect(edict_t *pEntity)
|
||||
pListener->OnClientDisconnecting(client);
|
||||
}
|
||||
|
||||
/**
|
||||
* Remove client from auth queue if necessary
|
||||
*/
|
||||
if (!m_Players[client].IsAuthorized())
|
||||
{
|
||||
for (unsigned int i=1; i<=m_AuthQueue[0]; i++)
|
||||
{
|
||||
if (m_AuthQueue[i] == (unsigned)client)
|
||||
{
|
||||
/* Move everything ahead of us back by one */
|
||||
for (unsigned int j=i+1; j<=m_AuthQueue[0]; j++)
|
||||
{
|
||||
m_AuthQueue[j-1] = m_AuthQueue[j];
|
||||
}
|
||||
/* Remove us and break */
|
||||
m_AuthQueue[0]--;
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
m_Players[client].Disconnect();
|
||||
m_UserIdLookUp[engine->GetPlayerUserId(pEntity)] = 0;
|
||||
InvalidatePlayer(pPlayer);
|
||||
|
||||
if (m_ListenClient == client)
|
||||
{
|
||||
@@ -613,9 +601,9 @@ void PlayerManager::OnClientCommand(edict_t *pEntity)
|
||||
#endif
|
||||
int client = engine->IndexOfEdict(pEntity);
|
||||
cell_t res = Pl_Continue;
|
||||
CPlayer *pPlayer = &m_Players[client];
|
||||
|
||||
CPlayer *pPlayer = GetPlayerByIndex(client);
|
||||
if (!pPlayer || !pPlayer->IsConnected())
|
||||
if (!pPlayer->IsConnected())
|
||||
{
|
||||
return;
|
||||
}
|
||||
@@ -667,8 +655,9 @@ void PlayerManager::OnClientSettingsChanged(edict_t *pEntity)
|
||||
{
|
||||
cell_t res;
|
||||
int client = engine->IndexOfEdict(pEntity);
|
||||
CPlayer *pPlayer = &m_Players[client];
|
||||
|
||||
if (!m_Players[client].IsConnected())
|
||||
if (!pPlayer->IsConnected())
|
||||
{
|
||||
return;
|
||||
}
|
||||
@@ -676,42 +665,42 @@ void PlayerManager::OnClientSettingsChanged(edict_t *pEntity)
|
||||
m_clinfochanged->PushCell(engine->IndexOfEdict(pEntity));
|
||||
m_clinfochanged->Execute(&res, NULL);
|
||||
|
||||
IPlayerInfo *info = m_Players[client].GetPlayerInfo();
|
||||
IPlayerInfo *info = pPlayer->GetPlayerInfo();
|
||||
const char *new_name = info ? info->GetName() : engine->GetClientConVarValue(client, "name");
|
||||
const char *old_name = m_Players[client].m_Name.c_str();
|
||||
const char *old_name = pPlayer->m_Name.c_str();
|
||||
|
||||
if (strcmp(old_name, new_name) != 0)
|
||||
{
|
||||
AdminId id = g_Admins.FindAdminByIdentity("name", new_name);
|
||||
if (id != INVALID_ADMIN_ID && m_Players[client].GetAdminId() != id)
|
||||
if (id != INVALID_ADMIN_ID && pPlayer->GetAdminId() != id)
|
||||
{
|
||||
if (!CheckSetAdminName(client, &m_Players[client], id))
|
||||
if (!CheckSetAdminName(client, pPlayer, id))
|
||||
{
|
||||
m_Players[client].Kick("Your name is reserved by SourceMod; set your password to use it.");
|
||||
pPlayer->Kick("Your name is reserved by SourceMod; set your password to use it.");
|
||||
RETURN_META(MRES_IGNORED);
|
||||
}
|
||||
} else if ((id = g_Admins.FindAdminByIdentity("name", old_name)) != INVALID_ADMIN_ID) {
|
||||
if (id == m_Players[client].GetAdminId())
|
||||
if (id == pPlayer->GetAdminId())
|
||||
{
|
||||
/* This player is changing their name; force them to drop admin privileges! */
|
||||
m_Players[client].SetAdminId(INVALID_ADMIN_ID, false);
|
||||
pPlayer->SetAdminId(INVALID_ADMIN_ID, false);
|
||||
}
|
||||
}
|
||||
m_Players[client].SetName(new_name);
|
||||
pPlayer->SetName(new_name);
|
||||
}
|
||||
|
||||
if (m_PassInfoVar.size() > 0)
|
||||
{
|
||||
/* Try for a password change */
|
||||
const char *old_pass = m_Players[client].m_LastPassword.c_str();
|
||||
const char *old_pass = pPlayer->m_LastPassword.c_str();
|
||||
const char *new_pass = engine->GetClientConVarValue(client, m_PassInfoVar.c_str());
|
||||
if (strcmp(old_pass, new_pass) != 0)
|
||||
{
|
||||
m_Players[client].m_LastPassword.assign(new_pass);
|
||||
if (m_Players[client].IsInGame() && m_Players[client].IsAuthorized())
|
||||
pPlayer->m_LastPassword.assign(new_pass);
|
||||
if (pPlayer->IsInGame() && pPlayer->IsAuthorized())
|
||||
{
|
||||
/* If there is already an admin id assigned, this will just bail out. */
|
||||
m_Players[client].DoBasicAdminChecks();
|
||||
pPlayer->DoBasicAdminChecks();
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -862,6 +851,33 @@ void PlayerManager::UnregisterCommandTargetProcessor(ICommandTargetProcessor *pH
|
||||
target_processors.remove(pHandler);
|
||||
}
|
||||
|
||||
void PlayerManager::InvalidatePlayer(CPlayer *pPlayer)
|
||||
{
|
||||
/**
|
||||
* Remove client from auth queue if necessary
|
||||
*/
|
||||
if (!pPlayer->IsAuthorized())
|
||||
{
|
||||
for (unsigned int i=1; i<=m_AuthQueue[0]; i++)
|
||||
{
|
||||
if (m_AuthQueue[i] == (unsigned)pPlayer->m_iIndex)
|
||||
{
|
||||
/* Move everything ahead of us back by one */
|
||||
for (unsigned int j=i+1; j<=m_AuthQueue[0]; j++)
|
||||
{
|
||||
m_AuthQueue[j-1] = m_AuthQueue[j];
|
||||
}
|
||||
/* Remove us and break */
|
||||
m_AuthQueue[0]--;
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
m_UserIdLookUp[engine->GetPlayerUserId(pPlayer->m_pEdict)] = 0;
|
||||
pPlayer->Disconnect();
|
||||
}
|
||||
|
||||
int PlayerManager::InternalFilterCommandTarget(CPlayer *pAdmin, CPlayer *pTarget, int flags)
|
||||
{
|
||||
if ((flags & COMMAND_FILTER_CONNECTED) == COMMAND_FILTER_CONNECTED
|
||||
@@ -1204,6 +1220,7 @@ CPlayer::CPlayer()
|
||||
m_bIsInKickQueue = false;
|
||||
m_LastPassword.clear();
|
||||
m_LangId = LANGUAGE_ENGLISH;
|
||||
m_bFakeClient = false;
|
||||
}
|
||||
|
||||
void CPlayer::Initialize(const char *name, const char *ip, edict_t *pEntity)
|
||||
@@ -1271,6 +1288,7 @@ void CPlayer::Disconnect()
|
||||
m_bAdminCheckSignalled = false;
|
||||
m_UserId = -1;
|
||||
m_bIsInKickQueue = false;
|
||||
m_bFakeClient = false;
|
||||
}
|
||||
|
||||
void CPlayer::SetName(const char *name)
|
||||
@@ -1335,7 +1353,7 @@ IPlayerInfo *CPlayer::GetPlayerInfo()
|
||||
|
||||
bool CPlayer::IsFakeClient()
|
||||
{
|
||||
return (strcmp(m_AuthID.c_str(), "BOT") == 0);
|
||||
return m_bFakeClient;
|
||||
}
|
||||
|
||||
void CPlayer::SetAdminId(AdminId id, bool temporary)
|
||||
|
||||
@@ -105,6 +105,7 @@ private:
|
||||
int m_iIndex;
|
||||
unsigned int m_LangId;
|
||||
int m_UserId;
|
||||
bool m_bFakeClient;
|
||||
};
|
||||
|
||||
class PlayerManager :
|
||||
@@ -173,6 +174,7 @@ public:
|
||||
unsigned int SetReplyTo(unsigned int reply);
|
||||
private:
|
||||
void OnServerActivate(edict_t *pEdictList, int edictCount, int clientMax);
|
||||
void InvalidatePlayer(CPlayer *pPlayer);
|
||||
private:
|
||||
List<IClientListener *> m_hooks;
|
||||
IForward *m_clconnect;
|
||||
|
||||
+1
-1
@@ -101,7 +101,7 @@ void CPhraseFile::ParseWarning(const char *message, ...)
|
||||
m_FileLogged = true;
|
||||
}
|
||||
|
||||
g_Logger.LogError("[SM] %s", message);
|
||||
g_Logger.LogError("[SM] %s", buffer);
|
||||
}
|
||||
|
||||
void CPhraseFile::ReparseFile()
|
||||
|
||||
+10
-1
@@ -2,7 +2,7 @@
|
||||
* vim: set ts=4 :
|
||||
* =============================================================================
|
||||
* SourceMod
|
||||
* Copyright (C) 2004-2007 AlliedModders LLC. All rights reserved.
|
||||
* Copyright (C) 2004-2008 AlliedModders LLC. All rights reserved.
|
||||
* =============================================================================
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify it under
|
||||
@@ -35,15 +35,24 @@
|
||||
#include "MenuStyle_Valve.h"
|
||||
#include "MenuStyle_Radio.h"
|
||||
#include "PlayerManager.h"
|
||||
#include "CoreConfig.h"
|
||||
|
||||
float g_LastMenuTime = 0.0f;
|
||||
float g_LastAuthCheck = 0.0f;
|
||||
bool g_PendingInternalPush = false;
|
||||
|
||||
void RunFrameHooks(bool simulating)
|
||||
{
|
||||
/* Frame based hooks */
|
||||
g_DBMan.RunFrame();
|
||||
g_HL2.ProcessFakeCliCmdQueue();
|
||||
g_HL2.ProcessDelayedKicks();
|
||||
|
||||
if (g_PendingInternalPush)
|
||||
{
|
||||
SM_InternalCmdTrigger();
|
||||
}
|
||||
|
||||
g_SourceMod.ProcessGameFrameHooks(simulating);
|
||||
|
||||
float curtime = *g_pUniversalTime;
|
||||
|
||||
+3
-1
@@ -2,7 +2,7 @@
|
||||
* vim: set ts=4 :
|
||||
* =============================================================================
|
||||
* SourceMod
|
||||
* Copyright (C) 2004-2007 AlliedModders LLC. All rights reserved.
|
||||
* Copyright (C) 2004-2008 AlliedModders LLC. All rights reserved.
|
||||
* =============================================================================
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify it under
|
||||
@@ -32,6 +32,8 @@
|
||||
#ifndef _INCLUDE_SOURCEMOD_FRAME_HOOKS_H_
|
||||
#define _INCLUDE_SOURCEMOD_FRAME_HOOKS_H_
|
||||
|
||||
extern bool g_PendingInternalPush;
|
||||
|
||||
void RunFrameHooks(bool simulating);
|
||||
|
||||
#endif //_INCLUDE_SOURCEMOD_FRAME_HOOKS_H_
|
||||
|
||||
+10
-4
@@ -2,7 +2,7 @@
|
||||
* vim: set ts=4 :
|
||||
* =============================================================================
|
||||
* SourceMod
|
||||
* Copyright (C) 2004-2007 AlliedModders LLC. All rights reserved.
|
||||
* Copyright (C) 2004-2008 AlliedModders LLC. All rights reserved.
|
||||
* =============================================================================
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify it under
|
||||
@@ -268,17 +268,23 @@ void RootConsoleMenu::OnRootConsoleCommand(const char *cmdname, const CCommand &
|
||||
ConsolePrint(" SourceMod was developed by AlliedModders, LLC.");
|
||||
ConsolePrint(" Development would not have been possible without the following people:");
|
||||
ConsolePrint(" David \"BAILOPAN\" Anderson, lead developer");
|
||||
ConsolePrint(" Borja \"faluco\" Ferrer, Core developer");
|
||||
ConsolePrint(" Scott \"Damaged Soul\" Ehlert, Core developer");
|
||||
ConsolePrint(" Borja \"faluco\" Ferrer, core developer");
|
||||
ConsolePrint(" Scott \"Damaged Soul\" Ehlert, core developer");
|
||||
ConsolePrint(" Matt \"pRED\" Woodrow, core developer");
|
||||
ConsolePrint(" Michael \"ferret\" McKoy, plugin developer");
|
||||
ConsolePrint(" Pavol \"PM OnoTo\" Marko, SourceHook developer");
|
||||
ConsolePrint(" Special thanks to Viper of GameConnect");
|
||||
ConsolePrint(" Special thanks to Mani of Mani-Admin-Plugin");
|
||||
ConsolePrint(" http://www.sourcemod.net/");
|
||||
} else if (strcmp(cmdname, "version") == 0) {
|
||||
}
|
||||
else if (strcmp(cmdname, "version") == 0)
|
||||
{
|
||||
ConsolePrint(" SourceMod Version Information:");
|
||||
ConsolePrint(" SourceMod Version: %s", SVN_FULL_VERSION);
|
||||
ConsolePrint(" JIT Version: %s, %s", g_pVM->GetVMName(), g_pVM->GetVersionString());
|
||||
ConsolePrint(" JIT Settings: %s", g_pVM->GetCPUOptimizations());
|
||||
ConsolePrint(" Compiled on: %s %s", __DATE__, __TIME__);
|
||||
ConsolePrint(" Build ID: %s", SM_BUILD_UNIQUEID);
|
||||
ConsolePrint(" http://www.sourcemod.net/");
|
||||
}
|
||||
}
|
||||
|
||||
+4
-2
@@ -40,7 +40,9 @@
|
||||
* @file Contains SourceMod version information.
|
||||
*/
|
||||
|
||||
#define SVN_FULL_VERSION "1.0.2.2236"
|
||||
#define SVN_FILE_VERSION 1,0,2,2236
|
||||
#define SM_BUILD_STRING ""
|
||||
#define SM_BUILD_UNIQUEID "2537" SM_BUILD_STRING
|
||||
#define SVN_FULL_VERSION "1.0.4" SM_BUILD_STRING
|
||||
#define SVN_FILE_VERSION 1,0,4,0
|
||||
|
||||
#endif //_INCLUDE_SOURCEMOD_VERSION_H_
|
||||
|
||||
+4
-2
@@ -40,7 +40,9 @@
|
||||
* @file Contains SourceMod version information.
|
||||
*/
|
||||
|
||||
#define SVN_FULL_VERSION "$PMAJOR$.$PMINOR$.$PREVISION$.$GLOBAL_BUILD$"
|
||||
#define SVN_FILE_VERSION $PMAJOR$,$PMINOR$,$PREVISION$,$GLOBAL_BUILD$
|
||||
#define SM_BUILD_STRING "$BUILD_STRING$"
|
||||
#define SM_BUILD_UNIQUEID "$BUILD_ID$" SM_BUILD_STRING
|
||||
#define SVN_FULL_VERSION "$PMAJOR$.$PMINOR$.$PREVISION$" SM_BUILD_STRING
|
||||
#define SVN_FILE_VERSION $PMAJOR$,$PMINOR$,$PREVISION$,0
|
||||
|
||||
#endif //_INCLUDE_SOURCEMOD_VERSION_H_
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
* vim: set ts=4 :
|
||||
* =============================================================================
|
||||
* SourceMod
|
||||
* Copyright (C) 2004-2007 AlliedModders LLC. All rights reserved.
|
||||
* Copyright (C) 2004-2008 AlliedModders LLC. All rights reserved.
|
||||
* =============================================================================
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify it under
|
||||
@@ -304,10 +304,7 @@ static cell_t sm_CallStartFunction(IPluginContext *pContext, const cell_t *param
|
||||
HandleError err;
|
||||
IPlugin *pPlugin;
|
||||
|
||||
if (s_CallStarted)
|
||||
{
|
||||
return pContext->ThrowNativeError("Cannot start a call while one is already in progress");
|
||||
}
|
||||
ResetCall();
|
||||
|
||||
hndl = static_cast<Handle_t>(params[1]);
|
||||
|
||||
@@ -343,10 +340,7 @@ static cell_t sm_CallStartForward(IPluginContext *pContext, const cell_t *params
|
||||
HandleError err;
|
||||
IForward *pForward;
|
||||
|
||||
if (s_CallStarted)
|
||||
{
|
||||
return pContext->ThrowNativeError("Cannot start a call while one is already in progress");
|
||||
}
|
||||
ResetCall();
|
||||
|
||||
hndl = static_cast<Handle_t>(params[1]);
|
||||
|
||||
|
||||
@@ -387,7 +387,7 @@ public:
|
||||
continue;
|
||||
}
|
||||
strncopy(buffer, pDir->GetEntryName(), sizeof(buffer));
|
||||
if ((ptr = strstr(buffer, ".bsp")) == NULL)
|
||||
if ((ptr = strstr(buffer, ".bsp")) == NULL || ptr[4] != '\0')
|
||||
{
|
||||
pDir->NextEntry();
|
||||
continue;
|
||||
|
||||
+56
-1
@@ -1258,10 +1258,64 @@ static cell_t KickClient(IPluginContext *pContext, const cell_t *params)
|
||||
if (!pPlayer)
|
||||
{
|
||||
return pContext->ThrowNativeError("Client index %d is invalid", client);
|
||||
} else if (!pPlayer->IsConnected()) {
|
||||
}
|
||||
else if (!pPlayer->IsConnected())
|
||||
{
|
||||
return pContext->ThrowNativeError("Client %d is not connected", client);
|
||||
}
|
||||
|
||||
/* Ignore duplicate kicks */
|
||||
if (pPlayer->IsInKickQueue())
|
||||
{
|
||||
return 1;
|
||||
}
|
||||
|
||||
pPlayer->MarkAsBeingKicked();
|
||||
|
||||
if (pPlayer->IsFakeClient())
|
||||
{
|
||||
char kickcmd[40];
|
||||
UTIL_Format(kickcmd, sizeof(kickcmd), "kick %s\n", pPlayer->GetName());
|
||||
|
||||
engine->ServerCommand(kickcmd);
|
||||
return 1;
|
||||
}
|
||||
|
||||
g_SourceMod.SetGlobalTarget(client);
|
||||
|
||||
char buffer[256];
|
||||
g_SourceMod.FormatString(buffer, sizeof(buffer), pContext, params, 2);
|
||||
|
||||
if (pContext->GetContext()->n_err != SP_ERROR_NONE)
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
|
||||
g_HL2.AddDelayedKick(client, pPlayer->GetUserId(), buffer);
|
||||
|
||||
return 1;
|
||||
}
|
||||
|
||||
static cell_t KickClientEx(IPluginContext *pContext, const cell_t *params)
|
||||
{
|
||||
int client = params[1];
|
||||
|
||||
CPlayer *pPlayer = g_Players.GetPlayerByIndex(client);
|
||||
if (!pPlayer)
|
||||
{
|
||||
return pContext->ThrowNativeError("Client index %d is invalid", client);
|
||||
}
|
||||
else if (!pPlayer->IsConnected())
|
||||
{
|
||||
return pContext->ThrowNativeError("Client %d is not connected", client);
|
||||
}
|
||||
|
||||
/* Ignore duplicate kicks */
|
||||
if (pPlayer->IsInKickQueue())
|
||||
{
|
||||
return 1;
|
||||
}
|
||||
|
||||
pPlayer->MarkAsBeingKicked();
|
||||
|
||||
if (pPlayer->IsFakeClient())
|
||||
@@ -1460,6 +1514,7 @@ REGISTER_NATIVES(playernatives)
|
||||
{"ShowActivityEx", ShowActivityEx},
|
||||
{"ShowActivity2", ShowActivity2},
|
||||
{"KickClient", KickClient},
|
||||
{"KickClientEx", KickClientEx},
|
||||
{"RunAdminCacheChecks", RunAdminCacheChecks},
|
||||
{"NotifyPostAdminCheck", NotifyPostAdminCheck},
|
||||
{"IsClientInKickQueue", IsClientInKickQueue},
|
||||
|
||||
+40
-2
@@ -192,7 +192,31 @@ static cell_t sm_formatex(IPluginContext *pCtx, const cell_t *params)
|
||||
return static_cast<cell_t>(res);
|
||||
}
|
||||
|
||||
class StaticCharBuf
|
||||
{
|
||||
char *buffer;
|
||||
size_t max_size;
|
||||
public:
|
||||
StaticCharBuf() : buffer(NULL), max_size(0)
|
||||
{
|
||||
}
|
||||
~StaticCharBuf()
|
||||
{
|
||||
delete [] buffer;
|
||||
}
|
||||
char* GetWithSize(size_t len)
|
||||
{
|
||||
if (len > max_size)
|
||||
{
|
||||
buffer = (char *)realloc(buffer, len);
|
||||
max_size = len;
|
||||
}
|
||||
return buffer;
|
||||
}
|
||||
};
|
||||
|
||||
static char g_formatbuf[2048];
|
||||
static StaticCharBuf g_extrabuf;
|
||||
static cell_t sm_format(IPluginContext *pCtx, const cell_t *params)
|
||||
{
|
||||
char *buf, *fmt, *destbuf;
|
||||
@@ -200,6 +224,7 @@ static cell_t sm_format(IPluginContext *pCtx, const cell_t *params)
|
||||
size_t res, maxlen;
|
||||
int arg = 4;
|
||||
bool copy = false;
|
||||
char *__copy_buf;
|
||||
|
||||
pCtx->LocalToString(params[1], &destbuf);
|
||||
pCtx->LocalToString(params[3], &fmt);
|
||||
@@ -217,12 +242,25 @@ static cell_t sm_format(IPluginContext *pCtx, const cell_t *params)
|
||||
break;
|
||||
}
|
||||
}
|
||||
buf = (copy) ? g_formatbuf : destbuf;
|
||||
|
||||
if (copy)
|
||||
{
|
||||
if (maxlen > sizeof(g_formatbuf))
|
||||
{
|
||||
__copy_buf = g_extrabuf.GetWithSize(maxlen);
|
||||
}
|
||||
else
|
||||
{
|
||||
__copy_buf = g_formatbuf;
|
||||
}
|
||||
}
|
||||
|
||||
buf = (copy) ? __copy_buf : destbuf;
|
||||
res = atcprintf(buf, maxlen, fmt, pCtx, params, &arg);
|
||||
|
||||
if (copy)
|
||||
{
|
||||
memcpy(destbuf, g_formatbuf, res+1);
|
||||
memcpy(destbuf, __copy_buf, res+1);
|
||||
}
|
||||
|
||||
return static_cast<cell_t>(res);
|
||||
|
||||
@@ -933,9 +933,6 @@ bool CExtensionManager::UnloadExtension(IExtension *_pExt)
|
||||
}
|
||||
}
|
||||
|
||||
/* Tell it to unload */
|
||||
pAPI = pExt->GetAPI();
|
||||
pAPI->OnExtensionUnload();
|
||||
}
|
||||
|
||||
IdentityToken_t *pIdentity;
|
||||
@@ -949,6 +946,12 @@ bool CExtensionManager::UnloadExtension(IExtension *_pExt)
|
||||
}
|
||||
}
|
||||
|
||||
/* Tell it to unload */
|
||||
if (pExt->IsLoaded())
|
||||
{
|
||||
IExtensionInterface *pAPI = pExt->GetAPI();
|
||||
pAPI->OnExtensionUnload();
|
||||
}
|
||||
pExt->Unload();
|
||||
delete pExt;
|
||||
|
||||
|
||||
+51
-37
@@ -2,7 +2,7 @@
|
||||
* vim: set ts=4 :
|
||||
* =============================================================================
|
||||
* SourceMod
|
||||
* Copyright (C) 2004-2007 AlliedModders LLC. All rights reserved.
|
||||
* Copyright (C) 2004-2008 AlliedModders LLC. All rights reserved.
|
||||
* =============================================================================
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify it under
|
||||
@@ -283,15 +283,11 @@ int CForward::Execute(cell_t *result, IForwardFilter *filter)
|
||||
return err;
|
||||
}
|
||||
|
||||
if (filter)
|
||||
{
|
||||
filter->OnExecuteBegin();
|
||||
}
|
||||
|
||||
FuncIter iter = m_functions.begin();
|
||||
IPluginFunction *func;
|
||||
cell_t cur_result = 0;
|
||||
cell_t high_result = 0;
|
||||
cell_t low_result = 0;
|
||||
int err;
|
||||
unsigned int failed=0, success=0;
|
||||
unsigned int num_params = m_curparam;
|
||||
@@ -311,12 +307,16 @@ int CForward::Execute(cell_t *result, IForwardFilter *filter)
|
||||
{
|
||||
int err = SP_ERROR_PARAM;
|
||||
param = &temp_info[i];
|
||||
|
||||
if (i >= m_numparams || m_types[i] == Param_Any)
|
||||
{
|
||||
type = param->pushedas;
|
||||
} else {
|
||||
}
|
||||
else
|
||||
{
|
||||
type = m_types[i];
|
||||
}
|
||||
|
||||
if ((i >= m_numparams) || (type & SP_PARAMFLAG_BYREF))
|
||||
{
|
||||
/* If we're byref or we're vararg, we always push everything by ref.
|
||||
@@ -325,26 +325,30 @@ int CForward::Execute(cell_t *result, IForwardFilter *filter)
|
||||
if (type == Param_String)
|
||||
{
|
||||
err = func->PushStringEx((char *)param->byref.orig_addr, param->byref.cells, param->byref.sz_flags, param->byref.flags);
|
||||
} else if (type == Param_Float || type == Param_Cell) {
|
||||
}
|
||||
else if (type == Param_Float || type == Param_Cell)
|
||||
{
|
||||
err = func->PushCellByRef(¶m->val);
|
||||
} else {
|
||||
}
|
||||
else
|
||||
{
|
||||
err = func->PushArray(param->byref.orig_addr, param->byref.cells, param->byref.flags);
|
||||
assert(type == Param_Array || type == Param_FloatByRef || type == Param_CellByRef);
|
||||
}
|
||||
} else {
|
||||
}
|
||||
else
|
||||
{
|
||||
/* If we're not byref or not vararg, our job is a bit easier. */
|
||||
assert(type == Param_Cell || type == Param_Float);
|
||||
err = func->PushCell(param->val);
|
||||
}
|
||||
|
||||
if (err != SP_ERROR_NONE)
|
||||
{
|
||||
if (!filter || !filter->OnErrorReport(this, func, err))
|
||||
{
|
||||
g_DbgReporter.GenerateError(func->GetParentContext(),
|
||||
func->GetFunctionID(),
|
||||
err,
|
||||
"Failed to push parameter while executing forward");
|
||||
}
|
||||
g_DbgReporter.GenerateError(func->GetParentContext(),
|
||||
func->GetFunctionID(),
|
||||
err,
|
||||
"Failed to push parameter while executing forward");
|
||||
continue;
|
||||
}
|
||||
}
|
||||
@@ -352,12 +356,10 @@ int CForward::Execute(cell_t *result, IForwardFilter *filter)
|
||||
/* Call the function and deal with the return value. */
|
||||
if ((err=func->Execute(&cur_result)) != SP_ERROR_NONE)
|
||||
{
|
||||
if (filter)
|
||||
{
|
||||
filter->OnErrorReport(this, func, err);
|
||||
}
|
||||
failed++;
|
||||
} else {
|
||||
}
|
||||
else
|
||||
{
|
||||
success++;
|
||||
switch (m_ExecType)
|
||||
{
|
||||
@@ -381,14 +383,12 @@ int CForward::Execute(cell_t *result, IForwardFilter *filter)
|
||||
}
|
||||
break;
|
||||
}
|
||||
case ET_Custom:
|
||||
case ET_LowEvent:
|
||||
{
|
||||
if (filter)
|
||||
/* Check if the current result is the lowest so far (or if it's the first result) */
|
||||
if (cur_result < low_result || success == 1)
|
||||
{
|
||||
if (filter->OnFunctionReturn(this, func, &cur_result) == Pl_Stop)
|
||||
{
|
||||
goto done;
|
||||
}
|
||||
low_result = cur_result;
|
||||
}
|
||||
break;
|
||||
}
|
||||
@@ -401,25 +401,39 @@ int CForward::Execute(cell_t *result, IForwardFilter *filter)
|
||||
}
|
||||
|
||||
done:
|
||||
|
||||
if (success)
|
||||
{
|
||||
if (m_ExecType == ET_Event || m_ExecType == ET_Hook)
|
||||
switch (m_ExecType)
|
||||
{
|
||||
cur_result = high_result;
|
||||
} else if (m_ExecType == ET_Ignore) {
|
||||
cur_result = 0;
|
||||
case ET_Ignore:
|
||||
{
|
||||
cur_result = 0;
|
||||
break;
|
||||
}
|
||||
case ET_Event:
|
||||
case ET_Hook:
|
||||
{
|
||||
cur_result = high_result;
|
||||
break;
|
||||
}
|
||||
case ET_LowEvent:
|
||||
{
|
||||
cur_result = low_result;
|
||||
break;
|
||||
}
|
||||
default:
|
||||
{
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
if (result)
|
||||
{
|
||||
*result = cur_result;
|
||||
}
|
||||
}
|
||||
|
||||
if (filter)
|
||||
{
|
||||
filter->OnExecuteEnd(&cur_result, success, failed);
|
||||
}
|
||||
|
||||
return SP_ERROR_NONE;
|
||||
}
|
||||
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
* vim: set ts=4 :
|
||||
* =============================================================================
|
||||
* SourceMod
|
||||
* Copyright (C) 2004-2007 AlliedModders LLC. All rights reserved.
|
||||
* Copyright (C) 2004-2008 AlliedModders LLC. All rights reserved.
|
||||
* =============================================================================
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify it under
|
||||
@@ -43,7 +43,7 @@ using namespace SourceHook;
|
||||
|
||||
typedef List<IPluginFunction *>::iterator FuncIter;
|
||||
|
||||
//:TODO: a global name max define for sourcepawn, should mirror compiler's sNAMEMAX
|
||||
/* :TODO: a global name max define for sourcepawn, should mirror compiler's sNAMEMAX */
|
||||
#define FORWARDS_NAME_MAX 64
|
||||
|
||||
struct ByrefInfo
|
||||
|
||||
@@ -997,8 +997,9 @@ bool HandleSystem::TryAndFreeSomeHandles()
|
||||
|
||||
void HandleSystem::Dump(HANDLE_REPORTER rep)
|
||||
{
|
||||
char refcount[20], parent[20];
|
||||
unsigned int total_size = 0;
|
||||
rep("%-10.10s\t%-20.20s\t%-20.20s\t%-10.10s", "Handle", "Owner", "Type", "Memory");
|
||||
rep("%-10.10s\t%-20.20s\t%-20.20s\t%-10.10s\t%-10.10s\t%-10.10s", "Handle", "Owner", "Type", "Memory", "Refcount", "Parent");
|
||||
rep("--------------------------------------------------------------------------");
|
||||
for (unsigned int i = 1; i <= m_HandleTail; i++)
|
||||
{
|
||||
@@ -1049,16 +1050,26 @@ void HandleSystem::Dump(HANDLE_REPORTER rep)
|
||||
{
|
||||
type = m_strtab->GetString(pType->nameIdx);
|
||||
}
|
||||
if (m_Handles[i].clone == 0)
|
||||
{
|
||||
UTIL_Format(refcount, sizeof(refcount), "%d", m_Handles[i].refcount);
|
||||
UTIL_Format(parent, sizeof(parent), "NULL");
|
||||
}
|
||||
else
|
||||
{
|
||||
UTIL_Format(refcount, sizeof(refcount), "%d", m_Handles[m_Handles[i].clone].refcount);
|
||||
UTIL_Format(parent, sizeof(parent), "%d", m_Handles[i].clone);
|
||||
}
|
||||
if (pType->dispatch->GetDispatchVersion() < HANDLESYS_MEMUSAGE_MIN_VERSION
|
||||
|| !pType->dispatch->GetHandleApproxSize(m_Handles[i].type, m_Handles[i].object, &size))
|
||||
{
|
||||
rep("0x%08x\t%-20.20s\t%-20.20s\t%-10.10s", index, owner, type, "-1");
|
||||
rep("0x%08x\t%-20.20s\t%-20.20s\t%-10.10s\t%-10.10s\t%-10.10s", index, owner, type, "-1", refcount, parent);
|
||||
}
|
||||
else
|
||||
{
|
||||
char buffer[32];
|
||||
UTIL_Format(buffer, sizeof(buffer), "%d", size);
|
||||
rep("0x%08x\t%-20.20s\t%-20.20s\t%-10.10s", index, owner, type, buffer);
|
||||
rep("0x%08x\t%-20.20s\t%-20.20s\t%-10.10s\t%-10.10s\t%-10.10s", index, owner, type, buffer, refcount, parent);
|
||||
total_size += size;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
* vim: set ts=4 :
|
||||
* =============================================================================
|
||||
* SourceMod
|
||||
* Copyright (C) 2004-2007 AlliedModders LLC. All rights reserved.
|
||||
* Copyright (C) 2004-2008 AlliedModders LLC. All rights reserved.
|
||||
* =============================================================================
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify it under
|
||||
@@ -2387,8 +2387,21 @@ void CPluginManager::OnRootConsoleCommand(const char *cmdname, const CCommand &c
|
||||
}
|
||||
else
|
||||
{
|
||||
g_RootMenu.ConsolePrint(" Debugging: %s", pl->IsDebugging() ? "Yes" : "No");
|
||||
g_RootMenu.ConsolePrint(" Running: %s", pl->GetStatus() == Plugin_Running ? "Yes" : "No");
|
||||
if (pl->GetStatus() == Plugin_Running)
|
||||
{
|
||||
if (pl->IsDebugging())
|
||||
{
|
||||
g_RootMenu.ConsolePrint(" Status: running, debugging");
|
||||
}
|
||||
else
|
||||
{
|
||||
g_RootMenu.ConsolePrint(" Status: running");
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
g_RootMenu.ConsolePrint(" Status: not running");
|
||||
}
|
||||
|
||||
const char *typestr = "";
|
||||
switch (pl->GetType())
|
||||
@@ -2407,6 +2420,10 @@ void CPluginManager::OnRootConsoleCommand(const char *cmdname, const CCommand &c
|
||||
|
||||
g_RootMenu.ConsolePrint(" Reloads: %s", typestr);
|
||||
}
|
||||
if (pl->m_FileVersion >= 3)
|
||||
{
|
||||
g_RootMenu.ConsolePrint(" Timestamp: %s", pl->m_DateTime);
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
|
||||
@@ -312,6 +312,8 @@ private:
|
||||
bool m_LibraryMissing;
|
||||
CVector<AutoConfig *> m_configs;
|
||||
bool m_bGotAllLoaded;
|
||||
int m_FileVersion;
|
||||
char m_DateTime[256];
|
||||
};
|
||||
|
||||
class CPluginManager :
|
||||
|
||||
@@ -34,7 +34,7 @@
|
||||
|
||||
#include "BaseWorker.h"
|
||||
|
||||
#define DEFAULT_THINK_TIME_MS 500
|
||||
#define DEFAULT_THINK_TIME_MS 50
|
||||
|
||||
class ThreadWorker : public BaseWorker, public IThread
|
||||
{
|
||||
|
||||
@@ -42,7 +42,7 @@ endif
|
||||
ifeq "$(ENGINE)" "orangebox"
|
||||
HL2SDK = $(HL2SDK_OB)
|
||||
HL2PUB = $(HL2SDK_OB)/public
|
||||
HL2LIB = $(HL2SDK_OB)/linux_sdk
|
||||
HL2LIB = $(HL2SDK_OB)/lib/linux
|
||||
CFLAGS += -DORANGEBOX_BUILD
|
||||
METAMOD = $(SOURCEMM16)
|
||||
INCLUDE += -I$(HL2SDK)/public/game/server
|
||||
|
||||
@@ -46,7 +46,7 @@
|
||||
#define SMEXT_CONF_URL "http://www.sourcemod.net/"
|
||||
#define SMEXT_CONF_LOGTAG "SAMPLE"
|
||||
#define SMEXT_CONF_LICENSE "GPL"
|
||||
#define SMEXT_CONF_DATESTRING __DATE__
|
||||
#define SMEXT_CONF_DATESTRING __DATE__ " " __TIME__
|
||||
|
||||
/**
|
||||
* @brief Exposes plugin's main interface.
|
||||
|
||||
@@ -36,7 +36,9 @@
|
||||
#ifndef _INCLUDE_BINTOOLS_VERSION_H_
|
||||
#define _INCLUDE_BINTOOLS_VERSION_H_
|
||||
|
||||
#define SVN_FULL_VERSION "1.0.2.2236"
|
||||
#define SVN_FILE_VERSION 1,0,2,2236
|
||||
#define SM_BUILD_STRING ""
|
||||
#define SM_BUILD_UNIQUEID "2537" SM_BUILD_STRING
|
||||
#define SVN_FULL_VERSION "1.0.4" SM_BUILD_STRING
|
||||
#define SVN_FILE_VERSION 1,0,4,0
|
||||
|
||||
#endif //_INCLUDE_BINTOOLS_VERSION_H_
|
||||
|
||||
@@ -36,7 +36,9 @@
|
||||
#ifndef _INCLUDE_BINTOOLS_VERSION_H_
|
||||
#define _INCLUDE_BINTOOLS_VERSION_H_
|
||||
|
||||
#define SVN_FULL_VERSION "$PMAJOR$.$PMINOR$.$PREVISION$.$GLOBAL_BUILD$"
|
||||
#define SVN_FILE_VERSION $PMAJOR$,$PMINOR$,$PREVISION$,$GLOBAL_BUILD$
|
||||
#define SM_BUILD_STRING "$BUILD_STRING$"
|
||||
#define SM_BUILD_UNIQUEID "$BUILD_ID$" SM_BUILD_STRING
|
||||
#define SVN_FULL_VERSION "$PMAJOR$.$PMINOR$.$PREVISION$" SM_BUILD_STRING
|
||||
#define SVN_FILE_VERSION $PMAJOR$,$PMINOR$,$PREVISION$,0
|
||||
|
||||
#endif //_INCLUDE_BINTOOLS_VERSION_H_
|
||||
|
||||
@@ -42,7 +42,7 @@ endif
|
||||
ifeq "$(ENGINE)" "orangebox"
|
||||
HL2SDK = $(HL2SDK_OB)
|
||||
HL2PUB = $(HL2SDK_OB)/public
|
||||
HL2LIB = $(HL2SDK_OB)/linux_sdk
|
||||
HL2LIB = $(HL2SDK_OB)/lib/linux
|
||||
CFLAGS += -DORANGEBOX_BUILD
|
||||
METAMOD = $(SOURCEMM16)
|
||||
INCLUDE += -I$(HL2SDK)/public/game/server
|
||||
|
||||
@@ -47,7 +47,7 @@
|
||||
#define SMEXT_CONF_URL "http://www.sourcemod.net/"
|
||||
#define SMEXT_CONF_LOGTAG "CSTRIKE"
|
||||
#define SMEXT_CONF_LICENSE "GPL"
|
||||
#define SMEXT_CONF_DATESTRING __DATE__
|
||||
#define SMEXT_CONF_DATESTRING __DATE__ " " __TIME__
|
||||
|
||||
/**
|
||||
* @brief Exposes plugin's main interface.
|
||||
|
||||
@@ -36,7 +36,9 @@
|
||||
#ifndef _INCLUDE_SDKTOOLS_VERSION_H_
|
||||
#define _INCLUDE_SDKTOOLS_VERSION_H_
|
||||
|
||||
#define SVN_FULL_VERSION "1.0.2.2236"
|
||||
#define SVN_FILE_VERSION 1,0,2,2236
|
||||
#define SM_BUILD_STRING ""
|
||||
#define SM_BUILD_UNIQUEID "2537" SM_BUILD_STRING
|
||||
#define SVN_FULL_VERSION "1.0.4" SM_BUILD_STRING
|
||||
#define SVN_FILE_VERSION 1,0,4,0
|
||||
|
||||
#endif //_INCLUDE_SDKTOOLS_VERSION_H_
|
||||
|
||||
@@ -36,7 +36,9 @@
|
||||
#ifndef _INCLUDE_SDKTOOLS_VERSION_H_
|
||||
#define _INCLUDE_SDKTOOLS_VERSION_H_
|
||||
|
||||
#define SVN_FULL_VERSION "$PMAJOR$.$PMINOR$.$PREVISION$.$GLOBAL_BUILD$"
|
||||
#define SVN_FILE_VERSION $PMAJOR$,$PMINOR$,$PREVISION$,$GLOBAL_BUILD$
|
||||
#define SM_BUILD_STRING "$BUILD_STRING$"
|
||||
#define SM_BUILD_UNIQUEID "$BUILD_ID$" SM_BUILD_STRING
|
||||
#define SVN_FULL_VERSION "$PMAJOR$.$PMINOR$.$PREVISION$" SM_BUILD_STRING
|
||||
#define SVN_FILE_VERSION $PMAJOR$,$PMINOR$,$PREVISION$,0
|
||||
|
||||
#endif //_INCLUDE_SDKTOOLS_VERSION_H_
|
||||
|
||||
@@ -42,7 +42,7 @@ endif
|
||||
ifeq "$(ENGINE)" "orangebox"
|
||||
HL2SDK = $(HL2SDK_OB)
|
||||
HL2PUB = $(HL2SDK_OB)/public
|
||||
HL2LIB = $(HL2SDK_OB)/linux_sdk
|
||||
HL2LIB = $(HL2SDK_OB)/lib/linux
|
||||
CFLAGS += -DORANGEBOX_BUILD
|
||||
METAMOD = $(SOURCEMM16)
|
||||
INCLUDE += -I$(HL2SDK)/public/game/server
|
||||
|
||||
@@ -46,7 +46,7 @@
|
||||
#define SMEXT_CONF_URL "http://www.sourcemod.net/"
|
||||
#define SMEXT_CONF_LOGTAG "GEOIP"
|
||||
#define SMEXT_CONF_LICENSE "GPL"
|
||||
#define SMEXT_CONF_DATESTRING __DATE__
|
||||
#define SMEXT_CONF_DATESTRING __DATE__ " " __TIME__
|
||||
|
||||
/**
|
||||
* @brief Exposes plugin's main interface.
|
||||
|
||||
@@ -36,7 +36,9 @@
|
||||
#ifndef _INCLUDE_GEOIP_VERSION_H_
|
||||
#define _INCLUDE_GEOIP_VERSION_H_
|
||||
|
||||
#define SVN_FULL_VERSION "1.0.2.2236"
|
||||
#define SVN_FILE_VERSION 1,0,2,2236
|
||||
#define SM_BUILD_STRING ""
|
||||
#define SM_BUILD_UNIQUEID "2537" SM_BUILD_STRING
|
||||
#define SVN_FULL_VERSION "1.0.4" SM_BUILD_STRING
|
||||
#define SVN_FILE_VERSION 1,0,4,0
|
||||
|
||||
#endif //_INCLUDE_GEOIP_VERSION_H_
|
||||
|
||||
@@ -36,7 +36,9 @@
|
||||
#ifndef _INCLUDE_GEOIP_VERSION_H_
|
||||
#define _INCLUDE_GEOIP_VERSION_H_
|
||||
|
||||
#define SVN_FULL_VERSION "$PMAJOR$.$PMINOR$.$PREVISION$.$GLOBAL_BUILD$"
|
||||
#define SVN_FILE_VERSION $PMAJOR$,$PMINOR$,$PREVISION$,$GLOBAL_BUILD$
|
||||
#define SM_BUILD_STRING "$BUILD_STRING$"
|
||||
#define SM_BUILD_UNIQUEID "$BUILD_ID$" SM_BUILD_STRING
|
||||
#define SVN_FULL_VERSION "$PMAJOR$.$PMINOR$.$PREVISION$" SM_BUILD_STRING
|
||||
#define SVN_FILE_VERSION $PMAJOR$,$PMINOR$,$PREVISION$,0
|
||||
|
||||
#endif //_INCLUDE_GEOIP_VERSION_H_
|
||||
|
||||
@@ -46,7 +46,7 @@ endif
|
||||
ifeq "$(ENGINE)" "orangebox"
|
||||
HL2SDK = $(HL2SDK_OB)
|
||||
HL2PUB = $(HL2SDK_OB)/public
|
||||
HL2LIB = $(HL2SDK_OB)/linux_sdk
|
||||
HL2LIB = $(HL2SDK_OB)/lib/linux
|
||||
CFLAGS += -DORANGEBOX_BUILD
|
||||
METAMOD = $(SOURCEMM16)
|
||||
INCLUDE += -I$(HL2SDK)/public/game/server
|
||||
|
||||
@@ -47,7 +47,7 @@
|
||||
#define SMEXT_CONF_URL "http://www.sourcemod.net/"
|
||||
#define SMEXT_CONF_LOGTAG "MYSQL"
|
||||
#define SMEXT_CONF_LICENSE "GPL"
|
||||
#define SMEXT_CONF_DATESTRING __DATE__
|
||||
#define SMEXT_CONF_DATESTRING __DATE__ " " __TIME__
|
||||
|
||||
/**
|
||||
* @brief Exposes plugin's main interface.
|
||||
|
||||
@@ -36,7 +36,9 @@
|
||||
#ifndef _INCLUDE_MYSQLEXT_VERSION_H_
|
||||
#define _INCLUDE_MYSQLEXT_VERSION_H_
|
||||
|
||||
#define SVN_FULL_VERSION "1.0.2.2236"
|
||||
#define SVN_FILE_VERSION 1,0,2,2236
|
||||
#define SM_BUILD_STRING ""
|
||||
#define SM_BUILD_UNIQUEID "2537" SM_BUILD_STRING
|
||||
#define SVN_FULL_VERSION "1.0.4" SM_BUILD_STRING
|
||||
#define SVN_FILE_VERSION 1,0,4,0
|
||||
|
||||
#endif //_INCLUDE_MYSQLEXT_VERSION_H_
|
||||
|
||||
@@ -36,7 +36,9 @@
|
||||
#ifndef _INCLUDE_MYSQLEXT_VERSION_H_
|
||||
#define _INCLUDE_MYSQLEXT_VERSION_H_
|
||||
|
||||
#define SVN_FULL_VERSION "$PMAJOR$.$PMINOR$.$PREVISION$.$GLOBAL_BUILD$"
|
||||
#define SVN_FILE_VERSION $PMAJOR$,$PMINOR$,$PREVISION$,$GLOBAL_BUILD$
|
||||
#define SM_BUILD_STRING "$BUILD_STRING$"
|
||||
#define SM_BUILD_UNIQUEID "$BUILD_ID$" SM_BUILD_STRING
|
||||
#define SVN_FULL_VERSION "$PMAJOR$.$PMINOR$.$PREVISION$" SM_BUILD_STRING
|
||||
#define SVN_FILE_VERSION $PMAJOR$,$PMINOR$,$PREVISION$,0
|
||||
|
||||
#endif //_INCLUDE_MYSQLEXT_VERSION_H_
|
||||
|
||||
@@ -42,7 +42,7 @@ endif
|
||||
ifeq "$(ENGINE)" "orangebox"
|
||||
HL2SDK = $(HL2SDK_OB)
|
||||
HL2PUB = $(HL2SDK_OB)/public
|
||||
HL2LIB = $(HL2SDK_OB)/linux_sdk
|
||||
HL2LIB = $(HL2SDK_OB)/lib/linux
|
||||
CFLAGS += -DORANGEBOX_BUILD
|
||||
METAMOD = $(SOURCEMM16)
|
||||
INCLUDE += -I$(HL2SDK)/public/game/server
|
||||
|
||||
@@ -47,7 +47,7 @@
|
||||
#define SMEXT_CONF_URL "http://www.sourcemod.net/"
|
||||
#define SMEXT_CONF_LOGTAG "REGEX"
|
||||
#define SMEXT_CONF_LICENSE "GPL"
|
||||
#define SMEXT_CONF_DATESTRING __DATE__
|
||||
#define SMEXT_CONF_DATESTRING __DATE__ " " __TIME__
|
||||
|
||||
/**
|
||||
* @brief Exposes plugin's main interface.
|
||||
|
||||
@@ -36,7 +36,9 @@
|
||||
#ifndef _INCLUDE_REGEXEXT_VERSION_H_
|
||||
#define _INCLUDE_REGEXEXT_VERSION_H_
|
||||
|
||||
#define SVN_FULL_VERSION "1.0.2.2236"
|
||||
#define SVN_FILE_VERSION 1,0,2,2236
|
||||
#define SM_BUILD_STRING ""
|
||||
#define SM_BUILD_UNIQUEID "2537" SM_BUILD_STRING
|
||||
#define SVN_FULL_VERSION "1.0.4" SM_BUILD_STRING
|
||||
#define SVN_FILE_VERSION 1,0,4,0
|
||||
|
||||
#endif //_INCLUDE_REGEXEXT_VERSION_H_
|
||||
|
||||
@@ -36,7 +36,9 @@
|
||||
#ifndef _INCLUDE_REGEXEXT_VERSION_H_
|
||||
#define _INCLUDE_REGEXEXT_VERSION_H_
|
||||
|
||||
#define SVN_FULL_VERSION "$PMAJOR$.$PMINOR$.$PREVISION$.$GLOBAL_BUILD$"
|
||||
#define SVN_FILE_VERSION $PMAJOR$,$PMINOR$,$PREVISION$,$GLOBAL_BUILD$
|
||||
#define SM_BUILD_STRING "$BUILD_STRING$"
|
||||
#define SM_BUILD_UNIQUEID "$BUILD_ID$" SM_BUILD_STRING
|
||||
#define SVN_FULL_VERSION "$PMAJOR$.$PMINOR$.$PREVISION$" SM_BUILD_STRING
|
||||
#define SVN_FILE_VERSION $PMAJOR$,$PMINOR$,$PREVISION$,0
|
||||
|
||||
#endif //_INCLUDE_REGEXEXT_VERSION_H_
|
||||
|
||||
@@ -45,7 +45,7 @@ endif
|
||||
ifeq "$(ENGINE)" "orangebox"
|
||||
HL2SDK = $(HL2SDK_OB)
|
||||
HL2PUB = $(HL2SDK_OB)/public
|
||||
HL2LIB = $(HL2SDK_OB)/linux_sdk
|
||||
HL2LIB = $(HL2SDK_OB)/lib/linux
|
||||
CFLAGS += -DORANGEBOX_BUILD
|
||||
METAMOD = $(SOURCEMM16)
|
||||
INCLUDE += -I$(HL2SDK)/public/game/server -I$(HL2SDK)/common
|
||||
|
||||
@@ -82,6 +82,10 @@ extern sp_nativeinfo_t g_TeamNatives[];
|
||||
|
||||
bool SDKTools::SDK_OnLoad(char *error, size_t maxlength, bool late)
|
||||
{
|
||||
if (!gameconfs->LoadGameConfigFile(SDKTOOLS_GAME_FILE, &g_pGameConf, error, maxlength))
|
||||
{
|
||||
return false;
|
||||
}
|
||||
sharesys->AddDependency(myself, "bintools.ext", true, true);
|
||||
sharesys->AddNatives(myself, g_CallNatives);
|
||||
sharesys->AddNatives(myself, g_Natives);
|
||||
@@ -96,10 +100,6 @@ bool SDKTools::SDK_OnLoad(char *error, size_t maxlength, bool late)
|
||||
|
||||
SM_GET_IFACE(GAMEHELPERS, g_pGameHelpers);
|
||||
|
||||
if (!gameconfs->LoadGameConfigFile(SDKTOOLS_GAME_FILE, &g_pGameConf, error, maxlength))
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
playerhelpers->AddClientListener(&g_SdkTools);
|
||||
g_CallHandle = handlesys->CreateType("ValveCall", this, 0, NULL, NULL, myself->GetIdentity(), NULL);
|
||||
|
||||
@@ -76,7 +76,12 @@ bool EntityOutputManager::IsEnabled()
|
||||
|
||||
bool EntityOutputManager::CreateFireEventDetour()
|
||||
{
|
||||
if (!g_pGameConf->GetMemSig("FireOutput", &info_address) || !info_address)
|
||||
if (!g_pGameConf->GetMemSig("FireOutput", &info_address))
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
if (!info_address)
|
||||
{
|
||||
g_pSM->LogError(myself, "Could not locate FireOutput - Disabling Entity Outputs");
|
||||
return false;
|
||||
@@ -84,7 +89,6 @@ bool EntityOutputManager::CreateFireEventDetour()
|
||||
|
||||
if (!g_pGameConf->GetOffset("FireOutputBackup", (int *)&(info_restore.bytes)))
|
||||
{
|
||||
g_pSM->LogError(myself, "Could not locate FireOutputBackup - Disabling Entity Outputs");
|
||||
return false;
|
||||
}
|
||||
|
||||
|
||||
@@ -47,7 +47,7 @@
|
||||
#define SMEXT_CONF_URL "http://www.sourcemod.net/"
|
||||
#define SMEXT_CONF_LOGTAG "SDKTOOLS"
|
||||
#define SMEXT_CONF_LICENSE "GPL"
|
||||
#define SMEXT_CONF_DATESTRING __DATE__
|
||||
#define SMEXT_CONF_DATESTRING __DATE__ " " __TIME__
|
||||
|
||||
/**
|
||||
* @brief Exposes plugin's main interface.
|
||||
|
||||
@@ -36,7 +36,9 @@
|
||||
#ifndef _INCLUDE_SDKTOOLS_VERSION_H_
|
||||
#define _INCLUDE_SDKTOOLS_VERSION_H_
|
||||
|
||||
#define SVN_FULL_VERSION "1.0.2.2236"
|
||||
#define SVN_FILE_VERSION 1,0,2,2236
|
||||
#define SM_BUILD_STRING ""
|
||||
#define SM_BUILD_UNIQUEID "2537" SM_BUILD_STRING
|
||||
#define SVN_FULL_VERSION "1.0.4" SM_BUILD_STRING
|
||||
#define SVN_FILE_VERSION 1,0,4,0
|
||||
|
||||
#endif //_INCLUDE_SDKTOOLS_VERSION_H_
|
||||
|
||||
@@ -36,7 +36,9 @@
|
||||
#ifndef _INCLUDE_SDKTOOLS_VERSION_H_
|
||||
#define _INCLUDE_SDKTOOLS_VERSION_H_
|
||||
|
||||
#define SVN_FULL_VERSION "$PMAJOR$.$PMINOR$.$PREVISION$.$GLOBAL_BUILD$"
|
||||
#define SVN_FILE_VERSION $PMAJOR$,$PMINOR$,$PREVISION$,$GLOBAL_BUILD$
|
||||
#define SM_BUILD_STRING "$BUILD_STRING$"
|
||||
#define SM_BUILD_UNIQUEID "$BUILD_ID$" SM_BUILD_STRING
|
||||
#define SVN_FULL_VERSION "$PMAJOR$.$PMINOR$.$PREVISION$" SM_BUILD_STRING
|
||||
#define SVN_FILE_VERSION $PMAJOR$,$PMINOR$,$PREVISION$,0
|
||||
|
||||
#endif //_INCLUDE_SDKTOOLS_VERSION_H_
|
||||
|
||||
@@ -109,16 +109,34 @@ static cell_t GetTeamCount(IPluginContext *pContext, const cell_t *params)
|
||||
return g_Teams.size();
|
||||
}
|
||||
|
||||
static int g_teamname_offset = -1;
|
||||
static cell_t GetTeamName(IPluginContext *pContext, const cell_t *params)
|
||||
{
|
||||
int teamindex = params[1];
|
||||
if (!g_Teams[teamindex].ClassName || (teamindex > (int)g_Teams.size()))
|
||||
if (teamindex >= (int)g_Teams.size() || !g_Teams[teamindex].ClassName)
|
||||
{
|
||||
pContext->ThrowNativeError("Team index %d is invalid", teamindex);
|
||||
return pContext->ThrowNativeError("Team index %d is invalid", teamindex);
|
||||
}
|
||||
|
||||
static int offset = g_pGameHelpers->FindInSendTable(g_Teams[teamindex].ClassName, "m_szTeamname")->GetOffset();
|
||||
char *name = (char *)((unsigned char *)g_Teams[teamindex].pEnt + offset);
|
||||
if (g_teamname_offset == 0)
|
||||
{
|
||||
return pContext->ThrowNativeError("Team names are not available on this game.");
|
||||
}
|
||||
|
||||
if (g_teamname_offset == -1)
|
||||
{
|
||||
SendProp *prop = g_pGameHelpers->FindInSendTable(g_Teams[teamindex].ClassName, "m_szTeamname");
|
||||
|
||||
if (prop == NULL)
|
||||
{
|
||||
g_teamname_offset = 0;
|
||||
return pContext->ThrowNativeError("Team names are not available on this game.");
|
||||
}
|
||||
|
||||
g_teamname_offset = prop->GetOffset();
|
||||
}
|
||||
|
||||
char *name = (char *)((unsigned char *)g_Teams[teamindex].pEnt + g_teamname_offset);
|
||||
|
||||
pContext->StringToLocalUTF8(params[2], params[3], name, NULL);
|
||||
|
||||
@@ -128,9 +146,9 @@ static cell_t GetTeamName(IPluginContext *pContext, const cell_t *params)
|
||||
static cell_t GetTeamScore(IPluginContext *pContext, const cell_t *params)
|
||||
{
|
||||
int teamindex = params[1];
|
||||
if (!g_Teams[teamindex].ClassName || (teamindex > (int)g_Teams.size()))
|
||||
if (teamindex >= (int)g_Teams.size() || !g_Teams[teamindex].ClassName)
|
||||
{
|
||||
pContext->ThrowNativeError("Team index %d is invalid", teamindex);
|
||||
return pContext->ThrowNativeError("Team index %d is invalid", teamindex);
|
||||
}
|
||||
|
||||
static int offset = g_pGameHelpers->FindInSendTable(g_Teams[teamindex].ClassName, "m_iScore")->GetOffset();
|
||||
@@ -141,9 +159,9 @@ static cell_t GetTeamScore(IPluginContext *pContext, const cell_t *params)
|
||||
static cell_t SetTeamScore(IPluginContext *pContext, const cell_t *params)
|
||||
{
|
||||
int teamindex = params[1];
|
||||
if (!g_Teams[teamindex].ClassName || (teamindex > (int)g_Teams.size()))
|
||||
if (teamindex >= (int)g_Teams.size() || !g_Teams[teamindex].ClassName)
|
||||
{
|
||||
pContext->ThrowNativeError("Team index %d is invalid", teamindex);
|
||||
return pContext->ThrowNativeError("Team index %d is invalid", teamindex);
|
||||
}
|
||||
|
||||
static int offset = g_pGameHelpers->FindInSendTable(g_Teams[teamindex].ClassName, "m_iScore")->GetOffset();
|
||||
@@ -155,9 +173,9 @@ static cell_t SetTeamScore(IPluginContext *pContext, const cell_t *params)
|
||||
static cell_t GetTeamClientCount(IPluginContext *pContext, const cell_t *params)
|
||||
{
|
||||
int teamindex = params[1];
|
||||
if (!g_Teams[teamindex].ClassName || (teamindex > (int)g_Teams.size()))
|
||||
if (teamindex >= (int)g_Teams.size() || !g_Teams[teamindex].ClassName)
|
||||
{
|
||||
pContext->ThrowNativeError("Team index %d is invalid", teamindex);
|
||||
return pContext->ThrowNativeError("Team index %d is invalid", teamindex);
|
||||
}
|
||||
|
||||
SendProp *pProp = g_pGameHelpers->FindInSendTable(g_Teams[teamindex].ClassName, "\"player_array\"");
|
||||
|
||||
@@ -280,6 +280,7 @@ void ShutdownHelpers()
|
||||
{
|
||||
s_Teleport.Shutdown();
|
||||
s_GetVelocity.Shutdown();
|
||||
s_EyeAngles.Shutdown();
|
||||
}
|
||||
|
||||
const char *GetDTTypeName(int type)
|
||||
|
||||
@@ -62,7 +62,7 @@ endif
|
||||
ifeq "$(ENGINE)" "orangebox"
|
||||
HL2SDK = $(HL2SDK_OB)
|
||||
HL2PUB = $(HL2SDK_OB)/public
|
||||
HL2LIB = $(HL2SDK_OB)/linux_sdk
|
||||
HL2LIB = $(HL2SDK_OB)/lib/linux
|
||||
CFLAGS += -DORANGEBOX_BUILD
|
||||
METAMOD = $(SOURCEMM16)
|
||||
INCLUDE += -I$(HL2SDK)/public/game/server
|
||||
|
||||
@@ -47,7 +47,7 @@
|
||||
#define SMEXT_CONF_URL "http://www.sourcemod.net/"
|
||||
#define SMEXT_CONF_LOGTAG "SQLITE"
|
||||
#define SMEXT_CONF_LICENSE "GPL"
|
||||
#define SMEXT_CONF_DATESTRING __DATE__
|
||||
#define SMEXT_CONF_DATESTRING __DATE__ " " __TIME__
|
||||
|
||||
/**
|
||||
* @brief Exposes plugin's main interface.
|
||||
|
||||
@@ -36,7 +36,9 @@
|
||||
#ifndef _INCLUDE_SQLITEEXT_VERSION_H_
|
||||
#define _INCLUDE_SQLITEEXT_VERSION_H_
|
||||
|
||||
#define SVN_FULL_VERSION "1.0.2.2236"
|
||||
#define SVN_FILE_VERSION 1,0,2,2236
|
||||
#define SM_BUILD_STRING ""
|
||||
#define SM_BUILD_UNIQUEID "2537" SM_BUILD_STRING
|
||||
#define SVN_FULL_VERSION "1.0.4" SM_BUILD_STRING
|
||||
#define SVN_FILE_VERSION 1,0,4,0
|
||||
|
||||
#endif //_INCLUDE_SQLITEEXT_VERSION_H_
|
||||
|
||||
@@ -36,7 +36,9 @@
|
||||
#ifndef _INCLUDE_SQLITEEXT_VERSION_H_
|
||||
#define _INCLUDE_SQLITEEXT_VERSION_H_
|
||||
|
||||
#define SVN_FULL_VERSION "$PMAJOR$.$PMINOR$.$PREVISION$.$GLOBAL_BUILD$"
|
||||
#define SVN_FILE_VERSION $PMAJOR$,$PMINOR$,$PREVISION$,$GLOBAL_BUILD$
|
||||
#define SM_BUILD_STRING "$BUILD_STRING$"
|
||||
#define SM_BUILD_UNIQUEID "$BUILD_ID$" SM_BUILD_STRING
|
||||
#define SVN_FULL_VERSION "$PMAJOR$.$PMINOR$.$PREVISION$" SM_BUILD_STRING
|
||||
#define SVN_FILE_VERSION $PMAJOR$,$PMINOR$,$PREVISION$,0
|
||||
|
||||
#endif //_INCLUDE_SQLITEEXT_VERSION_H_
|
||||
|
||||
@@ -43,7 +43,7 @@ endif
|
||||
ifeq "$(ENGINE)" "orangebox"
|
||||
HL2SDK = $(HL2SDK_OB)
|
||||
HL2PUB = $(HL2SDK_OB)/public
|
||||
HL2LIB = $(HL2SDK_OB)/linux_sdk
|
||||
HL2LIB = $(HL2SDK_OB)/lib/linux
|
||||
CFLAGS += -DORANGEBOX_BUILD
|
||||
METAMOD = $(SOURCEMM16)
|
||||
INCLUDE += -I$(HL2SDK)/public/game/server
|
||||
|
||||
@@ -55,7 +55,10 @@ public:
|
||||
|
||||
~CriticalHitManager()
|
||||
{
|
||||
if (forward != NULL)
|
||||
{
|
||||
forwards->ReleaseForward(forward);
|
||||
}
|
||||
DeleteCriticalDetour();
|
||||
}
|
||||
|
||||
|
||||
@@ -65,14 +65,14 @@ bool TF2Tools::SDK_OnLoad(char *error, size_t maxlength, bool late)
|
||||
{
|
||||
if (strcmp(g_pSM->GetGameFolderName(), "tf") != 0)
|
||||
{
|
||||
snprintf(error, maxlength, "Cannot Load TF2 Extension on mods other than TF2");
|
||||
UTIL_Format(error, maxlength, "Cannot Load TF2 Extension on mods other than TF2");
|
||||
return false;
|
||||
}
|
||||
|
||||
ServerClass *sc = UTIL_FindServerClass("CTFPlayer");
|
||||
if (sc == NULL)
|
||||
{
|
||||
snprintf(error, maxlength, "Could not find CTFPlayer server class");
|
||||
UTIL_Format(error, maxlength, "Could not find CTFPlayer server class");
|
||||
return false;
|
||||
}
|
||||
|
||||
@@ -80,18 +80,18 @@ bool TF2Tools::SDK_OnLoad(char *error, size_t maxlength, bool late)
|
||||
|
||||
if (!UTIL_FindDataTable(sc->m_pTable, "DT_TFPlayerShared", playerSharedOffset, 0))
|
||||
{
|
||||
snprintf(error, maxlength, "Could not find DT_TFPlayerShared data table");
|
||||
UTIL_Format(error, maxlength, "Could not find DT_TFPlayerShared data table");
|
||||
return false;
|
||||
}
|
||||
|
||||
sharesys->AddDependency(myself, "bintools.ext", true, true);
|
||||
|
||||
char conf_error[255];
|
||||
char conf_error[255] = "";
|
||||
if (!gameconfs->LoadGameConfigFile("sm-tf2.games", &g_pGameConf, conf_error, sizeof(conf_error)))
|
||||
{
|
||||
if (conf_error)
|
||||
{
|
||||
snprintf(error, maxlength, "Could not read sm-tf2.games.txt: %s", conf_error);
|
||||
UTIL_Format(error, maxlength, "Could not read sm-tf2.games.txt: %s", conf_error);
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
@@ -47,7 +47,7 @@
|
||||
#define SMEXT_CONF_URL "http://www.sourcemod.net/"
|
||||
#define SMEXT_CONF_LOGTAG "TF2"
|
||||
#define SMEXT_CONF_LICENSE "GPL"
|
||||
#define SMEXT_CONF_DATESTRING __DATE__
|
||||
#define SMEXT_CONF_DATESTRING __DATE__ " " __TIME__
|
||||
|
||||
/**
|
||||
* @brief Exposes plugin's main interface.
|
||||
|
||||
@@ -36,7 +36,9 @@
|
||||
#ifndef _INCLUDE_SDKTOOLS_VERSION_H_
|
||||
#define _INCLUDE_SDKTOOLS_VERSION_H_
|
||||
|
||||
#define SVN_FULL_VERSION "1.0.2.2236"
|
||||
#define SVN_FILE_VERSION 1,0,2,2236
|
||||
#define SM_BUILD_STRING ""
|
||||
#define SM_BUILD_UNIQUEID "2537" SM_BUILD_STRING
|
||||
#define SVN_FULL_VERSION "1.0.4" SM_BUILD_STRING
|
||||
#define SVN_FILE_VERSION 1,0,4,0
|
||||
|
||||
#endif //_INCLUDE_SDKTOOLS_VERSION_H_
|
||||
|
||||
@@ -36,7 +36,9 @@
|
||||
#ifndef _INCLUDE_SDKTOOLS_VERSION_H_
|
||||
#define _INCLUDE_SDKTOOLS_VERSION_H_
|
||||
|
||||
#define SVN_FULL_VERSION "$PMAJOR$.$PMINOR$.$PREVISION$.$GLOBAL_BUILD$"
|
||||
#define SVN_FILE_VERSION $PMAJOR$,$PMINOR$,$PREVISION$,$GLOBAL_BUILD$
|
||||
#define SM_BUILD_STRING "$BUILD_STRING$"
|
||||
#define SM_BUILD_UNIQUEID "$BUILD_ID$" SM_BUILD_STRING
|
||||
#define SVN_FULL_VERSION "$PMAJOR$.$PMINOR$.$PREVISION$" SM_BUILD_STRING
|
||||
#define SVN_FILE_VERSION $PMAJOR$,$PMINOR$,$PREVISION$,0
|
||||
|
||||
#endif //_INCLUDE_SDKTOOLS_VERSION_H_
|
||||
|
||||
@@ -43,7 +43,7 @@ endif
|
||||
ifeq "$(ENGINE)" "orangebox"
|
||||
HL2SDK = $(HL2SDK_OB)
|
||||
HL2PUB = $(HL2SDK_OB)/public
|
||||
HL2LIB = $(HL2SDK_OB)/linux_sdk
|
||||
HL2LIB = $(HL2SDK_OB)/lib/linux
|
||||
CFLAGS += -DORANGEBOX_BUILD
|
||||
METAMOD = $(SOURCEMM16)
|
||||
INCLUDE += -I$(HL2SDK)/public/game/server
|
||||
|
||||
@@ -330,6 +330,7 @@ void TopMenu::RemoveFromMenu(unsigned int object_id)
|
||||
topmenu_category_t *cat = m_Categories[i];
|
||||
for (size_t j = 0; j < m_Categories[i]->obj_list.size(); j++)
|
||||
{
|
||||
m_ObjLookup.remove(cat->obj_list[j]->name);
|
||||
cat->obj_list[j]->callbacks->OnTopMenuObjectRemoved(this, cat->obj_list[j]->object_id);
|
||||
cat->obj_list[j]->is_free = true;
|
||||
}
|
||||
|
||||
@@ -45,9 +45,9 @@
|
||||
#define SMEXT_CONF_VERSION SVN_FULL_VERSION
|
||||
#define SMEXT_CONF_AUTHOR "AlliedModders"
|
||||
#define SMEXT_CONF_URL "http://www.sourcemod.net/"
|
||||
#define SMEXT_CONF_LOGTAG "MAINMENU"
|
||||
#define SMEXT_CONF_LOGTAG "TOPMENUS"
|
||||
#define SMEXT_CONF_LICENSE "GPLv3"
|
||||
#define SMEXT_CONF_DATESTRING __DATE__
|
||||
#define SMEXT_CONF_DATESTRING __DATE__ " " __TIME__
|
||||
|
||||
/**
|
||||
* @brief Exposes plugin's main interface.
|
||||
|
||||
@@ -36,7 +36,9 @@
|
||||
#ifndef _INCLUDE_SQLITEEXT_VERSION_H_
|
||||
#define _INCLUDE_SQLITEEXT_VERSION_H_
|
||||
|
||||
#define SVN_FULL_VERSION "1.0.2.2236"
|
||||
#define SVN_FILE_VERSION 1,0,2,2236
|
||||
#define SM_BUILD_STRING ""
|
||||
#define SM_BUILD_UNIQUEID "2537" SM_BUILD_STRING
|
||||
#define SVN_FULL_VERSION "1.0.4" SM_BUILD_STRING
|
||||
#define SVN_FILE_VERSION 1,0,4,0
|
||||
|
||||
#endif //_INCLUDE_SQLITEEXT_VERSION_H_
|
||||
|
||||
@@ -36,7 +36,9 @@
|
||||
#ifndef _INCLUDE_SQLITEEXT_VERSION_H_
|
||||
#define _INCLUDE_SQLITEEXT_VERSION_H_
|
||||
|
||||
#define SVN_FULL_VERSION "$PMAJOR$.$PMINOR$.$PREVISION$.$GLOBAL_BUILD$"
|
||||
#define SVN_FILE_VERSION $PMAJOR$,$PMINOR$,$PREVISION$,$GLOBAL_BUILD$
|
||||
#define SM_BUILD_STRING "$BUILD_STRING$"
|
||||
#define SM_BUILD_UNIQUEID "$BUILD_ID$" SM_BUILD_STRING
|
||||
#define SVN_FULL_VERSION "$PMAJOR$.$PMINOR$.$PREVISION$" SM_BUILD_STRING
|
||||
#define SVN_FILE_VERSION $PMAJOR$,$PMINOR$,$PREVISION$,0
|
||||
|
||||
#endif //_INCLUDE_SQLITEEXT_VERSION_H_
|
||||
|
||||
@@ -18,7 +18,7 @@
|
||||
}
|
||||
}
|
||||
|
||||
"dodsbeta"
|
||||
"dod"
|
||||
{
|
||||
"Keys"
|
||||
{
|
||||
@@ -67,7 +67,6 @@
|
||||
{
|
||||
"game" "cstrike"
|
||||
"game" "dod"
|
||||
"game" "dodsbeta"
|
||||
"game" "sourceforts"
|
||||
"game" "insurgency"
|
||||
"game" "Insurgency"
|
||||
|
||||
@@ -31,7 +31,7 @@
|
||||
{
|
||||
"#supported"
|
||||
{
|
||||
"game" "dodsbeta"
|
||||
"game" "dod"
|
||||
"game" "tf"
|
||||
}
|
||||
|
||||
@@ -79,7 +79,7 @@
|
||||
{
|
||||
"#supported"
|
||||
{
|
||||
"game" "dodsbeta"
|
||||
"game" "dod"
|
||||
"game" "tf"
|
||||
}
|
||||
|
||||
@@ -105,7 +105,7 @@
|
||||
{
|
||||
"#supported"
|
||||
{
|
||||
"game" "dodsbeta"
|
||||
"game" "dod"
|
||||
"game" "tf"
|
||||
}
|
||||
|
||||
@@ -146,7 +146,7 @@
|
||||
{
|
||||
"#supported"
|
||||
{
|
||||
"game" "dodsbeta"
|
||||
"game" "dod"
|
||||
"game" "tf"
|
||||
}
|
||||
|
||||
@@ -224,7 +224,7 @@
|
||||
{
|
||||
"#supported"
|
||||
{
|
||||
"game" "dodsbeta"
|
||||
"game" "dod"
|
||||
"game" "tf"
|
||||
}
|
||||
"Signatures"
|
||||
@@ -253,23 +253,23 @@
|
||||
{
|
||||
"RemovePlayerItem"
|
||||
{
|
||||
"windows" "237"
|
||||
"linux" "238"
|
||||
"windows" "238"
|
||||
"linux" "239"
|
||||
}
|
||||
"Weapon_GetSlot"
|
||||
{
|
||||
"windows" "235"
|
||||
"linux" "236"
|
||||
"windows" "236"
|
||||
"linux" "237"
|
||||
}
|
||||
"Ignite"
|
||||
{
|
||||
"windows" "192"
|
||||
"linux" "193"
|
||||
"windows" "193"
|
||||
"linux" "194"
|
||||
}
|
||||
"Extinguish"
|
||||
{
|
||||
"windows" "196"
|
||||
"linux" "197"
|
||||
"windows" "197"
|
||||
"linux" "198"
|
||||
}
|
||||
"Teleport"
|
||||
{
|
||||
@@ -278,18 +278,18 @@
|
||||
}
|
||||
"CommitSuicide"
|
||||
{
|
||||
"windows" "386"
|
||||
"linux" "386"
|
||||
"windows" "388"
|
||||
"linux" "388"
|
||||
}
|
||||
"GetVelocity"
|
||||
{
|
||||
"windows" "129"
|
||||
"linux" "130"
|
||||
"windows" "130"
|
||||
"linux" "131"
|
||||
}
|
||||
"EyeAngles"
|
||||
{
|
||||
"windows" "121"
|
||||
"linux" "122"
|
||||
"windows" "122"
|
||||
"linux" "123"
|
||||
}
|
||||
"DispatchKeyValue"
|
||||
{
|
||||
@@ -324,35 +324,35 @@
|
||||
}
|
||||
}
|
||||
|
||||
/* Day of Defeat: Source (Orange Box Beta) */
|
||||
"dodsbeta"
|
||||
/* Day of Defeat: Source */
|
||||
"dod"
|
||||
{
|
||||
"Offsets"
|
||||
{
|
||||
"GiveNamedItem"
|
||||
{
|
||||
"windows" "349"
|
||||
"linux" "350"
|
||||
"windows" "350"
|
||||
"linux" "351"
|
||||
}
|
||||
"RemovePlayerItem"
|
||||
{
|
||||
"windows" "237"
|
||||
"linux" "238"
|
||||
"windows" "238"
|
||||
"linux" "239"
|
||||
}
|
||||
"Weapon_GetSlot"
|
||||
{
|
||||
"windows" "235"
|
||||
"linux" "236"
|
||||
"windows" "236"
|
||||
"linux" "237"
|
||||
}
|
||||
"Ignite"
|
||||
{
|
||||
"windows" "192"
|
||||
"linux" "193"
|
||||
"windows" "193"
|
||||
"linux" "194"
|
||||
}
|
||||
"Extinguish"
|
||||
{
|
||||
"windows" "196"
|
||||
"linux" "197"
|
||||
"windows" "197"
|
||||
"linux" "198"
|
||||
}
|
||||
"Teleport"
|
||||
{
|
||||
@@ -361,18 +361,18 @@
|
||||
}
|
||||
"CommitSuicide"
|
||||
{
|
||||
"windows" "386"
|
||||
"linux" "386"
|
||||
"windows" "388"
|
||||
"linux" "388"
|
||||
}
|
||||
"GetVelocity"
|
||||
{
|
||||
"windows" "129"
|
||||
"linux" "130"
|
||||
"windows" "130"
|
||||
"linux" "131"
|
||||
}
|
||||
"EyeAngles"
|
||||
{
|
||||
"windows" "121"
|
||||
"linux" "122"
|
||||
"windows" "122"
|
||||
"linux" "123"
|
||||
}
|
||||
"AcceptInput"
|
||||
{
|
||||
@@ -401,8 +401,8 @@
|
||||
}
|
||||
"WeaponEquip"
|
||||
{
|
||||
"windows" "228"
|
||||
"linux" "229"
|
||||
"windows" "229"
|
||||
"linux" "230"
|
||||
}
|
||||
"Activate"
|
||||
{
|
||||
|
||||
+40
-132
@@ -32,7 +32,6 @@
|
||||
"#supported"
|
||||
{
|
||||
"game" "cstrike"
|
||||
"game" "dod"
|
||||
"game" "hl2mp"
|
||||
"game" "ship"
|
||||
"game" "!Dystopia"
|
||||
@@ -92,7 +91,6 @@
|
||||
"#supported"
|
||||
{
|
||||
"game" "cstrike"
|
||||
"game" "dod"
|
||||
"game" "garrysmod"
|
||||
"game" "hl2mp"
|
||||
"game" "ship"
|
||||
@@ -145,7 +143,6 @@
|
||||
"#supported"
|
||||
{
|
||||
"game" "cstrike"
|
||||
"game" "dod"
|
||||
"game" "garrysmod"
|
||||
"game" "hl2mp"
|
||||
"game" "ship"
|
||||
@@ -198,7 +195,6 @@
|
||||
"#supported"
|
||||
{
|
||||
"game" "cstrike"
|
||||
"game" "dod"
|
||||
"game" "hl2mp"
|
||||
"game" "!Insurgency"
|
||||
"game" "pvkii"
|
||||
@@ -248,6 +244,46 @@
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/* EntityFactoryDictionary function */
|
||||
"#default"
|
||||
{
|
||||
"Signatures"
|
||||
{
|
||||
"EntityFactory"
|
||||
{
|
||||
"library" "server"
|
||||
"windows" "\xB8\x01\x00\x00\x00\x84\x2A\x2A\x2A\x2A\x2A\x75\x1D\x09\x2A\x2A\x2A\x2A\x2A\xB9\x2A\x2A\x2A\x2A\xE8\x2A\x2A\x2A\x2A\x68\x2A\x2A\x2A\x2A\xE8\x2A\x2A\x2A\x2A\x83\xC4\x04\xB8\x2A\x2A\x2A\x2A\xC3"
|
||||
"linux" "@_Z23EntityFactoryDictionaryv"
|
||||
}
|
||||
}
|
||||
}
|
||||
/* CBaseEntityOutput::FireOutput */
|
||||
"#default"
|
||||
{
|
||||
"#supported"
|
||||
{
|
||||
"game" "cstrike"
|
||||
"game" "hl2mp"
|
||||
}
|
||||
"Signatures"
|
||||
{
|
||||
"FireOutput"
|
||||
{
|
||||
"library" "server"
|
||||
"windows" "\x81\xEC\x1C\x03\x00\x00\x53\x55\x56\x8B\x71\x14"
|
||||
"linux" "@_ZN17CBaseEntityOutput10FireOutputE9variant_tP11CBaseEntityS2_f"
|
||||
}
|
||||
}
|
||||
"Offsets"
|
||||
{
|
||||
"FireOutputBackup"
|
||||
{
|
||||
"windows" "6"
|
||||
"linux" "6"
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/* Counter-Strike: Source */
|
||||
"cstrike"
|
||||
@@ -345,94 +381,6 @@
|
||||
}
|
||||
}
|
||||
|
||||
/* Day of Defeat */
|
||||
"dod"
|
||||
{
|
||||
"Offsets"
|
||||
{
|
||||
"GiveNamedItem"
|
||||
{
|
||||
"windows" "328"
|
||||
"linux" "329"
|
||||
}
|
||||
"RemovePlayerItem"
|
||||
{
|
||||
"windows" "226"
|
||||
"linux" "227"
|
||||
}
|
||||
"Weapon_GetSlot"
|
||||
{
|
||||
"windows" "224"
|
||||
"linux" "225"
|
||||
}
|
||||
"Ignite"
|
||||
{
|
||||
"windows" "188"
|
||||
"linux" "189"
|
||||
}
|
||||
"Extinguish"
|
||||
{
|
||||
"windows" "189"
|
||||
"linux" "190"
|
||||
}
|
||||
"Teleport"
|
||||
{
|
||||
"windows" "98"
|
||||
"linux" "99"
|
||||
}
|
||||
"CommitSuicide"
|
||||
{
|
||||
"windows" "356"
|
||||
"linux" "357"
|
||||
}
|
||||
"GetVelocity"
|
||||
{
|
||||
"windows" "126"
|
||||
"linux" "127"
|
||||
}
|
||||
"EyeAngles"
|
||||
{
|
||||
"windows" "118"
|
||||
"linux" "119"
|
||||
}
|
||||
"AcceptInput"
|
||||
{
|
||||
"windows" "35"
|
||||
"linux" "36"
|
||||
}
|
||||
"DispatchKeyValue"
|
||||
{
|
||||
"windows" "31"
|
||||
"linux" "30"
|
||||
}
|
||||
"DispatchKeyValueFloat"
|
||||
{
|
||||
"windows" "30"
|
||||
"linux" "31"
|
||||
}
|
||||
"DispatchKeyValueVector"
|
||||
{
|
||||
"windows" "29"
|
||||
"linux" "32"
|
||||
}
|
||||
"SetEntityModel"
|
||||
{
|
||||
"windows" "25"
|
||||
"linux" "26"
|
||||
}
|
||||
"WeaponEquip"
|
||||
{
|
||||
"windows" "217"
|
||||
"linux" "218"
|
||||
}
|
||||
"Activate"
|
||||
{
|
||||
"windows" "32"
|
||||
"linux" "33"
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/* Half-Life 2: Deathmatch */
|
||||
"hl2mp"
|
||||
{
|
||||
@@ -1818,45 +1766,5 @@
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/* EntityFactoryDictionary function */
|
||||
"#default"
|
||||
{
|
||||
"Signatures"
|
||||
{
|
||||
"EntityFactory"
|
||||
{
|
||||
"library" "server"
|
||||
"windows" "\xB8\x01\x00\x00\x00\x84\x2A\x2A\x2A\x2A\x2A\x75\x1D\x09\x2A\x2A\x2A\x2A\x2A\xB9\x2A\x2A\x2A\x2A\xE8\x2A\x2A\x2A\x2A\x68\x2A\x2A\x2A\x2A\xE8\x2A\x2A\x2A\x2A\x83\xC4\x04\xB8\x2A\x2A\x2A\x2A\xC3"
|
||||
"linux" "@_Z23EntityFactoryDictionaryv"
|
||||
}
|
||||
}
|
||||
}
|
||||
/* CBaseEntityOutput::FireOutput */
|
||||
"#default"
|
||||
{
|
||||
"#supported"
|
||||
{
|
||||
"game" "cstrike"
|
||||
"game" "hl2mp"
|
||||
}
|
||||
"Signatures"
|
||||
{
|
||||
"FireOutput"
|
||||
{
|
||||
"library" "server"
|
||||
"windows" "\x81\xEC\x1C\x03\x00\x00\x53\x55\x56\x8B\x71\x14"
|
||||
"linux" "@_ZN17CBaseEntityOutput10FireOutputE9variant_tP11CBaseEntityS2_f"
|
||||
}
|
||||
}
|
||||
"Offsets"
|
||||
{
|
||||
"FireOutputBackup"
|
||||
{
|
||||
"windows" "6"
|
||||
"linux" "6"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -21,8 +21,8 @@
|
||||
{
|
||||
"ForceRespawn"
|
||||
{
|
||||
"windows" "280"
|
||||
"linux" "281"
|
||||
"windows" "281"
|
||||
"linux" "282"
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -40,7 +40,9 @@
|
||||
* @file Contains SourceMod version information.
|
||||
*/
|
||||
|
||||
#define SVN_FULL_VERSION "1.0.2.2236"
|
||||
#define SVN_FILE_VERSION 1,0,2,2236
|
||||
#define SM_BUILD_STRING ""
|
||||
#define SM_BUILD_UNIQUEID "2537" SM_BUILD_STRING
|
||||
#define SVN_FULL_VERSION "1.0.4" SM_BUILD_STRING
|
||||
#define SVN_FILE_VERSION 1,0,4,0
|
||||
|
||||
#endif //_INCLUDE_SOURCEMOD_VERSION_H_
|
||||
|
||||
@@ -40,7 +40,9 @@
|
||||
* @file Contains SourceMod version information.
|
||||
*/
|
||||
|
||||
#define SVN_FULL_VERSION "$PMAJOR$.$PMINOR$.$PREVISION$.$GLOBAL_BUILD$"
|
||||
#define SVN_FILE_VERSION $PMAJOR$,$PMINOR$,$PREVISION$,$GLOBAL_BUILD$
|
||||
#define SM_BUILD_STRING "$BUILD_STRING$"
|
||||
#define SM_BUILD_UNIQUEID "$BUILD_ID$" SM_BUILD_STRING
|
||||
#define SVN_FULL_VERSION "$PMAJOR$.$PMINOR$.$PREVISION$" SM_BUILD_STRING
|
||||
#define SVN_FILE_VERSION $PMAJOR$,$PMINOR$,$PREVISION$,0
|
||||
|
||||
#endif //_INCLUDE_SOURCEMOD_VERSION_H_
|
||||
|
||||
+1
-1
@@ -1,7 +1,7 @@
|
||||
[PRODUCT]
|
||||
major = 1
|
||||
minor = 0
|
||||
revision = 3
|
||||
revision = 4
|
||||
|
||||
[core]
|
||||
folder = core
|
||||
|
||||
@@ -74,7 +74,7 @@ new RebuildCachePart[3] = {0}; /** Cache part sequence numbers */
|
||||
new PlayerSeq[MAXPLAYERS+1]; /** Player-specific sequence numbers */
|
||||
new bool:PlayerAuth[MAXPLAYERS+1]; /** Whether a player has been "pre-authed" */
|
||||
|
||||
#define _DEBUG
|
||||
//#define _DEBUG
|
||||
|
||||
public OnMapEnd()
|
||||
{
|
||||
|
||||
@@ -81,6 +81,7 @@ BuildDynamicMenu()
|
||||
|
||||
new Handle:kvMenu;
|
||||
kvMenu = CreateKeyValues("Commands");
|
||||
KvSetEscapeSequences(kvMenu, true);
|
||||
|
||||
new String:file[256];
|
||||
|
||||
@@ -100,8 +101,6 @@ BuildDynamicMenu()
|
||||
|
||||
new String:name[NAME_LENGTH];
|
||||
new String:buffer[NAME_LENGTH];
|
||||
|
||||
KvSetEscapeSequences(kvMenu, true);
|
||||
|
||||
if (!KvGotoFirstSubKey(kvMenu))
|
||||
{
|
||||
@@ -285,8 +284,7 @@ BuildDynamicMenu()
|
||||
else
|
||||
{
|
||||
submenuInput[Submenu_method] = Name;
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
KvGetString(kvMenu, "title", inputBuffer, sizeof(inputBuffer));
|
||||
@@ -587,13 +585,16 @@ public ParamCheck(client)
|
||||
|
||||
DisplayTopMenu(hAdminMenu, client, TopMenuPosition_LastCategory);
|
||||
|
||||
decl String:unquotedCommand[CMD_LENGTH];
|
||||
UnQuoteString(g_command[client], unquotedCommand, sizeof(unquotedCommand), "#@");
|
||||
|
||||
if (outputItem[Item_execute] == Execute_Player) // assume 'player' type execute option
|
||||
{
|
||||
FakeClientCommand(client, g_command[client]);
|
||||
FakeClientCommand(client, unquotedCommand);
|
||||
}
|
||||
else // assume 'server' type execute option
|
||||
{
|
||||
InsertServerCommand(g_command[client]);
|
||||
InsertServerCommand(unquotedCommand);
|
||||
ServerExecute();
|
||||
}
|
||||
|
||||
@@ -611,16 +612,20 @@ public Menu_Selection(Handle:menu, MenuAction:action, param1, param2)
|
||||
|
||||
if (action == MenuAction_Select)
|
||||
{
|
||||
new String:info[NAME_LENGTH];
|
||||
new String:unquotedinfo[NAME_LENGTH];
|
||||
|
||||
/* Get item info */
|
||||
new bool:found = GetMenuItem(menu, param2, info, sizeof(info));
|
||||
new bool:found = GetMenuItem(menu, param2, unquotedinfo, sizeof(unquotedinfo));
|
||||
|
||||
if (!found)
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
new String:info[NAME_LENGTH*2+1];
|
||||
QuoteString(unquotedinfo, info, sizeof(info), "#@");
|
||||
|
||||
|
||||
new String:buffer[6];
|
||||
new String:infobuffer[NAME_LENGTH+2];
|
||||
Format(infobuffer, sizeof(infobuffer), "\"%s\"", info);
|
||||
@@ -645,3 +650,72 @@ public Menu_Selection(Handle:menu, MenuAction:action, param1, param2)
|
||||
DisplayTopMenu(hAdminMenu, param1, TopMenuPosition_LastCategory);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
stock bool:QuoteString(String:input[], String:output[], maxlen, String:quotechars[])
|
||||
{
|
||||
new count = 0;
|
||||
new len = strlen(input);
|
||||
|
||||
for (new i=0; i<len; i++)
|
||||
{
|
||||
output[count] = input[i];
|
||||
count++;
|
||||
|
||||
if (count >= maxlen)
|
||||
{
|
||||
/* Null terminate for safety */
|
||||
output[maxlen-1] = 0;
|
||||
return false;
|
||||
}
|
||||
|
||||
if (FindCharInString(quotechars, input[i]) != -1 || input[i] == '\\')
|
||||
{
|
||||
/* This char needs escaping */
|
||||
output[count] = '\\';
|
||||
count++;
|
||||
|
||||
if (count >= maxlen)
|
||||
{
|
||||
/* Null terminate for safety */
|
||||
output[maxlen-1] = 0;
|
||||
return false;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
output[count] = 0;
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
stock bool:UnQuoteString(String:input[], String:output[], maxlen, String:quotechars[])
|
||||
{
|
||||
new count = 1;
|
||||
new len = strlen(input);
|
||||
|
||||
output[0] = input[0];
|
||||
|
||||
for (new i=1; i<len; i++)
|
||||
{
|
||||
output[count] = input[i];
|
||||
count++;
|
||||
|
||||
if (input[i+1] == '\\' && (input[i] == '\\' || FindCharInString(quotechars, input[i]) != -1))
|
||||
{
|
||||
/* valid quotechar followed by a backslash - Skip */
|
||||
i++;
|
||||
}
|
||||
|
||||
if (count >= maxlen)
|
||||
{
|
||||
/* Null terminate for safety */
|
||||
output[maxlen-1] = 0;
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
output[count] = 0;
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
@@ -49,6 +49,7 @@ public Plugin:myinfo =
|
||||
new Handle:hTopMenu = INVALID_HANDLE;
|
||||
|
||||
new g_BanTarget[MAXPLAYERS+1];
|
||||
new g_BanTargetUserId[MAXPLAYERS+1];
|
||||
new g_BanTime[MAXPLAYERS+1];
|
||||
|
||||
#include "basebans/ban.sp"
|
||||
|
||||
+39
-20
@@ -10,7 +10,7 @@
|
||||
* This program is free software; you can redistribute it and/or modify it under
|
||||
* the terms of the GNU General Public License, version 3.0, as published by the
|
||||
* Free Software Foundation.
|
||||
*
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful, but WITHOUT
|
||||
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
|
||||
* FOR A PARTICULAR PURPOSE. See the GNU General Public License for more
|
||||
@@ -30,9 +30,25 @@
|
||||
*
|
||||
* Version: $Id$
|
||||
*/
|
||||
|
||||
|
||||
PrepareBan(client, target, time, const String:reason[])
|
||||
{
|
||||
new originalTarget = GetClientOfUserId(g_BanTargetUserId[client]);
|
||||
|
||||
if (originalTarget != target)
|
||||
{
|
||||
if (!client)
|
||||
{
|
||||
PrintToServer("[SM] %t", "Player no longer available");
|
||||
}
|
||||
else
|
||||
{
|
||||
PrintToChat(client, "[SM] %t", "Player no longer available");
|
||||
}
|
||||
|
||||
return;
|
||||
}
|
||||
|
||||
decl String:authid[64], String:name[32];
|
||||
GetClientAuthString(target, authid, sizeof(authid));
|
||||
GetClientName(target, name, sizeof(name));
|
||||
@@ -69,26 +85,26 @@ PrepareBan(client, target, time, const String:reason[])
|
||||
DisplayBanTargetMenu(client)
|
||||
{
|
||||
new Handle:menu = CreateMenu(MenuHandler_BanPlayerList);
|
||||
|
||||
|
||||
decl String:title[100];
|
||||
Format(title, sizeof(title), "%T:", "Ban player", client);
|
||||
SetMenuTitle(menu, title);
|
||||
SetMenuExitBackButton(menu, true);
|
||||
|
||||
|
||||
AddTargetsToMenu2(menu, client, COMMAND_FILTER_NO_BOTS|COMMAND_FILTER_CONNECTED);
|
||||
|
||||
|
||||
DisplayMenu(menu, client, MENU_TIME_FOREVER);
|
||||
}
|
||||
|
||||
DisplayBanTimeMenu(client)
|
||||
{
|
||||
new Handle:menu = CreateMenu(MenuHandler_BanTimeList);
|
||||
|
||||
|
||||
decl String:title[100];
|
||||
Format(title, sizeof(title), "%T:", "Ban player", client);
|
||||
SetMenuTitle(menu, title);
|
||||
SetMenuExitBackButton(menu, true);
|
||||
|
||||
|
||||
AddMenuItem(menu, "0", "Permanent");
|
||||
AddMenuItem(menu, "10", "10 Minutes");
|
||||
AddMenuItem(menu, "30", "30 Minutes");
|
||||
@@ -96,21 +112,21 @@ DisplayBanTimeMenu(client)
|
||||
AddMenuItem(menu, "240", "4 Hours");
|
||||
AddMenuItem(menu, "1440", "1 Day");
|
||||
AddMenuItem(menu, "10080", "1 Week");
|
||||
|
||||
|
||||
DisplayMenu(menu, client, MENU_TIME_FOREVER);
|
||||
}
|
||||
|
||||
DisplayBanReasonMenu(client)
|
||||
{
|
||||
new Handle:menu = CreateMenu(MenuHandler_BanReasonList);
|
||||
|
||||
|
||||
decl String:title[100];
|
||||
Format(title, sizeof(title), "%T:", "Ban reason", client);
|
||||
SetMenuTitle(menu, title);
|
||||
SetMenuExitBackButton(menu, true);
|
||||
|
||||
|
||||
/* :TODO: we should either remove this or make it configurable */
|
||||
|
||||
|
||||
AddMenuItem(menu, "Abusive", "Abusive");
|
||||
AddMenuItem(menu, "Racism", "Racism");
|
||||
AddMenuItem(menu, "General cheating/exploits", "General cheating/exploits");
|
||||
@@ -124,11 +140,11 @@ DisplayBanReasonMenu(client)
|
||||
AddMenuItem(menu, "Unacceptable Spray", "Unacceptable Spray");
|
||||
AddMenuItem(menu, "Breaking Server Rules", "Breaking Server Rules");
|
||||
AddMenuItem(menu, "Other", "Other");
|
||||
|
||||
|
||||
DisplayMenu(menu, client, MENU_TIME_FOREVER);
|
||||
}
|
||||
|
||||
public AdminMenu_Ban(Handle:topmenu,
|
||||
public AdminMenu_Ban(Handle:topmenu,
|
||||
TopMenuAction:action,
|
||||
TopMenuObject:object_id,
|
||||
param,
|
||||
@@ -161,9 +177,9 @@ public MenuHandler_BanReasonList(Handle:menu, MenuAction:action, param1, param2)
|
||||
else if (action == MenuAction_Select)
|
||||
{
|
||||
decl String:info[64];
|
||||
|
||||
|
||||
GetMenuItem(menu, param2, info, sizeof(info));
|
||||
|
||||
|
||||
PrepareBan(param1, g_BanTarget[param1], g_BanTime[param1], info);
|
||||
}
|
||||
}
|
||||
@@ -185,7 +201,7 @@ public MenuHandler_BanPlayerList(Handle:menu, MenuAction:action, param1, param2)
|
||||
{
|
||||
decl String:info[32], String:name[32];
|
||||
new userid, target;
|
||||
|
||||
|
||||
GetMenuItem(menu, param2, info, sizeof(info), _, name, sizeof(name));
|
||||
userid = StringToInt(info);
|
||||
|
||||
@@ -200,6 +216,7 @@ public MenuHandler_BanPlayerList(Handle:menu, MenuAction:action, param1, param2)
|
||||
else
|
||||
{
|
||||
g_BanTarget[param1] = target;
|
||||
g_BanTargetUserId[param1] = userid;
|
||||
DisplayBanTimeMenu(param1);
|
||||
}
|
||||
}
|
||||
@@ -221,10 +238,10 @@ public MenuHandler_BanTimeList(Handle:menu, MenuAction:action, param1, param2)
|
||||
else if (action == MenuAction_Select)
|
||||
{
|
||||
decl String:info[32];
|
||||
|
||||
|
||||
GetMenuItem(menu, param2, info, sizeof(info));
|
||||
g_BanTime[param1] = StringToInt(info);
|
||||
|
||||
|
||||
DisplayBanReasonMenu(param1);
|
||||
}
|
||||
}
|
||||
@@ -237,12 +254,12 @@ public Action:Command_Ban(client, args)
|
||||
ReplyToCommand(client, "[SM] Usage: sm_ban <#userid|name> <minutes|0> [reason]");
|
||||
return Plugin_Handled;
|
||||
}
|
||||
|
||||
|
||||
decl len, next_len;
|
||||
decl String:Arguments[256];
|
||||
GetCmdArgString(Arguments, sizeof(Arguments));
|
||||
|
||||
decl String:arg[65];
|
||||
decl String:arg[65];
|
||||
len = BreakString(Arguments, arg, sizeof(arg));
|
||||
|
||||
new target = FindTarget(client, arg, true);
|
||||
@@ -264,6 +281,8 @@ public Action:Command_Ban(client, args)
|
||||
|
||||
new time = StringToInt(s_time);
|
||||
|
||||
g_BanTargetUserId[client] = GetClientUserId(target);
|
||||
|
||||
PrepareBan(client, target, time, Arguments[len]);
|
||||
|
||||
return Plugin_Handled;
|
||||
|
||||
+1
-1
@@ -129,7 +129,7 @@ public Action:Command_SayChat(client, args)
|
||||
new len = BreakString(message, arg, sizeof(arg));
|
||||
new target = FindTarget(client, arg, true, false);
|
||||
|
||||
if (target == -1)
|
||||
if (target == -1 || len == -1)
|
||||
return Plugin_Handled;
|
||||
|
||||
decl String:name2[64];
|
||||
|
||||
@@ -634,7 +634,28 @@ native Float:GetClientAvgPackets(client, NetFlow:flow);
|
||||
native GetClientOfUserId(userid);
|
||||
|
||||
/**
|
||||
* Disconnects a client from the server.
|
||||
* Disconnects a client from the server as soon as the next frame starts.
|
||||
*
|
||||
* Note: Originally, KickClient() was immediate. The delay was introduced
|
||||
* because despite warnings, plugins were using it in ways that would crash.
|
||||
* The new safe version can break cases that rely on immediate disconnects,
|
||||
* but ensures that plugins do not accidentally cause crashes.
|
||||
*
|
||||
* If you need immediate disconnects, use KickClientEx().
|
||||
*
|
||||
* Note: IsClientInKickQueue() will return true before the kick occurs.
|
||||
*
|
||||
* @param client Client index.
|
||||
* @param format Optional formatting rules for disconnect reason.
|
||||
* Note that a period is automatically appended to the string by the engine.
|
||||
* @param ... Variable number of format parameters.
|
||||
* @noreturn
|
||||
* @error Invalid client index, or client not connected.
|
||||
*/
|
||||
native KickClient(client, const String:format[]="", any:...);
|
||||
|
||||
/**
|
||||
* Immediately disconnects a client from the server.
|
||||
*
|
||||
* Kicking clients from certain events or callbacks may cause crashes. If in
|
||||
* doubt, create a short (0.1 second) timer to kick the client in the next
|
||||
@@ -647,7 +668,7 @@ native GetClientOfUserId(userid);
|
||||
* @noreturn
|
||||
* @error Invalid client index, or client not connected.
|
||||
*/
|
||||
native KickClient(client, const String:format[]="", any:...);
|
||||
native KickClientEx(client, const String:format[]="", any:...);
|
||||
|
||||
/**
|
||||
* Changes a client's team through the mod's generic team changing function.
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
/**
|
||||
* vim: set ts=4 :
|
||||
* =============================================================================
|
||||
* SourceMod (C)2004-2007 AlliedModders LLC. All rights reserved.
|
||||
* SourceMod (C)2004-2008 AlliedModders LLC. All rights reserved.
|
||||
* =============================================================================
|
||||
*
|
||||
* This file is part of the SourceMod/SourcePawn SDK.
|
||||
@@ -298,6 +298,8 @@ functag SrvCmd Action:public(args);
|
||||
/**
|
||||
* Creates a server-only console command, or hooks an already existing one.
|
||||
*
|
||||
* Server commands are case sensitive.
|
||||
*
|
||||
* @param cmd Name of the command to hook or create.
|
||||
* @param callback A function to use as a callback for when the command is invoked.
|
||||
* @param description Optional description to use for command creation.
|
||||
@@ -320,6 +322,10 @@ functag ConCmd Action:public(client, args);
|
||||
/**
|
||||
* Creates a console command, or hooks an already existing one.
|
||||
*
|
||||
* Console commands are case sensitive. However, if the command already exists in the game,
|
||||
* the a client may enter the command in any case. SourceMod corrects for this automatically,
|
||||
* and you should only hook the "real" version of the command.
|
||||
*
|
||||
* @param cmd Name of the command to hook or create.
|
||||
* @param callback A function to use as a callback for when the command is invoked.
|
||||
* @param description Optional description to use for command creation.
|
||||
@@ -334,6 +340,8 @@ native RegConsoleCmd(const String:cmd[], ConCmd:callback, const String:descripti
|
||||
* it is created. When this command is invoked, the access rights of the player are
|
||||
* automatically checked before allowing it to continue.
|
||||
*
|
||||
* Admin commands are case sensitive from both the client and server.
|
||||
*
|
||||
* @param cmd String containing command to register.
|
||||
* @param callback A function to use as a callback for when the command is invoked.
|
||||
* @param adminflags Administrative flags (bitstring) to use for permissions.
|
||||
|
||||
@@ -37,11 +37,13 @@
|
||||
|
||||
#include <version>
|
||||
|
||||
#define SOURCEMOD_PLUGINAPI_VERSION 2
|
||||
#define SOURCEMOD_PLUGINAPI_VERSION 3
|
||||
struct PlVers
|
||||
{
|
||||
version,
|
||||
String:filevers[],
|
||||
String:date[],
|
||||
String:time[]
|
||||
};
|
||||
|
||||
/**
|
||||
@@ -76,7 +78,9 @@ enum Identity
|
||||
public PlVers:__version =
|
||||
{
|
||||
version = SOURCEMOD_PLUGINAPI_VERSION,
|
||||
filevers = SOURCEMOD_VERSION
|
||||
filevers = SOURCEMOD_VERSION,
|
||||
date = __DATE__,
|
||||
time = __TIME__
|
||||
};
|
||||
|
||||
/**
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
/**
|
||||
* vim: set ts=4 :
|
||||
* =============================================================================
|
||||
* SourceMod (C)2004-2007 AlliedModders LLC. All rights reserved.
|
||||
* SourceMod (C)2004-2008 AlliedModders LLC. All rights reserved.
|
||||
* =============================================================================
|
||||
*
|
||||
* This file is part of the SourceMod/SourcePawn SDK.
|
||||
|
||||
@@ -37,6 +37,6 @@
|
||||
|
||||
#define SOURCEMOD_V_MAJOR 1 /**< SourceMod Major version */
|
||||
#define SOURCEMOD_V_MINOR 0 /**< SourceMod Minor version */
|
||||
#define SOURCEMOD_V_RELEASE 2 /**< SourceMod Release version */
|
||||
#define SOURCEMOD_V_RELEASE 4 /**< SourceMod Release version */
|
||||
|
||||
#define SOURCEMOD_VERSION "1.0.2.2236" /**< SourceMod version string (major.minor.release.build) */
|
||||
#define SOURCEMOD_VERSION "1.0.4" /**< SourceMod version string (major.minor.release.build) */
|
||||
|
||||
@@ -39,4 +39,4 @@
|
||||
#define SOURCEMOD_V_MINOR $PMINOR$ /**< SourceMod Minor version */
|
||||
#define SOURCEMOD_V_RELEASE $PREVISION$ /**< SourceMod Release version */
|
||||
|
||||
#define SOURCEMOD_VERSION "$PMAJOR$.$PMINOR$.$PREVISION$.$GLOBAL_BUILD$" /**< SourceMod version string (major.minor.release.build) */
|
||||
#define SOURCEMOD_VERSION "$PMAJOR$.$PMINOR$.$PREVISION$$BUILD_STRING$" /**< SourceMod version string (major.minor.release.build) */
|
||||
|
||||
@@ -0,0 +1 @@
|
||||
1.0.4
|
||||
+5
-60
@@ -2,7 +2,7 @@
|
||||
* vim: set ts=4 :
|
||||
* =============================================================================
|
||||
* SourceMod
|
||||
* Copyright (C) 2004-2007 AlliedModders LLC. All rights reserved.
|
||||
* Copyright (C) 2004-2008 AlliedModders LLC. All rights reserved.
|
||||
* =============================================================================
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify it under
|
||||
@@ -50,7 +50,7 @@
|
||||
using namespace SourcePawn;
|
||||
|
||||
#define SMINTERFACE_FORWARDMANAGER_NAME "IForwardManager"
|
||||
#define SMINTERFACE_FORWARDMANAGER_VERSION 2
|
||||
#define SMINTERFACE_FORWARDMANAGER_VERSION 3
|
||||
|
||||
/*
|
||||
* There is some very important documentation at the bottom of this file.
|
||||
@@ -79,66 +79,11 @@ namespace SourceMod
|
||||
ET_Single = 1, /**< Only return the last exec, ignore all others */
|
||||
ET_Event = 2, /**< Acts as an event with the ResultTypes above, no mid-Stops allowed, returns highest */
|
||||
ET_Hook = 3, /**< Acts as a hook with the ResultTypes above, mid-Stops allowed, returns highest */
|
||||
ET_Custom = 4, /**< Ignored or handled by an IForwardFilter */
|
||||
ET_LowEvent = 4, /**< Same as ET_Event except that it returns the lowest value */
|
||||
};
|
||||
|
||||
class IForward;
|
||||
|
||||
/**
|
||||
* @brief Allows interception of how the Forward System executes functions.
|
||||
*/
|
||||
class IForwardFilter
|
||||
{
|
||||
public:
|
||||
/**
|
||||
* @brief Called when an error occurs executing a plugin.
|
||||
*
|
||||
* @param fwd IForward pointer.
|
||||
* @param func IPluginFunction pointer to the failed function.
|
||||
* @param err Error code.
|
||||
* @return True to handle, false to pass to global error reporter.
|
||||
*/
|
||||
virtual bool OnErrorReport(IForward *fwd,
|
||||
IPluginFunction *func,
|
||||
int err)
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief Called after each function return during execution.
|
||||
* NOTE: Only used for ET_Custom.
|
||||
*
|
||||
* @param fwd IForward pointer.
|
||||
* @param func IPluginFunction pointer to the executed function.
|
||||
* @param retval Pointer to current return value (can be modified).
|
||||
* @return ResultType denoting the next action to take.
|
||||
*/
|
||||
virtual ResultType OnFunctionReturn(IForward *fwd,
|
||||
IPluginFunction *func,
|
||||
cell_t *retval)
|
||||
{
|
||||
return Pl_Continue;
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief Called when execution begins.
|
||||
*/
|
||||
virtual void OnExecuteBegin()
|
||||
{
|
||||
};
|
||||
|
||||
/**
|
||||
* @brief Called when execution ends.
|
||||
*
|
||||
* @param final_ret Final return value (modifiable).
|
||||
* @param success Number of successful execs.
|
||||
* @param failed Number of failed execs.
|
||||
*/
|
||||
virtual void OnExecuteEnd(cell_t *final_ret, unsigned int success, unsigned int failed)
|
||||
{
|
||||
}
|
||||
};
|
||||
class IForwardFilter;
|
||||
|
||||
/**
|
||||
* @brief Unmanaged Forward, abstracts calling multiple functions as "forwards," or collections of functions.
|
||||
@@ -180,7 +125,7 @@ namespace SourceMod
|
||||
* @brief Executes the forward.
|
||||
*
|
||||
* @param result Optional pointer to store result in.
|
||||
* @param filter Optional pointer to an IForwardFilter.
|
||||
* @param filter Do not use.
|
||||
* @return Error code, if any.
|
||||
*/
|
||||
virtual int Execute(cell_t *result, IForwardFilter *filter=NULL) =0;
|
||||
|
||||
+3
-3
@@ -246,7 +246,7 @@ namespace SourceMod
|
||||
* permissions.
|
||||
* @param ident Security token for any permissions. If typeAccess is NULL, this
|
||||
* becomes the owning identity.
|
||||
* @param err Optional pointer to store an error code.
|
||||
* @param err Optional pointer to store an error code on failure (undefined on success).
|
||||
* @return A new HandleType_t unique ID, or 0 on failure.
|
||||
*/
|
||||
virtual HandleType_t CreateType(const char *name,
|
||||
@@ -283,7 +283,7 @@ namespace SourceMod
|
||||
* @param object Object to bind to the handle.
|
||||
* @param owner Owner of the new Handle (may be NULL).
|
||||
* @param ident Identity for type access if needed (may be NULL).
|
||||
* @param err Optional pointer to store an error code.
|
||||
* @param err Optional pointer to store an error code on failure (undefined on success).
|
||||
* @return A new Handle_t, or 0 on failure.
|
||||
*/
|
||||
virtual Handle_t CreateHandle(HandleType_t type,
|
||||
@@ -349,7 +349,7 @@ namespace SourceMod
|
||||
* @param pSec Security pointer; pOwner is written as the owner,
|
||||
* pIdent is used as the parent identity for authorization.
|
||||
* @param pAccess Access right descriptor for the Handle; NULL for type defaults.
|
||||
* @param err Optional pointer to store an error code.
|
||||
* @param err Optional pointer to store an error code on failure (undefined on success).
|
||||
* @return A new Handle_t, or 0 on failure.
|
||||
*/
|
||||
virtual Handle_t CreateHandleEx(HandleType_t type,
|
||||
|
||||
@@ -39,7 +39,7 @@ endif
|
||||
ifeq "$(ENGINE)" "orangebox"
|
||||
HL2SDK = $(HL2SDK_OB)
|
||||
HL2PUB = $(HL2SDK_OB)/public
|
||||
HL2LIB = $(HL2SDK_OB)/linux_sdk
|
||||
HL2LIB = $(HL2SDK_OB)/lib/linux
|
||||
CFLAGS += -DORANGEBOX_BUILD
|
||||
METAMOD = $(SOURCEMM16)
|
||||
INCLUDE += -I$(HL2SDK)/public/game/server
|
||||
|
||||
@@ -42,7 +42,7 @@ endif
|
||||
ifeq "$(ENGINE)" "orangebox"
|
||||
HL2SDK = $(HL2SDK_OB)
|
||||
HL2PUB = $(HL2SDK_OB)/public
|
||||
HL2LIB = $(HL2SDK_OB)/linux_sdk
|
||||
HL2LIB = $(HL2SDK_OB)/lib/linux
|
||||
CFLAGS += -DORANGEBOX_BUILD
|
||||
METAMOD = $(SOURCEMM16)
|
||||
INCLUDE += -I$(HL2SDK)/public/game/server
|
||||
|
||||
@@ -0,0 +1 @@
|
||||
2
|
||||
@@ -1641,7 +1641,6 @@ static int substpattern(unsigned char *line,size_t buffersize,char *pattern,char
|
||||
if (args[arg]!=NULL) {
|
||||
strins((char*)s,(char*)args[arg],strlen((char*)args[arg]));
|
||||
s+=strlen((char*)args[arg]);
|
||||
e++;
|
||||
} else {
|
||||
error(236); /* parameter does not exist, incorrect #define pattern */
|
||||
strins((char*)s,(char*)e,2);
|
||||
|
||||
@@ -1346,6 +1346,15 @@ static int hier13(value *lval)
|
||||
if ((array1 && array2) && (total1 && total2)) {
|
||||
markheap(MEMUSE_DYNAMIC, 0);
|
||||
}
|
||||
/* If both sides are arrays, we should return the maximal as the lvalue.
|
||||
* Otherwise we could buffer overflow and the compiler is too stupid.
|
||||
* Literal strings have a constval == -(num_cells) so the cmp is flipped.
|
||||
*/
|
||||
if (lval->ident==iARRAY && lval2.ident==iARRAY
|
||||
&& lval->constval < 0
|
||||
&& lval->constval > lval2.constval) {
|
||||
*lval = lval2;
|
||||
}
|
||||
if (lval->ident==iARRAY)
|
||||
lval->ident=iREFARRAY; /* iARRAY becomes iREFARRAY */
|
||||
else if (lval->ident!=iREFARRAY)
|
||||
|
||||
@@ -19,7 +19,9 @@
|
||||
* @file Contains SourceMod version information.
|
||||
*/
|
||||
|
||||
#define SVN_FULL_VERSION "1.0.2.2138"
|
||||
#define SVN_FILE_VERSION 1,0,2,2138
|
||||
#define SM_BUILD_STRING ""
|
||||
#define SM_BUILD_UNIQUEID "2537" SM_BUILD_STRING
|
||||
#define SVN_FULL_VERSION "1.0.4" SM_BUILD_STRING
|
||||
#define SVN_FILE_VERSION 1,0,4,0
|
||||
|
||||
#endif //_INCLUDE_SOURCEMOD_VERSION_H_
|
||||
|
||||
@@ -19,7 +19,9 @@
|
||||
* @file Contains SourceMod version information.
|
||||
*/
|
||||
|
||||
#define SVN_FULL_VERSION "$PMAJOR$.$PMINOR$.$PREVISION$.$LOCAL_BUILD$"
|
||||
#define SVN_FILE_VERSION $PMAJOR$,$PMINOR$,$PREVISION$,$LOCAL_BUILD$
|
||||
#define SM_BUILD_STRING "$BUILD_STRING$"
|
||||
#define SM_BUILD_UNIQUEID "$BUILD_ID$" SM_BUILD_STRING
|
||||
#define SVN_FULL_VERSION "$PMAJOR$.$PMINOR$.$PREVISION$" SM_BUILD_STRING
|
||||
#define SVN_FILE_VERSION $PMAJOR$,$PMINOR$,$PREVISION$,0
|
||||
|
||||
#endif //_INCLUDE_SOURCEMOD_VERSION_H_
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user