@@ -124,9 +124,11 @@ def _doIdentify(self, irc, nick=None):
124124 return
125125 nickserv = self .registryValue ('NickServ' , network = irc .network )
126126 password = self ._getNickServPassword (nick , irc .network )
127- if not nickserv or not password :
128- s = 'Tried to identify without a NickServ or password set.'
129- self .log .warning (s )
127+ if not nickserv :
128+ self .log .warning ('Tried to identify without a NickServ set.' )
129+ return
130+ if not password :
131+ self .log .warning ('Tried to identify without a password set.' )
130132 return
131133 assert ircutils .strEqual (irc .nick , nick ), \
132134 'Identifying with not normal nick.'
@@ -150,16 +152,15 @@ def _doGhost(self, irc, nick=None):
150152 ghostDelay = self .registryValue ('ghostDelay' , network = irc .network )
151153 if not ghostDelay :
152154 return
153- if not nickserv or not password :
154- s = 'Tried to ghost without a NickServ or password set.'
155- self .log .warning (s )
155+ if not nickserv :
156+ self .log .warning ('Tried to ghost without a NickServ set.' )
157+ return
158+ if not password :
159+ self .log .warning ('Tried to ghost without a password set.' )
156160 return
157161 if state .sentGhost and time .time () < (state .sentGhost + ghostDelay ):
158162 self .log .warning ('Refusing to send GHOST more than once every '
159163 '%s seconds.' % ghostDelay )
160- elif not password :
161- self .log .warning ('Not ghosting: no password set.' )
162- return
163164 else :
164165 self .log .info ('Sending ghost (current nick: %s; ghosting: %s)' ,
165166 irc .nick , nick )
0 commit comments