[Pkg-privacy-commits] [irssi-plugin-otr] 11/18: Fix formatting in tronic escape message patch

Antoine Beaupré anarcat at moszumanska.debian.org
Tue Mar 29 14:20:55 UTC 2016


This is an automated email from the git hooks/post-receive script.

anarcat pushed a commit to branch debian
in repository irssi-plugin-otr.

commit 251f7b85dc3563d82d715fc66d8d37ba47d93169
Author: David Goulet <dgoulet at ev0ke.net>
Date:   Fri Mar 25 13:02:25 2016 -0400

    Fix formatting in tronic escape message patch
    
    Signed-off-by: David Goulet <dgoulet at ev0ke.net>
---
 src/otr.c   |  9 ++++++---
 src/otr.h   |  7 ++++---
 src/utils.c | 13 ++++++++-----
 3 files changed, 18 insertions(+), 11 deletions(-)

diff --git a/src/otr.c b/src/otr.c
index 9c0d25f..d1ad448 100644
--- a/src/otr.c
+++ b/src/otr.c
@@ -363,9 +363,12 @@ int otr_send(SERVER_REC *irssi, const char *msg, const char *to, char **otr_msg)
 		IRSSI_NOTICE(irssi, to, "Send failed.");
 		goto error;
 	}
-	
-	/* Modify some libotr messages (OTR init in particular) to work better with IRC. */
-	if (*otr_msg) utils_escape_message(*otr_msg);
+
+	/* Modify some libotr messages (OTR init in particular) to work better
+	 * with IRC. */
+	if (*otr_msg) {
+		utils_escape_message(*otr_msg);
+	}
 
 	IRSSI_DEBUG("Message sent...");
 
diff --git a/src/otr.h b/src/otr.h
index de62aa6..d1505e6 100644
--- a/src/otr.h
+++ b/src/otr.h
@@ -54,9 +54,10 @@
 #define OTR_MSG_BEGIN_TAG             "?OTR:"
 #define OTR_MSG_END_TAG               '.'
 
-#define OTR_MSG_HELP                  "  This is a request for an Off-the-Record private conversation. "\
-                                      "However, you do not have a plugin to support that. If you are using Irssi, "\
-                                      "please install irssi-otr (irssi-plugin-otr).";
+#define OTR_MSG_HELP \
+	" This is a request for an Off-the-Record private conversation. " \
+    "However, you do not have a plugin to support that. " \
+	"If you are using Irssi, please install irssi-otr (irssi-plugin-otr)."
 
 /* IRC /me command marker and len. */
 #define OTR_IRC_MARKER_ME             "/me "
diff --git a/src/utils.c b/src/utils.c
index c676853..8c6ef3c 100644
--- a/src/utils.c
+++ b/src/utils.c
@@ -74,13 +74,16 @@ char *utils_trim_string(char *s)
 }
 
 /*
- * Convert invalid characters (newlines from libotr) into spaces.
- * Also change the init help string because IRC does not support HTML.
+ * Convert invalid characters (newlines from libotr) into spaces. Also change
+ * the init help string because IRC does not support HTML.
  */
-char *utils_escape_message(char *s) {
-	char const* helpmsg = OTR_MSG_HELP;
+char *utils_escape_message(char *s)
+{
+	char const *helpmsg = OTR_MSG_HELP;
 	size_t i;
-	if (strncmp(s, "?OTR", 4) == 0 && strstr(s, "</b> has requested an <a href")) {
+
+	if (strncmp(s, "?OTR", 4) == 0 &&
+		strstr(s, "</b> has requested an <a href")) {
 		i = strcspn(s, "\n");
 		if (i + strlen(helpmsg) <= strlen(s)) {
 			strcpy(s + i, helpmsg);

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