aboutsummaryrefslogtreecommitdiff
path: root/cmd_cap.go
diff options
context:
space:
mode:
Diffstat (limited to 'cmd_cap.go')
-rw-r--r--cmd_cap.go15
1 files changed, 12 insertions, 3 deletions
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
}