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
1 changed files with 1 additions and 1 deletions

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, " ")