}
}
-void GameCommand_bot_cmd(float request, float argc)
+void GameCommand_bot_cmd(float request, float argc, string command)
{
switch(request)
{
if(bot == world)
bot = find_bot_by_name(argv(2));
if(bot)
- bot_queuecommand(bot, strcat(argv(3), " ", argv(4)));
+ bot_queuecommand(bot, substring(s, argv_start_index(3), -1));
}
}
else
bot = find_bot_by_name(argv(1));
if(bot)
{
- print(strcat("Command '", strcat(argv(2), " ", argv(3)), "' sent to bot ", bot.netname, "\n"));
- bot_queuecommand(bot, strcat(argv(2), " ", argv(3)));
+ print(strcat("Command '", substring(command, argv_start_index(2), -1), "' sent to bot ", bot.netname, "\n"));
+ bot_queuecommand(bot, substring(command, argv_start_index(2), -1));
return;
}
else
SERVER_COMMAND("allspec", GameCommand_allspec(request, arguments), "Force all players to spectate") \
SERVER_COMMAND("anticheat", GameCommand_anticheat(request, arguments), "Create an anticheat report for a client") \
SERVER_COMMAND("bbox", GameCommand_bbox(request), "Print detailed information about world size") \
- SERVER_COMMAND("bot_cmd", GameCommand_bot_cmd(request, arguments), "Control and send commands to bots") \
+ SERVER_COMMAND("bot_cmd", GameCommand_bot_cmd(request, arguments, command), "Control and send commands to bots") \
SERVER_COMMAND("cointoss", GameCommand_cointoss(request, arguments), "Flip a virtual coin and give random result") \
SERVER_COMMAND("database", GameCommand_database(request, arguments), "Extra controls of the serverprogs database") \
SERVER_COMMAND("defer_clear", GameCommand_defer_clear(request, arguments), "Clear all queued defer commands for a specific client") \