From a20f7424171036a8c603bf0f406c41e0744f0cbd Mon Sep 17 00:00:00 2001 From: Jeremy Fincher Date: Fri, 6 Feb 2004 10:48:52 +0000 Subject: [PATCH] liquidx is cool. --- plugins/Enforcer.py | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/plugins/Enforcer.py b/plugins/Enforcer.py index 9eb02b4bb..07ee0e9fe 100644 --- a/plugins/Enforcer.py +++ b/plugins/Enforcer.py @@ -237,8 +237,10 @@ class Enforcer(callbacks.Privmsg): def doPart(self, irc, msg): if msg.prefix != irc.prefix: channel = msg.args[0] - if len(irc.state.channels[channel].users) == 1: - self._cycle(irc, channel) + c = irc.state.channels[channel] + if len(c.users) == 1: + if irc.nick not in c.ops: + self._cycle(irc, channel) def doQuit(self, irc, msg): for (channel, c) in irc.state.channels.iteritems():