public void OnGamePlayerJoined(IGamePlayerJoinedEvent e) { if (JesterGames[e.Game.Code].CountingDown) { _logger.LogInformation($"Assigning Jester interrupted. {JesterGames[e.Game.Code].Jestername} is NOT the jester."); Task.Run(async() => await SorryNotJester(e.Game.GetClientPlayer(JesterGames[e.Game.Code].JesterClientId)).ConfigureAwait(false)); JesterGame jgame = JesterGames[e.Game.Code]; jgame.CountingDown = false; JesterGames[e.Game.Code] = jgame; } }
public async void PlayerConnection(IGamePlayerJoinedEvent @event) { var record = _banDatabase.Get(@event.Player.Client.Connection !.EndPoint.Address.ToString()); if (!record.Equals(default(PlayerBan))) { await _logManager.LogInformation( $"Ban Manager: {@event.Player.Client.Connection!.EndPoint.Address} tried to join but is banned."); await @event.Player.Client.DisconnectAsync(DisconnectReason.Custom, record.Reason); } }
public void OnPlayerJoined(IGamePlayerJoinedEvent evt) { var code = evt.Game.Code; var players = evt.Game.Players; logger.LogInformation($"[{code}] Player joined, moving clients into voice channel."); foreach (var player in players) { // must use p.Client here since p.Character is not available yet var name = player.Client.Name; logger.LogInformation($"Moving client: {name}"); var move = new MoveClient { ChannelName = $"Impostor {code}", Nickname = name }; executor.Schedule(move); var unmute = new UnmuteClient { Nickname = name }; executor.Schedule(unmute); } }
public void OnPlayerJoined(IGamePlayerJoinedEvent e) { Console.WriteLine("Player joined a game."); }
public void OnGamePlayerJoined(IGamePlayerJoinedEvent evt) => GamePlayerJoined?.Invoke(evt);
public void OnPlayerJoined(IGamePlayerJoinedEvent e) { _automuteService.AddGamePlayer(e.Player); }
public void OnPlayerJoined(IGamePlayerJoinedEvent e) { _logger.LogInformation("Game {code} > {player} joined", e.Game.Code, e.Player.Client.Name); }
public void OnGamePlayerJoined(IGamePlayerJoinedEvent evt) { Interlocked.Increment(ref OnGamePlayerJoinedCount); }
public void OnPlayerJoined(IGamePlayerJoinedEvent e) { _logger.LogInformation("Player joined a game."); }