diff --git a/plugins/Dunno.py b/plugins/Dunno.py index b180d47f8..eefa01bec 100644 --- a/plugins/Dunno.py +++ b/plugins/Dunno.py @@ -202,11 +202,12 @@ class Dunno(callbacks.Privmsg): except: irc.error(msg, '%r is not a valid regexp' % regexp) return + dunno = cursor.fetchone()[0] new_dunno = replacer(dunno) cursor.execute("""UPDATE dunnos SET dunno=%s WHERE id=%s""", new_dunno, id) self.db.commit() - irc.reply(msg, conf.replySuccess) + irc.replySuccess() diff --git a/test/test_Dunno.py b/test/test_Dunno.py index b5f2f533c..c8f356cc6 100644 --- a/test/test_Dunno.py +++ b/test/test_Dunno.py @@ -74,3 +74,8 @@ if sqlite is not None: self.assertResponse('dunno get 2', 'Dunno #2: \'$who\'') self.assertError('dunno get 3') self.assertError('dunno get a') + + def testDunnoChange(self): + self.assertNotError('dunno add moo') + self.assertNotError('dunno change 1 s/moo/bar/') + self.assertRegexp('dunno get 1', '.*?: \'bar\'')