mirror of
https://github.com/Mikaela/Limnoria.git
synced 2024-11-27 05:09:23 +01:00
Made sure all authentication was removed on bot exit.
This commit is contained in:
parent
f078d7fe1b
commit
6d3c060208
17
src/ircdb.py
17
src/ircdb.py
@ -218,12 +218,12 @@ class IrcChannel(object):
|
|||||||
def checkCapability(self, capability):
|
def checkCapability(self, capability):
|
||||||
if capability in self.capabilities:
|
if capability in self.capabilities:
|
||||||
return True
|
return True
|
||||||
anticapability = makeAntiCapability(capability)
|
if isAntiCapability(capability):
|
||||||
if anticapability in self.capabilities:
|
return not self.defaultAllow
|
||||||
return False
|
|
||||||
else:
|
else:
|
||||||
if isAntiCapability(capability):
|
anticapability = makeAntiCapability(capability)
|
||||||
return not self.defaultAllow
|
if anticapability in self.capabilities:
|
||||||
|
return False
|
||||||
else:
|
else:
|
||||||
return self.defaultAllow
|
return self.defaultAllow
|
||||||
|
|
||||||
@ -362,7 +362,12 @@ if not os.path.exists(conf.channelfile):
|
|||||||
fd.close()
|
fd.close()
|
||||||
channels = ChannelsDictionary(conf.channelfile)
|
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)
|
atexit.register(channels.flush)
|
||||||
|
|
||||||
world.flushers.append(users.flush)
|
world.flushers.append(users.flush)
|
||||||
|
Loading…
Reference in New Issue
Block a user