[Pkg-privacy-commits] [hexchat-otr] 02/02: Added network-key.patch to use network rather than server for account name.
Petter Reinholdtsen
pere at moszumanska.debian.org
Wed Jun 22 04:43:26 UTC 2016
This is an automated email from the git hooks/post-receive script.
pere pushed a commit to branch master
in repository hexchat-otr.
commit fcc883ab984ae5fcb2f51b885368bffd8563e741
Author: Petter Reinholdtsen <pere at hungry.com>
Date: Wed Jun 22 06:38:27 2016 +0200
Added network-key.patch to use network rather than server for account name.
---
debian/patches/network-key.patch | 107 +++++++++++++++++++++++++++++++++++++++
debian/patches/series | 1 +
2 files changed, 108 insertions(+)
diff --git a/debian/patches/network-key.patch b/debian/patches/network-key.patch
new file mode 100644
index 0000000..e1c95dc
--- /dev/null
+++ b/debian/patches/network-key.patch
@@ -0,0 +1,107 @@
+Description: Use network rather than server for account name
+
+ Note that this will require regenerating keys as they
+ are not migrated.
+
+Author: Petter Reinholdtsen <pere at debian.org>
+Bug: https://github.com/TingPing/hexchat-otr/issues/7
+Origin: https://github.com/TingPing/hexchat-otr/commit/243efd269eb45d54349fa104f472bc6a0f415926
+Forwarded: yes
+Reviewed-By: Petter Reinholdtsen <pere at debian.org>
+Last-Update: 2016-05-16
+
+diff --git a/src/hexchat_otr.c b/src/hexchat_otr.c
+index 7bef9ed..7e521c6 100644
+--- a/src/hexchat_otr.c
++++ b/src/hexchat_otr.c
+@@ -64,10 +64,10 @@ static int cmd_otr (char *word[], char *word_eol[], void *userdata)
+ {
+ const char *own_nick = hexchat_get_info (ph, "nick");
+ char *target = (char *)hexchat_get_info (ph, "channel");
+- const char *server = hexchat_get_info (ph, "server");
++ const char *network = hexchat_get_info (ph, "network");
+ IRC_CTX ircctxs = {
+ .nick = (char *)own_nick,
+- .address = (char *)server
++ .address = (char *)network
+ },
+ *ircctx = &ircctxs;
+
+@@ -189,12 +189,12 @@ static int hook_outgoing (char *word[], char *word_eol[], void *userdata)
+ {
+ const char *own_nick = hexchat_get_info (ph, "nick");
+ const char *channel = hexchat_get_info (ph, "channel");
+- const char *server = hexchat_get_info (ph, "server");
++ const char *network = hexchat_get_info (ph, "network");
+ char newmsg[512];
+ char *otrmsg;
+ IRC_CTX ircctx = {
+ .nick = (char *)own_nick,
+- .address = (char *)server
++ .address = (char *)network
+ };
+
+ if (get_current_context_type () != 3) /* Not PM */
+@@ -224,12 +224,12 @@ static int hook_privmsg (char *word[], char *word_eol[], void *userdata)
+ {
+ char nick[256];
+ char *newmsg;
+- const char *server = hexchat_get_info (ph, "server");
++ const char *network = hexchat_get_info (ph, "network");
+ const char *own_nick = hexchat_get_info (ph, "nick");
+ const char *chantypes = hexchat_list_str (ph, NULL, "chantypes");
+ IRC_CTX ircctx = {
+ .nick = (char *)own_nick,
+- .address = (char *)server
++ .address = (char *)network
+ };
+ hexchat_context *query_ctx;
+
+@@ -254,11 +254,11 @@ static int hook_privmsg (char *word[], char *word_eol[], void *userdata)
+ return HEXCHAT_EAT_NONE;
+ }
+
+- query_ctx = hexchat_find_context (ph, server, nick);
++ query_ctx = hexchat_find_context (ph, network, nick);
+ if (query_ctx == NULL)
+ {
+ hexchat_commandf (ph, "query %s", nick);
+- query_ctx = hexchat_find_context (ph, server, nick);
++ query_ctx = hexchat_find_context (ph, network, nick);
+ }
+
+ GRegex *regex_quot = g_regex_new (""", 0, 0, NULL);
+@@ -348,19 +348,19 @@ void printformat (IRC_CTX *ircctx, const char *nick, int lvl, int fnum, ...)
+ va_start (params, fnum);
+ char msg[LOGMAX], *s = msg;
+ hexchat_context *find_query_ctx;
+- char *server = NULL;
++ char *network = NULL;
+
+ if (ircctx)
+- server = ircctx->address;
++ network = ircctx->address;
+
+- if (server && nick)
++ if (network && nick)
+ {
+- find_query_ctx = hexchat_find_context (ph, server, nick);
++ find_query_ctx = hexchat_find_context (ph, network, nick);
+ if (find_query_ctx == NULL)
+ {
+ /* no query window yet, let's open one */
+ hexchat_commandf (ph, "query %s", nick);
+- find_query_ctx = hexchat_find_context (ph, server, nick);
++ find_query_ctx = hexchat_find_context (ph, network, nick);
+ }
+ }
+ else
+@@ -369,7 +369,7 @@ void printformat (IRC_CTX *ircctx, const char *nick, int lvl, int fnum, ...)
+ NULL,
+ hexchat_get_info (ph,
+ "network")
+- ?: hexchat_get_info (ph, "server"));
++ ?: hexchat_get_info (ph, "network"));
+ }
+
+ hexchat_set_context (ph, find_query_ctx);
diff --git a/debian/patches/series b/debian/patches/series
new file mode 100644
index 0000000..4671417
--- /dev/null
+++ b/debian/patches/series
@@ -0,0 +1 @@
+network-key.patch
--
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-privacy/packages/hexchat-otr.git
More information about the Pkg-privacy-commits
mailing list