瀏覽代碼

no-op fix to SETNAME workaround

tags/v2.4.0-rc1
Shivaram Lingamneni 3 年之前
父節點
當前提交
b57820150e
共有 1 個文件被更改,包括 1 次插入1 次删除
  1. 1
    1
      irc/handlers.go

+ 1
- 1
irc/handlers.go 查看文件

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

Loading…
取消
儲存