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): async def on_message(self, chan, source, msg):
if source != self.nickname: if source != self.nickname:
if msg == '!botlist': if msg == '!botlist':
await self.message(chan, 'dah helooooooo i am kim jong un, pingus me to have a nice conversation with llckthecheese') 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')
for i in self.raw:
await self.raw[i](self, chan,source,msg)
if msg[:len(self.prefix)] == self.prefix: if msg[:len(self.prefix)] == self.prefix:
msg = msg[len(self.prefix):] msg = msg[len(self.prefix):]
@ -47,6 +45,9 @@ class Oven(pydle.Client):
msg = msg[len(cmd)+1:] msg = msg[len(cmd)+1:]
if cmd in self.cmd: if cmd in self.cmd:
await self.cmd[cmd](self, chan, source, msg) 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): async def is_admin(self, nickname):
admin = False admin = False

View file

@ -69,7 +69,7 @@ async def adminHandle(self, chan, source, msg):
async def init(self): async def init(self):
self.cmd['admin'] = adminHandle 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'] = ['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'] 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'] end = self.db['end']
pre = '' pre = ''
words = m.split(' ') words = m.split(' ')
if words[0] == 'admin':
return
for w in words: for w in words:
if pre == '': if pre == '':
beg.insert(dict(word=w)) beg.insert(dict(word=w))
@ -46,6 +48,8 @@ async def filter(self, c, n, m):
m = m[5:] m = m[5:]
await rec(self, m) await rec(self, m)
words = m.split(' ') words = m.split(' ')
if words[0] == 'admin':
return
await self.message(c, ' '.join(await genOut(self, await getNoun(self, words)))) await self.message(c, ' '.join(await genOut(self, await getNoun(self, words))))
async def init(self): async def init(self):