[Pkg-privacy-commits] [irssi-plugin-otr] 112/267: Add /otr init command

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 fe6444c82564b909729df520fdf1e2d881b5bbde
Author: David Goulet <dgoulet at ev0ke.net>
Date:   Tue Nov 6 17:14:50 2012 -0500

    Add /otr init command
    
    Instead of typing "?OTRv23" as a private message, use /otr init to start
    an OTR session.
    
    Small fixes to the status bar text when unverified and verified.
    
    Signed-off-by: David Goulet <dgoulet at ev0ke.net>
---
 src/cmd.c         | 11 +++++++++++
 src/otr-formats.c |  8 ++++----
 2 files changed, 15 insertions(+), 4 deletions(-)

diff --git a/src/cmd.c b/src/cmd.c
index 582c4c1..67b90a8 100644
--- a/src/cmd.c
+++ b/src/cmd.c
@@ -217,10 +217,21 @@ static void _cmd_contexts(IOUSTATE *ioustate, IRC_CTX *ircctx, int argc,
 	}
 }
 
+static void _cmd_init(IOUSTATE *ioustate, SERVER_REC *irssi, int argc,
+		char *argv[], char *argv_eol[], char *target, const char *orig_args)
+{
+	char *msg;
+
+	msg = otrl_proto_default_query_msg(target, OTRL_POLICY_DEFAULT);
+	irc_send_message(irssi, target, msg ? msg : "?OTRv23?");
+	free(msg);
+}
+
 static struct irssi_commands cmds[] = {
 	{ "version", _cmd_version },
 	{ "debug", _cmd_debug },
 	{ "help", _cmd_help },
+	{ "init", _cmd_init },
 	{ "finish", _cmd_finish },
 	{ "trust", _cmd_trust },
 	{ "authabort", _cmd_authabort },
diff --git a/src/otr-formats.c b/src/otr-formats.c
index 2d9f7a7..c9ca398 100644
--- a/src/otr-formats.c
+++ b/src/otr-formats.c
@@ -108,14 +108,14 @@ FORMAT_REC formats[] = {
 		{ NULL, "Statusbar", 0 }
 	,
 		{ "st_plaintext", "{sb plaintext}", 0},
-		{ "st_untrusted", "{sb %rOTR(not auth'ed)%n}", 0},
-		{ "st_trust_smp", "{sb %gOTR%n}", 0},
-		{ "st_trust_manual", "{sb %gOTR%n}", 0},
+		{ "st_untrusted", "{sb %GOTR%n (%runverified%n)}", 0},
+		{ "st_trust_smp", "{sb %GOTR%n}", 0},
+		{ "st_trust_manual", "{sb %GOTR%n}", 0},
 		{ "st_smp_incoming", "{sb {hilight incoming auth request...}}", 0},
 		{ "st_smp_outgoing", "{sb {hilight awaiting auth reply...}}", 0},
 		{ "st_smp_finalize", "{sb {hilight finalizing auth...}}", 0},
 		{ "st_smp_unknown", "{sb {hilight unknown auth state!}}", 0},
-		{ "st_finished", "{sb finished}", 0},
+		{ "st_finished", "{sb %yfinished%n}", 0},
 		{ "st_unknown", "{sb {hilight state unknown (BUG!)}}", 0},
 		{ NULL, NULL, 0 }
 };

-- 
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