Compare commits

...

8 Commits

Author SHA1 Message Date
Arron Vinyard
a0748c7f65
Merge 2f8f7e80f4 into 1819f491b5 2025-11-25 23:21:49 +00:00
dependabot[bot]
1819f491b5
Bump actions/checkout from 5 to 6 (#2378)
Some checks failed
Continuous Integration / ${{ matrix.os_short }}-${{ matrix.compiler_cc }} (clang, clang++, ubuntu-latest, linux) (push) Has been cancelled
Continuous Integration / ${{ matrix.os_short }}-${{ matrix.compiler_cc }} (clang-14, clang++-14, ubuntu-22.04, linux) (push) Has been cancelled
Continuous Integration / ${{ matrix.os_short }}-${{ matrix.compiler_cc }} (msvc, windows-latest, win) (push) Has been cancelled
hl2sdk-mock tests / mock (push) Has been cancelled
Bumps [actions/checkout](https://github.com/actions/checkout) from 5 to 6.
- [Release notes](https://github.com/actions/checkout/releases)
- [Changelog](https://github.com/actions/checkout/blob/main/CHANGELOG.md)
- [Commits](https://github.com/actions/checkout/compare/v5...v6)

---
updated-dependencies:
- dependency-name: actions/checkout
  dependency-version: '6'
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2025-11-24 15:55:07 +00:00
Arron Vinyard
2f8f7e80f4
Add MAX_CONSOLE_LENGTH to smn_console.cpp 2022-05-03 22:16:04 -04:00
Arron Vinyard
97770fa508
Update comment 2022-03-31 07:34:01 -04:00
Arron Vinyard
fa8971eb5b
Update comments 2022-03-31 07:31:34 -04:00
Arron Vinyard
2b5ad17fbc
Add COMMAND_MAX_* defines 2022-03-31 07:30:22 -04:00
Arron Vinyard
c18214ce79
Add doc comment 2022-03-31 07:18:10 -04:00
Arron Vinyard
1eac58a5b7
Add MAX_CONSOLE_LENGTH define to console.inc
This creates a define to match the underlying SourceMod buffer sizes for Print functions
2022-03-30 22:31:00 -04:00
7 changed files with 34 additions and 27 deletions

View File

@ -36,7 +36,7 @@ jobs:
MYSQL_VERSION: '5.7'
MMSOURCE_VERSION: '1.12'
steps:
- uses: actions/checkout@v5
- uses: actions/checkout@v6
with:
submodules: recursive
path: sourcemod

View File

@ -12,20 +12,20 @@ jobs:
mock:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v5
- uses: actions/checkout@v6
name: Clone sourcemod
with:
submodules: recursive
path: sourcemod
- uses: actions/checkout@v5
- uses: actions/checkout@v6
name: Clone metamod-source
with:
repository: alliedmodders/metamod-source
submodules: recursive
path: metamod-source
- uses: actions/checkout@v5
- uses: actions/checkout@v6
name: Clone hl2sdk-mock
with:
repository: alliedmodders/hl2sdk-mock

View File

@ -25,7 +25,7 @@ jobs:
env:
ARCH: x86,x86_64
steps:
- uses: actions/checkout@v5
- uses: actions/checkout@v6
with:
submodules: recursive

View File

@ -10,7 +10,7 @@ jobs:
update_translations:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v5
- uses: actions/checkout@v6
with:
submodules: recursive

View File

@ -15,7 +15,7 @@ jobs:
check_translations:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v5
- uses: actions/checkout@v6
- uses: actions/setup-python@v6
name: Setup Python 3.10

View File

@ -39,6 +39,8 @@
#include <bridge/include/CoreProvider.h>
#include <bridge/include/IVEngineServerBridge.h>
static constexpr unsigned MAX_CONSOLE_LENGTH = 1024; // paired to MAX_CONSOLE_LENGTH in console.inc
static cell_t CheckCommandAccess(IPluginContext *pContext, const cell_t *params)
{
if (params[1] == 0)
@ -88,7 +90,7 @@ static cell_t CheckAccess(IPluginContext *pContext, const cell_t *params)
static cell_t sm_PrintToServer(IPluginContext *pCtx, const cell_t *params)
{
char buffer[1024];
char buffer[MAX_CONSOLE_LENGTH];
char *fmt;
int arg = 2;
@ -129,7 +131,7 @@ static cell_t sm_PrintToConsole(IPluginContext *pCtx, const cell_t *params)
g_pSM->SetGlobalTarget(index);
char buffer[1024];
char buffer[MAX_CONSOLE_LENGTH];
char *fmt;
int arg = 3;
@ -154,7 +156,7 @@ static cell_t sm_ServerCommand(IPluginContext *pContext, const cell_t *params)
{
g_pSM->SetGlobalTarget(SOURCEMOD_SERVER_LANGUAGE);
char buffer[1024];
char buffer[MAX_CONSOLE_LENGTH];
size_t len;
{
DetectExceptions eh(pContext);
@ -176,7 +178,7 @@ static cell_t sm_InsertServerCommand(IPluginContext *pContext, const cell_t *par
{
g_pSM->SetGlobalTarget(SOURCEMOD_SERVER_LANGUAGE);
char buffer[1024];
char buffer[MAX_CONSOLE_LENGTH];
size_t len;
{
DetectExceptions eh(pContext);
@ -265,7 +267,7 @@ static cell_t ReplyToCommand(IPluginContext *pContext, const cell_t *params)
g_pSM->SetGlobalTarget(params[1]);
/* Build the format string */
char buffer[1024];
char buffer[MAX_CONSOLE_LENGTH];
size_t len;
{
DetectExceptions eh(pContext);
@ -338,19 +340,19 @@ static cell_t RemoveServerTag(IPluginContext *pContext, const cell_t *params)
REGISTER_NATIVES(consoleNatives)
{
{"CheckCommandAccess", CheckCommandAccess},
{"CheckAccess", CheckAccess},
{"PrintToServer", sm_PrintToServer},
{"PrintToConsole", sm_PrintToConsole},
{"ServerCommand", sm_ServerCommand},
{"InsertServerCommand", sm_InsertServerCommand},
{"ServerExecute", sm_ServerExecute},
{"ClientCommand", sm_ClientCommand},
{"FakeClientCommand", FakeClientCommand},
{"ReplyToCommand", ReplyToCommand},
{"GetCmdReplySource", GetCmdReplyTarget},
{"SetCmdReplySource", SetCmdReplyTarget},
{"AddServerTag", AddServerTag},
{"RemoveServerTag", RemoveServerTag},
{NULL, NULL}
{"CheckCommandAccess", CheckCommandAccess},
{"CheckAccess", CheckAccess},
{"PrintToServer", sm_PrintToServer},
{"PrintToConsole", sm_PrintToConsole},
{"ServerCommand", sm_ServerCommand},
{"InsertServerCommand", sm_InsertServerCommand},
{"ServerExecute", sm_ServerExecute},
{"ClientCommand", sm_ClientCommand},
{"FakeClientCommand", FakeClientCommand},
{"ReplyToCommand", ReplyToCommand},
{"GetCmdReplySource", GetCmdReplyTarget},
{"SetCmdReplySource", SetCmdReplyTarget},
{"AddServerTag", AddServerTag},
{"RemoveServerTag", RemoveServerTag},
{NULL, NULL}
};

View File

@ -37,6 +37,11 @@
#define INVALID_FCVAR_FLAGS (-1)
#define MAX_CONSOLE_LENGTH 1024 /**< Maximum buffer size for console messages */
#define COMMAND_MAX_ARGC 64 /**< Maxmimum allowed command argument count */
#define COMMAND_MAX_LENGTH 512 /**< Maxmimum allowed length of a command argument */
/**
* Console variable query helper values.
*/