From 20e6a13d80db5e494502bd946280248c22113b1d Mon Sep 17 00:00:00 2001 From: decoded Date: Sun, 7 Mar 2021 00:57:55 -0600 Subject: [PATCH] bok --- plugins/krylon.py | 79 ++++++++++++++++++++++++++++++++++++++++++++++- 1 file changed, 78 insertions(+), 1 deletion(-) diff --git a/plugins/krylon.py b/plugins/krylon.py index e7e27aa..bc172c6 100644 --- a/plugins/krylon.py +++ b/plugins/krylon.py @@ -45,6 +45,71 @@ class Plugin(object): symbol = random.choice(list(open(symbol_db))) return symbol + def __bok(self): + MSG="" + for i in range(random.randint(1,25)): + for _ in "bok": + for __ in range(random.randint(1,10)): + ___ = random.randint(1,2) + if ___ == 1: + MSG+="b" + else: + MSG+="B" + for __ in range(random.randint(1,10)): + ___ = random.randint(1,2) + if ___ == 1: + MSG+="o" + else: + MSG+="O" + for __ in range(random.randint(1,10)): + ___ = random.randint(1,2) + if ___ == 1: + MSG+="k" + else: + MSG+="K" + __ = random.randint(1,2) + if __ == 1: + MSG+="" + else: + MSG+=" " + __ = random.randint(1,2) + for __ in "bu": + ___ = random.randint(1,2) + if ___ == 1: + MSG+=__.upper()*random.randint(1,7) + else: + MSG+=__.lower()*random.randint(1,7) + if __ == 1: + MSG+="" + else: + MSG+=" " + __ = random.randint(1,2) + if __ == 1: + MSG+="bok"*randint(0,3) + else: + MSG+="BOK"*randint(0,3) + __ = random.randint(1,2) + if __ == 1: + MSG+="" + else: + MSG+=" " + for __ in "gock": + ___ = random.randint(1,2) + if ___ == 1: + MSG+=__.upper()*random.randint(1,7) + else: + MSG+=__.lower()*random.randint(1,7) + __ = random.randint(1,2) + if __ == 1: + MSG+="" + else: + MSG+=" " + __ = random.randint(1,2) + if __ == 1: + MSG+="gok"*randint(0,3) + else: + MSG+="GOK"*randint(0,3) + def krylon(self): if self.init == 0: KRYLON_FILE.reverse() @@ -69,12 +134,24 @@ class Plugin(object): if BOT.config['botnet'][_].nick == BOT.nick: BID= _ MSG='{}: {} {} < {}'.format(NICK,SYMBOL,GREET,BID) - CHN='#sh0rtbus' + CHN=self.channel MSG = self._Plugin__emoj(MSG) BOT.privmsg(CHN,MSG) if len(ONLINE_BOTS) == len(self.context.config.botnet): self.krylon() + @irc3.event(irc3.rfc.PRIVMSG) + def on_privmsg(self, mask=None, data=None, **kw): + BOT=self.context + if "bok" in data.lower(): + WHO = mask.nick + SYM = self._Plugin__symbol() + BOK = self._Plugin__bok() + CHN = self.channel + MSG='{}: {} {}'.format(WHO,SYM,BOK) + MSG = self._Plugin__emoj(MSG) + BOT.privmsg(CHN,MSG) + @irc3.event(irc3.rfc.CONNECTED) def connected(self, **kw): for _ in [x for x in self.context.config.botnet]: