#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 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... | |
Friends | |
class | chat_command_handler |
Definition at line 26 of file chat_events.hpp.
Enumerator | |
---|---|
MESSAGE_PUBLIC | |
MESSAGE_PRIVATE |
Definition at line 32 of file chat_events.hpp.
events::chat_handler::chat_handler | ( | ) |
Definition at line 22 of file chat_events.cpp.
|
virtual |
Definition at line 26 of file chat_events.cpp.
|
protectedpure virtual |
Implemented in gui2::tlobby_main, mp::ui, 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().
|
protectedvirtual |
Reimplemented in gui2::tlobby_main.
Definition at line 176 of file chat_events.cpp.
References add_chat_message(), and MESSAGE_PRIVATE.
Referenced by add_chat_room_message_sent().
|
protectedvirtual |
Reimplemented in gui2::tlobby_main.
Definition at line 171 of file chat_events.cpp.
References add_chat_room_message_received(), and preferences::login().
Referenced by events::chat_command_handler::do_chanmsg().
|
protectedvirtual |
Reimplemented in gui2::tlobby_main.
Definition at line 153 of file chat_events.cpp.
References add_chat_message(), and VGETTEXT.
|
protectedvirtual |
Reimplemented in gui2::tlobby_main.
Definition at line 146 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 35 of file chat_events.cpp.
References _(), add_chat_message(), lg::debug(), lg::err(), ERR_NG, gui2::event::find(), lg::logger::get_severity(), lg::info(), LOG_NG, game_logic::msg(), lg::set_log_domain_severity(), vgettext(), and lg::warn().
Referenced by events::chat_command_handler::do_log().
|
protected |
Definition at line 111 of file chat_events.cpp.
References send_chat_message().
Referenced by events::menu_handler::do_speak().
|
protectedpure virtual |
Implemented in gui2::tlobby_main, mp::ui, and events::menu_handler.
Referenced by events::chat_command_handler::do_emote(), and do_speak().
|
protectedvirtual |
Definition at line 160 of file chat_events.cpp.
References config::add_child(), preferences::login(), and send_to_server().
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 75 of file chat_events.cpp.
References config::add_child(), and send_to_server().
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().
Implemented in mp::ui, events::menu_handler, and gui2::tlobby_main.
Referenced by events::chat_command_handler::do_details(), events::chat_command_handler::do_drop(), events::chat_command_handler::do_gen_room_query(), events::chat_command_handler::do_info(), events::chat_command_handler::do_register(), events::chat_command_handler::do_room_query(), events::chat_command_handler::do_room_query_noarg(), events::chat_command_handler::do_set(), send_chat_room_message(), send_command(), and send_whisper().
|
protectedvirtual |
Definition at line 136 of file chat_events.cpp.
References config::add_child(), preferences::login(), and send_to_server().
Referenced by events::chat_command_handler::do_whisper(), and gui2::tlobby_main::send_message_to_active_window().
|
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::tlobby_main.
Definition at line 132 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 68 of file chat_events.hpp.