Make use of Capability.copy() in resume.py

This commit is contained in:
jesopo 2019-05-19 11:01:44 +01:00
parent 58d6b16744
commit 046bb2b8ae

View file

@ -1,6 +1,6 @@
from src import ModuleManager, utils
CAP = "draft/resume-0.4"
CAP = utils.irc.Capability(None, "draft/resume-0.4")
class Module(ModuleManager.BaseModule):
def _setting(self, new):
@ -23,7 +23,7 @@ class Module(ModuleManager.BaseModule):
@utils.hook("received.cap.ls")
def on_cap_ls(self, event):
if CAP in event["capabilities"]:
cap = utils.irc.Capability(None, CAP)
cap = CAP.copy()
cap.on_ack(lambda: self._cap_ack(event["server"]))
return cap