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