From 463ce89fba3dd8d2334337de817ce0d8989360a1 Mon Sep 17 00:00:00 2001 From: jesopo Date: Wed, 22 Jan 2020 15:00:43 +0000 Subject: effectively ignore ENDOF when there were no items --- modules/channel_op.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'modules') diff --git a/modules/channel_op.py b/modules/channel_op.py index c79f67b4..1e0f28ea 100644 --- a/modules/channel_op.py +++ b/modules/channel_op.py @@ -432,7 +432,8 @@ class Module(ModuleManager.BaseModule): if target in server.channels: channel = server.channels.get(target) temp_key = "~%s" % mode - channel.mode_lists[mode] = channel.mode_lists.pop(temp_key, []) + if temp_key in channel.mode_lists: + channel.mode_lists[mode] = channel.mode_lists.pop(temp_key) @utils.hook("received.mode.channel") def channel_mode_lists(self, event): -- cgit v1.3.1-10-gc9f91