Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

UI - Add password fill compatiblity for "connectToServer" (2.19+) #1726

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

veteran29
Copy link
Member

When merged this pull request will:

https://github.com/CBATeam/CBA_A3/blob/master/addons/ui/fnc_initDisplayPassword.sqf#L6
`_targetServer = _display getVariable "guid"; // 127.0.0.1:2302 always the resolved IP address, not the domain`
Starting with next week dev, and profiling branch v20
The variable is set before the init event, it should always be present

`diag_log [_display, _display getVariable ["guid", "?"]];`
`11:39:47 [Display #64,"164.152.123.222:2331"]`

@@ -1,4 +1,6 @@
#include "script_component.hpp"
// since 2.19 "server:port" is stored on the display in "guid" variable, makes password filling compatible with "connectToServer" command
#define GET_SERVER (if (productVersion#2 > 218) then {_display getVariable "guid"} else {_ctrlServerList lbData lbCurSel _ctrlServerList})
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

do we need this for the profiling branch (will still be 218)?

Copy link
Contributor

@dedmen dedmen Jan 10, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes on current profiling branch.
Also you don't need to check for product version, the variable is always set in versions that support it. Just use the default value as fallback.
So put the lbData as a default value.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants