Skip to content

Commit

Permalink
Add !unteam
Browse files Browse the repository at this point in the history
  • Loading branch information
ChillerDragon committed Aug 28, 2024
1 parent 33de063 commit dc89f9d
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 26 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ bool CWarList::OnChatCmdAdvanced(char Prefix, int ClientId, int Team, const char
m_pClient->m_Chat.AddLine(-2, 0, "!peace <folder>");
m_pClient->m_Chat.AddLine(-2, 0, "!war <folder>");
m_pClient->m_Chat.AddLine(-2, 0, "!team <folder>");
m_pClient->m_Chat.AddLine(-2, 0, "!unfriend <folder>");
m_pClient->m_Chat.AddLine(-2, 0, "!unfriend <folder>"); // aliases delteam, unteam
m_pClient->m_Chat.AddLine(-2, 0, "!addreason <folder> [--force] <reason>");
m_pClient->m_Chat.AddLine(-2, 0, "!search <name>");
m_pClient->m_Chat.AddLine(-2, 0, "!create <war|team|neutral|traitor> <folder> [name]");
Expand Down Expand Up @@ -219,7 +219,7 @@ bool CWarList::OnChatCmdAdvanced(char Prefix, int ClientId, int Team, const char
ReloadList();
m_pClient->m_Chat.AddLine(-2, 0, aBuf);
}
else if(!str_comp(pCmd, "unfriend")) // "unfriend <folder>"
else if(!str_comp(pCmd, "unfriend") || !str_comp(pCmd, "unteam") || !str_comp(pCmd, "delteam")) // "unfriend <folder>"
{
if(NumArgs < 1)
{
Expand Down
28 changes: 4 additions & 24 deletions src/game/client/components/chillerbot/warlist_commands_simple.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -111,46 +111,26 @@ bool CWarList::OnChatCmdSimple(char Prefix, int ClientId, int Team, const char *
m_pClient->m_Chat.AddLine(-2, 0, "Error: create only works in advanced warlist mode");
return true;
}
else if(!str_comp(pCmd, "addwar")) // "addwar <name>"
else if(!str_comp(pCmd, "addwar") || !str_comp(pCmd, "war")) // "addwar <name>"
{
AddSimpleWar(pRawArgLine);
return true;
}
else if(!str_comp(pCmd, "addteam")) // "addteam <name>"
else if(!str_comp(pCmd, "team") || !str_comp(pCmd, "addteam")) // "team <name>"
{
AddSimpleTeam(pRawArgLine);
return true;
}
else if(!str_comp(pCmd, "peace")) // "peace <name>"
else if(!str_comp(pCmd, "delwar") ||!str_comp(pCmd, "peace") ) // "delwar <name>"
{
RemoveSimpleWar(pRawArgLine);
return true;
}
else if(!str_comp(pCmd, "delwar")) // "delwar <name>"
{
RemoveSimpleWar(pRawArgLine);
return true;
}
else if(!str_comp(pCmd, "team")) // "team <name>"
{
AddSimpleTeam(pRawArgLine);
return true;
}
else if(!str_comp(pCmd, "delteam")) // "delteam <name>"
else if(!str_comp(pCmd, "delteam") || !str_comp(pCmd, "unfriend")|| !str_comp(pCmd, "unteam")) // "unfriend <name>"
{
RemoveSimpleTeam(pRawArgLine);
return true;
}
else if(!str_comp(pCmd, "unfriend")) // "unfriend <name>"
{
RemoveSimpleTeam(pRawArgLine);
return true;
}
else if(!str_comp(pCmd, "war")) // "war <name>"
{
AddSimpleWar(pRawArgLine);
return true;
}
else if(!str_comp(pCmd, "addreason")) // "addreason <folder> <reason can contain spaces>"
{
m_pClient->m_Chat.AddLine(-2, 0, "Error: addreason only works in advanced warlist mode");
Expand Down

0 comments on commit dc89f9d

Please sign in to comment.