aboutsummaryrefslogtreecommitdiff
path: root/cmd_cap.go
blob: a984c07dff16a32f7822b0f0007e74c6ed2349c5 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
package main

import (
	"strings"
)

func init() {
	commandHandlers["CAP"] = handleClientCap
}

func handleClientCap(msg RMsg, client *Client) bool {
	if len(msg.Params) < 1 {
		client.Send(MakeMsg(self, ERR_NEEDMOREPARAMS, "CAP", "Not enough parameters"))
		return true
	}
	switch strings.ToUpper(msg.Params[0]) {
	case "LS":
		client.Send(MakeMsg(self, "CAP", client.Nick, "LS", "sasl=PLAIN,EXTERNAL"))
	case "REQ":
	}
	return true
}