mirror of
https://git.do.srb2.org/STJr/SRB2.git
synced 2025-03-23 19:31:05 +00:00
Merge branch 'master' into next
This commit is contained in:
commit
e5236c3137
4 changed files with 15 additions and 15 deletions
|
@ -401,8 +401,7 @@ static void ExtraDataTicker(void)
|
|||
DEBFILE(va("player %d kicked [gametic=%u] reason as follows:\n", i, gametic));
|
||||
}
|
||||
CONS_Alert(CONS_WARNING, M_GetText("Got unknown net command [%s]=%d (max %d)\n"), sizeu1(curpos - bufferstart), *curpos, bufferstart[0]);
|
||||
D_FreeTextcmd(gametic);
|
||||
return;
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -3308,7 +3307,7 @@ void SV_StopServer(void)
|
|||
localtextcmd[0] = 0;
|
||||
localtextcmd2[0] = 0;
|
||||
|
||||
for (i = 0; i < BACKUPTICS; i++)
|
||||
for (i = firstticstosend; i < firstticstosend + BACKUPTICS; i++)
|
||||
D_Clearticcmd(i);
|
||||
|
||||
consoleplayer = 0;
|
||||
|
|
|
@ -1051,15 +1051,6 @@ void D_SRB2Main(void)
|
|||
|
||||
if (M_CheckParm("-password") && M_IsNextParm())
|
||||
D_SetPassword(M_GetNextParm());
|
||||
else
|
||||
{
|
||||
size_t z;
|
||||
char junkpw[25];
|
||||
for (z = 0; z < 24; z++)
|
||||
junkpw[z] = (char)(rand() & 64)+32;
|
||||
junkpw[24] = '\0';
|
||||
D_SetPassword(junkpw);
|
||||
}
|
||||
|
||||
// add any files specified on the command line with -file wadfile
|
||||
// to the wad list
|
||||
|
|
|
@ -2661,10 +2661,12 @@ static void D_MD5PasswordPass(const UINT8 *buffer, size_t len, const char *salt,
|
|||
|
||||
#define BASESALT "basepasswordstorage"
|
||||
static UINT8 adminpassmd5[16];
|
||||
static boolean adminpasswordset = false;
|
||||
|
||||
void D_SetPassword(const char *pw)
|
||||
{
|
||||
D_MD5PasswordPass((const UINT8 *)pw, strlen(pw), BASESALT, &adminpassmd5);
|
||||
adminpasswordset = true;
|
||||
}
|
||||
|
||||
// Remote Administration
|
||||
|
@ -2733,6 +2735,12 @@ static void Got_Login(UINT8 **cp, INT32 playernum)
|
|||
|
||||
READMEM(*cp, sentmd5, 16);
|
||||
|
||||
if (!adminpasswordset)
|
||||
{
|
||||
CONS_Printf(M_GetText("Password from %s failed (no password set).\n"), player_names[playernum]);
|
||||
return;
|
||||
}
|
||||
|
||||
if (client)
|
||||
return;
|
||||
|
||||
|
@ -3956,7 +3964,7 @@ static void Command_RestartAudio_f(void)
|
|||
I_ShutdownSound();
|
||||
I_StartupSound();
|
||||
I_InitMusic();
|
||||
|
||||
|
||||
// These must be called or no sound and music until manually set.
|
||||
|
||||
I_SetSfxVolume(cv_soundvolume.value);
|
||||
|
@ -3964,7 +3972,7 @@ static void Command_RestartAudio_f(void)
|
|||
I_SetMIDIMusicVolume(cv_midimusicvolume.value);
|
||||
if (Playing()) // Gotta make sure the player is in a level
|
||||
P_RestoreMusic(&players[consoleplayer]);
|
||||
|
||||
|
||||
}
|
||||
|
||||
/** Quits a game and returns to the title screen.
|
||||
|
|
|
@ -77,7 +77,9 @@ void Got_Luacmd(UINT8 **cp, INT32 playernum)
|
|||
|
||||
deny:
|
||||
//must be hacked/buggy client
|
||||
lua_settop(gL, 0); // clear stack
|
||||
if (gL) // check if Lua is actually turned on first, you dummmy -- Monster Iestyn 04/07/18
|
||||
lua_settop(gL, 0); // clear stack
|
||||
|
||||
CONS_Alert(CONS_WARNING, M_GetText("Illegal lua command received from %s\n"), player_names[playernum]);
|
||||
if (server)
|
||||
{
|
||||
|
|
Loading…
Reference in a new issue