diff --git a/plugins/Observer.py b/plugins/Observer.py index 8f22479bc..7e5e4aeec 100644 --- a/plugins/Observer.py +++ b/plugins/Observer.py @@ -198,12 +198,11 @@ class Observer(callbacks.Privmsg): if name not in self.registryValue('observers'): irc.error('That\'s not a valid observer.', Raise=True) g = self.registryValue('observers.%s' % name, value=False) - regexp = g() command = g.command() probability = g.probability() irc.reply('%s matches the regular expression %s and ' 'runs the command %s with a probability of %s' % - (name, regexp, command, probability)) + (name, g, command, probability)) info = wrap(info, ['something']) def add(self, irc, msg, args, name, probability, regexp, command): diff --git a/test/test_Observer.py b/test/test_Observer.py index 94e7cad07..1a857055c 100644 --- a/test/test_Observer.py +++ b/test/test_Observer.py @@ -55,6 +55,10 @@ class ObserverTestCase(ChannelPluginTestCase): self.assertNotError('add foo m/foo/i echo I saw foo.') self.assertRegexp('observer list', 'foo') + def testInfo(self): + self.assertNotError('add foo m/foo/i echo I saw foo.') + self.assertNotRegexp('observer info foo', 'sre') + # vim:set shiftwidth=4 tabstop=8 expandtab textwidth=78: