]> icculus.org git repositories - divverent/nexuiz.git/blob - data/qcsrc/server/clientcommands.qc
CTF: fix portal exploit by adding a flag drop penalty of the same score as pickup...
[divverent/nexuiz.git] / data / qcsrc / server / clientcommands.qc
1 void ReadyCount();
2 string MapVote_Suggest(string m);
3
4 .float floodcontrol_chat;
5 .float floodcontrol_team;
6 void Say(entity source, float teamsay, string msgin)
7 {
8         string msgstr, colorstr, cmsgstr, namestr;
9         float flood;
10         entity head;
11
12         if(!teamsay)
13                 if(substring(msgin, 0, 1) == " ")
14                         msgin = substring(msgin, 1, strlen(msgin) - 1); // work around DP say bug (say_team does not have this!)
15
16         msgin = formatmessage(msgin);
17
18         if(msgin == "")
19                 return;
20
21         if(source.classname != "player")
22                 colorstr = "^0"; // black for spectators
23         else if(teams_matter)
24                 colorstr = Team_ColorCode(source.team);
25         else
26                 teamsay = FALSE;
27
28         if(intermission_running)
29                 teamsay = FALSE;
30
31         /*
32          * using bprint solves this... me stupid
33         // how can we prevent the message from appearing in a listen server?
34         // for now, just give "say" back and only handle say_team
35         if(!teamsay)
36         {
37                 clientcommand(self, strcat("say ", msgin));
38                 return;
39         }
40         */
41
42         if(cvar("g_chat_teamcolors"))
43                 namestr = playername(source);
44         else
45                 namestr = source.netname;
46         if(teamsay)
47         {
48                 msgstr = strzone(strcat("\{1}\{13}", colorstr, "(^3", namestr, colorstr, ") ^7", msgin, "\n"));
49                 cmsgstr = strcat(colorstr, "(^3", namestr, colorstr, ")\n^7", wordwrap(msgin, 50));
50         }
51         else
52                 msgstr = strzone(strcat("\{1}", namestr, "^7: ", msgin, "\n"));
53
54         // FLOOD CONTROL
55         flood = 0;
56         {
57                 float flood_spl;
58                 float flood_burst;
59                 float flood_lmax;
60                 var .float flood_field;
61                 float lines;
62                 if(teamsay)
63                 {
64                         flood_spl = cvar("g_chat_flood_spl_team");
65                         flood_burst = cvar("g_chat_flood_burst_team");
66                         flood_lmax = cvar("g_chat_flood_lmax_team");
67                         flood_field = floodcontrol_team;
68                 }
69                 else
70                 {
71                         flood_spl = cvar("g_chat_flood_spl");
72                         flood_burst = cvar("g_chat_flood_burst");
73                         flood_lmax = cvar("g_chat_flood_lmax");
74                         flood_field = floodcontrol_chat;
75                 }
76                 flood_burst = max(0, flood_burst - 1);
77                 // to match explanation in default.cfg, a value of 3 must allow three-line bursts and not four!
78                 lines = ceil(strlennocol(msgstr) / 75);
79                 if(flood_lmax && lines > flood_lmax)
80                         flood = 2;
81                 else if(time >= self.flood_field)
82                         self.flood_field = max(time - flood_burst * flood_spl, self.flood_field) + lines * flood_spl;
83                 else
84                         flood = 1;
85         }
86
87         if(flood)
88         {
89                 if(cvar("g_chat_flood_notify_flooder"))
90                 {
91                         if(flood == 1)
92                                 sprint(self, strcat("^3FLOOD CONTROL: ^7wait ^1", ftos(self.flood_field - time), "^3 seconds\n"));
93                         else if(flood == 2)
94                                 sprint(self, "^3FLOOD CONTROL: ^7message too long\n");
95                 }
96                 else
97                         sprint(self, msgstr);
98                 print("NOTE: ", playername(self), "^7 is flooding.\n");
99         }
100         else if(teamsay)
101         {
102                 if(source.classname == "player")
103                 {
104                         FOR_EACH_REALPLAYER(head)
105                         {
106                                 if(head.team == source.team)
107                                 {
108                                         sprint(head, msgstr);
109                                         centerprint(head, cmsgstr);
110                                 }
111                         }
112                 }
113                 else
114                 {
115                         FOR_EACH_REALCLIENT(head) if(head.classname != "player")
116                         {
117                                 sprint(head, msgstr);
118                                 centerprint(head, cmsgstr);
119                         }
120                 }
121         }
122         else
123         {
124                 if(cvar("g_chat_nospectators") && source.classname != "player") {
125                         FOR_EACH_REALCLIENT(head) if(head.classname != "player") {
126                                 sprint(head, msgstr);
127                         }
128                 }
129                 else
130                         bprint(msgstr);
131         }
132
133         strunzone(msgstr);
134 }
135
136 entity GetPlayer(string name)
137 {
138         float num;
139         entity e;
140         string ns;
141
142         if(substring(name, 0, 1) == "#") {
143                 num = stof(substring(name, 1, 999));
144                 if(num >= 1 && num <= maxclients) {
145                         for((e = world); num > 0; --num, (e = nextent(e)))
146                                 ;
147                         //if(clienttype(e) == CLIENTTYPE_REAL)
148                         if(e.classname == "player")
149                                 return e;
150                 }
151         } else {
152                 ns = strdecolorize(name);
153                 FOR_EACH_REALPLAYER(e) {
154                         if(!strcasecmp(strdecolorize(e.netname), ns)) {
155                                 return e;
156                         }
157                 }
158         }
159         return world;
160 }
161
162 //float ctf_clientcommand();
163 void SV_ParseClientCommand(string s) {
164         local string cmd;
165         local float i;
166
167         tokenize(s);
168
169         if(GameCommand_Vote(s, self)) {
170                 return;
171         } else if(GameCommand_MapVote(argv(0))) {
172                 return;
173         } else if(argv(0) == "autoswitch") {
174                 // be backwards compatible with older clients (enabled)
175                 self.autoswitch = ("0" != argv(1));
176                 local string autoswitchmsg;
177                 if (self.autoswitch) {
178                         autoswitchmsg = "on";
179                 } else {
180                         autoswitchmsg = "off";
181                 }
182                 sprint(self, strcat("^1autoswitch turned ", autoswitchmsg, "\n"));
183         } else if(argv(0) == "clientversion") {
184                 if not(self.flags & FL_CLIENT)
185                         return;
186                 if (argv(1) == "$gameversion") {
187                         //versionmsg = "^1client is too old to get versioninfo.\nUPDATE!!! (http://www.nexuiz.com)^8";
188                         // either that or someone wants to be funny
189                         self.version = 1;
190                 } else {
191                         self.version = stof(argv(1));
192                 }
193                 if(self.version != cvar("gameversion"))
194                 {
195                         self.classname = "observer";
196                         self.version_mismatch = 1;
197                         PutClientInServer();
198                 } else if(cvar("g_campaign") || cvar("g_balance_teams") || cvar("g_balance_teams_force")) {
199                         //JoinBestTeam(self, FALSE, TRUE);
200                 } else if(cvar("teamplay") && !cvar("sv_spectate")) {
201                         self.classname = "observer";
202                         stuffcmd(self,"menu_showteamselect\n");
203                 }
204         } else if(argv(0) == "reportcvar") { // old system
205                 GetCvars(1);
206         } else if(argv(0) == "sentcvar") { // new system
207                 GetCvars(1);
208         } else if(argv(0) == "spectate") {
209                 if not(self.flags & FL_CLIENT)
210                         return;
211                 if(g_lms || g_arena)
212                         return; // don't allow spectating in lms, unless player runs out of lives
213                 if(self.classname == "player" && cvar("sv_spectate") == 1) {
214                         if(self.flagcarried)
215                                 DropFlag(self.flagcarried, 0);
216                         kh_Key_DropAll(self, TRUE);
217                         WaypointSprite_PlayerDead();
218                         self.classname = "observer";
219                         if(blockSpectators)
220                                 sprint(self, strcat("^7You have to become a player within the next ", ftos(cvar("g_maxplayers_spectator_blocktime")), " seconds, otherwise you will be kicked, because spectators aren't allowed at this time!\n"));
221                         PutClientInServer();
222                 }
223         } else if(argv(0) == "join") {
224                 if not(self.flags & FL_CLIENT)
225                         return;
226                 if(!g_arena)
227                 if (self.classname != "player" && !lockteams)
228                 {
229                         if(isJoinAllowed()) {
230                                 self.classname = "player";
231                                 PlayerScore_Clear(self);
232                                 bprint ("^4", self.netname, "^4 is playing now\n");
233                                 PutClientInServer();
234                         }
235                         else {
236                                 //player may not join because of g_maxplayers is set
237                                 centerprint_atprio(self, CENTERPRIO_MAPVOTE, PREVENT_JOIN_TEXT);
238                         }
239                 }
240         } else if( argv(0) == "selectteam" ) {
241                 if not(self.flags & FL_CLIENT)
242                         return;
243                 if( !cvar("teamplay") ) {
244                         sprint( self, "selecteam can only be used in teamgames\n");
245                 } else if(cvar("g_campaign")) {
246                         //JoinBestTeam(self, 0);
247                 } else if(lockteams) {
248                         sprint( self, "^7The game has already begun, you must wait until the next map to be able to join a team.\n");
249                 } else if( argv(1) == "red" ) {
250                         DoTeamChange(COLOR_TEAM1);
251                 } else if( argv(1) == "blue" ) {
252                         DoTeamChange(COLOR_TEAM2);
253                 } else if( argv(1) == "yellow" ) {
254                         DoTeamChange(COLOR_TEAM3);
255                 } else if( argv(1) == "pink" ) {
256                         DoTeamChange(COLOR_TEAM4);
257                 } else if( argv(1) == "auto" ) {
258                         DoTeamChange(-1);
259                 } else {
260                         sprint( self, strcat( "selectteam none/red/blue/yellow/pink/auto - \"", argv(1), "\" not recognised\n" ) );
261                 }
262         } else if(argv(0) == "ready") {
263                 if not(self.flags & FL_CLIENT)
264                         return;
265                 if((inWarmupStage && 0 < g_warmup_limit) // with unlimited warmup players have to be able to restart
266                    || cvar("sv_ready_restart"))
267                 {
268                         if(timeoutStatus) {
269                                 return sprint(self, "^1You cannot reset the game while a timeout is active!\n");
270                         }
271                         
272                         if(!restart_countdown || cvar("sv_ready_restart_repeatable"))
273                         {
274                                 self.ready = TRUE;
275                                 bprint(self.netname, "^2 is ready\n");
276                                 ReadyCount();
277                         } else {
278                                 sprint(self, "^1game has already been restarted\n");
279                         }
280                 }
281         } else if(argv(0) == "maplist") {
282                 local float n, j;
283                 local string col;
284                 n = tokenize(cvar_string("g_maplist"));
285                 sprint(self, "^7Maps in list: ");
286                 for(i = 0, j = 0; i < n; ++i)
287                 {
288                         if(MapInfo_CheckMap(argv(i)))
289                         {
290                                 if(mod(j, 2))
291                                         col = "^2";
292                                 else
293                                         col = "^3";
294                                 sprint(self, strcat(col, argv(i), " "));
295                                 ++j;
296                         }
297                 }
298                 sprint(self, "\n");
299         } else if(argv(0) == "lsmaps") {
300                 sprint(self, "^7Maps available: ");
301                 for(i = 0; i < MapInfo_count; ++i)
302                 {
303                         if(mod(i, 2))
304                                 col = "^2";
305                         else
306                                 col = "^3";
307                         sprint(self, strcat(col, MapInfo_BSPName_ByID(i), " "));
308                 }
309                 sprint(self, "\n");
310         } else if(argv(0) == "voice") {
311                 VoiceMessage(argv(1));
312         } else if(argv(0) == "say") {
313                 Say(self, FALSE, substring(s, 4, strlen(s) - 4));
314                 //clientcommand(self, formatmessage(s));
315         } else if(argv(0) == "say_team") {
316                 Say(self, TRUE, substring(s, 9, strlen(s) - 9));
317                 //clientcommand(self, formatmessage(s));
318         } else if(argv(0) == "info") {
319                 cmd = cvar_string(strcat("sv_info_", argv(1)));
320                 if(cmd == "")
321                         sprint(self, "ERROR: unsupported info command\n");
322                 else
323                         wordwrap_sprint(cmd, 1111);
324         } else if(argv(0) == "suggestmap") {
325                 sprint(self, strcat(MapVote_Suggest(argv(1)), "\n"));
326         } else if(argv(0) == "calltimeout") {
327                 if not(self.flags & FL_CLIENT)
328                         return;
329                 if(cvar("sv_timeout")) {
330                         if(self.classname == "player") {
331                                 if(votecalled)
332                                         sprint(self, "^7Error: you can not call a timeout while a vote is active!\n");
333                                 else
334                                         evaluateTimeoutCall();
335                         }
336                         else
337                                 sprint(self, "^7Error: only players can call a timeout!\n");
338                 }
339         } else if(argv(0) == "resumegame") {
340                 if not(self.flags & FL_CLIENT)
341                         return;
342                 if(cvar("sv_timeout")) {
343                         evaluateResumeGame();
344                 }
345         } else if(argv(0) == "teamstatus") {
346                 Score_NicePrint(self);
347         } else {
348                 //if(ctf_clientcommand())
349                 //      return;
350                 cmd = argv(0);
351                 /* checks not needed any more since DP has separated clientcommands and regular commands
352                 if(cmd != "status")
353                 if(cmd != "name")
354                 //if(cmd != "say") // handled above
355                 //if(cmd != "say_team") // handled above
356                 if(cmd != "tell")
357                 if(cmd != "color")
358                 if(cmd != "kill")
359                 if(cmd != "pause")
360                 if(cmd != "kick")
361                 if(cmd != "ping")
362                 if(cmd != "pings")
363                 if(cmd != "ban")
364                 if(cmd != "pmodel")
365                 if(cmd != "rate")
366                 if(cmd != "playermodel")
367                 if(cmd != "playerskin")
368                 if(cmd != "god") if(cmd != "notarget") if(cmd != "fly") if(cmd != "give") if(cmd != "noclip")
369                 {
370                         print("WARNING: Invalid clientcommand by ", self.netname, ": ", s, "\n");
371                         return;
372                 }
373                 */
374                 clientcommand(self,s);
375         }
376 }
377
378 void ReadyRestart()
379 {
380         local entity e;
381
382         bprint("^1Server is restarting...\n");
383
384         VoteReset();
385
386         // no arena, assault support yet...
387         if(g_arena | g_assault | gameover | intermission_running | race_completing)
388                 localcmd("restart\n");
389
390         // clear overtime
391         if(checkrules_overtimeend)
392                 checkrules_overtimeend = 0;
393
394         if(readyNagActive) { //if every player is ready, remove the ready-nagger again
395                 readyNagActive = 0;
396                 remove(readyNagger);
397         }
398
399         restart_countdown = time + RESTART_COUNTDOWN;
400         restart_mapalreadyrestarted = 0; //reset this var, needed when cvar sv_ready_restart_repeatable is in use
401         if(0 < cvar("timelimit") || inWarmupStage)
402         {
403                 // remember original timelimit on first restart
404                 if(!timelimit_orig)
405                         timelimit_orig = cvar("timelimit");
406                 //only set the new timelimit if, when loading the map, a timelimit was really set
407                 if(timelimit_orig)
408                         cvar_set("timelimit", ftos(timelimit_orig + ceil(restart_countdown)/60));
409         }
410
411         inWarmupStage = 0; //once the game is restarted the game is in match stage
412
413         //reset the .ready status of all players (also spectators)
414         FOR_EACH_CLIENTSLOT(e)
415                 e.ready = 0;
416         FOR_EACH_REALCLIENT(e)
417         {
418                 msg_entity = e;
419                 WriteByte(MSG_ONE, SVC_TEMPENTITY);
420                 WriteByte(MSG_ONE, TE_CSQC_WARMUP);
421                 WriteByte(MSG_ONE, 0);
422         }
423
424         if(cvar("teamplay_lockonrestart") && teams_matter) {
425                 lockteams = 1;
426                 bprint("^1The teams are now locked.\n");
427         }
428         
429         //initiate the restart-countdown-announcer entity
430         restartAnnouncer = spawn();
431         restartAnnouncer.think = restartAnnouncer_Think;
432         restartAnnouncer.nextthink = time;
433         restartAnnouncer.cnt = RESTART_COUNTDOWN;
434         
435         //after a restart every players number of allowed timeouts gets reset, too
436         if(cvar("sv_timeout"))
437         {
438                 FOR_EACH_REALPLAYER(e)
439                         e.allowedTimeouts = cvar("sv_timeout_number");
440         }
441
442         //play the prepareforbattle sound to everyone
443         play2all("announcer/robotic/prepareforbattle.wav");
444
445         //reset map immediately if this cvar is not set
446         if (!cvar("sv_ready_restart_after_countdown"))
447                 reset_map();
448
449         // reset ALL scores
450         Score_ClearAll();
451         
452         if(cvar("sv_eventlog"))
453                 GameLogEcho(":restart");
454 }
455
456 /**
457  * Counts how many players are ready. If not enough players are ready, the function
458  * does nothing. If all players are ready, the timelimit will be extended and the
459  * restart_countdown variable is set to allow other functions like PlayerPostThink
460  * to detect that the countdown is now active. If the cvar sv_ready_restart_after_countdown
461  * is not set the map will be resetted.
462  * 
463  * Function is called after the server receives a 'ready' sign from a player.
464  */
465 void ReadyCount()
466 {
467         local entity e;
468         local float r, p;
469
470         r = p = 0;
471
472         FOR_EACH_REALPLAYER(e)
473         {
474                 p += 1;
475                 if(e.ready)
476                         r += 1;
477         }
478
479         if(!r)
480                 return; // NOTE: this also excludes !p, as r <= p
481
482         if(cvar("sv_ready_restart_nag")) {
483                 if(!readyNagActive) {
484                         readyNagger = spawn();
485                         readyNagger.think = readyNagger_Think;
486                         readyNagger.cnt = cvar("sv_ready_restart_nag_duration");
487                         readyNagger.nextthink = time;
488                         readyNagActive = 1;
489                 }
490         }
491
492         if(r < p)
493                 return;
494         
495         ReadyRestart();
496 }
497
498 /**
499  * Centerprints the information to all players who didn't ready up yet to do so.
500  */
501 void readyNagger_Think() {
502         local entity plr;
503         if(self.cnt <= 0) { //have a break showing the ready nag
504                 //make sure that the old ready-nag-centerprint isn't shown too long:
505                 FOR_EACH_REALCLIENT(plr) {
506                         if(plr.classname == "player") {
507                                 if (!plr.ready)
508                                         centerprint_atprio(plr, CENTERPRIO_SPAM, "");
509                         }
510                 }
511                 self.cnt = cvar("sv_ready_restart_nag_duration");
512                 self.nextthink = time + cvar("sv_ready_restart_nag_interval");
513         }
514         else {
515                 //show the ready nagging to all players who aren't ready yet
516                 FOR_EACH_REALCLIENT(plr) {
517                         if(plr.classname == "player") {
518                                 if (!plr.ready) {
519                                         centerprint_atprio(plr, CENTERPRIO_SPAM, "^2Please ready up (F4 by default)!");
520                                         //play reminder sound once the centerprint appears for the first time after the pause:
521                                         if (self.cnt == cvar("sv_ready_restart_nag_duration"))
522                                                 play2(plr, "misc/talk2.wav");
523                                 }
524                         }
525                 }
526
527                 self.nextthink = time + 1;
528                 self.cnt -= 1;
529         }
530 }
531
532 /**
533  * Shows the restart countdown for all players.
534  * Plays the countdown sounds for the seconds 3, 2 1, begin for everyone.
535  * Restarts the map after the countdown is over (and cvar sv_ready_restart_after_countdown
536  * is set to 1).
537  */
538 void restartAnnouncer_Think() {
539         local entity plr;
540         local string s;
541         if(self.cnt <= 0) { //show the "Begin" message and
542                 if (cvar("sv_ready_restart_after_countdown")) {
543                         restart_mapalreadyrestarted = 1;
544                         reset_map();
545                 }
546
547                 FOR_EACH_REALCLIENT(plr) {
548                         if(plr.classname == "player") {
549                                 s = strcat(NEWLINES, "^1Begin!");
550                                 centerprint(plr, s);
551                         }
552                 }
553                 play2all("announcer/robotic/begin.wav");
554
555                 remove(self);
556                 return;
557         }
558         else {
559                 FOR_EACH_REALCLIENT(plr) {
560                         if(plr.classname == "player") {
561                                 s = strcat(NEWLINES, "^1Game starts in ", ftos(self.cnt), " seconds");
562                                 centerprint(plr, s);
563                         }
564                 }
565
566                 if(self.cnt <= 3) {
567                         play2all(strcat("announcer/robotic/", ftos(self.cnt), ".ogg"));
568                 }
569                 self.nextthink = time + 1;
570                 self.cnt -= 1;
571         }
572 }
573
574 /**
575  * Checks whether the player who calls the timeout is allowed to do so.
576  * If so, it initializes the timeout countdown. It also checks whether another
577  * timeout was already running at this time and reacts correspondingly.
578  *
579  * affected globals/fields: .allowedTimeouts, remainingTimeoutTime, remainingLeadTime,
580  *                          timeoutInitiator, timeoutStatus, timeoutHandler
581  *
582  * This function is called when a player issues the calltimeout command.
583  */
584 void evaluateTimeoutCall() {
585         if (inWarmupStage && !g_warmup_allow_timeout)
586                 return sprint(self, "^7Error: You can not call a timeout in warmup-stage!\n");
587         if (time < restart_countdown )
588                 return sprint(self, "^7Error: You can not call a timeout while the map is being restarted!\n");
589         if (timeoutStatus != 2) {
590                 //if the map uses a timelimit make sure that timeout cannot be called right before the map ends
591                 if (cvar("timelimit")) {
592                         //a timelimit was used
593                         local float myTl;
594                         if (cvar("timelimit"))
595                                 myTl = cvar("timelimit");
596                         else
597                                 myTl = timelimit_orig;
598
599                         local float lastPossibleTimeout;
600                         lastPossibleTimeout = (myTl*60) - cvar("sv_timeout_leadtime") - 1;
601
602                         if (lastPossibleTimeout < time)
603                                 return sprint(self, "^7Error: It is too late to call a timeout now!\n");
604                 }
605         }
606         //player may not call a timeout if he has no calls left
607         if (self.allowedTimeouts < 1)
608                 return sprint(self, "^7Error: You already used all your timeout calls for this map!\n");
609         //now all required checks are passed
610         self.allowedTimeouts -= 1;
611         bprint(self.netname, " ^7called a timeout (", ftos(self.allowedTimeouts), " timeouts left)!\n"); //write a bprint who started the timeout (and how many he has left)
612         remainingTimeoutTime = cvar("sv_timeout_length");
613         remainingLeadTime = cvar("sv_timeout_leadtime");
614         timeoutInitiator = self;
615         if (timeoutStatus == 0) { //if another timeout was already active, don't change its status (which was 1 or 2) to 1, only change it to 1 if no timeout was active yet
616                 timeoutStatus = 1;
617                 //create the timeout indicator which centerprints the information to all players and takes care of pausing/unpausing
618                 timeoutHandler = spawn();
619                 timeoutHandler.think = timeoutHandler_Think;
620         }
621         timeoutHandler.nextthink = time; //always let the entity think asap
622
623         //inform all connected clients about the timeout call
624         play2all("announcer/robotic/timeoutcalled.wav");
625 }
626
627 /**
628  * Checks whether a player is allowed to resume the game. If he is allowed to do it,
629  * and the lead time for the timeout is still active, this countdown just will be aborted (the
630  * game will never be paused). Otherwise the remainingTimeoutTime will be set to the corresponding
631  * value of the cvar sv_timeout_resumetime.
632  *
633  * This function is called when a player issues the resumegame command.
634  */
635 void evaluateResumeGame() {
636         if (!timeoutStatus)
637                 return sprint(self, "^7Error: There is no active timeout which could be aborted!\n");
638         if (self != timeoutInitiator)
639                 return sprint(self, "^7Error: You may not abort the active timeout. Only the player who called it can do that!\n");
640         if (timeoutStatus == 1) {
641                 remainingTimeoutTime = timeoutStatus = 0;
642                 timeoutHandler.nextthink = time; //timeoutHandler has to take care of it immediately
643                 bprint(strcat("^7The timeout was aborted by ", self.netname, " !\n"));
644         }
645         else if (timeoutStatus == 2) {
646                 //only shorten the remainingTimeoutTime if it makes sense
647                 if( remainingTimeoutTime > (cvar("sv_timeout_resumetime") + 1) ) {
648                         bprint(strcat("^1Attention: ^7", self.netname, " resumed the game! Prepare for battle!\n"));
649                         remainingTimeoutTime = cvar("sv_timeout_resumetime");
650                         timeoutHandler.nextthink = time; //timeoutHandler has to take care of it immediately
651                 }
652                 else
653                         sprint(self, "^7Error: Your resumegame call was discarded!\n");
654
655         }
656 }