Skip to content

Commit

Permalink
wesnothd: made server fill in sender when forwarding whispers
Browse files Browse the repository at this point in the history
(cherry-picked from commit f5ab654)
  • Loading branch information
loonycyborg committed Oct 7, 2018
1 parent 0ec5494 commit ef9c2b7
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/server/server.cpp
Expand Up @@ -886,6 +886,8 @@ void server::handle_whisper(socket_ptr socket, simple_wml::node& whisper)
return;
}

whisper.set_attr_dup("sender", player_connections_.find(socket)->name().c_str());

auto receiver_iter = player_connections_.get<name_t>().find(whisper["receiver"].to_string());
if(receiver_iter == player_connections_.get<name_t>().end()) {
send_server_message(socket, "Can't find '" + whisper["receiver"].to_string() + "'.");
Expand Down

0 comments on commit ef9c2b7

Please sign in to comment.