extern int dgl_local_COLS;
extern int dgl_local_LINES;
+extern char last_ttyrec[512];
+
/* dgamelaunch.c */
extern void create_config(void);
extern void ttyrec_getmaster(void);
* %r == chroot (string) (aka "dglroot" config var)
* %g == game name
* %s == short game name
+ * %t == ttyrec file (full path&name) of the last game played.
*/
char *
dgl_format_str(int game, struct dg_user *me, char *str, char *plrname)
while (*p != '\0')
p++;
break;
+ case 't':
+ snprintf (p, end + 1 - p, "%s", last_ttyrec);
+ while (*p != '\0')
+ p++;
+ break;
default:
*p = *f;
if (p < end)
# %u = shed_uid, as defined above, but numeric
# %g = game name, if user has selected a game.
# %s = short game name, if user has selected a game.
+# %t = ttyrec path & filename of the last game played.
#
# eg. commands[login] = mkdir "foo", unlink "bar", setenv "Z" "foo"
#
struct termios tt;
struct winsize win;
+char last_ttyrec[512] = { '\0' };
+
int ancient_encoding = 0;
void
if (ancient_encoding == -1)
query_encoding(game, username);
+ snprintf(last_ttyrec, 512, "%s", dirname);
+
atexit(&remove_ipfile);
if ((fscript = fopen (dirname, "w")) == NULL)
{