mirror of
https://github.com/anope/anope.git
synced 2026-06-19 18:34:46 +02:00
Compare commits
367 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| c0dea5ef30 | |||
| fd4ac7f6fc | |||
| e635f547d6 | |||
| 7167cff703 | |||
| b844154857 | |||
| 5e56dfdb1a | |||
| e1d460e211 | |||
| 9ea6fb25b9 | |||
| 7755668679 | |||
| 569efbb66b | |||
| 696801430b | |||
| 1b08ba8f41 | |||
| 277f735505 | |||
| f63a2bdfb4 | |||
| feb412bdb1 | |||
| ab856683c7 | |||
| 97d7c21193 | |||
| e5b8435769 | |||
| e589080827 | |||
| 257b10ee91 | |||
| 353ee5cc93 | |||
| b094132c9d | |||
| 82006b868f | |||
| ba5a3f5f00 | |||
| 7b6c08b53a | |||
| 47b692f9ae | |||
| ed06609ae1 | |||
| 32a57150ec | |||
| 2a5e8f1890 | |||
| a04c320b4b | |||
| 4221a507cc | |||
| 44dd8d07d9 | |||
| f7aa69b596 | |||
| d5ecc39104 | |||
| 84a02d2709 | |||
| 4b059beb24 | |||
| b319fb089c | |||
| 17196887ad | |||
| 02d67f682a | |||
| b306108740 | |||
| 12a0311aaa | |||
| cf653fc084 | |||
| 5cc7fc0387 | |||
| 832bc35135 | |||
| 06c5914820 | |||
| bf67b9ee5c | |||
| 829c169063 | |||
| 4948120b69 | |||
| 994471f5a7 | |||
| 80c02740d0 | |||
| df3c0b7b52 | |||
| 45702992ac | |||
| 9756f96b85 | |||
| 6ac0364f74 | |||
| 4f820a7d41 | |||
| 5f7127dd92 | |||
| dcb3ff7d34 | |||
| 1107b92699 | |||
| 3b0b1bc80e | |||
| b60b23fd48 | |||
| 5aac6377c2 | |||
| 20856fb59c | |||
| 7545763cd4 | |||
| 1818b19eba | |||
| abc7e4b423 | |||
| e5ece18ee7 | |||
| 8641b995c4 | |||
| b880240d72 | |||
| 5ce90ba7d1 | |||
| 98bae827e1 | |||
| e3c05efe5e | |||
| 8cbaf7e990 | |||
| 339f41aebc | |||
| 55e4ef9d3a | |||
| f63e4ceebe | |||
| b005089f2f | |||
| 1b42e26642 | |||
| 4691351167 | |||
| 404debf789 | |||
| 752a5ca1b7 | |||
| e1a1cf0e6f | |||
| 3fabc2f831 | |||
| 59ea36c831 | |||
| fac880664c | |||
| 7f890ce98d | |||
| 50e1a3e96c | |||
| 6b79349e6c | |||
| 678f54903d | |||
| 714a4a3004 | |||
| 34826f71c7 | |||
| 847cceaba3 | |||
| 09046e3c99 | |||
| 00a19529c3 | |||
| 446b3a910d | |||
| 76f5d4b316 | |||
| 9b59925144 | |||
| 243d781e99 | |||
| 8be5f53f1f | |||
| cd49bb40c2 | |||
| ef3d115bae | |||
| 9f1178ec58 | |||
| 3bc2db561b | |||
| fad603e7a4 | |||
| 5f006bf139 | |||
| aaa12cc018 | |||
| 2238db8338 | |||
| 4d1492d444 | |||
| 5c4414e4a5 | |||
| 6f9b77e336 | |||
| 154fa25e8f | |||
| 9793062007 | |||
| f86dc247e5 | |||
| 2b1f75a313 | |||
| 5ac0c9a327 | |||
| e8763d5b3c | |||
| ce7a32a994 | |||
| 0c1cc08e28 | |||
| e12e4e6956 | |||
| 52535cf6fb | |||
| 121d0a6e5b | |||
| 34535814e4 | |||
| 8bcc6840ce | |||
| 08d113332c | |||
| 765943062e | |||
| 17cca42d48 | |||
| 760fdc4049 | |||
| ead4aa7ed9 | |||
| 65911dd1be | |||
| 4abfdcbb9c | |||
| de5c8c0d38 | |||
| 8e011bbb78 | |||
| f15a9749f9 | |||
| f1956b039d | |||
| 53d5b7c29e | |||
| 812cb04fde | |||
| 1314d5b4f1 | |||
| 490601de3a | |||
| c7aab50bff | |||
| c507c78d5a | |||
| 58c05687bf | |||
| f8cdcc65c6 | |||
| 10a918f9e1 | |||
| e4d1769a8b | |||
| 7cd80a2131 | |||
| 9d6f88de39 | |||
| b93d650b1f | |||
| c480695369 | |||
| 7f1b5552dc | |||
| 4865a8cfff | |||
| 1efd289488 | |||
| 83e4b183ea | |||
| 1e625b6837 | |||
| 402c624e45 | |||
| fde83f6564 | |||
| f0f43cf426 | |||
| 3dc64bac4d | |||
| 2450a64bf4 | |||
| b48293a632 | |||
| e908dc0dc7 | |||
| 378c9203df | |||
| 779f3788c9 | |||
| 604da89813 | |||
| e11abdc4f0 | |||
| 5aac04dffe | |||
| 7480fbda2b | |||
| 9629ccb374 | |||
| cb70d976ba | |||
| 6db0186947 | |||
| 492eac20a8 | |||
| c8511a625d | |||
| f6b915a169 | |||
| 02c1724d75 | |||
| 7e87bb69fc | |||
| aae522d72b | |||
| 0a821640bb | |||
| 37733dea65 | |||
| eabb9c0c11 | |||
| b103d16eb1 | |||
| e3b6ae3649 | |||
| 0ff48e1538 | |||
| 53038d83bf | |||
| 2ea594d677 | |||
| e957c7b2d2 | |||
| 9a4f27e0a3 | |||
| fccc4a4fa6 | |||
| 4325073524 | |||
| 55199f0a4c | |||
| 7edc76f7fb | |||
| 3fbdde5e18 | |||
| 9f8b4ac382 | |||
| 998925c90a | |||
| 7f971043bc | |||
| c2e1a8a3e2 | |||
| c62b3cb275 | |||
| 1a3d9a016d | |||
| 518182ac92 | |||
| 7d0e063300 | |||
| 5e36d848d5 | |||
| fee461f3d0 | |||
| 1773eef143 | |||
| 7704ee7107 | |||
| 5ac1e9175d | |||
| 5695c9e079 | |||
| f92b0d6ea0 | |||
| fc527b464a | |||
| a93b315bd3 | |||
| 5246424dc0 | |||
| 1316147a8c | |||
| 70319ab8be | |||
| 7dd358972a | |||
| d463ae3b1e | |||
| ebda113f44 | |||
| 6ab6eca0a6 | |||
| b1ba1ec8ac | |||
| 9956da18e3 | |||
| b56e71ab14 | |||
| 6f45d72497 | |||
| f5c01bf617 | |||
| 06bad31b18 | |||
| 576aaff3da | |||
| c5bc8fab32 | |||
| f6e2ebe145 | |||
| 37b3535543 | |||
| c21e8d9204 | |||
| 22658d63bd | |||
| f2dee1e1d6 | |||
| 968ef349d6 | |||
| d6640ed5ee | |||
| aabc217a6b | |||
| d82391e46d | |||
| 7aa02864d2 | |||
| 2a8202c832 | |||
| be4a39ceb6 | |||
| a3dc75c61c | |||
| 14dc142a92 | |||
| 51b7d53108 | |||
| 3253455792 | |||
| 879b310580 | |||
| 5ff3aa7209 | |||
| ca93122a68 | |||
| 2428264315 | |||
| cc4a14b0ba | |||
| 934b584374 | |||
| 4237d49d41 | |||
| 1c36de5ab1 | |||
| da948be089 | |||
| 9384a4f088 | |||
| 4d62c673fa | |||
| 7426b3b04a | |||
| 735e234c2c | |||
| 735f0ba6cf | |||
| 9ee7c825e1 | |||
| 912103ec13 | |||
| f843e7bd90 | |||
| d7e2ab688b | |||
| 5e7085130e | |||
| 9b07e163c0 | |||
| 6859decfb8 | |||
| e23baf4297 | |||
| c7f77b3b66 | |||
| 6578829fa6 | |||
| ef06226521 | |||
| 4c669b947f | |||
| 3fbb493d57 | |||
| 223aa65cfa | |||
| fe54dfb37f | |||
| 3f5f84c92c | |||
| 5b3f81ea78 | |||
| 3e8752fe66 | |||
| 57c2b65f08 | |||
| a118946e65 | |||
| ee2dcf11b8 | |||
| e91de41278 | |||
| 10b5b00db4 | |||
| 2044b4d3ad | |||
| 1d0bb9b26b | |||
| 781defb707 | |||
| 16c124d34e | |||
| f08dbced60 | |||
| baabc91ead | |||
| 81483ae5e7 | |||
| 003140bf60 | |||
| b405484fb9 | |||
| 9a45626379 | |||
| 10d10d057e | |||
| aa2844a3fc | |||
| 42c640a9b5 | |||
| 066fc5801b | |||
| 416eaa1e66 | |||
| ac19a5c24b | |||
| 6f9dd282d2 | |||
| c56d72ba84 | |||
| db4ed1cfaf | |||
| cb64d806c1 | |||
| 4f9b7874d6 | |||
| 207c46c871 | |||
| 957cb2bf93 | |||
| b244c74479 | |||
| b76b2e11c8 | |||
| b35665bb54 | |||
| c3eb5b885d | |||
| 6faf4e3823 | |||
| 325b018ed0 | |||
| 0a3d27a91f | |||
| bcd85ca682 | |||
| ac40c53fe4 | |||
| 2eae82da5c | |||
| 72493b7305 | |||
| 1a37e1c048 | |||
| fb7fef7a84 | |||
| 36602224b8 | |||
| ccecfdf445 | |||
| 32d1184c00 | |||
| 6a46a08a85 | |||
| 7a2e6aa5c2 | |||
| 34b5f9ce6e | |||
| f77eb0a282 | |||
| 302a409136 | |||
| 0b3b9fe128 | |||
| f71c7865fc | |||
| 4ecf20b3f5 | |||
| a5b8788014 | |||
| 3cc7950c4b | |||
| 854bc4db0c | |||
| dbc77279bf | |||
| c4ef566a65 | |||
| 66376335ab | |||
| 823bc01f66 | |||
| 947ad6f73a | |||
| 06c8a1ef50 | |||
| b3fd861b3e | |||
| 62262f4b0d | |||
| 6e0dc0e210 | |||
| 7e7556f064 | |||
| 111d6a9178 | |||
| d23817604c | |||
| 4694c7afb4 | |||
| a52293336f | |||
| f24e17f8b4 | |||
| 2b208de02f | |||
| 4eb5d153c0 | |||
| 0451dd3d0d | |||
| c3e4f1bf7e | |||
| f122f104c4 | |||
| deedb3bdd7 | |||
| d27aa03500 | |||
| dcffa5da6f | |||
| 221e79f50d | |||
| d5a453b663 | |||
| a2d69fa431 | |||
| 6a0e4418f4 | |||
| 68eeac67c9 | |||
| 731912f01e | |||
| 51963915ba | |||
| 810685cb73 | |||
| 1a0e6b0be3 | |||
| 81c89bb708 | |||
| 01620e849a | |||
| 4c74020a69 | |||
| b95b8f0aae | |||
| 1ff7a7c1f1 | |||
| 1d16629a6d | |||
| 72aa27ede5 | |||
| 05223dbe6d | |||
| 06d43baf93 | |||
| 5f74662100 | |||
| 2c68312d72 |
+8
-5
@@ -162,12 +162,12 @@ if(MSVC)
|
||||
if(WSDK2008_PATH STREQUAL "/registry")
|
||||
# If not found, look for the 2003 SDK under HKCU
|
||||
get_filename_component(WSDK2003_PATH "[HKEY_CURRENT_USER\\SOFTWARE\\Microsoft\\MicrosoftSDK\\InstalledSDKs\\D2FF9F89-8AA2-4373-8A31-C838BF4DBBE1;Install Dir]" ABSOLUTE CACHE)
|
||||
if(WSDK2003_PATH STREQUAL "/regsitry")
|
||||
if(WSDK2003_PATH STREQUAL "/registry")
|
||||
# The SDK was never found, set the path to nothing
|
||||
set(WSDK_PATH "")
|
||||
else(WSDK2003_PATH STREQUAL "/regsitry")
|
||||
else(WSDK2003_PATH STREQUAL "/registry")
|
||||
set(WSDK_PATH "${WSDK2003_PATH}")
|
||||
endif(WSDK2003_PATH STREQUAL "/regsitry")
|
||||
endif(WSDK2003_PATH STREQUAL "/registry")
|
||||
else(WSDK2008_PATH STREQUAL "/registry")
|
||||
set(WSDK_PATH "${WSDK2008_PATH}")
|
||||
endif(WSDK2008_PATH STREQUAL "/registry")
|
||||
@@ -483,12 +483,13 @@ 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 \"\${CMAKE_INSTALL_PREFIX}/${DB_DIR}/runtime\")")
|
||||
if(WIN32)
|
||||
install(CODE "file(MAKE_DIRECTORY \"\${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 ${CHMOD} 2775 \"\${CMAKE_INSTALL_PREFIX}/\${DB_DIR}/runtime\")")
|
||||
install(CODE "execute_process(COMMAND ${CHGRP} -R ${RUNGROUP} \"\${CMAKE_INSTALL_PREFIX}\")")
|
||||
endif(NOT WIN32 AND RUNGROUP)
|
||||
# On Windows platforms, install extra files
|
||||
@@ -498,6 +499,8 @@ if(WIN32)
|
||||
)
|
||||
endif(WIN32)
|
||||
|
||||
install(CODE "file(REMOVE_RECURSE \"${CMAKE_INSTALL_PREFIX}/${LIB_DIR}/modules\")")
|
||||
|
||||
# Only process the CPack section if we have CPack
|
||||
if(EXISTS "${CMAKE_ROOT}/Modules/CPack.cmake")
|
||||
# Various options for CPack
|
||||
|
||||
+36
-46
@@ -208,7 +208,7 @@ macro(read_from_file FILE REGEX STRINGS)
|
||||
endif(REGEX STREQUAL "")
|
||||
else(CMAKE26_OR_BETTER)
|
||||
# For CMake 2.4.x, we need to do this manually, firstly we read the file in
|
||||
execute_process(COMMAND ${CMAKE_COMMAND} -DFILE:STRING=${FILE} -P ${Anope_SOURCE_DIR}/ReadFile.cmake ERROR_VARIABLE ALL_STRINGS)
|
||||
execute_process(COMMAND ${CMAKE_COMMAND} -DFILE:STRING=${FILE} -P ${Anope_SOURCE_DIR}/cmake/ReadFile.cmake ERROR_VARIABLE ALL_STRINGS)
|
||||
# Next we replace all newlines with semicolons
|
||||
string(REGEX REPLACE "\n" ";" ALL_STRINGS ${ALL_STRINGS})
|
||||
if(REGEX STREQUAL "")
|
||||
@@ -359,24 +359,22 @@ macro(find_includes SRC INCLUDES)
|
||||
endmacro(find_includes)
|
||||
|
||||
###############################################################################
|
||||
# calculate_depends(<source filename> <output variable set to TRUE on fail> <TRUE to output error messages> [<optional output variable for includes>])
|
||||
# calculate_depends(<source filename> [<optional output variable for includes>])
|
||||
#
|
||||
# This macro is used in most of the src (sub)directories to calculate the
|
||||
# header file dependencies for the given source file.
|
||||
###############################################################################
|
||||
macro(calculate_depends SRC SKIP VERBOSE)
|
||||
macro(calculate_depends SRC)
|
||||
# Temporarily set that we didn't get a 3rd argument before we actually check if we did get one or not
|
||||
set(CHECK_ANGLE_INCLUDES FALSE)
|
||||
# Check for a third argument
|
||||
if(${ARGC} GREATER 3)
|
||||
if(${ARGC} GREATER 1)
|
||||
set(CHECK_ANGLE_INCLUDES TRUE)
|
||||
endif(${ARGC} GREATER 3)
|
||||
endif(${ARGC} GREATER 1)
|
||||
# Find all the lines in the given source file that have any form of #include on them, regardless of whitespace, but only if they are valid for the platform we are on
|
||||
find_includes(${SRC} INCLUDES)
|
||||
# Reset the list of headers to empty
|
||||
set(HEADERS)
|
||||
# Reset skip
|
||||
set(${SKIP} FALSE)
|
||||
# Iterate through the strings containing #include (if any)
|
||||
foreach(INCLUDE ${INCLUDES})
|
||||
# Extract the filename from the #include line
|
||||
@@ -402,16 +400,16 @@ macro(calculate_depends SRC SKIP VERBOSE)
|
||||
endif(FOUND_DEFAULT)
|
||||
endforeach(DEFAULT_INCLUDE_DIR)
|
||||
if(FOUND_IN_DEFAULTS EQUAL -1)
|
||||
find_in_list(${ARGV3} "${FOUND_${FILENAME}_INCLUDE}" FOUND_IN_INCLUDES)
|
||||
find_in_list(${ARGV1} "${FOUND_${FILENAME}_INCLUDE}" FOUND_IN_INCLUDES)
|
||||
if(FOUND_IN_INCLUDES EQUAL -1)
|
||||
append_to_list(${ARGV3} "${FOUND_${FILENAME}_INCLUDE}")
|
||||
append_to_list(${ARGV1} "${FOUND_${FILENAME}_INCLUDE}")
|
||||
endif(FOUND_IN_INCLUDES EQUAL -1)
|
||||
endif(FOUND_IN_DEFAULTS EQUAL -1)
|
||||
else(FOUND_${FILENAME}_INCLUDE)
|
||||
set(${SKIP} TRUE)
|
||||
if(VERBOSE)
|
||||
message("${SRC} needs header file ${FILENAME} but we were unable to locate that header file! Check that the header file is within the search path of your OS.")
|
||||
endif(VERBOSE)
|
||||
# XXX
|
||||
if(NOT ${FILENAME} STREQUAL "libintl.h")
|
||||
message(FATAL_ERROR "${SRC} needs header file ${FILENAME} but we were unable to locate that header file! Check that the header file is within the search path of your OS.")
|
||||
endif(NOT ${FILENAME} STREQUAL "libintl.h")
|
||||
endif(FOUND_${FILENAME}_INCLUDE)
|
||||
endif(CHECK_ANGLE_INCLUDES)
|
||||
endif(QUOTE_TYPE STREQUAL "angle brackets")
|
||||
@@ -419,12 +417,12 @@ macro(calculate_depends SRC SKIP VERBOSE)
|
||||
endmacro(calculate_depends)
|
||||
|
||||
###############################################################################
|
||||
# calculate_libraries(<source filename> <output variable set to TRUE on fail> <TRUE to output error messages> <output variable for linker flags> <output variable for extra depends>)
|
||||
# calculate_libraries(<source filename> <output variable for linker flags> <output variable for extra depends>)
|
||||
#
|
||||
# This macro is used in most of the module (sub)directories to calculate the
|
||||
# library dependencies for the given source file.
|
||||
###############################################################################
|
||||
macro(calculate_libraries SRC SKIP VERBOSE SRC_LDFLAGS EXTRA_DEPENDS)
|
||||
macro(calculate_libraries SRC SRC_LDFLAGS EXTRA_DEPENDS)
|
||||
# Set up a temporary LDFLAGS for this file
|
||||
set(THIS_LDFLAGS "${LDFLAGS}")
|
||||
# Reset extra dependencies
|
||||
@@ -433,8 +431,6 @@ macro(calculate_libraries SRC SKIP VERBOSE SRC_LDFLAGS EXTRA_DEPENDS)
|
||||
set(LIBRARY_PATHS)
|
||||
# Reset libraries
|
||||
set(LIBRARIES)
|
||||
# Default to not skipping this file
|
||||
set(${SKIP} FALSE)
|
||||
# Check to see if there are any lines matching: /* RequiredLibraries: [something] */
|
||||
read_from_file(${SRC} "/\\\\*[ \t]*RequiredLibraries:[ \t]*.*[ \t]*\\\\*/" REQUIRED_LIBRARIES)
|
||||
# Iterate through those lines
|
||||
@@ -464,38 +460,32 @@ macro(calculate_libraries SRC SKIP VERBOSE SRC_LDFLAGS EXTRA_DEPENDS)
|
||||
append_to_list(LIBRARIES "${LIBRARY}")
|
||||
endif(MSVC)
|
||||
else(FOUND_${LIBRARY}_LIBRARY)
|
||||
# Skip this file
|
||||
set(${SKIP} TRUE)
|
||||
if(VERBOSE)
|
||||
# In the case of the library not being found, we fatally error so CMake stops trying to generate
|
||||
message(FATAL_ERROR "${SRC} needs library ${LIBRARY} but we were unable to locate that library! Check that the library is within the search path of your OS.")
|
||||
endif(VERBOSE)
|
||||
# In the case of the library not being found, we fatally error so CMake stops trying to generate
|
||||
message(FATAL_ERROR "${SRC} needs library ${LIBRARY} but we were unable to locate that library! Check that the library is within the search path of your OS.")
|
||||
endif(FOUND_${LIBRARY}_LIBRARY)
|
||||
endforeach(LIBRARY)
|
||||
endforeach(REQUIRED_LIBRARY)
|
||||
if(NOT ${SKIP})
|
||||
# Remove duplicates from the library paths
|
||||
if(LIBRARY_PATHS)
|
||||
remove_list_duplicates(LIBRARY_PATHS)
|
||||
endif(LIBRARY_PATHS)
|
||||
# Remove diplicates from the libraries
|
||||
if(LIBRARIES)
|
||||
remove_list_duplicates(LIBRARIES)
|
||||
endif(LIBRARIES)
|
||||
# Iterate through library paths and add them to the linker flags
|
||||
foreach(LIBRARY_PATH ${LIBRARY_PATHS})
|
||||
find_in_list(DEFAULT_LIBRARY_DIRS "${LIBRARY_PATH}" FOUND_IN_DEFAULTS)
|
||||
if(FOUND_IN_DEFAULTS EQUAL -1)
|
||||
set(THIS_LDFLAGS "${THIS_LDFLAGS} -L${LIBRARY_PATH}")
|
||||
endif(FOUND_IN_DEFAULTS EQUAL -1)
|
||||
endforeach(LIBRARY_PATH)
|
||||
# Iterate through libraries and add them to the linker flags
|
||||
foreach(LIBRARY ${LIBRARIES})
|
||||
append_to_list(EXTRA_DEPENDENCIES "${LIBRARY}")
|
||||
endforeach(LIBRARY)
|
||||
set(${SRC_LDFLAGS} "${THIS_LDFLAGS}")
|
||||
set(${EXTRA_DEPENDS} "${EXTRA_DEPENDENCIES}")
|
||||
endif(NOT ${SKIP})
|
||||
# Remove duplicates from the library paths
|
||||
if(LIBRARY_PATHS)
|
||||
remove_list_duplicates(LIBRARY_PATHS)
|
||||
endif(LIBRARY_PATHS)
|
||||
# Remove diplicates from the libraries
|
||||
if(LIBRARIES)
|
||||
remove_list_duplicates(LIBRARIES)
|
||||
endif(LIBRARIES)
|
||||
# Iterate through library paths and add them to the linker flags
|
||||
foreach(LIBRARY_PATH ${LIBRARY_PATHS})
|
||||
find_in_list(DEFAULT_LIBRARY_DIRS "${LIBRARY_PATH}" FOUND_IN_DEFAULTS)
|
||||
if(FOUND_IN_DEFAULTS EQUAL -1)
|
||||
set(THIS_LDFLAGS "${THIS_LDFLAGS} -L${LIBRARY_PATH}")
|
||||
endif(FOUND_IN_DEFAULTS EQUAL -1)
|
||||
endforeach(LIBRARY_PATH)
|
||||
# Iterate through libraries and add them to the linker flags
|
||||
foreach(LIBRARY ${LIBRARIES})
|
||||
append_to_list(EXTRA_DEPENDENCIES "${LIBRARY}")
|
||||
endforeach(LIBRARY)
|
||||
set(${SRC_LDFLAGS} "${THIS_LDFLAGS}")
|
||||
set(${EXTRA_DEPENDS} "${EXTRA_DEPENDENCIES}")
|
||||
endmacro(calculate_libraries)
|
||||
|
||||
###############################################################################
|
||||
|
||||
+148
-75
@@ -56,17 +56,14 @@ service
|
||||
*
|
||||
* Provides essential functionality for BotServ.
|
||||
*/
|
||||
module { name = "botserv" }
|
||||
|
||||
/*
|
||||
* Configuration for BotServ provided by bs_main.
|
||||
*/
|
||||
botserv
|
||||
module
|
||||
{
|
||||
name = "botserv"
|
||||
|
||||
/*
|
||||
* The name of the client that should be BotServ.
|
||||
*/
|
||||
name = "BotServ"
|
||||
client = "BotServ"
|
||||
|
||||
/*
|
||||
* The default bot options for newly registered channels. Note that changing these options
|
||||
@@ -82,7 +79,7 @@ botserv
|
||||
*
|
||||
* This directive is optional, if left blank, there will be no defaults.
|
||||
*/
|
||||
defaults="greet fantasy"
|
||||
defaults = "greet fantasy"
|
||||
|
||||
/*
|
||||
* The minimum number of users there must be in a channel before the bot joins it. The best
|
||||
@@ -91,19 +88,6 @@ botserv
|
||||
*/
|
||||
minusers = 1
|
||||
|
||||
/*
|
||||
* The maximum number of entries a single bad words list can have. Setting it too high can
|
||||
* reduce performance slightly.
|
||||
*/
|
||||
badwordsmax = 32
|
||||
|
||||
/*
|
||||
* The amount of time that data for a user is valid in BotServ. If the data exceeds this time,
|
||||
* it is reset or deleted depending on the case. Do not set it too high, otherwise your
|
||||
* resources will be slightly affected.
|
||||
*/
|
||||
keepdata = 10m
|
||||
|
||||
/*
|
||||
* The bots are currently not affected by any modes or bans when they try to join a channel.
|
||||
* But some people may want to make it act like a real bot, that is, for example, remove all
|
||||
@@ -116,26 +100,17 @@ botserv
|
||||
#smartjoin = yes
|
||||
|
||||
/*
|
||||
* If set, the bots will use a kick reason that does not state the word when it is kicking.
|
||||
* This is especially useful if you have young people on your network.
|
||||
* Modes to set on service bots when they join channels, comment this out for no modes
|
||||
*
|
||||
* This directive is optional.
|
||||
*/
|
||||
gentlebadwordreason = yes
|
||||
botmodes = "ao"
|
||||
|
||||
/*
|
||||
* If set, BotServ will use case sensitive checking for badwords.
|
||||
*
|
||||
* This directive is optional.
|
||||
* User modes to set on service bots. Read the comment about the service:modes directive
|
||||
* on why this can be a bad idea to set.
|
||||
*/
|
||||
#casesensitive = yes
|
||||
|
||||
/*
|
||||
* Defines the prefixes for fantasy commands in channels. One of these characters will have to be prepended
|
||||
* to all fantasy commands. If you choose "!", for example, fantasy commands will be "!kick",
|
||||
* "!op", etc. This directive is optional, if left out, the default fantasy character is "!".
|
||||
*/
|
||||
#fantasycharacter = "!."
|
||||
#botumodes = "i"
|
||||
}
|
||||
|
||||
/*
|
||||
@@ -155,13 +130,17 @@ command { service = "BotServ"; name = "HELP"; command = "generic/help"; }
|
||||
/*
|
||||
* bs_assign
|
||||
*
|
||||
* Provides the commands botserv/assign and botserv/unassign.
|
||||
* Provides the commands:
|
||||
* botserv/assign - Used to assign BotServ bots to channels
|
||||
* botserv/unassign - Used to unassign BotServ bots
|
||||
* botserv/set/nobot - Used to prohibit channels from being assigned BotServ bots.
|
||||
*
|
||||
* Used for assigning and unassigning bots to channels.
|
||||
*/
|
||||
module { name = "bs_assign" }
|
||||
command { service = "BotServ"; name = "ASSIGN"; command = "botserv/assign"; }
|
||||
command { service = "BotServ"; name = "UNASSIGN"; command = "botserv/unassign"; }
|
||||
command { service = "BotServ"; name = "SET NOBOT"; command = "botserv/set/nobot"; permission = "botserv/set/nobot"; }
|
||||
|
||||
/*
|
||||
* bs_autoassign
|
||||
@@ -184,7 +163,22 @@ bs_autoassign
|
||||
*
|
||||
* Used for controlling the channel badword list.
|
||||
*/
|
||||
module { name = "bs_badwords" }
|
||||
module
|
||||
{
|
||||
name = "bs_badwords"
|
||||
|
||||
/*
|
||||
* The maximum number of entries a single bad words list can have.
|
||||
*/
|
||||
badwordsmax = 32
|
||||
|
||||
/*
|
||||
* If set, BotServ will use case sensitive checking for badwords.
|
||||
*
|
||||
* This directive is optional.
|
||||
*/
|
||||
#casesensitive = yes
|
||||
}
|
||||
command { service = "BotServ"; name = "BADWORDS"; command = "botserv/badwords"; }
|
||||
|
||||
/*
|
||||
@@ -231,53 +225,145 @@ command { service = "BotServ"; name = "INFO"; command = "botserv/info"; }
|
||||
/*
|
||||
* bs_kick
|
||||
*
|
||||
* Provides the command botserv/kick.
|
||||
* Provides the commands:
|
||||
* botserv/kick - Dummy help wrapper for the KICK command.
|
||||
* botserv/kick/amsg - Configures BotServ's AMSG kicker.
|
||||
* botserv/kick/badwords - Configures BotServ's badwords kicker.
|
||||
* botserv/kick/bolds - Configures BotServ's bold text kiceker.
|
||||
* botserv/kick/caps - Configures BotServ's capital letters kicker.
|
||||
* botserv/kick/colors - Configures BotServ's color kicker.
|
||||
* botserv/kick/flood - Configures BotServ's flood kicker.
|
||||
* botserv/kick/italics - Configures BotServ's italics kicker.
|
||||
* botserv/kick/repeat - Configures BotServ's repeat kicker.
|
||||
* botserv/kick/reverses - Configures BotServ's reverse kicker.
|
||||
* botserv/kick/underlines - Configures BotServ's reverse kicker.
|
||||
* botserv/set/dontkickops - Used for preventing BotServ from kicking channel operators.
|
||||
* botserv/set/dontkickvoices - Used for preventing BotServ from kicking voices.
|
||||
*
|
||||
* Used for configuring what bots should kick for.
|
||||
*/
|
||||
module { name = "bs_kick" }
|
||||
module
|
||||
{
|
||||
name = "bs_kick"
|
||||
|
||||
/*
|
||||
* The amount of time that data for a user is valid in BotServ. If the data exceeds this time,
|
||||
* it is reset or deleted depending on the case. Do not set it too high, otherwise your
|
||||
* resources will be slightly affected.
|
||||
*/
|
||||
keepdata = 10m
|
||||
|
||||
/*
|
||||
* If set, the bots will use a kick reason that does not state the word when it is kicking.
|
||||
* This is especially useful if you have young people on your network.
|
||||
*
|
||||
* This directive is optional.
|
||||
*/
|
||||
gentlebadwordreason = yes
|
||||
}
|
||||
|
||||
command { service = "BotServ"; name = "KICK"; command = "botserv/kick"; }
|
||||
command { service = "BotServ"; name = "KICK AMSG"; command = "botserv/kick/amsg"; }
|
||||
command { service = "BotServ"; name = "KICK BADWORDS"; command = "botserv/kick/badwords"; }
|
||||
command { service = "BotServ"; name = "KICK BOLDS"; command = "botserv/kick/bolds"; }
|
||||
command { service = "BotServ"; name = "KICK CAPS"; command = "botserv/kick/caps"; }
|
||||
command { service = "BotServ"; name = "KICK COLORS"; command = "botserv/kick/colors"; }
|
||||
command { service = "BotServ"; name = "KICK FLOOD"; command = "botserv/kick/flood"; }
|
||||
command { service = "BotServ"; name = "KICK ITALICS"; command = "botserv/kick/italics"; }
|
||||
command { service = "BotServ"; name = "KICK REPEAT"; command = "botserv/kick/repeat"; }
|
||||
command { service = "BotServ"; name = "KICK REVERSES"; command = "botserv/kick/reverses"; }
|
||||
command { service = "BotServ"; name = "KICK UNDERLINES"; command = "botserv/kick/underlines"; }
|
||||
|
||||
command { service = "BotServ"; name = "SET DONTKICKOPS"; command = "botserv/set/dontkickops"; }
|
||||
command { service = "BotServ"; name = "SET DONTKICKVOICES"; command = "botserv/set/dontkickvoices"; }
|
||||
|
||||
/*
|
||||
* bs_set
|
||||
*
|
||||
* Provides the commands:
|
||||
* botserv/set/dontkickops - Used for preventing BotServ from kicking channel operators.
|
||||
* botserv/set/dontkickvoices - Used for preventing BotServ from kicking voices.
|
||||
* botserv/set/fantasy - Used for enabling or disabling BotServ's fantasist commands.
|
||||
* botserv/set/greet - Used for enabling or disabling BotServ's greet messages in a channel.
|
||||
* botserv/set/nobot - Used to prohibit specific channels from being assigned BotServ bots.
|
||||
* botserv/set/private - Used to prohibit specific BotServ bots from being assigned to channels.
|
||||
*
|
||||
* Used for setting options such as kickers and fantasy replies.
|
||||
*/
|
||||
module { name = "bs_set" }
|
||||
command { service = "BotServ"; name = "SET"; command = "botserv/set"; }
|
||||
command { service = "BotServ"; name = "SET DONTKICKOPS"; command = "botserv/set/dontkickops"; }
|
||||
command { service = "BotServ"; name = "SET DONTKICKVOICES"; command = "botserv/set/dontkickvoices"; }
|
||||
command { service = "BotServ"; name = "SET FANTASY"; command = "botserv/set/fantasy"; }
|
||||
command { service = "BotServ"; name = "SET GREET"; command = "botserv/set/greet"; }
|
||||
command { service = "BotServ"; name = "SET NOBOT"; command = "botserv/set/nobot"; permission = "botserv/set/nobot"; }
|
||||
command { service = "BotServ"; name = "SET BANEXPIRE"; command = "botserv/set/banexpire"; }
|
||||
command { service = "BotServ"; name = "SET PRIVATE"; command = "botserv/set/private"; permission = "botserv/set/private"; }
|
||||
|
||||
/* Fantasy commands
|
||||
/*
|
||||
* greet
|
||||
*
|
||||
* Provides the commands:
|
||||
* botserv/set/greet - Used for enabling or disabling BotServ's greet messages in a channel.
|
||||
* nickserv/set/greet, nickserv/saset/greet - Used for changing a users greet message, which is displayed when they enter channels.
|
||||
*/
|
||||
module { name = "greet" }
|
||||
command { service = "BotServ"; name = "SET GREET"; command = "botserv/set/greet"; }
|
||||
command { service = "NickServ"; name = "SET GREET"; command = "nickserv/set/greet"; }
|
||||
command { service = "NickServ"; name = "SASET GREET"; command = "nickserv/saset/greet"; permission = "nickserv/saset/greet"; }
|
||||
|
||||
/*
|
||||
* GREET privilege.
|
||||
*
|
||||
* Used by 'greet'.
|
||||
*
|
||||
* Users with this privilege have their greet shown when they join channels.
|
||||
*/
|
||||
privilege
|
||||
{
|
||||
name = "GREET"
|
||||
rank = 40
|
||||
level = 5
|
||||
flag = "g"
|
||||
xop = "AOP"
|
||||
}
|
||||
|
||||
|
||||
/*
|
||||
* fantasy
|
||||
*
|
||||
* Allows 'fantaisist' commands to be used in channels.
|
||||
*
|
||||
* Provides the commands:
|
||||
* botserv/set/fantasy - Used for enabling or disabling BotServ's fantasist commands.
|
||||
*/
|
||||
module
|
||||
{
|
||||
name = "fantasy"
|
||||
|
||||
/*
|
||||
* Defines the prefixes for fantasy commands in channels. One of these characters will have to be prepended
|
||||
* to all fantasy commands. If you choose "!", for example, fantasy commands will be "!kick",
|
||||
* "!op", etc. This directive is optional, if left out, the default fantasy character is "!".
|
||||
*/
|
||||
#fantasycharacter = "!."
|
||||
}
|
||||
command { service = "BotServ"; name = "SET FANTASY"; command = "botserv/set/fantasy"; }
|
||||
|
||||
/*
|
||||
* Fantasy commands
|
||||
*
|
||||
* Fantasy commands can be executed in channels that have a BotServ bot by prefixing the
|
||||
* command with one of the fantasy characters configured in botserv:fantasycharacter.
|
||||
* command with one of the fantasy characters configured in botserv's fantasycharacter
|
||||
* directive.
|
||||
*
|
||||
* Sane defaults are provided below that do not need to be edited unless you wish to change the default behavior.
|
||||
*/
|
||||
fantasy { name = "ACCESS"; command = "chanserv/access"; }
|
||||
fantasy { name = "AKICK"; command = "chanserv/akick"; }
|
||||
fantasy { name = "AOP"; command = "chanserv/aop"; }
|
||||
fantasy { name = "AOP"; command = "chanserv/xop"; }
|
||||
fantasy { name = "BAN"; command = "chanserv/ban"; }
|
||||
fantasy { name = "CLONE"; command = "chanserv/clone"; }
|
||||
fantasy { name = "DEHALFOP"; command = "chanserv/modes"; }
|
||||
fantasy { name = "DEOP"; command = "chanserv/modes"; }
|
||||
fantasy { name = "DEOWNER"; command = "chanserv/modes"; }
|
||||
fantasy { name = "DEPROTECT"; command = "chanserv/modes"; }
|
||||
fantasy { name = "DEVOICE"; command = "chanserv/modes"; }
|
||||
fantasy { name = "DOWN"; command = "chanserv/down"; }
|
||||
fantasy { name = "ENFORCE"; command = "chanserv/enforce"; }
|
||||
fantasy { name = "ENTRYMSG"; command = "chanserv/entrymsg"; }
|
||||
fantasy { name = "FLAGS"; command = "chanserv/flags"; }
|
||||
fantasy { name = "HALFOP"; command = "chanserv/modes"; }
|
||||
fantasy { name = "HELP"; command = "generic/help"; prepend_channel = false; }
|
||||
fantasy { name = "HOP"; command = "chanserv/hop"; }
|
||||
fantasy { name = "HOP"; command = "chanserv/xop"; }
|
||||
fantasy { name = "INFO"; command = "chanserv/info"; prepend_channel = false; }
|
||||
fantasy { name = "INVITE"; command = "chanserv/invite"; }
|
||||
fantasy { name = "K"; command = "chanserv/kick"; }
|
||||
@@ -287,9 +373,12 @@ fantasy { name = "LEVELS"; command = "chanserv/levels"; }
|
||||
fantasy { name = "LIST"; command = "chanserv/list"; prepend_channel = false; }
|
||||
fantasy { name = "LOG"; command = "chanserv/log"; }
|
||||
fantasy { name = "MODE"; command = "chanserv/mode"; }
|
||||
fantasy { name = "QOP"; command = "chanserv/qop"; }
|
||||
fantasy { name = "OP"; command = "chanserv/modes"; }
|
||||
fantasy { name = "OWNER"; command = "chanserv/modes"; }
|
||||
fantasy { name = "PROTECT"; command = "chanserv/modes"; }
|
||||
fantasy { name = "QOP"; command = "chanserv/xop"; }
|
||||
fantasy { name = "SEEN"; command = "chanserv/seen"; prepend_channel = false; }
|
||||
fantasy { name = "SOP"; command = "chanserv/sop"; }
|
||||
fantasy { name = "SOP"; command = "chanserv/xop"; }
|
||||
fantasy { name = "STATUS"; command = "chanserv/status"; }
|
||||
fantasy { name = "SUSPEND"; command = "chanserv/suspend"; permission = "chanserv/suspend"; }
|
||||
fantasy { name = "SYNC"; command = "chanserv/sync"; }
|
||||
@@ -297,21 +386,5 @@ fantasy { name = "TOPIC"; command = "chanserv/topic"; }
|
||||
fantasy { name = "UNBAN"; command = "chanserv/unban"; }
|
||||
fantasy { name = "UNSUSPEND"; command = "chanserv/unsuspend"; permission = "chanserv/suspend"; }
|
||||
fantasy { name = "UP"; command = "chanserv/up"; }
|
||||
fantasy { name = "VOP"; command = "chanserv/vop"; }
|
||||
|
||||
|
||||
/* Use m_rewrite to rewrite the op, deop, etc. fantasy commands (see chanserv.conf). */
|
||||
fantasy { name = "OWNER"; command = "rewrite"; }
|
||||
fantasy { name = "DEOWNER"; command = "rewrite"; }
|
||||
|
||||
fantasy { name = "PROTECT"; command = "rewrite"; }
|
||||
fantasy { name = "DEPROTECT"; command = "rewrite"; }
|
||||
|
||||
fantasy { name = "OP"; command = "rewrite"; }
|
||||
fantasy { name = "DEOP"; command = "rewrite"; }
|
||||
|
||||
fantasy { name = "HALFOP"; command = "rewrite"; }
|
||||
fantasy { name = "DEHALFOP"; command = "rewrite"; }
|
||||
|
||||
fantasy { name = "VOICE"; command = "rewrite"; }
|
||||
fantasy { name = "DEVOICE"; command = "rewrite"; }
|
||||
fantasy { name = "VOICE"; command = "chanserv/modes"; }
|
||||
fantasy { name = "VOP"; command = "chanserv/xop"; }
|
||||
|
||||
+261
-347
File diff suppressed because it is too large
Load Diff
@@ -3,9 +3,10 @@
|
||||
* Make sure BotServ, ChanServ and NickServ are running.
|
||||
*/
|
||||
|
||||
module { name = "m_chanstats" }
|
||||
chanstats
|
||||
module
|
||||
{
|
||||
name = "m_chanstats"
|
||||
|
||||
/*
|
||||
* The name of this engine.
|
||||
* This must match with the name of an SQL engine block.
|
||||
|
||||
+263
-155
@@ -21,6 +21,15 @@
|
||||
* foo = bar
|
||||
* }
|
||||
*
|
||||
* Note that nameless blocks are allowed and are often used with comments to allow
|
||||
* easily commenting an entire block, for example:
|
||||
* #foobar
|
||||
* {
|
||||
* moo = "cow"
|
||||
* foo = bar
|
||||
* }
|
||||
* is an entirely commented block.
|
||||
*
|
||||
* Keys are case insensitive. Values depend on what key - generally, information is
|
||||
* given in the key comment. The quoting of values (and most other syntax) is quite
|
||||
* flexible, however, please do not forget to quote your strings:
|
||||
@@ -40,11 +49,6 @@
|
||||
*
|
||||
* "86400", "86400s", "1440m", "24h", "1d"
|
||||
*
|
||||
* CAUTION:
|
||||
* Please note that your services might _CRASH_ if you add more format-
|
||||
* strings (%s, %d, etc.) to custom messages than Anope needs. Use the
|
||||
* default messages to see how many format-strings are needed.
|
||||
*
|
||||
* In the documentation for each directive, one of the following will be
|
||||
* included to indicate whether an option is required:
|
||||
*
|
||||
@@ -75,7 +79,7 @@
|
||||
/*
|
||||
* [OPTIONAL] Defines
|
||||
*
|
||||
* You can define values to other values, which can be used to easially change
|
||||
* You can define values to other values, which can be used to easily change
|
||||
* every value in the configuration. For example, use:
|
||||
*
|
||||
* define
|
||||
@@ -84,7 +88,7 @@
|
||||
* value = "ChannelServ"
|
||||
* }
|
||||
*
|
||||
* To replace every occurance of ChanServ with ChannelServ in the configuration file,
|
||||
* To replace every occurrence of ChanServ with ChannelServ in the configuration file,
|
||||
* and in every included configuration file (such as chanserv.example.conf).
|
||||
*/
|
||||
|
||||
@@ -106,19 +110,17 @@ define
|
||||
* the output from it will be included into your configuration.
|
||||
*/
|
||||
|
||||
/*
|
||||
include
|
||||
#include
|
||||
{
|
||||
type = "file"
|
||||
name = "some.conf"
|
||||
}
|
||||
|
||||
include
|
||||
#include
|
||||
{
|
||||
type = "executable"
|
||||
name = "/usr/bin/wget -q -O - http://some.misconfigured.network.com/services.conf"
|
||||
}
|
||||
*/
|
||||
|
||||
/*
|
||||
* [REQUIRED] IRCd Config
|
||||
@@ -126,6 +128,37 @@ include
|
||||
* This section is used to set up Anope to connect to your IRC network.
|
||||
* This section can be included multiple times, and Anope will attempt to
|
||||
* connect to each server until it finally connects.
|
||||
*
|
||||
* Each uplink IRCd should have a corresponding configuration to allow Services
|
||||
* to link to it.
|
||||
*
|
||||
* An example configuration for InspIRCd that is compatible with the below uplink
|
||||
* and serverinfo configuration would look like:
|
||||
*
|
||||
* <link name="services.localhost.net"
|
||||
* ipaddr="127.0.0.1"
|
||||
* port="7000"
|
||||
* sendpass="mypassword"
|
||||
* recvpass="mypassword">
|
||||
* <uline server="services.localhost.net" silent="yes">
|
||||
* <bind address="127.0.0.1" port="7000" type="servers">
|
||||
*
|
||||
* An example configuration for UnrealIRCd that is compatible with the below uplink
|
||||
* and serverinfo configuration would look like:
|
||||
*
|
||||
* link services.localhost.net
|
||||
* {
|
||||
* username *;
|
||||
* hostname *;
|
||||
* bind-ip "127.0.0.1";
|
||||
* port 7000;
|
||||
* hub *;
|
||||
* password-connect "mypassword";
|
||||
* password-receive "mypassword";
|
||||
* class servers;
|
||||
* };
|
||||
* ulines { services.localhost.net; };
|
||||
* listen 127.0.0.1:7000;
|
||||
*/
|
||||
uplink
|
||||
{
|
||||
@@ -155,7 +188,7 @@ uplink
|
||||
*
|
||||
* Refer to your IRCd documentation for how this is to be done.
|
||||
*/
|
||||
port = 6667
|
||||
port = 7000
|
||||
|
||||
/*
|
||||
* The password to send to the IRC server for authentication.
|
||||
@@ -188,7 +221,7 @@ serverinfo
|
||||
|
||||
/*
|
||||
* The local address that Services will bind to before connecting to the remote
|
||||
* server. This may be useful for multihomed hosts. If ommited, Services will let
|
||||
* server. This may be useful for multihomed hosts. If omitted, Services will let
|
||||
* the Operating System choose the local address. This directive is optional.
|
||||
*
|
||||
* If you don't know what this means or don't need to use it, just leave this
|
||||
@@ -205,13 +238,13 @@ serverinfo
|
||||
|
||||
/*
|
||||
* The filename containing the Services process ID. The path is relative to the
|
||||
* services root directory. If not given, defaults to "data/services.pid".
|
||||
* services root directory.
|
||||
*/
|
||||
pid = "data/services.pid"
|
||||
|
||||
/*
|
||||
* The filename containing the Message of the Day. The path is relative to the
|
||||
* services root directory. If not given, defaults to "conf/services.motd".
|
||||
* services root directory.
|
||||
*/
|
||||
motd = "conf/services.motd"
|
||||
}
|
||||
@@ -224,8 +257,8 @@ serverinfo
|
||||
*
|
||||
* Supported:
|
||||
* - bahamut
|
||||
* - charybdis
|
||||
* - hybrid
|
||||
* - inspircd11
|
||||
* - inspircd12
|
||||
* - inspircd20
|
||||
* - ngircd
|
||||
@@ -233,7 +266,33 @@ serverinfo
|
||||
* - ratbox
|
||||
* - unreal
|
||||
*/
|
||||
module { name = "inspircd12" }
|
||||
module
|
||||
{
|
||||
name = "inspircd20"
|
||||
|
||||
/*
|
||||
* Some protocol modules can enforce mode locks server-side. This reduces the spam caused by
|
||||
* services immediately reversing mode changes for locked modes.
|
||||
*
|
||||
* If the protocol module you have loaded does not support this, this setting will have no effect.
|
||||
*/
|
||||
use_server_side_mlock = yes
|
||||
|
||||
/*
|
||||
* Some protocol modules can enforce topic locks server-side. This reduces the spam caused by
|
||||
* services immediately reversing topic changes.
|
||||
*
|
||||
* If the protocol module you have loaded does not support this, this setting will have no effect.
|
||||
*/
|
||||
use_server_side_topiclock = yes
|
||||
|
||||
/*
|
||||
* Some IRCds allow "SASL" authentication to let users identify to Services
|
||||
* during the IRCd user registration process. If set, Services will allow
|
||||
* authenticating users through this mechanism.
|
||||
*/
|
||||
sasl = yes
|
||||
}
|
||||
|
||||
/*
|
||||
* [REQUIRED] Network Information
|
||||
@@ -251,28 +310,58 @@ networkinfo
|
||||
/*
|
||||
* Set this to the maximum allowed nick length on your network.
|
||||
* Be sure to set this correctly, as setting this wrong can result in
|
||||
* Services being disconnected from the network. This directive is optional,
|
||||
* but recommended.
|
||||
* Services being disconnected from the network.
|
||||
*/
|
||||
nicklen = 31
|
||||
|
||||
/* Set this to the maximum allowed ident length on your network.
|
||||
* Be sure to set this correctly, as setting this wrong can result in
|
||||
* Services being disconnected from the network. This directive is optional,
|
||||
* but recommended.
|
||||
* Services being disconnected from the network.
|
||||
*/
|
||||
userlen = 10
|
||||
|
||||
/* Set this to the maximum allowed hostname length on your network.
|
||||
* Be sure to set this correctly, as setting this wrong can result in
|
||||
* Services being disconnected from the network. This directive is optional,
|
||||
* but recommended.
|
||||
* Services being disconnected from the network.
|
||||
*/
|
||||
hostlen = 64
|
||||
|
||||
/* Set this to the maximum allowed channel length on your network.
|
||||
*/
|
||||
chanlen = 32
|
||||
|
||||
/* The maximum number of list modes settable on a channel (such as b, e, I).
|
||||
* Comment out or set to 0 to disable.
|
||||
*/
|
||||
modelistsize = 100
|
||||
|
||||
/*
|
||||
* The characters allowed in hostnames. This is used for validating hostnames given
|
||||
* to services, such as BotServ bot hostnames and user vhosts. Changing this is not
|
||||
* recommended unless you know for sure your IRCd supports whatever characters you are
|
||||
* wanting to use. Telling services to set a vHost containing characters your IRCd
|
||||
* disallows could potentially break the IRCd and/or Services.
|
||||
*
|
||||
* It is recommended you DON'T change this.
|
||||
*/
|
||||
vhost_chars = "abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789.-"
|
||||
|
||||
/*
|
||||
* If set to true, allows vHosts to not contain dots (.).
|
||||
* Newer IRCds generally do not have a problem with this, but the same warning as
|
||||
* vhost_chars applies.
|
||||
*
|
||||
* It is recommended you DON'T change this.
|
||||
*/
|
||||
allow_undotted_vhosts = false
|
||||
|
||||
/*
|
||||
* The characters that are not allowed to be at the very beginning or very ending
|
||||
* of a vHost. The same warning as vhost_chars applies.
|
||||
*
|
||||
* It is recommended you DON'T change this.
|
||||
*/
|
||||
disallow_start_or_end = ".-"
|
||||
}
|
||||
|
||||
/*
|
||||
@@ -321,19 +410,6 @@ options
|
||||
*/
|
||||
#seed = 9866235
|
||||
|
||||
/*
|
||||
* Allows Services to continue file write operations (i.e. database saving)
|
||||
* even if the original file cannot be backed up. Enabling this option may
|
||||
* allow Services to continue operation under conditions where it might
|
||||
* otherwise fail, such as a nearly-full disk.
|
||||
*
|
||||
* NOTE: Enabling this option can cause irrecoverable data loss under some
|
||||
* conditions, so make CERTAIN you know what you're doing when you enable it!
|
||||
*
|
||||
* This directive is optional, and you are discouraged against enabling it.
|
||||
*/
|
||||
#nobackupokay = yes
|
||||
|
||||
/*
|
||||
* If set, Services will perform more stringent checks on passwords. If this
|
||||
* isn't set, Services will only disallow a password if it is the same as the
|
||||
@@ -370,15 +446,12 @@ options
|
||||
badpasstimeout = 1h
|
||||
|
||||
/*
|
||||
* Sets the delay between automatic database updates. This time is reset by
|
||||
* the OperServ UPDATE command.
|
||||
* Sets the delay between automatic database updates.
|
||||
*/
|
||||
updatetimeout = 5m
|
||||
|
||||
/*
|
||||
* Sets the delay between checks for expired nicknames and channels. The
|
||||
* OperServ UPDATE command will also cause a check for expiration and reset
|
||||
* this timer.
|
||||
* Sets the delay between checks for expired nicknames and channels.
|
||||
*/
|
||||
expiretimeout = 30m
|
||||
|
||||
@@ -400,40 +473,14 @@ options
|
||||
* will use doing this. Higher values will cause less accurate timing but
|
||||
* less CPU usage.
|
||||
*
|
||||
* This shouldn't be set any higher than 10 seconds, and 1 second is best
|
||||
* if your system is powerful enough (or your network small enough) to
|
||||
* handle it. 0 will cause the timeout list to be checked every time
|
||||
* through the main loop, which will probably slow down Services too much
|
||||
* to be useful on most networks.
|
||||
*
|
||||
* Note that this value is not an absolute limit on the period between
|
||||
* checks of the timeout list; the previous may be as great as readtimeout
|
||||
* (above) during periods of inactivity.
|
||||
*
|
||||
* If this directive is not given, it will default to 0. See the 2nd paragraph
|
||||
* above for performance impacts if you do this.
|
||||
* If this directive is not given, it will default to 0.
|
||||
*/
|
||||
timeoutcheck = 3s
|
||||
|
||||
/*
|
||||
* Sets the number of days backups of databases are kept. If you don't give it,
|
||||
* or if you set it to 0, Services won't backup the databases.
|
||||
*
|
||||
* NOTE: Services must run 24 hours a day for this feature to work.
|
||||
*
|
||||
* This directive is optional, but recommended.
|
||||
*/
|
||||
keepbackups = 3
|
||||
|
||||
/*
|
||||
* If set, Services will require a reason when a FORBID is added, else the
|
||||
* reason is optional. This directive also applies to SUSPENDed channels as
|
||||
* well.
|
||||
*
|
||||
* This directive is optional.
|
||||
*/
|
||||
forceforbidreason = yes
|
||||
|
||||
/*
|
||||
* If set, this will allow users to let Services send PRIVMSGs to them
|
||||
* instead of NOTICEs. Also see the defmsg option of nickserv:defaults,
|
||||
@@ -452,9 +499,7 @@ options
|
||||
* Nick@ServerName - e.g. NickServ@localhost.net. This should be used in
|
||||
* conjunction with IRCd aliases. This directive is optional.
|
||||
*
|
||||
* When using Bahamut, this option will NOT work if the uplink server is
|
||||
* configured as a services hub. The serviceshub option is not designed to
|
||||
* be used with Anope.
|
||||
* This option will have no effect on some IRCds, such as TS6 IRCds.
|
||||
*/
|
||||
#usestrictprivmsg = yes
|
||||
|
||||
@@ -464,35 +509,6 @@ options
|
||||
*/
|
||||
#hidestatso = yes
|
||||
|
||||
/*
|
||||
* Prevents users from registering their nick if they are not connected
|
||||
* for at least the given number of seconds.
|
||||
*
|
||||
* This directive is optional.
|
||||
*/
|
||||
#nickregdelay = 30
|
||||
|
||||
/*
|
||||
* If set, forbids the registration of nicks that contain an existing
|
||||
* nick with Services access. For example, if Tester is a Services Oper,
|
||||
* you can't register NewTester or Tester123 unless you are an IRC
|
||||
* Operator.
|
||||
*
|
||||
* NOTE: If you enable this, you will have to be logged in as an IRC
|
||||
* operator in order to register a Services Root nick when setting up
|
||||
* Anope for the first time.
|
||||
*
|
||||
* This directive is optional.
|
||||
*/
|
||||
#restrictopernicks = yes
|
||||
|
||||
/*
|
||||
* The number of LOGON/OPER news items to display when a user logs on.
|
||||
*
|
||||
* This directive is optional, if no set it will default to 3.
|
||||
*/
|
||||
#newscount = 3
|
||||
|
||||
/*
|
||||
* A space-separated list of ulined servers on your network, it is assumed that
|
||||
* the servers in this list are allowed to set channel modes and Services will
|
||||
@@ -505,16 +521,9 @@ options
|
||||
#ulineservers = "stats.your.network"
|
||||
|
||||
/*
|
||||
* Modes to set on service bots when they join channels, comment this out for no modes
|
||||
*
|
||||
* This directive is optional.
|
||||
* How long to wait between connection retries with the uplink(s).
|
||||
*/
|
||||
botmodes = "ao"
|
||||
|
||||
/*
|
||||
* How long to wait between connection retries, in seconds.
|
||||
*/
|
||||
retrywait = 60
|
||||
retrywait = 60s
|
||||
|
||||
/*
|
||||
* If set, Services will hide commands that users don't have the privileges to execute
|
||||
@@ -533,6 +542,39 @@ options
|
||||
* Note for this to work the regex module providing the regex engine must be loaded.
|
||||
*/
|
||||
regexengine = "regex/pcre"
|
||||
|
||||
/*
|
||||
* A list of languages to load on startup that will be available in /nickserv set language.
|
||||
* Useful if you translate Anope to your language. (Explained further in docs/LANGUAGE).
|
||||
* Note that english should not be listed here because it is the base language.
|
||||
*
|
||||
* Removing .UTF-8 will instead use the default encoding for the language, eg. iso-8859-1 for western European languages.
|
||||
*/
|
||||
languages = "ca_ES.UTF-8 de_DE.UTF-8 el_GR.UTF-8 es_ES.UTF-8 fr_FR.UTF-8 hu_HU.UTF-8 it_IT.UTF-8 nl_NL.UTF-8 pl_PL.UTF-8 pt_PT.UTF-8 ru_RU.UTF-8 tr_TR.UTF-8"
|
||||
|
||||
/*
|
||||
* Default language that non- and newly-registered nicks will receive messages in.
|
||||
* Leave empty to default to English.
|
||||
*/
|
||||
#defaultlanguage = "es_ES.UTF-8"
|
||||
|
||||
/*
|
||||
* The username, and possibly hostname, used for fake users created when Services needs to
|
||||
* hold a nickname.
|
||||
*/
|
||||
enforceruser = "enforcer"
|
||||
enforcerhost = "localhost.net"
|
||||
|
||||
/*
|
||||
* The length of time Services hold nicknames.
|
||||
*/
|
||||
releasetimeout = 1m
|
||||
|
||||
/*
|
||||
* When a user's nick is forcibly changed to enforce a "nick kill", their new nick will start
|
||||
* with this value. The rest will be made up of 6 or 7 digits.
|
||||
*/
|
||||
guestnickprefix = "Guest"
|
||||
}
|
||||
|
||||
/*
|
||||
@@ -603,7 +645,7 @@ include
|
||||
/*
|
||||
* [OPTIONAL] NickServ
|
||||
*
|
||||
* Includes memoserv.example.conf, which is necessary for NickServ functionality.
|
||||
* Includes nickserv.example.conf, which is necessary for NickServ functionality.
|
||||
*
|
||||
* Remove this block to disable NickServ.
|
||||
*/
|
||||
@@ -657,6 +699,12 @@ log
|
||||
*/
|
||||
#source = ""
|
||||
|
||||
/*
|
||||
* The bot used to log generic messages which have no predefined sender if there
|
||||
* is a channel in the target directive.
|
||||
*/
|
||||
bot = "Global"
|
||||
|
||||
/*
|
||||
* The number of days to keep logfiles, only useful if you are logging to a file.
|
||||
* Set to 0 to never delete old logfiles.
|
||||
@@ -700,7 +748,7 @@ log
|
||||
* Note that modules may add their own values to these options.
|
||||
*/
|
||||
admin = "operserv/*"
|
||||
override = "chanserv/* nickserv/* memoserv/set botserv/* ~botserv/set"
|
||||
override = "chanserv/* nickserv/* memoserv/set ~botserv/set botserv/*"
|
||||
commands = "~operserv/* *"
|
||||
servers = "*"
|
||||
#channels = "~mode *"
|
||||
@@ -716,7 +764,7 @@ log
|
||||
log
|
||||
{
|
||||
target = "globops"
|
||||
admin = "global/* operserv/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/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/*"
|
||||
@@ -737,15 +785,16 @@ log
|
||||
*
|
||||
* Available privileges:
|
||||
* botserv/administration - Can view and assign private BotServ bots
|
||||
* chanserv/administration - Can modify the settings of any channel (including changing of the owner!)
|
||||
* chanserv/access/modify - Can modify channel access and akick lists, and use /chanserv enforce
|
||||
* chanserv/auspex - Can see any information with /chanserv info
|
||||
* chanserv/no-register-limit - May register an unlimited number of channels and nicknames
|
||||
* chanserv/set - Can modify the settings of any channel (incl. changing of the owner!)
|
||||
* chanserv/kick - Can kick and ban users from channels through ChanServ
|
||||
* memoserv/info - Can see any information with /memoserv info
|
||||
* memoserv/set-limit - Can set the limit of max stored memos on any user and channel
|
||||
* memoserv/no-limit - Can send memos through limits and throttles
|
||||
* nickserv/access - Can modify other users access list
|
||||
* nickserv/alist - Can see the access list of other users
|
||||
* nickserv/access - Can modify other users access and certificate lists
|
||||
* nickserv/alist - Can see the channel access list of other users
|
||||
* nickserv/auspex - Can see any information with /nickserv info
|
||||
* nickserv/confirm - Can confirm other users nicknames
|
||||
* nickserv/drop - Can drop other users nicks
|
||||
@@ -757,7 +806,7 @@ log
|
||||
* chanserv/access/list chanserv/drop chanserv/getkey chanserv/invite
|
||||
* chanserv/list chanserv/suspend chanserv/topic
|
||||
*
|
||||
* chanserv/saset/bantype chanserv/saset/description chanserv/saset/email
|
||||
* chanserv/saset/bantype chanserv/saset/description chanserv/saset/email chanserv/saset/keepmodes
|
||||
* chanserv/saset/founder chanserv/saset/keeptopic chanserv/saset/restricted
|
||||
* chanserv/saset/peace chanserv/saset/persist chanserv/saset/private
|
||||
* chanserv/saset/secure chanserv/saset/securefounder chanserv/saset/secureops
|
||||
@@ -766,12 +815,13 @@ log
|
||||
*
|
||||
* memoserv/sendall memoserv/staff
|
||||
*
|
||||
* nickserv/getpass nickserv/getemail nickserv/suspend
|
||||
* nickserv/resetpass nickserv/release nickserv/list
|
||||
* nickserv/getpass nickserv/getemail nickserv/suspend nickserv/ajoin
|
||||
* nickserv/resetpass nickserv/list
|
||||
*
|
||||
* nickserv/saset/autoop nickserv/saset/email nickserv/saset/greet nickserv/saset/password
|
||||
* nickserv/saset/display nickserv/saset/kill nickserv/saset/language nickserv/saset/message
|
||||
* nickserv/saset/private nickserv/saset/secure nickserv/saset/url nickserv/saset/noexpire
|
||||
* nickserv/saset/autoop nickserv/saset/email nickserv/saset/greet nickserv/saset/password
|
||||
* nickserv/saset/display nickserv/saset/kill nickserv/saset/language nickserv/saset/message
|
||||
* nickserv/saset/private nickserv/saset/secure nickserv/saset/url nickserv/saset/noexpire
|
||||
* nickserv/saset/keepmodes
|
||||
*
|
||||
* hostserv/set hostserv/del hostserv/list
|
||||
*
|
||||
@@ -780,7 +830,7 @@ log
|
||||
* operserv/news operserv/stats operserv/kick operserv/exception operserv/seen
|
||||
* operserv/mode operserv/session operserv/modinfo operserv/ignore operserv/chanlist
|
||||
* operserv/chankill operserv/akill operserv/sqline operserv/snline operserv/userlist
|
||||
* operserv/global operserv/oper operserv/config operserv/umode operserv/logsearch
|
||||
* operserv/oper operserv/config operserv/umode operserv/logsearch
|
||||
* operserv/modload operserv/jupe operserv/set operserv/noop
|
||||
* operserv/quit operserv/update operserv/reload operserv/restart
|
||||
* operserv/shutdown operserv/svs operserv/oline operserv/kill
|
||||
@@ -834,7 +884,7 @@ opertype
|
||||
|
||||
inherits = "Services Operator"
|
||||
|
||||
commands = "chanserv/access/list chanserv/drop chanserv/getkey chanserv/saset/noexpire memoserv/sendall nickserv/saset/* nickserv/getemail operserv/news operserv/jupe operserv/svs operserv/stats operserv/oline operserv/noop operserv/forbid global/* operserv/global"
|
||||
commands = "chanserv/access/list chanserv/drop chanserv/getkey chanserv/saset/noexpire memoserv/sendall nickserv/saset/* nickserv/getemail operserv/news operserv/jupe operserv/svs operserv/stats operserv/oline operserv/noop operserv/forbid global/*"
|
||||
|
||||
privs = "*"
|
||||
}
|
||||
@@ -858,7 +908,7 @@ opertype
|
||||
* As with all permissions, make sure to only give trustworthy people access to Services.
|
||||
*/
|
||||
|
||||
oper
|
||||
#oper
|
||||
{
|
||||
/* The nickname of this services oper */
|
||||
#name = "nick1"
|
||||
@@ -886,19 +936,17 @@ oper
|
||||
#vhost = "oper.mynet"
|
||||
}
|
||||
|
||||
/*
|
||||
oper
|
||||
#oper
|
||||
{
|
||||
name = "nick2"
|
||||
type = "Services Administrator"
|
||||
}
|
||||
|
||||
oper
|
||||
#oper
|
||||
{
|
||||
name = "nick3"
|
||||
type = "Helper"
|
||||
}
|
||||
*/
|
||||
|
||||
/*
|
||||
* [OPTIONAL] Mail Config
|
||||
@@ -916,8 +964,8 @@ mail
|
||||
/*
|
||||
* If set, this option enables the mail commands in Services. You may choose
|
||||
* to disable it if you have no Sendmail-compatible mailer installed. Whilst
|
||||
* this directive (and entire block) is optional, it is required if the
|
||||
* nickserv:emailregistration is set to yes.
|
||||
* this directive (and entire block) is optional, it is required if
|
||||
* nickserv:registration is set to yes.
|
||||
*/
|
||||
usemail = yes
|
||||
|
||||
@@ -1041,9 +1089,10 @@ mail
|
||||
* You should only use this to upgrade old databases to a newer database format by loading
|
||||
* other database modules in addition to this one, which will be used when saving databases.
|
||||
*/
|
||||
#module { name = "db_old" }
|
||||
db_old
|
||||
#module
|
||||
{
|
||||
name = "db_old"
|
||||
|
||||
/*
|
||||
* This is the encryption type used by the databases. This must be set correctly or
|
||||
* your passwords will not work. Valid options are: md5, oldmd5, sha1, and plain.
|
||||
@@ -1055,13 +1104,15 @@ db_old
|
||||
* [DEPRECATED] db_plain
|
||||
*
|
||||
* This is the flatfile database format from Anope-1.9.2 to Anope-1.9.5.
|
||||
* This module only loads this database, and will NOT save it.
|
||||
* To convert from this format, load both this and db_flatfile. Be sure to name db_flatfile's
|
||||
* target database to something else. Start Anope then shut down so the new database will be written.
|
||||
* Then unload this and restart Anope, loading from the new database.
|
||||
*/
|
||||
#module { name = "db_plain" }
|
||||
db_plain
|
||||
#module
|
||||
{
|
||||
name = "db_plain"
|
||||
|
||||
/*
|
||||
* The database name db_plain should use
|
||||
*/
|
||||
@@ -1069,52 +1120,76 @@ db_plain
|
||||
}
|
||||
|
||||
/*
|
||||
* db_flatfile
|
||||
* [RECOMMENDED] db_flatfile
|
||||
*
|
||||
* This is the default flatfile database format.
|
||||
*/
|
||||
module { name = "db_flatfile" }
|
||||
db_flatfile
|
||||
module
|
||||
{
|
||||
name = "db_flatfile"
|
||||
|
||||
/*
|
||||
* The database name db_flatfile should use
|
||||
*/
|
||||
database = "anope.db"
|
||||
|
||||
/*
|
||||
* Sets the number of days backups of databases are kept. If you don't give it,
|
||||
* or if you set it to 0, Services won't backup the databases.
|
||||
*
|
||||
* NOTE: Services must run 24 hours a day for this feature to work.
|
||||
*
|
||||
* This directive is optional, but recommended.
|
||||
*/
|
||||
keepbackups = 3
|
||||
|
||||
/*
|
||||
* Allows Services to continue file write operations (i.e. database saving)
|
||||
* even if the original file cannot be backed up. Enabling this option may
|
||||
* allow Services to continue operation under conditions where it might
|
||||
* otherwise fail, such as a nearly-full disk.
|
||||
*
|
||||
* NOTE: Enabling this option can cause irrecoverable data loss under some
|
||||
* conditions, so make CERTAIN you know what you're doing when you enable it!
|
||||
*
|
||||
* This directive is optional, and you are discouraged against enabling it.
|
||||
*/
|
||||
#nobackupokay = yes
|
||||
|
||||
/*
|
||||
* If enabled, services will fork a child process to save databases.
|
||||
*
|
||||
* This is only useful with very large databases, with hundreds
|
||||
* of thousands of objects, that have a noticeable delay from
|
||||
* writing databases.
|
||||
*
|
||||
* If your database is large enough cause a noticeable delay when
|
||||
* saving you should consider a more powerful alternative such
|
||||
* as db_sql or db_redis, which incrementally update their
|
||||
* databases asynchronously in real time.
|
||||
*/
|
||||
fork = no
|
||||
}
|
||||
|
||||
/*
|
||||
* db_sql
|
||||
* db_sql and db_sql_live
|
||||
*
|
||||
* This module allows saving and loading databases using one of the SQL engines.
|
||||
* db_sql module allows saving and loading databases using one of the SQL engines.
|
||||
* This module loads the databases once on startup, then incrementally updates
|
||||
* objects in the database as they are changed within Anope in real time. Changes
|
||||
* to the SQL tables not done by Anope will have no effect and will be overwritten.
|
||||
*
|
||||
*/
|
||||
#module { name = "db_sql" }
|
||||
|
||||
/*
|
||||
* db_sql_live
|
||||
*
|
||||
* This module allows saving and loading databases using one of the SQL engines.
|
||||
* db_sql_live module allows saving and loading databases using one of the SQL engines.
|
||||
* This module reads and writes to SQL in real time. Changes to the SQL tables
|
||||
* will be immediately reflected into Anope. This module should not be loaded
|
||||
* in conjunction with db_sql, except during the initial import of existing
|
||||
* databases to SQL.
|
||||
* in conjunction with db_sql.
|
||||
*
|
||||
*/
|
||||
#module { name = "db_sql_live" }
|
||||
|
||||
db_sql
|
||||
#module
|
||||
{
|
||||
name = "db_sql"
|
||||
#name = "db_sql_live"
|
||||
|
||||
/*
|
||||
* The SQL service db_sql(_live) should use, these are configured in modules.conf.
|
||||
* For MySQL, this should probably be mysql/main.
|
||||
@@ -1126,6 +1201,39 @@ db_sql
|
||||
* Do not use the same prefix for other programs.
|
||||
*/
|
||||
#prefix = "anope_db_"
|
||||
|
||||
/* Whether or not to import data from another database module in to SQL on startup.
|
||||
* If you enable this, be sure that the database services is configured to use is
|
||||
* empty and that another database module to import from is loaded before db_sql.
|
||||
* After you enable this and do a database import you should disable it for
|
||||
* subsequent restarts.
|
||||
*
|
||||
* Note that you can not import databases using db_sql_live. If you want to import
|
||||
* databases and use db_sql_live you should import them using db_sql, then shut down
|
||||
* and start services with db_sql_live.
|
||||
*/
|
||||
import = false
|
||||
}
|
||||
|
||||
/*
|
||||
* db_redis.
|
||||
*
|
||||
* This module allows using Redis (http://redis.io) as a database backend.
|
||||
* This module requires that m_redis is loaded and configured properly.
|
||||
*
|
||||
* Redis 2.8 supports keyspace notifications which allows Redis to push notifications
|
||||
* to Anope about outside modifications to the database. This module supports this and
|
||||
* will internally reflect any changes made to the database immediately once notified.
|
||||
* See docs/REDIS for more information regarding this.
|
||||
*/
|
||||
#module
|
||||
{
|
||||
name = "db_redis"
|
||||
|
||||
/*
|
||||
* Redis database to use. This must be configured with m_redis.
|
||||
*/
|
||||
engine = "redis/main"
|
||||
}
|
||||
|
||||
/*
|
||||
@@ -1191,7 +1299,7 @@ include
|
||||
* Requires a MySQL Database.
|
||||
*/
|
||||
#include
|
||||
#{
|
||||
# type = "file"
|
||||
# name = "chanstats.example.conf"
|
||||
#}
|
||||
{
|
||||
type = "file"
|
||||
name = "chanstats.example.conf"
|
||||
}
|
||||
|
||||
+12
-21
@@ -56,38 +56,30 @@ service
|
||||
*
|
||||
* Provides essential functionality for Global.
|
||||
*/
|
||||
module { name = "global" }
|
||||
|
||||
/*
|
||||
* Configuration for Global provided by gl_main.
|
||||
*/
|
||||
global
|
||||
module
|
||||
{
|
||||
name = "global"
|
||||
|
||||
/*
|
||||
* The name of the client that should be Global.
|
||||
*/
|
||||
name = "Global"
|
||||
|
||||
/*
|
||||
* If set, Services will send global messages on starting up and shutting
|
||||
* down/restarting.
|
||||
*
|
||||
* This directive is optional.
|
||||
*/
|
||||
#globaloncycle = yes
|
||||
client = "Global"
|
||||
|
||||
/*
|
||||
* This is the global message that will be sent when Services are being
|
||||
* shutdown/restarted. This directive is only required if you enable
|
||||
* globaloncycle above.
|
||||
* shutdown/restarted.
|
||||
*
|
||||
* This directive is optional.
|
||||
*/
|
||||
globaloncycledown = "Services are restarting, they will be back shortly - please be good while we're gone"
|
||||
#globaloncycledown = "Services are restarting, they will be back shortly - please be good while we're gone"
|
||||
|
||||
/*
|
||||
* This is the global message that will be sent when Services (re)join the
|
||||
* network. This directive is only required if you enable globaloncycle above.
|
||||
* network.
|
||||
*
|
||||
* This directive is optional.
|
||||
*/
|
||||
globaloncycleup = "Services are now back online - have a nice day"
|
||||
#globaloncycleup = "Services are now back online - have a nice day"
|
||||
|
||||
/*
|
||||
* If set, Services will hide the IRC Operator's nick in a global
|
||||
@@ -120,5 +112,4 @@ command { service = "Global"; name = "HELP"; command = "generic/help"; }
|
||||
* Used for sending a message to every online user.
|
||||
*/
|
||||
module { name = "gl_global" }
|
||||
command { service = "OperServ"; name = "GLOBAL"; command = "global/global"; permission = "operserv/global"; }
|
||||
command { service = "Global"; name = "GLOBAL"; command = "global/global"; permission = "global/global"; }
|
||||
|
||||
+13
-38
@@ -56,45 +56,19 @@ service
|
||||
*
|
||||
* Provides essential functionality for HostServ.
|
||||
*/
|
||||
module { name = "hostserv" }
|
||||
|
||||
/*
|
||||
* Configuration for HostServ provided by hs_main.
|
||||
*/
|
||||
hostserv
|
||||
module
|
||||
{
|
||||
name = "hostserv"
|
||||
|
||||
/*
|
||||
* The name of the client that should be HostServ.
|
||||
*/
|
||||
name = "HostServ"
|
||||
client = "HostServ"
|
||||
|
||||
/*
|
||||
* The characters allowed in a vHost. Changing this is not recommended unless
|
||||
* you know for sure your IRCd supports whatever characters you are wanting to use.
|
||||
* Telling services to set a vHost containing characters your IRCd disallows could
|
||||
* potentially break the IRCd and/or Services. Note these are 1 byte characters, so
|
||||
* UTF-8 characters will not work.
|
||||
*
|
||||
* It is recommended you DON'T change this.
|
||||
* If enabled, vhosts are activated on users immediately when they are set.
|
||||
*/
|
||||
vhost_chars = "abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789.-"
|
||||
|
||||
/*
|
||||
* If set to true, allows vHosts to not contain dots (.).
|
||||
* Newer IRCds generally do not have a problem with this, but the same warning as
|
||||
* vhost_chars applies.
|
||||
*
|
||||
* It is recommended you DON'T change this.
|
||||
*/
|
||||
allow_undotted_vhosts = false
|
||||
|
||||
/*
|
||||
* The characters that are not allowed to be at the very beginning or very ending
|
||||
* of a vHost. The same warning as vhost_chars applies.
|
||||
*
|
||||
* It is recommended you DON'T change this.
|
||||
*/
|
||||
disallow_start_or_end = ".-"
|
||||
activate_on_set = false
|
||||
}
|
||||
|
||||
/*
|
||||
@@ -169,13 +143,10 @@ command { service = "HostServ"; name = "ON"; command = "hostserv/on"; }
|
||||
*
|
||||
* Used to manage vHosts requested by users.
|
||||
*/
|
||||
module { name = "hs_request" }
|
||||
command { service = "HostServ"; name = "REQUEST"; command = "hostserv/request"; }
|
||||
command { service = "HostServ"; name = "ACTIVATE"; command = "hostserv/activate"; permission = "hostserv/set"; }
|
||||
command { service = "HostServ"; name = "REJECT"; command = "hostserv/reject"; permission = "hostserv/set"; }
|
||||
command { service = "HostServ"; name = "WAITING"; command = "hostserv/waiting"; permission = "hostserv/set"; }
|
||||
hs_request
|
||||
module
|
||||
{
|
||||
name = "hs_request"
|
||||
|
||||
/*
|
||||
* If set, Services will send a memo to the user requesting a vHost when it's been
|
||||
* approved or rejected.
|
||||
@@ -187,6 +158,10 @@ hs_request
|
||||
*/
|
||||
#memooper = yes
|
||||
}
|
||||
command { service = "HostServ"; name = "REQUEST"; command = "hostserv/request"; }
|
||||
command { service = "HostServ"; name = "ACTIVATE"; command = "hostserv/activate"; permission = "hostserv/set"; }
|
||||
command { service = "HostServ"; name = "REJECT"; command = "hostserv/reject"; permission = "hostserv/set"; }
|
||||
command { service = "HostServ"; name = "WAITING"; command = "hostserv/waiting"; permission = "hostserv/set"; }
|
||||
|
||||
/*
|
||||
* hs_set
|
||||
|
||||
+14
-18
@@ -56,18 +56,14 @@ service
|
||||
*
|
||||
* Provides essential functionality for MemoServ.
|
||||
*/
|
||||
module { name = "memoserv" }
|
||||
|
||||
/*
|
||||
* Configuration for MemoServ provided by ms_main.
|
||||
*/
|
||||
memoserv
|
||||
module
|
||||
{
|
||||
name = "memoserv"
|
||||
/*
|
||||
* The name of the client that should be MemoServ. Clients are configured
|
||||
* with the service blocks.
|
||||
*/
|
||||
name = "MemoServ"
|
||||
client = "MemoServ"
|
||||
|
||||
/*
|
||||
* The maximum number of memos a user is allowed to keep by default. Normal users may set the
|
||||
@@ -88,16 +84,6 @@ memoserv
|
||||
* This directive is optional, but recommended.
|
||||
*/
|
||||
senddelay = 3s
|
||||
|
||||
/*
|
||||
* Allow the use of memo receipts for the following groups:
|
||||
*
|
||||
* 1 - Opers Only
|
||||
* 2 - Everybody
|
||||
*
|
||||
* This directive is optional.
|
||||
*/
|
||||
#memoreceipt = 1
|
||||
}
|
||||
|
||||
/*
|
||||
@@ -193,7 +179,17 @@ command { service = "MemoServ"; name = "READ"; command = "memoserv/read"; }
|
||||
*
|
||||
* Requires configuring memoserv:memoreceipt.
|
||||
*/
|
||||
#module { name = "ms_rsend" }
|
||||
#module
|
||||
{
|
||||
name = "ms_rsend"
|
||||
|
||||
/*
|
||||
* Only allow Services Operators to use ms_rsend.
|
||||
*
|
||||
* This directive is optional.
|
||||
*/
|
||||
operonly = false
|
||||
}
|
||||
#command { service = "MemoServ"; name = "RSEND"; command = "memoserv/rsend"; }
|
||||
|
||||
/*
|
||||
|
||||
+229
-157
@@ -21,9 +21,10 @@ module { name = "help" }
|
||||
* Adds support for the DNS protocol. By itself this module does nothing useful,
|
||||
* but other modules such as m_dnsbl and os_dns require this.
|
||||
*/
|
||||
#module { name = "m_dns" }
|
||||
dns
|
||||
#module
|
||||
{
|
||||
name = "m_dns"
|
||||
|
||||
/*
|
||||
* The nameserver to use for resolving hostnames, must be an IP or a resolver configuration file.
|
||||
* The below should work fine on all unix like systems. Windows users will have to find their nameservers
|
||||
@@ -65,6 +66,14 @@ dns
|
||||
* if you want your records to be updated without much delay.
|
||||
*/
|
||||
refresh = 3600
|
||||
|
||||
/* A notify block. There should probably be one per nameserver listed in 'nameservers'.
|
||||
*/
|
||||
notify
|
||||
{
|
||||
ip = "192.0.2.0"
|
||||
port = 53
|
||||
}
|
||||
}
|
||||
|
||||
/*
|
||||
@@ -74,9 +83,10 @@ dns
|
||||
* is found on the blacklist they will be immediately banned. This is a crucial module
|
||||
* to prevent bot attacks.
|
||||
*/
|
||||
#module { name = "m_dnsbl" }
|
||||
m_dnsbl
|
||||
#module
|
||||
{
|
||||
name = "m_dnsbl"
|
||||
|
||||
/*
|
||||
* If set, Services will check clients against the DNSBLs when services connect to its uplink.
|
||||
* This is not recommended, and on large networks will open a very large amount of DNS queries.
|
||||
@@ -96,39 +106,41 @@ m_dnsbl
|
||||
* a timed G/K-line to the IRCd and forgets about it. Can be useful if your akill list is being fill up by bots.
|
||||
*/
|
||||
add_to_akill = yes
|
||||
}
|
||||
blacklist
|
||||
{
|
||||
/* Name of the blacklist. */
|
||||
name = "rbl.efnetrbl.org"
|
||||
|
||||
/* How long to set the ban for. */
|
||||
time = 4h
|
||||
blacklist
|
||||
{
|
||||
/* Name of the blacklist. */
|
||||
name = "rbl.efnetrbl.org"
|
||||
|
||||
/* Reason for akill.
|
||||
* %n is the nick of the user
|
||||
* %u is the ident/username of the user
|
||||
* %g is the realname of the user
|
||||
* %h is the hostname of the user
|
||||
* %i is the IP of the user
|
||||
* %r is the reason (configured below). Will be nothing if not configured.
|
||||
* %N is the network name set in networkinfo:networkname
|
||||
*/
|
||||
reason = "You are listed in the efnet RBL, visit http://rbl.efnetrbl.org/?i=%i for info"
|
||||
/* How long to set the ban for. */
|
||||
time = 4h
|
||||
|
||||
/* Replies to ban and their reason. If this is totally ommited all replies get banned. */
|
||||
1 = "Open Proxy"
|
||||
/* Don't ban for result 2 or 3 */
|
||||
#2 = "spamtrap666"
|
||||
#3 = "spamtrap50"
|
||||
4 = "TOR"
|
||||
5 = "Drones / Flooding"
|
||||
}
|
||||
blacklist
|
||||
{
|
||||
name = "dnsbl.dronebl.org"
|
||||
time = 4h
|
||||
reason = "You have a host listed in the DroneBL. For more information, visit http://dronebl.org/lookup_branded.do?ip=%i&network=%N"
|
||||
/* Reason for akill.
|
||||
* %n is the nick of the user
|
||||
* %u is the ident/username of the user
|
||||
* %g is the realname of the user
|
||||
* %h is the hostname of the user
|
||||
* %i is the IP of the user
|
||||
* %r is the reason (configured below). Will be nothing if not configured.
|
||||
* %N is the network name set in networkinfo:networkname
|
||||
*/
|
||||
reason = "You are listed in the efnet RBL, visit http://rbl.efnetrbl.org/?i=%i for info"
|
||||
|
||||
/* Replies to ban and their reason. If this is totally omitted all replies get banned. */
|
||||
1 = "Open Proxy"
|
||||
/* Don't ban for result 2 or 3 */
|
||||
#2 = "spamtrap666"
|
||||
#3 = "spamtrap50"
|
||||
4 = "TOR"
|
||||
5 = "Drones / Flooding"
|
||||
}
|
||||
|
||||
blacklist
|
||||
{
|
||||
name = "dnsbl.dronebl.org"
|
||||
time = 4h
|
||||
reason = "You have a host listed in the DroneBL. For more information, visit http://dronebl.org/lookup_branded?ip=%i&network=%N"
|
||||
}
|
||||
}
|
||||
|
||||
/*
|
||||
@@ -136,9 +148,10 @@ blacklist
|
||||
*
|
||||
* Gives users who are op in the specified help channel usermode +h (helpop).
|
||||
*/
|
||||
#module { name = "m_helpchan" }
|
||||
m_helpchan
|
||||
#module
|
||||
{
|
||||
name = "m_helpchan"
|
||||
|
||||
helpchannel = "#help"
|
||||
}
|
||||
|
||||
@@ -150,33 +163,37 @@ m_helpchan
|
||||
* Note that using this will allow users to get the IP of your services.
|
||||
* To prevent this we recommend using a reverse proxy or a tunnel.
|
||||
*/
|
||||
#module { name = "m_httpd" }
|
||||
httpd
|
||||
#module
|
||||
{
|
||||
/* Name of this service. */
|
||||
name = "httpd/main"
|
||||
name = "m_httpd"
|
||||
|
||||
/* IP to listen on. */
|
||||
ip = "0.0.0.0"
|
||||
httpd
|
||||
{
|
||||
/* Name of this service. */
|
||||
name = "httpd/main"
|
||||
|
||||
/* Port to listen on. */
|
||||
port = 8080
|
||||
/* IP to listen on. */
|
||||
ip = "0.0.0.0"
|
||||
|
||||
/* Time before connections to this server are timed out. */
|
||||
timeout = 30
|
||||
/* Port to listen on. */
|
||||
port = 8080
|
||||
|
||||
/* Listen using SSL. Requires m_ssl. */
|
||||
#ssl = yes
|
||||
/* Time before connections to this server are timed out. */
|
||||
timeout = 30
|
||||
|
||||
/* If you are using a reverse proxy that sends one of the
|
||||
* extforward_headers set below, set this to its IP.
|
||||
* This allows services to obtain the real IP of users by
|
||||
* reading the forwarded-for HTTP header.
|
||||
*/
|
||||
#extforward_ip = "192.168.0.255"
|
||||
/* Listen using SSL. Requires m_ssl. */
|
||||
#ssl = yes
|
||||
|
||||
/* The header to look for. These probably work as is. */
|
||||
extforward_header = "X-Forwarded-For Forwarded-For"
|
||||
/* If you are using a reverse proxy that sends one of the
|
||||
* extforward_headers set below, set this to its IP.
|
||||
* This allows services to obtain the real IP of users by
|
||||
* reading the forwarded-for HTTP header.
|
||||
*/
|
||||
#extforward_ip = "192.168.0.255"
|
||||
|
||||
/* The header to look for. These probably work as is. */
|
||||
extforward_header = "X-Forwarded-For Forwarded-For"
|
||||
}
|
||||
}
|
||||
|
||||
/*
|
||||
@@ -184,17 +201,21 @@ httpd
|
||||
*
|
||||
* This module allows other modules to use LDAP. By itself, this module does nothing useful.
|
||||
*/
|
||||
#module { name = "m_ldap" }
|
||||
ldap
|
||||
#module
|
||||
{
|
||||
server = "ldap://127.0.0.1"
|
||||
port = 389
|
||||
name = "m_ldap"
|
||||
|
||||
/*
|
||||
* Admin credentials used for performing searches and adding users.
|
||||
*/
|
||||
admin_binddn = "cn=Manager,dc=anope,dc=org"
|
||||
admin_password = "secret"
|
||||
ldap
|
||||
{
|
||||
server = "ldap://127.0.0.1"
|
||||
port = 389
|
||||
|
||||
/*
|
||||
* Admin credentials used for performing searches and adding users.
|
||||
*/
|
||||
admin_binddn = "cn=Manager,dc=anope,dc=org"
|
||||
admin_password = "secret"
|
||||
}
|
||||
}
|
||||
|
||||
/*
|
||||
@@ -203,9 +224,10 @@ ldap
|
||||
* This module allows many commands such as IDENTIFY, RELEASE, RECOVER, GHOST, etc. use
|
||||
* LDAP to authenticate users. Requires m_ldap.
|
||||
*/
|
||||
#module { name = "m_ldap_authentication" }
|
||||
m_ldap_authentication
|
||||
#module
|
||||
{
|
||||
name = "m_ldap_authentication"
|
||||
|
||||
/*
|
||||
* The distinguished name used for searching for users's accounts.
|
||||
*/
|
||||
@@ -220,7 +242,7 @@ m_ldap_authentication
|
||||
|
||||
/*
|
||||
* The object class used by LDAP to store user account information.
|
||||
* Used for adding new users to LDAP if disable_ns_register is false.
|
||||
* This is used for adding new users to LDAP if registration is allowed.
|
||||
*/
|
||||
object_class = "anopeUser"
|
||||
|
||||
@@ -242,15 +264,16 @@ m_ldap_authentication
|
||||
password_attribute = "userPassword"
|
||||
|
||||
/*
|
||||
* Enable this to have this module disable "/msg NickServ REGISTER".
|
||||
* If set, the reason to give the users who try to "/msg NickServ REGISTER".
|
||||
* If not set, then registration is not blocked.
|
||||
*/
|
||||
disable_ns_register = false
|
||||
#disable_register_reason = "To register on this network visit http://some.misconfigured.site/register"
|
||||
|
||||
/*
|
||||
* The reason to give the users who try to "/msg NickServ REGISTER" if
|
||||
* disable_ns_register is enabled.
|
||||
* If set, the reason to give the users who try to "/msg NickServ SET EMAIL".
|
||||
* If not set, then email changing is not blocked.
|
||||
*/
|
||||
#disable_reason = "To register on this network, visit http://some.misconfigured.site/register"
|
||||
#disable_email_reason = "To change your email address visit http://some.misconfigured.site"
|
||||
}
|
||||
|
||||
/*
|
||||
@@ -261,9 +284,10 @@ m_ldap_authentication
|
||||
*
|
||||
* Note that this doesn't give the user privileges on the IRCd, only in Services.
|
||||
*/
|
||||
#module { name = "m_ldap_oper" }
|
||||
m_ldap_oper
|
||||
#module
|
||||
{
|
||||
name = "m_ldap_oper"
|
||||
|
||||
/*
|
||||
* An optional binddn to use when searching for groups.
|
||||
* %a is replaced with the account name of the user.
|
||||
@@ -298,16 +322,20 @@ m_ldap_oper
|
||||
*
|
||||
* This module allows other modules to use MySQL.
|
||||
*/
|
||||
#module { name = "m_mysql" }
|
||||
mysql
|
||||
#module
|
||||
{
|
||||
/* The name of this service. */
|
||||
name = "mysql/main"
|
||||
database = "anope"
|
||||
server = "127.0.0.1"
|
||||
username = "anope"
|
||||
password = "mypassword"
|
||||
port = 3306
|
||||
name = "m_mysql"
|
||||
|
||||
mysql
|
||||
{
|
||||
/* The name of this service. */
|
||||
name = "mysql/main"
|
||||
database = "anope"
|
||||
server = "127.0.0.1"
|
||||
username = "anope"
|
||||
password = "mypassword"
|
||||
port = 3306
|
||||
}
|
||||
}
|
||||
|
||||
/*
|
||||
@@ -323,12 +351,13 @@ mysql
|
||||
* back to services. If services are able to connect through the proxy to itself
|
||||
* then it knows it is an insecure proxy, and will ban it.
|
||||
*/
|
||||
#module { name = "m_proxyscan" }
|
||||
m_proxyscan
|
||||
#module
|
||||
{
|
||||
name = "m_proxyscan"
|
||||
|
||||
/*
|
||||
* The target IP services tells the proxy to connect back to. This must be a publicly
|
||||
* avaiable IP that remote proxies can connect to.
|
||||
* available IP that remote proxies can connect to.
|
||||
*/
|
||||
#target_ip = "127.0.0.1"
|
||||
|
||||
@@ -369,30 +398,26 @@ m_proxyscan
|
||||
* How long before connections should be timed out.
|
||||
*/
|
||||
timeout = 5
|
||||
}
|
||||
|
||||
/*
|
||||
* A proxyscan block (must have m_proxyscan loaded).
|
||||
* You may have multiple proxyscan blocks.
|
||||
*/
|
||||
proxyscan
|
||||
{
|
||||
/* The type of proxy to check for. A comma separated list is allowed. */
|
||||
type = "HTTP"
|
||||
proxyscan
|
||||
{
|
||||
/* The type of proxy to check for. A comma separated list is allowed. */
|
||||
type = "HTTP"
|
||||
|
||||
/* The ports to check. */
|
||||
port = "80,8080"
|
||||
/* The ports to check. */
|
||||
port = "80,8080"
|
||||
|
||||
/* How long to set the ban for. */
|
||||
time = 4h
|
||||
/* How long to set the ban for. */
|
||||
time = 4h
|
||||
|
||||
/*
|
||||
* The reason to ban the user for.
|
||||
* %h is replaced with the type of proxy found.
|
||||
* %i is replaced with the IP of proxy found.
|
||||
* %p is replaced with the port.
|
||||
*/
|
||||
reason = "You have an open proxy running on your host (%t:%i:%p)"
|
||||
/*
|
||||
* The reason to ban the user for.
|
||||
* %h is replaced with the type of proxy found.
|
||||
* %i is replaced with the IP of proxy found.
|
||||
* %p is replaced with the port.
|
||||
*/
|
||||
reason = "You have an open proxy running on your host (%t:%i:%p)"
|
||||
}
|
||||
}
|
||||
|
||||
/*
|
||||
@@ -401,9 +426,10 @@ proxyscan
|
||||
* This module allows authenticating users against an external SQL database using a custom
|
||||
* query.
|
||||
*/
|
||||
#module { name = "m_sql_authentication" }
|
||||
m_sql_authentication
|
||||
#module
|
||||
{
|
||||
name = "m_sql_authentication"
|
||||
|
||||
/* SQL engine to use. Should be configured elsewhere with m_mysql, m_sqlite, etc. */
|
||||
engine = "mysql/main"
|
||||
|
||||
@@ -433,26 +459,42 @@ m_sql_authentication
|
||||
query = "SELECT `email_addr` AS `email` FROM `my_users` WHERE `username` = @a@ AND `password` = MD5(CONCAT('salt', @p@))"
|
||||
|
||||
/*
|
||||
* Enable this to have this module disable "/msg NickServ REGISTER".
|
||||
*/
|
||||
disable_ns_register = false
|
||||
|
||||
/*
|
||||
* The reason to give the users who try to "/msg NickServ REGISTER" if
|
||||
* disable_ns_register is enabled.
|
||||
* If set, the reason to give the users who try to "/msg NickServ REGISTER".
|
||||
* If not set, then registration is not blocked.
|
||||
*/
|
||||
#disable_reason = "To register on this network visit http://some.misconfigured.site/register"
|
||||
}
|
||||
|
||||
/*
|
||||
* m_sql_log
|
||||
*
|
||||
* This module adds an additional target option to log{} blocks
|
||||
* that allows logging Service's logs to SQL. To log to SQL, add
|
||||
* the SQL service name to log:targets prefixed by sql_log:. For
|
||||
* example:
|
||||
*
|
||||
* log
|
||||
* {
|
||||
* targets = "services.log sql_log:mysql/main"
|
||||
* ...
|
||||
* }
|
||||
*
|
||||
* By default this module logs to the table `logs`, and will create
|
||||
* it if it doesn't exist. This module does not create any indexes (keys)
|
||||
* on the table and it is recommended you add them yourself as necessary.
|
||||
*/
|
||||
#module { name = "m_sql_log" }
|
||||
|
||||
/*
|
||||
* m_sql_oper
|
||||
*
|
||||
* This module allows granting users services operator privileges and possibly IRC Operator
|
||||
* privileges based on an external SQL database using a custom query.
|
||||
*/
|
||||
#module { name = "m_sql_oper" }
|
||||
m_sql_oper
|
||||
#module
|
||||
{
|
||||
name = "m_sql_oper"
|
||||
|
||||
/* SQL engine to use. Should be configured elsewhere with m_mysql, m_sqlite, etc. */
|
||||
engine = "mysql/main"
|
||||
|
||||
@@ -474,14 +516,44 @@ m_sql_oper
|
||||
*
|
||||
* This module allows other modules to use SQLite.
|
||||
*/
|
||||
#module { name = "m_sqlite" }
|
||||
sqlite
|
||||
#module
|
||||
{
|
||||
/* The name of this service. */
|
||||
name = "sqlite/main"
|
||||
name = "m_sqlite"
|
||||
|
||||
/* The database name, it will be created if it does not exist. */
|
||||
database = "anope.db"
|
||||
/* A SQLite database */
|
||||
sqlite
|
||||
{
|
||||
/* The name of this service. */
|
||||
name = "sqlite/main"
|
||||
|
||||
/* The database name, it will be created if it does not exist. */
|
||||
database = "anope.db"
|
||||
}
|
||||
}
|
||||
|
||||
/*
|
||||
* m_redis
|
||||
*
|
||||
* This module allows other modules to use Redis.
|
||||
*/
|
||||
#module
|
||||
{
|
||||
name = "m_redis"
|
||||
|
||||
/* A redis database */
|
||||
redis
|
||||
{
|
||||
/* The name of this service */
|
||||
name = "redis/main"
|
||||
|
||||
/*
|
||||
* The redis database to use. New connections default to 0.
|
||||
*/
|
||||
db = 0
|
||||
|
||||
ip = "127.0.0.1"
|
||||
port = 6379
|
||||
}
|
||||
}
|
||||
|
||||
/*
|
||||
@@ -489,7 +561,7 @@ sqlite
|
||||
*
|
||||
* Provides the regex engine regex/pcre, which uses the Perl Compatible Regular Expressions library.
|
||||
*/
|
||||
module { name = "m_regex_pcre" }
|
||||
#module { name = "m_regex_pcre" }
|
||||
|
||||
/*
|
||||
* m_regex_posix
|
||||
@@ -511,39 +583,40 @@ module { name = "m_regex_pcre" }
|
||||
*
|
||||
* Allows rewriting commands sent to/from clients.
|
||||
*/
|
||||
module { name = "m_rewrite" }
|
||||
#module { name = "m_rewrite" }
|
||||
#command
|
||||
#{
|
||||
# service = "ChanServ"; name = "CLEAR"; command = "rewrite"
|
||||
#
|
||||
# /* Enable m_rewrite. */
|
||||
# rewrite = true
|
||||
#
|
||||
# /* Source message to match. A $ can be used to match anything. */
|
||||
# rewrite_source = "CLEAR $ USERS"
|
||||
#
|
||||
# /*
|
||||
# * Message to rewrite the source message to. A $ followed by a number, eg $0, gets
|
||||
# * replaced by the number-th word from the source_message, starting from 0.
|
||||
# */
|
||||
# rewrite_target = "KICK $1 *"
|
||||
#
|
||||
# /*
|
||||
# * The command description. This only shows up in HELP's output.
|
||||
# * Comment this option to prevent the command from showing in the
|
||||
# * HELP command.
|
||||
# */
|
||||
# rewrite_description = "Clears all users from a channel"
|
||||
#}
|
||||
{
|
||||
service = "ChanServ"; name = "CLEAR"; command = "rewrite"
|
||||
|
||||
/* Enable m_rewrite. */
|
||||
rewrite = true
|
||||
|
||||
/* Source message to match. A $ can be used to match anything. */
|
||||
rewrite_source = "CLEAR $ USERS"
|
||||
|
||||
/*
|
||||
* Message to rewrite the source message to. A $ followed by a number, eg $0, gets
|
||||
* replaced by the number-th word from the source_message, starting from 0.
|
||||
*/
|
||||
rewrite_target = "KICK $1 *"
|
||||
|
||||
/*
|
||||
* The command description. This only shows up in HELP's output.
|
||||
* Comment this option to prevent the command from showing in the
|
||||
* HELP command.
|
||||
*/
|
||||
rewrite_description = "Clears all users from a channel"
|
||||
}
|
||||
|
||||
/*
|
||||
* m_ssl
|
||||
*
|
||||
* This module uses SSL to connect to the uplink server(s).
|
||||
*/
|
||||
#module { name = "m_ssl" }
|
||||
ssl
|
||||
#module
|
||||
{
|
||||
name = "m_ssl"
|
||||
|
||||
/*
|
||||
* An optional certificate and key for m_ssl to give to the uplink.
|
||||
*
|
||||
@@ -562,9 +635,10 @@ ssl
|
||||
* Allows remote applications (websites) to execute queries in real time to retrieve data from Anope.
|
||||
* By itself this module does nothing, but allows other modules (m_xmlrpc_main) to receive and send XMLRPC queries.
|
||||
*/
|
||||
#module { name = "m_xmlrpc" }
|
||||
m_xmlrpc
|
||||
#module
|
||||
{
|
||||
name = "m_xmlrpc"
|
||||
|
||||
/* Web service to use. Requires m_httpd. */
|
||||
server = "httpd/main"
|
||||
}
|
||||
@@ -586,9 +660,10 @@ m_xmlrpc
|
||||
*
|
||||
* This module requires m_httpd.
|
||||
*/
|
||||
#module { name = "webcpanel" }
|
||||
webcpanel
|
||||
#module
|
||||
{
|
||||
name = "webcpanel"
|
||||
|
||||
/* Web server to use. */
|
||||
server = "httpd/main";
|
||||
|
||||
@@ -597,7 +672,4 @@ webcpanel
|
||||
|
||||
/* Page title. */
|
||||
title = "Anope IRC Services";
|
||||
|
||||
/* Whether or not to use https on redirecting URLs. */
|
||||
ssl = no
|
||||
}
|
||||
|
||||
+195
-198
@@ -56,38 +56,28 @@ service
|
||||
*
|
||||
* Provides essential functionality for NickServ.
|
||||
*/
|
||||
module { name = "nickserv" }
|
||||
|
||||
/*
|
||||
* Configuration for NickServ provided by ns_main.
|
||||
*/
|
||||
nickserv
|
||||
module
|
||||
{
|
||||
name = "nickserv"
|
||||
|
||||
/*
|
||||
* The name of the client that should be NickServ.
|
||||
*/
|
||||
name = "NickServ"
|
||||
client = "NickServ"
|
||||
|
||||
/*
|
||||
* Force users to give an e-mail address when they register a nick.
|
||||
*
|
||||
* This directive is recommended to be enabled, and required if e-mail registration is enabled.
|
||||
* This directive defaults to "yes" and is recommended to be enabled. This is required if e-mail registration is enabled.
|
||||
*/
|
||||
forceemail = yes
|
||||
|
||||
/*
|
||||
* Require users who change their email address to confirm they
|
||||
* own it.
|
||||
* own their new email.
|
||||
*/
|
||||
confirmemailchanges = no
|
||||
|
||||
/*
|
||||
* Registration confirmation setting. Set to "none" for no registration confirmation,
|
||||
* "mail" for email confirmation, and "admin" to have services operators manually confirm
|
||||
* every registration. Set to "disable" to completely disable all registrations.
|
||||
*/
|
||||
registration = "none"
|
||||
|
||||
/*
|
||||
* A message sent to users on connect if they use an unregistered nick.
|
||||
*
|
||||
@@ -101,40 +91,26 @@ nickserv
|
||||
* by spaces.
|
||||
*
|
||||
* The options are:
|
||||
* - kill: Kill nick if not identified within 60 seconds
|
||||
* - killquick: Kill nick if not identified within 20 seconds, this one overrides the above
|
||||
* option and the above must be specified with this one
|
||||
* - secure: Enable nickname security, requiring the nick's password before any operations
|
||||
* can be done on it
|
||||
* - private: Hide the nick from NickServ's LIST command
|
||||
* - hideemail: Hide's the nick's e-mail address from NickServ's INFO command
|
||||
* - hideusermask: Hide's the nick's last or current user@host from NickServ's INFO command
|
||||
* - hidequit: Hide's the nick's last quit message
|
||||
* - memo_signon: Notify user if they have a new memo when they sign into the nick
|
||||
* - memo_receive: Notify user if they have a new memo as soon as it's received
|
||||
* - autoop: User will be automatically opped in channels they enter and have access to
|
||||
* - msg: Services messages will be sent as PRIVMSGs instead of NOTICEs, requires
|
||||
* options:useprivmsg to be enabled as well
|
||||
* - killprotect: Kill nick if not identified within 60 seconds
|
||||
* - kill_quick: Kill nick if not identified within 20 seconds, this one overrides the above
|
||||
* option and the above must be specified with this one
|
||||
* - ns_secure: Enable nickname security, requiring the nick's password before any operations
|
||||
* can be done on it
|
||||
* - ns_private: Hide the nick from NickServ's LIST command
|
||||
* - hide_email: Hide's the nick's e-mail address from NickServ's INFO command
|
||||
* - hide_mask: Hide's the nick's last or current user@host from NickServ's INFO command
|
||||
* - hide_quit: Hide's the nick's last quit message
|
||||
* - memo_signon: Notify user if they have a new memo when they sign into the nick
|
||||
* - memo_receive: Notify user if they have a new memo as soon as it's received
|
||||
* - autoop: User will be automatically opped in channels they enter and have access to
|
||||
* - 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
|
||||
*
|
||||
* This directive is optional, if left blank, the options will default to secure, memo_signon, and
|
||||
* 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.
|
||||
*/
|
||||
defaults="secure private hideemail hideusermask memo_signon memo_receive autoop"
|
||||
|
||||
/*
|
||||
* A list of languages to load on startup that will be available in /nickserv set language.
|
||||
* Useful if you translate Anope to your language. (Explained further in docs/LANGUAGE).
|
||||
* Note that english should not be listed here because it is the base language.
|
||||
*
|
||||
* Removing .UTF-8 will instead use the default encoding for the language, eg. iso-8859-1 for western European languages.
|
||||
*/
|
||||
languages = "ca_ES.UTF-8 de_DE.UTF-8 el_GR.UTF-8 es_ES.UTF-8 fr_FR.UTF-8 hu_HU.UTF-8 it_IT.UTF-8 nl_NL.UTF-8 pl_PL.UTF-8 pt_PT.UTF-8 ru_RU.UTF-8 tr_TR.UTF-8"
|
||||
|
||||
/*
|
||||
* Default language that non- and newly-registered nicks will receive messages in.
|
||||
* Leave empty to default to English.
|
||||
*/
|
||||
#defaultlanguage = "es_ES.UTF-8"
|
||||
defaults = "ns_secure ns_private hide_email hide_mask memo_signon memo_receive autoop"
|
||||
|
||||
/*
|
||||
* The minimum length of time between consecutive uses of NickServ's REGISTER command. This
|
||||
@@ -142,13 +118,6 @@ nickserv
|
||||
*/
|
||||
regdelay = 30s
|
||||
|
||||
/*
|
||||
* The minimum length of time between consecutive uses of NickServ's RESEND command.
|
||||
*
|
||||
* This directive is optional, but recommended. If not set, this restriction will be disabled.
|
||||
*/
|
||||
resenddelay = 90s
|
||||
|
||||
/*
|
||||
* The length of time before a nick's registration expires.
|
||||
*
|
||||
@@ -157,87 +126,13 @@ nickserv
|
||||
expire = 21d
|
||||
|
||||
/*
|
||||
* The length of time before a suspended nick becomes unsuspended.
|
||||
*
|
||||
* This directive is optional. If not set, the default is never.
|
||||
*/
|
||||
#suspendexpire = 90d
|
||||
|
||||
/*
|
||||
* The length of time a user using an unconfirmed account has
|
||||
* before the account will be released for general use again.
|
||||
*
|
||||
* This directive is only required if the e-mail registration option is enabled.
|
||||
*/
|
||||
#unconfirmedexpire = 1d
|
||||
|
||||
/*
|
||||
* The maximum number of nicks allowed in a group.
|
||||
*
|
||||
* This directive is optional, but recommended. If not set or set to 0, no limits will be applied.
|
||||
*/
|
||||
maxaliases = 16
|
||||
|
||||
/*
|
||||
* The maximum number of entries allowed on a nickname's access list.
|
||||
*/
|
||||
accessmax = 32
|
||||
|
||||
/*
|
||||
* The username (and possibly hostname) used for the fake user created when NickServ collides
|
||||
* a user.
|
||||
*/
|
||||
enforceruser = "enforcer"
|
||||
enforcerhost = "localhost.net"
|
||||
|
||||
/*
|
||||
* The delay before a NickServ collided nick is released.
|
||||
*/
|
||||
releasetimeout = 1m
|
||||
|
||||
/*
|
||||
* Allow the use of the IMMED option in the NickServ SET KILL command.
|
||||
*
|
||||
* This directive is optional.
|
||||
*/
|
||||
#allowkillimmed = yes
|
||||
|
||||
/*
|
||||
* If set, the NickServ GROUP command won't allow any group change. This is recommended for
|
||||
* better performance and to protect against nick stealing, however users will have less
|
||||
* flexibility.
|
||||
*
|
||||
* This directive is optional, but recommended.
|
||||
*/
|
||||
#nogroupchange = yes
|
||||
|
||||
/*
|
||||
* The maximum number of nicks to be returned for a NickServ LIST command.
|
||||
*/
|
||||
listmax = 50
|
||||
|
||||
/*
|
||||
* When a user's nick is forcibly changed to enforce a "nick kill", their new nick will start
|
||||
* with this value. The rest will be made up of 6 or 7 digits.
|
||||
*/
|
||||
guestnickprefix = "Guest"
|
||||
|
||||
/*
|
||||
* Prevents the use of the ACCESS (excluding the LIST subcommand), DROP, FORBID, SUSPEND,
|
||||
* Prevents the use of the ACCESS and CERT (excluding their LIST subcommand), DROP, FORBID, SUSPEND,
|
||||
* GETPASS and SET PASSWORD commands by services operators on other services operators.
|
||||
*
|
||||
* This directive is optional, but recommended.
|
||||
*/
|
||||
secureadmins = yes
|
||||
|
||||
/*
|
||||
* If set, any user wanting to use the privileges of Services Root, Services Admin, or Services
|
||||
* Operator must have been logged as an IRC Operator with the /OPER command.
|
||||
*
|
||||
* This directive is optional, but recommended.
|
||||
*/
|
||||
strictprivileges = yes
|
||||
|
||||
/*
|
||||
* If set, Services will set the channel modes a user has access to upon identifying, assuming
|
||||
* they are not already set.
|
||||
@@ -247,17 +142,17 @@ nickserv
|
||||
modeonid = yes
|
||||
|
||||
/*
|
||||
* If set, Services will add the usermask of registering users to the access list of their
|
||||
* newly created account. If not set, users will always have to identify to NickServ before
|
||||
* being recognized, unless they manually add an address to the access list of their account.
|
||||
* If set, Services will set these user modes on any user who identifies.
|
||||
*
|
||||
* This directive is optional.
|
||||
*/
|
||||
addaccessonreg = yes
|
||||
#modesonid = "+R"
|
||||
|
||||
/*
|
||||
* The maximum number of channels a user can have on NickServ's AJOIN command.
|
||||
* If set, Services will not show netsplits in the last quit message field
|
||||
* of NickServ's INFO command.
|
||||
*/
|
||||
ajoinmax = 10
|
||||
hidenetsplitquit = no
|
||||
|
||||
/*
|
||||
* If set, is the length of time NickServ's killquick and kill options wait before
|
||||
@@ -267,32 +162,18 @@ nickserv
|
||||
kill = 60s
|
||||
|
||||
/*
|
||||
* If set, Services will set these user modes on any user who identifies.
|
||||
* If set, forbids the registration of nicks that contain an existing
|
||||
* nick with Services access. For example, if Tester is a Services Oper,
|
||||
* you can't register NewTester or Tester123 unless you are an IRC
|
||||
* Operator.
|
||||
*
|
||||
* NOTE: If you enable this, you will have to be logged in as an IRC
|
||||
* operator in order to register a Services Root nick when setting up
|
||||
* Anope for the first time.
|
||||
*
|
||||
* This directive is optional.
|
||||
*/
|
||||
#modesonid = "+R"
|
||||
|
||||
/*
|
||||
* If set, Services will svsnick and svsjoin users who use the recover
|
||||
* command on an identified user to the nick and channels of the recovered user.
|
||||
*
|
||||
* This directive is opional.
|
||||
*/
|
||||
restoreonrecover = yes
|
||||
|
||||
/*
|
||||
* Some IRCds allow "SASL" authentication to let users identify to Services
|
||||
* during the IRCd user registration process. If set, Services will allow
|
||||
* authenticating users through this mechanism.
|
||||
*/
|
||||
sasl = yes
|
||||
|
||||
/*
|
||||
* If set, Services will not show netsplits in the last quit message field
|
||||
* of NickServ's INFO command.
|
||||
*/
|
||||
hidenetsplitquit = no
|
||||
#restrictopernicks = yes
|
||||
}
|
||||
|
||||
/*
|
||||
@@ -327,7 +208,24 @@ command { service = "NickServ"; name = "HELP"; command = "generic/help"; }
|
||||
*
|
||||
* Used for configuring what hosts have access to your account.
|
||||
*/
|
||||
module { name = "ns_access" }
|
||||
module
|
||||
{
|
||||
name = "ns_access"
|
||||
|
||||
/*
|
||||
* The maximum number of entries allowed on a nickname's access list.
|
||||
*/
|
||||
accessmax = 32
|
||||
|
||||
/*
|
||||
* If set, Services will add the usermask of registering users to the access list of their
|
||||
* newly created account. If not set, users will always have to identify to NickServ before
|
||||
* being recognized, unless they manually add an address to the access list of their account.
|
||||
* This directive is optional.
|
||||
*/
|
||||
addaccessonreg = yes
|
||||
}
|
||||
|
||||
command { service = "NickServ"; name = "ACCESS"; command = "nickserv/access"; }
|
||||
|
||||
/*
|
||||
@@ -337,7 +235,15 @@ command { service = "NickServ"; name = "ACCESS"; command = "nickserv/access"; }
|
||||
*
|
||||
* Used for configuring channels to join once you identify.
|
||||
*/
|
||||
module { name = "ns_ajoin" }
|
||||
module
|
||||
{
|
||||
name = "ns_ajoin"
|
||||
|
||||
/*
|
||||
* The maximum number of channels a user can have on NickServ's AJOIN command.
|
||||
*/
|
||||
ajoinmax = 10
|
||||
}
|
||||
command { service = "NickServ"; name = "AJOIN"; command = "nickserv/ajoin"; }
|
||||
|
||||
/*
|
||||
@@ -357,7 +263,7 @@ command { service = "NickServ"; name = "ALIST"; command = "nickserv/alist"; }
|
||||
*
|
||||
* Used for configuring your SSL certificate list, which can be used to automatically identify you.
|
||||
*/
|
||||
module { name = "ns_cert" }
|
||||
module { name = "ns_cert"; accessmax = 5; }
|
||||
command { service = "NickServ"; name = "CERT"; command = "nickserv/cert"; }
|
||||
|
||||
/*
|
||||
@@ -399,7 +305,26 @@ command { service = "NickServ"; name = "GETEMAIL"; command = "nickserv/getemail"
|
||||
*
|
||||
* Used for controlling nick groups.
|
||||
*/
|
||||
module { name = "ns_group" }
|
||||
module
|
||||
{
|
||||
name = "ns_group"
|
||||
|
||||
/*
|
||||
* The maximum number of nicks allowed in a group.
|
||||
*
|
||||
* This directive is optional, but recommended. If not set or set to 0, no limits will be applied.
|
||||
*/
|
||||
maxaliases = 16
|
||||
|
||||
/*
|
||||
* If set, the NickServ GROUP command won't allow any group change. This is recommended for
|
||||
* better performance and to protect against nick stealing, however users will have less
|
||||
* flexibility.
|
||||
*
|
||||
* This directive is optional, but recommended.
|
||||
*/
|
||||
#nogroupchange = yes
|
||||
}
|
||||
command { service = "NickServ"; name = "GLIST"; command = "nickserv/glist"; }
|
||||
command { service = "NickServ"; name = "GROUP"; command = "nickserv/group"; }
|
||||
command { service = "NickServ"; name = "UNGROUP"; command = "nickserv/ungroup"; }
|
||||
@@ -418,22 +343,38 @@ command { service = "NickServ"; name = "IDENTIFY"; command = "nickserv/identify"
|
||||
/*
|
||||
* ns_info
|
||||
*
|
||||
* Provides the command nickserv/info.
|
||||
* 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.
|
||||
*
|
||||
* Used for gathering information about an account.
|
||||
*/
|
||||
module { name = "ns_info" }
|
||||
command { service = "NickServ"; name = "INFO"; command = "nickserv/info"; }
|
||||
|
||||
command { service = "NickServ"; name = "SET HIDE"; command = "nickserv/set/hide"; }
|
||||
command { service = "NickServ"; name = "SASET HIDE"; command = "nickserv/saset/hide"; permission = "nickserv/saset/hide"; }
|
||||
|
||||
/*
|
||||
* ns_list
|
||||
*
|
||||
* Provides the command nickserv/list.
|
||||
* Provides the commands:
|
||||
* nickserv/list - Used for retrieving and searching the registered account list.
|
||||
* nickserv/set/private, nickserv/saset/private - Used for configuring whether or a users account shows up in nickserv/list.
|
||||
*
|
||||
* Used for retrieving and searching the registered account list.
|
||||
*/
|
||||
module { name = "ns_list" }
|
||||
command { service = "NickServ"; name = "LIST"; command = "nickserv/list"; command = "nickserv/admin"; }
|
||||
module
|
||||
{
|
||||
name = "ns_list"
|
||||
|
||||
/*
|
||||
* The maximum number of nicks to be returned for a NickServ LIST command.
|
||||
*/
|
||||
listmax = 50
|
||||
}
|
||||
command { service = "NickServ"; name = "LIST"; command = "nickserv/list"; group = "nickserv/admin"; }
|
||||
|
||||
command { service = "NickServ"; name = "SET PRIVATE"; command = "nickserv/set/private"; }
|
||||
command { service = "NickServ"; name = "SASET PRIVATE"; command = "nickserv/saset/private"; permission = "nickserv/saset/private"; }
|
||||
|
||||
/*
|
||||
* ns_logout
|
||||
@@ -452,9 +393,20 @@ command { service = "NickServ"; name = "LOGOUT"; command = "nickserv/logout"; }
|
||||
*
|
||||
* Used for recovering your nick from services or another user.
|
||||
*/
|
||||
module { name = "ns_recover" }
|
||||
module
|
||||
{
|
||||
name = "ns_recover"
|
||||
|
||||
/*
|
||||
* If set, Services will svsnick and svsjoin users who use the recover
|
||||
* command on an identified user to the nick and channels of the recovered user.
|
||||
*
|
||||
* This directive is opional.
|
||||
*/
|
||||
restoreonrecover = yes
|
||||
}
|
||||
command { service = "NickServ"; name = "RECOVER"; command = "nickserv/recover"; }
|
||||
# Uncomment below to emulate 1.8's behavior of ghost, recover, and release.
|
||||
# Uncomment below to emulate 1.8's behavior of ghost and release.
|
||||
#command { service = "NickServ"; name = "GHOST"; command = "nickserv/recover"; }
|
||||
#command { service = "NickServ"; name = "RELEASE"; command = "nickserv/recover"; }
|
||||
|
||||
@@ -465,7 +417,39 @@ command { service = "NickServ"; name = "RECOVER"; command = "nickserv/recover";
|
||||
*
|
||||
* Used for registering accounts.
|
||||
*/
|
||||
module { name = "ns_register" }
|
||||
module
|
||||
{
|
||||
name = "ns_register"
|
||||
|
||||
/*
|
||||
* Registration confirmation setting. Set to "none" for no registration confirmation,
|
||||
* "mail" for email confirmation, and "admin" to have services operators manually confirm
|
||||
* every registration. Set to "disable" to completely disable all registrations.
|
||||
*/
|
||||
registration = "none"
|
||||
|
||||
/*
|
||||
* The minimum length of time between consecutive uses of NickServ's RESEND command.
|
||||
*
|
||||
* This directive is optional, but recommended. If not set, this restriction will be disabled.
|
||||
*/
|
||||
resenddelay = 90s
|
||||
|
||||
/*
|
||||
* Prevents users from registering their nick if they are not connected
|
||||
* for at least the given number of seconds.
|
||||
*
|
||||
* This directive is optional.
|
||||
*/
|
||||
#nickregdelay = 30s
|
||||
|
||||
/*
|
||||
* The length of time a user using an unconfirmed account has
|
||||
* before the account will be released for general use again.
|
||||
*/
|
||||
#unconfirmedexpire = 1d
|
||||
}
|
||||
|
||||
command { service = "NickServ"; name = "CONFIRM"; command = "nickserv/confirm"; }
|
||||
command { service = "NickServ"; name = "REGISTER"; command = "nickserv/register"; }
|
||||
command { service = "NickServ"; name = "RESEND"; command = "nickserv/resend"; }
|
||||
@@ -488,57 +472,58 @@ command { service = "NickServ"; name = "RESETPASS"; command = "nickserv/resetpas
|
||||
* nickserv/set/autoop, nickserv/saset/autoop - Determines whether or not modes are automatically set users when joining a channel.
|
||||
* nickserv/set/display, nickserv/saset/display - Used for setting a users display name.
|
||||
* nickserv/set/email, nickserv/saset/email - Used for setting a users email address.
|
||||
* nickserv/set/greet, nickserv/saset/greet - Used for changing a users greet message, which is displayed when they enter channels.
|
||||
* nicksrev/set/hide, nickserv/saset/hide - Used for configuring which options are publically shown in nickserv/info for users account.
|
||||
* nickserv/set/keepmodes, nickserv/saset/keepmodes - Configure whether or not services should retain a user's modes across sessions.
|
||||
* nickserv/set/kill, nickserv/saset/kill - Used for configuring nickname protection.
|
||||
* nickserv/set/language, nickserv/saset/language - Used for configuring what language services use.
|
||||
* nickserv/set/message, nickserv/saset/message - Used to configure how services send messages to you.
|
||||
* nickserv/set/password, nickserv/saset/password - Used for changing a users greet password.
|
||||
* nickserv/set/private, nickserv/saset/private - Used for configuring whether or a users account shows up in nickserv/list.
|
||||
* nickserv/set/password, nickserv/saset/password - Used for changing a users password.
|
||||
* nickserv/set/secure, nickserv/saset/secure - Used for configuring whether a user can identify by simply being recognized by nickserv/access.
|
||||
* nickserv/saset/noexpire - Used for configuring noexpire, which prevents nicks from expiring.
|
||||
*
|
||||
* This is a dummy command to provide a help wrapper for the various SET and SASET commands.
|
||||
*/
|
||||
module { name = "ns_set" }
|
||||
module
|
||||
{
|
||||
name = "ns_set"
|
||||
|
||||
/*
|
||||
* Allow the use of the IMMED option in the NickServ SET KILL command.
|
||||
*
|
||||
* This directive is optional.
|
||||
*/
|
||||
#allowkillimmed = yes
|
||||
}
|
||||
|
||||
|
||||
command { service = "NickServ"; name = "SET"; command = "nickserv/set"; }
|
||||
command { service = "NickServ"; name = "SASET"; command = "nickserv/saset"; permission = "nickserv/saset/"; group = "nickserv/admin"; }
|
||||
|
||||
command { service = "NickServ"; name = "SET AUTOOP"; command = "nickserv/set/autoop"; }
|
||||
command { service = "NickServ"; name = "SASET AUTOOP"; command = "nickserv/saset/autoop"; permission = "nickserv/saset/autoop"; group = "nickserv/admin"; }
|
||||
command { service = "NickServ"; name = "SASET AUTOOP"; command = "nickserv/saset/autoop"; permission = "nickserv/saset/autoop"; }
|
||||
|
||||
command { service = "NickServ"; name = "SET DISPLAY"; command = "nickserv/set/display"; }
|
||||
command { service = "NickServ"; name = "SASET DISPLAY"; command = "nickserv/saset/display"; permission = "nickserv/saset/display"; group = "nickserv/admin"; }
|
||||
command { service = "NickServ"; name = "SASET DISPLAY"; command = "nickserv/saset/display"; permission = "nickserv/saset/display"; }
|
||||
|
||||
command { service = "NickServ"; name = "SET EMAIL"; command = "nickserv/set/email"; }
|
||||
command { service = "NickServ"; name = "SASET EMAIL"; command = "nickserv/saset/email"; permission = "nickserv/saset/email"; group = "nickserv/admin"; }
|
||||
command { service = "NickServ"; name = "SASET EMAIL"; command = "nickserv/saset/email"; permission = "nickserv/saset/email"; }
|
||||
|
||||
command { service = "NickServ"; name = "SET GREET"; command = "nickserv/set/greet"; }
|
||||
command { service = "NickServ"; name = "SASET GREET"; command = "nickserv/saset/greet"; permission = "nickserv/saset/greet"; group = "nickserv/admin"; }
|
||||
|
||||
command { service = "NickServ"; name = "SET HIDE"; command = "nickserv/set/hide"; }
|
||||
command { service = "NickServ"; name = "SASET HIDE"; command = "nickserv/saset/hide"; permission = "nickserv/saset/hide"; group = "nickserv/admin"; }
|
||||
command { service = "NickServ"; name = "SET KEEPMODES"; command = "nickserv/set/keepmodes"; }
|
||||
command { service = "NickServ"; name = "SASET KEEPMODES"; command = "nickserv/saset/keepmodes"; permission = "nickserv/saset/keepmodes"; }
|
||||
|
||||
command { service = "NickServ"; name = "SET KILL"; command = "nickserv/set/kill"; }
|
||||
command { service = "NickServ"; name = "SASET KILL"; command = "nickserv/saset/kill"; permission = "nickserv/saset/kill"; group = "nickserv/admin"; }
|
||||
command { service = "NickServ"; name = "SASET KILL"; command = "nickserv/saset/kill"; permission = "nickserv/saset/kill"; }
|
||||
|
||||
command { service = "NickServ"; name = "SET LANGUAGE"; command = "nickserv/set/language"; }
|
||||
command { service = "NickServ"; name = "SASET LANGUAGE"; command = "nickserv/saset/language"; permission = "nickserv/saset/language"; group = "nickserv/admin"; }
|
||||
command { service = "NickServ"; name = "SASET LANGUAGE"; command = "nickserv/saset/language"; permission = "nickserv/saset/language"; }
|
||||
|
||||
command { service = "NickServ"; name = "SET MESSAGE"; command = "nickserv/set/message"; }
|
||||
command { service = "NickServ"; name = "SASET MESSAGE"; command = "nickserv/saset/message"; permission = "nickserv/saset/message"; group = "nickserv/admin"; }
|
||||
command { service = "NickServ"; name = "SASET MESSAGE"; command = "nickserv/saset/message"; permission = "nickserv/saset/message"; }
|
||||
|
||||
command { service = "NickServ"; name = "SET PASSWORD"; command = "nickserv/set/password"; }
|
||||
command { service = "NickServ"; name = "SASET PASSWORD"; command = "nickserv/saset/password"; permission = "nickserv/saset/password"; group = "nickserv/admin"; }
|
||||
|
||||
command { service = "NickServ"; name = "SET PRIVATE"; command = "nickserv/set/private"; }
|
||||
command { service = "NickServ"; name = "SASET PRIVATE"; command = "nickserv/saset/private"; permission = "nickserv/saset/private"; group = "nickserv/admin"; }
|
||||
command { service = "NickServ"; name = "SASET PASSWORD"; command = "nickserv/saset/password"; permission = "nickserv/saset/password"; }
|
||||
|
||||
command { service = "NickServ"; name = "SET SECURE"; command = "nickserv/set/secure"; }
|
||||
command { service = "NickServ"; name = "SASET SECURE"; command = "nickserv/saset/secure"; permission = "nickserv/saset/secure"; group = "nickserv/admin"; }
|
||||
command { service = "NickServ"; name = "SASET SECURE"; command = "nickserv/saset/secure"; permission = "nickserv/saset/secure"; }
|
||||
|
||||
command { service = "NickServ"; name = "SASET NOEXPIRE"; command = "nickserv/saset/noexpire"; permission = "nickserv/saset/noexpire"; group = "nickserv/admin"; }
|
||||
command { service = "NickServ"; name = "SASET NOEXPIRE"; command = "nickserv/saset/noexpire"; permission = "nickserv/saset/noexpire"; }
|
||||
|
||||
/*
|
||||
* ns_set_misc
|
||||
@@ -575,7 +560,18 @@ command { service = "NickServ"; name = "STATUS"; command = "nickserv/status"; }
|
||||
*
|
||||
* Used to suspend and unsuspend nicknames. Suspended nicknames can not be used but their settings are preserved.
|
||||
*/
|
||||
module { name = "ns_suspend" }
|
||||
module
|
||||
{
|
||||
name = "ns_suspend"
|
||||
|
||||
/*
|
||||
* The length of time before a suspended nick becomes unsuspended.
|
||||
*
|
||||
* This directive is optional. If not set, the default is never.
|
||||
*/
|
||||
#suspendexpire = 90d
|
||||
}
|
||||
|
||||
command { service = "NickServ"; name = "SUSPEND"; command = "nickserv/suspend"; permission = "nickserv/suspend"; group = "nickserv/admin"; }
|
||||
command { service = "NickServ"; name = "UNSUSPEND"; command = "nickserv/unsuspend"; permission = "nickserv/suspend"; group = "nickserv/admin"; }
|
||||
|
||||
@@ -600,9 +596,10 @@ command { service = "NickServ"; name = "UPDATE"; command = "nickserv/update"; }
|
||||
* Limits how many times the same email address may be used in Anope
|
||||
* to register accounts.
|
||||
*/
|
||||
module { name = "ns_maxemail" }
|
||||
ns_maxemail
|
||||
module
|
||||
{
|
||||
name = "ns_maxemail"
|
||||
|
||||
/*
|
||||
* The limit to how many registered nicks can use the same e-mail address. If set to 0 or left
|
||||
* commented, there will be no limit enforced when registering new accounts or using
|
||||
|
||||
+141
-115
@@ -56,25 +56,14 @@ service
|
||||
*
|
||||
* Provides essential functionality for OperServ.
|
||||
*/
|
||||
module { name = "operserv" }
|
||||
|
||||
/*
|
||||
* Configuration for OperServ provided by os_main.
|
||||
*/
|
||||
operserv
|
||||
module
|
||||
{
|
||||
name = "operserv"
|
||||
|
||||
/*
|
||||
* The name of the client that should be OperServ.
|
||||
*/
|
||||
name = "OperServ"
|
||||
|
||||
/*
|
||||
* If set, Services Admins will be able to use SUPERADMIN [ON|OFF] which will temporarily grant
|
||||
* them extra privileges such as being a founder on ALL channels.
|
||||
*
|
||||
* This directive is optional.
|
||||
*/
|
||||
#superadmin = yes
|
||||
client = "OperServ"
|
||||
|
||||
/*
|
||||
* These define the default expiration times for, respectively, AKILLs, CHANKILLs, SNLINEs,
|
||||
@@ -98,9 +87,9 @@ operserv
|
||||
* If set, this option will make Services send an (SVS)KILL command immediately after SNLINE ADD.
|
||||
* This eliminates the need for killing the user after the SNLINE has been added.
|
||||
*
|
||||
*This directive is optional.
|
||||
* This directive is optional.
|
||||
*/
|
||||
#killonsnline = yes
|
||||
killonsnline = yes
|
||||
|
||||
/*
|
||||
* If set, this option will make Services send an (SVS)KILL command immediately after SQLINE ADD.
|
||||
@@ -108,87 +97,7 @@ operserv
|
||||
*
|
||||
* This directive is optional.
|
||||
*/
|
||||
#killonsqline = yes
|
||||
|
||||
/*
|
||||
* Enables session limiting. Session limiting prevents users from connecting more than a certain
|
||||
* number of times from the same host at the same time - thus preventing most types of cloning.
|
||||
* Once a host reaches it's session limit, all clients attempting to connect from that host will
|
||||
* be killed. Exceptions to the default session limit can be defined via the exception list. It
|
||||
* should be noted that session limiting, along with a large exception list, can degrade Services'
|
||||
* performance.
|
||||
*
|
||||
* See the online help for more information about session limiting.
|
||||
*
|
||||
* This directive is optional.
|
||||
*/
|
||||
limitsessions = yes
|
||||
|
||||
/*
|
||||
* Default session limit per host. Once a host reaches it's session limit, all clients attempting
|
||||
* to connect from that host will be killed. A value of zero means an unlimited session limit.
|
||||
*
|
||||
* This directive is optional.
|
||||
* If not given and session limiting is enabled, it will default to no limit.
|
||||
*/
|
||||
defaultsessionlimit = 3
|
||||
|
||||
/*
|
||||
* The maximum session limit that may be set for a host in an exception.
|
||||
*
|
||||
* This directive is only required if session limiting is enabled.
|
||||
*/
|
||||
maxsessionlimit = 100
|
||||
|
||||
/*
|
||||
* Sets the default expiry time for session exceptions.
|
||||
*
|
||||
* This directive is only required if session limiting is enabled.
|
||||
*/
|
||||
exceptionexpiry = 1d
|
||||
|
||||
/*
|
||||
* The message that will be NOTICE'd to a user just before they are removed from the network because
|
||||
* their host's session limit has been exceeded. It may be used to give a slightly more descriptive
|
||||
* reason for the impending kill as opposed to simply "Session limit exceeded".
|
||||
*
|
||||
* This directive is optional, if not set, nothing will be sent.
|
||||
*/
|
||||
sessionlimitexceeded = "The session limit for your IP %s has been exceeded."
|
||||
|
||||
/*
|
||||
* Same as above, but should be used to provide a website address where users can find out more
|
||||
* about session limits and how to go about applying for an exception.
|
||||
*
|
||||
* Note: This directive has been intentionally commented out in an effort to remind you to change
|
||||
* the URL it contains. It is recommended that you supply an address/URL where people can get help
|
||||
* regarding session limits.
|
||||
*
|
||||
* This directive is optional, if not set, nothing will be sent.
|
||||
*/
|
||||
#sessionlimitdetailsloc = "Please visit http://your.website.url/ for more information about session limits."
|
||||
|
||||
/*
|
||||
* If set and is not 0, this directive tells Services to add an AKILL the number of subsequent kills
|
||||
* for the same host exceeds this value, preventing the network from experiencing KILL floods.
|
||||
*
|
||||
* This directive is optional.
|
||||
*/
|
||||
maxsessionkill = 15
|
||||
|
||||
/*
|
||||
* Sets the expiry time for AKILLs set for hosts exceeding the maxsessionkill directive limit.
|
||||
*
|
||||
* This directive is optional, if not set, defaults to 30 minutes.
|
||||
*/
|
||||
sessionautokillexpiry = 30m
|
||||
|
||||
/*
|
||||
* Sets the CIDR value used to determine which IP addresses represent the same person.
|
||||
* By default this would limit 3 connections per IPv4 IP and 3 connections per IPv6 IP.
|
||||
*/
|
||||
session_ipv4_cidr = 32
|
||||
session_ipv6_cidr = 128
|
||||
killonsqline = yes
|
||||
|
||||
/*
|
||||
* Adds the nickname of the IRC Operator issuing an AKILL to the kill reason.
|
||||
@@ -204,8 +113,7 @@ operserv
|
||||
akillids = yes
|
||||
|
||||
/*
|
||||
* If set, only IRC Operators will be permitted to use OperServ, regardless of module-based command
|
||||
* access restrictions.
|
||||
* If set, only IRC Operators will be permitted to use OperServ, regardless of command access restrictions.
|
||||
*
|
||||
* This directive is optional, but recommended.
|
||||
*/
|
||||
@@ -254,10 +162,10 @@ command { service = "OperServ"; name = "CHANKILL"; command = "operserv/chankill"
|
||||
* Allows you to set services in defcon mode, which can be used to restrict services access
|
||||
* during bot attacks.
|
||||
*/
|
||||
#module { name = "os_defcon" }
|
||||
#command { service = "OperServ"; name = "DEFCON"; command = "operserv/defcon"; }
|
||||
defcon
|
||||
#module
|
||||
{
|
||||
name = "os_defcon"
|
||||
|
||||
/*
|
||||
* Default DefCon level (1-5) to use when starting Services up. Level 5 constitutes normal operation
|
||||
* while level 1 constitutes the most restrictive operation. If this setting is left out or set to
|
||||
@@ -338,7 +246,7 @@ defcon
|
||||
*
|
||||
* This directive is required only when globalondefconmore is set.
|
||||
*/
|
||||
#message = "Put your message to send your users here. Dont forget to uncomment globalondefconmore"
|
||||
#message = "Put your message to send your users here. Don't forget to uncomment globalondefconmore"
|
||||
|
||||
/*
|
||||
* Defines the message that will be sent when DefCon is returned to level 5. This directive is optional,
|
||||
@@ -352,6 +260,7 @@ defcon
|
||||
*/
|
||||
#akillreason = "This network is currently not accepting connections, please try again later."
|
||||
}
|
||||
#command { service = "OperServ"; name = "DEFCON"; command = "operserv/defcon"; }
|
||||
|
||||
/*
|
||||
* os_dns
|
||||
@@ -384,10 +293,10 @@ defcon
|
||||
*
|
||||
* Finally set a NS record for irc.example.com. to BIND or services.
|
||||
*/
|
||||
#module { name = "os_dns" }
|
||||
#command { service = "OperServ"; name = "DNS"; command = "operserv/dns"; permission = "operserv/dns"; }
|
||||
os_dns
|
||||
#module
|
||||
{
|
||||
name = "os_dns"
|
||||
|
||||
/* TTL for records. This should be very low if your records change often. */
|
||||
ttl = 1m
|
||||
|
||||
@@ -412,6 +321,7 @@ os_dns
|
||||
*/
|
||||
readd_connected_servers = no
|
||||
}
|
||||
#command { service = "OperServ"; name = "DNS"; command = "operserv/dns"; permission = "operserv/dns"; }
|
||||
|
||||
/*
|
||||
* os_config
|
||||
@@ -443,6 +353,16 @@ command { service = "OperServ"; name = "FORBID"; command = "operserv/forbid"; pe
|
||||
module { name = "os_ignore" }
|
||||
command { service = "OperServ"; name = "IGNORE"; command = "operserv/ignore"; permission = "operserv/ignore"; }
|
||||
|
||||
/*
|
||||
* os_info
|
||||
*
|
||||
* Provides the command operserv/info.
|
||||
*
|
||||
* Used to add oper only notes to users and channels.
|
||||
*/
|
||||
module { name = "os_info" }
|
||||
command { service = "OperServ"; name = "INFO"; command = "operserv/info"; permission = "operserv/info"; }
|
||||
|
||||
/*
|
||||
* os_jupe
|
||||
*
|
||||
@@ -502,15 +422,16 @@ command { service = "OperServ"; name = "LOGOUT"; command = "operserv/logout"; }
|
||||
*
|
||||
* Used to search services log files.
|
||||
*/
|
||||
module { name = "os_logsearch" }
|
||||
command { service = "OperServ"; name = "LOGSEARCH"; command = "operserv/logsearch"; permission = "operserv/logsearch"; }
|
||||
logsearch
|
||||
module
|
||||
{
|
||||
name = "os_logsearch"
|
||||
|
||||
/* The log file name to search. There should be a log{} block configured to log
|
||||
* to a file of this name.
|
||||
*/
|
||||
name = "services.log"
|
||||
logname = "services.log"
|
||||
}
|
||||
command { service = "OperServ"; name = "LOGSEARCH"; command = "operserv/logsearch"; permission = "operserv/logsearch"; }
|
||||
|
||||
/*
|
||||
* os_mode
|
||||
@@ -553,7 +474,25 @@ command { service = "OperServ"; name = "MODUNLOAD"; command = "operserv/modunloa
|
||||
*
|
||||
* Used to configure news notices shown to users when they connect, and opers when they oper.
|
||||
*/
|
||||
module { name = "os_news" }
|
||||
module
|
||||
{
|
||||
name = "os_news"
|
||||
|
||||
/*
|
||||
* The service bot names to use to send news to users on connection
|
||||
* and to opers when they oper.
|
||||
*/
|
||||
announcer = "Global"
|
||||
oper_announcer = "OperServ"
|
||||
|
||||
/*
|
||||
* The number of LOGON/OPER news items to display when a user logs on.
|
||||
*
|
||||
* This directive is optional, if no set it will default to 3.
|
||||
*/
|
||||
#newscount = 3
|
||||
}
|
||||
|
||||
command { service = "OperServ"; name = "LOGONNEWS"; command = "operserv/logonnews"; permission = "operserv/news"; }
|
||||
command { service = "OperServ"; name = "OPERNEWS"; command = "operserv/opernews"; permission = "operserv/news"; }
|
||||
command { service = "OperServ"; name = "RANDOMNEWS"; command = "operserv/randomnews"; permission = "operserv/news"; }
|
||||
@@ -604,9 +543,84 @@ command { service = "OperServ"; name = "RELOAD"; command = "operserv/reload"; pe
|
||||
*
|
||||
* Provides the commands operserv/exception and operserv/session.
|
||||
*
|
||||
* This module enables session limiting. Session limiting prevents users from connecting more than a certain
|
||||
* number of times from the same IP at the same time - thus preventing most types of cloning.
|
||||
* Once a host reaches it's session limit, all clients attempting to connect from that host will
|
||||
* be killed. Exceptions to the default session limit can be defined via the exception list.
|
||||
*
|
||||
* Used to manage the session limit exception list, and view currently active sessions.
|
||||
*/
|
||||
module { name = "os_session" }
|
||||
module
|
||||
{
|
||||
name = "os_session"
|
||||
|
||||
/*
|
||||
* Default session limit per host. Once a host reaches it's session limit, all clients attempting
|
||||
* to connect from that host will be killed.
|
||||
*
|
||||
* This directive is require if os_session is loaded.
|
||||
*/
|
||||
defaultsessionlimit = 3
|
||||
|
||||
/*
|
||||
* The maximum session limit that may be set for a host in an exception.
|
||||
*
|
||||
* This directive is require if os_session is loaded.
|
||||
*/
|
||||
maxsessionlimit = 100
|
||||
|
||||
/*
|
||||
* Sets the default expiry time for session exceptions.
|
||||
*
|
||||
* This directive is require if os_session is loaded.
|
||||
*/
|
||||
exceptionexpiry = 1d
|
||||
|
||||
/*
|
||||
* The message that will be NOTICE'd to a user just before they are removed from the network because
|
||||
* their host's session limit has been exceeded. It may be used to give a slightly more descriptive
|
||||
* reason for the impending kill as opposed to simply "Session limit exceeded".
|
||||
*
|
||||
* This directive is optional, if not set, nothing will be sent.
|
||||
*/
|
||||
sessionlimitexceeded = "The session limit for your IP %IP% has been exceeded."
|
||||
|
||||
/*
|
||||
* Same as above, but should be used to provide a website address where users can find out more
|
||||
* about session limits and how to go about applying for an exception.
|
||||
*
|
||||
* Note: This directive has been intentionally commented out in an effort to remind you to change
|
||||
* the URL it contains. It is recommended that you supply an address/URL where people can get help
|
||||
* regarding session limits.
|
||||
*
|
||||
* This directive is optional, if not set, nothing will be sent.
|
||||
*/
|
||||
#sessionlimitdetailsloc = "Please visit http://your.website.url/ for more information about session limits."
|
||||
|
||||
/*
|
||||
* If set and is not 0, this directive tells Services to add an AKILL if the number of subsequent kills
|
||||
* for the same host exceeds this value, preventing the network from experiencing KILL floods.
|
||||
*
|
||||
* This directive is optional.
|
||||
*/
|
||||
maxsessionkill = 15
|
||||
|
||||
/*
|
||||
* Sets the expiry time for AKILLs set for hosts exceeding the maxsessionkill directive limit.
|
||||
*
|
||||
* This directive is optional, if not set, defaults to 30 minutes.
|
||||
*/
|
||||
sessionautokillexpiry = 30m
|
||||
|
||||
/*
|
||||
* Sets the CIDR value used to determine which IP addresses represent the same person.
|
||||
* By default this would limit 3 connections per IPv4 IP and 3 connections per IPv6 IP.
|
||||
* If you are receiving IPv6 clone attacks it may be useful to set session_ipv6_cidr to
|
||||
* 64 or 48.
|
||||
*/
|
||||
session_ipv4_cidr = 32
|
||||
session_ipv6_cidr = 128
|
||||
}
|
||||
command { service = "OperServ"; name = "EXCEPTION"; command = "operserv/exception"; permission = "operserv/exception"; }
|
||||
command { service = "OperServ"; name = "SESSION"; command = "operserv/session"; permission = "operserv/session"; }
|
||||
|
||||
@@ -617,7 +631,19 @@ command { service = "OperServ"; name = "SESSION"; command = "operserv/session";
|
||||
*
|
||||
* Used to set various settings such as superadmin, debug mode, etc.
|
||||
*/
|
||||
module { name = "os_set" }
|
||||
module
|
||||
{
|
||||
name = "os_set"
|
||||
|
||||
/*
|
||||
* If set, Services Admins will be able to use SUPERADMIN [ON|OFF] which will temporarily grant
|
||||
* them extra privileges such as being a founder on ALL channels.
|
||||
*
|
||||
* This directive is optional.
|
||||
*/
|
||||
#superadmin = yes
|
||||
}
|
||||
|
||||
command { service = "OperServ"; name = "SET"; command = "operserv/set"; permission = "operserv/set"; }
|
||||
|
||||
/*
|
||||
@@ -659,7 +685,7 @@ command { service = "OperServ"; name = "SVSPART"; command = "operserv/svspart";
|
||||
*
|
||||
* Provides the operserv/snline and operserv/sqline commands.
|
||||
*
|
||||
* Used to ban different things such as realnames, nicknames, and IPs.
|
||||
* Used to ban real names, nick names, and possibly channels.
|
||||
*/
|
||||
module { name = "os_sxline" }
|
||||
command { service = "OperServ"; name = "SNLINE"; command = "operserv/snline"; permission = "operserv/snline"; }
|
||||
|
||||
@@ -1,3 +1,752 @@
|
||||
Revision e3e0da3 - Sat, 12 Oct 2013 15:11:09 -0400 - Update language files
|
||||
Revision 7167cff - Sat, 12 Oct 2013 15:05:42 -0400 - Update changes and changes.conf sort of
|
||||
Revision b844154 - Thu, 10 Oct 2013 18:12:48 +0200 - fixed a typo in the last commit, reported by Robby
|
||||
Revision 5e56dfd - Thu, 10 Oct 2013 07:51:35 +0200 - replaced the country name in the Language header in the language files by four letter codes
|
||||
Revision e1d460e - Wed, 9 Oct 2013 16:27:16 -0400 - Call OnBotPrivmsg after checking if the message is a ctcp, not before. fix typo in opersrev.example.conf
|
||||
Revision 9ea6fb2 - Wed, 9 Oct 2013 22:10:08 +0200 - set the Language header in the language files so msgfmt doesnt complain
|
||||
Revision 7755668 - Sun, 6 Oct 2013 22:07:01 +0200 - updated docs/EVENTS
|
||||
Revision 569efbb - Sat, 5 Oct 2013 13:29:34 -0400 - Fix Windows build
|
||||
Revision 6968014 - Sat, 5 Oct 2013 13:22:56 -0400 - anope.nl_NL.po: Translate newly added string, and fix some spelling/grammar.
|
||||
Revision 1b08ba8 - Sat, 5 Oct 2013 13:21:28 -0400 - Always show expire time for nicks in /ns info to opers, even if the user is online Make Anope::strftime show "now" if the time is now Fix typo in nickalias.cpp for the type of the last_seen field, spotted by grawity
|
||||
Revision 277f735 - Sat, 5 Oct 2013 01:07:51 -0400 - Hide expires in /cs info if the channel is actively in use as it confuses people
|
||||
Revision f63a2bd - Sat, 5 Oct 2013 00:49:12 -0400 - Big update of the Dutch language file. cs_ban: Merge the syntaxes into one.
|
||||
Revision feb412b - Sat, 5 Oct 2013 00:33:03 -0400 - cs_mode: Fix override in /cs mode set.
|
||||
Revision ab85668 - Sat, 5 Oct 2013 00:33:03 -0400 - os_news: Add some logging.
|
||||
Revision 97d7c21 - Sat, 5 Oct 2013 00:33:03 -0400 - Fix logging for log type 'other'. os_ignore: Log expired ignores to the normal log level. cs_drop: Allow Services Operators to actually drop channels in Read-Only mode. os_akill, os_sxline, cs_akick: Log deletions by number.
|
||||
Revision e5b8435 - Sat, 5 Oct 2013 00:33:03 -0400 - Fix not setting -r when channels are deleted
|
||||
Revision e589080 - Sat, 5 Oct 2013 00:33:03 -0400 - Fix /ns alist showing a header/column header if the user has no access
|
||||
Revision 257b10e - Sat, 5 Oct 2013 00:33:03 -0400 - Hide privileged commands in ns help set and cs help set if configured
|
||||
Revision 353ee5c - Sat, 5 Oct 2013 00:33:03 -0400 - Fix xline uid generation when the one chosen already exists
|
||||
Revision b094132 - Sat, 5 Oct 2013 00:33:03 -0400 - Log akill deleteions by number
|
||||
Revision 82006b8 - Sat, 5 Oct 2013 00:33:03 -0400 - cs_entrymsg: Check for the correct override privilege. Make some more commands check if Read-Only mode is active. cs_flags: Show a meaningful message when a user is not found on the access list. os_set: Add missing capabilities to the readonly help output. OperServ: Add logging to certain commands. NickServ: Undo logging for listings.
|
||||
Revision ba5a3f5 - Sat, 5 Oct 2013 00:33:02 -0400 - Don't explicitly reference services nicks. os_forbid: If NickServ is available, have it send the forbid reason instead of OperServ.
|
||||
Revision 7b6c08b - Sun, 29 Sep 2013 17:22:25 -0400 - Exempt ulines/myself from bounce mode check
|
||||
Revision 47b692f - Sun, 29 Sep 2013 15:42:22 -0400 - os_session: Add some empty lines to the session help command to improve readability.
|
||||
Revision ed06609 - Sun, 29 Sep 2013 15:42:22 -0400 - NickServ: Change a few log wordings and add missing log calls to some commands. ns_suspend and cs_suspend: Fix log wording, and correct syntax to show the reason is optional.
|
||||
Revision 32a5715 - Sun, 29 Sep 2013 15:42:22 -0400 - ns_access: Allow LIST by Services Operators on suspended nicks. Change wording. ns_ajoin: Fix the number of command parameters. Check for nick suspension. Do not allow just any Services Operator to access other users' AJOIN, require nickserv/ajoin. Change wording. ns_cert: Add ability for Services Operators to modify other users' certificate lists.
|
||||
Revision 2a5e8f1 - Sun, 29 Sep 2013 15:42:22 -0400 - cs_akick: Make the default autokick reason translatable. os_forbid: It is required to specify a reason.
|
||||
Revision a04c320 - Sun, 29 Sep 2013 15:42:22 -0400 - cs_set: Fix showing expiry time in INFO output. cs_sync: Check for the correct override privilege.
|
||||
Revision 4221a50 - Sun, 29 Sep 2013 15:42:22 -0400 - Fix NickServ default nick expiry time.
|
||||
Revision 44dd8d0 - Sun, 29 Sep 2013 15:41:32 -0400 - Add chanserv:always_lower_ts config option to always lower registered channels timestamps to the creation time which fixes some race conditions regarding users joining empty registered channels and doing things prior to the -o from services coming through.
|
||||
Revision f7aa69b - Sun, 29 Sep 2013 13:04:12 -0400 - Correct expiretmeout and updatetimeout descriptions in example.conf, it is no longer triggerd by /os update
|
||||
Revision d5ecc39 - Sun, 29 Sep 2013 04:23:33 +0200 - display modechars instead of modenames in cpanel channelmodes
|
||||
Revision 84a02d2 - Fri, 27 Sep 2013 20:11:51 -0400 - Remove "Nick" reference from the /os ignore del message, as it can only contain hostmasks
|
||||
Revision 4b059be - Fri, 27 Sep 2013 20:07:07 -0400 - Replace this silly random code generation code with something more sane looking
|
||||
Revision b319fb0 - Fri, 27 Sep 2013 19:11:02 -0400 - Fix compile warnings and errors found by clang
|
||||
Revision 1719688 - Fri, 27 Sep 2013 19:11:02 -0400 - Allow modifying mlock on nonexistant (but registered) channels
|
||||
Revision 02d67f6 - Fri, 27 Sep 2013 19:11:02 -0400 - Allow /os forbid list <type>
|
||||
Revision b306108 - Fri, 27 Sep 2013 19:11:02 -0400 - Fix /os ignore del on nicks
|
||||
Revision 12a0311 - Fri, 27 Sep 2013 19:11:02 -0400 - Add missing columns to os_forbid. Make most lists with dates use the shorter output format.
|
||||
Revision cf653fc - Fri, 27 Sep 2013 19:11:02 -0400 - Fix ms del all not actually deleting some memos Fix numbering of memos in ms list
|
||||
Revision 5cc7fc0 - Fri, 27 Sep 2013 19:11:02 -0400 - Fix ms list crash
|
||||
Revision 832bc35 - Fri, 27 Sep 2013 19:11:02 -0400 - Fix a few more modules to look in the right places for certain settings.
|
||||
Revision 06c5914 - Fri, 27 Sep 2013 19:11:02 -0400 - Fix akillids to work again. os_session: Add missing num to del syntax and add missing expiry column.
|
||||
Revision bf67b9e - Fri, 27 Sep 2013 19:11:02 -0400 - Make column titles in listings translatable.
|
||||
Revision 829c169 - Fri, 27 Sep 2013 19:11:02 -0400 - Translate strftime correctly
|
||||
Revision 4948120 - Fri, 27 Sep 2013 19:11:02 -0400 - Translate SendSyntax() and spacify it properly
|
||||
Revision 994471f - Fri, 27 Sep 2013 19:11:02 -0400 - Align info formatters with translated keys?
|
||||
Revision 80c0274 - Fri, 27 Sep 2013 19:11:02 -0400 - Translate listformatter properly
|
||||
Revision df3c0b7 - Fri, 27 Sep 2013 19:11:02 -0400 - Fix various commands to properly report a given expiry time is invalid
|
||||
Revision 4570299 - Fri, 27 Sep 2013 19:11:02 -0400 - ns_cert, ns_set: Make strings equal for one translation instance
|
||||
Revision 9756f96 - Fri, 27 Sep 2013 19:11:02 -0400 - example.conf: nickserv:emailregistration -> nickserv:registration
|
||||
Revision 6ac0364 - Fri, 27 Sep 2013 19:11:02 -0400 - Fix os_stats to display SQLINEs and SNLINEs on non-supporting IRCds
|
||||
Revision 4f820a7 - Fri, 27 Sep 2013 19:11:02 -0400 - Fix typos, remove dead language defines. os_set: Add missing debug text in help output.
|
||||
Revision 5f7127d - Fri, 27 Sep 2013 19:11:01 -0400 - Don't send regex qlines and nlines to the IRCd
|
||||
Revision dcb3ff7 - Fri, 27 Sep 2013 19:10:49 -0400 - Dont send BURST twice on inspircd Drop matching nicks on forbid.
|
||||
Revision 1107b92 - Fri, 27 Sep 2013 18:02:26 -0400 - Drop matching channels on forbid, and enforce nick forbids even on IRCds with no qlines
|
||||
Revision 3b0b1bc - Fri, 27 Sep 2013 18:02:26 -0400 - Don't send SQLines unless the IRCd supports it
|
||||
Revision b60b23f - Fri, 27 Sep 2013 17:21:46 -0400 - Only allow using os_oper add and del if you have the privileges for what you are giving or taking.
|
||||
Revision 5aac637 - Fri, 27 Sep 2013 17:21:31 -0400 - Correctly detect override in cs_ban on masks
|
||||
Revision 20856fb - Fri, 27 Sep 2013 17:21:20 -0400 - Remove +r etc when channels are deleted
|
||||
Revision 7545763 - Fri, 27 Sep 2013 17:21:20 -0400 - Added missing override capabilities and log calls to some ChanServ commands
|
||||
Revision 1818b19 - Fri, 27 Sep 2013 16:33:56 -0400 - Fix cs_mode lock reply if nothing is done Fix not clearing forbids when os_forbid is unloaded Apply nick and chan forbids when added Fix loading forbids until after the service is constructed
|
||||
Revision abc7e4b - Fri, 27 Sep 2013 16:33:03 -0400 - Fix os_news to not load items until the news service is constructed Fix session exceptions not expirigin
|
||||
Revision e5ece18 - Fri, 20 Sep 2013 21:09:35 -0400 - Readonlyize many commands
|
||||
Revision 8641b99 - Fri, 20 Sep 2013 15:21:32 -0400 - Merge the two memo del events into one. Since they had the same name it was confusing the event system
|
||||
Revision b880240 - Thu, 19 Sep 2013 13:35:52 -0400 - Make os_session akill ip ranges and not individual user's ips
|
||||
Revision 5ce90ba - Thu, 19 Sep 2013 12:38:28 -0400 - Fix not updating last_seen on expire nick for nicks with secure off. Don't show Expires in /ns info if the nick is online currently as it confuses people
|
||||
Revision 98bae82 - Mon, 16 Sep 2013 15:54:09 -0400 - Require confirmation in /cs drop by requesting the channel name twice
|
||||
Revision e3c05ef - Mon, 16 Sep 2013 06:47:42 -0400 - Remove static variables from functions in modules which causes them to be marked as gnu unique objects, which breaks dlclose()/dlopen() on g++ 4.5+
|
||||
Revision 8cbaf7e - Thu, 12 Sep 2013 07:20:26 -0400 - Update Spanish translation, from Isaac Fontal <i_fontal@hotmail.com>
|
||||
Revision 339f41a - Sun, 8 Sep 2013 21:53:06 -0400 - Fix allowing duplicate entries on the snline list Have proto mods recognize cidr ranges as zlineable IPs Remove operserv/global from global.conf because its dumb Fix example config ~botserv/set example to work as expected
|
||||
Revision 55e4ef9 - Sun, 8 Sep 2013 06:02:35 -0400 - Fix logging /os set list. Enforce snlines on ircds that can't have snlines set by just killing the user. Fix double call to OnMatch() when a user matches an xline
|
||||
Revision f63e4ce - Sun, 8 Sep 2013 04:55:03 -0400 - Alpabetize channels in /ns alist and on webcpanels chanserv page
|
||||
Revision b005089 - Tue, 3 Sep 2013 19:58:40 -0400 - Dont allow multiple list modes with the same param on the mode list at once
|
||||
Revision 1b42e26 - Tue, 3 Sep 2013 19:40:03 -0400 - Cap mode stacker max line length
|
||||
Revision 4691351 - Tue, 3 Sep 2013 18:51:18 -0400 - Cleanup previous commit Fix log messages from commands send through webpanel Don't show OperServ section to non opers
|
||||
Revision 404debf - Tue, 3 Sep 2013 04:37:09 +0200 - updated the chanserv section in webcpanel
|
||||
Revision 752a5ca - Sat, 31 Aug 2013 08:46:56 +0200 - add vhost support for hybrid
|
||||
Revision e1a1cf0 - Thu, 29 Aug 2013 23:22:48 -0400 - Dont crash on HasPriv() on an empty access group
|
||||
Revision 3fabc2f - Thu, 29 Aug 2013 23:13:29 -0400 - Fix ns_ajoin on unregisterd +i channels
|
||||
Revision 59ea36c - Tue, 27 Aug 2013 03:18:43 -0400 - Move Serialize::Types to construct after the corresponding extensible items they require when unserializing
|
||||
Revision fac8806 - Tue, 27 Aug 2013 02:56:54 -0400 - Make chanserv:require not default to r
|
||||
Revision 7f890ce - Mon, 26 Aug 2013 02:05:41 -0400 - Log parameters given to /cs mode set. Add logging to /os ignore.
|
||||
Revision 50e1a3e - Mon, 26 Aug 2013 02:00:25 -0400 - Fix status mlocks. Fix reply from lock add.
|
||||
Revision 6b79349 - Sun, 25 Aug 2013 23:26:45 -0400 - Fix User::IsIdentified with check_nick, do not remove +r on bursting clients until after server sync
|
||||
Revision 678f549 - Sun, 25 Aug 2013 22:57:26 -0400 - Fix not resetting channel status modes on our clients when a channel ts lowers
|
||||
Revision 714a4a3 - Sun, 25 Aug 2013 21:33:52 -0400 - Remove unnecesary mlock code in cs_mode, change mode set events to never bounce modes set by bots or servers, as it was possible to get modules to fight with each other
|
||||
Revision 34826f7 - Sun, 25 Aug 2013 01:49:42 -0700 - Merge pull request #22 from fgsch/misc
|
||||
Revision 847ccea - Sun, 25 Aug 2013 04:48:43 -0400 - Create persistent channels on startup, which used to work and got lost somewhere Fix some oddities with using persistent channels with no botserv Send list modes to uplink when bursting Fix issues with persist + keepmodes Fix /os modes clear all not clearing all status modes Fix operwall on ratbox/plexus Dont apply mlock in SetCorrectModes since that just recursively calls itself unncessarially Change command logging to show the command name and not the service name
|
||||
Revision 09046e3 - Sun, 25 Aug 2013 04:48:43 -0400 - Show what kind of nick protection is enabled in /ns info
|
||||
Revision 00a1952 - Sun, 25 Aug 2013 04:48:43 -0400 - Add logging to several operserv commands
|
||||
Revision 446b3a9 - Sun, 25 Aug 2013 04:48:43 -0400 - Save unconfirmed status and passcodes in the database. Fix db_sql_live to not reinsert all records if there are extra columns. Plexus has no chmode +r
|
||||
Revision 76f5d4b - Sun, 25 Aug 2013 04:54:35 +0100 - Sort parameters and correct comments
|
||||
Revision 9b59925 - Sun, 25 Aug 2013 04:54:32 +0100 - For ngIRCd, on nick change set mode -R
|
||||
Revision 243d781 - Sat, 24 Aug 2013 17:56:46 +0100 - Add login support for ngIRCd
|
||||
Revision 8be5f53 - Fri, 23 Aug 2013 09:59:28 -0700 - Merge pull request #21 from Phr33d0m/1.9
|
||||
Revision cd49bb4 - Fri, 23 Aug 2013 11:57:32 +0200 - Use CDN for the rest of the .js files
|
||||
Revision ef3d115 - Fri, 23 Aug 2013 04:42:24 -0400 - Merge branch '1.9' of github.com:anope/anope into 1.9
|
||||
Revision 9f1178e - Fri, 23 Aug 2013 04:36:02 -0400 - Remove SSL cert verification because we dont use it
|
||||
Revision 3bc2db5 - Fri, 23 Aug 2013 04:13:08 -0400 - Fix reading post data in m_httpd
|
||||
Revision fad603e - Fri, 23 Aug 2013 00:03:58 -0700 - Merge pull request #20 from Phr33d0m/1.9
|
||||
Revision 5f006bf - Fri, 23 Aug 2013 08:42:45 +0200 - Fixed an incorrect layout, a couple of typos and a wrong form action
|
||||
Revision aaa12cc - Fri, 23 Aug 2013 08:11:24 +0200 - Use a local copy of the background image
|
||||
Revision 2238db8 - Fri, 23 Aug 2013 08:06:47 +0200 - Make the navbar brand a different font to distinguish it from the rest of the navbar links.
|
||||
Revision 4d1492d - Fri, 23 Aug 2013 01:14:00 -0400 - Remove webpanel:ssl configuration option because its dumb
|
||||
Revision 5c4414e - Fri, 23 Aug 2013 07:05:57 +0200 - Removed innecessary logo width, the img-responsive will take care of that.
|
||||
Revision 6f9b77e - Fri, 23 Aug 2013 07:04:09 +0200 - Don't use an external svg logo anymore, but a local png one.
|
||||
Revision 154fa25 - Fri, 23 Aug 2013 00:57:36 -0400 - Fix m_httpd handling fragmented http requests
|
||||
Revision 9793062 - Fri, 23 Aug 2013 06:43:57 +0200 - Merge branch '1.9' of github.com:anope/anope into 1.9
|
||||
Revision f86dc24 - Fri, 23 Aug 2013 06:39:23 +0200 - Redesign body of the pages. Now they have a distiguished panel heading and panel body. Also added background colour to currently selected section.
|
||||
Revision 2b1f75a - Thu, 22 Aug 2013 22:45:20 -0400 - Fix m_httpd enabling ssl if m_ssl is loaded after it
|
||||
Revision 5ac0c9a - Thu, 22 Aug 2013 17:33:16 -0400 - Fix previous commit
|
||||
Revision e8763d5 - Thu, 22 Aug 2013 01:48:17 -0400 - Always set +o on users who have access for it, even if higher modes have a prefix
|
||||
Revision ce7a32a - Thu, 22 Aug 2013 01:13:28 -0400 - Do not have cs_access try to represent non levels access entries as levels access entries. Sometimes it cant accurately be done and it confuses people.
|
||||
Revision 0c1cc08 - Wed, 21 Aug 2013 23:22:27 -0400 - Update readme more
|
||||
Revision e12e4e6 - Wed, 21 Aug 2013 23:20:05 -0400 - Update readme
|
||||
Revision 52535cf - Wed, 21 Aug 2013 20:17:20 -0700 - Merge pull request #19 from Phr33d0m/1.9
|
||||
Revision 121d0a6 - Thu, 22 Aug 2013 03:27:29 +0200 - Fix a typo and remove unnecessary 'effects'
|
||||
Revision 3453581 - Thu, 22 Aug 2013 02:37:43 +0200 - A completely rewritten Control Panel using some bootstrapping, jquery and lots of CSS
|
||||
Revision 8bcc684 - Thu, 22 Aug 2013 02:36:01 +0200 - Nuking the old design with fire
|
||||
Revision 08d1133 - Thu, 22 Aug 2013 02:32:04 +0200 - Fix incorrect GET method as we are submitting POST data
|
||||
Revision 7659430 - Wed, 21 Aug 2013 01:35:57 -0400 - Always require the registered channel mode is set. Comment out default config requiring "r" as some ircds use it for registered users only
|
||||
Revision 17cca42 - Wed, 21 Aug 2013 01:27:14 -0400 - Make maxaliases=0 really mean no limit
|
||||
Revision 760fdc4 - Sun, 18 Aug 2013 14:42:59 -0400 - Fix not setting vhost on nickserv update
|
||||
Revision ead4aa7 - Sat, 17 Aug 2013 14:05:01 -0400 - Fix 318 raw being sent for uids on ts6 ircds
|
||||
Revision 65911dd - Wed, 14 Aug 2013 19:50:08 -0400 - Replace some get calls on <bool> extenisble types with hasext
|
||||
Revision 4abfdcb - Wed, 14 Aug 2013 18:24:04 -0400 - Do not default mlock +r, it is unnecessray and only clutters up the mlock list
|
||||
Revision de5c8c0 - Mon, 12 Aug 2013 15:45:50 -0400 - Fix some issues with suspend
|
||||
Revision 8e011bb - Mon, 12 Aug 2013 15:44:28 -0400 - Respond to remote whois on inspircd for users on us that aren't service bots
|
||||
Revision f15a974 - Mon, 12 Aug 2013 14:36:49 -0400 - Use less strict valid ident checks on hybrid, unreal, and inspircd
|
||||
Revision f1956b0 - Sun, 11 Aug 2013 17:14:39 -0400 - Remove channels from accesss lists when they expire/drop
|
||||
Revision 53d5b7c - Sun, 11 Aug 2013 16:04:10 -0400 - Fix chanserv opersonly setting
|
||||
Revision 812cb04 - Sun, 11 Aug 2013 15:48:46 -0400 - Add DNS Notify support
|
||||
Revision 1314d5b - Sun, 11 Aug 2013 15:38:09 -0400 - Fix cs_kee_pmodes default
|
||||
Revision 490601d - Sun, 11 Aug 2013 12:25:58 -0400 - Fix chghost on charybdis
|
||||
Revision c7aab50 - Sat, 10 Aug 2013 23:28:58 -0400 - Support DNS ANY query type
|
||||
Revision c507c78 - Sat, 10 Aug 2013 17:59:31 -0400 - Do not have ratbox or plexus pull modes from hybrid, it is entirely too confusing. Also fix cs_mode config
|
||||
Revision 58c0568 - Sat, 10 Aug 2013 17:43:13 -0400 - Add "simple seen" mode to cs_seen
|
||||
Revision f8cdcc6 - Sat, 10 Aug 2013 14:26:27 -0700 - Merge pull request #18 from fgsch/1.9
|
||||
Revision 10a918f - Sat, 10 Aug 2013 12:33:27 -0400 - Default some listmax config settings to 50
|
||||
Revision e4d1769 - Sat, 10 Aug 2013 12:29:12 -0400 - Add os_info
|
||||
Revision 7cd80a2 - Thu, 8 Aug 2013 03:03:57 +0000 - Fix logging LOG_NORMAL logs in m_sqllog. Fix/add more compat extensible items to ChannelInfo::Unserialize
|
||||
Revision 9d6f88d - Wed, 7 Aug 2013 23:44:58 +0100 - Add certificate fingerprint support for ngIRCd
|
||||
Revision b93d650 - Wed, 7 Aug 2013 21:19:49 +0000 - Revert "Shrink to fit module event vectors when modules are removed from them" Sometimes the events call the function the event is in, which causes a resize while the original function is iterating.
|
||||
Revision c480695 - Wed, 7 Aug 2013 19:40:05 +0000 - Fix db_sql to not remove objects when shutting down, as some modules that unload before it when shutting down remove their items then
|
||||
Revision 7f1b555 - Wed, 7 Aug 2013 17:27:18 +0000 - Shrink to fit module event vectors when modules are removed from them
|
||||
Revision 4865a8c - Wed, 7 Aug 2013 16:44:35 +0000 - Add m_sql_log
|
||||
Revision 1efd289 - Wed, 7 Aug 2013 15:03:11 +0000 - Fix inspircd jupe mess again, it wasn't working when juping servers that didn't already exist
|
||||
Revision 83e4b18 - Thu, 1 Aug 2013 14:07:56 +0000 - Add keepmodes setting
|
||||
Revision 1e625b6 - Thu, 1 Aug 2013 13:39:35 +0000 - Use MessageSource as the source for many IRCDProto funcs Keep track of what user modes are oper only/server only/etc
|
||||
Revision 402c624 - Mon, 29 Jul 2013 12:02:40 +0000 - Move chanstats stuff to stats/
|
||||
Revision fde83f6 - Fri, 26 Jul 2013 21:40:16 -0400 - Rethink jupe/squit thing somewhat. Workaround for the inspircd rsquit/squit mess
|
||||
Revision f0f43cf - Fri, 26 Jul 2013 12:57:36 -0400 - Fix build on late versions of cmake 2.4
|
||||
Revision 3dc64ba - Fri, 26 Jul 2013 08:45:44 -0400 - Fix issues with 'Me' related to previous commit
|
||||
Revision 2450a64 - Fri, 26 Jul 2013 07:38:42 -0400 - Interally quit servers when juped
|
||||
Revision b48293a - Tue, 23 Jul 2013 10:04:44 -0700 - Merge pull request #17 from fgsch/1.9
|
||||
Revision e908dc0 - Tue, 23 Jul 2013 18:03:32 +0100 - Make ChannelModeStatus level mandatory
|
||||
Revision 378c920 - Mon, 22 Jul 2013 23:45:08 -0400 - Squashed commit of the following from Federico G. Schwindt <fgsch@lodoss.net>: Date: Mon Jul 22 22:40:07 2013 +0100
|
||||
Revision 779f378 - Sun, 21 Jul 2013 18:29:35 -0400 - More validation stuff from fgs
|
||||
Revision 604da89 - Sun, 21 Jul 2013 03:59:59 -0400 - More basic config validation, and fix crash when no uplinks are configured. spotted by fgs
|
||||
Revision e11abdc - Sun, 21 Jul 2013 00:37:21 -0400 - Fix m_ldap service names from defaulting ldap/ldap/main
|
||||
Revision 5aac04d - Sun, 21 Jul 2013 00:23:24 -0400 - Move SendLogin() back to User::Identify, it was moved at some point? but doesn't as intended in ::Login
|
||||
Revision 7480fbd - Sat, 20 Jul 2013 23:36:20 -0400 - Fix removing old connections in m_ldap and m_mysql
|
||||
Revision 9629ccb - Sat, 20 Jul 2013 19:46:13 -0400 - Fix more compile warnings found on newer g++ versions
|
||||
Revision cb70d97 - Sat, 20 Jul 2013 09:19:52 -0400 - Change cs_xop access check to use command order
|
||||
Revision 6db0186 - Sat, 20 Jul 2013 03:06:20 -0400 - Fix not setting the correct compile flags on modules and fix the resulting warnings
|
||||
Revision 492eac2 - Sat, 20 Jul 2013 03:06:20 -0400 - Fix restoring topics on uplink sync
|
||||
Revision c8511a6 - Sat, 20 Jul 2013 03:06:20 -0400 - Fix unserializaing seeninfos
|
||||
Revision f6b915a - Fri, 19 Jul 2013 22:28:33 +0200 - added whois support to the ngircd protocol module, thanks to fgs for sending the patch
|
||||
Revision 02c1724 - Fri, 19 Jul 2013 22:11:40 +0200 - some updates to the german langfile, thanks to kaylee for translating
|
||||
Revision 7e87bb6 - Mon, 15 Jul 2013 23:59:19 -0400 - Default xlines to be set by me
|
||||
Revision aae522d - Mon, 15 Jul 2013 23:23:54 -0400 - Fix ModeManager::GetStatusChar
|
||||
Revision 0a82164 - Sun, 14 Jul 2013 20:37:42 -0400 - Fix deleting seeninfos
|
||||
Revision 37733de - Sun, 14 Jul 2013 03:16:23 -0400 - Fix Extensible<bool>::Set with a value (which is redundant due to the bool specailization)
|
||||
Revision eabb9c0 - Mon, 8 Jul 2013 20:35:04 -0400 - Fix deleting badwords/modes/logs etc
|
||||
Revision b103d16 - Mon, 8 Jul 2013 15:48:37 -0400 - Fix loading some older compat flags and showing noexpire on /ns info
|
||||
Revision e3b6ae3 - Mon, 8 Jul 2013 07:42:35 +0200 - added missing NOTICE support to hybrid. sorry
|
||||
Revision 0ff48e1 - Sun, 7 Jul 2013 23:13:29 -0400 - Move op/deop/etc back to an actual command, its too hard to use cs_log with it as rewrites. Allow cs_log to work with either command names or service names.
|
||||
Revision 53038d8 - Sun, 7 Jul 2013 23:13:16 -0400 - Wipe services's module dir prior to make install
|
||||
Revision 2ea594d - Mon, 8 Jul 2013 05:05:13 +0200 - added protocol support for incoming NOTICEs
|
||||
Revision e957c7b - Mon, 8 Jul 2013 05:04:04 +0200 - m_dnsbl: updated the url to DroneBL in modules.example.conf
|
||||
Revision 9a4f27e - Fri, 5 Jul 2013 02:19:06 -0400 - Only set stuff in ExtensibleUnserialize if there is something to set
|
||||
Revision fccc4a4 - Fri, 5 Jul 2013 02:09:43 -0400 - Fix sometimes not unloading all modules on shutdown
|
||||
Revision 4325073 - Fri, 5 Jul 2013 02:09:27 -0400 - Fix ns_set_misc and cs_set_misc
|
||||
Revision 55199f0 - Thu, 4 Jul 2013 23:05:30 -0400 - Read most of the old common flags for compat
|
||||
Revision 7edc76f - Thu, 4 Jul 2013 23:05:30 -0400 - Fix deleting mode locks
|
||||
Revision 3fbdde5 - Thu, 4 Jul 2013 20:04:51 -0400 - Fix Extensible dtor
|
||||
Revision 9f8b4ac - Thu, 4 Jul 2013 01:21:14 -0400 - Allow access and flags to take privilege names
|
||||
Revision 998925c - Thu, 4 Jul 2013 01:19:40 -0400 - Fix rehashing via SIGHUP and m_mysql
|
||||
Revision 7f97104 - Wed, 3 Jul 2013 22:45:00 -0400 - Allow channels on access lists
|
||||
Revision c2e1a8a - Wed, 3 Jul 2013 19:44:13 -0400 - Fix some warnings and errors reported by valgrind
|
||||
Revision c62b3cb - Tue, 2 Jul 2013 01:56:13 -0400 - Fix a few issues found by Attila (invalid array access in channel set events, os_chankill inf loop)
|
||||
Revision 1a3d9a0 - Mon, 1 Jul 2013 22:17:52 -0400 - Change extensible keys to require explicitly having a type defined for it. Completely modularize more features like bs_kick, entrymsg, log, mode, etc. Move fantasy to its own module. Move greet to its own module.
|
||||
Revision 518182a - Sun, 30 Jun 2013 05:28:01 +0200 - m_mysql: handle multiple result sets returned from multiple statements or procedure calls
|
||||
Revision 7d0e063 - Sat, 22 Jun 2013 17:06:48 +0200 - added the missing accessmax option to the ns_cert configuration block
|
||||
Revision 5e36d84 - Sat, 22 Jun 2013 13:41:05 +0200 - pseudoclients now trigger OnJoinChannel and OnPartChannel
|
||||
Revision fee461f - Sat, 22 Jun 2013 13:40:19 +0200 - added support for CertFP on hybrid
|
||||
Revision 1773eef - Wed, 19 Jun 2013 20:53:40 -0400 - Don't enforce usestrictprivmsg on TS6 IRCds and cache the value of usestrictprivmsg
|
||||
Revision 7704ee7 - Wed, 19 Jun 2013 20:07:15 -0400 - Removed inspircd 1.1 reference from conf. Corrected a few spelling issues.
|
||||
Revision 5ac1e91 - Wed, 19 Jun 2013 19:03:56 -0400 - Set vhosts when users id to an account (and not a nick), add account arg to user ctor to ease handling users who connect already identified
|
||||
Revision 5695c9e - Tue, 18 Jun 2013 08:01:36 +0200 - fixed a typo in the last commit. sorry.
|
||||
Revision f92b0d6 - Tue, 18 Jun 2013 07:48:07 +0200 - added support for hybrids new umode +S (client is connected via SSL/TLS)
|
||||
Revision fc527b4 - Tue, 18 Jun 2013 07:35:47 +0200 - checking for ssl users when ajoining ssl only channels on inspircd, fixes 1466
|
||||
Revision a93b315 - Sat, 15 Jun 2013 23:27:01 -0400 - Fix cidr::match with odd cidr ranges
|
||||
Revision 5246424 - Sat, 15 Jun 2013 07:11:50 +0200 - added an 'extras' script to enable/disable extra modules before compile
|
||||
Revision 1316147 - Sat, 15 Jun 2013 00:09:25 +0000 - Update Spanish translation, courtesy of Isaac Fontal
|
||||
Revision 70319ab - Thu, 13 Jun 2013 20:50:59 -0400 - Fix usestrictprivmsg /msg vs / logic
|
||||
Revision 7dd3589 - Wed, 12 Jun 2013 02:33:30 +0000 - Fix possible crash in Extensible::ExtensibleUnserialize if a null entry is in it
|
||||
Revision d463ae3 - Wed, 12 Jun 2013 02:30:21 +0000 - Allow users to change their language to english when the default language is not
|
||||
Revision ebda113 - Thu, 6 Jun 2013 17:28:59 +0100 - Made the message for unconfirmed nicks relevant to the ns_register registration setting
|
||||
Revision 6ab6eca - Wed, 5 Jun 2013 20:56:16 +0100 - fixed typo, though I doubt it affects anyone/anything
|
||||
Revision b1ba1ec - Sat, 1 Jun 2013 21:58:08 -0400 - Made sepstream::GetToken less recursiveish
|
||||
Revision 9956da1 - Sat, 1 Jun 2013 21:56:52 -0400 - Move OnJoinChannel event to trigger after the user has completely joined and document it more about what you should and shouldnt do in it
|
||||
Revision b56e71a - Sat, 1 Jun 2013 14:55:45 -0400 - Move CheckKick event to Channel and make os_forbid use it instead of kicking users in the join event, which does bad things
|
||||
Revision 6f45d72 - Fri, 31 May 2013 18:34:21 -0400 - Made m_mysql's Escape() function safe against escaping strings > BUFSIZE
|
||||
Revision f5c01bf - Fri, 31 May 2013 01:44:32 -0400 - Fix /hs waiting
|
||||
Revision 06bad31 - Tue, 28 May 2013 22:17:22 -0400 - Fix Channel::SetCorrectModes to never remove modes <= voice (currently secureops enforces everything, inclurding voice)
|
||||
Revision 576aaff - Tue, 28 May 2013 21:07:07 -0400 - Don't compare system time to a users timestamp to determine when to collide with a user, if the time on services vs the ircd are different it does weird things
|
||||
Revision c5bc8fa - Tue, 28 May 2013 13:51:23 -0400 - Include <iterator> in services.h as now more than one file uses it
|
||||
Revision f6e2ebe - Tue, 28 May 2013 13:43:45 -0400 - Fixup last commit. We have events in log's destructor so we cant log messages from it, and this check in modulemanager is bogus/has a typo
|
||||
Revision 37b3535 - Mon, 27 May 2013 19:36:37 -0400 - Initially attach all modules to all events, and detach them as the events are run if they are not implemented per module
|
||||
Revision c21e8d9 - Sun, 26 May 2013 19:34:58 -0400 - Fix webcpanel build
|
||||
Revision 22658d6 - Sun, 26 May 2013 17:13:11 -0400 - Get rid of the remaining references in the core to specific services. Move more stuff out of the core to the proper modules.
|
||||
Revision f2dee1e - Sun, 26 May 2013 15:27:28 -0400 - Update INSTALL and place some example link configurations in example.conf
|
||||
Revision 968ef34 - Sat, 25 May 2013 15:47:56 -0400 - Update Hybrid protocol module for Hybrid 8.1
|
||||
Revision d6640ed - Sat, 25 May 2013 14:08:50 -0400 - Give an error message when the configuration file ends with an unterminated block
|
||||
Revision aabc217 - Mon, 20 May 2013 23:45:41 -0400 - Fix /join 0
|
||||
Revision d82391e - Mon, 20 May 2013 06:42:38 +0200 - made our database backup filenames more readable
|
||||
Revision 7aa0286 - Sun, 19 May 2013 01:11:55 -0400 - Mark service:channels as a "botchannel" and don't try to hold them on sync, as the client should always be in the channel
|
||||
Revision 2a8202c - Sat, 18 May 2013 23:45:10 -0400 - Give botserv bots assigned by persist the same botmodes as normal bots, fix some typos, remove unused variable
|
||||
Revision be4a39c - Sat, 18 May 2013 15:47:26 -0400 - Fix desync when empty permanent channels are dropped on ircds that no have permanent channel mode
|
||||
Revision a3dc75c - Sat, 18 May 2013 14:46:42 -0400 - Ignore define{} blocks defining directives to itself
|
||||
Revision 14dc142 - Sat, 18 May 2013 14:26:18 -0400 - Add botserv bot usermode config option
|
||||
Revision 51b7d53 - Sat, 18 May 2013 13:08:26 -0400 - Add a config option for the default log bot
|
||||
Revision 3253455 - Sat, 18 May 2013 12:25:26 -0400 - Tabify some stuff in config.cpp
|
||||
Revision 879b310 - Sat, 18 May 2013 00:27:03 -0400 - Fix Windows build
|
||||
Revision 5ff3aa7 - Fri, 17 May 2013 23:45:02 -0400 - Yet another variable shadowing error which only show on newer gcc versions
|
||||
Revision ca93122 - Fri, 17 May 2013 23:20:24 -0400 - You would think my compiler would at least warn me about this. but no.
|
||||
Revision 2428264 - Fri, 17 May 2013 23:04:18 -0400 - Add Redis database support
|
||||
Revision cc4a14b - Fri, 17 May 2013 22:53:55 -0400 - Removed some hard coded command names in help output
|
||||
Revision 934b584 - Wed, 15 May 2013 03:23:20 +0200 - do not validate nicks from ulined servers. this also fixes bug #1521
|
||||
Revision 4237d49 - Sun, 12 May 2013 11:09:34 +0200 - improved handling of mlocks and topiclocks on inspircd
|
||||
Revision 1c36de5 - Sat, 11 May 2013 17:13:01 +0100 - Fix config to default prepend_channel true for fantasy
|
||||
Revision da948be - Sat, 11 May 2013 17:06:16 +0100 - Update botserv.example.conf for xop fantasy commands
|
||||
Revision 9384a4f - Fri, 10 May 2013 16:17:24 -0400 - Fix ChannelMode::CanSet
|
||||
Revision 4d62c67 - Fri, 10 May 2013 20:18:48 +0100 - Fix typo in example.conf - thx rodr1go
|
||||
Revision 7426b3b - Wed, 8 May 2013 20:53:28 -0400 - Readd check for users.size() == 1 before holding channels
|
||||
Revision 735e234 - Wed, 8 May 2013 20:26:45 -0400 - Fixed some issues and desyncs with creating empty permanent channels on startup & dropping empty channels
|
||||
Revision 735f0ba - Wed, 8 May 2013 18:26:23 -0400 - Fix crash when we kill users because of a double free
|
||||
Revision 9ee7c82 - Wed, 8 May 2013 18:15:39 -0400 - Check for peace being on before denying a mode change in cs_mode
|
||||
Revision 912103e - Wed, 8 May 2013 11:31:20 -0400 - Allow using sxlines on ircds that do not support them, since we always enforce them anyway
|
||||
Revision f843e7b - Wed, 8 May 2013 11:13:48 -0400 - Fix suspend info output in info and improved it
|
||||
Revision d7e2ab6 - Wed, 8 May 2013 10:40:46 -0400 - Add activate_on_set option for hostserv
|
||||
Revision 5e70851 - Wed, 8 May 2013 10:12:31 -0400 - Fix reading multi line quotes from the conf with blank lines or lines with only whitespace
|
||||
Revision 9b07e16 - Wed, 8 May 2013 09:50:43 -0400 - Make sockaddrs/cidr not throw on invalid ips to give us an easier/cheaper way to test for a valid IP
|
||||
Revision 6859dec - Tue, 7 May 2013 00:24:37 -0400 - Fix setting some default flags, reading fantasy blocks, and minusers setting being off by 1
|
||||
Revision e23baf4 - Tue, 7 May 2013 00:06:02 -0400 - Allow /os exception to contain CIDR masks
|
||||
Revision c7f77b3 - Mon, 6 May 2013 23:48:18 -0400 - Fix a few issues with the poll socketengine
|
||||
Revision 6578829 - Mon, 6 May 2013 22:18:38 -0400 - Use I_OnUserQuit for os_session because I_OnPreUserLogoff gets called too late, after the users server can be gone. Fix a couple other small things
|
||||
Revision ef06226 - Mon, 6 May 2013 07:40:43 -0400 - Update the rest of modules.example.conf, default inspircd status modes to a sane rank incase they are prefixless, and 50 other things
|
||||
Revision 4c669b9 - Sun, 5 May 2013 22:49:29 -0700 - Merge pull request #14 from attilamolnar/1.9+inspmodes
|
||||
Revision 3fbb493 - Mon, 6 May 2013 01:38:27 -0400 - Fix extras build
|
||||
Revision 223aa65 - Mon, 6 May 2013 07:28:23 +0200 - removed an unused variable
|
||||
Revision fe54dfb - Sun, 5 May 2013 23:47:45 -0400 - Don't forget to CloseHandle threads on win32, spotted by Attila
|
||||
Revision 3f5f84c - Sun, 5 May 2013 21:18:47 -0400 - The const char* specialization of this no longer works
|
||||
Revision 5b3f81e - Sun, 5 May 2013 21:05:43 -0400 - That doesn't work either, just don't use references. find ./ -name '*.cpp' -exec sed -i 's/Get<const Anope::string\&>/Get<const Anope::string>/g' {} \;
|
||||
Revision 3e8752f - Sun, 5 May 2013 20:38:57 -0400 - The default arguments are references to temporaries which fall out of scope once the function returns, so we can't use them. gcc is just nice. cronus sucks. also validate a few more config options
|
||||
Revision 57c2b65 - Sun, 5 May 2013 03:30:08 -0400 - Move module header files to include/modules to fix naming conflicts with system headers
|
||||
Revision a118946 - Sun, 5 May 2013 03:04:01 -0400 - Fix Windows
|
||||
Revision ee2dcf1 - Sun, 5 May 2013 02:49:32 -0400 - Cache timeoutcheck and fix a typo in example.conf
|
||||
Revision e91de41 - Sun, 5 May 2013 02:00:33 -0400 - Add an option to sepstream to allow it to return empty tokens if multiple separators are found in a row
|
||||
Revision 10b5b00 - Sun, 5 May 2013 01:58:45 -0400 - Dont check for noquit/quitstorm, check and be sure all users are gone regardless
|
||||
Revision 2044b4d - Sun, 5 May 2013 01:57:24 -0400 - Cleanup of dns stuff based on stuff found making inspircd's module
|
||||
Revision 1d0bb9b - Sun, 5 May 2013 01:55:04 -0400 - Rework the config file reader to be much more flexible and move many configuration directives to the actual modules they are used in.
|
||||
Revision 781defb - Tue, 16 Apr 2013 01:58:29 -0500 - Move extras header files out of extras so when users copy modules out they dont need the headers too
|
||||
Revision 16c124d - Mon, 15 Apr 2013 01:00:45 -0500 - Rewrote modules/CMakeLists.txt and do not build the 'extras' modules, if users want them built they should copy or symlink them out of extras
|
||||
Revision f08dbce - Sun, 14 Apr 2013 17:39:01 -0500 - Allow assigning service bots via /invite
|
||||
Revision baabc91 - Sat, 13 Apr 2013 16:36:39 -0500 - Fix a few of the earlier changes to os_forbid
|
||||
Revision 81483ae - Sat, 13 Apr 2013 06:05:17 +0000 - Fix build on Solaris
|
||||
Revision 003140b - Fri, 12 Apr 2013 16:20:51 -0500 - Fix Windows build
|
||||
Revision b405484 - Fri, 12 Apr 2013 17:19:29 -0400 - Fix OSX buld and a warning in modulemanager.cpp
|
||||
Revision 9a45626 - Fri, 12 Apr 2013 15:45:52 -0500 - Hack around calculate_depends not able to find libintl.h, since we deal with that later
|
||||
Revision 10d10d0 - Fri, 12 Apr 2013 15:44:54 -0500 - Update Win32 build instructions slightly
|
||||
Revision aa2844a - Fri, 12 Apr 2013 02:48:24 -0500 - Fix not attaching cs_xop to I_OnReload
|
||||
Revision 42c640a - Fri, 12 Apr 2013 01:32:53 -0500 - /ns drop help was pretty much a complete lie, so fixed it. Also require a nick param to /ns drop
|
||||
Revision 066fc58 - Fri, 12 Apr 2013 01:14:56 -0500 - Fix m_ssl
|
||||
Revision 416eaa1 - Thu, 11 Apr 2013 15:58:59 -0500 - Explain how privileges associate themselves with modes
|
||||
Revision ac19a5c - Thu, 11 Apr 2013 15:35:39 -0500 - Fix memoserv/rsend reply
|
||||
Revision 6f9dd28 - Thu, 11 Apr 2013 15:28:53 -0500 - Use SetCorrectModes to set the inital modes on a founder once they register a channel
|
||||
Revision c56d72b - Thu, 11 Apr 2013 02:28:36 -0500 - Remove more OPDEOP references
|
||||
Revision db4ed1c - Thu, 11 Apr 2013 00:51:08 -0500 - Merge chanserv saset and set back into one command since it no longer needs to be separated... replace chanserv/set privilege with chanserv/administration. Dont tell users to use 'help' for more help if there is no help.
|
||||
Revision cb64d80 - Thu, 11 Apr 2013 00:20:24 -0500 - Remove the need for having to set syntax to "" for commands with no syntax
|
||||
Revision 4f9b787 - Thu, 11 Apr 2013 00:08:28 -0500 - Pass new config and the new config reader to the OnReload event, aswell as call it on module load on modules that hook to it
|
||||
Revision 207c46c - Wed, 10 Apr 2013 22:26:40 -0500 - Move some of the modules in extras/ that arent really extra out of extras. Mark our modules as VENDOR and allow modules to have multple types.
|
||||
Revision 957cb2b - Tue, 9 Apr 2013 16:27:25 -0500 - Use the mode names inspircd gives us to add modes if we don't recognize it
|
||||
Revision b244c74 - Tue, 9 Apr 2013 14:51:39 -0500 - Allow privilege descs to be read from the config to override the defaults
|
||||
Revision b76b2e1 - Tue, 9 Apr 2013 14:48:24 -0500 - Made privilege names case insensitive
|
||||
Revision b35665b - Tue, 9 Apr 2013 14:33:54 -0500 - Rename OPDEOP and OPDEOPME privileges to be similar to the other status privileges
|
||||
Revision c3eb5b8 - Tue, 9 Apr 2013 04:23:29 -0500 - And my bots initially start with no server..
|
||||
Revision 6faf4e3 - Tue, 9 Apr 2013 04:13:49 -0500 - 'Me' can not exist when channels are created
|
||||
Revision 325b018 - Tue, 9 Apr 2013 00:00:52 -0500 - Add a default method for user's SendModeInternal
|
||||
Revision 0a3d27a - Mon, 8 Apr 2013 23:37:42 -0500 - Made XOP privileges configurable
|
||||
Revision bcd85ca - Mon, 8 Apr 2013 01:05:25 -0500 - Fix OperType::GetCommands
|
||||
Revision ac40c53 - Mon, 8 Apr 2013 01:02:45 -0500 - Fix /ns set display
|
||||
Revision 2eae82d - Mon, 8 Apr 2013 01:01:27 -0500 - Check the channel secure option isn't set in ChannelInfo::AccessFor too
|
||||
Revision 72493b7 - Mon, 8 Apr 2013 00:42:07 -0500 - Fix secureops
|
||||
Revision 1a37e1c - Mon, 8 Apr 2013 00:19:07 -0500 - Made auto* chanserv privileges not hard coded. Made cs_statusupdate not remove status on users if they still match other entries. Move privilege descriptions out of the config
|
||||
Revision fb7fef7 - Sun, 7 Apr 2013 23:46:44 -0500 - Optimizations of much of the more commonly used code
|
||||
Revision 3660222 - Sat, 6 Apr 2013 19:34:35 -0500 - Remove the runtime module directory on non-windows because we no longer overwrite modules on install without deleting them first
|
||||
Revision ccecfdf - Sat, 6 Apr 2013 19:03:07 -0500 - Made the missing dependencies message from cmake more descriptive for modules
|
||||
Revision 32d1184 - Sat, 6 Apr 2013 17:08:25 -0500 - Use the return from BufferedSocket::ProcessRead() and don't just assume its true
|
||||
Revision 6a46a08 - Sat, 6 Apr 2013 16:58:04 -0500 - This worked before but is a little weird
|
||||
Revision 7a2e6aa - Sat, 6 Apr 2013 16:43:56 -0500 - Add more logging to bs_set, cs_set, and ns_set
|
||||
Revision 34b5f9c - Sat, 6 Apr 2013 23:10:26 +0200 - InspIRCd: Recognize a few more channel modes that weren't recognized
|
||||
Revision f77eb0a - Sat, 6 Apr 2013 15:59:38 -0500 - Let non founders still /cs ban by wildcard mask, but limit the number of people it will kick
|
||||
Revision 302a409 - Sat, 6 Apr 2013 15:44:03 -0500 - Unset +P from perm channels when expiring
|
||||
Revision 0b3b9fe - Sat, 6 Apr 2013 15:26:52 -0500 - Fix toggling topiclock when the channel setting is changed
|
||||
Revision f71c786 - Sat, 6 Apr 2013 15:06:39 -0500 - Fix generic mode support
|
||||
Revision 4ecf20b - Fri, 5 Apr 2013 16:59:27 -0500 - Fix ns_lists command group
|
||||
Revision a5b8788 - Fri, 5 Apr 2013 16:27:12 -0500 - Made the securefounder checks in cs_set more consistent
|
||||
Revision 3cc7950 - Fri, 5 Apr 2013 15:45:03 -0500 - Fix not constructing the /bs set greet command
|
||||
Revision 854bc4d - Thu, 4 Apr 2013 22:12:48 -0500 - Move around some of Init() to fork() before initing the socket engine, as some engines cant survive a fork()
|
||||
Revision dbc7727 - Thu, 4 Apr 2013 18:52:35 -0500 - Fix applying some sxlines to users on add
|
||||
Revision c4ef566 - Thu, 4 Apr 2013 18:45:45 -0500 - Fix /hs reject syntax
|
||||
Revision 6637633 - Thu, 4 Apr 2013 15:14:17 -0500 - Fix defcon taking action on new clients
|
||||
Revision 823bc01 - Tue, 2 Apr 2013 07:02:38 +0200 - mentioned the charybdis protocol support in the readme and example config
|
||||
Revision 947ad6f - Mon, 1 Apr 2013 10:26:19 +0200 - fixed using language files for third party modules
|
||||
Revision 06c8a1e - Mon, 1 Apr 2013 09:46:55 +0200 - Revert "added include/version.h to .gitignore"
|
||||
Revision b3fd861 - Mon, 1 Apr 2013 09:42:59 +0200 - added include/version.h to .gitignore
|
||||
Revision 62262f4 - Sun, 31 Mar 2013 00:43:11 -0500 - Fix typo in Mode message handler
|
||||
Revision 6e0dc0e - Sun, 31 Mar 2013 00:43:11 -0500 - Add networkinfo:modelistsize config option to set the max size of b/e/I lists
|
||||
Revision 7e7556f - Sat, 30 Mar 2013 23:39:43 -0500 - Merge usefulness of Timer and CallBack classes into Timer, and fix it to really work
|
||||
Revision 111d6a9 - Sat, 30 Mar 2013 22:40:20 -0500 - Fix loading ttb from databases
|
||||
Revision d238176 - Sat, 30 Mar 2013 22:08:51 -0500 - Add /bs set banexpire command to configure if/when botserv bans expire
|
||||
Revision 4694c7a - Sat, 30 Mar 2013 19:08:07 -0500 - Split up bs_kick subcommands into real subcommands
|
||||
Revision a522933 - Fri, 29 Mar 2013 23:51:45 -0500 - This reference to see if nickcores go away during command execution is no longer necessary
|
||||
Revision f24e17f - Fri, 29 Mar 2013 23:50:51 -0500 - Fix /bs set private
|
||||
Revision 2b208de - Fri, 29 Mar 2013 23:50:51 -0500 - Fix detecting module langauge files
|
||||
Revision 4eb5d15 - Sat, 30 Mar 2013 05:42:17 +0100 - uuups, we already have the year 2013
|
||||
Revision 0451dd3 - Sat, 30 Mar 2013 05:21:54 +0100 - added charybdis protocol support
|
||||
Revision c3e4f1b - Fri, 22 Mar 2013 18:41:23 -0500 - Fix build from earlier merge
|
||||
Revision f122f10 - Fri, 22 Mar 2013 11:52:42 -0500 - Merge remote branch 'attila/1.9+timermanager' into 1.9
|
||||
Revision deedb3b - Fri, 22 Mar 2013 11:46:30 -0500 - Dont call SetCloakedHost in users constructor, just set chost, because SetCloakedHost logs a message like the user just changed their host
|
||||
Revision d27aa03 - Thu, 21 Mar 2013 23:40:16 -0500 - Merge branch '1.9' of github.com:anope/anope into 1.9
|
||||
Revision dcffa5d - Thu, 21 Mar 2013 23:39:39 -0500 - Properly cleanup after entrymsglists and ajoinlists when destructed
|
||||
Revision 221e79f - Thu, 21 Mar 2013 23:33:40 -0500 - Check for null pointers in HasMLock/SetMLock/RemoveMLock, cs_register can pass it some sometimes/possibly other places
|
||||
Revision d5a453b - Wed, 20 Mar 2013 19:42:50 +0100 - Improve TimerManager
|
||||
Revision a2d69fa - Wed, 20 Mar 2013 09:45:40 -0700 - Merge pull request #13 from attilamolnar/1.9+inspversionfix
|
||||
Revision 6a0e441 - Wed, 20 Mar 2013 11:39:16 -0500 - Check that channels still exist before nulling their ci pointer in channelinfos destructor Change the persist setting on a channel to mean only that it is being enforced ircd-side
|
||||
Revision 68eeac6 - Tue, 19 Mar 2013 19:16:13 +0100 - InspIRCd: Don't reply to VERSION
|
||||
Revision 731912f - Mon, 18 Mar 2013 12:16:51 -0500 - Add db_sql:import config option so we can know for sure whether or not we want a database import
|
||||
Revision 5196391 - Sat, 16 Mar 2013 21:53:03 -0500 - Remove remaining disable_ns_register references in example config
|
||||
Revision 810685c - Sat, 16 Mar 2013 20:08:39 -0500 - Have db_flatfile store object ids if they are set, even though it doesn't use them, so that if other database modules that use them are loaded they can keep track of objects properly
|
||||
Revision 1a0e6b0 - Fri, 15 Mar 2013 12:27:08 -0500 - Allow autokicking real names, extbans, and channels
|
||||
Revision 81c89bb - Fri, 15 Mar 2013 07:43:17 -0500 - Fix missing dependencies message to include the source folder, there is no specific source file on modules with multiple source files
|
||||
Revision 01620e8 - Thu, 14 Mar 2013 20:51:28 -0500 - Update nickserv defult names for kill/killquick, hide email, usermask, and quit
|
||||
Revision 4c74020 - Thu, 14 Mar 2013 09:03:48 -0500 - Add group and hide setings to fantasy{} blocks
|
||||
Revision b95b8f0 - Thu, 14 Mar 2013 09:03:48 -0500 - Fix setting BSDefFlags from the config
|
||||
Revision 1ff7a7c - Wed, 13 Mar 2013 14:40:49 -0500 - Refactor mask/entry code, allow full matching (against users real host/ip) if their displayed host is their real real host. Also match against cloaked host even if full matching is not being done
|
||||
Revision 1d16629 - Wed, 13 Mar 2013 09:45:15 -0500 - Allow opers to override chanserv kick/ban, botserv say/act, and akick's peace setting
|
||||
Revision 72aa27e - Wed, 13 Mar 2013 09:02:31 -0500 - Allow m_ldap_authentication to block email changes if emails are controlled by ldap, don't tell users they must change their email during initial user registration
|
||||
Revision 05223db - Sun, 10 Mar 2013 03:23:00 -0500 - Identify requests hold command sources and users can disconnect between the request being dispatched and when it returns, so don't assume the source user pointer is always valid
|
||||
Revision 06d43ba - Sun, 3 Mar 2013 10:58:39 +0100 - update the users password after a successful ldap authentication
|
||||
Revision 5f74662 - Sun, 3 Mar 2013 10:57:53 +0100 - improved the operserv mode command
|
||||
Revision 2c68312 - Sun, 3 Mar 2013 02:04:33 -0500 - Bump for Anope 1.9.9-git
|
||||
Revision ce094f4 - Sat, 2 Mar 2013 23:42:01 -0500 - Anope 1.9.8 Release
|
||||
Revision 1780560 - Sat, 2 Mar 2013 23:42:00 -0500 - Regenerate language files
|
||||
Revision a32c897 - Sat, 2 Mar 2013 23:42:00 -0500 - Update Changes and Changes.conf
|
||||
Revision 367b662 - Sat, 2 Mar 2013 23:42:00 -0500 - Fix compile warning in webcpanel/memos
|
||||
Revision 75999e0 - Sat, 2 Mar 2013 23:42:00 -0500 - Fix Anope::Duration showing years failing
|
||||
Revision 45c02f8 - Sat, 2 Mar 2013 23:42:00 -0500 - Fix build with -std=c++11
|
||||
Revision ae4421b - Sat, 2 Mar 2013 23:42:00 -0500 - Unset founder/successors when channels are deleted
|
||||
Revision 2d309da - Sat, 2 Mar 2013 18:52:15 -0500 - Fix /ns drop nick showing "your nick" and not the nick you specified if the nick isn't registered
|
||||
Revision b9bbb37 - Sat, 2 Mar 2013 18:46:56 -0500 - Fixed logic fail in /ns resend
|
||||
Revision 0b05eaa - Fri, 1 Mar 2013 01:40:14 -0500 - Only shrink extensible items that are metadata in ExtensibleUnserialize
|
||||
Revision 91ad9d2 - Fri, 1 Mar 2013 00:57:24 -0500 - Fix Windows build
|
||||
Revision 6aa9ad9 - Fri, 1 Mar 2013 00:56:47 -0500 - Don't have cs_seen update data for users on syncing servers
|
||||
Revision 6808498 - Thu, 28 Feb 2013 23:09:03 -0500 - Fix entrymsg's creation time being reset from restarts
|
||||
Revision 8561941 - Mon, 25 Feb 2013 00:26:49 -0500 - Don't enforce session limit on clients with no IP on Unreal, fix typo in /cs down syntax, fix os_session messages to reference ip
|
||||
Revision 5d4db2b - Sun, 24 Feb 2013 20:15:49 -0500 - Allow /cs up and /cs down to take an optional nick arg
|
||||
Revision 501503b - Sun, 24 Feb 2013 20:14:15 -0500 - On startup check all object types
|
||||
Revision a980e32 - Sun, 24 Feb 2013 21:07:10 +0100 - fixed wrong parameter count in cs_updown
|
||||
Revision da2fea3 - Sun, 24 Feb 2013 09:48:20 +0100 - fixed some stupid typos in the german language file
|
||||
Revision 7cb70f5 - Sun, 24 Feb 2013 08:14:13 +0100 - some updates to the german langfile
|
||||
Revision d04db3d - Sat, 23 Feb 2013 17:41:52 -0500 - Add SVSNICK and SVSHOLD to hybrid
|
||||
Revision 35c2608 - Sat, 23 Feb 2013 11:20:31 +0100 - Revert "do not send RESV from operserv when its not introduced"
|
||||
Revision 8cf7ec9 - Sat, 23 Feb 2013 04:32:41 -0500 - Add missing SVSHold funcs to plexus protocol module
|
||||
Revision c67087d - Sat, 23 Feb 2013 04:32:41 -0500 - Fix akick list/view not showing masks sometimes
|
||||
Revision 2336b47 - Sat, 23 Feb 2013 09:54:03 +0100 - do not send RESV from operserv when its not introduced
|
||||
Revision da61734 - Fri, 22 Feb 2013 04:42:08 -0500 - Made FindService less dumb and able to do aliases to aliases
|
||||
Revision a911354 - Fri, 22 Feb 2013 00:39:13 -0500 - Fix "leave" channel log level
|
||||
Revision ae90244 - Fri, 22 Feb 2013 00:30:22 -0500 - Merge branch '1.9' of github.com:anope/anope into 1.9
|
||||
Revision 5547c3e - Fri, 22 Feb 2013 00:29:00 -0500 - This OnServerSync event hook in inspircd20 can go away (it does nothing currently)
|
||||
Revision e844cdf - Thu, 21 Feb 2013 07:38:42 +0000 - Update COPYING
|
||||
Revision 2fa5cfa - Wed, 20 Feb 2013 18:00:46 -0500 - Add Matthew to webpanel credits, fix alignment of akill list
|
||||
Revision 5979217 - Wed, 20 Feb 2013 14:58:59 -0800 - Merge pull request #12 from MatthewM/webcpanel
|
||||
Revision ed68482 - Wed, 20 Feb 2013 15:51:40 -0500 - Add /cs mode clear command that behaves like the old /cs clear modes/bans/etc
|
||||
Revision 3259298 - Tue, 19 Feb 2013 04:07:53 -0500 - Allow /os mode clear [all] to unset modes, similar to old clearmodes
|
||||
Revision a1f9263 - Tue, 19 Feb 2013 01:28:27 -0500 - Merge branch '1.9' of github.com:anope/anope into 1.9
|
||||
Revision 7d50818 - Tue, 19 Feb 2013 00:48:21 -0500 - Fix some OpenBSD build issues, and bugs #1485 #1486 #1487
|
||||
Revision d0e1f3b - Tue, 19 Feb 2013 05:21:01 +0100 - fixed a typo in the last SASL commit
|
||||
Revision cb91f99 - Mon, 18 Feb 2013 22:10:57 -0500 - Made the mode bouncing detector harder to hit and ignore syncing channels
|
||||
Revision a49d7b1 - Sun, 17 Feb 2013 05:31:04 -0800 - Merge pull request #11 from grawity/mailmap
|
||||
Revision eda7b55 - Sun, 17 Feb 2013 15:19:11 +0200 - Add mailmap for Git
|
||||
Revision bcf99d5 - Sun, 17 Feb 2013 12:26:51 +0100 - SASL sends AUTHFAIL on unsupported mechanisms, fixes bug #1482
|
||||
Revision 3ab6706 - Sat, 16 Feb 2013 03:59:28 -0500 - InsIRCd only sends QUIT on KILL for users 1 hop from us, so always internally kill users that we kill. Bug #1481
|
||||
Revision c40e9c3 - Sat, 16 Feb 2013 00:31:42 -0500 - Fix missing CheckInit check in db_sql_live
|
||||
Revision 7be23b7 - Fri, 15 Feb 2013 23:18:34 -0500 - Fix setting modes on botserv bots in channels that have other bots in them on startup
|
||||
Revision d9c18a6 - Fri, 15 Feb 2013 19:01:46 -0500 - Store hashes of the last commit instead of the last commit
|
||||
Revision 73099b8 - Fri, 15 Feb 2013 18:32:06 -0500 - Fixed unserializing servers in dns zones
|
||||
Revision fc1d7ea - Thu, 14 Feb 2013 20:58:01 -0500 - Switch Destroy methods to delete
|
||||
Revision 391f282 - Thu, 14 Feb 2013 20:57:40 -0500 - This Serialize::Destroy method isn't actually needed anymore. Fixes weirdness from a few Serializable items we had on the stack. Added a comment about why operator< in Reference fails.
|
||||
Revision f0875c5 - Thu, 14 Feb 2013 20:11:52 -0500 - Iterators suck
|
||||
Revision f6ef706 - Thu, 14 Feb 2013 01:24:29 -0500 - Magiobiwan is silly
|
||||
Revision 7656c25 - Thu, 14 Feb 2013 01:20:18 -0500 - Made chanserv/unban with no parameters unban you in every channel you have access in
|
||||
Revision 5cf1ede - Thu, 14 Feb 2013 01:20:18 -0500 - Fix CommandCSMode::CanSet letting everyone set voice
|
||||
Revision 9e544a6 - Thu, 14 Feb 2013 01:20:18 -0500 - Store what channels have references to accounts in NickCore to prevent having to iterate over all channels and then all access entries when nicks expire or from nickserv/alist
|
||||
Revision 225b7c3 - Thu, 14 Feb 2013 01:20:18 -0500 - Make NickCore::aliases a vector
|
||||
Revision 9948664 - Thu, 14 Feb 2013 01:20:18 -0500 - Update obj ts when constructed in db_sql
|
||||
Revision fc4b884 - Sun, 10 Feb 2013 12:31:37 -0500 - Sort output in ns_list and cs_list
|
||||
Revision 9b3ecfe - Sat, 9 Feb 2013 22:48:05 -0500 - Fixed sepstream::GetToken logic fail
|
||||
Revision 2079498 - Sat, 9 Feb 2013 00:24:15 -0500 - (re?)add mlock set as a simple way to clear all mlocks and add new ones at once
|
||||
Revision 01413dd - Thu, 7 Feb 2013 21:49:49 -0500 - Use channel mode +r to determine if a channel has either been newly created or created while we were offline (eg, during the inital burst to the uplink). Fixes not knowing whether or not channels ops in non-secureop non-persistent channels obtained op while we were offline by creating the channel or legitimately by being set op by another channel op.
|
||||
Revision 9d1fe61 - Thu, 7 Feb 2013 21:49:49 -0500 - Made DNSServer::Find case insensitive
|
||||
Revision 2472a41 - Tue, 5 Feb 2013 08:04:45 -0800 - Merge pull request #9 from Robby-/1.9-ns_set_misc
|
||||
Revision 65fbdcf - Tue, 5 Feb 2013 16:31:14 +0100 - Fixed ns_set_misc not showing help for its SASET commands. Added descriptions and SASETs for the remaining commented ns_set_misc examples, without a description they won't show up in HELP if someone actually enabled those.
|
||||
Revision 25cec01 - Tue, 5 Feb 2013 09:45:48 -0500 - Made access del by nick and other functions from 326f1a really delete objects
|
||||
Revision 62e3c8c - Sat, 2 Feb 2013 10:53:05 -0800 - Merge pull request #7 from artemiiav/patch-2
|
||||
Revision 8902c1f - Sat, 2 Feb 2013 10:51:08 -0800 - Merge pull request #8 from Robby-/1.9
|
||||
Revision 6c43bcc - Sat, 2 Feb 2013 07:32:32 +0100 - cs_enforce: Make the logging also show the channel it was used on, added 2 missing log calls, can now handle overrides by services operators.
|
||||
Revision 15b37c1 - Sat, 2 Feb 2013 07:30:53 +0100 - Some more typo and help text fixes, proper formatting of control codes, missing privileges, and settings corrections.
|
||||
Revision 29fcdc5 - Thu, 31 Jan 2013 21:24:48 -0500 - Updated jquery API to v1.9.0
|
||||
Revision 1075bb1 - Thu, 31 Jan 2013 22:33:14 +0300 - Update src/config.cpp
|
||||
Revision dccb0ee - Wed, 30 Jan 2013 22:50:11 -0800 - Merge pull request #5 from Robby-/1.9
|
||||
Revision aea8690 - Thu, 31 Jan 2013 06:19:14 +0100 - Some configuration file updates: Removed now non-existing settings. Redid some existing settings to look more consistent/uniform. Added some missing commands/permissions. Merged operserv/modlist permission into operserv/modinfo. Fixed ChanServ INFO privilege to actually work for /BotServ INFO too for those users who have it, instead of only for founders. Fixed some typos aswell as removed whitespaces along the way.
|
||||
Revision a62698a - Wed, 30 Jan 2013 17:44:07 -0500 - Remove sendpass from the configs and the config reader since it no longer exists
|
||||
Revision 47af43c - Wed, 30 Jan 2013 11:24:57 -0500 - Made Anope::Duration also show years
|
||||
Revision ae2c82a - Wed, 30 Jan 2013 10:39:52 -0500 - Don't expire session exceptions if in noexpire mode
|
||||
Revision 594b1a1 - Wed, 30 Jan 2013 10:39:52 -0500 - Evidently Persistant is not a word
|
||||
Revision ae46cc7 - Wed, 30 Jan 2013 09:18:56 +0100 - fixed an infinite loop in ns_recover, caused by a very small typo.
|
||||
Revision 6b2aad7 - Sun, 27 Jan 2013 13:55:42 -0500 - Fixed SQL::Data::IsEqual to really only return if the two are completely equal. Fixes oddities with caching objects that are actually updated.
|
||||
Revision 98ccbe2 - Sun, 27 Jan 2013 10:50:55 -0500 - Old botserv flags need BS_ prepended to them
|
||||
Revision 5ae100f - Sun, 27 Jan 2013 05:00:00 -0500 - Add nickserv/alist priv, merge botserv/botlist and botserev/assign/private to botserv/administration
|
||||
Revision 0052dd2 - Sun, 27 Jan 2013 01:59:38 -0500 - Fix db_flatfile not clearing databases on save if there are no objects left of that type (it will leave the old database with old objects currently)
|
||||
Revision 50a42d2 - Sat, 26 Jan 2013 22:17:25 -0500 - Fix os_session to work with sql properly
|
||||
Revision 49cb6a0 - Sat, 26 Jan 2013 20:52:49 -0500 - Fixed db_sql etc being confused on empty vs not set metadata
|
||||
Revision ed7c4dc - Fri, 25 Jan 2013 04:05:38 -0500 - Made Anope::DoTime default to seconds to fix os_akill etc defaulting expiries to days
|
||||
Revision c376fb0 - Fri, 25 Jan 2013 03:31:35 -0500 - I forgot to add this change to a634c7be65113c74736be0fb98f31b0c83ec2882
|
||||
Revision 76d9e58 - Fri, 25 Jan 2013 03:09:51 -0500 - mysql_insert_id doesn't return an id if one isnt generated, so check that it really returns a value before using it. Also fix memos to cleanup after themselves when deleted.
|
||||
Revision 3769cc1 - Thu, 24 Jan 2013 08:53:35 -0500 - Fix memo signon and memo receive default flag names
|
||||
Revision 74ace7d - Thu, 24 Jan 2013 00:34:41 -0500 - Channel::HasUserStatus: Don't just return false if cms is NULL.
|
||||
Revision 647245a - Wed, 23 Jan 2013 22:16:01 -0500 - Add missing KeySet() func to SQL::Data
|
||||
Revision a634c7b - Tue, 22 Jan 2013 21:20:05 -0500 - Fix some compile errors
|
||||
Revision f656e31 - Tue, 22 Jan 2013 19:47:16 -0500 - Add hidenetsplitquit config option to not show splits in /ns info's last quit field
|
||||
Revision 8811545 - Tue, 22 Jan 2013 17:32:23 +0000 - Fixed few minor typos
|
||||
Revision cad3850 - Tue, 22 Jan 2013 01:23:55 -0500 - Move channel mode set and unset events to be after the action has been done internally to allow easially canceling it
|
||||
Revision 7de058b - Tue, 22 Jan 2013 00:24:58 -0500 - Fix crash trying to unset the permanent channel mode during channel syncs of empty channels
|
||||
Revision ddaa001 - Mon, 21 Jan 2013 22:31:16 -0500 - Merge usefulness of Flags and Extensible classes into Extensible, made most flags we have juse strings instead of defines/enums
|
||||
Revision 51c049e - Mon, 21 Jan 2013 18:03:31 -0500 - Really fix Channel::GetModes
|
||||
Revision 93472f8 - Mon, 21 Jan 2013 17:59:22 -0500 - Revert "Fix Channel::GetModes, we can never have a negative mode set on a channel so this check is unnecessary"
|
||||
Revision 678d27f - Mon, 21 Jan 2013 17:55:27 -0500 - Fix Channel::GetModes, we can never have a negative mode set on a channel so this check is unnecessary
|
||||
Revision 369ca89 - Mon, 21 Jan 2013 06:46:28 -0500 - Allow channels that have users in them that are not the access list to expire while in use.
|
||||
Revision 421db75 - Mon, 21 Jan 2013 06:38:13 -0500 - Fix not logging debug info to the logfile when debug mode is enabled
|
||||
Revision 846b56c - Mon, 21 Jan 2013 02:31:28 -0500 - Fix defcon timeout timer
|
||||
Revision e62d2fe - Mon, 21 Jan 2013 07:15:16 +0100 - removed old cs_modes fantasy{} command blocks
|
||||
Revision bb3abab - Sun, 20 Jan 2013 15:03:15 +0100 - removed loading of ns_set_chanstats and cs_set_chanstats from the chanstats.example.conf, this functionality is now part of ns_set/cs_set
|
||||
Revision da6543d - Sun, 13 Jan 2013 22:07:27 -0500 - Allow grouping commands to make help output easier to comprehend
|
||||
Revision 29a0180 - Sun, 13 Jan 2013 22:07:27 -0500 - Add svsjoin and svspart commands
|
||||
Revision 7e7fc75 - Sun, 13 Jan 2013 22:07:27 -0500 - Allow ns_set_misc/cs_set_misc to have configurable help descriptions
|
||||
Revision d3a6bdc - Sun, 13 Jan 2013 22:07:27 -0500 - Allow the config parser to skip over gettext's _() to allow translating config values
|
||||
Revision 402e42f - Sat, 12 Jan 2013 09:01:44 +0100 - check if the database exists before we try to backup it
|
||||
Revision 5007b72 - Wed, 9 Jan 2013 04:20:55 -0500 - Update copyright to 2013. This was done with: find include/ src/ lang/ docs/ modules/ *.* Config -exec sed -i 's/-2012 Anope Team/-2013 Anope Team/i' {} \;
|
||||
Revision 9931ec2 - Tue, 8 Jan 2013 20:25:01 -0500 - Use m_rewrite to rewrite op, deop, halfop, ... etc
|
||||
Revision 5f3dfc2 - Mon, 7 Jan 2013 21:30:07 -0500 - Track +g on inspircd, fix saving/loading mode locks for generic modes
|
||||
Revision dc9e81a - Sun, 6 Jan 2013 18:38:04 -0500 - Fix deleting access by number
|
||||
Revision ed719c8 - Sun, 6 Jan 2013 16:13:35 -0500 - Buggy compilers are buggy
|
||||
Revision 77dc2e4 - Sun, 6 Jan 2013 01:46:53 -0500 - And really check for them using ssl...
|
||||
Revision c5f4c8d - Sun, 6 Jan 2013 01:19:25 -0500 - Fixed enforce ssl to not ban users if the channel is ssl only
|
||||
Revision 6ba4964 - Sun, 6 Jan 2013 00:48:50 -0500 - Fix fmode handling on inspircd20
|
||||
Revision 9a2ef9d - Sat, 5 Jan 2013 22:42:07 -0500 - Add sslonly, bans, and limit to /cs enforce
|
||||
Revision 6ccf0a3 - Thu, 3 Jan 2013 13:39:50 -0500 - Fixed os_dns not readding connected servers if configured
|
||||
Revision 23e303a - Thu, 3 Jan 2013 13:20:10 -0500 - Move enforcer checks on nick and logout to nickserv.cpp
|
||||
Revision 098157d - Thu, 3 Jan 2013 12:34:01 -0500 - Don't delete users immediately when quit or killed, instead wait until message processing is done
|
||||
Revision 8274696 - Wed, 2 Jan 2013 13:59:33 -0500 - Move nickserv validate stuff to an event in nickserv.cpp
|
||||
Revision bf718e8 - Sun, 30 Dec 2012 10:30:29 -0500 - Evidently not specifying NOT NULL is not enough to allow null timestamps
|
||||
Revision 326f1a9 - Sat, 29 Dec 2012 20:29:41 -0500 - Cleanup after mode locks, badwords, akick, access, if destructed
|
||||
Revision 793c438 - Sat, 29 Dec 2012 11:09:54 -0500 - Remove clearuser references from configs
|
||||
Revision 6b1f323 - Fri, 28 Dec 2012 15:59:33 -0500 - Move some of CheckKick to the respective modules
|
||||
Revision 7618490 - Fri, 28 Dec 2012 13:00:36 -0500 - Dumb iterators
|
||||
Revision ae6ddf2 - Fri, 28 Dec 2012 11:17:01 -0500 - fixup part of 379b2c, dont use iterators after theyre erased
|
||||
Revision b591e8c - Fri, 28 Dec 2012 10:43:30 -0500 - Use the same object for chanusercontainer and userchancontainer
|
||||
Revision 379b2cc - Fri, 28 Dec 2012 10:43:30 -0500 - The timestamp column in SQL should actually be null sometimes, and fixed some valgrind errors with db_sql_live
|
||||
Revision 3fb4cf5 - Thu, 27 Dec 2012 13:25:33 -0800 - Merge pull request #4 from alexbarton/ngircd-fix-NJOIN
|
||||
Revision fdc62da - Thu, 27 Dec 2012 22:15:33 +0100 - ngircd protocol module: Fix NJOIN, actually join users to the channel
|
||||
Revision 05094b0 - Thu, 27 Dec 2012 15:03:38 -0500 - When processing many modes don't enforce mlock until all are set
|
||||
Revision 4ab8a70 - Thu, 27 Dec 2012 11:06:00 -0500 - Add an expiry option to /cs ban
|
||||
Revision c88a3ff - Thu, 27 Dec 2012 09:50:44 -0500 - Remove clearusers. There is still kick * for this.
|
||||
Revision 7b1ae96 - Thu, 27 Dec 2012 09:43:19 -0500 - Put appendtopic and topiclock into /cs topic
|
||||
Revision c7a22df - Wed, 26 Dec 2012 19:42:37 -0500 - Add register type to os_forbid to prevent users from registering nicks or channels
|
||||
Revision 45ee7c1 - Tue, 25 Dec 2012 17:10:43 -0500 - Clean up the logic in adding extra library directories, adding to LDFLAGS isn't needed.
|
||||
Revision 392b591 - Tue, 25 Dec 2012 15:52:58 -0500 - Allow modules loaded after startup to magically reobtain their database objects. Fix os_dns for sql(live)
|
||||
Revision 556a437 - Tue, 25 Dec 2012 12:40:09 -0500 - Cleanup after os_dns on unload
|
||||
Revision eab5833 - Tue, 25 Dec 2012 12:36:58 -0500 - Don't check userlimit when servers first connect, servers wont have any users at that point anyway
|
||||
Revision 077ae27 - Tue, 25 Dec 2012 02:20:00 -0500 - Fix linking libraries so their rpath is set correctly and isn't stripped on install.
|
||||
Revision d4e1c95 - Tue, 25 Dec 2012 01:09:03 -0500 - packet->answers isnt always empty initially, like with axfrs
|
||||
Revision 33ae442 - Mon, 24 Dec 2012 18:15:38 -0500 - We can svsjoin on plexus
|
||||
Revision 1285c7f - Sun, 23 Dec 2012 15:30:08 -0500 - Allow os_dns to manage multiple zones
|
||||
Revision 8c72892 - Sun, 23 Dec 2012 14:56:02 -0500 - Made the overlay resize and the alert box reposition when the window is resized
|
||||
Revision dc751bd - Sat, 22 Dec 2012 14:49:48 -0500 - Combine all of the set modules now that having them split apart is almost completely pointless
|
||||
Revision 0cde0ae - Sat, 22 Dec 2012 09:10:32 -0500 - Fixed memo mail messages, and allow %N to be in them. Bug #1462
|
||||
Revision 503bda5 - Thu, 20 Dec 2012 23:48:20 -0500 - Move the var to set the time out into the same javascript tag that is used for the modal as it's related
|
||||
Revision a4d5c40 - Thu, 20 Dec 2012 16:22:58 -0500 - Added the overlay to the vHost request function
|
||||
Revision 8e219bd - Thu, 20 Dec 2012 16:12:16 -0500 - Moved the javascript to header.html from memos.html to make it easier to intergrate the overlay feedback and do tweaks
|
||||
Revision 5acc93d - Thu, 20 Dec 2012 01:19:04 -0500 - Made the table cells for the memo table have no spacing and color the read and unread memos different colors
|
||||
Revision 276247b - Wed, 19 Dec 2012 16:03:53 -0500 - Add a command flag to require that a user is executing the command
|
||||
Revision d277f49 - Wed, 19 Dec 2012 13:17:44 -0500 - Minor style tweaks to make the links look more like a button
|
||||
Revision 67bd2c6 - Wed, 19 Dec 2012 09:21:25 -0500 - Add version flags for debug, git, and Windows
|
||||
Revision 784683a - Wed, 19 Dec 2012 08:48:23 -0500 - Having these references to bots bugged out older compilers, so simplify this by just moving pointers to the core
|
||||
Revision 3b20943 - Tue, 18 Dec 2012 10:35:11 -0500 - Fixed typo in b6407afa06917910732966ea3c49ac4bd7850fe4
|
||||
Revision 6572754 - Tue, 18 Dec 2012 10:34:33 -0500 - Cleaned up the overlay layout, added some minor visual and js fixes
|
||||
Revision f157ea3 - Tue, 18 Dec 2012 10:04:26 -0500 - Added a click reply function to the MemoServ memos page that autofills the senders name
|
||||
Revision ddd7fe6 - Mon, 17 Dec 2012 22:03:21 -0500 - Bug that was experinced seems to be somewhat related to Windows 8 and maybe an extension on chrome. Reverting to previous commit
|
||||
Revision 47a351a - Mon, 17 Dec 2012 19:26:07 -0500 - Fixed a minor bug that overlapped the nav links and the content from .content in Chrome on Windows
|
||||
Revision ff9f670 - Mon, 17 Dec 2012 18:28:15 -0500 - Give the overlay window a rounded edge to make it look a bit nicer and fade the main content a little less
|
||||
Revision f33f7d9 - Mon, 17 Dec 2012 14:32:28 -0500 - Added a modal window interface to MemoServs page that will automaticly fade out after a give time (currently 5s)
|
||||
Revision c49f03f - Sat, 15 Dec 2012 23:51:25 -0500 - Allow escaping brackets in webpanel templates and redirect users to the homepage when their session is not found
|
||||
Revision 6b5f583 - Sat, 15 Dec 2012 21:46:14 -0500 - Merge Adams commit to allow escaping of brackets
|
||||
Revision 8e3ab0d - Sat, 15 Dec 2012 21:35:38 -0500 - Made all langauges default to the UTF-8 charset
|
||||
Revision a049092 - Sat, 15 Dec 2012 21:05:05 -0500 - Merge branch '1.9' into webcpanel
|
||||
Revision b6407af - Sat, 15 Dec 2012 05:13:09 -0500 - Fix chghost/chgident/etc on inspircd20
|
||||
Revision fbd3cda - Sat, 15 Dec 2012 01:15:03 -0800 - Merge pull request #2 from czaks/conv-languages-to-utf-8/1.9
|
||||
Revision 0534182 - Sat, 15 Dec 2012 09:39:12 +0100 - Convert the language files to utf-8 encoding.
|
||||
Revision 280ba89 - Sat, 15 Dec 2012 09:28:19 +0100 - Fix the language files to state the correct charset.
|
||||
Revision fe7fcc2 - Sat, 15 Dec 2012 02:44:53 -0500 - Check for NOJOIN being < 0 but restricted on in db_old
|
||||
Revision dcd34d3 - Sat, 15 Dec 2012 01:33:31 -0500 - Move DNS handling to a module
|
||||
Revision dced01f - Sat, 15 Dec 2012 01:14:52 -0500 - Added a large scroll box for the chanserv main page
|
||||
Revision cdec0a3 - Fri, 14 Dec 2012 16:47:45 -0500 - Fixed some html errors in the last commit
|
||||
Revision 1075f3b - Fri, 14 Dec 2012 16:44:14 -0500 - Allow opers to drop channels Added chanserv drop to web panel Allow long lists of akills to scroll
|
||||
Revision c1077fa - Thu, 13 Dec 2012 06:12:56 -0500 - Optimize much of the database code and serialize code.
|
||||
Revision 76ba147 - Wed, 12 Dec 2012 02:28:19 -0500 - Unregister operserv_akill page on unload in cpanel
|
||||
Revision 1c1a216 - Wed, 12 Dec 2012 01:33:58 -0500 - Only allow non-user sources to register nonexistant channels
|
||||
Revision 04f96a5 - Wed, 12 Dec 2012 01:30:50 -0500 - Some small improvements to last few commits, and fixed some problems with the template engine
|
||||
Revision 5f72d1f - Wed, 12 Dec 2012 01:04:08 -0500 - Squashed commit of the following:
|
||||
Revision dfff544 - Wed, 12 Dec 2012 00:49:16 -0500 - Fixed webpanel fail on nondebug builds
|
||||
Revision 0edd264 - Tue, 11 Dec 2012 05:27:56 +0100 - IsNickValid() now accepts '[' and ']' in the nickname
|
||||
Revision e71c890 - Sun, 9 Dec 2012 14:32:16 +0100 - added a missing permission for operserv/global to the Services Administrator block in example.conf
|
||||
Revision eada35d - Sun, 9 Dec 2012 14:21:42 +0100 - fixed a problem with the webcpanel logout when using apache + mod_proxy
|
||||
Revision 8d4a08c - Sun, 9 Dec 2012 14:19:30 +0100 - fixed a log message showing the wrong IP
|
||||
Revision 9dec093 - Fri, 7 Dec 2012 03:02:15 -0500 - Modified the Config scripts to ask the user explicitly for additional include and library directories.
|
||||
Revision f711dd3 - Wed, 5 Dec 2012 06:18:36 +0100 - ngircd protocol module: improved vhost support
|
||||
Revision 7a865b6 - Sun, 2 Dec 2012 04:31:50 -0500 - Only bad-password users when the account theyre trying to identify for actually exists
|
||||
Revision faaaae3 - Sun, 2 Dec 2012 09:16:40 +0100 - enc_sha256: the length of the digest is SHA256_DIGEST_SIZE, not SHA256_BLOCK_SIZE. also removed an unneeded trailing NULL byte.
|
||||
Revision 705d1ef - Fri, 30 Nov 2012 20:49:59 -0500 - Allow services to return more than one NS record
|
||||
Revision c0f60d5 - Fri, 30 Nov 2012 20:44:21 -0500 - Change /os reload to not unnecessarially rebuild httpd servers. Change m_httpds Log methods to the module version.
|
||||
Revision a4468dd - Fri, 30 Nov 2012 02:53:03 -0500 - Allow modules to use the encryption modules to encrypt arbitrary things. Made enc_old depend on enc_md5. Allow not loading any encryption modules if you want to only use an external mechanism. Removed ns_sendpass since it's just a bad idea.
|
||||
Revision 337f361 - Thu, 29 Nov 2012 17:03:53 -0500 - Fix warnings from classes with virtual functions not having virtual destructors
|
||||
Revision 26a048e - Wed, 28 Nov 2012 22:54:26 -0500 - Rewrite/simplify some of m_httpd
|
||||
Revision ccd41e7 - Wed, 28 Nov 2012 00:42:07 -0500 - Use signon for svid on bahamut, not timestamp
|
||||
Revision a1a5ba0 - Tue, 27 Nov 2012 21:43:17 -0500 - Use signon for svid on unreal, not timestamp
|
||||
Revision 8a6962f - Mon, 26 Nov 2012 23:09:26 -0500 - Keep track on what ircds we can svsjoin, add an svspart method
|
||||
Revision f23bad1 - Mon, 26 Nov 2012 19:50:29 -0500 - Revert a small part of 90930619bc124e94bac5048c0b13c3f4748b559d, evidently this was important
|
||||
Revision 1bfafd9 - Mon, 26 Nov 2012 04:30:30 -0500 - Fixed rehasing doing weird things to botmodes due to trying to set on nick not uid
|
||||
Revision 1bdb756 - Sun, 25 Nov 2012 22:37:54 -0500 - Restrict the length of kick reasons in cs_kick, cs_ban, and cs_akick
|
||||
Revision 80c573e - Sun, 25 Nov 2012 21:47:10 -0500 - Merge remote branch 'cronus/1.9+unrealtokens' into 1.9
|
||||
Revision 78607ea - Sun, 25 Nov 2012 20:35:45 -0600 - Remove UnrealIRCd's TOKENS, they are kinda useless
|
||||
Revision 0110214 - Sun, 25 Nov 2012 20:58:35 -0500 - Fix build the last arg on fantasy commands to chanserv
|
||||
Revision 54d8695 - Sun, 25 Nov 2012 20:36:57 -0500 - Add commented command{} blocks for how 1.8 worked, don't show saset in the help list to registered users.
|
||||
Revision a2441fd - Sun, 25 Nov 2012 19:47:09 -0500 - Rename restoreonghost in nickserv.conf
|
||||
Revision 831a1d1 - Sun, 25 Nov 2012 19:41:36 -0500 - Merge ns_ghost, ns_recover, and ns_release. Fix svskilling users on Unreal.
|
||||
Revision 6b5df8e - Sun, 25 Nov 2012 05:44:31 +0100 - added a config block for cs_seen in chanserv.example.conf
|
||||
Revision 0210cf2 - Sat, 24 Nov 2012 21:22:32 -0500 - Make the actual clients into services too
|
||||
Revision f070834 - Sat, 24 Nov 2012 19:10:07 -0500 - Fix parsing fjoin on inspircd
|
||||
Revision a44bf31 - Sat, 24 Nov 2012 17:19:08 -0500 - Helps to name ping right
|
||||
Revision 002f00d - Sat, 24 Nov 2012 02:15:19 -0500 - Add IP.Board m_sql_authentication query to modules.example.conf, from Genesis2001
|
||||
Revision ded89b0 - Fri, 23 Nov 2012 23:10:41 -0500 - Made IRCDProto a Service
|
||||
Revision 36b1166 - Fri, 23 Nov 2012 16:56:06 -0500 - Change the return type of ircdmessage to void now that we don't use it, add an ircd message module event, and a few more fixups
|
||||
Revision 0e7bd9f - Thu, 22 Nov 2012 20:27:42 -0500 - Fix compile/pch generation
|
||||
Revision 7963534 - Thu, 22 Nov 2012 21:44:51 +0100 - fixed some compile errors
|
||||
Revision d33a0f7 - Thu, 22 Nov 2012 00:50:33 -0500 - Pretty large coding style cleanup, in source doc cleanup, and allow protocol mods to depend on each other
|
||||
Revision 368d469 - Sun, 18 Nov 2012 10:34:35 +0100 - added METADATA and vhost support to the ngircd protocol module
|
||||
Revision efd3c04 - Sun, 18 Nov 2012 09:50:23 +0100 - fixed a typo in IRCDMessageSetName in the unreal protocol module
|
||||
Revision 5fe6f0b - Fri, 16 Nov 2012 00:06:07 -0500 - This should be find, not find_first_of
|
||||
Revision 5d6fb24 - Fri, 16 Nov 2012 00:03:15 -0500 - Fixed some stuff spotted by Cronus, made db_old convert ACCESS_INVALID levels to ACCESS_FOUNDER, fix cs_enforce +R from an earlier commit, fixed ChangeModeInternal TS checking when IRCds don't send TS on mode
|
||||
Revision ad3d1d3 - Sat, 10 Nov 2012 13:57:06 -0500 - Never log debug levels >= 2 using a log block
|
||||
Revision b51f60c - Sat, 10 Nov 2012 13:57:06 -0500 - Fix user account logout message
|
||||
Revision 504232b - Sat, 10 Nov 2012 18:29:35 +0100 - added support for the ngircd SQUERY command
|
||||
Revision 8f36f65 - Fri, 9 Nov 2012 19:20:17 -0500 - Made access del and xop del behave like access add/xop add by using a users mask if given an unregistered nick
|
||||
Revision ff3e396 - Fri, 9 Nov 2012 19:13:33 -0500 - Add a config option to disable sasl
|
||||
Revision 2fe387b - Wed, 7 Nov 2012 23:23:02 -0500 - Update bi->lastmsg in cs_log when something is logged via privmsg
|
||||
Revision 9ec482b - Wed, 7 Nov 2012 22:20:48 -0500 - I haven't a clue why this was here but its not even remotely right.. fixes #1448
|
||||
Revision 53e8cd1 - Wed, 7 Nov 2012 21:57:31 -0500 - Duplicate check some of these larger hashmaps on insert, just incase
|
||||
Revision ac57f41 - Wed, 7 Nov 2012 19:36:59 -0500 - We no longer have to use the rungroup provided at build time, it is specified in the config now
|
||||
Revision 8b78b6b - Wed, 7 Nov 2012 15:41:49 -0500 - Fix crash on suspend etc if kicking a user causes the service bot to part when the service bot is next in the userlist (as we have an iterator to it)
|
||||
Revision 52fa668 - Wed, 7 Nov 2012 15:17:58 -0500 - Give suspend the correct permission in botserv.conf, fix pch build
|
||||
Revision 72eb2cc - Tue, 6 Nov 2012 11:02:12 -0500 - Sometimes capab is sent as one parameter
|
||||
Revision 4cfd468 - Tue, 6 Nov 2012 11:02:12 -0500 - Made os_noop more useful
|
||||
Revision 0cf8d73 - Tue, 6 Nov 2012 11:02:12 -0500 - Added log messages for all of the other chanserv commands that should be logged
|
||||
Revision 53b2bdf - Tue, 6 Nov 2012 11:02:12 -0500 - Use std::tr1::unordered_map for a few of the larger maps
|
||||
Revision 27ab6a6 - Tue, 6 Nov 2012 11:02:12 -0500 - Windows fixes
|
||||
Revision 22c8297 - Tue, 6 Nov 2012 15:19:56 +0000 - Added chanserv/status to fantasy commands
|
||||
Revision d22e863 - Mon, 5 Nov 2012 15:59:11 -0500 - Catch the exception from /os session view invalidip
|
||||
Revision fb56b3a - Sat, 3 Nov 2012 22:04:19 -0400 - Made m_xmlrpc use m_httpd
|
||||
Revision 0c47017 - Sat, 3 Nov 2012 09:40:01 +0100 - added support for SVSNICK in the ngircd protocol module
|
||||
Revision 792091b - Fri, 2 Nov 2012 18:35:33 +0100 - cs_seen: do not read duplicate SeenInfo entries from the database
|
||||
Revision b917361 - Thu, 1 Nov 2012 16:26:59 -0400 - Fix pch generation
|
||||
Revision a0a54fd - Thu, 1 Nov 2012 16:15:44 -0400 - Expand options:hideprivilegedcommands to not show commands requiring authentication to unidentified users
|
||||
Revision d90d5d5 - Thu, 1 Nov 2012 14:54:14 -0400 - Fixed operserv/umode serv help entry
|
||||
Revision c2ae762 - Thu, 1 Nov 2012 14:47:23 -0400 - Made db_old load exceptions.db
|
||||
Revision 9aa71af - Thu, 1 Nov 2012 14:47:23 -0400 - Accept 1.8s svid ts on plexus too
|
||||
Revision b64abeb - Thu, 1 Nov 2012 14:47:23 -0400 - Made os_logsearch search oldest logs first so the newest entries are at the bottom of the list
|
||||
Revision 9093061 - Thu, 1 Nov 2012 14:47:23 -0400 - Fixed quite a bit of dumbness with m_ssl. Had to modify socketengines to allow polling for write & no read, but is it cleaner now. Made m_httpd able to listen using SSL.
|
||||
Revision 5b1c823 - Thu, 1 Nov 2012 05:28:57 +0100 - fixed importing mode locks in db_old
|
||||
Revision b2b4f21 - Wed, 31 Oct 2012 23:11:06 -0400 - Clarify the path given to Config isnt actually the bin path, but the path Anope is installed to
|
||||
Revision 22e5516 - Wed, 31 Oct 2012 22:57:11 -0400 - Fixed anopesmtp logging
|
||||
Revision 35c2256 - Wed, 31 Oct 2012 17:37:19 -0400 - Apparently sending this all at once didn't work that great, so wait for the events before sending the joins/modes etc
|
||||
Revision 3a10fca - Wed, 31 Oct 2012 12:37:43 -0400 - Fix ns_ghost and ns_recover, add nicksev:restoreonghost
|
||||
Revision a39947c - Tue, 30 Oct 2012 22:07:15 -0400 - Made os_forbid honor nssecureadmins
|
||||
Revision 1730bfb - Tue, 30 Oct 2012 21:22:10 -0400 - Send uids everywhere when setting modes on clients
|
||||
Revision 26a4a13 - Tue, 30 Oct 2012 20:40:42 -0400 - Made os_mode a bit smarter
|
||||
Revision 36f357c - Tue, 30 Oct 2012 17:10:31 -0400 - Fixed build errors and warnings with -std=c++11
|
||||
Revision b07928e - Tue, 30 Oct 2012 15:50:39 -0400 - Clean up ngircd proto mod slightly, and send sqlines before introducing clients
|
||||
Revision 1ef7480 - Tue, 30 Oct 2012 15:21:47 -0400 - Fix inspircd mode message for channel modes. It never actually uses this, but other pseudoservers may send modes using this and not fmode (it has no timestamp)
|
||||
Revision e4c2dcc - Mon, 29 Oct 2012 21:51:34 -0400 - Made db_old load up most of the old mode locks
|
||||
Revision 7bdad85 - Mon, 29 Oct 2012 21:28:43 -0400 - Only show mode lock in /cs info if there really is a mode lock
|
||||
Revision c2a8ad2 - Mon, 29 Oct 2012 17:47:26 -0400 - Fix formatting fail in cs_status
|
||||
Revision fedf235 - Mon, 29 Oct 2012 17:07:10 -0400 - Update Config.cs for VS 2012 and fix it failing if the source directory path has spaces in it
|
||||
Revision e88d2c2 - Mon, 29 Oct 2012 16:40:19 -0400 - Make it so CMake doesn't complain if packing on a system using Visual Studio Express.
|
||||
Revision 20e4685 - Mon, 29 Oct 2012 14:54:49 -0400 - Readd cs_status
|
||||
Revision ca55e15 - Mon, 29 Oct 2012 14:06:42 -0400 - Fix building under Mac OS X via Makefiles if not using an Xcode project. This is a hack but CMake currently provides no other way to determine if the detected C++ compiler was identified as Clang.
|
||||
Revision bb5e412 - Mon, 29 Oct 2012 13:51:38 -0400 - Made MailThread completely threadsafe, currently theres a race condition with config reload + sending mail at once
|
||||
Revision 30028a2 - Mon, 29 Oct 2012 13:46:21 -0400 - This include is unncessary
|
||||
Revision 6883309 - Mon, 29 Oct 2012 13:46:21 -0400 - Made anopesmtp less hard to debug
|
||||
Revision 9c8570a - Mon, 29 Oct 2012 04:17:24 +0100 - readded ngircd protocol support
|
||||
Revision 4dfc0f9 - Sat, 27 Oct 2012 12:09:07 -0400 - Fix cmake generation due to this if not being updated.
|
||||
Revision d6e1b92 - Sat, 27 Oct 2012 08:12:04 -0400 - Add a module log type
|
||||
Revision bb5f455 - Sat, 27 Oct 2012 05:34:36 -0400 - Ues timestamp for dns serial not yyyymmddnn.. there are too many problems with this (restarts, >99 zone updates/day, etc)
|
||||
Revision 32d33ca - Sat, 27 Oct 2012 04:44:10 -0400 - Expand single digit serial revisions to match nn
|
||||
Revision e1dcf24 - Fri, 26 Oct 2012 17:30:41 -0400 - Add nickserv:modesonid config option to set what modes users get on identify
|
||||
Revision 3b24311 - Fri, 26 Oct 2012 12:57:25 -0400 - Sometimes zone transfers can be really big
|
||||
Revision 8fd3fc7 - Fri, 26 Oct 2012 10:46:19 -0400 - Add sasl support to unreal, inspircd
|
||||
Revision 8d27b25 - Fri, 26 Oct 2012 00:55:04 -0400 - Don't attempt to process any query packets if we aren't explicitly given permission to bind to a port (we do anyway currently for m_dnsbl to get replies)
|
||||
Revision 727b355 - Thu, 25 Oct 2012 23:44:34 -0400 - This code isn't used
|
||||
Revision bbe667d - Thu, 25 Oct 2012 22:29:10 -0400 - Fixed two memory leaks in cs_seen
|
||||
Revision 3608d42 - Thu, 25 Oct 2012 22:26:59 -0400 - This version needs a better tag than "-git", so there.
|
||||
Revision 8f33933 - Thu, 25 Oct 2012 21:31:58 -0400 - Default xlines to be set by OperServ
|
||||
Revision e5efe42 - Thu, 25 Oct 2012 04:30:22 -0400 - Fixed showing users from the right server on unreal/bahamut
|
||||
Revision 10e21bf - Thu, 25 Oct 2012 01:30:41 -0400 - Fix handling clients on unreal that have no ip (it sends a *)
|
||||
Revision 00256fd - Wed, 24 Oct 2012 23:30:21 -0400 - Made access provider modules permanent. They don't cleanup their access entries currently and if they did it would delete them.
|
||||
Revision 3b8fb7b - Wed, 24 Oct 2012 22:48:12 -0400 - When db_sql_live gets new objects immediately update cache on them to prevent rewriting later if they aren't changed
|
||||
Revision 1057fa8 - Wed, 24 Oct 2012 19:32:26 -0400 - BIND's forward ability did not work as I expected because it will not forward non recursive queries. So, added support for SOA, NS, and AXFR requests.
|
||||
Revision fca9ec0 - Wed, 24 Oct 2012 07:40:16 -0400 - InspIRCd: Add handler for FIDENT to 2.0 protocol, so we know when someone changes ident on the network
|
||||
Revision ef5c668 - Wed, 24 Oct 2012 05:12:47 +0200 - Merge branch '1.9' of ssh://anope.git.sourceforge.net/gitroot/anope/anope into 1.9
|
||||
Revision e0438e3 - Wed, 24 Oct 2012 05:12:13 +0200 - fixed calculating the correct channelcount for an user when loading the db. fixes bug #1450
|
||||
Revision 04632bd - Mon, 22 Oct 2012 17:02:01 -0400 - Cleanup of last few commits/warning fix
|
||||
Revision 0b9db15 - Mon, 22 Oct 2012 00:54:30 -0400 - Add os_dns, a way to control your DNS zone via services
|
||||
Revision d5b2f9c - Sun, 21 Oct 2012 18:29:10 +0200 - Base has to destruct before Extensible does because objects that destruct due to Extensible destructing don't have their references to the already destroyed object for Base invalidated. (fixed for NickAlias and NickCore)
|
||||
Revision 727c3d5 - Thu, 18 Oct 2012 20:06:02 -0400 - Base has to destruct before Extensible does because objects that destruct due to Extensible destructing don't have their references to the already destroyed object for Base invalidated
|
||||
Revision eddb768 - Wed, 17 Oct 2012 20:22:44 -0400 - Fixed protoctl parsing on Unreal + fix SendLogout now the usage has changed
|
||||
Revision 484baba - Mon, 15 Oct 2012 03:54:26 -0400 - Actually show the correct number of entries on /os logsearch output
|
||||
Revision 88f10a2 - Sun, 14 Oct 2012 20:13:41 +0200 - Updated the hybrid protocol module, patch provided by Michael - Change mode handler to use UIDs within SVSMODE messages - The IP can be 0 in UID messages depending whether or not a client is spoofed - Removed SendGlobopsInternal handler. Anope is using GLOBOPS by default - Set user's services timestamp/account to 0 instead of 1 on /ns logout, otherwise the UID message handler will
|
||||
Revision ffa1c97 - Sun, 14 Oct 2012 01:50:14 -0400 - Use account name for svid on hybrid
|
||||
Revision 4fdc157 - Sun, 14 Oct 2012 01:05:24 -0400 - Better clarify signon vs timestamp and allow updating users timestamp to an ircd given value from NICK
|
||||
Revision 0a95066 - Sat, 13 Oct 2012 23:49:15 -0400 - Add a hybrid 8 protocol module courtesy of Michael <michael@wobst.at>
|
||||
Revision 1232018 - Sat, 13 Oct 2012 06:21:53 -0400 - Allow services operators to modify/view other users autojoin lists
|
||||
Revision 6237613 - Sat, 13 Oct 2012 00:40:44 -0400 - And update modules.example.conf
|
||||
Revision 4424abd - Sat, 13 Oct 2012 00:37:10 -0400 - Add m_sql_oper
|
||||
Revision 76a0471 - Sat, 13 Oct 2012 00:37:10 -0400 - Simplify the db_sql_live code since this isn't actually necessary. Fixes a problem internally ovwrwriting data on objects that we have modified and are queued because of assigning something to a serialize_obj reference
|
||||
Revision e08422a - Fri, 12 Oct 2012 22:47:35 +0200 - fixed MODE handling in the ratbox protocol module
|
||||
Revision 757ff06 - Wed, 10 Oct 2012 23:08:00 -0400 - Fix m_ldap to reconnect automatically if the ldap server goes away
|
||||
Revision 06defe0 - Tue, 9 Oct 2012 19:34:24 -0400 - Merge remote branch 'attila/1.9+topiclockmsg' into 1.9
|
||||
Revision 63bf134 - Tue, 9 Oct 2012 19:34:11 -0400 - Merge remote branch 'attila/1.9+msgfix' into 1.9
|
||||
Revision 2113494 - Tue, 9 Oct 2012 19:33:24 -0400 - Send privmsgs and notices to uids if applicable
|
||||
Revision 912f068 - Tue, 9 Oct 2012 23:31:20 +0200 - Fix wrong error message when --dbdir has no argument
|
||||
Revision 8f5d786 - Tue, 9 Oct 2012 05:22:02 -0400 - Cleanup ok if modules with pending identify requests are unloaded
|
||||
Revision 1dacc64 - Tue, 9 Oct 2012 04:13:04 -0400 - Made the warnings given by cmake for not having the dependencies for modules look less scary as they confuse dumb people currently
|
||||
Revision 3af786d - Mon, 8 Oct 2012 20:58:47 -0400 - Fix fantasy !help & give it its own help header, not ChanServ's
|
||||
Revision e57b470 - Mon, 8 Oct 2012 04:16:23 -0400 - Made fantasy commands configurable
|
||||
Revision b8b63ff - Sun, 7 Oct 2012 22:39:58 -0400 - Remove the asynchronous identifing hack and replace it with something better. Fixes m_*_authentication only being able to properly work when people identify normally using nickserv/identify
|
||||
Revision 959a3f3 - Sun, 7 Oct 2012 11:49:38 +0200 - InspIRCd: Log when server-side topiclocking is enabled in the config but the module is not loaded
|
||||
Revision 0a111c1 - Sun, 7 Oct 2012 02:13:14 -0400 - Fix compile from bda3b1fa3a396e19fb04eda2f66d246e49572c20
|
||||
Revision 4b68f04 - Sun, 7 Oct 2012 08:00:31 +0200 - updated docs/LANGUAGE to point to the right directory where users should put module language files
|
||||
Revision 31914b2 - Sun, 7 Oct 2012 01:46:44 -0400 - Merge remote branch 'remotes/attila/1.9+addline' into 1.9
|
||||
Revision ebb3fca - Sun, 7 Oct 2012 01:45:43 -0400 - Release holds on a nick on identify, if there is one
|
||||
Revision 7f72b46 - Sun, 7 Oct 2012 01:29:49 -0400 - Set sane default last_topic_setter and last_topic_time in the event an empty topic is locked right after registering a channel without previously being set
|
||||
Revision 4751c73 - Sat, 6 Oct 2012 22:54:52 -0400 - Fixed module language file path
|
||||
Revision bda3b1f - Sun, 7 Oct 2012 03:15:42 +0200 - InspIRCd: Make functions that send ADDLINE and DELLINE, call them from the rest of the module
|
||||
Revision 4ec10d7 - Sat, 6 Oct 2012 20:11:47 -0400 - Fixups and cleanup for the last few commits
|
||||
Revision 3dd21e4 - Sun, 7 Oct 2012 01:35:14 +0200 - InspIRCd: Add support for server side topic locks using METADATA topiclock
|
||||
Revision 682d768 - Sun, 7 Oct 2012 01:33:49 +0200 - InspIRCd: Add support for sending detecting m_topiclock and sending SVSTOPIC when it is available
|
||||
Revision 42aa367 - Sun, 7 Oct 2012 01:32:31 +0200 - InspIRCd: Send channel METADATA using a dedicated function
|
||||
Revision ec8a1bc - Sun, 7 Oct 2012 00:59:49 +0200 - Add a config option for server side topic locks
|
||||
Revision 2d9541c - Sat, 6 Oct 2012 02:18:48 -0400 - Parse and store the spanningtree protocol version for InspIRCd
|
||||
Revision e747ba6 - Sat, 6 Oct 2012 02:06:23 -0400 - InspIRCd: Add metadata handler to recognize when a module is loaded or unloaded on the ircd side and adjust our behavior accordingly
|
||||
Revision 4431a34 - Sat, 6 Oct 2012 02:06:23 -0400 - InspIRCd: Allow METADATA handler to differentiate between user, channel and other/server metadata
|
||||
Revision 14d7de0 - Sat, 6 Oct 2012 02:06:18 -0400 - InspIRCd: Remove has_svshold, use IRCDProto::CanSVSHold
|
||||
Revision cd28fdc - Sat, 6 Oct 2012 01:01:45 -0400 - Show the correct reciever nick when use strict privmsg is enabled
|
||||
Revision 25fe9c7 - Fri, 5 Oct 2012 16:23:40 -0400 - Do not process() socket engine on shutdown
|
||||
Revision 94fc2ba - Fri, 5 Oct 2012 15:15:50 +0100 - Merge branch '1.9' of ssh://anope.git.sf.net/gitroot/anope/anope into 1.9
|
||||
Revision 2f87b8e - Fri, 5 Oct 2012 15:14:19 +0100 - Revert this strangeness I created ;)
|
||||
Revision eff61c7 - Fri, 5 Oct 2012 05:03:55 -0400 - Add an event for when nick or channel options are set
|
||||
Revision 7c96227 - Fri, 5 Oct 2012 01:20:32 -0400 - Use memcpy for Anope::Unhex not strcpy
|
||||
Revision dcfae63 - Wed, 3 Oct 2012 21:22:03 +0100 - Some minor fixes/typos
|
||||
Revision 69437bb - Wed, 3 Oct 2012 05:17:32 -0400 - Fixed parsing squit (it has a reason)
|
||||
Revision 7551245 - Tue, 2 Oct 2012 23:30:31 -0400 - Attempt #2 at silly topic ts thing, this is actually must cleaner
|
||||
Revision 47bc551 - Tue, 2 Oct 2012 22:59:20 -0400 - Revert "Fix topiclock on inspircd"
|
||||
Revision 8747818 - Tue, 2 Oct 2012 22:16:35 -0400 - Fix topiclock on inspircd
|
||||
Revision 7042223 - Tue, 2 Oct 2012 21:21:37 -0400 - Somehow the kick handler got lost in the confusion. Send the topic time with ftopic on inspircd not the current time. Removed some unneeded protocol functions
|
||||
Revision 93698f0 - Tue, 2 Oct 2012 05:18:42 -0400 - Added operserv/logsearch
|
||||
Revision f7aa837 - Tue, 2 Oct 2012 01:30:35 -0400 - Don't unassociate accounts with users on nick changes
|
||||
Revision e1d1d18 - Tue, 2 Oct 2012 05:36:31 +0200 - added an operserv/akill page to webcpanel
|
||||
Revision 20a6f82 - Tue, 2 Oct 2012 05:35:44 +0200 - modified the nickserv alist command to return nc->display instead of the parameter provided by the user
|
||||
Revision aec6cac - Tue, 2 Oct 2012 04:14:50 +0200 - Merge branch '1.9' of ssh://anope.git.sourceforge.net/gitroot/anope/anope into 1.9
|
||||
Revision ffca6a7 - Tue, 2 Oct 2012 04:11:52 +0200 - fixed a small bug in the inspircd protocol modules
|
||||
Revision 2d2ab4f - Mon, 1 Oct 2012 21:26:41 -0400 - Fixed handling TOPIC on unreal, dont set topics in Channel::Reset unless we are synced, and fixed ts checking in Channel::SetModesInternal
|
||||
Revision a434bae - Mon, 1 Oct 2012 18:50:29 -0400 - Allow modules to store data in their own databases.
|
||||
Revision f14a3df - Mon, 1 Oct 2012 04:35:36 -0400 - Fix a few problems found by Cronusa and KindOne
|
||||
Revision b19a3af - Mon, 1 Oct 2012 02:29:31 -0400 - Add networkinfo:chanlen config directive
|
||||
Revision 89428a9 - Mon, 1 Oct 2012 01:56:57 -0400 - Cleanup of all of the protocol modules, rewrote message handling system to be a bit more C++ ish
|
||||
Revision b937d63 - Sun, 30 Sep 2012 21:36:49 -0400 - timestamp column is a special case too
|
||||
Revision ad37bc9 - Sun, 30 Sep 2012 20:30:27 -0400 - Bug #1445 - Empty out columns in SQL we have no data for on insert. This is caused from serialize() only setting a key on certain conditions and otherwise doing nothing at all.
|
||||
Revision 56df1ab - Sun, 30 Sep 2012 20:30:27 -0400 - Place runtime module binaries in data/runtime instead of lib/ incase of a system wide install where lib/ is not writable
|
||||
Revision 0ea5e57 - Sun, 30 Sep 2012 20:30:27 -0400 - Use RTLD_NOW when loading modules to resolve all symbols immediately. This prevents modules with unresolved symbols from loading instead of loading and crashing later.
|
||||
Revision 3838eb1 - Sun, 30 Sep 2012 20:30:27 -0400 - Add webpanel contributors to readme and remove todo since its way out of date and has nothing more in it we want
|
||||
Revision 9ba7196 - Sun, 30 Sep 2012 20:30:27 -0400 - Make CommandSource use references, sometimes we hold them for awhile
|
||||
Revision 1e71303 - Sun, 30 Sep 2012 13:58:17 +0200 - fixed nickserv alist
|
||||
Revision 74117a1 - Sat, 29 Sep 2012 23:55:55 +0100 - added some example sql queries
|
||||
Revision 38ad523 - Mon, 24 Sep 2012 15:54:49 -0400 - Fix a few oddball warnings that came up from clang, and also make it so webcpanel.so can be compiled under Mac OS X.
|
||||
Revision a71e2fb - Sun, 23 Sep 2012 20:57:35 +0200 - make nickserv glist check if the given nickname is in the group of the user before checking for services oper
|
||||
Revision 1b20ec8 - Sat, 22 Sep 2012 04:18:41 -0400 - Forgot to delete a line in the last commit.
|
||||
Revision d30e53e - Sat, 22 Sep 2012 03:45:51 -0400 - OK, so the FIND sub-command of string() in CMake was only added with 2.8.5, change this to use the REGEX sub-commands instead. Also while I'm at it, make -pthread only get added when not on Mac OS X, it's auto-included there.
|
||||
Revision aa57ad6 - Sat, 22 Sep 2012 02:10:49 -0400 - Fix issues with CMake trying to add /System/Library/Frameworks/Kernel.framework/Headers/sys to the include paths.
|
||||
Revision 097893b - Thu, 13 Sep 2012 15:29:04 +0100 - Updated example query to include a valid value
|
||||
Revision 16019c9 - Wed, 12 Sep 2012 21:10:02 -0400 - Add m_sql_authentication to allow authenticating users against an external SQL database
|
||||
Revision f391100 - Mon, 10 Sep 2012 21:39:04 -0400 - Fixed gettext on freebsd/any other system that uses LANG not LANGUAGE
|
||||
Revision c4a1e1b - Sat, 8 Sep 2012 04:51:44 -0400 - Fixed os_defcon too
|
||||
Revision 7e3b5be - Fri, 7 Sep 2012 23:44:15 -0400 - Add chanserv/set/autoop, like nickserv/set/autoop but for channels
|
||||
Revision c9c477f - Fri, 7 Sep 2012 22:27:28 -0400 - These saset command stubs can go away
|
||||
Revision 4eb7db8 - Fri, 7 Sep 2012 21:22:19 -0400 - Fix os_session to really use ips for quits, don't enforce session for spoofed users/other users who have no ip, clean up warnings
|
||||
Revision 9d6626f - Fri, 7 Sep 2012 12:04:25 -0400 - Made session tracking ip based, not host based, and allow using CIDR to group multiple ips from one subnet to one session
|
||||
Revision 5c07863 - Fri, 7 Sep 2012 08:46:28 -0400 - Allow configuring killquick and kill delays
|
||||
Revision 3060375 - Fri, 7 Sep 2012 06:52:56 -0400 - Fixed m_ldap_authentication not returning anything if the search for an account game back empty
|
||||
Revision 3c63e44 - Fri, 7 Sep 2012 05:59:28 -0400 - Allow ; and } in quoted strings
|
||||
Revision 02d943b - Wed, 5 Sep 2012 02:56:59 -0400 - Not quite sure what I was thinking here
|
||||
Revision 4c8fef2 - Mon, 3 Sep 2012 11:05:17 +0200 - updated example.conf
|
||||
Revision 082cf8a - Sun, 2 Sep 2012 22:56:17 -0400 - Windows cares this is escaped + chmod too
|
||||
Revision 1fd1938 - Sun, 2 Sep 2012 22:39:05 -0400 - Fix CMake to actually make directories on install .....
|
||||
Revision b1f8e91 - Sun, 2 Sep 2012 09:48:13 -0400 - Version bump for 1.9.8-git
|
||||
Revision 81cf9f0 - Sun, 2 Sep 2012 08:31:43 -0400 - Anope 1.9.7 Release
|
||||
Revision 3264669 - Sun, 2 Sep 2012 08:31:34 -0400 - Update version.log
|
||||
Revision 271d723 - Sun, 2 Sep 2012 08:31:11 -0400 - Update Changes
|
||||
Revision a0c4575 - Sun, 2 Sep 2012 08:31:04 -0400 - Regenerate language files
|
||||
Revision 1af64a9 - Sun, 2 Sep 2012 08:30:54 -0400 - Fix Windows
|
||||
|
||||
@@ -1,3 +1,15 @@
|
||||
Anope Version 1.9.9
|
||||
--------------------
|
||||
A Added a better webpanel template, removed the old one
|
||||
A Added SQL logging support
|
||||
A Added Redis database support
|
||||
A Added ability to configure what privileges XOP commands give
|
||||
U Updated Dutch language file, from Robby <robby@chat.be>
|
||||
U Updated Spanish langauge file, from Isaac Fontal <i_fontal@hotmail.com>
|
||||
F Fix build on Solaris and OSX
|
||||
F Fixed setting BotServ's default settings in the config
|
||||
F Fixed some names of config items, including NickServ's kill protect
|
||||
|
||||
Anope Version 1.9.8
|
||||
--------------------
|
||||
A Ability to configure fantasy commands in the config
|
||||
|
||||
@@ -1,3 +1,9 @@
|
||||
Anope Version 1.9.9
|
||||
-------------------
|
||||
There is not many config changes betewen 1.9.8 and 1.9.9, however many of the
|
||||
options have been moved around to make more sense, too many to list here,
|
||||
so get a new config.
|
||||
|
||||
Anope Version 1.9.8
|
||||
-------------------
|
||||
networkinfo:chanlen added
|
||||
|
||||
+14
-21
@@ -9,34 +9,27 @@ Anope Internal Events
|
||||
Internal Events are setup to give module developers more information
|
||||
about what the core is doing at different times. This information can
|
||||
be as complex as data we are feeding to the uplink, to simple triggered
|
||||
events such as the databases being saved.
|
||||
events such as the databases being saved.
|
||||
|
||||
Additionally there is a module included with the core
|
||||
which can provide some clue as to how to use the code in your modules.
|
||||
which can provide some clue as to how to use the code in your modules.
|
||||
The rest of this document assumes that you are used to writing modules.
|
||||
|
||||
2) Using Events
|
||||
|
||||
Anope is told about modules wanting to hook to events by the function
|
||||
ModuleManager::Attach(EventName, Module*);, eg:
|
||||
|
||||
ModuleManager::Attach(I_OnJoinChannel, this);
|
||||
|
||||
You can also specifcy an array of events:
|
||||
|
||||
Implementation i[] = { I_OnJoinChannel, I_OnPartChannel };
|
||||
ModuleManager::Attach(i, this, 2);
|
||||
Where 2 is the number of events in the list
|
||||
|
||||
You must then overload these functions in your main modules class.
|
||||
Each Event in Anope calls a function.
|
||||
You must override these functions in your main modules class.
|
||||
The full list of functions and parameters are in modules.h. In this
|
||||
case, you would be overloading OnJoinChannel() and OnPartChannel() like so:
|
||||
case, you would be overriding OnJoinChannel() and OnPartChannel() like so:
|
||||
|
||||
void OnJoinChannel(User *u, Channel *c) { }
|
||||
void OnPartChannel(User *u, Channel *c) { }
|
||||
void OnJoinChannel(User *u, Channel *c) anope_override { }
|
||||
void OnPartChannel(User *u, Channel *c) anope_override { }
|
||||
|
||||
Some of these events can be used to prevent or allow things to happen that
|
||||
would normally not be allowed or denied. You can also use ModuleManager
|
||||
(not explained here) to set control which order the modules are queried
|
||||
(when multiple modules hook to the same event).
|
||||
Some of these event overrides can be used to prevent or allow things to
|
||||
happen that would normally not be allowed or denied. You can also use
|
||||
ModuleManager (not explained here) to set control which order the modules
|
||||
are queried (when multiple modules hook to the same event).
|
||||
|
||||
The "anope_override" identifier is for compatibility with C++11.
|
||||
Its usage is highly recommended.
|
||||
|
||||
|
||||
+8
-61
@@ -80,15 +80,6 @@ Note: You should also read the README and FAQ files!
|
||||
|
||||
2) Upgrading Anope
|
||||
|
||||
If you got a .diff file and want to patch the old Anope sources with it,
|
||||
do the following:
|
||||
|
||||
* Copy the .diff file into the root Anope sources directory.
|
||||
* Type patch -p1 <file.diff
|
||||
|
||||
Note that upgrading anope with a patchfile isn't recommended. You should
|
||||
download a new, clean source package, as this will give the best results.
|
||||
|
||||
To upgrade Anope, just follow the installation instructions described in
|
||||
section 1. There are however a few specific guidelines:
|
||||
|
||||
@@ -99,63 +90,19 @@ Note: You should also read the README and FAQ files!
|
||||
3) Setting up the IRCd
|
||||
|
||||
Services acts as an IRC server with pseudo-clients on it. To link them to
|
||||
your network, you'll need to add some lines in the ircd.conf of their hub
|
||||
server (as stated in the RemoteServer configuration directive).
|
||||
your network, you'll need to configure your IRCd to allow services to link.
|
||||
|
||||
For samples below we'll take services.localhost.net as the name of the
|
||||
Services (as stated in the ServerName configuration directive). Note that
|
||||
this samples are made to be as generic as possible, but there might be
|
||||
small variations, depending on your IRCd. For IRCd-specific help with
|
||||
configuration, read near the end of this section.
|
||||
The configuration varies depending on the IRCd, but you will probably need
|
||||
a link block (also called connect block, or C line), a U line (also called
|
||||
a shared block), and be sure that the IRCd is listneing on the given port
|
||||
in the link block.
|
||||
|
||||
First, the C/N lines, that allow Services to link. They also need a
|
||||
Y:line to work correctly.
|
||||
|
||||
Y:27:180:0:0:4000000
|
||||
C:127.0.0.1:mypass:services.localhost.net::30
|
||||
N:127.0.0.1:mypass:services.localhost.net::30
|
||||
|
||||
"mypass" is the same password you mentioned in the RemoteServer
|
||||
configuration directive. 127.0.0.1 is the IP from which Services connect
|
||||
from (linking in localhost is the most efficient way to run Services).
|
||||
|
||||
Then, you have to set-up an U:line, that will allow Services to change
|
||||
channel modes, topics, and much more without being opped in the channel.
|
||||
|
||||
U:services.localhost.net:*:*
|
||||
|
||||
NOTE: if you have more than one server in your network, this line MUST
|
||||
be added on ALL servers, or things won't work correctly.
|
||||
|
||||
Finally, you'll need to add an H:line, to make the OperServ JUPE command
|
||||
work correctly.
|
||||
|
||||
H:*::Services.LocalHost.Net
|
||||
Example link configurations can be found in example.conf for some of the
|
||||
popular IRCds.
|
||||
|
||||
Don't forget to /rehash your IRCd to apply changes.
|
||||
|
||||
A new trend in ircd configuration is popping all over the place, good
|
||||
examples are the latest Hybrid, Unreal and Bahamut, which use a more
|
||||
"readable" form of configuration. For those, use something like:
|
||||
|
||||
link services.localhost.net
|
||||
{
|
||||
username *;
|
||||
hostname localhost;
|
||||
bind-ip *;
|
||||
port 6667;
|
||||
hub *;
|
||||
password-connect "mypass";
|
||||
password-receive "mypass";
|
||||
class servers;
|
||||
};
|
||||
|
||||
Note that this block-style configuration files differ heavily, depending
|
||||
on the IRCd. Consult the interactive link maker (link is below) for more
|
||||
details on the exact configuration used by your IRCd.
|
||||
|
||||
If you're unable to get a link with your IRCd after reading this section,
|
||||
you might try the interactive link maker, which is located at:
|
||||
You may also try our interactive link maker, which is located at:
|
||||
|
||||
http://anope.org/ilm.php
|
||||
|
||||
|
||||
+1
-1
@@ -31,7 +31,7 @@ Anope Mutli Language Support
|
||||
|
||||
3) Using langages with modules
|
||||
|
||||
Module authors can easially add the ability to have their modules translated by adding _() around the strings they
|
||||
Module authors can easily add the ability to have their modules translated by adding _() around the strings they
|
||||
want translated (messages to the user, etc).
|
||||
|
||||
If you want to translate a module someone has made, first generate a .pot file if there isn't one already using
|
||||
|
||||
+14
-15
@@ -107,20 +107,18 @@ Table of Contents
|
||||
|
||||
Anope Translations:
|
||||
|
||||
* GeniusDex <geniusdex@anope.org> (nl.l)
|
||||
* Kein <kein-of@yandex.ru> (ru.l)
|
||||
* Maik Funke <Han@mefalcon.org> (de.l)
|
||||
* Gabriel Acevedo H. <drstein@anope.org> (es.l)
|
||||
* Janos Kapitany <sarkanyka@cjbchat.hu> (hun.l)
|
||||
* Szymon S'wierkosz <szymek@adres.pl> (pl.l)
|
||||
* Christopher N. <saka@epiknet.org> (fr.l)
|
||||
* Yusuf Kurekci <ysfm.20@gmail.com> (tr.l)
|
||||
* Robby <robby@chat.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)
|
||||
* Janos Kapitany <sarkanyka@cjbchat.hu> (hu_HU)
|
||||
* Szymon S'wierkosz <szymek@adres.pl> (pl_PL)
|
||||
* Christopher N. <saka@epiknet.org> (fr_FR)
|
||||
* Yusuf Kurekci <ysfm.20@gmail.com> (tr_TR)
|
||||
|
||||
Anope Web panel:
|
||||
|
||||
* Thomas Edwards <thomas.edwards@ilkotech.co.uk>
|
||||
* Luke Thompson <luke.thompson@ilkotech.co.uk>
|
||||
* Matthew M. <mcm@they-got.us>
|
||||
* Denis M. (Phr33d0m) <god@politeia.in>
|
||||
|
||||
2) Presentation
|
||||
|
||||
@@ -171,8 +169,9 @@ Table of Contents
|
||||
Anope currently works with:
|
||||
|
||||
* Bahamut 1.4.27 or later (including 1.8)
|
||||
* Hybrid 8.0 or later
|
||||
* InspIRCd 1.1, 1.2, or 2.0
|
||||
* Charybdis 3.4 or later
|
||||
* Hybrid 8.1 or later
|
||||
* InspIRCd 1.2 or 2.0
|
||||
* ngIRCd 19.2 or later
|
||||
* Plexus 3 or later
|
||||
* Ratbox 2.0.6 or later
|
||||
@@ -203,10 +202,10 @@ Table of Contents
|
||||
--version Display the version of Anope
|
||||
--nothird Do not load the non-core modules specified
|
||||
--protocoldebug Debug each incoming message after protocol parsing
|
||||
--support Used for support, same as -debug -nofork -nothird
|
||||
--support Used for support, same as --debug --nofork --nothird
|
||||
|
||||
Upon starting, Anope will parse its command-line parameters then
|
||||
(assuming the -nofork option is not given) detach itself and run in the
|
||||
(assuming the --nofork option is not given) detach itself and run in the
|
||||
background. If Anope encounters a problem reading the database files or
|
||||
cannot connect to its uplink server, it will terminate immediately;
|
||||
otherwise, it will run until the connection is terminated (or a QUIT,
|
||||
|
||||
+160
@@ -0,0 +1,160 @@
|
||||
Starting in Anope 1.9.9, Anope has Redis database support (http://redis.io/).
|
||||
This document explains the data structure used by Anope, and explains how
|
||||
keyspace notification works.
|
||||
|
||||
This is not a tutorial on how to use Redis, see http://redis.io/documentation
|
||||
for that.
|
||||
|
||||
Table of Contents
|
||||
-----------------
|
||||
1) Data structure
|
||||
2) Keyspace notifications
|
||||
3) Examples of modifying, deleting, and creating objects
|
||||
|
||||
1) Data structure
|
||||
|
||||
There are 4 key namespaces in Anope, they are:
|
||||
|
||||
id - The keys in id are used to atomically create object ids for new
|
||||
objects. For example, if I were to create a new BotInfo I would first:
|
||||
|
||||
redis 127.0.0.1:6379> INCR id:BotInfo
|
||||
|
||||
To get the object ID of the new object.
|
||||
|
||||
ids - The keys in ids contain a set of all object ids of the given type.
|
||||
For example:
|
||||
|
||||
redis 127.0.0.1:6379> SMEMBERS ids:BotInfo
|
||||
|
||||
Returns "1", "2", "3", "4", "5", "6", "7", "8" because I have 8 bots that
|
||||
have IDs 1, 2, 3, 4, 5, 6, 7, and 8, respectively.
|
||||
|
||||
hash - The keys in hash are the actual objects, stored as hashes. For
|
||||
example, if I had just looked up all BotInfo ids and wanted to iterate
|
||||
over all of them, I woulld start by:
|
||||
|
||||
redis 127.0.0.1:6379> HGETALL hash:BotInfo:1
|
||||
|
||||
Which gets all keys and values from the hash of type BotInfo with id 1.
|
||||
This may return:
|
||||
|
||||
"nick" -> "BotServ"
|
||||
"user" -> "services"
|
||||
"host" -> "services.anope.org"
|
||||
"created" -> "1368704765"
|
||||
|
||||
value - The keys in value only exist to aid looking up object IDs. They
|
||||
are sets of object IDs and are used to map key+value pairs to objects.
|
||||
For example:
|
||||
|
||||
redis 127.0.0.1:6379> SMEMBERS value:NickAlias:nick:Adam
|
||||
|
||||
Returns a set of object ids of NickAlias objects that have the key
|
||||
'nick' set to the value 'Adam' in its hash. Clearly this can only
|
||||
ever contain at most one object, since it is not possible to have
|
||||
more than one registered nick with the same name, but other keys
|
||||
will contain more than one, such as:
|
||||
|
||||
redis 127.0.0.1:6379> SMEMBERS value:NickCore:email:adam@anope.org
|
||||
|
||||
Which would return all accounts with the email "adam@anope.org".
|
||||
|
||||
redis 127.0.0.1:6379> SMEMBERS value:ChanAccess:mask:Adam
|
||||
|
||||
Which would return all access entries set on the account "Adam".
|
||||
|
||||
Behavior similar to SQL's AND, can be achieved using the
|
||||
SINTER command, which does set intersection on one or more sets.
|
||||
|
||||
2) Keyspace notifications
|
||||
|
||||
Redis 2.7 (unstable) and 2.8 (stable) and newer support keyspace notifications
|
||||
(http://redis.io/topics/notifications). This allows Redis to notify Anope of
|
||||
any external changes to objects in the database. Once notified, Anope will
|
||||
immediately update the object. Otherwise, Anope keeps all objects in memory
|
||||
and will not regularly read from the databaes once started.
|
||||
|
||||
You can use this to modify objects in Redis and have them immediately reflected
|
||||
back into Anope. Additionally you can use this feature to run multiple Anope
|
||||
instances simultaneously from the same database (see also, Redis database
|
||||
replication).
|
||||
|
||||
To use keyspace notifications you MUST execute
|
||||
|
||||
redis 127.0.0.1:6379> CONFIG SET notify-keyspace-events KA
|
||||
OK
|
||||
|
||||
or set notify-keyspace-events in redis.conf properly. Anope always executes
|
||||
CONFIG SET when it first connects.
|
||||
|
||||
If you do not enable keyspace events properly Anope will be UNABLE to see any
|
||||
object modifications you do.
|
||||
|
||||
The key space ids and value are managed entirely by Anope, you do
|
||||
not (and should not) modify them. Once you modify the object (hash), Anope will
|
||||
update them for you to correctly refelect any changes made to the object.
|
||||
|
||||
Finally, always use atomic operations. If you are inserting a new object with
|
||||
multiple commands, or inserting multiple objects at once, specifically if the
|
||||
objects depend on each other, you MUST use a transaction.
|
||||
|
||||
3) Examples of modifying, deleting, and creating objects
|
||||
|
||||
These examples will ONLY work if you meet the criteria in section 2.
|
||||
|
||||
If I want to change the email account 'Adam' to 'Adam@anope.org', I would execute the following:
|
||||
|
||||
redis 127.0.0.1:6379> SMEMBERS value:NickCore:display:Adam
|
||||
|
||||
Which returns a value of "1", which is the object id I want to modify.
|
||||
Now to change the email:
|
||||
|
||||
redis 127.0.0.1:6379> HSET hash:NickCore:1 email Adam@anope.org
|
||||
|
||||
You can now see this in NickServ's INFO command:
|
||||
-NickServ- Email address: Adam@anope.org
|
||||
|
||||
If I want to drop the account "Adam", I would execute the following:
|
||||
|
||||
redis 127.0.0.1:6379> SMEMBERS value:NickCore:display:Adam
|
||||
|
||||
Which returns a value of "1". I would then check:
|
||||
|
||||
redis 127.0.0.1:6379> SMEMBERS value:NickAlias:nc:Adam
|
||||
|
||||
To see what nicknames depend on this account to exist, as I will
|
||||
have to remove those too. This returns the values "2", and "3".
|
||||
|
||||
Finally, I can drop the nick using a transaction via:
|
||||
|
||||
redis 127.0.0.1:6379> MULTI
|
||||
OK
|
||||
redis 127.0.0.1:6379> DEL hash:NickAlias:2
|
||||
QUEUED
|
||||
redis 127.0.0.1:6379> DEL hash:NickAlias:3
|
||||
QUEUED
|
||||
redis 127.0.0.1:6379> DEL hash:NickCore:1
|
||||
QUEUED
|
||||
redis 127.0.0.1:6379> EXEC
|
||||
|
||||
Or alternatively simply:
|
||||
|
||||
redis 127.0.0.1:6379> DEL hash:NickAlias:2 hash:NickAlias:3 hash:NickCore:1
|
||||
|
||||
If I wanted to create a BotServ bot, I would execute the following:
|
||||
|
||||
redis 127.0.0.1:6379> INCR id:BotInfo
|
||||
|
||||
Which returns a new object ID for me, in this example it will be "8".
|
||||
Now I can create the object:
|
||||
|
||||
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:
|
||||
|
||||
USERS: redis!redis@services.anope.org (Services for IRC Networks) connected to the network (services.anope.org)
|
||||
|
||||
And the bot redis will be in BotServ's bot list.
|
||||
Notice how ids:BotInfo and the value keys are updated automatically.
|
||||
+2
-4
@@ -75,10 +75,8 @@ Anope for Windows
|
||||
will probably not find them and should be told where they are by passing
|
||||
additional search paths to the last question in Config, such as:
|
||||
|
||||
-DEXTRA_INCLUDES:STRING=c:/openssl/include;c:/openssl/lib
|
||||
|
||||
Which would have cmake search both C:\openssl\include and
|
||||
C:\openssl\lib.
|
||||
-DEXTRA_INCLUDE:STRING=c:/openssl/include;c:/mysql/include
|
||||
-DEXTRA_LIBS:STRING=c:/openssl/lib;c:/mysql/lib
|
||||
|
||||
Building Anope with gettext requires libintl, libiconv, libgcc and
|
||||
libmingex. We have precompiled these libraries for you that you may
|
||||
|
||||
@@ -0,0 +1,168 @@
|
||||
#!/usr/bin/env perl
|
||||
|
||||
#
|
||||
# Script taken from InspIRCd, www.inspircd.org
|
||||
#
|
||||
# This program is distributed in the hope that it will be useful, but WITHOUT
|
||||
# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
|
||||
# FOR A PARTICULAR PURPOSE. See the GNU General Public License for more
|
||||
# details.
|
||||
#
|
||||
# You should have received a copy of the GNU General Public License
|
||||
# along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
#
|
||||
|
||||
|
||||
BEGIN { require 5.8.0; }
|
||||
|
||||
use strict;
|
||||
use warnings FATAL => qw(all);
|
||||
|
||||
use File::Copy ();
|
||||
use Cwd;
|
||||
|
||||
sub list_extras ();
|
||||
sub enable_extras (@);
|
||||
sub disable_extras (@);
|
||||
|
||||
# Routine to list out the extra/ modules that have been enabled.
|
||||
# Note: when getting any filenames out and comparing, it's important to lc it if the
|
||||
# file system is not case-sensitive (== Epoc, MacOS, OS/2 (incl DOS/DJGPP), VMS, Win32
|
||||
# (incl NetWare, Symbian)). Cygwin may or may not be case-sensitive, depending on
|
||||
# configuration, however, File::Spec does not currently tell us (it assumes Unix behavior).
|
||||
sub list_extras () {
|
||||
use File::Spec;
|
||||
# @_ not used
|
||||
my $srcdir = File::Spec->catdir("modules");
|
||||
my $abs_srcdir = File::Spec->rel2abs($srcdir);
|
||||
local $_;
|
||||
my $dd;
|
||||
opendir $dd, File::Spec->catdir($abs_srcdir, "extra") or die (File::Spec->catdir($abs_srcdir, "extra") . ": $!\n");
|
||||
my @extras = map { File::Spec->case_tolerant() ? lc($_) : $_ } (readdir($dd));
|
||||
closedir $dd;
|
||||
undef $dd;
|
||||
opendir $dd, $abs_srcdir or die "$abs_srcdir: $!\n";
|
||||
my @sources = map { File::Spec->case_tolerant() ? lc($_) : $_ } (readdir($dd));
|
||||
closedir $dd;
|
||||
undef $dd;
|
||||
my $maxlen = (sort { $b <=> $a } (map {length($_)} (@extras)))[0];
|
||||
my %extras = ();
|
||||
EXTRA: for my $extra (@extras) {
|
||||
next if (File::Spec->curdir() eq $extra || File::Spec->updir() eq $extra);
|
||||
my $abs_extra = File::Spec->catfile($abs_srcdir, "extra", $extra);
|
||||
my $abs_source = File::Spec->catfile($abs_srcdir, $extra);
|
||||
next unless ($extra =~ m/\.(cpp|h)$/ || (-d $abs_extra)); # C++ Source/Header, or directory
|
||||
if (-l $abs_source) {
|
||||
# Symlink, is it in the right place?
|
||||
my $targ = readlink($abs_source);
|
||||
my $abs_targ = File::Spec->rel2abs($targ, $abs_srcdir);
|
||||
if ($abs_targ eq $abs_extra) {
|
||||
$extras{$extra} = "\e[32;1menabled\e[0m";
|
||||
} else {
|
||||
$extras{$extra} = sprintf("\e[31;1mwrong symlink target (%s)\e[0m", $abs_targ);
|
||||
}
|
||||
} elsif (-e $abs_source) {
|
||||
my ($devext, $inoext) = stat($abs_extra);
|
||||
my ($devsrc, $inosrc, undef, $lnksrc) = stat($abs_source);
|
||||
if ($lnksrc > 1) {
|
||||
if ($devsrc == $devext && $inosrc == $inoext) {
|
||||
$extras{$extra} = "\e[32;1menabled\e[0m";
|
||||
} else {
|
||||
$extras{$extra} = sprintf("\e[31;1mwrong hardlink target (%d:%d)\e[0m", $devsrc, $inosrc);
|
||||
}
|
||||
} else {
|
||||
open my $extfd, "<", $abs_extra;
|
||||
open my $srcfd, "<", $abs_source;
|
||||
local $/ = undef;
|
||||
if (scalar(<$extfd>) eq scalar(<$srcfd>)) {
|
||||
$extras{$extra} = "\e[32;1menabled\e[0m";
|
||||
} else {
|
||||
$extras{$extra} = sprintf("\e[31;1mout of synch (re-copy)\e[0m");
|
||||
}
|
||||
}
|
||||
} else {
|
||||
$extras{$extra} = "\e[33;1mdisabled\e[0m";
|
||||
}
|
||||
}
|
||||
|
||||
for my $extra (sort {$a cmp $b} keys(%extras)) {
|
||||
my $text = $extras{$extra};
|
||||
if ($text =~ m/needed by/ && $text !~ m/enabled/) {
|
||||
printf "\e[31;1;5m%-*s = %s%s\e[0m\n", $maxlen, $extra, $text, ($text =~ m/needed by/ ? ")" : "");
|
||||
} else {
|
||||
printf "%-*s = %s%s\n", $maxlen, $extra, $text, ($text =~ m/needed by/ ? "\e[0m)" : "");
|
||||
}
|
||||
}
|
||||
return keys(%extras) if wantarray; # Can be used by manage_extras.
|
||||
}
|
||||
|
||||
sub enable_extras (@) {
|
||||
my (@extras) = @_;
|
||||
for my $extra (@extras) {
|
||||
my $extrapath = "modules/extra/$extra";
|
||||
if (!-e $extrapath) {
|
||||
print STDERR "Cannot enable \e[32;1m$extra\e[0m : No such file or directory in modules/extra\n";
|
||||
next;
|
||||
}
|
||||
my $source = "modules/$extra";
|
||||
if (-e $source) {
|
||||
print STDERR "Cannot enable \e[32;1m$extra\e[0m : destination in modules exists (might already be enabled?)\n";
|
||||
next;
|
||||
}
|
||||
print "Enabling $extra ... \n";
|
||||
symlink "extra/$extra", $source or print STDERR "$source: Cannot link to 'extra/$extra': $!\n";
|
||||
}
|
||||
}
|
||||
|
||||
sub disable_extras (@)
|
||||
{
|
||||
opendir my $dd, "modules/extra/";
|
||||
my @files = readdir($dd);
|
||||
closedir $dd;
|
||||
my (@extras) = @_;
|
||||
EXTRA: for my $extra (@extras) {
|
||||
my $extrapath = "modules/extra/$extra";
|
||||
my $source = "modules/$extra";
|
||||
if (!-e $extrapath) {
|
||||
print STDERR "Cannot disable \e[32;1m$extra\e[0m : Is not an extra\n";
|
||||
next;
|
||||
}
|
||||
if ((! -l $source) || readlink($source) ne "extra/$extra") {
|
||||
print STDERR "Cannot disable \e[32;1m$extra\e[0m : Source is not a link or doesn't refer to the right file. Remove manually if this is in error.\n";
|
||||
next;
|
||||
}
|
||||
# Now remove.
|
||||
print "Disabling $extra ... \n";
|
||||
unlink "modules/$extra" or print STDERR "Cannot disable \e[32;1m$extra\e[0m : $!\n";
|
||||
}
|
||||
}
|
||||
|
||||
my $clearscreen = `clear`;
|
||||
print $clearscreen;
|
||||
while (1)
|
||||
{
|
||||
list_extras; # print the module list
|
||||
print "\nPlease enter the name of the module or type 'q' to quit.: ";
|
||||
my $input = <STDIN>;
|
||||
chop($input); # remove the trailing \n from the user input
|
||||
|
||||
if ($input eq "q") {
|
||||
if (-e "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"
|
||||
}
|
||||
exit 0;
|
||||
}
|
||||
print $clearscreen;
|
||||
if ($input eq "") {
|
||||
next;
|
||||
}
|
||||
|
||||
if (-e "modules/$input") {
|
||||
disable_extras($input)
|
||||
} else {
|
||||
enable_extras($input)
|
||||
}
|
||||
}
|
||||
+14
-2
@@ -75,10 +75,19 @@ class CoreExport AccessProvider : public Service
|
||||
class CoreExport ChanAccess : public Serializable
|
||||
{
|
||||
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;
|
||||
|
||||
/* The provider that created this access entry */
|
||||
AccessProvider *provider;
|
||||
/* Channel this access entry is on */
|
||||
Serialize::Reference<ChannelInfo> ci;
|
||||
/* account this access entry is for, if any */
|
||||
Serialize::Reference<NickCore> nc;
|
||||
Anope::string mask;
|
||||
Anope::string creator;
|
||||
time_t last_seen;
|
||||
@@ -93,8 +102,9 @@ class CoreExport ChanAccess : public Serializable
|
||||
/** 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
|
||||
*/
|
||||
virtual bool Matches(const User *u, const NickCore *nc) const;
|
||||
virtual bool Matches(const User *u, const NickCore *nc, Path &p) const;
|
||||
|
||||
/** Check if this access entry has the given privilege.
|
||||
* @param name The privilege name
|
||||
@@ -125,8 +135,10 @@ class CoreExport ChanAccess : public Serializable
|
||||
class CoreExport AccessGroup : public std::vector<ChanAccess *>
|
||||
{
|
||||
public:
|
||||
/* Channel these access entries are on */
|
||||
/* 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 */
|
||||
|
||||
+6
-86
@@ -27,15 +27,6 @@ extern CoreExport Serialize::Checker<nickcore_map> NickCoreList;
|
||||
|
||||
/* A registered nickname.
|
||||
* It matters that Base is here before Extensible (it is inherited by Serializable)
|
||||
*
|
||||
* Possible flags:
|
||||
* NO_EXPIRE - Nick never expires
|
||||
* HELD - This nick is being held after a kill by an enforcer client
|
||||
* or is being SVSHeld.
|
||||
* COLLIDED - We are taking over this nick, either by SVSNICK or KILL
|
||||
* and are waiting for the confirmation of either of these actions to
|
||||
* proceed. This is checked in NickAlias::OnCancel
|
||||
*
|
||||
*/
|
||||
class CoreExport NickAlias : public Serializable, public Extensible
|
||||
{
|
||||
@@ -65,18 +56,6 @@ class CoreExport NickAlias : public Serializable, public Extensible
|
||||
void Serialize(Serialize::Data &data) const anope_override;
|
||||
static Serializable* Unserialize(Serializable *obj, Serialize::Data &);
|
||||
|
||||
/** Release a nick
|
||||
* See the comment in users.cpp
|
||||
*/
|
||||
void Release();
|
||||
|
||||
/** This function is called when a user on this nick either disconnects or changes nick.
|
||||
* Note that the user isnt necessarially identified to this nick
|
||||
* See the comment in users.cpp
|
||||
* @param u The user
|
||||
*/
|
||||
void OnCancel(User *u);
|
||||
|
||||
/** Set a vhost for the user
|
||||
* @param ident The ident
|
||||
* @param host The host
|
||||
@@ -124,26 +103,6 @@ class CoreExport NickAlias : public Serializable, public Extensible
|
||||
/* A registered account. Each account must have a NickAlias with the same nick as the
|
||||
* account's display.
|
||||
* It matters that Base is here before Extensible (it is inherited by Serializable)
|
||||
*
|
||||
* Possible flags:
|
||||
* KILLPROTECT - Kill other users who try to take this nick
|
||||
* SECURE - Don't recognize unless identified
|
||||
* MSG - Use PRIVMSG instead of notice
|
||||
* MEMO_HARDMAX - Don't allow user to change memo limit
|
||||
* MEMO_SIGNON - Notify of memos at signon and unaway
|
||||
* MEMO_RECEIEVE - Notify of new memos when sent
|
||||
* PRIVATE - Don't show in LIST to non-servadmins
|
||||
* HIDE_EMAIL - Don't show email in INFO
|
||||
* HIDE_MASK - Don't show last seen address in INFO
|
||||
* HIDE_QUIT - Don't show last quit message in INFO
|
||||
* KILL_QUICK - Kill quicker
|
||||
* KILL_IMMED - Kill immediately
|
||||
* MEMO_MAIL - User gets email on memo
|
||||
* HIDE_STATUS - Don't show services access status
|
||||
* SUSPEND - Nickname is suspended
|
||||
* AUTOOP - Autoop nickname in channels
|
||||
* UNCONFIRMED - Account has not had email address confirmed
|
||||
* STATS - ChanStats is enabled for this user
|
||||
*/
|
||||
class CoreExport NickCore : public Serializable, public Extensible
|
||||
{
|
||||
@@ -155,16 +114,13 @@ class CoreExport NickCore : public Serializable, public Extensible
|
||||
/* User password in form of hashm:data */
|
||||
Anope::string pass;
|
||||
Anope::string email;
|
||||
/* Greet associated with the account, sometimes sent when the user joins a channel */
|
||||
Anope::string greet;
|
||||
/* Locale name of the language of the user. Empty means default language */
|
||||
Anope::string language;
|
||||
/* Access list, contains user@host masks of users who get certain privileges based
|
||||
* on if NI_SECURE is set and what (if any) kill protection is enabled. */
|
||||
std::vector<Anope::string> access;
|
||||
/* SSL certificate list. Users who have a matching certificate may be automatically logged in */
|
||||
std::vector<Anope::string> cert;
|
||||
MemoInfo memos;
|
||||
std::map<Anope::string, Anope::string> last_modes;
|
||||
|
||||
/* Nicknames registered that are grouped to this account.
|
||||
* for n in aliases, n->nc == this.
|
||||
@@ -219,6 +175,10 @@ class CoreExport NickCore : public Serializable, public Extensible
|
||||
*/
|
||||
Anope::string GetAccess(unsigned entry) const;
|
||||
|
||||
/** Get the number of entries on the access list for this account.
|
||||
*/
|
||||
unsigned GetAccessCount() const;
|
||||
|
||||
/** Find an entry in the nick's access list
|
||||
*
|
||||
* @param entry The nick!ident@host entry to search for
|
||||
@@ -250,46 +210,6 @@ class CoreExport NickCore : public Serializable, public Extensible
|
||||
*/
|
||||
bool IsOnAccess(const User *u) const;
|
||||
|
||||
/** Add an entry to the nick's certificate list
|
||||
*
|
||||
* @param entry The fingerprint to add to the cert list
|
||||
*
|
||||
* Adds a new entry into the cert list.
|
||||
*/
|
||||
void AddCert(const Anope::string &entry);
|
||||
|
||||
/** Get an entry from the nick's cert list by index
|
||||
*
|
||||
* @param entry Index in the certificaate list vector to retrieve
|
||||
* @return The fingerprint entry of the given index if within bounds, an empty string if the vector is empty or the index is out of bounds
|
||||
*
|
||||
* Retrieves an entry from the certificate list corresponding to the given index.
|
||||
*/
|
||||
Anope::string GetCert(unsigned entry) const;
|
||||
|
||||
/** Find an entry in the nick's cert list
|
||||
*
|
||||
* @param entry The fingerprint to search for
|
||||
* @return True if the fingerprint is found in the cert list, false otherwise
|
||||
*
|
||||
* Search for an fingerprint within the cert list.
|
||||
*/
|
||||
bool FindCert(const Anope::string &entry) const;
|
||||
|
||||
/** Erase a fingerprint from the nick's certificate list
|
||||
*
|
||||
* @param entry The fingerprint to remove
|
||||
*
|
||||
* Removes the specified fingerprint from the cert list.
|
||||
*/
|
||||
void EraseCert(const Anope::string &entry);
|
||||
|
||||
/** Clears the entire nick's cert list
|
||||
*
|
||||
* Deletes all the memory allocated in the certificate list vector and then clears the vector.
|
||||
*/
|
||||
void ClearCert();
|
||||
|
||||
/** Finds an account
|
||||
* @param nick The account name to find
|
||||
* @return The account, if it exists
|
||||
@@ -302,7 +222,7 @@ class CoreExport NickCore : public Serializable, public Extensible
|
||||
};
|
||||
|
||||
/* A request to check if an account/password is valid. These can exist for
|
||||
* extended periods of time due to some authentication modules take.
|
||||
* extended periods due to the time some authentication modules take.
|
||||
*/
|
||||
class CoreExport IdentifyRequest
|
||||
{
|
||||
|
||||
+23
-18
@@ -225,7 +225,7 @@ namespace Anope
|
||||
inline string replace(iterator first, iterator last, const string &_str) { return string(this->_string.replace(first, last, _str._string)); }
|
||||
inline string replace(iterator first, iterator last, size_type n, char chr) { return string(this->_string.replace(first, last, n, chr)); }
|
||||
template <class InputIterator> inline string replace(iterator first, iterator last, InputIterator f, InputIterator l) { return string(this->_string.replace(first, last, f, l)); }
|
||||
inline string replace_all_cs(const string &_orig, const string &_repl)
|
||||
inline string replace_all_cs(const string &_orig, const string &_repl) const
|
||||
{
|
||||
Anope::string new_string = *this;
|
||||
size_type pos = new_string.find(_orig), orig_length = _orig.length(), repl_length = _repl.length();
|
||||
@@ -236,7 +236,7 @@ namespace Anope
|
||||
}
|
||||
return new_string;
|
||||
}
|
||||
inline string replace_all_ci(const string &_orig, const string &_repl)
|
||||
inline string replace_all_ci(const string &_orig, const string &_repl) const
|
||||
{
|
||||
Anope::string new_string = *this;
|
||||
size_type pos = new_string.find_ci(_orig), orig_length = _orig.length(), repl_length = _repl.length();
|
||||
@@ -255,7 +255,7 @@ namespace Anope
|
||||
{
|
||||
Anope::string new_string = *this;
|
||||
for (size_type i = 0; i < new_string.length(); ++i)
|
||||
new_string[i] = std::tolower(new_string[i], Anope::casemap);
|
||||
new_string[i] = Anope::tolower(new_string[i]);
|
||||
return new_string;
|
||||
}
|
||||
|
||||
@@ -266,7 +266,7 @@ namespace Anope
|
||||
{
|
||||
Anope::string new_string = *this;
|
||||
for (size_type i = 0; i < new_string.length(); ++i)
|
||||
new_string[i] = std::toupper(new_string[i], Anope::casemap);
|
||||
new_string[i] = Anope::toupper(new_string[i]);
|
||||
return new_string;
|
||||
}
|
||||
|
||||
@@ -312,7 +312,7 @@ namespace Anope
|
||||
{
|
||||
inline size_t operator()(const string &s) const
|
||||
{
|
||||
return std::tr1::hash<std::string>()(s.lower().str());
|
||||
return TR1NS::hash<std::string>()(s.lower().str());
|
||||
}
|
||||
};
|
||||
|
||||
@@ -320,7 +320,7 @@ namespace Anope
|
||||
{
|
||||
inline size_t operator()(const string &s) const
|
||||
{
|
||||
return std::tr1::hash<std::string>()(s.str());
|
||||
return TR1NS::hash<std::string>()(s.str());
|
||||
}
|
||||
};
|
||||
|
||||
@@ -333,7 +333,8 @@ namespace Anope
|
||||
};
|
||||
|
||||
template<typename T> class map : public std::map<string, T, ci::less> { };
|
||||
template<typename T> class hash_map : public std::tr1::unordered_map<string, T, hash_ci, compare> { };
|
||||
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> { };
|
||||
|
||||
static const char *const compiled = __TIME__ " " __DATE__;
|
||||
|
||||
@@ -534,6 +535,11 @@ namespace Anope
|
||||
* @return the IP if it was found, else the host
|
||||
*/
|
||||
extern Anope::string Resolve(const Anope::string &host, int type);
|
||||
|
||||
/** Generate a string of random letters and numbers
|
||||
* @param len The length of the string returned
|
||||
*/
|
||||
extern CoreExport Anope::string Random(size_t len);
|
||||
}
|
||||
|
||||
/** sepstream allows for splitting token seperated lists.
|
||||
@@ -547,19 +553,19 @@ class CoreExport sepstream
|
||||
/** Original string.
|
||||
*/
|
||||
Anope::string tokens;
|
||||
/** Last position of a seperator token
|
||||
*/
|
||||
Anope::string::iterator last_starting_position;
|
||||
/** Current string position
|
||||
*/
|
||||
Anope::string::iterator n;
|
||||
/** Seperator value
|
||||
*/
|
||||
char sep;
|
||||
/** Current string position
|
||||
*/
|
||||
size_t pos;
|
||||
/** If set then GetToken() can return an empty string
|
||||
*/
|
||||
bool allow_empty;
|
||||
public:
|
||||
/** Create a sepstream and fill it with the provided data
|
||||
*/
|
||||
sepstream(const Anope::string &source, char seperator);
|
||||
sepstream(const Anope::string &source, char seperator, bool allowempty = false);
|
||||
|
||||
/** Fetch the next token from the stream
|
||||
* @param token The next token from the stream is placed here
|
||||
@@ -570,7 +576,7 @@ class CoreExport sepstream
|
||||
/** Gets token number 'num' from the stream
|
||||
* @param token The token is placed here
|
||||
* @param num The token number to featch
|
||||
* @return True if the token was able to be detched
|
||||
* @return True if the token was able to be fetched
|
||||
*/
|
||||
bool GetToken(Anope::string &token, int num);
|
||||
|
||||
@@ -588,7 +594,7 @@ class CoreExport sepstream
|
||||
/** Gets token number 'num' from the stream and all remaining tokens.
|
||||
* @param token The token is placed here
|
||||
* @param num The token number to featch
|
||||
* @return True if the token was able to be detched
|
||||
* @return True if the token was able to be fetched
|
||||
*/
|
||||
bool GetTokenRemainder(Anope::string &token, int num);
|
||||
|
||||
@@ -715,8 +721,7 @@ template<typename T> inline void convert(const Anope::string &s, T &x, Anope::st
|
||||
leftover.clear();
|
||||
std::istringstream i(s.str());
|
||||
char c;
|
||||
bool res = i >> x;
|
||||
if (!res)
|
||||
if (!(i >> x))
|
||||
throw ConvertException("Convert fail");
|
||||
if (failIfLeftoverChars)
|
||||
{
|
||||
|
||||
+4
-5
@@ -23,6 +23,8 @@ extern CoreExport Serialize::Checker<botinfo_map> BotListByNick, BotListByUID;
|
||||
/* A service bot (NickServ, ChanServ, a BotServ bot, etc). */
|
||||
class CoreExport BotInfo : public User, public Serializable
|
||||
{
|
||||
/* Channels this bot is assigned to */
|
||||
Serialize::Checker<std::set<ChannelInfo *> > channels;
|
||||
public:
|
||||
time_t created;
|
||||
/* Last time this bot said something (via privmsg) */
|
||||
@@ -63,10 +65,9 @@ class CoreExport BotInfo : public User, public Serializable
|
||||
*/
|
||||
void SetNewNick(const Anope::string &newnick);
|
||||
|
||||
/** Rejoins all channels that this bot is assigned to.
|
||||
* Used on /kill, rename, etc.
|
||||
/** Return the channels this bot is assigned to
|
||||
*/
|
||||
void RejoinAll();
|
||||
const std::set<ChannelInfo *> &GetChannels() const;
|
||||
|
||||
/** Assign this bot to a given channel, removing the existing assigned bot if one exists.
|
||||
* @param u The user assigning the bot, or NULL
|
||||
@@ -130,6 +131,4 @@ class CoreExport BotInfo : public User, public Serializable
|
||||
static BotInfo* Find(const Anope::string &nick, bool nick_only = false);
|
||||
};
|
||||
|
||||
extern CoreExport BotInfo *BotServ, *ChanServ, *Global, *HostServ, *MemoServ, *NickServ, *OperServ;
|
||||
|
||||
#endif // BOTS_H
|
||||
|
||||
+32
-24
@@ -30,16 +30,6 @@ struct ChanUserContainer : public Extensible
|
||||
ChanUserContainer(User *u, Channel *c) : user(u), chan(c) { }
|
||||
};
|
||||
|
||||
enum ChannelFlag
|
||||
{
|
||||
/* ChanServ is currently holding the channel */
|
||||
CH_INHABIT,
|
||||
/* Channel still exists when emptied */
|
||||
CH_PERSIST,
|
||||
/* If set the channel is syncing users (channel was just created) and it should not be deleted */
|
||||
CH_SYNCING
|
||||
};
|
||||
|
||||
class CoreExport Channel : public Base, public Extensible
|
||||
{
|
||||
public:
|
||||
@@ -56,10 +46,13 @@ class CoreExport Channel : public Base, public Extensible
|
||||
Serialize::Reference<ChannelInfo> ci;
|
||||
/* When the channel was created */
|
||||
time_t creation_time;
|
||||
std::set<ChannelFlag> flags;
|
||||
/* If the channel has just been created in a netjoin */
|
||||
bool syncing;
|
||||
/* Is configured in the conf as a channel bots should be in */
|
||||
bool botchannel;
|
||||
|
||||
/* Users in the channel */
|
||||
typedef std::list<ChanUserContainer *> ChanUserList;
|
||||
typedef std::map<User *, ChanUserContainer *> ChanUserList;
|
||||
ChanUserList users;
|
||||
|
||||
/* Current topic of the channel */
|
||||
@@ -80,12 +73,14 @@ class CoreExport Channel : public Base, public Extensible
|
||||
int16_t chanserv_modecount; /* Number of check_mode()'s this sec */
|
||||
int16_t bouncy_modes; /* Did we fail to set modes here? */
|
||||
|
||||
private:
|
||||
/** Constructor
|
||||
* @param name The channel name
|
||||
* @param ts The time the channel was created
|
||||
*/
|
||||
Channel(const Anope::string &nname, time_t ts = Anope::CurTime);
|
||||
|
||||
public:
|
||||
/** Destructor
|
||||
*/
|
||||
~Channel();
|
||||
@@ -103,11 +98,16 @@ class CoreExport Channel : public Base, public Extensible
|
||||
*/
|
||||
void CheckModes();
|
||||
|
||||
/** Check if this channel should be deleted
|
||||
*/
|
||||
bool CheckDelete();
|
||||
|
||||
/** Join a user internally to the channel
|
||||
* @param u The user
|
||||
* @param status The status to give the user, if any
|
||||
* @return The UserContainer for the user
|
||||
*/
|
||||
ChanUserContainer* JoinUser(User *u);
|
||||
ChanUserContainer* JoinUser(User *u, const ChannelStatus *status);
|
||||
|
||||
/** Remove a user internally from the channel
|
||||
* @param u The user
|
||||
@@ -118,14 +118,14 @@ class CoreExport Channel : public Base, public Extensible
|
||||
* @param u The user
|
||||
* @return A user container if found, else NULL
|
||||
*/
|
||||
ChanUserContainer *FindUser(const User *u) const;
|
||||
ChanUserContainer *FindUser(User *u) const;
|
||||
|
||||
/** Check if a user has a status on a channel
|
||||
* @param u The user
|
||||
* @param cms The status mode, or NULL to represent no status
|
||||
* @return true or false
|
||||
*/
|
||||
bool HasUserStatus(const User *u, ChannelModeStatus *cms) const;
|
||||
bool HasUserStatus(User *u, ChannelModeStatus *cms);
|
||||
|
||||
/** Check if a user has a status on a channel
|
||||
* Use the overloaded function for ChannelModeStatus* to check for no status
|
||||
@@ -133,7 +133,7 @@ class CoreExport Channel : public Base, public Extensible
|
||||
* @param name The mode name, eg CMODE_OP, CMODE_VOICE
|
||||
* @return true or false
|
||||
*/
|
||||
bool HasUserStatus(const User *u, const Anope::string &name) const;
|
||||
bool HasUserStatus(User *u, const Anope::string &name);
|
||||
|
||||
/** See if a channel has a mode
|
||||
* @param name The mode name
|
||||
@@ -225,7 +225,7 @@ class CoreExport Channel : public Base, public Extensible
|
||||
* @param nick The nick being kicked
|
||||
* @param reason The reason for the kick
|
||||
*/
|
||||
void KickInternal(MessageSource &source, const Anope::string &nick, const Anope::string &reason);
|
||||
void KickInternal(const MessageSource &source, const Anope::string &nick, const Anope::string &reason);
|
||||
|
||||
/** Kick a user from the channel
|
||||
* @param bi The sender, can be NULL for the service bot for this channel
|
||||
@@ -267,30 +267,38 @@ class CoreExport Channel : public Base, public Extensible
|
||||
*/
|
||||
void ChangeTopic(const Anope::string &user, const Anope::string &newtopic, time_t ts = Anope::CurTime);
|
||||
|
||||
/** Hold the channel open using ChanServ
|
||||
*/
|
||||
void Hold();
|
||||
|
||||
/** Set the correct modes, or remove the ones granted without permission,
|
||||
* for the specified user.
|
||||
* @param user The user to give/remove modes to/from
|
||||
* @param give_modes if true modes may be given to the user
|
||||
* @param check_noop if true, CI_NOAUTOOP is checked before giving modes
|
||||
*/
|
||||
void SetCorrectModes(User *u, bool give_mode, bool check_noop);
|
||||
void SetCorrectModes(User *u, bool give_modes);
|
||||
|
||||
/** Unbans a user from this channel.
|
||||
* @param u The user to unban
|
||||
* @param full Whether or not to match using the user's real host and IP
|
||||
* @return whether or not a ban was removed
|
||||
*/
|
||||
bool Unban(const User *u, bool full = false);
|
||||
bool Unban(User *u, bool full = false);
|
||||
|
||||
/** Check whether a user is permitted to be on this channel
|
||||
* @param u The user
|
||||
* @return true if they are allowed, false if they aren't and were kicked
|
||||
*/
|
||||
bool CheckKick(User *user);
|
||||
|
||||
/** Finds a channel
|
||||
* @param name The channel to find
|
||||
* @return The channel, if found
|
||||
*/
|
||||
static Channel* Find(const Anope::string &name);
|
||||
|
||||
/** Finds or creates a channel
|
||||
* @param name The channel name
|
||||
* @param created Set to true if the channel was just created
|
||||
* @param ts The time the channel was created
|
||||
*/
|
||||
static Channel *FindOrCreate(const Anope::string &name, bool &created, time_t ts = Anope::CurTime);
|
||||
};
|
||||
|
||||
#endif // CHANNELS_H
|
||||
|
||||
+19
-6
@@ -46,7 +46,7 @@ struct CommandInfo
|
||||
struct CoreExport CommandReply
|
||||
{
|
||||
virtual ~CommandReply() { }
|
||||
virtual void SendMessage(const BotInfo *source, const Anope::string &msg) = 0;
|
||||
virtual void SendMessage(BotInfo *source, const Anope::string &msg) = 0;
|
||||
};
|
||||
|
||||
/* The source for a command */
|
||||
@@ -55,7 +55,7 @@ class CoreExport CommandSource
|
||||
/* The nick executing the command */
|
||||
Anope::string nick;
|
||||
/* User executing the command, may be NULL */
|
||||
User *u;
|
||||
Reference<User> u;
|
||||
public:
|
||||
/* The account executing the command */
|
||||
Reference<NickCore> nc;
|
||||
@@ -126,7 +126,6 @@ class CoreExport Command : public Service
|
||||
void ClearSyntax();
|
||||
void SetSyntax(const Anope::string &s);
|
||||
void SendSyntax(CommandSource &);
|
||||
void SendSyntax(CommandSource &, const Anope::string &syntax);
|
||||
|
||||
void AllowUnregistered(bool b);
|
||||
void RequireUser(bool b);
|
||||
@@ -136,9 +135,10 @@ class CoreExport Command : public Service
|
||||
bool RequireUser() const;
|
||||
|
||||
/** Get the command description
|
||||
* @param source The source wanting the command description
|
||||
* @return The commands description
|
||||
*/
|
||||
const Anope::string &GetDesc() const;
|
||||
virtual const Anope::string GetDesc(CommandSource &source) const;
|
||||
|
||||
/** Execute this command.
|
||||
* @param source The source
|
||||
@@ -163,8 +163,21 @@ class CoreExport Command : public Service
|
||||
* @param subcommand The subcommand the user tried to use
|
||||
*/
|
||||
virtual void OnSyntaxError(CommandSource &source, const Anope::string &subcommand);
|
||||
|
||||
/** Runs a command
|
||||
* @param source The source of the command
|
||||
* @param message The full message to run, the command is at the beginning of the message
|
||||
*/
|
||||
static void Run(CommandSource &source, const Anope::string &message);
|
||||
|
||||
/** Looks up a command name from the service name.
|
||||
* Note that if the same command exists multiple places this will return the first one encountered
|
||||
* @param command_service The command service to lookup, eg, nickserv/register
|
||||
* @param bot If found, is set to the bot the command is on, eg NickServ
|
||||
* @param name If found, is set to the comand name, eg REGISTER
|
||||
* @return true if the given command service exists
|
||||
*/
|
||||
static bool FindCommandFromService(const Anope::string &command_service, BotInfo* &bi, Anope::string &name);
|
||||
};
|
||||
|
||||
extern CoreExport void RunCommand(CommandSource &source, const Anope::string &message);
|
||||
|
||||
#endif // COMMANDS_H
|
||||
|
||||
+113
-747
@@ -16,319 +16,127 @@
|
||||
#include "account.h"
|
||||
#include "regchannel.h"
|
||||
#include "users.h"
|
||||
#include "opertype.h"
|
||||
#include <stack>
|
||||
|
||||
/** A configuration key and value pair
|
||||
*/
|
||||
typedef std::pair<Anope::string, Anope::string> KeyVal;
|
||||
|
||||
/** A list of related configuration keys and values
|
||||
*/
|
||||
typedef std::vector<KeyVal> KeyValList;
|
||||
|
||||
/** An entire config file, built up of KeyValLists
|
||||
*/
|
||||
typedef std::multimap<Anope::string, KeyValList> ConfigDataHash;
|
||||
|
||||
// Required forward definitions
|
||||
|
||||
/** Types of data in the core config
|
||||
*/
|
||||
enum ConfigDataType
|
||||
namespace Configuration
|
||||
{
|
||||
DT_NOTHING, // No data
|
||||
DT_INTEGER, // Integer
|
||||
DT_UINTEGER, // Unsigned Integer
|
||||
DT_LUINTEGER, // Long Unsigned Integer
|
||||
DT_STRING, // Anope::string
|
||||
DT_BOOLEAN, // Boolean
|
||||
DT_HOSTNAME, // Hostname syntax
|
||||
DT_NOSPACES, // No spaces
|
||||
DT_IPADDRESS, // IP address (v4, v6)
|
||||
DT_TIME, // Time value
|
||||
DT_NORELOAD = 32, // Item can't be reloaded after startup
|
||||
DT_ALLOW_WILD = 64, // Allow wildcards/CIDR in DT_IPADDRESS
|
||||
DT_ALLOW_NEWLINE = 128, // New line characters allowed in DT_STRING
|
||||
DT_ALLOW_EMPTY = 256 // Allow empty value
|
||||
};
|
||||
|
||||
/** Holds a config value, either string, integer or boolean.
|
||||
* Callback functions receive one or more of these, either on
|
||||
* their own as a reference, or in a reference to a deque of them.
|
||||
* The callback function can then alter the values of the ValueItem
|
||||
* classes to validate the settings.
|
||||
*/
|
||||
class CoreExport ValueItem
|
||||
{
|
||||
private:
|
||||
/** Actual data */
|
||||
Anope::string v;
|
||||
public:
|
||||
/** Initialize with nothing */
|
||||
ValueItem();
|
||||
/** Initialize with an int */
|
||||
ValueItem(int);
|
||||
/** Initialize with a bool */
|
||||
ValueItem(bool);
|
||||
/** Initialize with an Anope::string */
|
||||
ValueItem(const Anope::string &);
|
||||
/** Initialize with a long */
|
||||
ValueItem(long);
|
||||
/** Change value to an Anope::string */
|
||||
void Set(const Anope::string &);
|
||||
/** Change value to an int */
|
||||
void Set(int);
|
||||
/** Get value as an int */
|
||||
int GetInteger() const;
|
||||
/** Get value as a string */
|
||||
const char *GetString() const;
|
||||
/** Get value as an Anope::string */
|
||||
inline const Anope::string &GetValue() const { return v; }
|
||||
/** Get value as a bool */
|
||||
bool GetBool() const;
|
||||
};
|
||||
|
||||
/** The base class of the container 'ValueContainer'
|
||||
* used internally by the core to hold core values.
|
||||
*/
|
||||
class ValueContainerBase
|
||||
{
|
||||
public:
|
||||
/** Constructor */
|
||||
ValueContainerBase() { }
|
||||
/** Destructor */
|
||||
virtual ~ValueContainerBase() { }
|
||||
};
|
||||
|
||||
/** ValueContainer is used to contain pointers to different
|
||||
* core values such as the server name, maximum number of
|
||||
* clients etc.
|
||||
* It is specialized to hold a data type, then pointed at
|
||||
* a value in the ServerConfig class. When the value has been
|
||||
* read and validated, the Set method is called to write the
|
||||
* value safely in a type-safe manner.
|
||||
*/
|
||||
template<typename T> class ValueContainer : public ValueContainerBase
|
||||
{
|
||||
private:
|
||||
/** Contained item */
|
||||
T val;
|
||||
public:
|
||||
/** Initialize with nothing */
|
||||
ValueContainer() : ValueContainerBase(), val(NULL) { }
|
||||
/** Initialize with a value of type T */
|
||||
ValueContainer(T Val) : ValueContainerBase(), val(Val) { }
|
||||
/** Initialize with a copy */
|
||||
ValueContainer(const ValueContainer &Val) : ValueContainerBase(), val(Val.val) { }
|
||||
ValueContainer &operator=(const ValueContainer &Val)
|
||||
class CoreExport Block
|
||||
{
|
||||
val = Val.val;
|
||||
return *this;
|
||||
}
|
||||
/** Change value to type T of size s */
|
||||
void Set(const T newval, size_t s)
|
||||
friend struct Conf;
|
||||
|
||||
public:
|
||||
typedef Anope::map<Anope::string> item_map;
|
||||
typedef Anope::multimap<Block> block_map;
|
||||
|
||||
private:
|
||||
Anope::string name;
|
||||
item_map items;
|
||||
block_map blocks;
|
||||
int linenum;
|
||||
|
||||
public:
|
||||
Block(const Anope::string &);
|
||||
const Anope::string &GetName() const;
|
||||
int CountBlock(const Anope::string &name);
|
||||
Block* GetBlock(const Anope::string &name, int num = 0);
|
||||
|
||||
template<typename T> inline T Get(const Anope::string &tag)
|
||||
{
|
||||
return this->Get<T>(tag, "");
|
||||
}
|
||||
/* VS 2008 has an issue with having a default argument here (def = ""), which is why the above
|
||||
* function exists.
|
||||
*/
|
||||
template<typename T> T Get(const Anope::string &tag, const Anope::string &def) const
|
||||
{
|
||||
const Anope::string &value = this->Get<const Anope::string>(tag, def);
|
||||
try
|
||||
{
|
||||
return convertTo<T>(value);
|
||||
}
|
||||
catch (const ConvertException &)
|
||||
{
|
||||
return T();
|
||||
}
|
||||
}
|
||||
|
||||
bool Set(const Anope::string &tag, const Anope::string &value);
|
||||
const item_map* GetItems() const;
|
||||
};
|
||||
|
||||
template<> CoreExport const Anope::string Block::Get(const Anope::string &tag, const Anope::string& def) const;
|
||||
template<> CoreExport time_t Block::Get(const Anope::string &tag, const Anope::string &def) const;
|
||||
template<> CoreExport bool Block::Get(const Anope::string &tag, const Anope::string &def) const;
|
||||
|
||||
/** Represents a configuration file
|
||||
*/
|
||||
class File
|
||||
{
|
||||
memcpy(val, newval, s);
|
||||
}
|
||||
};
|
||||
Anope::string name;
|
||||
bool executable;
|
||||
FILE *fp;
|
||||
public:
|
||||
File(const Anope::string &, bool);
|
||||
~File();
|
||||
const Anope::string &GetName() const;
|
||||
|
||||
/** This a specific version of ValueContainer to handle Anope::string specially
|
||||
*/
|
||||
template<> class ValueContainer<Anope::string *> : public ValueContainerBase
|
||||
{
|
||||
private:
|
||||
/** Contained item */
|
||||
Anope::string *val;
|
||||
public:
|
||||
/** Initialize with nothing */
|
||||
ValueContainer() : ValueContainerBase(), val(NULL) { }
|
||||
/** Initialize with an std::string */
|
||||
ValueContainer(Anope::string *Val) : ValueContainerBase(), val(Val) { }
|
||||
/** Initialize with a copy */
|
||||
ValueContainer(const ValueContainer &Val) : ValueContainerBase(), val(Val.val) { }
|
||||
ValueContainer &operator=(const ValueContainer &Val)
|
||||
bool IsOpen() const;
|
||||
bool Open();
|
||||
void Close();
|
||||
bool End() const;
|
||||
Anope::string Read();
|
||||
};
|
||||
|
||||
struct Uplink;
|
||||
|
||||
struct CoreExport Conf : Block
|
||||
{
|
||||
val = Val.val;
|
||||
return *this;
|
||||
}
|
||||
/* options:readtimeout */
|
||||
time_t ReadTimeout;
|
||||
/* options:useprivmsg */
|
||||
bool UsePrivmsg;
|
||||
/* If we should default to privmsging clients */
|
||||
bool DefPrivmsg;
|
||||
/* Default language */
|
||||
Anope::string DefLanguage;
|
||||
/* options:timeoutcheck */
|
||||
time_t TimeoutCheck;
|
||||
/* options:usestrictprivmsg */
|
||||
bool UseStrictPrivmsg;
|
||||
|
||||
/** Change value to given Anope::string */
|
||||
void Set(const Anope::string &newval)
|
||||
{
|
||||
*val = newval;
|
||||
}
|
||||
/** Change value to given char pointer */
|
||||
void Set(const char *newval)
|
||||
{
|
||||
*val = newval;
|
||||
}
|
||||
};
|
||||
/* either "/msg " or "/" */
|
||||
Anope::string StrictPrivmsg;
|
||||
/* List of uplink servers to try and connect to */
|
||||
std::vector<Uplink> Uplinks;
|
||||
/* A vector of our logfile options */
|
||||
std::vector<LogInfo> LogInfos;
|
||||
/* Array of ulined servers */
|
||||
std::vector<Anope::string> Ulines;
|
||||
/* List of available opertypes */
|
||||
std::vector<OperType *> MyOperTypes;
|
||||
/* List of pairs of opers and their opertype from the config */
|
||||
std::vector<Oper *> Opers;
|
||||
/* Map of fantasy commands */
|
||||
CommandInfo::map Fantasy;
|
||||
/* Command groups */
|
||||
std::vector<CommandGroup> CommandGroups;
|
||||
/* List of modules to autoload */
|
||||
std::vector<Anope::string> ModulesAutoLoad;
|
||||
|
||||
/** A specialization of ValueContainer to hold a pointer to a bool
|
||||
*/
|
||||
typedef ValueContainer<bool *> ValueContainerBool;
|
||||
/* module configuration blocks */
|
||||
std::map<Anope::string, Block *> modules;
|
||||
Anope::map<Anope::string> bots;
|
||||
|
||||
/** A specialization of ValueContainer to hold a pointer to
|
||||
* an unsigned int
|
||||
*/
|
||||
typedef ValueContainer<unsigned *> ValueContainerUInt;
|
||||
Conf();
|
||||
|
||||
/** A specialization of ValueContainer to hold a pointer to
|
||||
* a long unsigned int
|
||||
*/
|
||||
typedef ValueContainer<long unsigned *> ValueContainerLUInt;
|
||||
void LoadConf(File &file);
|
||||
|
||||
/** A specialization of ValueContainer to hold a pointer to
|
||||
* an int
|
||||
*/
|
||||
typedef ValueContainer<int *> ValueContainerInt;
|
||||
Block *GetModule(Module *);
|
||||
Block *GetModule(const Anope::string &name);
|
||||
|
||||
/** A specialization of ValueContainer to hold a pointer to
|
||||
* a time_t
|
||||
*/
|
||||
typedef ValueContainer<time_t *> ValueContainerTime;
|
||||
|
||||
/** A specialization of ValueContainer to hold a pointer to
|
||||
* an Anope::string
|
||||
*/
|
||||
typedef ValueContainer<Anope::string *> ValueContainerString;
|
||||
|
||||
/** A set of ValueItems used by multi-value validator functions
|
||||
*/
|
||||
typedef std::deque<ValueItem> ValueList;
|
||||
|
||||
/** A callback for validating a single value
|
||||
*/
|
||||
typedef bool (*Validator)(ServerConfig *, const Anope::string &, const Anope::string &, ValueItem &);
|
||||
/** A callback for validating multiple value entries
|
||||
*/
|
||||
typedef bool (*MultiValidator)(ServerConfig *, const Anope::string &, const Anope::string *, ValueList &, int *);
|
||||
/** A callback indicating the end of a group of entries
|
||||
*/
|
||||
typedef bool (*MultiNotify)(ServerConfig *, const Anope::string &);
|
||||
|
||||
/** Represents a configuration file
|
||||
*/
|
||||
class ConfigurationFile
|
||||
{
|
||||
Anope::string name;
|
||||
bool executable;
|
||||
FILE *fp;
|
||||
public:
|
||||
ConfigurationFile(const Anope::string &, bool);
|
||||
~ConfigurationFile();
|
||||
const Anope::string &GetName() const;
|
||||
|
||||
bool IsOpen() const;
|
||||
bool Open();
|
||||
void Close();
|
||||
bool End() const;
|
||||
Anope::string Read();
|
||||
};
|
||||
|
||||
/** Holds all of the core configuration items
|
||||
*/
|
||||
class CoreExport ConfigItems
|
||||
{
|
||||
public:
|
||||
/** Holds a core configuration item and its callbacks
|
||||
*/
|
||||
struct Item
|
||||
{
|
||||
/** Tag name */
|
||||
Anope::string tag;
|
||||
/** Value name */
|
||||
Anope::string value;
|
||||
/** Default, if not defined */
|
||||
Anope::string default_value;
|
||||
/** Value containers */
|
||||
ValueContainerBase *val;
|
||||
/** Data types */
|
||||
int datatype;
|
||||
/** Validation function */
|
||||
Validator validation_function;
|
||||
} *Values;
|
||||
|
||||
/** Holds a core configuration item and its callbacks
|
||||
* where there may be more than one item
|
||||
*/
|
||||
struct MultiItem
|
||||
{
|
||||
/** Tag name */
|
||||
Anope::string tag;
|
||||
/** One or more items within tag */
|
||||
Anope::string items[17];
|
||||
/** One or more defaults for items within tags */
|
||||
Anope::string items_default[17];
|
||||
/** One or more data types */
|
||||
int datatype[17];
|
||||
/** Initialization function */
|
||||
MultiNotify init_function;
|
||||
/** Validation function */
|
||||
MultiValidator validation_function;
|
||||
/** Completion function */
|
||||
MultiNotify finish_function;
|
||||
} *MultiValues;
|
||||
|
||||
ConfigItems(ServerConfig *conf);
|
||||
~ConfigItems();
|
||||
};
|
||||
|
||||
/** This class holds the bulk of the runtime configuration for Anope.
|
||||
* It allows for reading new config values, accessing configuration files,
|
||||
* and storage of the configuration data needed to run Anope.
|
||||
*/
|
||||
class CoreExport ServerConfig
|
||||
{
|
||||
private:
|
||||
/** Check that there is only one of each configuration item
|
||||
*/
|
||||
bool CheckOnce(const Anope::string &);
|
||||
public:
|
||||
/** This holds all the information in the config file,
|
||||
* it's indexed by tag name to a vector of key/values.
|
||||
*/
|
||||
ConfigDataHash config_data;
|
||||
/** Construct a new ServerConfig
|
||||
*/
|
||||
ServerConfig();
|
||||
|
||||
/** Read the entire configuration into memory
|
||||
* and initialize this class. All other methods
|
||||
* should be used only by the core.
|
||||
*/
|
||||
void Read();
|
||||
/** Load the configuration file into 'this'. With the new config parser everything is parsed into
|
||||
* tag/key/value at load-time rather than at read-value time.
|
||||
*/
|
||||
void LoadConf(ConfigurationFile &file);
|
||||
// Both these return true if the value existed or false otherwise
|
||||
/** Writes 'length' chars into 'result' as a string
|
||||
*/
|
||||
bool ConfValue(ConfigDataHash &, const Anope::string &, const Anope::string &, int, Anope::string &, bool = false);
|
||||
/** Writes 'length' chars into 'result' as a string
|
||||
*/
|
||||
bool ConfValue(ConfigDataHash &, const Anope::string &, const Anope::string &, const Anope::string &, int, Anope::string &, bool = false);
|
||||
/** Tries to convert the value to an integer and write it to 'result'
|
||||
*/
|
||||
bool ConfValueInteger(ConfigDataHash &, const Anope::string &, const Anope::string &, int, int &);
|
||||
/** Tries to convert the value to an integer and write it to 'result'
|
||||
*/
|
||||
bool ConfValueInteger(ConfigDataHash &, const Anope::string &, const Anope::string &, const Anope::string &, int, int &);
|
||||
/** Returns true if the value exists and has a true value, false otherwise
|
||||
*/
|
||||
bool ConfValueBool(ConfigDataHash &, const Anope::string &, const Anope::string &, int);
|
||||
/** Returns true if the value exists and has a true value, false otherwise
|
||||
*/
|
||||
bool ConfValueBool(ConfigDataHash &, const Anope::string &, const Anope::string &, const Anope::string &, int);
|
||||
/** Returns the number of occurences of tag in the config file
|
||||
*/
|
||||
int ConfValueEnum(const ConfigDataHash &, const Anope::string &);
|
||||
/** Returns the numbers of vars inside the index'th 'tag in the config file
|
||||
*/
|
||||
int ConfVarEnum(ConfigDataHash &, const Anope::string &, int);
|
||||
void ValidateHostname(const Anope::string &, const Anope::string &, const Anope::string &) const;
|
||||
void ValidateIP(const Anope::string &p, const Anope::string &, const Anope::string &, bool) const;
|
||||
void ValidateNoSpaces(const Anope::string &, const Anope::string &, const Anope::string &) const;
|
||||
BotInfo *GetClient(const Anope::string &name);
|
||||
};
|
||||
|
||||
struct Uplink
|
||||
{
|
||||
@@ -338,350 +146,10 @@ class CoreExport ServerConfig
|
||||
bool ipv6;
|
||||
|
||||
Uplink(const Anope::string &_host, int _port, const Anope::string &_password, bool _ipv6) : host(_host), port(_port), password(_password), ipv6(_ipv6) { }
|
||||
bool operator==(const Uplink &other) const
|
||||
{
|
||||
if (this->host != other.host)
|
||||
return false;
|
||||
if (this->port != other.port)
|
||||
return false;
|
||||
if (this->password != other.password)
|
||||
return false;
|
||||
if (this->ipv6 != other.ipv6)
|
||||
return false;
|
||||
return true;
|
||||
}
|
||||
inline bool operator==(const Uplink &other) const { return host == other.host && port == other.port && password == other.password && ipv6 == other.ipv6; }
|
||||
inline bool operator!=(const Uplink &other) const { return !(*this == other); }
|
||||
};
|
||||
|
||||
/** Below here is a list of variables which contain the config files values
|
||||
*/
|
||||
/* Host to bind to */
|
||||
Anope::string LocalHost;
|
||||
/* List of uplink servers to try and connect to */
|
||||
std::vector<Uplink *> Uplinks;
|
||||
|
||||
/* Our server name */
|
||||
Anope::string ServerName;
|
||||
/* Our servers description */
|
||||
Anope::string ServerDesc;
|
||||
|
||||
/* Name of the network were on */
|
||||
Anope::string NetworkName;
|
||||
/* The max legnth of nicks */
|
||||
unsigned NickLen;
|
||||
/* Max length of idents */
|
||||
unsigned UserLen;
|
||||
/* Max lenght of hostnames */
|
||||
unsigned HostLen;
|
||||
/* Max length of channel names */
|
||||
unsigned ChanLen;
|
||||
|
||||
/* User and group to run as */
|
||||
Anope::string User;
|
||||
Anope::string Group;
|
||||
|
||||
/* Casemapping to use */
|
||||
Anope::string CaseMap;
|
||||
|
||||
/* Max length of passwords */
|
||||
unsigned PassLen;
|
||||
|
||||
/* Filename for the PID file */
|
||||
Anope::string PIDFilename;
|
||||
/* MOTD filename */
|
||||
Anope::string MOTDFilename;
|
||||
|
||||
Anope::string BotServ;
|
||||
Anope::string ChanServ;
|
||||
Anope::string Global;
|
||||
Anope::string HostServ;
|
||||
Anope::string NickServ;
|
||||
Anope::string OperServ;
|
||||
Anope::string MemoServ;
|
||||
|
||||
/* True if its ok to not be able to save backs */
|
||||
bool NoBackupOkay;
|
||||
/* Do password checking when new people register */
|
||||
bool StrictPasswords;
|
||||
/* How many times you're allowed to give a bad password before being killed */
|
||||
unsigned BadPassLimit;
|
||||
/* How long before bad passwords are forgotten */
|
||||
time_t BadPassTimeout;
|
||||
/* Delay between automatic database updates */
|
||||
time_t UpdateTimeout;
|
||||
/* Delay between checks for expired nicks and channels */
|
||||
time_t ExpireTimeout;
|
||||
/* How long to wait for something from the uplink, this is passed to select() */
|
||||
time_t ReadTimeout;
|
||||
/* How often to send program errors */
|
||||
time_t WarningTimeout;
|
||||
/* How long to process things such as timers to see if there is anything to calll */
|
||||
time_t TimeoutCheck;
|
||||
/* Number of days backups are kept */
|
||||
int KeepBackups;
|
||||
/* Forbidding requires a reason */
|
||||
bool ForceForbidReason;
|
||||
/* Services should use privmsgs instead of notices */
|
||||
bool UsePrivmsg;
|
||||
/* Services only respond to full PRIVMSG client@services.server.name messages */
|
||||
bool UseStrictPrivMsg;
|
||||
/* This is not a configurable option.
|
||||
* Config::Config will set it depending on the value of UseStrictPrivMsg */
|
||||
Anope::string UseStrictPrivMsgString;
|
||||
/* Number of seconds between consecutive uses of the REGISTER command
|
||||
* Not to be confused with NSRegDelay */
|
||||
unsigned NickRegDelay;
|
||||
/* Max number if news items allowed in the list */
|
||||
unsigned NewsCount;
|
||||
/* Default mlock modes */
|
||||
Anope::string MLock;
|
||||
/* Unmlockable modes */
|
||||
Anope::string NoMLock;
|
||||
/* Modes that are required to be on registered channels */
|
||||
Anope::string CSRequire;
|
||||
/* Use server side mlock */
|
||||
bool UseServerSideMLock;
|
||||
/* Use server side topic lock */
|
||||
bool UseServerSideTopicLock;
|
||||
/* The max length for reasons (cs_kick, cs_ban, etc) */
|
||||
unsigned CSReasonMax;
|
||||
/* Default botmodes on channels, defaults to ao */
|
||||
Anope::string BotModes;
|
||||
/* How long to wait between connection attempts */
|
||||
int RetryWait;
|
||||
/* If services should hide unprivileged commands */
|
||||
bool HidePrivilegedCommands;
|
||||
/* If set, nicks cant be owned/everything is entirely account based */
|
||||
bool NoNicknameOwnership;
|
||||
/* Regex engine to use */
|
||||
Anope::string RegexEngine;
|
||||
|
||||
/* A vector of our logfile options */
|
||||
std::vector<LogInfo *> LogInfos;
|
||||
|
||||
/* Services can use email */
|
||||
bool UseMail;
|
||||
/* Path to the sendmail executable */
|
||||
Anope::string SendMailPath;
|
||||
/* Address to send from */
|
||||
Anope::string SendFrom;
|
||||
/* Only opers can have services send mail */
|
||||
bool RestrictMail;
|
||||
/* Delay between sending mail */
|
||||
time_t MailDelay;
|
||||
/* Don't quote the To: address */
|
||||
bool DontQuoteAddresses;
|
||||
/* Mail messages to send */
|
||||
Anope::string MailRegistrationSubject, MailRegistrationMessage;
|
||||
Anope::string MailResetSubject, MailResetMessage;
|
||||
Anope::string MailEmailchangeSubject, MailEmailchangeMessage;
|
||||
Anope::string MailMemoSubject, MailMemoMessage;
|
||||
|
||||
/* Prefix of guest nicks when a user gets forced off of a nick */
|
||||
Anope::string NSGuestNickPrefix;
|
||||
/* Allow users to set kill immed on */
|
||||
bool NSAllowKillImmed;
|
||||
/* Don't allow nicks to use /ns group to regroup nicks */
|
||||
bool NSNoGroupChange;
|
||||
/* Default flags for newly registered nicks */
|
||||
std::set<Anope::string> NSDefFlags;
|
||||
/* All languages Anope is aware about */
|
||||
Anope::string Languages;
|
||||
/* Default language used by services */
|
||||
Anope::string NSDefLanguage;
|
||||
/* Users must be connected this long before they can register
|
||||
* Not to be confused with NickRegDelay */
|
||||
time_t NSRegDelay;
|
||||
/* Time before the registering mail will be resent */
|
||||
time_t NSResendDelay;
|
||||
/* How long before nicks expire */
|
||||
time_t NSExpire;
|
||||
/* How long before suspended nicks expire */
|
||||
time_t NSSuspendExpire;
|
||||
/* Time before unconfirmed nicks expire */
|
||||
time_t NSUnconfirmedExpire;
|
||||
/* Force email when registering */
|
||||
bool NSForceEmail;
|
||||
/* Force users to validate new email addresses */
|
||||
bool NSConfirmEmailChanges;
|
||||
/* Max number of nicks in a group */
|
||||
unsigned NSMaxAliases;
|
||||
/* Max number of allowed strings on the access list */
|
||||
unsigned NSAccessMax;
|
||||
/* Enforcer client user name */
|
||||
Anope::string NSEnforcerUser;
|
||||
/* Enforcer client hostname */
|
||||
Anope::string NSEnforcerHost;
|
||||
/* How long before recovered nicks are released */
|
||||
time_t NSReleaseTimeout;
|
||||
/* Max number of entries that can be returned from the list command */
|
||||
unsigned NSListMax;
|
||||
/* Only allow usermode +a etc on real services admins */
|
||||
bool NSSecureAdmins;
|
||||
/* Services opers must be /operd on the ircd aswell */
|
||||
bool NSStrictPrivileges;
|
||||
/* Type of confirmation to use, or to disable registration completely */
|
||||
Anope::string NSRegistration;
|
||||
/* A message sent to unregistered users on connect */
|
||||
Anope::string NSUnregisteredNotice;
|
||||
/* Core NickServ modules */
|
||||
Anope::string NickCoreModules;
|
||||
/* Set the proper channel modes on users when they identify */
|
||||
bool NSModeOnID;
|
||||
/* Add the users hostnask their access list when they register */
|
||||
bool NSAddAccessOnReg;
|
||||
/* Maximum number of channels on AJoin */
|
||||
unsigned AJoinMax;
|
||||
/* Kill & killquick delays before force changing off users */
|
||||
time_t NSKillQuick;
|
||||
time_t NSKill;
|
||||
/* Modes set on a user when they identify */
|
||||
Anope::string NSModesOnID;
|
||||
/* Restore nick/channels on recover */
|
||||
bool NSRestoreOnRecover;
|
||||
/* Whether or not to use SASL */
|
||||
bool NSSASL;
|
||||
/* If set, hides netsplits in the last_quit field of nicks */
|
||||
bool NSHideNetSplitQuit;
|
||||
|
||||
/* Core ChanServ modules */
|
||||
Anope::string ChanCoreModules;
|
||||
/* Default flags for newly registered channels */
|
||||
std::set<Anope::string> CSDefFlags;
|
||||
/* Max number of channels a user can own */
|
||||
unsigned CSMaxReg;
|
||||
/* Time before a channel expires */
|
||||
time_t CSExpire;
|
||||
/* How long before suspended channels expire */
|
||||
time_t CSSuspendExpire;
|
||||
/* How long before forbidden channels expire */
|
||||
time_t CSForbidExpire;
|
||||
/* Default ban type to use for channels */
|
||||
int CSDefBantype;
|
||||
/* Max number of entries allowed on channel access lists */
|
||||
unsigned CSAccessMax;
|
||||
/* Max number of entries allowed on autokick lists */
|
||||
unsigned CSAutokickMax;
|
||||
/* Default autokick reason */
|
||||
Anope::string CSAutokickReason;
|
||||
/* Time ChanServ should stay in the channel to hold it to keep users from getting in */
|
||||
time_t CSInhabit;
|
||||
/* Max number of entries allowed to be returned from the LIST command */
|
||||
unsigned CSListMax;
|
||||
/* true to make ChanServ oper only */
|
||||
bool CSOpersOnly;
|
||||
|
||||
/* Max number of memos allowed */
|
||||
unsigned MSMaxMemos;
|
||||
/* Time you must wait between sending memos */
|
||||
time_t MSSendDelay;
|
||||
/* Notify all of the aliases of the core the memo was sent to */
|
||||
bool MSNotifyAll;
|
||||
/* Who can use memos reciepts */
|
||||
unsigned MSMemoReceipt;
|
||||
|
||||
/* Valid chars allowed in vhosts */
|
||||
Anope::string VhostChars;
|
||||
/* Allow undotted vhosts? */
|
||||
bool VhostUndotted;
|
||||
/* Chars disallowed at the beginning or end of vhosts */
|
||||
Anope::string VhostDisallowBE;
|
||||
|
||||
/* Core BotServ modules */
|
||||
Anope::string BotCoreModules;
|
||||
/* Default BotServ flags */
|
||||
std::set<Anope::string> BSDefFlags;
|
||||
/* How long before botserv forgets a user. This is used for flood kickers etc */
|
||||
time_t BSKeepData;
|
||||
/* Min number of users to have in the channel before the service bot joins */
|
||||
unsigned BSMinUsers;
|
||||
/* Max number of words allowed on the badwordslist */
|
||||
unsigned BSBadWordsMax;
|
||||
/* BotServ bot only joins if it would normally allowed to, abides by bans etc */
|
||||
bool BSSmartJoin;
|
||||
/* Dont tell users what badword they used */
|
||||
bool BSGentleBWReason;
|
||||
/* Case sensitive badwords matching */
|
||||
bool BSCaseSensitive;
|
||||
/* Char to use for the fantasy char, eg ! */
|
||||
Anope::string BSFantasyCharacter;
|
||||
|
||||
/* Only show /stats o to opers */
|
||||
bool HideStatsO;
|
||||
/* Send out a global when services shut down or restart */
|
||||
bool GlobalOnCycle;
|
||||
/* Don't include the opers name in globals */
|
||||
bool AnonymousGlobal;
|
||||
/* Dont allow users to register nicks with oper names in them */
|
||||
bool RestrictOperNicks;
|
||||
/* Message to send when shutting down */
|
||||
Anope::string GlobalOnCycleMessage;
|
||||
/* Message to send when starting up */
|
||||
Anope::string GlobalOnCycleUP;
|
||||
/* Super admin is allowed */
|
||||
bool SuperAdmin;
|
||||
/* Default expiry time for akills */
|
||||
time_t AutokillExpiry;
|
||||
/* Default expiry time for chan kills */
|
||||
time_t ChankillExpiry;
|
||||
/* Default expiry time for SNLine Expire */
|
||||
time_t SNLineExpiry;
|
||||
/* Default expiry time for SQLines */
|
||||
time_t SQLineExpiry;
|
||||
/* Actually akill the user when the akill is added */
|
||||
bool AkillOnAdd;
|
||||
/* Kill users on SNLine */
|
||||
bool KillonSNline;
|
||||
/* Kill users on SQline */
|
||||
bool KillonSQline;
|
||||
/* Add the akillers nick to the akill reason */
|
||||
bool AddAkiller;
|
||||
/* Add akill ids to akill reason */
|
||||
bool AkillIds;
|
||||
|
||||
/* Limit sessions */
|
||||
bool LimitSessions;
|
||||
/* The default session limit */
|
||||
unsigned DefSessionLimit;
|
||||
/* How long before exceptions expire */
|
||||
time_t ExceptionExpiry;
|
||||
/* How many times to kill before adding an KILL */
|
||||
unsigned MaxSessionKill;
|
||||
/* Max limit that can be used for exceptions */
|
||||
unsigned MaxSessionLimit;
|
||||
/* How long session akills should last */
|
||||
time_t SessionAutoKillExpiry;
|
||||
/* Number of bits to use when comparing session IPs */
|
||||
unsigned SessionIPv4CIDR;
|
||||
unsigned SessionIPv6CIDR;
|
||||
/* Reason to use for session kills */
|
||||
Anope::string SessionLimitExceeded;
|
||||
/* Optional second reason */
|
||||
Anope::string SessionLimitDetailsLoc;
|
||||
/* OperServ requires you to be an operator */
|
||||
bool OSOpersOnly;
|
||||
|
||||
/* List of modules to autoload */
|
||||
std::list<Anope::string> ModulesAutoLoad;
|
||||
|
||||
/* Seed to use for RNG */
|
||||
unsigned long Seed;
|
||||
|
||||
/* Numeric */
|
||||
Anope::string Numeric;
|
||||
/* Array of ulined servers */
|
||||
std::list<Anope::string> Ulines;
|
||||
|
||||
/* List of available opertypes */
|
||||
std::list<OperType *> MyOperTypes;
|
||||
/* List of pairs of opers and their opertype from the config */
|
||||
std::vector<Oper *> Opers;
|
||||
|
||||
/* Map of fantasy commands */
|
||||
CommandInfo::map Fantasy;
|
||||
|
||||
std::vector<CommandGroup> CommandGroups;
|
||||
};
|
||||
}
|
||||
|
||||
/** This class can be used on its own to represent an exception, or derived to represent a module-specific exception.
|
||||
* When a module whishes to abort, e.g. within a constructor, it should throw an exception using ModuleException or
|
||||
@@ -705,109 +173,7 @@ class ConfigException : public CoreException
|
||||
virtual ~ConfigException() throw() { }
|
||||
};
|
||||
|
||||
#define CONF_NO_ERROR 0x000000
|
||||
#define CONF_NOT_A_NUMBER 0x000010
|
||||
#define CONF_INT_NEGATIVE 0x000080
|
||||
#define CONF_VALUE_NOT_FOUND 0x000100
|
||||
#define CONF_FILE_NOT_FOUND 0x000200
|
||||
|
||||
/** Allows reading of values from configuration files
|
||||
* This class allows a module to read from either the main configuration file (services.conf) or from
|
||||
* a module-specified configuration file. It may either be instantiated with one parameter or none.
|
||||
* Constructing the class using one parameter allows you to specify a path to your own configuration
|
||||
* file, otherwise, inspircd.conf is read.
|
||||
*/
|
||||
class CoreExport ConfigReader
|
||||
{
|
||||
protected:
|
||||
/** True if an error occured reading the config file
|
||||
*/
|
||||
bool readerror;
|
||||
/** Error code
|
||||
*/
|
||||
long error;
|
||||
public:
|
||||
/** Default constructor.
|
||||
* This constructor initialises the ConfigReader class to read the configuration file(s).
|
||||
*/
|
||||
ConfigReader();
|
||||
/** Overloaded constructor.
|
||||
* This constructor initialises the ConfigReader class to read a user-specified config file
|
||||
*/
|
||||
ConfigReader(const Anope::string &);
|
||||
/** Default destructor.
|
||||
* This method destroys the ConfigReader class.
|
||||
*/
|
||||
~ConfigReader();
|
||||
/** Retrieves a value from the config file.
|
||||
* This method retrieves a value from the config file. Where multiple copies of the tag
|
||||
* exist in the config file, index indicates which of the values to retrieve.
|
||||
*/
|
||||
Anope::string ReadValue(const Anope::string &, const Anope::string &, int, bool = false);
|
||||
/** Retrieves a value from the config file.
|
||||
* This method retrieves a value from the config file. Where multiple copies of the tag
|
||||
* exist in the config file, index indicates which of the values to retrieve. If the
|
||||
* tag is not found the default value is returned instead.
|
||||
*/
|
||||
Anope::string ReadValue(const Anope::string &, const Anope::string &, const Anope::string &, int, bool = false);
|
||||
/** Retrieves a boolean value from the config file.
|
||||
* This method retrieves a boolean value from the config file. Where multiple copies of the tag
|
||||
* exist in the config file, index indicates which of the values to retrieve. The values "1", "yes"
|
||||
* and "true" in the config file count as true to ReadFlag, and any other value counts as false.
|
||||
*/
|
||||
bool ReadFlag(const Anope::string &, const Anope::string &, int);
|
||||
/** Retrieves a boolean value from the config file.
|
||||
* This method retrieves a boolean value from the config file. Where multiple copies of the tag
|
||||
* exist in the config file, index indicates which of the values to retrieve. The values "1", "yes"
|
||||
* and "true" in the config file count as true to ReadFlag, and any other value counts as false.
|
||||
* If the tag is not found, the default value is used instead.
|
||||
*/
|
||||
bool ReadFlag(const Anope::string &, const Anope::string &, const Anope::string &, int);
|
||||
/** Retrieves an integer value from the config file.
|
||||
* This method retrieves an integer value from the config file. Where multiple copies of the tag
|
||||
* exist in the config file, index indicates which of the values to retrieve. Any invalid integer
|
||||
* values in the tag will cause the objects error value to be set, and any call to GetError() will
|
||||
* return CONF_INVALID_NUMBER to be returned. need_positive is set if the number must be non-negative.
|
||||
* If a negative number is placed into a tag which is specified positive, 0 will be returned and GetError()
|
||||
* will return CONF_INT_NEGATIVE. Note that need_positive is not suitable to get an unsigned int - you
|
||||
* should cast the result to achieve that effect.
|
||||
*/
|
||||
int ReadInteger(const Anope::string &, const Anope::string &, int, bool);
|
||||
/** Retrieves an integer value from the config file.
|
||||
* This method retrieves an integer value from the config file. Where multiple copies of the tag
|
||||
* exist in the config file, index indicates which of the values to retrieve. Any invalid integer
|
||||
* values in the tag will cause the objects error value to be set, and any call to GetError() will
|
||||
* return CONF_INVALID_NUMBER to be returned. needs_unsigned is set if the number must be unsigned.
|
||||
* If a signed number is placed into a tag which is specified unsigned, 0 will be returned and GetError()
|
||||
* will return CONF_NOT_UNSIGNED. If the tag is not found, the default value is used instead.
|
||||
*/
|
||||
int ReadInteger(const Anope::string &, const Anope::string &, const Anope::string &, int, bool);
|
||||
/** Returns the last error to occur.
|
||||
* Valid errors can be found by looking in modules.h. Any nonzero value indicates an error condition.
|
||||
* A call to GetError() resets the error flag back to 0.
|
||||
*/
|
||||
long GetError();
|
||||
/** Counts the number of times a given tag appears in the config file.
|
||||
* This method counts the number of times a tag appears in a config file, for use where
|
||||
* there are several tags of the same kind, e.g. with opers and connect types. It can be
|
||||
* used with the index value of ConfigReader::ReadValue to loop through all copies of a
|
||||
* multiple instance tag.
|
||||
*/
|
||||
int Enumerate(const Anope::string &) const;
|
||||
/** Returns true if a config file is valid.
|
||||
* This method is partially implemented and will only return false if the config
|
||||
* file does not exist or could not be opened.
|
||||
*/
|
||||
bool Verify();
|
||||
/** Returns the number of items within a tag.
|
||||
* For example if the tag was <test tag="blah" data="foo"> then this
|
||||
* function would return 2. Spaces and newlines both qualify as valid seperators
|
||||
* between values.
|
||||
*/
|
||||
int EnumerateValues(const Anope::string &, int);
|
||||
};
|
||||
|
||||
extern ConfigurationFile ServicesConf;
|
||||
extern CoreExport ServerConfig *Config;
|
||||
extern Configuration::File ServicesConf;
|
||||
extern CoreExport Configuration::Conf *Config;
|
||||
|
||||
#endif // CONFIG_H
|
||||
|
||||
+3
-4
@@ -13,25 +13,25 @@
|
||||
|
||||
class AccessGroup;
|
||||
class AutoKick;
|
||||
namespace Anope { class String; }
|
||||
class BotInfo;
|
||||
class CallBack;
|
||||
class ChanAccess;
|
||||
class Channel;
|
||||
class ChannelInfo;
|
||||
class ChannelStatus;
|
||||
struct ChanUserContainer;
|
||||
class ClientSocket;
|
||||
class Command;
|
||||
class CommandSource;
|
||||
namespace Configuration { struct Conf; }
|
||||
class ConnectionSocket;
|
||||
namespace DNS { class Packet; }
|
||||
namespace DNS { struct Query; }
|
||||
class Entry;
|
||||
class IdentifyRequest;
|
||||
class InfoFormatter;
|
||||
class IRCDProto;
|
||||
class ListenSocket;
|
||||
class Log;
|
||||
class LogInfo;
|
||||
class Memo;
|
||||
class MessageSource;
|
||||
class Module;
|
||||
@@ -42,7 +42,6 @@ class ReferenceBase;
|
||||
class Regex;
|
||||
class Serializable;
|
||||
class Server;
|
||||
class ServerConfig;
|
||||
class Socket;
|
||||
class Thread;
|
||||
class User;
|
||||
|
||||
+218
-80
@@ -12,109 +12,247 @@
|
||||
|
||||
#include "anope.h"
|
||||
#include "serialize.h"
|
||||
#include "service.h"
|
||||
#include "logger.h"
|
||||
|
||||
/* All items added to Extensible must inherit from this.
|
||||
*/
|
||||
class CoreExport ExtensibleItem
|
||||
class Extensible;
|
||||
|
||||
class CoreExport ExtensibleBase : public Service
|
||||
{
|
||||
protected:
|
||||
std::map<Extensible *, void *> items;
|
||||
|
||||
ExtensibleBase(Module *m, const Anope::string &n);
|
||||
~ExtensibleBase();
|
||||
|
||||
public:
|
||||
virtual ~ExtensibleItem() { }
|
||||
virtual void Unset(Extensible *obj) = 0;
|
||||
|
||||
virtual const Anope::string *Serialize() { return NULL; }
|
||||
/* called when an object we are keep track of is serializing */
|
||||
virtual void ExtensibleSerialize(const Extensible *, const Serializable *, Serialize::Data &) const { }
|
||||
virtual void ExtensibleUnserialize(Extensible *, Serializable *, Serialize::Data &) { }
|
||||
};
|
||||
|
||||
/** Common class used to Extensible::Extend as it inherits from both ExtensibleItem
|
||||
* and whatever basic object you're trying to store.
|
||||
* Eg, obj->Extend(key, new ExtensibleItemClass<Anope::string>(value));
|
||||
*/
|
||||
template<typename T> struct CoreExport ExtensibleItemClass : T, ExtensibleItem
|
||||
{
|
||||
ExtensibleItemClass(const T& t) : T(t) { }
|
||||
};
|
||||
|
||||
/* Used to attach metadata to this object that is automatically saved
|
||||
* when the object is saved (assuming the object's Serialize method
|
||||
* correcly calls Extensible::ExtensibleSerialize).
|
||||
*/
|
||||
struct CoreExport ExtensibleMetadata : ExtensibleItemClass<Anope::string>
|
||||
{
|
||||
ExtensibleMetadata(const Anope::string &t) : ExtensibleItemClass<Anope::string>(t) { }
|
||||
|
||||
const Anope::string *Serialize() anope_override { return this; }
|
||||
};
|
||||
|
||||
/* Used to attach arbitrary objects to this object using unique keys */
|
||||
class CoreExport Extensible
|
||||
{
|
||||
private:
|
||||
typedef std::map<Anope::string, ExtensibleItem *> extensible_map;
|
||||
extensible_map *extension_items;
|
||||
|
||||
public:
|
||||
/** Default constructor
|
||||
*/
|
||||
Extensible();
|
||||
std::set<ExtensibleBase *> extension_items;
|
||||
|
||||
/** Destructor, deletes all of the extensible items in this object
|
||||
* then clears the map
|
||||
*/
|
||||
virtual ~Extensible();
|
||||
|
||||
/** Extend an Extensible class.
|
||||
*
|
||||
* @param key The key parameter is an arbitary string which identifies the extension data
|
||||
* @param p This parameter is a pointer to an ExtensibleItem or ExtensibleItemBase derived class
|
||||
*
|
||||
* You must provide a key to store the data as via the parameter 'key'.
|
||||
* The data will be inserted into the map. If the data already exists, it will be overwritten.
|
||||
*/
|
||||
void Extend(const Anope::string &key, ExtensibleItem *p = NULL);
|
||||
template<typename T> T* GetExt(const Anope::string &name) const;
|
||||
bool HasExt(const Anope::string &name) const;
|
||||
|
||||
void ExtendMetadata(const Anope::string &key, const Anope::string &value = "");
|
||||
template<typename T> T* Extend(const Anope::string &name, const T &what);
|
||||
template<typename T> T* Extend(const Anope::string &name);
|
||||
template<typename T> T* Require(const Anope::string &name);
|
||||
template<typename T> void Shrink(const Anope::string &name);
|
||||
|
||||
/** Shrink an Extensible class.
|
||||
*
|
||||
* @param key The key parameter is an arbitary string which identifies the extension data
|
||||
*
|
||||
* You must provide a key name. The given key name will be removed from the classes data. If
|
||||
* you provide a nonexistent key (case is important) then the function will return false.
|
||||
* @return Returns true on success.
|
||||
*/
|
||||
bool Shrink(const Anope::string &key);
|
||||
static void ExtensibleSerialize(const Extensible *, const Serializable *, Serialize::Data &data);
|
||||
static void ExtensibleUnserialize(Extensible *, Serializable *, Serialize::Data &data);
|
||||
};
|
||||
|
||||
/** Get an extension item.
|
||||
*
|
||||
* @param key The key parameter is an arbitary string which identifies the extension data
|
||||
* @return The item found
|
||||
*/
|
||||
template<typename T> T GetExt(const Anope::string &key) const
|
||||
template<typename T>
|
||||
class BaseExtensibleItem : public ExtensibleBase
|
||||
{
|
||||
protected:
|
||||
virtual T *Create(Extensible *) = 0;
|
||||
|
||||
public:
|
||||
BaseExtensibleItem(Module *m, const Anope::string &n) : ExtensibleBase(m, n) { }
|
||||
|
||||
~BaseExtensibleItem()
|
||||
{
|
||||
if (this->extension_items)
|
||||
while (!items.empty())
|
||||
{
|
||||
extensible_map::const_iterator it = this->extension_items->find(key);
|
||||
if (it != this->extension_items->end())
|
||||
return anope_dynamic_static_cast<T>(it->second);
|
||||
}
|
||||
std::map<Extensible *, void *>::iterator it = items.begin();
|
||||
Extensible *obj = it->first;
|
||||
T *value = static_cast<T *>(it->second);
|
||||
|
||||
obj->extension_items.erase(this);
|
||||
items.erase(it);
|
||||
delete value;
|
||||
}
|
||||
}
|
||||
|
||||
T* Set(Extensible *obj, const T &value)
|
||||
{
|
||||
T* t = Set(obj);
|
||||
if (t)
|
||||
*t = value;
|
||||
return t;
|
||||
}
|
||||
|
||||
T* Set(Extensible *obj)
|
||||
{
|
||||
T* t = Create(obj);
|
||||
Unset(obj);
|
||||
items[obj] = t;
|
||||
obj->extension_items.insert(this);
|
||||
return t;
|
||||
}
|
||||
|
||||
void Unset(Extensible *obj) anope_override
|
||||
{
|
||||
T *value = Get(obj);
|
||||
items.erase(obj);
|
||||
obj->extension_items.erase(this);
|
||||
delete value;
|
||||
}
|
||||
|
||||
T* Get(const Extensible *obj) const
|
||||
{
|
||||
std::map<Extensible *, void *>::const_iterator it = items.find(const_cast<Extensible *>(obj));
|
||||
if (it != items.end())
|
||||
return static_cast<T *>(it->second);
|
||||
return NULL;
|
||||
}
|
||||
|
||||
/** Check if an extension item exists.
|
||||
*
|
||||
* @param key The key parameter is an arbitary string which identifies the extension data
|
||||
* @return True if the item was found.
|
||||
*/
|
||||
bool HasExt(const Anope::string &key) const;
|
||||
bool HasExt(const Extensible *obj) const
|
||||
{
|
||||
return items.find(const_cast<Extensible *>(obj)) != items.end();
|
||||
}
|
||||
|
||||
/** Get a list of all extension items names.
|
||||
* @param list A deque of strings to receive the list
|
||||
* @return This function writes a list of all extension items stored
|
||||
* in this object by name into the given deque and returns void.
|
||||
*/
|
||||
void GetExtList(std::deque<Anope::string> &list) const;
|
||||
T* Require(Extensible *obj)
|
||||
{
|
||||
T* t = Get(obj);
|
||||
if (t)
|
||||
return t;
|
||||
|
||||
void ExtensibleSerialize(Serialize::Data &data) const;
|
||||
void ExtensibleUnserialize(Serialize::Data &data);
|
||||
return Set(obj);
|
||||
}
|
||||
};
|
||||
|
||||
template<typename T>
|
||||
class ExtensibleItem : public BaseExtensibleItem<T>
|
||||
{
|
||||
protected:
|
||||
T* Create(Extensible *obj) anope_override
|
||||
{
|
||||
return new T(obj);
|
||||
}
|
||||
public:
|
||||
ExtensibleItem(Module *m, const Anope::string &n) : BaseExtensibleItem<T>(m, n) { }
|
||||
};
|
||||
|
||||
template<typename T>
|
||||
class PrimitiveExtensibleItem : public BaseExtensibleItem<T>
|
||||
{
|
||||
protected:
|
||||
T* Create(Extensible *obj) anope_override
|
||||
{
|
||||
return new T();
|
||||
}
|
||||
public:
|
||||
PrimitiveExtensibleItem(Module *m, const Anope::string &n) : BaseExtensibleItem<T>(m, n) { }
|
||||
};
|
||||
|
||||
template<>
|
||||
class PrimitiveExtensibleItem<bool> : public BaseExtensibleItem<bool>
|
||||
{
|
||||
protected:
|
||||
bool* Create(Extensible *) anope_override
|
||||
{
|
||||
return NULL;
|
||||
}
|
||||
public:
|
||||
PrimitiveExtensibleItem(Module *m, const Anope::string &n) : BaseExtensibleItem<bool>(m, n) { }
|
||||
};
|
||||
|
||||
template<typename T>
|
||||
class SerializableExtensibleItem : public PrimitiveExtensibleItem<T>
|
||||
{
|
||||
public:
|
||||
SerializableExtensibleItem(Module *m, const Anope::string &n) : PrimitiveExtensibleItem<T>(m, n) { }
|
||||
|
||||
void ExtensibleSerialize(const Extensible *e, const Serializable *s, Serialize::Data &data) const anope_override
|
||||
{
|
||||
T* t = this->Get(e);
|
||||
data[this->name] << *t;
|
||||
}
|
||||
|
||||
void ExtensibleUnserialize(Extensible *e, Serializable *s, Serialize::Data &data) anope_override
|
||||
{
|
||||
T t;
|
||||
if (data[this->name] >> t)
|
||||
this->Set(e, t);
|
||||
}
|
||||
};
|
||||
|
||||
template<>
|
||||
class SerializableExtensibleItem<bool> : public PrimitiveExtensibleItem<bool>
|
||||
{
|
||||
public:
|
||||
SerializableExtensibleItem(Module *m, const Anope::string &n) : PrimitiveExtensibleItem<bool>(m, n) { }
|
||||
|
||||
void ExtensibleSerialize(const Extensible *e, const Serializable *s, Serialize::Data &data) const anope_override
|
||||
{
|
||||
data[this->name] << true;
|
||||
}
|
||||
|
||||
void ExtensibleUnserialize(Extensible *e, Serializable *s, Serialize::Data &data) anope_override
|
||||
{
|
||||
bool b = false;
|
||||
data[this->name] >> b;
|
||||
if (b)
|
||||
this->Set(e);
|
||||
}
|
||||
};
|
||||
|
||||
template<typename T>
|
||||
struct ExtensibleRef : ServiceReference<BaseExtensibleItem<T> >
|
||||
{
|
||||
ExtensibleRef(const Anope::string &n) : ServiceReference<BaseExtensibleItem<T> >("Extensible", n) { }
|
||||
};
|
||||
|
||||
template<typename T>
|
||||
T* Extensible::GetExt(const Anope::string &name) const
|
||||
{
|
||||
ExtensibleRef<T> ref(name);
|
||||
if (ref)
|
||||
return ref->Get(this);
|
||||
|
||||
Log(LOG_DEBUG) << "GetExt for nonexistent type " << name << " on " << static_cast<const void *>(this);
|
||||
return NULL;
|
||||
}
|
||||
|
||||
template<typename T>
|
||||
T* Extensible::Extend(const Anope::string &name, const T &what)
|
||||
{
|
||||
T* t = Extend<T>(name);
|
||||
if (t)
|
||||
*t = what;
|
||||
return t;
|
||||
}
|
||||
|
||||
template<typename T>
|
||||
T* Extensible::Extend(const Anope::string &name)
|
||||
{
|
||||
ExtensibleRef<T> ref(name);
|
||||
if (ref)
|
||||
return ref->Set(this);
|
||||
|
||||
Log(LOG_DEBUG) << "Extend for nonexistent type " << name << " on " << static_cast<void *>(this);
|
||||
return NULL;
|
||||
}
|
||||
|
||||
template<typename T>
|
||||
T* Extensible::Require(const Anope::string &name)
|
||||
{
|
||||
if (HasExt(name))
|
||||
return GetExt<T>(name);
|
||||
else
|
||||
return Extend<T>(name);
|
||||
}
|
||||
|
||||
template<typename T>
|
||||
void Extensible::Shrink(const Anope::string &name)
|
||||
{
|
||||
ExtensibleRef<T> ref(name);
|
||||
if (ref)
|
||||
ref->Unset(this);
|
||||
else
|
||||
Log(LOG_DEBUG) << "Shrink for nonexistent type " << name << " on " << static_cast<void *>(this);
|
||||
}
|
||||
|
||||
#endif // EXTENSIBLE_H
|
||||
|
||||
+9
-3
@@ -13,10 +13,12 @@
|
||||
#include <string>
|
||||
#include <locale>
|
||||
|
||||
#ifndef _WIN32
|
||||
#include <tr1/unordered_map>
|
||||
#else
|
||||
#if defined _LIBCPP_VERSION || defined _WIN32
|
||||
#include <unordered_map>
|
||||
#define TR1NS std
|
||||
#else
|
||||
#include <tr1/unordered_map>
|
||||
#define TR1NS std::tr1
|
||||
#endif
|
||||
|
||||
#include "services.h"
|
||||
@@ -28,6 +30,10 @@ namespace Anope
|
||||
/* Casemap in use by Anope. ci::string's comparation functions use this (and thus Anope::string) */
|
||||
extern std::locale casemap;
|
||||
|
||||
extern void CaseMapRebuild();
|
||||
extern unsigned char tolower(unsigned char);
|
||||
extern unsigned char toupper(unsigned char);
|
||||
|
||||
/* ASCII case insensitive ctype. */
|
||||
template<typename char_type>
|
||||
class ascii_ctype : public std::ctype<char_type>
|
||||
|
||||
+9
-23
@@ -55,7 +55,7 @@ namespace Language
|
||||
extern CoreExport const char *Translate(const NickCore *nc, const char *string);
|
||||
|
||||
/** Translatesa string to the given language.
|
||||
* @param lang The language to trnalsate to
|
||||
* @param lang The language to translate to
|
||||
* @param string The string to translate
|
||||
* @return The translated string if found, else the original string.
|
||||
*/
|
||||
@@ -85,12 +85,9 @@ namespace Language
|
||||
#define CHAN_X_NOT_IN_USE _("Channel \002%s\002 doesn't exist.")
|
||||
#define NICK_IDENTIFY_REQUIRED _("Password authentication required for that command.")
|
||||
#define MAIL_X_INVALID _("\002%s\002 is not a valid e-mail address.")
|
||||
#define NO_REASON _("No reason")
|
||||
#define UNKNOWN _("<unknown>")
|
||||
#define NO_EXPIRE _("does not expire")
|
||||
#define LIST_INCORRECT_RANGE _("Incorrect range specified. The correct syntax is \002#\037from\037-\037to\037\002.")
|
||||
#define UNKNOWN_OPTION _("Unknown option \002%s\002.\n" \
|
||||
"Type %s%s HELP %s for more information.")
|
||||
#define NICK_IS_REGISTERED _("This nick is owned by someone else. Please choose another.\n" \
|
||||
"(If this is your nick, type \002%s%s IDENTIFY \037password\037\002.)")
|
||||
#define NICK_IS_SECURE _("This nickname is registered and protected. If it is your\n" \
|
||||
@@ -99,24 +96,15 @@ namespace Language
|
||||
#define FORCENICKCHANGE_NOW _("This nickname has been registered; you may not use it.")
|
||||
#define NICK_CANNOT_BE_REGISTERED _("Nickname \002%s\002 may not be registered.")
|
||||
#define NICK_ALREADY_REGISTERED _("Nickname \002%s\002 is already registered!")
|
||||
#define NICK_SET_SYNTAX _("SET \037option\037 \037parameters\037")
|
||||
#define NICK_SET_DISABLED _("Sorry, nickname option setting is temporarily disabled.")
|
||||
#define NICK_SET_UNKNOWN_OPTION _("Unknown SET option \002%s%s\002.")
|
||||
#define NICK_SET_DISPLAY_CHANGED _("The new display is now \002%s\002.")
|
||||
#define NICK_LIST_SYNTAX _("LIST \037pattern\037")
|
||||
#define NICK_RECOVERED _("User claiming your nick has been killed.\n" \
|
||||
"\002%s%s RELEASE %s\002 to get it back before %s timeout.")
|
||||
#define NICK_REQUESTED _("This nick has already been requested, please check your e-mail address for the pass code")
|
||||
#define NICK_CONFIRM_INVALID _("Invalid passcode has been entered, please check the e-mail again, and retry")
|
||||
#define NICK_CONFIRM_INVALID _("Invalid passcode has been entered, please check the e-mail again, and retry.")
|
||||
#define CHAN_NOT_ALLOWED_TO_JOIN _("You are not permitted to be on this channel.")
|
||||
#define CHAN_X_INVALID _("Channel %s is not a valid channel.")
|
||||
#define CHAN_REACHED_CHANNEL_LIMIT _("Sorry, you have already reached your limit of \002%d\002 channels.")
|
||||
#define CHAN_EXCEEDED_CHANNEL_LIMIT _("Sorry, you have already exceeded your limit of \002%d\002 channels.")
|
||||
#define CHAN_SYMBOL_REQUIRED _("Please use the symbol of \002#\002 when attempting to register")
|
||||
#define CHAN_SET_DISABLED _("Sorry, channel option setting is temporarily disabled.")
|
||||
#define CHAN_SYMBOL_REQUIRED _("Please use the symbol of \002#\002 when attempting to register.")
|
||||
#define CHAN_SETTING_CHANGED _("%s for %s set to %s.")
|
||||
#define CHAN_SETTING_UNSET _("%s for %s unset.")
|
||||
#define CHAN_SET_MLOCK_DEPRECATED _("MLOCK is deprecated. Use \002%s%s HELP MODE\002 instead.")
|
||||
#define CHAN_ACCESS_LEVEL_RANGE _("Access level must be between %d and %d inclusive.")
|
||||
#define CHAN_INFO_HEADER _("Information for channel \002%s\002:")
|
||||
#define CHAN_EXCEPTED _("\002%s\002 matches an except on %s and cannot be banned until the except have been removed.")
|
||||
@@ -126,18 +114,16 @@ namespace Language
|
||||
"Type \002%s%s READ %d\002 to read it.")
|
||||
#define MEMO_HAVE_NO_MEMOS _("You have no memos.")
|
||||
#define MEMO_X_HAS_NO_MEMOS _("%s has no memos.")
|
||||
#define MEMO_SEND_SYNTAX _("SEND {\037nick\037 | \037channel\037} \037memo-text\037")
|
||||
#define MEMO_SEND_DISABLED _("Sorry, memo sending is temporarily disabled.")
|
||||
#define MEMO_HAVE_NO_NEW_MEMOS _("You have no new memos.")
|
||||
#define MEMO_X_HAS_NO_NEW_MEMOS _("%s has no new memos.")
|
||||
#define BOT_DOES_NOT_EXIST _("Bot \002%s\002 does not exist.")
|
||||
#define BOT_NOT_ASSIGNED _("You must assign a bot to the channel before using this command.")
|
||||
#define BOT_NOT_ON_CHANNEL _("Bot is not on channel \002%s\002.")
|
||||
#define BOT_ASSIGN_READONLY _("Sorry, bot assignment is temporarily disabled.")
|
||||
#define HOST_SET_ERROR _("A vhost must be in the format of a valid hostmask.")
|
||||
#define HOST_SET_IDENT_ERROR _("A vhost ident must be in the format of a valid ident")
|
||||
#define HOST_SET_TOOLONG _("Error! The vhost is too long, please use a host shorter than %d characters.")
|
||||
#define HOST_SET_IDENTTOOLONG _("Error! The 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")
|
||||
#define HOST_SET_ERROR _("A vHost must be in the format of a valid hostname.")
|
||||
#define HOST_SET_IDENT_ERROR _("A vHost ident must be in the format of a valid ident.")
|
||||
#define HOST_SET_TOOLONG _("Error! The vHost is too long, please use a hostname shorter than %d characters.")
|
||||
#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")
|
||||
|
||||
|
||||
@@ -67,9 +67,11 @@ class CoreExport ListFormatter
|
||||
public:
|
||||
typedef std::map<Anope::string, Anope::string> ListEntry;
|
||||
private:
|
||||
NickCore *nc;
|
||||
std::vector<Anope::string> columns;
|
||||
std::vector<ListEntry> entries;
|
||||
public:
|
||||
ListFormatter(NickCore *nc);
|
||||
ListFormatter &AddColumn(const Anope::string &name);
|
||||
void AddEntry(const ListEntry &entry);
|
||||
bool IsEmpty() const;
|
||||
@@ -87,6 +89,7 @@ class CoreExport InfoFormatter
|
||||
InfoFormatter(NickCore *nc);
|
||||
void Process(std::vector<Anope::string> &);
|
||||
Anope::string &operator[](const Anope::string &key);
|
||||
void AddOption(const Anope::string &opt);
|
||||
};
|
||||
|
||||
#endif // LISTS_H
|
||||
|
||||
+27
-25
@@ -45,7 +45,8 @@ struct LogFile
|
||||
std::ofstream stream;
|
||||
|
||||
LogFile(const Anope::string &name);
|
||||
Anope::string GetName() const;
|
||||
~LogFile();
|
||||
const Anope::string &GetName() const;
|
||||
};
|
||||
|
||||
/* Represents a single log message */
|
||||
@@ -53,15 +54,15 @@ class CoreExport Log
|
||||
{
|
||||
public:
|
||||
/* Bot that should log this message */
|
||||
const BotInfo *bi;
|
||||
/* For commands, the user executing the command */
|
||||
Anope::string nick;
|
||||
BotInfo *bi;
|
||||
/* For commands, the user executing the command, but might not always exist */
|
||||
const User *u;
|
||||
/* For commands, the account executing teh command, but will not always exist */
|
||||
const NickCore *nc;
|
||||
User *u;
|
||||
/* For commands, the account executing the command, but will not always exist */
|
||||
NickCore *nc;
|
||||
/* For commands, the command being executed */
|
||||
Command *c;
|
||||
/* For commands, the command source */
|
||||
CommandSource *source;
|
||||
/* Used for LOG_CHANNEL */
|
||||
Channel *chan;
|
||||
/* For commands, the channel the command was executed on, will not always exist */
|
||||
@@ -72,25 +73,24 @@ class CoreExport Log
|
||||
Module *m;
|
||||
LogType type;
|
||||
Anope::string category;
|
||||
std::list<Anope::string> sources;
|
||||
|
||||
std::stringstream buf;
|
||||
|
||||
Log(LogType type = LOG_NORMAL, const Anope::string &category = "", const BotInfo *bi = NULL);
|
||||
Log(LogType type = LOG_NORMAL, const Anope::string &category = "", BotInfo *bi = NULL);
|
||||
|
||||
/* LOG_COMMAND/OVERRIDE/ADMIN */
|
||||
Log(LogType type, CommandSource &source, Command *c, const ChannelInfo *ci = NULL);
|
||||
Log(LogType type, CommandSource &source, Command *c, ChannelInfo *ci = NULL);
|
||||
|
||||
/* LOG_CHANNEL */
|
||||
Log(const User *u, Channel *c, const Anope::string &category = "");
|
||||
Log(User *u, Channel *c, const Anope::string &category = "");
|
||||
|
||||
/* LOG_USER */
|
||||
explicit Log(const User *u, const Anope::string &category = "", const BotInfo *bi = NULL);
|
||||
Log(User *u, const Anope::string &category = "", BotInfo *bi = NULL);
|
||||
|
||||
/* LOG_SERVER */
|
||||
explicit Log(Server *s, const Anope::string &category = "", const BotInfo *bi = NULL);
|
||||
Log(Server *s, const Anope::string &category = "", BotInfo *bi = NULL);
|
||||
|
||||
explicit Log(const BotInfo *b, const Anope::string &category = "");
|
||||
Log(BotInfo *b, const Anope::string &category = "");
|
||||
|
||||
Log(Module *m, const Anope::string &category = "");
|
||||
|
||||
@@ -109,17 +109,19 @@ class CoreExport Log
|
||||
class CoreExport LogInfo
|
||||
{
|
||||
public:
|
||||
std::list<Anope::string> targets;
|
||||
std::map<Anope::string, LogFile *> logfiles;
|
||||
std::list<Anope::string> sources;
|
||||
BotInfo *bot;
|
||||
std::vector<Anope::string> targets;
|
||||
std::vector<LogFile *> logfiles;
|
||||
int last_day;
|
||||
std::vector<Anope::string> sources;
|
||||
int log_age;
|
||||
std::list<Anope::string> admin;
|
||||
std::list<Anope::string> override;
|
||||
std::list<Anope::string> commands;
|
||||
std::list<Anope::string> servers;
|
||||
std::list<Anope::string> users;
|
||||
std::list<Anope::string> channels;
|
||||
std::list<Anope::string> normal;
|
||||
std::vector<Anope::string> admin;
|
||||
std::vector<Anope::string> override;
|
||||
std::vector<Anope::string> commands;
|
||||
std::vector<Anope::string> servers;
|
||||
std::vector<Anope::string> users;
|
||||
std::vector<Anope::string> channels;
|
||||
std::vector<Anope::string> normal;
|
||||
bool raw_io;
|
||||
bool debug;
|
||||
|
||||
@@ -127,7 +129,7 @@ class CoreExport LogInfo
|
||||
|
||||
~LogInfo();
|
||||
|
||||
void AddType(std::list<Anope::string> &list, const Anope::string &type);
|
||||
void OpenLogFiles();
|
||||
|
||||
bool HasType(LogType ltype, const Anope::string &type) const;
|
||||
|
||||
|
||||
+1
-1
@@ -20,7 +20,7 @@
|
||||
|
||||
namespace Mail
|
||||
{
|
||||
extern CoreExport bool Send(User *from, NickCore *to, const BotInfo *service, const Anope::string &subject, const Anope::string &message);
|
||||
extern CoreExport bool Send(User *from, NickCore *to, BotInfo *service, const Anope::string &subject, const Anope::string &message);
|
||||
extern CoreExport bool Send(NickCore *to, const Anope::string &subject, const Anope::string &message);
|
||||
extern CoreExport bool Validate(const Anope::string &email);
|
||||
|
||||
|
||||
+17
-3
@@ -9,14 +9,14 @@
|
||||
* Based on the original code of Services by Andy Church.
|
||||
*
|
||||
*/
|
||||
|
||||
|
||||
#include "protocol.h"
|
||||
|
||||
|
||||
/* Common IRCD messages.
|
||||
* Protocol modules may chose to include some, none, or all of these handlers
|
||||
* as they see fit.
|
||||
*/
|
||||
|
||||
|
||||
namespace Message
|
||||
{
|
||||
|
||||
@@ -40,6 +40,13 @@ namespace Message
|
||||
|
||||
void Run(MessageSource &source, const std::vector<Anope::string> ¶ms) anope_override;
|
||||
};
|
||||
|
||||
struct CoreExport Invite : IRCDMessage
|
||||
{
|
||||
Invite(Module *creator, const Anope::string &mname = "INVITE") : IRCDMessage(creator, mname, 2) { SetFlag(IRCDMESSAGE_REQUIRE_USER); SetFlag(IRCDMESSAGE_SOFT_LIMIT); }
|
||||
|
||||
void Run(MessageSource &source, const std::vector<Anope::string> ¶ms) anope_override;
|
||||
};
|
||||
|
||||
struct CoreExport Join : IRCDMessage
|
||||
{
|
||||
@@ -87,6 +94,13 @@ namespace Message
|
||||
void Run(MessageSource &source, const std::vector<Anope::string> ¶ms) anope_override;
|
||||
};
|
||||
|
||||
struct CoreExport Notice : IRCDMessage
|
||||
{
|
||||
Notice(Module *creator, const Anope::string &mname = "NOTICE") : IRCDMessage(creator, mname, 2) { SetFlag(IRCDMESSAGE_REQUIRE_USER); }
|
||||
|
||||
void Run(MessageSource &source, const std::vector<Anope::string> ¶ms) anope_override;
|
||||
};
|
||||
|
||||
struct CoreExport Part : IRCDMessage
|
||||
{
|
||||
Part(Module *creator, const Anope::string &mname = "PART") : IRCDMessage(creator, mname, 1) { SetFlag(IRCDMESSAGE_REQUIRE_USER); SetFlag(IRCDMESSAGE_SOFT_LIMIT); }
|
||||
|
||||
+58
-109
@@ -56,6 +56,11 @@ class CoreExport Mode : public Base
|
||||
*/
|
||||
Mode(const Anope::string &mname, ModeClass mclass, char mc, ModeType type);
|
||||
virtual ~Mode();
|
||||
|
||||
/** Can a user set this mode, used for mlock
|
||||
* @param u The user
|
||||
*/
|
||||
virtual bool CanSet(User *u) const;
|
||||
};
|
||||
|
||||
/** This class is a user mode, all user modes use this/inherit from this
|
||||
@@ -68,7 +73,6 @@ class CoreExport UserMode : public Mode
|
||||
* @param mc The mode char
|
||||
*/
|
||||
UserMode(const Anope::string &name, char mc);
|
||||
virtual ~UserMode();
|
||||
};
|
||||
|
||||
class CoreExport UserModeParam : public UserMode
|
||||
@@ -97,16 +101,10 @@ class CoreExport ChannelMode : public Mode
|
||||
* @param mc The mode char
|
||||
*/
|
||||
ChannelMode(const Anope::string &name, char mc);
|
||||
virtual ~ChannelMode();
|
||||
|
||||
/** Can a user set this mode, used for mlock
|
||||
* NOTE: User CAN be NULL, this is for checking if it can be locked with defcon
|
||||
* @param u The user, or NULL
|
||||
*/
|
||||
virtual bool CanSet(User *u) const;
|
||||
bool CanSet(User *u) const anope_override;
|
||||
};
|
||||
|
||||
|
||||
/** This is a mode for lists, eg b/e/I. These modes should inherit from this
|
||||
*/
|
||||
class CoreExport ChannelModeList : public ChannelMode
|
||||
@@ -118,10 +116,6 @@ class CoreExport ChannelModeList : public ChannelMode
|
||||
*/
|
||||
ChannelModeList(const Anope::string &name, char mc);
|
||||
|
||||
/** destructor
|
||||
*/
|
||||
virtual ~ChannelModeList();
|
||||
|
||||
/** Is the mask valid
|
||||
* @param mask The mask
|
||||
* @return true for yes, false for no
|
||||
@@ -134,7 +128,7 @@ class CoreExport ChannelModeList : public ChannelMode
|
||||
* @param e The entry to match against
|
||||
* @return true on match
|
||||
*/
|
||||
virtual bool Matches(const User *u, const Entry *e) { return false; }
|
||||
virtual bool Matches(User *u, const Entry *e) { return false; }
|
||||
|
||||
/** Called when a mask is added to a channel
|
||||
* @param chan The channel
|
||||
@@ -161,10 +155,6 @@ class CoreExport ChannelModeParam : public ChannelMode
|
||||
*/
|
||||
ChannelModeParam(const Anope::string &name, char mc, bool minus_no_arg = false);
|
||||
|
||||
/** destructor
|
||||
*/
|
||||
virtual ~ChannelModeParam();
|
||||
|
||||
/* Should we send an arg when unsetting this mode? */
|
||||
bool minus_no_arg;
|
||||
|
||||
@@ -181,7 +171,7 @@ class CoreExport ChannelModeStatus : public ChannelMode
|
||||
{
|
||||
public:
|
||||
/* The symbol, eg @ % + */
|
||||
char Symbol;
|
||||
char symbol;
|
||||
/* The "level" of the mode, used to compare with other modes.
|
||||
* Used so we know op > halfop > voice etc.
|
||||
*/
|
||||
@@ -190,25 +180,44 @@ class CoreExport ChannelModeStatus : public ChannelMode
|
||||
/** constructor
|
||||
* @param name The mode name
|
||||
* @param mc The mode char
|
||||
* @param mSymbol The symbol for the mode, eg @ %
|
||||
* @param msymbol The symbol for the mode, eg @ %
|
||||
* @param mlevel A level for the mode, which is usually determined by the PREFIX capab
|
||||
*/
|
||||
ChannelModeStatus(const Anope::string &name, char mc, char mSymbol, short mlevel = 0);
|
||||
|
||||
/** destructor
|
||||
*/
|
||||
virtual ~ChannelModeStatus();
|
||||
ChannelModeStatus(const Anope::string &name, char mc, char msymbol, short mlevel);
|
||||
};
|
||||
|
||||
/* The status a user has on a channel (+v, +h, +o) etc */
|
||||
class CoreExport ChannelStatus
|
||||
{
|
||||
Anope::string modes;
|
||||
public:
|
||||
std::set<Anope::string> modes;
|
||||
Anope::string BuildCharPrefixList() const;
|
||||
ChannelStatus();
|
||||
ChannelStatus(const Anope::string &modes);
|
||||
void AddMode(char c);
|
||||
void DelMode(char c);
|
||||
bool HasMode(char c) const;
|
||||
bool Empty() const;
|
||||
void Clear();
|
||||
const Anope::string &Modes() const;
|
||||
Anope::string BuildModePrefixList() const;
|
||||
};
|
||||
|
||||
class CoreExport UserModeOperOnly : public UserMode
|
||||
{
|
||||
public:
|
||||
UserModeOperOnly(const Anope::string &mname, char um) : UserMode(mname, um) { }
|
||||
|
||||
bool CanSet(User *u) const anope_override;
|
||||
};
|
||||
|
||||
class CoreExport UserModeNoone : public UserMode
|
||||
{
|
||||
public:
|
||||
UserModeNoone(const Anope::string &mname, char um) : UserMode(mname, um) { }
|
||||
|
||||
bool CanSet(User *u) const anope_override;
|
||||
};
|
||||
|
||||
/** Channel mode +k (key)
|
||||
*/
|
||||
class CoreExport ChannelModeKey : public ChannelModeParam
|
||||
@@ -219,60 +228,27 @@ class CoreExport ChannelModeKey : public ChannelModeParam
|
||||
bool IsValid(const Anope::string &value) const anope_override;
|
||||
};
|
||||
|
||||
/** This class is used for channel mode +A (Admin only)
|
||||
* Only opers can mlock it
|
||||
/** This class is used for oper only channel modes
|
||||
*/
|
||||
class CoreExport ChannelModeAdmin : public ChannelMode
|
||||
class CoreExport ChannelModeOperOnly : public ChannelMode
|
||||
{
|
||||
public:
|
||||
ChannelModeAdmin(char mc) : ChannelMode("ADMINONLY", mc) { }
|
||||
ChannelModeOperOnly(const Anope::string &mname, char mc) : ChannelMode(mname, mc) { }
|
||||
|
||||
/* Opers only */
|
||||
bool CanSet(User *u) const anope_override;
|
||||
};
|
||||
|
||||
/** This class is used for channel mode +O (Opers only)
|
||||
* Only opers can mlock it
|
||||
/** This class is used for channel modes only servers may set
|
||||
*/
|
||||
class CoreExport ChannelModeOper : public ChannelMode
|
||||
class CoreExport ChannelModeNoone : public ChannelMode
|
||||
{
|
||||
public:
|
||||
ChannelModeOper(char mc) : ChannelMode("OPERONLY", mc) { }
|
||||
ChannelModeNoone(const Anope::string &mname, char mc) : ChannelMode(mname, mc) { }
|
||||
|
||||
/* Opers only */
|
||||
bool CanSet(User *u) const anope_override;
|
||||
};
|
||||
|
||||
/** This class is used for channel mode +r (registered channel)
|
||||
* No one may mlock r
|
||||
*/
|
||||
class CoreExport ChannelModeRegistered : public ChannelMode
|
||||
{
|
||||
public:
|
||||
ChannelModeRegistered(char mc) : ChannelMode("REGISTERED", mc) { }
|
||||
|
||||
/* No one mlocks +r */
|
||||
bool CanSet(User *u) const anope_override;
|
||||
};
|
||||
|
||||
class StackerInfo
|
||||
{
|
||||
public:
|
||||
/* Modes to be added */
|
||||
std::list<std::pair<Mode *, Anope::string> > AddModes;
|
||||
/* Modes to be deleted */
|
||||
std::list<std::pair<Mode *, Anope::string> > DelModes;
|
||||
/* Bot this is sent from */
|
||||
const BotInfo *bi;
|
||||
|
||||
/** Add a mode to this object
|
||||
* @param mode The mode
|
||||
* @param set true if setting, false if unsetting
|
||||
* @param param The param for the mode
|
||||
*/
|
||||
void AddMode(Mode *mode, bool set, const Anope::string ¶m);
|
||||
};
|
||||
|
||||
/** This is the mode manager
|
||||
* It contains functions for adding modes to Anope so Anope can track them
|
||||
* and do things such as MLOCK.
|
||||
@@ -282,29 +258,17 @@ class StackerInfo
|
||||
class CoreExport ModeManager
|
||||
{
|
||||
protected:
|
||||
/* List of pairs of user/channels and their stacker info */
|
||||
static std::map<User *, StackerInfo *> UserStackerObjects;
|
||||
static std::map<Channel *, StackerInfo *> ChannelStackerObjects;
|
||||
|
||||
/** Build a list of mode strings to send to the IRCd from the mode stacker
|
||||
* @param info The stacker info for a channel or user
|
||||
* @return a list of strings
|
||||
/* Array of all modes Anope knows about. Modes are in this array at position
|
||||
* modechar. Additionally, status modes are in this array (again) at statuschar.
|
||||
*/
|
||||
static std::list<Anope::string> BuildModeStrings(StackerInfo *info);
|
||||
|
||||
public:
|
||||
/* List of all modes Anope knows about */
|
||||
static std::vector<ChannelMode *> ChannelModes;
|
||||
static std::vector<UserMode *> UserModes;
|
||||
|
||||
public:
|
||||
|
||||
/* Number of generic channel and user modes we are tracking */
|
||||
static unsigned GenericChannelModes;
|
||||
static unsigned GenericUserModes;
|
||||
/* Default channel mode lock */
|
||||
static std::list<std::pair<Anope::string, Anope::string> > ModeLockOn;
|
||||
static std::list<Anope::string> ModeLockOff;
|
||||
/* Default modes bots have on channels */
|
||||
static ChannelStatus DefaultBotModes;
|
||||
|
||||
/** Add a user mode to Anope
|
||||
* @param um A UserMode or UserMode derived class
|
||||
@@ -358,6 +322,11 @@ class CoreExport ModeManager
|
||||
*/
|
||||
static char GetStatusChar(char symbol);
|
||||
|
||||
static const std::vector<ChannelMode *> &GetChannelModes();
|
||||
static const std::vector<UserMode *> &GetUserModes();
|
||||
static const std::vector<ChannelModeStatus *> &GetStatusChannelModesByRank();
|
||||
static void RebuildStatusModes();
|
||||
|
||||
/** Add a mode to the stacker to be set on a channel
|
||||
* @param bi The client to set the modes from
|
||||
* @param c The channel
|
||||
@@ -365,7 +334,7 @@ class CoreExport ModeManager
|
||||
* @param set true for setting, false for removing
|
||||
* @param param The param, if there is one
|
||||
*/
|
||||
static void StackerAdd(const BotInfo *bi, Channel *c, ChannelMode *cm, bool set, const Anope::string ¶m = "");
|
||||
static void StackerAdd(BotInfo *bi, Channel *c, ChannelMode *cm, bool set, const Anope::string ¶m = "");
|
||||
|
||||
/** Add a mode to the stacker to be set on a user
|
||||
* @param bi The client to set the modes from
|
||||
@@ -374,7 +343,7 @@ class CoreExport ModeManager
|
||||
* @param set true for setting, false for removing
|
||||
* @param param The param, if there is one
|
||||
*/
|
||||
static void StackerAdd(const BotInfo *bi, User *u, UserMode *um, bool set, const Anope::string ¶m = "");
|
||||
static void StackerAdd(BotInfo *bi, User *u, UserMode *um, bool set, const Anope::string ¶m = "");
|
||||
|
||||
/** Process all of the modes in the stacker and send them to the IRCd to be set on channels/users
|
||||
*/
|
||||
@@ -385,25 +354,6 @@ class CoreExport ModeManager
|
||||
static void StackerDel(User *u);
|
||||
static void StackerDel(Channel *c);
|
||||
static void StackerDel(Mode *m);
|
||||
|
||||
/** Updates the default mode locks and default bot modes
|
||||
* @param config The configuration to read from. This is often called
|
||||
* during a config reload.
|
||||
*/
|
||||
static void UpdateDefaultMLock(ServerConfig *config);
|
||||
};
|
||||
|
||||
/** Entry flags
|
||||
*/
|
||||
enum EntryType
|
||||
{
|
||||
ENTRYTYPE_CIDR,
|
||||
ENTRYTYPE_NICK_WILD,
|
||||
ENTRYTYPE_NICK,
|
||||
ENTRYTYPE_USER_WILD,
|
||||
ENTRYTYPE_USER,
|
||||
ENTRYTYPE_HOST_WILD,
|
||||
ENTRYTYPE_HOST
|
||||
};
|
||||
|
||||
/** Represents a mask set on a channel (b/e/I)
|
||||
@@ -411,29 +361,28 @@ enum EntryType
|
||||
class CoreExport Entry
|
||||
{
|
||||
Anope::string name;
|
||||
public:
|
||||
std::set<EntryType> types;
|
||||
unsigned char cidr_len;
|
||||
Anope::string mask;
|
||||
Anope::string nick, user, host;
|
||||
public:
|
||||
unsigned short cidr_len;
|
||||
Anope::string nick, user, host, real;
|
||||
|
||||
/** Constructor
|
||||
* @param mode What mode this host is for, can be empty for unknown/no mode
|
||||
* @param host A full nick!ident@host/cidr mask
|
||||
* @param host A full or poartial nick!ident@host/cidr#real name mask
|
||||
*/
|
||||
Entry(const Anope::string &mode, const Anope::string &host);
|
||||
|
||||
/** Get the banned mask for this entry
|
||||
* @return The mask
|
||||
*/
|
||||
const Anope::string GetMask();
|
||||
const Anope::string GetMask() const;
|
||||
|
||||
/** Check if this entry matches a user
|
||||
* @param u The user
|
||||
* @param full True to match against a users real host and IP
|
||||
* @return true on match
|
||||
*/
|
||||
bool Matches(const User *u, bool full = false) const;
|
||||
bool Matches(User *u, bool full = false) const;
|
||||
};
|
||||
|
||||
#endif // MODES_H
|
||||
|
||||
+4
-4
@@ -12,7 +12,6 @@
|
||||
#ifndef MODULE_H
|
||||
#define MODULE_H
|
||||
|
||||
/* Just include everything for now */
|
||||
#include "access.h"
|
||||
#include "account.h"
|
||||
#include "anope.h"
|
||||
@@ -47,8 +46,9 @@
|
||||
#include "users.h"
|
||||
#include "xline.h"
|
||||
|
||||
#include "global.h"
|
||||
#include "memoserv.h"
|
||||
#include "nickserv.h"
|
||||
#include "modules/pseudoclients/chanserv.h"
|
||||
#include "modules/pseudoclients/global.h"
|
||||
#include "modules/pseudoclients/memoserv.h"
|
||||
#include "modules/pseudoclients/nickserv.h"
|
||||
|
||||
#endif // MODULE_H
|
||||
|
||||
+319
-277
File diff suppressed because it is too large
Load Diff
@@ -0,0 +1,73 @@
|
||||
/* BotServ core functions
|
||||
*
|
||||
* (C) 2003-2013 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
|
||||
*/
|
||||
enum BadWordType
|
||||
{
|
||||
/* Always kicks if the word is said */
|
||||
BW_ANY,
|
||||
/* User must way the entire word */
|
||||
BW_SINGLE,
|
||||
/* The word has to start with the badword */
|
||||
BW_START,
|
||||
/* The word has to end with the badword */
|
||||
BW_END
|
||||
};
|
||||
|
||||
/* Structure used to contain bad words. */
|
||||
struct BadWord
|
||||
{
|
||||
Anope::string chan;
|
||||
Anope::string word;
|
||||
BadWordType type;
|
||||
|
||||
virtual ~BadWord() { }
|
||||
protected:
|
||||
BadWord() { }
|
||||
};
|
||||
|
||||
struct BadWords
|
||||
{
|
||||
virtual ~BadWords() { }
|
||||
|
||||
/** Add a badword to the badword list
|
||||
* @param word The badword
|
||||
* @param type The type (SINGLE START END)
|
||||
* @return The badword
|
||||
*/
|
||||
virtual BadWord* AddBadWord(const Anope::string &word, BadWordType type) = 0;
|
||||
|
||||
/** Get a badword structure by index
|
||||
* @param index The index
|
||||
* @return The badword
|
||||
*/
|
||||
virtual BadWord* GetBadWord(unsigned index) const = 0;
|
||||
|
||||
/** Get how many badwords are on this channel
|
||||
* @return The number of badwords in the vector
|
||||
*/
|
||||
virtual unsigned GetBadWordCount() const = 0;
|
||||
|
||||
/** Remove a badword
|
||||
* @param index The index of the badword
|
||||
*/
|
||||
virtual void EraseBadWord(unsigned index) = 0;
|
||||
|
||||
/** Clear all badwords from the channel
|
||||
*/
|
||||
virtual void ClearBadWords() = 0;
|
||||
|
||||
virtual void Check() = 0;
|
||||
};
|
||||
|
||||
@@ -0,0 +1,46 @@
|
||||
/* BotServ core functions
|
||||
*
|
||||
* (C) 2003-2013 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) */
|
||||
enum
|
||||
{
|
||||
TTB_BOLDS,
|
||||
TTB_COLORS,
|
||||
TTB_REVERSES,
|
||||
TTB_UNDERLINES,
|
||||
TTB_BADWORDS,
|
||||
TTB_CAPS,
|
||||
TTB_FLOOD,
|
||||
TTB_REPEAT,
|
||||
TTB_ITALICS,
|
||||
TTB_AMSGS,
|
||||
TTB_SIZE
|
||||
};
|
||||
|
||||
struct KickerData
|
||||
{
|
||||
bool amsgs, badwords, bolds, caps, colors, flood, italics, repeat, reverses, underlines;
|
||||
int16_t ttb[TTB_SIZE]; /* Times to ban for each kicker */
|
||||
int16_t capsmin, capspercent; /* For CAPS kicker */
|
||||
int16_t floodlines, floodsecs; /* For FLOOD kicker */
|
||||
int16_t repeattimes; /* For REPEAT kicker */
|
||||
|
||||
bool dontkickops, dontkickvoices;
|
||||
|
||||
protected:
|
||||
KickerData() { }
|
||||
|
||||
public:
|
||||
virtual ~KickerData() { }
|
||||
virtual void Check(ChannelInfo *ci) = 0;
|
||||
};
|
||||
@@ -0,0 +1,43 @@
|
||||
/* ChanServ core functions
|
||||
*
|
||||
* (C) 2003-2013 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.
|
||||
*/
|
||||
|
||||
struct LogSetting
|
||||
{
|
||||
Anope::string chan;
|
||||
/* Our service name of the command */
|
||||
Anope::string service_name;
|
||||
/* The name of the client the command is on */
|
||||
Anope::string command_service;
|
||||
/* Name of the command to the user, can have spaces */
|
||||
Anope::string command_name;
|
||||
Anope::string method, extra;
|
||||
Anope::string creator;
|
||||
time_t created;
|
||||
|
||||
virtual ~LogSetting() { }
|
||||
protected:
|
||||
LogSetting() { }
|
||||
};
|
||||
|
||||
struct LogSettings : Serialize::Checker<std::vector<LogSetting *> >
|
||||
{
|
||||
typedef std::vector<LogSetting *>::iterator iterator;
|
||||
|
||||
protected:
|
||||
LogSettings() : Serialize::Checker<std::vector<LogSetting *> >("LogSetting")
|
||||
{
|
||||
}
|
||||
|
||||
public:
|
||||
virtual ~LogSettings() { }
|
||||
virtual LogSetting *Create() = 0;
|
||||
};
|
||||
|
||||
@@ -0,0 +1,90 @@
|
||||
/* ChanServ core functions
|
||||
*
|
||||
* (C) 2003-2013 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.
|
||||
*/
|
||||
|
||||
struct ModeLock
|
||||
{
|
||||
Anope::string ci;
|
||||
bool set;
|
||||
Anope::string name;
|
||||
Anope::string param;
|
||||
Anope::string setter;
|
||||
time_t created;
|
||||
|
||||
virtual ~ModeLock() { }
|
||||
protected:
|
||||
ModeLock() { }
|
||||
};
|
||||
|
||||
struct ModeLocks
|
||||
{
|
||||
typedef std::vector<ModeLock *> ModeList;
|
||||
|
||||
virtual ~ModeLocks() { }
|
||||
|
||||
/** Check if a mode is mlocked
|
||||
* @param mode The mode
|
||||
* @param An optional param
|
||||
* @param status True to check mlock on, false for mlock off
|
||||
* @return true on success, false on fail
|
||||
*/
|
||||
virtual bool HasMLock(ChannelMode *mode, const Anope::string ¶m, bool status) const = 0;
|
||||
|
||||
/** Set a mlock
|
||||
* @param mode The mode
|
||||
* @param status True for mlock on, false for mlock off
|
||||
* @param param An optional param arg for + mlocked modes
|
||||
* @param setter Who is setting the mlock
|
||||
* @param created When the mlock was created
|
||||
* @return true on success, false on failure (module blocking)
|
||||
*/
|
||||
virtual bool SetMLock(ChannelMode *mode, bool status, const Anope::string ¶m = "", Anope::string setter = "", time_t created = Anope::CurTime) = 0;
|
||||
|
||||
/** Remove a mlock
|
||||
* @param mode The mode
|
||||
* @param status True for mlock on, false for mlock off
|
||||
* @param param The param of the mode, required if it is a list or status mode
|
||||
* @return true on success, false on failure
|
||||
*/
|
||||
virtual bool RemoveMLock(ChannelMode *mode, bool status, const Anope::string ¶m = "") = 0;
|
||||
|
||||
virtual void RemoveMLock(ModeLock *mlock) = 0;
|
||||
|
||||
/** Clear all mlocks on the channel
|
||||
*/
|
||||
virtual void ClearMLock() = 0;
|
||||
|
||||
/** Get all of the mlocks for this channel
|
||||
* @return The mlocks
|
||||
*/
|
||||
virtual const ModeList &GetMLock() const = 0;
|
||||
|
||||
/** Get a list of mode locks on a channel
|
||||
* @param name The mode name to get a list of
|
||||
* @return a list of mlocks for the given mode
|
||||
*/
|
||||
virtual std::list<ModeLock *> GetModeLockList(const Anope::string &name) = 0;
|
||||
|
||||
/** Get details for a specific mlock
|
||||
* @param mname The mode name
|
||||
* @param An optional param to match with
|
||||
* @return The MLock, if any
|
||||
*/
|
||||
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
|
||||
* @return A string of mode locks, eg: +nrt
|
||||
*/
|
||||
virtual Anope::string GetMLockAsString(bool complete) const = 0;
|
||||
|
||||
virtual void Check() = 0;
|
||||
};
|
||||
|
||||
@@ -0,0 +1,20 @@
|
||||
/* ChanServ core functions
|
||||
*
|
||||
* (C) 2003-2013 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.
|
||||
*/
|
||||
|
||||
struct CSSuspendInfo
|
||||
{
|
||||
Anope::string chan, by, reason;
|
||||
time_t time, expires;
|
||||
|
||||
virtual ~CSSuspendInfo() { }
|
||||
protected:
|
||||
CSSuspendInfo() { }
|
||||
};
|
||||
@@ -34,15 +34,18 @@ namespace DNS
|
||||
/* IPv6 AAAA lookup */
|
||||
QUERY_AAAA = 28,
|
||||
/* Zone transfer */
|
||||
QUERY_AXFR = 252
|
||||
QUERY_AXFR = 252,
|
||||
/* A lookup for any record */
|
||||
QUERY_ANY = 255
|
||||
};
|
||||
|
||||
|
||||
/** Flags that can be AND'd into DNSPacket::flags to receive certain values
|
||||
*/
|
||||
enum
|
||||
{
|
||||
QUERYFLAGS_QR = 0x8000,
|
||||
QUERYFLAGS_OPCODE = 0x7800,
|
||||
QUERYFLAGS_OPCODE_NOTIFY = 0x2000,
|
||||
QUERYFLAGS_AA = 0x400,
|
||||
QUERYFLAGS_TC = 0x200,
|
||||
QUERYFLAGS_RD = 0x100,
|
||||
@@ -76,9 +79,18 @@ namespace DNS
|
||||
|
||||
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; }
|
||||
|
||||
struct hash
|
||||
{
|
||||
size_t operator()(const Question &q) const
|
||||
{
|
||||
return Anope::hash_ci()(q.name);
|
||||
}
|
||||
};
|
||||
};
|
||||
|
||||
struct ResourceRecord : public Question
|
||||
struct ResourceRecord : Question
|
||||
{
|
||||
unsigned int ttl;
|
||||
Anope::string rdata;
|
||||
@@ -98,16 +110,6 @@ namespace DNS
|
||||
Query(const Question &q) : error(ERROR_NONE) { questions.push_back(q); }
|
||||
};
|
||||
|
||||
class Packet : public Query
|
||||
{
|
||||
public:
|
||||
static const int POINTER = 0xC0;
|
||||
static const int LABEL = 0x3F;
|
||||
static const int HEADER_LENGTH = 12;
|
||||
|
||||
virtual ~Packet() { }
|
||||
};
|
||||
|
||||
class ReplySocket;
|
||||
class Request;
|
||||
|
||||
@@ -125,6 +127,7 @@ namespace DNS
|
||||
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;
|
||||
};
|
||||
|
||||
@@ -131,11 +131,12 @@ class HTTPProvider : public ListenSocket, public Service
|
||||
{
|
||||
Anope::string ip;
|
||||
unsigned short port;
|
||||
bool ssl;
|
||||
public:
|
||||
Anope::string ext_ip;
|
||||
std::vector<Anope::string> ext_headers;
|
||||
|
||||
HTTPProvider(Module *c, const Anope::string &n, const Anope::string &i, const unsigned short p) : ListenSocket(i, p, i.find(':') != Anope::string::npos), Service(c, "HTTPProvider", n), ip(i), port(p) { }
|
||||
HTTPProvider(Module *c, const Anope::string &n, const Anope::string &i, const unsigned short p, bool s) : ListenSocket(i, p, i.find(':') != Anope::string::npos), Service(c, "HTTPProvider", n), ip(i), port(p), ssl(s) { }
|
||||
|
||||
const Anope::string &GetIP() const
|
||||
{
|
||||
@@ -147,6 +148,11 @@ class HTTPProvider : public ListenSocket, public Service
|
||||
return this->port;
|
||||
}
|
||||
|
||||
bool IsSSL() const
|
||||
{
|
||||
return this->ssl;
|
||||
}
|
||||
|
||||
virtual bool RegisterPage(HTTPPage *page) = 0;
|
||||
virtual void UnregisterPage(HTTPPage *page) = 0;
|
||||
virtual HTTPPage* FindPage(const Anope::string &name) = 0;
|
||||
@@ -0,0 +1,62 @@
|
||||
/* NickServ core functions
|
||||
*
|
||||
* (C) 2003-2013 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.
|
||||
*/
|
||||
|
||||
struct NSCertList
|
||||
{
|
||||
protected:
|
||||
NSCertList() { }
|
||||
public:
|
||||
virtual ~NSCertList() { }
|
||||
|
||||
/** Add an entry to the nick's certificate list
|
||||
*
|
||||
* @param entry The fingerprint to add to the cert list
|
||||
*
|
||||
* Adds a new entry into the cert list.
|
||||
*/
|
||||
virtual void AddCert(const Anope::string &entry) = 0;
|
||||
|
||||
/** Get an entry from the nick's cert list by index
|
||||
*
|
||||
* @param entry Index in the certificaate list vector to retrieve
|
||||
* @return The fingerprint entry of the given index if within bounds, an empty string if the vector is empty or the index is out of bounds
|
||||
*
|
||||
* Retrieves an entry from the certificate list corresponding to the given index.
|
||||
*/
|
||||
virtual Anope::string GetCert(unsigned entry) const = 0;
|
||||
|
||||
virtual unsigned GetCertCount() const = 0;
|
||||
|
||||
/** Find an entry in the nick's cert list
|
||||
*
|
||||
* @param entry The fingerprint to search for
|
||||
* @return True if the fingerprint is found in the cert list, false otherwise
|
||||
*
|
||||
* Search for an fingerprint within the cert list.
|
||||
*/
|
||||
virtual bool FindCert(const Anope::string &entry) const = 0;
|
||||
|
||||
/** Erase a fingerprint from the nick's certificate list
|
||||
*
|
||||
* @param entry The fingerprint to remove
|
||||
*
|
||||
* Removes the specified fingerprint from the cert list.
|
||||
*/
|
||||
virtual void EraseCert(const Anope::string &entry) = 0;
|
||||
|
||||
/** Clears the entire nick's cert list
|
||||
*
|
||||
* Deletes all the memory allocated in the certificate list vector and then clears the vector.
|
||||
*/
|
||||
virtual void ClearCert() = 0;
|
||||
|
||||
virtual void Check() = 0;
|
||||
};
|
||||
@@ -0,0 +1,20 @@
|
||||
/* NickServ core functions
|
||||
*
|
||||
* (C) 2003-2013 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.
|
||||
*/
|
||||
|
||||
struct NSSuspendInfo
|
||||
{
|
||||
Anope::string nick, by, reason;
|
||||
time_t when, expires;
|
||||
|
||||
virtual ~NSSuspendInfo() { }
|
||||
protected:
|
||||
NSSuspendInfo() { }
|
||||
};
|
||||
@@ -3,11 +3,11 @@
|
||||
|
||||
enum ForbidType
|
||||
{
|
||||
FT_NONE,
|
||||
FT_NICK,
|
||||
FT_NICK = 1,
|
||||
FT_CHAN,
|
||||
FT_EMAIL,
|
||||
FT_REGISTER
|
||||
FT_REGISTER,
|
||||
FT_SIZE
|
||||
};
|
||||
|
||||
struct ForbidData : Serializable
|
||||
@@ -35,7 +35,7 @@ class ForbidService : public Service
|
||||
|
||||
virtual ForbidData *FindForbid(const Anope::string &mask, ForbidType type) = 0;
|
||||
|
||||
virtual const std::vector<ForbidData *> &GetForbids() = 0;
|
||||
virtual std::vector<ForbidData *> GetForbids() = 0;
|
||||
};
|
||||
|
||||
static ServiceReference<ForbidService> forbid_service("ForbidService", "forbid");
|
||||
@@ -70,6 +70,9 @@ Serializable* ForbidData::Unserialize(Serializable *obj, Serialize::Data &data)
|
||||
data["type"] >> t;
|
||||
fb->type = static_cast<ForbidType>(t);
|
||||
|
||||
if (t > FT_SIZE - 1)
|
||||
return NULL;
|
||||
|
||||
if (!obj)
|
||||
forbid_service->AddForbid(fb);
|
||||
return fb;
|
||||
@@ -27,7 +27,7 @@ struct Exception : Serializable
|
||||
class SessionService : public Service
|
||||
{
|
||||
public:
|
||||
typedef std::tr1::unordered_map<cidr, Session *, cidr::hash> SessionMap;
|
||||
typedef TR1NS::unordered_map<cidr, Session *, cidr::hash> SessionMap;
|
||||
typedef std::vector<Exception *> ExceptionVector;
|
||||
|
||||
SessionService(Module *m) : Service(m, "SessionService", "session") { }
|
||||
@@ -42,11 +42,7 @@ class SessionService : public Service
|
||||
|
||||
virtual ExceptionVector &GetExceptions() = 0;
|
||||
|
||||
virtual void AddSession(Session *s) = 0;
|
||||
|
||||
virtual void DelSession(Session *s) = 0;
|
||||
|
||||
virtual Session *FindSession(const Anope::string &mask) = 0;
|
||||
virtual Session *FindSession(const Anope::string &ip) = 0;
|
||||
|
||||
virtual SessionMap &GetSessions() = 0;
|
||||
};
|
||||
@@ -0,0 +1,18 @@
|
||||
#ifndef CHANSERV_H
|
||||
#define CHANSERV_H
|
||||
|
||||
class ChanServService : public Service
|
||||
{
|
||||
public:
|
||||
ChanServService(Module *m) : Service(m, "ChanServService", "ChanServ")
|
||||
{
|
||||
}
|
||||
|
||||
/* Have ChanServ hold the channel, that is, join and set +nsti and wait
|
||||
* for a few minutes so no one can join or rejoin.
|
||||
*/
|
||||
virtual void Hold(Channel *c) = 0;
|
||||
};
|
||||
|
||||
#endif // CHANSERV_H
|
||||
|
||||
@@ -4,14 +4,16 @@
|
||||
class GlobalService : public Service
|
||||
{
|
||||
public:
|
||||
GlobalService(Module *m) : Service(m, "GlobalService", "Global") { }
|
||||
GlobalService(Module *m) : Service(m, "GlobalService", "Global")
|
||||
{
|
||||
}
|
||||
|
||||
/** Send out a global message to all users
|
||||
* @param sender Our client which should send the global
|
||||
* @param source The sender of the global
|
||||
* @param message The message
|
||||
*/
|
||||
virtual void SendGlobal(const BotInfo *sender, const Anope::string &source, const Anope::string &message) = 0;
|
||||
virtual void SendGlobal(BotInfo *sender, const Anope::string &source, const Anope::string &message) = 0;
|
||||
};
|
||||
|
||||
#endif // GLOBAL_H
|
||||
@@ -12,7 +12,9 @@ class MemoServService : public Service
|
||||
MEMO_TARGET_FULL
|
||||
};
|
||||
|
||||
MemoServService(Module *m) : Service(m, "MemoServService", "MemoServ") { }
|
||||
MemoServService(Module *m) : Service(m, "MemoServService", "MemoServ")
|
||||
{
|
||||
}
|
||||
|
||||
/** Sends a memo.
|
||||
* @param source The source of the memo, can be anythin.
|
||||
@@ -4,10 +4,13 @@
|
||||
class NickServService : public Service
|
||||
{
|
||||
public:
|
||||
NickServService(Module *m) : Service(m, "NickServService", "NickServ") { }
|
||||
NickServService(Module *m) : Service(m, "NickServService", "NickServ")
|
||||
{
|
||||
}
|
||||
|
||||
virtual void Validate(User *u) = 0;
|
||||
virtual void Login(User *u, NickAlias *na) = 0;
|
||||
virtual void Collide(User *u, NickAlias *na) = 0;
|
||||
virtual void Release(NickAlias *na) = 0;
|
||||
};
|
||||
|
||||
#endif // NICKSERV_H
|
||||
@@ -0,0 +1,74 @@
|
||||
/*
|
||||
*
|
||||
* (C) 2003-2013 Anope Team
|
||||
* Contact us at team@anope.org
|
||||
*
|
||||
* Please read COPYING and README for further details.
|
||||
*
|
||||
*/
|
||||
|
||||
namespace Redis
|
||||
{
|
||||
struct Reply
|
||||
{
|
||||
enum Type
|
||||
{
|
||||
NOT_PARSED,
|
||||
NOT_OK,
|
||||
OK,
|
||||
INT,
|
||||
BULK,
|
||||
MULTI_BULK
|
||||
}
|
||||
type;
|
||||
|
||||
Reply() { Clear(); }
|
||||
~Reply() { Clear(); }
|
||||
|
||||
void Clear()
|
||||
{
|
||||
type = NOT_PARSED;
|
||||
i = 0;
|
||||
bulk.clear();
|
||||
multi_bulk_size = 0;
|
||||
for (unsigned j = 0; j < multi_bulk.size(); ++j)
|
||||
delete multi_bulk[j];
|
||||
multi_bulk.clear();
|
||||
}
|
||||
|
||||
int64_t i;
|
||||
Anope::string bulk;
|
||||
int multi_bulk_size;
|
||||
std::deque<Reply *> multi_bulk;
|
||||
};
|
||||
|
||||
class Interface
|
||||
{
|
||||
public:
|
||||
Module *owner;
|
||||
|
||||
Interface(Module *m) : owner(m) { }
|
||||
virtual ~Interface() { }
|
||||
|
||||
virtual void OnResult(const Reply &r) = 0;
|
||||
virtual void OnError(const Anope::string &error) { Log(owner) << error; }
|
||||
};
|
||||
|
||||
class Provider : public Service
|
||||
{
|
||||
public:
|
||||
Provider(Module *c, const Anope::string &n) : Service(c, "Redis::Provider", n) { }
|
||||
|
||||
virtual void SendCommand(Interface *i, const std::vector<Anope::string> &cmds) = 0;
|
||||
virtual void SendCommand(Interface *i, const Anope::string &str) = 0;
|
||||
|
||||
virtual bool BlockAndProcess() = 0;
|
||||
|
||||
virtual void Subscribe(Interface *i, const Anope::string &pattern) = 0;
|
||||
virtual void Unsubscribe(const Anope::string &pattern) = 0;
|
||||
|
||||
virtual void StartTransaction() = 0;
|
||||
virtual void CommitTransaction() = 0;
|
||||
};
|
||||
}
|
||||
|
||||
+49
-43
@@ -27,17 +27,16 @@ class CoreExport IRCDProto : public Service
|
||||
public:
|
||||
virtual ~IRCDProto();
|
||||
|
||||
virtual void SendSVSKillInternal(const BotInfo *, User *, const Anope::string &);
|
||||
virtual void SendModeInternal(const BotInfo *, const Channel *, const Anope::string &);
|
||||
virtual void SendModeInternal(const BotInfo *, const User *, const Anope::string &) = 0;
|
||||
virtual void SendKickInternal(const BotInfo *, const Channel *, const User *, const Anope::string &);
|
||||
virtual void SendMessageInternal(const BotInfo *bi, const Anope::string &dest, const Anope::string &buf);
|
||||
virtual void SendNoticeInternal(const BotInfo *bi, const Anope::string &dest, const Anope::string &msg);
|
||||
virtual void SendPrivmsgInternal(const BotInfo *bi, const Anope::string &dest, const Anope::string &buf);
|
||||
virtual void SendQuitInternal(const User *u, const Anope::string &buf);
|
||||
virtual void SendPartInternal(const BotInfo *bi, const Channel *chan, const Anope::string &buf);
|
||||
virtual void SendGlobopsInternal(const BotInfo *source, const Anope::string &buf);
|
||||
virtual void SendCTCPInternal(const BotInfo *bi, const Anope::string &dest, const Anope::string &buf);
|
||||
virtual void SendSVSKillInternal(const MessageSource &, User *, const Anope::string &);
|
||||
virtual void SendModeInternal(const MessageSource &, const Channel *, const Anope::string &);
|
||||
virtual void SendModeInternal(const MessageSource &, User *, const Anope::string &);
|
||||
virtual void SendKickInternal(const MessageSource &, const Channel *, User *, const Anope::string &);
|
||||
virtual void SendNoticeInternal(const MessageSource &, const Anope::string &dest, const Anope::string &msg);
|
||||
virtual void SendPrivmsgInternal(const MessageSource &, const Anope::string &dest, const Anope::string &buf);
|
||||
virtual void SendQuitInternal(User *, const Anope::string &buf);
|
||||
virtual void SendPartInternal(User *, const Channel *chan, const Anope::string &buf);
|
||||
virtual void SendGlobopsInternal(const MessageSource &, const Anope::string &buf);
|
||||
virtual void SendCTCPInternal(const MessageSource &, const Anope::string &dest, const Anope::string &buf);
|
||||
virtual void SendNumericInternal(int numeric, const Anope::string &dest, const Anope::string &buf);
|
||||
|
||||
const Anope::string &GetProtocolName();
|
||||
@@ -67,6 +66,8 @@ class CoreExport IRCDProto : public Service
|
||||
bool RequiresID;
|
||||
/* The maximum number of modes we are allowed to set with one MODE command */
|
||||
unsigned MaxModes;
|
||||
/* The maximum number of bytes a line may have */
|
||||
unsigned MaxLine;
|
||||
|
||||
/** Sets the server in NOOP mode. If NOOP mode is enabled, no users
|
||||
* will be able to oper on the server.
|
||||
@@ -79,7 +80,7 @@ class CoreExport IRCDProto : public Service
|
||||
* @param bi The bot to set the topic from
|
||||
* @param c The channel to set the topic on. The topic being set is Channel::topic
|
||||
*/
|
||||
virtual void SendTopic(BotInfo *, Channel *);
|
||||
virtual void SendTopic(const MessageSource &, Channel *);
|
||||
|
||||
/** Sets a vhost on a user.
|
||||
* @param u The user
|
||||
@@ -111,33 +112,31 @@ class CoreExport IRCDProto : public Service
|
||||
virtual void SendSQLineDel(const XLine *x) { }
|
||||
|
||||
/** Kills a user
|
||||
* @param source The client used to kill the user, if any
|
||||
* @param source Who is doing the kill
|
||||
* @param user The user to be killed
|
||||
* @param fmt Kill reason
|
||||
*/
|
||||
virtual void SendSVSKill(const BotInfo *source, User *user, const char *fmt, ...);
|
||||
virtual void SendSVSKill(const MessageSource &source, User *user, const char *fmt, ...);
|
||||
|
||||
virtual void SendMode(const BotInfo *bi, const Channel *dest, const char *fmt, ...);
|
||||
virtual void SendMode(const BotInfo *bi, const User *u, const char *fmt, ...);
|
||||
virtual void SendMode(const MessageSource &source, const Channel *dest, const char *fmt, ...);
|
||||
virtual void SendMode(const MessageSource &source, User *u, const char *fmt, ...);
|
||||
|
||||
/** Introduces a client to the rest of the network
|
||||
* @param u The client to introduce
|
||||
*/
|
||||
virtual void SendClientIntroduction(const User *u) = 0;
|
||||
virtual void SendClientIntroduction(User *u) = 0;
|
||||
|
||||
virtual void SendKick(const BotInfo *bi, const Channel *chan, const User *user, const char *fmt, ...);
|
||||
virtual void SendKick(const MessageSource &source, const Channel *chan, User *user, const char *fmt, ...);
|
||||
|
||||
/* Sends a message using SendPrivmsg or SendNotice, depending on the default message method. */
|
||||
virtual void SendMessage(const BotInfo *bi, const Anope::string &dest, const char *fmt, ...);
|
||||
virtual void SendNotice(const BotInfo *bi, const Anope::string &dest, const char *fmt, ...);
|
||||
virtual void SendPrivmsg(const BotInfo *bi, const Anope::string &dest, const char *fmt, ...);
|
||||
virtual void SendAction(const BotInfo *bi, const Anope::string &dest, const char *fmt, ...);
|
||||
virtual void SendCTCP(const BotInfo *bi, const Anope::string &dest, const char *fmt, ...);
|
||||
virtual void SendNotice(const MessageSource &source, const Anope::string &dest, const char *fmt, ...);
|
||||
virtual void SendPrivmsg(const MessageSource &source, const Anope::string &dest, const char *fmt, ...);
|
||||
virtual void SendAction(const MessageSource &source, const Anope::string &dest, const char *fmt, ...);
|
||||
virtual void SendCTCP(const MessageSource &source, const Anope::string &dest, const char *fmt, ...);
|
||||
|
||||
virtual void SendGlobalNotice(const BotInfo *bi, const Server *dest, const Anope::string &msg) = 0;
|
||||
virtual void SendGlobalPrivmsg(const BotInfo *bi, const Server *desc, const Anope::string &msg) = 0;
|
||||
virtual void SendGlobalNotice(BotInfo *bi, const Server *dest, const Anope::string &msg) = 0;
|
||||
virtual void SendGlobalPrivmsg(BotInfo *bi, const Server *desc, const Anope::string &msg) = 0;
|
||||
|
||||
virtual void SendQuit(const User *u, const char *fmt, ...);
|
||||
virtual void SendQuit(User *u, const char *fmt, ...);
|
||||
virtual void SendPing(const Anope::string &servname, const Anope::string &who);
|
||||
virtual void SendPong(const Anope::string &servname, const Anope::string &who);
|
||||
|
||||
@@ -148,8 +147,8 @@ class CoreExport IRCDProto : public Service
|
||||
* be set on the user. This may include the modes in the join, but will usually place them on the mode
|
||||
* stacker to be set "soon".
|
||||
*/
|
||||
virtual void SendJoin(const User *u, Channel *c, const ChannelStatus *status) = 0;
|
||||
virtual void SendPart(const BotInfo *bi, const Channel *chan, const char *fmt, ...);
|
||||
virtual void SendJoin(User *u, Channel *c, const ChannelStatus *status) = 0;
|
||||
virtual void SendPart(User *u, const Channel *chan, const char *fmt, ...);
|
||||
|
||||
/** Force joins a user that isn't ours to a channel.
|
||||
* @param bi The source of the message
|
||||
@@ -157,30 +156,30 @@ class CoreExport IRCDProto : public Service
|
||||
* @param chan The channel to join the user to
|
||||
* @param param Channel key?
|
||||
*/
|
||||
virtual void SendSVSJoin(const BotInfo *bi, const User *u, const Anope::string &chan, const Anope::string ¶m) { }
|
||||
virtual void SendSVSJoin(const MessageSource &source, User *u, const Anope::string &chan, const Anope::string ¶m) { }
|
||||
|
||||
/** Force parts a user that isn't ours from a channel.
|
||||
* @param bi The source of the message
|
||||
* @param source The source of the message
|
||||
* @param u The user to part
|
||||
* @param chan The channel to part the user from
|
||||
* @param param part reason, some IRCds don't support this
|
||||
*/
|
||||
virtual void SendSVSPart(const BotInfo *bi, const User *u, const Anope::string &chan, const Anope::string ¶m) { }
|
||||
virtual void SendSVSPart(const MessageSource &source, User *u, const Anope::string &chan, const Anope::string ¶m) { }
|
||||
|
||||
virtual void SendInvite(const BotInfo *bi, const Channel *c, const User *u);
|
||||
virtual void SendGlobops(const BotInfo *source, const char *fmt, ...);
|
||||
virtual void SendInvite(const MessageSource &source, const Channel *c, User *u);
|
||||
virtual void SendGlobops(const MessageSource &source, const char *fmt, ...);
|
||||
|
||||
/** Sets oper flags on a user, currently only supported by Unreal
|
||||
*/
|
||||
virtual void SendSVSO(const BotInfo *, const Anope::string &, const Anope::string &) { }
|
||||
virtual void SendSVSO(BotInfo *, const Anope::string &, const Anope::string &) { }
|
||||
|
||||
/** Sends a nick change of one of our clients.
|
||||
*/
|
||||
virtual void SendNickChange(const User *u, const Anope::string &newnick);
|
||||
virtual void SendNickChange(User *u, const Anope::string &newnick);
|
||||
|
||||
/** Forces a nick change of a user that isn't ours (SVSNICK)
|
||||
*/
|
||||
virtual void SendForceNickChange(const User *u, const Anope::string &newnick, time_t when);
|
||||
virtual void SendForceNickChange(User *u, const Anope::string &newnick, time_t when);
|
||||
|
||||
/** Used to introduce ourselves to our uplink. Usually will SendServer(Me) and any other
|
||||
* initial handshake requirements.
|
||||
@@ -193,10 +192,10 @@ class CoreExport IRCDProto : public Service
|
||||
virtual void SendBOB() { }
|
||||
virtual void SendEOB() { }
|
||||
|
||||
virtual void SendSVSHold(const Anope::string &) { }
|
||||
virtual void SendSVSHold(const Anope::string &, time_t) { }
|
||||
virtual void SendSVSHoldDel(const Anope::string &) { }
|
||||
|
||||
virtual void SendSWhois(const BotInfo *bi, const Anope::string &, const Anope::string &) { }
|
||||
virtual void SendSWhois(const MessageSource &, const Anope::string &, const Anope::string &) { }
|
||||
|
||||
/** Introduces a server to the uplink
|
||||
*/
|
||||
@@ -222,6 +221,12 @@ class CoreExport IRCDProto : public Service
|
||||
virtual bool IsChannelValid(const Anope::string &);
|
||||
virtual bool IsIdentValid(const Anope::string &);
|
||||
virtual bool IsHostValid(const Anope::string &);
|
||||
virtual bool IsExtbanValid(const Anope::string &) { return false; }
|
||||
|
||||
/** Retrieve the maximum number of list modes settable on this channel
|
||||
* Defaults to Config->ListSize
|
||||
*/
|
||||
virtual unsigned GetMaxListFor(Channel *c);
|
||||
};
|
||||
|
||||
class CoreExport MessageSource
|
||||
@@ -234,10 +239,11 @@ class CoreExport MessageSource
|
||||
MessageSource(const Anope::string &);
|
||||
MessageSource(User *u);
|
||||
MessageSource(Server *s);
|
||||
const Anope::string GetName();
|
||||
const Anope::string &GetSource();
|
||||
User *GetUser();
|
||||
Server *GetServer();
|
||||
const Anope::string &GetName() const;
|
||||
const Anope::string &GetSource() const;
|
||||
User *GetUser() const;
|
||||
BotInfo *GetBot() const;
|
||||
Server *GetServer() const;
|
||||
};
|
||||
|
||||
enum IRCDMessageFlag
|
||||
|
||||
+18
-224
@@ -22,49 +22,6 @@ typedef Anope::hash_map<ChannelInfo *> registered_channel_map;
|
||||
|
||||
extern CoreExport Serialize::Checker<registered_channel_map> RegisteredChannelList;
|
||||
|
||||
/* Indices for TTB (Times To Ban) */
|
||||
enum
|
||||
{
|
||||
TTB_BOLDS,
|
||||
TTB_COLORS,
|
||||
TTB_REVERSES,
|
||||
TTB_UNDERLINES,
|
||||
TTB_BADWORDS,
|
||||
TTB_CAPS,
|
||||
TTB_FLOOD,
|
||||
TTB_REPEAT,
|
||||
TTB_ITALICS,
|
||||
TTB_AMSGS,
|
||||
TTB_SIZE
|
||||
};
|
||||
|
||||
/** Flags for badwords
|
||||
*/
|
||||
enum BadWordType
|
||||
{
|
||||
/* Always kicks if the word is said */
|
||||
BW_ANY,
|
||||
/* User must way the entire word */
|
||||
BW_SINGLE,
|
||||
/* The word has to start with the badword */
|
||||
BW_START,
|
||||
/* The word has to end with the badword */
|
||||
BW_END
|
||||
};
|
||||
|
||||
/* Structure used to contain bad words. */
|
||||
struct CoreExport BadWord : Serializable
|
||||
{
|
||||
Serialize::Reference<ChannelInfo> ci;
|
||||
Anope::string word;
|
||||
BadWordType type;
|
||||
|
||||
BadWord();
|
||||
~BadWord();
|
||||
void Serialize(Serialize::Data &data) const anope_override;
|
||||
static Serializable* Unserialize(Serializable *obj, Serialize::Data &);
|
||||
};
|
||||
|
||||
/* AutoKick data. */
|
||||
class CoreExport AutoKick : public Serializable
|
||||
{
|
||||
@@ -86,93 +43,22 @@ class CoreExport AutoKick : public Serializable
|
||||
static Serializable* Unserialize(Serializable *obj, Serialize::Data &);
|
||||
};
|
||||
|
||||
struct CoreExport ModeLock : Serializable
|
||||
{
|
||||
public:
|
||||
Serialize::Reference<ChannelInfo> ci;
|
||||
bool set;
|
||||
Anope::string name;
|
||||
Anope::string param;
|
||||
Anope::string setter;
|
||||
time_t created;
|
||||
|
||||
ModeLock(ChannelInfo *ch, bool s, const Anope::string &n, const Anope::string &p, const Anope::string &se = "", time_t c = Anope::CurTime);
|
||||
~ModeLock();
|
||||
|
||||
void Serialize(Serialize::Data &data) const anope_override;
|
||||
static Serializable* Unserialize(Serializable *obj, Serialize::Data &);
|
||||
};
|
||||
|
||||
struct CoreExport LogSetting : Serializable
|
||||
{
|
||||
Serialize::Reference<ChannelInfo> ci;
|
||||
/* Our service name of the command */
|
||||
Anope::string service_name;
|
||||
/* The name of the client the command is on */
|
||||
Anope::string command_service;
|
||||
/* Name of the command to the user, can have spaces */
|
||||
Anope::string command_name;
|
||||
Anope::string method, extra;
|
||||
Anope::string creator;
|
||||
time_t created;
|
||||
|
||||
LogSetting() : Serializable("LogSetting") { }
|
||||
void Serialize(Serialize::Data &data) const anope_override;
|
||||
static Serializable* Unserialize(Serializable *obj, Serialize::Data &);
|
||||
};
|
||||
|
||||
/* It matters that Base is here before Extensible (it is inherited by Serializable)
|
||||
*
|
||||
* Possible flags:
|
||||
* TOPICLOCK - Topic can only be changed by TOPIC SET
|
||||
* RESTRICTED - Only users on the access list may join
|
||||
* PEACE - Don't allow ChanServ and BotServ commands to do bad things to users with higher access levels
|
||||
* SECURE - Don't allow any privileges
|
||||
* NO_EXPIRE - Channel does not expire
|
||||
* MEMO_HARDMAX - Channel memo limit may not be changed
|
||||
* SECUREFOUNDER - Stricter control of channel founder status
|
||||
* SIGNKICK - Sign kicks with the user who did the kick
|
||||
* SIGNKICK_LEVEL - Sign kicks if level is < than the one defined by the SIGNKICK level
|
||||
* SUSPENDED - Channel is suepended
|
||||
* PERSIST - Channel still exists when empited (perm channel mode or leaving a botserv bot).
|
||||
* STATS - Chanstats are enabled
|
||||
* NOAUTOOP - If set users are not auto given any status on join
|
||||
*
|
||||
* BotServ flags:
|
||||
* BS_DONTKICKOPS - BotServ won't kick ops
|
||||
* BS_DONTKICKVOICES - BotServ won't kick voices
|
||||
* BS_FANTASY - BotServ bot accepts fantasy commands
|
||||
* BS_GREET - BotServ should show greets
|
||||
* BS_NOBOT - BotServ bots are not allowed to be in this channel
|
||||
* BS_KICK_BOLDS - BotServ kicks for bolds
|
||||
* BS_KICK_COLORS - BotServ kicks for colors
|
||||
* BS_KICK_REVERSES - BotServ kicks for reverses
|
||||
* BS_KICK_UNDERLINES - BotServ kicks for underlines
|
||||
* BS_KICK_BADWORD - BotServ kicks for badwords
|
||||
* BS_KICK_CAPS - BotServ kicks for caps
|
||||
* BS_KICK_FLOOD - BotServ kicks for flood
|
||||
* BS_KICK_REPEAT - BotServ kicks for repeating
|
||||
* BS_KICK_ITALICS - BotServ kicks for italics
|
||||
* BS_KICK_AMSGS - BotServ kicks for amsgs
|
||||
*/
|
||||
class CoreExport ChannelInfo : public Serializable, public Extensible
|
||||
{
|
||||
/* channels who reference this one */
|
||||
Anope::map<int> references;
|
||||
private:
|
||||
Serialize::Reference<NickCore> founder; /* Channel founder */
|
||||
Serialize::Reference<NickCore> successor; /* Who gets the channel if the founder nick is dropped or expires */
|
||||
Serialize::Checker<std::vector<ChanAccess *> > access; /* List of authorized users */
|
||||
Serialize::Checker<std::vector<AutoKick *> > akick; /* List of users to kickban */
|
||||
Serialize::Checker<std::vector<BadWord *> > badwords; /* List of badwords */
|
||||
std::map<Anope::string, int16_t> levels;
|
||||
Anope::map<int16_t> levels;
|
||||
|
||||
public:
|
||||
friend class ChanAccess;
|
||||
friend class AutoKick;
|
||||
friend struct BadWord;
|
||||
|
||||
typedef std::multimap<Anope::string, ModeLock *> ModeList;
|
||||
Serialize::Checker<ModeList> mode_locks;
|
||||
Serialize::Checker<std::vector<LogSetting *> > log_settings;
|
||||
|
||||
Anope::string name; /* Channel name */
|
||||
Anope::string desc;
|
||||
@@ -184,6 +70,8 @@ class CoreExport ChannelInfo : public Serializable, public Extensible
|
||||
Anope::string last_topic_setter; /* Setter */
|
||||
time_t last_topic_time; /* Time */
|
||||
|
||||
Channel::ModeList last_modes; /* The last modes set on this channel */
|
||||
|
||||
int16_t bantype;
|
||||
|
||||
MemoInfo memos;
|
||||
@@ -192,11 +80,8 @@ class CoreExport ChannelInfo : public Serializable, public Extensible
|
||||
|
||||
/* For BotServ */
|
||||
Serialize::Reference<BotInfo> bi; /* Bot used on this channel */
|
||||
int16_t ttb[TTB_SIZE]; /* Times to ban for each kicker */
|
||||
|
||||
int16_t capsmin, capspercent; /* For CAPS kicker */
|
||||
int16_t floodlines, floodsecs; /* For FLOOD kicker */
|
||||
int16_t repeattimes; /* For REPEAT kicker */
|
||||
time_t banexpire; /* Time bans expire in */
|
||||
|
||||
/** Constructor
|
||||
* @param chname The channel name
|
||||
@@ -204,7 +89,7 @@ class CoreExport ChannelInfo : public Serializable, public Extensible
|
||||
ChannelInfo(const Anope::string &chname);
|
||||
|
||||
/** Copy constructor
|
||||
* @param ci The ChannelInfo to copy settings to
|
||||
* @param ci The ChannelInfo to copy settings from
|
||||
*/
|
||||
ChannelInfo(const ChannelInfo &ci);
|
||||
|
||||
@@ -256,13 +141,18 @@ class CoreExport ChannelInfo : public Serializable, public Extensible
|
||||
*/
|
||||
unsigned GetAccessCount() const;
|
||||
|
||||
/** Get the number of access entries for this channel,
|
||||
* including those that are on other channels.
|
||||
*/
|
||||
unsigned GetDeepAccessCount() const;
|
||||
|
||||
/** Erase an entry from the channel access list
|
||||
*
|
||||
* @param index The index in the access list vector
|
||||
*
|
||||
* Clears the memory used by the given access entry and removes it from the vector.
|
||||
* @return The erased entry
|
||||
*/
|
||||
void EraseAccess(unsigned index);
|
||||
ChanAccess *EraseAccess(unsigned index);
|
||||
|
||||
/** Clear the entire channel access list
|
||||
*
|
||||
@@ -308,106 +198,6 @@ class CoreExport ChannelInfo : public Serializable, public Extensible
|
||||
*/
|
||||
void ClearAkick();
|
||||
|
||||
/** Add a badword to the badword list
|
||||
* @param word The badword
|
||||
* @param type The type (SINGLE START END)
|
||||
* @return The badword
|
||||
*/
|
||||
BadWord* AddBadWord(const Anope::string &word, BadWordType type);
|
||||
|
||||
/** Get a badword structure by index
|
||||
* @param index The index
|
||||
* @return The badword
|
||||
*/
|
||||
BadWord* GetBadWord(unsigned index) const;
|
||||
|
||||
/** Get how many badwords are on this channel
|
||||
* @return The number of badwords in the vector
|
||||
*/
|
||||
unsigned GetBadWordCount() const;
|
||||
|
||||
/** Remove a badword
|
||||
* @param index The index of the badword
|
||||
*/
|
||||
void EraseBadWord(unsigned index);
|
||||
|
||||
/** Clear all badwords from the channel
|
||||
*/
|
||||
void ClearBadWords();
|
||||
|
||||
/** Check if a mode is mlocked
|
||||
* @param mode The mode
|
||||
* @param An optional param
|
||||
* @param status True to check mlock on, false for mlock off
|
||||
* @return true on success, false on fail
|
||||
*/
|
||||
bool HasMLock(ChannelMode *mode, const Anope::string ¶m, bool status) const;
|
||||
|
||||
/** Set a mlock
|
||||
* @param mode The mode
|
||||
* @param status True for mlock on, false for mlock off
|
||||
* @param param An optional param arg for + mlocked modes
|
||||
* @param setter Who is setting the mlock
|
||||
* @param created When the mlock was created
|
||||
* @return true on success, false on failure (module blocking)
|
||||
*/
|
||||
bool SetMLock(ChannelMode *mode, bool status, const Anope::string ¶m = "", Anope::string setter = "", time_t created = Anope::CurTime);
|
||||
|
||||
/** Remove a mlock
|
||||
* @param mode The mode
|
||||
* @param status True for mlock on, false for mlock off
|
||||
* @param param The param of the mode, required if it is a list or status mode
|
||||
* @return true on success, false on failure
|
||||
*/
|
||||
bool RemoveMLock(ChannelMode *mode, bool status, const Anope::string ¶m = "");
|
||||
|
||||
void RemoveMLock(ModeLock *mlock);
|
||||
|
||||
/** Clear all mlocks on the channel
|
||||
*/
|
||||
void ClearMLock();
|
||||
|
||||
/** Get all of the mlocks for this channel
|
||||
* @return The mlocks
|
||||
*/
|
||||
const ModeList &GetMLock() const;
|
||||
|
||||
/** Get a list of modes on a channel
|
||||
* @param Name The mode name to get a list of
|
||||
* @return a pair of iterators for the beginning and end of the list
|
||||
*/
|
||||
std::pair<ModeList::iterator, ModeList::iterator> GetModeList(const Anope::string &name);
|
||||
|
||||
/** Get details for a specific mlock
|
||||
* @param mname The mode name
|
||||
* @param An optional param to match with
|
||||
* @return The MLock, if any
|
||||
*/
|
||||
const ModeLock *GetMLock(const Anope::string &mname, const Anope::string ¶m = "");
|
||||
|
||||
/** Get the current mode locks as a string
|
||||
* @param complete True to show mlock parameters aswell
|
||||
* @return A string of mode locks, eg: +nrt
|
||||
*/
|
||||
Anope::string GetMLockAsString(bool complete) const;
|
||||
|
||||
/** Check whether a user is permitted to be on this channel
|
||||
* @param u The user
|
||||
* @return true if they are allowed, false if they aren't and were kicked
|
||||
*/
|
||||
bool CheckKick(User *user);
|
||||
|
||||
/** Check the channel topic
|
||||
* If topic lock is enabled will change the topic back, else it records
|
||||
* the new topic in the ChannelInfo
|
||||
*/
|
||||
void CheckTopic();
|
||||
|
||||
/** Restore the channel topic, used on channel creation when not syncing with the uplink
|
||||
* and after uplink sync
|
||||
*/
|
||||
void RestoreTopic();
|
||||
|
||||
/** Get the level for a privilege
|
||||
* @param priv The privilege name
|
||||
* @return the level
|
||||
@@ -442,6 +232,10 @@ class CoreExport ChannelInfo : public Serializable, public Extensible
|
||||
* @return the ChannelInfo associated with the channel
|
||||
*/
|
||||
static ChannelInfo* Find(const Anope::string &name);
|
||||
|
||||
void AddChannelReference(const Anope::string &what);
|
||||
void RemoveChannelReference(const Anope::string &what);
|
||||
void GetChannelReferences(std::deque<Anope::string> &chans);
|
||||
};
|
||||
|
||||
/** Is the user the real founder?
|
||||
|
||||
+5
-2
@@ -80,7 +80,10 @@ class CoreExport Serializable : public virtual Base
|
||||
virtual ~Serializable();
|
||||
|
||||
/* Unique ID (per type, not globally) for this object */
|
||||
unsigned int id;
|
||||
uint64_t id;
|
||||
|
||||
/* Only used by redis, to ignore updates */
|
||||
unsigned short redis_ignore;
|
||||
|
||||
/** Marks the object as potentially being updated "soon".
|
||||
*/
|
||||
@@ -129,7 +132,7 @@ class CoreExport Serialize::Type
|
||||
|
||||
public:
|
||||
/* Map of Serializable::id to Serializable objects */
|
||||
std::map<unsigned int, Serializable *> objects;
|
||||
std::map<uint64_t, Serializable *> objects;
|
||||
|
||||
/** Creates a new serializable type
|
||||
* @param n Type name
|
||||
|
||||
+11
-3
@@ -33,6 +33,10 @@ namespace Servers
|
||||
*/
|
||||
extern CoreExport Server* GetUplink();
|
||||
|
||||
/* Server maps by name and id */
|
||||
extern CoreExport Anope::map<Server *> ByName;
|
||||
extern CoreExport Anope::map<Server *> ByID;
|
||||
|
||||
/* CAPAB/PROTOCTL given by the uplink */
|
||||
extern CoreExport std::set<Anope::string> Capab;
|
||||
}
|
||||
@@ -117,6 +121,10 @@ class CoreExport Server : public Extensible
|
||||
*/
|
||||
const Anope::string &GetSID() const;
|
||||
|
||||
/** Retrieves the reason this server is quitting
|
||||
*/
|
||||
const Anope::string &GetQuitReason() const;
|
||||
|
||||
/** Get the list of links this server has, or NULL if it has none
|
||||
* @return A list of servers
|
||||
*/
|
||||
@@ -165,14 +173,14 @@ class CoreExport Server : public Extensible
|
||||
* @param source The source of the message
|
||||
* @param message The message
|
||||
*/
|
||||
void Notice(const BotInfo *source, const Anope::string &message);
|
||||
void Notice(BotInfo *source, const Anope::string &message);
|
||||
|
||||
/** Find a server
|
||||
* @param name The name or SID/numeric
|
||||
* @param s The server list to search for this server on, defaults to our Uplink
|
||||
* @param name_only set to true to only look up by name, not SID
|
||||
* @return The server
|
||||
*/
|
||||
static Server *Find(const Anope::string &name, Server *s = NULL);
|
||||
static Server *Find(const Anope::string &name, bool name_only = false);
|
||||
};
|
||||
|
||||
#endif // SERVERS_H
|
||||
|
||||
+1
-1
@@ -15,7 +15,7 @@
|
||||
|
||||
#include "services.h"
|
||||
#include "anope.h"
|
||||
#include "modules.h"
|
||||
#include "base.h"
|
||||
|
||||
/** Anything that inherits from this class can be referred to
|
||||
* using ServiceReference. Any interfaces provided by modules,
|
||||
|
||||
@@ -43,6 +43,7 @@
|
||||
#include <bitset>
|
||||
#include <set>
|
||||
#include <algorithm>
|
||||
#include <iterator>
|
||||
|
||||
#include "defs.h"
|
||||
|
||||
|
||||
+8
-6
@@ -54,6 +54,9 @@ union CoreExport sockaddrs
|
||||
*/
|
||||
Anope::string addr() const;
|
||||
|
||||
/* Is this address ipv6? */
|
||||
bool ipv6() const;
|
||||
|
||||
/** Check if this sockaddr has data in it
|
||||
*/
|
||||
bool operator()() const;
|
||||
@@ -79,18 +82,21 @@ union CoreExport sockaddrs
|
||||
* @throws A socket exception if given an invalid structure
|
||||
*/
|
||||
void ntop(int type, const void *src);
|
||||
|
||||
bool valid() const;
|
||||
};
|
||||
|
||||
class CoreExport cidr
|
||||
{
|
||||
sockaddrs addr;
|
||||
Anope::string cidr_ip;
|
||||
unsigned char cidr_len;
|
||||
unsigned short cidr_len;
|
||||
public:
|
||||
cidr(const Anope::string &ip);
|
||||
cidr(const Anope::string &ip, unsigned char len);
|
||||
Anope::string mask() const;
|
||||
bool match(sockaddrs &other);
|
||||
bool match(const sockaddrs &other);
|
||||
bool valid() const;
|
||||
|
||||
bool operator<(const cidr &other) const;
|
||||
bool operator==(const cidr &other) const;
|
||||
@@ -385,10 +391,6 @@ class CoreExport ConnectionSocket : public virtual Socket
|
||||
/* Sockaddrs for connection ip/port */
|
||||
sockaddrs conaddr;
|
||||
|
||||
/** Constructor
|
||||
*/
|
||||
ConnectionSocket();
|
||||
|
||||
/** Connect the socket
|
||||
* @param TargetHost The target host to connect to
|
||||
* @param Port The target port to connect to
|
||||
|
||||
+20
-3
@@ -18,6 +18,10 @@
|
||||
class CoreExport Timer
|
||||
{
|
||||
private:
|
||||
/** The owner of the timer, if any
|
||||
*/
|
||||
Module *owner;
|
||||
|
||||
/** The time this was created
|
||||
*/
|
||||
time_t settime;
|
||||
@@ -42,6 +46,14 @@ class CoreExport Timer
|
||||
*/
|
||||
Timer(long time_from_now, time_t now = Anope::CurTime, bool repeating = false);
|
||||
|
||||
/** Constructor, initializes the triggering time
|
||||
* @param creator The creator of the timer
|
||||
* @param time_from_now The number of seconds from now to trigger the timer
|
||||
* @param now The time now
|
||||
* @param repeating Repeat this timer every time_from_now if this is true
|
||||
*/
|
||||
Timer(Module *creator, long time_from_now, time_t now = Anope::CurTime, bool repeating = false);
|
||||
|
||||
/** Destructor, removes the timer from the list
|
||||
*/
|
||||
virtual ~Timer();
|
||||
@@ -76,6 +88,11 @@ class CoreExport Timer
|
||||
*/
|
||||
time_t GetSetTime() const;
|
||||
|
||||
/** Returns the owner of this timer, if any
|
||||
* @return The owner of the timer
|
||||
*/
|
||||
Module *GetOwner() const;
|
||||
|
||||
/** Called when the timer ticks
|
||||
* This should be overridden with something useful
|
||||
*/
|
||||
@@ -90,7 +107,7 @@ class CoreExport TimerManager
|
||||
{
|
||||
/** A list of timers
|
||||
*/
|
||||
static std::vector<Timer *> Timers;
|
||||
static std::multimap<time_t, Timer *> Timers;
|
||||
public:
|
||||
/** Add a timer to the list
|
||||
* @param t A Timer derived class to add
|
||||
@@ -107,9 +124,9 @@ class CoreExport TimerManager
|
||||
*/
|
||||
static void TickTimers(time_t ctime = Anope::CurTime);
|
||||
|
||||
/** Compares two timers
|
||||
/** Deletes all timers owned by the given module
|
||||
*/
|
||||
static bool TimerComparison(Timer *one, Timer *two);
|
||||
static void DeleteTimersFor(Module *m);
|
||||
};
|
||||
|
||||
#endif // TIMERS_H
|
||||
|
||||
+3
-6
@@ -14,6 +14,7 @@
|
||||
#define UPLINK_H
|
||||
|
||||
#include "sockets.h"
|
||||
#include "protocol.h"
|
||||
|
||||
namespace Uplink
|
||||
{
|
||||
@@ -33,16 +34,12 @@ class UplinkSocket : public ConnectionSocket, public BufferedSocket
|
||||
/* A message sent over the uplink socket */
|
||||
class CoreExport Message
|
||||
{
|
||||
private:
|
||||
/* The source of the message, can be a server (Me), or any user (one of our bots) */
|
||||
const Server *server;
|
||||
const User *user;
|
||||
MessageSource source;
|
||||
std::stringstream buffer;
|
||||
|
||||
public:
|
||||
Message();
|
||||
explicit Message(const Server *);
|
||||
explicit Message(const User *);
|
||||
Message(const MessageSource &);
|
||||
~Message();
|
||||
template<typename T> Message &operator<<(const T &val)
|
||||
{
|
||||
|
||||
+35
-29
@@ -36,6 +36,9 @@ class CoreExport User : public virtual Base, public Extensible, public CommandRe
|
||||
bool quit;
|
||||
/* Users that are in the process of quitting */
|
||||
static std::list<User *> quitting_users;
|
||||
|
||||
public:
|
||||
typedef std::map<Anope::string, Anope::string> ModeList;
|
||||
protected:
|
||||
Anope::string vident;
|
||||
Anope::string ident;
|
||||
@@ -43,7 +46,7 @@ class CoreExport User : public virtual Base, public Extensible, public CommandRe
|
||||
/* If the user is on the access list of the nick theyre on */
|
||||
bool on_access;
|
||||
/* Map of user modes and the params this user has (if any) */
|
||||
std::map<Anope::string, Anope::string> modes;
|
||||
ModeList modes;
|
||||
/* NickCore account the user is currently loggged in as, if they are logged in */
|
||||
Serialize::Reference<NickCore> nc;
|
||||
|
||||
@@ -79,7 +82,7 @@ class CoreExport User : public virtual Base, public Extensible, public CommandRe
|
||||
bool super_admin;
|
||||
|
||||
/* Channels the user is in */
|
||||
typedef std::list<ChanUserContainer *> ChanUserList;
|
||||
typedef std::map<Channel *, ChanUserContainer *> ChanUserList;
|
||||
ChanUserList chans;
|
||||
|
||||
/* Last time this user sent a memo command used */
|
||||
@@ -102,8 +105,9 @@ class CoreExport User : public virtual Base, public Extensible, public CommandRe
|
||||
* @param ssignon User's timestamp
|
||||
* @param smodes User's modes
|
||||
* @param suid The unique identifier of the user.
|
||||
* @param nc The account the user is identified as, if any
|
||||
*/
|
||||
User(const Anope::string &snick, const Anope::string &sident, const Anope::string &shost, const Anope::string &svhost, const Anope::string &sip, Server *sserver, const Anope::string &srealname, time_t ssignon, const Anope::string &smodes, const Anope::string &suid = "");
|
||||
User(const Anope::string &snick, const Anope::string &sident, const Anope::string &shost, const Anope::string &svhost, const Anope::string &sip, Server *sserver, const Anope::string &srealname, time_t ssignon, const Anope::string &smodes, const Anope::string &suid, NickCore *nc);
|
||||
|
||||
protected:
|
||||
/** Destroy a user.
|
||||
@@ -184,24 +188,19 @@ class CoreExport User : public virtual Base, public Extensible, public CommandRe
|
||||
* @param fmt Format of the Message
|
||||
* @param ... any number of parameters
|
||||
*/
|
||||
void SendMessage(const BotInfo *source, const char *fmt, ...);
|
||||
void SendMessage(const BotInfo *source, const Anope::string &msg) anope_override;
|
||||
void SendMessage(BotInfo *source, const char *fmt, ...);
|
||||
void SendMessage(BotInfo *source, const Anope::string &msg) anope_override;
|
||||
|
||||
/** Collide a nick
|
||||
* See the comment in users.cpp
|
||||
* @param na The nick
|
||||
*/
|
||||
void Collide(NickAlias *na);
|
||||
|
||||
/** Identify the user to the Nick
|
||||
/** Identify the user to a nick.
|
||||
* updates last_seen, logs the user in,
|
||||
* send messages, checks for mails, set vhost and more
|
||||
* @param the NickAlias
|
||||
* @param na the nick to identify to, should be the same as
|
||||
* the user's current nick
|
||||
*/
|
||||
void Identify(NickAlias *na);
|
||||
|
||||
/** Login the user to a NickCore
|
||||
* @param core The account the user is useing
|
||||
/** Login the user to an account
|
||||
* @param core The account
|
||||
*/
|
||||
void Login(NickCore *core);
|
||||
|
||||
@@ -212,7 +211,7 @@ class CoreExport User : public virtual Base, public Extensible, public CommandRe
|
||||
/** Get the account the user is logged in using
|
||||
* @return The account or NULL
|
||||
*/
|
||||
virtual NickCore *Account() const;
|
||||
NickCore *Account() const;
|
||||
|
||||
/** Check if the user is identified for their nick
|
||||
* @param check_nick True to check if the user is identified to the nickname they are on too
|
||||
@@ -221,10 +220,10 @@ class CoreExport User : public virtual Base, public Extensible, public CommandRe
|
||||
bool IsIdentified(bool check_nick = false) const;
|
||||
|
||||
/** Check if the user is recognized for their nick (on the nicks access list)
|
||||
* @param check_nick Only returns true if the user has secure off
|
||||
* @param check_secure Only returns true if the user has secure off
|
||||
* @return true or false
|
||||
*/
|
||||
bool IsRecognized(bool check_nick = true) const;
|
||||
bool IsRecognized(bool check_secure = true) const;
|
||||
|
||||
/** Check if the user is a services oper
|
||||
* @return true if they are an oper
|
||||
@@ -254,65 +253,72 @@ class CoreExport User : public virtual Base, public Extensible, public CommandRe
|
||||
bool HasMode(const Anope::string &name) const;
|
||||
|
||||
/** Set a mode internally on the user, the IRCd is not informed
|
||||
* @param setter who/what is setting the mode
|
||||
* @param um The user mode
|
||||
* @param Param The param, if there is one
|
||||
*/
|
||||
void SetModeInternal(UserMode *um, const Anope::string ¶m = "");
|
||||
void SetModeInternal(const MessageSource &setter, UserMode *um, const Anope::string ¶m = "");
|
||||
|
||||
/** Remove a mode internally on the user, the IRCd is not informed
|
||||
* @param setter who/what is setting the mode
|
||||
* @param um The user mode
|
||||
*/
|
||||
void RemoveModeInternal(UserMode *um);
|
||||
void RemoveModeInternal(const MessageSource &setter, UserMode *um);
|
||||
|
||||
/** Set a mode on the user
|
||||
* @param bi The client setting the mode
|
||||
* @param um The user mode
|
||||
* @param Param Optional param for the mode
|
||||
*/
|
||||
void SetMode(const BotInfo *bi, UserMode *um, const Anope::string ¶m = "");
|
||||
void SetMode(BotInfo *bi, UserMode *um, const Anope::string ¶m = "");
|
||||
|
||||
/** Set a mode on the user
|
||||
* @param bi The client setting the mode
|
||||
* @param name The mode name
|
||||
* @param Param Optional param for the mode
|
||||
*/
|
||||
void SetMode(const BotInfo *bi, const Anope::string &name, const Anope::string ¶m = "");
|
||||
void SetMode(BotInfo *bi, const Anope::string &name, const Anope::string ¶m = "");
|
||||
|
||||
/** Remove a mode on the user
|
||||
* @param bi The client setting the mode
|
||||
* @param um The user mode
|
||||
* @param param Optional param for the mode
|
||||
*/
|
||||
void RemoveMode(const BotInfo *bi, UserMode *um);
|
||||
void RemoveMode(BotInfo *bi, UserMode *um, const Anope::string ¶m = "");
|
||||
|
||||
/** Remove a mode from the user
|
||||
* @param bi The client setting the mode
|
||||
* @param name The mode name
|
||||
* @param param Optional param for the mode
|
||||
*/
|
||||
void RemoveMode(const BotInfo *bi, const Anope::string &name);
|
||||
void RemoveMode(BotInfo *bi, const Anope::string &name, const Anope::string ¶m = "");
|
||||
|
||||
/** Set a string of modes on a user
|
||||
* @param bi The client setting the modes
|
||||
* @param umodes The modes
|
||||
*/
|
||||
void SetModes(const BotInfo *bi, const char *umodes, ...);
|
||||
void SetModes(BotInfo *bi, const char *umodes, ...);
|
||||
|
||||
/** Set a string of modes on a user internally
|
||||
* @param setter who/what is setting the mode
|
||||
* @param umodes The modes
|
||||
*/
|
||||
void SetModesInternal(const char *umodes, ...);
|
||||
void SetModesInternal(const MessageSource &source, const char *umodes, ...);
|
||||
|
||||
/** Get modes set for this user.
|
||||
* @return A string of modes set on the user
|
||||
*/
|
||||
Anope::string GetModes() const;
|
||||
|
||||
const ModeList &GetModeList() const;
|
||||
|
||||
/** Find the channel container for Channel c that the user is on
|
||||
* This is preferred over using FindUser in Channel, as there are usually more users in a channel
|
||||
* than channels a user is in
|
||||
* @param c The channel
|
||||
* @return The channel container, or NULL
|
||||
*/
|
||||
ChanUserContainer *FindChannel(const Channel *c) const;
|
||||
ChanUserContainer *FindChannel(Channel *c) const;
|
||||
|
||||
/** Check if the user is protected from kicks and negative mode changes
|
||||
* @return true or false
|
||||
@@ -323,13 +329,13 @@ class CoreExport User : public virtual Base, public Extensible, public CommandRe
|
||||
* @param source The user/server doing the kill
|
||||
* @param reason The reason for the kill
|
||||
*/
|
||||
void Kill(const Anope::string &source, const Anope::string &reason);
|
||||
void Kill(const MessageSource &source, const Anope::string &reason);
|
||||
|
||||
/** Process a kill for a user
|
||||
* @param source The user/server doing the kill
|
||||
* @param reason The reason for the kill
|
||||
*/
|
||||
void KillInternal(const Anope::string &source, const Anope::string &reason);
|
||||
void KillInternal(const MessageSource &source, const Anope::string &reason);
|
||||
|
||||
/** Processes a quit for the user, and marks them as quit
|
||||
* @param reason The reason for the quit
|
||||
|
||||
+3083
-2872
File diff suppressed because it is too large
Load Diff
+3306
-3051
File diff suppressed because it is too large
Load Diff
+3115
-2907
File diff suppressed because it is too large
Load Diff
+5923
-6407
File diff suppressed because it is too large
Load Diff
+3087
-2869
File diff suppressed because it is too large
Load Diff
+3082
-2867
File diff suppressed because it is too large
Load Diff
+3073
-2868
File diff suppressed because it is too large
Load Diff
+5753
-6154
File diff suppressed because it is too large
Load Diff
+3075
-2849
File diff suppressed because it is too large
Load Diff
+3076
-2843
File diff suppressed because it is too large
Load Diff
+3348
-3138
File diff suppressed because it is too large
Load Diff
+3067
-2823
File diff suppressed because it is too large
Load Diff
+137
-184
@@ -1,213 +1,166 @@
|
||||
add_subdirectory("third/language")
|
||||
|
||||
# Get a list of ALL files and directories within the current directory
|
||||
file(GLOB MODULES_FOLDERS RELATIVE ${CMAKE_CURRENT_SOURCE_DIR} "*")
|
||||
remove_item_from_list(MODULES_FOLDERS "CMakeFiles")
|
||||
|
||||
# If using Windows, add the MODULE_COMPILE define
|
||||
if(WIN32)
|
||||
add_definitions(-DMODULE_COMPILE)
|
||||
endif(WIN32)
|
||||
|
||||
# Iterate through the directories
|
||||
foreach(MODULE_FOLDER ${MODULES_FOLDERS})
|
||||
if(IS_DIRECTORY "${CMAKE_CURRENT_SOURCE_DIR}/${MODULE_FOLDER}")
|
||||
# Get a list of all .cpp files in this directory
|
||||
file(GLOB MODULES_SRCS RELATIVE ${CMAKE_CURRENT_SOURCE_DIR} "${MODULE_FOLDER}/*.cpp")
|
||||
sort_list(MODULES_SRCS)
|
||||
macro(build_modules SRC)
|
||||
if(NOT ${SRC} STREQUAL ${CMAKE_CURRENT_SOURCE_DIR} AND EXISTS "${SRC}/CMakeLists.txt")
|
||||
add_subdirectory("${SRC}")
|
||||
else(NOT ${SRC} STREQUAL ${CMAKE_CURRENT_SOURCE_DIR} AND EXISTS "${SRC}/CMakeLists.txt")
|
||||
file(GLOB MODULES_SRCS "${SRC}/*")
|
||||
foreach(MODULE_SRC ${MODULES_SRCS})
|
||||
if(IS_DIRECTORY "${MODULE_SRC}")
|
||||
build_modules("${MODULE_SRC}")
|
||||
else(IS_DIRECTORY "${MODULE_SRC}")
|
||||
string(REGEX MATCH "\\.cpp$" CPP ${MODULE_SRC})
|
||||
if(CPP)
|
||||
set_source_files_properties(${MODULE_SRC} PROPERTIES LANGUAGE CXX COMPILE_FLAGS "${CXXFLAGS}")
|
||||
|
||||
# Set all the files to use C++ as well as set their compile flags (use the module-specific compile flags, though)
|
||||
set_source_files_properties(${MODULES_SRCS} PROPERTIES LANGUAGE CXX COMPILE_FLAGS "${CXXFLAGS}")
|
||||
file(RELATIVE_PATH FNAME ${SRC} ${MODULE_SRC})
|
||||
# Convert the real source file extension to have a .so extension
|
||||
string(REGEX REPLACE "\\.cpp$" ".so" SO ${FNAME})
|
||||
# Temporary variable for the current source's include directories
|
||||
set(TEMP_INCLUDES)
|
||||
# Calculate the header file dependencies for the given source file
|
||||
calculate_depends(${MODULE_SRC} TEMP_INCLUDES)
|
||||
# If there were some extra include directories, add them to the list
|
||||
if(TEMP_INCLUDES)
|
||||
append_to_list(EXTRA_INCLUDES ${TEMP_INCLUDES})
|
||||
endif(TEMP_INCLUDES)
|
||||
|
||||
# Create an empty list to store extra include directories
|
||||
set(EXTRA_INCLUDES)
|
||||
# Reset linker flags
|
||||
set(TEMP_LDFLAGS)
|
||||
# Reset extra dependencies
|
||||
set(TEMP_DEPENDENCIES)
|
||||
# Calculate the library dependencies for the given source file
|
||||
calculate_libraries(${MODULE_SRC} TEMP_LDFLAGS TEMP_DEPENDENCIES)
|
||||
# Reset has_function
|
||||
set(HAS_FUNCTION)
|
||||
# Check the function dependencies for the given source file
|
||||
check_functions(${MODULE_SRC} HAS_FUNCTION)
|
||||
# Only continue if this module has all of the required functions
|
||||
if(HAS_FUNCTION)
|
||||
# For Visual Studio only, include win32_memory static library, required to override Visual Studio's overrides of the new/delete operators
|
||||
if(MSVC)
|
||||
set(WIN32_MEMORY win32_memory)
|
||||
else(MSVC)
|
||||
set(WIN32_MEMORY)
|
||||
endif(MSVC)
|
||||
# Generate the module and set its linker flags, also set it to depend on the main Anope executable to be built beforehand
|
||||
add_library(${SO} MODULE ${MODULE_SRC})
|
||||
# Windows requires this because it's weird
|
||||
if(WIN32)
|
||||
set(WIN32_NO_LIBS "/nodefaultlib:\"libcmt.lib\"")
|
||||
else(WIN32)
|
||||
set(WIN32_NO_LIBS)
|
||||
endif(WIN32)
|
||||
set_target_properties(${SO} PROPERTIES LINKER_LANGUAGE CXX PREFIX "" SUFFIX "" LINK_FLAGS "${TEMP_LDFLAGS} ${WIN32_NO_LIBS}" INSTALL_RPATH_USE_LINK_PATH ON BUILD_WITH_INSTALL_RPATH ON)
|
||||
add_dependencies(${SO} ${PROGRAM_NAME})
|
||||
if(GETTEXT_FOUND)
|
||||
add_dependencies(${SO} module_language)
|
||||
endif(GETTEXT_FOUND)
|
||||
target_link_libraries(${SO} ${TEMP_DEPENDENCIES})
|
||||
# For Windows only, have the module link to the export library of Anope as well as wsock32 and Ws2_32 libraries (most of the modules probably don't need this, but this is to be on the safe side), also set its version
|
||||
if(WIN32)
|
||||
target_link_libraries(${SO} ${PROGRAM_NAME} wsock32 Ws2_32 ${WIN32_MEMORY})
|
||||
set_target_properties(${PROGRAM_NAME} PROPERTIES VERSION "${VERSION_DOTTED}")
|
||||
else(WIN32)
|
||||
if(APPLE)
|
||||
target_link_libraries(${SO} ${PROGRAM_NAME})
|
||||
endif(APPLE)
|
||||
endif(WIN32)
|
||||
# Set the module to be installed to the module directory under the data directory
|
||||
install(TARGETS ${SO} DESTINATION ${LIB_DIR}/modules)
|
||||
endif(HAS_FUNCTION)
|
||||
endif(CPP)
|
||||
endif(IS_DIRECTORY "${MODULE_SRC}")
|
||||
endforeach(MODULE_SRC ${MODULES_SRCS})
|
||||
endif(NOT ${SRC} STREQUAL ${CMAKE_CURRENT_SOURCE_DIR} AND EXISTS "${SRC}/CMakeLists.txt")
|
||||
endmacro(build_modules)
|
||||
|
||||
# Get the length of the folder name
|
||||
string(LENGTH ${MODULE_FOLDER} FOLDER_LEN)
|
||||
# Add one (the /)
|
||||
math(EXPR FOLDER_LEN "${FOLDER_LEN} + 1")
|
||||
macro(build_subdir)
|
||||
file(GLOB_RECURSE MODULES_SUBDIR_SRCS RELATIVE ${CMAKE_CURRENT_SOURCE_DIR} "*.cpp")
|
||||
sort_list(MODULES_SUBDIR_SRCS)
|
||||
|
||||
# Iterate through all the source files
|
||||
foreach(SRC ${MODULES_SRCS})
|
||||
# Get the length of the new source file
|
||||
string(LENGTH ${SRC} SRC_LEN)
|
||||
# Set FILE_LEN to the length of the source file minus folder length
|
||||
math(EXPR FILE_LEN "${SRC_LEN} - ${FOLDER_LEN}")
|
||||
# Get the real name of the source file now
|
||||
string(SUBSTRING ${SRC} ${FOLDER_LEN} ${FILE_LEN} SRC_REALNAME)
|
||||
# Convert the real source file extension to have a .so extension
|
||||
string(REGEX REPLACE "\\.cpp$" ".so" SO ${SRC_REALNAME})
|
||||
# Reset skip_depends
|
||||
set(SKIP_DEPENDS)
|
||||
GET_FILENAME_COMPONENT(FOLDER_NAME ${CMAKE_CURRENT_SOURCE_DIR} NAME)
|
||||
set(SO "${FOLDER_NAME}.so")
|
||||
|
||||
# Set all the files to use C++ as well as set their compile flags (use the module-specific compile flags, though)
|
||||
set_source_files_properties(${MODULES_SUBDIR_SRCS} PROPERTIES LANGUAGE CXX COMPILE_FLAGS "${CXXFLAGS}")
|
||||
|
||||
set(HAS_FUNCTION TRUE)
|
||||
|
||||
# Iterate through the source files in the subdirectory
|
||||
foreach(SRC ${MODULES_SUBDIR_SRCS})
|
||||
if(HAS_FUNCTION)
|
||||
# Temporary variable for the current source's include directories
|
||||
set(TEMP_INCLUDES)
|
||||
# Calculate the header file dependencies for the given source file
|
||||
calculate_depends(${SRC} SKIP_DEPENDS FALSE TEMP_INCLUDES)
|
||||
calculate_depends(${SRC} TEMP_INCLUDES)
|
||||
# If there were some extra include directories, add them to the list
|
||||
if(TEMP_INCLUDES)
|
||||
append_to_list(EXTRA_INCLUDES ${TEMP_INCLUDES})
|
||||
include_directories(${TEMP_INCLUDES})
|
||||
endif(TEMP_INCLUDES)
|
||||
|
||||
# Reset linker flags
|
||||
set(TEMP_LDFLAGS)
|
||||
# Reset extra dependencies
|
||||
set(TEMP_DEPENDENCIES)
|
||||
# Reset skip_libraries
|
||||
set(SKIP_LIBRARIES)
|
||||
# Calculate the library dependencies for the given source file
|
||||
calculate_libraries(${SRC} SKIP_LIBRARIES FALSE TEMP_LDFLAGS TEMP_DEPENDENCIES)
|
||||
if(NOT SKIP_DEPENDS AND NOT SKIP_LIBRARIES)
|
||||
# Reset has_function
|
||||
set(HAS_FUNCTION)
|
||||
# Check the function dependencies for the given source file
|
||||
check_functions(${SRC} HAS_FUNCTION)
|
||||
# Only continue if this module has all of the required functions
|
||||
if(HAS_FUNCTION)
|
||||
# For Visual Studio only, include win32_memory static library, required to override Visual Studio's overrides of the new/delete operators
|
||||
if(MSVC)
|
||||
set(WIN32_MEMORY win32_memory)
|
||||
else(MSVC)
|
||||
set(WIN32_MEMORY)
|
||||
endif(MSVC)
|
||||
# Generate the module and set it's linker flags, also set it to depend on the main Anope executable to be built beforehand
|
||||
add_library(${SO} MODULE ${SRC})
|
||||
# Windows requires this because it's weird
|
||||
if(WIN32)
|
||||
set(WIN32_NO_LIBS "/nodefaultlib:\"libcmt.lib\"")
|
||||
else(WIN32)
|
||||
set(WIN32_NO_LIBS)
|
||||
endif(WIN32)
|
||||
set_target_properties(${SO} PROPERTIES LINKER_LANGUAGE CXX PREFIX "" SUFFIX "" LINK_FLAGS "${TEMP_LDFLAGS} ${WIN32_NO_LIBS}" INSTALL_RPATH_USE_LINK_PATH ON BUILD_WITH_INSTALL_RPATH ON)
|
||||
add_dependencies(${SO} ${PROGRAM_NAME})
|
||||
if(GETTEXT_FOUND)
|
||||
add_dependencies(${SO} module_language)
|
||||
endif(GETTEXT_FOUND)
|
||||
# For Windows only, have the module link to the export library of Anope as well as wsock32 and Ws2_32 libraries (most of the modules probably don't need this, but this is to be on the safe side), also set it's version
|
||||
if(WIN32)
|
||||
target_link_libraries(${SO} ${PROGRAM_NAME} wsock32 Ws2_32 ${WIN32_MEMORY} ${TEMP_DEPENDENCIES})
|
||||
set_target_properties(${PROGRAM_NAME} PROPERTIES VERSION "${VERSION_DOTTED}")
|
||||
else(WIN32)
|
||||
target_link_libraries(${SO} ${TEMP_DEPENDENCIES})
|
||||
endif(WIN32)
|
||||
# Set the module to be installed to the module directory under the data directory
|
||||
install(TARGETS ${SO}
|
||||
DESTINATION ${LIB_DIR}/modules
|
||||
)
|
||||
endif(HAS_FUNCTION)
|
||||
else(NOT SKIP_DEPENDS AND NOT SKIP_LIBRARIES)
|
||||
message(" ${SRC} can not be built due to missing dependencies.")
|
||||
endif(NOT SKIP_DEPENDS AND NOT SKIP_LIBRARIES)
|
||||
endforeach(SRC)
|
||||
calculate_libraries(${SRC} SKIP_LIBRARIES MODULE TEMP_LDFLAGS TEMP_DEPENDENCIES)
|
||||
# Check the function dependencies for the given source file
|
||||
check_functions(${SRC} HAS_FUNCTION)
|
||||
|
||||
# Get a list of ALL files and directories within this modules directory
|
||||
file(GLOB SUBMODULE_DIRS RELATIVE ${CMAKE_CURRENT_SOURCE_DIR} "${MODULE_FOLDER}/*")
|
||||
remove_item_from_list(SUBMODULE_DIRS "CMakeFiles")
|
||||
remove_item_from_list(SUBMODULE_DIRS "third/language")
|
||||
# Append this source file's linker flags to the subdirectoy's linker flags, if there are any to append
|
||||
if(TEMP_DEPENDENCIES)
|
||||
append_to_list(SUBDIR_EXTRA_DEPENDS ${TEMP_DEPDENCIES})
|
||||
endif(TEMP_DEPENDENCIES)
|
||||
endif(HAS_FUNCTION)
|
||||
endforeach(SRC ${MODULES_SUBDIR_SRCS})
|
||||
|
||||
foreach(SUBDIR ${SUBMODULE_DIRS})
|
||||
if(IS_DIRECTORY "${CMAKE_CURRENT_SOURCE_DIR}/${SUBDIR}")
|
||||
file(GLOB_RECURSE MODULES_SUBDIR_SRCS RELATIVE ${CMAKE_CURRENT_SOURCE_DIR} "${SUBDIR}/*.cpp")
|
||||
sort_list(MODULES_SUBDIR_SRCS)
|
||||
# Continue if library and function requirements are met
|
||||
if(HAS_FUNCTION)
|
||||
# Remove duplicates from the linker flags
|
||||
if(SUBDIR_LDFLAGS)
|
||||
remove_list_duplicates(SUBDIR_LDFLAGS)
|
||||
endif(SUBDIR_LDFLAGS)
|
||||
|
||||
# Set all the files to use C++ as well as set their compile flags (use the module-specific compile flags, though)
|
||||
set_source_files_properties(${MODULES_SUBDIR_SRCS} PROPERTIES LANGUAGE CXX COMPILE_FLAGS "${CXXFLAGS}")
|
||||
# Remove duplicates from the extra dependencies
|
||||
if(SUBDIR_EXTRA_DEPENDS)
|
||||
remove_list_duplicates(SUBDIR_EXTRA_DEPENDS)
|
||||
endif(SUBDIR_EXTRA_DEPENDS)
|
||||
|
||||
# Get the length of this subdir
|
||||
string(LENGTH ${SUBDIR} SUBDIR_LEN)
|
||||
# Calculate the length of the folder
|
||||
math(EXPR FILE_LEN "${SUBDIR_LEN} - ${FOLDER_LEN}")
|
||||
# Extract this subfolders name to use to generate the .so file
|
||||
string(SUBSTRING ${SUBDIR} ${FOLDER_LEN} ${FILE_LEN} SUBDIR_REALNAME)
|
||||
# Add .so to the end of the directory name, this will be the module's name
|
||||
set(SO "${SUBDIR_REALNAME}.so")
|
||||
# For Visual Studio only, include win32_memory static library, required to override Visual Studio's overrides of the new/delete operators
|
||||
if(MSVC)
|
||||
set(WIN32_MEMORY win32_memory)
|
||||
else(MSVC)
|
||||
set(WIN32_MEMORY)
|
||||
endif(MSVC)
|
||||
|
||||
# Temporary linker flags for this subdirectory
|
||||
set(SUBDIR_LDFLAGS "${LDFLAGS}")
|
||||
# Temporary extra dependencies for this subdirectory
|
||||
set(SUBDIR_EXTRA_DEPENDS)
|
||||
# Reset skip_depends
|
||||
set(SKIP_DEPENDS)
|
||||
# Reset skip_libraries
|
||||
set(SKIP_LIBRARIES)
|
||||
# Reset has_function
|
||||
set(HAS_FUNCTION TRUE)
|
||||
# Generate the module and set it's linker flags, also set it to depend on the main Anope executable to be built beforehand
|
||||
add_library(${SO} MODULE ${MODULES_SUBDIR_SRCS})
|
||||
set_target_properties(${SO} PROPERTIES LINKER_LANGUAGE CXX PREFIX "" SUFFIX "" LINK_FLAGS "${SUBDIR_LDFLAGS}" INSTALL_RPATH_USE_LINK_PATH ON BUILD_WITH_INSTALL_RPATH ON)
|
||||
add_dependencies(${SO} ${PROGRAM_NAME})
|
||||
if(GETTEXT_FOUND)
|
||||
add_dependencies(${SO} module_language)
|
||||
endif(GETTEXT_FOUND)
|
||||
target_link_libraries(${SO} ${SUBDIR_EXTRA_DEPENDS})
|
||||
# For Windows only, have the module link to the export library of Anope as well as wsock32 and Ws2_32 libraries (most of the modules probably don't need this, but this is to be on the safe side), also set it's version
|
||||
if(WIN32)
|
||||
target_link_libraries(${SO} ${PROGRAM_NAME} wsock32 Ws2_32 ${WIN32_MEMORY})
|
||||
set_target_properties(${PROGRAM_NAME} PROPERTIES VERSION "${VERSION_DOTTED}")
|
||||
else(WIN32)
|
||||
if(APPLE)
|
||||
target_link_libraries(${SO} ${PROGRAM_NAME})
|
||||
endif(APPLE)
|
||||
endif(WIN32)
|
||||
|
||||
# Iterate through the source files in the subdirectory
|
||||
foreach(SRC ${MODULES_SUBDIR_SRCS})
|
||||
if(NOT SKIP_DEPENDS AND NOT SKIP_LIBRARIES AND HAS_FUNCTION)
|
||||
# Temporary variable for the current source's include directories
|
||||
set(TEMP_INCLUDES)
|
||||
# Calculate the header file dependencies for the given source file
|
||||
calculate_depends(${SRC} SKIP_DEPENDS FALSE TEMP_INCLUDES)
|
||||
# If there were some extra include directories, add them to the list
|
||||
if(TEMP_INCLUDES)
|
||||
append_to_list(EXTRA_INCLUDES ${TEMP_INCLUDES})
|
||||
endif(TEMP_INCLUDES)
|
||||
# Reset linker flags
|
||||
set(TEMP_LDFLAGS)
|
||||
# Reset extra dependencies
|
||||
set(TEMP_DEPENDENCIES)
|
||||
# Calculate the library dependencies for the given source file
|
||||
calculate_libraries(${SRC} SKIP_LIBRARIES FALSE TEMP_LDFLAGS TEMP_DEPENDENCIES)
|
||||
# Check the function dependencies for the given source file
|
||||
check_functions(${SRC} HAS_FUNCTION)
|
||||
# Set the module to be installed to the module directory under the data directory
|
||||
install(TARGETS ${SO} DESTINATION ${LIB_DIR}/modules)
|
||||
|
||||
# Append this source file's linker flags to the subdirectoy's linker flags, if there are any to append
|
||||
if(TEMP_DEPENDENCIES)
|
||||
append_to_list(SUBDIR_EXTRA_DEPENDS ${TEMP_DEPDENCIES})
|
||||
endif(TEMP_DEPENDENCIES)
|
||||
endif(NOT SKIP_DEPENDS AND NOT SKIP_LIBRARIES AND HAS_FUNCTION)
|
||||
endforeach(SRC)
|
||||
endif(HAS_FUNCTION)
|
||||
endmacro(build_subdir)
|
||||
|
||||
# Continue if library and function requirements are met
|
||||
if(NOT SKIP_DEPENDS AND NOT SKIP_LIBRARIES AND HAS_FUNCTION)
|
||||
# Remove duplicates from the linker flags
|
||||
if(SUBDIR_LDFLAGS)
|
||||
remove_list_duplicates(SUBDIR_LDFLAGS)
|
||||
endif(SUBDIR_LDFLAGS)
|
||||
# Remove duplicates from the extra dependencies
|
||||
if(SUBDIR_EXTRA_DEPENDS)
|
||||
remove_list_duplicates(SUBDIR_EXTRA_DEPENDS)
|
||||
endif(SUBDIR_EXTRA_DEPENDS)
|
||||
include_directories(${CMAKE_CURRENT_SOURCE_DIR})
|
||||
build_modules(${CMAKE_CURRENT_SOURCE_DIR})
|
||||
|
||||
# For Visual Studio only, include win32_memory static library, required to override Visual Studio's overrides of the new/delete operators
|
||||
if(MSVC)
|
||||
set(WIN32_MEMORY win32_memory)
|
||||
else(MSVC)
|
||||
set(WIN32_MEMORY)
|
||||
endif(MSVC)
|
||||
|
||||
# Generate the module and set it's linker flags, also set it to depend on the main Anope executable to be built beforehand
|
||||
add_library(${SO} MODULE ${MODULES_SUBDIR_SRCS})
|
||||
set_target_properties(${SO} PROPERTIES LINKER_LANGUAGE CXX PREFIX "" SUFFIX "" LINK_FLAGS "${SUBDIR_LDFLAGS}" INSTALL_RPATH_USE_LINK_PATH ON BUILD_WITH_INSTALL_RPATH ON)
|
||||
add_dependencies(${SO} ${PROGRAM_NAME})
|
||||
target_link_libraries(${SO} ${PROGRAM_NAME})
|
||||
if(GETTEXT_FOUND)
|
||||
add_dependencies(${SO} module_language)
|
||||
endif(GETTEXT_FOUND)
|
||||
# For Windows only, have the module link to the export library of Anope as well as wsock32 and Ws2_32 libraries (most of the modules probably don't need this, but this is to be on the safe side), also set it's version
|
||||
if(WIN32)
|
||||
target_link_libraries(${SO} ${PROGRAM_NAME} wsock32 Ws2_32 ${WIN32_MEMORY} ${SUBDIR_EXTRA_DEPENDS})
|
||||
set_target_properties(${PROGRAM_NAME} PROPERTIES VERSION "${VERSION_DOTTED}")
|
||||
endif(WIN32)
|
||||
# Set the module to be installed to the module directory under the data directory
|
||||
install(TARGETS ${SO}
|
||||
DESTINATION ${LIB_DIR}/modules
|
||||
)
|
||||
else(NOT SKIP_DEPENDS AND NOT SKIP_LIBRARIES AND HAS_FUNCTION)
|
||||
message(" ${SRC} can not be built due to missing dependencies.")
|
||||
endif(NOT SKIP_DEPENDS AND NOT SKIP_LIBRARIES AND HAS_FUNCTION)
|
||||
|
||||
# Run the directories CMakeLists.txt if there is one
|
||||
if(EXISTS "${CMAKE_CURRENT_SOURCE_DIR}/${SUBDIR}/CMakeLists.txt")
|
||||
add_subdirectory("${CMAKE_CURRENT_SOURCE_DIR}/${SUBDIR}")
|
||||
endif(EXISTS "${CMAKE_CURRENT_SOURCE_DIR}/${SUBDIR}/CMakeLists.txt")
|
||||
endif(IS_DIRECTORY "${CMAKE_CURRENT_SOURCE_DIR}/${SUBDIR}")
|
||||
endforeach(SUBDIR)
|
||||
endif(IS_DIRECTORY "${CMAKE_CURRENT_SOURCE_DIR}/${MODULE_FOLDER}")
|
||||
endforeach(MODULE_FOLDER)
|
||||
|
||||
# If there were extra include directories, remove the duplicates and add the directories to the include path
|
||||
if(EXTRA_INCLUDES)
|
||||
remove_list_duplicates(EXTRA_INCLUDES)
|
||||
include_directories(${EXTRA_INCLUDES})
|
||||
endif(EXTRA_INCLUDES)
|
||||
|
||||
@@ -0,0 +1,36 @@
|
||||
/*
|
||||
*
|
||||
* (C) 2003-2013 Anope Team
|
||||
* Contact us at team@anope.org
|
||||
*
|
||||
* Please read COPYING and README for further details.
|
||||
*
|
||||
*/
|
||||
|
||||
#include "module.h"
|
||||
|
||||
class BSAutoAssign : public Module
|
||||
{
|
||||
public:
|
||||
BSAutoAssign(const Anope::string &modname, const Anope::string &creator) : Module(modname, creator, VENDOR)
|
||||
{
|
||||
}
|
||||
|
||||
void OnChanRegistered(ChannelInfo *ci) anope_override
|
||||
{
|
||||
const Anope::string &bot = Config->GetModule(this)->Get<const Anope::string>("bot");
|
||||
if (bot.empty())
|
||||
return;
|
||||
|
||||
BotInfo *bi = BotInfo::Find(bot);
|
||||
if (bi == NULL)
|
||||
{
|
||||
Log(this) << "bs_autoassign is configured to assign bot " << bot << ", but it does not exist?";
|
||||
return;
|
||||
}
|
||||
|
||||
bi->Assign(NULL, ci);
|
||||
}
|
||||
};
|
||||
|
||||
MODULE_INIT(BSAutoAssign)
|
||||
@@ -9,8 +9,6 @@
|
||||
* Based on the original code of Services by Andy Church.
|
||||
*/
|
||||
|
||||
/*************************************************************************/
|
||||
|
||||
#include "module.h"
|
||||
|
||||
class CommandBSAssign : public Command
|
||||
@@ -29,7 +27,7 @@ class CommandBSAssign : public Command
|
||||
|
||||
if (Anope::ReadOnly)
|
||||
{
|
||||
source.Reply(BOT_ASSIGN_READONLY);
|
||||
source.Reply(_("Sorry, bot assignment is temporarily disabled."));
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -77,7 +75,7 @@ class CommandBSAssign : public Command
|
||||
{
|
||||
this->SendSyntax(source);
|
||||
source.Reply(" ");
|
||||
source.Reply(_("Assigns a bot pointed out by nick to the channel chan. You\n"
|
||||
source.Reply(_("Assigns a bot pointed out by nick to a channel. You\n"
|
||||
"can then configure the bot for the channel so it fits\n"
|
||||
"your needs."));
|
||||
return true;
|
||||
@@ -97,7 +95,7 @@ class CommandBSUnassign : public Command
|
||||
{
|
||||
if (Anope::ReadOnly)
|
||||
{
|
||||
source.Reply(BOT_ASSIGN_READONLY);
|
||||
source.Reply(_("Sorry, bot assignment is temporarily disabled."));
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -141,23 +139,117 @@ class CommandBSUnassign : public Command
|
||||
source.Reply(_("Unassigns a bot from a channel. When you use this command,\n"
|
||||
"the bot won't join the channel anymore. However, bot\n"
|
||||
"configuration for the channel is kept, so you will always\n"
|
||||
"be able to reassign a bot later without have to reconfigure\n"
|
||||
"be able to reassign a bot later without having to reconfigure\n"
|
||||
"it entirely."));
|
||||
return true;
|
||||
}
|
||||
};
|
||||
|
||||
class CommandBSSetNoBot : public Command
|
||||
{
|
||||
public:
|
||||
CommandBSSetNoBot(Module *creator, const Anope::string &sname = "botserv/set/nobot") : Command(creator, sname, 2, 2)
|
||||
{
|
||||
this->SetDesc(_("Prevent a bot from being assigned to a channel"));
|
||||
this->SetSyntax(_("\037channel\037 {\037ON|OFF\037}"));
|
||||
}
|
||||
|
||||
void Execute(CommandSource &source, const std::vector<Anope::string> ¶ms) anope_override
|
||||
{
|
||||
ChannelInfo *ci = ChannelInfo::Find(params[0]);
|
||||
const Anope::string &value = params[1];
|
||||
|
||||
if (Anope::ReadOnly)
|
||||
{
|
||||
source.Reply(_("Sorry, bot modification is temporarily disabled."));
|
||||
return;
|
||||
}
|
||||
|
||||
if (ci == NULL)
|
||||
{
|
||||
source.Reply(CHAN_X_NOT_REGISTERED, params[0].c_str());
|
||||
return;
|
||||
}
|
||||
|
||||
if (value.equals_ci("ON"))
|
||||
{
|
||||
Log(LOG_ADMIN, source, this, ci) << "to enable nobot";
|
||||
|
||||
ci->Extend<bool>("BS_NOBOT");
|
||||
if (ci->bi)
|
||||
ci->bi->UnAssign(source.GetUser(), ci);
|
||||
source.Reply(_("No-bot mode is now \002on\002 on channel %s."), ci->name.c_str());
|
||||
}
|
||||
else if (value.equals_ci("OFF"))
|
||||
{
|
||||
Log(LOG_ADMIN, source, this, ci) << "to disable nobot";
|
||||
|
||||
ci->Shrink<bool>("BS_NOBOT");
|
||||
source.Reply(_("No-bot mode is now \002off\002 on channel %s."), ci->name.c_str());
|
||||
}
|
||||
else
|
||||
this->OnSyntaxError(source, source.command);
|
||||
}
|
||||
|
||||
bool OnHelp(CommandSource &source, const Anope::string &) anope_override
|
||||
{
|
||||
this->SendSyntax(source);
|
||||
source.Reply(_(" \n"
|
||||
"This option makes a channel be unassignable. If a bot\n"
|
||||
"is already assigned to the channel, it is unassigned\n"
|
||||
"automatically when you enable the option."));
|
||||
return true;
|
||||
}
|
||||
};
|
||||
|
||||
class BSAssign : public Module
|
||||
{
|
||||
ExtensibleItem<bool> nobot;
|
||||
|
||||
CommandBSAssign commandbsassign;
|
||||
CommandBSUnassign commandbsunassign;
|
||||
CommandBSSetNoBot commandbssetnobot;
|
||||
|
||||
public:
|
||||
BSAssign(const Anope::string &modname, const Anope::string &creator) : Module(modname, creator, CORE),
|
||||
commandbsassign(this), commandbsunassign(this)
|
||||
BSAssign(const Anope::string &modname, const Anope::string &creator) : Module(modname, creator, VENDOR),
|
||||
nobot(this, "BS_NOBOT"),
|
||||
commandbsassign(this), commandbsunassign(this), commandbssetnobot(this)
|
||||
{
|
||||
this->SetAuthor("Anope");
|
||||
}
|
||||
|
||||
void OnInvite(User *source, Channel *c, User *targ) anope_override
|
||||
{
|
||||
BotInfo *bi;
|
||||
if (Anope::ReadOnly || !c->ci || targ->server != Me || !(bi = dynamic_cast<BotInfo *>(targ)))
|
||||
return;
|
||||
|
||||
AccessGroup access = c->ci->AccessFor(source);
|
||||
if (nobot.HasExt(c->ci) || (!access.HasPriv("ASSIGN") && !source->HasPriv("botserv/administration")))
|
||||
{
|
||||
targ->SendMessage(bi, ACCESS_DENIED);
|
||||
return;
|
||||
}
|
||||
|
||||
if (bi->oper_only && !source->HasPriv("botserv/administration"))
|
||||
{
|
||||
targ->SendMessage(bi, ACCESS_DENIED);
|
||||
return;
|
||||
}
|
||||
|
||||
if (c->ci->bi == bi)
|
||||
{
|
||||
targ->SendMessage(bi, _("Bot \002%s\002 is already assigned to channel \002%s\002."), c->ci->bi->nick.c_str(), c->name.c_str());
|
||||
return;
|
||||
}
|
||||
|
||||
bi->Assign(source, c->ci);
|
||||
targ->SendMessage(bi, _("Bot \002%s\002 has been assigned to %s."), bi->nick.c_str(), c->name.c_str());
|
||||
}
|
||||
|
||||
void OnBotInfo(CommandSource &source, BotInfo *bi, ChannelInfo *ci, InfoFormatter &info) anope_override
|
||||
{
|
||||
if (nobot.HasExt(ci))
|
||||
info.AddOption(_("No bot"));
|
||||
}
|
||||
};
|
||||
|
||||
|
||||
@@ -9,15 +9,145 @@
|
||||
* Based on the original code of Services by Andy Church.
|
||||
*/
|
||||
|
||||
/*************************************************************************/
|
||||
|
||||
#include "module.h"
|
||||
#include "modules/bs_badwords.h"
|
||||
|
||||
struct BadWordImpl : BadWord, Serializable
|
||||
{
|
||||
BadWordImpl() : Serializable("BadWord") { }
|
||||
~BadWordImpl();
|
||||
|
||||
void Serialize(Serialize::Data &data) const anope_override
|
||||
{
|
||||
data["ci"] << this->chan;
|
||||
data["word"] << this->word;
|
||||
data.SetType("type", Serialize::Data::DT_INT); data["type"] << this->type;
|
||||
}
|
||||
|
||||
static Serializable* Unserialize(Serializable *obj, Serialize::Data &);
|
||||
};
|
||||
|
||||
struct BadWordsImpl : BadWords
|
||||
{
|
||||
Serialize::Reference<ChannelInfo> ci;
|
||||
typedef std::vector<BadWordImpl *> list;
|
||||
Serialize::Checker<list> badwords;
|
||||
|
||||
BadWordsImpl(Extensible *obj) : ci(anope_dynamic_static_cast<ChannelInfo *>(obj)), badwords("BadWord") { }
|
||||
|
||||
~BadWordsImpl();
|
||||
|
||||
BadWord* AddBadWord(const Anope::string &word, BadWordType type) anope_override
|
||||
{
|
||||
BadWordImpl *bw = new BadWordImpl();
|
||||
bw->chan = ci->name;
|
||||
bw->word = word;
|
||||
bw->type = type;
|
||||
|
||||
this->badwords->push_back(bw);
|
||||
|
||||
FOREACH_MOD(OnBadWordAdd, (ci, bw));
|
||||
|
||||
return bw;
|
||||
}
|
||||
|
||||
BadWord* GetBadWord(unsigned index) const anope_override
|
||||
{
|
||||
if (this->badwords->empty() || index >= this->badwords->size())
|
||||
return NULL;
|
||||
|
||||
BadWordImpl *bw = (*this->badwords)[index];
|
||||
bw->QueueUpdate();
|
||||
return bw;
|
||||
}
|
||||
|
||||
unsigned GetBadWordCount() const anope_override
|
||||
{
|
||||
return this->badwords->size();
|
||||
}
|
||||
|
||||
void EraseBadWord(unsigned index) anope_override
|
||||
{
|
||||
if (this->badwords->empty() || index >= this->badwords->size())
|
||||
return;
|
||||
|
||||
FOREACH_MOD(OnBadWordDel, (ci, (*this->badwords)[index]));
|
||||
|
||||
delete this->badwords->at(index);
|
||||
}
|
||||
|
||||
void ClearBadWords() anope_override
|
||||
{
|
||||
while (!this->badwords->empty())
|
||||
delete this->badwords->back();
|
||||
}
|
||||
|
||||
void Check() anope_override
|
||||
{
|
||||
if (this->badwords->empty())
|
||||
ci->Shrink<BadWords>("badwords");
|
||||
}
|
||||
};
|
||||
|
||||
BadWordsImpl::~BadWordsImpl()
|
||||
{
|
||||
for (list::iterator it = badwords->begin(); it != badwords->end();)
|
||||
{
|
||||
BadWord *bw = *it;
|
||||
++it;
|
||||
delete bw;
|
||||
}
|
||||
}
|
||||
|
||||
BadWordImpl::~BadWordImpl()
|
||||
{
|
||||
ChannelInfo *ci = ChannelInfo::Find(chan);
|
||||
if (ci)
|
||||
{
|
||||
BadWordsImpl *badwords = ci->GetExt<BadWordsImpl>("badwords");
|
||||
if (badwords)
|
||||
{
|
||||
BadWordsImpl::list::iterator it = std::find(badwords->badwords->begin(), badwords->badwords->end(), this);
|
||||
if (it != badwords->badwords->end())
|
||||
badwords->badwords->erase(it);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Serializable* BadWordImpl::Unserialize(Serializable *obj, Serialize::Data &data)
|
||||
{
|
||||
Anope::string sci, sword;
|
||||
|
||||
data["ci"] >> sci;
|
||||
data["word"] >> sword;
|
||||
|
||||
ChannelInfo *ci = ChannelInfo::Find(sci);
|
||||
if (!ci)
|
||||
return NULL;
|
||||
|
||||
unsigned int n;
|
||||
data["type"] >> n;
|
||||
|
||||
BadWordImpl *bw;
|
||||
if (obj)
|
||||
bw = anope_dynamic_static_cast<BadWordImpl *>(obj);
|
||||
else
|
||||
bw = new BadWordImpl();
|
||||
bw->chan = sci;
|
||||
bw->word = sword;
|
||||
bw->type = static_cast<BadWordType>(n);
|
||||
|
||||
BadWordsImpl *bws = ci->Require<BadWordsImpl>("badwords");
|
||||
bws->badwords->push_back(bw);
|
||||
|
||||
return bw;
|
||||
}
|
||||
|
||||
class BadwordsDelCallback : public NumberList
|
||||
{
|
||||
CommandSource &source;
|
||||
ChannelInfo *ci;
|
||||
BadWords *bw;
|
||||
Command *c;
|
||||
unsigned deleted;
|
||||
bool override;
|
||||
@@ -26,6 +156,7 @@ class BadwordsDelCallback : public NumberList
|
||||
{
|
||||
if (!source.AccessFor(ci).HasPriv("BADWORDS") && source.HasPriv("botserv/administration"))
|
||||
this->override = true;
|
||||
bw = ci->Require<BadWords>("badwords");
|
||||
}
|
||||
|
||||
~BadwordsDelCallback()
|
||||
@@ -40,12 +171,12 @@ class BadwordsDelCallback : public NumberList
|
||||
|
||||
void HandleNumber(unsigned Number) anope_override
|
||||
{
|
||||
if (!Number || Number > ci->GetBadWordCount())
|
||||
if (!bw || !Number || Number > bw->GetBadWordCount())
|
||||
return;
|
||||
|
||||
Log(override ? LOG_OVERRIDE : LOG_COMMAND, source, c, ci) << "DEL " << ci->GetBadWord(Number - 1)->word;
|
||||
Log(override ? LOG_OVERRIDE : LOG_COMMAND, source, c, ci) << "DEL " << bw->GetBadWord(Number - 1)->word;
|
||||
++deleted;
|
||||
ci->EraseBadWord(Number - 1);
|
||||
bw->EraseBadWord(Number - 1);
|
||||
}
|
||||
};
|
||||
|
||||
@@ -56,11 +187,12 @@ class CommandBSBadwords : public Command
|
||||
{
|
||||
bool override = !source.AccessFor(ci).HasPriv("BADWORDS");
|
||||
Log(override ? LOG_OVERRIDE : LOG_COMMAND, source, this, ci) << "LIST";
|
||||
ListFormatter list;
|
||||
ListFormatter list(source.GetAccount());
|
||||
BadWords *bw = ci->GetExt<BadWords>("badwords");
|
||||
|
||||
list.AddColumn("Number").AddColumn("Word").AddColumn("Type");
|
||||
list.AddColumn(_("Number")).AddColumn(_("Word")).AddColumn(_("Type"));
|
||||
|
||||
if (!ci->GetBadWordCount())
|
||||
if (!bw || !bw->GetBadWordCount())
|
||||
{
|
||||
source.Reply(_("%s bad words list is empty."), ci->name.c_str());
|
||||
return;
|
||||
@@ -70,41 +202,41 @@ class CommandBSBadwords : public Command
|
||||
class BadwordsListCallback : public NumberList
|
||||
{
|
||||
ListFormatter &list;
|
||||
ChannelInfo *ci;
|
||||
BadWords *bw;
|
||||
public:
|
||||
BadwordsListCallback(ListFormatter &_list, ChannelInfo *_ci, const Anope::string &numlist) : NumberList(numlist, false), list(_list), ci(_ci)
|
||||
BadwordsListCallback(ListFormatter &_list, BadWords *_bw, const Anope::string &numlist) : NumberList(numlist, false), list(_list), bw(_bw)
|
||||
{
|
||||
}
|
||||
|
||||
void HandleNumber(unsigned Number) anope_override
|
||||
{
|
||||
if (!Number || Number > ci->GetBadWordCount())
|
||||
if (!Number || Number > bw->GetBadWordCount())
|
||||
return;
|
||||
|
||||
const BadWord *bw = ci->GetBadWord(Number - 1);
|
||||
const BadWord *b = bw->GetBadWord(Number - 1);
|
||||
ListFormatter::ListEntry entry;
|
||||
entry["Number"] = stringify(Number);
|
||||
entry["Word"] = bw->word;
|
||||
entry["Type"] = bw->type == BW_SINGLE ? "(SINGLE)" : (bw->type == BW_START ? "(START)" : (bw->type == BW_END ? "(END)" : ""));
|
||||
entry["Word"] = b->word;
|
||||
entry["Type"] = b->type == BW_SINGLE ? "(SINGLE)" : (b->type == BW_START ? "(START)" : (b->type == BW_END ? "(END)" : ""));
|
||||
this->list.AddEntry(entry);
|
||||
}
|
||||
}
|
||||
nl_list(list, ci, word);
|
||||
nl_list(list, bw, word);
|
||||
nl_list.Process();
|
||||
}
|
||||
else
|
||||
{
|
||||
for (unsigned i = 0, end = ci->GetBadWordCount(); i < end; ++i)
|
||||
for (unsigned i = 0, end = bw->GetBadWordCount(); i < end; ++i)
|
||||
{
|
||||
const BadWord *bw = ci->GetBadWord(i);
|
||||
const BadWord *b = bw->GetBadWord(i);
|
||||
|
||||
if (!word.empty() && !Anope::Match(bw->word, word))
|
||||
if (!word.empty() && !Anope::Match(b->word, word))
|
||||
continue;
|
||||
|
||||
ListFormatter::ListEntry entry;
|
||||
entry["Number"] = stringify(i + 1);
|
||||
entry["Word"] = bw->word;
|
||||
entry["Type"] = bw->type == BW_SINGLE ? "(SINGLE)" : (bw->type == BW_START ? "(START)" : (bw->type == BW_END ? "(END)" : ""));
|
||||
entry["Word"] = b->word;
|
||||
entry["Type"] = b->type == BW_SINGLE ? "(SINGLE)" : (b->type == BW_START ? "(START)" : (b->type == BW_END ? "(END)" : ""));
|
||||
list.AddEntry(entry);
|
||||
}
|
||||
}
|
||||
@@ -130,6 +262,7 @@ class CommandBSBadwords : public Command
|
||||
size_t pos = word.rfind(' ');
|
||||
BadWordType bwtype = BW_ANY;
|
||||
Anope::string realword = word;
|
||||
BadWords *badwords = ci->Require<BadWords>("badwords");
|
||||
|
||||
if (pos != Anope::string::npos)
|
||||
{
|
||||
@@ -146,17 +279,20 @@ class CommandBSBadwords : public Command
|
||||
realword = word.substr(0, pos);
|
||||
}
|
||||
|
||||
if (ci->GetBadWordCount() >= Config->BSBadWordsMax)
|
||||
unsigned badwordsmax = Config->GetModule(this->module)->Get<unsigned>("badwordsmax");
|
||||
if (badwords->GetBadWordCount() >= badwordsmax)
|
||||
{
|
||||
source.Reply(_("Sorry, you can only have %d bad words entries on a channel."), Config->BSBadWordsMax);
|
||||
source.Reply(_("Sorry, you can only have %d bad words entries on a channel."), badwordsmax);
|
||||
return;
|
||||
}
|
||||
|
||||
for (unsigned i = 0, end = ci->GetBadWordCount(); i < end; ++i)
|
||||
{
|
||||
const BadWord *bw = ci->GetBadWord(i);
|
||||
bool casesensitive = Config->GetModule("botserv")->Get<bool>("casesensitive");
|
||||
|
||||
if (!bw->word.empty() && ((Config->BSCaseSensitive && realword.equals_cs(bw->word)) || (!Config->BSCaseSensitive && realword.equals_ci(bw->word))))
|
||||
for (unsigned i = 0, end = badwords->GetBadWordCount(); i < end; ++i)
|
||||
{
|
||||
const BadWord *bw = badwords->GetBadWord(i);
|
||||
|
||||
if ((casesensitive && realword.equals_cs(bw->word)) || (!casesensitive && realword.equals_ci(bw->word)))
|
||||
{
|
||||
source.Reply(_("\002%s\002 already exists in %s bad words list."), bw->word.c_str(), ci->name.c_str());
|
||||
return;
|
||||
@@ -165,15 +301,21 @@ class CommandBSBadwords : public Command
|
||||
|
||||
bool override = !source.AccessFor(ci).HasPriv("BADWORDS");
|
||||
Log(override ? LOG_OVERRIDE : LOG_COMMAND, source, this, ci) << "ADD " << realword;
|
||||
ci->AddBadWord(realword, bwtype);
|
||||
badwords->AddBadWord(realword, bwtype);
|
||||
|
||||
source.Reply(_("\002%s\002 added to %s bad words list."), realword.c_str(), ci->name.c_str());
|
||||
|
||||
return;
|
||||
}
|
||||
|
||||
void DoDelete(CommandSource &source, ChannelInfo *ci, const Anope::string &word)
|
||||
{
|
||||
BadWords *badwords = ci->GetExt<BadWords>("badwords");
|
||||
|
||||
if (!badwords || !badwords->GetBadWordCount())
|
||||
{
|
||||
source.Reply(_("%s bad words list is empty."), ci->name.c_str());
|
||||
return;
|
||||
}
|
||||
|
||||
/* Special case: is it a number/list? Only do search if it isn't. */
|
||||
if (!word.empty() && isdigit(word[0]) && word.find_first_not_of("1234567890,-") == Anope::string::npos)
|
||||
{
|
||||
@@ -185,9 +327,9 @@ class CommandBSBadwords : public Command
|
||||
unsigned i, end;
|
||||
const BadWord *badword;
|
||||
|
||||
for (i = 0, end = ci->GetBadWordCount(); i < end; ++i)
|
||||
for (i = 0, end = badwords->GetBadWordCount(); i < end; ++i)
|
||||
{
|
||||
badword = ci->GetBadWord(i);
|
||||
badword = badwords->GetBadWord(i);
|
||||
|
||||
if (word.equals_ci(badword->word))
|
||||
break;
|
||||
@@ -204,10 +346,10 @@ class CommandBSBadwords : public Command
|
||||
|
||||
source.Reply(_("\002%s\002 deleted from %s bad words list."), badword->word.c_str(), ci->name.c_str());
|
||||
|
||||
ci->EraseBadWord(i);
|
||||
badwords->EraseBadWord(i);
|
||||
}
|
||||
|
||||
return;
|
||||
badwords->Check();
|
||||
}
|
||||
|
||||
void DoClear(CommandSource &source, ChannelInfo *ci)
|
||||
@@ -215,10 +357,12 @@ class CommandBSBadwords : public Command
|
||||
bool override = !source.AccessFor(ci).HasPriv("BADWORDS");
|
||||
Log(override ? LOG_OVERRIDE : LOG_COMMAND, source, this, ci) << "CLEAR";
|
||||
|
||||
ci->ClearBadWords();
|
||||
BadWords *badwords = ci->GetExt<BadWords>("badwords");
|
||||
if (badwords)
|
||||
badwords->ClearBadWords();
|
||||
source.Reply(_("Bad words list is now empty."));
|
||||
return;
|
||||
}
|
||||
|
||||
public:
|
||||
CommandBSBadwords(Module *creator) : Command(creator, "botserv/badwords", 2, 3)
|
||||
{
|
||||
@@ -289,7 +433,7 @@ class CommandBSBadwords : public Command
|
||||
"will be done if a user says a word that ends with\n"
|
||||
"\037word\037. If you don't specify anything, a kick will\n"
|
||||
"be issued every time \037word\037 is said by a user.\n"
|
||||
" \n"), Config->UseStrictPrivMsgString.c_str(), source.service->nick.c_str(), source.command.c_str());
|
||||
" \n"), Config->StrictPrivmsg.c_str(), source.service->nick.c_str(), source.command.c_str());
|
||||
source.Reply(_("The \002DEL\002 command removes the given word from the\n"
|
||||
"bad words list. If a list of entry numbers is given, those\n"
|
||||
"entries are deleted. (See the example for LIST below.)\n"
|
||||
@@ -311,13 +455,13 @@ class CommandBSBadwords : public Command
|
||||
class BSBadwords : public Module
|
||||
{
|
||||
CommandBSBadwords commandbsbadwords;
|
||||
ExtensibleItem<BadWordsImpl> badwords;
|
||||
Serialize::Type badword_type;
|
||||
|
||||
public:
|
||||
BSBadwords(const Anope::string &modname, const Anope::string &creator) : Module(modname, creator, CORE),
|
||||
commandbsbadwords(this)
|
||||
BSBadwords(const Anope::string &modname, const Anope::string &creator) : Module(modname, creator, VENDOR),
|
||||
commandbsbadwords(this), badwords(this, "badwords"), badword_type("BadWord", BadWordImpl::Unserialize)
|
||||
{
|
||||
this->SetAuthor("Anope");
|
||||
|
||||
}
|
||||
};
|
||||
|
||||
|
||||
+34
-23
@@ -9,8 +9,6 @@
|
||||
* Based on the original code of Services by Andy Church.
|
||||
*/
|
||||
|
||||
/*************************************************************************/
|
||||
|
||||
#include "module.h"
|
||||
|
||||
class CommandBSBot : public Command
|
||||
@@ -29,21 +27,23 @@ class CommandBSBot : public Command
|
||||
return;
|
||||
}
|
||||
|
||||
if (nick.length() > Config->NickLen)
|
||||
Configuration::Block *networkinfo = Config->GetBlock("networkinfo");
|
||||
|
||||
if (nick.length() > networkinfo->Get<unsigned>("nicklen"))
|
||||
{
|
||||
source.Reply(_("Bot nicks may only be %d characters long."), Config->NickLen);
|
||||
source.Reply(_("Bot nicks may only be %d characters long."), networkinfo->Get<unsigned>("nicklen"));
|
||||
return;
|
||||
}
|
||||
|
||||
if (user.length() > Config->UserLen)
|
||||
if (user.length() > networkinfo->Get<unsigned>("userlen"))
|
||||
{
|
||||
source.Reply(_("Bot idents may only be %d characters long."), Config->UserLen);
|
||||
source.Reply(_("Bot idents may only be %d characters long."), networkinfo->Get<unsigned>("userlen"));
|
||||
return;
|
||||
}
|
||||
|
||||
if (host.length() > Config->HostLen)
|
||||
if (host.length() > networkinfo->Get<unsigned>("hostlen"))
|
||||
{
|
||||
source.Reply(_("Bot hosts may only be %d characters long."), Config->HostLen);
|
||||
source.Reply(_("Bot hosts may only be %d characters long."), networkinfo->Get<unsigned>("hostlen"));
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -81,7 +81,7 @@ class CommandBSBot : public Command
|
||||
|
||||
source.Reply(_("%s!%s@%s (%s) added to the bot list."), bi->nick.c_str(), bi->GetIdent().c_str(), bi->host.c_str(), bi->realname.c_str());
|
||||
|
||||
FOREACH_MOD(I_OnBotCreate, OnBotCreate(bi));
|
||||
FOREACH_MOD(OnBotCreate, (bi));
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -112,21 +112,23 @@ class CommandBSBot : public Command
|
||||
return;
|
||||
}
|
||||
|
||||
if (nick.length() > Config->NickLen)
|
||||
Configuration::Block *networkinfo = Config->GetBlock("networkinfo");
|
||||
|
||||
if (nick.length() > networkinfo->Get<unsigned>("nicklen"))
|
||||
{
|
||||
source.Reply(_("Bot nicks may only be %d characters long."), Config->NickLen);
|
||||
source.Reply(_("Bot nicks may only be %d characters long."), networkinfo->Get<unsigned>("nicklen"));
|
||||
return;
|
||||
}
|
||||
|
||||
if (!user.empty() && user.length() > Config->UserLen)
|
||||
if (user.length() > networkinfo->Get<unsigned>("userlen"))
|
||||
{
|
||||
source.Reply(_("Bot idents may only be %d characters long."), Config->UserLen);
|
||||
source.Reply(_("Bot idents may only be %d characters long."), networkinfo->Get<unsigned>("userlen"));
|
||||
return;
|
||||
}
|
||||
|
||||
if (!host.empty() && host.length() > Config->HostLen)
|
||||
if (host.length() > networkinfo->Get<unsigned>("hostlen"))
|
||||
{
|
||||
source.Reply(_("Bot hosts may only be %d characters long."), Config->HostLen);
|
||||
source.Reply(_("Bot hosts may only be %d characters long."), networkinfo->Get<unsigned>("hostlen"));
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -204,13 +206,21 @@ class CommandBSBot : public Command
|
||||
if (!user.empty())
|
||||
{
|
||||
IRCD->SendClientIntroduction(bi);
|
||||
bi->RejoinAll();
|
||||
unsigned minusers = Config->GetBlock("botserv")->Get<unsigned>("minusers");
|
||||
const std::set<ChannelInfo *> &channels = bi->GetChannels();
|
||||
for (std::set<ChannelInfo *>::const_iterator it = channels.begin(), it_end = channels.end(); it != it_end; ++it)
|
||||
{
|
||||
const ChannelInfo *ci = *it;
|
||||
|
||||
if (ci->c && ci->c->users.size() >= minusers)
|
||||
bi->Join(ci->c);
|
||||
}
|
||||
}
|
||||
|
||||
source.Reply(_("Bot \002%s\002 has been changed to %s!%s@%s (%s)."), oldnick.c_str(), bi->nick.c_str(), bi->GetIdent().c_str(), bi->host.c_str(), bi->realname.c_str());
|
||||
Log(LOG_ADMIN, source, this) << "CHANGE " << oldnick << " to " << bi->GetMask() << " " << bi->realname;
|
||||
|
||||
FOREACH_MOD(I_OnBotChange, OnBotChange(bi));
|
||||
FOREACH_MOD(OnBotChange, (bi));
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -237,7 +247,7 @@ class CommandBSBot : public Command
|
||||
return;
|
||||
}
|
||||
|
||||
FOREACH_MOD(I_OnBotDelete, OnBotDelete(bi));
|
||||
FOREACH_MOD(OnBotDelete, (bi));
|
||||
|
||||
Log(LOG_ADMIN, source, this) << "DEL " << bi->nick;
|
||||
|
||||
@@ -338,9 +348,11 @@ class CommandBSBot : public Command
|
||||
"\002BOT ADD\002 adds a bot with the given nickname, username,\n"
|
||||
"hostname and realname. Since no integrity checks are done\n"
|
||||
"for these settings, be really careful.\n"
|
||||
"\002BOT CHANGE\002 allows to change nickname, username, hostname\n"
|
||||
"or realname of a bot without actually delete it (and all\n"
|
||||
"the data associated with it).\n"
|
||||
" \n"
|
||||
"\002BOT CHANGE\002 allows to change the nickname, username, hostname\n"
|
||||
"or realname of a bot without actually having to delete it (and\n"
|
||||
"all the data associated with it).\n"
|
||||
" \n"
|
||||
"\002BOT DEL\002 removes the given bot from the bot list.\n"
|
||||
" \n"
|
||||
"\002Note\002: you cannot create a bot that has a nick that is\n"
|
||||
@@ -355,10 +367,9 @@ class BSBot : public Module
|
||||
CommandBSBot commandbsbot;
|
||||
|
||||
public:
|
||||
BSBot(const Anope::string &modname, const Anope::string &creator) : Module(modname, creator, CORE),
|
||||
BSBot(const Anope::string &modname, const Anope::string &creator) : Module(modname, creator, VENDOR),
|
||||
commandbsbot(this)
|
||||
{
|
||||
this->SetAuthor("Anope");
|
||||
|
||||
}
|
||||
};
|
||||
|
||||
@@ -9,8 +9,6 @@
|
||||
* Based on the original code of Services by Andy Church.
|
||||
*/
|
||||
|
||||
/*************************************************************************/
|
||||
|
||||
#include "module.h"
|
||||
|
||||
class CommandBSBotList : public Command
|
||||
@@ -19,15 +17,14 @@ class CommandBSBotList : public Command
|
||||
CommandBSBotList(Module *creator) : Command(creator, "botserv/botlist", 0, 0)
|
||||
{
|
||||
this->SetDesc(_("Lists available bots"));
|
||||
this->SetSyntax("");
|
||||
}
|
||||
|
||||
void Execute(CommandSource &source, const std::vector<Anope::string> ¶ms) anope_override
|
||||
{
|
||||
unsigned count = 0;
|
||||
ListFormatter list;
|
||||
ListFormatter list(source.GetAccount());
|
||||
|
||||
list.AddColumn("Nick").AddColumn("Mask");
|
||||
list.AddColumn(_("Nick")).AddColumn(_("Mask"));
|
||||
|
||||
for (botinfo_map::const_iterator it = BotListByNick->begin(), it_end = BotListByNick->end(); it != it_end; ++it)
|
||||
{
|
||||
@@ -75,10 +72,9 @@ class BSBotList : public Module
|
||||
CommandBSBotList commandbsbotlist;
|
||||
|
||||
public:
|
||||
BSBotList(const Anope::string &modname, const Anope::string &creator) : Module(modname, creator, CORE),
|
||||
BSBotList(const Anope::string &modname, const Anope::string &creator) : Module(modname, creator, VENDOR),
|
||||
commandbsbotlist(this)
|
||||
{
|
||||
this->SetAuthor("Anope");
|
||||
|
||||
}
|
||||
};
|
||||
|
||||
@@ -9,8 +9,6 @@
|
||||
* Based on the original code of Services by Andy Church.
|
||||
*/
|
||||
|
||||
/*************************************************************************/
|
||||
|
||||
#include "module.h"
|
||||
|
||||
class CommandBSSay : public Command
|
||||
@@ -33,7 +31,7 @@ class CommandBSSay : public Command
|
||||
return;
|
||||
}
|
||||
|
||||
if (!source.AccessFor(ci).HasPriv("SAY"))
|
||||
if (!source.AccessFor(ci).HasPriv("SAY") && !source.HasPriv("botserv/administration"))
|
||||
{
|
||||
source.Reply(ACCESS_DENIED);
|
||||
return;
|
||||
@@ -57,13 +55,11 @@ class CommandBSSay : public Command
|
||||
return;
|
||||
}
|
||||
|
||||
IRCD->SendPrivmsg(ci->bi, ci->name, "%s", text.c_str());
|
||||
IRCD->SendPrivmsg(*ci->bi, ci->name, "%s", text.c_str());
|
||||
ci->bi->lastmsg = Anope::CurTime;
|
||||
|
||||
// XXX need a way to find if someone is overriding this
|
||||
Log(LOG_COMMAND, source, this, ci) << text;
|
||||
|
||||
return;
|
||||
bool override = !source.AccessFor(ci).HasPriv("SAY");
|
||||
Log(override ? LOG_OVERRIDE : LOG_COMMAND, source, this, ci) << "to say: " << text;
|
||||
}
|
||||
|
||||
bool OnHelp(CommandSource &source, const Anope::string &subcommand) anope_override
|
||||
@@ -95,7 +91,7 @@ class CommandBSAct : public Command
|
||||
return;
|
||||
}
|
||||
|
||||
if (!source.AccessFor(ci).HasPriv("SAY"))
|
||||
if (!source.AccessFor(ci).HasPriv("SAY") && !source.HasPriv("botserv/administration"))
|
||||
{
|
||||
source.Reply(ACCESS_DENIED);
|
||||
return;
|
||||
@@ -113,17 +109,15 @@ class CommandBSAct : public Command
|
||||
return;
|
||||
}
|
||||
|
||||
size_t i = 0;
|
||||
while ((i = message.find(1)) && i != Anope::string::npos)
|
||||
message.erase(i, 1);
|
||||
message = message.replace_all_cs("\1", "");
|
||||
if (message.empty())
|
||||
return;
|
||||
|
||||
IRCD->SendAction(ci->bi, ci->name, "%s", message.c_str());
|
||||
IRCD->SendAction(*ci->bi, ci->name, "%s", message.c_str());
|
||||
ci->bi->lastmsg = Anope::CurTime;
|
||||
|
||||
// XXX Need to be able to find if someone is overriding this.
|
||||
Log(LOG_COMMAND, source, this, ci) << message;
|
||||
|
||||
return;
|
||||
bool override = !source.AccessFor(ci).HasPriv("SAY");
|
||||
Log(override ? LOG_OVERRIDE : LOG_COMMAND, source, this, ci) << "to say: " << message;
|
||||
}
|
||||
|
||||
bool OnHelp(CommandSource &source, const Anope::string &subcommand) anope_override
|
||||
@@ -142,10 +136,9 @@ class BSControl : public Module
|
||||
CommandBSAct commandbsact;
|
||||
|
||||
public:
|
||||
BSControl(const Anope::string &modname, const Anope::string &creator) : Module(modname, creator, CORE),
|
||||
BSControl(const Anope::string &modname, const Anope::string &creator) : Module(modname, creator, VENDOR),
|
||||
commandbssay(this), commandbsact(this)
|
||||
{
|
||||
this->SetAuthor("Anope");
|
||||
|
||||
}
|
||||
};
|
||||
|
||||
+15
-129
@@ -10,8 +10,6 @@
|
||||
*
|
||||
*
|
||||
*/
|
||||
/*************************************************************************/
|
||||
|
||||
#include "module.h"
|
||||
|
||||
class CommandBSInfo : public Command
|
||||
@@ -38,29 +36,18 @@ class CommandBSInfo : public Command
|
||||
buffers.push_back(buf);
|
||||
}
|
||||
|
||||
void CheckOptStr(Anope::string &buf, const Anope::string &flag, const char *option, Extensible *flags, const NickCore *nc)
|
||||
{
|
||||
if (flags->HasExt(flag))
|
||||
{
|
||||
if (!buf.empty())
|
||||
buf += ", ";
|
||||
buf += Language::Translate(nc, option);
|
||||
}
|
||||
}
|
||||
|
||||
public:
|
||||
CommandBSInfo(Module *creator) : Command(creator, "botserv/info", 1, 1)
|
||||
{
|
||||
this->SetDesc(_("Allows you to see BotServ information about a channel or a bot"));
|
||||
this->SetSyntax(_("{\037chan\037|\037nick\037}"));
|
||||
this->SetSyntax(_("{\037channel\037 | \037nickname\037}"));
|
||||
}
|
||||
|
||||
void Execute(CommandSource &source, const std::vector<Anope::string> ¶ms) anope_override
|
||||
{
|
||||
const Anope::string &query = params[0];
|
||||
|
||||
const BotInfo *bi = BotInfo::Find(query, true);
|
||||
ChannelInfo *ci;
|
||||
BotInfo *bi = BotInfo::Find(query, true);
|
||||
ChannelInfo *ci = ChannelInfo::Find(query);
|
||||
InfoFormatter info(source.nc);
|
||||
|
||||
if (bi)
|
||||
@@ -68,10 +55,12 @@ class CommandBSInfo : public Command
|
||||
source.Reply(_("Information for bot \002%s\002:"), bi->nick.c_str());
|
||||
info[_("Mask")] = bi->GetIdent() + "@" + bi->host;
|
||||
info[_("Real name")] = bi->realname;
|
||||
info[_("Created")] = Anope::strftime(bi->created);
|
||||
info[_("Created")] = Anope::strftime(bi->created, source.GetAccount());
|
||||
info[_("Options")] = bi->oper_only ? _("Private") : _("None");
|
||||
info[_("Used on")] = stringify(bi->GetChannelCount()) + " channel(s)";
|
||||
|
||||
FOREACH_MOD(OnBotInfo, (source, bi, ci, info));
|
||||
|
||||
std::vector<Anope::string> replies;
|
||||
info.Process(replies);
|
||||
|
||||
@@ -87,7 +76,7 @@ class CommandBSInfo : public Command
|
||||
}
|
||||
|
||||
}
|
||||
else if ((ci = ChannelInfo::Find(query)))
|
||||
else if (ci)
|
||||
{
|
||||
if (!source.AccessFor(ci).HasPriv("INFO") && !source.HasPriv("botserv/administration"))
|
||||
{
|
||||
@@ -96,119 +85,12 @@ class CommandBSInfo : public Command
|
||||
}
|
||||
|
||||
source.Reply(CHAN_INFO_HEADER, ci->name.c_str());
|
||||
info[_("Bot nick")] = ci->bi ? ci->bi->nick : "not assigned yet";
|
||||
info[_("Bot nick")] = ci->bi ? ci->bi->nick : _("not assigned yet");
|
||||
|
||||
Anope::string enabled = Language::Translate(source.nc, _("Enabled"));
|
||||
Anope::string disabled = Language::Translate(source.nc, _("Disabled"));
|
||||
|
||||
if (ci->HasExt("BS_KICK_BADWORDS"))
|
||||
{
|
||||
if (ci->ttb[TTB_BADWORDS])
|
||||
info[_("Bad words kicker")] = Anope::printf("%s (%d kick(s) to ban)", enabled.c_str(), ci->ttb[TTB_BADWORDS]);
|
||||
else
|
||||
info[_("Bad words kicker")] = enabled;
|
||||
}
|
||||
else
|
||||
info[_("Bad words kicker")] = disabled;
|
||||
|
||||
if (ci->HasExt("BS_KICK_BOLDS"))
|
||||
{
|
||||
if (ci->ttb[TTB_BOLDS])
|
||||
info[_("Bolds kicker")] = Anope::printf("%s (%d kick(s) to ban)", enabled.c_str(), ci->ttb[TTB_BOLDS]);
|
||||
else
|
||||
info[_("Bolds kicker")] = enabled;
|
||||
}
|
||||
else
|
||||
info[_("Bolds kicker")] = disabled;
|
||||
|
||||
if (ci->HasExt("BS_KICK_CAPS"))
|
||||
{
|
||||
if (ci->ttb[TTB_CAPS])
|
||||
info[_("Caps kicker")] = Anope::printf(_("%s (%d kick(s) to ban; minimum %d/%d%%"), enabled.c_str(), ci->ttb[TTB_CAPS], ci->capsmin, ci->capspercent);
|
||||
else
|
||||
info[_("Caps kicker")] = Anope::printf(_("%s (minimum %d/%d%%)"), enabled.c_str(), ci->capsmin, ci->capspercent);
|
||||
}
|
||||
else
|
||||
info[_("Caps kicker")] = disabled;
|
||||
|
||||
if (ci->HasExt("BS_KICK_COLORS"))
|
||||
{
|
||||
if (ci->ttb[TTB_COLORS])
|
||||
info[_("Colors kicker")] = Anope::printf(_("%s (%d kick(s) to ban)"), enabled.c_str(), ci->ttb[TTB_COLORS]);
|
||||
else
|
||||
info[_("Colors kicker")] = enabled;
|
||||
}
|
||||
else
|
||||
info[_("Colors kicker")] = disabled;
|
||||
|
||||
if (ci->HasExt("BS_KICK_FLOOD"))
|
||||
{
|
||||
if (ci->ttb[TTB_FLOOD])
|
||||
info[_("Flood kicker")] = Anope::printf(_("%s (%d kick(s) to ban; %d lines in %ds"), enabled.c_str(), ci->ttb[TTB_FLOOD], ci->floodlines, ci->floodsecs);
|
||||
else
|
||||
info[_("Flood kicker")] = Anope::printf(_("%s (%d lines in %ds)"), enabled.c_str(), ci->floodlines, ci->floodsecs);
|
||||
}
|
||||
else
|
||||
info[_("Flood kicker")] = disabled;
|
||||
|
||||
if (ci->HasExt("BS_KICK_REPEAT"))
|
||||
{
|
||||
if (ci->ttb[TTB_REPEAT])
|
||||
info[_("Repeat kicker")] = Anope::printf(_("%s (%d kick(s) to ban; %d times)"), enabled.c_str(), ci->ttb[TTB_REPEAT], ci->repeattimes);
|
||||
else
|
||||
info[_("Repeat kicker")] = Anope::printf(_("%s (%d times)"), enabled.c_str(), ci->repeattimes);
|
||||
}
|
||||
else
|
||||
info[_("Repeat kicker")] = disabled;
|
||||
|
||||
if (ci->HasExt("BS_KICK_REVERSES"))
|
||||
{
|
||||
if (ci->ttb[TTB_REVERSES])
|
||||
info[_("Reverses kicker")] = Anope::printf(_("%s (%d kick(s) to ban)"), enabled.c_str(), ci->ttb[TTB_REVERSES]);
|
||||
else
|
||||
info[_("Reverses kicker")] = enabled;
|
||||
}
|
||||
else
|
||||
info[_("Reverses kicker")] = disabled;
|
||||
|
||||
if (ci->HasExt("BS_KICK_UNDERLINES"))
|
||||
{
|
||||
if (ci->ttb[TTB_UNDERLINES])
|
||||
info[_("Underlines kicker")] = Anope::printf(_("%s (%d kick(s) to ban)"), enabled.c_str(), ci->ttb[TTB_UNDERLINES]);
|
||||
else
|
||||
info[_("Underlines kicker")] = enabled;
|
||||
}
|
||||
else
|
||||
info[_("Underlines kicker")] = disabled;
|
||||
|
||||
if (ci->HasExt("BS_KICK_ITALICS"))
|
||||
{
|
||||
if (ci->ttb[TTB_ITALICS])
|
||||
info[_("Italics kicker")] = Anope::printf(_("%s (%d kick(s) to ban)"), enabled.c_str(), ci->ttb[TTB_ITALICS]);
|
||||
else
|
||||
info[_("Italics kicker")] = enabled;
|
||||
}
|
||||
else
|
||||
info[_("Italics kicker")] = disabled;
|
||||
|
||||
if (ci->HasExt("BS_KICK_AMSGS"))
|
||||
{
|
||||
if (ci->ttb[TTB_AMSGS])
|
||||
info[_("AMSG kicker")] = Anope::printf(_("%s (%d kick(s) to ban)"), enabled.c_str(), ci->ttb[TTB_AMSGS]);
|
||||
else
|
||||
info[_("AMSG kicker")] = enabled;
|
||||
}
|
||||
else
|
||||
info[_("AMSG kicker")] = disabled;
|
||||
|
||||
Anope::string flags;
|
||||
CheckOptStr(flags, "BS_DONTKICKOPS", _("Ops protection"), ci, source.nc);
|
||||
CheckOptStr(flags, "BS_DONTKICKVOICES", _("Voices protection"), ci, source.nc);
|
||||
CheckOptStr(flags, "BS_FANTASY", _("Fantasy"), ci, source.nc);
|
||||
CheckOptStr(flags, "BS_GREET", _("Greet"), ci, source.nc);
|
||||
CheckOptStr(flags, "BS_NOBOT", _("No bot"), ci, source.nc);
|
||||
|
||||
info[_("Options")] = flags.empty() ? _("None") : flags;
|
||||
FOREACH_MOD(OnBotInfo, (source, bi, ci, info));
|
||||
|
||||
std::vector<Anope::string> replies;
|
||||
info.Process(replies);
|
||||
@@ -231,6 +113,11 @@ class CommandBSInfo : public Command
|
||||
"time or number of channels it is on."), source.service->nick.c_str());
|
||||
return true;
|
||||
}
|
||||
|
||||
const Anope::string GetDesc(CommandSource &source) const anope_override
|
||||
{
|
||||
return Anope::printf(Language::Translate(source.GetAccount(), _("Allows you to see %s information about a channel or a bot")), source.service->nick.c_str());
|
||||
}
|
||||
};
|
||||
|
||||
class BSInfo : public Module
|
||||
@@ -238,10 +125,9 @@ class BSInfo : public Module
|
||||
CommandBSInfo commandbsinfo;
|
||||
|
||||
public:
|
||||
BSInfo(const Anope::string &modname, const Anope::string &creator) : Module(modname, creator, CORE),
|
||||
BSInfo(const Anope::string &modname, const Anope::string &creator) : Module(modname, creator, VENDOR),
|
||||
commandbsinfo(this)
|
||||
{
|
||||
this->SetAuthor("Anope");
|
||||
|
||||
}
|
||||
};
|
||||
|
||||
+1031
-615
File diff suppressed because it is too large
Load Diff
+68
-284
@@ -47,28 +47,47 @@ class CommandBSSet : public Command
|
||||
}
|
||||
}
|
||||
}
|
||||
source.Reply(_("Type \002%s%s HELP SET \037option\037\002 for more information on a\n"
|
||||
"particular option."), Config->UseStrictPrivMsgString.c_str(), source.service->nick.c_str());
|
||||
source.Reply(_("Type \002%s%s HELP %s \037option\037\002 for more information on a\n"
|
||||
"particular option."), Config->StrictPrivmsg.c_str(), source.service->nick.c_str(), this_name.c_str());
|
||||
|
||||
return true;
|
||||
}
|
||||
};
|
||||
|
||||
class CommandBSSetDontKickOps : public Command
|
||||
class CommandBSSetBanExpire : public Command
|
||||
{
|
||||
public:
|
||||
CommandBSSetDontKickOps(Module *creator, const Anope::string &sname = "botserv/set/dontkickops") : Command(creator, sname, 2, 2)
|
||||
class UnbanTimer : public Timer
|
||||
{
|
||||
this->SetDesc(_("To protect ops against bot kicks"));
|
||||
this->SetSyntax(_("\037channel\037 {ON | OFF}"));
|
||||
Anope::string chname;
|
||||
Anope::string mask;
|
||||
|
||||
public:
|
||||
UnbanTimer(Module *creator, const Anope::string &ch, const Anope::string &bmask, time_t t) : Timer(creator, t), chname(ch), mask(bmask) { }
|
||||
|
||||
void Tick(time_t) anope_override
|
||||
{
|
||||
Channel *c = Channel::Find(chname);
|
||||
if (c)
|
||||
c->RemoveMode(NULL, "BAN", mask);
|
||||
}
|
||||
};
|
||||
|
||||
CommandBSSetBanExpire(Module *creator, const Anope::string &sname = "botserv/set/banexpire") : Command(creator, sname, 2, 2)
|
||||
{
|
||||
this->SetDesc(_("Configures the time bot bans expire in"));
|
||||
this->SetSyntax(_("\037channel\037 \037time\037"));
|
||||
}
|
||||
|
||||
void Execute(CommandSource &source, const std::vector<Anope::string> ¶ms) anope_override
|
||||
{
|
||||
ChannelInfo *ci = ChannelInfo::Find(params[0]);
|
||||
const Anope::string &chan = params[0];
|
||||
const Anope::string &arg = params[1];
|
||||
|
||||
ChannelInfo *ci = ChannelInfo::Find(chan);
|
||||
if (ci == NULL)
|
||||
{
|
||||
source.Reply(CHAN_X_NOT_REGISTERED, params[0].c_str());
|
||||
source.Reply(CHAN_X_NOT_REGISTERED, chan.c_str());
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -85,283 +104,39 @@ class CommandBSSetDontKickOps : public Command
|
||||
return;
|
||||
}
|
||||
|
||||
if (params[1].equals_ci("ON"))
|
||||
time_t t = Anope::DoTime(arg);
|
||||
if (t == -1)
|
||||
{
|
||||
bool override = !access.HasPriv("SET");
|
||||
Log(override ? LOG_OVERRIDE : LOG_COMMAND, source, this, ci) << "to enable dontkickops";
|
||||
|
||||
ci->ExtendMetadata("BS_DONTKICKOPS");
|
||||
source.Reply(_("Bot \002won't kick ops\002 on channel %s."), ci->name.c_str());
|
||||
source.Reply(BAD_EXPIRY_TIME);
|
||||
return;
|
||||
}
|
||||
else if (params[1].equals_ci("OFF"))
|
||||
|
||||
/* cap at 1 day */
|
||||
if (t > 86400)
|
||||
{
|
||||
bool override = !access.HasPriv("SET");
|
||||
Log(override ? LOG_OVERRIDE : LOG_COMMAND, source, this, ci) << "to disable dontkickops";
|
||||
|
||||
ci->Shrink("BS_DONTKICKOPS");
|
||||
source.Reply(_("Bot \002will kick ops\002 on channel %s."), ci->name.c_str());
|
||||
source.Reply(_("Ban expiry may not be longer than 1 day."));
|
||||
return;
|
||||
}
|
||||
|
||||
ci->banexpire = t;
|
||||
|
||||
bool override = !access.HasPriv("SET");
|
||||
Log(override ? LOG_OVERRIDE : LOG_COMMAND, source, this, ci) << "to change banexpire to " << ci->banexpire;
|
||||
|
||||
if (!ci->banexpire)
|
||||
source.Reply(_("Bot bans will no longer automatically expire."));
|
||||
else
|
||||
this->OnSyntaxError(source, source.command);
|
||||
source.Reply(_("Bot bans will automatically expire after %s."), Anope::Duration(ci->banexpire, source.GetAccount()).c_str());
|
||||
}
|
||||
|
||||
bool OnHelp(CommandSource &source, const Anope::string &) anope_override
|
||||
{
|
||||
this->SendSyntax(source);
|
||||
source.Reply(_(" \n"
|
||||
"Enables or disables \002ops protection\002 mode on a channel.\n"
|
||||
"When it is enabled, ops won't be kicked by the bot\n"
|
||||
"even if they don't match the NOKICK level."));
|
||||
return true;
|
||||
}
|
||||
};
|
||||
|
||||
class CommandBSSetDontKickVoices : public Command
|
||||
{
|
||||
public:
|
||||
CommandBSSetDontKickVoices(Module *creator, const Anope::string &sname = "botserv/set/dontkickvoices") : Command(creator, sname, 2, 2)
|
||||
{
|
||||
this->SetDesc(_("To protect voices against bot kicks"));
|
||||
this->SetSyntax(_("\037channel\037 {ON | OFF}"));
|
||||
}
|
||||
|
||||
void Execute(CommandSource &source, const std::vector<Anope::string> ¶ms) anope_override
|
||||
{
|
||||
ChannelInfo *ci = ChannelInfo::Find(params[0]);
|
||||
if (ci == NULL)
|
||||
{
|
||||
source.Reply(CHAN_X_NOT_REGISTERED, params[0].c_str());
|
||||
return;
|
||||
}
|
||||
|
||||
AccessGroup access = source.AccessFor(ci);
|
||||
if (!source.HasPriv("botserv/administration") && !access.HasPriv("SET"))
|
||||
{
|
||||
source.Reply(ACCESS_DENIED);
|
||||
return;
|
||||
}
|
||||
|
||||
if (Anope::ReadOnly)
|
||||
{
|
||||
source.Reply(_("Sorry, bot option setting is temporarily disabled."));
|
||||
return;
|
||||
}
|
||||
|
||||
if (params[1].equals_ci("ON"))
|
||||
{
|
||||
bool override = !access.HasPriv("SET");
|
||||
Log(override ? LOG_OVERRIDE : LOG_COMMAND, source, this, ci) << "to enable dontkickvoices";
|
||||
|
||||
ci->ExtendMetadata("BS_DONTKICKVOICES");
|
||||
source.Reply(_("Bot \002won't kick voices\002 on channel %s."), ci->name.c_str());
|
||||
}
|
||||
else if (params[1].equals_ci("OFF"))
|
||||
{
|
||||
bool override = !access.HasPriv("SET");
|
||||
Log(override ? LOG_OVERRIDE : LOG_COMMAND, source, this, ci) << "to disable dontkickvoices";
|
||||
|
||||
ci->Shrink("BS_DONTKICKVOICES");
|
||||
source.Reply(_("Bot \002will kick voices\002 on channel %s."), ci->name.c_str());
|
||||
}
|
||||
else
|
||||
this->OnSyntaxError(source, source.command);
|
||||
}
|
||||
|
||||
bool OnHelp(CommandSource &source, const Anope::string &) anope_override
|
||||
{
|
||||
this->SendSyntax(source);
|
||||
source.Reply(_(" \n"
|
||||
"Enables or disables \002voices protection\002 mode on a channel.\n"
|
||||
"When it is enabled, voices won't be kicked by the bot\n"
|
||||
"even if they don't match the NOKICK level."));
|
||||
return true;
|
||||
}
|
||||
};
|
||||
|
||||
class CommandBSSetFantasy : public Command
|
||||
{
|
||||
public:
|
||||
CommandBSSetFantasy(Module *creator, const Anope::string &sname = "botserv/set/fantasy") : Command(creator, sname, 2, 2)
|
||||
{
|
||||
this->SetDesc(_("Enable fantaisist commands"));
|
||||
this->SetSyntax(_("\037channel\037 {\037ON|OFF\037}"));
|
||||
}
|
||||
|
||||
void Execute(CommandSource &source, const std::vector<Anope::string> ¶ms) anope_override
|
||||
{
|
||||
ChannelInfo *ci = ChannelInfo::Find(params[0]);
|
||||
const Anope::string &value = params[1];
|
||||
|
||||
if (ci == NULL)
|
||||
{
|
||||
source.Reply(CHAN_X_NOT_REGISTERED, params[0].c_str());
|
||||
return;
|
||||
}
|
||||
|
||||
if (!source.HasPriv("botserv/administration") && !source.AccessFor(ci).HasPriv("SET"))
|
||||
{
|
||||
source.Reply(ACCESS_DENIED);
|
||||
return;
|
||||
}
|
||||
|
||||
if (Anope::ReadOnly)
|
||||
{
|
||||
source.Reply(_("Sorry, bot option setting is temporarily disabled."));
|
||||
return;
|
||||
}
|
||||
|
||||
if (value.equals_ci("ON"))
|
||||
{
|
||||
bool override = !source.AccessFor(ci).HasPriv("SET");
|
||||
Log(override ? LOG_OVERRIDE : LOG_COMMAND, source, this, ci) << "to enable fantasy";
|
||||
|
||||
ci->ExtendMetadata("BS_FANTASY");
|
||||
source.Reply(_("Fantasy mode is now \002on\002 on channel %s."), ci->name.c_str());
|
||||
}
|
||||
else if (value.equals_ci("OFF"))
|
||||
{
|
||||
bool override = !source.AccessFor(ci).HasPriv("SET");
|
||||
Log(override ? LOG_OVERRIDE : LOG_COMMAND, source, this, ci) << "to disable fantasy";
|
||||
|
||||
ci->Shrink("BS_FANTASY");
|
||||
source.Reply(_("Fantasy mode is now \002off\002 on channel %s."), ci->name.c_str());
|
||||
}
|
||||
else
|
||||
this->OnSyntaxError(source, source.command);
|
||||
}
|
||||
|
||||
bool OnHelp(CommandSource &source, const Anope::string &) anope_override
|
||||
{
|
||||
this->SendSyntax(source);
|
||||
source.Reply(_(" \n"
|
||||
"Enables or disables \002fantasy\002 mode on a channel.\n"
|
||||
"When it is enabled, users will be able to use\n"
|
||||
"%s commands on a channel when prefixed\n"
|
||||
"with one of the following fantasy characters: \002%s\002\n"
|
||||
" \n"
|
||||
"Note that users wanting to use fantaisist\n"
|
||||
"commands MUST have enough level for both\n"
|
||||
"the FANTASIA and another level depending\n"
|
||||
"of the command if required (for example, to use\n"
|
||||
"!op, user must have enough access for the OPDEOP\n"
|
||||
"level)."), Config->ChanServ.c_str(), Config->BSFantasyCharacter.c_str());
|
||||
return true;
|
||||
}
|
||||
};
|
||||
|
||||
class CommandBSSetGreet : public Command
|
||||
{
|
||||
public:
|
||||
CommandBSSetGreet(Module *creator, const Anope::string &sname = "botserv/set/greet") : Command(creator, sname, 2, 2)
|
||||
{
|
||||
this->SetDesc(_("Enable greet messages"));
|
||||
this->SetSyntax(_("\037channel\037 {\037ON|OFF\037}"));
|
||||
}
|
||||
|
||||
void Execute(CommandSource &source, const std::vector<Anope::string> ¶ms) anope_override
|
||||
{
|
||||
ChannelInfo *ci = ChannelInfo::Find(params[0]);
|
||||
const Anope::string &value = params[1];
|
||||
|
||||
if (ci == NULL)
|
||||
{
|
||||
source.Reply(CHAN_X_NOT_REGISTERED, params[0].c_str());
|
||||
return;
|
||||
}
|
||||
|
||||
if (!source.HasPriv("botserv/administration") && !source.AccessFor(ci).HasPriv("SET"))
|
||||
{
|
||||
source.Reply(ACCESS_DENIED);
|
||||
return;
|
||||
}
|
||||
|
||||
if (Anope::ReadOnly)
|
||||
{
|
||||
source.Reply(_("Sorry, bot option setting is temporarily disabled."));
|
||||
return;
|
||||
}
|
||||
|
||||
if (value.equals_ci("ON"))
|
||||
{
|
||||
bool override = !source.AccessFor(ci).HasPriv("SET");
|
||||
Log(override ? LOG_OVERRIDE : LOG_COMMAND, source, this, ci) << "to enable greets";
|
||||
|
||||
ci->ExtendMetadata("BS_GREET");
|
||||
source.Reply(_("Greet mode is now \002on\002 on channel %s."), ci->name.c_str());
|
||||
}
|
||||
else if (value.equals_ci("OFF"))
|
||||
{
|
||||
bool override = !source.AccessFor(ci).HasPriv("SET");
|
||||
Log(override ? LOG_OVERRIDE : LOG_COMMAND, source, this, ci) << "to disable greets";
|
||||
|
||||
ci->Shrink("BS_GREET");
|
||||
source.Reply(_("Greet mode is now \002off\002 on channel %s."), ci->name.c_str());
|
||||
}
|
||||
else
|
||||
this->OnSyntaxError(source, source.command);
|
||||
}
|
||||
|
||||
bool OnHelp(CommandSource &source, const Anope::string &) anope_override
|
||||
{
|
||||
this->SendSyntax(source);
|
||||
source.Reply(_(" \n"
|
||||
"Enables or disables \002greet\002 mode on a channel.\n"
|
||||
"When it is enabled, the bot will display greet\n"
|
||||
"messages of users joining the channel, provided\n"
|
||||
"they have enough access to the channel."));
|
||||
return true;
|
||||
}
|
||||
};
|
||||
|
||||
class CommandBSSetNoBot : public Command
|
||||
{
|
||||
public:
|
||||
CommandBSSetNoBot(Module *creator, const Anope::string &sname = "botserv/set/nobot") : Command(creator, sname, 2, 2)
|
||||
{
|
||||
this->SetDesc(_("Prevent a bot from being assigned to a channel"));
|
||||
this->SetSyntax(_("\037channel\037 {\037ON|OFF\037}"));
|
||||
}
|
||||
|
||||
void Execute(CommandSource &source, const std::vector<Anope::string> ¶ms) anope_override
|
||||
{
|
||||
ChannelInfo *ci = ChannelInfo::Find(params[0]);
|
||||
const Anope::string &value = params[1];
|
||||
|
||||
if (ci == NULL)
|
||||
{
|
||||
source.Reply(CHAN_X_NOT_REGISTERED, params[0].c_str());
|
||||
return;
|
||||
}
|
||||
|
||||
if (value.equals_ci("ON"))
|
||||
{
|
||||
bool override = !source.AccessFor(ci).HasPriv("SET");
|
||||
Log(override ? LOG_ADMIN : LOG_COMMAND, source, this, ci) << "to enable nobot";
|
||||
|
||||
ci->ExtendMetadata("BS_NOBOT");
|
||||
if (ci->bi)
|
||||
ci->bi->UnAssign(source.GetUser(), ci);
|
||||
source.Reply(_("No-bot mode is now \002on\002 on channel %s."), ci->name.c_str());
|
||||
}
|
||||
else if (value.equals_ci("OFF"))
|
||||
{
|
||||
bool override = !source.AccessFor(ci).HasPriv("SET");
|
||||
Log(override ? LOG_ADMIN : LOG_COMMAND, source, this, ci) << "to disable nobot";
|
||||
|
||||
ci->Shrink("BS_NOBOT");
|
||||
source.Reply(_("No-bot mode is now \002off\002 on channel %s."), ci->name.c_str());
|
||||
}
|
||||
else
|
||||
this->OnSyntaxError(source, source.command);
|
||||
}
|
||||
|
||||
bool OnHelp(CommandSource &source, const Anope::string &) anope_override
|
||||
{
|
||||
this->SendSyntax(source);
|
||||
source.Reply(_(" \n"
|
||||
"This option makes a channel be unassignable. If a bot\n"
|
||||
"is already assigned to the channel, it is unassigned\n"
|
||||
"automatically when you enable the option."));
|
||||
"Sets the time bot bans expire in. If enabled, any bans placed by\n"
|
||||
"bots, such as flood kicker, badwords kicker, etc. will automatically\n"
|
||||
"be removed after the given time. Set to 0 to disable bans from\n"
|
||||
"automatically expiring."));
|
||||
return true;
|
||||
}
|
||||
};
|
||||
@@ -380,6 +155,12 @@ class CommandBSSetPrivate : public Command
|
||||
BotInfo *bi = BotInfo::Find(params[0], true);
|
||||
const Anope::string &value = params[1];
|
||||
|
||||
if (Anope::ReadOnly)
|
||||
{
|
||||
source.Reply(READ_ONLY_MODE);
|
||||
return;
|
||||
}
|
||||
|
||||
if (bi == NULL)
|
||||
{
|
||||
source.Reply(BOT_DOES_NOT_EXIST, params[0].c_str());
|
||||
@@ -388,12 +169,12 @@ class CommandBSSetPrivate : public Command
|
||||
|
||||
if (value.equals_ci("ON"))
|
||||
{
|
||||
bi->ExtendMetadata("PRIVATE");
|
||||
bi->oper_only = true;
|
||||
source.Reply(_("Private mode of bot %s is now \002on\002."), bi->nick.c_str());
|
||||
}
|
||||
else if (value.equals_ci("OFF"))
|
||||
{
|
||||
bi->Shrink("PRIVATE");
|
||||
bi->oper_only = false;
|
||||
source.Reply(_("Private mode of bot %s is now \002off\002."), bi->nick.c_str());
|
||||
}
|
||||
else
|
||||
@@ -413,19 +194,22 @@ class CommandBSSetPrivate : public Command
|
||||
class BSSet : public Module
|
||||
{
|
||||
CommandBSSet commandbsset;
|
||||
CommandBSSetDontKickOps commandbssetdontkickops;
|
||||
CommandBSSetDontKickVoices commandbssetdontkickvoices;
|
||||
CommandBSSetFantasy commandbssetfantasy;
|
||||
CommandBSSetNoBot commandbssetnobot;
|
||||
CommandBSSetBanExpire commandbssetbanexpire;
|
||||
CommandBSSetPrivate commandbssetprivate;
|
||||
|
||||
public:
|
||||
BSSet(const Anope::string &modname, const Anope::string &creator) : Module(modname, creator, CORE),
|
||||
commandbsset(this), commandbssetdontkickops(this), commandbssetdontkickvoices(this),
|
||||
commandbssetfantasy(this), commandbssetnobot(this), commandbssetprivate(this)
|
||||
BSSet(const Anope::string &modname, const Anope::string &creator) : Module(modname, creator, VENDOR),
|
||||
commandbsset(this), commandbssetbanexpire(this),
|
||||
commandbssetprivate(this)
|
||||
{
|
||||
this->SetAuthor("Anope");
|
||||
}
|
||||
|
||||
void OnBotBan(User *u, ChannelInfo *ci, const Anope::string &mask) anope_override
|
||||
{
|
||||
if (!ci->banexpire)
|
||||
return;
|
||||
|
||||
new CommandBSSetBanExpire::UnbanTimer(this, ci->name, mask, ci->banexpire);
|
||||
}
|
||||
};
|
||||
|
||||
|
||||
+116
-116
@@ -9,8 +9,6 @@
|
||||
* Based on the original code of Services by Andy Church.
|
||||
*/
|
||||
|
||||
/*************************************************************************/
|
||||
|
||||
#include "module.h"
|
||||
|
||||
static std::map<Anope::string, int16_t, ci::less> defaultLevels;
|
||||
@@ -45,32 +43,6 @@ class AccessChanAccess : public ChanAccess
|
||||
{
|
||||
this->level = convertTo<int>(data);
|
||||
}
|
||||
|
||||
static int DetermineLevel(const ChanAccess *access)
|
||||
{
|
||||
if (access->provider->name == "access/access")
|
||||
{
|
||||
const AccessChanAccess *aaccess = anope_dynamic_static_cast<const AccessChanAccess *>(access);
|
||||
return aaccess->level;
|
||||
}
|
||||
else
|
||||
{
|
||||
int highest = 1;
|
||||
const std::vector<Privilege> &privs = PrivilegeManager::GetPrivileges();
|
||||
|
||||
for (unsigned i = 0; i < privs.size(); ++i)
|
||||
{
|
||||
const Privilege &p = privs[i];
|
||||
if (access->ci->GetLevel(p.name) > highest && access->HasPriv(p.name))
|
||||
highest = access->ci->GetLevel(p.name);
|
||||
}
|
||||
|
||||
if (highest >= ACCESS_FOUNDER)
|
||||
highest = ACCESS_FOUNDER - 1;
|
||||
|
||||
return highest;
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
class AccessAccessProvider : public AccessProvider
|
||||
@@ -91,13 +63,19 @@ class CommandCSAccess : public Command
|
||||
void DoAdd(CommandSource &source, ChannelInfo *ci, const std::vector<Anope::string> ¶ms)
|
||||
{
|
||||
Anope::string mask = params[2];
|
||||
Privilege *p = NULL;
|
||||
int level = ACCESS_INVALID;
|
||||
|
||||
try
|
||||
{
|
||||
level = convertTo<int>(params[3]);
|
||||
}
|
||||
catch (const ConvertException &) { }
|
||||
catch (const ConvertException &)
|
||||
{
|
||||
p = PrivilegeManager::FindPrivilege(params[3]);
|
||||
if (p != NULL && defaultLevels[p->name])
|
||||
level = defaultLevels[p->name];
|
||||
}
|
||||
|
||||
if (!level)
|
||||
{
|
||||
@@ -130,16 +108,47 @@ class CommandCSAccess : public Command
|
||||
}
|
||||
}
|
||||
|
||||
if (mask.find_first_of("!*@") == Anope::string::npos && !NickAlias::Find(mask))
|
||||
if (IRCD->IsChannelValid(mask))
|
||||
{
|
||||
User *targ = User::Find(mask, true);
|
||||
if (targ != NULL)
|
||||
mask = "*!*@" + targ->GetDisplayedHost();
|
||||
else
|
||||
if (Config->GetModule("chanserv")->Get<bool>("disallow_channel_access"))
|
||||
{
|
||||
source.Reply(NICK_X_NOT_REGISTERED, mask.c_str());
|
||||
source.Reply(_("Channels may not be on access lists."));
|
||||
return;
|
||||
}
|
||||
|
||||
ChannelInfo *targ_ci = ChannelInfo::Find(mask);
|
||||
if (targ_ci == NULL)
|
||||
{
|
||||
source.Reply(CHAN_X_NOT_REGISTERED, mask.c_str());
|
||||
return;
|
||||
}
|
||||
else if (ci == targ_ci)
|
||||
{
|
||||
source.Reply(_("You can't add a channel to its own access list."));
|
||||
return;
|
||||
}
|
||||
|
||||
mask = targ_ci->name;
|
||||
}
|
||||
else
|
||||
{
|
||||
const NickAlias *na = NickAlias::Find(mask);
|
||||
if (!na && Config->GetModule("chanserv")->Get<bool>("disallow_hostmask_access"))
|
||||
{
|
||||
source.Reply(_("Masks and unregistered users may not be on access lists."));
|
||||
return;
|
||||
}
|
||||
else if (mask.find_first_of("!*@") == Anope::string::npos && !na)
|
||||
{
|
||||
User *targ = User::Find(mask, true);
|
||||
if (targ != NULL)
|
||||
mask = "*!*@" + targ->GetDisplayedHost();
|
||||
else
|
||||
{
|
||||
source.Reply(NICK_X_NOT_REGISTERED, mask.c_str());
|
||||
return;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
for (unsigned i = ci->GetAccessCount(); i > 0; --i)
|
||||
@@ -153,14 +162,15 @@ class CommandCSAccess : public Command
|
||||
source.Reply(ACCESS_DENIED);
|
||||
return;
|
||||
}
|
||||
ci->EraseAccess(i - 1);
|
||||
delete ci->EraseAccess(i - 1);
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
if (ci->GetAccessCount() >= Config->CSAccessMax)
|
||||
unsigned access_max = Config->GetModule("chanserv")->Get<unsigned>("accessmax", "1024");
|
||||
if (access_max && ci->GetDeepAccessCount() >= access_max)
|
||||
{
|
||||
source.Reply(_("Sorry, you can only have %d access entries on a channel."), Config->CSAccessMax);
|
||||
source.Reply(_("Sorry, you can only have %d access entries on a channel, including access entries from other channels."), access_max);
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -176,19 +186,20 @@ class CommandCSAccess : public Command
|
||||
access->created = Anope::CurTime;
|
||||
ci->AddAccess(access);
|
||||
|
||||
FOREACH_MOD(I_OnAccessAdd, OnAccessAdd(ci, source, access));
|
||||
FOREACH_MOD(OnAccessAdd, (ci, source, access));
|
||||
|
||||
Log(override ? LOG_OVERRIDE : LOG_COMMAND, source, this, ci) << "to add " << mask << " with level " << level;
|
||||
source.Reply(_("\002%s\002 added to %s access list at level \002%d\002."), access->mask.c_str(), ci->name.c_str(), level);
|
||||
|
||||
return;
|
||||
if (p != NULL)
|
||||
source.Reply(_("\002%s\002 added to %s access list at privilege %s (level %d)"), access->mask.c_str(), ci->name.c_str(), p->name.c_str(), level);
|
||||
else
|
||||
source.Reply(_("\002%s\002 added to %s access list at level \002%d\002."), access->mask.c_str(), ci->name.c_str(), level);
|
||||
}
|
||||
|
||||
void DoDel(CommandSource &source, ChannelInfo *ci, const std::vector<Anope::string> ¶ms)
|
||||
{
|
||||
Anope::string mask = params[2];
|
||||
|
||||
if (!isdigit(mask[0]) && mask.find_first_of("!*@") == Anope::string::npos && !NickAlias::Find(mask))
|
||||
if (!isdigit(mask[0]) && mask.find_first_of("#!*@") == Anope::string::npos && !NickAlias::Find(mask))
|
||||
{
|
||||
User *targ = User::Find(mask, true);
|
||||
if (targ != NULL)
|
||||
@@ -211,10 +222,11 @@ class CommandCSAccess : public Command
|
||||
Command *c;
|
||||
unsigned deleted;
|
||||
Anope::string Nicks;
|
||||
bool Denied;
|
||||
bool denied;
|
||||
bool override;
|
||||
AccessGroup ag;
|
||||
public:
|
||||
AccessDelCallback(CommandSource &_source, ChannelInfo *_ci, Command *_c, const Anope::string &numlist) : NumberList(numlist, true), source(_source), ci(_ci), c(_c), deleted(0), Denied(false), override(false)
|
||||
AccessDelCallback(CommandSource &_source, ChannelInfo *_ci, Command *_c, const Anope::string &numlist) : NumberList(numlist, true), source(_source), ci(_ci), c(_c), deleted(0), denied(false), override(false), ag(source.AccessFor(ci))
|
||||
{
|
||||
if (!source.AccessFor(ci).HasPriv("ACCESS_CHANGE") && source.HasPriv("chanserv/access/modify"))
|
||||
this->override = true;
|
||||
@@ -222,7 +234,7 @@ class CommandCSAccess : public Command
|
||||
|
||||
~AccessDelCallback()
|
||||
{
|
||||
if (Denied && !deleted)
|
||||
if (denied && !deleted)
|
||||
source.Reply(ACCESS_DENIED);
|
||||
else if (!deleted)
|
||||
source.Reply(_("No matching entries on %s access list."), ci->name.c_str());
|
||||
@@ -244,12 +256,11 @@ class CommandCSAccess : public Command
|
||||
|
||||
ChanAccess *access = ci->GetAccess(Number - 1);
|
||||
|
||||
AccessGroup u_access = source.AccessFor(ci);
|
||||
const ChanAccess *u_highest = u_access.Highest();
|
||||
const ChanAccess *u_highest = ag.Highest();
|
||||
|
||||
if ((!u_highest || *u_highest <= *access) && !u_access.founder && !this->override && !access->mask.equals_ci(source.nc->display))
|
||||
if ((!u_highest || *u_highest <= *access) && !ag.founder && !this->override && !access->mask.equals_ci(source.nc->display))
|
||||
{
|
||||
Denied = true;
|
||||
denied = true;
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -259,9 +270,10 @@ class CommandCSAccess : public Command
|
||||
else
|
||||
Nicks = access->mask;
|
||||
|
||||
FOREACH_MOD(I_OnAccessDel, OnAccessDel(ci, source, access));
|
||||
|
||||
ci->EraseAccess(Number - 1);
|
||||
|
||||
FOREACH_MOD(OnAccessDel, (ci, source, access));
|
||||
delete access;
|
||||
}
|
||||
}
|
||||
delcallback(source, ci, this, mask);
|
||||
@@ -285,7 +297,8 @@ class CommandCSAccess : public Command
|
||||
bool override = !u_access.founder && !u_access.HasPriv("ACCESS_CHANGE") && !access->mask.equals_ci(source.nc->display);
|
||||
Log(override ? LOG_OVERRIDE : LOG_COMMAND, source, this, ci) << "to delete " << access->mask;
|
||||
|
||||
FOREACH_MOD(I_OnAccessDel, OnAccessDel(ci, source, access));
|
||||
ci->EraseAccess(i - 1);
|
||||
FOREACH_MOD(OnAccessDel, (ci, source, access));
|
||||
delete access;
|
||||
}
|
||||
return;
|
||||
@@ -326,8 +339,11 @@ class CommandCSAccess : public Command
|
||||
Anope::string timebuf;
|
||||
if (ci->c)
|
||||
for (Channel::ChanUserList::const_iterator cit = ci->c->users.begin(), cit_end = ci->c->users.end(); cit != cit_end; ++cit)
|
||||
if (access->Matches((*cit)->user, (*cit)->user->Account()))
|
||||
{
|
||||
ChanAccess::Path p;
|
||||
if (access->Matches(cit->second->user, cit->second->user->Account(), p))
|
||||
timebuf = "Now";
|
||||
}
|
||||
if (timebuf.empty())
|
||||
{
|
||||
if (access->last_seen == 0)
|
||||
@@ -338,7 +354,7 @@ class CommandCSAccess : public Command
|
||||
|
||||
ListFormatter::ListEntry entry;
|
||||
entry["Number"] = stringify(number);
|
||||
entry["Level"] = stringify(AccessChanAccess::DetermineLevel(access));
|
||||
entry["Level"] = access->AccessSerialize();
|
||||
entry["Mask"] = access->mask;
|
||||
entry["By"] = access->creator;
|
||||
entry["Last seen"] = timebuf;
|
||||
@@ -360,8 +376,11 @@ class CommandCSAccess : public Command
|
||||
Anope::string timebuf;
|
||||
if (ci->c)
|
||||
for (Channel::ChanUserList::const_iterator cit = ci->c->users.begin(), cit_end = ci->c->users.end(); cit != cit_end; ++cit)
|
||||
if (access->Matches((*cit)->user, (*cit)->user->Account()))
|
||||
{
|
||||
ChanAccess::Path p;
|
||||
if (access->Matches(cit->second->user, cit->second->user->Account(), p))
|
||||
timebuf = "Now";
|
||||
}
|
||||
if (timebuf.empty())
|
||||
{
|
||||
if (access->last_seen == 0)
|
||||
@@ -372,7 +391,7 @@ class CommandCSAccess : public Command
|
||||
|
||||
ListFormatter::ListEntry entry;
|
||||
entry["Number"] = stringify(i + 1);
|
||||
entry["Level"] = stringify(AccessChanAccess::DetermineLevel(access));
|
||||
entry["Level"] = access->AccessSerialize();
|
||||
entry["Mask"] = access->mask;
|
||||
entry["By"] = access->creator;
|
||||
entry["Last seen"] = timebuf;
|
||||
@@ -406,8 +425,8 @@ class CommandCSAccess : public Command
|
||||
return;
|
||||
}
|
||||
|
||||
ListFormatter list;
|
||||
list.AddColumn("Number").AddColumn("Level").AddColumn("Mask");
|
||||
ListFormatter list(source.GetAccount());
|
||||
list.AddColumn(_("Number")).AddColumn(_("Level")).AddColumn(_("Mask"));
|
||||
this->ProcessList(source, ci, params, list);
|
||||
}
|
||||
|
||||
@@ -419,8 +438,8 @@ class CommandCSAccess : public Command
|
||||
return;
|
||||
}
|
||||
|
||||
ListFormatter list;
|
||||
list.AddColumn("Number").AddColumn("Level").AddColumn("Mask").AddColumn("By").AddColumn("Last seen");
|
||||
ListFormatter list(source.GetAccount());
|
||||
list.AddColumn(_("Number")).AddColumn(_("Level")).AddColumn(_("Mask")).AddColumn(_("By")).AddColumn(_("Last seen"));
|
||||
this->ProcessList(source, ci, params, list);
|
||||
}
|
||||
|
||||
@@ -430,7 +449,7 @@ class CommandCSAccess : public Command
|
||||
source.Reply(ACCESS_DENIED);
|
||||
else
|
||||
{
|
||||
FOREACH_MOD(I_OnAccessClear, OnAccessClear(ci, source));
|
||||
FOREACH_MOD(OnAccessClear, (ci, source));
|
||||
|
||||
ci->ClearAccess();
|
||||
|
||||
@@ -526,12 +545,12 @@ class CommandCSAccess : public Command
|
||||
"access list with the given user level; if the mask is\n"
|
||||
"already present on the list, its access level is changed to\n"
|
||||
"the level specified in the command. The \037level\037 specified\n"
|
||||
"must be less than that of the user giving the command, and\n"
|
||||
"if the \037mask\037 is already on the access list, the current\n"
|
||||
"access level of that nick must be less than the access level\n"
|
||||
"of the user giving the command. When a user joins the channel\n"
|
||||
"the access they receive is from the highest level entry in the\n"
|
||||
"access list."));
|
||||
"may be a numerical level or the name of a privilege (eg AUTOOP).\n"
|
||||
"When a user joins the channel the access they receive is from the\n"
|
||||
"highest level entry in the access list."));
|
||||
if (!Config->GetModule("chanserv")->Get<bool>("disallow_channel_access"))
|
||||
source.Reply(_("The given mask may also be a channel, which will use the\n"
|
||||
"access list from the other channel up to the given \037level\037."));
|
||||
source.Reply(" ");
|
||||
source.Reply(_("The \002ACCESS DEL\002 command removes the given nick from the\n"
|
||||
"access list. If a list of entry numbers is given, those\n"
|
||||
@@ -552,24 +571,14 @@ class CommandCSAccess : public Command
|
||||
" \n"
|
||||
"The \002ACCESS CLEAR\002 command clears all entries of the\n"
|
||||
"access list."));
|
||||
source.Reply(_("\002User access levels\002\n"
|
||||
" \n"
|
||||
"By default, the following access levels are defined:\n"
|
||||
" \n"
|
||||
" \002Founder\002 Full access to %s functions; automatic\n"
|
||||
" opping upon entering channel. Note\n"
|
||||
" that only one person may have founder\n"
|
||||
" status (it cannot be given using the\n"
|
||||
" \002ACCESS\002 command).\n"
|
||||
" \002 10\002 Access to AKICK command; automatic opping.\n"
|
||||
" \002 5\002 Automatic opping.\n"
|
||||
" \002 3\002 Automatic voicing.\n"
|
||||
" \002 0\002 No special privileges; can be opped by other\n"
|
||||
" ops (unless \002secure-ops\002 is set).\n"
|
||||
" \n"
|
||||
"These levels may be changed, or new ones added, using the\n"
|
||||
"\002LEVELS\002 command; type \002%s%s HELP LEVELS\002 for\n"
|
||||
"information."), source.service->nick.c_str(), Config->UseStrictPrivMsgString.c_str(), source.service->nick.c_str());
|
||||
source.Reply(" ");
|
||||
|
||||
BotInfo *bi;
|
||||
Anope::string cmd;
|
||||
if (Command::FindCommandFromService("chanserv/levels", bi, cmd))
|
||||
source.Reply(_("\002User access levels\002 can be seen by using the\n"
|
||||
"\002%s\002 command; type \002%s%s HELP LEVELS\002 for\n"
|
||||
"information."), cmd.c_str(), Config->StrictPrivmsg.c_str(), bi->nick.c_str());
|
||||
return true;
|
||||
}
|
||||
};
|
||||
@@ -604,11 +613,11 @@ class CommandCSLevels : public Command
|
||||
{
|
||||
Privilege *p = PrivilegeManager::FindPrivilege(what);
|
||||
if (p == NULL)
|
||||
source.Reply(_("Setting \002%s\002 not known. Type \002%s%s HELP LEVELS\002 for a list of valid settings."), what.c_str(), Config->UseStrictPrivMsgString.c_str(), source.service->nick.c_str());
|
||||
source.Reply(_("Setting \002%s\002 not known. Type \002%s%s HELP LEVELS\002 for a list of valid settings."), what.c_str(), Config->StrictPrivmsg.c_str(), source.service->nick.c_str());
|
||||
else
|
||||
{
|
||||
ci->SetLevel(p->name, level);
|
||||
FOREACH_MOD(I_OnLevelChange, OnLevelChange(source, ci, p->name, level));
|
||||
FOREACH_MOD(OnLevelChange, (source, ci, p->name, level));
|
||||
|
||||
bool override = !source.AccessFor(ci).HasPriv("FOUNDER");
|
||||
Log(override ? LOG_OVERRIDE : LOG_COMMAND, source, this, ci) << "to set " << p->name << " to level " << level;
|
||||
@@ -632,7 +641,7 @@ class CommandCSLevels : public Command
|
||||
if (p != NULL)
|
||||
{
|
||||
ci->SetLevel(p->name, ACCESS_INVALID);
|
||||
FOREACH_MOD(I_OnLevelChange, OnLevelChange(source, ci, p->name, ACCESS_INVALID));
|
||||
FOREACH_MOD(OnLevelChange, (source, ci, p->name, ACCESS_INVALID));
|
||||
|
||||
bool override = !source.AccessFor(ci).HasPriv("FOUNDER");
|
||||
Log(override ? LOG_OVERRIDE : LOG_COMMAND, source, this, ci) << "to disable " << p->name;
|
||||
@@ -642,7 +651,7 @@ class CommandCSLevels : public Command
|
||||
}
|
||||
}
|
||||
|
||||
source.Reply(_("Setting \002%s\002 not known. Type \002%s%s HELP LEVELS\002 for a list of valid settings."), what.c_str(), Config->UseStrictPrivMsgString.c_str(), source.service->nick.c_str());
|
||||
source.Reply(_("Setting \002%s\002 not known. Type \002%s%s HELP LEVELS\002 for a list of valid settings."), what.c_str(), Config->StrictPrivmsg.c_str(), source.service->nick.c_str());
|
||||
|
||||
return;
|
||||
}
|
||||
@@ -651,8 +660,8 @@ class CommandCSLevels : public Command
|
||||
{
|
||||
source.Reply(_("Access level settings for channel %s:"), ci->name.c_str());
|
||||
|
||||
ListFormatter list;
|
||||
list.AddColumn("Name").AddColumn("Level");
|
||||
ListFormatter list(source.GetAccount());
|
||||
list.AddColumn(_("Name")).AddColumn(_("Level"));
|
||||
|
||||
const std::vector<Privilege> &privs = PrivilegeManager::GetPrivileges();
|
||||
|
||||
@@ -665,9 +674,9 @@ class CommandCSLevels : public Command
|
||||
entry["Name"] = p.name;
|
||||
|
||||
if (j == ACCESS_INVALID)
|
||||
entry["Level"] = "(disabled)";
|
||||
entry["Level"] = Language::Translate(source.GetAccount(), _("(disabled)"));
|
||||
else if (j == ACCESS_FOUNDER)
|
||||
entry["Level"] = "(founder only)";
|
||||
entry["Level"] = Language::Translate(source.GetAccount(), _("(founder only)"));
|
||||
else
|
||||
entry["Level"] = stringify(j);
|
||||
|
||||
@@ -684,7 +693,7 @@ class CommandCSLevels : public Command
|
||||
void DoReset(CommandSource &source, ChannelInfo *ci)
|
||||
{
|
||||
reset_levels(ci);
|
||||
FOREACH_MOD(I_OnLevelChange, OnLevelChange(source, ci, "ALL", 0));
|
||||
FOREACH_MOD(OnLevelChange, (source, ci, "ALL", 0));
|
||||
|
||||
bool override = !source.AccessFor(ci).HasPriv("FOUNDER");
|
||||
Log(override ? LOG_OVERRIDE : LOG_COMMAND, source, this, ci) << "to reset all levels";
|
||||
@@ -723,6 +732,8 @@ class CommandCSLevels : public Command
|
||||
this->OnSyntaxError(source, cmd);
|
||||
else if (!source.AccessFor(ci).HasPriv("FOUNDER") && !source.HasPriv("chanserv/access/modify"))
|
||||
source.Reply(ACCESS_DENIED);
|
||||
else if (Anope::ReadOnly && !cmd.equals_ci("LIST"))
|
||||
source.Reply(READ_ONLY_MODE);
|
||||
else if (cmd.equals_ci("SET"))
|
||||
this->DoSet(source, ci, params);
|
||||
else if (cmd.equals_ci("DIS") || cmd.equals_ci("DISABLE"))
|
||||
@@ -743,8 +754,8 @@ class CommandCSLevels : public Command
|
||||
{
|
||||
source.Reply(_("The following feature/function names are available:"));
|
||||
|
||||
ListFormatter list;
|
||||
list.AddColumn("Name").AddColumn("Description");
|
||||
ListFormatter list(source.GetAccount());
|
||||
list.AddColumn(_("Name")).AddColumn(_("Description"));
|
||||
|
||||
const std::vector<Privilege> &privs = PrivilegeManager::GetPrivileges();
|
||||
for (unsigned i = 0; i < privs.size(); ++i)
|
||||
@@ -797,39 +808,28 @@ class CSAccess : public Module
|
||||
CommandCSLevels commandcslevels;
|
||||
|
||||
public:
|
||||
CSAccess(const Anope::string &modname, const Anope::string &creator) : Module(modname, creator, CORE),
|
||||
CSAccess(const Anope::string &modname, const Anope::string &creator) : Module(modname, creator, VENDOR),
|
||||
accessprovider(this), commandcsaccess(this), commandcslevels(this)
|
||||
{
|
||||
this->SetAuthor("Anope");
|
||||
this->SetPermanent(true);
|
||||
|
||||
Implementation i[] = { I_OnReload, I_OnCreateChan, I_OnGroupCheckPriv };
|
||||
ModuleManager::Attach(i, this, sizeof(i) / sizeof(Implementation));
|
||||
|
||||
try
|
||||
{
|
||||
this->OnReload();
|
||||
}
|
||||
catch (const ConfigException &ex)
|
||||
{
|
||||
throw ModuleException(ex.GetReason());
|
||||
}
|
||||
}
|
||||
|
||||
void OnReload() anope_override
|
||||
void OnReload(Configuration::Conf *conf) anope_override
|
||||
{
|
||||
defaultLevels.clear();
|
||||
ConfigReader config;
|
||||
|
||||
for (int i = 0; i < config.Enumerate("privilege"); ++i)
|
||||
for (int i = 0; i < conf->CountBlock("privilege"); ++i)
|
||||
{
|
||||
const Anope::string &pname = config.ReadValue("privilege", "name", "", i);
|
||||
Configuration::Block *priv = conf->GetBlock("privilege", i);
|
||||
|
||||
const Anope::string &pname = priv->Get<const Anope::string>("name");
|
||||
|
||||
Privilege *p = PrivilegeManager::FindPrivilege(pname);
|
||||
if (p == NULL)
|
||||
continue;
|
||||
|
||||
const Anope::string &value = config.ReadValue("privilege", "level", "", i);
|
||||
const Anope::string &value = priv->Get<const Anope::string>("level");
|
||||
if (value.empty())
|
||||
continue;
|
||||
else if (value.equals_ci("founder"))
|
||||
@@ -837,7 +837,7 @@ class CSAccess : public Module
|
||||
else if (value.equals_ci("disabled"))
|
||||
defaultLevels[p->name] = ACCESS_INVALID;
|
||||
else
|
||||
defaultLevels[p->name] = config.ReadInteger("privilege", "level", i, false);
|
||||
defaultLevels[p->name] = priv->Get<int16_t>("level");
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -9,43 +9,8 @@
|
||||
* Based on the original code of Services by Andy Church.
|
||||
*/
|
||||
|
||||
/*************************************************************************/
|
||||
|
||||
#include "module.h"
|
||||
|
||||
static void split_usermask(const Anope::string &mask, Anope::string &nick, Anope::string &user, Anope::string &host)
|
||||
{
|
||||
size_t ex = mask.find('!'), at = mask.find('@', ex == Anope::string::npos ? 0 : ex + 1);
|
||||
if (ex == Anope::string::npos)
|
||||
{
|
||||
if (at == Anope::string::npos)
|
||||
{
|
||||
nick = mask;
|
||||
user = host = "*";
|
||||
}
|
||||
else
|
||||
{
|
||||
nick = "*";
|
||||
user = mask.substr(0, at);
|
||||
host = mask.substr(at + 1);
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
nick = mask.substr(0, ex);
|
||||
if (at == Anope::string::npos)
|
||||
{
|
||||
user = mask.substr(ex + 1);
|
||||
host = "*";
|
||||
}
|
||||
else
|
||||
{
|
||||
user = mask.substr(ex + 1, at - ex - 1);
|
||||
host = mask.substr(at + 1);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
class CommandCSAKick : public Command
|
||||
{
|
||||
void DoAdd(CommandSource &source, ChannelInfo *ci, const std::vector<Anope::string> ¶ms)
|
||||
@@ -55,16 +20,50 @@ class CommandCSAKick : public Command
|
||||
const NickAlias *na = NickAlias::Find(mask);
|
||||
NickCore *nc = NULL;
|
||||
const AutoKick *akick;
|
||||
unsigned reasonmax = Config->GetModule("chanserv")->Get<unsigned>("reasonmax", "200");
|
||||
|
||||
if (reason.length() > Config->CSReasonMax)
|
||||
reason = reason.substr(0, Config->CSReasonMax);
|
||||
if (reason.length() > reasonmax)
|
||||
reason = reason.substr(0, reasonmax);
|
||||
|
||||
if (!na)
|
||||
if (IRCD->IsExtbanValid(mask))
|
||||
; /* If this is an extban don't try to complete the mask */
|
||||
else if (IRCD->IsChannelValid(mask))
|
||||
{
|
||||
Anope::string nick, user, host;
|
||||
/* Also don't try to complete the mask if this is a channel */
|
||||
|
||||
split_usermask(mask, nick, user, host);
|
||||
mask = nick + "!" + user + "@" + host;
|
||||
if (mask.equals_ci(ci->name) && ci->HasExt("PEACE"))
|
||||
{
|
||||
source.Reply(ACCESS_DENIED);
|
||||
return;
|
||||
}
|
||||
}
|
||||
else if (!na)
|
||||
{
|
||||
/* If the mask contains a realname the reason must be prepended with a : */
|
||||
if (mask.find('#') != Anope::string::npos)
|
||||
{
|
||||
size_t r = reason.find(':');
|
||||
if (r != Anope::string::npos)
|
||||
{
|
||||
mask += " " + reason.substr(0, r);
|
||||
mask.trim();
|
||||
reason = reason.substr(r + 1);
|
||||
reason.trim();
|
||||
}
|
||||
else
|
||||
{
|
||||
mask = mask + " " + reason;
|
||||
reason.clear();
|
||||
}
|
||||
}
|
||||
|
||||
Entry e("", mask);
|
||||
|
||||
mask = (e.nick.empty() ? "*" : e.nick) + "!"
|
||||
+ (e.user.empty() ? "*" : e.user) + "@"
|
||||
+ (e.host.empty() ? "*" : e.host);
|
||||
if (!e.real.empty())
|
||||
mask += "#" + e.real;
|
||||
}
|
||||
else
|
||||
nc = na->nc;
|
||||
@@ -83,9 +82,16 @@ class CommandCSAKick : public Command
|
||||
}
|
||||
}
|
||||
|
||||
bool override = !source.AccessFor(ci).HasPriv("AKICK");
|
||||
/* Opers overriding get to bypass PEACE */
|
||||
if (override)
|
||||
;
|
||||
/* These peace checks are only for masks */
|
||||
else if (IRCD->IsChannelValid(mask))
|
||||
;
|
||||
/* Check whether target nick has equal/higher access
|
||||
* or whether the mask matches a user with higher/equal access - Viper */
|
||||
if (ci->HasExt("PEACE") && nc)
|
||||
else if (ci->HasExt("PEACE") && nc)
|
||||
{
|
||||
AccessGroup nc_access = ci->AccessFor(nc), u_access = source.AccessFor(ci);
|
||||
if (nc == ci->GetFounder() || nc_access >= u_access)
|
||||
@@ -141,9 +147,9 @@ class CommandCSAKick : public Command
|
||||
}
|
||||
}
|
||||
|
||||
if (ci->GetAkickCount() >= Config->CSAutokickMax)
|
||||
if (ci->GetAkickCount() >= Config->GetModule(this->owner)->Get<unsigned>("autokickmax"))
|
||||
{
|
||||
source.Reply(_("Sorry, you can only have %d autokick masks on a channel."), Config->CSAutokickMax);
|
||||
source.Reply(_("Sorry, you can only have %d autokick masks on a channel."), Config->GetModule(this->owner)->Get<unsigned>("autokickmax"));
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -152,10 +158,9 @@ class CommandCSAKick : public Command
|
||||
else
|
||||
akick = ci->AddAkick(source.GetNick(), mask, reason);
|
||||
|
||||
bool override = !source.AccessFor(ci).HasPriv("AKICK");
|
||||
Log(override ? LOG_OVERRIDE : LOG_COMMAND, source, this, ci) << "to add " << mask << (reason == "" ? "" : ": ") << reason;
|
||||
|
||||
FOREACH_MOD(I_OnAkickAdd, OnAkickAdd(source, ci, akick));
|
||||
FOREACH_MOD(OnAkickAdd, (source, ci, akick));
|
||||
|
||||
source.Reply(_("\002%s\002 added to %s autokick list."), mask.c_str(), ci->name.c_str());
|
||||
|
||||
@@ -182,16 +187,14 @@ class CommandCSAKick : public Command
|
||||
ChannelInfo *ci;
|
||||
Command *c;
|
||||
unsigned deleted;
|
||||
AccessGroup ag;
|
||||
public:
|
||||
AkickDelCallback(CommandSource &_source, ChannelInfo *_ci, Command *_c, const Anope::string &list) : NumberList(list, true), source(_source), ci(_ci), c(_c), deleted(0)
|
||||
AkickDelCallback(CommandSource &_source, ChannelInfo *_ci, Command *_c, const Anope::string &list) : NumberList(list, true), source(_source), ci(_ci), c(_c), deleted(0), ag(source.AccessFor(ci))
|
||||
{
|
||||
}
|
||||
|
||||
~AkickDelCallback()
|
||||
{
|
||||
bool override = !source.AccessFor(ci).HasPriv("AKICK");
|
||||
Log(override ? LOG_OVERRIDE : LOG_COMMAND, source, c, ci) << "to delete " << deleted << (deleted == 1 ? " entry" : " entries");
|
||||
|
||||
if (!deleted)
|
||||
source.Reply(_("No matching entries on %s autokick list."), ci->name.c_str());
|
||||
else if (deleted == 1)
|
||||
@@ -205,7 +208,12 @@ class CommandCSAKick : public Command
|
||||
if (!number || number > ci->GetAkickCount())
|
||||
return;
|
||||
|
||||
FOREACH_MOD(I_OnAkickDel, OnAkickDel(source, ci, ci->GetAkick(number - 1)));
|
||||
const AutoKick *akick = ci->GetAkick(number - 1);
|
||||
|
||||
FOREACH_MOD(OnAkickDel, (source, ci, akick));
|
||||
|
||||
bool override = !ag.HasPriv("AKICK");
|
||||
Log(override ? LOG_OVERRIDE : LOG_COMMAND, source, c, ci) << "to delete " << (akick->nc ? akick->nc->display : akick->mask);
|
||||
|
||||
++deleted;
|
||||
ci->EraseAkick(number - 1);
|
||||
@@ -236,7 +244,7 @@ class CommandCSAKick : public Command
|
||||
bool override = !source.AccessFor(ci).HasPriv("AKICK");
|
||||
Log(override ? LOG_OVERRIDE : LOG_COMMAND, source, this, ci) << "to delete " << mask;
|
||||
|
||||
FOREACH_MOD(I_OnAkickDel, OnAkickDel(source, ci, ci->GetAkick(i)));
|
||||
FOREACH_MOD(OnAkickDel, (source, ci, ci->GetAkick(i)));
|
||||
|
||||
ci->EraseAkick(i);
|
||||
|
||||
@@ -269,11 +277,11 @@ class CommandCSAKick : public Command
|
||||
|
||||
Anope::string timebuf, lastused;
|
||||
if (akick->addtime)
|
||||
timebuf = Anope::strftime(akick->addtime, NULL, false);
|
||||
timebuf = Anope::strftime(akick->addtime, NULL, true);
|
||||
else
|
||||
timebuf = UNKNOWN;
|
||||
if (akick->last_used)
|
||||
lastused = Anope::strftime(akick->last_used, NULL, false);
|
||||
lastused = Anope::strftime(akick->last_used, NULL, true);
|
||||
else
|
||||
lastused = UNKNOWN;
|
||||
|
||||
@@ -309,11 +317,11 @@ class CommandCSAKick : public Command
|
||||
|
||||
Anope::string timebuf, lastused;
|
||||
if (akick->addtime)
|
||||
timebuf = Anope::strftime(akick->addtime);
|
||||
timebuf = Anope::strftime(akick->addtime, NULL, true);
|
||||
else
|
||||
timebuf = UNKNOWN;
|
||||
if (akick->last_used)
|
||||
lastused = Anope::strftime(akick->last_used);
|
||||
lastused = Anope::strftime(akick->last_used, NULL, true);
|
||||
else
|
||||
lastused = UNKNOWN;
|
||||
|
||||
@@ -355,8 +363,8 @@ class CommandCSAKick : public Command
|
||||
return;
|
||||
}
|
||||
|
||||
ListFormatter list;
|
||||
list.AddColumn("Number").AddColumn("Mask").AddColumn("Reason");
|
||||
ListFormatter list(source.GetAccount());
|
||||
list.AddColumn(_("Number")).AddColumn(_("Mask")).AddColumn(_("Reason"));
|
||||
this->ProcessList(source, ci, params, list);
|
||||
}
|
||||
|
||||
@@ -368,8 +376,8 @@ class CommandCSAKick : public Command
|
||||
return;
|
||||
}
|
||||
|
||||
ListFormatter list;
|
||||
list.AddColumn("Number").AddColumn("Mask").AddColumn("Creator").AddColumn("Created").AddColumn("Last used").AddColumn("Reason");
|
||||
ListFormatter list(source.GetAccount());
|
||||
list.AddColumn(_("Number")).AddColumn(_("Mask")).AddColumn(_("Creator")).AddColumn(_("Created")).AddColumn(_("Last used")).AddColumn(_("Reason"));
|
||||
this->ProcessList(source, ci, params, list);
|
||||
}
|
||||
|
||||
@@ -384,11 +392,12 @@ class CommandCSAKick : public Command
|
||||
return;
|
||||
}
|
||||
|
||||
for (User::ChanUserList::iterator it = c->users.begin(), it_end = c->users.end(); it != it_end; )
|
||||
for (Channel::ChanUserList::iterator it = c->users.begin(), it_end = c->users.end(); it != it_end; )
|
||||
{
|
||||
ChanUserContainer *uc = *it++;
|
||||
ChanUserContainer *uc = it->second;
|
||||
++it;
|
||||
|
||||
if (ci->CheckKick(uc->user))
|
||||
if (c->CheckKick(uc->user))
|
||||
++count;
|
||||
}
|
||||
|
||||
@@ -458,6 +467,7 @@ class CommandCSAKick : public Command
|
||||
|
||||
bool OnHelp(CommandSource &source, const Anope::string &subcommand) anope_override
|
||||
{
|
||||
BotInfo *bi = Config->GetClient("NickServ");
|
||||
this->SendSyntax(source);
|
||||
source.Reply(" ");
|
||||
source.Reply(_("Maintains the \002AutoKick list\002 for a channel. If a user\n"
|
||||
@@ -468,12 +478,12 @@ class CommandCSAKick : public Command
|
||||
"The \002AKICK ADD\002 command adds the given nick or usermask\n"
|
||||
"to the AutoKick list. If a \037reason\037 is given with\n"
|
||||
"the command, that reason will be used when the user is\n"
|
||||
"kicked; if not, the default reason is \"You have been\n"
|
||||
"kicked; if not, the default reason is \"User has been\n"
|
||||
"banned from the channel\".\n"
|
||||
"When akicking a \037registered nick\037 the nickserv account\n"
|
||||
"When akicking a \037registered nick\037 the %s account\n"
|
||||
"will be added to the akick list instead of the mask.\n"
|
||||
"All users within that nickgroup will then be akicked.\n"),
|
||||
source.service->nick.c_str());
|
||||
source.service->nick.c_str(), bi ? bi->nick.c_str() : "NickServ");
|
||||
source.Reply(_(
|
||||
" \n"
|
||||
"The \002AKICK DEL\002 command removes the given nick or mask\n"
|
||||
@@ -503,44 +513,42 @@ class CSAKick : public Module
|
||||
CommandCSAKick commandcsakick;
|
||||
|
||||
public:
|
||||
CSAKick(const Anope::string &modname, const Anope::string &creator) : Module(modname, creator, CORE),
|
||||
CSAKick(const Anope::string &modname, const Anope::string &creator) : Module(modname, creator, VENDOR),
|
||||
commandcsakick(this)
|
||||
{
|
||||
this->SetAuthor("Anope");
|
||||
|
||||
Implementation i[] = { I_OnCheckKick };
|
||||
ModuleManager::Attach(i, this, sizeof(i) / sizeof(Implementation));
|
||||
}
|
||||
|
||||
EventReturn OnCheckKick(User *u, ChannelInfo *ci, Anope::string &mask, Anope::string &reason) anope_override
|
||||
EventReturn OnCheckKick(User *u, Channel *c, Anope::string &mask, Anope::string &reason) anope_override
|
||||
{
|
||||
if (ci->c->MatchesList(u, "EXCEPT"))
|
||||
if (!c->ci || c->MatchesList(u, "EXCEPT"))
|
||||
return EVENT_CONTINUE;
|
||||
|
||||
for (unsigned j = 0, end = ci->GetAkickCount(); j < end; ++j)
|
||||
for (unsigned j = 0, end = c->ci->GetAkickCount(); j < end; ++j)
|
||||
{
|
||||
AutoKick *autokick = ci->GetAkick(j);
|
||||
AutoKick *autokick = c->ci->GetAkick(j);
|
||||
bool kick = false;
|
||||
|
||||
if (autokick->nc)
|
||||
kick = autokick->nc == u->Account();
|
||||
else if (IRCD->IsChannelValid(autokick->mask))
|
||||
{
|
||||
if (autokick->nc == u->Account())
|
||||
kick = true;
|
||||
Channel *chan = Channel::Find(autokick->mask);
|
||||
kick = chan != NULL && chan->FindUser(u);
|
||||
}
|
||||
else
|
||||
{
|
||||
Entry akick_mask("", autokick->mask);
|
||||
if (akick_mask.Matches(u))
|
||||
kick = true;
|
||||
}
|
||||
kick = Entry("BAN", autokick->mask).Matches(u);
|
||||
|
||||
if (kick)
|
||||
{
|
||||
Log(LOG_DEBUG_2) << u->nick << " matched akick " << (autokick->nc ? autokick->nc->display : autokick->mask);
|
||||
autokick->last_used = Anope::CurTime;
|
||||
if (!autokick->nc)
|
||||
if (!autokick->nc && autokick->mask.find('#') == Anope::string::npos)
|
||||
mask = autokick->mask;
|
||||
reason = autokick->reason.empty() ? Config->CSAutokickReason : autokick->reason;
|
||||
reason = autokick->reason;
|
||||
if (reason.empty())
|
||||
reason = Language::Translate(u, Config->GetModule(this)->Get<const Anope::string>("autokickreason").c_str());
|
||||
if (reason.empty())
|
||||
reason = Language::Translate(u, _("User has been banned from the channel"));
|
||||
return EVENT_STOP;
|
||||
}
|
||||
}
|
||||
|
||||
+37
-22
@@ -9,20 +9,19 @@
|
||||
* Based on the original code of Services by Andy Church.
|
||||
*/
|
||||
|
||||
/*************************************************************************/
|
||||
|
||||
#include "module.h"
|
||||
|
||||
static Module *me;
|
||||
|
||||
class TempBan : public CallBack
|
||||
class TempBan : public Timer
|
||||
{
|
||||
private:
|
||||
Anope::string channel;
|
||||
Anope::string mask;
|
||||
|
||||
public:
|
||||
TempBan(time_t seconds, Channel *c, const Anope::string &banmask) : CallBack(me, seconds), channel(c->name), mask(banmask) { }
|
||||
TempBan(time_t seconds, Channel *c, const Anope::string &banmask) : Timer(me, seconds), channel(c->name), mask(banmask) { }
|
||||
|
||||
void Tick(time_t ctime) anope_override
|
||||
{
|
||||
@@ -38,8 +37,7 @@ class CommandCSBan : public Command
|
||||
CommandCSBan(Module *creator) : Command(creator, "chanserv/ban", 2, 4)
|
||||
{
|
||||
this->SetDesc(_("Bans a given nick or mask on a channel"));
|
||||
this->SetSyntax(_("\037channel\037 [+\037expiry\037] \037nick\037 [\037reason\037]"));
|
||||
this->SetSyntax(_("\037channel\037 [+\037expiry\037] \037mask\037 [\037reason\037]"));
|
||||
this->SetSyntax(_("\037channel\037 [+\037expiry\037] {\037nick\037 | \037mask\037} [\037reason\037]"));
|
||||
}
|
||||
|
||||
void Execute(CommandSource &source, const std::vector<Anope::string> ¶ms) anope_override
|
||||
@@ -53,11 +51,28 @@ class CommandCSBan : public Command
|
||||
return;
|
||||
}
|
||||
|
||||
Channel *c = ci->c;
|
||||
if (c == NULL)
|
||||
{
|
||||
source.Reply(CHAN_X_NOT_IN_USE, chan.c_str());
|
||||
return;
|
||||
}
|
||||
else if (IRCD->GetMaxListFor(c) && c->HasMode("BAN") >= IRCD->GetMaxListFor(c))
|
||||
{
|
||||
source.Reply(_("The ban list for %s is full."), c->name.c_str());
|
||||
return;
|
||||
}
|
||||
|
||||
Anope::string expiry, target, reason;
|
||||
time_t ban_time;
|
||||
if (params[1][0] == '+')
|
||||
{
|
||||
ban_time = Anope::DoTime(params[1]);
|
||||
if (ban_time == -1)
|
||||
{
|
||||
source.Reply(BAD_EXPIRY_TIME);
|
||||
return;
|
||||
}
|
||||
if (params.size() < 3)
|
||||
{
|
||||
this->SendSyntax(source);
|
||||
@@ -79,30 +94,28 @@ class CommandCSBan : public Command
|
||||
reason += " " + params[3];
|
||||
}
|
||||
|
||||
if (reason.length() > Config->CSReasonMax)
|
||||
reason = reason.substr(0, Config->CSReasonMax);
|
||||
unsigned reasonmax = Config->GetModule("chanserv")->Get<unsigned>("reasonmax", "200");
|
||||
if (reason.length() > reasonmax)
|
||||
reason = reason.substr(0, reasonmax);
|
||||
|
||||
Channel *c = ci->c;
|
||||
User *u = source.GetUser();
|
||||
User *u2 = User::Find(target, true);
|
||||
|
||||
AccessGroup u_access = source.AccessFor(ci);
|
||||
|
||||
if (!c)
|
||||
source.Reply(CHAN_X_NOT_IN_USE, chan.c_str());
|
||||
else if (!u_access.HasPriv("BAN"))
|
||||
if (!u_access.HasPriv("BAN") && !source.HasPriv("chanserv/kick"))
|
||||
source.Reply(ACCESS_DENIED);
|
||||
else if (u2)
|
||||
{
|
||||
AccessGroup u2_access = ci->AccessFor(u2);
|
||||
|
||||
if (u != u2 && ci->HasExt("PEACE") && u2_access >= u_access)
|
||||
if (u != u2 && ci->HasExt("PEACE") && u2_access >= u_access && !source.HasPriv("chanserv/kick"))
|
||||
source.Reply(ACCESS_DENIED);
|
||||
/*
|
||||
* Dont ban/kick the user on channels where he is excepted
|
||||
* to prevent services <-> server wars.
|
||||
*/
|
||||
else if (ci->c->MatchesList(u2, "EXCEPT"))
|
||||
else if (c->MatchesList(u2, "EXCEPT"))
|
||||
source.Reply(CHAN_EXCEPTED, u2->nick.c_str(), ci->name.c_str());
|
||||
else if (u2->IsProtected())
|
||||
source.Reply(ACCESS_DENIED);
|
||||
@@ -110,8 +123,8 @@ class CommandCSBan : public Command
|
||||
{
|
||||
Anope::string mask = ci->GetIdealBan(u2);
|
||||
|
||||
// XXX need a way to detect if someone is overriding
|
||||
Log(LOG_COMMAND, source, this, ci) << "for " << mask;
|
||||
bool override = !u_access.HasPriv("BAN") || (u != u2 && ci->HasExt("PEACE") && u2_access >= u_access);
|
||||
Log(override ? LOG_OVERRIDE : LOG_COMMAND, source, this, ci) << "for " << mask;
|
||||
|
||||
if (!c->HasMode("BAN", mask))
|
||||
{
|
||||
@@ -133,9 +146,11 @@ class CommandCSBan : public Command
|
||||
c->Kick(ci->WhoSends(), u2, "%s", reason.c_str());
|
||||
}
|
||||
}
|
||||
else if (u_access.HasPriv("FOUNDER"))
|
||||
else
|
||||
{
|
||||
Log(LOG_COMMAND, source, this, ci) << "for " << target;
|
||||
bool founder = u_access.HasPriv("FOUNDER");
|
||||
bool override = !founder && !u_access.HasPriv("BAN");
|
||||
Log(override ? LOG_OVERRIDE : LOG_COMMAND, source, this, ci) << "for " << target;
|
||||
|
||||
if (!c->HasMode("BAN", target))
|
||||
{
|
||||
@@ -150,7 +165,8 @@ class CommandCSBan : public Command
|
||||
int matched = 0, kicked = 0;
|
||||
for (Channel::ChanUserList::iterator it = c->users.begin(), it_end = c->users.end(); it != it_end;)
|
||||
{
|
||||
ChanUserContainer *uc = *it++;
|
||||
ChanUserContainer *uc = it->second;
|
||||
++it;
|
||||
|
||||
if (Anope::Match(uc->user->nick, target) || Anope::Match(uc->user->GetDisplayedMask(), target))
|
||||
{
|
||||
@@ -158,6 +174,8 @@ class CommandCSBan : public Command
|
||||
|
||||
AccessGroup u2_access = ci->AccessFor(uc->user);
|
||||
|
||||
if (matched > 1 && !founder)
|
||||
continue;
|
||||
if (u != uc->user && ci->HasExt("PEACE") && u2_access >= u_access)
|
||||
continue;
|
||||
else if (ci->c->MatchesList(uc->user, "EXCEPT"))
|
||||
@@ -178,8 +196,6 @@ class CommandCSBan : public Command
|
||||
else
|
||||
source.Reply(_("No users on %s match %s."), c->name.c_str(), target.c_str());
|
||||
}
|
||||
else
|
||||
source.Reply(NICK_X_NOT_IN_USE, target.c_str());
|
||||
}
|
||||
|
||||
bool OnHelp(CommandSource &source, const Anope::string &subcommand) anope_override
|
||||
@@ -201,9 +217,8 @@ class CSBan : public Module
|
||||
CommandCSBan commandcsban;
|
||||
|
||||
public:
|
||||
CSBan(const Anope::string &modname, const Anope::string &creator) : Module(modname, creator, CORE), commandcsban(this)
|
||||
CSBan(const Anope::string &modname, const Anope::string &creator) : Module(modname, creator, VENDOR), commandcsban(this)
|
||||
{
|
||||
this->SetAuthor("Anope");
|
||||
me = this;
|
||||
}
|
||||
};
|
||||
|
||||
@@ -9,9 +9,8 @@
|
||||
* Based on the original code of Services by Andy Church.
|
||||
*/
|
||||
|
||||
/*************************************************************************/
|
||||
|
||||
#include "module.h"
|
||||
#include "modules/bs_badwords.h"
|
||||
|
||||
class CommandCSClone : public Command
|
||||
{
|
||||
@@ -28,17 +27,19 @@ public:
|
||||
const Anope::string &target = params[1];
|
||||
Anope::string what = params.size() > 2 ? params[2] : "";
|
||||
|
||||
User *u = source.GetUser();
|
||||
ChannelInfo *ci = ChannelInfo::Find(params[0]);
|
||||
if (ci == NULL)
|
||||
if (Anope::ReadOnly)
|
||||
{
|
||||
source.Reply(CHAN_X_NOT_REGISTERED, params[0].c_str());
|
||||
source.Reply(READ_ONLY_MODE);
|
||||
return;
|
||||
}
|
||||
|
||||
if (!source.AccessFor(ci).HasPriv("SET"))
|
||||
User *u = source.GetUser();
|
||||
ChannelInfo *ci = ChannelInfo::Find(params[0]);
|
||||
bool override = false;
|
||||
|
||||
if (ci == NULL)
|
||||
{
|
||||
source.Reply(ACCESS_DENIED);
|
||||
source.Reply(CHAN_X_NOT_REGISTERED, params[0].c_str());
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -50,8 +51,13 @@ public:
|
||||
}
|
||||
if (!source.IsFounder(ci) || !source.IsFounder(target_ci))
|
||||
{
|
||||
source.Reply(ACCESS_DENIED);
|
||||
return;
|
||||
if (!source.HasPriv("chanserv/administration"))
|
||||
{
|
||||
source.Reply(ACCESS_DENIED);
|
||||
return;
|
||||
}
|
||||
else
|
||||
override = true;
|
||||
}
|
||||
|
||||
if (what.equals_ci("ALL"))
|
||||
@@ -64,31 +70,18 @@ public:
|
||||
target_ci->name = target;
|
||||
(*RegisteredChannelList)[target_ci->name] = target_ci;
|
||||
target_ci->c = Channel::Find(target_ci->name);
|
||||
|
||||
target_ci->bi = NULL;
|
||||
if (ci->bi)
|
||||
ci->bi->Assign(u, target_ci);
|
||||
|
||||
if (target_ci->c)
|
||||
{
|
||||
target_ci->c->ci = target_ci;
|
||||
|
||||
target_ci->c->CheckModes();
|
||||
|
||||
ChannelMode *cm;
|
||||
if (u && u->FindChannel(target_ci->c) != NULL)
|
||||
{
|
||||
/* On most ircds you do not receive the admin/owner mode till its registered */
|
||||
if ((cm = ModeManager::FindChannelModeByName("OWNER")))
|
||||
target_ci->c->SetMode(NULL, cm, u->GetUID());
|
||||
else if ((cm = ModeManager::FindChannelModeByName("PROTECT")))
|
||||
target_ci->c->RemoveMode(NULL, cm, u->GetUID());
|
||||
}
|
||||
|
||||
/* Mark the channel as persistent */
|
||||
if (target_ci->c->HasMode("PERM"))
|
||||
target_ci->ExtendMetadata("PERSIST");
|
||||
/* Persist may be in def cflags, set it here */
|
||||
else if (target_ci->HasExt("PERSIST") && (cm = ModeManager::FindChannelModeByName("PERM")))
|
||||
target_ci->c->SetMode(NULL, cm);
|
||||
|
||||
if (target_ci->bi && target_ci->c->FindUser(target_ci->bi) == NULL)
|
||||
target_ci->bi->Join(target_ci->c, &ModeManager::DefaultBotModes);
|
||||
target_ci->c->SetCorrectModes(u, true);
|
||||
}
|
||||
|
||||
if (target_ci->c && !target_ci->c->topic.empty())
|
||||
@@ -100,7 +93,7 @@ public:
|
||||
else
|
||||
target_ci->last_topic_setter = source.service->nick;
|
||||
|
||||
FOREACH_MOD(I_OnChanRegistered, OnChanRegistered(target_ci));
|
||||
FOREACH_MOD(OnChanRegistered, (target_ci));
|
||||
|
||||
source.Reply(_("All settings from \002%s\002 have been cloned to \002%s\002."), channel.c_str(), target.c_str());
|
||||
}
|
||||
@@ -140,12 +133,16 @@ public:
|
||||
}
|
||||
else if (what.equals_ci("BADWORDS"))
|
||||
{
|
||||
target_ci->ClearBadWords();
|
||||
for (unsigned i = 0; i < ci->GetBadWordCount(); ++i)
|
||||
{
|
||||
const BadWord *bw = ci->GetBadWord(i);
|
||||
target_ci->AddBadWord(bw->word, bw->type);
|
||||
}
|
||||
BadWords *target_badwords = target_ci->GetExt<BadWords>("badwords"),
|
||||
*badwords = ci->Require<BadWords>("badwords");
|
||||
if (target_badwords)
|
||||
target_badwords->ClearBadWords();
|
||||
if (badwords)
|
||||
for (unsigned i = 0; i < badwords->GetBadWordCount(); ++i)
|
||||
{
|
||||
const BadWord *bw = badwords->GetBadWord(i);
|
||||
target_badwords->AddBadWord(bw->word, bw->type);
|
||||
}
|
||||
|
||||
source.Reply(_("All badword entries from \002%s\002 have been cloned to \002%s\002."), channel.c_str(), target.c_str());
|
||||
}
|
||||
@@ -155,9 +152,7 @@ public:
|
||||
return;
|
||||
}
|
||||
|
||||
Log(LOG_COMMAND, source, this, ci) << "to clone " << (what.empty() ? "everything from it" : what) << " to " << target_ci->name;
|
||||
|
||||
return;
|
||||
Log(override ? LOG_OVERRIDE : LOG_COMMAND, source, this, ci) << "to clone " << (what.empty() ? "everything from it" : what) << " to " << target_ci->name;
|
||||
}
|
||||
|
||||
bool OnHelp(CommandSource &source, const Anope::string &subcommand) anope_override
|
||||
@@ -177,9 +172,8 @@ class CSClone : public Module
|
||||
CommandCSClone commandcsclone;
|
||||
|
||||
public:
|
||||
CSClone(const Anope::string &modname, const Anope::string &creator) : Module(modname, creator, CORE), commandcsclone(this)
|
||||
CSClone(const Anope::string &modname, const Anope::string &creator) : Module(modname, creator, VENDOR), commandcsclone(this)
|
||||
{
|
||||
this->SetAuthor("Anope");
|
||||
|
||||
}
|
||||
};
|
||||
|
||||
@@ -9,24 +9,22 @@
|
||||
* Based on the original code of Services by Andy Church.
|
||||
*/
|
||||
|
||||
/*************************************************************************/
|
||||
|
||||
#include "module.h"
|
||||
|
||||
class CommandCSDrop : public Command
|
||||
{
|
||||
public:
|
||||
CommandCSDrop(Module *creator) : Command(creator, "chanserv/drop", 1, 1)
|
||||
CommandCSDrop(Module *creator) : Command(creator, "chanserv/drop", 1, 2)
|
||||
{
|
||||
this->SetDesc(_("Cancel the registration of a channel"));
|
||||
this->SetSyntax(_("\037channel\037"));
|
||||
this->SetSyntax(_("\037channel\037 \037channel\037"));
|
||||
}
|
||||
|
||||
void Execute(CommandSource &source, const std::vector<Anope::string> ¶ms) anope_override
|
||||
{
|
||||
const Anope::string &chan = params[0];
|
||||
|
||||
if (Anope::ReadOnly)
|
||||
if (Anope::ReadOnly && !source.HasPriv("chanserv/administration"))
|
||||
{
|
||||
source.Reply(_("Sorry, channel de-registration is temporarily disabled.")); // XXX: READ_ONLY_MODE?
|
||||
return;
|
||||
@@ -39,9 +37,9 @@ class CommandCSDrop : public Command
|
||||
return;
|
||||
}
|
||||
|
||||
if (ci->HasExt("SUSPENDED") && !source.HasCommand("chanserv/drop"))
|
||||
if (params.size() < 2 || !chan.equals_ci(params[1]))
|
||||
{
|
||||
source.Reply(CHAN_X_SUSPENDED, chan.c_str());
|
||||
source.Reply(_("You must enter the channel name twice as a confirmation that you wish to drop \002%s\002."), chan.c_str());
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -51,20 +49,21 @@ class CommandCSDrop : public Command
|
||||
return;
|
||||
}
|
||||
|
||||
EventReturn MOD_RESULT;
|
||||
FOREACH_RESULT(OnChanDrop, MOD_RESULT, (source, ci));
|
||||
if (MOD_RESULT == EVENT_STOP)
|
||||
return;
|
||||
|
||||
bool override = (ci->HasExt("SECUREFOUNDER") ? !source.IsFounder(ci) : !source.AccessFor(ci).HasPriv("FOUNDER"));
|
||||
Log(override ? LOG_OVERRIDE : LOG_COMMAND, source, this, ci) << "(founder was: " << (ci->GetFounder() ? ci->GetFounder()->display : "none") << ")";
|
||||
|
||||
FOREACH_MOD(I_OnChanDrop, OnChanDrop(ci));
|
||||
|
||||
Channel *c = ci->c;
|
||||
Reference<Channel> c = ci->c;
|
||||
delete ci;
|
||||
|
||||
source.Reply(_("Channel \002%s\002 has been dropped."), chan.c_str());
|
||||
|
||||
if (c)
|
||||
c->CheckModes();
|
||||
|
||||
return;
|
||||
}
|
||||
|
||||
bool OnHelp(CommandSource &source, const Anope::string &subcommand) anope_override
|
||||
@@ -87,9 +86,8 @@ class CSDrop : public Module
|
||||
CommandCSDrop commandcsdrop;
|
||||
|
||||
public:
|
||||
CSDrop(const Anope::string &modname, const Anope::string &creator) : Module(modname, creator, CORE), commandcsdrop(this)
|
||||
CSDrop(const Anope::string &modname, const Anope::string &creator) : Module(modname, creator, VENDOR), commandcsdrop(this)
|
||||
{
|
||||
this->SetAuthor("Anope");
|
||||
|
||||
}
|
||||
};
|
||||
|
||||
@@ -27,17 +27,17 @@ class CommandCSEnforce : public Command
|
||||
* if it's off.
|
||||
*/
|
||||
bool hadsecureops = ci->HasExt("SECUREOPS");
|
||||
ci->ExtendMetadata("SECUREOPS");
|
||||
ci->Extend<bool>("SECUREOPS");
|
||||
|
||||
for (Channel::ChanUserList::iterator it = ci->c->users.begin(), it_end = ci->c->users.end(); it != it_end; ++it)
|
||||
{
|
||||
ChanUserContainer *uc = *it;
|
||||
ChanUserContainer *uc = it->second;
|
||||
|
||||
ci->c->SetCorrectModes(uc->user, false, false);
|
||||
ci->c->SetCorrectModes(uc->user, false);
|
||||
}
|
||||
|
||||
if (!hadsecureops)
|
||||
ci->Shrink("SECUREOPS");
|
||||
ci->Shrink<bool>("SECUREOPS");
|
||||
|
||||
source.Reply(_("Secureops enforced on %s."), ci->name.c_str());
|
||||
}
|
||||
@@ -50,7 +50,7 @@ class CommandCSEnforce : public Command
|
||||
std::vector<User *> users;
|
||||
for (Channel::ChanUserList::iterator it = ci->c->users.begin(), it_end = ci->c->users.end(); it != it_end; ++it)
|
||||
{
|
||||
ChanUserContainer *uc = *it;
|
||||
ChanUserContainer *uc = it->second;
|
||||
User *user = uc->user;
|
||||
|
||||
if (user->IsProtected())
|
||||
@@ -81,7 +81,7 @@ class CommandCSEnforce : public Command
|
||||
std::vector<User *> users;
|
||||
for (Channel::ChanUserList::iterator it = ci->c->users.begin(), it_end = ci->c->users.end(); it != it_end; ++it)
|
||||
{
|
||||
ChanUserContainer *uc = *it;
|
||||
ChanUserContainer *uc = it->second;
|
||||
User *user = uc->user;
|
||||
|
||||
if (user->IsProtected())
|
||||
@@ -113,7 +113,7 @@ class CommandCSEnforce : public Command
|
||||
std::vector<User *> users;
|
||||
for (Channel::ChanUserList::iterator it = ci->c->users.begin(), it_end = ci->c->users.end(); it != it_end; ++it)
|
||||
{
|
||||
ChanUserContainer *uc = *it;
|
||||
ChanUserContainer *uc = it->second;
|
||||
User *user = uc->user;
|
||||
|
||||
if (user->IsProtected())
|
||||
@@ -145,7 +145,7 @@ class CommandCSEnforce : public Command
|
||||
std::vector<User *> users;
|
||||
for (Channel::ChanUserList::iterator it = ci->c->users.begin(), it_end = ci->c->users.end(); it != it_end; ++it)
|
||||
{
|
||||
ChanUserContainer *uc = *it;
|
||||
ChanUserContainer *uc = it->second;
|
||||
User *user = uc->user;
|
||||
|
||||
if (user->IsProtected())
|
||||
@@ -195,7 +195,7 @@ class CommandCSEnforce : public Command
|
||||
/* The newer users are at the end of the list, so kick users starting from the end */
|
||||
for (Channel::ChanUserList::reverse_iterator it = ci->c->users.rbegin(), it_end = ci->c->users.rend(); it != it_end; ++it)
|
||||
{
|
||||
ChanUserContainer *uc = *it;
|
||||
ChanUserContainer *uc = it->second;
|
||||
User *user = uc->user;
|
||||
|
||||
if (user->IsProtected())
|
||||
@@ -282,10 +282,9 @@ class CSEnforce : public Module
|
||||
CommandCSEnforce commandcsenforce;
|
||||
|
||||
public:
|
||||
CSEnforce(const Anope::string &modname, const Anope::string &creator) : Module(modname, creator, CORE),
|
||||
CSEnforce(const Anope::string &modname, const Anope::string &creator) : Module(modname, creator, VENDOR),
|
||||
commandcsenforce(this)
|
||||
{
|
||||
this->SetAuthor("Anope");
|
||||
|
||||
}
|
||||
};
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user