From 51ea6d996d3603974f67cb9131fe9a4af82bb83c Mon Sep 17 00:00:00 2001 From: scatterflower Date: Mon, 26 Apr 2021 02:16:56 -0500 Subject: [PATCH] fix incorrect sql statement, and add config switch to skip authentication for testing --- akashi.pro | 3 +++ src/db_manager.cpp | 2 +- 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/akashi.pro b/akashi.pro index 8e995b4..822de90 100644 --- a/akashi.pro +++ b/akashi.pro @@ -26,6 +26,9 @@ RC_ICONS = resource/icon/akashi.ico # Enable this to print network messages tothe console #DEFINES += NET_DEBUG +# Enable this to skip all authentication checks +#DEFINES += SKIP_AUTH + SOURCES += src/advertiser.cpp \ src/aoclient.cpp \ src/aopacket.cpp \ diff --git a/src/db_manager.cpp b/src/db_manager.cpp index 861ec1a..f80b731 100644 --- a/src/db_manager.cpp +++ b/src/db_manager.cpp @@ -156,7 +156,7 @@ QList DBManager::getRecentBans() { QList return_list; QSqlQuery query; - query.prepare("SELECT TOP(5) * FROM BANS ORDER BY TIME DESC"); + query.prepare("SELECT * FROM BANS ORDER BY TIME DESC LIMIT 5"); query.setForwardOnly(true); query.exec(); while (query.next()) {