From 66782d47d8cd4b2e8561071d73d9fb41fefc454b Mon Sep 17 00:00:00 2001 From: Valentin Lorentz Date: Fri, 29 Jul 2016 01:29:12 +0200 Subject: [PATCH] GPG: Improve error messages. --- plugins/GPG/plugin.py | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/plugins/GPG/plugin.py b/plugins/GPG/plugin.py index 5d05e9924..3094cbb1b 100644 --- a/plugins/GPG/plugin.py +++ b/plugins/GPG/plugin.py @@ -74,6 +74,7 @@ def check_gpg_available(f): class GPG(callbacks.Plugin): """Provides authentication based on GPG keys.""" class key(callbacks.Commands): + @check_gpg_available def add(self, irc, msg, args, user, keyid, keyserver): """ @@ -99,6 +100,7 @@ class GPG(callbacks.Plugin): ('somethingWithoutSpaces', _('You must give a valid key server'))]) + @check_gpg_available def remove(self, irc, msg, args, user, fingerprint): """ @@ -119,6 +121,7 @@ class GPG(callbacks.Plugin): irc.error(_('GPG key not associated with your account.')) remove = wrap(remove, ['user', 'somethingWithoutSpaces']) + @check_gpg_available def list(self, irc, msg, args, user): """takes no arguments @@ -140,6 +143,7 @@ class GPG(callbacks.Plugin): self._tokens = dict(filter(lambda x_y: x_y[1][1]>now, self._tokens.items())) + @check_gpg_available def gettoken(self, irc, msg, args): """takes no arguments @@ -161,6 +165,7 @@ class GPG(callbacks.Plugin): r'\r?\n-----END PGP SIGNATURE-----', re.S) + @check_gpg_available def auth(self, irc, msg, args, url): """