summaryrefslogtreecommitdiff
path: root/src/modules/extra
diff options
context:
space:
mode:
authorom <om@e03df62e-2008-0410-955e-edbf42e46eb7>2006-11-19 16:13:28 +0000
committerom <om@e03df62e-2008-0410-955e-edbf42e46eb7>2006-11-19 16:13:28 +0000
commitca24e71f7576591dfa5d405e16e2475aba6d2386 (patch)
treebeff8c37cac4a95d003efaca3e833b4819dff4fe /src/modules/extra
parent73f81c0204fb24f4cc04abbc3486b5e5bbca8db8 (diff)
Hopefully uncraq this script enough to actually work, should return for versions > 8.1.4
git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@5777 e03df62e-2008-0410-955e-edbf42e46eb7
Diffstat (limited to 'src/modules/extra')
-rw-r--r--src/modules/extra/pgsql_config.pl6
1 files changed, 2 insertions, 4 deletions
diff --git a/src/modules/extra/pgsql_config.pl b/src/modules/extra/pgsql_config.pl
index be9fa06ed..6e0b54baf 100644
--- a/src/modules/extra/pgsql_config.pl
+++ b/src/modules/extra/pgsql_config.pl
@@ -1,6 +1,4 @@
#!/usr/bin/perl
-my $v = substr(`pg_config --version`, 11);
-my($a, $b, $c) = split(/\./, $v);
-
-print "-D PGSQL_HAS_ESCAPECONN" if(hex(sprintf("%02x", $a) . sprintf("%02x", $b) . sprintf("%02x", $c)) >= 0x080000);
+`pg_config --version` =~ /^.*?(\d+)\.(\d+)\.(\d+).*?$/;
+print "-D PGSQL_HAS_ESCAPECONN" if(hex(sprintf("0x%02x%02x%02x", $1, $2, $3)) >= 0x080104);