Mercurial > hg
comparison mcabber/src/hooks.c @ 1210:7c8672bbede5
Use beep_on_message's value for highlighted MUC room messages
If 'beep_on_message' is set, mcabber will ring the bell when receiving a
private message and for highlighted messages in a MUC room.
author | Mikael Berthe <mikael@lilotux.net> |
---|---|
date | Sun, 29 Apr 2007 22:16:27 +0200 |
parents | 8f0af3b88cef |
children | e42f48103609 |
comparison
equal
deleted
inserted
replaced
1209:47579e8c73d0 | 1210:7c8672bbede5 |
---|---|
195 if (!name) name = ""; | 195 if (!name) name = ""; |
196 scr_LogPrint(LPRINT_NORMAL, "Message received from %s <%s/%s>", | 196 scr_LogPrint(LPRINT_NORMAL, "Message received from %s <%s/%s>", |
197 name, bjid, (resname ? resname : "")); | 197 name, bjid, (resname ? resname : "")); |
198 } | 198 } |
199 | 199 |
200 // Beep, if enabled | 200 // Beep, if enabled: |
201 if ((!is_groupchat) && !(message_flags & HBB_PREFIX_ERR) && | 201 // - if it's a private message |
202 settings_opt_get_int("beep_on_message")) { | 202 // - if it's a public message and it's highlighted |
203 scr_Beep(); | 203 if (settings_opt_get_int("beep_on_message")) { |
204 if ((!is_groupchat && !(message_flags & HBB_PREFIX_ERR)) || | |
205 (is_groupchat && (message_flags & HBB_PREFIX_HLIGHT))) | |
206 scr_Beep(); | |
204 } | 207 } |
205 | 208 |
206 // We need to update the roster if the sender is unknown or | 209 // We need to update the roster if the sender is unknown or |
207 // if the sender is offline/invisible and hide_offline_buddies is set | 210 // if the sender is offline/invisible and hide_offline_buddies is set |
208 if (new_guy || | 211 if (new_guy || |