Skip to content

Commit

Permalink
IO - Fix non-ASCII characters breaking channel switching (#1326)
Browse files Browse the repository at this point in the history
Co-authored-by: jonpas <[email protected]>
  • Loading branch information
jokoho48 and jonpas authored May 29, 2024
1 parent 1385ce4 commit 7469eef
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion addons/sys_io/fnc_ts3ChannelMove.sqf
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,11 @@
* Public: No
*/

private _ts3ChannelDetails = format ["%1,%2,%3", EGVAR(sys_core,ts3ChannelName), EGVAR(sys_core,ts3ChannelPassword), serverName];
private _serverName = toString ((toArray serverName) select {_x < 127});
if (_serverName == "") then {
_serverName = "Unsupported Server Name";
WARNING_1("Server name '%1' did not include any valid (ASCII) characters and got fully sanitized!",serverName)
};
private _ts3ChannelDetails = format ["%1,%2,%3", EGVAR(sys_core,ts3ChannelName), EGVAR(sys_core,ts3ChannelPassword), _serverName];
TRACE_1("Moving TS3 Channel",_ts3ChannelDetails);
["setTs3ChannelDetails",_ts3ChannelDetails] call EFUNC(sys_rpc,callRemoteProcedure);

0 comments on commit 7469eef

Please sign in to comment.