mirror of
https://github.com/Mikaela/Limnoria.git
synced 2025-01-14 14:12:32 +01:00
Fix for bugz0r.
This commit is contained in:
parent
0ff919b0f7
commit
a0e863deef
@ -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):
|
||||
|
@ -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:
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user