]> icculus.org git repositories - divverent/nexuiz.git/blob - qcsrc/gamec/clientcommands.c
get some rcon-like features
[divverent/nexuiz.git] / qcsrc / gamec / clientcommands.c
1 void SV_ParseClientCommand(string s) {
2         tokenize(s);
3         
4         if(cvar("sv_clientcommands")) {
5                 if(argv(0) == "clogin") {
6                         if(argv(1) == cvar_string("sv_clientcommands_password")) {
7                                 self.adminstatus = 1;
8                                 sprint(self, "You now have remote admin status.\n");
9                         }
10                 } else if(argv(0) == "ccmd" && self.adminstatus) {
11                         localcmd(strcat(argv(1)," ",argv(2)," ",argv(3)," ",argv(4),"\n"));
12                 } else {
13                         clientcommand(self,s);
14                 }
15                                 
16         } else {
17                 clientcommand(self,s);  
18         }
19 }