summaryrefslogtreecommitdiff
path: root/src/fe-common/core
diff options
context:
space:
mode:
Diffstat (limited to 'src/fe-common/core')
-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);