aboutsummaryrefslogtreecommitdiff
path: root/modules
diff options
context:
space:
mode:
authorGravatar jesopo2020-01-22 15:00:43 +0000
committerGravatar jesopo2020-01-22 15:00:43 +0000
commit463ce89fba3dd8d2334337de817ce0d8989360a1 (patch)
tree1b9d0dc475145792aa8d9742bff958429f8511e5 /modules
parentadd a special "require_mode" arg; "highest" meaning "highest mode possible" (diff)
signature
effectively ignore ENDOF when there were no items
Diffstat (limited to 'modules')
-rw-r--r--modules/channel_op.py3
1 files changed, 2 insertions, 1 deletions
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):