mirror of
https://github.com/Mikaela/Limnoria.git
synced 2025-06-13 10:17:31 +02:00
Restored the original conf.replyWhenNotCommand value on die().
This commit is contained in:
parent
c75e124224
commit
c9e6f77c3a
@ -131,10 +131,11 @@ class MoobotFactoids(callbacks.PrivmsgCommandAndRegexp):
|
|||||||
callbacks.PrivmsgCommandAndRegexp.__init__(self)
|
callbacks.PrivmsgCommandAndRegexp.__init__(self)
|
||||||
self.makeDB(dbfilename)
|
self.makeDB(dbfilename)
|
||||||
# Set up the "reply when not command" behavior
|
# Set up the "reply when not command" behavior
|
||||||
conf.replyWhenNotCommand = True
|
|
||||||
MiscCommands = OwnerCommands.loadPluginModule('MiscCommands')
|
MiscCommands = OwnerCommands.loadPluginModule('MiscCommands')
|
||||||
# Gotta make sure we restore this when we unload
|
# Gotta make sure we restore this when we unload
|
||||||
self.originalReplyWhenNotCommand = MiscCommands.replyWhenNotCommand
|
self.originalReplyWhenNotCommand = MiscCommands.replyWhenNotCommand
|
||||||
|
self.originalConfReplyWhenNotCommand = conf.replyWhenNotCommand
|
||||||
|
conf.replyWhenNotCommand = True
|
||||||
MiscCommands.replyWhenNotCommand = self._checkFactoids
|
MiscCommands.replyWhenNotCommand = self._checkFactoids
|
||||||
|
|
||||||
def makeDB(self, filename):
|
def makeDB(self, filename):
|
||||||
@ -172,6 +173,7 @@ class MoobotFactoids(callbacks.PrivmsgCommandAndRegexp):
|
|||||||
# Recover from clobbering this command earlier
|
# Recover from clobbering this command earlier
|
||||||
MiscCommands = OwnerCommands.loadPluginModule('MiscCommands')
|
MiscCommands = OwnerCommands.loadPluginModule('MiscCommands')
|
||||||
MiscCommands.replyWhenNotCommand = self.originalReplyWhenNotCommand
|
MiscCommands.replyWhenNotCommand = self.originalReplyWhenNotCommand
|
||||||
|
conf.replyWhenNotCommand = self.originalConfReplyWhenNotCommand
|
||||||
|
|
||||||
def parseFactoid(self, fact):
|
def parseFactoid(self, fact):
|
||||||
type = "define" # Default is to just spit the factoid back as a
|
type = "define" # Default is to just spit the factoid back as a
|
||||||
|
Loading…
x
Reference in New Issue
Block a user