feat(Core/Chat): new argument parsing and unify chat hyperlink parsing (#6243)

This commit is contained in:
Kargatum
2021-10-23 15:15:42 +07:00
committed by GitHub
parent 1101f9dd2a
commit bc9473482e
90 changed files with 4280 additions and 2508 deletions

View File

@@ -309,6 +309,13 @@ public:
void KickPlayer(bool setKicked = true) { return this->KickPlayer("Unknown reason", setKicked); }
void KickPlayer(std::string const& reason, bool setKicked = true);
// Returns true if all contained hyperlinks are valid
// May kick player on false depending on world config (handler should abort)
bool ValidateHyperlinksAndMaybeKick(std::string_view str);
// Returns true if the message contains no hyperlinks
// May kick player on false depending on world config (handler should abort)
bool DisallowHyperlinksAndMaybeKick(std::string_view str);
void QueuePacket(WorldPacket* new_packet);
bool Update(uint32 diff, PacketFilter& updater);