Don't do other NetHack-specific stuff either in dgl itself...

git-svn-id: svn://katsu.triplehelix.org/dgamelaunch/trunk@394 db0b04b0-f4d1-0310-9a6d-de3e77497b0e
This commit is contained in:
Pasi Kallinen 2008-01-01 17:59:53 +00:00
parent b029b458f3
commit efcfb05f41
2 changed files with 12 additions and 3 deletions

View File

@ -1876,7 +1876,7 @@ int
main (int argc, char** argv) main (int argc, char** argv)
{ {
/* for chroot and program execution */ /* for chroot and program execution */
char atrcfilename[81], *spool, *p, *auth = NULL; char atrcfilename[81], /**spool,*/ *p, *auth = NULL;
unsigned int len; unsigned int len;
int c, i; int c, i;
int nhext = 0, nhauth = 0; int nhext = 0, nhauth = 0;
@ -2082,18 +2082,22 @@ main (int argc, char** argv)
} }
*/ */
/*
len = strlen(myconfig[userchoice]->spool) + strlen (me->username) + 1; len = strlen(myconfig[userchoice]->spool) + strlen (me->username) + 1;
spool = malloc (len + 1); spool = malloc (len + 1);
snprintf (spool, len + 1, "%s/%s", myconfig[userchoice]->spool, me->username); snprintf (spool, len + 1, "%s/%s", myconfig[userchoice]->spool, me->username);
mysetenv ("MAIL", spool, 1); mysetenv ("MAIL", spool, 1);
mysetenv ("SIMPLEMAIL", "1", 1); mysetenv ("SIMPLEMAIL", "1", 1);
*/
/* don't let the mail file grow */ /* don't let the mail file grow */
/*
if (access (spool, F_OK) == 0) if (access (spool, F_OK) == 0)
unlink (spool); unlink (spool);
free (spool); free (spool);
*/
/* fix the variables in the arguments */ /* fix the variables in the arguments */
for (i = 0; i < myconfig[userchoice]->num_args; i++) { for (i = 0; i < myconfig[userchoice]->num_args; i++) {

View File

@ -140,13 +140,18 @@ rc_template = "/dgl-default-rcfile"
# %r == dglroot # %r == dglroot
# %n == user name # %n == user name
rc_fmt = "%rrcfiles/%n.nethackrc" rc_fmt = "%rrcfiles/%n.nethackrc"
inprogressdir = "inprogress-nethack/" inprogressdir = "inprogress-nethack/"
# back up savefile # back up savefile
commands = cp "/var/games/nethack/save/%u%n.gz" "/var/games/nethack/save/%u%n.gz.bak", commands = cp "/var/games/nethack/save/%u%n.gz" "/var/games/nethack/save/%u%n.gz.bak",
# set NETHACKOPTIONS to point to the rcfile # set NETHACKOPTIONS to point to the rcfile
setenv "NETHACKOPTIONS" "@%rrcfiles/%n.nethackrc" setenv "NETHACKOPTIONS" "@%rrcfiles/%n.nethackrc",
# set up nethack mail stuff
setenv "MAIL" "/var/mail/%n",
setenv "SIMPLEMAIL" "1",
# don't let the mail file grow
unlink "/var/mail/%n"
} }
# #