3
0
mirror of https://github.com/ergochat/ergo.git synced 2024-12-22 18:52:41 +01:00

no-op fix to SETNAME workaround

This commit is contained in:
Shivaram Lingamneni 2020-10-26 18:06:06 -04:00
parent 9c4b086113
commit b57820150e

View File

@ -2737,7 +2737,7 @@ func sceneHandler(server *Server, client *Client, msg ircmsg.IrcMessage, rb *Res
// SETNAME <realname>
func setnameHandler(server *Server, client *Client, msg ircmsg.IrcMessage, rb *ResponseBuffer) bool {
realname := msg.Params[0]
if len(msg.Params) != 0 {
if len(msg.Params) != 1 {
// workaround for clients that turn unknown commands into raw IRC lines,
// so you can do `/setname Jane Doe` in the client and get the expected result
realname = strings.Join(msg.Params, " ")