Skip to content

Commit

Permalink
add notification of chat events to all mp ui windows
Browse files Browse the repository at this point in the history
  • Loading branch information
cbeck88 committed Dec 20, 2014
1 parent bda6cb0 commit b79c53d
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions src/game_initialization/multiplayer_ui.cpp
Expand Up @@ -29,6 +29,8 @@
#include "mp_ui_alerts.hpp"
#include "wml_separators.hpp"
#include "formula_string_utils.hpp"
#include "scripting/plugins/context.hpp"
#include "scripting/plugins/manager.hpp"

#include <boost/foreach.hpp>

Expand Down Expand Up @@ -437,6 +439,10 @@ void ui::process_message(const config& msg, const bool whisper) {

chat_.add_message(time(NULL), room + prefix, msg["message"]);
chat_.update_textbox(chat_textbox_);

config temp = msg;
temp["whisper"] = whisper;
plugins_manager::get()->notify_event("chat", temp); //notify plugins of the network message
}

void ui::process_network_data(const config& data, const network::connection /*sock*/)
Expand Down

0 comments on commit b79c53d

Please sign in to comment.