mirror of
https://github.com/anope/anope.git
synced 2026-06-19 07:04:46 +02:00
Compare commits
22 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| 8bf14ad5ea | |||
| c9f21f4ef6 | |||
| 1b2eb9b9c8 | |||
| 1343be58d7 | |||
| 97f6aadd5b | |||
| 2dafc85af4 | |||
| 7f8a0c9d33 | |||
| cc23f6dc01 | |||
| e717ac0a89 | |||
| 34ab54522e | |||
| 47bbc9b3fb | |||
| 68b51c7481 | |||
| 37b60f8d9d | |||
| 14204353ac | |||
| 098f19c005 | |||
| 4e1f5cce80 | |||
| da2ac3e8a2 | |||
| 7c7158cf24 | |||
| fbf3b34474 | |||
| ce42810265 | |||
| 07babdbd77 | |||
| fe3926f572 |
@@ -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`:**
|
||||
|
||||
@@ -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**
|
||||
|
||||
@@ -0,0 +1 @@
|
||||
blank_issues_enabled: false
|
||||
@@ -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
@@ -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\")")
|
||||
|
||||
@@ -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 ""
|
||||
|
||||
@@ -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})
|
||||
|
||||
@@ -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 @@
|
||||
For all bug reports / updates please see https://bugs.anope.org/
|
||||
For all bug reports / updates please see https://github.com/anope/anope/issues
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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.
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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
@@ -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. :)
|
||||
|
||||
@@ -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})
|
||||
|
||||
@@ -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
|
||||
*/
|
||||
|
||||
@@ -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;
|
||||
|
||||
@@ -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}")
|
||||
|
||||
@@ -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;
|
||||
|
||||
@@ -83,7 +83,7 @@ class CommandNSConfirm : public Command
|
||||
source.Reply(_("Invalid passcode."));
|
||||
}
|
||||
else
|
||||
source.Reply(_("Invalid passcode."));
|
||||
source.Reply(NICK_IDENTIFY_REQUIRED);
|
||||
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -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
@@ -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;
|
||||
}
|
||||
|
||||
@@ -7,7 +7,7 @@
|
||||
*/
|
||||
|
||||
/* RequiredLibraries: pcre2-8 */
|
||||
/* RequiredWindowsLibraries: libpcre2-8 */
|
||||
/* RequiredWindowsLibraries: pcre2-8 */
|
||||
|
||||
#include "module.h"
|
||||
|
||||
|
||||
@@ -7,7 +7,7 @@
|
||||
*/
|
||||
|
||||
/* RequiredLibraries: ssl,crypto */
|
||||
/* RequiredWindowsLibraries: ssleay32,libeay32 */
|
||||
/* RequiredWindowsLibraries: libssl,libcrypto */
|
||||
|
||||
#include "module.h"
|
||||
#include "modules/ssl.h"
|
||||
|
||||
@@ -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'));
|
||||
|
||||
@@ -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'));
|
||||
|
||||
@@ -31,6 +31,7 @@ class UnrealIRCdProto : public IRCDProto
|
||||
CanSetVIdent = true;
|
||||
CanSNLine = true;
|
||||
CanSQLine = true;
|
||||
CanSQLineChannel = true;
|
||||
CanSZLine = true;
|
||||
CanSVSHold = true;
|
||||
CanCertFP = true;
|
||||
|
||||
@@ -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> ¶ms) anope_override
|
||||
{
|
||||
if (!params.empty() || source.c || source.service != *MemoServ)
|
||||
|
||||
@@ -626,6 +626,9 @@ Block *Conf::GetModule(const Anope::string &mname)
|
||||
}
|
||||
}
|
||||
|
||||
if (!block)
|
||||
block = &Block::EmptyBlock;
|
||||
|
||||
return GetModule(mname);
|
||||
}
|
||||
|
||||
|
||||
+1
-1
@@ -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
@@ -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
@@ -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
@@ -2,5 +2,5 @@
|
||||
|
||||
VERSION_MAJOR=2
|
||||
VERSION_MINOR=0
|
||||
VERSION_PATCH=13
|
||||
VERSION_PATCH=14
|
||||
VERSION_EXTRA=""
|
||||
|
||||
@@ -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
|
||||
Reference in New Issue
Block a user