From 4cb299061e713124e22d120cb51d186999ea73d7 Mon Sep 17 00:00:00 2001 From: Lion Kortlepel Date: Wed, 23 Mar 2022 16:10:51 +0100 Subject: [PATCH] add pos argument to on_autocomplete --- Changelog.md | 1 + src/Common.cpp | 2 +- src/TConsole.cpp | 2 +- 3 files changed, 3 insertions(+), 2 deletions(-) diff --git a/Changelog.md b/Changelog.md index d985b28..18580b3 100644 --- a/Changelog.md +++ b/Changelog.md @@ -1,5 +1,6 @@ # v3.1.0 +- ADDED Tab autocomplete in console, smart tab autocomplete (understands lua tables and types) in the lua console - ADDED lua debug facilities (type `:help` when attached to lua via `lua`) - ADDED MP.JsonEncode() and MP.JsonDecode(), which turn lua tables into json and vice-versa - ADDED FS.ListFiles and FS.ListDirectories diff --git a/src/Common.cpp b/src/Common.cpp index ac6319c..43c1253 100644 --- a/src/Common.cpp +++ b/src/Common.cpp @@ -105,7 +105,7 @@ void Application::CheckForUpdates() { if (Matches) { auto MyVersion = ServerVersion(); auto RemoteVersion = Version(VersionStrToInts(Response)); - if (IsOutdated(MyVersion, RemoteVersion)) { + if (!IsOutdated(MyVersion, RemoteVersion)) { std::string RealVersionString = RemoteVersion.AsString(); beammp_warn(std::string(ANSI_YELLOW_BOLD) + "NEW VERSION OUT! There's a new version (v" + RealVersionString + ") of the BeamMP-Server available! For more info visit https://wiki.beammp.com/en/home/server-maintenance#updating-the-server." + std::string(ANSI_RESET)); } else { diff --git a/src/TConsole.cpp b/src/TConsole.cpp index 42e9bc4..d8f11d0 100644 --- a/src/TConsole.cpp +++ b/src/TConsole.cpp @@ -573,7 +573,7 @@ TConsole::TConsole() { beammp_error("Console died with: " + std::string(e.what()) + ". This could be a fatal error and could cause the server to terminate."); } }; - mCommandline.on_autocomplete = [this](Commandline& c, std::string stub) { + mCommandline.on_autocomplete = [this](Commandline& c, std::string stub, int) { std::vector suggestions; try { auto cmd = TrimString(stub);