From aa969b7ff72fd540257558d09fdaa8507216542f Mon Sep 17 00:00:00 2001 From: Shivaram Lingamneni Date: Sun, 5 Sep 2021 20:14:13 -0400 Subject: [PATCH 1/2] fix #1530 Warn if the user sent, e.g., /QUOTE /SAMODE instead of /QUOTE SAMODE --- irc/handlers.go | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/irc/handlers.go b/irc/handlers.go index 88774b7d..cbacabd9 100644 --- a/irc/handlers.go +++ b/irc/handlers.go @@ -3531,7 +3531,15 @@ func zncHandler(server *Server, client *Client, msg ircmsg.Message, rb *Response // fake handler for unknown commands func unknownCommandHandler(server *Server, client *Client, msg ircmsg.Message, rb *ResponseBuffer) bool { - rb.Add(nil, server.name, ERR_UNKNOWNCOMMAND, client.Nick(), utils.SafeErrorParam(msg.Command), client.t("Unknown command")) + var message string + if strings.HasPrefix(msg.Command, "/") { + message = fmt.Sprintf(client.t("Unknown command; if you are using /QUOTE, the correct syntax is /QUOTE %s, not /QUOTE %s"), + strings.TrimPrefix(msg.Command, "/"), msg.Command) + } else { + message = client.t("Unknown command") + } + + rb.Add(nil, server.name, ERR_UNKNOWNCOMMAND, client.Nick(), utils.SafeErrorParam(msg.Command), message) return false } From ffb5e4f98621d155f46f174c20a70e0b631b7598 Mon Sep 17 00:00:00 2001 From: Shivaram Lingamneni Date: Sun, 5 Sep 2021 20:15:42 -0400 Subject: [PATCH 2/2] bump irctest --- irctest | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/irctest b/irctest index 125a1cc1..f86e11a2 160000 --- a/irctest +++ b/irctest @@ -1 +1 @@ -Subproject commit 125a1cc106655b8c34705fd74a2704fccb8ec91e +Subproject commit f86e11a288a88e2016d579c7a4bbb3c58869f879