diff --git a/src/m_menu.c b/src/m_menu.c index c9adbfb9..cfcb2458 100644 --- a/src/m_menu.c +++ b/src/m_menu.c @@ -6048,7 +6048,7 @@ void M_SortServerList(void) #ifndef NONET #ifdef UPDATE_ALERT -static int M_CheckMODVersion(void) +static boolean M_CheckMODVersion(void) { char updatestring[500]; const char *updatecheck = GetMODVersion(); diff --git a/src/mserv.c b/src/mserv.c index 2bb2923d..a84266c8 100644 --- a/src/mserv.c +++ b/src/mserv.c @@ -557,9 +557,21 @@ const char *GetMODVersion(void) msg.room = MODID; // Might as well use it for something. sprintf(msg.buffer,"%d",MODVERSION); if (MS_Write(&msg) < 0) + { + CONS_Alert(CONS_ERROR, M_GetText("Could not send to the Master Server\n")); + M_StartMessage(M_GetText("Could not send to the Master Server\n"), NULL, MM_NOTHING); + CloseConnection(); return NULL; + } + + if (MS_Read(&msg) < 0) + { + CONS_Alert(CONS_ERROR, M_GetText("No reply from the Master Server\n")); + M_StartMessage(M_GetText("No reply from the Master Server\n"), NULL, MM_NOTHING); + CloseConnection(); + return NULL; + } - MS_Read(&msg); CloseConnection(); if(strcmp(msg.buffer,"NULL") != 0) @@ -587,9 +599,19 @@ void GetMODVersion_Console(void) msg.room = MODID; // Might as well use it for something. sprintf(msg.buffer,"%d",MODVERSION); if (MS_Write(&msg) < 0) + { + CONS_Alert(CONS_ERROR, M_GetText("Could not send to the Master Server\n")); + CloseConnection(); return; + } + + if (MS_Read(&msg) < 0) + { + CONS_Alert(CONS_ERROR, M_GetText("No reply from the Master Server\n")); + CloseConnection(); + return; + } - MS_Read(&msg); CloseConnection(); if(strcmp(msg.buffer,"NULL") != 0)