diff options
| author | Sadie Powell <sadie@witchery.services> | 2022-01-12 22:05:59 +0000 |
|---|---|---|
| committer | Sadie Powell <sadie@witchery.services> | 2022-01-12 22:08:35 +0000 |
| commit | a631028660d527f509c3b028cfa5f2903a125077 (patch) | |
| tree | 830ba6644bb312af32847db654bfb842ed44a7cd /modules/extra | |
| parent | 4e5fc9797c2ea285e855f808dc65694d1cdba358 (diff) | |
| parent | 04257b9d6ab0fa1a63ade1d2ad0edc2d08eb74ce (diff) | |
Merge branch '2.0' into 2.1.
Diffstat (limited to 'modules/extra')
| -rw-r--r-- | modules/extra/m_ldap.cpp | 2 | ||||
| -rw-r--r-- | modules/extra/m_ldap_authentication.cpp | 2 | ||||
| -rw-r--r-- | modules/extra/m_ldap_oper.cpp | 2 | ||||
| -rw-r--r-- | modules/extra/m_mysql.cpp | 2 | ||||
| -rw-r--r-- | modules/extra/m_regex_pcre.cpp | 2 | ||||
| -rw-r--r-- | modules/extra/m_regex_posix.cpp | 2 | ||||
| -rw-r--r-- | modules/extra/m_regex_tre.cpp | 2 | ||||
| -rw-r--r-- | modules/extra/m_sql_authentication.cpp | 2 | ||||
| -rw-r--r-- | modules/extra/m_sql_log.cpp | 2 | ||||
| -rw-r--r-- | modules/extra/m_sql_oper.cpp | 2 | ||||
| -rw-r--r-- | modules/extra/m_sqlite.cpp | 2 | ||||
| -rw-r--r-- | modules/extra/m_ssl_gnutls.cpp | 2 | ||||
| -rw-r--r-- | modules/extra/m_ssl_openssl.cpp | 2 | ||||
| -rw-r--r-- | modules/extra/stats/cs_fantasy_stats.cpp | 2 | ||||
| -rw-r--r-- | modules/extra/stats/cs_fantasy_top.cpp | 2 | ||||
| -rw-r--r-- | modules/extra/stats/irc2sql/irc2sql.cpp | 2 | ||||
| -rw-r--r-- | modules/extra/stats/irc2sql/irc2sql.h | 2 | ||||
| -rw-r--r-- | modules/extra/stats/irc2sql/tables.cpp | 93 | ||||
| -rw-r--r-- | modules/extra/stats/irc2sql/utils.cpp | 2 | ||||
| -rw-r--r-- | modules/extra/stats/m_chanstats.cpp | 2 |
20 files changed, 68 insertions, 63 deletions
diff --git a/modules/extra/m_ldap.cpp b/modules/extra/m_ldap.cpp index b72c9af56..b450df751 100644 --- a/modules/extra/m_ldap.cpp +++ b/modules/extra/m_ldap.cpp @@ -1,6 +1,6 @@ /* * - * (C) 2011-2021 Anope Team + * (C) 2011-2022 Anope Team * Contact us at team@anope.org * * Please read COPYING and README for further details. diff --git a/modules/extra/m_ldap_authentication.cpp b/modules/extra/m_ldap_authentication.cpp index ab67bd919..d711eb32c 100644 --- a/modules/extra/m_ldap_authentication.cpp +++ b/modules/extra/m_ldap_authentication.cpp @@ -1,6 +1,6 @@ /* * - * (C) 2011-2021 Anope Team + * (C) 2011-2022 Anope Team * Contact us at team@anope.org * * Please read COPYING and README for further details. diff --git a/modules/extra/m_ldap_oper.cpp b/modules/extra/m_ldap_oper.cpp index ce60401da..d2784da48 100644 --- a/modules/extra/m_ldap_oper.cpp +++ b/modules/extra/m_ldap_oper.cpp @@ -1,6 +1,6 @@ /* * - * (C) 2011-2021 Anope Team + * (C) 2011-2022 Anope Team * Contact us at team@anope.org * * Please read COPYING and README for further details. diff --git a/modules/extra/m_mysql.cpp b/modules/extra/m_mysql.cpp index 96f346b53..be0214eee 100644 --- a/modules/extra/m_mysql.cpp +++ b/modules/extra/m_mysql.cpp @@ -1,6 +1,6 @@ /* * - * (C) 2010-2021 Anope Team + * (C) 2010-2022 Anope Team * Contact us at team@anope.org * * Please read COPYING and README for further details. diff --git a/modules/extra/m_regex_pcre.cpp b/modules/extra/m_regex_pcre.cpp index e2d939691..66e153ee7 100644 --- a/modules/extra/m_regex_pcre.cpp +++ b/modules/extra/m_regex_pcre.cpp @@ -1,6 +1,6 @@ /* * - * (C) 2012-2021 Anope Team + * (C) 2012-2022 Anope Team * Contact us at team@anope.org * * Please read COPYING and README for further details. diff --git a/modules/extra/m_regex_posix.cpp b/modules/extra/m_regex_posix.cpp index afaf0c71f..ca2038dd6 100644 --- a/modules/extra/m_regex_posix.cpp +++ b/modules/extra/m_regex_posix.cpp @@ -1,6 +1,6 @@ /* * - * (C) 2012-2021 Anope Team + * (C) 2012-2022 Anope Team * Contact us at team@anope.org * * Please read COPYING and README for further details. diff --git a/modules/extra/m_regex_tre.cpp b/modules/extra/m_regex_tre.cpp index fb8c29921..09e1fecbf 100644 --- a/modules/extra/m_regex_tre.cpp +++ b/modules/extra/m_regex_tre.cpp @@ -1,6 +1,6 @@ /* * - * (C) 2012-2021 Anope Team + * (C) 2012-2022 Anope Team * Contact us at team@anope.org * * Please read COPYING and README for further details. diff --git a/modules/extra/m_sql_authentication.cpp b/modules/extra/m_sql_authentication.cpp index e78dd0594..5c2debf22 100644 --- a/modules/extra/m_sql_authentication.cpp +++ b/modules/extra/m_sql_authentication.cpp @@ -1,6 +1,6 @@ /* * - * (C) 2012-2021 Anope Team + * (C) 2012-2022 Anope Team * Contact us at team@anope.org * * Please read COPYING and README for further details. diff --git a/modules/extra/m_sql_log.cpp b/modules/extra/m_sql_log.cpp index 735fb6ba6..c53a31eba 100644 --- a/modules/extra/m_sql_log.cpp +++ b/modules/extra/m_sql_log.cpp @@ -1,6 +1,6 @@ /* * - * (C) 2003-2021 Anope Team + * (C) 2003-2022 Anope Team * Contact us at team@anope.org * * Please read COPYING and README for further details. diff --git a/modules/extra/m_sql_oper.cpp b/modules/extra/m_sql_oper.cpp index 87b268dd9..d6a04e5c4 100644 --- a/modules/extra/m_sql_oper.cpp +++ b/modules/extra/m_sql_oper.cpp @@ -1,6 +1,6 @@ /* * - * (C) 2012-2021 Anope Team + * (C) 2012-2022 Anope Team * Contact us at team@anope.org * * Please read COPYING and README for further details. diff --git a/modules/extra/m_sqlite.cpp b/modules/extra/m_sqlite.cpp index ad74c435b..5016e2a31 100644 --- a/modules/extra/m_sqlite.cpp +++ b/modules/extra/m_sqlite.cpp @@ -1,6 +1,6 @@ /* * - * (C) 2011-2021 Anope Team + * (C) 2011-2022 Anope Team * Contact us at team@anope.org * * Please read COPYING and README for further details. diff --git a/modules/extra/m_ssl_gnutls.cpp b/modules/extra/m_ssl_gnutls.cpp index c6b532269..aba7c99f4 100644 --- a/modules/extra/m_ssl_gnutls.cpp +++ b/modules/extra/m_ssl_gnutls.cpp @@ -1,7 +1,7 @@ /* * * (C) 2014 Attila Molnar <attilamolnar@hush.com> - * (C) 2014-2021 Anope Team + * (C) 2014-2022 Anope Team * Contact us at team@anope.org * * Please read COPYING and README for further details. diff --git a/modules/extra/m_ssl_openssl.cpp b/modules/extra/m_ssl_openssl.cpp index 4245d3c09..d89aaa490 100644 --- a/modules/extra/m_ssl_openssl.cpp +++ b/modules/extra/m_ssl_openssl.cpp @@ -1,6 +1,6 @@ /* * - * (C) 2010-2021 Anope Team + * (C) 2010-2022 Anope Team * Contact us at team@anope.org * * Please read COPYING and README for further details. diff --git a/modules/extra/stats/cs_fantasy_stats.cpp b/modules/extra/stats/cs_fantasy_stats.cpp index ba0d216cb..6054d613a 100644 --- a/modules/extra/stats/cs_fantasy_stats.cpp +++ b/modules/extra/stats/cs_fantasy_stats.cpp @@ -1,6 +1,6 @@ /* Chanstats core functions * - * (C) 2003-2021 Anope Team + * (C) 2003-2022 Anope Team * Contact us at team@anope.org * * Please read COPYING and README for further details. diff --git a/modules/extra/stats/cs_fantasy_top.cpp b/modules/extra/stats/cs_fantasy_top.cpp index 3d4d75241..b5fad641f 100644 --- a/modules/extra/stats/cs_fantasy_top.cpp +++ b/modules/extra/stats/cs_fantasy_top.cpp @@ -1,6 +1,6 @@ /* Chanstats core functions * - * (C) 2003-2021 Anope Team + * (C) 2003-2022 Anope Team * Contact us at team@anope.org * * Please read COPYING and README for further details. diff --git a/modules/extra/stats/irc2sql/irc2sql.cpp b/modules/extra/stats/irc2sql/irc2sql.cpp index f0667e2e4..209f8831b 100644 --- a/modules/extra/stats/irc2sql/irc2sql.cpp +++ b/modules/extra/stats/irc2sql/irc2sql.cpp @@ -1,6 +1,6 @@ /* * - * (C) 2013-2021 Anope Team + * (C) 2013-2022 Anope Team * Contact us at team@anope.org * * Please read COPYING and README for further details. diff --git a/modules/extra/stats/irc2sql/irc2sql.h b/modules/extra/stats/irc2sql/irc2sql.h index 41dfce38d..039839855 100644 --- a/modules/extra/stats/irc2sql/irc2sql.h +++ b/modules/extra/stats/irc2sql/irc2sql.h @@ -1,6 +1,6 @@ /* * - * (C) 2013-2021 Anope Team + * (C) 2013-2022 Anope Team * Contact us at team@anope.org * * Please read COPYING and README for further details. diff --git a/modules/extra/stats/irc2sql/tables.cpp b/modules/extra/stats/irc2sql/tables.cpp index 28110fa9e..45fa301dd 100644 --- a/modules/extra/stats/irc2sql/tables.cpp +++ b/modules/extra/stats/irc2sql/tables.cpp @@ -1,6 +1,6 @@ /* * - * (C) 2013-2021 Anope Team + * (C) 2013-2022 Anope Team * Contact us at team@anope.org * * Please read COPYING and README for further details. @@ -25,52 +25,57 @@ void IRC2SQL::CheckTables() this->GetTables(); - if (GeoIPDB.equals_ci("country") && !this->HasTable(prefix + "geoip_country")) - { - query = "CREATE TABLE `" + prefix + "geoip_country` (" - "`start` INT UNSIGNED NOT NULL," - "`end` INT UNSIGNED NOT NULL," - "`countrycode` varchar(2)," - "`countryname` varchar(50)," - "PRIMARY KEY `end` (`end`)," - "KEY `start` (`start`)" - ") ENGINE=InnoDB DEFAULT CHARSET=utf8mb4;"; - this->RunQuery(query); - } - if (GeoIPDB.equals_ci("city") && !this->HasTable(prefix + "geoip_city_blocks")) + if (GeoIPDB.equals_ci("country")) { - query = "CREATE TABLE `" + prefix + "geoip_city_blocks` (" - "`start` INT UNSIGNED NOT NULL," - "`end` INT UNSIGNED NOT NULL," - "`locId` INT UNSIGNED NOT NULL," - "PRIMARY KEY `end` (`end`)," - "KEY `start` (`start`)" - ") ENGINE=InnoDB DEFAULT CHARSET=utf8mb4;"; - this->RunQuery(query); - + if (!this->HasTable(prefix + "geoip_country")) + { + query = "CREATE TABLE `" + prefix + "geoip_country` (" + "`start` INT UNSIGNED NOT NULL," + "`end` INT UNSIGNED NOT NULL," + "`countrycode` varchar(2)," + "`countryname` varchar(50)," + "PRIMARY KEY `end` (`end`)," + "KEY `start` (`start`)" + ") ENGINE=InnoDB DEFAULT CHARSET=utf8mb4;"; + this->RunQuery(query); + } } - if (GeoIPDB.equals_ci("city") && !this->HasTable(prefix + "geoip_city_location")) + else if (GeoIPDB.equals_ci("city")) { - query = "CREATE TABLE `" + prefix + "geoip_city_location` (" - "`locId` INT UNSIGNED NOT NULL," - "`country` CHAR(2) NOT NULL," - "`region` CHAR(2) NOT NULL," - "`city` VARCHAR(50)," - "`latitude` FLOAT," - "`longitude` FLOAT," - "`areaCode` INT," - "PRIMARY KEY (`locId`)" - ") ENGINE=InnoDB DEFAULT CHARSET=utf8mb4;"; - this->RunQuery(query); - } - if (GeoIPDB.equals_ci("city") && !this->HasTable(prefix + "geoip_city_region")) - { query = "CREATE TABLE `" + prefix + "geoip_city_region` (" - "`country` CHAR(2) NOT NULL," - "`region` CHAR(2) NOT NULL," - "`regionname` VARCHAR(100) NOT NULL," - "PRIMARY KEY (`country`,`region`)" - ") ENGINE=InnoDB DEFAULT CHARSET=utf8mb4;"; - this->RunQuery(query); + if (!this->HasTable(prefix + "geoip_city_blocks")) + { + query = "CREATE TABLE `" + prefix + "geoip_city_blocks` (" + "`start` INT UNSIGNED NOT NULL," + "`end` INT UNSIGNED NOT NULL," + "`locId` INT UNSIGNED NOT NULL," + "PRIMARY KEY `end` (`end`)," + "KEY `start` (`start`)" + ") ENGINE=InnoDB DEFAULT CHARSET=utf8mb4;"; + this->RunQuery(query); + } + if (!this->HasTable(prefix + "geoip_city_location")) + { + query = "CREATE TABLE `" + prefix + "geoip_city_location` (" + "`locId` INT UNSIGNED NOT NULL," + "`country` CHAR(2) NOT NULL," + "`region` CHAR(2) NOT NULL," + "`city` VARCHAR(50)," + "`latitude` FLOAT," + "`longitude` FLOAT," + "`areaCode` INT," + "PRIMARY KEY (`locId`)" + ") ENGINE=InnoDB DEFAULT CHARSET=utf8mb4;"; + this->RunQuery(query); + } + if (!this->HasTable(prefix + "geoip_city_region")) + { query = "CREATE TABLE `" + prefix + "geoip_city_region` (" + "`country` CHAR(2) NOT NULL," + "`region` CHAR(2) NOT NULL," + "`regionname` VARCHAR(100) NOT NULL," + "PRIMARY KEY (`country`,`region`)" + ") ENGINE=InnoDB DEFAULT CHARSET=utf8mb4;"; + this->RunQuery(query); + } } if (!this->HasTable(prefix + "server")) { diff --git a/modules/extra/stats/irc2sql/utils.cpp b/modules/extra/stats/irc2sql/utils.cpp index c04b55960..888fc0cb0 100644 --- a/modules/extra/stats/irc2sql/utils.cpp +++ b/modules/extra/stats/irc2sql/utils.cpp @@ -1,6 +1,6 @@ /* * - * (C) 2013-2021 Anope Team + * (C) 2013-2022 Anope Team * Contact us at team@anope.org * * Please read COPYING and README for further details. diff --git a/modules/extra/stats/m_chanstats.cpp b/modules/extra/stats/m_chanstats.cpp index 92f361f64..4f5ed9e55 100644 --- a/modules/extra/stats/m_chanstats.cpp +++ b/modules/extra/stats/m_chanstats.cpp @@ -1,6 +1,6 @@ /* * - * (C) 2012-2021 Anope Team + * (C) 2012-2022 Anope Team * Contact us at team@anope.org * * Please read COPYING and README for further details. |
