about summary refs log tree commit diff
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--bounce.h1
1 files changed, 1 insertions, 0 deletions
diff --git a/bounce.h b/bounce.h
index 93a3c89..a197053 100644
--- a/bounce.h
+++ b/bounce.h
@@ -72,6 +72,7 @@ static inline struct Message parse(char *line) {
 	if (line && line[0] == '@') msg.tags = 1 + strsep(&line, " ");
 	if (line && line[0] == ':') msg.origin = 1 + strsep(&line, " ");
 	msg.cmd = strsep(&line, " ");
+	if (msg.cmd && !msg.cmd[0]) msg.cmd = NULL;
 	for (size_t i = 0; line && i < ParamCap; ++i) {
 		if (line[0] == ':') {
 			msg.params[i] = &line[1];