hirc

IRC client
Log | Files | Refs

commit 1c4d5d61f72ffa322a7e321aa5434a430a1990d4
parent 049aa83ba28faa724a3781463b0e630fea78915d
Author: hhvn <dev@hhvn.uk>
Date:   Sun, 15 May 2022 12:13:48 +0100

Fix command escaping

Diffstat:
Msrc/commands.c | 6+++---
1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/src/commands.c b/src/commands.c @@ -2042,11 +2042,11 @@ command_eval(struct Server *server, char *str) { s = dup = estrdup(alias_eval(str)); - if (*s != '/' || strncmp(s, "/ /", sizeof("/ /")) == 0) { + if (*s != '/' || strncmp(s, "/ /", CONSTLEN("/ /")) == 0) { /* Provide a way to escape commands * "/ /cmd" --> "/cmd" */ - if (strncmp(s, "/ /", sizeof("/ /")) == 0) - s += 3; + if (strncmp(s, "/ /", CONSTLEN("/ /")) == 0) + s += 2; if (selected.channel && selected.server) { // TODO: message splitting