diff options
author | Timo Sirainen <cras@irssi.org> | 2000-05-25 12:58:14 +0000 |
---|---|---|
committer | cras <cras@dbcabf3a-b0e7-0310-adc4-f8d773084564> | 2000-05-25 12:58:14 +0000 |
commit | 6e2f0ec988d80bfa8d454f53c78c809b7ccc03f2 (patch) | |
tree | 4ff7ad3769996924ba49f7a2c558d5de9831434b | |
parent | 96020e699926d292d27dc6fd986e8bb688cbe31e (diff) | |
download | irssi-6e2f0ec988d80bfa8d454f53c78c809b7ccc03f2.zip |
"/ text" sends "text" to active channel.
git-svn-id: http://svn.irssi.org/repos/irssi/trunk@233 dbcabf3a-b0e7-0310-adc4-f8d773084564
-rw-r--r-- | src/core/commands.c | 4 | ||||
-rw-r--r-- | src/fe-common/irc/completion.c | 9 |
2 files changed, 11 insertions, 2 deletions
diff --git a/src/core/commands.c b/src/core/commands.c index 1dfd8b71..a2c92ef1 100644 --- a/src/core/commands.c +++ b/src/core/commands.c @@ -387,6 +387,10 @@ static void parse_outgoing(const char *line, SERVER_REC *server, void *item) if (strchr(cmdchars, *line) == NULL) return; /* handle only /commands here */ line++; + if (*line == ' ') { + /* "/ text" = same as sending "text" to active channel. */ + return; + } /* //command ignores aliases */ if (strchr(cmdchars, *line) != NULL) { diff --git a/src/fe-common/irc/completion.c b/src/fe-common/irc/completion.c index 444a3a06..b710dd67 100644 --- a/src/fe-common/irc/completion.c +++ b/src/fe-common/irc/completion.c @@ -305,8 +305,13 @@ static void event_command(gchar *line, IRC_SERVER_REC *server, WI_IRC_REC *item) if (!irc_item_check(item)) return; - if (strchr(settings_get_str("cmdchars"), *line) != NULL) - return; + if (strchr(settings_get_str("cmdchars"), *line) != NULL) { + if (line[1] != ' ') + return; + + /* "/ text" = same as sending "text" to active channel. */ + line += 2; + } line = g_strdup(line); |