Switch to using Capability.copy() for sasl
This commit is contained in:
parent
c60094ea92
commit
4806e9c81e
1 changed files with 3 additions and 1 deletions
|
@ -2,6 +2,8 @@ import base64, hashlib, hmac, uuid
|
||||||
from src import ModuleManager, utils
|
from src import ModuleManager, utils
|
||||||
from . import scram
|
from . import scram
|
||||||
|
|
||||||
|
CAP = utils.irc.Capability("sasl")
|
||||||
|
|
||||||
USERPASS_MECHANISMS = [
|
USERPASS_MECHANISMS = [
|
||||||
"SCRAM-SHA-512",
|
"SCRAM-SHA-512",
|
||||||
"SCRAM-SHA-256",
|
"SCRAM-SHA-256",
|
||||||
|
@ -41,7 +43,7 @@ class Module(ModuleManager.BaseModule):
|
||||||
do_sasl = True
|
do_sasl = True
|
||||||
|
|
||||||
if do_sasl:
|
if do_sasl:
|
||||||
cap = utils.irc.Capability("sasl")
|
cap = CAP.copy()
|
||||||
cap.on_ack(lambda: self._sasl_ack(event["server"]))
|
cap.on_ack(lambda: self._sasl_ack(event["server"]))
|
||||||
return cap
|
return cap
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue