From b3f256681fef53fa8035c1e9d130791a163391ca Mon Sep 17 00:00:00 2001 From: Valentin Lorentz Date: Thu, 11 Jul 2024 16:57:01 +0200 Subject: [PATCH] Services: Fix crash in __call__ When a password is added for a nick that is not a valid config entry name, this causes _getNickServPassword to raise an error; and __call__ needs to catch it or the bot becomes unusable. --- plugins/Services/plugin.py | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/plugins/Services/plugin.py b/plugins/Services/plugin.py index b07ba088e..40c677159 100644 --- a/plugins/Services/plugin.py +++ b/plugins/Services/plugin.py @@ -179,7 +179,11 @@ class Services(callbacks.Plugin): if nick not in self.registryValue('nicks', network=irc.network): return nickserv = self.registryValue('NickServ', network=irc.network) - password = self._getNickServPassword(nick, irc.network) + try: + password = self._getNickServPassword(nick, irc.network) + except Exception: + self.log.exception('Could not get NickServ password for %s', nick) + return ghostDelay = self.registryValue('ghostDelay', network=irc.network) if not ghostDelay: return