Don't show "All" room when hosting

This commit is contained in:
James R 2020-03-01 11:19:59 -08:00
parent 8756ef15a2
commit 1959a9b107
2 changed files with 13 additions and 8 deletions

View file

@ -143,7 +143,7 @@ HMS_in_use (void)
} }
void void
HMS_fetch_rooms (void) HMS_fetch_rooms (int joining)
{ {
struct HMS_buffer *hms; struct HMS_buffer *hms;
char *p; char *p;
@ -179,12 +179,17 @@ HMS_fetch_rooms (void)
break; break;
} }
room_list[i].header.buffer[0] = 1; if (joining)
room_list[i].id = 0; {
strcpy(room_list[i].name, "All"); room_list[i].header.buffer[0] = 1;
strcpy(room_list[i].motd, "Wildcard."); room_list[i].id = 0;
strcpy(room_list[i].name, "All");
strcpy(room_list[i].motd, "Wildcard.");
room_list[i + 1].header.buffer[0] = 0; i++;
}
room_list[i].header.buffer[0] = 0;
} }
HMS_end(hms); HMS_end(hms);
} }

View file

@ -99,7 +99,7 @@
/* HTTP */ /* HTTP */
int HMS_in_use (void); int HMS_in_use (void);
void HMS_fetch_rooms (void); void HMS_fetch_rooms (int joining);
int HMS_register (void); int HMS_register (void);
void HMS_unlist (void); void HMS_unlist (void);
void HMS_update (void); void HMS_update (void);
@ -498,7 +498,7 @@ INT32 GetRoomsList(boolean hosting)
if (HMS_in_use()) if (HMS_in_use())
{ {
HMS_fetch_rooms(); HMS_fetch_rooms( ! hosting );
return 1; return 1;
} }