log admin command execution

This commit is contained in:
lickthecheese 2020-04-05 19:52:31 -04:00
parent 7beae06735
commit 2c56c7dde4
3 changed files with 9 additions and 2 deletions

2
bot.py
View file

@ -61,5 +61,5 @@ if __name__ == "__main__":
client.chansjoin = ['#bots']
client.admins = ['lickthecheese']
client.prefix = 'ov '
client.run('irc.tilde.chat', tls=True, tls_verify=False)
client.run('team.tilde.chat', tls=True, tls_verify=False)

View file

@ -2,9 +2,14 @@
import importlib
async def commit(self, chan, source, msg):
await self.quit('{} told me to commit {}'.format(source,msg))
async def quit(self, chan, source, msg):
await self.quit('{} told me to {}'.format(source,msg))
async def reloadmods(self, chan, source, msg):
await self.message(chan, 'reloading modules...')
self.cmd = {}
@ -19,7 +24,8 @@ async def reloadmods(self, chan, source, msg):
commands = {
'quit': quit,
'reload': reloadmods
'reload': reloadmods,
'commit': commit
}
async def adminHandle(self, chan, source, msg):
@ -28,6 +34,7 @@ async def adminHandle(self, chan, source, msg):
if len(msg) < 1 or not msg[0] in commands:
await self.message(chan, 'you press the wrong button on the oven and it burns you')
return
print('[ADMIN MODULE] {} told me to {}!!!'.format(source,msg[0]))
await commands[msg.pop(0)](self, chan, source, ' '.join(msg))
else:
await self.message(chan, 'you try to open it, but the oven is locked')