Don't cycle if we're already op.

This commit is contained in:
James Vega 2004-12-16 18:07:10 +00:00
parent 889cb347f7
commit 1e484a2b87

View File

@ -65,6 +65,9 @@ class Cycler(callbacks.Privmsg):
def _cycle(self, irc, channel): def _cycle(self, irc, channel):
if self.registryValue('enable', channel) and \ if self.registryValue('enable', channel) and \
len(irc.state.channels[channel].users) == 1: len(irc.state.channels[channel].users) == 1:
if irc.state.channels[channel].isOp(irc.nick):
self.log.info('Not cycling %s: Already opped.', channel)
return
if 'i' not in irc.state.channels[channel].modes and \ if 'i' not in irc.state.channels[channel].modes and \
'k' not in irc.state.channels[channel].modes: 'k' not in irc.state.channels[channel].modes:
self.log.info('Cycling %s: I\'m the only one left.', channel) self.log.info('Cycling %s: I\'m the only one left.', channel)