aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authordequis <dx@dxzone.com.ar>2015-10-21 08:40:11 -0300
committerdequis <dx@dxzone.com.ar>2015-10-21 08:40:11 -0300
commit09f7ec143eef969bbebd10b7eb48504b0372c443 (patch)
tree5be4e9df6601939cb307528f42f1b99e0b320da0
parent2b0c05c056eae4c9aa19584f8cbbac1be7337207 (diff)
Add a per-user version of OPT_NOOTR, BEE_USER_NOOTR
-rw-r--r--otr.c6
-rw-r--r--protocols/bee.h1
2 files changed, 5 insertions, 2 deletions
diff --git a/otr.c b/otr.c
index c17331a8..54c77ba9 100644
--- a/otr.c
+++ b/otr.c
@@ -440,7 +440,8 @@ char *otr_filter_msg_in(irc_user_t *iu, char *msg, int flags)
struct im_connection *ic = iu->bu->ic;
/* don't do OTR on certain (not classic IM) protocols, e.g. twitter */
- if (ic->acc->prpl->options & OPT_NOOTR) {
+ if (ic->acc->prpl->options & OPT_NOOTR ||
+ iu->bu->flags & BEE_USER_NOOTR) {
return msg;
}
@@ -478,7 +479,8 @@ char *otr_filter_msg_out(irc_user_t *iu, char *msg, int flags)
*/
/* don't do OTR on certain (not classic IM) protocols, e.g. twitter */
- if (ic->acc->prpl->options & OPT_NOOTR) {
+ if (ic->acc->prpl->options & OPT_NOOTR ||
+ iu->bu->flags & BEE_USER_NOOTR) {
return msg;
}
diff --git a/protocols/bee.h b/protocols/bee.h
index 4a23d00c..fc27d424 100644
--- a/protocols/bee.h
+++ b/protocols/bee.h
@@ -61,6 +61,7 @@ typedef enum {
BEE_USER_MOBILE = 8, /* Compatibility with old OPT_MOBILE flag */
BEE_USER_LOCAL = 256, /* Locally-added contacts (not in real contact list) */
BEE_USER_SPECIAL = 512, /* Denotes a user as being special */
+ BEE_USER_NOOTR = 4096, /* Per-user version of OPT_NOOTR */
} bee_user_flags_t;
typedef struct bee_user {