From cc23f6dc011fa5b548dd4a1416bd6dee107ba7b6 Mon Sep 17 00:00:00 2001 From: Sadie Powell Date: Tue, 11 Jul 2023 15:08:03 +0100 Subject: [PATCH 1/9] Fix sending log messages from a renamed pseudoclient. If a command is named e.g. nickserv/wibble it previously tried to look up the nickserv service and if this service didn't exist then it would fall back to sending from the first available service. This caused problems if the NickServ service had been renamed to something else. Reported by @AndrioCelos on IRC. --- src/logger.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/logger.cpp b/src/logger.cpp index acacda286..49cbc05b2 100644 --- a/src/logger.cpp +++ b/src/logger.cpp @@ -89,7 +89,7 @@ Log::Log(LogType t, CommandSource &src, Command *_c, ChannelInfo *_ci) : u(src.G size_t sl = c->name.find('/'); this->bi = NULL; if (sl != Anope::string::npos) - this->bi = BotInfo::Find(c->name.substr(0, sl), true); + this->bi = Config->GetClient(c->name.substr(0, sl)); this->category = c->name; } From 7f8a0c9d33afa26047f02a2032e4d101bfbfac50 Mon Sep 17 00:00:00 2001 From: Sadie Powell Date: Fri, 28 Apr 2023 00:28:16 +0100 Subject: [PATCH 2/9] Allow Anope to look up multiple DNS results. For fixing bug 1756. --- include/anope.h | 7 +++++++ src/misc.cpp | 22 ++++++++++++++++------ 2 files changed, 23 insertions(+), 6 deletions(-) diff --git a/include/anope.h b/include/anope.h index f65acad48..ed894c4ce 100644 --- a/include/anope.h +++ b/include/anope.h @@ -548,6 +548,13 @@ namespace Anope */ extern Anope::string Resolve(const Anope::string &host, int type); + /** Does a blocking dns query and returns all IPs. + * @param host host to look up + * @param type inet addr type + * @return A list of all IPs that the host resolves to + */ + extern std::vector ResolveMultiple(const Anope::string &host, int type); + /** Generate a string of random letters and numbers * @param len The length of the string returned */ diff --git a/src/misc.cpp b/src/misc.cpp index 86d12c462..7e68686a2 100644 --- a/src/misc.cpp +++ b/src/misc.cpp @@ -727,7 +727,13 @@ Anope::string Anope::NormalizeBuffer(const Anope::string &buf) Anope::string Anope::Resolve(const Anope::string &host, int type) { - Anope::string result = host; + std::vector results = Anope::ResolveMultiple(host, type); + return results.empty() ? host : results[0]; +} + +std::vector Anope::ResolveMultiple(const Anope::string &host, int type) +{ + std::vector results; addrinfo hints; memset(&hints, 0, sizeof(hints)); @@ -738,15 +744,19 @@ Anope::string Anope::Resolve(const Anope::string &host, int type) addrinfo *addrresult = NULL; if (getaddrinfo(host.c_str(), NULL, &hints, &addrresult) == 0) { - sockaddrs addr; - memcpy(static_cast(&addr), addrresult->ai_addr, addrresult->ai_addrlen); - result = addr.addr(); - Log(LOG_DEBUG_2) << "Resolver: " << host << " -> " << result; + for (addrinfo *thisresult = addrresult; thisresult; thisresult = thisresult->ai_next) + { + sockaddrs addr; + memcpy(static_cast(&addr), thisresult->ai_addr, thisresult->ai_addrlen); + + results.push_back(addr.addr()); + Log(LOG_DEBUG_2) << "Resolver: " << host << " -> " << addr.addr(); + } freeaddrinfo(addrresult); } - return result; + return results; } Anope::string Anope::Random(size_t len) From 2dafc85af4bc51d4706b711dcb87f846a555af63 Mon Sep 17 00:00:00 2001 From: Sadie Powell Date: Sun, 16 Jul 2023 18:23:40 +0100 Subject: [PATCH 3/9] Remove references to the ilm which never got updated from 1.8. --- docs/INSTALL | 4 ---- docs/INSTALL.fr | 5 ----- 2 files changed, 9 deletions(-) diff --git a/docs/INSTALL b/docs/INSTALL index 1ad9533cb..91814358b 100644 --- a/docs/INSTALL +++ b/docs/INSTALL @@ -88,10 +88,6 @@ Note: You should also read the README and FAQ files! Don't forget to /rehash your IRCd to apply changes. - You may also try our interactive link maker, which is located at: - - https://www.anope.org/ilm.php - 4) Starting Anope Go into the directory where binaries were installed (by default, this is diff --git a/docs/INSTALL.fr b/docs/INSTALL.fr index 245af3e57..994f2f02f 100644 --- a/docs/INSTALL.fr +++ b/docs/INSTALL.fr @@ -96,11 +96,6 @@ Note : Vous devrez également lire les fichiers README et FAQ ! Souvenez-vous de /rehash votre IRCd pour appliquer les changements. - Vous pouvez également essayer notre créateur de bloc link interactif - situé ici : - - https://www.anope.org/ilm.php - 4) Mettre en route Anope Allez dans le répertoire où les fichiers binaires ont été installés From 97f6aadd5bcfc9401080418f1ef5174bc007bc6d Mon Sep 17 00:00:00 2001 From: Sadie Powell Date: Fri, 28 Jul 2023 23:53:55 +0100 Subject: [PATCH 4/9] Fix paging the Config header on some util-linux revisions. We use an environment variable here as passing -e directly may result in an error on older `more` releases. --- Config | 1 + 1 file changed, 1 insertion(+) diff --git a/Config b/Config index 925130ebc..089272c10 100755 --- a/Config +++ b/Config @@ -193,6 +193,7 @@ if [ ! "$NO_INTRO" ] ; then clear ;; esac + export MORE='-e' . $SOURCE_DIR/src/version.sh cat $SOURCE_DIR/.BANNER | sed "s/CURVER/$VERSION_MAJOR.$VERSION_MINOR.$VERSION_PATCH$VERSION_EXTRA/" | sed "s@SOURCE_DIR@$SOURCE_DIR@" | $PAGER echo "" From 1343be58d776e153d2691dc6f4c1bd6be5b36956 Mon Sep 17 00:00:00 2001 From: Sadie Powell Date: Sun, 30 Jul 2023 12:14:00 +0100 Subject: [PATCH 5/9] Add some templates for people filing issues on GitHub. --- .github/ISSUE_TEMPLATE/BUG_REPORT.md | 33 ++++++++++++++++++++ .github/ISSUE_TEMPLATE/FEATURE_REQUEST.md | 15 +++++++++ .github/ISSUE_TEMPLATE/config.yml | 1 + .github/PULL_REQUEST_TEMPLATE.md | 38 +++++++++++++++++++++++ 4 files changed, 87 insertions(+) create mode 100644 .github/ISSUE_TEMPLATE/BUG_REPORT.md create mode 100644 .github/ISSUE_TEMPLATE/FEATURE_REQUEST.md create mode 100644 .github/ISSUE_TEMPLATE/config.yml create mode 100644 .github/PULL_REQUEST_TEMPLATE.md diff --git a/.github/ISSUE_TEMPLATE/BUG_REPORT.md b/.github/ISSUE_TEMPLATE/BUG_REPORT.md new file mode 100644 index 000000000..99e497e8d --- /dev/null +++ b/.github/ISSUE_TEMPLATE/BUG_REPORT.md @@ -0,0 +1,33 @@ +--- +name: Bug report +about: Report a non-security issue with Anope. +--- + + + +**Description** + + + +**Steps to reproduce the issue:** + +1. +2. +3. + +**Describe the results you received:** + + + +**Describe the results you expected:** + + + +**Additional information you deem important (e.g. issue happens only occasionally):** + + + +**Output of `services --version`:** + diff --git a/.github/ISSUE_TEMPLATE/FEATURE_REQUEST.md b/.github/ISSUE_TEMPLATE/FEATURE_REQUEST.md new file mode 100644 index 000000000..a2191c0e0 --- /dev/null +++ b/.github/ISSUE_TEMPLATE/FEATURE_REQUEST.md @@ -0,0 +1,15 @@ +--- +name: Feature request +about: Request that a new feature is added to Anope. +--- + + + +**Description** + + + +**Why this would be useful** + diff --git a/.github/ISSUE_TEMPLATE/config.yml b/.github/ISSUE_TEMPLATE/config.yml new file mode 100644 index 000000000..3ba13e0ce --- /dev/null +++ b/.github/ISSUE_TEMPLATE/config.yml @@ -0,0 +1 @@ +blank_issues_enabled: false diff --git a/.github/PULL_REQUEST_TEMPLATE.md b/.github/PULL_REQUEST_TEMPLATE.md new file mode 100644 index 000000000..928e331d1 --- /dev/null +++ b/.github/PULL_REQUEST_TEMPLATE.md @@ -0,0 +1,38 @@ + + +## Summary + + + +## Rationale + + + +## Testing Environment + + + +I have tested this pull request on: + +**Operating system name and version:** +**Compiler name and version:** + +## Checks + + + +I have ensured that: + + - [ ] This pull request does not introduce any incompatible API changes. + - [ ] If ABI changes have been made I have incremented MODULE_ABI in `moduledefs.h`. + - [ ] I have documented any features added by this pull request. From 1b2eb9b9c8eabe52ea8d5aaef957759384c47bd2 Mon Sep 17 00:00:00 2001 From: Sadie Powell Date: Sun, 30 Jul 2023 12:41:21 +0100 Subject: [PATCH 6/9] Fix the pull request template to be more relevant to Anope. --- .github/PULL_REQUEST_TEMPLATE.md | 14 +------------- 1 file changed, 1 insertion(+), 13 deletions(-) diff --git a/.github/PULL_REQUEST_TEMPLATE.md b/.github/PULL_REQUEST_TEMPLATE.md index 928e331d1..5fe0ba7e3 100644 --- a/.github/PULL_REQUEST_TEMPLATE.md +++ b/.github/PULL_REQUEST_TEMPLATE.md @@ -1,5 +1,5 @@ ## Summary @@ -24,15 +24,3 @@ I have tested this pull request on: **Operating system name and version:** **Compiler name and version:** - -## Checks - - - -I have ensured that: - - - [ ] This pull request does not introduce any incompatible API changes. - - [ ] If ABI changes have been made I have incremented MODULE_ABI in `moduledefs.h`. - - [ ] I have documented any features added by this pull request. From c9f21f4ef67b06836848d5cd315ac7bc390e978d Mon Sep 17 00:00:00 2001 From: Sadie Powell Date: Sun, 6 Aug 2023 12:57:26 +0100 Subject: [PATCH 7/9] Update the changelogs. --- docs/Changes | 11 ++++++++++- docs/Changes.conf | 2 +- 2 files changed, 11 insertions(+), 2 deletions(-) diff --git a/docs/Changes b/docs/Changes index c9863b5fb..d304ad790 100644 --- a/docs/Changes +++ b/docs/Changes @@ -1,6 +1,15 @@ Anope Version 2.0.14-git ------------------------ -No significant changes. +Added support for sqlining channels on UnrealIRCd. +Fixed a crash when trying to access config for non-loaded modules. +Fixed detection of the InspIRCd nopartmsg module. +Fixed not getting memo notifications when authing with SASL. +Fixed not serialising dontkickops/dontkickvoices in botserv/kick. +Fixed sending emails with the wrong kind of line terminator. +Fixed sending log messages from a renamed pseudoclient. +Fixed telling users their passcode is incorrect when they need to authenticate in nickserv/confirm. +Fixed the Config script freezing on some versions of util-linux. +Updated the Windows packaging scripts to use dependencies from Conan. Anope Version 2.0.13 -------------------- diff --git a/docs/Changes.conf b/docs/Changes.conf index 8dbbaaed9..329af4191 100644 --- a/docs/Changes.conf +++ b/docs/Changes.conf @@ -1,6 +1,6 @@ Anope Version 2.0.14-git ------------------------ -No significant changes. +Added mail:content_type to allow customising the content type of emails. Anope Version 2.0.13 -------------------- From 8bf14ad5eacdc11955c4e4f3a34e9b5dcbdc7ca7 Mon Sep 17 00:00:00 2001 From: Sadie Powell Date: Sun, 6 Aug 2023 12:58:38 +0100 Subject: [PATCH 8/9] Release 2.0.14. --- docs/Changes | 4 ++-- docs/Changes.conf | 4 ++-- src/version.sh | 2 +- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/docs/Changes b/docs/Changes index d304ad790..39ff39997 100644 --- a/docs/Changes +++ b/docs/Changes @@ -1,5 +1,5 @@ -Anope Version 2.0.14-git ------------------------- +Anope Version 2.0.14 +-------------------- Added support for sqlining channels on UnrealIRCd. Fixed a crash when trying to access config for non-loaded modules. Fixed detection of the InspIRCd nopartmsg module. diff --git a/docs/Changes.conf b/docs/Changes.conf index 329af4191..8339994af 100644 --- a/docs/Changes.conf +++ b/docs/Changes.conf @@ -1,5 +1,5 @@ -Anope Version 2.0.14-git ------------------------- +Anope Version 2.0.14 +-------------------- Added mail:content_type to allow customising the content type of emails. Anope Version 2.0.13 diff --git a/src/version.sh b/src/version.sh index c03b1e511..bf8b88e49 100644 --- a/src/version.sh +++ b/src/version.sh @@ -3,4 +3,4 @@ VERSION_MAJOR=2 VERSION_MINOR=0 VERSION_PATCH=14 -VERSION_EXTRA="-git" +VERSION_EXTRA="" From 0715db71829786ec98c6922a9e32077ae396c87e Mon Sep 17 00:00:00 2001 From: Sadie Powell Date: Sun, 6 Aug 2023 13:00:09 +0100 Subject: [PATCH 9/9] Mark as 2.0.15-git. --- docs/Changes | 4 ++++ docs/Changes.conf | 4 ++++ src/version.sh | 4 ++-- 3 files changed, 10 insertions(+), 2 deletions(-) diff --git a/docs/Changes b/docs/Changes index 39ff39997..493e2fd68 100644 --- a/docs/Changes +++ b/docs/Changes @@ -1,3 +1,7 @@ +Anope Version 2.0.15-git +------------------------ +No significant changes. + Anope Version 2.0.14 -------------------- Added support for sqlining channels on UnrealIRCd. diff --git a/docs/Changes.conf b/docs/Changes.conf index 8339994af..a756ef89b 100644 --- a/docs/Changes.conf +++ b/docs/Changes.conf @@ -1,3 +1,7 @@ +Anope Version 2.0.15-git +------------------------ +No significant changes. + Anope Version 2.0.14 -------------------- Added mail:content_type to allow customising the content type of emails. diff --git a/src/version.sh b/src/version.sh index bf8b88e49..c4597b675 100644 --- a/src/version.sh +++ b/src/version.sh @@ -2,5 +2,5 @@ VERSION_MAJOR=2 VERSION_MINOR=0 -VERSION_PATCH=14 -VERSION_EXTRA="" +VERSION_PATCH=15 +VERSION_EXTRA="-git"