avoid auth loop
This commit is contained in:
@@ -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");
|
||||
|
||||
@@ -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;
|
||||
|
||||
@@ -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)
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user