]> Cypherpunks.ru repositories - goircd.git/commitdiff
Do not alter MOTD
authorBjörn Busse <mail@baerlin.eu>
Sun, 18 Oct 2015 21:47:50 +0000 (23:47 +0200)
committerSergey Matveev <stargrave@stargrave.org>
Mon, 19 Oct 2015 08:31:47 +0000 (11:31 +0300)
It should be up to the author how exactly the MOTD is laid out - some
people like to have a margin, therefor remove the trim().

daemon.go

index 57797c7128199b80fbeb976a31d48e017601e8b8..3afda4fb0a3d8b69897e8e160cf09e4c77af6ab4 100644 (file)
--- a/daemon.go
+++ b/daemon.go
@@ -67,7 +67,7 @@ func SendMotd(client *Client) {
                return
        }
        client.ReplyNicknamed("375", "- "+*hostname+" Message of the day -")
-       for _, s := range strings.Split(strings.Trim(string(motdText), "\n"), "\n") {
+       for _, s := range strings.Split(strings.TrimSuffix(string(motdText), "\n"), "\n") {
                client.ReplyNicknamed("372", "- "+s)
        }
        client.ReplyNicknamed("376", "End of /MOTD command")