'src/IRCServer.capabilities' -> 'src/IRCServer.agreed_capabilities'
This commit is contained in:
parent
3e4f3532a1
commit
716568c21d
3 changed files with 9 additions and 9 deletions
|
@ -113,7 +113,7 @@ class Module(ModuleManager.BaseModule):
|
|||
event["server"].isupport.update(isupport)
|
||||
|
||||
if "NAMESX" in isupport and not "multi-prefix" in event[
|
||||
"server"].capabilities:
|
||||
"server"].agreed_capabilities:
|
||||
event["server"].send("PROTOCTL NAMESX")
|
||||
|
||||
if "PREFIX" in isupport:
|
||||
|
@ -198,7 +198,7 @@ class Module(ModuleManager.BaseModule):
|
|||
modes.add(event["server"].prefix_symbols[nickname[0]])
|
||||
nickname = nickname[1:]
|
||||
|
||||
if "userhost-in-names" in event["server"].capabilities:
|
||||
if "userhost-in-names" in event["server"].agreed_capabilities:
|
||||
hostmask = utils.irc.seperate_hostmask(nickname)
|
||||
nickname = hostmask.nickname
|
||||
user = event["server"].get_user(hostmask.nickname)
|
||||
|
@ -356,13 +356,13 @@ class Module(ModuleManager.BaseModule):
|
|||
event["server"].send_capability_queue()
|
||||
elif subcommand == "del":
|
||||
for capability in capabilities.keys():
|
||||
event["server"].capabilities.discard(capability)
|
||||
event["server"].agreed_capabilities.discard(capability)
|
||||
del event["server"].server_capabilities[capability]
|
||||
|
||||
self._event(event, "cap.del", server=event["server"],
|
||||
capabilities=capabilities)
|
||||
elif subcommand == "ack":
|
||||
event["server"].capabilities.update(capabilities)
|
||||
event["server"].agreed_capabilities.update(capabilities)
|
||||
self._event(event, "cap.ack", capabilities=capabilities,
|
||||
server=event["server"])
|
||||
|
||||
|
@ -452,7 +452,7 @@ class Module(ModuleManager.BaseModule):
|
|||
def privmsg(self, event):
|
||||
if event["direction"] == Direction.SEND:
|
||||
from_self = True
|
||||
if "echo-message" in event["server"].capabilities:
|
||||
if "echo-message" in event["server"].agreed_capabilities:
|
||||
return
|
||||
else:
|
||||
if event["prefix"]:
|
||||
|
@ -530,7 +530,7 @@ class Module(ModuleManager.BaseModule):
|
|||
def notice(self, event):
|
||||
if event["direction"] == Direction.SEND:
|
||||
from_self = True
|
||||
if "echo-message" in event["server"].capabilities:
|
||||
if "echo-message" in event["server"].agreed_capabilities:
|
||||
return
|
||||
else:
|
||||
if event["prefix"]:
|
||||
|
|
|
@ -62,7 +62,7 @@ class Module(ModuleManager.BaseModule):
|
|||
"channels": {
|
||||
c.name: self._channel_stats(c) for c in server.channels
|
||||
},
|
||||
"capabilities": list(server.capabilities)
|
||||
"capabilities": list(server.agreed_capabilities)
|
||||
}
|
||||
|
||||
@utils.hook("api.get.servers")
|
||||
|
@ -125,4 +125,4 @@ class Module(ModuleManager.BaseModule):
|
|||
:help: List negotiated IRCv3 capabilities
|
||||
"""
|
||||
event["stdout"].write("IRCv3 capabilities: %s" %
|
||||
", ".join(event["server"].capabilities))
|
||||
", ".join(event["server"].agreed_capabilities))
|
||||
|
|
|
@ -27,7 +27,7 @@ class Server(IRCObject.Object):
|
|||
|
||||
self._capability_queue = set([]) # type: typing.Set[str]
|
||||
self._capabilities_waiting = set([]) # type: typing.Set[str]
|
||||
self.capabilities = set([]) # type: typing.Set[str]
|
||||
self.agreed_capabilities = set([]) # type: typing.Set[str]
|
||||
self.requested_capabilities = [] # type: typing.List[str]
|
||||
self.server_capabilities = {} # type: typing.Dict[str, str]
|
||||
self.batches = {} # type: typing.Dict[str, utils.irc.IRCParsedLine]
|
||||
|
|
Loading…
Reference in a new issue