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

[Bug] Anon players should not show in /who all #4392

Merged
merged 1 commit into from
Jun 14, 2024

Conversation

fryguy503
Copy link
Contributor

Description

Updated to properly filter anon players from /who all.

The code formatting was very inconsistant and needed cleanup.

Type of change

Please delete options that are not relevant.

  • Bug fix (non-breaking change which fixes an issue)

Testing

The /anon player is in Gunthak for this example, other player is in Dulak

Myself in anon mode doing /who (Not /who all) - Same zone

image

Myself in anon mode doing /who all gunthak

image

Player in another zone doing /who all gunthak

image

Player in another zone doing /who all strung (Strung is the anon players name)

image

Checklist

  • I have tested my changes
  • I have performed a self-review of my code. Ensuring variables, functions and methods are named in a human-readable way, comments are added only where naming of variables, functions and methods can't give enough context.
  • I own the changes of my code and take responsibility for the potential issues that occur

Updated to properly filter anon players from /who all.

The code formatting was very inconsistant and needed cleanup.
@Akkadius
Copy link
Member

It's really hard to tell what actually changed in this PR. Formatting that is this sweeping should generally be separate from logic changes.

@fryguy503
Copy link
Contributor Author

tl;dr it is roughly this for anon/rp coverage

				} else if (((countcle->Anon() == 1 && admin <= countcle->Admin()) && whomlen != 0 &&
							strncasecmp(countcle->name(), whom->whom, whomlen) == 0)) {
					totalusers++;
					if (totalusers <= 20 || admin >= AccountStatus::GMAdmin) {
						totallength = totallength + strlen(countcle->name()) + strlen(countcle->AccountName()) +
									strlen(guild_mgr.GetGuildName(countcle->GuildID())) + 5;
					}
				} else if (((countcle->Anon() == 2 && admin <= countcle->Admin()) && whomlen != 0 &&
							(strncasecmp(countcle->name(), whom->whom, whomlen) == 0 ||
							strncasecmp(guild_mgr.GetGuildName(countcle->GuildID()), whom->whom, whomlen) == 0))) {
					totalusers++;
					if (totalusers <= 20 || admin >= AccountStatus::GMAdmin) {
						totallength = totallength + strlen(countcle->name()) + strlen(countcle->AccountName()) +
									strlen(guild_mgr.GetGuildName(countcle->GuildID())) + 5;
					}
				}

@Akkadius
Copy link
Member

That helps, even with the formatting this function needs a tremendous amount of help

@Akkadius Akkadius merged commit 7362c0e into master Jun 14, 2024
2 checks passed
@Akkadius Akkadius deleted the trust/who_all_anon_updates_cleanup branch June 14, 2024 17:39
@Akkadius Akkadius mentioned this pull request Jun 14, 2024
catapultam-habeo pushed a commit to The-Heroes-Journey-EQEMU/Server that referenced this pull request Jul 14, 2024
Updated to properly filter anon players from /who all.

The code formatting was very inconsistant and needed cleanup.
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.

None yet

2 participants