summary refs log tree commit diff stats
path: root/plugins
diff options
context:
space:
mode:
Diffstat (limited to 'plugins')
-rw-r--r--plugins/perl/lib/Xchat/List/Network.pm2
-rw-r--r--plugins/perl/perl.c6
-rw-r--r--plugins/python/python.c11
-rw-r--r--plugins/upd/upd.c42
4 files changed, 45 insertions, 16 deletions
diff --git a/plugins/perl/lib/Xchat/List/Network.pm b/plugins/perl/lib/Xchat/List/Network.pm
index 2b112e3a..3a7e2ae6 100644
--- a/plugins/perl/lib/Xchat/List/Network.pm
+++ b/plugins/perl/lib/Xchat/List/Network.pm
@@ -6,7 +6,7 @@ my $last_modified;
 my @servers;
 
 sub get {
-	my $server_file = Xchat::get_info( "configdir" ) . "/servlist_.conf";
+	my $server_file = Xchat::get_info( "configdir" ) . "/servlist.conf";
 
 	# recreate the list only if the server list file has changed
 	if( -f $server_file && 
diff --git a/plugins/perl/perl.c b/plugins/perl/perl.c
index bda3f6f2..6fa2946b 100644
--- a/plugins/perl/perl.c
+++ b/plugins/perl/perl.c
@@ -1042,7 +1042,7 @@ XS (XS_Xchat_hook_fd)
 
 	dXSARGS;
 
-	if (items != 4) {
+	if (items != 5) {
 		hexchat_print (ph,
 						 "Usage: Xchat::Internal::hook_fd(fd, callback, flags, userdata)");
 	} else {
@@ -1424,14 +1424,14 @@ perl_load_file (char *filename)
 									 "You must have a Visual C++ build of Perl "
 									 PERL_REQUIRED_VERSION " installed in order to\n"
 									 "run Perl scripts.\n\n"
-									 "https://github.com/hexchat/hexchat/downloads\n\n"
+									 "http://hexchat.org/downloads.html\n\n"
 									 "I have found Perl 5.6, but that is too old.");
 				} else {
 					thread_mbox ("Cannot open " PERL_DLL "!\n\n"
 									 "You must have a Visual C++ build of Perl "
 									 PERL_REQUIRED_VERSION " installed in order to\n"
 									 "run Perl scripts.\n\n"
-									 "https://github.com/hexchat/hexchat/downloads\n\n"
+									 "http://hexchat.org/downloads.html\n\n"
 									 "Make sure Perl's bin directory is in your PATH.");
 				}
 			}
diff --git a/plugins/python/python.c b/plugins/python/python.c
index 5f98c6c7..239703a8 100644
--- a/plugins/python/python.c
+++ b/plugins/python/python.c
@@ -1610,12 +1610,15 @@ Module_hexchat_pluginpref_get(PyObject *self, PyObject *args)
 	if (!PyArg_ParseTuple(args, "s:get_pluginpref", &var))
 		return NULL;
 	// This will always return numbers as integers.
-	retint = hexchat_pluginpref_get_int(ph, var);
 	if (hexchat_pluginpref_get_str(ph, var, retstr)) {
-		if ((retint == 0) && (strcmp(retstr, "0") != 0))
+		if (strlen (retstr) <= 12) {
+			retint = hexchat_pluginpref_get_int(ph, var);
+			if ((retint == 0) && (strcmp(retstr, "0") != 0))
+				ret = PyString_FromString(retstr);
+			else
+				ret = PyInt_FromLong(retint);
+		} else
 			ret = PyString_FromString(retstr);
-		else
-			ret = PyInt_FromLong(retint);
 	}
 	else
 		ret = Py_None;
diff --git a/plugins/upd/upd.c b/plugins/upd/upd.c
index ee830ce2..e1b850de 100644
--- a/plugins/upd/upd.c
+++ b/plugins/upd/upd.c
@@ -35,6 +35,7 @@ static char name[] = "Update Checker";
 static char desc[] = "Check for HexChat updates automatically";
 static char version[] = "4.0";
 static const char upd_help[] = "Update Checker Usage:\n  /UPDCHK, check for HexChat updates\n  /UPDCHK SET delay|freq, set startup delay or check frequency\n";
+static int legacy_os = 0;
 
 static char*
 check_version ()
@@ -120,14 +121,30 @@ check_version ()
 		return "Unknown";
 	}
 
-	hResource = HttpOpenRequest (hConnect,
-								TEXT ("GET"),
-								TEXT ("/hexchat/hexchat/master/win32/version.txt"),
-								TEXT ("HTTP/1.0"),
-								NULL,
-								NULL,
-								INTERNET_FLAG_SECURE | INTERNET_FLAG_NO_CACHE_WRITE | INTERNET_FLAG_RELOAD | INTERNET_FLAG_NO_AUTH,
-								0);
+	if (legacy_os)
+	{
+		hResource = HttpOpenRequest (hConnect,
+									TEXT ("GET"),
+									TEXT ("/hexchat/hexchat/master/win32/version-xp.txt"),
+									TEXT ("HTTP/1.0"),
+									NULL,
+									NULL,
+									INTERNET_FLAG_SECURE | INTERNET_FLAG_NO_CACHE_WRITE | INTERNET_FLAG_RELOAD | INTERNET_FLAG_NO_AUTH,
+									0);
+	}
+	else
+	{
+		hResource = HttpOpenRequest (hConnect,
+									TEXT ("GET"),
+									TEXT ("/hexchat/hexchat/master/win32/version.txt"),
+									TEXT ("HTTP/1.0"),
+									NULL,
+									NULL,
+									INTERNET_FLAG_SECURE | INTERNET_FLAG_NO_CACHE_WRITE | INTERNET_FLAG_RELOAD | INTERNET_FLAG_NO_AUTH,
+									0);	
+	}
+
+
 	if (!hResource)
 	{
 		InternetCloseHandle (hConnect);
@@ -286,12 +303,21 @@ int
 hexchat_plugin_init (hexchat_plugin *plugin_handle, char **plugin_name, char **plugin_desc, char **plugin_version, char *arg)
 {
 	int delay;
+	OSVERSIONINFOEX osvi;
 	ph = plugin_handle;
 
 	*plugin_name = name;
 	*plugin_desc = desc;
 	*plugin_version = version;
 
+	osvi.dwOSVersionInfoSize = sizeof (OSVERSIONINFOEX);
+	GetVersionEx ((OSVERSIONINFO*) &osvi);
+
+	if (osvi.dwMajorVersion == 5)
+	{
+		legacy_os = 1;
+	}
+
 	/* these are required for the very first run */
 	delay = hexchat_pluginpref_get_int (ph, "delay");
 	if (delay == -1)