aboutsummaryrefslogtreecommitdiff
path: root/cmd_cap.go
diff options
context:
space:
mode:
Diffstat (limited to 'cmd_cap.go')
-rw-r--r--cmd_cap.go16
1 files changed, 11 insertions, 5 deletions
diff --git a/cmd_cap.go b/cmd_cap.go
index a984c07..328bce6 100644
--- a/cmd_cap.go
+++ b/cmd_cap.go
@@ -8,15 +8,21 @@ func init() {
commandHandlers["CAP"] = handleClientCap
}
-func handleClientCap(msg RMsg, client *Client) bool {
+func handleClientCap(msg RMsg, client *Client) error {
if len(msg.Params) < 1 {
- client.Send(MakeMsg(self, ERR_NEEDMOREPARAMS, "CAP", "Not enough parameters"))
- return true
+ err := client.Send(MakeMsg(self, ERR_NEEDMOREPARAMS, "CAP", "Not enough parameters"))
+ if err != nil {
+ return err
+ }
+ return nil
}
switch strings.ToUpper(msg.Params[0]) {
case "LS":
- client.Send(MakeMsg(self, "CAP", client.Nick, "LS", "sasl=PLAIN,EXTERNAL"))
+ err := client.Send(MakeMsg(self, "CAP", client.Nick, "LS", "sasl=PLAIN,EXTERNAL"))
+ if err != nil {
+ return err
+ }
case "REQ":
}
- return true
+ return nil
}