Skip to content
This repository has been archived by the owner on May 16, 2022. It is now read-only.

Commit

Permalink
Adding say command
Browse files Browse the repository at this point in the history
  • Loading branch information
Kirollos committed Sep 20, 2015
1 parent 00919a7 commit 9aaa19b
Showing 1 changed file with 18 additions and 0 deletions.
18 changes: 18 additions & 0 deletions RCON/src/RCON.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -474,6 +474,24 @@ void RCON::OnRecv(Client* c, std::string msg)
}
return;
}
else ISCMD(say)
{
if (params.size() == 0)
{
c->Send("Syntax: say [message]");
return;
}
std::string message = "";
for (int i = 0; i < (int)params.size(); i++)
{
message += params[i];
if (i != params.size() - 1)
message += " ";
}
for (unsigned int playerid = 0; playerid < (unsigned int)VCMP_PF->GetMaxPlayers(); playerid++)
if (VCMP_PF->IsPlayerConnected(playerid))
VCMP_PF->SendClientMessage(playerid, 0xFFFFFFFF, "RCON Admin: %s", message.c_str());
}
else ISCMD(servername)
{
if (params.size() == 0)
Expand Down

0 comments on commit 9aaa19b

Please sign in to comment.