From a9972399c52f0d91f089ba3ab928edf9442fd10f Mon Sep 17 00:00:00 2001 From: dominik Date: Mon, 13 Dec 2004 22:13:02 +0000 Subject: (svn r1077) Implements scripts/autoexec.scr to get executed on game starting (sign_de) - %! allows to merge alias parameters - \% allows to use % in alias strings - "alias" command now overwrites the old alias list entry --- console_cmds.c | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) (limited to 'console_cmds.c') diff --git a/console_cmds.c b/console_cmds.c index 3e2dcb07f..7aaf3999c 100644 --- a/console_cmds.c +++ b/console_cmds.c @@ -367,8 +367,17 @@ DEF_CONSOLE_CMD(ConPrintFC) DEF_CONSOLE_CMD(ConAlias) { + _iconsole_alias* alias; + if (argc < 3) return NULL; - IConsoleAliasRegister(argv[1],argv[2]); + + alias = IConsoleAliasGet(argv[1]); + if (alias == NULL) { + IConsoleAliasRegister(argv[1],argv[2]); + } else { + free(alias->cmdline); + alias->cmdline = strdup(argv[2]); + } return NULL; } -- cgit v1.2.3-54-g00ecf