comparison mcabber/mcabber/xmpp.c @ 1688:51481414ca65

Fix blocking muc messages (reported by Че2) block_unsubscribed, if set, blocks all groupchat messages
author Myhailo Danylenko <isbear@ukrpost.net>
date Fri, 05 Feb 2010 23:32:56 +0200
parents 1342df44c814
children b8f9481dd0fe
comparison
equal deleted inserted replaced
1687:fc67e1c7a5d4 1688:51481414ca65
1126 // We don't call the message_in hook if 'block_unsubscribed' is true and 1126 // We don't call the message_in hook if 'block_unsubscribed' is true and
1127 // this is a regular message from an unsubscribed user. 1127 // this is a regular message from an unsubscribed user.
1128 // System messages (from our server) are allowed. 1128 // System messages (from our server) are allowed.
1129 if ((!settings_opt_get_int("block_unsubscribed") || 1129 if ((!settings_opt_get_int("block_unsubscribed") ||
1130 (roster_getsubscription(bjid) & sub_from) || 1130 (roster_getsubscription(bjid) & sub_from) ||
1131 (type == LM_MESSAGE_SUB_TYPE_CHAT)) || 1131 (type == LM_MESSAGE_SUB_TYPE_GROUPCHAT)) ||
1132 ((s = settings_opt_get("server")) != NULL && !strcasecmp(bjid, s))) { 1132 ((s = settings_opt_get("server")) != NULL && !strcasecmp(bjid, s))) {
1133 gchar *fullbody = NULL; 1133 gchar *fullbody = NULL;
1134 guint encrypted; 1134 guint encrypted;
1135 1135
1136 if (decrypted_pgp) 1136 if (decrypted_pgp)