diff options
author | Runxi Yu <me@runxiyu.org> | 2024-12-08 15:17:50 +0800 |
---|---|---|
committer | Runxi Yu <me@runxiyu.org> | 2024-12-08 15:17:50 +0800 |
commit | 9e1c9c5f43e2f0cf2dd1fa29b1ba3512dbbaeb7e (patch) | |
tree | c176990b7e54b292b70dcfe1f3bed5fa1ab630a3 /cmd_cap.go | |
parent | commandHandlers -> CommandHandlers (diff) | |
download | meseircd-9e1c9c5f43e2f0cf2dd1fa29b1ba3512dbbaeb7e.tar.gz meseircd-9e1c9c5f43e2f0cf2dd1fa29b1ba3512dbbaeb7e.tar.zst meseircd-9e1c9c5f43e2f0cf2dd1fa29b1ba3512dbbaeb7e.zip |
Implement SASL stub
Diffstat (limited to '')
-rw-r--r-- | cmd_cap.go | 15 |
1 files changed, 12 insertions, 3 deletions
@@ -42,11 +42,17 @@ func handleClientCap(msg RMsg, client *Client) error { } _, ok := Caps[c] if ok { - client.Send(MakeMsg(self, "CAP", client.Nick, "ACK", c)) + err := client.Send(MakeMsg(self, "CAP", client.Nick, "ACK", c)) + if err != nil { + return err + } client.Caps[c] = struct{}{} // TODO: This is terrible } else { - client.Send(MakeMsg(self, "CAP", client.Nick, "NAK", c)) + err := client.Send(MakeMsg(self, "CAP", client.Nick, "NAK", c)) + if err != nil { + return err + } } } case "END": @@ -55,7 +61,10 @@ func handleClientCap(msg RMsg, client *Client) error { return nil } client.State = ClientStateCapabilitiesFinished - client.checkRegistration() + err := client.checkRegistration() + if err != nil { + return err + } } return nil } |