iw4x-client/src/Components/Modules/PlayerName.hpp

26 lines
617 B
C++
Raw Normal View History

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();
static void UserInfoCopy(char* buffer, const char* name, size_t size);
2017-01-19 16:23:59 -05:00
static int GetClientName(int localClientNum, int index, char* buf, int size);
2017-01-19 16:23:59 -05:00
private:
static Dvar::Var sv_allowColoredNames;
// Message used when kicking players
static constexpr auto INVALID_NAME_MSG = "Invalid name detected";
2017-01-19 16:23:59 -05:00
static char* CleanStrStub(char* string);
static void ClientCleanName();
static bool CopyClientNameCheck(char* dest, const char* source, int size);
static void SV_UserinfoChangedStub();
2017-01-19 16:23:59 -05:00
};
}