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