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

SendAreaTriggerMessage not fmt formatted #20006

Open
sogladev opened this issue Sep 20, 2024 · 3 comments
Open

SendAreaTriggerMessage not fmt formatted #20006

sogladev opened this issue Sep 20, 2024 · 3 comments

Comments

@sogladev
Copy link
Contributor

Current Behaviour

wrong format error message when trying to enter an instance "You must be at least level {} to enter."

area_trigger

Expected Blizzlike Behaviour

{} should be 70 in this case

Source

void WorldSession::SendAreaTriggerMessage(const char* Text, ...)

likely this as well

void WorldSession::SendAreaTriggerMessage(uint32 entry, ...)

Steps to reproduce the problem

level <70

  1. .go xyz 3088 1375 185 530 4.6
  2. try to enter

Extra Notes

No response

AC rev. hash/commit

a196f7f

Operating system

ubuntu 24.04

Custom changes or Modules

No response

@TheSCREWEDSoftware

This comment has been minimized.

@Kitzunu
Copy link
Member

Kitzunu commented Sep 21, 2024

Easy fix. I can add it to my todo list of things for when I have time to fix it. Otherwise, just look at any of my previous commits

@Kitzunu Kitzunu changed the title AreaTrigger formatting "You must be at least level {} to enter." SendAreaTriggerMessage not fmt formatted Sep 21, 2024
@kissingers
Copy link
Contributor

Also there is many incomplete hpylink message at server.log, same as this, after the message change pr

2024-09-22 12:22:45 Player Horse GUID Full: 0x0000000000003f98 Type: Player Low: 16280 sent a message with an invalid link:
%.*s
2024-09-22 12:22:45 Player Harper GUID Full: 0x0000000000003fb3 Type: Player Low: 16307 sent a message with an invalid link:
%.*s
2024-09-22 12:22:45 Player Have GUID Full: 0x0000000000003f8f Type: Player Low: 16271 sent a message with an invalid link:
%.*s
2024-09-22 12:22:45 Player Hopeful GUID Full: 0x0000000000003fa1 Type: Player Low: 16289 sent a message with an invalid link:
%.*s

which at WorldSession.cpp 767 line

bool WorldSession::ValidateHyperlinksAndMaybeKick(std::string_view str)
{
if (Acore::Hyperlinks::CheckAllLinks(str))
return true;

LOG_ERROR("network", "Player {} {} sent a message with an invalid link:\n%.*s", GetPlayer()->GetName(),
    GetPlayer()->GetGUID().ToString(), STRING_VIEW_FMT_ARG(str));

if (sWorld->getIntConfig(CONFIG_CHAT_STRICT_LINK_CHECKING_KICK))
    KickPlayer("WorldSession::ValidateHyperlinksAndMaybeKick Invalid chat link");

return false;

}

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

No branches or pull requests

4 participants