don't re-relay bridge messages
This commit is contained in:
parent
b1ece3e877
commit
1d5832e97b
3
main.py
3
main.py
|
@ -49,7 +49,8 @@ class bird_inst():
|
||||||
except Exception as e: print("hey buddy your shits fucked thought you might want to know", e)
|
except Exception as e: print("hey buddy your shits fucked thought you might want to know", e)
|
||||||
def handle_message(self, ctx):
|
def handle_message(self, ctx):
|
||||||
print("btw i just got this", ctx["data"]["message"])
|
print("btw i just got this", ctx["data"]["message"])
|
||||||
mesg = ctx["data"]["message"]
|
if ctx["name"] == self.config["deek_user"]: return
|
||||||
|
mesg = ctx["data"]["message"].replace("\n", " ")
|
||||||
chunks = list(mesg[0+i:400+i] for i in range(0, len(mesg), 400))
|
chunks = list(mesg[0+i:400+i] for i in range(0, len(mesg), 400))
|
||||||
for m in chunks:
|
for m in chunks:
|
||||||
self.irc.sendraw(privmsg.build(self.config["irc_nick"], self.config["irc_chan"], ctx["name"]+": "+m).msg)
|
self.irc.sendraw(privmsg.build(self.config["irc_nick"], self.config["irc_chan"], ctx["name"]+": "+m).msg)
|
||||||
|
|
Loading…
Reference in New Issue