diff --git a/src/IRCChannel.py b/src/IRCChannel.py index f1fc939b..82f8468d 100644 --- a/src/IRCChannel.py +++ b/src/IRCChannel.py @@ -131,6 +131,9 @@ class Channel(IRCObject.Object): self.server.send_message(self.name, text, tags=tags) def send_notice(self, text: str, tags: dict={}): self.server.send_notice(self.name, text, tags=tags) + def send_tagmsg(self, tags: dict): + self.server.send_tagmsg(self.name, tags) + def send_mode(self, mode: str=None, target: typing.List[str]=None): self.server.send_mode(self.name, mode, target) def send_kick(self, target: str, reason: str=None): diff --git a/src/IRCServer.py b/src/IRCServer.py index 484a2892..07116484 100644 --- a/src/IRCServer.py +++ b/src/IRCServer.py @@ -326,7 +326,7 @@ class Server(IRCObject.Object): ) -> IRCLine.Line: return self.send(utils.irc.protocol.notice(target, message, tags)) - def send_tagmsg(self, target, tags: dict): + def send_tagmsg(self, target: str, tags: dict): return self.send(utils.irc.protocol.tagmsg(target, tags)) def send_mode(self, target: str, mode: str=None, args: typing.List[str]=None diff --git a/src/IRCUser.py b/src/IRCUser.py index e3d96485..c371bf5b 100644 --- a/src/IRCUser.py +++ b/src/IRCUser.py @@ -73,3 +73,5 @@ class User(IRCObject.Object): self.server.send_notice(self.nickname, text, tags=tags) def send_ctcp_response(self, command: str, args: str): self.send_notice("\x01%s %s\x01" % (command, args)) + def send_tagmsg(self, tags: dict): + self.server.send_tagmsg(self.nickname, tags)