1
0
mirror of https://github.com/anope/anope.git synced 2026-06-19 07:04:46 +02:00

Compare commits

..

22 Commits

Author SHA1 Message Date
Sadie Powell 8bf14ad5ea Release 2.0.14. 2023-08-06 12:58:38 +01:00
Sadie Powell c9f21f4ef6 Update the changelogs. 2023-08-06 12:57:26 +01:00
Sadie Powell 1b2eb9b9c8 Fix the pull request template to be more relevant to Anope. 2023-07-30 12:41:21 +01:00
Sadie Powell 1343be58d7 Add some templates for people filing issues on GitHub. 2023-07-30 12:15:20 +01:00
Sadie Powell 97f6aadd5b 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.
2023-07-28 23:56:09 +01:00
Sadie Powell 2dafc85af4 Remove references to the ilm which never got updated from 1.8. 2023-07-16 18:25:21 +01:00
Sadie Powell 7f8a0c9d33 Allow Anope to look up multiple DNS results.
For fixing bug 1756.
2023-07-11 16:11:57 +01:00
Sadie Powell cc23f6dc01 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.
2023-07-11 15:13:17 +01:00
PeGaSuS e717ac0a89 Clarify that operserv/sqline can also match channel names. 2023-07-09 23:44:02 +01:00
Sadie Powell 34ab54522e Fix not serialising dontkickops/dontkickvoices properly. 2023-07-09 23:09:11 +01:00
Sadie Powell 47bbc9b3fb Enable CanSQLineChannel in unreal4.
Ref: https://www.unrealircd.org/docs/Server_protocol:SQLINE_command
2023-07-09 22:32:43 +01:00
Sadie Powell 68b51c7481 Fix not getting memo notifications when using SASL. 2023-07-09 22:32:43 +01:00
Sadie Powell 37b60f8d9d Update links to the bugtracker. 2023-07-09 20:06:32 +01:00
Sadie Powell 14204353ac Allow customising the email content type.
This will allow people to send emails using HTML or non UTF-8 text.
2023-07-09 14:39:51 +01:00
Sadie Powell 098f19c005 Fix a crash when a module tries to get another module's config. 2023-07-06 10:53:25 +01:00
PeGaSuS 4e1f5cce80 Tell users that they must identify to their account before using CONFIRM.
This only happens when a nickname is registered via webcpanel and said nickname is online.
2023-07-05 17:09:47 +01:00
Sadie Powell da2ac3e8a2 Fix detection of the nopartmsg module in the InspIRCd proto modules. 2023-06-20 01:00:37 +01:00
Sadie Powell 7c7158cf24 Terminate lines with CR+LF instead of just LF when sending an email.
From https://www.rfc-editor.org/rfc/rfc5321#section-2.3.1:

> Lines consist of zero or more data characters terminated by the
> sequence ASCII character "CR" (hex value 0D) followed immediately by
> ASCII character "LF" (hex value 0A).
2023-06-06 16:48:47 +01:00
Adam fbf3b34474 add gettext to conan deps 2023-06-02 23:01:27 -04:00
Adam ce42810265 m_ldap: use Wldap on windows 2023-06-02 21:31:12 -04:00
Adam 07babdbd77 use Conan for extra's dependencies on Windows
conan install src\win32\conanfile.txt --build=missing
cmake -B build .
cmake --build build --config Release --target PACKAGE
2023-06-02 19:08:55 -04:00
Sadie Powell fe3926f572 Mark as 2.0.14-git. 2023-06-01 23:12:08 +01:00
34 changed files with 321 additions and 57 deletions
+33
View File
@@ -0,0 +1,33 @@
---
name: Bug report
about: Report a non-security issue with Anope.
---
<!--
Please fill in the template below. It will help us process your bug report a lot faster.
-->
**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`:**
+15
View File
@@ -0,0 +1,15 @@
---
name: Feature request
about: Request that a new feature is added to Anope.
---
<!--
Please fill in the template below. It will help us process your feature request a lot faster.
-->
**Description**
**Why this would be useful**
+1
View File
@@ -0,0 +1 @@
blank_issues_enabled: false
+26
View File
@@ -0,0 +1,26 @@
<!--
Please fill in the template below. It will help us process your pull request a lot faster.
-->
## Summary
<!--
Briefly describe what this pull request changes.
-->
## Rationale
<!--
Describe why you have made this change.
-->
## Testing Environment
<!--
Describe the environment in which you have tested this change:
-->
I have tested this pull request on:
**Operating system name and version:** <!-- e.g. Linux 3.11 -->
**Compiler name and version:** <!-- e.g. GCC 4.2.0 -->
+6 -4
View File
@@ -229,6 +229,12 @@ if(EXTRA_LIBS)
link_directories(${EXTRA_LIBS})
endif(EXTRA_LIBS)
# setup conan
if(EXISTS "${CMAKE_CURRENT_SOURCE_DIR}/conanbuildinfo.cmake")
include("${CMAKE_CURRENT_SOURCE_DIR}/conanbuildinfo.cmake")
conan_basic_setup()
endif()
# Find gettext
find_package(Gettext)
@@ -502,10 +508,6 @@ if(WIN32)
install(FILES ${Anope_SOURCE_DIR}/src/win32/anope.bat
DESTINATION ${BIN_DIR}
)
# Package any DLLs in src/win/
file(GLOB EXTRA_DLLS RELATIVE ${CMAKE_CURRENT_SOURCE_DIR} "${Anope_SOURCE_DIR}/src/win32/*.dll")
install(FILES ${EXTRA_DLLS} DESTINATION ${BIN_DIR})
endif(WIN32)
install(CODE "file(REMOVE_RECURSE \"$ENV{DESTDIR}${CMAKE_INSTALL_PREFIX}/${LIB_DIR}/modules\")")
+1
View File
@@ -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 ""
+3 -3
View File
@@ -10,9 +10,9 @@ if(NOT WIN32)
endif(GETTEXT_LIBRARY)
endif(GETTEXT_INCLUDE AND GETTEXT_MSGFMT)
else(NOT WIN32)
find_path(GETTEXT_INCLUDE libintl.h ${DEFAULT_INCLUDE_DIRS} ${WSDK_PATH}/include $ENV{VCINSTALLDIR}/include gettext/include ${EXTRA_INCLUDE})
find_library(GETTEXT_LIBRARY libintl PATHS ${DEFAULT_LIBRARY_DIRS} ${WSDK_PATH}/lib $ENV{VCINSTALLDIR}/lib gettext/lib ${EXTRA_LIBS})
find_program(GETTEXT_MSGFMT msgfmt PATHS ${DEFAULT_INCLUDE_DIRS} ${WSDK_PATH}/bin $ENV{VCINSTALLDIR}/bin gettext/bin ${EXTRA_INCLUDE})
find_path(GETTEXT_INCLUDE libintl.h)
find_library(GETTEXT_LIBRARY gnuintl)
find_program(GETTEXT_MSGFMT msgfmt)
if(GETTEXT_INCLUDE AND GETTEXT_LIBRARY AND GETTEXT_MSGFMT)
set(GETTEXT_FOUND TRUE)
set(GETTEXT_LIBRARIES ${GETTEXT_LIBRARY})
+8
View File
@@ -997,6 +997,14 @@ mail
*/
#dontquoteaddresses = yes
/*
* The content type to use when sending emails.
*
* This directive is optional, and is generally only needed if you want to
* use HTML or non UTF-8 text in your services emails.
*/
#content_type = "text/plain; charset=UTF-8"
/*
* The subject and message of emails sent to users when they register accounts.
*
+1 -1
View File
@@ -1 +1 @@
For all bug reports / updates please see https://bugs.anope.org/
For all bug reports / updates please see https://github.com/anope/anope/issues
+13
View File
@@ -1,3 +1,16 @@
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.
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
--------------------
Fixed a crash on some compilers when trying to call methods on a null pointer
+4
View File
@@ -1,3 +1,7 @@
Anope Version 2.0.14
--------------------
Added mail:content_type to allow customising the content type of emails.
Anope Version 2.0.13
--------------------
No significant changes.
-4
View File
@@ -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
-5
View File
@@ -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
+2 -2
View File
@@ -252,7 +252,7 @@ Table of Contents
The more precise you are the sooner you'll be likely to get an answer.
If you think you found a bug, add it to the bug tracking system
(https://bugs.anope.org/) and - again - be as precise as possible. Also say
whether the bug happens always or under what circumstances, and anything
(https://github.com/anope/anope/issues) and - again - be as precise as possible.
Also say whether the bug happens always or under what circumstances, and anything
that could be useful to track your bug down. If you wrote a patch, send
it over. :)
+3 -3
View File
@@ -6,8 +6,8 @@ set_target_properties(version-bin PROPERTIES LINKER_LANGUAGE CXX LINK_FLAGS "${L
get_target_property(version_BINARY version-bin LOCATION)
# Modify version.h from the above executable, with dependencies to version.cpp
# and all of the source files in the main build
add_custom_command(OUTPUT ${CMAKE_CURRENT_BINARY_DIR}/version_build
COMMAND ${version_BINARY} ${Anope_SOURCE_DIR} ${CMAKE_CURRENT_BINARY_DIR}/version.h ${CMAKE_CURRENT_BINARY_DIR}/build.h
add_custom_command(OUTPUT ${CMAKE_CURRENT_BINARY_DIR}/version.h ${CMAKE_CURRENT_BINARY_DIR}/build.h
COMMAND version-bin ${Anope_SOURCE_DIR} ${CMAKE_CURRENT_BINARY_DIR}/version.h ${CMAKE_CURRENT_BINARY_DIR}/build.h
DEPENDS version-bin ${SRC_SRCS}
)
# Add version-bin to list of files for CPack to ignore
@@ -61,4 +61,4 @@ if(USE_PCH AND CMAKE_COMPILER_IS_GNUCXX)
endif(USE_PCH AND CMAKE_COMPILER_IS_GNUCXX)
# Add a custom target to the above file
add_custom_target(headers DEPENDS version-bin ${CMAKE_CURRENT_BINARY_DIR}/version_build ${PCH_SOURCES_GCH})
add_custom_target(headers DEPENDS ${CMAKE_CURRENT_BINARY_DIR}/version.h ${CMAKE_CURRENT_BINARY_DIR}/build.h ${PCH_SOURCES_GCH})
+7
View File
@@ -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<Anope::string> ResolveMultiple(const Anope::string &host, int type);
/** Generate a string of random letters and numbers
* @param len The length of the string returned
*/
+1
View File
@@ -32,6 +32,7 @@ namespace Mail
Anope::string addr;
Anope::string subject;
Anope::string message;
Anope::string content_type;
bool dont_quote_addresses;
bool success;
+34
View File
@@ -3,6 +3,40 @@ if(WIN32)
add_definitions(-DMODULE_COMPILE)
endif(WIN32)
# enable extra modules if conan is used
if(EXISTS "${CMAKE_CURRENT_SOURCE_DIR}/../conanbuildinfo.cmake")
function(enable_extra NAME PACKAGE)
if(DEFINED "CONAN_${PACKAGE}_ROOT")
message("Enabling the ${NAME} module")
# copy the modules out of extra so it gets picked up by build_modules
file(COPY "${CMAKE_CURRENT_SOURCE_DIR}/extra/${NAME}.cpp" DESTINATION "${CMAKE_CURRENT_SOURCE_DIR}")
else()
message("Unable to enable the ${NAME} module (missing library)")
endif()
endfunction()
function(copy_extra NAME)
file(COPY "${CMAKE_CURRENT_SOURCE_DIR}/extra/${NAME}.cpp" DESTINATION "${CMAKE_CURRENT_SOURCE_DIR}")
endfunction()
enable_extra("m_mysql" "LIBMYSQLCLIENT")
enable_extra("m_regex_pcre2" "PCRE2")
enable_extra("m_sqlite" "SQLITE3")
enable_extra("m_ssl_openssl" "OPENSSL")
# this uses Wldap so should always be available
copy_extra("m_ldap")
# these don't actually have extra dependencies, but require a module which does
copy_extra("m_sql_authentication")
copy_extra("m_sql_log")
copy_extra("m_sql_oper")
copy_extra("m_ldap_authentication")
copy_extra("m_ldap_oper")
# Package extra dlls
file(GLOB EXTRA_DLLS "${Anope_SOURCE_DIR}/extradll/bin/*.dll" "${Anope_SOURCE_DIR}/extradll/lib/*.dll")
install(FILES ${EXTRA_DLLS} DESTINATION ${BIN_DIR})
endif()
macro(build_modules SRC)
if(NOT ${SRC} STREQUAL ${CMAKE_CURRENT_SOURCE_DIR} AND EXISTS "${SRC}/CMakeLists.txt")
add_subdirectory("${SRC}")
+5 -1
View File
@@ -31,7 +31,7 @@ struct KickerDataImpl : KickerData
void Check(ChannelInfo *ci) anope_override
{
if (amsgs || badwords || bolds || caps || colors || flood || italics || repeat || reverses || underlines)
if (amsgs || badwords || bolds || caps || colors || flood || italics || repeat || reverses || underlines || dontkickops || dontkickvoices)
return;
ci->Shrink<KickerData>("kickerdata");
@@ -67,6 +67,8 @@ struct KickerDataImpl : KickerData
data.SetType("floodlines", Serialize::Data::DT_INT); data["floodlines"] << kd->floodlines;
data.SetType("floodsecs", Serialize::Data::DT_INT); data["floodsecs"] << kd->floodsecs;
data.SetType("repeattimes", Serialize::Data::DT_INT); data["repeattimes"] << kd->repeattimes;
data.SetType("dontkickops", Serialize::Data::DT_INT); data["dontkickops"] << kd->dontkickops;
data.SetType("dontkickvoices", Serialize::Data::DT_INT); data["dontkickvoices"] << kd->dontkickvoices;
for (int16_t i = 0; i < TTB_SIZE; ++i)
data["ttb"] << kd->ttb[i] << " ";
}
@@ -95,6 +97,8 @@ struct KickerDataImpl : KickerData
data["floodlines"] >> kd->floodlines;
data["floodsecs"] >> kd->floodsecs;
data["repeattimes"] >> kd->repeattimes;
data["dontkickops"] >> kd->dontkickops;
data["dontkickvoices"] >> kd->dontkickvoices;
Anope::string ttb, tok;
data["ttb"] >> ttb;
+1 -1
View File
@@ -83,7 +83,7 @@ class CommandNSConfirm : public Command
source.Reply(_("Invalid passcode."));
}
else
source.Reply(_("Invalid passcode."));
source.Reply(NICK_IDENTIFY_REQUIRED);
return;
}
+1 -1
View File
@@ -676,7 +676,7 @@ class CommandOSSQLine : public CommandOSSXLineBase
"regular expression, the expression will be matched against\n"
"channels too."));
source.Reply(_(" \n"
"\002SQLINE ADD\002 adds the given (nick's) mask to the SQLINE\n"
"\002SQLINE ADD\002 adds the given (nick/channel) mask to the SQLINE\n"
"list for the given reason (which \002must\002 be given).\n"
"\037expiry\037 is specified as an integer followed by one of \037d\037\n"
"(days), \037h\037 (hours), or \037m\037 (minutes). Combinations (such as\n"
+86 -11
View File
@@ -10,11 +10,29 @@
*/
/* RequiredLibraries: ldap_r|ldap,lber */
/* RequiredWindowsLibraries: libldap_r|libldap,liblber */
#include "module.h"
#include "modules/ldap.h"
#include <ldap.h>
#ifdef _WIN32
# include <Winldap.h>
# include <WinBer.h>
# include <wininet.h>
# define LDAP_OPT_SUCCESS LDAP_SUCCESS
# define LDAP_OPT_NETWORK_TIMEOUT LDAP_OPT_SEND_TIMEOUT
# define LDAP_STR(X) const_cast<PSTR>((X).c_str())
# define LDAP_SASL_SIMPLE static_cast<PSTR>(0)
# define LDAP_TIME(X) reinterpret_cast<PLDAP_TIMEVAL>(&(X))
# define ldap_first_message ldap_first_entry
# define ldap_next_message ldap_next_entry
# define ldap_unbind_ext(LDAP, UNUSED1, UNUSED2) ldap_unbind(LDAP)
# pragma comment(lib, "Wldap32.lib")
# pragma comment(lib, "Wininet.lib")
#else
# include <ldap.h>
# define LDAP_STR(X) ((X).c_str())
# define LDAP_TIME(X) (&(X))
#endif
#if defined LDAP_API_FEATURE_X_OPENLDAP_REENTRANT && !LDAP_API_FEATURE_X_OPENLDAP_REENTRANT
# error Anope requires OpenLDAP to be built as reentrant.
@@ -73,13 +91,13 @@ class LDAPBind : public LDAPRequest
int run() anope_override;
};
class LDAPSearch : public LDAPRequest
class LDAPSearchRequest : public LDAPRequest
{
Anope::string base;
Anope::string filter;
public:
LDAPSearch(LDAPService *s, LDAPInterface *i, const Anope::string &b, const Anope::string &f)
LDAPSearchRequest(LDAPService *s, LDAPInterface *i, const Anope::string &b, const Anope::string &f)
: LDAPRequest(s, i)
, base(b)
, filter(f)
@@ -190,6 +208,63 @@ class LDAPService : public LDAPProvider, public Thread, public Condition
}
private:
#ifdef _WIN32
// Windows LDAP does not implement this so we need to do it.
int ldap_initialize(LDAP** ldap, const char* url)
{
URL_COMPONENTS urlComponents;
memset(&urlComponents, 0, sizeof(urlComponents));
urlComponents.dwStructSize = sizeof(urlComponents);
urlComponents.lpszScheme = new char[8];
urlComponents.dwSchemeLength = 8;
urlComponents.lpszHostName = new char[1024];
urlComponents.dwHostNameLength = 1024;
if (!InternetCrackUrlA(url, 0, 0, &urlComponents))
{
delete[] urlComponents.lpszScheme;
delete[] urlComponents.lpszHostName;
return LDAP_CONNECT_ERROR; // Malformed url.
}
unsigned long port = 389; // Default plaintext port.
bool secure = false; // LDAP defaults to plaintext.
if (urlComponents.dwSchemeLength > 0)
{
const Anope::string scheme(urlComponents.lpszScheme);
if (scheme.equals_ci("ldaps"))
{
port = 636; // Default encrypted port.
secure = true;
}
else if (!scheme.equals_ci("ldap"))
{
delete[] urlComponents.lpszScheme;
delete[] urlComponents.lpszHostName;
return LDAP_CONNECT_ERROR; // Invalid protocol.
}
}
if (urlComponents.nPort > 0)
{
port = urlComponents.nPort;
}
*ldap = ldap_sslinit(urlComponents.lpszHostName, port, secure);
delete[] urlComponents.lpszScheme;
delete[] urlComponents.lpszHostName;
if (!*ldap)
{
return LdapGetLastError(); // Something went wrong, find out what.
}
// We're connected to the LDAP server!
return LDAP_SUCCESS;
}
#endif
void Connect()
{
int i = ldap_initialize(&this->con, this->server.c_str());
@@ -291,7 +366,7 @@ class LDAPService : public LDAPProvider, public Thread, public Condition
if (i == NULL)
throw LDAPException("No interface");
LDAPSearch *s = new LDAPSearch(this, i, base, filter);
LDAPSearchRequest *s = new LDAPSearchRequest(this, i, base, filter);
QueueRequest(s);
}
@@ -590,35 +665,35 @@ int LDAPBind::run()
cred.bv_val = strdup(pass.c_str());
cred.bv_len = pass.length();
int i = ldap_sasl_bind_s(service->GetConnection(), who.c_str(), LDAP_SASL_SIMPLE, &cred, NULL, NULL, NULL);
int i = ldap_sasl_bind_s(service->GetConnection(), LDAP_STR(who), LDAP_SASL_SIMPLE, &cred, NULL, NULL, NULL);
free(cred.bv_val);
return i;
}
int LDAPSearch::run()
int LDAPSearchRequest::run()
{
return ldap_search_ext_s(service->GetConnection(), base.c_str(), LDAP_SCOPE_SUBTREE, filter.c_str(), NULL, 0, NULL, NULL, &tv, 0, &message);
return ldap_search_ext_s(service->GetConnection(), LDAP_STR(base), LDAP_SCOPE_SUBTREE, LDAP_STR(filter), NULL, 0, NULL, NULL, LDAP_TIME(tv), 0, &message);
}
int LDAPAdd::run()
{
LDAPMod **mods = LDAPService::BuildMods(attributes);
int i = ldap_add_ext_s(service->GetConnection(), dn.c_str(), mods, NULL, NULL);
int i = ldap_add_ext_s(service->GetConnection(), LDAP_STR(dn), mods, NULL, NULL);
LDAPService::FreeMods(mods);
return i;
}
int LDAPDel::run()
{
return ldap_delete_ext_s(service->GetConnection(), dn.c_str(), NULL, NULL);
return ldap_delete_ext_s(service->GetConnection(), LDAP_STR(dn), NULL, NULL);
}
int LDAPModify::run()
{
LDAPMod **mods = LDAPService::BuildMods(attributes);
int i = ldap_modify_ext_s(service->GetConnection(), base.c_str(), mods, NULL, NULL);
int i = ldap_modify_ext_s(service->GetConnection(), LDAP_STR(base), mods, NULL, NULL);
LDAPService::FreeMods(mods);
return i;
}
+1 -1
View File
@@ -7,7 +7,7 @@
*/
/* RequiredLibraries: pcre2-8 */
/* RequiredWindowsLibraries: libpcre2-8 */
/* RequiredWindowsLibraries: pcre2-8 */
#include "module.h"
+1 -1
View File
@@ -7,7 +7,7 @@
*/
/* RequiredLibraries: ssl,crypto */
/* RequiredWindowsLibraries: ssleay32,libeay32 */
/* RequiredWindowsLibraries: libssl,libcrypto */
#include "module.h"
#include "modules/ssl.h"
+1 -1
View File
@@ -652,7 +652,7 @@ struct IRCDMessageCapab : Message::Capab
ModeManager::AddChannelMode(new InspIRCdExtban::ChannelMatcher("CHANNELBAN", "BAN", 'j'));
else if (module == "m_gecosban.so")
ModeManager::AddChannelMode(new InspIRCdExtban::RealnameMatcher("REALNAMEBAN", "BAN", 'r'));
else if (module == "m_nopartmessage.so")
else if (module == "m_nopartmsg.so")
ModeManager::AddChannelMode(new InspIRCdExtban::EntryMatcher("PARTMESSAGEBAN", "BAN", 'p'));
else if (module == "m_serverban.so")
ModeManager::AddChannelMode(new InspIRCdExtban::ServerMatcher("SERVERBAN", "BAN", 's'));
+1 -1
View File
@@ -1165,7 +1165,7 @@ struct IRCDMessageCapab : Message::Capab
ModeManager::AddChannelMode(new InspIRCdExtban::ChannelMatcher("CHANNELBAN", "BAN", 'j'));
else if (module == "m_gecosban.so")
ModeManager::AddChannelMode(new InspIRCdExtban::RealnameMatcher("REALNAMEBAN", "BAN", 'r'));
else if (module == "m_nopartmessage.so")
else if (module == "m_nopartmsg.so")
ModeManager::AddChannelMode(new InspIRCdExtban::EntryMatcher("PARTMESSAGEBAN", "BAN", 'p'));
else if (module == "m_serverban.so")
ModeManager::AddChannelMode(new InspIRCdExtban::ServerMatcher("SERVERBAN", "BAN", 's'));
+1
View File
@@ -31,6 +31,7 @@ class UnrealIRCdProto : public IRCDProto
CanSetVIdent = true;
CanSNLine = true;
CanSQLine = true;
CanSQLineChannel = true;
CanSZLine = true;
CanSVSHold = true;
CanCertFP = true;
+5
View File
@@ -207,6 +207,11 @@ class MemoServCore : public Module, public MemoServService
this->Check(u);
}
void OnUserConnect(User *user, bool &exempt) anope_override
{
this->Check(user);
}
EventReturn OnPreHelp(CommandSource &source, const std::vector<Anope::string> &params) anope_override
{
if (!params.empty() || source.c || source.service != *MemoServ)
+3
View File
@@ -626,6 +626,9 @@ Block *Conf::GetModule(const Anope::string &mname)
}
}
if (!block)
block = &Block::EmptyBlock;
return GetModule(mname);
}
+1 -1
View File
@@ -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;
}
+18 -9
View File
@@ -13,7 +13,16 @@
#include "mail.h"
#include "config.h"
Mail::Message::Message(const Anope::string &sf, const Anope::string &mailto, const Anope::string &a, const Anope::string &s, const Anope::string &m) : Thread(), sendmail_path(Config->GetBlock("mail")->Get<const Anope::string>("sendmailpath")), send_from(sf), mail_to(mailto), addr(a), subject(s), message(m), dont_quote_addresses(Config->GetBlock("mail")->Get<bool>("dontquoteaddresses")), success(false)
Mail::Message::Message(const Anope::string &sf, const Anope::string &mailto, const Anope::string &a, const Anope::string &s, const Anope::string &m)
: Thread()
, sendmail_path(Config->GetBlock("mail")->Get<const Anope::string>("sendmailpath"))
, send_from(sf), mail_to(mailto)
, addr(a)
, subject(s)
, message(m)
, content_type(Config->GetBlock("mail")->Get<const Anope::string>("content_type", "text/plain; charset=UTF-8"))
, dont_quote_addresses(Config->GetBlock("mail")->Get<bool>("dontquoteaddresses"))
, success(false)
{
}
@@ -35,17 +44,17 @@ void Mail::Message::Run()
return;
}
fprintf(pipe, "From: %s\n", send_from.c_str());
fprintf(pipe, "From: %s\r\n", send_from.c_str());
if (this->dont_quote_addresses)
fprintf(pipe, "To: %s <%s>\n", mail_to.c_str(), addr.c_str());
fprintf(pipe, "To: %s <%s>\r\n", mail_to.c_str(), addr.c_str());
else
fprintf(pipe, "To: \"%s\" <%s>\n", mail_to.c_str(), addr.c_str());
fprintf(pipe, "Subject: %s\n", subject.c_str());
fprintf(pipe, "Content-Type: text/plain; charset=UTF-8;\n");
fprintf(pipe, "Content-Transfer-Encoding: 8bit\n");
fprintf(pipe, "\n");
fprintf(pipe, "To: \"%s\" <%s>\r\n", mail_to.c_str(), addr.c_str());
fprintf(pipe, "Subject: %s\r\n", subject.c_str());
fprintf(pipe, "Content-Type: %s\r\n", content_type.c_str());
fprintf(pipe, "Content-Transfer-Encoding: 8bit\r\n");
fprintf(pipe, "\r\n");
fprintf(pipe, "%s", message.c_str());
fprintf(pipe, "\n.\n");
fprintf(pipe, "\r\n.\r\n");
pclose(pipe);
+16 -6
View File
@@ -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<Anope::string> results = Anope::ResolveMultiple(host, type);
return results.empty() ? host : results[0];
}
std::vector<Anope::string> Anope::ResolveMultiple(const Anope::string &host, int type)
{
std::vector<Anope::string> 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<void*>(&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<void*>(&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)
+1 -1
View File
@@ -2,5 +2,5 @@
VERSION_MAJOR=2
VERSION_MINOR=0
VERSION_PATCH=13
VERSION_PATCH=14
VERSION_EXTRA=""
+21
View File
@@ -0,0 +1,21 @@
[requires]
libmysqlclient/8.0.31
openssl/1.1.1t
pcre2/10.42
sqlite3/3.41.1
gettext/0.21
libgettext/0.21
[options]
libmysqlclient/*:shared=True
openssl/*:shared=True
pcre2/*:shared=True
sqlite3/*:shared=True
libgettext/*:shared=True
[imports]
., *.dll -> extradll
., *.lib -> extralib
[generators]
cmake