summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--make/directive.pm13
-rw-r--r--make/template/main.mk6
-rw-r--r--src/channels.cpp2
-rw-r--r--src/modules/extra/m_geoip.cpp1
-rw-r--r--src/modules/extra/m_ldap.cpp2
-rw-r--r--src/modules/extra/m_mysql.cpp2
-rw-r--r--src/modules/extra/m_pgsql.cpp1
-rw-r--r--src/modules/extra/m_regex_pcre.cpp1
-rw-r--r--src/modules/extra/m_sqlite3.cpp1
-rw-r--r--src/modules/extra/m_ssl_gnutls.cpp1
-rw-r--r--src/modules/extra/m_ssl_openssl.cpp1
11 files changed, 24 insertions, 7 deletions
diff --git a/make/directive.pm b/make/directive.pm
index c490135fd..4501fc5ec 100644
--- a/make/directive.pm
+++ b/make/directive.pm
@@ -80,6 +80,13 @@ sub execute_functions($$$) {
return $line;
}
+sub __environment {
+ my ($prefix, $suffix) = @_;
+ $suffix =~ s/[-.]/_/g;
+ $suffix =~ s/[^A-Za-z0-9_]//g;
+ return $prefix . uc $suffix;
+}
+
sub __error {
my ($file, @message) = @_;
push @message, '';
@@ -142,7 +149,7 @@ sub __function_execute {
# If looking up with pkg-config fails then check the environment...
if (defined $environment && $environment ne '') {
- $environment = sprintf('INSPIRCD_%s', uc $environment);
+ $environment = __environment 'INSPIRCD_', $environment;
if (defined $ENV{$environment}) {
print_format "Execution of `<|GREEN $command|>` failed; using the environment: <|BOLD $ENV{$environment}|>\n";
return $ENV{$environment};
@@ -170,7 +177,7 @@ sub __function_find_compiler_flags {
}
# If looking up with pkg-config fails then check the environment...
- my $key = sprintf('INSPIRCD_CXXFLAGS_%s', uc $name);
+ my $key = __environment 'INSPIRCD_CXXFLAGS_', $name;
if (defined $ENV{$key}) {
print_format "Found the compiler flags for <|GREEN ${\basename $file, '.cpp'}|> using the environment: <|BOLD $ENV{$key}|>\n";
return $ENV{$key};
@@ -197,7 +204,7 @@ sub __function_find_linker_flags {
}
# If looking up with pkg-config fails then check the environment...
- my $key = sprintf('INSPIRCD_LDFLAGS_%s', uc $name);
+ my $key = __environment 'INSPIRCD_CXXFLAGS_', $name;
if (defined $ENV{$key}) {
print_format "Found the linker flags for <|GREEN ${\basename $file, '.cpp'}|> using the environment: <|BOLD $ENV{$key}|>\n";
return $ENV{$key};
diff --git a/make/template/main.mk b/make/template/main.mk
index 818b4139d..c2babe8f6 100644
--- a/make/template/main.mk
+++ b/make/template/main.mk
@@ -123,9 +123,9 @@ FOOTER = finishmessage
CORECXXFLAGS += -DINSPIRCD_STATIC
@ENDIF
-# Add the users CXXFLAGS to the base ones to allow them to override
-# things like -Wfatal-errors if they wish to.
-CORECXXFLAGS += $(CXXFLAGS)
+# Add the users CPPFLAGS/CXXFLAGS to the base ones to allow them to
+# override things like -Wfatal-errors if they wish to.
+CORECXXFLAGS += $(CPPFLAGS) $(CXXFLAGS)
@DO_EXPORT CXX CORECXXFLAGS LDLIBS PICLDFLAGS INSPIRCD_VERBOSE SOCKETENGINE CORELDFLAGS
@DO_EXPORT SOURCEPATH BUILDPATH INSPIRCD_STATIC
diff --git a/src/channels.cpp b/src/channels.cpp
index 49fa75f98..bc23c680a 100644
--- a/src/channels.cpp
+++ b/src/channels.cpp
@@ -181,7 +181,7 @@ Channel* Channel::JoinUser(LocalUser* user, std::string cname, bool override, co
{
unsigned int opermaxchans = ConvToInt(user->oper->getConfig("maxchans"));
// If not set, use 2.0's <channels:opers>, if that's not set either, use limit from CC
- if (!opermaxchans)
+ if (!opermaxchans && user->HasPrivPermission("channels/high-join-limit"))
opermaxchans = ServerInstance->Config->OperMaxChans;
if (opermaxchans)
maxchans = opermaxchans;
diff --git a/src/modules/extra/m_geoip.cpp b/src/modules/extra/m_geoip.cpp
index b350ede90..c7b0fd210 100644
--- a/src/modules/extra/m_geoip.cpp
+++ b/src/modules/extra/m_geoip.cpp
@@ -20,6 +20,7 @@
/// $CompilerFlags: find_compiler_flags("geoip" "")
/// $LinkerFlags: find_linker_flags("geoip" "-lGeoIP")
+/// $PackageInfo: require_system("centos" "7.0") GeoIP-devel pkgconfig
/// $PackageInfo: require_system("darwin") geoip pkg-config
/// $PackageInfo: require_system("ubuntu") libgeoip-dev pkg-config
diff --git a/src/modules/extra/m_ldap.cpp b/src/modules/extra/m_ldap.cpp
index 78cce50bd..fc1bee939 100644
--- a/src/modules/extra/m_ldap.cpp
+++ b/src/modules/extra/m_ldap.cpp
@@ -18,6 +18,8 @@
*/
/// $LinkerFlags: -llber -lldap_r
+
+/// $PackageInfo: require_system("centos") openldap-devel
/// $PackageInfo: require_system("ubuntu") libldap2-dev
#include "inspircd.h"
diff --git a/src/modules/extra/m_mysql.cpp b/src/modules/extra/m_mysql.cpp
index d965c88fb..39b0c369d 100644
--- a/src/modules/extra/m_mysql.cpp
+++ b/src/modules/extra/m_mysql.cpp
@@ -22,6 +22,8 @@
/// $CompilerFlags: execute("mysql_config --include" "MYSQL_CXXFLAGS")
/// $LinkerFlags: execute("mysql_config --libs_r" "MYSQL_LDFLAGS" "-lmysqlclient")
+/// $PackageInfo: require_system("centos" "6.0" "6.99") mysql-devel
+/// $PackageInfo: require_system("centos" "7.0") mariadb-devel
/// $PackageInfo: require_system("darwin") mysql-connector-c
/// $PackageInfo: require_system("ubuntu") libmysqlclient-dev
diff --git a/src/modules/extra/m_pgsql.cpp b/src/modules/extra/m_pgsql.cpp
index 56455a718..5f6f6e30f 100644
--- a/src/modules/extra/m_pgsql.cpp
+++ b/src/modules/extra/m_pgsql.cpp
@@ -24,6 +24,7 @@
/// $CompilerFlags: -Iexecute("pg_config --includedir" "POSTGRESQL_INCLUDE_DIR")
/// $LinkerFlags: -Lexecute("pg_config --libdir" "POSTGRESQL_LIBRARY_DIR") -lpq
+/// $PackageInfo: require_system("centos") postgresql-devel
/// $PackageInfo: require_system("darwin") postgresql
/// $PackageInfo: require_system("ubuntu") libpq-dev
diff --git a/src/modules/extra/m_regex_pcre.cpp b/src/modules/extra/m_regex_pcre.cpp
index 5ad27858f..e270ca039 100644
--- a/src/modules/extra/m_regex_pcre.cpp
+++ b/src/modules/extra/m_regex_pcre.cpp
@@ -20,6 +20,7 @@
/// $CompilerFlags: execute("pcre-config --cflags" "PCRE_CXXFLAGS")
/// $LinkerFlags: execute("pcre-config --libs" "PCRE_LDFLAGS" "-lpcre")
+/// $PackageInfo: require_system("centos") pcre-devel pkgconfig
/// $PackageInfo: require_system("darwin") pcre pkg-config
/// $PackageInfo: require_system("ubuntu") libpcre3-dev pkg-config
diff --git a/src/modules/extra/m_sqlite3.cpp b/src/modules/extra/m_sqlite3.cpp
index fa88cacc3..ac7146e38 100644
--- a/src/modules/extra/m_sqlite3.cpp
+++ b/src/modules/extra/m_sqlite3.cpp
@@ -22,6 +22,7 @@
/// $CompilerFlags: find_compiler_flags("sqlite3")
/// $LinkerFlags: find_linker_flags("sqlite3" "-lsqlite3")
+/// $PackageInfo: require_system("centos") pkgconfig sqlite-devel
/// $PackageInfo: require_system("darwin") pkg-config sqlite3
/// $PackageInfo: require_system("ubuntu") libsqlite3-dev pkg-config
diff --git a/src/modules/extra/m_ssl_gnutls.cpp b/src/modules/extra/m_ssl_gnutls.cpp
index a42efa1ab..c1ffdfb4c 100644
--- a/src/modules/extra/m_ssl_gnutls.cpp
+++ b/src/modules/extra/m_ssl_gnutls.cpp
@@ -26,6 +26,7 @@
/// $LinkerFlags: find_linker_flags("gnutls" "-lgnutls")
/// $LinkerFlags: require_version("gnutls" "1.0" "2.12") execute("libgcrypt-config --libs" "LIBGCRYPT_LDFLAGS")
+/// $PackageInfo: require_system("centos") gnutls-devel pkgconfig
/// $PackageInfo: require_system("darwin") gnutls pkg-config
/// $PackageInfo: require_system("ubuntu" "1.0" "13.10") libgcrypt11-dev
/// $PackageInfo: require_system("ubuntu" "14.04") gnutls-bin libgnutls-dev pkg-config
diff --git a/src/modules/extra/m_ssl_openssl.cpp b/src/modules/extra/m_ssl_openssl.cpp
index 8843c34f6..7cff5da8a 100644
--- a/src/modules/extra/m_ssl_openssl.cpp
+++ b/src/modules/extra/m_ssl_openssl.cpp
@@ -24,6 +24,7 @@
/// $CompilerFlags: find_compiler_flags("openssl")
/// $LinkerFlags: find_linker_flags("openssl" "-lssl -lcrypto")
+/// $PackageInfo: require_system("centos") openssl-devel pkgconfig
/// $PackageInfo: require_system("darwin") openssl pkg-config
/// $PackageInfo: require_system("ubuntu" "16.04") libssl-dev openssl pkg-config