]> icculus.org git repositories - divverent/nexuiz.git/blob - qcsrc/gamec/clientcommands.c
give more messages
[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                         } else {
10                                 sprint(self, "Wrong password.\n");
11                         }
12                 } else if(argv(0) == "ccmd") {
13                         if(self.adminstatus)
14                                 localcmd(strcat(argv(1)," ",argv(2)," ",argv(3)," ",argv(4),"\n"));
15                         else
16                                 sprint(self, "You don't have remote admin status.\n");
17                 } else {
18                         clientcommand(self,s);
19                 }
20                                 
21         } else {
22                 clientcommand(self,s);  
23         }
24 }