From 4e0d2d65e8588700db9cd2c5db48cadf9fb16199 Mon Sep 17 00:00:00 2001 From: Shivaram Lingamneni Date: Sun, 11 Sep 2022 04:09:26 -0400 Subject: [PATCH] fix #1996 According to the de facto standard, `AWAY :\r\n` is equivalent to `AWAY\r\n`. Our behavior was inconsistent before, now it consistently matches the de facto standard. --- irc/handlers.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/irc/handlers.go b/irc/handlers.go index 17bee6e0..156bee8b 100644 --- a/irc/handlers.go +++ b/irc/handlers.go @@ -449,10 +449,10 @@ func awayHandler(server *Server, client *Client, msg ircmsg.Message, rb *Respons var isAway bool var awayMessage string if len(msg.Params) > 0 { - isAway = true awayMessage = msg.Params[0] awayMessage = ircutils.TruncateUTF8Safe(awayMessage, server.Config().Limits.AwayLen) } + isAway = (awayMessage != "") // #1996 rb.session.SetAway(awayMessage)