mirror of
https://github.com/shazow/ssh-chat.git
synced 2025-07-02 03:34:29 +02:00
motd: Don't trim surrounding whitespace from the --motd file input.
This commit is contained in:
parent
d2f08490f7
commit
87d38405ae
@ -152,7 +152,7 @@ func main() {
|
|||||||
if err != nil {
|
if err != nil {
|
||||||
fail(7, "Failed to load MOTD file: %v\n", err)
|
fail(7, "Failed to load MOTD file: %v\n", err)
|
||||||
}
|
}
|
||||||
motdString := strings.TrimSpace(string(motd))
|
motdString := string(motd)
|
||||||
// hack to normalize line endings into \r\n
|
// hack to normalize line endings into \r\n
|
||||||
motdString = strings.Replace(motdString, "\r\n", "\n", -1)
|
motdString = strings.Replace(motdString, "\r\n", "\n", -1)
|
||||||
motdString = strings.Replace(motdString, "\n", "\r\n", -1)
|
motdString = strings.Replace(motdString, "\n", "\r\n", -1)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user