Omit last empty string from MOTD reply
This commit is contained in:
parent
043730c355
commit
6d2c47a7af
@ -84,7 +84,7 @@ func (daemon *Daemon) SendMotd(client *Client) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
client.ReplyNicknamed("375", "- "+daemon.hostname+" Message of the day -")
|
client.ReplyNicknamed("375", "- "+daemon.hostname+" Message of the day -")
|
||||||
for _, s := range bytes.Split(motd, []byte("\n")) {
|
for _, s := range bytes.Split(bytes.TrimRight(motd, "\n"), []byte("\n")) {
|
||||||
client.ReplyNicknamed("372", "- "+string(s))
|
client.ReplyNicknamed("372", "- "+string(s))
|
||||||
}
|
}
|
||||||
client.ReplyNicknamed("376", "End of /MOTD command")
|
client.ReplyNicknamed("376", "End of /MOTD command")
|
||||||
|
Loading…
Reference in New Issue
Block a user