Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
22 changes: 15 additions & 7 deletions plugins/adminmenu/dynamicmenu.sp
Original file line number Diff line number Diff line change
Expand Up @@ -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
{
FakeClientCommand(client, unquotedCommand);
}
else // assume 'server' type execute option
// Use commands directly without unnecessary unquoting
Copy link
Contributor

@Rushaway Rushaway May 26, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If you want to get ride of UnQuoteString, delete following lines + remove the function from the file.

char unquotedCommand[CMD_LENGTH];
UnQuoteString(g_command[client], unquotedCommand, sizeof(unquotedCommand), "#@");

char commands[10][CMD_LENGTH];
int count = ExplodeString(g_command[client], ";", commands, sizeof(commands), sizeof(commands[]));

for (int i = 0; i < count; i++)
{
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';
Expand Down