diff --git a/bot.py b/bot.py index 76734bf..36e3277 100755 --- a/bot.py +++ b/bot.py @@ -38,8 +38,9 @@ class Oven(pydle.Client): for i in self.raw: await self.raw[i](self, chan,source,msg) if msg[:len(self.prefix)] == self.prefix: + msg = msg[len(self.prefix):] cmd = msg.split(' ')[0] - msg = msg[len(cmd):] + msg = msg[len(cmd)+1:] if cmd in self.cmd: await self.cmd[cmd](self, chan, source, msg) async def is_admin(self, nickname): diff --git a/modules/__pycache__/admin.cpython-36.pyc b/modules/__pycache__/admin.cpython-36.pyc new file mode 100644 index 0000000..6b5b44e Binary files /dev/null and b/modules/__pycache__/admin.cpython-36.pyc differ diff --git a/modules/admin.py b/modules/admin.py new file mode 100644 index 0000000..babdfa1 --- /dev/null +++ b/modules/admin.py @@ -0,0 +1,8 @@ + + +async def adminHandle(self, chan, source, msg): + await self.message(chan, msg) + + +async def init(self): + self.cmd['admin'] = adminHandle