diff --git a/src/hms123311.c b/src/hms123311.c index 10fdf6b9..d9d4fa2f 100644 --- a/src/hms123311.c +++ b/src/hms123311.c @@ -143,7 +143,7 @@ HMS_in_use (void) } void -HMS_fetch_rooms (void) +HMS_fetch_rooms (int joining) { struct HMS_buffer *hms; char *p; @@ -179,12 +179,17 @@ HMS_fetch_rooms (void) break; } - room_list[i].header.buffer[0] = 1; - room_list[i].id = 0; - strcpy(room_list[i].name, "All"); - strcpy(room_list[i].motd, "Wildcard."); + if (joining) + { + room_list[i].header.buffer[0] = 1; + 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); } diff --git a/src/mserv.c b/src/mserv.c index acc247e3..5a3ef1e2 100644 --- a/src/mserv.c +++ b/src/mserv.c @@ -99,7 +99,7 @@ /* HTTP */ int HMS_in_use (void); -void HMS_fetch_rooms (void); +void HMS_fetch_rooms (int joining); int HMS_register (void); void HMS_unlist (void); void HMS_update (void); @@ -498,7 +498,7 @@ INT32 GetRoomsList(boolean hosting) if (HMS_in_use()) { - HMS_fetch_rooms(); + HMS_fetch_rooms( ! hosting ); return 1; }