mirror of
https://github.com/ddnet/ddnet.git
synced 2024-11-10 10:08:18 +00:00
add sv_tele_others_auth_level
This commit is contained in:
parent
18f5ae442a
commit
01092a30c1
|
@ -181,6 +181,7 @@ MACRO_CONFIG_INT(SvPauseMessages, sv_pause_messages, 0, 0, 1, CFGFLAG_SERVER, "W
|
|||
MACRO_CONFIG_INT(SvSpecFrequency, sv_pause_frequency, 1, 0, 9999, CFGFLAG_SERVER, "The minimum allowed delay between /spec")
|
||||
MACRO_CONFIG_INT(SvInvite, sv_invite, 1, 0, 1, CFGFLAG_SERVER, "Whether players can invite other players to teams")
|
||||
MACRO_CONFIG_INT(SvInviteFrequency, sv_invite_frequency, 1, 0, 9999, CFGFLAG_SERVER, "The minimum allowed delay between invites")
|
||||
MACRO_CONFIG_INT(SvTeleOthersAuthLevel, sv_tele_others_auth_level, 1, 1, 3, CFGFLAG_SERVER, "The auth level you need to tele others")
|
||||
|
||||
MACRO_CONFIG_INT(SvEmotionalTees, sv_emotional_tees, 1, -1, 1, CFGFLAG_SERVER, "Whether eye change of tees is enabled with emoticons = 1, not = 0, -1 not at all")
|
||||
MACRO_CONFIG_INT(SvEmoticonDelay, sv_emoticon_delay, 3, 0, 9999, CFGFLAG_SERVER, "The time in seconds between over-head emoticons")
|
||||
|
|
|
@ -302,6 +302,13 @@ void CGameContext::ConTeleport(IConsole::IResult *pResult, void *pUserData)
|
|||
CGameContext *pSelf = (CGameContext *) pUserData;
|
||||
int Tele = pResult->NumArguments() == 2 ? pResult->GetInteger(0) : pResult->m_ClientID;
|
||||
int TeleTo = pResult->NumArguments() ? pResult->GetInteger(pResult->NumArguments() - 1) : pResult->m_ClientID;
|
||||
int AuthLevel = pSelf->Server()->GetAuthedState(pResult->m_ClientID);
|
||||
|
||||
if(Tele != pResult->m_ClientID && AuthLevel < g_Config.m_SvTeleOthersAuthLevel)
|
||||
{
|
||||
pSelf->Console()->Print(IConsole::OUTPUT_LEVEL_STANDARD, "tele", "you aren't allowed to tele others");
|
||||
return;
|
||||
}
|
||||
|
||||
CCharacter *pChr = pSelf->GetPlayerChar(Tele);
|
||||
if(pChr && pSelf->GetPlayerChar(TeleTo))
|
||||
|
@ -431,7 +438,7 @@ bool CGameContext::TryMute(const NETADDR *pAddr, int Secs, const char *pReason)
|
|||
m_aMutes[m_NumMutes].m_Addr = *pAddr;
|
||||
m_aMutes[m_NumMutes].m_Expire = Server()->Tick()
|
||||
+ Secs * Server()->TickSpeed();
|
||||
str_copy(m_aMutes[m_NumMutes].m_aReason, pReason, sizeof(m_aMutes[m_NumMutes].m_aReason));
|
||||
str_copy(m_aMutes[m_NumMutes].m_aReason, pReason, sizeof(m_aMutes[m_NumMutes].m_aReason));
|
||||
m_NumMutes++;
|
||||
return true;
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue