* %n == user name (string; gotten from 'me', or from 'plrname' if 'me' is null)
* %r == chroot (string) (aka "dglroot" config var)
* %g == game name
+ * %s == short game name
*/
char *
dgl_format_str(int game, struct dg_user *me, char *str, char *plrname)
while (*p != '\0')
p++;
break;
+ case 's':
+ if (game >= 0 && game < num_games && myconfig[game]) snprintf (p, end + 1 - p, "%s", myconfig[game]->shortname);
+ else return NULL;
+ while (*p != '\0')
+ p++;
+ break;
case 'r':
snprintf (p, end + 1 - p, "%s", globalconfig.dglroot);
while (*p != '\0')
# %n = user nick, if user is logged in
# %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.
#
# eg. commands[login] = mkdir "foo", unlink "bar", setenv "Z" "foo"
#