Skip to content
Permalink
Browse files

Fix 'joined game' from /unhide not being shown in-game

  • Loading branch information...
UnknownShadow200 committed May 17, 2017
1 parent c0371d2 commit b409a92729dec512d60e4aad92ddfabcbb759670
Showing with 9 additions and 13 deletions.
  1. +9 −13 fCraft/Commands/ModerationCommands.cs
@@ -1151,31 +1151,27 @@ static void RankHandler([NotNull] Player player, [NotNull] CommandReader cmd)
player.Message("You are not currently hidden.");
return;
}

bool silent = cmd.HasNext;

// for aware players: notify
Server.Players
.CanSee(player)
.Message("Player {0}&S is no longer hidden.",
player.ClassyName);
Server.Players.CanSee(player).Message("Player {0}&S is no longer hidden.", player.ClassyName);

player.Info.IsHidden = false;
player.quitmessage = "/Quit";
player.usedquit = false;
if (silent) {
player.Message("&8You are no longer hidden (silent).");
} else {
player.Message("&8You are no longer hidden.");
}

// for unaware players: fake a join message
if (!silent) {
if (ConfigKey.ShowConnectionMessages.Enabled()) {
player.Info.GeoipLogin();
string msg = Server.MakePlayerConnectedMessage(player, false);
Server.Players.CantSee(player).Message(msg);
}
if (!silent && ConfigKey.ShowConnectionMessages.Enabled()) {
player.Info.GeoipLogin();
string msg = Server.MakePlayerConnectedMessage(player, false);
Server.Players.CantSee(player).Message(msg);
}


player.Info.IsHidden = false;
Player.RaisePlayerHideChangedEvent(player, false, silent);
foreach (Player p1 in Server.Players) {
if (p1.Supports(CpeExt.ExtPlayerList) || p1.Supports(CpeExt.ExtPlayerList2)) {

0 comments on commit b409a92

Please sign in to comment.
You can’t perform that action at this time.