Compare commits

...

3 Commits

Author SHA1 Message Date
Roman Kováč
ca772fcd93
Merge e42a878576 into c4d5235217 2025-11-24 00:50:02 +01:00
caxanga334
c4d5235217
Update DoD:S Gamedata (#2377)
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
Adds missing GetAttachment vtable offset.
2025-11-20 23:43:49 +00:00
Roman Kováč
e42a878576
Fix multiple commands execution in adminmenu_custom.txt
This PR fixes the semicolon parsing issue for adminmenu_custom.txt - player type cmd execution.

Below is an example ```adminmenu_custom.txt``` to reproduce the semicolon ";" not working before this fix - multiple commands delimited with ";" will not work.

```
"Commands"
{
	"ServerCommands"
	{
		"AntiCheat"
		{
			"admin"	"sm_ban"

			"Enable KACR"
			{
				"cmd"	"sm plugins load disabled/kigen-ac_redux; sm_chat KACR is enabled"
				"execute"	"server"
			}
		}
	}
}
```
2025-03-22 02:18:33 +07:00
2 changed files with 22 additions and 7 deletions

View File

@ -121,6 +121,13 @@
"linux" "259"
"linux64" "259"
}
"GetAttachment"
{
"windows" "211"
"windows64" "211"
"linux" "212"
"linux64" "212"
}
}
"Keys"

View File

@ -584,14 +584,22 @@ public void ParamCheck(int client)
char unquotedCommand[CMD_LENGTH];
UnQuoteString(g_command[client], unquotedCommand, sizeof(unquotedCommand), "#@");
if (outputItem.execute == Execute_Player) // assume 'player' type execute option
// Use commands directly without unnecessary unquoting
char commands[10][CMD_LENGTH];
int count = ExplodeString(g_command[client], ";", commands, sizeof(commands), sizeof(commands[]));
for (int i = 0; i < count; i++)
{
FakeClientCommand(client, unquotedCommand);
}
else // assume 'server' type execute option
{
InsertServerCommand(unquotedCommand);
ServerExecute();
TrimString(commands[i]);
if (outputItem.execute == Execute_Player) // assume 'player' type execute option
{
FakeClientCommand(client, commands[i]);
}
else // assume 'server' type execute option
{
InsertServerCommand(commands[i]);
ServerExecute();
}
}
g_command[client][0] = '\0';