 
   def handle_received(data, %{"action" => "exit", "params" => params}, id) do
     # if the user haven't exited yet
-    if data.participants[id] == nil do
+    if data.participants[id] == nil and not data.punished do
       data = data
               |> put_in([:participants, id], Map.put(params, :prize, data.prize))
               |> Map.update!(:exited_users, &(&1 + 1))


  def handle_received(data, %{"action" => "start"}) do
    participants = Enum.map(data.participants, fn {id, _} -> {id, nil} end) |> Enum.into(%{})
    data = %{data | started: true, exited_users: 0, participants: participants}
    action = %{
      type: "START",
      users: data.participants

       exited_users: 0,
       prize: 0,
       host_log: [],
       participant_log: [],
       punished: false
     }}}
  end

  def join(%{participants: participants} = data, id) do
    if not Map.has_key?(participants, id) and not data.started do
      participants = Map.put(participants, id, nil)
      data = %{data | participants: participants}
      action = %{
