iw4x-client/src/Components/Modules/Party.hpp
momo5502 2969ae64e0 [Dedicated] Add sv_motd dvar, so serverowners can set motds
The motd will be displayed instead of the didyouknow messages in the
loadscreen
2016-11-27 14:30:21 +01:00

54 lines
1.2 KiB
C++

namespace Components
{
class Party : public Component
{
public:
Party();
~Party();
#if defined(DEBUG) || defined(FORCE_UNIT_TESTS)
const char* getName() { return "Party"; };
#endif
static Network::Address Target();
static void Connect(Network::Address target);
static const char* GetLobbyInfo(SteamID lobby, std::string key);
static void RemoveLobby(SteamID lobby);
static bool PlaylistAwaiting();
static void PlaylistContinue();
static void PlaylistError(std::string error);
static void ConnectError(std::string message);
static std::string GetMotd();
private:
class JoinContainer
{
public:
Network::Address target;
std::string challenge;
std::string motd;
DWORD joinTime;
bool valid;
int matchType;
Utils::InfoString info;
// Party-specific stuff
DWORD requestTime;
bool awaitingPlaylist;
};
static JoinContainer Container;
static std::map<uint64_t, Network::Address> LobbyMap;
static SteamID GenerateLobbyId();
static Game::dvar_t* RegisterMinPlayers(const char* name, int value, int min, int max, Game::dvar_flag flag, const char* description);
static DWORD UIDvarIntStub(char* dvar);
};
}