From baa44302914d460d7aff031a54f041aac1532514 Mon Sep 17 00:00:00 2001 From: Valentin Lorentz Date: Thu, 11 Jul 2013 18:53:19 +0200 Subject: [PATCH] NickAuth: Fix traceback if user calling @list is not identified. --- plugins/NickAuth/plugin.py | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/plugins/NickAuth/plugin.py b/plugins/NickAuth/plugin.py index 82dee822a..bc45a4bf2 100644 --- a/plugins/NickAuth/plugin.py +++ b/plugins/NickAuth/plugin.py @@ -113,7 +113,11 @@ class NickAuth(callbacks.Plugin): defaults to the current network. """ network = network.network or irc.network - user = user or ircdb.users.getUser(msg.prefix) + try: + user = user or ircdb.users.getUser(msg.prefix) + except KeyError: + irc.error(_('You are not identified and is not given.'), + Raise=True) self._check_auth(irc, msg, user) try: list_ = user.nicks[network]