From 8c71f7bae070ef85e5b9fb1ef6f2d93b8d237ed7 Mon Sep 17 00:00:00 2001 From: Mallory Hancock Date: Mon, 14 Oct 2019 12:57:38 -0700 Subject: [PATCH] fix for internal commands --- pinhook/__version__.py | 2 +- pinhook/bot.py | 5 ++++- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/pinhook/__version__.py b/pinhook/__version__.py index 35424e8..4175d39 100644 --- a/pinhook/__version__.py +++ b/pinhook/__version__.py @@ -1 +1 @@ -__version__ = '1.9.1' +__version__ = '1.9.2' diff --git a/pinhook/bot.py b/pinhook/bot.py index 4dce658..f8c4a0c 100644 --- a/pinhook/bot.py +++ b/pinhook/bot.py @@ -127,12 +127,15 @@ class Bot(irc.bot.SingleServerIRCBot): return None def call_internal_commands(self, channel, nick, cmd, text, arg, c): + if not cmd.startswith(self.cmd_prefix): + return None + else: + cmd = cmd[len(self.cmd_prefix):] output = None if nick in self.ops: op = True else: op = False - cmd = cmd.lstrip(self.cmd_prefix) if cmd == 'join' and op: try: c.join(*arg.split())