comparison mcabber/src/hooks.c @ 808:4a6ce276ffca

New option "log_display_sender"
author Mikael Berthe <mikael@lilotux.net>
date Fri, 14 Apr 2006 21:19:08 +0200
parents 46304b773a44
children 80434fde7cfa
comparison
equal deleted inserted replaced
807:f6cda389db48 808:4a6ce276ffca
130 // External command 130 // External command
131 // - We do not call hk_ext_cmd() for history lines in MUC 131 // - We do not call hk_ext_cmd() for history lines in MUC
132 // - We do call hk_ext_cmd() for private messages in a room 132 // - We do call hk_ext_cmd() for private messages in a room
133 if ((is_groupchat && !timestamp) || !is_groupchat) 133 if ((is_groupchat && !timestamp) || !is_groupchat)
134 hk_ext_cmd(jid, (is_groupchat ? 'G' : 'M'), 'R', wmsg); 134 hk_ext_cmd(jid, (is_groupchat ? 'G' : 'M'), 'R', wmsg);
135
136 // Display the sender in the log window
137 if ((!is_groupchat) && !(message_flags & HBB_PREFIX_ERR) &&
138 settings_opt_get_int("log_display_sender")) {
139 const char *name = roster_getname(jid);
140 if (!name) name = "";
141 scr_LogPrint(LPRINT_NORMAL, "Message received from %s <%s/%s>",
142 name, jid, resname);
143 }
135 144
136 // Beep, if enabled 145 // Beep, if enabled
137 if (settings_opt_get_int("beep_on_message")) 146 if (settings_opt_get_int("beep_on_message"))
138 scr_Beep(); 147 scr_Beep();
139 148