2017-01-20 08:36:52 -05:00
|
|
|
#pragma once
|
|
|
|
|
2017-01-19 16:23:59 -05:00
|
|
|
namespace Components
|
|
|
|
{
|
|
|
|
class PlayerName : public Component
|
|
|
|
{
|
|
|
|
public:
|
|
|
|
PlayerName();
|
2021-09-07 09:06:58 -04:00
|
|
|
|
|
|
|
static void UserInfoCopy(char* buffer, const char* name, size_t size);
|
2017-01-19 16:23:59 -05:00
|
|
|
|
|
|
|
private:
|
2021-09-07 09:06:58 -04:00
|
|
|
static Dvar::Var sv_allowColoredNames;
|
2022-04-19 09:26:29 -04:00
|
|
|
// Message used when kicking players
|
|
|
|
static constexpr auto INVALID_NAME_MSG = "Invalid name detected";
|
2017-01-19 16:23:59 -05:00
|
|
|
|
2021-09-07 09:06:58 -04:00
|
|
|
static char* CleanStrStub(char* string);
|
2022-04-19 09:26:29 -04:00
|
|
|
static void ClientCleanName();
|
2021-09-07 09:06:58 -04:00
|
|
|
static char* GetClientName(int localClientNum, int index, char* buf, size_t size);
|
2022-04-19 09:26:29 -04:00
|
|
|
|
|
|
|
static bool CopyClientNameCheck(char* dest, const char* source, int size);
|
|
|
|
static void SV_UserinfoChangedStub();
|
2017-01-19 16:23:59 -05:00
|
|
|
};
|
|
|
|
}
|