29 #include "../../idlib/precompiled.h"
140 common->
DPrintf(
"idServerScan::InfoResponse NET_SCAN: reply from unknown %s\n", serv.
c_str() );
147 server.
id = iserv.
id;
153 for (
int i = 0;
i <
Num() ;
i++ ) {
154 if ( memcmp( &(*
this)[
i ].adr, &server.
adr,
sizeof(
netadr_t) ) == 0 ) {
155 common->
DPrintf(
"idServerScan::InfoResponse LAN_SCAN: duplicate server %s\n", serv.
c_str() );
198 common->
DPrintf(
"idServerScan::AddServer: failed to parse server %s\n", srv );
359 for ( i = 0 ; i < ic ; i++ ) {
360 if ( (*
this)[ i ].ping < serv.
ping ) {
392 if ( i == -1 || i >=
Num() ) {
409 for (
int j = 0;
j < 8;
j++ ) {
410 if ( (*
this)[
i].clients >
j ) {
419 m_pGUI->
SetStateString(
"server_gameType", (*
this)[ i ].serverInfo.GetString(
"si_gameType" ) );
421 if ( (*
this)[ i ].serverInfo.GetBool(
"si_usePass" ) ) {
456 name +=
"mtr_doom3XPIcon";
458 name +=
"mtr_doom3Mod";
460 name +=
"mtr_doom3Icon";
464 name += ( server.
ping > -1 ) ?
va(
"%i\t", server.
ping ) :
"na\t";
489 GUIAdd( m_sortedServers[ i ], serv );
510 if ( ( server.
OSMask & ( 1 << BUILD_OS_ID ) ) == 0 ) {
515 if ( ( server.
OSMask & ( 1 << BUILD_OS_ID ) ) == 0 ) {
523 if ( keyval->
GetValue()[ 0 ] ==
'0' ) {
528 if ( keyval->
GetValue()[ 0 ] !=
'0' ) {
593 serv1 = (*l_serverScan)[ *
a ];
594 serv2 = (*l_serverScan)[ *
b ];
595 switch ( l_serverScan->
m_sort ) {
609 return s1.
Icmp( s2 );
613 return s1.
Icmp( s2 );
617 return s1.
Icmp( s2 );
int InfoResponse(networkServer_t &server)
idCVar gui_filter_game("gui_filter_game","0", CVAR_GUI|CVAR_INTEGER|CVAR_ARCHIVE,"Game filter")
static const int INCOMING_TIMEOUT
void GUIUpdateSelected(void)
virtual void Add(int id, const idStr &s)=0
int GetInt(const char *key, const char *defaultString="0") const
int Cmp(const char *text) const
void Delete(const char *key)
bool IsFiltered(const networkServer_t server)
static const int MAX_PINGREQUESTS
virtual void SetStateString(const char *varName, const char *value)=0
virtual void virtual void virtual const idLangDict * GetLanguageDict(void)=0
const idStr & GetKey(void) const
idCVar gui_filter_idle("gui_filter_idle","0", CVAR_GUI|CVAR_INTEGER|CVAR_ARCHIVE,"Idle servers filter")
static idAsyncClient client
int Sys_Milliseconds(void)
void GetServerInfo(const netadr_t adr)
idFileSystem * fileSystem
bool Sys_StringToNetAdr(const char *s, netadr_t *a, bool doDNSResolve)
virtual void FindMapScreenshot(const char *path, char *buf, int len)=0
idCVar gui_filter_gameType("gui_filter_gameType","0", CVAR_GUI|CVAR_INTEGER|CVAR_ARCHIVE,"Gametype filter")
virtual void SetStateChanges(bool enable)=0
void Set(const char *key, const char *value)
idUserInterfaceManager * uiManager
static const int REPLY_TIMEOUT
int IcmpNoColor(const char *text) const
int Icmp(const char *text) const
void GUIAdd(int id, const networkServer_t server)
void Sort(cmp_t *compare=(cmp_t *)&idListSortCompare< type >)
const char * GetString(const char *key, const char *defaultString="") const
static int Cmp(const int *a, const int *b)
virtual idListGUI * AllocListGUI(void) const =0
idCVar gui_filter_players("gui_filter_players","0", CVAR_GUI|CVAR_INTEGER|CVAR_ARCHIVE,"Players filter")
virtual const idDecl * FindType(declType_t type, const char *name, bool makeDefault=true)=0
int GetInteger(void) const
virtual int GetSelection(char *s, int size, int sel=0) const =0
const char * GetString(const char *str) const
static const int REFRESH_START
virtual void FreeListGUI(idListGUI *listgui)=0
const idStr & GetValue(void) const
void AddServer(int id, const char *srv)
void GUIConfig(idUserInterface *pGUI, const char *name)
void StartServers(bool timeout)
const idKeyValue * FindKey(const char *key) const
GLubyte GLubyte GLubyte a
virtual void Printf(const char *fmt,...) id_attribute((format(printf
virtual bool IsConfigured(void) const =0
const char * Sys_NetAdrToString(const netadr_t a)
virtual void Config(idUserInterface *pGUI, const char *name)=0
idDeclManager * declManager
int Append(const networkServer_t &obj)
void SetInt(const char *key, int val)
virtual void Clear(void)=0
idList< inServer_t > net_servers
void EmitGetInfo(netadr_t &serv)
void SetSorting(serverSort_t sort)
idCVar si_map("si_map","game/mp/d3dm1", CVAR_GAME|CVAR_SERVERINFO|CVAR_ARCHIVE,"map to be played next on server", idCmdSystem::ArgCompletion_MapName)
const char * c_str(void) const
const idKeyValue * GetKeyVal(int index) const
const char * l_gameTypes[]
char * va(const char *fmt,...)
idList< int > m_sortedServers
virtual void DPrintf(const char *fmt,...) id_attribute((format(printf
idCVar gui_filter_password("gui_filter_password","0", CVAR_GUI|CVAR_INTEGER|CVAR_ARCHIVE,"Password filter")
int GetNumKeyVals(void) const
bool GetBestPing(networkServer_t &serv)
ID_INLINE T Min(T x, T y)
virtual bool HasD3XP(void)=0