beep boop some bugs

This commit is contained in:
lickthecheese 2020-04-22 22:14:17 -04:00
parent e17c76a8be
commit 30a6f9e1fa
4 changed files with 9 additions and 4 deletions

7
bot.py
View file

@ -37,9 +37,7 @@ class Oven(pydle.Client):
async def on_message(self, chan, source, msg):
if source != self.nickname:
if msg == '!botlist':
await self.message(chan, 'dah helooooooo i am kim jong un, pingus me to have a nice conversation with llckthecheese')
for i in self.raw:
await self.raw[i](self, chan,source,msg)
await self.message(chan, 'dah helooooooo i am kim jong un, pingus me to have a nice conversation with llckthecheese btw my source is just a different branch of oven\'s github repo')
if msg[:len(self.prefix)] == self.prefix:
msg = msg[len(self.prefix):]
@ -47,6 +45,9 @@ class Oven(pydle.Client):
msg = msg[len(cmd)+1:]
if cmd in self.cmd:
await self.cmd[cmd](self, chan, source, msg)
for i in self.raw:
await self.raw[i](self, chan,source,msg)
async def is_admin(self, nickname):
admin = False

View file

@ -69,7 +69,7 @@ async def adminHandle(self, chan, source, msg):
async def init(self):
self.cmd['admin'] = adminHandle
self.joins = ["#chaos", "#lickthecheese", "#windowsloser", "#cminecraft", "#team", "#meta", "#rscmakerspace", "#archlinux", "#tildetel", "#one", "#starlanes"]
self.joins = ["#chaos", "#lickthecheese", "#windowsloser", "#cminecraft", "#team", "#meta", "#rscmakerspace", "#archlinux", "#tildetel", "#one", "#starlanes", "#ipd", "#pinebox"]
self.help['admin'] = ['admin - various bot owner commands (more for subcommands)', 'sub-commands of admin, for more info do help admin <command>: quit reload commit part join joins eval send']
self.help['admin quit'] = ['admin quit <message> - make the bot disconnect','no']

View file

@ -9,6 +9,8 @@ async def rec(self, m):
end = self.db['end']
pre = ''
words = m.split(' ')
if words[0] == 'admin':
return
for w in words:
if pre == '':
beg.insert(dict(word=w))
@ -46,6 +48,8 @@ async def filter(self, c, n, m):
m = m[5:]
await rec(self, m)
words = m.split(' ')
if words[0] == 'admin':
return
await self.message(c, ' '.join(await genOut(self, await getNoun(self, words))))
async def init(self):