aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRunxi Yu <me@runxiyu.org>2024-12-08 10:58:27 +0800
committerRunxi Yu <me@runxiyu.org>2024-12-08 10:58:27 +0800
commit45b34b89ab61a36147f3c56c5f11207a2454bef8 (patch)
tree661c9561561b69402dd47534cc2855af19bab254
parentUSER: Don't allow reregistration (diff)
downloadmeseircd-45b34b89ab61a36147f3c56c5f11207a2454bef8.tar.gz
meseircd-45b34b89ab61a36147f3c56c5f11207a2454bef8.tar.zst
meseircd-45b34b89ab61a36147f3c56c5f11207a2454bef8.zip
CAP: Stub
-rw-r--r--cmd_cap.go22
1 files changed, 22 insertions, 0 deletions
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
+}