From 6d3c0602088d9388a3717bbc8dc6cf125f977542 Mon Sep 17 00:00:00 2001 From: Jeremy Fincher Date: Sat, 5 Apr 2003 13:54:12 +0000 Subject: [PATCH] Made sure all authentication was removed on bot exit. --- src/ircdb.py | 17 +++++++++++------ 1 file changed, 11 insertions(+), 6 deletions(-) diff --git a/src/ircdb.py b/src/ircdb.py index bf99cc491..02e7733aa 100644 --- a/src/ircdb.py +++ b/src/ircdb.py @@ -218,12 +218,12 @@ class IrcChannel(object): def checkCapability(self, capability): if capability in self.capabilities: return True - anticapability = makeAntiCapability(capability) - if anticapability in self.capabilities: - return False + if isAntiCapability(capability): + return not self.defaultAllow else: - if isAntiCapability(capability): - return not self.defaultAllow + anticapability = makeAntiCapability(capability) + if anticapability in self.capabilities: + return False else: return self.defaultAllow @@ -362,7 +362,12 @@ if not os.path.exists(conf.channelfile): fd.close() channels = ChannelsDictionary(conf.channelfile) -atexit.register(users.flush) +def flushUsers(): + for (name, u) in users.dict.iteritems(): + u.unsetAuth() + users.flush() + +atexit.register(flushUsers) atexit.register(channels.flush) world.flushers.append(users.flush)