diff options
author | June McEnroe <june@causal.agency> | 2020-03-22 14:38:22 -0400 |
---|---|---|
committer | June McEnroe <june@causal.agency> | 2020-03-22 14:38:22 -0400 |
commit | be4283b8fff9fcf140fc602ce5a7fd47e3ac4f84 (patch) | |
tree | ba8f1eefb64889678814d2824f566fe083f0c1c6 | |
parent | Track own host, handle CHGHOST (diff) | |
download | catgirl-be4283b8fff9fcf140fc602ce5a7fd47e3ac4f84.tar.gz catgirl-be4283b8fff9fcf140fc602ce5a7fd47e3ac4f84.zip |
Handle empty input directly in command
-rw-r--r-- | command.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/command.c b/command.c index 3ef4d5d..e06c2a0 100644 --- a/command.c +++ b/command.c @@ -40,7 +40,7 @@ static void commandQuote(uint id, char *params) { } static void echoMessage(char *cmd, uint id, char *params) { - if (!params || !params[0]) return; + if (!params) return; ircFormat("%s %s :%s\r\n", cmd, idNames[id], params); struct Message msg = { .nick = self.nick, @@ -396,6 +396,8 @@ void command(uint id, char *input) { if (id == Debug && input[0] != '/' && !self.restricted) { commandQuote(id, input); return; + } else if (!input[0]) { + return; } else if (commandIsPrivmsg(id, input)) { commandPrivmsg(id, input); return; |