avoid auth loop

This commit is contained in:
flowtron
2022-05-06 20:47:17 +02:00
parent 7d0b271c72
commit da542df2cb
4 changed files with 18 additions and 5 deletions
+2
View File
@@ -120,6 +120,8 @@ void connectserv(char *servername, int *serverport, char *password)
formatstring(cpc)("%s%s%s", cp1, cp2, cp3);
aaconnect = newstring(cpc);
hudoutf("\f5.. \f2waiting \f4for \fUauth\f5entication ..");
extern gmenu *curmenu;
if(!curmenu) showmenu("enter password");
}
}
COMMANDN(connect, connectserv, "sis");
+1 -1
View File
@@ -411,7 +411,7 @@ void renderscores(void *menu, bool init)
// update server stats
static int lastrefresh = 0;
if(!lastrefresh || lastrefresh+5000<lastmillis)
if(multiplayer(NULL) && (!lastrefresh || lastrefresh + 5000 < lastmillis))
{
refreshservers(NULL, init);
lastrefresh = lastmillis;
+6
View File
@@ -961,6 +961,12 @@ void refreshservers(void *menu, bool init)
bool isinfo = menu == serverinfomenu;
bool isscoreboard = menu == NULL;
if(!sk)
{
closemenu("serverbrowser");
showmenu("enter password");
}
serverinfo *curserver = getconnectedserverinfo(), *oldsel = NULL;
if(init)
{