We should look at ISUPPORT's STATUSMSG token instead of PREFIX
This commit is contained in:
parent
16b9361371
commit
d4ba98307f
3 changed files with 4 additions and 1 deletions
|
@ -53,6 +53,8 @@ def handle_005(events, event):
|
||||||
event["server"].channel_types = list(isupport["CHANTYPES"])
|
event["server"].channel_types = list(isupport["CHANTYPES"])
|
||||||
if "CASEMAPPING" in isupport:
|
if "CASEMAPPING" in isupport:
|
||||||
event["server"].case_mapping = isupport["CASEMAPPING"]
|
event["server"].case_mapping = isupport["CASEMAPPING"]
|
||||||
|
if "STATUSMSG" in isupport:
|
||||||
|
event["server"].statusmsg = list(isupport["STATUSMSG"])
|
||||||
|
|
||||||
events.on("received.005").call(isupport=isupport,
|
events.on("received.005").call(isupport=isupport,
|
||||||
server=event["server"])
|
server=event["server"])
|
||||||
|
|
|
@ -46,7 +46,7 @@ def message(events, event):
|
||||||
# strip prefix_symbols from the start of target, for when people use
|
# strip prefix_symbols from the start of target, for when people use
|
||||||
# e.g. 'PRIVMSG +#channel :hi' which would send a message to only
|
# e.g. 'PRIVMSG +#channel :hi' which would send a message to only
|
||||||
# voiced-or-above users
|
# voiced-or-above users
|
||||||
target = target_str.lstrip("".join(event["server"].prefix_symbols.keys()))
|
target = target_str.lstrip("".join(event["server"].statusmsg))
|
||||||
|
|
||||||
is_channel = False
|
is_channel = False
|
||||||
|
|
||||||
|
|
|
@ -58,6 +58,7 @@ class Server(IRCObject.Object):
|
||||||
|
|
||||||
self.channel_types = ["#"]
|
self.channel_types = ["#"]
|
||||||
self.case_mapping = "rfc1459"
|
self.case_mapping = "rfc1459"
|
||||||
|
self.statusmsg = []
|
||||||
|
|
||||||
self.motd_lines = [] # type: typing.List[str]
|
self.motd_lines = [] # type: typing.List[str]
|
||||||
self.motd_done = False
|
self.motd_done = False
|
||||||
|
|
Loading…
Add table
Reference in a new issue