]> icculus.org git repositories - divverent/nexuiz.git/blob - data/menuqc/base/hostcache.qc
rename menu directories
[divverent/nexuiz.git] / data / menuqc / base / hostcache.qc
1 // DP/Nex Menu
2 // base/hostcache.qc
3
4 void() HostCache_Init =
5 {
6         SLIST_FIELD_CNAME = gethostcacheindexforkey( "cname" );
7         SLIST_FIELD_PING = gethostcacheindexforkey( "ping" );
8         SLIST_FIELD_GAME = gethostcacheindexforkey( "game" );
9         SLIST_FIELD_MOD = gethostcacheindexforkey( "mod" );
10         SLIST_FIELD_MAP = gethostcacheindexforkey( "map" );
11         SLIST_FIELD_NAME = gethostcacheindexforkey( "name" );
12         SLIST_FIELD_MAXPLAYERS = gethostcacheindexforkey( "maxplayers" );
13         SLIST_FIELD_NUMPLAYERS = gethostcacheindexforkey( "numplayers" );
14         SLIST_FIELD_PROTOCOL = gethostcacheindexforkey( "protocol" );
15 };
16
17 void() HostCache_Update =
18 {
19         HostCache_ViewCount = gethostcachevalue( SLIST_HOSTCACHEVIEWCOUNT );
20         HostCache_TotalCount = gethostcachevalue( SLIST_HOSTCACHETOTALCOUNT );
21         HostCache_MasterQueryCount = gethostcachevalue( SLIST_MASTERQUERYCOUNT );
22         HostCache_MasterReplyCount = gethostcachevalue( SLIST_MASTERREPLYCOUNT );
23         HostCache_ServerQueryCount = gethostcachevalue( SLIST_SERVERQUERYCOUNT );
24         HostCache_ServerReplyCount = gethostcachevalue( SLIST_SERVERREPLYCOUNT );
25         HostCache_SortField = gethostcachevalue( SLIST_SORTFIELD );
26         HostCache_SortDescending = gethostcachevalue( SLIST_SORTDESCENDING );
27 };
28
29 void() HostCache_ResortViewSet =
30 {
31         resorthostcache();
32         HostCache_Update();
33 };
34
35 void() HostCache_RefreshHostCache =
36 {
37         refreshhostcache();
38         HostCache_Update();
39 };