[Pkg-privacy-commits] [irssi-plugin-otr] 110/267: Fix: notice output and missing received smp check
Ximin Luo
infinity0 at moszumanska.debian.org
Sat Aug 22 12:26:23 UTC 2015
This is an automated email from the git hooks/post-receive script.
infinity0 pushed a commit to branch debian
in repository irssi-plugin-otr.
commit 45f1cf18aaecbaa569851f643b603fc437dc613a
Author: David Goulet <dgoulet at ev0ke.net>
Date: Tue Nov 6 12:50:44 2012 -0500
Fix: notice output and missing received smp check
Signed-off-by: David Goulet <dgoulet at ev0ke.net>
---
src/module.c | 2 +-
src/otr-ops.c | 6 ++++--
src/otr.c | 5 ++++-
3 files changed, 9 insertions(+), 4 deletions(-)
diff --git a/src/module.c b/src/module.c
index 25a2e3b..847a332 100644
--- a/src/module.c
+++ b/src/module.c
@@ -249,7 +249,7 @@ void otr_init(void)
statusbar_item_register("otr", NULL, otr_statusbar);
statusbar_items_redraw("window");
- perl_signal_register("otr event",signal_args_otr_event);
+ perl_signal_register("otr event", signal_args_otr_event);
}
/*
diff --git a/src/otr-ops.c b/src/otr-ops.c
index 89637c8..5bf2f6b 100644
--- a/src/otr-ops.c
+++ b/src/otr-ops.c
@@ -155,7 +155,7 @@ static void ops_secure(void *opdata, ConnContext *context)
assert(context);
/* This should *really* not happened */
- assert(context->msgstate == OTRL_MSGSTATE_FINISHED);
+ assert(context->msgstate == OTRL_MSGSTATE_ENCRYPTED);
ioc = context->app_data;
@@ -182,7 +182,9 @@ static void ops_secure(void *opdata, ConnContext *context)
"over a secure line (e.g. telephone) and subsequently enter %9/otr "
"trust%9.");
- IRSSI_NOTICE("Your fingerprint is: %s.\n%s fingerprint is: %s", ownfp,
+ IRSSI_NOTICE(ioc->irssi, context->username,
+ "%9OTR%9: Your fingerprint is: %y%s\%n.\n"
+ "%9OTR%9: %9%s's%9 fingerprint is: %r%s\%n", ownfp,
context->username, peerfp);
end:
diff --git a/src/otr.c b/src/otr.c
index ab4cf6a..5480410 100644
--- a/src/otr.c
+++ b/src/otr.c
@@ -265,10 +265,13 @@ int otr_getstatus(IRC_CTX *irssi, const char *nick)
case OTRL_MSGSTATE_ENCRYPTED:
{
int ex = ctx->smstate->nextExpected;
+ struct irssi_otr_context *ioc = ctx->app_data;
switch (ex) {
case OTRL_SMP_EXPECT1:
- code = IO_ST_SMP_INCOMING;
+ if (ioc->received_smp_init) {
+ code = IO_ST_SMP_INCOMING;
+ }
break;
case OTRL_SMP_EXPECT2:
code = IO_ST_SMP_OUTGOING;
--
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-privacy/packages/irssi-plugin-otr.git
More information about the Pkg-privacy-commits
mailing list