From 9e1c9c5f43e2f0cf2dd1fa29b1ba3512dbbaeb7e Mon Sep 17 00:00:00 2001 From: Runxi Yu Date: Sun, 8 Dec 2024 15:17:50 +0800 Subject: Implement SASL stub --- cmd_cap.go | 15 ++++++++++++--- 1 file changed, 12 insertions(+), 3 deletions(-) (limited to 'cmd_cap.go') diff --git a/cmd_cap.go b/cmd_cap.go index a2af228..65313a4 100644 --- a/cmd_cap.go +++ b/cmd_cap.go @@ -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 } -- cgit v1.2.3