diff options
author | Runxi Yu <me@runxiyu.org> | 2024-12-08 13:57:25 +0800 |
---|---|---|
committer | Runxi Yu <me@runxiyu.org> | 2024-12-08 13:57:25 +0800 |
commit | 6fdea28236771ee1d90a6fc959075c79939ad566 (patch) | |
tree | 0fd3e2f013729468b11d06d09283a92b98ae4358 /cap.go | |
parent | tags.go: Remove erroneous MIT SPDX-License-Identifier (diff) | |
download | meseircd-6fdea28236771ee1d90a6fc959075c79939ad566.tar.gz meseircd-6fdea28236771ee1d90a6fc959075c79939ad566.tar.zst meseircd-6fdea28236771ee1d90a6fc959075c79939ad566.zip |
CAP: Primitive negotiation
Diffstat (limited to 'cap.go')
-rw-r--r-- | cap.go | 25 |
1 files changed, 25 insertions, 0 deletions
@@ -0,0 +1,25 @@ +package main + +import ( + "strings" +) + +var Caps = map[string]string{ + "sasl": "PLAIN,EXTERNAL", +} + +var capls string + +// Can't be in init() because Caps will be registered with init in the future +// and init()s are executed by filename alphabetical order +func setupCapls() { + capls = "" + for k, v := range Caps { + capls += k + if v != "" { + capls += "=" + v + } + capls += " " + } + capls = strings.TrimSuffix(capls, " ") +} |