From fbb5cd69908584c741a1f84740ef8bdcf2edddb0 Mon Sep 17 00:00:00 2001 From: Timo Sirainen Date: Sat, 10 Jun 2000 22:48:18 +0000 Subject: [PATCH] same cmdchar twice ignores aliases ignores aliases - not any two cmdchars git-svn-id: http://svn.irssi.org/repos/irssi/trunk@316 dbcabf3a-b0e7-0310-adc4-f8d773084564 --- src/core/commands.c | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/src/core/commands.c b/src/core/commands.c index e4c7a5ff..b82364b7 100644 --- a/src/core/commands.c +++ b/src/core/commands.c @@ -421,8 +421,8 @@ void cmd_get_remove_func(CMD_GET_FUNC func) static void parse_outgoing(const char *line, SERVER_REC *server, void *item) { - const char *cmdchars, *alias; - char *cmd, *str, *args, *oldcmd; + const char *alias; + char *cmd, *str, *args, *oldcmd, *cmdchar; int use_alias = TRUE; g_return_if_fail(line != NULL); @@ -433,8 +433,8 @@ static void parse_outgoing(const char *line, SERVER_REC *server, void *item) return; } - cmdchars = settings_get_str("cmdchars"); - if (strchr(cmdchars, *line) == NULL) + cmdchar = strchr(settings_get_str("cmdchars"), *line); + if (cmdchar == NULL) return; /* handle only /commands here */ line++; if (*line == ' ') { @@ -442,8 +442,8 @@ static void parse_outgoing(const char *line, SERVER_REC *server, void *item) return; } - /* //command ignores aliases */ - if (strchr(cmdchars, *line) != NULL) { + /* same cmdchar twice ignores aliases ignores aliases */ + if (*line == *cmdchar) { line++; use_alias = FALSE; }