From 4577c31e76803a15740109e60385496f36a8f380 Mon Sep 17 00:00:00 2001 From: cynic Date: Fri, 12 Jul 2024 00:40:55 -0400 Subject: [PATCH] passthru nick --- config.json | 3 ++- main.py | 4 +++- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/config.json b/config.json index 686d929..c91a4eb 100644 --- a/config.json +++ b/config.json @@ -5,5 +5,6 @@ "irc_serb": "irc.rizon.net", "irc_port": 7000, "irc_nick": "birdbridge", - "irc_chan": "#birdchat" + "irc_chan": "#birdchat", + "passthru_nick": "messages sent from this IRC nick are not prefixed by " } \ No newline at end of file diff --git a/main.py b/main.py index 9cf038a..640dcc1 100644 --- a/main.py +++ b/main.py @@ -28,7 +28,9 @@ class bird_inst(): message.manual(":"+msg.parameters[0], "PRIVMSG", [msg.prefix[1:].split("!")[0], ":\x01dorfl bot\x01"]).send(ctx.socket) if msg.command == "PRIVMSG" and ("py-ctcp" not in msg.prefix): pm = privmsg.parse(msg) - self.send_post("<"+pm.fr.split("!")[0]+"> "+pm.bod) + post = pm.bod + if pm.fr.split("!")[0] != self.config["passthru_nick"]: post = "<"+pm.fr.split("!")[0]+"> " + post + self.send_post(post) threading.Thread(target=self.irc.run, kwargs={"event_handler": irc_handler}, daemon=True).start() def auth(self, name, passwd): h = {