passthru nick

This commit is contained in:
cynic 2024-07-12 00:40:55 -04:00
parent 4caa4e9258
commit 4577c31e76
2 changed files with 5 additions and 2 deletions

View File

@ -5,5 +5,6 @@
"irc_serb": "irc.rizon.net", "irc_serb": "irc.rizon.net",
"irc_port": 7000, "irc_port": 7000,
"irc_nick": "birdbridge", "irc_nick": "birdbridge",
"irc_chan": "#birdchat" "irc_chan": "#birdchat",
"passthru_nick": "messages sent from this IRC nick are not prefixed by <nick>"
} }

View File

@ -28,7 +28,9 @@ class bird_inst():
message.manual(":"+msg.parameters[0], "PRIVMSG", [msg.prefix[1:].split("!")[0], ":\x01dorfl bot\x01"]).send(ctx.socket) 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): if msg.command == "PRIVMSG" and ("py-ctcp" not in msg.prefix):
pm = privmsg.parse(msg) 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() threading.Thread(target=self.irc.run, kwargs={"event_handler": irc_handler}, daemon=True).start()
def auth(self, name, passwd): def auth(self, name, passwd):
h = { h = {