From: "jjaf.de" <kingpin@kingpin.jjaf.de>
To: "Monkey Harris" <monkeyharris@bigfoot.com>
Subject: change-request: monkey-mod 1.38: 
Date: Tue, 18 Sep 2001 01:02:07 +0200
MIME-Version: 1.0
Content-Type: text/plain;
	charset="iso-8859-1"
Content-Transfer-Encoding: 7bit
X-Priority: 3
X-MSMail-Priority: Normal
X-Mailer: Microsoft Outlook Express 6.00.2600.0000
Disposition-Notification-To: "jjaf.de" <kingpin@kingpin.jjaf.de>
X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2600.0000

category: E. Code
Priority: 4 Result in user/operator inconvenience or annoyance but does not
affect a required operational or mission essential capability.
source: [VL]Pet (icq: 57832023)


Description
-----------

Original xatrix code uses the following code to get a path to the game:

 // Open config file
 game_dir = gi.cvar("game", "", 0);
 if (game_dir->string[0]==0)
  strcpy(dir, "main");
 else
  strcpy(dir, game_dir->string);

But it does not use a fallback like this in "SVCmd_WriteIP_f" where it
reads:

 game = gi.cvar("game", "", 0);

 if (!*game->string)
  sprintf (name, "%s/listip.cfg", GAMEVERSION);
 else
  sprintf (name, "%s/listip.cfg", game->string);

Not setting the "game"-variable by starting the server in "~/kingpin/main"
results in the following message using a "kickban"- or "writeip"-command:

Writing Monkey CDS v1.38/listip.cfg.
Couln't open Monkey CDS v1.38/listip.cfg


Workaround
----------

Using "set game main s" should solve the problem.


Final fix
---------

changing the above line of "SVCmd_WriteIP_f" to:

 game = gi.cvar("game", "main", 0);

or adopting a similar algorithm like the rest of code for determining the
game-directory should solve the problem.

Kun afablaj salutoj

http://jjaf.de/kingpin/mods/monkey/

