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

Several community upgrades #35

Closed
wants to merge 0 commits into from

Conversation

AdminChucky
Copy link
Contributor

@AdminChucky AdminChucky commented May 7, 2024

Description

  • Fix an error at n-ice/btpro while community server has been changed by leaving and joining in game
  • Identify community server and show needed login buttons only.
  • Add admin login support for n-ice/btpro
  • Fix cfg-file crash

};


static const char *const INI_SERVER_KEYS[] = {

Check notice

Code scanning / CodeQL

Unused static variable

Static variable INI_SERVER_KEYS is never read.
} else if (_network_server_name.find("reddit.com") != std::string::npos) {
if (GetServerItem(COMMUNITY) != "4") {
SetServerItem(COMMUNITY, "4");
// GetCommunityServerListText();

Check notice

Code scanning / CodeQL

Commented-out code

This comment appears to contain commented-out code.
std::string::npos) {
if (GetServerItem(COMMUNITY) != "3") {
SetServerItem(COMMUNITY, "3");
// GetCommunityServerListText();

Check notice

Code scanning / CodeQL

Commented-out code

This comment appears to contain commented-out code.
} else if (_network_server_name.find("BTPro.nl") != std::string::npos) {
if (GetServerItem(COMMUNITY) != "2") {
SetServerItem(COMMUNITY, "2");
// GetCommunityServerListText();

Check notice

Code scanning / CodeQL

Commented-out code

This comment appears to contain commented-out code.
if (_network_server_name.find("n-ice.org") != std::string::npos) {
if (GetServerItem(COMMUNITY) != "1") {
SetServerItem(COMMUNITY, "1");
// GetCommunityServerListText();

Check notice

Code scanning / CodeQL

Commented-out code

This comment appears to contain commented-out code.
switch (_community) {
case 1: SetLoginItem(NICE_ADMIN_PW, base64_encode((const unsigned char *)str, strlen(str))); break;
case 2: SetLoginItem(BTPRO_ADMIN_PW, base64_encode((const unsigned char *)str, strlen(str))); break;
//case 3: SetLoginItem(NOVAPOLIS_PW, str); break;

Check notice

Code scanning / CodeQL

Commented-out code

This comment appears to contain commented-out code.
if(_networking) NetworkClientSendChatToServer(fmt::format("!alogin {} {}", _inilogindata[BTPROUSER], base64_decode(_inilogindata[BTPROADMINPW])));
break;
}
//case 3: if(/*_novahost && */_networking) AccountLogin(CITYMANIA); break;

Check notice

Code scanning / CodeQL

Commented-out code

This comment appears to contain commented-out code.
switch (_community) {
case 1: SetDParam(0, (GetLoginItem(NICE_ADMIN_PW).empty() ? CM_STR_LOGIN_WINDOW_NOT_SET : CM_STR_LOGIN_WINDOW_SET)); break;
case 2: SetDParam(0, (GetLoginItem(BTPRO_ADMIN_PW).empty() ? CM_STR_LOGIN_WINDOW_NOT_SET : CM_STR_LOGIN_WINDOW_SET)); break;
//case 3: SetDParam(0, (GetLoginItem(NOVAPOLIS_PW).empty() ? CM_STR_LOGIN_WINDOW_NOT_SET : CM_STR_LOGIN_WINDOW_SET)); break;

Check notice

Code scanning / CodeQL

Commented-out code

This comment appears to contain commented-out code.
IniItem &item = group.GetOrCreateItem(itemname);
item.SetValue(value);
_inilogin->SaveToDisk(fmt::format("{}{}", _personal_dir, CFG_FILE));
//IniReloadLogin();

Check notice

Code scanning / CodeQL

Commented-out code

This comment appears to contain commented-out code.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant