Browse Source

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.
tags/v2.11.0-rc1
Shivaram Lingamneni 1 year ago
parent
commit
4e0d2d65e8
1 changed files with 1 additions and 1 deletions
  1. 1
    1
      irc/handlers.go

+ 1
- 1
irc/handlers.go View File

@@ -449,10 +449,10 @@ func awayHandler(server *Server, client *Client, msg ircmsg.Message, rb *Respons
449 449
 	var isAway bool
450 450
 	var awayMessage string
451 451
 	if len(msg.Params) > 0 {
452
-		isAway = true
453 452
 		awayMessage = msg.Params[0]
454 453
 		awayMessage = ircutils.TruncateUTF8Safe(awayMessage, server.Config().Limits.AwayLen)
455 454
 	}
455
+	isAway = (awayMessage != "") // #1996
456 456
 
457 457
 	rb.session.SetAway(awayMessage)
458 458
 

Loading…
Cancel
Save