mirror of
https://github.com/BeamMP/BeamMP-Server.git
synced 2026-06-17 14:12:25 +00:00
add pos argument to on_autocomplete
This commit is contained in:
@@ -1,5 +1,6 @@
|
|||||||
# v3.1.0
|
# 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 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 MP.JsonEncode() and MP.JsonDecode(), which turn lua tables into json and vice-versa
|
||||||
- ADDED FS.ListFiles and FS.ListDirectories
|
- ADDED FS.ListFiles and FS.ListDirectories
|
||||||
|
|||||||
+1
-1
@@ -105,7 +105,7 @@ void Application::CheckForUpdates() {
|
|||||||
if (Matches) {
|
if (Matches) {
|
||||||
auto MyVersion = ServerVersion();
|
auto MyVersion = ServerVersion();
|
||||||
auto RemoteVersion = Version(VersionStrToInts(Response));
|
auto RemoteVersion = Version(VersionStrToInts(Response));
|
||||||
if (IsOutdated(MyVersion, RemoteVersion)) {
|
if (!IsOutdated(MyVersion, RemoteVersion)) {
|
||||||
std::string RealVersionString = RemoteVersion.AsString();
|
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));
|
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 {
|
} else {
|
||||||
|
|||||||
+1
-1
@@ -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.");
|
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<std::string> suggestions;
|
std::vector<std::string> suggestions;
|
||||||
try {
|
try {
|
||||||
auto cmd = TrimString(stub);
|
auto cmd = TrimString(stub);
|
||||||
|
|||||||
Reference in New Issue
Block a user