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