summary refs log tree commit diff stats
path: root/src/common
diff options
context:
space:
mode:
Diffstat (limited to 'src/common')
-rw-r--r--src/common/Makefile.am6
-rw-r--r--src/common/cfgfiles.c2
-rw-r--r--src/common/hexchat.h7
-rw-r--r--src/common/plugin.c42
-rw-r--r--src/common/servlist.c12
-rw-r--r--src/common/ssl.c5
6 files changed, 58 insertions, 16 deletions
diff --git a/src/common/Makefile.am b/src/common/Makefile.am
index ca1eaba3..9c2d443e 100644
--- a/src/common/Makefile.am
+++ b/src/common/Makefile.am
@@ -44,6 +44,10 @@ if USE_OPENSSL
 ssl_c = ssl.c
 endif
 
+if USE_MSPROXY
+msproxy_c = msproxy.c
+endif
+
 if USE_DBUS
 dbusdir = dbus
 libhexchatcommon_a_LIBADD =				\
@@ -58,7 +62,7 @@ endif
 noinst_PROGRAMS = make-te
 
 libhexchatcommon_a_SOURCES = cfgfiles.c chanopt.c ctcp.c dcc.c hexchat.c \
-	history.c ignore.c inbound.c modes.c msproxy.c network.c notify.c \
+	history.c ignore.c inbound.c modes.c $(msproxy_c) network.c notify.c \
 	outbound.c plugin.c plugin-timer.c proto-irc.c server.c servlist.c \
 	$(ssl_c) text.c tree.c url.c userlist.c util.c
 libhexchatcommon_a_CFLAGS = $(LIBPROXY_CFLAGS)
diff --git a/src/common/cfgfiles.c b/src/common/cfgfiles.c
index 489eeda2..b7a8beda 100644
--- a/src/common/cfgfiles.c
+++ b/src/common/cfgfiles.c
@@ -926,7 +926,7 @@ make_config_dirs (void)
 {
 	char *buf;
 
-	if (g_mkdir (get_xdir (), 0700) != 0)
+	if (g_mkdir_with_parents (get_xdir (), 0700) != 0)
 		return -1;
 	
 	buf = g_build_filename (get_xdir (), "addons", NULL);
diff --git a/src/common/hexchat.h b/src/common/hexchat.h
index 39a44191..7143f8ab 100644
--- a/src/common/hexchat.h
+++ b/src/common/hexchat.h
@@ -31,6 +31,13 @@
 #ifndef HEXCHAT_H
 #define HEXCHAT_H
 
+#ifdef USE_OPENSSL
+#ifdef __APPLE__
+#define __AVAILABILITYMACROS__
+#define DEPRECATED_IN_MAC_OS_X_VERSION_10_7_AND_LATER
+#endif
+#endif
+
 #include "history.h"
 
 #ifndef HAVE_SNPRINTF
diff --git a/src/common/plugin.c b/src/common/plugin.c
index 286a68c7..89ebd89c 100644
--- a/src/common/plugin.c
+++ b/src/common/plugin.c
@@ -479,36 +479,50 @@ plugin_auto_load_cb (char *filename)
 	}
 }
 
+static char *
+plugin_get_libdir ()
+{
+	const char *libdir;
+
+	libdir = g_getenv ("HEXCHAT_LIBDIR");
+	if (libdir && *libdir)
+		return (char*)libdir;
+	else
+		return HEXCHATLIBDIR;
+}
+
 void
 plugin_auto_load (session *sess)
 {
+	char *lib_dir; 
 	char *sub_dir;
 	ps = sess;
 
+	lib_dir = plugin_get_libdir ();
 	sub_dir = g_build_filename (get_xdir (), "addons", NULL);
 
 #ifdef WIN32
 	/* a long list of bundled plugins that should be loaded automatically,
 	 * user plugins should go to <config>, leave Program Files alone! */
-	for_files (HEXCHATLIBDIR, "hcchecksum.dll", plugin_auto_load_cb);
-	for_files (HEXCHATLIBDIR, "hcdoat.dll", plugin_auto_load_cb);
-	for_files (HEXCHATLIBDIR, "hcexec.dll", plugin_auto_load_cb);
-	for_files (HEXCHATLIBDIR, "hcfishlim.dll", plugin_auto_load_cb);
-	for_files (HEXCHATLIBDIR, "hcmpcinfo.dll", plugin_auto_load_cb);
-	for_files (HEXCHATLIBDIR, "hcperl.dll", plugin_auto_load_cb);
-	for_files (HEXCHATLIBDIR, "hcpython2.dll", plugin_auto_load_cb);
-	for_files (HEXCHATLIBDIR, "hcpython3.dll", plugin_auto_load_cb);
-	for_files (HEXCHATLIBDIR, "hcupd.dll", plugin_auto_load_cb);
-	for_files (HEXCHATLIBDIR, "hcwinamp.dll", plugin_auto_load_cb);
-	for_files (HEXCHATLIBDIR, "hcsysinfo.dll", plugin_auto_load_cb);
+	for_files (lib_dir, "hcchecksum.dll", plugin_auto_load_cb);
+	for_files (lib_dir, "hcdoat.dll", plugin_auto_load_cb);
+	for_files (lib_dir, "hcexec.dll", plugin_auto_load_cb);
+	for_files (lib_dir, "hcfishlim.dll", plugin_auto_load_cb);
+	for_files (lib_dir, "hcmpcinfo.dll", plugin_auto_load_cb);
+	for_files (lib_dir, "hcperl.dll", plugin_auto_load_cb);
+	for_files (lib_dir, "hcpython2.dll", plugin_auto_load_cb);
+	for_files (lib_dir, "hcpython3.dll", plugin_auto_load_cb);
+	for_files (lib_dir, "hcupd.dll", plugin_auto_load_cb);
+	for_files (lib_dir, "hcwinamp.dll", plugin_auto_load_cb);
+	for_files (lib_dir, "hcsysinfo.dll", plugin_auto_load_cb);
 
 	for_files (sub_dir, "*.dll", plugin_auto_load_cb);
 #else
 #if defined(__hpux)
-	for_files (HEXCHATLIBDIR, "*.sl", plugin_auto_load_cb);
+	for_files (lib_dir, "*.sl", plugin_auto_load_cb);
 	for_files (sub_dir, "*.sl", plugin_auto_load_cb);
 #else
-	for_files (HEXCHATLIBDIR, "*.so", plugin_auto_load_cb);
+	for_files (lib_dir, "*.so", plugin_auto_load_cb);
 	for_files (sub_dir, "*.so", plugin_auto_load_cb);
 #endif
 #endif
@@ -1166,7 +1180,7 @@ hexchat_get_info (hexchat_plugin *ph, const char *id)
 	switch (hash)
 	{
 		case 0x325acab5:	/* libdirfs */
-			return HEXCHATLIBDIR;
+			return plugin_get_libdir ();
 
 		case 0x14f51cd8: /* version */
 			return PACKAGE_VERSION;
diff --git a/src/common/servlist.c b/src/common/servlist.c
index 46f99c5d..c84df64c 100644
--- a/src/common/servlist.c
+++ b/src/common/servlist.c
@@ -120,6 +120,12 @@ static const struct defaultserver def[] =
 	{"Beirut", 0},
 	{0,			"irc.beirut.com"},
 
+	{"Canternet", 0, 0, 0, LOGIN_SASL},
+#ifdef USE_OPENSSL
+	{0, 		"irc.canternet.org/+6697"},
+#endif
+	{0,			"irc.canternet.org"},
+
 	{"Chat4all", 0},
 #ifdef USE_OPENSSL
 	{0,			"irc.chat4all.org/+7001"},
@@ -463,6 +469,12 @@ static const struct defaultserver def[] =
 #endif
 	{0,			"irc.swiftirc.net/6667"},
 
+	{"synIRC", 0},
+#ifdef USE_OPENSSL
+	{0, "irc.synirc.net/+6697"},
+#endif
+	{0, "irc.synirc.net/6667"},
+
 	{"Techman's World IRC",		0},
 #ifdef USE_OPENSSL
 	{0,			"irc.techmansworld.com/+6697"},
diff --git a/src/common/ssl.c b/src/common/ssl.c
index 742da619..d036fb66 100644
--- a/src/common/ssl.c
+++ b/src/common/ssl.c
@@ -17,6 +17,11 @@
  * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
  */
 
+#ifdef __APPLE__
+#define __AVAILABILITYMACROS__
+#define DEPRECATED_IN_MAC_OS_X_VERSION_10_7_AND_LATER
+#endif
+
 #include "inet.h"				  /* make it first to avoid macro redefinitions */
 #include <openssl/ssl.h>		  /* SSL_() */
 #include <openssl/err.h>		  /* ERR_() */