Skip to content

Commit

Permalink
Merge pull request #23 from Ch0wW/playerinfo
Browse files Browse the repository at this point in the history
SV: "Playerinfo" CMD is friendlier now.
  • Loading branch information
seanmleonard committed Jan 26, 2019
2 parents 1a82294 + c4dd3c3 commit ec565e0
Showing 1 changed file with 10 additions and 4 deletions.
14 changes: 10 additions & 4 deletions server/src/sv_main.cpp
Expand Up @@ -4662,12 +4662,18 @@ BEGIN_COMMAND (playerinfo)

if (!validplayer(p))
{
Printf (PRINT_HIGH, "Bad player number\n");
Printf (PRINT_HIGH, "Bad player number.\n");
return;
}
else
player = &p;
}
else
{
Printf(PRINT_HIGH, "Usage : playerinfo <#playerid>\n");
Printf(PRINT_HIGH, "Gives additional infos about the selected player (use \"playerlist\" to display player IDs).\n");
return;
}

if (!validplayer(*player))
{
Expand Down Expand Up @@ -4711,14 +4717,14 @@ BEGIN_COMMAND (playerlist)

for (Players::reverse_iterator it = players.rbegin();it != players.rend();++it)
{
Printf(PRINT_HIGH, "(%02d): %s - %s - frags:%d ping:%d\n",
it->id, it->userinfo.netname.c_str(), NET_AdrToString(it->client.address), it->fragcount, it->ping);
Printf(PRINT_HIGH, "(%02d): %s - %s - frags:%d - time:%d - ping:%d\n",
it->id, it->userinfo.netname.c_str(), NET_AdrToString(it->client.address), it->fragcount, it->GameTime, it->ping);
anybody = true;
}

if (!anybody)
{
Printf(PRINT_HIGH, "There are no players on the server\n");
Printf(PRINT_HIGH, "There are no players on the server.\n");
return;
}
}
Expand Down

0 comments on commit ec565e0

Please sign in to comment.