diff --git a/bot.py b/bot.py index 8d8a201..9b70a2d 100755 --- a/bot.py +++ b/bot.py @@ -35,12 +35,15 @@ class Oven(pydle.Client): self.modules[i] = m async def on_invite(self, channel, by): - print('{} invited me to {}!'.format(by, channel)) - self.t = time.time()+1 - await self.join(channel) + modules['invite'].invite(self, channel, by) + # print('{} invited me to {}!'.format(by, channel)) + # self.t = time.time()+1 + # await self.join(channel) async def on_message(self, chan, source, msg): + if chan == self.nickname: + chan = source if source != self.nickname: diff --git a/modules/__pycache__/nlp.cpython-36.pyc b/modules/__pycache__/nlp.cpython-36.pyc index b5b0423..03f54f5 100644 Binary files a/modules/__pycache__/nlp.cpython-36.pyc and b/modules/__pycache__/nlp.cpython-36.pyc differ diff --git a/modules/invite.py b/modules/invite.py new file mode 100644 index 0000000..6163653 --- /dev/null +++ b/modules/invite.py @@ -0,0 +1,14 @@ +async def invite(self, channel, by): + if self.db['invite'].find_one(enabled='true'): + if self.db['invite'].find_one(blacklist=channel): + print('{} invited me to {}, a blacklisted channel'.format(by,channel)) + return + print('{} invited me to {}!'.format(by, channel)) + self.t = time.time()+1 + await self.join(channel) + + + +async def init(self): + pass + diff --git a/sizelog b/sizelog new file mode 100644 index 0000000..6c14391 --- /dev/null +++ b/sizelog @@ -0,0 +1,55 @@ +2172 +2172 +2332 +2528 +2732 +2956 +3192 +3416 +3640 +3848 +4080 +4132 +4172 +4200 +4208 +4240 +4248 +4252 +4256 +4260 +4264 +4276 +4296 +4324 +4384 +4420 +4460 +4496 +4528 +4544 +4544 +4556 +4604 +4696 +4732 +4744 +4776 +4776 +4776 +4776 +4784 +4792 +4800 +4816 +4824 +4844 +4880 +4896 +4928 +4972 +4996 +5072 +5108 +5144 +5204