From 801484e5ff727627a0628a9f47e1ffa1f0b04d05 Mon Sep 17 00:00:00 2001
From: Legimet <legimet.calc@gmail.com>
Date: Sat, 13 Jun 2015 13:56:05 -0400
Subject: [PATCH] Add make-xchat helper

---
 helpers/DATA/xchat/35865_open_link_fix.patch | 16 +++++++++++
 helpers/make-xchat                           | 30 ++++++++++++++++++++
 2 files changed, 46 insertions(+)
 create mode 100644 helpers/DATA/xchat/35865_open_link_fix.patch
 create mode 100644 helpers/make-xchat

diff --git a/helpers/DATA/xchat/35865_open_link_fix.patch b/helpers/DATA/xchat/35865_open_link_fix.patch
new file mode 100644
index 00000000..c6b943aa
--- /dev/null
+++ b/helpers/DATA/xchat/35865_open_link_fix.patch
@@ -0,0 +1,16 @@
+Description: Changes default browser from Opera (which is non-free) to Epiphany.
+Author: Marek Buras <cyfr0n@go2.pl>
+Origin: vendor
+Forwarded: no
+Last-Update: 2013-01-29
+--- a/src/common/xchat.c
++++ b/src/common/xchat.c
+@@ -604,7 +604,7 @@
+ 	"NAME WII\n"			"CMD quote WHOIS %2 %2\n\n";
+ 
+ static char defaultconf_urlhandlers[] =
+-		"NAME Open Link in Opera\n"		"CMD !opera -remote 'openURL(%s)'\n\n";
++		"NAME Open Link in the default browser\n"	"CMD !x-www-browser '%s'\n\n";
+ 
+ #ifdef USE_SIGACTION
+ /* Close and open log files on SIGUSR1. Usefull for log rotating */
diff --git a/helpers/make-xchat b/helpers/make-xchat
new file mode 100644
index 00000000..5d82b047
--- /dev/null
+++ b/helpers/make-xchat
@@ -0,0 +1,30 @@
+#!/bin/sh
+#
+#    Copyright (C) 2015  Legimet <legimet.calc@gmail.com>
+#
+#    This program is free software; you can redistribute it and/or modify
+#    it under the terms of the GNU General Public License as published by
+#    the Free Software Foundation; either version 2 of the License, or
+#    (at your option) any later version.
+#
+#    This program is distributed in the hope that it will be useful,
+#    but WITHOUT ANY WARRANTY; without even the implied warranty of
+#    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+#    GNU General Public License for more details.
+#
+#    You should have received a copy of the GNU General Public License
+#    along with this program; if not, write to the Free Software
+#    Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301 USA
+#
+
+VERSION=1
+
+. ./config
+
+# Apply patch from https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=691477#28
+patch -p1 < $DATA/35865_open_link_fix.patch
+
+changelog "Replace nonfree browser with default system browser in URL handler, #5994"
+
+compile
+
-- 
GitLab