From a035492295f224aa719d2f996166a10f15d62825 Mon Sep 17 00:00:00 2001 From: James Vega Date: Thu, 4 Aug 2005 17:53:29 +0000 Subject: [PATCH] plugins/QuoteGrabs: Order the quotes in reverse chronological order. --- plugins/QuoteGrabs/plugin.py | 2 +- plugins/QuoteGrabs/test.py | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/plugins/QuoteGrabs/plugin.py b/plugins/QuoteGrabs/plugin.py index 8730f57bd..42dabb0bc 100644 --- a/plugins/QuoteGrabs/plugin.py +++ b/plugins/QuoteGrabs/plugin.py @@ -128,7 +128,7 @@ class SqliteQuoteGrabsDB(object): cursor = db.cursor() cursor.execute("""SELECT id, quote FROM quotegrabs WHERE nickeq(nick, %s) - ORDER BY id ASC""", nick) + ORDER BY id DESC""", nick) return [QuoteGrabsRecord(id, text=quote) for (id, quote) in cursor.fetchall()] diff --git a/plugins/QuoteGrabs/test.py b/plugins/QuoteGrabs/test.py index a22e17f94..96106fc2f 100644 --- a/plugins/QuoteGrabs/test.py +++ b/plugins/QuoteGrabs/test.py @@ -60,7 +60,7 @@ class QuoteGrabsTestCase(ChannelPluginTestCase): prefix=testPrefix)) self.assertNotError('grab foo') self.assertResponse('quotegrabs list foo', - '#1: test and #2: %s...' %\ + '#2: %s... and #1: test' %\ ('a'*43)) # 50 - length of "#2: ..." def testDuplicateGrabs(self): @@ -109,7 +109,7 @@ class QuoteGrabsTestCase(ChannelPluginTestCase): self.assertError('quotegrabs search test') # still none in db self.assertNotError('grab foo') self.assertNotError('quotegrabs search test') - + class QuoteGrabsNonChannelTestCase(QuoteGrabsTestCase): config = { 'databases.plugins.channelSpecific' : False }