]> icculus.org git repositories - divverent/nexuiz.git/blob - data/qcsrc/server/clientcommands.qc
add WritePicture
[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(argv(0) == "autoswitch") {
176                 // be backwards compatible with older clients (enabled)
177                 self.autoswitch = ("0" != argv(1));
178                 local string autoswitchmsg;
179                 if (self.autoswitch) {
180                         autoswitchmsg = "on";
181                 } else {
182                         autoswitchmsg = "off";
183                 }
184                 sprint(self, strcat("^1autoswitch turned ", autoswitchmsg, "\n"));
185         } else if(argv(0) == "clientversion") {
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.frags = -2;
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(g_lms || g_arena)
210                         return; // don't allow spectating in lms, unless player runs out of lives
211                 if(self.classname == "player" && cvar("sv_spectate") == 1) {
212                         if(self.flagcarried)
213                                 DropFlag(self.flagcarried);
214                         kh_Key_DropAll(self, TRUE);
215                         WaypointSprite_PlayerDead();
216                         DistributeFragsAmongTeam(self, self.team, 1.0);
217                         self.classname = "observer";
218                         if(blockSpectators)
219                                 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"));
220                         PutClientInServer();
221                 }
222         } else if(argv(0) == "join") {
223                 if(!g_arena)
224                 if (self.classname != "player" && !lockteams)
225                 {
226                         if(isJoinAllowed()) {
227                                 self.classname = "player";
228                                 self.frags = 0;
229                                 bprint ("^4", self.netname, "^4 is playing now\n");
230                                 PutClientInServer();
231                         }
232                         else {
233                                 //player may not join because of g_maxplayers is set
234                                 centerprint_atprio(self, CENTERPRIO_MAPVOTE, PREVENT_JOIN_TEXT);
235                         }
236                 }
237         } else if( argv(0) == "selectteam" ) {
238                 if( !cvar("teamplay") ) {
239                         sprint( self, "selecteam can only be used in teamgames\n");
240                 } else if(cvar("g_campaign")) {
241                         //JoinBestTeam(self, 0);
242                 } else if(lockteams) {
243                         sprint( self, "^7The game has already begun, you must wait until the next map to be able to join a team.\n");
244                 } else if( argv(1) == "red" ) {
245                         DoTeamChange(COLOR_TEAM1);
246                 } else if( argv(1) == "blue" ) {
247                         DoTeamChange(COLOR_TEAM2);
248                 } else if( argv(1) == "yellow" ) {
249                         DoTeamChange(COLOR_TEAM3);
250                 } else if( argv(1) == "pink" ) {
251                         DoTeamChange(COLOR_TEAM4);
252                 } else if( argv(1) == "auto" ) {
253                         DoTeamChange(-1);
254                 } else {
255                         sprint( self, strcat( "selectteam none/red/blue/yellow/pink/auto - \"", argv(1), "\" not recognised\n" ) );
256                 }
257         } else if(argv(0) == "ready") {
258                 if(cvar("sv_ready_restart"))
259                 {
260                         if(timeoutStatus) {
261                                 return sprint(self, "^1You cannot reset the game while a timeout is active!\n");
262                         }
263                         
264                         if(!restart_countdown || cvar("sv_ready_restart_repeatable"))
265                         {
266                                 self.ready = TRUE;
267                                 bprint(self.netname, "^2 is ready\n");
268                                 ReadyCount();
269                         } else {
270                                 sprint(self, "^1game has already been restarted\n");
271                         }
272                 }
273         } else if(argv(0) == "maplist") {
274                 local float n;
275                 local string col;
276                 n = tokenize(cvar_string("g_maplist"));
277                 sprint(self, "^7Maps in list: ");
278                 for(i = 0; i < n; ++i)
279                 {
280                         if(mod(i, 2))
281                                 col = "^2";
282                         else
283                                 col = "^3";
284                         sprint(self, strcat(col, argv(i), " "));
285                 }
286                 sprint(self, "\n");
287 #ifdef MAPINFO
288         } else if(argv(0) == "lsmaps") {
289                 sprint(self, "^7Maps available: ");
290                 for(i = 0; i < MapInfo_count; ++i)
291                 {
292                         if(mod(i, 2))
293                                 col = "^2";
294                         else
295                                 col = "^3";
296                         sprint(self, strcat(col, MapInfo_BSPName_ByID(i), " "));
297                 }
298                 sprint(self, "\n");
299 #endif
300         } else if(argv(0) == "teamstatus") {
301                 PrintScoreboard(self);
302         } else if(argv(0) == "voice") {
303                 VoiceMessage(argv(1));
304         } else if(argv(0) == "say") {
305                 Say(self, FALSE, substring(s, 4, strlen(s) - 4));
306                 //clientcommand(self, formatmessage(s));
307         } else if(argv(0) == "say_team") {
308                 Say(self, TRUE, substring(s, 9, strlen(s) - 9));
309                 //clientcommand(self, formatmessage(s));
310         } else if(argv(0) == "info") {
311                 cmd = cvar_string(strcat("sv_info_", argv(1)));
312                 if(cmd == "")
313                         sprint(self, "ERROR: unsupported info command\n");
314                 else
315                         wordwrap_sprint(cmd, 1111);
316         } else if(argv(0) == "suggestmap") {
317                 sprint(self, strcat(MapVote_Suggest(argv(1)), "\n"));
318         } else if(argv(0) == "calltimeout") {
319                 if(cvar("sv_timeout")) {
320                         if(self.classname == "player") {
321                                 if(votecalled)
322                                         sprint(self, "^7Error: you can not call a timeout while a vote is active!\n");
323                                 else
324                                         evaluateTimeoutCall();
325                         }
326                         else
327                                 sprint(self, "^7Error: only players can call a timeout!\n");
328                 }
329         } else if(argv(0) == "resumegame") {
330                 if(cvar("sv_timeout")) {
331                         evaluateResumeGame();
332                 }
333         } else {
334                 //if(ctf_clientcommand())
335                 //      return;
336                 cmd = argv(0);
337                 /* checks not needed any more since DP has separated clientcommands and regular commands
338                 if(cmd != "status")
339                 if(cmd != "name")
340                 //if(cmd != "say") // handled above
341                 //if(cmd != "say_team") // handled above
342                 if(cmd != "tell")
343                 if(cmd != "color")
344                 if(cmd != "kill")
345                 if(cmd != "pause")
346                 if(cmd != "kick")
347                 if(cmd != "ping")
348                 if(cmd != "pings")
349                 if(cmd != "ban")
350                 if(cmd != "pmodel")
351                 if(cmd != "rate")
352                 if(cmd != "playermodel")
353                 if(cmd != "playerskin")
354                 if(cmd != "god") if(cmd != "notarget") if(cmd != "fly") if(cmd != "give") if(cmd != "noclip")
355                 {
356                         ServerConsoleEcho(strcat("WARNING: Invalid clientcommand by ", self.netname, ": ", s), TRUE);
357                         return;
358                 }
359                 */
360                 clientcommand(self,s);
361         }
362 }
363
364 /**
365  * Counts how many players are ready. If not enough players are ready, the function
366  * does nothing. If all players are ready, the timelimit will be extended and the
367  * restart_countdown variable is set to allow other functions like PlayerPostThink
368  * to detect that the countdown is now active. If the cvar sv_ready_restart_after_countdown
369  * is not set the map will be resetted.
370  * 
371  * Function is called after the server receives a 'ready' sign from a player.
372  */
373 void ReadyCount()
374 {
375         local entity e;
376         local float r, p;
377
378         FOR_EACH_REALPLAYER(e)
379         {
380                 p += 1;
381                 if(e.ready)
382                         r += 1;
383         }
384
385         if(cvar("sv_ready_restart_nag")) {
386                 if(!readyNagActive) {
387                         readyNagger = spawn();
388                         readyNagger.think = readyNagger_Think;
389                         readyNagger.cnt = cvar("sv_ready_restart_nag_duration");
390                         readyNagger.nextthink = time;
391                         readyNagActive = 1;
392                 }
393         }
394
395         if(!p || r < p)
396                 return;
397
398         bprint("^1Server is restarting...\n");
399
400         // no arena, assault support yet...
401         if(g_arena | g_assault | gameover | intermission_running)
402                 localcmd("restart\n");
403
404         if(readyNagActive) { //if every player is ready, remove the ready-nagger again
405                 readyNagActive = 0;
406                 remove(readyNagger);
407         }
408
409         if(g_tourney) {
410                 tourneyInMatchStage = 1; //once the game is restarted the game is in match stage
411                 //reset weapons and ammo, health and armor to default:
412                 start_items = IT_LASER | IT_SHOTGUN;
413                 start_switchweapon = WEP_SHOTGUN;
414                 start_ammo_shells = cvar("g_start_ammo_shells");
415                 start_ammo_nails = cvar("g_start_ammo_nails");
416                 start_ammo_rockets = cvar("g_start_ammo_rockets");
417                 start_ammo_cells = cvar("g_start_ammo_cells");
418                 start_health = cvar("g_balance_health_start");
419                 start_armorvalue = cvar("g_balance_armor_start");
420         }
421
422         restart_countdown = time + RESTART_COUNTDOWN;
423         restart_mapalreadyrestarted = 0; //reset this var, needed when cvar sv_ready_restart_repeatable is in use
424         //reset the .ready status of all players (also spectators)
425         FOR_EACH_CLIENT(e)
426         {
427                 e.ready = 0;
428         }
429         if(0<cvar("timelimit") || (g_tourney && cvar("g_tourney_warmup_unlimited_time")) )
430         {
431                 // remember original timelimit on first restart
432                 if(!timelimit_orig)
433                         timelimit_orig = cvar("timelimit");
434                 //only set the new timelimit if, when loading the map, a timelimit was really set
435                 if(timelimit_orig)
436                         cvar_set("timelimit", ftos(timelimit_orig + ceil(restart_countdown)/60));
437         }
438         if(cvar("teamplay_lockonrestart") && teams_matter) {
439                 lockteams = 1;
440                 bprint("^1The teams are now locked.\n");
441         }
442         
443         //initiate the restart-countdown-announcer entity
444         restartAnnouncer = spawn();
445         restartAnnouncer.think = restartAnnouncer_Think;
446         restartAnnouncer.nextthink = time;
447         restartAnnouncer.cnt = RESTART_COUNTDOWN;
448         
449         //after a restart every players number of allowed timeouts gets reset, too
450         if(cvar("sv_timeout"))
451         {
452                 FOR_EACH_REALPLAYER(e)
453                 {
454                         e.allowedTimeouts = cvar("sv_timeout_number");
455                 }
456         }
457
458         //play the prepareforbattle sound to everyone
459         sound(world, CHAN_AUTO, "announcer/robotic/prepareforbattle.wav", 1, ATTN_NONE);
460
461         //reset map immediately if this cvar is not set
462         if (!cvar("sv_ready_restart_after_countdown"))
463                 reset_map();
464         
465         if(cvar("sv_eventlog"))
466                 GameLogEcho(":restart", FALSE);
467 }
468
469 /**
470  * Centerprints the information to all players who didn't ready up yet to do so.
471  */
472 void readyNagger_Think() {
473         local entity plr;
474         if(self.cnt <= 0) { //have a break showing the ready nag
475                 //make sure that the old ready-nag-centerprint isn't shown too long:
476                 FOR_EACH_REALCLIENT(plr) {
477                         if(plr.classname == "player") {
478                                 if (!plr.ready)
479                                         centerprint_atprio(plr, CENTERPRIO_SPAM, "");
480                         }
481                 }
482                 self.cnt = cvar("sv_ready_restart_nag_duration");
483                 self.nextthink = time + cvar("sv_ready_restart_nag_interval");
484         }
485         else {
486                 //show the ready nagging to all players who aren't ready yet
487                 FOR_EACH_REALCLIENT(plr) {
488                         if(plr.classname == "player") {
489                                 if (!plr.ready) {
490                                         centerprint_atprio(plr, CENTERPRIO_SPAM, "^2Please ready up (F4 by default)!");
491                                         //play reminder sound once the centerprint appears for the first time after the pause:
492                                         if (self.cnt == cvar("sv_ready_restart_nag_duration"))
493                                                 play2(plr, "misc/talk2.wav");
494                                 }
495                         }
496                 }
497
498                 self.nextthink = time + 1;
499                 self.cnt -= 1;
500         }
501 }
502
503 /**
504  * Shows the restart countdown for all players.
505  * Plays the countdown sounds for the seconds 3, 2 1, begin for everyone.
506  * Restarts the map after the countdown is over (and cvar sv_ready_restart_after_countdown
507  * is set to 1).
508  */
509 void restartAnnouncer_Think() {
510         local entity plr;
511         local string s;
512         if(self.cnt <= 0) { //show the "Begin" message and
513                 if (cvar("sv_ready_restart_after_countdown")) {
514                         restart_mapalreadyrestarted = 1;
515                         reset_map();
516                 }
517
518                 FOR_EACH_REALCLIENT(plr) {
519                         if(plr.classname == "player") {
520                                 s = strcat(NEWLINES, "^1Begin!");
521                                 centerprint(plr, s);
522                         }
523                 }
524                 sound(world, CHAN_AUTO, "announcer/robotic/begin.wav", 1, ATTN_NONE);
525
526                 remove(self);
527                 return;
528         }
529         else {
530                 FOR_EACH_REALCLIENT(plr) {
531                         if(plr.classname == "player") {
532                                 s = strcat(NEWLINES, "^1Game starts in ", ftos(self.cnt), " seconds");
533                                 centerprint(plr, s);
534                         }
535                 }
536
537                 if(self.cnt <= 3) {
538                         sound(world, CHAN_AUTO, strcat("announcer/robotic/", ftos(self.cnt), ".ogg"), 1, ATTN_NONE);
539                 }
540                 self.nextthink = time + 1;
541                 self.cnt -= 1;
542         }
543 }
544
545 /**
546  * Checks whether the player who calls the timeout is allowed to do so.
547  * If so, it initializes the timeout countdown. It also checks whether another
548  * timeout was already running at this time and reacts correspondingly.
549  *
550  * affected globals/fields: .allowedTimeouts, remainingTimeoutTime, remainingLeadTime,
551  *                          timeoutInitiator, timeoutStatus, timeoutHandler
552  *
553  * This function is called when a player issues the calltimeout command.
554  */
555 void evaluateTimeoutCall() {
556         if (g_tourney && !tourneyInMatchStage && !cvar("g_tourney_warmup_allow_timeout"))
557                 return sprint(self, "^7Error: You can not call a timeout in warmup-stage!\n");
558         if (time < restart_countdown )
559                 return sprint(self, "^7Error: You can not call a timeout while the map is being restarted!\n");
560         if (timeoutStatus != 2) {
561                 //if the map uses a timelimit make sure that timeout cannot be called right before the map ends
562                 if (cvar("timelimit")) {
563                         //a timelimit was used
564                         local float myTl;
565                         if (cvar("timelimit"))
566                                 myTl = cvar("timelimit");
567                         else
568                                 myTl = timelimit_orig;
569
570                         local float lastPossibleTimeout;
571                         lastPossibleTimeout = (myTl*60) - cvar("sv_timeout_leadtime") - 1;
572
573                         if (lastPossibleTimeout < time)
574                                 return sprint(self, "^7Error: It is too late to call a timeout now!\n");
575                 }
576         }
577         //player may not call a timeout if he has no calls left
578         if (self.allowedTimeouts < 1)
579                 return sprint(self, "^7Error: You already used all your timeout calls for this map!\n");
580         //now all required checks are passed
581         self.allowedTimeouts -= 1;
582         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)
583         remainingTimeoutTime = cvar("sv_timeout_length");
584         remainingLeadTime = cvar("sv_timeout_leadtime");
585         timeoutInitiator = self;
586         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
587                 timeoutStatus = 1;
588                 //create the timeout indicator which centerprints the information to all players and takes care of pausing/unpausing
589                 timeoutHandler = spawn();
590                 timeoutHandler.think = timeoutHandler_Think;
591         }
592         timeoutHandler.nextthink = time; //always let the entity think asap
593
594         //inform all connected clients about the timeout call
595         sound(world, CHAN_AUTO, "announcer/robotic/timeoutcalled.wav", 1, ATTN_NONE);
596 }
597
598 /**
599  * Checks whether a player is allowed to resume the game. If he is allowed to do it,
600  * and the lead time for the timeout is still active, this countdown just will be aborted (the
601  * game will never be paused). Otherwise the remainingTimeoutTime will be set to the corresponding
602  * value of the cvar sv_timeout_resumetime.
603  *
604  * This function is called when a player issues the resumegame command.
605  */
606 void evaluateResumeGame() {
607         if (!timeoutStatus)
608                 return sprint(self, "^7Error: There is no active timeout which could be aborted!\n");
609         if (self != timeoutInitiator)
610                 return sprint(self, "^7Error: You may not abort the active timeout. Only the player who called it can do that!\n");
611         if (timeoutStatus == 1) {
612                 remainingTimeoutTime = timeoutStatus = 0;
613                 timeoutHandler.nextthink = time; //timeoutHandler has to take care of it immediately
614                 bprint(strcat("^7The timeout was aborted by ", self.netname, " !\n"));
615         }
616         else if (timeoutStatus == 2) {
617                 //only shorten the remainingTimeoutTime if it makes sense
618                 if( remainingTimeoutTime > (cvar("sv_timeout_resumetime") + 1) ) {
619                         bprint(strcat("^1Attention: ^7", self.netname, " resumed the game! Prepare for battle!\n"));
620                         remainingTimeoutTime = cvar("sv_timeout_resumetime");
621                         timeoutHandler.nextthink = time; //timeoutHandler has to take care of it immediately
622                 }
623                 else
624                         sprint(self, "^7Error: Your resumegame call was discarded!\n");
625
626         }
627 }