mirror of
https://github.com/ddnet/ddnet.git
synced 2024-11-19 22:48:18 +00:00
added a separate option for kicking inactive spectators. closes #1906
This commit is contained in:
parent
d87c2cb687
commit
0dd1422f02
|
@ -63,13 +63,15 @@ void IGameController::DoActivityCheck()
|
|||
if(GameServer()->m_apPlayers[i] && !GameServer()->m_apPlayers[i]->IsDummy() && (GameServer()->m_apPlayers[i]->GetTeam() != TEAM_SPECTATORS || g_Config.m_SvInactiveKick > 0) &&
|
||||
!Server()->IsAuthed(i) && (GameServer()->m_apPlayers[i]->m_InactivityTickCounter > g_Config.m_SvInactiveKickTime*Server()->TickSpeed()*60))
|
||||
{
|
||||
if (GameServer()->m_apPlayers[i]->GetTeam() == TEAM_SPECTATORS) {
|
||||
Server()->Kick(i, "Kicked for inactivity");
|
||||
if(GameServer()->m_apPlayers[i]->GetTeam() == TEAM_SPECTATORS)
|
||||
{
|
||||
if(g_Config.m_SvInactiveKickSpec)
|
||||
Server()->Kick(i, "Kicked for inactivity");
|
||||
}
|
||||
else {
|
||||
else
|
||||
{
|
||||
switch(g_Config.m_SvInactiveKick)
|
||||
{
|
||||
case 0:
|
||||
case 1:
|
||||
{
|
||||
// move player to spectator
|
||||
|
|
|
@ -115,7 +115,8 @@ MACRO_CONFIG_INT(SvPlayerSlots, sv_player_slots, 8, 0, MAX_PLAYERS, CFGFLAG_SAVE
|
|||
MACRO_CONFIG_INT(SvSkillLevel, sv_skill_level, 1, SERVERINFO_LEVEL_MIN, SERVERINFO_LEVEL_MAX, CFGFLAG_SAVE|CFGFLAG_SERVER, "Supposed player skill level")
|
||||
MACRO_CONFIG_INT(SvTeambalanceTime, sv_teambalance_time, 1, 0, 1000, CFGFLAG_SAVE|CFGFLAG_SERVER, "How many minutes to wait before autobalancing teams")
|
||||
MACRO_CONFIG_INT(SvInactiveKickTime, sv_inactivekick_time, 3, 0, 1000, CFGFLAG_SAVE|CFGFLAG_SERVER, "How many minutes to wait before taking care of inactive clients")
|
||||
MACRO_CONFIG_INT(SvInactiveKick, sv_inactivekick, 2, 0, 3, CFGFLAG_SAVE|CFGFLAG_SERVER, "How to deal with inactive clients (0=move player to spectator, 1=move player to spectator and kick spectator, 2=move to free spectator slot/kick, 3=kick)")
|
||||
MACRO_CONFIG_INT(SvInactiveKick, sv_inactivekick, 2, 1, 3, CFGFLAG_SAVE|CFGFLAG_SERVER, "How to deal with inactive clients (1=move player to spectator, 2=move to free spectator slot/kick, 3=kick)")
|
||||
MACRO_CONFIG_INT(SvInactiveKickSpec, sv_inactivekick_spec, 0, 0, 1, CFGFLAG_SAVE|CFGFLAG_SERVER, "Kick inactive spectators")
|
||||
|
||||
MACRO_CONFIG_INT(SvSilentSpectatorMode, sv_silent_spectator_mode, 1, 0, 1, CFGFLAG_SAVE|CFGFLAG_SERVER, "Mute join/leave message of spectator")
|
||||
|
||||
|
|
Loading…
Reference in a new issue