From facd9d69cb03f26d03dfcc7a1d7abd56ab44c5f4 Mon Sep 17 00:00:00 2001 From: jesopo Date: Fri, 27 Jan 2017 21:39:07 +0000 Subject: [PATCH] Fix an issue in MODE handling --- IRCLineHandler.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/IRCLineHandler.py b/IRCLineHandler.py index 61b2d551..602b39b0 100644 --- a/IRCLineHandler.py +++ b/IRCLineHandler.py @@ -212,13 +212,13 @@ def handle_MODE(): channel.remove_mode(char) else: channel.add_mode(char) - elif char in server.mode_prefixes.values(): + elif char in server.mode_prefixes.values() and len(args): nickname = args.pop(0) if remove: channel.remove_mode(char, nickname) else: channel.add_mode(char, nickname) - else: + elif len(args): args.pop(0) bot.events.on("received").on("mode").call( line=line, line_split=line_split, server=server, modes=modes,