mirror of
https://github.com/Mikaela/Limnoria.git
synced 2024-11-02 17:29:22 +01:00
Added an extra try/except madoodle since what we expect to be firewalled (a plugin's invalidCommand).
This commit is contained in:
parent
533fbd2762
commit
ff7622b083
@ -524,7 +524,15 @@ class IrcObjectProxy(RichReplyMethods):
|
|||||||
log.debug('Finished calling invalidCommand: %s.', cb.name())
|
log.debug('Finished calling invalidCommand: %s.', cb.name())
|
||||||
return
|
return
|
||||||
if hasattr(cb, 'invalidCommand'):
|
if hasattr(cb, 'invalidCommand'):
|
||||||
|
try:
|
||||||
|
# I think I took out this try/except block because we
|
||||||
|
# firewalled invalidCommand, but we've no guarantee that
|
||||||
|
# other classes won't have firewalled it. Better safe
|
||||||
|
# than sorry, I say.
|
||||||
cb.invalidCommand(self, self.msg, self.args)
|
cb.invalidCommand(self, self.msg, self.args)
|
||||||
|
except Exception, e:
|
||||||
|
log.exception('Uncaught exception in %s.invalidCommand',
|
||||||
|
cb.name())
|
||||||
|
|
||||||
def _callCommand(self, name, command, cb):
|
def _callCommand(self, name, command, cb):
|
||||||
try:
|
try:
|
||||||
@ -833,8 +841,12 @@ class DisabledCommands(object):
|
|||||||
class Privmsg(irclib.IrcCallback):
|
class Privmsg(irclib.IrcCallback):
|
||||||
"""Base class for all Privmsg handlers."""
|
"""Base class for all Privmsg handlers."""
|
||||||
__metaclass__ = log.MetaFirewall
|
__metaclass__ = log.MetaFirewall
|
||||||
|
# For awhile, a comment stood here to say, "Eventually callCommand." But
|
||||||
|
# that's wrong, because we can't do generic error handling in this
|
||||||
|
# callCommand -- plugins need to be able to override callCommand and do
|
||||||
|
# error handling there (see the Http plugin for an example).
|
||||||
__firewalled__ = {'isCommand': None,
|
__firewalled__ = {'isCommand': None,
|
||||||
'invalidCommand': None} # Eventually callCommand.
|
'invalidCommand': None}
|
||||||
public = True
|
public = True
|
||||||
handled = False
|
handled = False
|
||||||
errored = False
|
errored = False
|
||||||
|
Loading…
Reference in New Issue
Block a user