Make use of Capability.copy() in resume.py
This commit is contained in:
parent
58d6b16744
commit
046bb2b8ae
1 changed files with 2 additions and 2 deletions
|
@ -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
|
||||
|
||||
|
|
Loading…
Reference in a new issue