From ffa89f1e015b76266b72fdd5f8167e71600d15e4 Mon Sep 17 00:00:00 2001 From: James Lu Date: Wed, 7 Sep 2016 06:57:03 -0700 Subject: [PATCH] nefarious: fix UnboundLocalError when no modes are given on user introduction Reported by Kev`Bz via IRC. --- protocols/nefarious.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/protocols/nefarious.py b/protocols/nefarious.py index c92e9ca..9c81968 100644 --- a/protocols/nefarious.py +++ b/protocols/nefarious.py @@ -856,9 +856,9 @@ class P10Protocol(IRCS2SProtocol): accountname = modepair[1].split(':', 1)[0] self.irc.callHooks([uid, 'CLIENT_SERVICES_LOGIN', {'text': accountname}]) - # Call the OPERED UP hook if +o is being added to the mode list. - if ('+o', None) in parsedmodes: - self.irc.callHooks([uid, 'CLIENT_OPERED', {'text': 'IRC Operator'}]) + # Call the OPERED UP hook if +o is being added to the mode list. + if ('+o', None) in parsedmodes: + self.irc.callHooks([uid, 'CLIENT_OPERED', {'text': 'IRC Operator'}]) self.checkCloakChange(uid)