Switch to using Capability.copy() for sasl

This commit is contained in:
jesopo 2019-05-19 11:13:37 +01:00
parent c60094ea92
commit 4806e9c81e

View file

@ -2,6 +2,8 @@ import base64, hashlib, hmac, uuid
from src import ModuleManager, utils
from . import scram
CAP = utils.irc.Capability("sasl")
USERPASS_MECHANISMS = [
"SCRAM-SHA-512",
"SCRAM-SHA-256",
@ -41,7 +43,7 @@ class Module(ModuleManager.BaseModule):
do_sasl = True
if do_sasl:
cap = utils.irc.Capability("sasl")
cap = CAP.copy()
cap.on_ack(lambda: self._sasl_ack(event["server"]))
return cap