We should look at ISUPPORT's STATUSMSG token instead of PREFIX

This commit is contained in:
jesopo 2019-06-08 10:59:14 +01:00
parent 16b9361371
commit d4ba98307f
3 changed files with 4 additions and 1 deletions

View file

@ -53,6 +53,8 @@ def handle_005(events, event):
event["server"].channel_types = list(isupport["CHANTYPES"])
if "CASEMAPPING" in isupport:
event["server"].case_mapping = isupport["CASEMAPPING"]
if "STATUSMSG" in isupport:
event["server"].statusmsg = list(isupport["STATUSMSG"])
events.on("received.005").call(isupport=isupport,
server=event["server"])

View file

@ -46,7 +46,7 @@ def message(events, event):
# strip prefix_symbols from the start of target, for when people use
# e.g. 'PRIVMSG +#channel :hi' which would send a message to only
# 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

View file

@ -58,6 +58,7 @@ class Server(IRCObject.Object):
self.channel_types = ["#"]
self.case_mapping = "rfc1459"
self.statusmsg = []
self.motd_lines = [] # type: typing.List[str]
self.motd_done = False