summaryrefslogtreecommitdiff
path: root/src/fe-common/core/fe-core-commands.c
diff options
context:
space:
mode:
authorTimo Sirainen <cras@irssi.org>2001-11-20 02:08:37 +0000
committercras <cras@dbcabf3a-b0e7-0310-adc4-f8d773084564>2001-11-20 02:08:37 +0000
commit26128a3de2e86f7310489a749120d3cbfae46576 (patch)
treec5bf2a5864cf471a39c46c86dd43218bb6a9456b /src/fe-common/core/fe-core-commands.c
parent8279d9c5c2836533f0dc97553fd8a5098ea749b6 (diff)
downloadirssi-26128a3de2e86f7310489a749120d3cbfae46576.zip
Previous commit in core/commands.c broke /^cmd (command output hiding).
git-svn-id: http://svn.irssi.org/repos/irssi/trunk@2116 dbcabf3a-b0e7-0310-adc4-f8d773084564
Diffstat (limited to 'src/fe-common/core/fe-core-commands.c')
-rw-r--r--src/fe-common/core/fe-core-commands.c8
1 files changed, 7 insertions, 1 deletions
diff --git a/src/fe-common/core/fe-core-commands.c b/src/fe-common/core/fe-core-commands.c
index dc1f121c..7b59e58e 100644
--- a/src/fe-common/core/fe-core-commands.c
+++ b/src/fe-common/core/fe-core-commands.c
@@ -192,6 +192,12 @@ static void event_command(const char *data)
{
const char *cmdchar;
+ if (*data == '\0') {
+ /* empty line, forget it. */
+ signal_stop();
+ return;
+ }
+
/* save current command line */
current_cmdline = data;
@@ -318,7 +324,7 @@ void fe_core_commands_init(void)
command_bind_first("nick", NULL, (SIGNAL_FUNC) cmd_nick);
command_bind_first("join", NULL, (SIGNAL_FUNC) cmd_join);
- signal_add("send command", (SIGNAL_FUNC) event_command);
+ signal_add_first("send command", (SIGNAL_FUNC) event_command);
signal_add_last("send command", (SIGNAL_FUNC) event_command_last);
signal_add("default command", (SIGNAL_FUNC) event_default_command);
signal_add("error command", (SIGNAL_FUNC) event_cmderror);