From 45b34b89ab61a36147f3c56c5f11207a2454bef8 Mon Sep 17 00:00:00 2001 From: Runxi Yu Date: Sun, 8 Dec 2024 10:58:27 +0800 Subject: CAP: Stub --- cmd_cap.go | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) create mode 100644 cmd_cap.go diff --git a/cmd_cap.go b/cmd_cap.go new file mode 100644 index 0000000..45aaacc --- /dev/null +++ b/cmd_cap.go @@ -0,0 +1,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 +} -- cgit v1.2.3