Changed some nick != othernick to not ircutils.strEqual.

This commit is contained in:
Jeremy Fincher 2004-08-31 19:19:31 +00:00
parent bad2bb12f2
commit 9efe550b52
2 changed files with 7 additions and 5 deletions

View File

@ -191,7 +191,8 @@ class Enforcer(callbacks.Privmsg):
def doTopic(self, irc, msg): def doTopic(self, irc, msg):
channel = msg.args[0] channel = msg.args[0]
topic = msg.args[1] topic = msg.args[1]
if msg.nick != irc.nick and channel in self.topics and \ if channel in self.topics and \
not ircutils.strEqual(msg.nick, irc.nick) and \
not ircdb.checkCapabilities(msg.prefix, not ircdb.checkCapabilities(msg.prefix,
(_chanCap(channel, 'op'), (_chanCap(channel, 'op'),
_chanCap(channel, 'topic'))): _chanCap(channel, 'topic'))):
@ -232,7 +233,7 @@ class Enforcer(callbacks.Privmsg):
if self._isPowerful(irc, channel, hostmask) and \ if self._isPowerful(irc, channel, hostmask) and \
not self.registryValue('takeRevenge.onOps', channel): not self.registryValue('takeRevenge.onOps', channel):
return return
if irc.nick != nick: if not ircutils.strEqual(irc.nick, nick):
self._doBan(irc, channel, hostmask) self._doBan(irc, channel, hostmask)
else: else:
# This can happen if takeRevenge.onOps is True. # This can happen if takeRevenge.onOps is True.
@ -313,7 +314,7 @@ class Enforcer(callbacks.Privmsg):
self.log.info('Not cycling %s: it\'s +i or +k.', channel) self.log.info('Not cycling %s: it\'s +i or +k.', channel)
def doPart(self, irc, msg): def doPart(self, irc, msg):
if msg.prefix != irc.prefix: if not ircutils.strEqual(msg.nick, irc.nick):
channel = msg.args[0] channel = msg.args[0]
c = irc.state.channels[channel] c = irc.state.channels[channel]
if len(c.users) == 1: if len(c.users) == 1:
@ -337,7 +338,7 @@ class Enforcer(callbacks.Privmsg):
chanserv = self.registryValue('ChanServ', irc.network) chanserv = self.registryValue('ChanServ', irc.network)
if chanserv: if chanserv:
if ircutils.isUserHostmask(msg.prefix): if ircutils.isUserHostmask(msg.prefix):
if msg.nick != chanserv: if not ircutils.strEqual(msg.nick, chanserv):
callbacks.Privmsg.__call__(self, irc, msg) callbacks.Privmsg.__call__(self, irc, msg)
else: else:
callbacks.Privmsg.__call__(self, irc, msg) callbacks.Privmsg.__call__(self, irc, msg)

View File

@ -212,7 +212,8 @@ class Services(privmsgs.CapabilityCheckingPrivmsg):
return return
nickserv = self.registryValue('NickServ') nickserv = self.registryValue('NickServ')
password = self._getNickServPassword(nick) password = self._getNickServPassword(nick)
if nick and irc.nick != nick and nickserv and password: if nick and nickserv and password and \
not ircutils.strEqual(nick, irc.nick):
if irc.afterConnect and not self.sentGhost: if irc.afterConnect and not self.sentGhost:
if nick in irc.state.nicksToHostmasks: if nick in irc.state.nicksToHostmasks:
self._doGhost(irc) self._doGhost(irc)