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])
|
channel = event["server"].get_channel(event["args"][0])
|
||||||
self.events.on("received").on("message").on("channel").call(
|
self.events.on("received").on("message").on("channel").call(
|
||||||
user=user, message=message, message_split=message_split,
|
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)
|
channel.buffer.add_line(user.nickname, message, action)
|
||||||
elif event["server"].is_own_nickname(target):
|
elif event["server"].is_own_nickname(target):
|
||||||
self.events.on("received").on("message").on("private").call(
|
self.events.on("received").on("message").on("private").call(
|
||||||
user=user, message=message, message_split=message_split,
|
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)
|
user.buffer.add_line(user.nickname, message, action)
|
||||||
|
|
||||||
# we've received a notice
|
# we've received a notice
|
||||||
|
@ -396,12 +397,13 @@ class LineHandler(object):
|
||||||
if target[0] in event["server"].channel_types:
|
if target[0] in event["server"].channel_types:
|
||||||
channel = event["server"].get_channel(target)
|
channel = event["server"].get_channel(target)
|
||||||
self.events.on("received.notice.channel").call(
|
self.events.on("received.notice.channel").call(
|
||||||
message=message, message_split=message_split,
|
message=message, message_split=message_split, user=user,
|
||||||
user=user, server=event["server"], channel=channel)
|
server=event["server"], channel=channel,
|
||||||
|
tags=event["tags"])
|
||||||
elif event["server"].is_own_nickname(target):
|
elif event["server"].is_own_nickname(target):
|
||||||
self.events.on("received.notice.private").call(
|
self.events.on("received.notice.private").call(
|
||||||
message=message, message_split=message_split,
|
message=message, message_split=message_split, user=user,
|
||||||
user=user, server=event["server"])
|
server=event["server"], tags=event["tags"])
|
||||||
|
|
||||||
# IRCv3 TAGMSG, used to send tags without any other information
|
# IRCv3 TAGMSG, used to send tags without any other information
|
||||||
def tagmsg(self, event):
|
def tagmsg(self, event):
|
||||||
|
|
|
@ -110,7 +110,7 @@ class Module(object):
|
||||||
|
|
||||||
returns = self.events.on("preprocess").on("command"
|
returns = self.events.on("preprocess").on("command"
|
||||||
).call(hook=hook, user=event["user"], server=event["server"],
|
).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:
|
for returned in returns:
|
||||||
if returned:
|
if returned:
|
||||||
stderr.write(returned).send()
|
stderr.write(returned).send()
|
||||||
|
@ -133,7 +133,8 @@ class Module(object):
|
||||||
).call_limited(1, user=user, server=server,
|
).call_limited(1, user=user, server=server,
|
||||||
target=target, buffer=buffer, args=args,
|
target=target, buffer=buffer, args=args,
|
||||||
args_split=args_split, stdout=stdout, stderr=stderr,
|
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):
|
if not hook.kwargs.get("skip_out", False):
|
||||||
stdout.send()
|
stdout.send()
|
||||||
stderr.send()
|
stderr.send()
|
||||||
|
|
Loading…
Reference in a new issue