Changed not even to define eval/exec when conf.allowEval is False.

This commit is contained in:
Jeremy Fincher 2004-01-18 19:35:36 +00:00
parent b63d48f526
commit 9aede17efd
2 changed files with 31 additions and 28 deletions

View File

@ -110,6 +110,7 @@ class Owner(privmsgs.CapabilityCheckingPrivmsg):
_srcPlugins = ('Owner', 'Misc', 'Admin', 'User', 'Channel') _srcPlugins = ('Owner', 'Misc', 'Admin', 'User', 'Channel')
def __init__(self): def __init__(self):
callbacks.Privmsg.__init__(self) callbacks.Privmsg.__init__(self)
if hasattr(self.__class__, '_exec'):
setattr(self.__class__, 'exec', self.__class__._exec) setattr(self.__class__, 'exec', self.__class__._exec)
self.defaultPlugins = {'list': 'Misc', self.defaultPlugins = {'list': 'Misc',
'capabilities': 'User', 'capabilities': 'User',
@ -242,6 +243,7 @@ class Owner(privmsgs.CapabilityCheckingPrivmsg):
return return
irc.replySuccess() irc.replySuccess()
if conf.allowEval:
def eval(self, irc, msg, args): def eval(self, irc, msg, args):
"""<expression> """<expression>

View File

@ -53,6 +53,7 @@ registry.open(registryFilename)
import log import log
import conf import conf
conf.allowEval = True
import fix import fix