rj1
about | log | files | refs | license
commit b9bbee7e7f3edb2afe11f51eebcc9ebdd44eb7c8
author: rj1 <[email protected]>
date:   Thu, 28 Apr 2022 17:21:00 -0500

basic relay functionality

Diffstat:
Arelay.py | 14++++++++++++++
1 file changed, 14 insertions(+), 0 deletions(-)

diff --git a/relay.py b/relay.py @@ -0,0 +1,14 @@ +import znc +import json + +class relay(znc.Module): + + description = "oneway relay" + module_types = [znc.CModInfo.UserModule] + + def OnChanMsg(self, nick, channel, message): + if str(channel.GetName()).lower() == "#source": + network = self.GetUser().FindNetwork("target-network") + network.PutIRC(f"PRIVMSG #target-channel :<{str(nick)}> {str(message)}") + return znc.CONTINUE +