mirror of
https://github.com/ergochat/ergo.git
synced 2024-11-22 03:49:27 +01:00
fix incorrect handling of overlong lines when allow-truncation is enabled
This commit is contained in:
parent
c55d861a72
commit
57fd1b1d58
@ -747,9 +747,11 @@ func (client *Client) run(session *Session) {
|
|||||||
} else if err == ircmsg.ErrorTagsTooLong {
|
} else if err == ircmsg.ErrorTagsTooLong {
|
||||||
session.Send(nil, client.server.name, ERR_INPUTTOOLONG, client.Nick(), client.t("Input line contained excess tag data"))
|
session.Send(nil, client.server.name, ERR_INPUTTOOLONG, client.Nick(), client.t("Input line contained excess tag data"))
|
||||||
continue
|
continue
|
||||||
} else if err == ircmsg.ErrorBodyTooLong && !client.server.Config().Server.Compatibility.allowTruncation {
|
} else if err == ircmsg.ErrorBodyTooLong {
|
||||||
session.Send(nil, client.server.name, ERR_INPUTTOOLONG, client.Nick(), client.t("Input line too long"))
|
if !client.server.Config().Server.Compatibility.allowTruncation {
|
||||||
continue
|
session.Send(nil, client.server.name, ERR_INPUTTOOLONG, client.Nick(), client.t("Input line too long"))
|
||||||
|
continue
|
||||||
|
} // else: proceed with the truncated line
|
||||||
} else if err != nil {
|
} else if err != nil {
|
||||||
client.Quit(client.t("Received malformed line"), session)
|
client.Quit(client.t("Received malformed line"), session)
|
||||||
break
|
break
|
||||||
|
Loading…
Reference in New Issue
Block a user