aboutsummaryrefslogtreecommitdiff
path: root/caps.go
diff options
context:
space:
mode:
authorRunxi Yu <me@runxiyu.org>2024-12-30 01:23:40 +0000
committerRunxi Yu <me@runxiyu.org>2024-12-30 01:23:40 +0000
commitdce03955174abe5ad83c01c930e3bf47fe39d8ce (patch)
treecf4cddc3f83bc6eb9efd5be959d349fa47606c84 /caps.go
parentReformat (diff)
downloadmeseircd-dce03955174abe5ad83c01c930e3bf47fe39d8ce.tar.gz
meseircd-dce03955174abe5ad83c01c930e3bf47fe39d8ce.tar.zst
meseircd-dce03955174abe5ad83c01c930e3bf47fe39d8ce.zip
Revamp
Diffstat (limited to '')
-rw-r--r--caps.go20
1 files changed, 20 insertions, 0 deletions
diff --git a/caps.go b/caps.go
new file mode 100644
index 0000000..bd78a9d
--- /dev/null
+++ b/caps.go
@@ -0,0 +1,20 @@
+package main
+
+import (
+ "strings"
+)
+
+var global_cap_ls_response string
+var global_cap_ls_302_response string
+
+// Register a new capability.
+// This function is not reentrant and must not be called concurrently.
+// It should only be used in the init() functions in source files.
+func register_cap(name string, parameters string) {
+ global_cap_ls_response += name + " "
+ global_cap_ls_302_response += name
+ if parameters != "" {
+ global_cap_ls_302_response += "=" + parameters
+ }
+ global_cap_ls_302_response += " "
+}