Return-Path: <monkeyharris@bigfoot.com>
Received: from post.webmailer.de ([192.67.198.78]) by mailin03.sul.t-online.de
	with esmtp id 15jMlv-01Wrs8C; Tue, 18 Sep 2001 17:26:51 +0200
Received: from oracle.clara.net (oracle.clara.net [195.8.69.94])
	by post.webmailer.de (8.9.3/8.8.7) with ESMTP id RAA20290
	for <kingpin@kingpin.jjaf.de>; Tue, 18 Sep 2001 17:26:50 +0200 (MET DST)
Received: from [213.253.39.31] (helo=arse)
	by oracle.clara.net with smtp (Exim 3.11 #5)
	id 15jMlt-000Gij-00
	for kingpin@kingpin.jjaf.de; Tue, 18 Sep 2001 16:26:49 +0100
Message-Id: <3.0.1.32.20010918162803.00a50490@pop.clara.net>
Received: by dream-machine
Date: Tue, 18 Sep 2001 16:28:03 +0100
To: "jjaf.de" <kingpin@kingpin.jjaf.de>
From: Monkey Harris <monkeyharris@bigfoot.com>
Subject: Re: change-request: monkey-mod 1.38: 
In-Reply-To: <002401c13fcd$01b577c0$0235a8c0@jjaf.de>
Mime-Version: 1.0
Content-Type: text/plain; charset="us-ascii"

OK, I've now changed the code to this...

	game = gi.cvar("game", "", 0);

	if (!*game->string)
		strcpy (name, "main"DIR_SLASH"listip.cfg");
	else

sprintf (name, "%s"DIR_SLASH"listip.cfg", game->string);



At 01:02 18/09/01 +0200, you wrote:
>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/
>
>
>
>
