#include <chat_events.hpp>

Public Types | |
| enum | MESSAGE_TYPE { MESSAGE_PUBLIC, MESSAGE_PRIVATE } |
Public Member Functions | |
| chat_handler () | |
| virtual | ~chat_handler () |
| void | send_command (const std::string &cmd, const std::string &args="") |
Protected Member Functions | |
| void | do_speak (const std::string &message, bool allies_only=false) |
| virtual void | add_chat_message (const time_t &time, const std::string &speaker, int side, const std::string &message, MESSAGE_TYPE type=MESSAGE_PRIVATE)=0 |
| virtual void | send_chat_message (const std::string &message, bool allies_only=false)=0 |
| virtual void | send_whisper (const std::string &receiver, const std::string &message) |
| virtual void | add_whisper_sent (const std::string &receiver, const std::string &message) |
| virtual void | add_whisper_received (const std::string &sender, const std::string &message) |
| virtual void | send_chat_room_message (const std::string &room, const std::string &message) |
| virtual void | add_chat_room_message_sent (const std::string &room, const std::string &message) |
| virtual void | add_chat_room_message_received (const std::string &room, const std::string &speaker, const std::string &message) |
| virtual void | user_relation_changed (const std::string &name) |
| Called when a processed command results in a relation (friend/ignore) change for a user whose name is passed as the 'name' arg. | |
| void | change_logging (const std::string &data) |
| Change the log level of a log domain. | |
Friends | |
| class | chat_command_handler |
Definition at line 26 of file chat_events.hpp.
Definition at line 32 of file chat_events.hpp.
| events::chat_handler::chat_handler | ( | ) |
Definition at line 2650 of file menu_events.cpp.
| events::chat_handler::~chat_handler | ( | ) | [virtual] |
Definition at line 2654 of file menu_events.cpp.
| virtual void events::chat_handler::add_chat_message | ( | const time_t & | time, | |
| const std::string & | speaker, | |||
| int | side, | |||
| const std::string & | message, | |||
| MESSAGE_TYPE | type = MESSAGE_PRIVATE | |||
| ) | [protected, pure virtual] |
Implemented in gui2::tlobby_main, and events::menu_handler.
Referenced by add_chat_room_message_received(), add_whisper_received(), add_whisper_sent(), change_logging(), and events::chat_command_handler::print().

| void events::chat_handler::add_chat_room_message_received | ( | const std::string & | room, | |
| const std::string & | speaker, | |||
| const std::string & | message | |||
| ) | [protected, virtual] |
Reimplemented in gui2::tlobby_main.
Definition at line 2793 of file menu_events.cpp.
References add_chat_message(), and MESSAGE_PRIVATE.
Referenced by add_chat_room_message_sent().


| void events::chat_handler::add_chat_room_message_sent | ( | const std::string & | room, | |
| const std::string & | message | |||
| ) | [protected, virtual] |
Reimplemented in gui2::tlobby_main.
Definition at line 2788 of file menu_events.cpp.
References add_chat_room_message_received(), and preferences::login().
Referenced by events::chat_command_handler::do_chanmsg().


| void events::chat_handler::add_whisper_received | ( | const std::string & | sender, | |
| const std::string & | message | |||
| ) | [protected, virtual] |
Reimplemented in gui2::tlobby_main.
Definition at line 2770 of file menu_events.cpp.
References add_chat_message(), and VGETTEXT.

| void events::chat_handler::add_whisper_sent | ( | const std::string & | receiver, | |
| const std::string & | message | |||
| ) | [protected, virtual] |
Reimplemented in gui2::tlobby_main.
Definition at line 2763 of file menu_events.cpp.
References add_chat_message(), and VGETTEXT.
Referenced by events::chat_command_handler::do_whisper().


| void events::chat_handler::change_logging | ( | const std::string & | data | ) | [protected] |
Change the log level of a log domain.
| data | string of the form: "@<level@> @<domain@>" |
Definition at line 2663 of file menu_events.cpp.
References _, add_chat_message(), ERR_NG, gui2::event::find(), game_config::images::level, LOG_NG, game_logic::msg(), lg::set_log_domain_severity(), and vgettext().
Referenced by events::chat_command_handler::do_log().


| void events::chat_handler::do_speak | ( | const std::string & | message, | |
| bool | allies_only = false | |||
| ) | [protected] |
Definition at line 2729 of file menu_events.cpp.
References send_chat_message().
Referenced by mp::ui::handle_event(), mp::ui::handle_key_event(), and gui2::tlobby_main::send_message_button_callback().


| virtual void events::chat_handler::send_chat_message | ( | const std::string & | message, | |
| bool | allies_only = false | |||
| ) | [protected, pure virtual] |
Implemented in gui2::tlobby_main, and events::menu_handler.
Referenced by events::chat_command_handler::do_emote(), and do_speak().

| void events::chat_handler::send_chat_room_message | ( | const std::string & | room, | |
| const std::string & | message | |||
| ) | [protected, virtual] |
Definition at line 2777 of file menu_events.cpp.
References config::add_child(), preferences::login(), and network::send_data().
Referenced by events::chat_command_handler::do_chanmsg(), and gui2::tlobby_main::send_message_to_active_window().


| void events::chat_handler::send_command | ( | const std::string & | cmd, | |
| const std::string & | args = "" | |||
| ) |
Definition at line 2702 of file menu_events.cpp.
References config::add_child(), lexical_cast(), and network::send_data().
Referenced by gui2::tlobby_player_info::check_status_button_callback(), gui2::tlobby_player_info::do_kick_ban(), and events::chat_command_handler::do_network_send().


| void events::chat_handler::send_whisper | ( | const std::string & | receiver, | |
| const std::string & | message | |||
| ) | [protected, virtual] |
Definition at line 2753 of file menu_events.cpp.
References config::add_child(), preferences::login(), and network::send_data().
Referenced by events::chat_command_handler::do_whisper(), and gui2::tlobby_main::send_message_to_active_window().


| void events::chat_handler::user_relation_changed | ( | const std::string & | name | ) | [protected, virtual] |
Called when a processed command results in a relation (friend/ignore) change for a user whose name is passed as the 'name' arg.
Reimplemented in gui2::tlobby_main.
Definition at line 2749 of file menu_events.cpp.
Referenced by events::chat_command_handler::do_friend(), events::chat_command_handler::do_ignore(), and events::chat_command_handler::do_remove().

friend class chat_command_handler [friend] |
Definition at line 66 of file chat_events.hpp.
| Generated by doxygen 1.7.1 on Thu May 24 2012 01:20:09 for The Battle for Wesnoth | Gna! | Forum | Wiki | CIA | devdocs |