Remove /uninvite

This commit is contained in:
def 2017-04-13 10:34:19 +02:00
parent 3c9b178e73
commit 9e7eb9c142
3 changed files with 0 additions and 62 deletions

View file

@ -809,66 +809,6 @@ void CGameContext::ConInviteTeam(IConsole::IResult *pResult, void *pUserData)
pSelf->Console()->Print(IConsole::OUTPUT_LEVEL_STANDARD, "invite", "Can't invite players to this team"); pSelf->Console()->Print(IConsole::OUTPUT_LEVEL_STANDARD, "invite", "Can't invite players to this team");
} }
void CGameContext::ConUnInviteTeam(IConsole::IResult *pResult, void *pUserData)
{
CGameContext *pSelf = (CGameContext *)pUserData;
CGameControllerDDRace *pController = (CGameControllerDDRace *)pSelf->m_pController;
const char *pName = pResult->GetString(0);
int Target = -1;
if(pResult->NumArguments() == 1)
{
for(Target = 0; Target < MAX_CLIENTS; Target++)
if(!str_comp(pName, pSelf->Server()->ClientName(Target)))
break;
if(Target < 0)
{
pSelf->Console()->Print(IConsole::OUTPUT_LEVEL_STANDARD, "invite", "Player not found");
return;
}
}
int Team = pController->m_Teams.m_Core.Team(pResult->m_ClientID);
if(Team > TEAM_FLOCK && Team < TEAM_SUPER)
{
if(Target > 0)
{
if(!pController->m_Teams.IsInvited(Team, Target))
{
pSelf->Console()->Print(IConsole::OUTPUT_LEVEL_STANDARD, "invite", "Player already not invited");
return;
}
pController->m_Teams.SetClientInvited(Team, Target, false);
char aBuf[512];
str_format(aBuf, sizeof aBuf, "Your invite to team %d is no longer valid.", Team);
pSelf->SendChatTarget(Target, aBuf);
pSelf->Console()->Print(IConsole::OUTPUT_LEVEL_STANDARD, "invite", "Player has been notified");
}
else
{
pController->m_Teams.ResetInvited(Team);
for(int i = 0; i < MAX_CLIENTS; i++)
{
if(pController->m_Teams.IsInvited(Team, i) && pController->m_Teams.m_Core.Team(i) != Team)
{
char aBuf[512];
str_format(aBuf, sizeof aBuf, "Your invite to team %d is no longer valid.", Team);
pSelf->SendChatTarget(i, aBuf);
}
}
pSelf->Console()->Print(IConsole::OUTPUT_LEVEL_STANDARD, "invite", "All invites have been invalidated");
}
}
else
pSelf->Console()->Print(IConsole::OUTPUT_LEVEL_STANDARD, "invite", "Can't uninvite players from this team");
}
void CGameContext::ConJoinTeam(IConsole::IResult *pResult, void *pUserData) void CGameContext::ConJoinTeam(IConsole::IResult *pResult, void *pUserData)
{ {
CGameContext *pSelf = (CGameContext *) pUserData; CGameContext *pSelf = (CGameContext *) pUserData;

View file

@ -32,7 +32,6 @@ CHAT_COMMAND("rules", "", CFGFLAG_CHAT|CFGFLAG_SERVER, ConRules, this, "Shows th
CHAT_COMMAND("team", "?i[id]", CFGFLAG_CHAT|CFGFLAG_SERVER, ConJoinTeam, this, "Lets you join team i (shows your team if left blank)") CHAT_COMMAND("team", "?i[id]", CFGFLAG_CHAT|CFGFLAG_SERVER, ConJoinTeam, this, "Lets you join team i (shows your team if left blank)")
CHAT_COMMAND("lock", "?i['0'|'1']", CFGFLAG_CHAT|CFGFLAG_SERVER, ConLockTeam, this, "Lock team so no-one else can join it") CHAT_COMMAND("lock", "?i['0'|'1']", CFGFLAG_CHAT|CFGFLAG_SERVER, ConLockTeam, this, "Lock team so no-one else can join it")
CHAT_COMMAND("invite", "r[player name]", CFGFLAG_CHAT|CFGFLAG_SERVER, ConInviteTeam, this, "Invite a person to a locked team") CHAT_COMMAND("invite", "r[player name]", CFGFLAG_CHAT|CFGFLAG_SERVER, ConInviteTeam, this, "Invite a person to a locked team")
CHAT_COMMAND("uninvite", "?r[player name]", CFGFLAG_CHAT|CFGFLAG_SERVER, ConUnInviteTeam, this, "Revoke a persons invitation to a locked team")
CHAT_COMMAND("top5team", "?i[rank to start with]", CFGFLAG_CHAT|CFGFLAG_SERVER, ConTeamTop5, this, "Shows five team ranks of the ladder beginning with rank i (1 by default)") CHAT_COMMAND("top5team", "?i[rank to start with]", CFGFLAG_CHAT|CFGFLAG_SERVER, ConTeamTop5, this, "Shows five team ranks of the ladder beginning with rank i (1 by default)")
CHAT_COMMAND("teamtop5", "?i[rank to start with]", CFGFLAG_CHAT|CFGFLAG_SERVER, ConTeamTop5, this, "Shows five team ranks of the ladder beginning with rank i (1 by default)") CHAT_COMMAND("teamtop5", "?i[rank to start with]", CFGFLAG_CHAT|CFGFLAG_SERVER, ConTeamTop5, this, "Shows five team ranks of the ladder beginning with rank i (1 by default)")
CHAT_COMMAND("top5", "?i[rank to start with]", CFGFLAG_CHAT|CFGFLAG_SERVER, ConTop5, this, "Shows five ranks of the ladder beginning with rank i (1 by default)") CHAT_COMMAND("top5", "?i[rank to start with]", CFGFLAG_CHAT|CFGFLAG_SERVER, ConTop5, this, "Shows five ranks of the ladder beginning with rank i (1 by default)")

View file

@ -299,7 +299,6 @@ private:
static void ConJoinTeam(IConsole::IResult *pResult, void *pUserData); static void ConJoinTeam(IConsole::IResult *pResult, void *pUserData);
static void ConLockTeam(IConsole::IResult *pResult, void *pUserData); static void ConLockTeam(IConsole::IResult *pResult, void *pUserData);
static void ConInviteTeam(IConsole::IResult *pResult, void *pUserData); static void ConInviteTeam(IConsole::IResult *pResult, void *pUserData);
static void ConUnInviteTeam(IConsole::IResult *pResult, void *pUserData);
static void ConMe(IConsole::IResult *pResult, void *pUserData); static void ConMe(IConsole::IResult *pResult, void *pUserData);
static void ConWhisper(IConsole::IResult *pResult, void *pUserData); static void ConWhisper(IConsole::IResult *pResult, void *pUserData);
static void ConConverse(IConsole::IResult *pResult, void *pUserData); static void ConConverse(IConsole::IResult *pResult, void *pUserData);