56 const std::vector<std::string>
items = {
"player_joins",
"player_leaves",
"private_message",
"friend_message",
"public_message",
"server_message",
"ready_for_start",
"game_has_begun",
"turn_changed"};
61 if (is_lobby && !lobby_pref(
id)) {
75 if (is_lobby && !lobby_pref(
id)) {
89 if (is_lobby && !lobby_pref(
id)) {
103 if (is_lobby && !lobby_pref(
id)) {
106 if (sound_pref(
id)) {
109 if (notif_pref(
id)) {
117 if (is_lobby && !lobby_pref(
id)) {
120 if (sound_pref(
id)) {
123 if (notif_pref(
id)) {
131 if (is_lobby && !lobby_pref(
id)) {
134 if (sound_pref(
id)) {
137 if (notif_pref(
id)) {
145 if (sound_pref(
id)) {
150 if (notif_pref(
id)) {
158 if (sound_pref(
id)) {
161 if (notif_pref(
id)) {
169 if (notif_pref(
id)) {
171 player[
"name"] = player_name;
177 return (
id !=
"public_message" &&
id !=
"friend_message");
185 return (
id ==
"private_message" ||
id ==
"server_message");
void turn_changed(const std::string &player_name)
std::string private_message
This namespace provides handlers which play the sounds / notificaitons for various mp server events...
std::string friend_message
const std::vector< std::string > items
void friend_message(bool is_lobby, const std::string &sender, const std::string &message)
static UNUSEDNOWARN std::string _(const char *str)
std::string get(const std::string &key)
std::map< std::string, t_string > string_map
void private_message(bool is_lobby, const std::string &sender, const std::string &message)
std::string ready_for_start
bool available()
Returns whether we were compiled with support for desktop notifications.
void send(const std::string &, const std::string &, type)
Displays a desktop notification message, from owner, of type t.
std::string server_message
std::string public_message
void public_message(bool is_lobby, const std::string &sender, const std::string &message)
void server_message(bool is_lobby, const std::string &sender, const std::string &message)
bool get_def_pref_sound(const std::string &id)
void player_leaves(bool is_lobby)
std::string player_leaves
void play_bell(const std::string &files)
void player_joins(bool is_lobby)
void play_UI_sound(const std::string &files)
GLsizei GLenum GLuint GLuint GLsizei char * message
bool get_def_pref_lobby(const std::string &id)
std::string game_has_begun
GLsizei const GLcharARB ** string
bool get_def_pref_notif(const std::string &id)