summaryrefslogtreecommitdiff
path: root/src/client
diff options
context:
space:
mode:
authorTim Angus <tim@ngus.net>2006-12-03 23:01:59 +0000
committerTim Angus <tim@ngus.net>2006-12-03 23:01:59 +0000
commit6b892b39592bc3fdf7e94616917f39ec071d390d (patch)
tree6da91cb1747f98967296fbeaec88e68f242a857a /src/client
parent344618181104012d609532848c5b1b0529247fa2 (diff)
* Strip leading whitespace when displaying server names in the browser
* Sort by server name on alpha characters only * Refresh master server IP address cache on map change
Diffstat (limited to 'src/client')
-rw-r--r--src/client/cl_ui.c23
1 files changed, 22 insertions, 1 deletions
diff --git a/src/client/cl_ui.c b/src/client/cl_ui.c
index caa9179f..3b35709a 100644
--- a/src/client/cl_ui.c
+++ b/src/client/cl_ui.c
@@ -410,7 +410,28 @@ static int LAN_CompareServers( int source, int sortKey, int sortDir, int s1, int
res = 0;
switch( sortKey ) {
case SORT_HOST:
- res = Q_stricmp( server1->hostName, server2->hostName );
+ {
+ char hostName1[ MAX_HOSTNAME_LENGTH ];
+ char hostName2[ MAX_HOSTNAME_LENGTH ];
+ char *p;
+ int i;
+
+ for( p = server1->hostName, i = 0; *p != '\0'; p++ )
+ {
+ if( Q_isalpha( *p ) )
+ hostName1[ i++ ] = *p;
+ }
+ hostName1[ i ] = '\0';
+
+ for( p = server2->hostName, i = 0; *p != '\0'; p++ )
+ {
+ if( Q_isalpha( *p ) )
+ hostName2[ i++ ] = *p;
+ }
+ hostName2[ i ] = '\0';
+
+ res = Q_stricmp( hostName1, hostName2 );
+ }
break;
case SORT_MAP: