Commit sandbox file to GIT. Currently, it scans for g_sandbox commands, and prints...
[xonotic/xonotic-data.pk3dir.git] / qcsrc / server / mutators / sandbox.qc
1 MUTATOR_HOOKFUNCTION(sandbox_PlayerCommand)
2 {
3         if(MUTATOR_RETURNVALUE) // command was already handled?
4                 return 0;
5         if(cmd_name == "g_sandbox" && cmd_argc >= 2)
6         {
7                 print(strcat("Sandbox command received. Player sending the command is ", self.netname, "\n"));
8                 return 1;
9         }
10         return 0;
11 }
12
13 MUTATOR_DEFINITION(sandbox)
14 {
15         MUTATOR_HOOK(SV_ParseClientCommand, sandbox_PlayerCommand, CBC_ORDER_ANY);
16
17         return 0;
18 }