From 8292609b2da644f17eed1fc1f1f72b8d103c6f13 Mon Sep 17 00:00:00 2001 From: Bob Murphy Date: Tue, 31 Mar 2020 05:48:12 +0200 Subject: [PATCH 1/9] adds the function to change the password of the TFAR channel --- AntistasiServerUtility/config.cpp | 8 ++--- AntistasiServerUtility/fn_init.sqf | 33 +++++++++++-------- .../fn_onPlayerConnected.sqf | 7 +++- 3 files changed, 29 insertions(+), 19 deletions(-) diff --git a/AntistasiServerUtility/config.cpp b/AntistasiServerUtility/config.cpp index f6f9688..d4e70a7 100644 --- a/AntistasiServerUtility/config.cpp +++ b/AntistasiServerUtility/config.cpp @@ -4,11 +4,11 @@ class CfgPatches { // Meta information for editor name = "Antistasi Server Utility"; - author = "Sparker"; + author = "Initial author Sparker - modified by the official antistasi community"; url = ""; // Minimum compatible version. When the game's version is lower, pop-up warning will appear when launching the game. - requiredVersion = 1.60; + requiredVersion = 1.60; // Required addons, used for setting load order. // When any of the addons is missing, pop-up warning will appear when launching the game. requiredAddons[] = {}; @@ -30,11 +30,11 @@ class CfgFunctions file = "AntistasiServerUtility\fn_init.sqf"; preInit = 1; }; - + class onPlayerConnected { file = "AntistasiServerUtility\fn_onPlayerConnected.sqf"; }; }; }; -}; \ No newline at end of file +}; diff --git a/AntistasiServerUtility/fn_init.sqf b/AntistasiServerUtility/fn_init.sqf index 8f211b8..1e7fccc 100644 --- a/AntistasiServerUtility/fn_init.sqf +++ b/AntistasiServerUtility/fn_init.sqf @@ -1,31 +1,36 @@ diag_log "[ASU] Info: AntistasiServerUtility addon: init"; -ASU_serverMode = "NONE"; -ASU_TSChannelName = ""; // Name of the TFAR channel for this server +ASU_serverMode = "NONE"; // this sets the initial value for the servermode to NONE +ASU_TSChannelName = ""; // Name of the TFAR channel for this server - sets initial value to nill +ASU_TSChannelPassword = ""; // Password of the TFAR channel for this server - sets initial value to nill - added by Bob Murphy 31.03.2020 switch (serverName) do { // Tell me your name! // Hardcore server // Where is my RPG! - case "A3-Antistasi Official US 1 - hardcore": { - diag_log "[ASU] Info: hardcore server detected"; - ASU_serverMode = "HARDCORE"; - ASU_TSChannelName = "Task Force Radio US1"; + case "A3-Antistasi Official US 1 - hardcore": { //here has to be the exact name of the game-server + diag_log "[ASU] Info: hardcore server detected"; // this is a custom log line which you can adapt for your needs + ASU_serverMode = "HARDCORE"; // if set to "HARDCORE" this enables the settings in ASU_fnc_onPlayerConnected which can disable ingame channels + ASU_TSChannelName = "Task Force Radio US1"; //here has to be the exact name of the TS channel you intent to use as your radiochannel + ASU_TSChannelPassword = "123"; // added by Bob Murphy 31.03.2020 }; - + // Casual server // Don't shoot me or I will cry! - case "A3-Antistasi Official EU 2 - casual": { - ASU_serverMode = "CASUAL"; - ASU_TSChannelName = "Task Force Radio EU2"; - diag_log "[ASU] Info: casual server detected"; + case "A3-Antistasi Official EU 2 - casual": { //here has to be the exact name of the game-server + diag_log "[ASU] Info: casual server detected"; // this is a custom log line which you can adapt for your needs + ASU_serverMode = "CASUAL"; // if set to "HARDCORE" this enables the settings in ASU_fnc_onPlayerConnected which can disable ingame channels + ASU_TSChannelName = "Task Force Radio EU2"; //here has to be the exact name of the TS channel you intent to use as your radiochannel + ASU_TSChannelPassword = "123"; // added by Bob Murphy 31.03.2020 + }; + + default {diag_log format ["[ASU] Error: detected neither hardcore nor casual server! Server name: %1", serverName]; }; - - default {diag_log format ["[ASU] Error: detected neither hardcore nor casual server! Server name: %1", serverName]; }; }; if (ASU_TSChannelName != "") then { tf_radio_channel_name = ASU_TSChannelName; + tf_radio_channel_password = ASU_TSChannelPassword; // added by Bob Murphy 31.03.2020 }; -addMissionEventHandler ["PlayerConnected", ASU_fnc_onPlayerConnected]; \ No newline at end of file +addMissionEventHandler ["PlayerConnected", ASU_fnc_onPlayerConnected]; diff --git a/AntistasiServerUtility/fn_onPlayerConnected.sqf b/AntistasiServerUtility/fn_onPlayerConnected.sqf index 02dafd2..1b7a3d0 100644 --- a/AntistasiServerUtility/fn_onPlayerConnected.sqf +++ b/AntistasiServerUtility/fn_onPlayerConnected.sqf @@ -13,6 +13,11 @@ if (ASU_TSChannelName != "") then { [missionNamespace, ["tf_radio_channel_name", ASU_TSChannelName]] remoteExecCall ["setVariable", _owner]; }; +//Set TS3 channel password for auto move - added by Bob Murphy 31.03.2020 +if (ASU_TSChannelName !="") then { + [missionNamespace, ["tf_radio_channel_password", ASU_TSChannelPassword]] remoteExecCall ["setVariable" _owner]; +}; + //diag_log "Player connected!"; if (ASU_serverMode == "HARDCORE") then { @@ -29,4 +34,4 @@ if (ASU_serverMode == "HARDCORE") then { 6-15 = Custom Radio (Is not supported by enableChannel) */ [0, false] remoteExecCall ["enableChannel", _owner]; -}; \ No newline at end of file +}; From 2731656338a080f90f41e9e66e8c881ea6adc161 Mon Sep 17 00:00:00 2001 From: Bob-Murphy <50651578+Bob-Murphy@users.noreply.github.com> Date: Tue, 31 Mar 2020 06:32:46 +0200 Subject: [PATCH 2/9] add missing comma --- AntistasiServerUtility/fn_onPlayerConnected.sqf | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/AntistasiServerUtility/fn_onPlayerConnected.sqf b/AntistasiServerUtility/fn_onPlayerConnected.sqf index 1b7a3d0..0608d0a 100644 --- a/AntistasiServerUtility/fn_onPlayerConnected.sqf +++ b/AntistasiServerUtility/fn_onPlayerConnected.sqf @@ -15,7 +15,7 @@ if (ASU_TSChannelName != "") then { //Set TS3 channel password for auto move - added by Bob Murphy 31.03.2020 if (ASU_TSChannelName !="") then { - [missionNamespace, ["tf_radio_channel_password", ASU_TSChannelPassword]] remoteExecCall ["setVariable" _owner]; + [missionNamespace, ["tf_radio_channel_password", ASU_TSChannelPassword]] remoteExecCall ["setVariable", _owner]; }; //diag_log "Player connected!"; From 67fadeadb611d2265ef87510dae1705027aef59b Mon Sep 17 00:00:00 2001 From: Bob-Murphy <50651578+Bob-Murphy@users.noreply.github.com> Date: Wed, 17 Jun 2020 17:43:13 +0200 Subject: [PATCH 3/9] typo fix --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index a55cf44..e1752d7 100644 --- a/README.md +++ b/README.md @@ -1,4 +1,4 @@ # Antistasi Server Utility This is a server side addon we use to customize our servers a bit: set up proper teamspeak channels, disable global chat at the hardcore server, perform performance logging, etc. -This addon is probably of no ineterest for anyone else. +This addon is probably of no interest for anyone else. From b8310035ae5562222d0b2ae311b8f37bec1a330e Mon Sep 17 00:00:00 2001 From: Bob-Murphy <50651578+Bob-Murphy@users.noreply.github.com> Date: Mon, 29 Jun 2020 15:28:48 +0200 Subject: [PATCH 4/9] Update README.md --- README.md | 1 + 1 file changed, 1 insertion(+) diff --git a/README.md b/README.md index e1752d7..00061df 100644 --- a/README.md +++ b/README.md @@ -2,3 +2,4 @@ This is a server side addon we use to customize our servers a bit: set up proper teamspeak channels, disable global chat at the hardcore server, perform performance logging, etc. This addon is probably of no interest for anyone else. +This is only compatible with TFAR 0.9.12. From 7461a58161b8429ff2ff28fe76df611cfa758499 Mon Sep 17 00:00:00 2001 From: Bob-Murphy <50651578+Bob-Murphy@users.noreply.github.com> Date: Mon, 29 Jun 2020 16:56:10 +0200 Subject: [PATCH 5/9] Update README.md --- README.md | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index 00061df..c888a89 100644 --- a/README.md +++ b/README.md @@ -2,4 +2,5 @@ This is a server side addon we use to customize our servers a bit: set up proper teamspeak channels, disable global chat at the hardcore server, perform performance logging, etc. This addon is probably of no interest for anyone else. -This is only compatible with TFAR 0.9.12. +This master-branch only compatible with TFAR 0.9.12. +The beta branch is compatible with the TFAR beta. From 5b6391ac87ce1edbbc8eb88f2babb5eb4bee559f Mon Sep 17 00:00:00 2001 From: Bob Murphy Date: Mon, 29 Jun 2020 16:57:54 +0200 Subject: [PATCH 6/9] delete outdated pbo --- .../Addons/AntistasiServerUtility.pbo | Bin 3803 -> 0 bytes 1 file changed, 0 insertions(+), 0 deletions(-) delete mode 100644 @AntistasiServerUtility/Addons/AntistasiServerUtility.pbo diff --git a/@AntistasiServerUtility/Addons/AntistasiServerUtility.pbo b/@AntistasiServerUtility/Addons/AntistasiServerUtility.pbo deleted file mode 100644 index ddecba64a2f6b642949b8aaf1e7cb097760f487b..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 3803 zcmbtXO>Y~=8D1(W5(*H|L+^P_ponDX!?J7_pb!)aE!!;oA&8O!gb|3*?kqXha%Vj= zYnc#y&82^!#~ga?4`?qv^y&fydM}XlT(r66nCG2Yt|*g+6O;hCJ2UUc^L`H_Yvf7v z)~7HsRj;DG+$rmXRXu55N^|T~rracoVx6aIxOt}XYkc4SbJYJwqdty{;@a{5{yOS^ z_dyh;`9S5$ZQ2*|^EtT*S zKQE*x{Ek-(V7=q$KS04)A@jO1fMlvTik~DxaXHd*g9Z>nShr0vanw|1$*bXesY37=Q%R9cyMH(2Q$ zOUtxKNSj0&FArYxSVcY|oqAn?m7$K6wcz=`!G!MV8;Du)p&IMk!tr0%%T#);gK$gK7jekn^Zf?i^`%rhOI1H8A= z7uP%VR|V(we-VoBz3SQ972k|hHjTe4%XJplVq=>%RjGo6D5X& zOb@BmM{hf&F6y;Si_HmX+(zt`3zY|!f%PK_9o#$O>9eQ%e8wk7z0OErj$}`(Qg7`N zQq8Zb>^^$1cSv!d@@eBn$n+qRLuW4(W(Tc?9p+r4MAIe9Ig%(+^pJ@z4RJTQ;hOJ`viE6dU=f`4y zO{pq{lt|~NXYl&GmmcjM-tRm+^qy)q7y9Z**mHWIO)Tk9BuWF&wioAv2km$d0sj>>G64Zs=yQnY_>B{bRZfli?Leofa{jZI`K%FNMaEg_5*>Q{NYZ;UqW+VPZ2g-&hi_)!j5TvK#oI&V02+Vtz~ z)_Mhj)9iGYLV<8jsgzddgLH!j&>A=CoH#dJIxrlmL6y$~7K}Qd)RC&hSjzprQ0?adCy>s?wipv<;lbnS!aCbTrimNj)dU*n_NPLtrgD1gMr?7|m^$ zqqJD~3`8G-DahxlXw&CfXHw)qnW*G<-Gldv09TDfU*r;5R(sm7*<%ZhoWT(Yr$BCQ zarFJlBHC~yBHS9lX8&Z+{spT2({uZ`k+5BiRFfhkty3h@$})<+CmkL2cIrmzt>)Vn zZcm!V`lbA-Io$V`44t!cE$)SK9rzX|HsH)9_US1ZIo3|@zmjoBpgs3nxaph-qXaHw zU>SH*7&uoKgRcv^N_xICgufm)xMy4e4_z+I8B|`~LT4(F`=7F`iiVj!Lu*7S;!ct$ zbn>iw;G5=^zKS%dFwd~?%<|fOlO4(UymoCOZERHG|Gp4Uls1i=D{Omf3pdX(Uu`D% ze`Z~YPOyostqXOowq(wzs&U9TZsO+_n!`hn6N_yudMZJrnz!-VfiU34YKN(eE(^Th z!FzQp!|EG4$6Y>XDH&c30;GN(rt1!Hv6~MDMcfY l3qp8}t@b3rz{pJ_H`VrJ9kyro# From 90c8be6abb8603118dbbed2bc8b46df3ce4bb2dd Mon Sep 17 00:00:00 2001 From: Bob Murphy Date: Mon, 29 Jun 2020 17:05:28 +0200 Subject: [PATCH 7/9] TFAR variable name adjustments Following variable name changes were made: tf_radio_channel_name --> TFAR_Teamspeak_Channel_Name tf_radio_channel_password --> TFAR_Teamspeak_Channel_Password --- AntistasiServerUtility/fn_init.sqf | 4 ++-- AntistasiServerUtility/fn_onPlayerConnected.sqf | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/AntistasiServerUtility/fn_init.sqf b/AntistasiServerUtility/fn_init.sqf index 1e7fccc..bb4245b 100644 --- a/AntistasiServerUtility/fn_init.sqf +++ b/AntistasiServerUtility/fn_init.sqf @@ -29,8 +29,8 @@ switch (serverName) do { // Tell me your name! }; if (ASU_TSChannelName != "") then { - tf_radio_channel_name = ASU_TSChannelName; - tf_radio_channel_password = ASU_TSChannelPassword; // added by Bob Murphy 31.03.2020 + TFAR_Teamspeak_Channel_Name = ASU_TSChannelName; + TFAR_Teamspeak_Channel_Password = ASU_TSChannelPassword; // added by Bob Murphy 31.03.2020 }; addMissionEventHandler ["PlayerConnected", ASU_fnc_onPlayerConnected]; diff --git a/AntistasiServerUtility/fn_onPlayerConnected.sqf b/AntistasiServerUtility/fn_onPlayerConnected.sqf index 0608d0a..b0e29b1 100644 --- a/AntistasiServerUtility/fn_onPlayerConnected.sqf +++ b/AntistasiServerUtility/fn_onPlayerConnected.sqf @@ -10,12 +10,12 @@ params ["_id", "_uid", "_name", "_jip", "_owner", "_hasInterface"]; // Set TS3 channel name for auto move if (ASU_TSChannelName != "") then { - [missionNamespace, ["tf_radio_channel_name", ASU_TSChannelName]] remoteExecCall ["setVariable", _owner]; + [missionNamespace, ["TFAR_Teamspeak_Channel_Name", ASU_TSChannelName]] remoteExecCall ["setVariable", _owner]; }; //Set TS3 channel password for auto move - added by Bob Murphy 31.03.2020 if (ASU_TSChannelName !="") then { - [missionNamespace, ["tf_radio_channel_password", ASU_TSChannelPassword]] remoteExecCall ["setVariable", _owner]; + [missionNamespace, ["TFAR_Teamspeak_Channel_Password", ASU_TSChannelPassword]] remoteExecCall ["setVariable", _owner]; }; //diag_log "Player connected!"; From 28eb31d06c80d189427b96def31d11230684c73e Mon Sep 17 00:00:00 2001 From: Bob Murphy Date: Mon, 29 Jun 2020 20:56:10 +0200 Subject: [PATCH 8/9] Combines TFAR 0.9.12 and TFAR BETA setting --- AntistasiServerUtility/fn_init.sqf | 8 ++++++-- AntistasiServerUtility/fn_onPlayerConnected.sqf | 6 ++++-- 2 files changed, 10 insertions(+), 4 deletions(-) diff --git a/AntistasiServerUtility/fn_init.sqf b/AntistasiServerUtility/fn_init.sqf index bb4245b..39d951b 100644 --- a/AntistasiServerUtility/fn_init.sqf +++ b/AntistasiServerUtility/fn_init.sqf @@ -29,8 +29,12 @@ switch (serverName) do { // Tell me your name! }; if (ASU_TSChannelName != "") then { - TFAR_Teamspeak_Channel_Name = ASU_TSChannelName; - TFAR_Teamspeak_Channel_Password = ASU_TSChannelPassword; // added by Bob Murphy 31.03.2020 + tf_radio_channel_name = ASU_TSChannelName; //for TFAR 0.9.12 + tf_radio_channel_password = ASU_TSChannelPassword; //for TFAR 0.9.12 + TFAR_Teamspeak_Channel_Name = ASU_TSChannelName; //for TFAR BETA + TFAR_Teamspeak_Channel_Password = ASU_TSChannelPassword; //for TFAR BETA + + }; addMissionEventHandler ["PlayerConnected", ASU_fnc_onPlayerConnected]; diff --git a/AntistasiServerUtility/fn_onPlayerConnected.sqf b/AntistasiServerUtility/fn_onPlayerConnected.sqf index b0e29b1..ff60430 100644 --- a/AntistasiServerUtility/fn_onPlayerConnected.sqf +++ b/AntistasiServerUtility/fn_onPlayerConnected.sqf @@ -10,12 +10,14 @@ params ["_id", "_uid", "_name", "_jip", "_owner", "_hasInterface"]; // Set TS3 channel name for auto move if (ASU_TSChannelName != "") then { - [missionNamespace, ["TFAR_Teamspeak_Channel_Name", ASU_TSChannelName]] remoteExecCall ["setVariable", _owner]; + [missionNamespace, ["tf_radio_channel_name", ASU_TSChannelName]] remoteExecCall ["setVariable", _owner]; //for TFAR 0.9.12 + [missionNamespace, ["TFAR_Teamspeak_Channel_Name", ASU_TSChannelName]] remoteExecCall ["setVariable", _owner]; //for TFAR BETA }; //Set TS3 channel password for auto move - added by Bob Murphy 31.03.2020 if (ASU_TSChannelName !="") then { - [missionNamespace, ["TFAR_Teamspeak_Channel_Password", ASU_TSChannelPassword]] remoteExecCall ["setVariable", _owner]; + [missionNamespace, ["tf_radio_channel_password", ASU_TSChannelPassword]] remoteExecCall ["setVariable", _owner]; //for TFAR 0.9.12 + [missionNamespace, ["TFAR_Teamspeak_Channel_Password", ASU_TSChannelPassword]] remoteExecCall ["setVariable", _owner]; //for TFAR BETA }; //diag_log "Player connected!"; From 4fe4f4181e4a0b108ee03e7907668e0ae066f0e2 Mon Sep 17 00:00:00 2001 From: Bob-Murphy <50651578+Bob-Murphy@users.noreply.github.com> Date: Mon, 29 Jun 2020 20:59:26 +0200 Subject: [PATCH 9/9] Update README.md --- README.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index c888a89..8407954 100644 --- a/README.md +++ b/README.md @@ -2,5 +2,5 @@ This is a server side addon we use to customize our servers a bit: set up proper teamspeak channels, disable global chat at the hardcore server, perform performance logging, etc. This addon is probably of no interest for anyone else. -This master-branch only compatible with TFAR 0.9.12. -The beta branch is compatible with the TFAR beta. +The code is now compatible with TFAR 0.9.12 as well as TFAR BETA (updated and tested with version 1.-1.0.325) +