diff options
author | Timo Sirainen <cras@irssi.org> | 2000-06-10 22:48:18 +0000 |
---|---|---|
committer | cras <cras@dbcabf3a-b0e7-0310-adc4-f8d773084564> | 2000-06-10 22:48:18 +0000 |
commit | fbb5cd69908584c741a1f84740ef8bdcf2edddb0 (patch) | |
tree | f973fd59991622524cdbf5f5c0baf6ec76eac6fc | |
parent | 15d49dbd8533881572715ab4be37befbe669c510 (diff) | |
download | irssi-fbb5cd69908584c741a1f84740ef8bdcf2edddb0.zip |
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
-rw-r--r-- | src/core/commands.c | 12 |
1 files 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; } |