mirror of
https://github.com/ergochat/ergo.git
synced 2024-11-22 03:49:27 +01:00
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.
This commit is contained in:
parent
57a213123f
commit
4e0d2d65e8
@ -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)
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user