aboutsummaryrefslogtreecommitdiff
path: root/cmd_cap.go
diff options
context:
space:
mode:
Diffstat (limited to 'cmd_cap.go')
-rw-r--r--cmd_cap.go7
1 files changed, 6 insertions, 1 deletions
diff --git a/cmd_cap.go b/cmd_cap.go
index 65313a4..c76bd57 100644
--- a/cmd_cap.go
+++ b/cmd_cap.go
@@ -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