From 022e9b5fb5b81a7fa01c79688339b356b94cc0a1 Mon Sep 17 00:00:00 2001 From: Naleksuh <24828999+Naleksuh@users.noreply.github.com> Date: Fri, 1 Sep 2023 16:21:42 +0000 Subject: [PATCH 1/7] Update lilac.sp --- scripting/lilac.sp | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/scripting/lilac.sp b/scripting/lilac.sp index 483436e..35f522a 100644 --- a/scripting/lilac.sp +++ b/scripting/lilac.sp @@ -198,6 +198,7 @@ public void OnAllPluginsLoaded() sourcebanspp_exist = LibraryExists("sourcebans++"); sourcebans_exist = LibraryExists("sourcebans"); materialadmin_exist = LibraryExists("materialadmin"); + dmtf_exist = LibaryExists("dmtf"); if (LibraryExists("updater")) lilac_update_url(); @@ -229,6 +230,8 @@ public void OnLibraryAdded(const char []name) sourcebans_exist = true; else if (StrEqual(name, "materialadmin")) materialadmin_exist = true; + else if (StrEqual(name, "dmtf")) + dmtf_exist = true; else if (StrEqual(name, "updater")) lilac_update_url(); } @@ -241,6 +244,8 @@ public void OnLibraryRemoved(const char []name) sourcebans_exist = false; else if (StrEqual(name, "materialadmin")) materialadmin_exist = false; + else if (StrEqual(name, "dmtf")) + dmtf_exist = false } void lilac_update_url() From c40a68624b4e9e2e2f837867c6876822882dabd9 Mon Sep 17 00:00:00 2001 From: Naleksuh <24828999+Naleksuh@users.noreply.github.com> Date: Fri, 1 Sep 2023 16:23:24 +0000 Subject: [PATCH 2/7] Update lilac_globals.sp --- scripting/lilac/lilac_globals.sp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/scripting/lilac/lilac_globals.sp b/scripting/lilac/lilac_globals.sp index 19f6f75..b963468 100644 --- a/scripting/lilac/lilac_globals.sp +++ b/scripting/lilac/lilac_globals.sp @@ -176,6 +176,7 @@ Handle forwardhandleallow = INVALID_HANDLE; bool sourcebans_exist = false; bool sourcebanspp_exist = false; bool materialadmin_exist = false; +bool dmtf_exist = false; /* Logging. * Todo: Might wanna move a lot of this variables to @@ -205,4 +206,4 @@ native Function MABanPlayer(int iClient, int iTarget, int iType, int iTime, char native Function SBBanPlayer(int client, int target, int time, const char[] reason); native Function SBPP_BanPlayer(int iAdmin, int iTarget, int iTime, const char[] sReason); native Function Updater_AddPlugin(const char[] url); -native Function Updater_RemovePlugin(); \ No newline at end of file +native Function Updater_RemovePlugin(); From addab446a9c1ef1a42a9188a3c86a4719b7ae015 Mon Sep 17 00:00:00 2001 From: Naleksuh <24828999+Naleksuh@users.noreply.github.com> Date: Fri, 1 Sep 2023 16:30:35 +0000 Subject: [PATCH 3/7] Update lilac_config.sp --- scripting/lilac/lilac_config.sp | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/scripting/lilac/lilac_config.sp b/scripting/lilac/lilac_config.sp index 7075326..f04622c 100644 --- a/scripting/lilac/lilac_config.sp +++ b/scripting/lilac/lilac_config.sp @@ -31,7 +31,10 @@ void lilac_config_setup() FCVAR_PROTECTED, true, 0.0, true, 1.0); hcvar[CVAR_MA] = new Convar("lilac_materialadmin", "1", "Ban players via Material-Admin (Fork of Sourcebans++. If it isn't installed, will default to sourcebans++ or basebans).", - FCVAR_PROTECTED, true, 0.0, true, 1.0); + FCVAR_PROTECTED, true, 0.0, true, 1.0); + hcvar[CVAR_DMTF] = new Convar("lilac_dmtf", "1", + "Ban players via DMTF. Not available for most servers. If it isn't present, will default to MaterialAdmin, SourceBans++ or basebans", + FCVAR_PROTECTED, true, 0.0, true, 1.0); hcvar[CVAR_SOURCEIRC] = new Convar("lilac_sourceirc", "1", "Enable reflecting log messages to SourceIRC channels flagged with 'lilac', if SourceIRC is available.", FCVAR_PROTECTED, true, 0.0, true, 1.0); From 653a639b217a57db9e766ce98748a8d8d6c4eed0 Mon Sep 17 00:00:00 2001 From: Naleksuh <24828999+Naleksuh@users.noreply.github.com> Date: Fri, 1 Sep 2023 16:33:03 +0000 Subject: [PATCH 4/7] Update lilac_stock.sp --- scripting/lilac/lilac_stock.sp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/scripting/lilac/lilac_stock.sp b/scripting/lilac/lilac_stock.sp index 81737d6..77fe379 100644 --- a/scripting/lilac/lilac_stock.sp +++ b/scripting/lilac/lilac_stock.sp @@ -300,7 +300,8 @@ void lilac_ban_client(int client, int cheat) } - BanClient(client, get_ban_length(cheat), BANFLAG_AUTO, reason, reason, "lilac", 0); + //BanClient(client, get_ban_length(cheat), BANFLAG_AUTO, reason, reason, "lilac", 0); + ServerCommand("sm_ban #%d %d %s", GetClientUserId(client), get_ban_length(cheat), reason); // Console command; ban system-agnostic. CreateTimer(5.0, timer_kick, GetClientUserId(client)); } From 462cf8b804b5f9d4848bc33acb659b5240f1ad94 Mon Sep 17 00:00:00 2001 From: Naleksuh <24828999+Naleksuh@users.noreply.github.com> Date: Fri, 1 Sep 2023 16:37:53 +0000 Subject: [PATCH 5/7] Update lilac.sp --- scripting/lilac.sp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/scripting/lilac.sp b/scripting/lilac.sp index 35f522a..e371129 100644 --- a/scripting/lilac.sp +++ b/scripting/lilac.sp @@ -198,7 +198,7 @@ public void OnAllPluginsLoaded() sourcebanspp_exist = LibraryExists("sourcebans++"); sourcebans_exist = LibraryExists("sourcebans"); materialadmin_exist = LibraryExists("materialadmin"); - dmtf_exist = LibaryExists("dmtf"); + dmtf_exist = LibraryExists("dmtf"); if (LibraryExists("updater")) lilac_update_url(); @@ -245,7 +245,7 @@ public void OnLibraryRemoved(const char []name) else if (StrEqual(name, "materialadmin")) materialadmin_exist = false; else if (StrEqual(name, "dmtf")) - dmtf_exist = false + dmtf_exist = false; } void lilac_update_url() From 657b4856ae01c1c01049c8820da2c7dfd4b52662 Mon Sep 17 00:00:00 2001 From: Naleksuh <24828999+Naleksuh@users.noreply.github.com> Date: Fri, 1 Sep 2023 16:39:14 +0000 Subject: [PATCH 6/7] Update lilac_globals.sp --- scripting/lilac/lilac_globals.sp | 1 + 1 file changed, 1 insertion(+) diff --git a/scripting/lilac/lilac_globals.sp b/scripting/lilac/lilac_globals.sp index b963468..28a6ac6 100644 --- a/scripting/lilac/lilac_globals.sp +++ b/scripting/lilac/lilac_globals.sp @@ -88,6 +88,7 @@ #define CVAR_SOURCEIRC 37 #define CVAR_DATABASE 38 #define CVAR_MAX 39 +#define CVAR_DMTF 40 #define BHOP_INDEX_MIN 0 #define BHOP_INDEX_JUMP 1 From f43129d740847221b2aab0149c0bfd713ac37a69 Mon Sep 17 00:00:00 2001 From: Naleksuh <24828999+Naleksuh@users.noreply.github.com> Date: Fri, 1 Sep 2023 16:43:24 +0000 Subject: [PATCH 7/7] Update lilac_globals.sp --- scripting/lilac/lilac_globals.sp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/scripting/lilac/lilac_globals.sp b/scripting/lilac/lilac_globals.sp index 28a6ac6..b550434 100644 --- a/scripting/lilac/lilac_globals.sp +++ b/scripting/lilac/lilac_globals.sp @@ -87,8 +87,8 @@ #define CVAR_AUTO_UPDATE 36 #define CVAR_SOURCEIRC 37 #define CVAR_DATABASE 38 -#define CVAR_MAX 39 -#define CVAR_DMTF 40 +#define CVAR_DMTF 39 +#define CVAR_MAX 40 #define BHOP_INDEX_MIN 0 #define BHOP_INDEX_JUMP 1