Send message-tags through PRIVMSG, NOTICE and !commands
This commit is contained in:
parent
5963308bdc
commit
ad775239b2
2 changed files with 11 additions and 8 deletions
|
@ -372,12 +372,13 @@ class LineHandler(object):
|
|||
channel = event["server"].get_channel(event["args"][0])
|
||||
self.events.on("received").on("message").on("channel").call(
|
||||
user=user, message=message, message_split=message_split,
|
||||
channel=channel, action=action, server=event["server"])
|
||||
channel=channel, action=action, server=event["server"],
|
||||
tags=event["tags"])
|
||||
channel.buffer.add_line(user.nickname, message, action)
|
||||
elif event["server"].is_own_nickname(target):
|
||||
self.events.on("received").on("message").on("private").call(
|
||||
user=user, message=message, message_split=message_split,
|
||||
action=action, server=event["server"])
|
||||
action=action, server=event["server"], tags=event["tags"])
|
||||
user.buffer.add_line(user.nickname, message, action)
|
||||
|
||||
# we've received a notice
|
||||
|
@ -396,12 +397,13 @@ class LineHandler(object):
|
|||
if target[0] in event["server"].channel_types:
|
||||
channel = event["server"].get_channel(target)
|
||||
self.events.on("received.notice.channel").call(
|
||||
message=message, message_split=message_split,
|
||||
user=user, server=event["server"], channel=channel)
|
||||
message=message, message_split=message_split, user=user,
|
||||
server=event["server"], channel=channel,
|
||||
tags=event["tags"])
|
||||
elif event["server"].is_own_nickname(target):
|
||||
self.events.on("received.notice.private").call(
|
||||
message=message, message_split=message_split,
|
||||
user=user, server=event["server"])
|
||||
message=message, message_split=message_split, user=user,
|
||||
server=event["server"], tags=event["tags"])
|
||||
|
||||
# IRCv3 TAGMSG, used to send tags without any other information
|
||||
def tagmsg(self, event):
|
||||
|
|
|
@ -110,7 +110,7 @@ class Module(object):
|
|||
|
||||
returns = self.events.on("preprocess").on("command"
|
||||
).call(hook=hook, user=event["user"], server=event["server"],
|
||||
target=target, is_channel=is_channel)
|
||||
target=target, is_channel=is_channel, tags=event["tags"])
|
||||
for returned in returns:
|
||||
if returned:
|
||||
stderr.write(returned).send()
|
||||
|
@ -133,7 +133,8 @@ class Module(object):
|
|||
).call_limited(1, user=user, server=server,
|
||||
target=target, buffer=buffer, args=args,
|
||||
args_split=args_split, stdout=stdout, stderr=stderr,
|
||||
command=command.lower(), is_channel=is_channel)
|
||||
command=command.lower(), is_channel=is_channel,
|
||||
tags=event["tags"])
|
||||
if not hook.kwargs.get("skip_out", False):
|
||||
stdout.send()
|
||||
stderr.send()
|
||||
|
|
Loading…
Reference in a new issue