From 0571ac694a3411f218b80ea4f77451dab3f78cf3 Mon Sep 17 00:00:00 2001 From: Dev <90421310+EstatoDeviato@users.noreply.github.com> Date: Tue, 28 May 2024 16:09:24 +0200 Subject: [PATCH 1/3] Update ms maximum --- include/courtroom.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/include/courtroom.h b/include/courtroom.h index a8942efe2..ae19423d5 100644 --- a/include/courtroom.h +++ b/include/courtroom.h @@ -561,7 +561,7 @@ class Courtroom : public QMainWindow { // Minumum and maximum number of parameters in the MS packet static const int MS_MINIMUM = 15; - static const int MS_MAXIMUM = 35; + static const int MS_MAXIMUM = 40; QString m_chatmessage[MS_MAXIMUM]; QString previous_ic_message = ""; From d083e647eff8b8b8b0cf45fd600d827f04a39fd6 Mon Sep 17 00:00:00 2001 From: Dev <90421310+EstatoDeviato@users.noreply.github.com> Date: Sun, 9 Jun 2024 10:26:53 +0200 Subject: [PATCH 2/3] Update courtroom.h --- include/courtroom.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/include/courtroom.h b/include/courtroom.h index ae19423d5..a8942efe2 100644 --- a/include/courtroom.h +++ b/include/courtroom.h @@ -561,7 +561,7 @@ class Courtroom : public QMainWindow { // Minumum and maximum number of parameters in the MS packet static const int MS_MINIMUM = 15; - static const int MS_MAXIMUM = 40; + static const int MS_MAXIMUM = 35; QString m_chatmessage[MS_MAXIMUM]; QString previous_ic_message = ""; From 279d5a3f5e90bdf41590562e96b437c85113b2f7 Mon Sep 17 00:00:00 2001 From: Dev <90421310+EstatoDeviato@users.noreply.github.com> Date: Thu, 19 Dec 2024 17:40:06 +0100 Subject: [PATCH 3/3] automatically load KFO commands if it is a KFO server --- src/courtroom.cpp | 16 ++++++++++++---- 1 file changed, 12 insertions(+), 4 deletions(-) diff --git a/src/courtroom.cpp b/src/courtroom.cpp index dd115025b..4464231e4 100644 --- a/src/courtroom.cpp +++ b/src/courtroom.cpp @@ -454,10 +454,18 @@ Courtroom::Courtroom(AOApplication *p_ao_app) : QMainWindow() callwords_notification->setVisible(true); // Auto-completer's vanilla commands - auto_commands = QStringList({ - "/help", "/bg", "/getarea", "/getareas", "/roll", - "/area_lock", "/area_unlock", "/8ball", "/afk" - }); + QStringList auto_commands; + if (ao_app->server_software == "KFO-Server"){ + if (file_exists(VPath("custom sets/autocompleter/KFO-Server_commands.ini"))){ + auto_commands = ao_app->get_list_file(VPath("custom sets/autocompleter/KFO-Server_commands.ini")); + } + } + if (auto_commands.isEmpty()){ + auto_commands = QStringList({ + "/help", "/bg", "/getarea", "/getareas", "/roll", + "/area_lock", "/area_unlock", "/8ball", "/afk" + }); + } model = new QStringListModel(auto_commands, this); // model->sort(0, Qt::AscendingOrder); // This will become an option completer = new QCompleter(model, this);