aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSven Moritz Hallberg <pesco@khjk.org>2011-06-29 03:59:46 +0200
committerSven Moritz Hallberg <pesco@khjk.org>2011-06-29 03:59:46 +0200
commitf1cf01c5eb91fdd3effe04a27cdc5a268ff5ee66 (patch)
treea9c611223b54dfe382b3491c4d040f5c47e58272
parent1082395cb29e7d0bde7ee55fe1e5d73b41e0e984 (diff)
report trust state in gone_secure/still_secure messages
-rw-r--r--otr.c12
1 files changed, 8 insertions, 4 deletions
diff --git a/otr.c b/otr.c
index 843aa3fa..3968da96 100644
--- a/otr.c
+++ b/otr.c
@@ -641,8 +641,10 @@ void op_gone_secure(void *opdata, ConnContext *context)
}
otr_update_uflags(context, u);
- if(!otr_update_modeflags(irc, u))
- irc_usermsg(irc, "conversation with %s is now off the record", u->nick);
+ if(!otr_update_modeflags(irc, u)) {
+ char *trust = u->flags & IRC_USER_OTR_TRUSTED ? "trusted" : "untrusted!";
+ irc_usermsg(irc, "conversation with %s is now off the record (%s)", u->nick, trust);
+ }
}
void op_gone_insecure(void *opdata, ConnContext *context)
@@ -680,8 +682,10 @@ void op_still_secure(void *opdata, ConnContext *context, int is_reply)
}
otr_update_uflags(context, u);
- if(!otr_update_modeflags(irc, u))
- irc_usermsg(irc, "otr connection with %s has been refreshed", u->nick);
+ if(!otr_update_modeflags(irc, u)) {
+ char *trust = u->flags & IRC_USER_OTR_TRUSTED ? "trusted" : "untrusted!";
+ irc_usermsg(irc, "otr connection with %s has been refreshed (%s)", u->nick, trust);
+ }
}
void op_log_message(void *opdata, const char *message)