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
  • Loading branch information
loonycyborg authored and irydacea committed Apr 15, 2018
1 parent 13e21ad commit 1eb762b
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 1eb762b

Please sign in to comment.