#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="") |
virtual void | send_to_server (const config &cfg)=0 |
Protected Member Functions | |
void | do_speak (const std::string &message, bool allies_only=false) |
virtual void | add_chat_message (const std::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. More... | |
void | change_logging (const std::string &data) |
Change the log level of a log domain. More... | |
virtual void | clear_messages ()=0 |
Friends | |
class | chat_command_handler |
Definition at line 25 of file chat_events.hpp.
Enumerator | |
---|---|
MESSAGE_PUBLIC | |
MESSAGE_PRIVATE |
Definition at line 31 of file chat_events.hpp.
events::chat_handler::chat_handler | ( | ) |
Definition at line 29 of file chat_events.cpp.
|
virtual |
Definition at line 33 of file chat_events.cpp.
|
protectedpure virtual |
Implemented in events::menu_handler, and gui2::chatbox.
Referenced by add_chat_room_message_received(), add_whisper_received(), add_whisper_sent(), change_logging(), and events::chat_command_handler::print().
|
protectedvirtual |
Reimplemented in gui2::chatbox.
Definition at line 171 of file chat_events.cpp.
References add_chat_message(), and MESSAGE_PRIVATE.
Referenced by add_chat_room_message_sent().
|
protectedvirtual |
Reimplemented in gui2::chatbox.
Definition at line 166 of file chat_events.cpp.
References add_chat_room_message_received(), and prefs::get().
|
protectedvirtual |
Reimplemented in gui2::chatbox.
Definition at line 148 of file chat_events.cpp.
References add_chat_message(), and VGETTEXT.
|
protectedvirtual |
Reimplemented in gui2::chatbox.
Definition at line 141 of file chat_events.cpp.
References add_chat_message(), and VGETTEXT.
Referenced by events::chat_command_handler::do_whisper().
|
protected |
Change the log level of a log domain.
data | string of the form: "@<level@> @<domain@>" |
Definition at line 42 of file chat_events.cpp.
References _(), add_chat_message(), data, lg::debug(), lg::err(), ERR_NG, utils::find(), lg::logger::get_severity(), lg::info(), game_config::images::level, LOG_NG, wfl::msg(), lg::set_log_domain_severity(), VGETTEXT, and lg::warn().
Referenced by events::chat_command_handler::do_log().
|
protectedpure virtual |
Implemented in events::menu_handler, and gui2::chatbox.
Referenced by events::chat_command_handler::do_clear_messages().
|
protected |
Definition at line 106 of file chat_events.cpp.
References events::map_command_handler< Worker >::dispatch(), and send_chat_message().
|
protectedpure virtual |
Implemented in events::menu_handler, and gui2::chatbox.
Referenced by events::chat_command_handler::do_emote(), and do_speak().
|
protectedvirtual |
Definition at line 155 of file chat_events.cpp.
References data, prefs::get(), prefs::login(), and send_to_server().
Referenced by gui2::chatbox::chat_input_keypress_callback().
void events::chat_handler::send_command | ( | const std::string & | cmd, |
const std::string & | args = "" |
||
) |
Definition at line 82 of file chat_events.cpp.
References data, and send_to_server().
Referenced by gui2::dialogs::lobby_player_info::check_status_button_callback(), gui2::dialogs::lobby_player_info::do_kick_ban(), events::chat_command_handler::do_network_send(), and gui2::dialogs::lobby_player_info::do_stopgame().
|
pure virtual |
Implemented in events::menu_handler.
Referenced by events::chat_command_handler::do_info(), send_chat_room_message(), send_command(), and send_whisper().
|
protectedvirtual |
Definition at line 131 of file chat_events.cpp.
References data, prefs::get(), prefs::login(), and send_to_server().
Referenced by gui2::chatbox::chat_input_keypress_callback(), and events::chat_command_handler::do_whisper().
|
protectedvirtual |
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::chatbox.
Definition at line 127 of file chat_events.cpp.
Referenced by events::chat_command_handler::do_friend(), events::chat_command_handler::do_ignore(), and events::chat_command_handler::do_remove().
|
friend |
Definition at line 69 of file chat_events.hpp.