added SetGlobalTarget() calls to anything that uses Format()
--HG-- extra : convert_revision : svn%3A39bc706e-5318-0410-9160-8a85361fbb7c/trunk%401017
This commit is contained in:
@@ -659,6 +659,8 @@ static cell_t sm_ServerCommand(IPluginContext *pContext, const cell_t *params)
|
||||
char buffer[1024];
|
||||
size_t len = g_SourceMod.FormatString(buffer, sizeof(buffer)-2, pContext, params, 1);
|
||||
|
||||
g_SourceMod.SetGlobalTarget(LANG_SERVER);
|
||||
|
||||
/* One byte for null terminator, one for newline */
|
||||
buffer[len++] = '\n';
|
||||
buffer[len] = '\0';
|
||||
@@ -673,6 +675,8 @@ static cell_t sm_InsertServerCommand(IPluginContext *pContext, const cell_t *par
|
||||
char buffer[1024];
|
||||
size_t len = g_SourceMod.FormatString(buffer, sizeof(buffer)-2, pContext, params, 1);
|
||||
|
||||
g_SourceMod.SetGlobalTarget(LANG_SERVER);
|
||||
|
||||
/* One byte for null terminator, one for newline */
|
||||
buffer[len++] = '\n';
|
||||
buffer[len] = '\0';
|
||||
@@ -703,6 +707,8 @@ static cell_t sm_ClientCommand(IPluginContext *pContext, const cell_t *params)
|
||||
return pContext->ThrowNativeError("Client %d is not connected", params[1]);
|
||||
}
|
||||
|
||||
g_SourceMod.SetGlobalTarget(params[1]);
|
||||
|
||||
char buffer[256];
|
||||
g_SourceMod.FormatString(buffer, sizeof(buffer), pContext, params, 2);
|
||||
|
||||
@@ -738,6 +744,8 @@ static cell_t FakeClientCommand(IPluginContext *pContext, const cell_t *params)
|
||||
|
||||
static cell_t ReplyToCommand(IPluginContext *pContext, const cell_t *params)
|
||||
{
|
||||
g_SourceMod.SetGlobalTarget(params[1]);
|
||||
|
||||
/* Build the format string */
|
||||
char buffer[1024];
|
||||
size_t len = g_SourceMod.FormatString(buffer, sizeof(buffer)-2, pContext, params, 2);
|
||||
|
||||
Reference in New Issue
Block a user