From 5b0faad2f9886432303590eb77fc55941c485bb1 Mon Sep 17 00:00:00 2001 From: nyuszika7h Date: Sat, 25 Feb 2012 20:56:44 +0800 Subject: [PATCH] Misc: Handle KeyError in 'completenick'. Closes GH-315. --- plugins/Misc/plugin.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/plugins/Misc/plugin.py b/plugins/Misc/plugin.py index d53cf876e..2a6ee74c2 100644 --- a/plugins/Misc/plugin.py +++ b/plugins/Misc/plugin.py @@ -515,6 +515,8 @@ class Misc(callbacks.Plugin): Returns the nick of someone on the channel whose nick begins with the given . defaults to the current channel.""" + if channel not in irc.state.channels: + irc.error(_('I\'m not even in %s.') % channel, Raise=True) if ('match-case', True) in optlist: def match(nick): return nick.startswith(beginning)