mirror of
https://github.com/anope/anope.git
synced 2026-06-13 23:24:46 +02:00
Compare commits
205 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| c2e09fdaea | |||
| 01768bc73e | |||
| c18eedec18 | |||
| 0e0615c6fe | |||
| 5bd3fde79b | |||
| 647f8cd4e6 | |||
| b2e25db159 | |||
| 9f9371531d | |||
| b578ed2544 | |||
| 0a7f167060 | |||
| d427772bd3 | |||
| b2d670298b | |||
| 6b646fa1f8 | |||
| 72269c44e5 | |||
| 3b2366e4ba | |||
| 257a8a9a24 | |||
| 7a1d2e11dd | |||
| 8dc687b657 | |||
| 18fc113984 | |||
| 20c1a5d638 | |||
| 8000ae0c0f | |||
| 284d95bfe2 | |||
| c7d5ee4bec | |||
| 4c4cc0ded7 | |||
| 83f89bfece | |||
| 7cf4245359 | |||
| 9284441491 | |||
| 7592a6981b | |||
| 56b158ea43 | |||
| 0143dafe51 | |||
| a2dbcc620e | |||
| 9b5fdea8f2 | |||
| fab07d6b75 | |||
| 1d198da436 | |||
| 8b6e17fe7e | |||
| 86484b6c2b | |||
| c14ae99d32 | |||
| cb0cda2f8d | |||
| 2af363755a | |||
| 753b8dc989 | |||
| d2ea1e7917 | |||
| a8f66578b1 | |||
| ca39aeb554 | |||
| a941f9bde0 | |||
| f4f6787c9c | |||
| 82816cb206 | |||
| 58f0c8c612 | |||
| 21e1913c0f | |||
| 79e7c3f98a | |||
| 72127e1b00 | |||
| ed47588087 | |||
| 448967cefc | |||
| 979027138b | |||
| 176e0e4f37 | |||
| b431d4dccf | |||
| 1b12b80b48 | |||
| 52fdc45597 | |||
| 91762524e2 | |||
| 413b38b1c1 | |||
| ecdccd6ad6 | |||
| e0fd118b3e | |||
| c10d7bdada | |||
| 4e2ca31cf5 | |||
| addd2a1987 | |||
| 4071487f80 | |||
| 9c17c2d818 | |||
| dd9fcca45d | |||
| d9c0a13caf | |||
| 5daa84c7f9 | |||
| b12669487f | |||
| 0e9a1e87d0 | |||
| f118960a25 | |||
| 5d6a71b6d2 | |||
| 23fab4ad06 | |||
| 825dc5be46 | |||
| b6fb6410c0 | |||
| 45dfea5ad9 | |||
| d0a5316c67 | |||
| 382ab84938 | |||
| f451c6cbac | |||
| 9645f53dc8 | |||
| 41802c28c6 | |||
| 97a13081e9 | |||
| 38fcf15d62 | |||
| 75dd784538 | |||
| e955db6e85 | |||
| a434651e75 | |||
| 7d674726c2 | |||
| be50211ae6 | |||
| faa8f57bb2 | |||
| 8cf21191fb | |||
| ae847bcaf0 | |||
| c4bbef0af8 | |||
| 7953274a88 | |||
| d8eb3d4937 | |||
| f91f375b70 | |||
| eac25d016a | |||
| 2356a1caab | |||
| 164b349ef9 | |||
| 2e370f6ed5 | |||
| 9d30e1d63f | |||
| 4771af1cb8 | |||
| 9c9df2ad1f | |||
| 7f418a58da | |||
| 510045858f | |||
| d270910ace | |||
| 10aeba2da2 | |||
| 4e675c50e5 | |||
| 0a37576270 | |||
| 8f6f2a2c47 | |||
| 36a465473e | |||
| 23a0ecd0c4 | |||
| 601af1b0eb | |||
| fb2aae1b17 | |||
| ac984af11a | |||
| d6cbd64621 | |||
| e6bdc5dddd | |||
| ba805e30b8 | |||
| 6e48b1d56f | |||
| cd6401f628 | |||
| a25f94456d | |||
| b5228282e1 | |||
| 593ec34ff7 | |||
| 7ce0eb219b | |||
| 99282e65a6 | |||
| d07e60b3da | |||
| 3da2cdb496 | |||
| ecdd046c80 | |||
| 98b35dfab2 | |||
| 56abaf8498 | |||
| 5394f5433a | |||
| c414433fae | |||
| 16d08e57df | |||
| 252a65af7e | |||
| d40edcae69 | |||
| 4c1cc0e05d | |||
| 80c332bc41 | |||
| 5a25a3807b | |||
| 27a2645ed3 | |||
| 830361e97d | |||
| 93a92bb73b | |||
| b9dc44ae9a | |||
| f52bbe22af | |||
| 96d7797134 | |||
| 9810da9829 | |||
| 5692abb316 | |||
| 2e65bd4012 | |||
| 1ac4a1d9a5 | |||
| 8d13a355cd | |||
| 8c4eec2b6e | |||
| 776207ba67 | |||
| 2f5e880e57 | |||
| 94f781726e | |||
| 054c227df0 | |||
| 907e192aab | |||
| d6d0c883b0 | |||
| 7f4327e8ba | |||
| 132932ffaf | |||
| c007b829f7 | |||
| 3b647b0740 | |||
| 7a21648683 | |||
| 389c1dbd92 | |||
| d95189a4d8 | |||
| e65a22ae9d | |||
| 4e8cc4f786 | |||
| dfc18db1dd | |||
| 63dbd7fbf0 | |||
| c1cdefe1a7 | |||
| cd9a2af65d | |||
| 7fe0543bc6 | |||
| 2a6ad3d9fc | |||
| 38cbff4156 | |||
| a86162f287 | |||
| ceddb8370c | |||
| 040b06ad56 | |||
| 1666b1a8d8 | |||
| 4362f53cc3 | |||
| cc616a7146 | |||
| 0f01c04b02 | |||
| 4cbdf9a73b | |||
| fce257dc43 | |||
| ad7601b0cc | |||
| 5be9de5d12 | |||
| 02ed9a9725 | |||
| 074f163750 | |||
| de023bab0a | |||
| 510a746f8d | |||
| 8eb46772e6 | |||
| d563aa0da8 | |||
| 3e3312db25 | |||
| bb5c4906cc | |||
| 444976e64f | |||
| 57b614ae59 | |||
| 2f9eabdb72 | |||
| a458f7c840 | |||
| 65bf84cfb5 | |||
| 5efaa5b206 | |||
| 41f4c7dab6 | |||
| 0f1936f63d | |||
| 5baa6247a9 | |||
| 82f5d1d61d | |||
| dd8dd3b4a0 | |||
| a718223585 | |||
| abc4851287 | |||
| 3d1255dbe9 |
@@ -28,7 +28,9 @@ Naram Qashat <cyberbotx@anope.org> <cyberbotx@5417fbe8-f217-4b02-8779-1006273d78
|
||||
Naram Qashat <cyberbotx@anope.org> <cyberbotx@cyberbotx.com>
|
||||
Naram Qashat <cyberbotx@anope.org> <Naram Qashat cyberbotx@cyberbotx.com@5417fbe8-f217-4b02-8779-1006273d7864>
|
||||
Pieter Bootsma <geniusdex@anope.org> <geniusdex geniusdex@31f1291d-b8d6-0310-a050-a5561fc1590b@5417fbe8-f217-4b02-8779-1006273d7864>
|
||||
Robby <robby@anope.org>
|
||||
Robby <robby@chat.be>
|
||||
Robby <robby@chatbelgie.be>
|
||||
Robin Burchell <w00t@inspircd.org> <rburchell@5417fbe8-f217-4b02-8779-1006273d7864>
|
||||
Robin Burchell <w00t@inspircd.org> <Robin Burchell w00t@inspircd.org@5417fbe8-f217-4b02-8779-1006273d7864>
|
||||
Sebastian V. <hal9000@denorastats.org>
|
||||
|
||||
+41
-37
@@ -10,11 +10,6 @@ if(COMMAND cmake_policy)
|
||||
endif(POLICY CMP0007)
|
||||
endif(COMMAND cmake_policy)
|
||||
|
||||
# If the Source dir and the Binary dir are the same, we are building in-source, which we will disallow due to Autotools being there (but only on non-Windows)
|
||||
if(${CMAKE_CURRENT_SOURCE_DIR} STREQUAL ${CMAKE_CURRENT_BINARY_DIR} AND NOT WIN32)
|
||||
message(FATAL_ERROR "You can not use CMake to build Anope from the root of it's source tree! Remove the CMakeCache.txt file from this directory, then create a separate directory (either below this directory or elsewhere), and then re-run CMake from there.")
|
||||
endif(${CMAKE_CURRENT_SOURCE_DIR} STREQUAL ${CMAKE_CURRENT_BINARY_DIR} AND NOT WIN32)
|
||||
|
||||
# Set the project as C++ primarily, but have C enabled for the checks required later
|
||||
project(Anope CXX)
|
||||
enable_language(C)
|
||||
@@ -50,20 +45,20 @@ if(MINOR_VERSION GREATER 5)
|
||||
set(CMAKE242_OR_BETTER TRUE)
|
||||
else(MINOR_VERSION GREATER 5)
|
||||
set(CMAKE26_OR_BETTER FALSE)
|
||||
# Also detect if we are using CMake 2.4.8 or better, the FIND sub-command of list() is non-existant in earlier versions
|
||||
# Also detect if we are using CMake 2.4.8 or better, the FIND sub-command of list() is non-existent in earlier versions
|
||||
if(PATCH_VERSION GREATER 7)
|
||||
set(CMAKE248_OR_BETTER TRUE)
|
||||
set(CMAKE244_OR_BETTER TRUE)
|
||||
set(CMAKE242_OR_BETTER TRUE)
|
||||
else(PATCH_VERSION GREATER 7)
|
||||
set(CMAKE248_OR_BETTER FALSE)
|
||||
# Also detect if we are using CMake 2.4.4 or better, the CheckCXXCompilerFlag module and SORT sub-command of list() are non-existant in earlier versions
|
||||
# Also detect if we are using CMake 2.4.4 or better, the CheckCXXCompilerFlag module and SORT sub-command of list() are non-existent in earlier versions
|
||||
if(PATCH_VERSION GREATER 3)
|
||||
set(CMAKE244_OR_BETTER TRUE)
|
||||
set(CMAKE242_OR_BETTER TRUE)
|
||||
else(PATCH_VERSION GREATER 3)
|
||||
set(CMAKE244_OR_BETTER FALSE)
|
||||
# ALSO detect if we are using CMake 2.4.2 or better, the APPEND sub-command of list() is non-existant in earlier versions
|
||||
# ALSO detect if we are using CMake 2.4.2 or better, the APPEND sub-command of list() is non-existent in earlier versions
|
||||
if(PATCH_VERSION GREATER 1)
|
||||
set(CMAKE242_OR_BETTER TRUE)
|
||||
else(PATCH_VERSION GREATER 1)
|
||||
@@ -85,8 +80,20 @@ set(ENV{LC_ALL} C)
|
||||
set(DEFAULT_LIBRARY_DIRS)
|
||||
set(DEFAULT_INCLUDE_DIRS)
|
||||
|
||||
# Check that we aren't running on an ancient broken GCC
|
||||
if(CMAKE_COMPILER_IS_GNUCXX)
|
||||
execute_process(COMMAND ${CMAKE_CXX_COMPILER} -dumpversion OUTPUT_VARIABLE GCC_FULL_VERSION OUTPUT_STRIP_TRAILING_WHITESPACE)
|
||||
string(REGEX REPLACE "^(\\d+\\.\\d+)" "\\1" GCC_VERSION ${GCC_FULL_VERSION})
|
||||
if(GCC_VERSION LESS 4.2)
|
||||
message(FATAL_ERROR "Your compiler is too old to build Anope. Upgrade to GCC 4.2 or newer!")
|
||||
endif(GCC_VERSION LESS 4.2)
|
||||
if(GCC_VERSION GREATER 6.0 OR GCC_VERSION EQUAL 6.0)
|
||||
set(CXXFLAGS "${CXXFLAGS} -fno-delete-null-pointer-checks")
|
||||
endif(GCC_VERSION GREATER 6.0 OR GCC_VERSION EQUAL 6.0)
|
||||
endif(CMAKE_COMPILER_IS_GNUCXX)
|
||||
|
||||
# If we are using a GNU compiler (have to use CXX because it seems to fail on C), we will be able to determine it's default paths for libraries and includes
|
||||
if(CMAKE_COMPILER_IS_GNUCXX OR ${CMAKE_CXX_COMPILER_ID} STREQUAL "Clang")
|
||||
if(CMAKE_COMPILER_IS_GNUCXX OR "${CMAKE_CXX_COMPILER_ID}" MATCHES "Clang$")
|
||||
# First look for the compiler's default library directories
|
||||
execute_process(COMMAND ${CMAKE_C_COMPILER} -print-search-dirs OUTPUT_VARIABLE LINES OUTPUT_STRIP_TRAILING_WHITESPACE)
|
||||
# Find only the part after "libraries: "
|
||||
@@ -152,7 +159,7 @@ if(CMAKE_COMPILER_IS_GNUCXX OR ${CMAKE_CXX_COMPILER_ID} STREQUAL "Clang")
|
||||
if(DEFAULT_INCLUDE_DIRS)
|
||||
remove_list_duplicates(DEFAULT_INCLUDE_DIRS)
|
||||
endif(DEFAULT_INCLUDE_DIRS)
|
||||
endif(CMAKE_COMPILER_IS_GNUCXX OR ${CMAKE_CXX_COMPILER_ID} STREQUAL "Clang")
|
||||
endif(CMAKE_COMPILER_IS_GNUCXX OR "${CMAKE_CXX_COMPILER_ID}" MATCHES "Clang$")
|
||||
|
||||
# If we are using Visual Studio, locate the path of the Windows Server 2008 SDK or Windows Server 2003 Platform SDK, depending on which is installed
|
||||
if(MSVC)
|
||||
@@ -228,8 +235,6 @@ endif(EXTRA_LIBS)
|
||||
# Find gettext
|
||||
find_package(Gettext)
|
||||
|
||||
# Add an optional variable for using run-cc.pl for building, Perl will be checked later regardless of this setting
|
||||
option(USE_RUN_CC_PL "Use run-cc.pl for building" OFF)
|
||||
option(USE_PCH "Use precompiled headers" OFF)
|
||||
|
||||
# Use the following directories as includes
|
||||
@@ -237,6 +242,11 @@ option(USE_PCH "Use precompiled headers" OFF)
|
||||
# source include directory so the precompiled headers work correctly.
|
||||
include_directories(${Anope_BINARY_DIR}/include ${Anope_SOURCE_DIR}/include ${Anope_BINARY_DIR}/language ${Anope_SOURCE_DIR}/modules/pseudoclients)
|
||||
|
||||
# Pass on REPRODUCIBLE_BUILD
|
||||
if(REPRODUCIBLE_BUILD)
|
||||
add_definitions(-DREPRODUCIBLE_BUILD)
|
||||
endif(REPRODUCIBLE_BUILD)
|
||||
|
||||
# If using Windows, always add the _WIN32 define
|
||||
if(WIN32)
|
||||
add_definitions(-D_WIN32)
|
||||
@@ -282,13 +292,15 @@ if(MINGW)
|
||||
set(CMAKE_MODULE_LINKER_FLAGS "${CMAKE_MODULE_LINKER_FLAGS} ${CMAKE_SHARED_LIBRARY_CREATE_C_FLAGS}")
|
||||
endif(MINGW)
|
||||
|
||||
# Under Windows, we set the executable name for Anope to be anope
|
||||
if(WIN32)
|
||||
set(PROGRAM_NAME anope)
|
||||
# Under *nix, we set the executable name for Anope to be services
|
||||
else(WIN32)
|
||||
set(PROGRAM_NAME services)
|
||||
endif(WIN32)
|
||||
if(NOT PROGRAM_NAME)
|
||||
# Under Windows, we set the executable name for Anope to be anope
|
||||
if(WIN32)
|
||||
set(PROGRAM_NAME anope)
|
||||
# Under *nix, we set the executable name for Anope to be services
|
||||
else(WIN32)
|
||||
set(PROGRAM_NAME services)
|
||||
endif(WIN32)
|
||||
endif(NOT PROGRAM_NAME)
|
||||
|
||||
# If we are not using Visual Studio, we'll run the following checks
|
||||
if(NOT MSVC)
|
||||
@@ -343,12 +355,12 @@ if(CMAKE_BUILD_TYPE STREQUAL "DEBUG" OR CMAKE_BUILD_TYPE STREQUAL "RELWITHDEBINF
|
||||
set(DEBUG_BUILD TRUE)
|
||||
endif(CMAKE_BUILD_TYPE STREQUAL "DEBUG" OR CMAKE_BUILD_TYPE STREQUAL "RELWITHDEBINFO")
|
||||
|
||||
# Check for the existance of the following include files
|
||||
# Check for the existence of the following include files
|
||||
check_include_file(cstdint HAVE_CSTDINT)
|
||||
check_include_file(stdint.h HAVE_STDINT_H)
|
||||
check_include_file(strings.h HAVE_STRINGS_H)
|
||||
|
||||
# Check for the existance of the following functions
|
||||
# Check for the existence of the following functions
|
||||
check_function_exists(strcasecmp HAVE_STRCASECMP)
|
||||
check_function_exists(stricmp HAVE_STRICMP)
|
||||
check_function_exists(umask HAVE_UMASK)
|
||||
@@ -370,19 +382,11 @@ find_program(GREP grep)
|
||||
find_program(SH sh)
|
||||
find_program(CHGRP chgrp)
|
||||
find_program(CHMOD chmod)
|
||||
find_program(PERL perl)
|
||||
|
||||
# If perl is included on the system and the user wants to use run-cc.pl, change the commands for compiling and linking
|
||||
if(PERL AND USE_RUN_CC_PL)
|
||||
set(CMAKE_CXX_COMPILE_OBJECT "${PERL} ${Anope_SOURCE_DIR}/run-cc.pl -q ${CMAKE_CXX_COMPILE_OBJECT}")
|
||||
set(CMAKE_CXX_LINK_EXECUTABLE "${PERL} ${Anope_SOURCE_DIR}/run-cc.pl -q ${CMAKE_CXX_LINK_EXECUTABLE}")
|
||||
set(CMAKE_CXX_CREATE_SHARED_MODULE "${PERL} ${Anope_SOURCE_DIR}/run-cc.pl -q ${CMAKE_CXX_CREATE_SHARED_MODULE}")
|
||||
endif(PERL AND USE_RUN_CC_PL)
|
||||
|
||||
# If a INSTDIR was passed in to CMake, use it as the install prefix, otherwise set the default install prefix to the services directory under the user's home directory
|
||||
if(INSTDIR)
|
||||
set(CMAKE_INSTALL_PREFIX "${INSTDIR}")
|
||||
else(INSTDIR)
|
||||
elseif(NOT CMAKE_INSTALL_PREFIX)
|
||||
set(CMAKE_INSTALL_PREFIX "$ENV{HOME}/services")
|
||||
endif(INSTDIR)
|
||||
|
||||
@@ -485,16 +489,16 @@ get_target_property(SERVICES_BINARY ${PROGRAM_NAME} LOCATION)
|
||||
get_filename_component(SERVICES_BINARY ${SERVICES_BINARY} NAME)
|
||||
|
||||
# At install time, create the following additional directories
|
||||
install(CODE "file(MAKE_DIRECTORY \"\${CMAKE_INSTALL_PREFIX}/${DB_DIR}/backups\")")
|
||||
install(CODE "file(MAKE_DIRECTORY \"\${CMAKE_INSTALL_PREFIX}/${LOGS_DIR}\")")
|
||||
install(CODE "file(MAKE_DIRECTORY \"\$ENV{DESTDIR}\${CMAKE_INSTALL_PREFIX}/${DB_DIR}/backups\")")
|
||||
install(CODE "file(MAKE_DIRECTORY \"\$ENV{DESTDIR}\${CMAKE_INSTALL_PREFIX}/${LOGS_DIR}\")")
|
||||
if(WIN32)
|
||||
install(CODE "file(MAKE_DIRECTORY \"\${CMAKE_INSTALL_PREFIX}/${DB_DIR}/runtime\")")
|
||||
install(CODE "file(MAKE_DIRECTORY \"\$ENV{DESTDIR}\${CMAKE_INSTALL_PREFIX}/${DB_DIR}/runtime\")")
|
||||
endif(WIN32)
|
||||
# On non-Windows platforms, if RUNGROUP is set, change the permissions of the below directories, as well as the group of the data directory
|
||||
if(NOT WIN32 AND RUNGROUP)
|
||||
install(CODE "execute_process(COMMAND ${CHMOD} 2775 \"\${CMAKE_INSTALL_PREFIX}/\${DB_DIR}/backups\")")
|
||||
install(CODE "execute_process(COMMAND ${CHMOD} 2775 \"\${CMAKE_INSTALL_PREFIX}/\${LOGS_DIR}\")")
|
||||
install(CODE "execute_process(COMMAND ${CHGRP} -R ${RUNGROUP} \"\${CMAKE_INSTALL_PREFIX}\")")
|
||||
install(CODE "execute_process(COMMAND ${CHMOD} 2775 \"\$ENV{DESTDIR}\${CMAKE_INSTALL_PREFIX}/\${DB_DIR}/backups\")")
|
||||
install(CODE "execute_process(COMMAND ${CHMOD} 2775 \"\$ENV{DESTDIR}\${CMAKE_INSTALL_PREFIX}/\${LOGS_DIR}\")")
|
||||
install(CODE "execute_process(COMMAND ${CHGRP} -R ${RUNGROUP} \"\$ENV{DESTDIR}\${CMAKE_INSTALL_PREFIX}\")")
|
||||
endif(NOT WIN32 AND RUNGROUP)
|
||||
# On Windows platforms, install extra files
|
||||
if(WIN32)
|
||||
@@ -507,7 +511,7 @@ if(WIN32)
|
||||
install(FILES ${EXTRA_DLLS} DESTINATION ${BIN_DIR})
|
||||
endif(WIN32)
|
||||
|
||||
install(CODE "file(REMOVE_RECURSE \"${CMAKE_INSTALL_PREFIX}/${LIB_DIR}/modules\")")
|
||||
install(CODE "file(REMOVE_RECURSE \"$ENV{DESTDIR}${CMAKE_INSTALL_PREFIX}/${LIB_DIR}/modules\")")
|
||||
|
||||
# Only process the CPack section if we have CPack
|
||||
if(EXISTS "${CMAKE_ROOT}/Modules/CPack.cmake")
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
#
|
||||
# Configuration script for Services.
|
||||
#
|
||||
# Anope (c) 2003-2014 Anope Team
|
||||
# Anope (c) 2003-2016 Anope Team
|
||||
# Contact us at team@anope.org
|
||||
#
|
||||
# This program is free but copyrighted software; see the file COPYING for
|
||||
@@ -62,12 +62,6 @@ Run_Build_System () {
|
||||
BUILD_TYPE="-DCMAKE_BUILD_TYPE:STRING=RELEASE"
|
||||
fi
|
||||
|
||||
if [ "$USE_RUN_CC_PL" = "yes" ] ; then
|
||||
RUN_CC_PL="-DUSE_RUN_CC_PL:BOOLEAN=ON"
|
||||
else
|
||||
RUN_CC_PL="-DUSE_RUN_CC_PL:BOOLEAN=OFF"
|
||||
fi
|
||||
|
||||
if [ "$USE_PCH" = "yes" ] ; then
|
||||
PCH="-DUSE_PCH:BOOLEAN=ON"
|
||||
else
|
||||
@@ -97,9 +91,9 @@ Run_Build_System () {
|
||||
REAL_SOURCE_DIR="$SOURCE_DIR"
|
||||
fi
|
||||
|
||||
echo "cmake $GEN_TYPE $WITH_INST $WITH_RUN $WITH_PERM $BUILD_TYPE $RUN_CC_PL $PCH $EXTRA_INCLUDE $EXTRA_LIBS $EXTRA_CONFIG_ARGS $REAL_SOURCE_DIR"
|
||||
echo "cmake $GEN_TYPE $WITH_INST $WITH_RUN $WITH_PERM $BUILD_TYPE $PCH $EXTRA_INCLUDE $EXTRA_LIBS $EXTRA_CONFIG_ARGS $REAL_SOURCE_DIR"
|
||||
|
||||
cmake $GEN_TYPE $WITH_INST $WITH_RUN $WITH_PERM $BUILD_TYPE $RUN_CC_PL $PCH $EXTRA_INCLUDE $EXTRA_LIBS $EXTRA_CONFIG_ARGS $REAL_SOURCE_DIR
|
||||
cmake $GEN_TYPE $WITH_INST $WITH_RUN $WITH_PERM $BUILD_TYPE $PCH $EXTRA_INCLUDE $EXTRA_LIBS $EXTRA_CONFIG_ARGS $REAL_SOURCE_DIR
|
||||
|
||||
echo ""
|
||||
if [ "$SOURCE_DIR" = "." ] ; then
|
||||
@@ -131,7 +125,6 @@ INSTDIR=$HOME/services
|
||||
RUNGROUP=
|
||||
UMASK=
|
||||
DEBUG="no"
|
||||
USE_RUN_CC_PL="no"
|
||||
USE_PCH="no"
|
||||
EXTRA_INCLUDE_DIRS=
|
||||
EXTRA_LIB_DIRS=
|
||||
@@ -173,7 +166,7 @@ done
|
||||
# Check for CMake and (optionally) install it
|
||||
###########################################################################
|
||||
|
||||
which cmake > /dev/null
|
||||
cmake --version 2>&1 > /dev/null
|
||||
if [ $? -ne 0 ] ; then
|
||||
clear
|
||||
echo "Anope requires CMake 2.4 or newer, which can be downloaded at http://cmake.org or through your system's package manager."
|
||||
@@ -321,30 +314,6 @@ echo ""
|
||||
|
||||
####
|
||||
|
||||
TEMP_YN="n"
|
||||
if [ "$USE_RUN_CC_PL" = "yes" ] ; then
|
||||
TEMP_YN="y"
|
||||
fi
|
||||
echo "You can optionally have the build run through run-cc.pl, which will"
|
||||
echo "cause warnings and errors (if any) to be colored yellow and red,"
|
||||
echo "respectively. This relies on Perl being installed, so if you say yes"
|
||||
echo "to this without Perl, the option will be ignored."
|
||||
echo "NOTE: If you are using MinGW, it is NOT recommended to say yes to"
|
||||
echo "this, it may fail."
|
||||
echo "Would you like to utilize run-cc.pl?"
|
||||
echo2 "[$TEMP_YN] "
|
||||
read YN
|
||||
if [ "$YN" ] ; then
|
||||
if [ "$YN" = "y" ] ; then
|
||||
USE_RUN_CC_PL="yes"
|
||||
else
|
||||
USE_RUN_CC_PL="no"
|
||||
fi
|
||||
fi
|
||||
echo ""
|
||||
|
||||
####
|
||||
|
||||
TEMP_YN="n"
|
||||
if [ "$USE_PCH" = "yes" ] ; then
|
||||
TEMP_YN="y"
|
||||
@@ -401,7 +370,7 @@ echo ""
|
||||
####
|
||||
|
||||
echo "Are there any extra arguments you wish to pass to CMake?"
|
||||
echo "If you need no extra arugments to CMake, enter NONE in all caps."
|
||||
echo "If you need no extra arguments to CMake, enter NONE in all caps."
|
||||
echo2 "[$EXTRA_CONFIG_ARGS] "
|
||||
if read INPUT ; then : ; else echo "" ; exit 1 ; fi
|
||||
if [ "$INPUT" ] ; then
|
||||
@@ -426,7 +395,6 @@ INSTDIR="$INSTDIR"
|
||||
RUNGROUP="$RUNGROUP"
|
||||
UMASK=$UMASK
|
||||
DEBUG="$DEBUG"
|
||||
USE_RUN_CC_PL="$USE_RUN_CC_PL"
|
||||
USE_PCH="$USE_PCH"
|
||||
EXTRA_INCLUDE_DIRS="$EXTRA_INCLUDE_DIRS"
|
||||
EXTRA_LIB_DIRS="$EXTRA_LIB_DIRS"
|
||||
|
||||
+2
-1
@@ -449,7 +449,8 @@ macro(calculate_libraries SRC SRC_LDFLAGS EXTRA_DEPENDS)
|
||||
if(DEFAULT_LIBRARY_DIRS OR WSDK_PATH OR DEFINED $ENV{VCINSTALLDIR})
|
||||
find_library(FOUND_${LIBRARY}_LIBRARY NAMES ${LIBRARY} PATHS ${DEFAULT_LIBRARY_DIRS} ${WSDK_PATH}/lib $ENV{VCINSTALLDIR}/lib ${EXTRA_INCLUDE} ${EXTRA_LIBS})
|
||||
else(DEFAULT_LIBRARY_DIRS OR WSDK_PATH OR DEFINED $ENV{VCINSTALLDIR})
|
||||
find_library(FOUND_${LIBRARY}_LIBRARY NAMES ${LIBRARY} ${EXTRA_INCLUDE} ${EXTRA_LIBS})
|
||||
find_library(FOUND_${LIBRARY}_LIBRARY NAMES ${LIBRARY} PATHS ${EXTRA_INCLUDE} ${EXTRA_LIBS} NO_DEFAULT_PATH)
|
||||
find_library(FOUND_${LIBRARY}_LIBRARY NAMES ${LIBRARY} PATHS ${EXTRA_INCLUDE} ${EXTRA_LIBS})
|
||||
endif(DEFAULT_LIBRARY_DIRS OR WSDK_PATH OR DEFINED $ENV{VCINSTALLDIR})
|
||||
# If the library was found, we will add it to the linker flags
|
||||
if(FOUND_${LIBRARY}_LIBRARY)
|
||||
|
||||
@@ -665,7 +665,7 @@ privilege
|
||||
rank = 300
|
||||
level = 10
|
||||
flag = "a"
|
||||
xop = "AOP"
|
||||
xop = "SOP"
|
||||
}
|
||||
|
||||
/*
|
||||
|
||||
+4
-3
@@ -255,7 +255,8 @@ serverinfo
|
||||
* - ngircd
|
||||
* - plexus
|
||||
* - ratbox
|
||||
* - unreal
|
||||
* - unreal (for 3.2.x)
|
||||
* - unreal4
|
||||
*/
|
||||
module
|
||||
{
|
||||
@@ -736,7 +737,7 @@ log
|
||||
log
|
||||
{
|
||||
target = "globops"
|
||||
admin = "global/* operserv/mode operserv/kick operserv/akill operserv/s*line operserv/noop operserv/jupe operserv/oline operserv/set operserv/svsnick operserv/svsjoin operserv/svspart nickserv/getpass */drop"
|
||||
admin = "global/* operserv/chankill operserv/mode operserv/kick operserv/akill operserv/s*line operserv/noop operserv/jupe operserv/oline operserv/set operserv/svsnick operserv/svsjoin operserv/svspart nickserv/getpass */drop"
|
||||
servers = "squit"
|
||||
users = "oper"
|
||||
other = "expire/* bados akill/*"
|
||||
@@ -835,7 +836,7 @@ opertype
|
||||
/* The name of this opertype */
|
||||
name = "Services Operator"
|
||||
|
||||
/* What opertype(s) this inherits from. Seperate with a comma. */
|
||||
/* What opertype(s) this inherits from. Separate with a comma. */
|
||||
inherits = "Helper, Another Helper"
|
||||
|
||||
/* What commands (see above) this opertype may use */
|
||||
|
||||
@@ -243,7 +243,6 @@ module { name = "help" }
|
||||
ldap
|
||||
{
|
||||
server = "ldap://127.0.0.1"
|
||||
port = 389
|
||||
|
||||
/*
|
||||
* Admin credentials used for performing searches and adding users.
|
||||
@@ -543,24 +542,6 @@ module { name = "help" }
|
||||
*/
|
||||
#module { name = "m_sasl" }
|
||||
|
||||
/*
|
||||
* m_sasl_dh-aes [EXTRA]
|
||||
*
|
||||
* Add the DH-AES mechanism to SASL.
|
||||
* Requires m_sasl to be loaded.
|
||||
* Requires openssl.
|
||||
*/
|
||||
#module { name = "m_sasl_dh-aes" }
|
||||
|
||||
/*
|
||||
* m_sasl_dh-blowfish [EXTRA]
|
||||
*
|
||||
* Add the DH-BLOWFISH mechanism to SASL.
|
||||
* Requires m_sasl to be loaded.
|
||||
* Requires openssl.
|
||||
*/
|
||||
#module { name = "m_sasl_dh-blowfish" }
|
||||
|
||||
/*
|
||||
* m_ssl_gnutls [EXTRA]
|
||||
*
|
||||
|
||||
@@ -79,7 +79,7 @@ module
|
||||
confirmemailchanges = no
|
||||
|
||||
/*
|
||||
* A message sent to users on connect if they use an unregistered nick.
|
||||
* A message sent to users on connect if they use an unregistered nick. %n will be replaced with the user's nickname.
|
||||
*
|
||||
* This directive is optional.
|
||||
*/
|
||||
@@ -107,6 +107,7 @@ module
|
||||
* - msg: Services messages will be sent as PRIVMSGs instead of NOTICEs, requires
|
||||
* options:useprivmsg to be enabled as well
|
||||
* - ns_keepmodes: Enables keepmodes, which retains user modes across sessions
|
||||
* - ns_no_expire: Enables no expire. Unconfirmed expire overrules this.
|
||||
*
|
||||
* This directive is optional, if left blank, the options will default to ns_secure, memo_signon, and
|
||||
* memo_receive. If you really want no defaults, use "none" by itself as the option.
|
||||
@@ -381,7 +382,15 @@ command { service = "NickServ"; name = "UNGROUP"; command = "nickserv/ungroup";
|
||||
*
|
||||
* Used for identifying to accounts.
|
||||
*/
|
||||
module { name = "ns_identify" }
|
||||
module
|
||||
{
|
||||
name = "ns_identify"
|
||||
|
||||
/*
|
||||
* If set, limits the number of concurrent users that can be logged in as a given account at once.
|
||||
*/
|
||||
maxlogins = 10
|
||||
}
|
||||
command { service = "NickServ"; name = "ID"; command = "nickserv/identify"; hide = true; }
|
||||
command { service = "NickServ"; name = "IDENTIFY"; command = "nickserv/identify"; }
|
||||
|
||||
@@ -390,7 +399,7 @@ command { service = "NickServ"; name = "IDENTIFY"; command = "nickserv/identify"
|
||||
*
|
||||
* Provides the commands:
|
||||
* nickserv/info. - Used for gathering information about an account.
|
||||
* nickserv/set/hide, nickserv/saset/hide - Used for configuring which options are publically shown in nickserv/info.
|
||||
* nickserv/set/hide, nickserv/saset/hide - Used for configuring which options are publicly shown in nickserv/info.
|
||||
*
|
||||
*/
|
||||
module { name = "ns_info" }
|
||||
|
||||
@@ -570,10 +570,8 @@ module
|
||||
|
||||
/*
|
||||
* Sets the default expiry time for session exceptions.
|
||||
*
|
||||
* This directive is required if os_session is loaded.
|
||||
*/
|
||||
exceptionexpiry = 1d
|
||||
#exceptionexpiry = 1d
|
||||
|
||||
/*
|
||||
* The message that will be NOTICE'd to a user just before they are removed from the network because
|
||||
|
||||
+2
-2
@@ -21,7 +21,7 @@ The syntax is usually *_cast<type>(var).
|
||||
static_cast
|
||||
-----------
|
||||
|
||||
From my expierence, this cast is closest to C-style casting for non-pointer
|
||||
From my experience, this cast is closest to C-style casting for non-pointer
|
||||
types as well as between some (but not all) pointer types. This type of cast,
|
||||
like C-style casting, is performed at compile-time. static_cast can also do
|
||||
a downcast of a derived class to a base class, but only if the base class is
|
||||
@@ -80,7 +80,7 @@ Bad_cast exception.
|
||||
|
||||
Note that in Anope we prefer if Anope::debug_cast is used.
|
||||
This uses dynamic_cast (and checks for a NULL pointer return) on debug builds
|
||||
and static_cast on release builds, to speed up the program beacuse of dynamic_cast's
|
||||
and static_cast on release builds, to speed up the program because of dynamic_cast's
|
||||
reliance on RTTI.
|
||||
|
||||
reinterpret_cast
|
||||
|
||||
+1
-1
@@ -1,4 +1,4 @@
|
||||
Orginally pulled from: http://www.inspircd.org/wiki/Coding_Guidelines
|
||||
Originally pulled from: http://www.inspircd.org/wiki/Coding_Guidelines
|
||||
|
||||
---
|
||||
|
||||
|
||||
+50
-2
@@ -1,3 +1,51 @@
|
||||
Anope Version 2.0.4
|
||||
-------------------
|
||||
Add notice rpc method to XMLRPC
|
||||
Fix access check in cs_updown to not allow actions on users with equal access
|
||||
Fix randomnews to work when there are more than 'newscount' random news
|
||||
Fix crash from handling nick introduction collisions on unreal4
|
||||
Add support for GCC6
|
||||
Fix handling /join 0 on ratbox
|
||||
Fix saset display to update the account of the proper user
|
||||
Fix nickserv/confirm to send account and +r when appropriate
|
||||
Fix chankill to not add duplicate akills
|
||||
Allow nickserv/maxemail to disregard gmail style aliases when comparing emails
|
||||
Fix chanserv/mode when setting listmodes with CIDR ranges
|
||||
Fix reported expiry time when the time is divisible by 1 year
|
||||
Clearify botserv repeat kicker help and allow setting repeat times to 1
|
||||
Send vident/vhost with SASL login
|
||||
Add support for SASL reauth
|
||||
Fix log and database backup directories to be properly created by the installer
|
||||
|
||||
Anope Version 2.0.3
|
||||
-------------------
|
||||
Add support for UnrealIRCd 4
|
||||
Fix cs_access to respect chanserv/access/list privilege
|
||||
Fix cs_access to match level -1 as every user, not any level <0
|
||||
Fix problems related to object destruction order when using db_sql_live
|
||||
Show memo notify settings in ms_info
|
||||
Fix some actions bumping channels last used time that shouldn't have
|
||||
Add maxlogins configuration directive to limit the number of concurrent logins to one account
|
||||
Fix race with auto svsnick on ghost sometimes causing nick collisions instead
|
||||
Fix saset langauge reply
|
||||
Show akill/sxlines ids in VIEW
|
||||
Fix crash when an oper is configured in both the configuration and via os_oper
|
||||
Fix m_ldap reconnect logic not properly setting protocol and network timeout settings
|
||||
Fix crash from unloading regex modules when regex xlines exist
|
||||
Fix irc2sql to store away messages
|
||||
Add notice method to m_xmlrpc_main
|
||||
Fix numerics on InspIRCd from being sent to user UID
|
||||
Fix usermode +I on UnrealIRCd to be considered oper only
|
||||
Fix crash in webcpanel when deleting your own access on a channel
|
||||
Fix webcpanel allowing suspended users to login
|
||||
Fix hs_off on InspIRCd to not desync active user host
|
||||
Fix bs_bot to not allow colliding bots into users
|
||||
Don't allow hostserv modules to load if there is no hostserv
|
||||
Fix ns_register allowing bot nicks to be registered through webcpanel
|
||||
Don't update chanserv keepmodes during inhabit
|
||||
Fix build on cmake 2.4
|
||||
Allow searching emails by wildcard in ns_getemail
|
||||
|
||||
Anope Version 2.0.2
|
||||
-------------------
|
||||
Fix keepmodes preventing the first user of a channel from being deopped
|
||||
@@ -173,8 +221,8 @@ A Added ns_resetpass module to the core
|
||||
A CS ACCESS VIEW which shows who added the access and last time used
|
||||
A Last used time to CS AKICK VIEW
|
||||
A Added a sha_256 encryption module
|
||||
A Added the ability to load multiple encryption modules, and the ability to seamlessly convert your database between diferent encryptions
|
||||
A Added configuration options to allow Anope to reconnect if it disconnects from the uplink instead of dieing
|
||||
A Added the ability to load multiple encryption modules, and the ability to seamlessly convert your database between different encryptions
|
||||
A Added configuration options to allow Anope to reconnect if it disconnects from the uplink instead of dying
|
||||
A Added support for linking with IPv6
|
||||
F Unban command to accept an optional nick arg
|
||||
F Some typos in services.conf
|
||||
|
||||
@@ -1,3 +1,14 @@
|
||||
Anope Version 2.0.4
|
||||
-------------------
|
||||
Removed m_sasl_dh-aes and m_sasl_dh-blowfish
|
||||
|
||||
Anope Version 2.0.3
|
||||
-------------------
|
||||
Add operserv/chankill to default globops log
|
||||
Add ns_identify:maxlogins to limit the max number of concurrent logins per account
|
||||
Document ns_no_expire nickserv default
|
||||
Remove default session exception expiry time
|
||||
|
||||
Anope Version 2.0.2
|
||||
-------------------
|
||||
Add an operserv/oper/modify privilege, required to use oper add and oper del
|
||||
|
||||
+3
-3
@@ -1,7 +1,7 @@
|
||||
Anope -- a set of IRC services for IRC networks
|
||||
-----------------------------------------------
|
||||
|
||||
Anope is 2003-2014 Anope Team <team@anope.org>.
|
||||
Anope is 2003-2016 Anope Team <team@anope.org>.
|
||||
Based on Epona 2000-2002 PegSoft <epona@pegsoft.net>.
|
||||
Based on Services 1996-1999 Andrew Church <achurch@achurch.org>.
|
||||
|
||||
@@ -107,7 +107,7 @@ Table of Contents
|
||||
|
||||
Anope Translations:
|
||||
|
||||
* Robby <robby@chat.be> (nl_NL)
|
||||
* Robby <robby@chatbelgie.be> (nl_NL)
|
||||
* Kein <kein-of@yandex.ru> (ru_RU)
|
||||
* Maik Funke <Han@mefalcon.org> (de_DE)
|
||||
* Isaac Fontal <i_fontal@hotmail.com> (es_ES)
|
||||
@@ -175,7 +175,7 @@ Table of Contents
|
||||
* ngIRCd 19.2 or later
|
||||
* Plexus 3 or later
|
||||
* Ratbox 2.0.6 or later
|
||||
* UnrealIRCd 3.2 or later
|
||||
* UnrealIRCd 3.2 or 4
|
||||
|
||||
Anope could also work with some of the daemons derived by the ones listed
|
||||
above, but there's no support for them if they work or don't work.
|
||||
|
||||
+1
-1
@@ -152,7 +152,7 @@ Table of Contents
|
||||
HMSET hash:BotInfo:8 nick redis user redis host services.anope.org realname "Services for IRC Networks"
|
||||
|
||||
Note if you are using HSET instead of HMSET you will need to use a transaction, as shown in the above example.
|
||||
If you are watching your services logs you will immediatly see:
|
||||
If you are watching your services logs you will immediately see:
|
||||
|
||||
USERS: redis!redis@services.anope.org (Services for IRC Networks) connected to the network (services.anope.org)
|
||||
|
||||
|
||||
+6
-3
@@ -7,7 +7,7 @@ checkAuthentication - Takes two parameters, an account name and a password. Chec
|
||||
is correct for the account name, useful for making login pages on websites.
|
||||
|
||||
command - Takes three parameters, a service name (BotServ, ChanServ, NickServ), a user name (whether online or not), and the command
|
||||
to execute. This will execute a the given command to Anope using the given service name. If the user given is online, the
|
||||
to execute. This will execute the given command to Anope using the given service name. If the user given is online, the
|
||||
command reply will go to them, if not it is returned by XMLRPC.
|
||||
|
||||
stats - Takes no parameters, returns miscellaneous stats that can be found in the /operserv stats command.
|
||||
@@ -17,10 +17,13 @@ channel - Takes one parameter, a channel name, and returns real time information
|
||||
|
||||
user - Takes one parameter, a user name, and returns real time information regarding that user.
|
||||
|
||||
opers - Takes no parameters, returns opertypes, their privileges and commands.
|
||||
|
||||
notice - Takes three parameters, source user, target user, and message. Sends a message to the user.
|
||||
|
||||
XMLRPC was designed to be used with db_sql, and will not return any information that can be pulled from the SQL
|
||||
database, such as accounts and registered channel information. It is instead used for pulling realtime data such
|
||||
as users and channels currently online. For examples on how to use these calls in PHP, see xmlrpc.php in docs/XMLRPC.
|
||||
|
||||
|
||||
Also note that the parameter named "id" is reserved for query ID. If you pass a query to Anope containing a value for id. it will
|
||||
be stored by Anope and the same id will be passed back in the result.
|
||||
|
||||
|
||||
+128
-74
@@ -1,90 +1,144 @@
|
||||
<?php
|
||||
/* XMLRPC Functions
|
||||
*
|
||||
* (C) 2003-2014 Anope Team
|
||||
* Contact us at team@anope.org
|
||||
*
|
||||
*/
|
||||
|
||||
/**
|
||||
* XMLRPC Functions
|
||||
*
|
||||
* (C) 2003-2016 Anope Team
|
||||
* Contact us at team@anope.org
|
||||
*/
|
||||
class AnopeXMLRPC
|
||||
{
|
||||
private $Host;
|
||||
/**
|
||||
* The XMLRPC host
|
||||
*
|
||||
* @var string
|
||||
*/
|
||||
private $host;
|
||||
|
||||
function __construct($Host)
|
||||
{
|
||||
$this->Host = $Host;
|
||||
}
|
||||
/**
|
||||
* Initiate a new AnopeXMLRPC instance
|
||||
*
|
||||
* @param $host
|
||||
*/
|
||||
public function __construct($host)
|
||||
{
|
||||
$this->host = $host;
|
||||
}
|
||||
|
||||
/** Run an XMLRPC command. Name should be a query name and params an array of parameters, eg:
|
||||
* $this->RunXMLRPC("checkAuthentication", array("adam", "qwerty"));
|
||||
* If successful returns back an array of useful information.
|
||||
*
|
||||
* Note that $params["id"] is reserved for query ID, you may set it to something if you wish.
|
||||
* If you do, the same ID will be passed back with the reply from Anope.
|
||||
*/
|
||||
function RunXMLRPC($name, $params)
|
||||
{
|
||||
$xmlquery = xmlrpc_encode_request($name, $params);
|
||||
$context = stream_context_create(array("http" => array(
|
||||
"method" => "POST",
|
||||
"header" => "Content-Type: text/xml",
|
||||
"content" => $xmlquery)));
|
||||
/**
|
||||
* Run an XMLRPC command. Name should be a query name and params an array of parameters, eg:
|
||||
* $this->raw("checkAuthentication", ["adam", "qwerty"]);
|
||||
* If successful returns back an array of useful information.
|
||||
*
|
||||
* Note that $params["id"] is reserved for query ID, you may set it to something if you wish.
|
||||
* If you do, the same ID will be passed back with the reply from Anope.
|
||||
*
|
||||
* @param $name
|
||||
* @param $params
|
||||
* @return array|null
|
||||
*/
|
||||
public function run($name, $params)
|
||||
{
|
||||
$xmlquery = xmlrpc_encode_request($name, $params);
|
||||
$context = stream_context_create(["http" => [
|
||||
"method" => "POST",
|
||||
"header" => "Content-Type: text/xml",
|
||||
"content" => $xmlquery]]);
|
||||
|
||||
$inbuf = file_get_contents($this->Host, false, $context);
|
||||
$response = xmlrpc_decode($inbuf);
|
||||
$inbuf = file_get_contents($this->host, false, $context);
|
||||
$response = xmlrpc_decode($inbuf);
|
||||
|
||||
if (isset($response[0]))
|
||||
return $response[0];
|
||||
return NULL;
|
||||
}
|
||||
if ($response) {
|
||||
return $response;
|
||||
}
|
||||
|
||||
/** Do Command on Service as User, eg:
|
||||
* $anope->DoCommand("ChanServ", "Adam", "REGISTER #adam");
|
||||
* Returns an array of information regarding the command execution, if
|
||||
* If 'online' is set to yes, then the reply to the command was sent to the user on IRC.
|
||||
* If 'online' is set to no, then the reply to the command is in the array member 'return'
|
||||
*/
|
||||
function DoCommand($Service, $User, $Command)
|
||||
{
|
||||
return $this->RunXMLRPC("command", array($Service, $User, $Command));
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
||||
/** Check an account/nick name and password to see if they are valid
|
||||
* Returns the account display name if valid
|
||||
*/
|
||||
function CheckAuthentication($Account, $Pass)
|
||||
{
|
||||
$ret = $this->RunXMLRPC("checkAuthentication", array($Account, $Pass));
|
||||
/**
|
||||
* Do Command on Service as User, eg:
|
||||
* $anope->command("ChanServ", "Adam", "REGISTER #adam");
|
||||
* Returns an array of information regarding the command execution, if
|
||||
* If 'online' is set to yes, then the reply to the command was sent to the user on IRC.
|
||||
* If 'online' is set to no, then the reply to the command is in the array member 'return'
|
||||
*
|
||||
* @param $service
|
||||
* @param $user
|
||||
* @param $command
|
||||
* @return array|null
|
||||
*/
|
||||
public function command($service, $user, $command)
|
||||
{
|
||||
return $this->run("command", [$service, $user, $command]);
|
||||
}
|
||||
|
||||
if ($ret && $ret["result"] == "Success")
|
||||
return $ret["account"];
|
||||
return NULL;
|
||||
}
|
||||
/**
|
||||
* Check an account/nick name and password to see if they are valid
|
||||
* Returns the account display name if valid
|
||||
*
|
||||
* @param $account
|
||||
* @param $pass
|
||||
* @return string|null
|
||||
*/
|
||||
public function auth($account, $pass)
|
||||
{
|
||||
$ret = $this->run("checkAuthentication", [$account, $pass]);
|
||||
|
||||
/* Returns an array of misc stats regarding Anope
|
||||
*/
|
||||
function DoStats()
|
||||
{
|
||||
return $this->RunXMLRPC("stats", NULL);
|
||||
}
|
||||
if ($ret && $ret["result"] == "Success") {
|
||||
return $ret["account"];
|
||||
}
|
||||
|
||||
/* Look up data for a channel
|
||||
* Returns an array containing channel information, or an array of size one
|
||||
* (just containing the name) if the channel does not exist
|
||||
*/
|
||||
function DoChannel($Channel)
|
||||
{
|
||||
return $this->RunXMLRPC("channel", array($Channel));
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
||||
/* Like DoChannel(), but different.
|
||||
*/
|
||||
function DoUser($User)
|
||||
{
|
||||
return $this->RunXMLRPC("user", array($User));
|
||||
}
|
||||
/**
|
||||
* Returns an array of misc stats regarding Anope
|
||||
*
|
||||
* @return array|null
|
||||
*/
|
||||
public function stats()
|
||||
{
|
||||
return $this->run("stats", null);
|
||||
}
|
||||
|
||||
/**
|
||||
* Look up data for a channel
|
||||
* Returns an array containing channel information, or an array of size one
|
||||
* (just containing the name) if the channel does not exist
|
||||
*
|
||||
* @param $channel
|
||||
* @return array|null
|
||||
*/
|
||||
public function channel($channel)
|
||||
{
|
||||
return $this->run("channel", [$channel]);
|
||||
}
|
||||
|
||||
/**
|
||||
* Sent a notice to a user.
|
||||
* Returns an array containing channel information, or an array of size one
|
||||
* (just containing the name) if the channel does not exist
|
||||
*
|
||||
* @param $source
|
||||
* @param $target
|
||||
* @param $message
|
||||
* @return array|null
|
||||
*/
|
||||
public function notice($source, $target, $message)
|
||||
{
|
||||
return $this->run("notice", [$source, $target, $message]);
|
||||
}
|
||||
|
||||
/**
|
||||
* Like channel(), but different.
|
||||
*
|
||||
* @param $user
|
||||
* @return array|null
|
||||
*/
|
||||
public function user($user)
|
||||
{
|
||||
return $this->run("user", [$user]);
|
||||
}
|
||||
}
|
||||
|
||||
$anopexmlrpc = new AnopeXMLRPC("http://127.0.0.1:8080/xmlrpc");
|
||||
|
||||
?>
|
||||
$anope = new AnopeXMLRPC("http://127.0.0.1:8080/xmlrpc");
|
||||
|
||||
@@ -148,12 +148,7 @@ while (1)
|
||||
|
||||
if ($input eq "q") {
|
||||
if (-e "build/CMakeFiles") {
|
||||
if (-e "cmake-bin") {
|
||||
my $cmake_path = `find cmake-bin -name cmake -print0`;
|
||||
system($cmake_path, "build/.");
|
||||
} else {
|
||||
system("cmake", "build/.");
|
||||
}
|
||||
system("cmake", "build/.");
|
||||
print "\nNow cd build, then run make to build Anope.\n\n";
|
||||
} else {
|
||||
print "\nBuild directory not found. You should run ./Config now.\n\n"
|
||||
|
||||
+11
-14
@@ -1,13 +1,12 @@
|
||||
/*
|
||||
*
|
||||
* (C) 2003-2014 Anope Team
|
||||
* (C) 2003-2016 Anope Team
|
||||
* Contact us at team@anope.org
|
||||
*
|
||||
* Please read COPYING and README for further details.
|
||||
*
|
||||
* Based on the original code of Epona by Lara.
|
||||
* Based on the original code of Services by Andy Church.
|
||||
*
|
||||
*/
|
||||
|
||||
#ifndef ACCESS_H
|
||||
@@ -79,12 +78,7 @@ class CoreExport ChanAccess : public Serializable
|
||||
Serialize::Reference<NickCore> nc;
|
||||
|
||||
public:
|
||||
typedef std::multimap<const ChanAccess *, const ChanAccess *> Set;
|
||||
/* shows the 'path' taken to determine if an access entry matches a user
|
||||
* .first are access entries checked
|
||||
* .second are access entries which match
|
||||
*/
|
||||
typedef std::pair<Set, Set> Path;
|
||||
typedef std::vector<ChanAccess *> Path;
|
||||
|
||||
/* The provider that created this access entry */
|
||||
AccessProvider *provider;
|
||||
@@ -104,12 +98,14 @@ class CoreExport ChanAccess : public Serializable
|
||||
void Serialize(Serialize::Data &data) const anope_override;
|
||||
static Serializable* Unserialize(Serializable *obj, Serialize::Data &);
|
||||
|
||||
static const unsigned int MAX_DEPTH = 4;
|
||||
|
||||
/** Check if this access entry matches the given user or account
|
||||
* @param u The user
|
||||
* @param nc The account
|
||||
* @param p The path to the access object which matches will be put here
|
||||
* @param next Next channel to check if any
|
||||
*/
|
||||
virtual bool Matches(const User *u, const NickCore *nc, Path &p) const;
|
||||
virtual bool Matches(const User *u, const NickCore *nc, ChannelInfo* &next) const;
|
||||
|
||||
/** Check if this access entry has the given privilege.
|
||||
* @param name The privilege name
|
||||
@@ -137,13 +133,13 @@ class CoreExport ChanAccess : public Serializable
|
||||
/* A group of access entries. This is used commonly, for example with ChannelInfo::AccessFor,
|
||||
* to show what access a user has on a channel because users can match multiple access entries.
|
||||
*/
|
||||
class CoreExport AccessGroup : public std::vector<ChanAccess *>
|
||||
class CoreExport AccessGroup
|
||||
{
|
||||
public:
|
||||
/* access entries + paths */
|
||||
std::vector<ChanAccess::Path> paths;
|
||||
/* Channel these access entries are on */
|
||||
const ChannelInfo *ci;
|
||||
/* Path from these entries to other entries that they depend on */
|
||||
ChanAccess::Path path;
|
||||
/* Account these entries affect, if any */
|
||||
const NickCore *nc;
|
||||
/* super_admin always gets all privs. founder is a special case where ci->founder == nc */
|
||||
@@ -171,7 +167,8 @@ class CoreExport AccessGroup : public std::vector<ChanAccess *>
|
||||
bool operator<(const AccessGroup &other) const;
|
||||
bool operator>=(const AccessGroup &other) const;
|
||||
bool operator<=(const AccessGroup &other) const;
|
||||
|
||||
inline bool empty() const { return paths.empty(); }
|
||||
};
|
||||
|
||||
#endif
|
||||
|
||||
|
||||
+1
-2
@@ -1,13 +1,12 @@
|
||||
/*
|
||||
*
|
||||
* (C) 2003-2014 Anope Team
|
||||
* (C) 2003-2016 Anope Team
|
||||
* Contact us at team@anope.org
|
||||
*
|
||||
* Please read COPYING and README for further details.
|
||||
*
|
||||
* Based on the original code of Epona by Lara.
|
||||
* Based on the original code of Services by Andy Church.
|
||||
*
|
||||
*/
|
||||
|
||||
#ifndef ACCOUNT_H
|
||||
|
||||
+6
-5
@@ -1,13 +1,12 @@
|
||||
/*
|
||||
*
|
||||
* (C) 2003-2014 Anope Team
|
||||
* (C) 2003-2016 Anope Team
|
||||
* Contact us at team@anope.org
|
||||
*
|
||||
* Please read COPYING and README for further details.
|
||||
*
|
||||
* Based on the original code of Epona by Lara.
|
||||
* Based on the original code of Services by Andy Church.
|
||||
*
|
||||
*/
|
||||
|
||||
#ifndef ANOPE_H
|
||||
@@ -337,7 +336,9 @@ namespace Anope
|
||||
template<typename T> class multimap : public std::multimap<string, T, ci::less> { };
|
||||
template<typename T> class hash_map : public TR1NS::unordered_map<string, T, hash_ci, compare> { };
|
||||
|
||||
#ifndef REPRODUCIBLE_BUILD
|
||||
static const char *const compiled = __TIME__ " " __DATE__;
|
||||
#endif
|
||||
|
||||
/** The time Anope started.
|
||||
*/
|
||||
@@ -543,7 +544,7 @@ namespace Anope
|
||||
extern CoreExport Anope::string Random(size_t len);
|
||||
}
|
||||
|
||||
/** sepstream allows for splitting token seperated lists.
|
||||
/** sepstream allows for splitting token separated lists.
|
||||
* Each successive call to sepstream::GetToken() returns
|
||||
* the next token, until none remain, at which point the method returns
|
||||
* an empty string.
|
||||
@@ -615,7 +616,7 @@ class CoreExport sepstream
|
||||
bool StreamEnd();
|
||||
};
|
||||
|
||||
/** A derived form of sepstream, which seperates on commas
|
||||
/** A derived form of sepstream, which separates on commas
|
||||
*/
|
||||
class commasepstream : public sepstream
|
||||
{
|
||||
@@ -625,7 +626,7 @@ class commasepstream : public sepstream
|
||||
commasepstream(const Anope::string &source, bool allowempty = false) : sepstream(source, ',', allowempty) { }
|
||||
};
|
||||
|
||||
/** A derived form of sepstream, which seperates on spaces
|
||||
/** A derived form of sepstream, which separates on spaces
|
||||
*/
|
||||
class spacesepstream : public sepstream
|
||||
{
|
||||
|
||||
+2
-4
@@ -1,10 +1,9 @@
|
||||
/*
|
||||
*
|
||||
* Copyright (C) 2008-2011 Adam <Adam@anope.org>
|
||||
* Copyright (C) 2008-2014 Anope Team <team@anope.org>
|
||||
* (C) 2008-2011 Adam <Adam@anope.org>
|
||||
* (C) 2008-2016 Anope Team <team@anope.org>
|
||||
*
|
||||
* Please read COPYING and README for further details.
|
||||
*
|
||||
*/
|
||||
|
||||
#ifndef BASE_H
|
||||
@@ -142,4 +141,3 @@ class Reference : public ReferenceBase
|
||||
};
|
||||
|
||||
#endif // BASE_H
|
||||
|
||||
|
||||
+2
-3
@@ -1,10 +1,9 @@
|
||||
/*
|
||||
*
|
||||
* Copyright (C) 2008-2011 Robin Burchell <w00t@inspircd.org>
|
||||
* Copyright (C) 2008-2014 Anope Team <team@anope.org>
|
||||
* (C) 2008-2011 Robin Burchell <w00t@inspircd.org>
|
||||
* (C) 2008-2016 Anope Team <team@anope.org>
|
||||
*
|
||||
* Please read COPYING and README for further details.
|
||||
*
|
||||
*/
|
||||
|
||||
#ifndef BOTS_H
|
||||
|
||||
+7
-2
@@ -1,10 +1,9 @@
|
||||
/* Channel support
|
||||
*
|
||||
* (C) 2008-2014 Anope Team
|
||||
* (C) 2008-2016 Anope Team
|
||||
* Contact us at team@anope.org
|
||||
*
|
||||
* Please read COPYING and README for further details.
|
||||
*
|
||||
*/
|
||||
|
||||
#ifndef CHANNELS_H
|
||||
@@ -32,6 +31,8 @@ struct ChanUserContainer : public Extensible
|
||||
|
||||
class CoreExport Channel : public Base, public Extensible
|
||||
{
|
||||
static std::vector<Channel *> deleting;
|
||||
|
||||
public:
|
||||
typedef std::multimap<Anope::string, Anope::string> ModeList;
|
||||
private:
|
||||
@@ -300,6 +301,10 @@ class CoreExport Channel : public Base, public Extensible
|
||||
* @param ts The time the channel was created
|
||||
*/
|
||||
static Channel *FindOrCreate(const Anope::string &name, bool &created, time_t ts = Anope::CurTime);
|
||||
|
||||
void QueueForDeletion();
|
||||
|
||||
static void DeleteChannels();
|
||||
};
|
||||
|
||||
#endif // CHANNELS_H
|
||||
|
||||
+1
-1
@@ -1,6 +1,6 @@
|
||||
/* Declarations for command data.
|
||||
*
|
||||
* (C) 2003-2014 Anope Team
|
||||
* (C) 2003-2016 Anope Team
|
||||
* Contact us at team@anope.org
|
||||
*
|
||||
* Please read COPYING and README for further details.
|
||||
|
||||
+1
-2
@@ -1,13 +1,12 @@
|
||||
/*
|
||||
*
|
||||
* (C) 2003-2014 Anope Team
|
||||
* (C) 2003-2016 Anope Team
|
||||
* Contact us at team@anope.org
|
||||
*
|
||||
* Please read COPYING and README for further details.
|
||||
*
|
||||
* Based on the original code of Epona by Lara.
|
||||
* Based on the original code of Services by Andy Church.
|
||||
*
|
||||
*/
|
||||
|
||||
#ifndef CONFIG_H
|
||||
|
||||
+1
-4
@@ -1,16 +1,14 @@
|
||||
/*
|
||||
*
|
||||
* (C) 2003-2014 Anope Team
|
||||
* (C) 2003-2016 Anope Team
|
||||
* Contact us at team@anope.org
|
||||
*
|
||||
* Please read COPYING and README for further details.
|
||||
*
|
||||
* Based on the original code of Epona by Lara.
|
||||
* Based on the original code of Services by Andy Church.
|
||||
*
|
||||
*/
|
||||
|
||||
|
||||
class AccessGroup;
|
||||
class AutoKick;
|
||||
class BotInfo;
|
||||
@@ -53,4 +51,3 @@ struct MemoInfo;
|
||||
struct ModeLock;
|
||||
struct Oper;
|
||||
namespace SASL { struct Message; }
|
||||
|
||||
|
||||
@@ -1,10 +1,9 @@
|
||||
/*
|
||||
*
|
||||
* (C) 2003-2014 Anope Team
|
||||
* (C) 2003-2016 Anope Team
|
||||
* Contact us at team@anope.org
|
||||
*
|
||||
* Please read COPYING and README for further details.
|
||||
*
|
||||
*/
|
||||
|
||||
#ifndef EXTENSIBLE_H
|
||||
@@ -40,6 +39,8 @@ class CoreExport Extensible
|
||||
|
||||
virtual ~Extensible();
|
||||
|
||||
void UnsetExtensibles();
|
||||
|
||||
template<typename T> T* GetExt(const Anope::string &name) const;
|
||||
bool HasExt(const Anope::string &name) const;
|
||||
|
||||
|
||||
+3
-4
@@ -1,10 +1,9 @@
|
||||
/*
|
||||
*
|
||||
* Copyright (C) 2002-2011 InspIRCd Development Team
|
||||
* Copyright (C) 2009-2014 Anope Team <team@anope.org>
|
||||
* (C) 2002-2011 InspIRCd Development Team
|
||||
* (C) 2009-2016 Anope Team <team@anope.org>
|
||||
*
|
||||
* Please read COPYING and README for further details.
|
||||
*
|
||||
*/
|
||||
|
||||
#ifndef HASHCOMP_H
|
||||
@@ -123,7 +122,7 @@ namespace ci
|
||||
* @param s1 String to find in
|
||||
* @param n Position to search up to
|
||||
* @param c Character to search for
|
||||
* @return Pointer to the first occurance of c in s1
|
||||
* @return Pointer to the first occurrence of c in s1
|
||||
*/
|
||||
static const char *find(const char *s1, int n, char c);
|
||||
};
|
||||
|
||||
+1
-3
@@ -1,10 +1,9 @@
|
||||
/*
|
||||
*
|
||||
* (C) 2008-2014 Anope Team
|
||||
* (C) 2008-2016 Anope Team
|
||||
* Contact us at team@anope.org
|
||||
*
|
||||
* Please read COPYING and README for further details.
|
||||
*
|
||||
*/
|
||||
|
||||
#include "anope.h"
|
||||
@@ -126,4 +125,3 @@ namespace Language
|
||||
#define HOST_SET_IDENTTOOLONG _("Error! The vHost ident is too long, please use an ident shorter than %d characters.")
|
||||
#define HOST_NOT_ASSIGNED _("Please contact an Operator to get a vHost assigned to this nick.")
|
||||
#define HOST_NO_VIDENT _("Your IRCd does not support vIdent's, if this is incorrect, please report this as a possible bug")
|
||||
|
||||
|
||||
+2
-4
@@ -1,13 +1,12 @@
|
||||
/*
|
||||
*
|
||||
* (C) 2003-2014 Anope Team
|
||||
* (C) 2003-2016 Anope Team
|
||||
* Contact us at team@anope.org
|
||||
*
|
||||
* Please read COPYING and README for further details.
|
||||
*
|
||||
* Based on the original code of Epona by Lara.
|
||||
* Based on the original code of Services by Andy Church.
|
||||
*
|
||||
*/
|
||||
|
||||
#ifndef LISTS_H
|
||||
@@ -52,7 +51,7 @@ class CoreExport NumberList
|
||||
virtual void HandleNumber(unsigned number);
|
||||
|
||||
/** Called when there is an error with the numbered list
|
||||
* Return false to immediatly stop processing the list and return
|
||||
* Return false to immediately stop processing the list and return
|
||||
* This is all done before we start calling HandleNumber, so no numbers will have been processed yet
|
||||
* @param list The list
|
||||
* @return false to stop processing
|
||||
@@ -93,4 +92,3 @@ class CoreExport InfoFormatter
|
||||
};
|
||||
|
||||
#endif // LISTS_H
|
||||
|
||||
|
||||
+1
-3
@@ -1,13 +1,12 @@
|
||||
/*
|
||||
*
|
||||
* (C) 2003-2014 Anope Team
|
||||
* (C) 2003-2016 Anope Team
|
||||
* Contact us at team@anope.org
|
||||
*
|
||||
* Please read COPYING and README for further details.
|
||||
*
|
||||
* Based on the original code of Epona by Lara.
|
||||
* Based on the original code of Services by Andy Church.
|
||||
*
|
||||
*/
|
||||
|
||||
#ifndef LOGGER_H
|
||||
@@ -143,4 +142,3 @@ class CoreExport LogInfo
|
||||
};
|
||||
|
||||
#endif // LOGGER_H
|
||||
|
||||
|
||||
+1
-3
@@ -1,14 +1,12 @@
|
||||
/*
|
||||
*
|
||||
* (C) 2003-2014 Anope Team
|
||||
* (C) 2003-2016 Anope Team
|
||||
* Contact us at team@anope.org
|
||||
*
|
||||
* Please read COPYING and README for further details.
|
||||
*
|
||||
* Based on the original code of Epona by Lara.
|
||||
* Based on the original code of Services by Andy Church.
|
||||
*
|
||||
*
|
||||
*/
|
||||
|
||||
#ifndef MAIL_H
|
||||
|
||||
+2
-2
@@ -1,13 +1,12 @@
|
||||
/*
|
||||
*
|
||||
* (C) 2003-2014 Anope Team
|
||||
* (C) 2003-2016 Anope Team
|
||||
* Contact us at team@anope.org
|
||||
*
|
||||
* Please read COPYING and README for further details.
|
||||
*
|
||||
* Based on the original code of Epona by Lara.
|
||||
* Based on the original code of Services by Andy Church.
|
||||
*
|
||||
*/
|
||||
|
||||
#ifndef MEMO_H
|
||||
@@ -19,6 +18,7 @@
|
||||
class CoreExport Memo : public Serializable
|
||||
{
|
||||
public:
|
||||
MemoInfo *mi;
|
||||
bool unread;
|
||||
bool receipt;
|
||||
Memo();
|
||||
|
||||
+1
-3
@@ -1,13 +1,12 @@
|
||||
/*
|
||||
*
|
||||
* (C) 2003-2014 Anope Team
|
||||
* (C) 2003-2016 Anope Team
|
||||
* Contact us at team@anope.org
|
||||
*
|
||||
* Please read COPYING and README for further details.
|
||||
*
|
||||
* Based on the original code of Epona by Lara.
|
||||
* Based on the original code of Services by Andy Church.
|
||||
*
|
||||
*/
|
||||
|
||||
#include "protocol.h"
|
||||
@@ -172,4 +171,3 @@ namespace Message
|
||||
};
|
||||
|
||||
} // namespace Message
|
||||
|
||||
|
||||
+3
-2
@@ -1,7 +1,7 @@
|
||||
/* Mode support
|
||||
*
|
||||
* Copyright (C) 2008-2011 Adam <Adam@anope.org>
|
||||
* Copyright (C) 2008-2014 Anope Team <team@anope.org>
|
||||
* (C) 2008-2011 Adam <Adam@anope.org>
|
||||
* (C) 2008-2016 Anope Team <team@anope.org>
|
||||
*
|
||||
* Please read COPYING and README for further details.
|
||||
*/
|
||||
@@ -395,6 +395,7 @@ class CoreExport Entry
|
||||
Anope::string mask;
|
||||
public:
|
||||
unsigned short cidr_len;
|
||||
int family;
|
||||
Anope::string nick, user, host, real;
|
||||
|
||||
/** Constructor
|
||||
|
||||
+1
-1
@@ -1,6 +1,6 @@
|
||||
/*
|
||||
*
|
||||
* (C) 2003-2014 Anope Team
|
||||
* (C) 2003-2016 Anope Team
|
||||
* Contact us at team@anope.org
|
||||
*
|
||||
* Please read COPYING and README for further details.
|
||||
|
||||
+2
-3
@@ -1,13 +1,12 @@
|
||||
/* Modular support
|
||||
*
|
||||
* (C) 2003-2014 Anope Team
|
||||
* (C) 2003-2016 Anope Team
|
||||
* Contact us at team@anope.org
|
||||
*
|
||||
* Please read COPYING and README for further details.
|
||||
*
|
||||
* Based on the original code of Epona by Lara.
|
||||
* Based on the original code of Services by Andy Church.
|
||||
*
|
||||
*/
|
||||
|
||||
#include "serialize.h"
|
||||
@@ -1016,7 +1015,7 @@ class CoreExport Module : public Extensible
|
||||
*/
|
||||
virtual void OnLogMessage(LogInfo *li, const Log *l, const Anope::string &msg) { throw NotImplementedException(); }
|
||||
|
||||
/** Called when a DNS request (question) is recieved.
|
||||
/** Called when a DNS request (question) is received.
|
||||
* @param req The dns request
|
||||
* @param reply The reply that will be sent
|
||||
*/
|
||||
|
||||
@@ -1,14 +1,12 @@
|
||||
/* BotServ core functions
|
||||
*
|
||||
* (C) 2003-2014 Anope Team
|
||||
* (C) 2003-2016 Anope Team
|
||||
* Contact us at team@anope.org
|
||||
*
|
||||
* Please read COPYING and README for further details.
|
||||
*
|
||||
* Based on the original code of Epona by Lara.
|
||||
* Based on the original code of Services by Andy Church.
|
||||
*
|
||||
*
|
||||
*/
|
||||
|
||||
/** Flags for badwords
|
||||
@@ -70,4 +68,3 @@ struct BadWords
|
||||
|
||||
virtual void Check() = 0;
|
||||
};
|
||||
|
||||
|
||||
@@ -1,14 +1,12 @@
|
||||
/* BotServ core functions
|
||||
*
|
||||
* (C) 2003-2014 Anope Team
|
||||
* (C) 2003-2016 Anope Team
|
||||
* Contact us at team@anope.org
|
||||
*
|
||||
* Please read COPYING and README for further details.
|
||||
*
|
||||
* Based on the original code of Epona by Lara.
|
||||
* Based on the original code of Services by Andy Church.
|
||||
*
|
||||
*
|
||||
*/
|
||||
|
||||
/* Indices for TTB (Times To Ban) */
|
||||
|
||||
@@ -1,9 +1,9 @@
|
||||
/*
|
||||
* (C) 2003-2014 Anope Team
|
||||
*
|
||||
* (C) 2003-2016 Anope Team
|
||||
* Contact us at team@anope.org
|
||||
*
|
||||
* Please read COPYING and README for further details.
|
||||
*
|
||||
*/
|
||||
|
||||
struct EntryMsg
|
||||
@@ -32,4 +32,3 @@ struct EntryMessageList : Serialize::Checker<std::vector<EntryMsg *> >
|
||||
|
||||
virtual EntryMsg* Create() = 0;
|
||||
};
|
||||
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
/* ChanServ core functions
|
||||
*
|
||||
* (C) 2003-2014 Anope Team
|
||||
* (C) 2003-2016 Anope Team
|
||||
* Contact us at team@anope.org
|
||||
*
|
||||
* Please read COPYING and README for further details.
|
||||
@@ -40,4 +40,3 @@ struct LogSettings : Serialize::Checker<std::vector<LogSetting *> >
|
||||
virtual ~LogSettings() { }
|
||||
virtual LogSetting *Create() = 0;
|
||||
};
|
||||
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
/* ChanServ core functions
|
||||
*
|
||||
* (C) 2003-2014 Anope Team
|
||||
* (C) 2003-2016 Anope Team
|
||||
* Contact us at team@anope.org
|
||||
*
|
||||
* Please read COPYING and README for further details.
|
||||
@@ -80,11 +80,10 @@ struct ModeLocks
|
||||
virtual const ModeLock *GetMLock(const Anope::string &mname, const Anope::string ¶m = "") = 0;
|
||||
|
||||
/** Get the current mode locks as a string
|
||||
* @param complete True to show mlock parameters aswell
|
||||
* @param complete True to show mlock parameters as well
|
||||
* @return A string of mode locks, eg: +nrt
|
||||
*/
|
||||
virtual Anope::string GetMLockAsString(bool complete) const = 0;
|
||||
|
||||
virtual void Check() = 0;
|
||||
};
|
||||
|
||||
|
||||
+16
-19
@@ -1,15 +1,14 @@
|
||||
/*
|
||||
*
|
||||
* (C) 2003-2014 Anope Team
|
||||
* (C) 2003-2016 Anope Team
|
||||
* Contact us at team@anope.org
|
||||
*
|
||||
* Please read COPYING and README for further details.
|
||||
*
|
||||
* Based on the original code of Epona by Lara.
|
||||
* Based on the original code of Services by Andy Church.
|
||||
*
|
||||
*/
|
||||
|
||||
|
||||
#ifndef DNS_H
|
||||
#define DNS_H
|
||||
|
||||
@@ -53,7 +52,7 @@ namespace DNS
|
||||
QUERYFLAGS_Z = 0x70,
|
||||
QUERYFLAGS_RCODE = 0xF
|
||||
};
|
||||
|
||||
|
||||
enum Error
|
||||
{
|
||||
ERROR_NONE,
|
||||
@@ -70,13 +69,13 @@ namespace DNS
|
||||
ERROR_NO_RECORDS,
|
||||
ERROR_INVALIDTYPE
|
||||
};
|
||||
|
||||
|
||||
struct Question
|
||||
{
|
||||
Anope::string name;
|
||||
QueryType type;
|
||||
unsigned short qclass;
|
||||
|
||||
|
||||
Question() : type(QUERY_NONE), qclass(0) { }
|
||||
Question(const Anope::string &n, QueryType t, unsigned short c = 1) : name(n), type(t), qclass(c) { }
|
||||
inline bool operator==(const Question & other) const { return name == other.name && type == other.type && qclass == other.qclass; }
|
||||
@@ -89,7 +88,7 @@ namespace DNS
|
||||
}
|
||||
};
|
||||
};
|
||||
|
||||
|
||||
struct ResourceRecord : Question
|
||||
{
|
||||
unsigned int ttl;
|
||||
@@ -99,7 +98,7 @@ namespace DNS
|
||||
ResourceRecord(const Anope::string &n, QueryType t, unsigned short c = 1) : Question(n, t, c), ttl(0), created(Anope::CurTime) { }
|
||||
ResourceRecord(const Question &q) : Question(q), ttl(0), created(Anope::CurTime) { }
|
||||
};
|
||||
|
||||
|
||||
struct Query
|
||||
{
|
||||
std::vector<Question> questions;
|
||||
@@ -123,14 +122,14 @@ namespace DNS
|
||||
|
||||
virtual void Process(Request *req) = 0;
|
||||
virtual void RemoveRequest(Request *req) = 0;
|
||||
|
||||
|
||||
virtual bool HandlePacket(ReplySocket *s, const unsigned char *const data, int len, sockaddrs *from) = 0;
|
||||
|
||||
|
||||
virtual void UpdateSerial() = 0;
|
||||
virtual void Notify(const Anope::string &zone) = 0;
|
||||
virtual uint32_t GetSerial() const = 0;
|
||||
};
|
||||
|
||||
|
||||
/** A DNS query.
|
||||
*/
|
||||
class Request : public Timer, public Question
|
||||
@@ -146,22 +145,22 @@ namespace DNS
|
||||
|
||||
Request(Manager *mgr, Module *c, const Anope::string &addr, QueryType qt, bool cache = false) : Timer(0), Question(addr, qt), manager(mgr),
|
||||
use_cache(cache), id(0), creator(c) { }
|
||||
|
||||
|
||||
virtual ~Request()
|
||||
{
|
||||
manager->RemoveRequest(this);
|
||||
}
|
||||
|
||||
|
||||
/** Called when this request succeeds
|
||||
* @param r The query sent back from the nameserver
|
||||
*/
|
||||
virtual void OnLookupComplete(const Query *r) = 0;
|
||||
|
||||
|
||||
/** Called when this request fails or times out.
|
||||
* @param r The query sent back from the nameserver, check the error code.
|
||||
*/
|
||||
virtual void OnError(const Query *r) { }
|
||||
|
||||
|
||||
/** Used to time out the query, xalls OnError and lets the TimerManager
|
||||
* delete this request.
|
||||
*/
|
||||
@@ -173,9 +172,7 @@ namespace DNS
|
||||
this->OnError(&rr);
|
||||
}
|
||||
};
|
||||
|
||||
|
||||
} // namespace DNS
|
||||
|
||||
|
||||
#endif // DNS_H
|
||||
|
||||
|
||||
|
||||
@@ -1,13 +1,12 @@
|
||||
/*
|
||||
*
|
||||
* (C) 2003-2014 Anope Team
|
||||
* (C) 2003-2016 Anope Team
|
||||
* Contact us at team@anope.org
|
||||
*
|
||||
* Please read COPYING and README for further details.
|
||||
*
|
||||
* Based on the original code of Epona by Lara.
|
||||
* Based on the original code of Services by Andy Church.
|
||||
*
|
||||
*/
|
||||
|
||||
namespace Encryption
|
||||
@@ -34,4 +33,3 @@ namespace Encryption
|
||||
virtual IV GetDefaultIV() = 0;
|
||||
};
|
||||
}
|
||||
|
||||
|
||||
@@ -1,3 +1,11 @@
|
||||
/*
|
||||
*
|
||||
* (C) 2012-2016 Anope Team
|
||||
* Contact us at team@anope.org
|
||||
*
|
||||
* Please read COPYING and README for further details.
|
||||
*/
|
||||
|
||||
#ifndef ANOPE_HTTPD_H
|
||||
#define ANOPE_HTTPD_H
|
||||
|
||||
|
||||
@@ -1,3 +1,11 @@
|
||||
/*
|
||||
*
|
||||
* (C) 2011-2016 Anope Team
|
||||
* Contact us at team@anope.org
|
||||
*
|
||||
* Please read COPYING and README for further details.
|
||||
*/
|
||||
|
||||
#ifndef ANOPE_LDAP_H
|
||||
#define ANOPE_LDAP_H
|
||||
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
/* NickServ core functions
|
||||
*
|
||||
* (C) 2003-2014 Anope Team
|
||||
* (C) 2003-2016 Anope Team
|
||||
* Contact us at team@anope.org
|
||||
*
|
||||
* Please read COPYING and README for further details.
|
||||
@@ -68,4 +68,3 @@ class CertService : public Service
|
||||
|
||||
virtual NickCore* FindAccountFromCert(const Anope::string &cert) = 0;
|
||||
};
|
||||
|
||||
|
||||
@@ -1,3 +1,11 @@
|
||||
/*
|
||||
*
|
||||
* (C) 2011-2016 Anope Team
|
||||
* Contact us at team@anope.org
|
||||
*
|
||||
* Please read COPYING and README for further details.
|
||||
*/
|
||||
|
||||
#ifndef OS_FORBID_H
|
||||
#define OS_FORBID_H
|
||||
|
||||
@@ -43,4 +51,3 @@ class ForbidService : public Service
|
||||
static ServiceReference<ForbidService> forbid_service("ForbidService", "forbid");
|
||||
|
||||
#endif
|
||||
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
/* OperServ ignore interface
|
||||
*
|
||||
* (C) 2003-2014 Anope Team
|
||||
* (C) 2003-2016 Anope Team
|
||||
* Contact us at team@anope.org
|
||||
*
|
||||
* Please read COPYING and README for further details.
|
||||
@@ -9,7 +9,6 @@
|
||||
* Based on the original code of Services by Andy Church.
|
||||
*/
|
||||
|
||||
|
||||
struct IgnoreData
|
||||
{
|
||||
Anope::string mask;
|
||||
@@ -42,4 +41,3 @@ class IgnoreService : public Service
|
||||
};
|
||||
|
||||
static ServiceReference<IgnoreService> ignore_service("IgnoreService", "ignore");
|
||||
|
||||
|
||||
@@ -1,3 +1,11 @@
|
||||
/*
|
||||
*
|
||||
* (C) 2011-2016 Anope Team
|
||||
* Contact us at team@anope.org
|
||||
*
|
||||
* Please read COPYING and README for further details.
|
||||
*/
|
||||
|
||||
#ifndef OS_NEWS
|
||||
#define OS_NEWS
|
||||
|
||||
@@ -42,4 +50,3 @@ class NewsService : public Service
|
||||
static ServiceReference<NewsService> news_service("NewsService", "news");
|
||||
|
||||
#endif // OS_NEWS
|
||||
|
||||
|
||||
@@ -1,3 +1,11 @@
|
||||
/*
|
||||
*
|
||||
* (C) 2011-2016 Anope Team
|
||||
* Contact us at team@anope.org
|
||||
*
|
||||
* Please read COPYING and README for further details.
|
||||
*/
|
||||
|
||||
#ifndef OS_SESSION_H
|
||||
#define OS_SESSION_H
|
||||
|
||||
@@ -84,4 +92,3 @@ Serializable* Exception::Unserialize(Serializable *obj, Serialize::Data &data)
|
||||
}
|
||||
|
||||
#endif
|
||||
|
||||
|
||||
@@ -1,3 +1,11 @@
|
||||
/*
|
||||
*
|
||||
* (C) 2011-2016 Anope Team
|
||||
* Contact us at team@anope.org
|
||||
*
|
||||
* Please read COPYING and README for further details.
|
||||
*/
|
||||
|
||||
#ifndef CHANSERV_H
|
||||
#define CHANSERV_H
|
||||
|
||||
@@ -15,4 +23,3 @@ class ChanServService : public Service
|
||||
};
|
||||
|
||||
#endif // CHANSERV_H
|
||||
|
||||
|
||||
@@ -1,3 +1,11 @@
|
||||
/*
|
||||
*
|
||||
* (C) 2011-2016 Anope Team
|
||||
* Contact us at team@anope.org
|
||||
*
|
||||
* Please read COPYING and README for further details.
|
||||
*/
|
||||
|
||||
#ifndef GLOBAL_H
|
||||
#define GLOBAL_H
|
||||
|
||||
@@ -17,4 +25,3 @@ class GlobalService : public Service
|
||||
};
|
||||
|
||||
#endif // GLOBAL_H
|
||||
|
||||
|
||||
@@ -1,3 +1,11 @@
|
||||
/*
|
||||
*
|
||||
* (C) 2011-2016 Anope Team
|
||||
* Contact us at team@anope.org
|
||||
*
|
||||
* Please read COPYING and README for further details.
|
||||
*/
|
||||
|
||||
#ifndef MEMOSERV_H
|
||||
#define MEMOSERV_H
|
||||
|
||||
@@ -31,4 +39,3 @@ class MemoServService : public Service
|
||||
};
|
||||
|
||||
#endif // MEMOSERV_H
|
||||
|
||||
|
||||
@@ -1,3 +1,11 @@
|
||||
/*
|
||||
*
|
||||
* (C) 2011-2016 Anope Team
|
||||
* Contact us at team@anope.org
|
||||
*
|
||||
* Please read COPYING and README for further details.
|
||||
*/
|
||||
|
||||
#ifndef NICKSERV_H
|
||||
#define NICKSERV_H
|
||||
|
||||
@@ -14,4 +22,3 @@ class NickServService : public Service
|
||||
};
|
||||
|
||||
#endif // NICKSERV_H
|
||||
|
||||
|
||||
@@ -1,10 +1,9 @@
|
||||
/*
|
||||
*
|
||||
* (C) 2003-2014 Anope Team
|
||||
* (C) 2003-2016 Anope Team
|
||||
* Contact us at team@anope.org
|
||||
*
|
||||
* Please read COPYING and README for further details.
|
||||
*
|
||||
*/
|
||||
|
||||
namespace Redis
|
||||
@@ -71,4 +70,3 @@ namespace Redis
|
||||
virtual void CommitTransaction() = 0;
|
||||
};
|
||||
}
|
||||
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
/*
|
||||
*
|
||||
* (C) 2014 Anope Team
|
||||
* (C) 2014-2016 Anope Team
|
||||
* Contact us at team@anope.org
|
||||
*
|
||||
* Please read COPYING and README for further details.
|
||||
@@ -89,10 +89,14 @@ namespace SASL
|
||||
if (!na || na->nc->HasExt("NS_SUSPENDED"))
|
||||
return OnFail();
|
||||
|
||||
unsigned int maxlogins = Config->GetModule("ns_identify")->Get<unsigned int>("maxlogins");
|
||||
if (maxlogins && na->nc->users.size() >= maxlogins)
|
||||
return OnFail();
|
||||
|
||||
Session *s = sasl->GetSession(uid);
|
||||
if (s)
|
||||
{
|
||||
Log(Config->GetClient("NickServ")) << "A user identified to account " << this->GetAccount() << " using SASL";
|
||||
Log(Config->GetClient("NickServ"), "sasl") << "A user identified to account " << this->GetAccount() << " using SASL";
|
||||
sasl->Succeed(s, na->nc);
|
||||
delete s;
|
||||
}
|
||||
@@ -117,7 +121,7 @@ namespace SASL
|
||||
else if (na->nc->HasExt("NS_SUSPENDED"))
|
||||
accountstatus = "suspended ";
|
||||
|
||||
Log(Config->GetClient("NickServ")) << "A user failed to identify for " << accountstatus << "account " << this->GetAccount() << " using SASL";
|
||||
Log(Config->GetClient("NickServ"), "sasl") << "A user failed to identify for " << accountstatus << "account " << this->GetAccount() << " using SASL";
|
||||
}
|
||||
};
|
||||
}
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
/*
|
||||
* (C) 2003-2014 Anope Team
|
||||
*
|
||||
* (C) 2003-2016 Anope Team
|
||||
* Contact us at team@anope.org
|
||||
*
|
||||
* Please read COPYING and README for further details.
|
||||
@@ -14,4 +15,3 @@ struct MiscData
|
||||
MiscData() { }
|
||||
virtual ~MiscData() { }
|
||||
};
|
||||
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
/*
|
||||
* (C) 2003-2014 Anope Team
|
||||
*
|
||||
* (C) 2003-2016 Anope Team
|
||||
* Contact us at team@anope.org
|
||||
*
|
||||
* Please read COPYING and README for further details.
|
||||
@@ -213,4 +214,3 @@ namespace SQL
|
||||
};
|
||||
|
||||
}
|
||||
|
||||
|
||||
@@ -1,3 +1,10 @@
|
||||
/*
|
||||
*
|
||||
* (C) 2010-2016 Anope Team
|
||||
* Contact us at team@anope.org
|
||||
*
|
||||
* Please read COPYING and README for further details.
|
||||
*/
|
||||
|
||||
class SSLService : public Service
|
||||
{
|
||||
@@ -6,4 +13,3 @@ class SSLService : public Service
|
||||
|
||||
virtual void Init(Socket *s) = 0;
|
||||
};
|
||||
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
/*
|
||||
* (C) 2003-2014 Anope Team
|
||||
*
|
||||
* (C) 2003-2016 Anope Team
|
||||
* Contact us at team@anope.org
|
||||
*
|
||||
* Please read COPYING and README for further details.
|
||||
|
||||
@@ -1,3 +1,11 @@
|
||||
/*
|
||||
*
|
||||
* (C) 2010-2016 Anope Team
|
||||
* Contact us at team@anope.org
|
||||
*
|
||||
* Please read COPYING and README for further details.
|
||||
*/
|
||||
|
||||
#include "httpd.h"
|
||||
|
||||
class XMLRPCRequest
|
||||
@@ -37,4 +45,3 @@ class XMLRPCServiceInterface : public Service
|
||||
|
||||
virtual void Reply(XMLRPCRequest &request) = 0;
|
||||
};
|
||||
|
||||
|
||||
+3
-3
@@ -1,9 +1,9 @@
|
||||
/*
|
||||
* Copyright (C) 2008-2011 Robin Burchell <w00t@inspircd.org>
|
||||
* Copyright (C) 2008-2014 Anope Team <team@anope.org>
|
||||
*
|
||||
* (C) 2008-2011 Robin Burchell <w00t@inspircd.org>
|
||||
* (C) 2008-2016 Anope Team <team@anope.org>
|
||||
*
|
||||
* Please read COPYING and README for further details.
|
||||
*
|
||||
*/
|
||||
|
||||
#ifndef OPERTYPE_H
|
||||
|
||||
+3
-3
@@ -1,13 +1,12 @@
|
||||
/*
|
||||
*
|
||||
* (C) 2003-2014 Anope Team
|
||||
* (C) 2003-2016 Anope Team
|
||||
* Contact us at team@anope.org
|
||||
*
|
||||
* Please read COPYING and README for further details.
|
||||
*
|
||||
* Based on the original code of Epona by Lara.
|
||||
* Based on the original code of Services by Andy Church.
|
||||
*
|
||||
*/
|
||||
|
||||
#ifndef PROTOCOL_H
|
||||
@@ -228,8 +227,9 @@ class CoreExport IRCDProto : public Service
|
||||
*/
|
||||
virtual void SendOper(User *u);
|
||||
|
||||
virtual void SendSASLMechanisms(std::vector<Anope::string> &) { }
|
||||
virtual void SendSASLMessage(const SASL::Message &) { }
|
||||
virtual void SendSVSLogin(const Anope::string &uid, const Anope::string &acc) { }
|
||||
virtual void SendSVSLogin(const Anope::string &uid, const Anope::string &acc, const Anope::string &vident, const Anope::string &vhost) { }
|
||||
|
||||
virtual bool IsNickValid(const Anope::string &);
|
||||
virtual bool IsChannelValid(const Anope::string &);
|
||||
|
||||
+1
-1
@@ -73,7 +73,7 @@
|
||||
* include stdint.h. The hope is that one or the other can be
|
||||
* used with no real difference.
|
||||
*
|
||||
* 5) In the current verison, if your platform can't represent
|
||||
* 5) In the current version, if your platform can't represent
|
||||
* int32_t, int16_t and int8_t, it just dumps out with a compiler
|
||||
* error.
|
||||
*
|
||||
|
||||
@@ -1,10 +1,9 @@
|
||||
/*
|
||||
*
|
||||
* (C) 2008-2014 Anope Team
|
||||
* (C) 2008-2016 Anope Team
|
||||
* Contact us at team@anope.org
|
||||
*
|
||||
* Please read COPYING and README for further details.
|
||||
*
|
||||
*/
|
||||
|
||||
#ifndef REGCHANNEL_H
|
||||
@@ -133,8 +132,8 @@ class CoreExport ChannelInfo : public Serializable, public Extensible
|
||||
/** Retrieve the access for a user or group in the form of a vector of access entries
|
||||
* (as multiple entries can affect a single user).
|
||||
*/
|
||||
AccessGroup AccessFor(const User *u);
|
||||
AccessGroup AccessFor(const NickCore *nc);
|
||||
AccessGroup AccessFor(const User *u, bool updateLastUsed = true);
|
||||
AccessGroup AccessFor(const NickCore *nc, bool updateLastUsed = true);
|
||||
|
||||
/** Get the size of the accss vector for this channel
|
||||
* @return The access vector size
|
||||
|
||||
+1
-3
@@ -1,13 +1,12 @@
|
||||
/*
|
||||
*
|
||||
* (C) 2003-2014 Anope Team
|
||||
* (C) 2003-2016 Anope Team
|
||||
* Contact us at team@anope.org
|
||||
*
|
||||
* Please read COPYING and README for further details.
|
||||
*
|
||||
* Based on the original code of Epona by Lara.
|
||||
* Based on the original code of Services by Andy Church.
|
||||
*
|
||||
*/
|
||||
|
||||
#ifndef REGEXPR_H
|
||||
@@ -44,4 +43,3 @@ class CoreExport RegexProvider : public Service
|
||||
};
|
||||
|
||||
#endif // REGEXPR_H
|
||||
|
||||
|
||||
+3
-4
@@ -1,13 +1,12 @@
|
||||
/*
|
||||
*
|
||||
* (C) 2003-2014 Anope Team
|
||||
* (C) 2003-2016 Anope Team
|
||||
* Contact us at team@anope.org
|
||||
*
|
||||
* Please read COPYING and README for further details.
|
||||
*
|
||||
* Based on the original code of Epona by Lara.
|
||||
* Based on the original code of Services by Andy Church.
|
||||
*
|
||||
*/
|
||||
|
||||
#ifndef SERIALIZE_H
|
||||
@@ -65,9 +64,9 @@ class CoreExport Serializable : public virtual Base
|
||||
Serialize::Type *s_type;
|
||||
/* Iterator into serializable_items */
|
||||
std::list<Serializable *>::iterator s_iter;
|
||||
/* The hash of the last serialized form of this object commited to the database */
|
||||
/* The hash of the last serialized form of this object committed to the database */
|
||||
size_t last_commit;
|
||||
/* The last time this object was commited to the database */
|
||||
/* The last time this object was committed to the database */
|
||||
time_t last_commit_time;
|
||||
|
||||
protected:
|
||||
|
||||
+1
-2
@@ -1,13 +1,12 @@
|
||||
/*
|
||||
*
|
||||
* (C) 2003-2014 Anope Team
|
||||
* (C) 2003-2016 Anope Team
|
||||
* Contact us at team@anope.org
|
||||
*
|
||||
* Please read COPYING and README for further details.
|
||||
*
|
||||
* Based on the original code of Epona by Lara.
|
||||
* Based on the original code of Services by Andy Church.
|
||||
*
|
||||
*/
|
||||
|
||||
#ifndef SERVERS_H
|
||||
|
||||
+1
-3
@@ -1,13 +1,12 @@
|
||||
/*
|
||||
*
|
||||
* (C) 2003-2014 Anope Team
|
||||
* (C) 2003-2016 Anope Team
|
||||
* Contact us at team@anope.org
|
||||
*
|
||||
* Please read COPYING and README for further details.
|
||||
*
|
||||
* Based on the original code of Epona by Lara.
|
||||
* Based on the original code of Services by Andy Church.
|
||||
*
|
||||
*/
|
||||
|
||||
#ifndef SERVICE_H
|
||||
@@ -172,4 +171,3 @@ class ServiceAlias
|
||||
};
|
||||
|
||||
#endif // SERVICE_H
|
||||
|
||||
|
||||
+1
-2
@@ -1,13 +1,12 @@
|
||||
/*
|
||||
*
|
||||
* (C) 2003-2014 Anope Team
|
||||
* (C) 2003-2016 Anope Team
|
||||
* Contact us at team@anope.org
|
||||
*
|
||||
* Please read COPYING and README for further details.
|
||||
*
|
||||
* Based on the original code of Epona by Lara.
|
||||
* Based on the original code of Services by Andy Church.
|
||||
*
|
||||
*/
|
||||
|
||||
#ifndef SERVICES_H
|
||||
|
||||
@@ -1,13 +1,12 @@
|
||||
/*
|
||||
*
|
||||
* (C) 2003-2014 Anope Team
|
||||
* (C) 2003-2016 Anope Team
|
||||
* Contact us at team@anope.org
|
||||
*
|
||||
* Please read COPYING and README for further details.
|
||||
*
|
||||
* Based on the original code of Epona by Lara.
|
||||
* Based on the original code of Services by Andy Church.
|
||||
*
|
||||
*/
|
||||
|
||||
#ifndef SOCKETENGINE_H
|
||||
|
||||
+6
-3
@@ -1,13 +1,12 @@
|
||||
/*
|
||||
*
|
||||
* (C) 2003-2014 Anope Team
|
||||
* (C) 2003-2016 Anope Team
|
||||
* Contact us at team@anope.org
|
||||
*
|
||||
* Please read COPYING and README for further details.
|
||||
*
|
||||
* Based on the original code of Epona by Lara.
|
||||
* Based on the original code of Services by Andy Church.
|
||||
*
|
||||
*/
|
||||
|
||||
#ifndef SOCKETS_H
|
||||
@@ -39,6 +38,10 @@ union CoreExport sockaddrs
|
||||
*/
|
||||
void clear();
|
||||
|
||||
/** Get address family.
|
||||
*/
|
||||
int family() const;
|
||||
|
||||
/** Get the size of the sockaddr we represent
|
||||
* @return The size
|
||||
*/
|
||||
@@ -372,7 +375,7 @@ class CoreExport ListenSocket : public virtual Socket
|
||||
virtual ~ListenSocket();
|
||||
|
||||
/** Process what has come in from the connection
|
||||
* @return false to destory this socket
|
||||
* @return false to destroy this socket
|
||||
*/
|
||||
bool ProcessRead();
|
||||
|
||||
|
||||
@@ -1,13 +1,12 @@
|
||||
/*
|
||||
*
|
||||
* (C) 2003-2014 Anope Team
|
||||
* (C) 2003-2016 Anope Team
|
||||
* Contact us at team@anope.org
|
||||
*
|
||||
* Please read COPYING and README for further details.
|
||||
*
|
||||
* Based on the original code of Epona by Lara.
|
||||
* Based on the original code of Services by Andy Church.
|
||||
*
|
||||
*/
|
||||
|
||||
#ifndef THREADENGINE_H
|
||||
|
||||
+1
-2
@@ -1,13 +1,12 @@
|
||||
/* Timer include stuff.
|
||||
*
|
||||
* (C) 2003-2014 Anope Team
|
||||
* (C) 2003-2016 Anope Team
|
||||
* Contact us at team@anope.org
|
||||
*
|
||||
* Please read COPYING and README for further details.
|
||||
*
|
||||
* Based on the original code of Epona by Lara.
|
||||
* Based on the original code of Services by Andy Church.
|
||||
*
|
||||
*/
|
||||
|
||||
#ifndef TIMERS_H
|
||||
|
||||
+1
-3
@@ -1,13 +1,12 @@
|
||||
/*
|
||||
*
|
||||
* (C) 2003-2014 Anope Team
|
||||
* (C) 2003-2016 Anope Team
|
||||
* Contact us at team@anope.org
|
||||
*
|
||||
* Please read COPYING and README for further details.
|
||||
*
|
||||
* Based on the original code of Epona by Lara.
|
||||
* Based on the original code of Services by Andy Church.
|
||||
*
|
||||
*/
|
||||
|
||||
#ifndef UPLINK_H
|
||||
@@ -52,4 +51,3 @@ class UplinkSocket : public ConnectionSocket, public BufferedSocket
|
||||
extern CoreExport UplinkSocket *UplinkSock;
|
||||
|
||||
#endif // UPLINK_H
|
||||
|
||||
|
||||
+3
-5
@@ -1,14 +1,12 @@
|
||||
/*
|
||||
*
|
||||
* (C) 2008-2011 Robin Burchell <w00t@inspircd.org>
|
||||
* (C) 2003-2014 Anope Team
|
||||
* Contact us at team@anope.org
|
||||
* (C) 2003-2016 Anope Team <team@anope.org>
|
||||
*
|
||||
* Please read COPYING and README for further details.
|
||||
*
|
||||
* Based on the original code of Epona by Lara.
|
||||
* Based on the original code of Services by Andy Church.
|
||||
*
|
||||
*/
|
||||
|
||||
#ifndef USERS_H
|
||||
@@ -44,7 +42,7 @@ class CoreExport User : public virtual Base, public Extensible, public CommandRe
|
||||
Anope::string vident;
|
||||
Anope::string ident;
|
||||
Anope::string uid;
|
||||
/* If the user is on the access list of the nick theyre on */
|
||||
/* If the user is on the access list of the nick they're on */
|
||||
bool on_access;
|
||||
/* Map of user modes and the params this user has (if any) */
|
||||
ModeList modes;
|
||||
@@ -103,7 +101,7 @@ class CoreExport User : public virtual Base, public Extensible, public CommandRe
|
||||
* @param svhost The vhost of the user
|
||||
* @param sip The ip of the user
|
||||
* @param sserver The server of the user
|
||||
* @param srealname The realname/gecos of teh user
|
||||
* @param srealname The realname/gecos of the user
|
||||
* @param ts User's timestamp
|
||||
* @param smodes User's modes
|
||||
* @param suid The unique identifier of the user.
|
||||
|
||||
+1
-1
@@ -1,6 +1,6 @@
|
||||
/* Build bumper
|
||||
*
|
||||
* (C) 2003-2014 Anope Team
|
||||
* (C) 2003-2016 Anope Team
|
||||
* Contact us at team@anope.org
|
||||
*
|
||||
* Please read COPYING and README for further details.
|
||||
|
||||
+3
-2
@@ -1,10 +1,9 @@
|
||||
/*
|
||||
*
|
||||
* (C) 2008-2014 Anope Team
|
||||
* (C) 2008-2016 Anope Team
|
||||
* Contact us at team@anope.org
|
||||
*
|
||||
* Please read COPYING and README for further details.
|
||||
*
|
||||
*/
|
||||
|
||||
#ifndef XLINE_H
|
||||
@@ -113,6 +112,8 @@ class CoreExport XLineManager : public Service
|
||||
*/
|
||||
void AddXLine(XLine *x);
|
||||
|
||||
void RemoveXLine(XLine *);
|
||||
|
||||
/** Delete an entry from this XLineManager
|
||||
* @param x The entry
|
||||
* @return true if the entry was found and deleted, else false
|
||||
|
||||
+828
-733
File diff suppressed because it is too large
Load Diff
+854
-739
File diff suppressed because it is too large
Load Diff
+860
-741
File diff suppressed because it is too large
Load Diff
+765
-661
File diff suppressed because it is too large
Load Diff
+889
-743
File diff suppressed because it is too large
Load Diff
+645
-571
File diff suppressed because it is too large
Load Diff
+826
-732
File diff suppressed because it is too large
Load Diff
+883
-742
File diff suppressed because it is too large
Load Diff
+1113
-1122
File diff suppressed because it is too large
Load Diff
+829
-731
File diff suppressed because it is too large
Load Diff
+830
-732
File diff suppressed because it is too large
Load Diff
+830
-732
File diff suppressed because it is too large
Load Diff
+831
-731
File diff suppressed because it is too large
Load Diff
@@ -12,6 +12,10 @@ macro(build_modules SRC)
|
||||
if(IS_DIRECTORY "${MODULE_SRC}")
|
||||
build_modules("${MODULE_SRC}")
|
||||
else(IS_DIRECTORY "${MODULE_SRC}")
|
||||
string(REGEX MATCH "\\.c$" ANOPE18MODULE ${MODULE_SRC})
|
||||
if(ANOPE18MODULE)
|
||||
message(FATAL_ERROR "Anope 1 modules are not compatible with Anope 2!\nOffending module: ${MODULE_SRC}")
|
||||
endif(ANOPE18MODULE)
|
||||
string(REGEX MATCH "\\.cpp$" CPP ${MODULE_SRC})
|
||||
if(CPP)
|
||||
set_source_files_properties(${MODULE_SRC} PROPERTIES LANGUAGE CXX COMPILE_FLAGS "${CXXFLAGS}")
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
/*
|
||||
*
|
||||
* (C) 2003-2014 Anope Team
|
||||
* (C) 2003-2016 Anope Team
|
||||
* Contact us at team@anope.org
|
||||
*
|
||||
* Please read COPYING and README for further details.
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
/* BotServ core functions
|
||||
*
|
||||
* (C) 2003-2014 Anope Team
|
||||
* (C) 2003-2016 Anope Team
|
||||
* Contact us at team@anope.org
|
||||
*
|
||||
* Please read COPYING and README for further details.
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
/* BotServ core functions
|
||||
*
|
||||
* (C) 2003-2014 Anope Team
|
||||
* (C) 2003-2016 Anope Team
|
||||
* Contact us at team@anope.org
|
||||
*
|
||||
* Please read COPYING and README for further details.
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
/* BotServ core functions
|
||||
*
|
||||
* (C) 2003-2014 Anope Team
|
||||
* (C) 2003-2016 Anope Team
|
||||
* Contact us at team@anope.org
|
||||
*
|
||||
* Please read COPYING and README for further details.
|
||||
@@ -75,6 +75,13 @@ class CommandBSBot : public Command
|
||||
return;
|
||||
}
|
||||
|
||||
User *u = User::Find(nick, true);
|
||||
if (u)
|
||||
{
|
||||
source.Reply(_("Nick \002%s\002 is currently in use."), u->nick.c_str());
|
||||
return;
|
||||
}
|
||||
|
||||
BotInfo *bi = new BotInfo(nick, user, host, real);
|
||||
|
||||
Log(LOG_ADMIN, source, this) << "ADD " << bi->GetMask() << " " << bi->realname;
|
||||
@@ -161,10 +168,19 @@ class CommandBSBot : public Command
|
||||
return;
|
||||
}
|
||||
|
||||
if (!nick.equals_ci(bi->nick) && BotInfo::Find(nick, true))
|
||||
if (!nick.equals_ci(bi->nick))
|
||||
{
|
||||
source.Reply(_("Bot \002%s\002 already exists."), nick.c_str());
|
||||
return;
|
||||
if (BotInfo::Find(nick, true))
|
||||
{
|
||||
source.Reply(_("Bot \002%s\002 already exists."), nick.c_str());
|
||||
return;
|
||||
}
|
||||
|
||||
if (User::Find(nick, true))
|
||||
{
|
||||
source.Reply(_("Nick \002%s\002 is currently in use."), nick.c_str());
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
if (!nick.equals_ci(bi->nick))
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
/* BotServ core functions
|
||||
*
|
||||
* (C) 2003-2014 Anope Team
|
||||
* (C) 2003-2016 Anope Team
|
||||
* Contact us at team@anope.org
|
||||
*
|
||||
* Please read COPYING and README for further details.
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
/* BotServ core functions
|
||||
*
|
||||
* (C) 2003-2014 Anope Team
|
||||
* (C) 2003-2016 Anope Team
|
||||
* Contact us at team@anope.org
|
||||
*
|
||||
* Please read COPYING and README for further details.
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user