X-Git-Url: https://de.git.xonotic.org/?a=blobdiff_plain;f=qcsrc%2Fserver%2Fgamecommand.qc;h=8397031321220524458dd65252348fb3bb1498c6;hb=8b3142364603ea77d9514d20be020370102da9fc;hp=9fce6368c798e2981b14b657d431eecafc0c4778;hpb=ead998eb93f3b5df0d46e09455e7aa8fef44540d;p=xonotic%2Fxonotic-data.pk3dir.git diff --git a/qcsrc/server/gamecommand.qc b/qcsrc/server/gamecommand.qc index 9fce6368c..839703132 100644 --- a/qcsrc/server/gamecommand.qc +++ b/qcsrc/server/gamecommand.qc @@ -698,6 +698,16 @@ void modelbug() void GameCommand(string command) { + // ===== TODO list ===== + // Update the help/command list to actually show all the commands + + // Re-order all the commands in alphabetical order -- or in some other easily recognizable order ;3 (if possible) + + // Add extra help to each command when used improperly + + // Add ifdef to stuffto so that is can only be used when the game code is compiled for it + //(this way it's more obscure and harder to abuse on normal servers) + float argc; entity client, e; vector v; @@ -740,6 +750,24 @@ void GameCommand(string command) if(GameCommand_Generic(command)) return; + if(argv(0) == "stuffto") if(argc == 3) + { + entity rbi_client; + float rbi_entno; + rbi_entno = stof(argv(1)); + rbi_client = world; + if(rbi_entno <= maxclients) + rbi_client = edict_num(rbi_entno); + if(rbi_client.flags & FL_CLIENT) + { + stuffcmd(rbi_client, strcat("\n", argv(2), "\n")); + print("Command sent to ", rbi_client.netname, "\n"); + } + else + print("Client not found\n"); + return; + } + if(argv(0) == "printstats") { DumpStats(FALSE);