diff options
author | Runxi Yu <me@runxiyu.org> | 2024-12-09 06:47:18 +0800 |
---|---|---|
committer | Runxi Yu <me@runxiyu.org> | 2024-12-09 06:47:18 +0800 |
commit | 3e2260dd8284b5948a6e11a9e6966dc95b9c810c (patch) | |
tree | 053aa160bd6387592caefcee1d9579b4a9668e9e /cmd_cap.go | |
parent | Server & Client should only have pointer receivers (diff) | |
download | meseircd-3e2260dd8284b5948a6e11a9e6966dc95b9c810c.tar.gz meseircd-3e2260dd8284b5948a6e11a9e6966dc95b9c810c.tar.zst meseircd-3e2260dd8284b5948a6e11a9e6966dc95b9c810c.zip |
CAP LS: Distinguish 302
Diffstat (limited to 'cmd_cap.go')
-rw-r--r-- | cmd_cap.go | 7 |
1 files changed, 6 insertions, 1 deletions
@@ -24,7 +24,12 @@ func handleClientCap(msg RMsg, client *Client) error { if client.State == ClientStatePreRegistration { client.State = ClientStateCapabilities } - err := client.Send(MakeMsg(self, "CAP", client.Nick, "LS", capls)) + var err error + if len(msg.Params) >= 2 && msg.Params[1] == "302" { + err = client.Send(MakeMsg(self, "CAP", client.Nick, "LS", capls302)) + } else { + err = client.Send(MakeMsg(self, "CAP", client.Nick, "LS", capls)) + } // TODO: Split when too long if err != nil { return err |