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