]> de.git.xonotic.org Git - xonotic/xonotic-data.pk3dir.git/commitdiff
Ground work for tons of work.. -- Lots of planned updates to GameCommand(), will...
authorSamual <samual@xonotic.org>
Fri, 14 Jan 2011 06:54:34 +0000 (01:54 -0500)
committerSamual <samual@xonotic.org>
Fri, 14 Jan 2011 06:54:34 +0000 (01:54 -0500)
qcsrc/server/gamecommand.qc

index 5957e82bc1177fe761c086178e87222c7079c817..ff7231395d6ec40c8a1bd9dbede03ef1373cae68 100644 (file)
@@ -628,6 +628,16 @@ void make_mapinfo_Think()
 
 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;
@@ -668,6 +678,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);