From a2e2063d8b05783180127c95447234cca14832d6 Mon Sep 17 00:00:00 2001 From: Jeremy Fincher Date: Wed, 9 Mar 2005 07:26:32 +0000 Subject: [PATCH] Added a callCommand to the Web plugin to catch utils.web.Error. --- plugins/Web/plugin.py | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/plugins/Web/plugin.py b/plugins/Web/plugin.py index b6b3531c5..983fded2b 100644 --- a/plugins/Web/plugin.py +++ b/plugins/Web/plugin.py @@ -40,6 +40,12 @@ class Web(callbacks.PluginRegexp): """Add the help for "@help Web" here.""" regexps = ['titleSnarfer'] threaded = True + def callCommand(self, command, irc, msg, *args, **kwargs): + try: + super(Web, self).callCommand(command, irc, msg, *args, **kwargs) + except utils.web.Error, e: + irc.reply(str(e)) + _titleRe = re.compile(r'(.*?)', re.I | re.S) def titleSnarfer(self, irc, msg, match): r"https?://[^\])>\s]+"