mirror of
https://github.com/anope/anope.git
synced 2026-06-18 00:04:46 +02:00
Compare commits
110 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| 87cf324d13 | |||
| 8b2a29a0b0 | |||
| bd7f0050d2 | |||
| 1eb26e8a38 | |||
| 52ee467755 | |||
| d179c0351e | |||
| 6ca027db00 | |||
| 08bebeb9f0 | |||
| 52063fe05f | |||
| 20a8fcc574 | |||
| e0331dae2a | |||
| bee669b42e | |||
| be965f2618 | |||
| 62ca6c96eb | |||
| cadeac2dea | |||
| c5e03de667 | |||
| 6ce719437f | |||
| 88658a12f3 | |||
| 9256b051fc | |||
| 20ca0c76e0 | |||
| 9cc2ea8a56 | |||
| e62ca67d2e | |||
| e4eb3f1cc5 | |||
| 319a523b4f | |||
| cfe1317b5d | |||
| 50a2dd227f | |||
| b33ebc0058 | |||
| 6e151a693a | |||
| 838de2f5b8 | |||
| 5cc5d0effd | |||
| ca27e1e60f | |||
| 73175a0187 | |||
| dc32f6945e | |||
| 0489b47236 | |||
| 4fbcc7f391 | |||
| 6e26d96a44 | |||
| d3d77c5893 | |||
| 6c163e53d8 | |||
| 5ae45d96af | |||
| e2af62352d | |||
| c2681733df | |||
| f6c093ae23 | |||
| 2c3ee456c1 | |||
| 5e55a223c9 | |||
| 0fffae7bb5 | |||
| 989a2da73a | |||
| 213f3dd41b | |||
| 1c84a5e3c9 | |||
| f721e0974e | |||
| 7da2364b69 | |||
| fa0c6ba821 | |||
| dee4574ae7 | |||
| 61396e8c01 | |||
| 32e5339b54 | |||
| c4e0c41f11 | |||
| b2ee8a5b4b | |||
| 4b05ec26b7 | |||
| e1fe7e17d3 | |||
| e6fa71af9d | |||
| 1ce39c8e76 | |||
| 88785bfdef | |||
| 815df5c292 | |||
| 0016106772 | |||
| 253cca7b3b | |||
| 71c3d7608a | |||
| f4c565aa08 | |||
| 8843e89e9f | |||
| 8562445038 | |||
| fb1014a53c | |||
| 0ea89852d0 | |||
| 5a56f95b35 | |||
| ebab5b4f1d | |||
| 8a8cee4061 | |||
| 1d59b05e29 | |||
| 002128217c | |||
| 0bb51f6551 | |||
| 28ce7bccb6 | |||
| a70ef47359 | |||
| 90ac540960 | |||
| 909a77efb9 | |||
| 59c8867e64 | |||
| 08d47a5dad | |||
| 41403c7e36 | |||
| b8ef28509c | |||
| cf6e56130a | |||
| a3f6ffd2c7 | |||
| b9554f8539 | |||
| 84dc0f3cc8 | |||
| 75f764e353 | |||
| 302c4f334e | |||
| 5148b349b7 | |||
| bbe31a6a38 | |||
| 8cb310c72e | |||
| 4a1ad182d4 | |||
| 75a893b18d | |||
| 753db88ae9 | |||
| 9f6f0b445b | |||
| dfa0bf5e5d | |||
| cc35c22d2a | |||
| 1dafc96521 | |||
| 5d1dd21887 | |||
| 8b6c6fdd81 | |||
| 1a5d49b7f6 | |||
| 0b3e55ed8f | |||
| 7a09cebcfb | |||
| da5c68f274 | |||
| 9782c1f94b | |||
| ee6b022f4d | |||
| 85b0e9d02f | |||
| f03e802f58 |
@@ -4,6 +4,7 @@ on:
|
||||
push:
|
||||
schedule:
|
||||
- cron: '0 0 * * 0'
|
||||
workflow_dispatch:
|
||||
jobs:
|
||||
build:
|
||||
if: "!contains(github.event.head_commit.message, '[skip alpine ci]')"
|
||||
|
||||
@@ -1,7 +1,10 @@
|
||||
name: Ubuntu CI
|
||||
on:
|
||||
- pull_request
|
||||
- push
|
||||
pull_request:
|
||||
push:
|
||||
schedule:
|
||||
- cron: '0 0 * * 0'
|
||||
workflow_dispatch:
|
||||
jobs:
|
||||
build:
|
||||
if: "!contains(github.event.head_commit.message, '[skip ubuntu ci]')"
|
||||
|
||||
@@ -7,6 +7,7 @@ on:
|
||||
- published
|
||||
schedule:
|
||||
- cron: '0 0 * * 0'
|
||||
workflow_dispatch:
|
||||
jobs:
|
||||
build:
|
||||
if: "!contains(github.event.head_commit.message, '[skip windows ci]')"
|
||||
@@ -66,3 +67,10 @@ jobs:
|
||||
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||
run: |
|
||||
gh release upload ${{ github.event.release.tag_name }} $(Get-ChildItem anope-*.exe)
|
||||
|
||||
- name: Upload artifact
|
||||
if: "${{ github.event_name != 'release' }}"
|
||||
uses: actions/upload-artifact@v4
|
||||
with:
|
||||
name: windows-installer
|
||||
path: ${{ github.workspace }}\build\\anope-*.exe
|
||||
|
||||
@@ -14,5 +14,6 @@ modules/ssl_openssl.cpp
|
||||
modules/stats
|
||||
modules/xmlrpc.cpp
|
||||
run/
|
||||
*.diff
|
||||
*.mo
|
||||
*.pot
|
||||
|
||||
+29
-130
@@ -1,22 +1,12 @@
|
||||
# This usage of CMake requires at least version 3.20
|
||||
cmake_minimum_required(VERSION 3.20 FATAL_ERROR)
|
||||
|
||||
# Set the project as C++ primarily, but have C enabled for the checks required later
|
||||
# Set the project as C++ primarily
|
||||
project(Anope CXX)
|
||||
enable_language(C)
|
||||
|
||||
# Override the module include path to include our directory, for our Anope.cmake, as well as we are using our own version of the NSIS template
|
||||
set(CMAKE_MODULE_PATH ${Anope_SOURCE_DIR}/cmake)
|
||||
|
||||
include(Anope)
|
||||
|
||||
# Force the locale to C for later uses of things like gcc so the messages come up in English, not the user's default language
|
||||
set(ENV{LC_ALL} C)
|
||||
|
||||
# Start with empty defaults for library and include directories, to be used by GNU compilers only
|
||||
set(DEFAULT_LIBRARY_DIRS)
|
||||
set(DEFAULT_INCLUDE_DIRS)
|
||||
|
||||
# We require C++17 to build
|
||||
set(CMAKE_CXX_EXTENSIONS OFF)
|
||||
set(CMAKE_CXX_STANDARD 17)
|
||||
@@ -25,81 +15,9 @@ set(CMAKE_CXX_STANDARD_REQUIRED ON)
|
||||
# Put modules in their own folder
|
||||
set_property(GLOBAL PROPERTY USE_FOLDERS ON)
|
||||
|
||||
# If we are using a GNU compiler (have to use CXX because it seems to fail on C), we will be able to determine it's default paths for libraries and includes
|
||||
if(CMAKE_COMPILER_IS_GNUCXX OR "${CMAKE_CXX_COMPILER_ID}" MATCHES "Clang$")
|
||||
# First look for the compiler's default library directories
|
||||
execute_process(COMMAND ${CMAKE_C_COMPILER} -print-search-dirs OUTPUT_VARIABLE LINES OUTPUT_STRIP_TRAILING_WHITESPACE)
|
||||
# Find only the part after "libraries: "
|
||||
string(REGEX REPLACE ".*\nlibraries: (.*)$" "\\1" LINE "${LINES}")
|
||||
# Replace the colons in the list with semicolons
|
||||
string(REGEX REPLACE ":" ";" LIBRARIES ${LINE})
|
||||
# Iterate through the libraries
|
||||
foreach(LIBRARY ${LIBRARIES})
|
||||
# Check if the first character is an equal sign, and skip that library directory as it is (I believe) the primary default and shows up later in the list anyways
|
||||
string(SUBSTRING ${LIBRARY} 0 1 FIRST_CHAR)
|
||||
if(NOT FIRST_CHAR STREQUAL "=")
|
||||
# If the directory had no = in front of it, make sure it's absolute and add it to the list of default library directories
|
||||
get_filename_component(LIBRARY ${LIBRARY} ABSOLUTE)
|
||||
list(APPEND DEFAULT_LIBRARY_DIRS ${LIBRARY})
|
||||
endif()
|
||||
endforeach()
|
||||
# Remove duplicate entries from the list
|
||||
if(DEFAULT_LIBRARY_DIRS)
|
||||
list(REMOVE_DUPLICATES DEFAULT_LIBRARY_DIRS)
|
||||
endif()
|
||||
# Create a temporary file to test for the default include directories
|
||||
FILE(WRITE empty.cpp "")
|
||||
# Next, we look for the compiler's default include directories
|
||||
# Run the command to find the default include directories
|
||||
execute_process(COMMAND ${CMAKE_C_COMPILER} -v -x c++ -E ${CMAKE_CURRENT_SOURCE_DIR}/empty.cpp ERROR_VARIABLE LINES OUTPUT_QUIET ERROR_STRIP_TRAILING_WHITESPACE)
|
||||
# Remove the empty file, it is no longer needed
|
||||
FILE(REMOVE empty.cpp)
|
||||
# Convert the new lines to semicolons
|
||||
string(REGEX REPLACE "\n" ";" LINES ${LINES})
|
||||
# Temporary variable saying if we are in the search list or not
|
||||
set(IN_SEARCH_LIST FALSE)
|
||||
# Iterate through the lines
|
||||
foreach(LINE ${LINES})
|
||||
# If the line has the following on it, the next lines will contain directory names
|
||||
if(LINE STREQUAL "#include <...> search starts here:")
|
||||
set(IN_SEARCH TRUE)
|
||||
else()
|
||||
# If the line has the following on it, we hit the end of the list
|
||||
if(LINE STREQUAL "End of search list.")
|
||||
set(IN_SEARCH FALSE)
|
||||
else()
|
||||
# If we are within the block between the above two lines...
|
||||
if(IN_SEARCH)
|
||||
# Get everything but the first character of the line
|
||||
string(LENGTH ${LINE} LINE_LENGTH)
|
||||
math(EXPR LINE_LENGTH "${LINE_LENGTH} - 1")
|
||||
string(SUBSTRING ${LINE} 1 ${LINE_LENGTH} INCLUDE)
|
||||
# For systems like Mac OS X, look for include paths that say " (framework directory)" at the end of them and strip that off
|
||||
string(REGEX REPLACE " \\(framework directory\\)$" "" INCLUDE ${INCLUDE})
|
||||
# Convert the path to an absolute one, just in case it wasn't
|
||||
get_filename_component(INCLUDE ${INCLUDE} ABSOLUTE)
|
||||
# Add that directory to the list of default include directories
|
||||
list(APPEND DEFAULT_INCLUDE_DIRS ${INCLUDE})
|
||||
endif()
|
||||
endif()
|
||||
endif()
|
||||
endforeach()
|
||||
# Remove duplicate entries from the list
|
||||
if(DEFAULT_INCLUDE_DIRS)
|
||||
list(REMOVE_DUPLICATES DEFAULT_INCLUDE_DIRS)
|
||||
endif()
|
||||
endif()
|
||||
|
||||
# If the user specifies -DCMAKE_BUILD_TYPE on the command line, take their definition
|
||||
# and dump it in the cache along with proper documentation, otherwise set CMAKE_BUILD_TYPE
|
||||
# to Debug
|
||||
# Only do this if not using Visual Studio
|
||||
if(NOT MSVC)
|
||||
if(CMAKE_BUILD_TYPE)
|
||||
set(CMAKE_BUILD_TYPE ${CMAKE_BUILD_TYPE} CACHE STRING "Choose the type of build, options are: None(CMAKE_CXX_FLAGS or CMAKE_C_FLAGS used) Debug Release RelWithDebInfo MinSizeRel.")
|
||||
else()
|
||||
set(CMAKE_BUILD_TYPE DEBUG CACHE STRING "Choose the type of build, options are: None(CMAKE_CXX_FLAGS or CMAKE_C_FLAGS used) Debug Release RelWithDebInfo MinSizeRel.")
|
||||
endif()
|
||||
if(CMAKE_BUILD_TYPE STREQUAL "")
|
||||
message(STATUS "CMAKE_BUILD_TYPE has not been specified; defaulting to Debug")
|
||||
set(CMAKE_BUILD_TYPE "Debug")
|
||||
endif()
|
||||
|
||||
# Include the checking functions used later in this CMakeLists.txt
|
||||
@@ -107,6 +25,7 @@ include(CheckFunctionExists)
|
||||
include(CheckTypeSize)
|
||||
include(CheckLibraryExists)
|
||||
include(CheckCXXCompilerFlag)
|
||||
include(FindPkgConfig)
|
||||
|
||||
# If extra include directories were specified, tell cmake about them.
|
||||
if(EXTRA_INCLUDE)
|
||||
@@ -121,7 +40,7 @@ endif()
|
||||
# setup conan
|
||||
if(EXISTS "${CMAKE_CURRENT_SOURCE_DIR}/conanbuildinfo.cmake")
|
||||
include("${CMAKE_CURRENT_SOURCE_DIR}/conanbuildinfo.cmake")
|
||||
conan_basic_setup()
|
||||
conan_basic_setup(TARGETS)
|
||||
endif()
|
||||
|
||||
# Find gettext
|
||||
@@ -130,6 +49,7 @@ find_package(Intl)
|
||||
if(GETTEXT_FOUND AND Intl_FOUND)
|
||||
set(HAVE_LOCALIZATION ON)
|
||||
include_directories(${Intl_INCLUDE_DIRS})
|
||||
link_libraries(${Intl_LIBRARY})
|
||||
else()
|
||||
message("Unable to find gettext and libintl; disabling localization")
|
||||
set(HAVE_LOCALIZATION OFF)
|
||||
@@ -149,28 +69,33 @@ endif()
|
||||
|
||||
# If using Visual Studio, set the C++ flags accordingly
|
||||
if(MSVC)
|
||||
# Remove the default exception handling flags, also remove default warning level flag
|
||||
string(REPLACE "/EHsc " "" CMAKE_CXX_FLAGS ${CMAKE_CXX_FLAGS})
|
||||
string(REPLACE "/GX " "" CMAKE_CXX_FLAGS ${CMAKE_CXX_FLAGS})
|
||||
string(REPLACE "/W3 " "" CMAKE_CXX_FLAGS ${CMAKE_CXX_FLAGS})
|
||||
# Set the compile flags to have warnings on the max setting (but disable a few annoying ones), exception handling turned on, the proper defines
|
||||
set(CXXFLAGS "${CXXFLAGS} /W4 /wd4100 /wd4127 /wd4250 /wd4251 /wd4267 /wd4275 /wd4355 /wd4706 /wd4800 /wd4996 /EHs")
|
||||
# Set the compile flags to have warnings on the max setting (but disable a few annoying ones), exception handling turned on
|
||||
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} /W4 /wd4100 /wd4127 /wd4250 /wd4251 /wd4267 /wd4275 /wd4355 /wd4706 /wd4800 /wd4996 /EHs")
|
||||
add_definitions(-D_CRT_SECURE_NO_WARNINGS)
|
||||
# Otherwise, we're not using Visual Studio
|
||||
else()
|
||||
# Set the compile flags to have all warnings on (including shadowed variables)
|
||||
set(CXXFLAGS "${CXXFLAGS} -fvisibility=hidden -fvisibility-inlines-hidden -Wall -Wextra -Wformat=2 -Wmissing-format-attribute -Wpedantic -Wno-format-nonliteral -Wno-format-zero-length -Wno-unused-parameter ${CMAKE_CXX_FLAGS}")
|
||||
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -fvisibility=hidden -fvisibility-inlines-hidden -Wall -Wextra -Wformat=2 -Wmissing-format-attribute -Wpedantic")
|
||||
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wno-format-nonliteral -Wno-format-y2k -Wno-format-zero-length -Wno-date-time -Wno-unused-parameter")
|
||||
endif()
|
||||
|
||||
# If CMake has found that the given system requires a special library for dl* calls, include it with the linker flags
|
||||
if(CMAKE_DL_LIBS)
|
||||
list(APPEND LINK_LIBS ${CMAKE_DL_LIBS})
|
||||
link_libraries(${CMAKE_DL_LIBS})
|
||||
endif()
|
||||
|
||||
# Find the linker flags required for using threads.
|
||||
find_package("Threads" REQUIRED)
|
||||
if(CMAKE_THREAD_LIBS_INIT)
|
||||
list(APPEND LINK_LIBS ${CMAKE_THREAD_LIBS_INIT})
|
||||
link_libraries(${CMAKE_THREAD_LIBS_INIT})
|
||||
endif()
|
||||
|
||||
# On Windows, also link Anope to the memory library and Winsock.
|
||||
if(WIN32)
|
||||
link_libraries("Ws2_32")
|
||||
if(MSVC)
|
||||
link_libraries("win32_memory")
|
||||
endif()
|
||||
endif()
|
||||
|
||||
if(NOT PROGRAM_NAME)
|
||||
@@ -183,7 +108,7 @@ if(NOT MSVC)
|
||||
check_cxx_compiler_flag(-pipe HAVE_PIPE_FLAG)
|
||||
# If the flag was accepted, add it to the list of flags
|
||||
if(HAVE_PIPE_FLAG)
|
||||
set(CXXFLAGS "${CXXFLAGS} -pipe")
|
||||
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -pipe")
|
||||
endif()
|
||||
endif()
|
||||
|
||||
@@ -197,7 +122,7 @@ if(NOT DEFUMASK)
|
||||
endif()
|
||||
|
||||
# Set the DEBUG_BUILD for sysconf.h
|
||||
if(CMAKE_BUILD_TYPE STREQUAL "DEBUG" OR CMAKE_BUILD_TYPE STREQUAL "RELWITHDEBINFO")
|
||||
if(CMAKE_BUILD_TYPE STREQUAL "Debug" OR CMAKE_BUILD_TYPE STREQUAL "RelWithDebInfo")
|
||||
set(CMAKE_EXPORT_COMPILE_COMMANDS ON)
|
||||
set(DEBUG_BUILD TRUE)
|
||||
endif()
|
||||
@@ -209,15 +134,6 @@ check_function_exists(epoll_wait HAVE_EPOLL)
|
||||
check_function_exists(poll HAVE_POLL)
|
||||
check_function_exists(kqueue HAVE_KQUEUE)
|
||||
|
||||
# Strip the leading and trailing spaces from the compile flags
|
||||
if(CXXFLAGS)
|
||||
string(STRIP ${CXXFLAGS} CXXFLAGS)
|
||||
endif()
|
||||
# Strip the leading and trailing spaces from the linker flags
|
||||
if(LDFLAGS)
|
||||
string(STRIP ${LDFLAGS} LDFLAGS)
|
||||
endif()
|
||||
|
||||
# Search for the following programs
|
||||
if(NOT WIN32 AND RUNGROUP)
|
||||
find_program(CHGRP "chgrp" REQUIRED)
|
||||
@@ -228,7 +144,7 @@ endif()
|
||||
if(INSTDIR)
|
||||
set(CMAKE_INSTALL_PREFIX "${INSTDIR}")
|
||||
elseif(NOT CMAKE_INSTALL_PREFIX)
|
||||
set(CMAKE_INSTALL_PREFIX "$ENV{HOME}/anope")
|
||||
set(CMAKE_INSTALL_PREFIX "$ENV{HOME}/anope-${VERSION_MAJOR}-${VERSION_MINOR}")
|
||||
endif()
|
||||
|
||||
# Set default paths for various directories if not already defined
|
||||
@@ -300,29 +216,13 @@ if(WIN32)
|
||||
configure_file(${Anope_SOURCE_DIR}/src/win32/win32.rc.cmake ${Anope_BINARY_DIR}/src/win32/win32.rc)
|
||||
endif()
|
||||
|
||||
# Add the initial files to ignore which will be ignored regardless of if you are building in-source or out-of-source
|
||||
add_to_cpack_ignored_files(".git\;config.cache\;CMakeFiles\;sysconf.h$\;build" TRUE)
|
||||
# Add the files we don't want the periods converted for
|
||||
add_to_cpack_ignored_files(".\\\\\\\\.so$;.\\\\\\\\.o$;.\\\\\\\\.s$;${Anope_SOURCE_DIR}/Makefile$")
|
||||
# If the two directories are the same, we are building in-source, thus we need to ignore more files from the build
|
||||
if(${Anope_SOURCE_DIR} STREQUAL ${Anope_BINARY_DIR})
|
||||
# Add the files that need their periods converted
|
||||
add_to_cpack_ignored_files("Makefile\;cmake_install.cmake\;sysconf.h$\;CMakeCache.txt\;install_manifest.txt" TRUE)
|
||||
# Add the files we don't want the periods converted for
|
||||
add_to_cpack_ignored_files(".\\\\\\\\.so$;CPack.;anope-${VERSION_FULL_NOBUILD}-source\\\\\\\\..")
|
||||
# If using Visual Studio, add these files as well
|
||||
if(MSVC)
|
||||
add_to_cpack_ignored_files(".vcproj$\;.sln$\;.ncb$\;.suo$\;.dir$\;.ilk$\;.exp$\;.pdb$\;.lib$\;/debug$;/release$;/relwithdebinfo$;/minsizerel$" TRUE)
|
||||
endif()
|
||||
endif()
|
||||
|
||||
# Get the filename of the Anope binary, to use later
|
||||
set(SERVICES_BINARY "$<TARGET_FILE:${PROGRAM_NAME}>")
|
||||
get_filename_component(SERVICES_BINARY ${SERVICES_BINARY} NAME)
|
||||
cmake_path(GET SERVICES_BINARY FILENAME SERVICES_BINARY)
|
||||
|
||||
# At install time, create the following additional directories
|
||||
get_filename_component(ABSOLUTE_DATA_DIR ${DATA_DIR} REALPATH BASE_DIR ${CMAKE_INSTALL_PREFIX})
|
||||
get_filename_component(ABSOLUTE_LOG_DIR ${LOG_DIR} REALPATH BASE_DIR ${CMAKE_INSTALL_PREFIX})
|
||||
file(REAL_PATH ${DATA_DIR} ABSOLUTE_DATA_DIR BASE_DIRECTORY ${CMAKE_INSTALL_PREFIX})
|
||||
file(REAL_PATH ${LOG_DIR} ABSOLUTE_LOG_DIR BASE_DIRECTORY ${CMAKE_INSTALL_PREFIX})
|
||||
install(CODE "file(MAKE_DIRECTORY \"\$ENV{DESTDIR}${ABSOLUTE_DATA_DIR}/backups\")")
|
||||
install(CODE "file(MAKE_DIRECTORY \"\$ENV{DESTDIR}${ABSOLUTE_LOG_DIR}\")")
|
||||
if(WIN32)
|
||||
@@ -341,7 +241,7 @@ if(WIN32)
|
||||
)
|
||||
endif()
|
||||
|
||||
get_filename_component(ABSOLUTE_MODULE_DIR ${MODULE_DIR} REALPATH BASE_DIR ${CMAKE_INSTALL_PREFIX})
|
||||
file(REAL_PATH ${MODULE_DIR} ABSOLUTE_MODULE_DIR BASE_DIRECTORY ${CMAKE_INSTALL_PREFIX})
|
||||
install(CODE "file(REMOVE_RECURSE \"$ENV{DESTDIR}${ABSOLUTE_MODULE_DIR}\")")
|
||||
|
||||
# Only process the CPack section if we have CPack
|
||||
@@ -353,7 +253,7 @@ if(EXISTS "${CMAKE_ROOT}/Modules/CPack.cmake")
|
||||
set(CPACK_PACKAGE_VERSION_MINOR ${VERSION_MINOR})
|
||||
set(CPACK_PACKAGE_VERSION_PATCH "${VERSION_PATCH}${VERSION_EXTRA}")
|
||||
set(CPACK_PACKAGE_FILE_NAME "anope-${VERSION_FULL_NOBUILD}")
|
||||
set(CPACK_RESOURCE_FILE_LICENSE "${Anope_SOURCE_DIR}/docs/COPYING")
|
||||
set(CPACK_RESOURCE_FILE_LICENSE "${Anope_SOURCE_DIR}/docs/LICENSE.txt")
|
||||
# The following doesn't actually do anything. :(
|
||||
#set(CPACK_RESOURCE_FILE_README "${Anope_SOURCE_DIR}/docs/README")
|
||||
# The following is primarily for NSIS
|
||||
@@ -384,7 +284,6 @@ if(EXISTS "${CMAKE_ROOT}/Modules/CPack.cmake")
|
||||
endif()
|
||||
set(CPACK_SOURCE_PACKAGE_FILE_NAME "anope-${VERSION_FULL_NOBUILD}-source")
|
||||
set(CPACK_SOURCE_GENERATOR "TGZ")
|
||||
set(CPACK_SOURCE_IGNORE_FILES "$ENV{CPACK_IGNORED_FILES}")
|
||||
set(CPACK_MONOLITHIC_INSTALL TRUE)
|
||||
include(CPack)
|
||||
endif()
|
||||
|
||||
@@ -1,17 +1,21 @@
|
||||
#!/bin/sh
|
||||
#
|
||||
# Configuration script for Anope.
|
||||
# Anope IRC Services <https://www.anope.org/>
|
||||
#
|
||||
# Anope (C) 2003-2025 Anope Team
|
||||
# Contact us at team@anope.org
|
||||
# Copyright (C) 2003-2025 Anope Contributors
|
||||
#
|
||||
# This program is free but copyrighted software; see the file COPYING for
|
||||
# details.
|
||||
# Anope is free software. You can use, modify, and/or distribute it under the
|
||||
# terms of version 2 of the GNU General Public License. See docs/LICENSE.txt
|
||||
# for the complete terms of this license and docs/AUTHORS.txt for a list of
|
||||
# contributors.
|
||||
#
|
||||
# Based on the original code of Epona by PegSoft.
|
||||
# Based on the original code of Services by Andy Church.
|
||||
# Based on the original code of Epona by Lara
|
||||
# Based on the original code of Services by Andy Church
|
||||
#
|
||||
###########################################################################
|
||||
# SPDX-License-Identifier: GPL-2.0-only
|
||||
|
||||
SOURCE_DIR="$(cd "$(dirname "$0")" && pwd)"
|
||||
. $SOURCE_DIR/src/version.sh
|
||||
|
||||
Load_Cache () {
|
||||
if [ -f $SOURCE_DIR/config.cache -a -r $SOURCE_DIR/config.cache -a ! "$IGNORE_CACHE" ] ; then
|
||||
@@ -32,29 +36,29 @@ Run_Build_System () {
|
||||
EXTRA_LIBS=""
|
||||
|
||||
if [ "$INSTDIR" != "" ] ; then
|
||||
WITH_INST="-DINSTDIR:STRING=$INSTDIR"
|
||||
WITH_INST="-DINSTDIR=$INSTDIR"
|
||||
fi
|
||||
|
||||
if [ "$RUNGROUP" != "" ] ; then
|
||||
WITH_RUN="-DRUNGROUP:STRING=$RUNGROUP"
|
||||
WITH_RUN="-DRUNGROUP=$RUNGROUP"
|
||||
fi
|
||||
|
||||
if [ "$UMASK" != "" ] ; then
|
||||
WITH_PERM="-DDEFUMASK:STRING=$UMASK"
|
||||
WITH_PERM="-DDEFUMASK=$UMASK"
|
||||
fi
|
||||
|
||||
if [ "$DEBUG" = "yes" ] ; then
|
||||
BUILD_TYPE="-DCMAKE_BUILD_TYPE:STRING=DEBUG"
|
||||
BUILD_TYPE="-DCMAKE_BUILD_TYPE=Debug"
|
||||
else
|
||||
BUILD_TYPE="-DCMAKE_BUILD_TYPE:STRING=RELEASE"
|
||||
BUILD_TYPE="-DCMAKE_BUILD_TYPE=Release"
|
||||
fi
|
||||
|
||||
if [ "$EXTRA_INCLUDE_DIRS" != "" ] ; then
|
||||
EXTRA_INCLUDE="-DEXTRA_INCLUDE:STRING=$EXTRA_INCLUDE_DIRS"
|
||||
EXTRA_INCLUDE="-DEXTRA_INCLUDE=$EXTRA_INCLUDE_DIRS"
|
||||
fi
|
||||
|
||||
if [ "$EXTRA_LIB_DIRS" != "" ] ; then
|
||||
EXTRA_LIBS="-DEXTRA_LIBS:STRING=$EXTRA_LIB_DIRS"
|
||||
EXTRA_LIBS="-DEXTRA_LIBS=$EXTRA_LIB_DIRS"
|
||||
fi
|
||||
|
||||
BUILD_PATHS="-B ${SOURCE_DIR}/build ${SOURCE_DIR}"
|
||||
@@ -80,7 +84,7 @@ Run_Build_System () {
|
||||
# Init values
|
||||
###########################################################################
|
||||
|
||||
INSTDIR=$HOME/anope
|
||||
INSTDIR="${HOME}/anope-${VERSION_MAJOR}.${VERSION_MINOR}"
|
||||
RUNGROUP=
|
||||
UMASK=
|
||||
DEBUG="no"
|
||||
@@ -88,7 +92,6 @@ EXTRA_INCLUDE_DIRS=
|
||||
EXTRA_LIB_DIRS=
|
||||
EXTRA_CONFIG_ARGS=
|
||||
CAN_QUICK="no"
|
||||
SOURCE_DIR="$(cd "$(dirname "$0")" && pwd)"
|
||||
|
||||
###########################################################################
|
||||
# Check out the options
|
||||
@@ -140,7 +143,6 @@ fi
|
||||
|
||||
if [ ! "$NO_INTRO" ] ; then
|
||||
export MORE='-e'
|
||||
. $SOURCE_DIR/src/version.sh
|
||||
cat $SOURCE_DIR/.BANNER | sed "s/CURVER/$VERSION_MAJOR.$VERSION_MINOR.$VERSION_PATCH$VERSION_EXTRA/" | sed "s@SOURCE_DIR@$SOURCE_DIR@" | more
|
||||
echo ""
|
||||
else
|
||||
|
||||
@@ -1,106 +0,0 @@
|
||||
###############################################################################
|
||||
# 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 SRC_LDFLAGS EXTRA_DEPENDS)
|
||||
# Set up a temporary LDFLAGS for this file
|
||||
set(THIS_LDFLAGS "${LDFLAGS}")
|
||||
# Reset extra dependencies
|
||||
set(EXTRA_DEPENDENCIES)
|
||||
# Reset library paths
|
||||
set(LIBRARY_PATHS)
|
||||
# Reset libraries
|
||||
set(LIBRARIES)
|
||||
# Check to see if there are any lines matching: /* RequiredLibraries: [something] */
|
||||
if(WIN32)
|
||||
file(STRINGS ${SRC} REQUIRED_LIBRARIES REGEX "/\\*[ \t]*RequiredWindowsLibraries:[ \t]*.*[ \t]*\\*/")
|
||||
else()
|
||||
file(STRINGS ${SRC} REQUIRED_LIBRARIES REGEX "/\\*[ \t]*RequiredLibraries:[ \t]*.*[ \t]*\\*/")
|
||||
endif()
|
||||
# Iterate through those lines
|
||||
foreach(REQUIRED_LIBRARY ${REQUIRED_LIBRARIES})
|
||||
# Strip off the /* RequiredLibraries: and */ from the line
|
||||
string(REGEX REPLACE "/\\*[ \t]*Required.*Libraries:[ \t]*([^ \t]*)[ \t]*\\*/" "\\1" REQUIRED_LIBRARY ${REQUIRED_LIBRARY})
|
||||
# Replace all commas with semicolons
|
||||
string(REGEX REPLACE "," ";" REQUIRED_LIBRARY ${REQUIRED_LIBRARY})
|
||||
# Iterate through the libraries given
|
||||
foreach(LIBRARY ${REQUIRED_LIBRARY})
|
||||
# If the library has multiple names extract the alternate.
|
||||
unset(LIBRARY_ALT)
|
||||
if (${LIBRARY} MATCHES "^.+\\|.+$")
|
||||
string(REGEX REPLACE ".+\\|(.*)" "\\1" LIBRARY_ALT ${LIBRARY})
|
||||
string(REGEX REPLACE "(.+)\\|.*" "\\1" LIBRARY ${LIBRARY})
|
||||
endif()
|
||||
# Locate the library to see if it exists
|
||||
if(DEFAULT_LIBRARY_DIRS OR DEFINED $ENV{VCINSTALLDIR})
|
||||
find_library(FOUND_${LIBRARY}_LIBRARY NAMES ${LIBRARY} ${LIBRARY_ALT} PATHS ${DEFAULT_LIBRARY_DIRS} $ENV{VCINSTALLDIR}/lib ${EXTRA_INCLUDE} ${EXTRA_LIBS})
|
||||
else()
|
||||
find_library(FOUND_${LIBRARY}_LIBRARY NAMES ${LIBRARY} ${LIBRARY_ALT} PATHS ${EXTRA_INCLUDE} ${EXTRA_LIBS} NO_DEFAULT_PATH)
|
||||
find_library(FOUND_${LIBRARY}_LIBRARY NAMES ${LIBRARY} ${LIBRARY_ALT} PATHS ${EXTRA_INCLUDE} ${EXTRA_LIBS})
|
||||
endif()
|
||||
# If the library was found, we will add it to the linker flags
|
||||
if(FOUND_${LIBRARY}_LIBRARY)
|
||||
if(MSVC)
|
||||
# For Visual Studio, instead of editing the linker flags, we'll add the library to a separate list of extra dependencies
|
||||
list(APPEND EXTRA_DEPENDENCIES "${FOUND_${LIBRARY}_LIBRARY}")
|
||||
else()
|
||||
# Get the path only of the library, to add it to library paths.
|
||||
get_filename_component(LIBRARY_PATH ${FOUND_${LIBRARY}_LIBRARY} PATH)
|
||||
list(APPEND LIBRARY_PATHS "${LIBRARY_PATH}")
|
||||
# Extract the library short name, add it to the library path
|
||||
get_filename_component(LIBRARY_NAME ${FOUND_${LIBRARY}_LIBRARY} NAME_WE)
|
||||
string(REGEX REPLACE "^lib" "" LIBRARY_NAME ${LIBRARY_NAME})
|
||||
list(APPEND LIBRARIES ${LIBRARY_NAME})
|
||||
endif()
|
||||
else()
|
||||
# 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()
|
||||
endforeach()
|
||||
endforeach()
|
||||
# Remove duplicates from the library paths
|
||||
if(LIBRARY_PATHS)
|
||||
list(REMOVE_DUPLICATES LIBRARY_PATHS)
|
||||
endif()
|
||||
# Remove diplicates from the libraries
|
||||
if(LIBRARIES)
|
||||
list(REMOVE_DUPLICATES LIBRARIES)
|
||||
endif()
|
||||
# Iterate through library paths and add them to the linker flags
|
||||
foreach(LIBRARY_PATH ${LIBRARY_PATHS})
|
||||
if(NOT "${LIBRARY_PATH}" IN_LIST DEFAULT_LIBRARY_DIRS)
|
||||
set(THIS_LDFLAGS "${THIS_LDFLAGS} -L${LIBRARY_PATH}")
|
||||
endif()
|
||||
endforeach()
|
||||
# Iterate through libraries and add them to the linker flags
|
||||
foreach(LIBRARY ${LIBRARIES})
|
||||
list(APPEND EXTRA_DEPENDENCIES "${LIBRARY}")
|
||||
endforeach()
|
||||
set(${SRC_LDFLAGS} "${THIS_LDFLAGS}")
|
||||
set(${EXTRA_DEPENDS} "${EXTRA_DEPENDENCIES}")
|
||||
endmacro()
|
||||
|
||||
###############################################################################
|
||||
# add_to_cpack_ignored_files(<item> [TRUE])
|
||||
#
|
||||
# A macro to update the environment variable CPACK_IGNORED_FILES which
|
||||
# contains a list of files for CPack to ignore. If the optional 2nd argument
|
||||
# of TRUE is given, periods will be converted to \\. for CPack.
|
||||
###############################################################################
|
||||
macro(add_to_cpack_ignored_files ITEM)
|
||||
# Temporary copy of the original item
|
||||
set(REAL_ITEM "${ITEM}")
|
||||
# If we have 2+ arguments, assume that the second one was something like TRUE (doesn't matter really) and convert periods so they will be \\. for CPack
|
||||
if(${ARGC} GREATER 1)
|
||||
string(REPLACE "." "\\\\." REAL_ITEM ${REAL_ITEM})
|
||||
endif()
|
||||
# If the environment variable is already defined, just tack the item to the end
|
||||
if(DEFINED ENV{CPACK_IGNORED_FILES})
|
||||
set(ENV{CPACK_IGNORED_FILES} "$ENV{CPACK_IGNORED_FILES};${REAL_ITEM}")
|
||||
# Otherwise set the environment variable to the item
|
||||
else()
|
||||
set(ENV{CPACK_IGNORED_FILES} "${REAL_ITEM}")
|
||||
endif()
|
||||
endmacro()
|
||||
@@ -1,825 +0,0 @@
|
||||
; CPack install script designed for a nmake build
|
||||
|
||||
;--------------------------------
|
||||
; You must define these values
|
||||
|
||||
!define VERSION "@CPACK_PACKAGE_VERSION@"
|
||||
!define INST_DIR "@CPACK_TEMPORARY_DIRECTORY@"
|
||||
|
||||
;--------------------------------
|
||||
;Variables
|
||||
|
||||
Var MUI_TEMP
|
||||
Var STARTMENU_FOLDER
|
||||
Var SV_ALLUSERS
|
||||
Var START_MENU
|
||||
Var DO_NOT_ADD_TO_PATH
|
||||
Var ADD_TO_PATH_ALL_USERS
|
||||
Var ADD_TO_PATH_CURRENT_USER
|
||||
Var INSTALL_DESKTOP
|
||||
|
||||
;--------------------------------
|
||||
;Include Modern UI
|
||||
|
||||
!include "MUI2.nsh"
|
||||
|
||||
;Default installation folder
|
||||
InstallDir "$PROGRAMFILES\@CPACK_PACKAGE_INSTALL_DIRECTORY@"
|
||||
|
||||
;--------------------------------
|
||||
;General
|
||||
|
||||
;Name and file
|
||||
Name "@CPACK_PACKAGE_NAME@ @CPACK_PACKAGE_VERSION@"
|
||||
OutFile "@CPACK_TOPLEVEL_DIRECTORY@/@CPACK_OUTPUT_FILE_NAME@"
|
||||
|
||||
;Set compression
|
||||
SetCompressor @CPACK_NSIS_COMPRESSOR@
|
||||
|
||||
@CPACK_NSIS_DEFINES@
|
||||
|
||||
!include Sections.nsh
|
||||
|
||||
;--- Component support macros: ---
|
||||
; The code for the add/remove functionality is from:
|
||||
; http://nsis.sourceforge.net/Add/Remove_Functionality
|
||||
; It has been modified slightly and extended to provide
|
||||
; inter-component dependencies.
|
||||
Var AR_SecFlags
|
||||
Var AR_RegFlags
|
||||
@CPACK_NSIS_SECTION_SELECTED_VARS@
|
||||
|
||||
; Loads the "selected" flag for the section named SecName into the
|
||||
; variable VarName.
|
||||
!macro LoadSectionSelectedIntoVar SecName VarName
|
||||
SectionGetFlags ${${SecName}} $${VarName}
|
||||
IntOp $${VarName} $${VarName} & ${SF_SELECTED} ;Turn off all other bits
|
||||
!macroend
|
||||
|
||||
; Loads the value of a variable... can we get around this?
|
||||
!macro LoadVar VarName
|
||||
IntOp $R0 0 + $${VarName}
|
||||
!macroend
|
||||
|
||||
; Sets the value of a variable
|
||||
!macro StoreVar VarName IntValue
|
||||
IntOp $${VarName} 0 + ${IntValue}
|
||||
!macroend
|
||||
|
||||
!macro InitSection SecName
|
||||
; This macro reads component installed flag from the registry and
|
||||
;changes checked state of the section on the components page.
|
||||
;Input: section index constant name specified in Section command.
|
||||
|
||||
ClearErrors
|
||||
;Reading component status from registry
|
||||
ReadRegDWORD $AR_RegFlags HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\@CPACK_PACKAGE_NAME@\Components\${SecName}" "Installed"
|
||||
IfErrors "default_${SecName}"
|
||||
;Status will stay default if registry value not found
|
||||
;(component was never installed)
|
||||
IntOp $AR_RegFlags $AR_RegFlags & ${SF_SELECTED} ;Turn off all other bits
|
||||
SectionGetFlags ${${SecName}} $AR_SecFlags ;Reading default section flags
|
||||
IntOp $AR_SecFlags $AR_SecFlags & 0xFFFE ;Turn lowest (enabled) bit off
|
||||
IntOp $AR_SecFlags $AR_RegFlags | $AR_SecFlags ;Change lowest bit
|
||||
|
||||
; Note whether this component was installed before
|
||||
!insertmacro StoreVar ${SecName}_was_installed $AR_RegFlags
|
||||
IntOp $R0 $AR_RegFlags & $AR_RegFlags
|
||||
|
||||
;Writing modified flags
|
||||
SectionSetFlags ${${SecName}} $AR_SecFlags
|
||||
|
||||
"default_${SecName}:"
|
||||
!insertmacro LoadSectionSelectedIntoVar ${SecName} ${SecName}_selected
|
||||
!macroend
|
||||
|
||||
!macro FinishSection SecName
|
||||
; This macro reads section flag set by user and removes the section
|
||||
;if it is not selected.
|
||||
;Then it writes component installed flag to registry
|
||||
;Input: section index constant name specified in Section command.
|
||||
|
||||
SectionGetFlags ${${SecName}} $AR_SecFlags ;Reading section flags
|
||||
;Checking lowest bit:
|
||||
IntOp $AR_SecFlags $AR_SecFlags & ${SF_SELECTED}
|
||||
IntCmp $AR_SecFlags 1 "leave_${SecName}"
|
||||
;Section is not selected:
|
||||
;Calling Section uninstall macro and writing zero installed flag
|
||||
!insertmacro "Remove_${${SecName}}"
|
||||
WriteRegDWORD HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\@CPACK_PACKAGE_NAME@\Components\${SecName}" \
|
||||
"Installed" 0
|
||||
Goto "exit_${SecName}"
|
||||
|
||||
"leave_${SecName}:"
|
||||
;Section is selected:
|
||||
WriteRegDWORD HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\@CPACK_PACKAGE_NAME@\Components\${SecName}" \
|
||||
"Installed" 1
|
||||
|
||||
"exit_${SecName}:"
|
||||
!macroend
|
||||
|
||||
!macro RemoveSection_CPack SecName
|
||||
; This macro is used to call section's Remove_... macro
|
||||
;from the uninstaller.
|
||||
;Input: section index constant name specified in Section command.
|
||||
|
||||
!insertmacro "Remove_${${SecName}}"
|
||||
!macroend
|
||||
|
||||
; Determine whether the selection of SecName changed
|
||||
!macro MaybeSelectionChanged SecName
|
||||
!insertmacro LoadVar ${SecName}_selected
|
||||
SectionGetFlags ${${SecName}} $R1
|
||||
IntOp $R1 $R1 & ${SF_SELECTED} ;Turn off all other bits
|
||||
|
||||
; See if the status has changed:
|
||||
IntCmp $R0 $R1 "${SecName}_unchanged"
|
||||
!insertmacro LoadSectionSelectedIntoVar ${SecName} ${SecName}_selected
|
||||
|
||||
IntCmp $R1 ${SF_SELECTED} "${SecName}_was_selected"
|
||||
!insertmacro "Deselect_required_by_${SecName}"
|
||||
goto "${SecName}_unchanged"
|
||||
|
||||
"${SecName}_was_selected:"
|
||||
!insertmacro "Select_${SecName}_depends"
|
||||
|
||||
"${SecName}_unchanged:"
|
||||
!macroend
|
||||
;--- End of Add/Remove macros ---
|
||||
|
||||
;--------------------------------
|
||||
;Interface Settings
|
||||
|
||||
!define MUI_ABORTWARNING
|
||||
|
||||
;----------------------------------------
|
||||
; based upon a script of "Written by KiCHiK 2003-01-18 05:57:02"
|
||||
;----------------------------------------
|
||||
!verbose 3
|
||||
!include "WinMessages.NSH"
|
||||
!verbose 4
|
||||
|
||||
;====================================================
|
||||
; get_NT_environment
|
||||
; Returns: the selected environment
|
||||
; Output : head of the stack
|
||||
;====================================================
|
||||
!macro select_NT_profile UN
|
||||
Function ${UN}select_NT_profile
|
||||
StrCmp $ADD_TO_PATH_ALL_USERS "1" 0 environment_single
|
||||
DetailPrint "Selected environment for all users"
|
||||
Push "all"
|
||||
Return
|
||||
environment_single:
|
||||
DetailPrint "Selected environment for current user only."
|
||||
Push "current"
|
||||
Return
|
||||
FunctionEnd
|
||||
!macroend
|
||||
!insertmacro select_NT_profile ""
|
||||
!insertmacro select_NT_profile "un."
|
||||
;----------------------------------------------------
|
||||
!define NT_current_env 'HKCU "Environment"'
|
||||
!define NT_all_env 'HKLM "SYSTEM\CurrentControlSet\Control\Session Manager\Environment"'
|
||||
|
||||
!ifndef WriteEnvStr_RegKey
|
||||
!ifdef ALL_USERS
|
||||
!define WriteEnvStr_RegKey \
|
||||
'HKLM "SYSTEM\CurrentControlSet\Control\Session Manager\Environment"'
|
||||
!else
|
||||
!define WriteEnvStr_RegKey 'HKCU "Environment"'
|
||||
!endif
|
||||
!endif
|
||||
|
||||
; AddToPath - Adds the given dir to the search path.
|
||||
; Input - head of the stack
|
||||
; Note - Win9x systems requires reboot
|
||||
|
||||
Function AddToPath
|
||||
Exch $0
|
||||
Push $1
|
||||
Push $2
|
||||
Push $3
|
||||
|
||||
# don't add if the path doesn't exist
|
||||
IfFileExists "$0\*.*" "" AddToPath_done
|
||||
|
||||
ReadEnvStr $1 PATH
|
||||
Push "$1;"
|
||||
Push "$0;"
|
||||
Call StrStr
|
||||
Pop $2
|
||||
StrCmp $2 "" "" AddToPath_done
|
||||
Push "$1;"
|
||||
Push "$0\;"
|
||||
Call StrStr
|
||||
Pop $2
|
||||
StrCmp $2 "" "" AddToPath_done
|
||||
GetFullPathName /SHORT $3 $0
|
||||
Push "$1;"
|
||||
Push "$3;"
|
||||
Call StrStr
|
||||
Pop $2
|
||||
StrCmp $2 "" "" AddToPath_done
|
||||
Push "$1;"
|
||||
Push "$3\;"
|
||||
Call StrStr
|
||||
Pop $2
|
||||
StrCmp $2 "" "" AddToPath_done
|
||||
|
||||
Call IsNT
|
||||
Pop $1
|
||||
StrCmp $1 1 AddToPath_NT
|
||||
; Not on NT
|
||||
StrCpy $1 $WINDIR 2
|
||||
FileOpen $1 "$1\autoexec.bat" a
|
||||
FileSeek $1 -1 END
|
||||
FileReadByte $1 $2
|
||||
IntCmp $2 26 0 +2 +2 # DOS EOF
|
||||
FileSeek $1 -1 END # write over EOF
|
||||
FileWrite $1 "$\r$\nSET PATH=%PATH%;$3$\r$\n"
|
||||
FileClose $1
|
||||
SetRebootFlag true
|
||||
Goto AddToPath_done
|
||||
|
||||
AddToPath_NT:
|
||||
ReadRegStr $1 ${WriteEnvStr_RegKey} "PATH"
|
||||
StrCmp $1 "" AddToPath_NTdoIt
|
||||
Push $1
|
||||
Call Trim
|
||||
Pop $1
|
||||
StrCpy $0 "$1;$0"
|
||||
AddToPath_NTdoIt:
|
||||
WriteRegExpandStr ${WriteEnvStr_RegKey} "PATH" $0
|
||||
SendMessage ${HWND_BROADCAST} ${WM_WININICHANGE} 0 "STR:Environment" /TIMEOUT=5000
|
||||
|
||||
AddToPath_done:
|
||||
Pop $3
|
||||
Pop $2
|
||||
Pop $1
|
||||
Pop $0
|
||||
FunctionEnd
|
||||
|
||||
|
||||
; RemoveFromPath - Remove a given dir from the path
|
||||
; Input: head of the stack
|
||||
|
||||
Function un.RemoveFromPath
|
||||
Exch $0
|
||||
Push $1
|
||||
Push $2
|
||||
Push $3
|
||||
Push $4
|
||||
Push $5
|
||||
Push $6
|
||||
|
||||
IntFmt $6 "%c" 26 # DOS EOF
|
||||
|
||||
Call un.IsNT
|
||||
Pop $1
|
||||
StrCmp $1 1 unRemoveFromPath_NT
|
||||
; Not on NT
|
||||
StrCpy $1 $WINDIR 2
|
||||
FileOpen $1 "$1\autoexec.bat" r
|
||||
GetTempFileName $4
|
||||
FileOpen $2 $4 w
|
||||
GetFullPathName /SHORT $0 $0
|
||||
StrCpy $0 "SET PATH=%PATH%;$0"
|
||||
Goto unRemoveFromPath_dosLoop
|
||||
|
||||
unRemoveFromPath_dosLoop:
|
||||
FileRead $1 $3
|
||||
StrCpy $5 $3 1 -1 # read last char
|
||||
StrCmp $5 $6 0 +2 # if DOS EOF
|
||||
StrCpy $3 $3 -1 # remove DOS EOF so we can compare
|
||||
StrCmp $3 "$0$\r$\n" unRemoveFromPath_dosLoopRemoveLine
|
||||
StrCmp $3 "$0$\n" unRemoveFromPath_dosLoopRemoveLine
|
||||
StrCmp $3 "$0" unRemoveFromPath_dosLoopRemoveLine
|
||||
StrCmp $3 "" unRemoveFromPath_dosLoopEnd
|
||||
FileWrite $2 $3
|
||||
Goto unRemoveFromPath_dosLoop
|
||||
unRemoveFromPath_dosLoopRemoveLine:
|
||||
SetRebootFlag true
|
||||
Goto unRemoveFromPath_dosLoop
|
||||
|
||||
unRemoveFromPath_dosLoopEnd:
|
||||
FileClose $2
|
||||
FileClose $1
|
||||
StrCpy $1 $WINDIR 2
|
||||
Delete "$1\autoexec.bat"
|
||||
CopyFiles /SILENT $4 "$1\autoexec.bat"
|
||||
Delete $4
|
||||
Goto unRemoveFromPath_done
|
||||
|
||||
unRemoveFromPath_NT:
|
||||
ReadRegStr $1 ${WriteEnvStr_RegKey} "PATH"
|
||||
StrCpy $5 $1 1 -1 # copy last char
|
||||
StrCmp $5 ";" +2 # if last char != ;
|
||||
StrCpy $1 "$1;" # append ;
|
||||
Push $1
|
||||
Push "$0;"
|
||||
Call un.StrStr ; Find `$0;` in $1
|
||||
Pop $2 ; pos of our dir
|
||||
StrCmp $2 "" unRemoveFromPath_done
|
||||
; else, it is in path
|
||||
# $0 - path to add
|
||||
# $1 - path var
|
||||
StrLen $3 "$0;"
|
||||
StrLen $4 $2
|
||||
StrCpy $5 $1 -$4 # $5 is now the part before the path to remove
|
||||
StrCpy $6 $2 "" $3 # $6 is now the part after the path to remove
|
||||
StrCpy $3 $5$6
|
||||
|
||||
StrCpy $5 $3 1 -1 # copy last char
|
||||
StrCmp $5 ";" 0 +2 # if last char == ;
|
||||
StrCpy $3 $3 -1 # remove last char
|
||||
|
||||
WriteRegExpandStr ${WriteEnvStr_RegKey} "PATH" $3
|
||||
SendMessage ${HWND_BROADCAST} ${WM_WININICHANGE} 0 "STR:Environment" /TIMEOUT=5000
|
||||
|
||||
unRemoveFromPath_done:
|
||||
Pop $6
|
||||
Pop $5
|
||||
Pop $4
|
||||
Pop $3
|
||||
Pop $2
|
||||
Pop $1
|
||||
Pop $0
|
||||
FunctionEnd
|
||||
|
||||
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
|
||||
; Uninstall stuff
|
||||
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
|
||||
|
||||
###########################################
|
||||
# Utility Functions #
|
||||
###########################################
|
||||
|
||||
;====================================================
|
||||
; IsNT - Returns 1 if the current system is NT, 0
|
||||
; otherwise.
|
||||
; Output: head of the stack
|
||||
;====================================================
|
||||
; IsNT
|
||||
; no input
|
||||
; output, top of the stack = 1 if NT or 0 if not
|
||||
;
|
||||
; Usage:
|
||||
; Call IsNT
|
||||
; Pop $R0
|
||||
; ($R0 at this point is 1 or 0)
|
||||
|
||||
!macro IsNT un
|
||||
Function ${un}IsNT
|
||||
Push $0
|
||||
ReadRegStr $0 HKLM "SOFTWARE\Microsoft\Windows NT\CurrentVersion" CurrentVersion
|
||||
StrCmp $0 "" 0 IsNT_yes
|
||||
; we are not NT.
|
||||
Pop $0
|
||||
Push 0
|
||||
Return
|
||||
|
||||
IsNT_yes:
|
||||
; NT!!!
|
||||
Pop $0
|
||||
Push 1
|
||||
FunctionEnd
|
||||
!macroend
|
||||
!insertmacro IsNT ""
|
||||
!insertmacro IsNT "un."
|
||||
|
||||
; StrStr
|
||||
; input, top of stack = string to search for
|
||||
; top of stack-1 = string to search in
|
||||
; output, top of stack (replaces with the portion of the string remaining)
|
||||
; modifies no other variables.
|
||||
;
|
||||
; Usage:
|
||||
; Push "this is a long ass string"
|
||||
; Push "ass"
|
||||
; Call StrStr
|
||||
; Pop $R0
|
||||
; ($R0 at this point is "ass string")
|
||||
|
||||
!macro StrStr un
|
||||
Function ${un}StrStr
|
||||
Exch $R1 ; st=haystack,old$R1, $R1=needle
|
||||
Exch ; st=old$R1,haystack
|
||||
Exch $R2 ; st=old$R1,old$R2, $R2=haystack
|
||||
Push $R3
|
||||
Push $R4
|
||||
Push $R5
|
||||
StrLen $R3 $R1
|
||||
StrCpy $R4 0
|
||||
; $R1=needle
|
||||
; $R2=haystack
|
||||
; $R3=len(needle)
|
||||
; $R4=cnt
|
||||
; $R5=tmp
|
||||
loop:
|
||||
StrCpy $R5 $R2 $R3 $R4
|
||||
StrCmp $R5 $R1 done
|
||||
StrCmp $R5 "" done
|
||||
IntOp $R4 $R4 + 1
|
||||
Goto loop
|
||||
done:
|
||||
StrCpy $R1 $R2 "" $R4
|
||||
Pop $R5
|
||||
Pop $R4
|
||||
Pop $R3
|
||||
Pop $R2
|
||||
Exch $R1
|
||||
FunctionEnd
|
||||
!macroend
|
||||
!insertmacro StrStr ""
|
||||
!insertmacro StrStr "un."
|
||||
|
||||
Function Trim ; Added by Pelaca
|
||||
Exch $R1
|
||||
Push $R2
|
||||
Loop:
|
||||
StrCpy $R2 "$R1" 1 -1
|
||||
StrCmp "$R2" " " RTrim
|
||||
StrCmp "$R2" "$\n" RTrim
|
||||
StrCmp "$R2" "$\r" RTrim
|
||||
StrCmp "$R2" ";" RTrim
|
||||
GoTo Done
|
||||
RTrim:
|
||||
StrCpy $R1 "$R1" -1
|
||||
Goto Loop
|
||||
Done:
|
||||
Pop $R2
|
||||
Exch $R1
|
||||
FunctionEnd
|
||||
|
||||
Function ConditionalAddToRegistry
|
||||
Pop $0
|
||||
Pop $1
|
||||
StrCmp "$0" "" ConditionalAddToRegistry_EmptyString
|
||||
WriteRegStr SHCTX "Software\Microsoft\Windows\CurrentVersion\Uninstall\@CPACK_PACKAGE_NAME@" \
|
||||
"$1" "$0"
|
||||
;MessageBox MB_OK "Set Registry: '$1' to '$0'"
|
||||
DetailPrint "Set install registry entry: '$1' to '$0'"
|
||||
ConditionalAddToRegistry_EmptyString:
|
||||
FunctionEnd
|
||||
|
||||
;--------------------------------
|
||||
|
||||
!ifdef CPACK_USES_DOWNLOAD
|
||||
Function DownloadFile
|
||||
IfFileExists $INSTDIR\* +2
|
||||
CreateDirectory $INSTDIR
|
||||
Pop $0
|
||||
|
||||
; Skip if already downloaded
|
||||
IfFileExists $INSTDIR\$0 0 +2
|
||||
Return
|
||||
|
||||
StrCpy $1 "@CPACK_DOWNLOAD_SITE@"
|
||||
|
||||
try_again:
|
||||
NSISdl::download "$1/$0" "$INSTDIR\$0"
|
||||
|
||||
Pop $1
|
||||
StrCmp $1 "success" success
|
||||
StrCmp $1 "Cancelled" cancel
|
||||
MessageBox MB_OK "Download failed: $1"
|
||||
cancel:
|
||||
Return
|
||||
success:
|
||||
FunctionEnd
|
||||
!endif
|
||||
|
||||
;--------------------------------
|
||||
; Installation types
|
||||
@CPACK_NSIS_INSTALLATION_TYPES@
|
||||
|
||||
;--------------------------------
|
||||
; Component sections
|
||||
@CPACK_NSIS_COMPONENT_SECTIONS@
|
||||
|
||||
;--------------------------------
|
||||
; Define some macro setting for the gui
|
||||
@CPACK_NSIS_INSTALLER_MUI_ICON_CODE@
|
||||
@CPACK_NSIS_INSTALLER_ICON_CODE@
|
||||
@CPACK_NSIS_INSTALLER_MUI_COMPONENTS_DESC@
|
||||
|
||||
;--------------------------------
|
||||
;Pages
|
||||
!define MUI_LANGDLL_REGISTRY_ROOT "SHCTX"
|
||||
!define MUI_LANGDLL_REGISTRY_KEY "Software\Microsoft\Windows\CurrentVersion\Uninstall\@CPACK_PACKAGE_NAME@"
|
||||
!define MUI_LANGDLL_REGISTRY_VALUENAME "NSIS:Language"
|
||||
|
||||
!insertmacro MUI_PAGE_WELCOME
|
||||
|
||||
!insertmacro MUI_PAGE_LICENSE "@CPACK_RESOURCE_FILE_LICENSE@"
|
||||
!insertmacro MUI_PAGE_DIRECTORY
|
||||
|
||||
;Start Menu Folder Page Configuration
|
||||
!define MUI_STARTMENUPAGE_REGISTRY_ROOT "SHCTX"
|
||||
!define MUI_STARTMENUPAGE_REGISTRY_KEY "Software\@CPACK_PACKAGE_VENDOR@\@CPACK_PACKAGE_INSTALL_REGISTRY_KEY@"
|
||||
!define MUI_STARTMENUPAGE_REGISTRY_VALUENAME "Start Menu Folder"
|
||||
!insertmacro MUI_PAGE_STARTMENU Application $STARTMENU_FOLDER
|
||||
|
||||
@CPACK_NSIS_PAGE_COMPONENTS@
|
||||
|
||||
!insertmacro MUI_PAGE_INSTFILES
|
||||
|
||||
!define MUI_FINISHPAGE_SHOWREADME "$INSTDIR\doc\README.txt"
|
||||
!insertmacro MUI_PAGE_FINISH
|
||||
|
||||
!insertmacro MUI_UNPAGE_CONFIRM
|
||||
!insertmacro MUI_UNPAGE_INSTFILES
|
||||
|
||||
;--------------------------------
|
||||
;Languages
|
||||
|
||||
!insertmacro MUI_LANGUAGE "Dutch"
|
||||
!insertmacro MUI_LANGUAGE "English"
|
||||
!insertmacro MUI_LANGUAGE "French"
|
||||
!insertmacro MUI_LANGUAGE "German"
|
||||
!insertmacro MUI_LANGUAGE "Italian"
|
||||
!insertmacro MUI_LANGUAGE "Portuguese"
|
||||
!insertmacro MUI_LANGUAGE "Spanish"
|
||||
|
||||
;--------------------------------
|
||||
;Installer Sections
|
||||
|
||||
Section "-Core installation"
|
||||
;Use the entire tree produced by the INSTALL target. Keep the
|
||||
;list of directories here in sync with the RMDir commands below.
|
||||
SetOutPath "$INSTDIR"
|
||||
@CPACK_NSIS_FULL_INSTALL@
|
||||
|
||||
;Store installation folder
|
||||
WriteRegStr SHCTX "Software\@CPACK_PACKAGE_VENDOR@\@CPACK_PACKAGE_INSTALL_REGISTRY_KEY@" "" $INSTDIR
|
||||
|
||||
;Create uninstaller
|
||||
WriteUninstaller "$INSTDIR\Uninstall.exe"
|
||||
Push "DisplayName"
|
||||
Push "@CPACK_NSIS_DISPLAY_NAME@"
|
||||
Call ConditionalAddToRegistry
|
||||
Push "DisplayVersion"
|
||||
Push "@CPACK_PACKAGE_VERSION@"
|
||||
Call ConditionalAddToRegistry
|
||||
Push "Publisher"
|
||||
Push "@CPACK_PACKAGE_VENDOR@"
|
||||
Call ConditionalAddToRegistry
|
||||
Push "UninstallString"
|
||||
Push "$INSTDIR\Uninstall.exe"
|
||||
Call ConditionalAddToRegistry
|
||||
Push "NoRepair"
|
||||
Push "1"
|
||||
Call ConditionalAddToRegistry
|
||||
|
||||
!ifdef CPACK_NSIS_ADD_REMOVE
|
||||
;Create add/remove functionality
|
||||
Push "ModifyPath"
|
||||
Push "$INSTDIR\AddRemove.exe"
|
||||
Call ConditionalAddToRegistry
|
||||
!else
|
||||
Push "NoModify"
|
||||
Push "1"
|
||||
Call ConditionalAddToRegistry
|
||||
!endif
|
||||
|
||||
; Optional registration
|
||||
Push "DisplayIcon"
|
||||
Push "$INSTDIR\@CPACK_NSIS_INSTALLED_ICON_NAME@"
|
||||
Call ConditionalAddToRegistry
|
||||
Push "HelpLink"
|
||||
Push "@CPACK_NSIS_HELP_LINK@"
|
||||
Call ConditionalAddToRegistry
|
||||
Push "URLInfoAbout"
|
||||
Push "@CPACK_NSIS_URL_INFO_ABOUT@"
|
||||
Call ConditionalAddToRegistry
|
||||
Push "Contact"
|
||||
Push "@CPACK_NSIS_CONTACT@"
|
||||
Call ConditionalAddToRegistry
|
||||
!insertmacro MUI_STARTMENU_WRITE_BEGIN Application
|
||||
|
||||
;Create shortcuts
|
||||
CreateDirectory "$SMPROGRAMS\$STARTMENU_FOLDER"
|
||||
@CPACK_NSIS_CREATE_ICONS@
|
||||
@CPACK_NSIS_CREATE_ICONS_EXTRA@
|
||||
CreateShortCut "$SMPROGRAMS\$STARTMENU_FOLDER\Uninstall.lnk" "$INSTDIR\Uninstall.exe"
|
||||
|
||||
; Write special uninstall registry entries
|
||||
Push "StartMenu"
|
||||
Push "$STARTMENU_FOLDER"
|
||||
Call ConditionalAddToRegistry
|
||||
Push "DoNotAddToPath"
|
||||
Push "$DO_NOT_ADD_TO_PATH"
|
||||
Call ConditionalAddToRegistry
|
||||
Push "AddToPathAllUsers"
|
||||
Push "$ADD_TO_PATH_ALL_USERS"
|
||||
Call ConditionalAddToRegistry
|
||||
Push "AddToPathCurrentUser"
|
||||
Push "$ADD_TO_PATH_CURRENT_USER"
|
||||
Call ConditionalAddToRegistry
|
||||
Push "InstallToDesktop"
|
||||
Push "$INSTALL_DESKTOP"
|
||||
Call ConditionalAddToRegistry
|
||||
|
||||
@CPACK_NSIS_EXTRA_INSTALL_COMMANDS@
|
||||
|
||||
!insertmacro MUI_STARTMENU_WRITE_END
|
||||
|
||||
SectionEnd
|
||||
|
||||
;--------------------------------
|
||||
; determine admin versus local install
|
||||
Function un.onInit
|
||||
|
||||
ClearErrors
|
||||
UserInfo::GetName
|
||||
IfErrors noLM
|
||||
Pop $0
|
||||
UserInfo::GetAccountType
|
||||
Pop $1
|
||||
StrCmp $1 "Admin" 0 +3
|
||||
SetShellVarContext all
|
||||
;MessageBox MB_OK 'User "$0" is in the Admin group'
|
||||
Goto done
|
||||
StrCmp $1 "Power" 0 +3
|
||||
SetShellVarContext all
|
||||
;MessageBox MB_OK 'User "$0" is in the Power Users group'
|
||||
Goto done
|
||||
|
||||
noLM:
|
||||
;Get installation folder from registry if available
|
||||
|
||||
done:
|
||||
|
||||
!insertmacro MUI_UNGETLANGUAGE
|
||||
FunctionEnd
|
||||
|
||||
;--- Add/Remove callback functions: ---
|
||||
!macro SectionList MacroName
|
||||
;This macro used to perform operation on multiple sections.
|
||||
;List all of your components in following manner here.
|
||||
@CPACK_NSIS_COMPONENT_SECTION_LIST@
|
||||
!macroend
|
||||
|
||||
Section -FinishComponents
|
||||
;Removes unselected components and writes component status to registry
|
||||
!insertmacro SectionList "FinishSection"
|
||||
|
||||
!ifdef CPACK_NSIS_ADD_REMOVE
|
||||
; Get the name of the installer executable
|
||||
System::Call 'kernel32::GetModuleFileNameA(i 0, t .R0, i 1024) i r1'
|
||||
StrCpy $R3 $R0
|
||||
|
||||
; Strip off the last 13 characters, to see if we have AddRemove.exe
|
||||
StrLen $R1 $R0
|
||||
IntOp $R1 $R0 - 13
|
||||
StrCpy $R2 $R0 13 $R1
|
||||
StrCmp $R2 "AddRemove.exe" addremove_installed
|
||||
|
||||
; We're not running AddRemove.exe, so install it
|
||||
CopyFiles $R3 $INSTDIR\AddRemove.exe
|
||||
|
||||
addremove_installed:
|
||||
!endif
|
||||
SectionEnd
|
||||
;--- End of Add/Remove callback functions ---
|
||||
|
||||
;--------------------------------
|
||||
; Component dependencies
|
||||
Function .onSelChange
|
||||
!insertmacro SectionList MaybeSelectionChanged
|
||||
FunctionEnd
|
||||
|
||||
;--------------------------------
|
||||
;Uninstaller Section
|
||||
|
||||
Section "Uninstall"
|
||||
ReadRegStr $START_MENU SHCTX \
|
||||
"Software\Microsoft\Windows\CurrentVersion\Uninstall\@CPACK_PACKAGE_NAME@" "StartMenu"
|
||||
;MessageBox MB_OK "Start menu is in: $START_MENU"
|
||||
ReadRegStr $DO_NOT_ADD_TO_PATH SHCTX \
|
||||
"Software\Microsoft\Windows\CurrentVersion\Uninstall\@CPACK_PACKAGE_NAME@" "DoNotAddToPath"
|
||||
ReadRegStr $ADD_TO_PATH_ALL_USERS SHCTX \
|
||||
"Software\Microsoft\Windows\CurrentVersion\Uninstall\@CPACK_PACKAGE_NAME@" "AddToPathAllUsers"
|
||||
ReadRegStr $ADD_TO_PATH_CURRENT_USER SHCTX \
|
||||
"Software\Microsoft\Windows\CurrentVersion\Uninstall\@CPACK_PACKAGE_NAME@" "AddToPathCurrentUser"
|
||||
;MessageBox MB_OK "Add to path: $DO_NOT_ADD_TO_PATH all users: $ADD_TO_PATH_ALL_USERS"
|
||||
ReadRegStr $INSTALL_DESKTOP SHCTX \
|
||||
"Software\Microsoft\Windows\CurrentVersion\Uninstall\@CPACK_PACKAGE_NAME@" "InstallToDesktop"
|
||||
;MessageBox MB_OK "Install to desktop: $INSTALL_DESKTOP "
|
||||
|
||||
@CPACK_NSIS_EXTRA_UNINSTALL_COMMANDS@
|
||||
|
||||
;Remove files we installed.
|
||||
;Keep the list of directories here in sync with the File commands above.
|
||||
@CPACK_NSIS_DELETE_FILES@
|
||||
@CPACK_NSIS_DELETE_DIRECTORIES@
|
||||
|
||||
!ifdef CPACK_NSIS_ADD_REMOVE
|
||||
;Remove the add/remove program
|
||||
Delete "$INSTDIR\AddRemove.exe"
|
||||
!endif
|
||||
|
||||
;Remove the uninstaller itself.
|
||||
Delete "$INSTDIR\Uninstall.exe"
|
||||
DeleteRegKey SHCTX "Software\Microsoft\Windows\CurrentVersion\Uninstall\@CPACK_PACKAGE_NAME@"
|
||||
|
||||
;Remove the installation directory if it is empty.
|
||||
RMDir "$INSTDIR"
|
||||
|
||||
; Remove the registry entries.
|
||||
DeleteRegKey SHCTX "Software\@CPACK_PACKAGE_VENDOR@\@CPACK_PACKAGE_INSTALL_REGISTRY_KEY@"
|
||||
|
||||
; Removes all optional components
|
||||
!insertmacro SectionList "RemoveSection_CPack"
|
||||
|
||||
!insertmacro MUI_STARTMENU_GETFOLDER Application $MUI_TEMP
|
||||
|
||||
Delete "$SMPROGRAMS\$MUI_TEMP\Uninstall.lnk"
|
||||
@CPACK_NSIS_DELETE_ICONS@
|
||||
@CPACK_NSIS_DELETE_ICONS_EXTRA@
|
||||
|
||||
;Delete empty start menu parent directories
|
||||
StrCpy $MUI_TEMP "$SMPROGRAMS\$MUI_TEMP"
|
||||
|
||||
startMenuDeleteLoop:
|
||||
ClearErrors
|
||||
RMDir $MUI_TEMP
|
||||
GetFullPathName $MUI_TEMP "$MUI_TEMP\.."
|
||||
|
||||
IfErrors startMenuDeleteLoopDone
|
||||
|
||||
StrCmp "$MUI_TEMP" "$SMPROGRAMS" startMenuDeleteLoopDone startMenuDeleteLoop
|
||||
startMenuDeleteLoopDone:
|
||||
|
||||
; If the user changed the shortcut, then uninstall may not work. This should
|
||||
; try to fix it.
|
||||
StrCpy $MUI_TEMP "$START_MENU"
|
||||
Delete "$SMPROGRAMS\$MUI_TEMP\Uninstall.lnk"
|
||||
@CPACK_NSIS_DELETE_ICONS_EXTRA@
|
||||
|
||||
;Delete empty start menu parent directories
|
||||
StrCpy $MUI_TEMP "$SMPROGRAMS\$MUI_TEMP"
|
||||
|
||||
secondStartMenuDeleteLoop:
|
||||
ClearErrors
|
||||
RMDir $MUI_TEMP
|
||||
GetFullPathName $MUI_TEMP "$MUI_TEMP\.."
|
||||
|
||||
IfErrors secondStartMenuDeleteLoopDone
|
||||
|
||||
StrCmp "$MUI_TEMP" "$SMPROGRAMS" secondStartMenuDeleteLoopDone secondStartMenuDeleteLoop
|
||||
secondStartMenuDeleteLoopDone:
|
||||
|
||||
DeleteRegKey /ifempty SHCTX "Software\@CPACK_PACKAGE_VENDOR@\@CPACK_PACKAGE_INSTALL_REGISTRY_KEY@"
|
||||
|
||||
Push $INSTDIR\bin
|
||||
StrCmp $DO_NOT_ADD_TO_PATH_ "1" doNotRemoveFromPath 0
|
||||
Call un.RemoveFromPath
|
||||
doNotRemoveFromPath:
|
||||
SectionEnd
|
||||
|
||||
;--------------------------------
|
||||
; determine admin versus local install
|
||||
; Is install for "AllUsers" or "JustMe"?
|
||||
; Default to "JustMe" - set to "AllUsers" if admin or on Win9x
|
||||
; This function is used for the very first "custom page" of the installer.
|
||||
; This custom page does not show up visibly, but it executes prior to the
|
||||
; first visible page and sets up $INSTDIR properly...
|
||||
; Choose different default installation folder based on SV_ALLUSERS...
|
||||
; "Program Files" for AllUsers, "My Documents" for JustMe...
|
||||
|
||||
Function .onInit
|
||||
!insertmacro MUI_LANGDLL_DISPLAY
|
||||
; Reads components status for registry
|
||||
!insertmacro SectionList "InitSection"
|
||||
|
||||
StrCpy $SV_ALLUSERS "JustMe"
|
||||
StrCpy $INSTDIR "$DOCUMENTS\@CPACK_PACKAGE_INSTALL_DIRECTORY@"
|
||||
|
||||
ClearErrors
|
||||
UserInfo::GetName
|
||||
IfErrors noLM
|
||||
Pop $0
|
||||
UserInfo::GetAccountType
|
||||
Pop $1
|
||||
StrCmp $1 "Admin" 0 +3
|
||||
SetShellVarContext all
|
||||
;MessageBox MB_OK 'User "$0" is in the Admin group'
|
||||
StrCpy $SV_ALLUSERS "AllUsers"
|
||||
Goto done
|
||||
StrCmp $1 "Power" 0 +3
|
||||
SetShellVarContext all
|
||||
;MessageBox MB_OK 'User "$0" is in the Power Users group'
|
||||
StrCpy $SV_ALLUSERS "AllUsers"
|
||||
Goto done
|
||||
|
||||
noLM:
|
||||
StrCpy $SV_ALLUSERS "AllUsers"
|
||||
;Get installation folder from registry if available
|
||||
|
||||
done:
|
||||
StrCmp $SV_ALLUSERS "AllUsers" 0 +2
|
||||
StrCpy $INSTDIR "$PROGRAMFILES\@CPACK_PACKAGE_INSTALL_DIRECTORY@"
|
||||
|
||||
FunctionEnd
|
||||
+22
-6
@@ -127,8 +127,9 @@ define
|
||||
* and serverinfo configuration would look like:
|
||||
*
|
||||
* # This goes in inspircd.conf, *NOT* your Anope config!
|
||||
* <module name="account">
|
||||
* <module name="hidechans">
|
||||
* <module name="services_account">
|
||||
* <module name="services">
|
||||
* <module name="spanningtree">
|
||||
* <bind address="127.0.0.1" port="7000" type="servers">
|
||||
* <link name="services.example.com"
|
||||
@@ -136,7 +137,7 @@ define
|
||||
* port="7000"
|
||||
* sendpass="mypassword"
|
||||
* recvpass="mypassword">
|
||||
* <uline server="services.example.com" silent="yes">
|
||||
* <services server="services.example.com" silent="yes">
|
||||
*
|
||||
* An example configuration for UnrealIRCd that is compatible with the below uplink
|
||||
* and serverinfo configuration would look like:
|
||||
@@ -509,12 +510,15 @@ options
|
||||
*
|
||||
* Removing .UTF-8 will instead use the default encoding for the language, e.g. iso-8859-1 for western European languages.
|
||||
*/
|
||||
languages = "de_DE.UTF-8 el_GR.UTF-8 es_ES.UTF-8 fr_FR.UTF-8 it_IT.UTF-8 nl_NL.UTF-8 pl_PL.UTF-8 pt_PT.UTF-8 tr_TR.UTF-8"
|
||||
languages = "de_DE.UTF-8 el_GR.UTF-8 es_ES.UTF-8 fr_FR.UTF-8 it_IT.UTF-8 nl_NL.UTF-8 pl_PL.UTF-8 pt_PT.UTF-8 ro_RO.UTF-8 tr_TR.UTF-8"
|
||||
|
||||
/*
|
||||
* Default language that non- and newly-registered nicks will receive messages in.
|
||||
* Set to "en" to enable English. Defaults to the language the system uses.
|
||||
*/
|
||||
* Default language that unregistered users and users of newly-registered
|
||||
* accounts will receive messages in.
|
||||
*
|
||||
* Defaults to the language the system uses. Set to "en_US" to override this
|
||||
* with English.
|
||||
*/
|
||||
#defaultlanguage = "es_ES.UTF-8"
|
||||
}
|
||||
|
||||
@@ -1146,8 +1150,20 @@ module
|
||||
* Allows Anope to continue writing the database even if the original can
|
||||
* not be backed up. This is not recommended as it may result in total data
|
||||
* loss during the circumstances described above.
|
||||
*
|
||||
* Defaults to no.
|
||||
*/
|
||||
#ignore_backup_failure = yes
|
||||
|
||||
/*
|
||||
* Whether to preserve unknown data within the database. When a module is
|
||||
* unloaded its data will be kept in the database so that it continues to
|
||||
* function when reloaded. You can turn this off to clean up unknown data
|
||||
* on the next database write.
|
||||
*
|
||||
* Defaults to yes.
|
||||
*/
|
||||
#preserve_unknown_data = no
|
||||
}
|
||||
|
||||
/*
|
||||
|
||||
@@ -990,8 +990,20 @@ module
|
||||
{
|
||||
name = "cs_entrymsg"
|
||||
|
||||
/* The maximum number of entrymsgs allowed per channel. If not set, defaults to 5. */
|
||||
/*
|
||||
* The maximum number of entry messages allowed per channel.
|
||||
*
|
||||
* Defaults to 5
|
||||
*/
|
||||
maxentries = 5
|
||||
|
||||
/*
|
||||
* Whether to include an IRCv3 time tag for the original add time on entry
|
||||
* messages.
|
||||
*
|
||||
* Defaults to yes.
|
||||
*/
|
||||
#timestamp = no
|
||||
}
|
||||
command { service = "ChanServ"; name = "ENTRYMSG"; command = "chanserv/entrymsg"; group = "chanserv/management"; }
|
||||
|
||||
@@ -1232,15 +1244,14 @@ command { service = "ChanServ"; name = "SET DESCRIPTION"; command = "chanserv/se
|
||||
command { service = "ChanServ"; name = "SET DESC"; command = "chanserv/set/description"; hide = yes; }
|
||||
command { service = "ChanServ"; name = "SET FOUNDER"; command = "chanserv/set/founder"; }
|
||||
command { service = "ChanServ"; name = "SET KEEPMODES"; command = "chanserv/set/keepmodes"; }
|
||||
command { service = "ChanServ"; name = "SET NOEXPIRE"; command = "chanserv/saset/noexpire"; permission = "chanserv/saset/noexpire"; }
|
||||
command { service = "ChanServ"; name = "SET PEACE"; command = "chanserv/set/peace"; }
|
||||
command { service = "ChanServ"; name = "SET PERSIST"; command = "chanserv/set/persist"; }
|
||||
command { service = "ChanServ"; name = "SET RESTRICTED"; command = "chanserv/set/restricted"; }
|
||||
command { service = "ChanServ"; name = "SET SECURE"; command = "chanserv/set/secure"; }
|
||||
command { service = "ChanServ"; name = "SET SECUREFOUNDER"; command = "chanserv/set/securefounder"; }
|
||||
command { service = "ChanServ"; name = "SET SECUREOPS"; command = "chanserv/set/secureops"; }
|
||||
command { service = "ChanServ"; name = "SET SIGNKICK"; command = "chanserv/set/signkick"; }
|
||||
command { service = "ChanServ"; name = "SET SUCCESSOR"; command = "chanserv/set/successor"; }
|
||||
command { service = "ChanServ"; name = "SET NOEXPIRE"; command = "chanserv/saset/noexpire"; permission = "chanserv/saset/noexpire"; }
|
||||
|
||||
/*
|
||||
* cs_set_misc
|
||||
@@ -1291,7 +1302,7 @@ module
|
||||
* This directive is optional.
|
||||
* If not set, the default is never.
|
||||
*/
|
||||
suspendexpire = 90d
|
||||
#suspendexpire = 90d
|
||||
|
||||
/*
|
||||
* Settings to show to non-opers in ChanServ's INFO output.
|
||||
|
||||
@@ -155,6 +155,25 @@ command { service = "HostServ"; name = "LIST"; command = "hostserv/list"; permis
|
||||
module { name = "hs_off" }
|
||||
command { service = "HostServ"; name = "OFF"; command = "hostserv/off"; }
|
||||
|
||||
/*
|
||||
* hs_offfer
|
||||
*
|
||||
* Provides the commands hostserv/offfer and hostserv/offerlist.
|
||||
*
|
||||
* Used to offer specialized vhosts to users, with template variables available.
|
||||
*/
|
||||
module
|
||||
{
|
||||
name = "hs_offer"
|
||||
|
||||
/*
|
||||
* How long after a vhost is applied can another vhost be taken.
|
||||
*/
|
||||
takedelay = 7d
|
||||
}
|
||||
command { service = "HostServ"; name = "OFFER"; command = "hostserv/offer"; permission = "hostserv/offer"; }
|
||||
command { service = "HostServ"; name = "OFFERLIST"; command = "hostserv/offerlist"; }
|
||||
|
||||
/*
|
||||
* hs_on
|
||||
*
|
||||
|
||||
@@ -777,6 +777,17 @@ command { service = "NickServ"; name = "SASET PROTECT"; command = "nickserv/sase
|
||||
command { service = "NickServ"; name = "SET KILL"; command = "nickserv/set/protect"; hide = yes; }
|
||||
command { service = "NickServ"; name = "SASET KILL"; command = "nickserv/saset/protect"; permission = "nickserv/saset/protect"; hide = yes; }
|
||||
|
||||
/*
|
||||
* ns_set_timezone
|
||||
*
|
||||
* Provides the command nickserv/set/timezone and nickserv/saset/timezone.
|
||||
*
|
||||
* Allows configuring the timezone that services uses.
|
||||
*/
|
||||
module { name = "ns_set_timezone" }
|
||||
command { service = "NickServ"; name = "SET TIMEZONE"; command = "nickserv/set/timezone"; }
|
||||
command { service = "NickServ"; name = "SASET TIMEZONE"; command = "nickserv/saset/timezone"; permission = "nickserv/saset/timezone"; }
|
||||
|
||||
/*
|
||||
* ns_suspend
|
||||
*
|
||||
|
||||
@@ -351,7 +351,34 @@ command { service = "OperServ"; name = "CONFIG"; command = "operserv/config"; pe
|
||||
*
|
||||
* Used to forbid specific nicks, channels, emails, etc. from being used.
|
||||
*/
|
||||
module { name = "os_forbid" }
|
||||
module
|
||||
{
|
||||
name = "os_forbid"
|
||||
|
||||
/*
|
||||
* Allows loading forbids from a file.
|
||||
*/
|
||||
#file
|
||||
{
|
||||
/*
|
||||
* The type of forbid to add. Can be set to "chan", "email", "nick",
|
||||
* "password", or "register".
|
||||
*/
|
||||
type = "email"
|
||||
|
||||
/*
|
||||
* The file to read forbids from. Each forbid should be placed on a new
|
||||
* line. Surrounding whitespace will be ignored.
|
||||
*/
|
||||
file = "temp-emails.txt"
|
||||
|
||||
/**
|
||||
* The reason why entries from this file are forbidden.
|
||||
*/
|
||||
reason = "Temporary email"
|
||||
}
|
||||
|
||||
}
|
||||
command { service = "OperServ"; name = "FORBID"; command = "operserv/forbid"; permission = "operserv/forbid"; }
|
||||
|
||||
/*
|
||||
|
||||
+5
-3
@@ -1,4 +1,4 @@
|
||||
Since the first commit in March 2004 88 people have submitted patches, commits,
|
||||
Since the first commit in March 2004 90 people have submitted patches, commits,
|
||||
and other useful contributions to Anope. These people, ordered by the number of
|
||||
contributions they have made, are:
|
||||
|
||||
@@ -20,9 +20,9 @@ contributions they have made, are:
|
||||
* Adam Kramer <ribosome@anope.org>
|
||||
* Attila Molnar <attilamolnar@hush.com>
|
||||
* Michael Wobst <wobst.michael@web.de>
|
||||
* Mark Summers <mark@goopler.net>
|
||||
* Matt Schatz <genius3000@g3k.solutions>
|
||||
* PeGaSuS <droider.pc@gmail.com>
|
||||
* Mark Summers <mark@goopler.net>
|
||||
* Daniel Vassdal <shutter@canternet.org>
|
||||
* MatthewM <mcm@they-got.us>
|
||||
* Sebastian V. <hal9000@denorastats.org>
|
||||
@@ -33,11 +33,11 @@ contributions they have made, are:
|
||||
* Hendrik Jäger <gitcommit@henk.geekmail.org>
|
||||
* k4be <k4be@pirc.pl>
|
||||
* Thomas Fargeix <t.fargeix@gmail.com>
|
||||
* CaPa CuL <capacul@gmail.com>
|
||||
* Val Lorentz <progval+git@progval.net>
|
||||
* Bram Matthys <syzop@vulnscan.org>
|
||||
* Federico G. Schwindt <fgsch@lodoss.net>
|
||||
* Alexander Barton <alex@barton.de>
|
||||
* CaPa CuL <capacul@gmail.com>
|
||||
* Cronus <cronus@nite-serv.com>
|
||||
* H7-25 <simos@simosnap.org>
|
||||
* Jyzee <jyzee.git@gmail.com>
|
||||
@@ -64,12 +64,14 @@ contributions they have made, are:
|
||||
* BoGu5 <bogus@onzin.org>
|
||||
* Chris Langsenkamp <chris@langsenkamp.com>
|
||||
* Clem Morton
|
||||
* crazycatdevs
|
||||
* Daniel Oaks <danneh@danneh.net>
|
||||
* Fabio Scotoni <cculex@gmail.com>
|
||||
* ItsOnlyBinary
|
||||
* Jason Foster <retsofaj@gmail.com>
|
||||
* Jeremy <jeremy@ssnet.ca>
|
||||
* Josh Soref
|
||||
* KidProtect
|
||||
* KindOne <ineedalifetoday@live.com>
|
||||
* linuxdaemon
|
||||
* Mantas Mikulėnas <grawity@gmail.com>
|
||||
|
||||
+160
@@ -0,0 +1,160 @@
|
||||
# Anope Change Log
|
||||
|
||||
## Anope 2.1.20 (2025-12-01)
|
||||
|
||||
### Breaking Changes
|
||||
|
||||
* Changed the registration of database types added by modules to be delayed until after the module constructor has been called. This might affect any custom modules you are using.
|
||||
|
||||
* Moved akicks out of the core into cs_akick. Modules which depend on akicks now require the cs_akick module to be loaded.
|
||||
|
||||
### Changes
|
||||
|
||||
* Added `{db_json}:preserve_unknown_data` to configure whether unknown database types are kept in the JSON database. By default unknown database types from unloaded modules will be preserved in the database to allow reloading later. This setting can be used to disable this and prune the database.
|
||||
|
||||
* Added support for forbidding passwords. This is intended to be used with file forbids (see below).
|
||||
|
||||
```
|
||||
/OPERSERV FORBID ADD PASSWORD +30d hunter2 This password is insecure
|
||||
-OperServ- Added a forbid on hunter2 of type password to expire on Mon 29 Dec 2025 11:51:13 AM UTC (30 days from now).
|
||||
```
|
||||
|
||||
* Added support for loading forbids from a file.
|
||||
|
||||
```cpp
|
||||
file
|
||||
{
|
||||
type = "email"
|
||||
file = "temp-emails.txt"
|
||||
reason = "Temporary email"
|
||||
}
|
||||
```
|
||||
|
||||
* Added support for the UnrealIRCd `+F` flood profile mode.
|
||||
|
||||
* Added the `anope-mkpasswd` script to help generate passwords for use in the config.
|
||||
|
||||
```
|
||||
$ ./anope-mkpasswd argon2id hunter2
|
||||
For use in the database:
|
||||
argon2id:$argon2id$v=19$m=65536,t=3,p=4$AmGWdtn1OUT9WSKSqESsPw$iguvHs6oIi/hF7e3t/bGNwgqP41vl/J4qP3a/yH9SLo
|
||||
|
||||
For use in an oper:
|
||||
password = "$argon2id$v=19$m=65536,t=3,p=4$AmGWdtn1OUT9WSKSqESsPw$iguvHs6oIi/hF7e3t/bGNwgqP41vl/J4qP3a/yH9SLo"
|
||||
password_hash = "argon2id"
|
||||
|
||||
For use in an jsonrpc/xmlrpc token:
|
||||
token = "$argon2id$v=19$m=65536,t=3,p=4$AmGWdtn1OUT9WSKSqESsPw$iguvHs6oIi/hF7e3t/bGNwgqP41vl/J4qP3a/yH9SLo"
|
||||
token_hash = "argon2id"
|
||||
|
||||
Make sure you have the enc_argon2 module loaded!
|
||||
```
|
||||
|
||||
* Added the DISPLAY flag to `nickserv/list` to only show account display nicknames.
|
||||
|
||||
```
|
||||
/NICKSERV LIST *
|
||||
-NickServ- List of entries matching *:
|
||||
-NickServ- nick1 (last mask: foo@example.com)
|
||||
-NickServ- nick1|afk (last mask: bar@example.com)
|
||||
-NickServ- nick2 (last mask: baz@example.com)
|
||||
-NickServ- End of list - 3/3 matches shown.
|
||||
|
||||
/NICKSERV LIST * DISPLAY
|
||||
-NickServ- List of entries matching *:
|
||||
-NickServ- nick1 (last mask: foo@example.com)
|
||||
-NickServ- nick2 (last mask: baz@example.com)
|
||||
-NickServ- End of list - 2/2 matches shown.
|
||||
```
|
||||
|
||||
* Added the hs_offer module which allows offering templated vhosts to users (based on a
|
||||
modsite module by @genius3000 on GitHub).
|
||||
|
||||
```
|
||||
/HOSTSERV OFFER ADD {account}.users.example.com
|
||||
|
||||
/HOSTSERV OFFERLIST
|
||||
-HostServ- Current host offer list:
|
||||
-HostServ- 2: {account}.users.example.com / FooBar.users.example.com -- does not expire
|
||||
-HostServ- End of host offer list.
|
||||
```
|
||||
|
||||
* Changed chanserv/mode lock messages to stack the responses into one message per type instead of sending one message per mode.
|
||||
|
||||
```
|
||||
/CHANSERV MODE #stest LOCK ADD +bb foo!foo@foo bar!bar@bar
|
||||
-ChanServ- +bb foo!foo@foo bar!bar@bar has been locked on #stest.
|
||||
```
|
||||
|
||||
* Changed database objects to rehook to their type when it becomes available again.
|
||||
|
||||
* Changed the `nickserv/set/language` and `nickserv/set/timezone` commands to allow setting back to the default value by omitting the last parameter.
|
||||
|
||||
```
|
||||
/NICKSERV SET LANGUAGE
|
||||
12:23 -NickServ- Language changed to English.
|
||||
|
||||
/NICKSERV SET TIMEZONE
|
||||
12:24 -NickServ- Timezone changed to UTC.
|
||||
```
|
||||
|
||||
* Changed the default install directory from `~/anope` to `~/anope-2.1`.
|
||||
|
||||
* Changed the enc_sha1 module to use a vendored SHA-1 implementation.
|
||||
|
||||
* Expanded password obscurity checks and added an event hook to allow modules to reject passwords.
|
||||
|
||||
* Fixed the rpc_user module sending the "invalid account" and "invalid password" error codes inverted.
|
||||
|
||||
* Fixed unintentionally reloading the core database when reloading a module that provides a database type.
|
||||
|
||||
* Removed a bunch of obsolete build system cruft.
|
||||
|
||||
## Anope 2.1.19 (2025-11-01)
|
||||
|
||||
### Breaking Changes
|
||||
|
||||
* `pkg-config` is now required to find dependencies for the following modules on UNIX systems:
|
||||
- enc_argon2
|
||||
- ldap
|
||||
- mysql
|
||||
- regex_pcre2
|
||||
- regex_tre
|
||||
|
||||
* Support for InspIRCd v3 has been dropped ahead of it going EOL in two months. Please migrate to InspIRCd v4 to keep using Anope 2.1 with InspIRCd.
|
||||
|
||||
### Changes
|
||||
|
||||
* Added a Romanian translation (contributed by @KidProtect on GitHub).
|
||||
|
||||
* Added support for associating a timezone with an account to allow users to receive timestamps in their local timezone.
|
||||
|
||||
```
|
||||
/NICKSERV SET TIMEZONE Europe/London
|
||||
-NickServ- Timezone changed to Europe/Berlin.
|
||||
|
||||
/NICKSERV INFO test
|
||||
-NickServ- Account registered: Thu 09 Oct 2025 15:22:45 CEST (45 seconds ago)
|
||||
```
|
||||
|
||||
NOTE: This requires a compiler with C++20 timezone support.
|
||||
|
||||
* Added support for IRCv3 message tags when using Solanum git.
|
||||
|
||||
* Added support for language-specific time formats.
|
||||
|
||||
```
|
||||
/NICKSERV SET LANGUAGE tr_TR.UTF-8
|
||||
-NickServ- Dil Türkçe olarak değiştirildi.
|
||||
|
||||
/NICKSERV INFO test
|
||||
-NickServ- Hesap kaydedildi: Prş 09 Eki 2025 15:22:45 (6 dakika, 16 saniye önce)
|
||||
```
|
||||
|
||||
* Channel entry messages are now tagged with an IRCv3 time tag for the time they were created on supporting IRCds. This defaults to on but can be disabled using `{cs_entrymsg}:timestamp`.
|
||||
|
||||
* Reordered the information in the `nickserv/info` command output to show the registration dates before the seen information.
|
||||
|
||||
* Updated the Turkish translation (contributed by @CaPaCuL on GitHub).
|
||||
|
||||
* Updated the vendored libraries.
|
||||
+1
-5
@@ -3,11 +3,7 @@ if(WIN32)
|
||||
# Only install given files from this directory
|
||||
# NOTE: I would've had this just find all files in the directory, but that would include files not needed (like this file)
|
||||
execute_process(COMMAND ${CMAKE_COMMAND} -E copy ${CMAKE_CURRENT_SOURCE_DIR}/README ${CMAKE_CURRENT_BINARY_DIR}/README.txt)
|
||||
if(IN_SOURCE)
|
||||
# Add README.txt to list of files for CPack to ignore
|
||||
add_to_cpack_ignored_files("README.txt$" TRUE)
|
||||
endif()
|
||||
set(DOCS Changes Changes.conf DEFCON FAQ INSTALL LANGUAGE MODULES ${CMAKE_CURRENT_BINARY_DIR}/README.txt WIN32.txt)
|
||||
set(DOCS CHANGES.md DEFCON FAQ INSTALL LANGUAGE MODULES ${CMAKE_CURRENT_BINARY_DIR}/README.txt WIN32.txt)
|
||||
install(FILES ${DOCS}
|
||||
DESTINATION ${DOC_DIR}
|
||||
)
|
||||
|
||||
-347
@@ -1,347 +0,0 @@
|
||||
GNU GENERAL PUBLIC LICENSE
|
||||
Version 2, June 1991
|
||||
|
||||
Copyright (C) 1989, 1991 Free Software Foundation, Inc.
|
||||
|
||||
51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA
|
||||
|
||||
Everyone is permitted to copy and distribute verbatim copies
|
||||
of this license document, but changing it is not allowed.
|
||||
|
||||
Preamble
|
||||
|
||||
The licenses for most software are designed to take away your
|
||||
freedom to share and change it. By contrast, the GNU General Public
|
||||
License is intended to guarantee your freedom to share and change free
|
||||
software--to make sure the software is free for all its users. This
|
||||
General Public License applies to most of the Free Software
|
||||
Foundation's software and to any other program whose authors commit to
|
||||
using it. (Some other Free Software Foundation software is covered by
|
||||
the GNU Lesser General Public License instead.) You can apply it to
|
||||
your programs, too.
|
||||
|
||||
When we speak of free software, we are referring to freedom, not
|
||||
price. Our General Public Licenses are designed to make sure that you
|
||||
have the freedom to distribute copies of free software (and charge for
|
||||
this service if you wish), that you receive source code or can get it
|
||||
if you want it, that you can change the software or use pieces of it
|
||||
in new free programs; and that you know you can do these things.
|
||||
|
||||
To protect your rights, we need to make restrictions that forbid
|
||||
anyone to deny you these rights or to ask you to surrender the rights.
|
||||
These restrictions translate to certain responsibilities for you if you
|
||||
distribute copies of the software, or if you modify it.
|
||||
|
||||
For example, if you distribute copies of such a program, whether
|
||||
gratis or for a fee, you must give the recipients all the rights that
|
||||
you have. You must make sure that they, too, receive or can get the
|
||||
source code. And you must show them these terms so they know their
|
||||
rights.
|
||||
|
||||
We protect your rights with two steps: (1) copyright the software, and
|
||||
(2) offer you this license which gives you legal permission to copy,
|
||||
distribute and/or modify the software.
|
||||
|
||||
Also, for each author's protection and ours, we want to make certain
|
||||
that everyone understands that there is no warranty for this free
|
||||
software. If the software is modified by someone else and passed on, we
|
||||
want its recipients to know that what they have is not the original, so
|
||||
that any problems introduced by others will not reflect on the original
|
||||
authors' reputations.
|
||||
|
||||
Finally, any free program is threatened constantly by software
|
||||
patents. We wish to avoid the danger that redistributors of a free
|
||||
program will individually obtain patent licenses, in effect making the
|
||||
program proprietary. To prevent this, we have made it clear that any
|
||||
patent must be licensed for everyone's free use or not licensed at all.
|
||||
|
||||
The precise terms and conditions for copying, distribution and
|
||||
modification follow.
|
||||
|
||||
GNU GENERAL PUBLIC LICENSE
|
||||
TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION
|
||||
|
||||
|
||||
0. This License applies to any program or other work which contains
|
||||
a notice placed by the copyright holder saying it may be distributed
|
||||
under the terms of this General Public License. The "Program", below,
|
||||
refers to any such program or work, and a "work based on the Program"
|
||||
means either the Program or any derivative work under copyright law:
|
||||
that is to say, a work containing the Program or a portion of it,
|
||||
either verbatim or with modifications and/or translated into another
|
||||
language. (Hereinafter, translation is included without limitation in
|
||||
the term "modification".) Each licensee is addressed as "you".
|
||||
|
||||
Activities other than copying, distribution and modification are not
|
||||
covered by this License; they are outside its scope. The act of
|
||||
running the Program is not restricted, and the output from the Program
|
||||
is covered only if its contents constitute a work based on the
|
||||
Program (independent of having been made by running the Program).
|
||||
Whether that is true depends on what the Program does.
|
||||
|
||||
1. You may copy and distribute verbatim copies of the Program's
|
||||
source code as you receive it, in any medium, provided that you
|
||||
conspicuously and appropriately publish on each copy an appropriate
|
||||
copyright notice and disclaimer of warranty; keep intact all the
|
||||
notices that refer to this License and to the absence of any warranty;
|
||||
and give any other recipients of the Program a copy of this License
|
||||
along with the Program.
|
||||
|
||||
You may charge a fee for the physical act of transferring a copy, and
|
||||
you may at your option offer warranty protection in exchange for a fee.
|
||||
|
||||
2. You may modify your copy or copies of the Program or any portion
|
||||
of it, thus forming a work based on the Program, and copy and
|
||||
distribute such modifications or work under the terms of Section 1
|
||||
above, provided that you also meet all of these conditions:
|
||||
|
||||
a) You must cause the modified files to carry prominent notices
|
||||
stating that you changed the files and the date of any change.
|
||||
|
||||
b) You must cause any work that you distribute or publish, that in
|
||||
whole or in part contains or is derived from the Program or any
|
||||
part thereof, to be licensed as a whole at no charge to all third
|
||||
parties under the terms of this License.
|
||||
|
||||
c) If the modified program normally reads commands interactively
|
||||
when run, you must cause it, when started running for such
|
||||
interactive use in the most ordinary way, to print or display an
|
||||
announcement including an appropriate copyright notice and a
|
||||
notice that there is no warranty (or else, saying that you provide
|
||||
a warranty) and that users may redistribute the program under
|
||||
these conditions, and telling the user how to view a copy of this
|
||||
License. (Exception: if the Program itself is interactive but
|
||||
does not normally print such an announcement, your work based on
|
||||
the Program is not required to print an announcement.)
|
||||
|
||||
These requirements apply to the modified work as a whole. If
|
||||
identifiable sections of that work are not derived from the Program,
|
||||
and can be reasonably considered independent and separate works in
|
||||
themselves, then this License, and its terms, do not apply to those
|
||||
sections when you distribute them as separate works. But when you
|
||||
distribute the same sections as part of a whole which is a work based
|
||||
on the Program, the distribution of the whole must be on the terms of
|
||||
this License, whose permissions for other licensees extend to the entire
|
||||
whole, and thus to each and every part regardless of who wrote it.
|
||||
|
||||
Thus, it is not the intent of this section to claim rights or contest
|
||||
your rights to work written entirely by you; rather, the intent is to
|
||||
exercise the right to control the distribution of derivative or
|
||||
collective works based on the Program.
|
||||
|
||||
In addition, mere aggregation of another work not based on the Program
|
||||
with the Program (or with a work based on the Program) on a volume of
|
||||
a storage or distribution medium does not bring the other work under
|
||||
the scope of this License.
|
||||
|
||||
3. You may copy and distribute the Program (or a work based on it,
|
||||
under Section 2) in object code or executable form under the terms of
|
||||
Sections 1 and 2 above provided that you also do one of the following:
|
||||
|
||||
a) Accompany it with the complete corresponding machine-readable
|
||||
source code, which must be distributed under the terms of Sections
|
||||
1 and 2 above on a medium customarily used for software interchange; or,
|
||||
|
||||
b) Accompany it with a written offer, valid for at least three years,
|
||||
to give any third party, for a charge no more than your cost of
|
||||
physically performing source distribution, a complete machine-readable
|
||||
copy of the corresponding source code, to be distributed under the terms
|
||||
of Sections 1 and 2 above on a medium customarily used for software
|
||||
interchange; or,
|
||||
|
||||
c) Accompany it with the information you received as to the offer
|
||||
to distribute corresponding source code. (This alternative is allowed
|
||||
only for noncommercial distribution and only if you received the program
|
||||
in object code or executable form with such an offer, in accord with
|
||||
Subsection b above.)
|
||||
|
||||
The source code for a work means the preferred form of the work for
|
||||
making modifications to it. For an executable work, complete source
|
||||
code means all the source code for all modules it contains, plus any
|
||||
associated interface definition files, plus the scripts used to
|
||||
control compilation and installation of the executable. However, as a
|
||||
special exception, the source code distributed need not include
|
||||
anything that is normally distributed (in either source or binary
|
||||
form) with the major components (compiler, kernel, and so on) of the
|
||||
operating system on which the executable runs, unless that component
|
||||
itself accompanies the executable.
|
||||
|
||||
If distribution of executable or object code is made by offering
|
||||
access to copy from a designated place, then offering equivalent
|
||||
access to copy the source code from the same place counts as
|
||||
distribution of the source code, even though third parties are not
|
||||
compelled to copy the source along with the object code.
|
||||
|
||||
4. You may not copy, modify, sublicense, or distribute the Program
|
||||
except as expressly provided under this License. Any attempt
|
||||
otherwise to copy, modify, sublicense or distribute the Program is
|
||||
void, and will automatically terminate your rights under this License.
|
||||
However, parties who have received copies, or rights, from you under
|
||||
this License will not have their licenses terminated so long as such
|
||||
parties remain in full compliance.
|
||||
|
||||
5. You are not required to accept this License, since you have not
|
||||
signed it. However, nothing else grants you permission to modify or
|
||||
distribute the Program or its derivative works. These actions are
|
||||
prohibited by law if you do not accept this License. Therefore, by
|
||||
modifying or distributing the Program (or any work based on the
|
||||
Program), you indicate your acceptance of this License to do so, and
|
||||
all its terms and conditions for copying, distributing or modifying
|
||||
the Program or works based on it.
|
||||
|
||||
6. Each time you redistribute the Program (or any work based on the
|
||||
Program), the recipient automatically receives a license from the
|
||||
original licensor to copy, distribute or modify the Program subject to
|
||||
these terms and conditions. You may not impose any further
|
||||
restrictions on the recipients' exercise of the rights granted herein.
|
||||
You are not responsible for enforcing compliance by third parties to
|
||||
this License.
|
||||
|
||||
7. If, as a consequence of a court judgment or allegation of patent
|
||||
infringement or for any other reason (not limited to patent issues),
|
||||
conditions are imposed on you (whether by court order, agreement or
|
||||
otherwise) that contradict the conditions of this License, they do not
|
||||
excuse you from the conditions of this License. If you cannot
|
||||
distribute so as to satisfy simultaneously your obligations under this
|
||||
License and any other pertinent obligations, then as a consequence you
|
||||
may not distribute the Program at all. For example, if a patent license
|
||||
would not permit royalty-free redistribution of the Program by all those
|
||||
who receive copies directly or indirectly through you, then the only way
|
||||
you could satisfy both it and this License would be to refrain entirely
|
||||
from distribution of the Program.
|
||||
|
||||
If any portion of this section is held invalid or unenforceable under
|
||||
any particular circumstance, the balance of the section is intended to
|
||||
apply and the section as a whole is intended to apply in other
|
||||
circumstances.
|
||||
|
||||
It is not the purpose of this section to induce you to infringe any
|
||||
patents or other property right claims or to contest validity of any
|
||||
such claims; this section has the sole purpose of protecting the
|
||||
integrity of the free software distribution system, which is implemented
|
||||
by public license practices. Many people have made generous contributions
|
||||
to the wide range of software distributed through that system in reliance
|
||||
on consistent application of that system; it is up to the author/donor to
|
||||
decide if he or she is willing to distribute software through any other
|
||||
system and a licensee cannot impose that choice.
|
||||
|
||||
This section is intended to make thoroughly clear what is believed to be
|
||||
a consequence of the rest of this License.
|
||||
|
||||
|
||||
8. If the distribution and/or use of the Program is restricted in
|
||||
certain countries either by patents or by copyrighted interfaces, the
|
||||
original copyright holder who places the Program under this License
|
||||
may add an explicit geographical distribution limitation excluding
|
||||
those countries, so that distribution is permitted only in or among
|
||||
countries not thus excluded. In such case, this License incorporates
|
||||
the limitation as if written in the body of this License.
|
||||
|
||||
9. The Free Software Foundation may publish revised and/or new versions
|
||||
of the General Public License from time to time. Such new versions will
|
||||
be similar in spirit to the present version, but may differ in detail to
|
||||
address new problems or concerns.
|
||||
|
||||
Each version is given a distinguishing version number. If the Program
|
||||
specifies a version number of this License which applies to it and "any
|
||||
later version", you have the option of following the terms and conditions
|
||||
either of that version or of any later version published by the Free
|
||||
Software Foundation. If the Program does not specify a version number of
|
||||
this License, you may choose any version ever published by the Free Software
|
||||
Foundation.
|
||||
|
||||
10. If you wish to incorporate parts of the Program into other free
|
||||
programs whose distribution conditions are different, write to the author
|
||||
to ask for permission. For software which is copyrighted by the Free
|
||||
Software Foundation, write to the Free Software Foundation; we sometimes
|
||||
make exceptions for this. Our decision will be guided by the two goals
|
||||
of preserving the free status of all derivatives of our free software and
|
||||
of promoting the sharing and reuse of software generally.
|
||||
|
||||
NO WARRANTY
|
||||
|
||||
11. BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY
|
||||
FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN
|
||||
OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES
|
||||
PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED
|
||||
OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
|
||||
MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS
|
||||
TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU. SHOULD THE
|
||||
PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING,
|
||||
REPAIR OR CORRECTION.
|
||||
|
||||
12. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING
|
||||
WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR
|
||||
REDISTRIBUTE THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES,
|
||||
INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING
|
||||
OUT OF THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED
|
||||
TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY
|
||||
YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER
|
||||
PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE
|
||||
POSSIBILITY OF SUCH DAMAGES.
|
||||
|
||||
END OF TERMS AND CONDITIONS
|
||||
|
||||
How to Apply These Terms to Your New Programs
|
||||
|
||||
If you develop a new program, and you want it to be of the greatest
|
||||
possible use to the public, the best way to achieve this is to make
|
||||
it free software which everyone can redistribute and change under
|
||||
these terms.
|
||||
|
||||
To do so, attach the following notices to the program. It is safest
|
||||
to attach them to the start of each source file to most effectively
|
||||
convey the exclusion of warranty; and each file should have at least
|
||||
the "copyright" line and a pointer to where the full notice is found.
|
||||
|
||||
<one line to give the program's name and an idea of what it does.>
|
||||
Copyright (C) yyyy name of author
|
||||
|
||||
This program is free software; you can redistribute it and/or
|
||||
modify it under the terms of the GNU General Public License
|
||||
as published by the Free Software Foundation; either version 2
|
||||
of the License, or (at your option) any later version.
|
||||
|
||||
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, write to the Free Software
|
||||
Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
|
||||
02110-1301, USA.
|
||||
|
||||
Also add information on how to contact you by electronic and paper mail.
|
||||
|
||||
If the program is interactive, make it output a short notice like this
|
||||
when it starts in an interactive mode:
|
||||
|
||||
Gnomovision version 69, Copyright (C) year name of author
|
||||
Gnomovision comes with ABSOLUTELY NO WARRANTY; for details
|
||||
type `show w'. This is free software, and you are welcome
|
||||
to redistribute it under certain conditions; type `show c'
|
||||
for details.
|
||||
|
||||
The hypothetical commands `show w' and `show c' should show the appropriate
|
||||
parts of the General Public License. Of course, the commands you use may
|
||||
be called something other than `show w' and `show c'; they could even be
|
||||
mouse-clicks or menu items--whatever suits your program.
|
||||
|
||||
You should also get your employer (if you work as a programmer) or your
|
||||
school, if any, to sign a "copyright disclaimer" for the program, if
|
||||
necessary. Here is a sample; alter the names:
|
||||
|
||||
Yoyodyne, Inc., hereby disclaims all copyright interest in the program
|
||||
`Gnomovision' (which makes passes at compilers) written by James Hacker.
|
||||
|
||||
<signature of Ty Coon>, 1 April 1989
|
||||
Ty Coon, President of Vice
|
||||
|
||||
This General Public License does not permit incorporating your program into
|
||||
proprietary programs. If your program is a subroutine library, you may
|
||||
consider it more useful to permit linking proprietary applications with the
|
||||
library. If this is what you want to do, use the GNU Lesser General
|
||||
Public License instead of this License.
|
||||
|
||||
|
||||
+2
-7
@@ -10,14 +10,9 @@ Anope Multi Language Support
|
||||
|
||||
To build Anope with gettext support, gettext and its development libraries must be installed on the system.
|
||||
|
||||
On Debian install the locales-all package.
|
||||
On Debian-based systems install the locales-all package.
|
||||
|
||||
On Ubuntu run locale-gen for each language you want to enable.
|
||||
For example:
|
||||
locale-gen es_ES.UTF-8
|
||||
|
||||
Then execute:
|
||||
dpkg-reconfigure locales
|
||||
On RHEL-based systems run `yum list glibc-langpack-*` and install the languages you want to enable.
|
||||
|
||||
If you have already built Anope you will need to delete the build directory and rebuild from scratch.
|
||||
|
||||
|
||||
@@ -0,0 +1,338 @@
|
||||
GNU GENERAL PUBLIC LICENSE
|
||||
Version 2, June 1991
|
||||
|
||||
Copyright (C) 1989, 1991 Free Software Foundation, Inc.,
|
||||
<https://fsf.org/>
|
||||
Everyone is permitted to copy and distribute verbatim copies
|
||||
of this license document, but changing it is not allowed.
|
||||
|
||||
Preamble
|
||||
|
||||
The licenses for most software are designed to take away your
|
||||
freedom to share and change it. By contrast, the GNU General Public
|
||||
License is intended to guarantee your freedom to share and change free
|
||||
software--to make sure the software is free for all its users. This
|
||||
General Public License applies to most of the Free Software
|
||||
Foundation's software and to any other program whose authors commit to
|
||||
using it. (Some other Free Software Foundation software is covered by
|
||||
the GNU Lesser General Public License instead.) You can apply it to
|
||||
your programs, too.
|
||||
|
||||
When we speak of free software, we are referring to freedom, not
|
||||
price. Our General Public Licenses are designed to make sure that you
|
||||
have the freedom to distribute copies of free software (and charge for
|
||||
this service if you wish), that you receive source code or can get it
|
||||
if you want it, that you can change the software or use pieces of it
|
||||
in new free programs; and that you know you can do these things.
|
||||
|
||||
To protect your rights, we need to make restrictions that forbid
|
||||
anyone to deny you these rights or to ask you to surrender the rights.
|
||||
These restrictions translate to certain responsibilities for you if you
|
||||
distribute copies of the software, or if you modify it.
|
||||
|
||||
For example, if you distribute copies of such a program, whether
|
||||
gratis or for a fee, you must give the recipients all the rights that
|
||||
you have. You must make sure that they, too, receive or can get the
|
||||
source code. And you must show them these terms so they know their
|
||||
rights.
|
||||
|
||||
We protect your rights with two steps: (1) copyright the software, and
|
||||
(2) offer you this license which gives you legal permission to copy,
|
||||
distribute and/or modify the software.
|
||||
|
||||
Also, for each author's protection and ours, we want to make certain
|
||||
that everyone understands that there is no warranty for this free
|
||||
software. If the software is modified by someone else and passed on, we
|
||||
want its recipients to know that what they have is not the original, so
|
||||
that any problems introduced by others will not reflect on the original
|
||||
authors' reputations.
|
||||
|
||||
Finally, any free program is threatened constantly by software
|
||||
patents. We wish to avoid the danger that redistributors of a free
|
||||
program will individually obtain patent licenses, in effect making the
|
||||
program proprietary. To prevent this, we have made it clear that any
|
||||
patent must be licensed for everyone's free use or not licensed at all.
|
||||
|
||||
The precise terms and conditions for copying, distribution and
|
||||
modification follow.
|
||||
|
||||
GNU GENERAL PUBLIC LICENSE
|
||||
TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION
|
||||
|
||||
0. This License applies to any program or other work which contains
|
||||
a notice placed by the copyright holder saying it may be distributed
|
||||
under the terms of this General Public License. The "Program", below,
|
||||
refers to any such program or work, and a "work based on the Program"
|
||||
means either the Program or any derivative work under copyright law:
|
||||
that is to say, a work containing the Program or a portion of it,
|
||||
either verbatim or with modifications and/or translated into another
|
||||
language. (Hereinafter, translation is included without limitation in
|
||||
the term "modification".) Each licensee is addressed as "you".
|
||||
|
||||
Activities other than copying, distribution and modification are not
|
||||
covered by this License; they are outside its scope. The act of
|
||||
running the Program is not restricted, and the output from the Program
|
||||
is covered only if its contents constitute a work based on the
|
||||
Program (independent of having been made by running the Program).
|
||||
Whether that is true depends on what the Program does.
|
||||
|
||||
1. You may copy and distribute verbatim copies of the Program's
|
||||
source code as you receive it, in any medium, provided that you
|
||||
conspicuously and appropriately publish on each copy an appropriate
|
||||
copyright notice and disclaimer of warranty; keep intact all the
|
||||
notices that refer to this License and to the absence of any warranty;
|
||||
and give any other recipients of the Program a copy of this License
|
||||
along with the Program.
|
||||
|
||||
You may charge a fee for the physical act of transferring a copy, and
|
||||
you may at your option offer warranty protection in exchange for a fee.
|
||||
|
||||
2. You may modify your copy or copies of the Program or any portion
|
||||
of it, thus forming a work based on the Program, and copy and
|
||||
distribute such modifications or work under the terms of Section 1
|
||||
above, provided that you also meet all of these conditions:
|
||||
|
||||
a) You must cause the modified files to carry prominent notices
|
||||
stating that you changed the files and the date of any change.
|
||||
|
||||
b) You must cause any work that you distribute or publish, that in
|
||||
whole or in part contains or is derived from the Program or any
|
||||
part thereof, to be licensed as a whole at no charge to all third
|
||||
parties under the terms of this License.
|
||||
|
||||
c) If the modified program normally reads commands interactively
|
||||
when run, you must cause it, when started running for such
|
||||
interactive use in the most ordinary way, to print or display an
|
||||
announcement including an appropriate copyright notice and a
|
||||
notice that there is no warranty (or else, saying that you provide
|
||||
a warranty) and that users may redistribute the program under
|
||||
these conditions, and telling the user how to view a copy of this
|
||||
License. (Exception: if the Program itself is interactive but
|
||||
does not normally print such an announcement, your work based on
|
||||
the Program is not required to print an announcement.)
|
||||
|
||||
These requirements apply to the modified work as a whole. If
|
||||
identifiable sections of that work are not derived from the Program,
|
||||
and can be reasonably considered independent and separate works in
|
||||
themselves, then this License, and its terms, do not apply to those
|
||||
sections when you distribute them as separate works. But when you
|
||||
distribute the same sections as part of a whole which is a work based
|
||||
on the Program, the distribution of the whole must be on the terms of
|
||||
this License, whose permissions for other licensees extend to the
|
||||
entire whole, and thus to each and every part regardless of who wrote it.
|
||||
|
||||
Thus, it is not the intent of this section to claim rights or contest
|
||||
your rights to work written entirely by you; rather, the intent is to
|
||||
exercise the right to control the distribution of derivative or
|
||||
collective works based on the Program.
|
||||
|
||||
In addition, mere aggregation of another work not based on the Program
|
||||
with the Program (or with a work based on the Program) on a volume of
|
||||
a storage or distribution medium does not bring the other work under
|
||||
the scope of this License.
|
||||
|
||||
3. You may copy and distribute the Program (or a work based on it,
|
||||
under Section 2) in object code or executable form under the terms of
|
||||
Sections 1 and 2 above provided that you also do one of the following:
|
||||
|
||||
a) Accompany it with the complete corresponding machine-readable
|
||||
source code, which must be distributed under the terms of Sections
|
||||
1 and 2 above on a medium customarily used for software interchange; or,
|
||||
|
||||
b) Accompany it with a written offer, valid for at least three
|
||||
years, to give any third party, for a charge no more than your
|
||||
cost of physically performing source distribution, a complete
|
||||
machine-readable copy of the corresponding source code, to be
|
||||
distributed under the terms of Sections 1 and 2 above on a medium
|
||||
customarily used for software interchange; or,
|
||||
|
||||
c) Accompany it with the information you received as to the offer
|
||||
to distribute corresponding source code. (This alternative is
|
||||
allowed only for noncommercial distribution and only if you
|
||||
received the program in object code or executable form with such
|
||||
an offer, in accord with Subsection b above.)
|
||||
|
||||
The source code for a work means the preferred form of the work for
|
||||
making modifications to it. For an executable work, complete source
|
||||
code means all the source code for all modules it contains, plus any
|
||||
associated interface definition files, plus the scripts used to
|
||||
control compilation and installation of the executable. However, as a
|
||||
special exception, the source code distributed need not include
|
||||
anything that is normally distributed (in either source or binary
|
||||
form) with the major components (compiler, kernel, and so on) of the
|
||||
operating system on which the executable runs, unless that component
|
||||
itself accompanies the executable.
|
||||
|
||||
If distribution of executable or object code is made by offering
|
||||
access to copy from a designated place, then offering equivalent
|
||||
access to copy the source code from the same place counts as
|
||||
distribution of the source code, even though third parties are not
|
||||
compelled to copy the source along with the object code.
|
||||
|
||||
4. You may not copy, modify, sublicense, or distribute the Program
|
||||
except as expressly provided under this License. Any attempt
|
||||
otherwise to copy, modify, sublicense or distribute the Program is
|
||||
void, and will automatically terminate your rights under this License.
|
||||
However, parties who have received copies, or rights, from you under
|
||||
this License will not have their licenses terminated so long as such
|
||||
parties remain in full compliance.
|
||||
|
||||
5. You are not required to accept this License, since you have not
|
||||
signed it. However, nothing else grants you permission to modify or
|
||||
distribute the Program or its derivative works. These actions are
|
||||
prohibited by law if you do not accept this License. Therefore, by
|
||||
modifying or distributing the Program (or any work based on the
|
||||
Program), you indicate your acceptance of this License to do so, and
|
||||
all its terms and conditions for copying, distributing or modifying
|
||||
the Program or works based on it.
|
||||
|
||||
6. Each time you redistribute the Program (or any work based on the
|
||||
Program), the recipient automatically receives a license from the
|
||||
original licensor to copy, distribute or modify the Program subject to
|
||||
these terms and conditions. You may not impose any further
|
||||
restrictions on the recipients' exercise of the rights granted herein.
|
||||
You are not responsible for enforcing compliance by third parties to
|
||||
this License.
|
||||
|
||||
7. If, as a consequence of a court judgment or allegation of patent
|
||||
infringement or for any other reason (not limited to patent issues),
|
||||
conditions are imposed on you (whether by court order, agreement or
|
||||
otherwise) that contradict the conditions of this License, they do not
|
||||
excuse you from the conditions of this License. If you cannot
|
||||
distribute so as to satisfy simultaneously your obligations under this
|
||||
License and any other pertinent obligations, then as a consequence you
|
||||
may not distribute the Program at all. For example, if a patent
|
||||
license would not permit royalty-free redistribution of the Program by
|
||||
all those who receive copies directly or indirectly through you, then
|
||||
the only way you could satisfy both it and this License would be to
|
||||
refrain entirely from distribution of the Program.
|
||||
|
||||
If any portion of this section is held invalid or unenforceable under
|
||||
any particular circumstance, the balance of the section is intended to
|
||||
apply and the section as a whole is intended to apply in other
|
||||
circumstances.
|
||||
|
||||
It is not the purpose of this section to induce you to infringe any
|
||||
patents or other property right claims or to contest validity of any
|
||||
such claims; this section has the sole purpose of protecting the
|
||||
integrity of the free software distribution system, which is
|
||||
implemented by public license practices. Many people have made
|
||||
generous contributions to the wide range of software distributed
|
||||
through that system in reliance on consistent application of that
|
||||
system; it is up to the author/donor to decide if he or she is willing
|
||||
to distribute software through any other system and a licensee cannot
|
||||
impose that choice.
|
||||
|
||||
This section is intended to make thoroughly clear what is believed to
|
||||
be a consequence of the rest of this License.
|
||||
|
||||
8. If the distribution and/or use of the Program is restricted in
|
||||
certain countries either by patents or by copyrighted interfaces, the
|
||||
original copyright holder who places the Program under this License
|
||||
may add an explicit geographical distribution limitation excluding
|
||||
those countries, so that distribution is permitted only in or among
|
||||
countries not thus excluded. In such case, this License incorporates
|
||||
the limitation as if written in the body of this License.
|
||||
|
||||
9. The Free Software Foundation may publish revised and/or new versions
|
||||
of the General Public License from time to time. Such new versions will
|
||||
be similar in spirit to the present version, but may differ in detail to
|
||||
address new problems or concerns.
|
||||
|
||||
Each version is given a distinguishing version number. If the Program
|
||||
specifies a version number of this License which applies to it and "any
|
||||
later version", you have the option of following the terms and conditions
|
||||
either of that version or of any later version published by the Free
|
||||
Software Foundation. If the Program does not specify a version number of
|
||||
this License, you may choose any version ever published by the Free Software
|
||||
Foundation.
|
||||
|
||||
10. If you wish to incorporate parts of the Program into other free
|
||||
programs whose distribution conditions are different, write to the author
|
||||
to ask for permission. For software which is copyrighted by the Free
|
||||
Software Foundation, write to the Free Software Foundation; we sometimes
|
||||
make exceptions for this. Our decision will be guided by the two goals
|
||||
of preserving the free status of all derivatives of our free software and
|
||||
of promoting the sharing and reuse of software generally.
|
||||
|
||||
NO WARRANTY
|
||||
|
||||
11. BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY
|
||||
FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN
|
||||
OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES
|
||||
PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED
|
||||
OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
|
||||
MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS
|
||||
TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU. SHOULD THE
|
||||
PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING,
|
||||
REPAIR OR CORRECTION.
|
||||
|
||||
12. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING
|
||||
WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR
|
||||
REDISTRIBUTE THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES,
|
||||
INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING
|
||||
OUT OF THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED
|
||||
TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY
|
||||
YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER
|
||||
PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE
|
||||
POSSIBILITY OF SUCH DAMAGES.
|
||||
|
||||
END OF TERMS AND CONDITIONS
|
||||
|
||||
How to Apply These Terms to Your New Programs
|
||||
|
||||
If you develop a new program, and you want it to be of the greatest
|
||||
possible use to the public, the best way to achieve this is to make it
|
||||
free software which everyone can redistribute and change under these terms.
|
||||
|
||||
To do so, attach the following notices to the program. It is safest
|
||||
to attach them to the start of each source file to most effectively
|
||||
convey the exclusion of warranty; and each file should have at least
|
||||
the "copyright" line and a pointer to where the full notice is found.
|
||||
|
||||
<one line to give the program's name and a brief idea of what it does.>
|
||||
Copyright (C) <year> <name of author>
|
||||
|
||||
This program is free software; you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
the Free Software Foundation; either version 2 of the License, or
|
||||
(at your option) any later version.
|
||||
|
||||
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 <https://www.gnu.org/licenses/>.
|
||||
|
||||
Also add information on how to contact you by electronic and paper mail.
|
||||
|
||||
If the program is interactive, make it output a short notice like this
|
||||
when it starts in an interactive mode:
|
||||
|
||||
Gnomovision version 69, Copyright (C) year name of author
|
||||
Gnomovision comes with ABSOLUTELY NO WARRANTY; for details type `show w'.
|
||||
This is free software, and you are welcome to redistribute it
|
||||
under certain conditions; type `show c' for details.
|
||||
|
||||
The hypothetical commands `show w' and `show c' should show the appropriate
|
||||
parts of the General Public License. Of course, the commands you use may
|
||||
be called something other than `show w' and `show c'; they could even be
|
||||
mouse-clicks or menu items--whatever suits your program.
|
||||
|
||||
You should also get your employer (if you work as a programmer) or your
|
||||
school, if any, to sign a "copyright disclaimer" for the program, if
|
||||
necessary. Here is a sample; alter the names:
|
||||
|
||||
Yoyodyne, Inc., hereby disclaims all copyright interest in the program
|
||||
`Gnomovision' (which makes passes at compilers) written by James Hacker.
|
||||
|
||||
<signature of Moe Ghoul>, 1 April 1989
|
||||
Moe Ghoul, President of Vice
|
||||
|
||||
This General Public License does not permit incorporating your program into
|
||||
proprietary programs. If your program is a subroutine library, you may
|
||||
consider it more useful to permit linking proprietary applications with the
|
||||
library. If this is what you want to do, use the GNU Lesser General
|
||||
Public License instead of this License.
|
||||
+1
-1
@@ -166,7 +166,7 @@ Table of Contents
|
||||
|
||||
Anope currently works with:
|
||||
|
||||
* InspIRCd 3 or later
|
||||
* InspIRCd 4 or later
|
||||
* ircd-hybrid 8.2.34 or later
|
||||
* ircd-ratbox 3 or later
|
||||
* ngIRCd 19.2 or later
|
||||
|
||||
+6
-10
@@ -1,8 +1,11 @@
|
||||
# Set version.cpp to use C++ as well as set its compile flags
|
||||
set_source_files_properties(version.cpp PROPERTIES LANGUAGE CXX COMPILE_FLAGS "${CXXFLAGS}")
|
||||
# Generate sysconf.h from the earlier configuration
|
||||
configure_file(
|
||||
"${CMAKE_CURRENT_SOURCE_DIR}/sysconf.h.cmake"
|
||||
"${CMAKE_CURRENT_BINARY_DIR}/sysconf.h"
|
||||
)
|
||||
|
||||
# Generate version-bin executable to modify version.h, setting it's linker flags as well
|
||||
add_executable(version-bin version.cpp)
|
||||
set_target_properties(version-bin PROPERTIES LINKER_LANGUAGE CXX LINK_FLAGS "${LDFLAGS}")
|
||||
set(version_BINARY "$<TARGET_FILE:version-bin>")
|
||||
# Modify version.h from the above executable, with dependencies to version.cpp
|
||||
# and all of the source files in the main build
|
||||
@@ -10,13 +13,6 @@ add_custom_command(OUTPUT ${CMAKE_CURRENT_BINARY_DIR}/version.h ${CMAKE_CURRENT_
|
||||
COMMAND version-bin ${Anope_SOURCE_DIR} ${CMAKE_CURRENT_BINARY_DIR}/version.h ${CMAKE_CURRENT_BINARY_DIR}/build.h
|
||||
DEPENDS version-bin ${SRC_SRCS}
|
||||
)
|
||||
# Add version-bin to list of files for CPack to ignore
|
||||
get_filename_component(version_BINARY ${version_BINARY} NAME)
|
||||
add_to_cpack_ignored_files("${version_BINARY}$" TRUE)
|
||||
if(NOT WIN32)
|
||||
add_to_cpack_ignored_files("version.h$" TRUE)
|
||||
add_to_cpack_ignored_files("build.h$" TRUE)
|
||||
endif()
|
||||
|
||||
# Add a custom target to the above file
|
||||
add_custom_target(headers DEPENDS ${CMAKE_CURRENT_BINARY_DIR}/version.h ${CMAKE_CURRENT_BINARY_DIR}/build.h)
|
||||
|
||||
+13
-10
@@ -1,13 +1,16 @@
|
||||
/*
|
||||
*
|
||||
* (C) 2003-2025 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.
|
||||
*/
|
||||
// Anope IRC Services <https://www.anope.org/>
|
||||
//
|
||||
// Copyright (C) 2003-2025 Anope Contributors
|
||||
//
|
||||
// Anope is free software. You can use, modify, and/or distribute it under the
|
||||
// terms of version 2 of the GNU General Public License. See docs/LICENSE.txt
|
||||
// for the complete terms of this license and docs/AUTHORS.txt for a list of
|
||||
// contributors.
|
||||
//
|
||||
// Based on the original code of Epona by Lara
|
||||
// Based on the original code of Services by Andy Church
|
||||
//
|
||||
// SPDX-License-Identifier: GPL-2.0-only
|
||||
|
||||
#pragma once
|
||||
|
||||
|
||||
+21
-13
@@ -1,13 +1,16 @@
|
||||
/*
|
||||
*
|
||||
* (C) 2003-2025 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.
|
||||
*/
|
||||
// Anope IRC Services <https://www.anope.org/>
|
||||
//
|
||||
// Copyright (C) 2003-2025 Anope Contributors
|
||||
//
|
||||
// Anope is free software. You can use, modify, and/or distribute it under the
|
||||
// terms of version 2 of the GNU General Public License. See docs/LICENSE.txt
|
||||
// for the complete terms of this license and docs/AUTHORS.txt for a list of
|
||||
// contributors.
|
||||
//
|
||||
// Based on the original code of Epona by Lara
|
||||
// Based on the original code of Services by Andy Church
|
||||
//
|
||||
// SPDX-License-Identifier: GPL-2.0-only
|
||||
|
||||
#pragma once
|
||||
|
||||
@@ -107,6 +110,11 @@ public:
|
||||
*/
|
||||
time_t GetVHostCreated() const;
|
||||
|
||||
/** Update the last seen time for the nickname.
|
||||
* @param u The user who is using the nickname.
|
||||
*/
|
||||
void UpdateSeen(User *u);
|
||||
|
||||
/** Finds a registered nick
|
||||
* @param nick The nick to lookup
|
||||
* @return the nick, if found
|
||||
@@ -184,7 +192,7 @@ public:
|
||||
/** Checks whether this account is a services oper or not.
|
||||
* @return True if this account is a services oper, false otherwise.
|
||||
*/
|
||||
virtual bool IsServicesOper() const;
|
||||
bool IsServicesOper() const;
|
||||
|
||||
/** Retrieves the account id for this user */
|
||||
uint64_t GetId();
|
||||
@@ -225,7 +233,7 @@ protected:
|
||||
|
||||
public:
|
||||
/* One of these is called when the request goes through */
|
||||
virtual void OnSuccess() = 0;
|
||||
virtual void OnSuccess(NickAlias *na) = 0;
|
||||
virtual void OnFail() = 0;
|
||||
|
||||
Module *GetOwner() const { return owner; }
|
||||
@@ -251,7 +259,7 @@ public:
|
||||
* If this request is behind held it must still be Released after calling this.
|
||||
* @param m The module confirming authentication
|
||||
*/
|
||||
void Success(Module *m);
|
||||
void Success(Module *m, NickAlias *na);
|
||||
|
||||
/** Used to either finalize this request or marks
|
||||
* it as dispatched and begins waiting for the module(s)
|
||||
|
||||
+16
-10
@@ -1,19 +1,24 @@
|
||||
/*
|
||||
*
|
||||
* (C) 2003-2025 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.
|
||||
*/
|
||||
// Anope IRC Services <https://www.anope.org/>
|
||||
//
|
||||
// Copyright (C) 2003-2025 Anope Contributors
|
||||
//
|
||||
// Anope is free software. You can use, modify, and/or distribute it under the
|
||||
// terms of version 2 of the GNU General Public License. See docs/LICENSE.txt
|
||||
// for the complete terms of this license and docs/AUTHORS.txt for a list of
|
||||
// contributors.
|
||||
//
|
||||
// Based on the original code of Epona by Lara
|
||||
// Based on the original code of Services by Andy Church
|
||||
//
|
||||
// SPDX-License-Identifier: GPL-2.0-only
|
||||
|
||||
#pragma once
|
||||
|
||||
#include <signal.h>
|
||||
|
||||
#include "hashcomp.h"
|
||||
|
||||
#define UTF_CPP_CPLUSPLUS 201703L
|
||||
#include "utfcpp/unchecked.h"
|
||||
|
||||
namespace Anope
|
||||
@@ -53,6 +58,7 @@ namespace Anope
|
||||
string(const char *_str, size_type n) : _string(_str, n) { }
|
||||
string(const std::string &_str) : _string(_str) { }
|
||||
string(const ci::string &_str) : _string(_str.c_str()) { }
|
||||
string(const std::string_view &_sv) : _string(_sv.begin(), _sv.end()) { }
|
||||
string(const string &_str, size_type pos, size_type n = npos) : _string(_str._string, pos, n) { }
|
||||
template <class InputIterator> string(InputIterator first, InputIterator last) : _string(first, last) { }
|
||||
string(const string &) = default;
|
||||
|
||||
+14
-7
@@ -1,10 +1,17 @@
|
||||
/*
|
||||
*
|
||||
* (C) 2008-2011 Adam <Adam@anope.org>
|
||||
* (C) 2008-2025 Anope Team <team@anope.org>
|
||||
*
|
||||
* Please read COPYING and README for further details.
|
||||
*/
|
||||
// Anope IRC Services <https://www.anope.org/>
|
||||
//
|
||||
// Copyright (C) 2003-2025 Anope Contributors
|
||||
// Copyright (C) 2008-2011 Adam <Adam@anope.org>
|
||||
//
|
||||
// Anope is free software. You can use, modify, and/or distribute it under the
|
||||
// terms of version 2 of the GNU General Public License. See docs/LICENSE.txt
|
||||
// for the complete terms of this license and docs/AUTHORS.txt for a list of
|
||||
// contributors.
|
||||
//
|
||||
// Based on the original code of Epona by Lara
|
||||
// Based on the original code of Services by Andy Church
|
||||
//
|
||||
// SPDX-License-Identifier: GPL-2.0-only
|
||||
|
||||
#pragma once
|
||||
|
||||
|
||||
+17
-8
@@ -1,10 +1,19 @@
|
||||
/*
|
||||
*
|
||||
* (C) 2008-2011 Robin Burchell <w00t@inspircd.org>
|
||||
* (C) 2008-2025 Anope Team <team@anope.org>
|
||||
*
|
||||
* Please read COPYING and README for further details.
|
||||
*/
|
||||
// Anope IRC Services <https://www.anope.org/>
|
||||
//
|
||||
// Copyright (C) 2003-2025 Anope Contributors
|
||||
// Copyright (C) 2008-2011 Robin Burchell <w00t@inspircd.org>
|
||||
//
|
||||
// Anope is free software. You can use, modify, and/or distribute it under the
|
||||
// terms of version 2 of the GNU General Public License. See docs/LICENSE.txt
|
||||
// for the complete terms of this license and docs/AUTHORS.txt for a list of
|
||||
// contributors.
|
||||
//
|
||||
// Based on the original code of Epona by Lara
|
||||
// Based on the original code of Services by Andy Church
|
||||
//
|
||||
// SPDX-License-Identifier: GPL-2.0-only
|
||||
|
||||
|
||||
|
||||
#pragma once
|
||||
|
||||
@@ -124,7 +133,7 @@ public:
|
||||
* @param message The users' message
|
||||
* @params tags Message tags
|
||||
*/
|
||||
virtual void OnMessage(User *u, const Anope::string &message, const Anope::map<Anope::string> &tags);
|
||||
void OnMessage(User *u, const Anope::string &message, const Anope::map<Anope::string> &tags);
|
||||
|
||||
/** Link a command name to a command in services
|
||||
* @param cname The command name
|
||||
|
||||
+13
-7
@@ -1,10 +1,16 @@
|
||||
/* Channel support
|
||||
*
|
||||
* (C) 2008-2025 Anope Team
|
||||
* Contact us at team@anope.org
|
||||
*
|
||||
* Please read COPYING and README for further details.
|
||||
*/
|
||||
// Anope IRC Services <https://www.anope.org/>
|
||||
//
|
||||
// Copyright (C) 2003-2025 Anope Contributors
|
||||
//
|
||||
// Anope is free software. You can use, modify, and/or distribute it under the
|
||||
// terms of version 2 of the GNU General Public License. See docs/LICENSE.txt
|
||||
// for the complete terms of this license and docs/AUTHORS.txt for a list of
|
||||
// contributors.
|
||||
//
|
||||
// Based on the original code of Epona by Lara
|
||||
// Based on the original code of Services by Andy Church
|
||||
//
|
||||
// SPDX-License-Identifier: GPL-2.0-only
|
||||
|
||||
#pragma once
|
||||
|
||||
|
||||
+13
-10
@@ -1,13 +1,16 @@
|
||||
/* Declarations for command data.
|
||||
*
|
||||
* (C) 2003-2025 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.
|
||||
*/
|
||||
// Anope IRC Services <https://www.anope.org/>
|
||||
//
|
||||
// Copyright (C) 2003-2025 Anope Contributors
|
||||
//
|
||||
// Anope is free software. You can use, modify, and/or distribute it under the
|
||||
// terms of version 2 of the GNU General Public License. See docs/LICENSE.txt
|
||||
// for the complete terms of this license and docs/AUTHORS.txt for a list of
|
||||
// contributors.
|
||||
//
|
||||
// Based on the original code of Epona by Lara
|
||||
// Based on the original code of Services by Andy Church
|
||||
//
|
||||
// SPDX-License-Identifier: GPL-2.0-only
|
||||
|
||||
#pragma once
|
||||
|
||||
|
||||
+13
-10
@@ -1,13 +1,16 @@
|
||||
/*
|
||||
*
|
||||
* (C) 2003-2025 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.
|
||||
*/
|
||||
// Anope IRC Services <https://www.anope.org/>
|
||||
//
|
||||
// Copyright (C) 2003-2025 Anope Contributors
|
||||
//
|
||||
// Anope is free software. You can use, modify, and/or distribute it under the
|
||||
// terms of version 2 of the GNU General Public License. See docs/LICENSE.txt
|
||||
// for the complete terms of this license and docs/AUTHORS.txt for a list of
|
||||
// contributors.
|
||||
//
|
||||
// Based on the original code of Epona by Lara
|
||||
// Based on the original code of Services by Andy Church
|
||||
//
|
||||
// SPDX-License-Identifier: GPL-2.0-only
|
||||
|
||||
#pragma once
|
||||
|
||||
|
||||
+13
-10
@@ -1,13 +1,16 @@
|
||||
/*
|
||||
*
|
||||
* (C) 2003-2025 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.
|
||||
*/
|
||||
// Anope IRC Services <https://www.anope.org/>
|
||||
//
|
||||
// Copyright (C) 2003-2025 Anope Contributors
|
||||
//
|
||||
// Anope is free software. You can use, modify, and/or distribute it under the
|
||||
// terms of version 2 of the GNU General Public License. See docs/LICENSE.txt
|
||||
// for the complete terms of this license and docs/AUTHORS.txt for a list of
|
||||
// contributors.
|
||||
//
|
||||
// Based on the original code of Epona by Lara
|
||||
// Based on the original code of Services by Andy Church
|
||||
//
|
||||
// SPDX-License-Identifier: GPL-2.0-only
|
||||
|
||||
#pragma once
|
||||
|
||||
|
||||
+20
-19
@@ -1,25 +1,27 @@
|
||||
/*
|
||||
*
|
||||
* (C) 2003-2025 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.
|
||||
*/
|
||||
// Anope IRC Services <https://www.anope.org/>
|
||||
//
|
||||
// Copyright (C) 2003-2025 Anope Contributors
|
||||
//
|
||||
// Anope is free software. You can use, modify, and/or distribute it under the
|
||||
// terms of version 2 of the GNU General Public License. See docs/LICENSE.txt
|
||||
// for the complete terms of this license and docs/AUTHORS.txt for a list of
|
||||
// contributors.
|
||||
//
|
||||
// Based on the original code of Epona by Lara
|
||||
// Based on the original code of Services by Andy Church
|
||||
//
|
||||
// SPDX-License-Identifier: GPL-2.0-only
|
||||
|
||||
#pragma once
|
||||
|
||||
class AccessGroup;
|
||||
class AutoKick;
|
||||
class BotInfo;
|
||||
class CallBack;
|
||||
namespace BotServ { class BadWord; }
|
||||
class ChanAccess;
|
||||
class Channel;
|
||||
class ChannelInfo;
|
||||
class ChannelStatus;
|
||||
struct ModeData;
|
||||
namespace ChanServ { class AutoKick; class ModeLock; }
|
||||
struct ChanUserContainer;
|
||||
class ClientSocket;
|
||||
class Command;
|
||||
@@ -34,13 +36,18 @@ class IRCDProto;
|
||||
class ListenSocket;
|
||||
class Log;
|
||||
class Memo;
|
||||
struct MemoInfo;
|
||||
class MessageSource;
|
||||
struct ModeData;
|
||||
class Module;
|
||||
class NickAlias;
|
||||
class NickCore;
|
||||
struct Oper;
|
||||
namespace OperServ { struct Exception; }
|
||||
class OperType;
|
||||
class ReferenceBase;
|
||||
class Regex;
|
||||
namespace SASL { struct Message; }
|
||||
class Serializable;
|
||||
class Server;
|
||||
class Socket;
|
||||
@@ -48,9 +55,3 @@ class Thread;
|
||||
class User;
|
||||
class XLine;
|
||||
class XLineManager;
|
||||
struct BadWord;
|
||||
struct Exception;
|
||||
struct MemoInfo;
|
||||
struct ModeLock;
|
||||
struct Oper;
|
||||
namespace SASL { struct Message; }
|
||||
|
||||
+13
-7
@@ -1,10 +1,16 @@
|
||||
/*
|
||||
*
|
||||
* (C) 2003-2025 Anope Team
|
||||
* Contact us at team@anope.org
|
||||
*
|
||||
* Please read COPYING and README for further details.
|
||||
*/
|
||||
// Anope IRC Services <https://www.anope.org/>
|
||||
//
|
||||
// Copyright (C) 2003-2025 Anope Contributors
|
||||
//
|
||||
// Anope is free software. You can use, modify, and/or distribute it under the
|
||||
// terms of version 2 of the GNU General Public License. See docs/LICENSE.txt
|
||||
// for the complete terms of this license and docs/AUTHORS.txt for a list of
|
||||
// contributors.
|
||||
//
|
||||
// Based on the original code of Epona by Lara
|
||||
// Based on the original code of Services by Andy Church
|
||||
//
|
||||
// SPDX-License-Identifier: GPL-2.0-only
|
||||
|
||||
#pragma once
|
||||
|
||||
|
||||
+14
-7
@@ -1,10 +1,17 @@
|
||||
/*
|
||||
*
|
||||
* (C) 2002-2011 InspIRCd Development Team
|
||||
* (C) 2009-2025 Anope Team <team@anope.org>
|
||||
*
|
||||
* Please read COPYING and README for further details.
|
||||
*/
|
||||
// Anope IRC Services <https://www.anope.org/>
|
||||
//
|
||||
// Copyright (C) 2003-2025 Anope Contributors
|
||||
// Copyright (C) 2009-2011 InspIRCd Development Team
|
||||
//
|
||||
// Anope is free software. You can use, modify, and/or distribute it under the
|
||||
// terms of version 2 of the GNU General Public License. See docs/LICENSE.txt
|
||||
// for the complete terms of this license and docs/AUTHORS.txt for a list of
|
||||
// contributors.
|
||||
//
|
||||
// Based on the original code of Epona by Lara
|
||||
// Based on the original code of Services by Andy Church
|
||||
//
|
||||
// SPDX-License-Identifier: GPL-2.0-only
|
||||
|
||||
#pragma once
|
||||
|
||||
|
||||
+80
-63
@@ -1,10 +1,16 @@
|
||||
/*
|
||||
*
|
||||
* (C) 2008-2025 Anope Team
|
||||
* Contact us at team@anope.org
|
||||
*
|
||||
* Please read COPYING and README for further details.
|
||||
*/
|
||||
// Anope IRC Services <https://www.anope.org/>
|
||||
//
|
||||
// Copyright (C) 2003-2025 Anope Contributors
|
||||
//
|
||||
// Anope is free software. You can use, modify, and/or distribute it under the
|
||||
// terms of version 2 of the GNU General Public License. See docs/LICENSE.txt
|
||||
// for the complete terms of this license and docs/AUTHORS.txt for a list of
|
||||
// contributors.
|
||||
//
|
||||
// Based on the original code of Epona by Lara
|
||||
// Based on the original code of Services by Andy Church
|
||||
//
|
||||
// SPDX-License-Identifier: GPL-2.0-only
|
||||
|
||||
#pragma once
|
||||
|
||||
@@ -35,6 +41,14 @@ namespace Language
|
||||
*/
|
||||
extern void InitLanguages();
|
||||
|
||||
/** Sets the locale to the specified language.
|
||||
* @param lang The language to translate to.
|
||||
*/
|
||||
extern CoreExport void SetLocale(const char* lang);
|
||||
|
||||
/** Sets the locale back to the default. */
|
||||
extern CoreExport void ResetLocale();
|
||||
|
||||
/** Translates a string to the default language.
|
||||
* @param string A string to translate
|
||||
* @return The translated string if found, else the original string.
|
||||
@@ -100,59 +114,62 @@ namespace Language
|
||||
} // namespace Language
|
||||
|
||||
/* Commonly used language strings */
|
||||
#define CONFIRM_DROP _("Please confirm that you want to drop \002%s\002 with \002%s\032%s\032%s\002")
|
||||
#define SERVICE_UNAVAILABLE _("Sorry, %s is temporarily unavailable.")
|
||||
#define MORE_INFO _("Type \002%s\002 for more information.")
|
||||
#define BAD_USERHOST_MASK _("Mask must be in the form \037user\037@\037host\037.")
|
||||
#define BAD_EXPIRY_TIME _("Invalid expiry time.")
|
||||
#define USERHOST_MASK_TOO_WIDE _("%s coverage is too wide; Please use a more specific mask.")
|
||||
#define READ_ONLY_MODE _("Services are temporarily in read-only mode.")
|
||||
#define PASSWORD_INCORRECT _("Password incorrect.")
|
||||
#define ACCESS_DENIED _("Access denied.")
|
||||
#define MORE_OBSCURE_PASSWORD _("Please try again with a more obscure password. Passwords should not be " \
|
||||
"something that could be easily guessed (e.g. your real name or your nick) and " \
|
||||
"cannot contain the space or tab characters.")
|
||||
#define PASSWORD_TOO_SHORT _("Your password is too short. It must be longer than %u characters.")
|
||||
#define PASSWORD_TOO_LONG _("Your password is too long. It must be shorter than %u characters.")
|
||||
#define NICK_X_NOT_REGISTERED _("Nick \002%s\002 isn't registered.")
|
||||
#define NICK_X_NOT_IN_USE _("Nick \002%s\002 isn't currently in use.")
|
||||
#define NICK_X_NOT_ON_CHAN _("\002%s\002 is not currently on channel %s.")
|
||||
#define NICK_X_SUSPENDED _("Nick %s is currently suspended.")
|
||||
#define CHAN_X_SUSPENDED _("Channel %s is currently suspended.")
|
||||
#define CHAN_X_NOT_REGISTERED _("Channel \002%s\002 isn't registered.")
|
||||
#define CHAN_X_NOT_IN_USE _("Channel \002%s\002 doesn't exist.")
|
||||
#define NICK_IDENTIFY_REQUIRED _("You must be logged into an account to use that command.")
|
||||
#define MAIL_X_INVALID _("\002%s\002 is not a valid email address.")
|
||||
#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 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_DISPLAY_CHANGED _("The new display is now \002%s\002.")
|
||||
#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_SETTING_CHANGED _("%s for %s set to %s.")
|
||||
#define CHAN_SETTING_UNSET _("%s for %s unset.")
|
||||
#define CHAN_ACCESS_LEVEL_RANGE _("Access level must be between %d and %d inclusive.")
|
||||
#define CHAN_INFO_HEADER _("Information about channel \002%s\002:")
|
||||
#define CHAN_EXCEPTED _("\002%s\002 matches an except on %s and cannot be banned until the except has been removed.")
|
||||
#define MEMO_NEW_X_MEMO_ARRIVED _("There is a new memo on channel %s. " \
|
||||
"Type \002%s\032%s\032%zu\002 to read it.")
|
||||
#define MEMO_NEW_MEMO_ARRIVED _("You have a new memo from %s. " \
|
||||
"Type \002%s\032%zu\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_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 HOST_SET_ERROR _("A vhost must be in the format of a valid hostname.")
|
||||
#define HOST_SET_IDENT_ERROR _("A vident 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 %zu characters.")
|
||||
#define HOST_SET_IDENTTOOLONG _("Error! The vident is too long, please use an ident shorter than %zu 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 vidents. If this is incorrect please report this as a possible bug.")
|
||||
#define ACCESS_DENIED _("Access denied.")
|
||||
#define BAD_EXPIRY_TIME _("Invalid expiry time.")
|
||||
#define BAD_USERHOST_MASK _("Mask must be in the form \037user\037@\037host\037.")
|
||||
#define CONFIRM_DROP _("Please confirm that you want to drop \002%s\002 with \002%s\032%s\032%s\002")
|
||||
#define CONFIRM_REGISTER_ADMIN _("All new accounts must be confirmed by an administrator. Please wait for your registration to be confirmed.")
|
||||
#define CONFIRM_REGISTER_CODE _("All new accounts must be confirmed. To confirm your account, type \002%s\002.")
|
||||
#define CONFIRM_REGISTER_MAIL _("All new accounts must be confirmed. To confirm your account, follow the instructions that were emailed to you.")
|
||||
#define LIST_INCORRECT_RANGE _("Incorrect range specified. The correct syntax is \002#\037from\037-\037to\037\002.")
|
||||
#define MAIL_X_INVALID _("\002%s\002 is not a valid email address.")
|
||||
#define MORE_INFO _("Type \002%s\002 for more information.")
|
||||
#define NO_EXPIRE _("does not expire")
|
||||
#define PASSWORD_INCORRECT _("Password incorrect.")
|
||||
#define READ_ONLY_MODE _("Services are temporarily in read-only mode.")
|
||||
#define TIME_NEVER _("Never")
|
||||
#define TIME_NOW _("Now")
|
||||
#define TIME_UNKNOWN _("Unknown")
|
||||
#define TRY_AGAIN_LATER _("The \002%s\002 command is temporarily unavailable. Please try again later.")
|
||||
#define USERHOST_MASK_TOO_WIDE _("%s coverage is too wide; Please use a more specific mask.")
|
||||
|
||||
#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 CHAN_ACCESS_LEVEL_RANGE _("Access level must be between %d and %d inclusive.")
|
||||
#define CHAN_EXCEPTED _("\002%s\002 matches an except on %s and cannot be banned until the except has been removed.")
|
||||
#define CHAN_INFO_HEADER _("Information about channel \002%s\002:")
|
||||
#define CHAN_LIMIT_EXCEEDED _("You have already exceeded your limit of \002%d\002 channels.")
|
||||
#define CHAN_LIMIT_REACHED _("You have already reached your limit of \002%d\002 channels.")
|
||||
#define CHAN_NOT_ALLOWED_TO_JOIN _("You are not permitted to be on this channel.")
|
||||
#define CHAN_SETTING_CHANGED _("%s for %s set to %s.")
|
||||
#define CHAN_SETTING_UNSET _("%s for %s unset.")
|
||||
#define CHAN_SYMBOL_REQUIRED _("Please use the symbol of \002#\002 when attempting to register.")
|
||||
#define CHAN_X_INVALID _("Channel %s is not a valid channel.")
|
||||
#define CHAN_X_NOT_IN_USE _("Channel \002%s\002 doesn't exist.")
|
||||
#define CHAN_X_NOT_REGISTERED _("Channel \002%s\002 isn't registered.")
|
||||
#define CHAN_X_SUSPENDED _("Channel %s is currently suspended.")
|
||||
|
||||
#define HOST_NO_VIDENT _("Your IRCd does not support vidents. If this is incorrect please report this as a possible bug.")
|
||||
#define HOST_NOT_ASSIGNED _("Please contact an Operator to get a vhost assigned to this nick.")
|
||||
#define HOST_SET_VHOST_ERROR _("A vhost must be in the format of a valid hostname.")
|
||||
#define HOST_SET_VHOST_TOO_LONG _("Error! The vhost is too long, please use a hostname shorter than %zu characters.")
|
||||
#define HOST_SET_VIDENT_ERROR _("A vident must be in the format of a valid ident.")
|
||||
#define HOST_SET_VIDENT_TOO_LONG _("Error! The vident is too long, please use an ident shorter than %zu characters.")
|
||||
|
||||
#define MEMO_HAVE_NO_MEMOS _("You have no memos.")
|
||||
#define MEMO_HAVE_NO_NEW_MEMOS _("You have no new memos.")
|
||||
#define MEMO_NEW_MEMO_ARRIVED _("You have a new memo from %s. Type \002%s\032%zu\002 to read it.")
|
||||
#define MEMO_NEW_X_MEMO_ARRIVED _("There is a new memo on channel %s. Type \002%s\032%s\032%zu\002 to read it.")
|
||||
#define MEMO_X_HAS_NO_MEMOS _("%s has no memos.")
|
||||
#define MEMO_X_HAS_NO_NEW_MEMOS _("%s has no new memos.")
|
||||
|
||||
#define NICK_ALREADY_REGISTERED _("Nickname \002%s\002 is already registered!")
|
||||
#define NICK_CANNOT_BE_REGISTERED _("Nickname \002%s\002 may not be registered.")
|
||||
#define NICK_IDENTIFY_REQUIRED _("You must be logged into an account to use that command.")
|
||||
#define NICK_SET_DISPLAY_CHANGED _("The new display is now \002%s\002.")
|
||||
#define NICK_X_NOT_IN_USE _("Nick \002%s\002 isn't currently in use.")
|
||||
#define NICK_X_NOT_ON_CHAN _("\002%s\002 is not currently on channel %s.")
|
||||
#define NICK_X_NOT_REGISTERED _("Nick \002%s\002 isn't registered.")
|
||||
#define NICK_X_SUSPENDED _("Nick %s is currently suspended.")
|
||||
|
||||
+13
-10
@@ -1,13 +1,16 @@
|
||||
/*
|
||||
*
|
||||
* (C) 2003-2025 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.
|
||||
*/
|
||||
// Anope IRC Services <https://www.anope.org/>
|
||||
//
|
||||
// Copyright (C) 2003-2025 Anope Contributors
|
||||
//
|
||||
// Anope is free software. You can use, modify, and/or distribute it under the
|
||||
// terms of version 2 of the GNU General Public License. See docs/LICENSE.txt
|
||||
// for the complete terms of this license and docs/AUTHORS.txt for a list of
|
||||
// contributors.
|
||||
//
|
||||
// Based on the original code of Epona by Lara
|
||||
// Based on the original code of Services by Andy Church
|
||||
//
|
||||
// SPDX-License-Identifier: GPL-2.0-only
|
||||
|
||||
#pragma once
|
||||
|
||||
|
||||
+13
-10
@@ -1,13 +1,16 @@
|
||||
/*
|
||||
*
|
||||
* (C) 2003-2025 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.
|
||||
*/
|
||||
// Anope IRC Services <https://www.anope.org/>
|
||||
//
|
||||
// Copyright (C) 2003-2025 Anope Contributors
|
||||
//
|
||||
// Anope is free software. You can use, modify, and/or distribute it under the
|
||||
// terms of version 2 of the GNU General Public License. See docs/LICENSE.txt
|
||||
// for the complete terms of this license and docs/AUTHORS.txt for a list of
|
||||
// contributors.
|
||||
//
|
||||
// Based on the original code of Epona by Lara
|
||||
// Based on the original code of Services by Andy Church
|
||||
//
|
||||
// SPDX-License-Identifier: GPL-2.0-only
|
||||
|
||||
#pragma once
|
||||
|
||||
|
||||
+13
-10
@@ -1,13 +1,16 @@
|
||||
/*
|
||||
*
|
||||
* (C) 2003-2025 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.
|
||||
*/
|
||||
// Anope IRC Services <https://www.anope.org/>
|
||||
//
|
||||
// Copyright (C) 2003-2025 Anope Contributors
|
||||
//
|
||||
// Anope is free software. You can use, modify, and/or distribute it under the
|
||||
// terms of version 2 of the GNU General Public License. See docs/LICENSE.txt
|
||||
// for the complete terms of this license and docs/AUTHORS.txt for a list of
|
||||
// contributors.
|
||||
//
|
||||
// Based on the original code of Epona by Lara
|
||||
// Based on the original code of Services by Andy Church
|
||||
//
|
||||
// SPDX-License-Identifier: GPL-2.0-only
|
||||
|
||||
#pragma once
|
||||
|
||||
|
||||
+13
-10
@@ -1,13 +1,16 @@
|
||||
/*
|
||||
*
|
||||
* (C) 2003-2025 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.
|
||||
*/
|
||||
// Anope IRC Services <https://www.anope.org/>
|
||||
//
|
||||
// Copyright (C) 2003-2025 Anope Contributors
|
||||
//
|
||||
// Anope is free software. You can use, modify, and/or distribute it under the
|
||||
// terms of version 2 of the GNU General Public License. See docs/LICENSE.txt
|
||||
// for the complete terms of this license and docs/AUTHORS.txt for a list of
|
||||
// contributors.
|
||||
//
|
||||
// Based on the original code of Epona by Lara
|
||||
// Based on the original code of Services by Andy Church
|
||||
//
|
||||
// SPDX-License-Identifier: GPL-2.0-only
|
||||
|
||||
#pragma once
|
||||
|
||||
|
||||
+13
-10
@@ -1,13 +1,16 @@
|
||||
/*
|
||||
*
|
||||
* (C) 2003-2025 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.
|
||||
*/
|
||||
// Anope IRC Services <https://www.anope.org/>
|
||||
//
|
||||
// Copyright (C) 2003-2025 Anope Contributors
|
||||
//
|
||||
// Anope is free software. You can use, modify, and/or distribute it under the
|
||||
// terms of version 2 of the GNU General Public License. See docs/LICENSE.txt
|
||||
// for the complete terms of this license and docs/AUTHORS.txt for a list of
|
||||
// contributors.
|
||||
//
|
||||
// Based on the original code of Epona by Lara
|
||||
// Based on the original code of Services by Andy Church
|
||||
//
|
||||
// SPDX-License-Identifier: GPL-2.0-only
|
||||
|
||||
#pragma once
|
||||
|
||||
|
||||
+14
-7
@@ -1,10 +1,17 @@
|
||||
/* Mode support
|
||||
*
|
||||
* (C) 2008-2011 Adam <Adam@anope.org>
|
||||
* (C) 2008-2025 Anope Team <team@anope.org>
|
||||
*
|
||||
* Please read COPYING and README for further details.
|
||||
*/
|
||||
// Anope IRC Services <https://www.anope.org/>
|
||||
//
|
||||
// Copyright (C) 2003-2025 Anope Contributors
|
||||
// Copyright (C) 2008-2011 Adam <Adam@anope.org>
|
||||
//
|
||||
// Anope is free software. You can use, modify, and/or distribute it under the
|
||||
// terms of version 2 of the GNU General Public License. See docs/LICENSE.txt
|
||||
// for the complete terms of this license and docs/AUTHORS.txt for a list of
|
||||
// contributors.
|
||||
//
|
||||
// Based on the original code of Epona by Lara
|
||||
// Based on the original code of Services by Andy Church
|
||||
//
|
||||
// SPDX-License-Identifier: GPL-2.0-only
|
||||
|
||||
#pragma once
|
||||
|
||||
|
||||
+13
-15
@@ -1,13 +1,16 @@
|
||||
/*
|
||||
*
|
||||
* (C) 2003-2025 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.
|
||||
*/
|
||||
// Anope IRC Services <https://www.anope.org/>
|
||||
//
|
||||
// Copyright (C) 2003-2025 Anope Contributors
|
||||
//
|
||||
// Anope is free software. You can use, modify, and/or distribute it under the
|
||||
// terms of version 2 of the GNU General Public License. See docs/LICENSE.txt
|
||||
// for the complete terms of this license and docs/AUTHORS.txt for a list of
|
||||
// contributors.
|
||||
//
|
||||
// Based on the original code of Epona by Lara
|
||||
// Based on the original code of Services by Andy Church
|
||||
//
|
||||
// SPDX-License-Identifier: GPL-2.0-only
|
||||
|
||||
#pragma once
|
||||
|
||||
@@ -45,8 +48,3 @@
|
||||
#include "uplink.h"
|
||||
#include "users.h"
|
||||
#include "xline.h"
|
||||
|
||||
#include "modules/chanserv/service.h"
|
||||
#include "modules/global/service.h"
|
||||
#include "modules/memoserv/service.h"
|
||||
#include "modules/nickserv/service.h"
|
||||
|
||||
+35
-23
@@ -1,13 +1,16 @@
|
||||
/* Modular support
|
||||
*
|
||||
* (C) 2003-2025 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.
|
||||
*/
|
||||
// Anope IRC Services <https://www.anope.org/>
|
||||
//
|
||||
// Copyright (C) 2003-2025 Anope Contributors
|
||||
//
|
||||
// Anope is free software. You can use, modify, and/or distribute it under the
|
||||
// terms of version 2 of the GNU General Public License. See docs/LICENSE.txt
|
||||
// for the complete terms of this license and docs/AUTHORS.txt for a list of
|
||||
// contributors.
|
||||
//
|
||||
// Based on the original code of Epona by Lara
|
||||
// Based on the original code of Services by Andy Church
|
||||
//
|
||||
// SPDX-License-Identifier: GPL-2.0-only
|
||||
|
||||
|
||||
#pragma once
|
||||
@@ -415,13 +418,13 @@ public:
|
||||
* @param ci The channel
|
||||
* @param bw The badword
|
||||
*/
|
||||
virtual void OnBadWordAdd(ChannelInfo *ci, const BadWord *bw) ATTR_NOT_NULL(2, 3) { throw NotImplementedException(); }
|
||||
virtual void OnBadWordAdd(ChannelInfo *ci, const BotServ::BadWord *bw) ATTR_NOT_NULL(2, 3) { throw NotImplementedException(); }
|
||||
|
||||
/** Called before a badword is deleted from a channel
|
||||
* @param ci The channel
|
||||
* @param bw The badword
|
||||
*/
|
||||
virtual void OnBadWordDel(ChannelInfo *ci, const BadWord *bw) ATTR_NOT_NULL(2, 3) { throw NotImplementedException(); }
|
||||
virtual void OnBadWordDel(ChannelInfo *ci, const BotServ::BadWord *bw) ATTR_NOT_NULL(2, 3) { throw NotImplementedException(); }
|
||||
|
||||
/** Called when a bot is created or destroyed
|
||||
*/
|
||||
@@ -530,13 +533,13 @@ public:
|
||||
* @param ex The exception
|
||||
* @return EVENT_CONTINUE to let other modules decide, EVENT_STOP to halt the command and not process it
|
||||
*/
|
||||
virtual EventReturn OnExceptionAdd(Exception *ex) ATTR_NOT_NULL(2) { throw NotImplementedException(); }
|
||||
virtual EventReturn OnExceptionAdd(OperServ::Exception *ex) ATTR_NOT_NULL(2) { throw NotImplementedException(); }
|
||||
|
||||
/** Called before an exception is deleted
|
||||
* @param source The source deleting it
|
||||
* @param ex The exception
|
||||
*/
|
||||
virtual void OnExceptionDel(CommandSource &source, Exception *ex) ATTR_NOT_NULL(3) { throw NotImplementedException(); }
|
||||
virtual void OnExceptionDel(CommandSource &source, OperServ::Exception *ex) ATTR_NOT_NULL(3) { throw NotImplementedException(); }
|
||||
|
||||
/** Called before a XLine is added
|
||||
* @param source The source of the XLine
|
||||
@@ -669,14 +672,14 @@ public:
|
||||
* @param ci The channel
|
||||
* @param ak The akick
|
||||
*/
|
||||
virtual void OnAkickAdd(CommandSource &source, ChannelInfo *ci, const AutoKick *ak) ATTR_NOT_NULL(3, 4) { throw NotImplementedException(); }
|
||||
virtual void OnAKickAdd(CommandSource &source, ChannelInfo *ci, const ChanServ::AutoKick *ak) ATTR_NOT_NULL(3, 4) { throw NotImplementedException(); }
|
||||
|
||||
/** Called before removing an akick from a channel
|
||||
* @param source The source of the command
|
||||
* @param ci The channel
|
||||
* @param ak The akick
|
||||
*/
|
||||
virtual void OnAkickDel(CommandSource &source, ChannelInfo *ci, const AutoKick *ak) ATTR_NOT_NULL(3, 4) { throw NotImplementedException(); }
|
||||
virtual void OnAKickDel(CommandSource &source, ChannelInfo *ci, const ChanServ::AutoKick *ak) ATTR_NOT_NULL(3, 4) { throw NotImplementedException(); }
|
||||
|
||||
/** Called after a user join a channel when we decide whether to kick them or not
|
||||
* @param u The user
|
||||
@@ -739,7 +742,7 @@ public:
|
||||
|
||||
/** Called when a nick is registered
|
||||
* @param user The user registering the nick, of any
|
||||
* @param The nick
|
||||
* @param na The nick
|
||||
* @param pass The password of the newly registered nick
|
||||
*/
|
||||
virtual void OnNickRegister(User *user, NickAlias *na, const Anope::string &pass) ATTR_NOT_NULL(3) { throw NotImplementedException(); }
|
||||
@@ -916,14 +919,14 @@ public:
|
||||
* @param lock The mode lock
|
||||
* @return EVENT_CONTINUE to let other modules decide, EVENT_STOP to deny the mlock.
|
||||
*/
|
||||
virtual EventReturn OnMLock(ChannelInfo *ci, ModeLock *lock) ATTR_NOT_NULL(2, 3) { throw NotImplementedException(); }
|
||||
virtual EventReturn OnMLock(ChannelInfo *ci, ChanServ::ModeLock *lock) ATTR_NOT_NULL(2, 3) { throw NotImplementedException(); }
|
||||
|
||||
/** Called when a mode is about to be unlocked
|
||||
* @param ci The channel the mode is being unlocked from
|
||||
* @param lock The mode lock
|
||||
* @return EVENT_CONTINUE to let other modules decide, EVENT_STOP to deny the mlock.
|
||||
*/
|
||||
virtual EventReturn OnUnMLock(ChannelInfo *ci, ModeLock *lock) ATTR_NOT_NULL(2, 3) { throw NotImplementedException(); }
|
||||
virtual EventReturn OnUnMLock(ChannelInfo *ci, ChanServ::ModeLock *lock) ATTR_NOT_NULL(2, 3) { throw NotImplementedException(); }
|
||||
|
||||
/** Called after a module is loaded
|
||||
* @param u The user loading the module, can be NULL
|
||||
@@ -1013,10 +1016,11 @@ public:
|
||||
*/
|
||||
virtual void OnSetCorrectModes(User *user, Channel *chan, AccessGroup &access, bool &give_modes, bool &take_modes) ATTR_NOT_NULL(2, 3) { throw NotImplementedException(); }
|
||||
|
||||
virtual void OnSerializeCheck(Serialize::Type *st) ATTR_NOT_NULL(2) { throw NotImplementedException(); }
|
||||
virtual void OnSerializableConstruct(Serializable *st) ATTR_NOT_NULL(2) { throw NotImplementedException(); }
|
||||
virtual void OnSerializableDestruct(Serializable *st) ATTR_NOT_NULL(2) { throw NotImplementedException(); }
|
||||
virtual void OnSerializableUpdate(Serializable *st) ATTR_NOT_NULL(2) { throw NotImplementedException(); }
|
||||
|
||||
virtual void OnSerializeTypeCheck(Serialize::Type *st) ATTR_NOT_NULL(2) { throw NotImplementedException(); }
|
||||
virtual void OnSerializeTypeCreate(Serialize::Type *st) ATTR_NOT_NULL(2) { throw NotImplementedException(); }
|
||||
|
||||
/** Called when a chanserv/set command is used
|
||||
@@ -1067,6 +1071,13 @@ public:
|
||||
* @return EVENT_STOP to force the user off of the nick
|
||||
*/
|
||||
virtual EventReturn OnNickValidate(User *u, NickAlias *na) ATTR_NOT_NULL(2, 3) { throw NotImplementedException(); }
|
||||
|
||||
/** Called when a password needs to be validated.
|
||||
* @param source The source that is trying to use the password.
|
||||
* @param nc The account the password is being validated for, or nullptr if not registered yet.
|
||||
* @param pass The password which needs to be validated.
|
||||
*/
|
||||
virtual EventReturn OnPasswordValidate(CommandSource &source, NickCore *nc, const Anope::string &pass) { throw NotImplementedException(); }
|
||||
};
|
||||
|
||||
enum Implementation
|
||||
@@ -1076,8 +1087,8 @@ enum Implementation
|
||||
I_OnAccessClear,
|
||||
I_OnAccessDel,
|
||||
I_OnAddXLine,
|
||||
I_OnAkickAdd,
|
||||
I_OnAkickDel,
|
||||
I_OnAKickAdd,
|
||||
I_OnAKickDel,
|
||||
I_OnBadWordAdd,
|
||||
I_OnBadWordDel,
|
||||
I_OnBotAssign,
|
||||
@@ -1159,6 +1170,7 @@ enum Implementation
|
||||
I_OnNickUpdate,
|
||||
I_OnNickValidate,
|
||||
I_OnPartChannel,
|
||||
I_OnPasswordValidate,
|
||||
I_OnPostCommand,
|
||||
I_OnPostHelp,
|
||||
I_OnPostInit,
|
||||
@@ -1180,7 +1192,7 @@ enum Implementation
|
||||
I_OnSerializableConstruct,
|
||||
I_OnSerializableDestruct,
|
||||
I_OnSerializableUpdate,
|
||||
I_OnSerializeCheck,
|
||||
I_OnSerializeTypeCheck,
|
||||
I_OnSerializeTypeCreate,
|
||||
I_OnServerConnect,
|
||||
I_OnServerDisconnect,
|
||||
|
||||
@@ -1,43 +1,56 @@
|
||||
/* BotServ core functions
|
||||
*
|
||||
* (C) 2003-2025 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.
|
||||
*/
|
||||
// Anope IRC Services <https://www.anope.org/>
|
||||
//
|
||||
// Copyright (C) 2003-2025 Anope Contributors
|
||||
//
|
||||
// Anope is free software. You can use, modify, and/or distribute it under the
|
||||
// terms of version 2 of the GNU General Public License. See docs/LICENSE.txt
|
||||
// for the complete terms of this license and docs/AUTHORS.txt for a list of
|
||||
// contributors.
|
||||
//
|
||||
// Based on the original code of Epona by Lara
|
||||
// Based on the original code of Services by Andy Church
|
||||
//
|
||||
// SPDX-License-Identifier: GPL-2.0-only
|
||||
|
||||
#pragma once
|
||||
|
||||
/** Flags for badwords
|
||||
*/
|
||||
enum BadWordType
|
||||
#define BOTSERV_BAD_WORDS_EXT "badwords"
|
||||
#define BOTSERV_BAD_WORDS_TYPE "BadWord"
|
||||
|
||||
namespace BotServ
|
||||
{
|
||||
/* 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
|
||||
};
|
||||
class BadWord;
|
||||
struct BadWords;
|
||||
|
||||
/** 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
|
||||
class BotServ::BadWord
|
||||
{
|
||||
Anope::string chan;
|
||||
Anope::string word;
|
||||
BadWordType type;
|
||||
|
||||
virtual ~BadWord() = default;
|
||||
protected:
|
||||
BadWord() = default;
|
||||
|
||||
public:
|
||||
Anope::string chan;
|
||||
Anope::string word;
|
||||
BotServ::BadWordType type;
|
||||
|
||||
virtual ~BadWord() = default;
|
||||
};
|
||||
|
||||
struct BadWords
|
||||
struct BotServ::BadWords
|
||||
{
|
||||
virtual ~BadWords() = default;
|
||||
|
||||
@@ -46,13 +59,13 @@ struct BadWords
|
||||
* @param type The type (SINGLE START END)
|
||||
* @return The badword
|
||||
*/
|
||||
virtual BadWord *AddBadWord(const Anope::string &word, BadWordType type) = 0;
|
||||
virtual BotServ::BadWord *AddBadWord(const Anope::string &word, BotServ::BadWordType type) = 0;
|
||||
|
||||
/** Get a badword structure by index
|
||||
* @param index The index
|
||||
* @return The badword
|
||||
*/
|
||||
virtual BadWord *GetBadWord(unsigned index) const = 0;
|
||||
virtual BotServ::BadWord *GetBadWord(unsigned index) const = 0;
|
||||
|
||||
/** Get how many badwords are on this channel
|
||||
* @return The number of badwords in the vector
|
||||
|
||||
@@ -1,46 +1,57 @@
|
||||
/* BotServ core functions
|
||||
*
|
||||
* (C) 2003-2025 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.
|
||||
*/
|
||||
// Anope IRC Services <https://www.anope.org/>
|
||||
//
|
||||
// Copyright (C) 2003-2025 Anope Contributors
|
||||
//
|
||||
// Anope is free software. You can use, modify, and/or distribute it under the
|
||||
// terms of version 2 of the GNU General Public License. See docs/LICENSE.txt
|
||||
// for the complete terms of this license and docs/AUTHORS.txt for a list of
|
||||
// contributors.
|
||||
//
|
||||
// Based on the original code of Epona by Lara
|
||||
// Based on the original code of Services by Andy Church
|
||||
//
|
||||
// SPDX-License-Identifier: GPL-2.0-only
|
||||
|
||||
#pragma once
|
||||
|
||||
/* 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
|
||||
};
|
||||
#define BOTSERV_KICKER_DATA_EXT "kickerdata"
|
||||
|
||||
struct KickerData
|
||||
namespace BotServ
|
||||
{
|
||||
class KickerData;
|
||||
|
||||
/* 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
|
||||
};
|
||||
}
|
||||
|
||||
|
||||
class BotServ::KickerData
|
||||
{
|
||||
protected:
|
||||
KickerData() = default;
|
||||
|
||||
public:
|
||||
bool amsgs, badwords, bolds, caps, colors, flood, italics, repeat, reverses, underlines;
|
||||
int16_t ttb[TTB_SIZE]; /* Times to ban for each kicker */
|
||||
int16_t ttb[BotServ::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() = default;
|
||||
|
||||
public:
|
||||
virtual ~KickerData() = default;
|
||||
virtual void Check(ChannelInfo *ci) = 0;
|
||||
};
|
||||
|
||||
@@ -0,0 +1,108 @@
|
||||
// Anope IRC Services <https://www.anope.org/>
|
||||
//
|
||||
// Copyright (C) 2003-2025 Anope Contributors
|
||||
//
|
||||
// Anope is free software. You can use, modify, and/or distribute it under the
|
||||
// terms of version 2 of the GNU General Public License. See docs/LICENSE.txt
|
||||
// for the complete terms of this license and docs/AUTHORS.txt for a list of
|
||||
// contributors.
|
||||
//
|
||||
// Based on the original code of Epona by Lara
|
||||
// Based on the original code of Services by Andy Church
|
||||
//
|
||||
// SPDX-License-Identifier: GPL-2.0-only
|
||||
|
||||
#pragma once
|
||||
|
||||
#define CHANSERV_AUTO_KICK_TYPE "AutoKick"
|
||||
#define CHANSERV_AUTO_KICK_SERVICE "ChanServ::AutoKickService"
|
||||
|
||||
namespace ChanServ
|
||||
{
|
||||
class AutoKick;
|
||||
class AutoKickService;
|
||||
|
||||
ServiceReference<AutoKickService> akick_service(CHANSERV_AUTO_KICK_SERVICE, CHANSERV_AUTO_KICK_SERVICE);
|
||||
}
|
||||
|
||||
class ChanServ::AutoKickService
|
||||
: public Service
|
||||
{
|
||||
public:
|
||||
AutoKickService(Module *m)
|
||||
: Service(m, CHANSERV_AUTO_KICK_SERVICE, CHANSERV_AUTO_KICK_SERVICE)
|
||||
{
|
||||
}
|
||||
|
||||
/** Add an akick entry to the channel by NickCore
|
||||
* @param user The user who added the akick
|
||||
* @param akicknc The nickcore being akicked
|
||||
* @param reason The reason for the akick
|
||||
* @param t The time the akick was added, defaults to now
|
||||
* @param lu The time the akick was last used, defaults to never
|
||||
*/
|
||||
virtual AutoKick *AddAKick(ChannelInfo *ci, const Anope::string &user, NickCore *akicknc, const Anope::string &reason, time_t t = Anope::CurTime, time_t lu = 0) = 0;
|
||||
|
||||
/** Add an akick entry to the channel by reason
|
||||
* @param user The user who added the akick
|
||||
* @param mask The mask of the akick
|
||||
* @param reason The reason for the akick
|
||||
* @param t The time the akick was added, defaults to now
|
||||
* @param lu The time the akick was last used, defaults to never
|
||||
*/
|
||||
virtual AutoKick *AddAKick(ChannelInfo *ci, const Anope::string &user, const Anope::string &mask, const Anope::string &reason, time_t t = Anope::CurTime, time_t lu = 0) = 0;
|
||||
|
||||
/** Get an entry from the channel akick list
|
||||
* @param index The index in the akick vector
|
||||
* @return The akick structure, or NULL if not found
|
||||
*/
|
||||
virtual AutoKick *GetAKick(ChannelInfo *ci, unsigned index) = 0;
|
||||
|
||||
/** Get the size of the akick vector for this channel
|
||||
* @return The akick vector size
|
||||
*/
|
||||
virtual unsigned GetAKickCount(ChannelInfo *ci) = 0;
|
||||
|
||||
/** Erase an entry from the channel akick list
|
||||
* @param index The index of the akick
|
||||
*/
|
||||
virtual void EraseAKick(ChannelInfo *ci, unsigned index) = 0;
|
||||
virtual void EraseAKick(ChannelInfo *ci, AutoKick *akick) = 0;
|
||||
|
||||
/** Clear the whole akick list
|
||||
*/
|
||||
virtual void ClearAKick(ChannelInfo *ci) = 0;
|
||||
};
|
||||
|
||||
class ChanServ::AutoKick final
|
||||
: public Serializable
|
||||
{
|
||||
public:
|
||||
/* Channel this autokick is on */
|
||||
Serialize::Reference<ChannelInfo> ci;
|
||||
|
||||
Anope::string mask;
|
||||
Serialize::Reference<NickCore> nc;
|
||||
|
||||
Anope::string reason;
|
||||
Anope::string creator;
|
||||
time_t addtime;
|
||||
time_t last_used;
|
||||
|
||||
AutoKick()
|
||||
: Serializable(CHANSERV_AUTO_KICK_TYPE)
|
||||
{
|
||||
}
|
||||
|
||||
~AutoKick()
|
||||
{
|
||||
if (!this->ci)
|
||||
return;
|
||||
|
||||
if (ChanServ::akick_service)
|
||||
ChanServ::akick_service->EraseAKick(this->ci, this);
|
||||
|
||||
if (this->nc)
|
||||
this->nc->RemoveChannelReference(this->ci);
|
||||
}
|
||||
};
|
||||
@@ -1,37 +1,57 @@
|
||||
/*
|
||||
*
|
||||
* (C) 2003-2025 Anope Team
|
||||
* Contact us at team@anope.org
|
||||
*
|
||||
* Please read COPYING and README for further details.
|
||||
*/
|
||||
// Anope IRC Services <https://www.anope.org/>
|
||||
//
|
||||
// Copyright (C) 2003-2025 Anope Contributors
|
||||
//
|
||||
// Anope is free software. You can use, modify, and/or distribute it under the
|
||||
// terms of version 2 of the GNU General Public License. See docs/LICENSE.txt
|
||||
// for the complete terms of this license and docs/AUTHORS.txt for a list of
|
||||
// contributors.
|
||||
//
|
||||
// Based on the original code of Epona by Lara
|
||||
// Based on the original code of Services by Andy Church
|
||||
//
|
||||
// SPDX-License-Identifier: GPL-2.0-only
|
||||
|
||||
#pragma once
|
||||
|
||||
struct EntryMsg
|
||||
#define CHANSERV_ENTRY_MESSAGE_EXT "entrymsg"
|
||||
#define CHANSERV_ENTRY_MESSAGE_TYPE "EntryMsg"
|
||||
|
||||
namespace ChanServ
|
||||
{
|
||||
class EntryMessage;
|
||||
class EntryMessageList;
|
||||
}
|
||||
|
||||
class ChanServ::EntryMessage
|
||||
{
|
||||
protected:
|
||||
EntryMessage() = default;
|
||||
|
||||
public:
|
||||
Anope::string chan;
|
||||
Anope::string creator;
|
||||
Anope::string message;
|
||||
time_t when;
|
||||
time_t when = 0;
|
||||
|
||||
virtual ~EntryMsg() = default;
|
||||
protected:
|
||||
EntryMsg() = default;
|
||||
virtual ~EntryMessage() = default;
|
||||
};
|
||||
|
||||
struct EntryMessageList
|
||||
: Serialize::Checker<std::vector<EntryMsg *> >
|
||||
class ChanServ::EntryMessageList
|
||||
: public Serialize::Checker<std::vector<ChanServ::EntryMessage *>>
|
||||
{
|
||||
protected:
|
||||
EntryMessageList() : Serialize::Checker<std::vector<EntryMsg *> >("EntryMsg") { }
|
||||
EntryMessageList()
|
||||
: Serialize::Checker<std::vector<ChanServ::EntryMessage *>>(CHANSERV_ENTRY_MESSAGE_TYPE)
|
||||
{
|
||||
}
|
||||
|
||||
public:
|
||||
virtual ~EntryMessageList()
|
||||
{
|
||||
for (unsigned i = (*this)->size(); i > 0; --i)
|
||||
delete (*this)->at(i - 1);
|
||||
while (!(*this)->empty())
|
||||
delete (*this)->back();
|
||||
}
|
||||
|
||||
virtual EntryMsg *Create() = 0;
|
||||
virtual ChanServ::EntryMessage *Create() = 0;
|
||||
};
|
||||
|
||||
@@ -1,18 +1,34 @@
|
||||
/* ChanServ core functions
|
||||
*
|
||||
* (C) 2003-2025 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.
|
||||
*/
|
||||
// Anope IRC Services <https://www.anope.org/>
|
||||
//
|
||||
// Copyright (C) 2003-2025 Anope Contributors
|
||||
//
|
||||
// Anope is free software. You can use, modify, and/or distribute it under the
|
||||
// terms of version 2 of the GNU General Public License. See docs/LICENSE.txt
|
||||
// for the complete terms of this license and docs/AUTHORS.txt for a list of
|
||||
// contributors.
|
||||
//
|
||||
// Based on the original code of Epona by Lara
|
||||
// Based on the original code of Services by Andy Church
|
||||
//
|
||||
// SPDX-License-Identifier: GPL-2.0-only
|
||||
|
||||
#pragma once
|
||||
|
||||
struct LogSetting
|
||||
#define CHANSERV_LOG_SETTING_EXT "logsettings"
|
||||
#define CHANSERV_LOG_SETTING_TYPE "LogSetting"
|
||||
|
||||
namespace ChanServ
|
||||
{
|
||||
class LogSetting;
|
||||
class LogSettings;
|
||||
}
|
||||
|
||||
class ChanServ::LogSetting
|
||||
{
|
||||
protected:
|
||||
LogSetting() = default;
|
||||
|
||||
public:
|
||||
Anope::string chan;
|
||||
/* Our service name of the command */
|
||||
Anope::string service_name;
|
||||
@@ -25,21 +41,18 @@ struct LogSetting
|
||||
time_t created;
|
||||
|
||||
virtual ~LogSetting() = default;
|
||||
protected:
|
||||
LogSetting() = default;
|
||||
};
|
||||
|
||||
struct LogSettings
|
||||
: Serialize::Checker<std::vector<LogSetting *> >
|
||||
class ChanServ::LogSettings
|
||||
: public Serialize::Checker<std::vector<ChanServ::LogSetting *>>
|
||||
{
|
||||
typedef std::vector<LogSetting *>::iterator iterator;
|
||||
|
||||
protected:
|
||||
LogSettings() : Serialize::Checker<std::vector<LogSetting *> >("LogSetting")
|
||||
LogSettings()
|
||||
: Serialize::Checker<std::vector<ChanServ::LogSetting *>>(CHANSERV_LOG_SETTING_TYPE)
|
||||
{
|
||||
}
|
||||
|
||||
public:
|
||||
virtual ~LogSettings() = default;
|
||||
virtual LogSetting *Create() = 0;
|
||||
virtual ChanServ::LogSetting *Create() = 0;
|
||||
};
|
||||
|
||||
@@ -1,18 +1,36 @@
|
||||
/* ChanServ core functions
|
||||
*
|
||||
* (C) 2003-2025 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.
|
||||
*/
|
||||
// Anope IRC Services <https://www.anope.org/>
|
||||
//
|
||||
// Copyright (C) 2003-2025 Anope Contributors
|
||||
//
|
||||
// Anope is free software. You can use, modify, and/or distribute it under the
|
||||
// terms of version 2 of the GNU General Public License. See docs/LICENSE.txt
|
||||
// for the complete terms of this license and docs/AUTHORS.txt for a list of
|
||||
// contributors.
|
||||
//
|
||||
// Based on the original code of Epona by Lara
|
||||
// Based on the original code of Services by Andy Church
|
||||
//
|
||||
// SPDX-License-Identifier: GPL-2.0-only
|
||||
|
||||
#pragma once
|
||||
|
||||
struct ModeLock
|
||||
#define CHANSERV_MODE_LOCK_EXT "modelocks"
|
||||
#define CHANSERV_MODE_LOCK_TYPE "ModeLock"
|
||||
|
||||
namespace ChanServ
|
||||
{
|
||||
class ModeLock;
|
||||
class ModeLocks;
|
||||
|
||||
using ModeLockList = std::vector<ModeLock *>;
|
||||
}
|
||||
|
||||
class ChanServ::ModeLock
|
||||
{
|
||||
protected:
|
||||
ModeLock() = default;
|
||||
|
||||
public:
|
||||
Anope::string ci;
|
||||
bool set;
|
||||
Anope::string name;
|
||||
@@ -21,14 +39,14 @@ struct ModeLock
|
||||
time_t created;
|
||||
|
||||
virtual ~ModeLock() = default;
|
||||
protected:
|
||||
ModeLock() = default;
|
||||
};
|
||||
|
||||
struct ModeLocks
|
||||
class ChanServ::ModeLocks
|
||||
{
|
||||
typedef std::vector<ModeLock *> ModeList;
|
||||
protected:
|
||||
ModeLocks() = default;
|
||||
|
||||
public:
|
||||
virtual ~ModeLocks() = default;
|
||||
|
||||
/** Check if a mode is mlocked
|
||||
@@ -66,7 +84,7 @@ struct ModeLocks
|
||||
/** Get all of the mlocks for this channel
|
||||
* @return The mlocks
|
||||
*/
|
||||
virtual const ModeList &GetMLock() const = 0;
|
||||
virtual const ChanServ::ModeLockList &GetMLock() const = 0;
|
||||
|
||||
/** Get a list of mode locks on a channel
|
||||
* @param name The mode name to get a list of
|
||||
|
||||
@@ -1,18 +1,34 @@
|
||||
/*
|
||||
*
|
||||
* (C) 2011-2025 Anope Team
|
||||
* Contact us at team@anope.org
|
||||
*
|
||||
* Please read COPYING and README for further details.
|
||||
*/
|
||||
// Anope IRC Services <https://www.anope.org/>
|
||||
//
|
||||
// Copyright (C) 2003-2025 Anope Contributors
|
||||
//
|
||||
// Anope is free software. You can use, modify, and/or distribute it under the
|
||||
// terms of version 2 of the GNU General Public License. See docs/LICENSE.txt
|
||||
// for the complete terms of this license and docs/AUTHORS.txt for a list of
|
||||
// contributors.
|
||||
//
|
||||
// Based on the original code of Epona by Lara
|
||||
// Based on the original code of Services by Andy Church
|
||||
//
|
||||
// SPDX-License-Identifier: GPL-2.0-only
|
||||
|
||||
#pragma once
|
||||
|
||||
class ChanServService
|
||||
: public Service
|
||||
#define CHANSERV_SERVICE "ChanServ::Service"
|
||||
|
||||
namespace ChanServ
|
||||
{
|
||||
class Service;
|
||||
|
||||
ServiceReference<Service> service(CHANSERV_SERVICE, CHANSERV_SERVICE);
|
||||
}
|
||||
|
||||
class ChanServ::Service
|
||||
: public ::Service
|
||||
{
|
||||
public:
|
||||
ChanServService(Module *m) : Service(m, "ChanServService", "ChanServ")
|
||||
Service(Module *m)
|
||||
: ::Service(m, CHANSERV_SERVICE, CHANSERV_SERVICE)
|
||||
{
|
||||
}
|
||||
|
||||
|
||||
+13
-10
@@ -1,13 +1,16 @@
|
||||
/*
|
||||
*
|
||||
* (C) 2003-2025 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.
|
||||
*/
|
||||
// Anope IRC Services <https://www.anope.org/>
|
||||
//
|
||||
// Copyright (C) 2003-2025 Anope Contributors
|
||||
//
|
||||
// Anope is free software. You can use, modify, and/or distribute it under the
|
||||
// terms of version 2 of the GNU General Public License. See docs/LICENSE.txt
|
||||
// for the complete terms of this license and docs/AUTHORS.txt for a list of
|
||||
// contributors.
|
||||
//
|
||||
// Based on the original code of Epona by Lara
|
||||
// Based on the original code of Services by Andy Church
|
||||
//
|
||||
// SPDX-License-Identifier: GPL-2.0-only
|
||||
|
||||
#pragma once
|
||||
|
||||
|
||||
@@ -1,13 +1,16 @@
|
||||
/*
|
||||
*
|
||||
* (C) 2003-2025 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.
|
||||
*/
|
||||
// Anope IRC Services <https://www.anope.org/>
|
||||
//
|
||||
// Copyright (C) 2003-2025 Anope Contributors
|
||||
//
|
||||
// Anope is free software. You can use, modify, and/or distribute it under the
|
||||
// terms of version 2 of the GNU General Public License. See docs/LICENSE.txt
|
||||
// for the complete terms of this license and docs/AUTHORS.txt for a list of
|
||||
// contributors.
|
||||
//
|
||||
// Based on the original code of Epona by Lara
|
||||
// Based on the original code of Services by Andy Church
|
||||
//
|
||||
// SPDX-License-Identifier: GPL-2.0-only
|
||||
|
||||
#pragma once
|
||||
|
||||
|
||||
@@ -1,22 +1,37 @@
|
||||
/*
|
||||
*
|
||||
* (C) 2011-2025 Anope Team
|
||||
* Contact us at team@anope.org
|
||||
*
|
||||
* Please read COPYING and README for further details.
|
||||
*/
|
||||
// Anope IRC Services <https://www.anope.org/>
|
||||
//
|
||||
// Copyright (C) 2003-2025 Anope Contributors
|
||||
//
|
||||
// Anope is free software. You can use, modify, and/or distribute it under the
|
||||
// terms of version 2 of the GNU General Public License. See docs/LICENSE.txt
|
||||
// for the complete terms of this license and docs/AUTHORS.txt for a list of
|
||||
// contributors.
|
||||
//
|
||||
// Based on the original code of Epona by Lara
|
||||
// Based on the original code of Services by Andy Church
|
||||
//
|
||||
// SPDX-License-Identifier: GPL-2.0-only
|
||||
|
||||
#pragma once
|
||||
|
||||
#define GLOBAL_NO_MESSAGE _("You do not have any messages queued and did not specify a message to send.")
|
||||
#define GLOBAL_QUEUE_CONFLICT _("You can not send a single message while you have messages queued.")
|
||||
|
||||
class GlobalService
|
||||
: public Service
|
||||
#define GLOBAL_SERVICE "Global::Service"
|
||||
|
||||
namespace Global
|
||||
{
|
||||
class Service;
|
||||
|
||||
ServiceReference<Global::Service> service(GLOBAL_SERVICE, GLOBAL_SERVICE);
|
||||
}
|
||||
|
||||
class Global::Service
|
||||
: public ::Service
|
||||
{
|
||||
public:
|
||||
GlobalService(Module *m)
|
||||
: Service(m, "GlobalService", "Global")
|
||||
Service(Module *m)
|
||||
: ::Service(m, GLOBAL_SERVICE, GLOBAL_SERVICE)
|
||||
{
|
||||
}
|
||||
|
||||
|
||||
@@ -1,14 +1,27 @@
|
||||
/*
|
||||
*
|
||||
* (C) 2003-2025 Anope Team
|
||||
* Contact us at team@anope.org
|
||||
*
|
||||
* Please read COPYING and README for further details.
|
||||
*/
|
||||
// Anope IRC Services <https://www.anope.org/>
|
||||
//
|
||||
// Copyright (C) 2003-2025 Anope Contributors
|
||||
//
|
||||
// Anope is free software. You can use, modify, and/or distribute it under the
|
||||
// terms of version 2 of the GNU General Public License. See docs/LICENSE.txt
|
||||
// for the complete terms of this license and docs/AUTHORS.txt for a list of
|
||||
// contributors.
|
||||
//
|
||||
// Based on the original code of Epona by Lara
|
||||
// Based on the original code of Services by Andy Church
|
||||
//
|
||||
// SPDX-License-Identifier: GPL-2.0-only
|
||||
|
||||
#pragma once
|
||||
|
||||
class HostRequest
|
||||
#define HOSTSERV_HOST_REQUEST_EXT "hostrequest"
|
||||
|
||||
namespace HostServ
|
||||
{
|
||||
class HostRequest;
|
||||
}
|
||||
|
||||
class HostServ::HostRequest
|
||||
{
|
||||
protected:
|
||||
HostRequest() = default;
|
||||
|
||||
+13
-7
@@ -1,10 +1,16 @@
|
||||
/*
|
||||
*
|
||||
* (C) 2012-2025 Anope Team
|
||||
* Contact us at team@anope.org
|
||||
*
|
||||
* Please read COPYING and README for further details.
|
||||
*/
|
||||
// Anope IRC Services <https://www.anope.org/>
|
||||
//
|
||||
// Copyright (C) 2003-2025 Anope Contributors
|
||||
//
|
||||
// Anope is free software. You can use, modify, and/or distribute it under the
|
||||
// terms of version 2 of the GNU General Public License. See docs/LICENSE.txt
|
||||
// for the complete terms of this license and docs/AUTHORS.txt for a list of
|
||||
// contributors.
|
||||
//
|
||||
// Based on the original code of Epona by Lara
|
||||
// Based on the original code of Services by Andy Church
|
||||
//
|
||||
// SPDX-License-Identifier: GPL-2.0-only
|
||||
|
||||
#pragma once
|
||||
|
||||
|
||||
+13
-7
@@ -1,10 +1,16 @@
|
||||
/*
|
||||
*
|
||||
* (C) 2003-2025 Anope Team
|
||||
* Contact us at team@anope.org
|
||||
*
|
||||
* Please read COPYING and README for further details.
|
||||
*/
|
||||
// Anope IRC Services <https://www.anope.org/>
|
||||
//
|
||||
// Copyright (C) 2003-2025 Anope Contributors
|
||||
//
|
||||
// Anope is free software. You can use, modify, and/or distribute it under the
|
||||
// terms of version 2 of the GNU General Public License. See docs/LICENSE.txt
|
||||
// for the complete terms of this license and docs/AUTHORS.txt for a list of
|
||||
// contributors.
|
||||
//
|
||||
// Based on the original code of Epona by Lara
|
||||
// Based on the original code of Services by Andy Church
|
||||
//
|
||||
// SPDX-License-Identifier: GPL-2.0-only
|
||||
|
||||
#pragma once
|
||||
|
||||
|
||||
+13
-7
@@ -1,10 +1,16 @@
|
||||
/*
|
||||
*
|
||||
* (C) 2011-2025 Anope Team
|
||||
* Contact us at team@anope.org
|
||||
*
|
||||
* Please read COPYING and README for further details.
|
||||
*/
|
||||
// Anope IRC Services <https://www.anope.org/>
|
||||
//
|
||||
// Copyright (C) 2003-2025 Anope Contributors
|
||||
//
|
||||
// Anope is free software. You can use, modify, and/or distribute it under the
|
||||
// terms of version 2 of the GNU General Public License. See docs/LICENSE.txt
|
||||
// for the complete terms of this license and docs/AUTHORS.txt for a list of
|
||||
// contributors.
|
||||
//
|
||||
// Based on the original code of Epona by Lara
|
||||
// Based on the original code of Services by Andy Church
|
||||
//
|
||||
// SPDX-License-Identifier: GPL-2.0-only
|
||||
|
||||
#pragma once
|
||||
|
||||
|
||||
@@ -1,17 +1,26 @@
|
||||
/*
|
||||
*
|
||||
* (C) 2011-2025 Anope Team
|
||||
* Contact us at team@anope.org
|
||||
*
|
||||
* Please read COPYING and README for further details.
|
||||
*/
|
||||
// Anope IRC Services <https://www.anope.org/>
|
||||
//
|
||||
// Copyright (C) 2003-2025 Anope Contributors
|
||||
//
|
||||
// Anope is free software. You can use, modify, and/or distribute it under the
|
||||
// terms of version 2 of the GNU General Public License. See docs/LICENSE.txt
|
||||
// for the complete terms of this license and docs/AUTHORS.txt for a list of
|
||||
// contributors.
|
||||
//
|
||||
// Based on the original code of Epona by Lara
|
||||
// Based on the original code of Services by Andy Church
|
||||
//
|
||||
// SPDX-License-Identifier: GPL-2.0-only
|
||||
|
||||
#pragma once
|
||||
|
||||
class MemoServService
|
||||
: public Service
|
||||
#define MEMOSERV_SERVICE "MemoServ::Service"
|
||||
|
||||
namespace MemoServ
|
||||
{
|
||||
public:
|
||||
class Service;
|
||||
|
||||
/** Possible results when sending a memo. */
|
||||
enum MemoResult
|
||||
{
|
||||
MEMO_SUCCESS,
|
||||
@@ -20,7 +29,15 @@ public:
|
||||
MEMO_TARGET_FULL
|
||||
};
|
||||
|
||||
MemoServService(Module *m) : Service(m, "MemoServService", "MemoServ")
|
||||
ServiceReference<Service> service(MEMOSERV_SERVICE, MEMOSERV_SERVICE);
|
||||
}
|
||||
|
||||
class MemoServ::Service
|
||||
: public ::Service
|
||||
{
|
||||
public:
|
||||
Service(Module *m)
|
||||
: ::Service(m, MEMOSERV_SERVICE, MEMOSERV_SERVICE)
|
||||
{
|
||||
}
|
||||
|
||||
@@ -30,7 +47,7 @@ public:
|
||||
* @param message Memo text
|
||||
* @param force true to force the memo, restrictions/delays etc are not checked
|
||||
*/
|
||||
virtual MemoResult Send(const Anope::string &source, const Anope::string &target, const Anope::string &message, bool force = false) = 0;
|
||||
virtual MemoServ::MemoResult Send(const Anope::string &source, const Anope::string &target, const Anope::string &message, bool force = false) = 0;
|
||||
|
||||
/** Check for new memos and notify the user if there are any
|
||||
* @param u The user
|
||||
|
||||
@@ -1,22 +1,37 @@
|
||||
/* NickServ core functions
|
||||
*
|
||||
* (C) 2003-2025 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.
|
||||
*/
|
||||
// Anope IRC Services <https://www.anope.org/>
|
||||
//
|
||||
// Copyright (C) 2003-2025 Anope Contributors
|
||||
//
|
||||
// Anope is free software. You can use, modify, and/or distribute it under the
|
||||
// terms of version 2 of the GNU General Public License. See docs/LICENSE.txt
|
||||
// for the complete terms of this license and docs/AUTHORS.txt for a list of
|
||||
// contributors.
|
||||
//
|
||||
// Based on the original code of Epona by Lara
|
||||
// Based on the original code of Services by Andy Church
|
||||
//
|
||||
// SPDX-License-Identifier: GPL-2.0-only
|
||||
|
||||
#pragma once
|
||||
|
||||
struct NSCertList
|
||||
#define NICKSERV_CERT_EXT "certificates"
|
||||
#define NICKSERV_CERT_SERVICE "NickServ::CertService"
|
||||
|
||||
namespace NickServ
|
||||
{
|
||||
class CertList;
|
||||
class CertService;
|
||||
|
||||
ServiceReference<CertService> cert_service(NICKSERV_CERT_SERVICE, NICKSERV_CERT_SERVICE);
|
||||
}
|
||||
|
||||
class NickServ::CertList
|
||||
{
|
||||
protected:
|
||||
NSCertList() = default;
|
||||
CertList() = default;
|
||||
|
||||
public:
|
||||
virtual ~NSCertList() = default;
|
||||
virtual ~CertList() = default;
|
||||
|
||||
/** Add an entry to the nick's certificate list
|
||||
*
|
||||
@@ -72,11 +87,14 @@ public:
|
||||
virtual void Check() = 0;
|
||||
};
|
||||
|
||||
class CertService
|
||||
: public Service
|
||||
class NickServ::CertService
|
||||
: public ::Service
|
||||
{
|
||||
public:
|
||||
CertService(Module *c) : Service(c, "CertService", "certs") { }
|
||||
CertService(Module *m)
|
||||
: ::Service(m, NICKSERV_CERT_SERVICE, NICKSERV_CERT_SERVICE)
|
||||
{
|
||||
}
|
||||
|
||||
virtual NickCore *FindAccountFromCert(const Anope::string &cert) = 0;
|
||||
virtual void ReplaceCert(const Anope::string &oldcert, const Anope::string &newcert) = 0;
|
||||
|
||||
@@ -1,10 +1,16 @@
|
||||
/*
|
||||
*
|
||||
* (C) 2014-2025 Anope Team
|
||||
* Contact us at team@anope.org
|
||||
*
|
||||
* Please read COPYING and README for further details.
|
||||
*/
|
||||
// Anope IRC Services <https://www.anope.org/>
|
||||
//
|
||||
// Copyright (C) 2003-2025 Anope Contributors
|
||||
//
|
||||
// Anope is free software. You can use, modify, and/or distribute it under the
|
||||
// terms of version 2 of the GNU General Public License. See docs/LICENSE.txt
|
||||
// for the complete terms of this license and docs/AUTHORS.txt for a list of
|
||||
// contributors.
|
||||
//
|
||||
// Based on the original code of Epona by Lara
|
||||
// Based on the original code of Services by Andy Church
|
||||
//
|
||||
// SPDX-License-Identifier: GPL-2.0-only
|
||||
|
||||
#pragma once
|
||||
|
||||
|
||||
@@ -1,18 +1,35 @@
|
||||
/*
|
||||
*
|
||||
* (C) 2011-2025 Anope Team
|
||||
* Contact us at team@anope.org
|
||||
*
|
||||
* Please read COPYING and README for further details.
|
||||
*/
|
||||
// Anope IRC Services <https://www.anope.org/>
|
||||
//
|
||||
// Copyright (C) 2003-2025 Anope Contributors
|
||||
//
|
||||
// Anope is free software. You can use, modify, and/or distribute it under the
|
||||
// terms of version 2 of the GNU General Public License. See docs/LICENSE.txt
|
||||
// for the complete terms of this license and docs/AUTHORS.txt for a list of
|
||||
// contributors.
|
||||
//
|
||||
// Based on the original code of Epona by Lara
|
||||
// Based on the original code of Services by Andy Church
|
||||
//
|
||||
// SPDX-License-Identifier: GPL-2.0-only
|
||||
|
||||
#pragma once
|
||||
|
||||
class NickServService
|
||||
: public Service
|
||||
|
||||
#define NICKSERV_SERVICE "NickServ::Service"
|
||||
|
||||
namespace NickServ
|
||||
{
|
||||
class Service;
|
||||
|
||||
ServiceReference<Service> service(NICKSERV_SERVICE, NICKSERV_SERVICE);
|
||||
}
|
||||
|
||||
class NickServ::Service
|
||||
: public ::Service
|
||||
{
|
||||
public:
|
||||
NickServService(Module *m) : Service(m, "NickServService", "NickServ")
|
||||
Service(Module *m)
|
||||
: ::Service(m, NICKSERV_SERVICE, NICKSERV_SERVICE)
|
||||
{
|
||||
}
|
||||
|
||||
|
||||
@@ -1,53 +1,75 @@
|
||||
/*
|
||||
*
|
||||
* (C) 2011-2025 Anope Team
|
||||
* Contact us at team@anope.org
|
||||
*
|
||||
* Please read COPYING and README for further details.
|
||||
*/
|
||||
// Anope IRC Services <https://www.anope.org/>
|
||||
//
|
||||
// Copyright (C) 2003-2025 Anope Contributors
|
||||
//
|
||||
// Anope is free software. You can use, modify, and/or distribute it under the
|
||||
// terms of version 2 of the GNU General Public License. See docs/LICENSE.txt
|
||||
// for the complete terms of this license and docs/AUTHORS.txt for a list of
|
||||
// contributors.
|
||||
//
|
||||
// Based on the original code of Epona by Lara
|
||||
// Based on the original code of Services by Andy Church
|
||||
//
|
||||
// SPDX-License-Identifier: GPL-2.0-only
|
||||
|
||||
#pragma once
|
||||
|
||||
enum ForbidType
|
||||
{
|
||||
FT_NICK = 1,
|
||||
FT_CHAN,
|
||||
FT_EMAIL,
|
||||
FT_REGISTER,
|
||||
FT_SIZE
|
||||
};
|
||||
#define OPERSERV_FORBID_DATA_TYPE "ForbidData"
|
||||
#define OPERSERV_FORBID_SERVICE "OperServ::ForbidService"
|
||||
|
||||
struct ForbidData
|
||||
namespace OperServ
|
||||
{
|
||||
class ForbidData;
|
||||
class ForbidService;
|
||||
|
||||
enum ForbidType
|
||||
{
|
||||
FT_NICK = 1,
|
||||
FT_CHAN,
|
||||
FT_EMAIL,
|
||||
FT_REGISTER,
|
||||
FT_PASSWORD,
|
||||
FT_SIZE
|
||||
};
|
||||
|
||||
ServiceReference<ForbidService> forbid_service(OPERSERV_FORBID_SERVICE, OPERSERV_FORBID_SERVICE);
|
||||
}
|
||||
|
||||
class OperServ::ForbidData
|
||||
{
|
||||
protected:
|
||||
ForbidData() = default;
|
||||
|
||||
public:
|
||||
Anope::string mask;
|
||||
Anope::string creator;
|
||||
Anope::string reason;
|
||||
time_t created = 0;
|
||||
time_t expires = 0;
|
||||
ForbidType type;
|
||||
bool immutable = false;
|
||||
OperServ::ForbidType type;
|
||||
|
||||
virtual ~ForbidData() = default;
|
||||
protected:
|
||||
ForbidData() = default;
|
||||
};
|
||||
|
||||
class ForbidService
|
||||
class OperServ::ForbidService
|
||||
: public Service
|
||||
{
|
||||
public:
|
||||
ForbidService(Module *m) : Service(m, "ForbidService", "forbid") { }
|
||||
ForbidService(Module *m)
|
||||
: Service(m, OPERSERV_FORBID_SERVICE, OPERSERV_FORBID_SERVICE)
|
||||
{
|
||||
}
|
||||
|
||||
virtual void AddForbid(ForbidData *d) = 0;
|
||||
virtual void AddForbid(OperServ::ForbidData *d) = 0;
|
||||
|
||||
virtual void RemoveForbid(ForbidData *d) = 0;
|
||||
virtual void RemoveForbid(OperServ::ForbidData *d) = 0;
|
||||
|
||||
virtual ForbidData *CreateForbid() = 0;
|
||||
virtual OperServ::ForbidData *CreateForbid() = 0;
|
||||
|
||||
virtual ForbidData *FindForbid(const Anope::string &mask, ForbidType type) = 0;
|
||||
virtual OperServ::ForbidData *FindForbid(const Anope::string &mask, OperServ::ForbidType type) = 0;
|
||||
|
||||
virtual ForbidData *FindForbidExact(const Anope::string &mask, ForbidType type) = 0;
|
||||
virtual OperServ::ForbidData *FindForbidExact(const Anope::string &mask, OperServ::ForbidType type) = 0;
|
||||
|
||||
virtual std::vector<ForbidData *> GetForbids() = 0;
|
||||
virtual std::vector<OperServ::ForbidData *> GetForbids() = 0;
|
||||
};
|
||||
|
||||
static ServiceReference<ForbidService> forbid_service("ForbidService", "forbid");
|
||||
|
||||
@@ -1,46 +1,63 @@
|
||||
/* OperServ ignore interface
|
||||
*
|
||||
* (C) 2003-2025 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.
|
||||
*/
|
||||
// Anope IRC Services <https://www.anope.org/>
|
||||
//
|
||||
// Copyright (C) 2003-2025 Anope Contributors
|
||||
//
|
||||
// Anope is free software. You can use, modify, and/or distribute it under the
|
||||
// terms of version 2 of the GNU General Public License. See docs/LICENSE.txt
|
||||
// for the complete terms of this license and docs/AUTHORS.txt for a list of
|
||||
// contributors.
|
||||
//
|
||||
// Based on the original code of Epona by Lara
|
||||
// Based on the original code of Services by Andy Church
|
||||
//
|
||||
// SPDX-License-Identifier: GPL-2.0-only
|
||||
|
||||
#pragma once
|
||||
|
||||
struct IgnoreData
|
||||
#define OPERSERV_IGNORE_DATA_TYPE "IgnoreData"
|
||||
#define OPERSERV_IGNORE_SERVICE "OperServ::IgnoreService"
|
||||
|
||||
namespace OperServ
|
||||
{
|
||||
class IgnoreData;
|
||||
class IgnoreService;
|
||||
|
||||
ServiceReference<IgnoreService> ignore_service(OPERSERV_IGNORE_SERVICE, OPERSERV_IGNORE_SERVICE);
|
||||
}
|
||||
|
||||
class OperServ::IgnoreData
|
||||
{
|
||||
protected:
|
||||
IgnoreData() = default;
|
||||
|
||||
public:
|
||||
Anope::string mask;
|
||||
Anope::string creator;
|
||||
Anope::string reason;
|
||||
time_t time = 0; /* When do we stop ignoring them? */
|
||||
|
||||
virtual ~IgnoreData() = default;
|
||||
protected:
|
||||
IgnoreData() = default;
|
||||
};
|
||||
|
||||
class IgnoreService
|
||||
class OperServ::IgnoreService
|
||||
: public Service
|
||||
{
|
||||
protected:
|
||||
IgnoreService(Module *c) : Service(c, "IgnoreService", "ignore") { }
|
||||
IgnoreService(Module *c)
|
||||
: Service(c, OPERSERV_IGNORE_SERVICE, OPERSERV_IGNORE_SERVICE)
|
||||
{
|
||||
}
|
||||
|
||||
public:
|
||||
virtual void AddIgnore(IgnoreData *) = 0;
|
||||
virtual void AddIgnore(OperServ::IgnoreData *) = 0;
|
||||
|
||||
virtual void DelIgnore(IgnoreData *) = 0;
|
||||
virtual void DelIgnore(OperServ::IgnoreData *) = 0;
|
||||
|
||||
virtual void ClearIgnores() = 0;
|
||||
|
||||
virtual IgnoreData *Create() = 0;
|
||||
virtual OperServ::IgnoreData *Create() = 0;
|
||||
|
||||
virtual IgnoreData *Find(const Anope::string &mask) = 0;
|
||||
virtual OperServ::IgnoreData *Find(const Anope::string &mask) = 0;
|
||||
|
||||
virtual std::vector<IgnoreData *> &GetIgnores() = 0;
|
||||
virtual std::vector<OperServ::IgnoreData *> &GetIgnores() = 0;
|
||||
};
|
||||
|
||||
static ServiceReference<IgnoreService> ignore_service("IgnoreService", "ignore");
|
||||
|
||||
@@ -1,44 +1,65 @@
|
||||
/*
|
||||
*
|
||||
* (C) 2011-2025 Anope Team
|
||||
* Contact us at team@anope.org
|
||||
*
|
||||
* Please read COPYING and README for further details.
|
||||
*/
|
||||
// Anope IRC Services <https://www.anope.org/>
|
||||
//
|
||||
// Copyright (C) 2003-2025 Anope Contributors
|
||||
//
|
||||
// Anope is free software. You can use, modify, and/or distribute it under the
|
||||
// terms of version 2 of the GNU General Public License. See docs/LICENSE.txt
|
||||
// for the complete terms of this license and docs/AUTHORS.txt for a list of
|
||||
// contributors.
|
||||
//
|
||||
// Based on the original code of Epona by Lara
|
||||
// Based on the original code of Services by Andy Church
|
||||
//
|
||||
// SPDX-License-Identifier: GPL-2.0-only
|
||||
|
||||
#pragma once
|
||||
|
||||
enum NewsType
|
||||
{
|
||||
NEWS_LOGON,
|
||||
NEWS_RANDOM,
|
||||
NEWS_OPER
|
||||
};
|
||||
#define OPERSERV_NEWS_ITEM_TYPE "NewsItem"
|
||||
#define OPERSERV_NEWS_SERVICE "OperServ::NewsService"
|
||||
|
||||
struct NewsItem
|
||||
namespace OperServ
|
||||
{
|
||||
struct NewsItem;
|
||||
class NewsService;
|
||||
|
||||
enum NewsType
|
||||
{
|
||||
NEWS_LOGON,
|
||||
NEWS_RANDOM,
|
||||
NEWS_OPER,
|
||||
};
|
||||
|
||||
ServiceReference<NewsService> news_service(OPERSERV_NEWS_SERVICE, OPERSERV_NEWS_SERVICE);
|
||||
}
|
||||
|
||||
struct OperServ::NewsItem
|
||||
: Serializable
|
||||
{
|
||||
NewsType type;
|
||||
OperServ::NewsType type;
|
||||
Anope::string text;
|
||||
Anope::string who;
|
||||
time_t time;
|
||||
|
||||
NewsItem() : Serializable("NewsItem") { }
|
||||
NewsItem()
|
||||
: Serializable(OPERSERV_NEWS_ITEM_TYPE)
|
||||
{
|
||||
}
|
||||
};
|
||||
|
||||
class NewsService
|
||||
class OperServ::NewsService
|
||||
: public Service
|
||||
{
|
||||
public:
|
||||
NewsService(Module *m) : Service(m, "NewsService", "news") { }
|
||||
NewsService(Module *m)
|
||||
: Service(m, OPERSERV_NEWS_SERVICE, OPERSERV_NEWS_SERVICE)
|
||||
{
|
||||
}
|
||||
|
||||
virtual NewsItem *CreateNewsItem() = 0;
|
||||
virtual OperServ::NewsItem *CreateNewsItem() = 0;
|
||||
|
||||
virtual void AddNewsItem(NewsItem *n) = 0;
|
||||
virtual void AddNewsItem(OperServ::NewsItem *n) = 0;
|
||||
|
||||
virtual void DelNewsItem(NewsItem *n) = 0;
|
||||
virtual void DelNewsItem(OperServ::NewsItem *n) = 0;
|
||||
|
||||
virtual std::vector<NewsItem *> &GetNewsList(NewsType t) = 0;
|
||||
virtual std::vector<OperServ::NewsItem *> &GetNewsList(OperServ::NewsType t) = 0;
|
||||
};
|
||||
|
||||
static ServiceReference<NewsService> news_service("NewsService", "news");
|
||||
|
||||
@@ -1,16 +1,33 @@
|
||||
/*
|
||||
*
|
||||
* (C) 2011-2025 Anope Team
|
||||
* Contact us at team@anope.org
|
||||
*
|
||||
* Please read COPYING and README for further details.
|
||||
*/
|
||||
// Anope IRC Services <https://www.anope.org/>
|
||||
//
|
||||
// Copyright (C) 2003-2025 Anope Contributors
|
||||
//
|
||||
// Anope is free software. You can use, modify, and/or distribute it under the
|
||||
// terms of version 2 of the GNU General Public License. See docs/LICENSE.txt
|
||||
// for the complete terms of this license and docs/AUTHORS.txt for a list of
|
||||
// contributors.
|
||||
//
|
||||
// Based on the original code of Epona by Lara
|
||||
// Based on the original code of Services by Andy Church
|
||||
//
|
||||
// SPDX-License-Identifier: GPL-2.0-only
|
||||
|
||||
#pragma once
|
||||
|
||||
struct MyOper final
|
||||
: Oper
|
||||
#define OPERSERV_OPER_TYPE "Oper"
|
||||
|
||||
namespace OperServ
|
||||
{
|
||||
struct Oper;
|
||||
}
|
||||
|
||||
struct OperServ::Oper final
|
||||
: ::Oper
|
||||
, Serializable
|
||||
{
|
||||
MyOper(const Anope::string &n, OperType *o) : Oper(n, o), Serializable("Oper") { }
|
||||
Oper(const Anope::string &n, OperType *o)
|
||||
: ::Oper(n, o)
|
||||
, Serializable(OPERSERV_OPER_TYPE)
|
||||
{
|
||||
}
|
||||
};
|
||||
|
||||
@@ -1,23 +1,47 @@
|
||||
/*
|
||||
*
|
||||
* (C) 2011-2025 Anope Team
|
||||
* Contact us at team@anope.org
|
||||
*
|
||||
* Please read COPYING and README for further details.
|
||||
*/
|
||||
// Anope IRC Services <https://www.anope.org/>
|
||||
//
|
||||
// Copyright (C) 2003-2025 Anope Contributors
|
||||
//
|
||||
// Anope is free software. You can use, modify, and/or distribute it under the
|
||||
// terms of version 2 of the GNU General Public License. See docs/LICENSE.txt
|
||||
// for the complete terms of this license and docs/AUTHORS.txt for a list of
|
||||
// contributors.
|
||||
//
|
||||
// Based on the original code of Epona by Lara
|
||||
// Based on the original code of Services by Andy Church
|
||||
//
|
||||
// SPDX-License-Identifier: GPL-2.0-only
|
||||
|
||||
#pragma once
|
||||
|
||||
struct Session final
|
||||
#define OPERSERV_SESSION_EXCEPTION_TYPE "Exception"
|
||||
#define OPERSERV_SESSION_SERVICE "OperServ::SessionService"
|
||||
|
||||
namespace OperServ
|
||||
{
|
||||
struct Exception;
|
||||
struct Session;
|
||||
class SessionService;
|
||||
|
||||
using ExceptionVector = std::vector<Exception *>;
|
||||
using SessionMap = std::unordered_map<cidr, Session *, cidr::hash>;
|
||||
|
||||
ServiceReference<SessionService> session_service(OPERSERV_SESSION_SERVICE, OPERSERV_SESSION_SERVICE);
|
||||
}
|
||||
|
||||
struct OperServ::Session final
|
||||
{
|
||||
cidr addr; /* A cidr (sockaddrs + len) representing this session */
|
||||
unsigned count = 1; /* Number of clients with this host */
|
||||
unsigned hits = 0; /* Number of subsequent kills for a host */
|
||||
|
||||
Session(const sockaddrs &ip, int len) : addr(ip, len) { }
|
||||
Session(const sockaddrs &ip, int len)
|
||||
: addr(ip, len)
|
||||
{
|
||||
}
|
||||
};
|
||||
|
||||
struct Exception final
|
||||
struct OperServ::Exception final
|
||||
: Serializable
|
||||
{
|
||||
Anope::string mask; /* Hosts to which this exception applies */
|
||||
@@ -27,33 +51,34 @@ struct Exception final
|
||||
time_t time; /* When this exception was added */
|
||||
time_t expires; /* Time when it expires. 0 == no expiry */
|
||||
|
||||
Exception() : Serializable("Exception") { }
|
||||
Exception()
|
||||
: Serializable(OPERSERV_SESSION_EXCEPTION_TYPE)
|
||||
{
|
||||
}
|
||||
};
|
||||
|
||||
class SessionService
|
||||
class OperServ::SessionService
|
||||
: public Service
|
||||
{
|
||||
public:
|
||||
typedef std::unordered_map<cidr, Session *, cidr::hash> SessionMap;
|
||||
typedef std::vector<Exception *> ExceptionVector;
|
||||
SessionService(Module *m)
|
||||
: Service(m, OPERSERV_SESSION_SERVICE, OPERSERV_SESSION_SERVICE)
|
||||
{
|
||||
}
|
||||
|
||||
SessionService(Module *m) : Service(m, "SessionService", "session") { }
|
||||
virtual OperServ::Exception *CreateException() = 0;
|
||||
|
||||
virtual Exception *CreateException() = 0;
|
||||
virtual void AddException(OperServ::Exception *e) = 0;
|
||||
|
||||
virtual void AddException(Exception *e) = 0;
|
||||
virtual void DelException(OperServ::Exception *e) = 0;
|
||||
|
||||
virtual void DelException(Exception *e) = 0;
|
||||
virtual OperServ::Exception *FindException(User *u) = 0;
|
||||
|
||||
virtual Exception *FindException(User *u) = 0;
|
||||
virtual OperServ::Exception *FindException(const Anope::string &host) = 0;
|
||||
|
||||
virtual Exception *FindException(const Anope::string &host) = 0;
|
||||
virtual OperServ::ExceptionVector &GetExceptions() = 0;
|
||||
|
||||
virtual ExceptionVector &GetExceptions() = 0;
|
||||
virtual OperServ::Session *FindSession(const Anope::string &ip) = 0;
|
||||
|
||||
virtual Session *FindSession(const Anope::string &ip) = 0;
|
||||
|
||||
virtual SessionMap &GetSessions() = 0;
|
||||
virtual OperServ::SessionMap &GetSessions() = 0;
|
||||
};
|
||||
|
||||
static ServiceReference<SessionService> session_service("SessionService", "session");
|
||||
|
||||
+13
-7
@@ -1,10 +1,16 @@
|
||||
/*
|
||||
*
|
||||
* (C) 2003-2025 Anope Team
|
||||
* Contact us at team@anope.org
|
||||
*
|
||||
* Please read COPYING and README for further details.
|
||||
*/
|
||||
// Anope IRC Services <https://www.anope.org/>
|
||||
//
|
||||
// Copyright (C) 2003-2025 Anope Contributors
|
||||
//
|
||||
// Anope is free software. You can use, modify, and/or distribute it under the
|
||||
// terms of version 2 of the GNU General Public License. See docs/LICENSE.txt
|
||||
// for the complete terms of this license and docs/AUTHORS.txt for a list of
|
||||
// contributors.
|
||||
//
|
||||
// Based on the original code of Epona by Lara
|
||||
// Based on the original code of Services by Andy Church
|
||||
//
|
||||
// SPDX-License-Identifier: GPL-2.0-only
|
||||
|
||||
#pragma once
|
||||
|
||||
|
||||
+13
-7
@@ -1,10 +1,16 @@
|
||||
/*
|
||||
*
|
||||
* (C) 2010-2025 Anope Team
|
||||
* Contact us at team@anope.org
|
||||
*
|
||||
* Please read COPYING and README for further details.
|
||||
*/
|
||||
// Anope IRC Services <https://www.anope.org/>
|
||||
//
|
||||
// Copyright (C) 2003-2025 Anope Contributors
|
||||
//
|
||||
// Anope is free software. You can use, modify, and/or distribute it under the
|
||||
// terms of version 2 of the GNU General Public License. See docs/LICENSE.txt
|
||||
// for the complete terms of this license and docs/AUTHORS.txt for a list of
|
||||
// contributors.
|
||||
//
|
||||
// Based on the original code of Epona by Lara
|
||||
// Based on the original code of Services by Andy Church
|
||||
//
|
||||
// SPDX-License-Identifier: GPL-2.0-only
|
||||
|
||||
#pragma once
|
||||
|
||||
|
||||
@@ -1,10 +1,16 @@
|
||||
/*
|
||||
*
|
||||
* (C) 2003-2025 Anope Team
|
||||
* Contact us at team@anope.org
|
||||
*
|
||||
* Please read COPYING and README for further details.
|
||||
*/
|
||||
// Anope IRC Services <https://www.anope.org/>
|
||||
//
|
||||
// Copyright (C) 2003-2025 Anope Contributors
|
||||
//
|
||||
// Anope is free software. You can use, modify, and/or distribute it under the
|
||||
// terms of version 2 of the GNU General Public License. See docs/LICENSE.txt
|
||||
// for the complete terms of this license and docs/AUTHORS.txt for a list of
|
||||
// contributors.
|
||||
//
|
||||
// Based on the original code of Epona by Lara
|
||||
// Based on the original code of Services by Andy Church
|
||||
//
|
||||
// SPDX-License-Identifier: GPL-2.0-only
|
||||
|
||||
#pragma once
|
||||
|
||||
|
||||
+13
-7
@@ -1,10 +1,16 @@
|
||||
/*
|
||||
*
|
||||
* (C) 2003-2025 Anope Team
|
||||
* Contact us at team@anope.org
|
||||
*
|
||||
* Please read COPYING and README for further details.
|
||||
*/
|
||||
// Anope IRC Services <https://www.anope.org/>
|
||||
//
|
||||
// Copyright (C) 2003-2025 Anope Contributors
|
||||
//
|
||||
// Anope is free software. You can use, modify, and/or distribute it under the
|
||||
// terms of version 2 of the GNU General Public License. See docs/LICENSE.txt
|
||||
// for the complete terms of this license and docs/AUTHORS.txt for a list of
|
||||
// contributors.
|
||||
//
|
||||
// Based on the original code of Epona by Lara
|
||||
// Based on the original code of Services by Andy Church
|
||||
//
|
||||
// SPDX-License-Identifier: GPL-2.0-only
|
||||
|
||||
#pragma once
|
||||
|
||||
|
||||
+13
-7
@@ -1,10 +1,16 @@
|
||||
/*
|
||||
*
|
||||
* (C) 2010-2025 Anope Team
|
||||
* Contact us at team@anope.org
|
||||
*
|
||||
* Please read COPYING and README for further details.
|
||||
*/
|
||||
// Anope IRC Services <https://www.anope.org/>
|
||||
//
|
||||
// Copyright (C) 2003-2025 Anope Contributors
|
||||
//
|
||||
// Anope is free software. You can use, modify, and/or distribute it under the
|
||||
// terms of version 2 of the GNU General Public License. See docs/LICENSE.txt
|
||||
// for the complete terms of this license and docs/AUTHORS.txt for a list of
|
||||
// contributors.
|
||||
//
|
||||
// Based on the original code of Epona by Lara
|
||||
// Based on the original code of Services by Andy Church
|
||||
//
|
||||
// SPDX-License-Identifier: GPL-2.0-only
|
||||
|
||||
#pragma once
|
||||
|
||||
|
||||
+13
-10
@@ -1,13 +1,16 @@
|
||||
/*
|
||||
*
|
||||
* (C) 2003-2025 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.
|
||||
*/
|
||||
// Anope IRC Services <https://www.anope.org/>
|
||||
//
|
||||
// Copyright (C) 2003-2025 Anope Contributors
|
||||
//
|
||||
// Anope is free software. You can use, modify, and/or distribute it under the
|
||||
// terms of version 2 of the GNU General Public License. See docs/LICENSE.txt
|
||||
// for the complete terms of this license and docs/AUTHORS.txt for a list of
|
||||
// contributors.
|
||||
//
|
||||
// Based on the original code of Epona by Lara
|
||||
// Based on the original code of Services by Andy Church
|
||||
//
|
||||
// SPDX-License-Identifier: GPL-2.0-only
|
||||
|
||||
#pragma once
|
||||
|
||||
|
||||
+13
-10
@@ -1,13 +1,16 @@
|
||||
/*
|
||||
*
|
||||
* (C) 2003-2025 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.
|
||||
*/
|
||||
// Anope IRC Services <https://www.anope.org/>
|
||||
//
|
||||
// Copyright (C) 2003-2025 Anope Contributors
|
||||
//
|
||||
// Anope is free software. You can use, modify, and/or distribute it under the
|
||||
// terms of version 2 of the GNU General Public License. See docs/LICENSE.txt
|
||||
// for the complete terms of this license and docs/AUTHORS.txt for a list of
|
||||
// contributors.
|
||||
//
|
||||
// Based on the original code of Epona by Lara
|
||||
// Based on the original code of Services by Andy Church
|
||||
//
|
||||
// SPDX-License-Identifier: GPL-2.0-only
|
||||
|
||||
#pragma once
|
||||
|
||||
|
||||
+14
-7
@@ -1,10 +1,17 @@
|
||||
/*
|
||||
*
|
||||
* (C) 2008-2011 Robin Burchell <w00t@inspircd.org>
|
||||
* (C) 2008-2025 Anope Team <team@anope.org>
|
||||
*
|
||||
* Please read COPYING and README for further details.
|
||||
*/
|
||||
// Anope IRC Services <https://www.anope.org/>
|
||||
//
|
||||
// Copyright (C) 2003-2025 Anope Contributors
|
||||
// Copyright (C) 2008-2011 Robin Burchell <w00t@inspircd.org>
|
||||
//
|
||||
// Anope is free software. You can use, modify, and/or distribute it under the
|
||||
// terms of version 2 of the GNU General Public License. See docs/LICENSE.txt
|
||||
// for the complete terms of this license and docs/AUTHORS.txt for a list of
|
||||
// contributors.
|
||||
//
|
||||
// Based on the original code of Epona by Lara
|
||||
// Based on the original code of Services by Andy Church
|
||||
//
|
||||
// SPDX-License-Identifier: GPL-2.0-only
|
||||
|
||||
#pragma once
|
||||
|
||||
|
||||
+17
-14
@@ -1,13 +1,16 @@
|
||||
/*
|
||||
*
|
||||
* (C) 2003-2025 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.
|
||||
*/
|
||||
// Anope IRC Services <https://www.anope.org/>
|
||||
//
|
||||
// Copyright (C) 2003-2025 Anope Contributors
|
||||
//
|
||||
// Anope is free software. You can use, modify, and/or distribute it under the
|
||||
// terms of version 2 of the GNU General Public License. See docs/LICENSE.txt
|
||||
// for the complete terms of this license and docs/AUTHORS.txt for a list of
|
||||
// contributors.
|
||||
//
|
||||
// Based on the original code of Epona by Lara
|
||||
// Based on the original code of Services by Andy Church
|
||||
//
|
||||
// SPDX-License-Identifier: GPL-2.0-only
|
||||
|
||||
#pragma once
|
||||
|
||||
@@ -215,8 +218,8 @@ public:
|
||||
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 SendContextNotice(BotInfo *bi, User *target, Channel *context, const Anope::string &msg);
|
||||
virtual void SendContextPrivmsg(BotInfo *bi, User *target, Channel *context, const Anope::string &msg);
|
||||
virtual void SendContextNotice(BotInfo *bi, User *target, Channel *context, const Anope::string &msg, const Anope::map<Anope::string> &tags = {});
|
||||
virtual void SendContextPrivmsg(BotInfo *bi, User *target, Channel *context, const Anope::string &msg, const Anope::map<Anope::string> &tags = {});
|
||||
|
||||
virtual void SendQuit(User *u, const Anope::string &msg = "", const Anope::string &opermsg = "");
|
||||
virtual void SendPing(const Anope::string &servname, const Anope::string &who);
|
||||
@@ -280,9 +283,9 @@ public:
|
||||
virtual void SendServer(const Server *) = 0;
|
||||
virtual void SendSquit(Server *, const Anope::string &message);
|
||||
|
||||
virtual void SendNumericInternal(int numeric, const Anope::string &dest, const std::vector<Anope::string> ¶ms);
|
||||
virtual void SendNumericInternal(unsigned numeric, const Anope::string &dest, const std::vector<Anope::string> ¶ms);
|
||||
template <typename... Args>
|
||||
void SendNumeric(int numeric, const Anope::string &dest, Args &&...args)
|
||||
void SendNumeric(unsigned numeric, const Anope::string &dest, Args &&...args)
|
||||
{
|
||||
SendNumericInternal(numeric, dest, { Anope::ToString(args)... });
|
||||
}
|
||||
|
||||
+13
-74
@@ -1,10 +1,16 @@
|
||||
/*
|
||||
*
|
||||
* (C) 2008-2025 Anope Team
|
||||
* Contact us at team@anope.org
|
||||
*
|
||||
* Please read COPYING and README for further details.
|
||||
*/
|
||||
// Anope IRC Services <https://www.anope.org/>
|
||||
//
|
||||
// Copyright (C) 2003-2025 Anope Contributors
|
||||
//
|
||||
// Anope is free software. You can use, modify, and/or distribute it under the
|
||||
// terms of version 2 of the GNU General Public License. See docs/LICENSE.txt
|
||||
// for the complete terms of this license and docs/AUTHORS.txt for a list of
|
||||
// contributors.
|
||||
//
|
||||
// Based on the original code of Epona by Lara
|
||||
// Based on the original code of Services by Andy Church
|
||||
//
|
||||
// SPDX-License-Identifier: GPL-2.0-only
|
||||
|
||||
#pragma once
|
||||
|
||||
@@ -20,34 +26,6 @@ typedef Anope::unordered_map<ChannelInfo *> registered_channel_map;
|
||||
|
||||
extern CoreExport Serialize::Checker<registered_channel_map> RegisteredChannelList;
|
||||
|
||||
/* AutoKick data. */
|
||||
class CoreExport AutoKick final
|
||||
: public Serializable
|
||||
{
|
||||
public:
|
||||
struct Type final
|
||||
: public Serialize::Type
|
||||
{
|
||||
Type();
|
||||
void Serialize(Serializable *obj, Serialize::Data &data) const override;
|
||||
Serializable *Unserialize(Serializable *obj, Serialize::Data &data) const override;
|
||||
};
|
||||
|
||||
/* Channel this autokick is on */
|
||||
Serialize::Reference<ChannelInfo> ci;
|
||||
|
||||
Anope::string mask;
|
||||
Serialize::Reference<NickCore> nc;
|
||||
|
||||
Anope::string reason;
|
||||
Anope::string creator;
|
||||
time_t addtime;
|
||||
time_t last_used;
|
||||
|
||||
AutoKick();
|
||||
~AutoKick();
|
||||
};
|
||||
|
||||
/* It matters that Base is here before Extensible (it is inherited by Serializable)
|
||||
*/
|
||||
class CoreExport ChannelInfo final
|
||||
@@ -69,7 +47,6 @@ 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 */
|
||||
Anope::map<int16_t> levels;
|
||||
|
||||
public:
|
||||
@@ -174,44 +151,6 @@ public:
|
||||
*/
|
||||
void ClearAccess();
|
||||
|
||||
/** Add an akick entry to the channel by NickCore
|
||||
* @param user The user who added the akick
|
||||
* @param akicknc The nickcore being akicked
|
||||
* @param reason The reason for the akick
|
||||
* @param t The time the akick was added, defaults to now
|
||||
* @param lu The time the akick was last used, defaults to never
|
||||
*/
|
||||
AutoKick *AddAkick(const Anope::string &user, NickCore *akicknc, const Anope::string &reason, time_t t = Anope::CurTime, time_t lu = 0);
|
||||
|
||||
/** Add an akick entry to the channel by reason
|
||||
* @param user The user who added the akick
|
||||
* @param mask The mask of the akick
|
||||
* @param reason The reason for the akick
|
||||
* @param t The time the akick was added, defaults to now
|
||||
* @param lu The time the akick was last used, defaults to never
|
||||
*/
|
||||
AutoKick *AddAkick(const Anope::string &user, const Anope::string &mask, const Anope::string &reason, time_t t = Anope::CurTime, time_t lu = 0);
|
||||
|
||||
/** Get an entry from the channel akick list
|
||||
* @param index The index in the akick vector
|
||||
* @return The akick structure, or NULL if not found
|
||||
*/
|
||||
AutoKick *GetAkick(unsigned index) const;
|
||||
|
||||
/** Get the size of the akick vector for this channel
|
||||
* @return The akick vector size
|
||||
*/
|
||||
unsigned GetAkickCount() const;
|
||||
|
||||
/** Erase an entry from the channel akick list
|
||||
* @param index The index of the akick
|
||||
*/
|
||||
void EraseAkick(unsigned index);
|
||||
|
||||
/** Clear the whole akick list
|
||||
*/
|
||||
void ClearAkick();
|
||||
|
||||
/** Get the level entries for the channel.
|
||||
* @return The levels for the channel.
|
||||
*/
|
||||
|
||||
+13
-10
@@ -1,13 +1,16 @@
|
||||
/*
|
||||
*
|
||||
* (C) 2003-2025 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.
|
||||
*/
|
||||
// Anope IRC Services <https://www.anope.org/>
|
||||
//
|
||||
// Copyright (C) 2003-2025 Anope Contributors
|
||||
//
|
||||
// Anope is free software. You can use, modify, and/or distribute it under the
|
||||
// terms of version 2 of the GNU General Public License. See docs/LICENSE.txt
|
||||
// for the complete terms of this license and docs/AUTHORS.txt for a list of
|
||||
// contributors.
|
||||
//
|
||||
// Based on the original code of Epona by Lara
|
||||
// Based on the original code of Services by Andy Church
|
||||
//
|
||||
// SPDX-License-Identifier: GPL-2.0-only
|
||||
|
||||
#pragma once
|
||||
|
||||
|
||||
+22
-12
@@ -1,13 +1,16 @@
|
||||
/*
|
||||
*
|
||||
* (C) 2003-2025 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.
|
||||
*/
|
||||
// Anope IRC Services <https://www.anope.org/>
|
||||
//
|
||||
// Copyright (C) 2003-2025 Anope Contributors
|
||||
//
|
||||
// Anope is free software. You can use, modify, and/or distribute it under the
|
||||
// terms of version 2 of the GNU General Public License. See docs/LICENSE.txt
|
||||
// for the complete terms of this license and docs/AUTHORS.txt for a list of
|
||||
// contributors.
|
||||
//
|
||||
// Based on the original code of Epona by Lara
|
||||
// Based on the original code of Services by Andy Church
|
||||
//
|
||||
// SPDX-License-Identifier: GPL-2.0-only
|
||||
|
||||
#pragma once
|
||||
|
||||
@@ -17,7 +20,6 @@
|
||||
#include "base.h"
|
||||
|
||||
/** Names of serialization types implemented in the core. */
|
||||
#define AUTOKICK_TYPE "AutoKick"
|
||||
#define BOTINFO_TYPE "BotInfo"
|
||||
#define CHANACCESS_TYPE "ChanAccess"
|
||||
#define CHANNELINFO_TYPE "ChannelInfo"
|
||||
@@ -73,6 +75,7 @@ namespace Serialize
|
||||
|
||||
extern void RegisterTypes();
|
||||
extern void CheckTypes();
|
||||
extern void CreateTypes();
|
||||
|
||||
class Type;
|
||||
template<typename T> class Checker;
|
||||
@@ -95,6 +98,7 @@ private:
|
||||
static std::list<Serializable *> *SerializableItems;
|
||||
friend class Serialize::Type;
|
||||
/* The type of item this object is */
|
||||
const Anope::string s_name;
|
||||
Serialize::Type *s_type;
|
||||
/* Iterator into serializable_items */
|
||||
std::list<Serializable *>::iterator s_iter;
|
||||
@@ -145,8 +149,11 @@ class CoreExport Serialize::Type
|
||||
: public Base
|
||||
{
|
||||
private:
|
||||
/** Whether modules have been informed about the creation of this type yet. */
|
||||
bool created = false;
|
||||
|
||||
/** The name of this type in the database (e.g. NickAlias). */
|
||||
Anope::string name;
|
||||
const Anope::string name;
|
||||
|
||||
/** The module which owns this type, or nullptr if it belongs to the core.
|
||||
* Some database backends use this to put third-party module data into their
|
||||
@@ -181,6 +188,9 @@ public:
|
||||
/** Destroys a serializable type. */
|
||||
~Type();
|
||||
|
||||
/** Informs modules about the creation of this type. */
|
||||
void Create();
|
||||
|
||||
/** Checks for and applies any pending object updates for this type. */
|
||||
void Check();
|
||||
|
||||
|
||||
+13
-10
@@ -1,13 +1,16 @@
|
||||
/*
|
||||
*
|
||||
* (C) 2003-2025 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.
|
||||
*/
|
||||
// Anope IRC Services <https://www.anope.org/>
|
||||
//
|
||||
// Copyright (C) 2003-2025 Anope Contributors
|
||||
//
|
||||
// Anope is free software. You can use, modify, and/or distribute it under the
|
||||
// terms of version 2 of the GNU General Public License. See docs/LICENSE.txt
|
||||
// for the complete terms of this license and docs/AUTHORS.txt for a list of
|
||||
// contributors.
|
||||
//
|
||||
// Based on the original code of Epona by Lara
|
||||
// Based on the original code of Services by Andy Church
|
||||
//
|
||||
// SPDX-License-Identifier: GPL-2.0-only
|
||||
|
||||
#pragma once
|
||||
|
||||
|
||||
+13
-10
@@ -1,13 +1,16 @@
|
||||
/*
|
||||
*
|
||||
* (C) 2003-2025 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.
|
||||
*/
|
||||
// Anope IRC Services <https://www.anope.org/>
|
||||
//
|
||||
// Copyright (C) 2003-2025 Anope Contributors
|
||||
//
|
||||
// Anope is free software. You can use, modify, and/or distribute it under the
|
||||
// terms of version 2 of the GNU General Public License. See docs/LICENSE.txt
|
||||
// for the complete terms of this license and docs/AUTHORS.txt for a list of
|
||||
// contributors.
|
||||
//
|
||||
// Based on the original code of Epona by Lara
|
||||
// Based on the original code of Services by Andy Church
|
||||
//
|
||||
// SPDX-License-Identifier: GPL-2.0-only
|
||||
|
||||
#pragma once
|
||||
|
||||
|
||||
+13
-10
@@ -1,13 +1,16 @@
|
||||
/*
|
||||
*
|
||||
* (C) 2003-2025 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.
|
||||
*/
|
||||
// Anope IRC Services <https://www.anope.org/>
|
||||
//
|
||||
// Copyright (C) 2003-2025 Anope Contributors
|
||||
//
|
||||
// Anope is free software. You can use, modify, and/or distribute it under the
|
||||
// terms of version 2 of the GNU General Public License. See docs/LICENSE.txt
|
||||
// for the complete terms of this license and docs/AUTHORS.txt for a list of
|
||||
// contributors.
|
||||
//
|
||||
// Based on the original code of Epona by Lara
|
||||
// Based on the original code of Services by Andy Church
|
||||
//
|
||||
// SPDX-License-Identifier: GPL-2.0-only
|
||||
|
||||
#pragma once
|
||||
|
||||
|
||||
+13
-10
@@ -1,13 +1,16 @@
|
||||
/*
|
||||
*
|
||||
* (C) 2003-2025 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.
|
||||
*/
|
||||
// Anope IRC Services <https://www.anope.org/>
|
||||
//
|
||||
// Copyright (C) 2003-2025 Anope Contributors
|
||||
//
|
||||
// Anope is free software. You can use, modify, and/or distribute it under the
|
||||
// terms of version 2 of the GNU General Public License. See docs/LICENSE.txt
|
||||
// for the complete terms of this license and docs/AUTHORS.txt for a list of
|
||||
// contributors.
|
||||
//
|
||||
// Based on the original code of Epona by Lara
|
||||
// Based on the original code of Services by Andy Church
|
||||
//
|
||||
// SPDX-License-Identifier: GPL-2.0-only
|
||||
|
||||
#pragma once
|
||||
|
||||
|
||||
+13
-10
@@ -1,13 +1,16 @@
|
||||
/*
|
||||
*
|
||||
* (C) 2003-2025 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.
|
||||
*/
|
||||
// Anope IRC Services <https://www.anope.org/>
|
||||
//
|
||||
// Copyright (C) 2003-2025 Anope Contributors
|
||||
//
|
||||
// Anope is free software. You can use, modify, and/or distribute it under the
|
||||
// terms of version 2 of the GNU General Public License. See docs/LICENSE.txt
|
||||
// for the complete terms of this license and docs/AUTHORS.txt for a list of
|
||||
// contributors.
|
||||
//
|
||||
// Based on the original code of Epona by Lara
|
||||
// Based on the original code of Services by Andy Church
|
||||
//
|
||||
// SPDX-License-Identifier: GPL-2.0-only
|
||||
|
||||
#pragma once
|
||||
|
||||
|
||||
+13
-10
@@ -1,13 +1,16 @@
|
||||
/*
|
||||
*
|
||||
* (C) 2003-2025 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.
|
||||
*/
|
||||
// Anope IRC Services <https://www.anope.org/>
|
||||
//
|
||||
// Copyright (C) 2003-2025 Anope Contributors
|
||||
//
|
||||
// Anope is free software. You can use, modify, and/or distribute it under the
|
||||
// terms of version 2 of the GNU General Public License. See docs/LICENSE.txt
|
||||
// for the complete terms of this license and docs/AUTHORS.txt for a list of
|
||||
// contributors.
|
||||
//
|
||||
// Based on the original code of Epona by Lara
|
||||
// Based on the original code of Services by Andy Church
|
||||
//
|
||||
// SPDX-License-Identifier: GPL-2.0-only
|
||||
|
||||
#pragma once
|
||||
|
||||
|
||||
+13
-10
@@ -1,13 +1,16 @@
|
||||
/*
|
||||
*
|
||||
* (C) 2003-2025 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.
|
||||
*/
|
||||
// Anope IRC Services <https://www.anope.org/>
|
||||
//
|
||||
// Copyright (C) 2003-2025 Anope Contributors
|
||||
//
|
||||
// Anope is free software. You can use, modify, and/or distribute it under the
|
||||
// terms of version 2 of the GNU General Public License. See docs/LICENSE.txt
|
||||
// for the complete terms of this license and docs/AUTHORS.txt for a list of
|
||||
// contributors.
|
||||
//
|
||||
// Based on the original code of Epona by Lara
|
||||
// Based on the original code of Services by Andy Church
|
||||
//
|
||||
// SPDX-License-Identifier: GPL-2.0-only
|
||||
|
||||
#pragma once
|
||||
|
||||
|
||||
+13
-10
@@ -1,13 +1,16 @@
|
||||
/*
|
||||
*
|
||||
* (C) 2003-2025 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.
|
||||
*/
|
||||
// Anope IRC Services <https://www.anope.org/>
|
||||
//
|
||||
// Copyright (C) 2003-2025 Anope Contributors
|
||||
//
|
||||
// Anope is free software. You can use, modify, and/or distribute it under the
|
||||
// terms of version 2 of the GNU General Public License. See docs/LICENSE.txt
|
||||
// for the complete terms of this license and docs/AUTHORS.txt for a list of
|
||||
// contributors.
|
||||
//
|
||||
// Based on the original code of Epona by Lara
|
||||
// Based on the original code of Services by Andy Church
|
||||
//
|
||||
// SPDX-License-Identifier: GPL-2.0-only
|
||||
|
||||
#pragma once
|
||||
|
||||
|
||||
+13
-10
@@ -1,13 +1,16 @@
|
||||
/* Timer include stuff.
|
||||
*
|
||||
* (C) 2003-2025 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.
|
||||
*/
|
||||
// Anope IRC Services <https://www.anope.org/>
|
||||
//
|
||||
// Copyright (C) 2003-2025 Anope Contributors
|
||||
//
|
||||
// Anope is free software. You can use, modify, and/or distribute it under the
|
||||
// terms of version 2 of the GNU General Public License. See docs/LICENSE.txt
|
||||
// for the complete terms of this license and docs/AUTHORS.txt for a list of
|
||||
// contributors.
|
||||
//
|
||||
// Based on the original code of Epona by Lara
|
||||
// Based on the original code of Services by Andy Church
|
||||
//
|
||||
// SPDX-License-Identifier: GPL-2.0-only
|
||||
|
||||
#pragma once
|
||||
|
||||
|
||||
+13
-10
@@ -1,13 +1,16 @@
|
||||
/*
|
||||
*
|
||||
* (C) 2003-2025 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.
|
||||
*/
|
||||
// Anope IRC Services <https://www.anope.org/>
|
||||
//
|
||||
// Copyright (C) 2003-2025 Anope Contributors
|
||||
//
|
||||
// Anope is free software. You can use, modify, and/or distribute it under the
|
||||
// terms of version 2 of the GNU General Public License. See docs/LICENSE.txt
|
||||
// for the complete terms of this license and docs/AUTHORS.txt for a list of
|
||||
// contributors.
|
||||
//
|
||||
// Based on the original code of Epona by Lara
|
||||
// Based on the original code of Services by Andy Church
|
||||
//
|
||||
// SPDX-License-Identifier: GPL-2.0-only
|
||||
|
||||
#pragma once
|
||||
|
||||
|
||||
+14
-10
@@ -1,13 +1,17 @@
|
||||
/*
|
||||
*
|
||||
* (C) 2008-2011 Robin Burchell <w00t@inspircd.org>
|
||||
* (C) 2003-2025 Anope Team <team@anope.org>
|
||||
*
|
||||
* Please read COPYING and README for further details.
|
||||
*
|
||||
* Based on the original code of Epona by Lara.
|
||||
* Based on the original code of Services by Andy Church.
|
||||
*/
|
||||
// Anope IRC Services <https://www.anope.org/>
|
||||
//
|
||||
// Copyright (C) 2003-2025 Anope Contributors
|
||||
// Copyright (C) 2008-2011 Robin Burchell <w00t@inspircd.org>
|
||||
//
|
||||
// Anope is free software. You can use, modify, and/or distribute it under the
|
||||
// terms of version 2 of the GNU General Public License. See docs/LICENSE.txt
|
||||
// for the complete terms of this license and docs/AUTHORS.txt for a list of
|
||||
// contributors.
|
||||
//
|
||||
// Based on the original code of Epona by Lara
|
||||
// Based on the original code of Services by Andy Church
|
||||
//
|
||||
// SPDX-License-Identifier: GPL-2.0-only
|
||||
|
||||
#pragma once
|
||||
|
||||
|
||||
+13
-10
@@ -1,13 +1,16 @@
|
||||
/* Build bumper
|
||||
*
|
||||
* (C) 2003-2025 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.
|
||||
*/
|
||||
// Anope IRC Services <https://www.anope.org/>
|
||||
//
|
||||
// Copyright (C) 2003-2025 Anope Contributors
|
||||
//
|
||||
// Anope is free software. You can use, modify, and/or distribute it under the
|
||||
// terms of version 2 of the GNU General Public License. See docs/LICENSE.txt
|
||||
// for the complete terms of this license and docs/AUTHORS.txt for a list of
|
||||
// contributors.
|
||||
//
|
||||
// Based on the original code of Epona by Lara
|
||||
// Based on the original code of Services by Andy Church
|
||||
//
|
||||
// SPDX-License-Identifier: GPL-2.0-only
|
||||
|
||||
#include <cstdlib>
|
||||
#include <iostream>
|
||||
|
||||
+13
-7
@@ -1,10 +1,16 @@
|
||||
/*
|
||||
*
|
||||
* (C) 2008-2025 Anope Team
|
||||
* Contact us at team@anope.org
|
||||
*
|
||||
* Please read COPYING and README for further details.
|
||||
*/
|
||||
// Anope IRC Services <https://www.anope.org/>
|
||||
//
|
||||
// Copyright (C) 2003-2025 Anope Contributors
|
||||
//
|
||||
// Anope is free software. You can use, modify, and/or distribute it under the
|
||||
// terms of version 2 of the GNU General Public License. See docs/LICENSE.txt
|
||||
// for the complete terms of this license and docs/AUTHORS.txt for a list of
|
||||
// contributors.
|
||||
//
|
||||
// Based on the original code of Epona by Lara
|
||||
// Based on the original code of Services by Andy Church
|
||||
//
|
||||
// SPDX-License-Identifier: GPL-2.0-only
|
||||
|
||||
#pragma once
|
||||
|
||||
|
||||
@@ -23,10 +23,6 @@ if(HAVE_LOCALIZATION)
|
||||
COMMAND ${GETTEXT_MSGFMT_EXECUTABLE} -c ${CMAKE_CURRENT_SOURCE_DIR}/${LANG_PO} -o ${CMAKE_CURRENT_BINARY_DIR}/${LANG_MO}
|
||||
MAIN_DEPENDENCY ${LANG_PO}
|
||||
)
|
||||
# Add to cpack ignored files if not on Windows.
|
||||
if(NOT WIN32)
|
||||
add_to_cpack_ignored_files("${LANG_MO}")
|
||||
endif()
|
||||
|
||||
# Install the new language file
|
||||
install(FILES ${CMAKE_CURRENT_BINARY_DIR}/${LANG_MO} DESTINATION ${LOCALE_DIR}/${LANG_LANG}/LC_MESSAGES RENAME ${LANG_DOMAIN}.mo PERMISSIONS ${PERMS})
|
||||
|
||||
+13
-4
@@ -1,8 +1,17 @@
|
||||
# Anope IRC Services language file
|
||||
# Copyright (C) 2011
|
||||
# This file is distributed under the same license as the Anope IRC Services package.
|
||||
# Adam <adam@anope.org>, 2011.
|
||||
# Anope IRC Services <https://www.anope.org/>
|
||||
#
|
||||
# Copyright (C) 2003-2025 Anope Contributors
|
||||
# Copyright (C) 2011 Adam <Adam@anope.org>
|
||||
#
|
||||
# Anope is free software. You can use, modify, and/or distribute it under the
|
||||
# terms of version 2 of the GNU General Public License. See docs/LICENSE.txt
|
||||
# for the complete terms of this license and docs/AUTHORS.txt for a list of
|
||||
# contributors.
|
||||
#
|
||||
# Based on the original code of Epona by Lara
|
||||
# Based on the original code of Services by Andy Church
|
||||
#
|
||||
# SPDX-License-Identifier: GPL-2.0-only
|
||||
msgid ""
|
||||
msgstr ""
|
||||
"Project-Id-Version: Anope\n"
|
||||
|
||||
+13
-4
@@ -1,8 +1,17 @@
|
||||
# Anope IRC Services language file
|
||||
# Copyright (C) 2011
|
||||
# This file is distributed under the same license as the Anope IRC Services package.
|
||||
# VisioN <vision@myirc.us>, 2011.
|
||||
# Anope IRC Services <https://www.anope.org/>
|
||||
#
|
||||
# Copyright (C) 2003-2025 Anope Contributors
|
||||
# Copyright (C) 2011 VisioN <vision@myirc.us>
|
||||
#
|
||||
# Anope is free software. You can use, modify, and/or distribute it under the
|
||||
# terms of version 2 of the GNU General Public License. See docs/LICENSE.txt
|
||||
# for the complete terms of this license and docs/AUTHORS.txt for a list of
|
||||
# contributors.
|
||||
#
|
||||
# Based on the original code of Epona by Lara
|
||||
# Based on the original code of Services by Andy Church
|
||||
#
|
||||
# SPDX-License-Identifier: GPL-2.0-only
|
||||
msgid ""
|
||||
msgstr ""
|
||||
"Project-Id-Version: Anope\n"
|
||||
|
||||
+308
-104
@@ -1,14 +1,23 @@
|
||||
# Anope IRC Services language file
|
||||
# Copyright (C) 2014-2024
|
||||
# This file is distributed under the same license as the Anope IRC Services package.
|
||||
# Adam <adam@anope.org>, 2014.
|
||||
# Anope IRC Services <https://www.anope.org/>
|
||||
#
|
||||
# Copyright (C) 2003-2025 Anope Contributors
|
||||
# Copyright (C) 2014 Adam <Adam@anope.org>
|
||||
#
|
||||
# Anope is free software. You can use, modify, and/or distribute it under the
|
||||
# terms of version 2 of the GNU General Public License. See docs/LICENSE.txt
|
||||
# for the complete terms of this license and docs/AUTHORS.txt for a list of
|
||||
# contributors.
|
||||
#
|
||||
# Based on the original code of Epona by Lara
|
||||
# Based on the original code of Services by Andy Church
|
||||
#
|
||||
# SPDX-License-Identifier: GPL-2.0-only
|
||||
msgid ""
|
||||
msgstr ""
|
||||
"Project-Id-Version: Anope\n"
|
||||
"Report-Msgid-Bugs-To: \n"
|
||||
"POT-Creation-Date: 2025-09-29 12:59+0100\n"
|
||||
"PO-Revision-Date: 2025-09-29 13:00+0100\n"
|
||||
"POT-Creation-Date: 2025-11-25 00:37+0000\n"
|
||||
"PO-Revision-Date: 2025-11-25 00:37+0000\n"
|
||||
"Last-Translator: Sadie Powell <sadie@witchery.services>\n"
|
||||
"Language-Team: English\n"
|
||||
"Language: en_US\n"
|
||||
@@ -64,6 +73,10 @@ msgstr ""
|
||||
msgid "%s added to the AKILL list."
|
||||
msgstr ""
|
||||
|
||||
#, c-format
|
||||
msgid "%s added to the host offer list."
|
||||
msgstr ""
|
||||
|
||||
#, c-format
|
||||
msgid "%s allows you to execute \"fantasy\" commands in the channel. Fantasy commands are commands that can be executed from messaging a channel, and provide a more convenient way to execute commands. Commands that require a channel as a parameter will automatically have that parameter given."
|
||||
msgstr ""
|
||||
@@ -140,6 +153,10 @@ msgstr ""
|
||||
msgid "%s deleted from the AKILL list."
|
||||
msgstr ""
|
||||
|
||||
#, c-format
|
||||
msgid "%s deleted from the host offer list."
|
||||
msgstr ""
|
||||
|
||||
#, c-format
|
||||
msgid "%s disabled on channel %s."
|
||||
msgstr ""
|
||||
@@ -295,6 +312,10 @@ msgstr ""
|
||||
msgid "%s not found on the AKILL list."
|
||||
msgstr ""
|
||||
|
||||
#, c-format
|
||||
msgid "%s not found on the host offer list."
|
||||
msgstr ""
|
||||
|
||||
#, c-format
|
||||
msgid "%s removed from the %s access list."
|
||||
msgstr ""
|
||||
@@ -585,9 +606,6 @@ msgstr ""
|
||||
msgid "email"
|
||||
msgstr ""
|
||||
|
||||
msgid "language"
|
||||
msgstr ""
|
||||
|
||||
msgid "memo-text"
|
||||
msgstr ""
|
||||
|
||||
@@ -633,9 +651,6 @@ msgstr ""
|
||||
msgid "nickname email"
|
||||
msgstr ""
|
||||
|
||||
msgid "nickname language"
|
||||
msgstr ""
|
||||
|
||||
msgid "nickname message"
|
||||
msgstr ""
|
||||
|
||||
@@ -648,12 +663,18 @@ msgstr ""
|
||||
msgid "nickname [code]"
|
||||
msgstr ""
|
||||
|
||||
msgid "nickname [language]"
|
||||
msgstr ""
|
||||
|
||||
msgid "nickname [parameter]"
|
||||
msgstr ""
|
||||
|
||||
msgid "nickname [password]"
|
||||
msgstr ""
|
||||
|
||||
msgid "nickname [timezone]"
|
||||
msgstr ""
|
||||
|
||||
msgid "nickname [+expiry] [reason]"
|
||||
msgstr ""
|
||||
|
||||
@@ -696,10 +717,10 @@ msgstr ""
|
||||
msgid "password email"
|
||||
msgstr ""
|
||||
|
||||
msgid "pattern [SUSPENDED] [NOEXPIRE]"
|
||||
msgid "pattern [DISPLAY] [NOEXPIRE] [SUSPENDED] [UNCONFIRMED]"
|
||||
msgstr ""
|
||||
|
||||
msgid "pattern [SUSPENDED] [NOEXPIRE] [UNCONFIRMED]"
|
||||
msgid "pattern [SUSPENDED] [NOEXPIRE]"
|
||||
msgstr ""
|
||||
|
||||
msgid "server [message]"
|
||||
@@ -751,21 +772,10 @@ msgstr ""
|
||||
msgid "%2d %-16s letters: %s, words: %s, lines: %s, smileys: %s, actions: %s"
|
||||
msgstr ""
|
||||
|
||||
msgid "%b %d %Y %H:%M:%S %Z"
|
||||
msgstr ""
|
||||
|
||||
#, c-format
|
||||
msgid "%c is an unknown status mode."
|
||||
msgstr ""
|
||||
|
||||
#, c-format
|
||||
msgid "%c%c is not locked on %s."
|
||||
msgstr ""
|
||||
|
||||
#, c-format
|
||||
msgid "%c%c%s has been unlocked from %s."
|
||||
msgstr ""
|
||||
|
||||
#, c-format
|
||||
msgid "%d access entries from %s have been cloned to %s."
|
||||
msgstr ""
|
||||
@@ -888,6 +898,10 @@ msgstr ""
|
||||
msgid "%s (%s) was last seen quitting (%s) %s ago (%s)."
|
||||
msgstr ""
|
||||
|
||||
#, c-format
|
||||
msgid "%s (ID: %zu)"
|
||||
msgstr ""
|
||||
|
||||
#, c-format
|
||||
msgid "%s (minimum %d/%d%%)"
|
||||
msgstr ""
|
||||
@@ -896,6 +910,10 @@ msgstr ""
|
||||
msgid "%s (now)"
|
||||
msgstr ""
|
||||
|
||||
#, c-format
|
||||
msgid "%s [Invalid]"
|
||||
msgstr ""
|
||||
|
||||
#, c-format
|
||||
msgid "%s access list is empty."
|
||||
msgstr ""
|
||||
@@ -920,6 +938,10 @@ msgstr ""
|
||||
msgid "%s can no longer be added to channel access lists."
|
||||
msgstr ""
|
||||
|
||||
#, c-format
|
||||
msgid "%s can not be locked on %s."
|
||||
msgstr ""
|
||||
|
||||
#, c-format
|
||||
msgid "%s can now be added to channel access lists."
|
||||
msgstr ""
|
||||
@@ -964,6 +986,10 @@ msgstr ""
|
||||
msgid "%s currently has no memos."
|
||||
msgstr ""
|
||||
|
||||
#, c-format
|
||||
msgid "%s currently has too many memos and cannot receive more."
|
||||
msgstr ""
|
||||
|
||||
#, c-format
|
||||
msgid "%s deleted from the %s forbid list."
|
||||
msgstr ""
|
||||
@@ -980,6 +1006,14 @@ msgstr ""
|
||||
msgid "%s had an invalid key specified, and was thus ignored."
|
||||
msgstr ""
|
||||
|
||||
#, c-format
|
||||
msgid "%s has been locked on %s."
|
||||
msgstr ""
|
||||
|
||||
#, c-format
|
||||
msgid "%s has been unlocked from %s."
|
||||
msgstr ""
|
||||
|
||||
#, c-format
|
||||
msgid "%s has no memo limit."
|
||||
msgstr ""
|
||||
@@ -1008,6 +1042,10 @@ msgstr ""
|
||||
msgid "%s is already on %s's auto join list."
|
||||
msgstr ""
|
||||
|
||||
#, c-format
|
||||
msgid "%s is an invalid host offer entry number."
|
||||
msgstr ""
|
||||
|
||||
#, c-format
|
||||
msgid "%s is an unconfirmed nickname."
|
||||
msgstr ""
|
||||
@@ -1049,6 +1087,10 @@ msgstr ""
|
||||
msgid "%s is not a valid logging method."
|
||||
msgstr ""
|
||||
|
||||
#, c-format
|
||||
msgid "%s is not locked on %s."
|
||||
msgstr ""
|
||||
|
||||
#, c-format
|
||||
msgid "%s is not notified of new memos."
|
||||
msgstr ""
|
||||
@@ -1073,10 +1115,6 @@ msgstr ""
|
||||
msgid "%s list is empty."
|
||||
msgstr ""
|
||||
|
||||
#, c-format
|
||||
msgid "%s locked on %s."
|
||||
msgstr ""
|
||||
|
||||
#, c-format
|
||||
msgid "%s not found."
|
||||
msgstr ""
|
||||
@@ -1198,9 +1236,6 @@ msgstr ""
|
||||
msgid ". %s is still online."
|
||||
msgstr ""
|
||||
|
||||
msgid "<unknown>"
|
||||
msgstr ""
|
||||
|
||||
msgid "@nickname"
|
||||
msgstr ""
|
||||
|
||||
@@ -1257,7 +1292,10 @@ msgstr ""
|
||||
msgid "ADD [+expiry] mask:reason"
|
||||
msgstr ""
|
||||
|
||||
msgid "ADD {NICK|CHAN|EMAIL|REGISTER} [+expiry] entry reason"
|
||||
msgid "ADD [+expiry] vhost [reason]"
|
||||
msgstr ""
|
||||
|
||||
msgid "ADD {CHAN|EMAIL|NICK|PASSWORD|REGISTER} [+expiry] entry reason"
|
||||
msgstr ""
|
||||
|
||||
msgid "ADDIP server.name ip"
|
||||
@@ -1325,9 +1363,6 @@ msgstr ""
|
||||
msgid "Account registered"
|
||||
msgstr ""
|
||||
|
||||
msgid "Accounts can not be registered right now. Please try again later."
|
||||
msgstr ""
|
||||
|
||||
#, c-format
|
||||
msgid "Accounts that are not used anymore are subject to the automatic expiration, i.e. they will be deleted after %s if not used."
|
||||
msgstr ""
|
||||
@@ -1435,7 +1470,14 @@ msgstr ""
|
||||
msgid "All modes cleared on %s."
|
||||
msgstr ""
|
||||
|
||||
msgid "All new accounts must be validated by an administrator. Please wait for your registration to be confirmed."
|
||||
msgid "All new accounts must be confirmed by an administrator. Please wait for your registration to be confirmed."
|
||||
msgstr ""
|
||||
|
||||
msgid "All new accounts must be confirmed. To confirm your account, follow the instructions that were emailed to you."
|
||||
msgstr ""
|
||||
|
||||
#, c-format
|
||||
msgid "All new accounts must be confirmed. To confirm your account, type %s."
|
||||
msgstr ""
|
||||
|
||||
msgid "All of your memos have been deleted."
|
||||
@@ -1783,6 +1825,10 @@ msgstr ""
|
||||
msgid "Available privileges for %s:"
|
||||
msgstr ""
|
||||
|
||||
#, c-format
|
||||
msgid "Available timezones in the %s region:"
|
||||
msgstr ""
|
||||
|
||||
msgid "BANS enforced by "
|
||||
msgstr ""
|
||||
|
||||
@@ -2041,10 +2087,12 @@ msgstr ""
|
||||
msgid "Changes the founder of a channel. The new nickname must be a registered one."
|
||||
msgstr ""
|
||||
|
||||
msgid "Changes the language services uses when sending messages to the given user (for example, when responding to a command they send). language should be chosen from the following list of supported languages:"
|
||||
#, c-format
|
||||
msgid "Changes the language services uses when sending messages to the given user (for example, when responding to a command they send). If language is not specified the default (%s) will be used. Otherwise, language should be chosen from the following list of supported languages:"
|
||||
msgstr ""
|
||||
|
||||
msgid "Changes the language services uses when sending messages to you (for example, when responding to a command you send). language should be chosen from the following list of supported languages:"
|
||||
#, c-format
|
||||
msgid "Changes the language services uses when sending messages to you (for example, when responding to a command you send). If language is not specified the default (%s) will be used. Otherwise, language should be chosen from the following list of supported languages:"
|
||||
msgstr ""
|
||||
|
||||
msgid "Changes the password used to identify as the nick's owner."
|
||||
@@ -2056,6 +2104,12 @@ msgstr ""
|
||||
msgid "Changes the successor of a channel. If the founder's nickname expires or is dropped while the channel is still registered, the successor will become the new founder of the channel. The successor's nickname must be a registered one. If there's no successor set, then the first nickname on the access list (with the highest access, if applicable) will become the new founder, but if the access list is empty, the channel will be dropped."
|
||||
msgstr ""
|
||||
|
||||
msgid "Changes the timezone services uses when sending messages to the given user (for example, when responding to a command they send). If timezone is not specified the default (UTC) will be used. Otherwise, timezone should be chosen from an entry in one of the supported timezone regions:"
|
||||
msgstr ""
|
||||
|
||||
msgid "Changes the timezone services uses when sending messages to you (for example, when responding to a command you send). If timezone is not specified the default (UTC) will be used. Otherwise, timezone should be chosen from an entry in one of the supported timezone regions:"
|
||||
msgstr ""
|
||||
|
||||
msgid "Changes when you will be notified about new memos (only for nicknames)"
|
||||
msgstr ""
|
||||
|
||||
@@ -2352,6 +2406,9 @@ msgstr ""
|
||||
msgid "Current Session Limit Exception list:"
|
||||
msgstr ""
|
||||
|
||||
msgid "Current host offer list:"
|
||||
msgstr ""
|
||||
|
||||
msgid "Current module list:"
|
||||
msgstr ""
|
||||
|
||||
@@ -2398,7 +2455,10 @@ msgstr ""
|
||||
msgid "DEL {num | ALL}"
|
||||
msgstr ""
|
||||
|
||||
msgid "DEL {NICK|CHAN|EMAIL|REGISTER} entry"
|
||||
msgid "DEL {vhost | entry-num | list}"
|
||||
msgstr ""
|
||||
|
||||
msgid "DEL {CHAN|EMAIL|NICK|PASSWORD|REGISTER} entry"
|
||||
msgstr ""
|
||||
|
||||
msgid "DELIP server.name ip"
|
||||
@@ -2583,12 +2643,22 @@ msgstr ""
|
||||
msgid "Deleted %s from the AKILL list."
|
||||
msgstr ""
|
||||
|
||||
#, c-format
|
||||
msgid "Deleted %s from the host offer list."
|
||||
msgstr ""
|
||||
|
||||
#, c-format
|
||||
msgid "Deleted %u entry from your message queue."
|
||||
msgid_plural "Deleted %u entries from your message queue."
|
||||
msgstr[0] ""
|
||||
msgstr[1] ""
|
||||
|
||||
#, c-format
|
||||
msgid "Deleted %zu entry from the host offer list."
|
||||
msgid_plural "Deleted %zu entries from the host offer list."
|
||||
msgstr[0] ""
|
||||
msgstr[1] ""
|
||||
|
||||
#, c-format
|
||||
msgid "Deleted info from %s."
|
||||
msgstr ""
|
||||
@@ -2860,6 +2930,9 @@ msgstr ""
|
||||
msgid "End of forbid list."
|
||||
msgstr ""
|
||||
|
||||
msgid "End of host offer list."
|
||||
msgstr ""
|
||||
|
||||
#, c-format
|
||||
msgid "End of list - %d channels shown."
|
||||
msgstr ""
|
||||
@@ -2993,6 +3066,10 @@ msgstr ""
|
||||
msgid "Forbid list:"
|
||||
msgstr ""
|
||||
|
||||
#, c-format
|
||||
msgid "Forbid on %s can not be removed as it is from a file."
|
||||
msgstr ""
|
||||
|
||||
#, c-format
|
||||
msgid "Forbid on %s was not found."
|
||||
msgstr ""
|
||||
@@ -3073,10 +3150,24 @@ msgstr ""
|
||||
msgid "Host"
|
||||
msgstr ""
|
||||
|
||||
#, c-format
|
||||
msgid "Host offer %s already exists."
|
||||
msgstr ""
|
||||
|
||||
msgid "Host offer list has been cleared."
|
||||
msgstr ""
|
||||
|
||||
msgid "Host offer list is empty."
|
||||
msgstr ""
|
||||
|
||||
#, c-format
|
||||
msgid "Hosts with at least %d sessions:"
|
||||
msgstr ""
|
||||
|
||||
#, c-format
|
||||
msgid "I have not seen %s."
|
||||
msgstr ""
|
||||
|
||||
msgid "ID"
|
||||
msgstr ""
|
||||
|
||||
@@ -3210,6 +3301,9 @@ msgstr ""
|
||||
msgid "LIST [nickname]"
|
||||
msgstr ""
|
||||
|
||||
msgid "LIST [vhost-mask | entry-num | list]"
|
||||
msgstr ""
|
||||
|
||||
#, c-format
|
||||
msgid "Language changed to %s."
|
||||
msgstr ""
|
||||
@@ -3277,7 +3371,7 @@ msgid "List channels you have access on"
|
||||
msgstr ""
|
||||
|
||||
#, c-format
|
||||
msgid "List for mode %c is full."
|
||||
msgid "List for modes %s is full."
|
||||
msgstr ""
|
||||
|
||||
msgid "List loaded modules"
|
||||
@@ -3294,6 +3388,24 @@ msgstr ""
|
||||
msgid "List of nicknames belonging to your account:"
|
||||
msgstr ""
|
||||
|
||||
msgid "List or take a vhost from the host offer list"
|
||||
msgstr ""
|
||||
|
||||
#, c-format
|
||||
msgid ""
|
||||
"List or take an offered vhost.\n"
|
||||
"\n"
|
||||
"With no parameters, a user@host or host mask, an entry number, or a list (e.g. 1-3,5) offered vhosts will be shown. If ALL is specified vhosts that can not be taken will be labelled with [Invalid] instead of being omitted.\n"
|
||||
"The offered vhosts may contain template variables. The supported template variables are:\n"
|
||||
" {account} - Your current account.\n"
|
||||
" {network} - The name of this IRC network.\n"
|
||||
" {nick} - Your current nickname.\n"
|
||||
" {regdate} - The YYYY-MM-DD date at which your nick was registered.\n"
|
||||
" {regepoch} - The UNIX time at which your nick was registered.\n"
|
||||
"\n"
|
||||
"With %sTAKE an offered vhost will be applied. You must specify the offered template variable or the entry number for the offered vhost you want to use. Once a vhost is taken you can not take another one for %s."
|
||||
msgstr ""
|
||||
|
||||
msgid "List the options"
|
||||
msgstr ""
|
||||
|
||||
@@ -3357,7 +3469,7 @@ msgid ""
|
||||
"\n"
|
||||
"Note that a preceding '#' specifies a range.\n"
|
||||
"\n"
|
||||
"If the SUSPENDED, UNCONFIRMED or NOEXPIRE options are given, only nicks which, respectively, are SUSPENDED, UNCONFIRMED or have the NOEXPIRE flag set will be displayed. If multiple options are given, all nicks matching at least one option will be displayed. Note that these options are limited to Services Operators.\n"
|
||||
"If the DISPLAY, NOEXPIRE, SUSPENDED, or UNCONFIRMED options are given only nicks which, respectively, are display nicks, will not expire, are suspended, or are unconfirmed will be shown. If multiple options are given, nicks must match every option to be shown. Note that these options are limited to Services Operators.\n"
|
||||
"\n"
|
||||
"Examples:\n"
|
||||
"\n"
|
||||
@@ -3458,7 +3570,7 @@ msgid ""
|
||||
"The %sLOCK command allows you to add, delete, and view mode locks on a channel. If a mode is locked on or off, services will not allow that mode to be changed. The SET command will clear all existing mode locks and set the new one given, while ADD and DEL modify the existing mode lock.\n"
|
||||
"\n"
|
||||
"Example:\n"
|
||||
" %s#channel%sADD+bmnt*!*@*aol*\n"
|
||||
" %s#channelLOCKADD+bmnt*!*@*.example.com\n"
|
||||
"\n"
|
||||
"\n"
|
||||
"The %sSET command allows you to set modes through services. Wildcards * and ? may be given as parameters for list and status modes.\n"
|
||||
@@ -3569,6 +3681,9 @@ msgstr ""
|
||||
msgid "Manipulate the DefCon system"
|
||||
msgstr ""
|
||||
|
||||
msgid "Manipulate the host offer list"
|
||||
msgstr ""
|
||||
|
||||
msgid "Manipulate the topic of the specified channel"
|
||||
msgstr ""
|
||||
|
||||
@@ -3640,7 +3755,7 @@ msgid "Method"
|
||||
msgstr ""
|
||||
|
||||
#, c-format
|
||||
msgid "Missing parameter for mode %c."
|
||||
msgid "Missing parameter for modes %s."
|
||||
msgstr ""
|
||||
|
||||
#, c-format
|
||||
@@ -3747,6 +3862,10 @@ msgstr ""
|
||||
msgid "Multiple languages matched %s. Please be more specific."
|
||||
msgstr ""
|
||||
|
||||
#, c-format
|
||||
msgid "Multiple timezones matched %s. Please be more specific."
|
||||
msgstr ""
|
||||
|
||||
msgid "NOTICE: In order to register a channel, you must have first registered your nickname."
|
||||
msgstr ""
|
||||
|
||||
@@ -3934,6 +4053,9 @@ msgstr ""
|
||||
msgid "No matching entries on the AKILL list."
|
||||
msgstr ""
|
||||
|
||||
msgid "No matching entries on the host offer list."
|
||||
msgstr ""
|
||||
|
||||
msgid "No memo was cancelable."
|
||||
msgstr ""
|
||||
|
||||
@@ -4001,9 +4123,34 @@ msgstr ""
|
||||
msgid "Nothing to do."
|
||||
msgstr ""
|
||||
|
||||
msgid "Now"
|
||||
msgstr ""
|
||||
|
||||
msgid "Number"
|
||||
msgstr ""
|
||||
|
||||
#, c-format
|
||||
msgid ""
|
||||
"Offer stock vhosts to unprivileged users.\n"
|
||||
"The %sADD command adds an offered vhost. If expiry is provided then the offered vhost will only be available for a limited time. The vhost field may contain template variables. The supported template variables are:\n"
|
||||
" {account} - Your current account.\n"
|
||||
" {network} - The name of this IRC network.\n"
|
||||
" {nick} - Your current nickname.\n"
|
||||
" {regdate} - The YYYY-MM-DD date at which your nick was registered.\n"
|
||||
" {regepoch} - The UNIX time at which your nick was registered.\n"
|
||||
"\n"
|
||||
"The %sCLEAR command removes all offered vhosts.\n"
|
||||
"\n"
|
||||
"The %sDEL command removes an offered vhost.\n"
|
||||
"\n"
|
||||
"The %sLIST command displays the offered vhosts, or optionally only those offered vhosts which match the given mask.\n"
|
||||
"\n"
|
||||
"The %sVIEW command is a more verbose version of the %sLIST command."
|
||||
msgstr ""
|
||||
|
||||
msgid "Offered vhost"
|
||||
msgstr ""
|
||||
|
||||
msgid "Online from"
|
||||
msgstr ""
|
||||
|
||||
@@ -4078,9 +4225,6 @@ msgstr ""
|
||||
msgid "Password reset email for %s has been sent."
|
||||
msgstr ""
|
||||
|
||||
msgid "Passwords can not be changed right now. Please try again later."
|
||||
msgstr ""
|
||||
|
||||
#, c-format
|
||||
msgid "Passwords encrypted with %s: %zu"
|
||||
msgstr ""
|
||||
@@ -4106,7 +4250,7 @@ msgstr ""
|
||||
msgid "Please contact an Operator to get a vhost assigned to this nick."
|
||||
msgstr ""
|
||||
|
||||
msgid "Please try again with a more obscure password. Passwords should not be something that could be easily guessed (e.g. your real name or your nick) and cannot contain the space or tab characters."
|
||||
msgid "Please try again with a more obscure password. Passwords should not be something that could be easily guessed (e.g. your real name or your nick) and cannot contain a space character."
|
||||
msgstr ""
|
||||
|
||||
msgid "Please use a valid server name when juping."
|
||||
@@ -4123,6 +4267,10 @@ msgstr ""
|
||||
msgid "Please wait %s before requesting a new vhost."
|
||||
msgstr ""
|
||||
|
||||
#, c-format
|
||||
msgid "Please wait %s before taking a new vhost."
|
||||
msgstr ""
|
||||
|
||||
#, c-format
|
||||
msgid "Please wait %s before using the %s command again."
|
||||
msgstr ""
|
||||
@@ -4752,6 +4900,9 @@ msgstr ""
|
||||
msgid "Set the successor for a channel"
|
||||
msgstr ""
|
||||
|
||||
msgid "Set the timezone services will use when messaging you"
|
||||
msgstr ""
|
||||
|
||||
msgid "Set the vhost for all nicks in an account"
|
||||
msgstr ""
|
||||
|
||||
@@ -4936,50 +5087,6 @@ msgstr ""
|
||||
msgid "Signed kicks"
|
||||
msgstr ""
|
||||
|
||||
#, c-format
|
||||
msgid "Sorry, %s currently has too many memos and cannot receive more."
|
||||
msgstr ""
|
||||
|
||||
#, c-format
|
||||
msgid "Sorry, %s is temporarily unavailable."
|
||||
msgstr ""
|
||||
|
||||
#, c-format
|
||||
msgid "Sorry, I have not seen %s."
|
||||
msgstr ""
|
||||
|
||||
#, c-format
|
||||
msgid "Sorry, the maximum of %d auto join entries has been reached."
|
||||
msgstr ""
|
||||
|
||||
#, c-format
|
||||
msgid "Sorry, the maximum of %d certificate entries has been reached."
|
||||
msgstr ""
|
||||
|
||||
#, c-format
|
||||
msgid "Sorry, the memo ignore list for %s is full."
|
||||
msgstr ""
|
||||
|
||||
#, c-format
|
||||
msgid "Sorry, you can only have %d access entries on a channel, including access entries from other channels."
|
||||
msgstr ""
|
||||
|
||||
#, c-format
|
||||
msgid "Sorry, you can only have %d autokick masks on a channel."
|
||||
msgstr ""
|
||||
|
||||
#, c-format
|
||||
msgid "Sorry, you can only have %d bad words entries on a channel."
|
||||
msgstr ""
|
||||
|
||||
#, c-format
|
||||
msgid "Sorry, you have already exceeded your limit of %d channels."
|
||||
msgstr ""
|
||||
|
||||
#, c-format
|
||||
msgid "Sorry, you have already reached your limit of %d channels."
|
||||
msgstr ""
|
||||
|
||||
msgid "State"
|
||||
msgstr ""
|
||||
|
||||
@@ -5114,6 +5221,9 @@ msgid ""
|
||||
"This option is not persistent, and should only be used when needed, and set back to OFF when no longer needed."
|
||||
msgstr ""
|
||||
|
||||
msgid "TAKE {vhost | entry-num}"
|
||||
msgstr ""
|
||||
|
||||
#, c-format
|
||||
msgid "Tells %s that you are really the owner of this nick. Many commands require you to authenticate yourself with this command before you use them. The password should be the same one you sent with the REGISTER command."
|
||||
msgstr ""
|
||||
@@ -5158,6 +5268,10 @@ msgid ""
|
||||
"For a list of the features and functions whose levels can be set, see HELP%sDESC."
|
||||
msgstr ""
|
||||
|
||||
#, c-format
|
||||
msgid "The %s command is temporarily unavailable. Please try again later."
|
||||
msgstr ""
|
||||
|
||||
#, c-format
|
||||
msgid ""
|
||||
"The %sADD command adds the given nickname to the %s list.\n"
|
||||
@@ -5350,12 +5464,28 @@ msgstr ""
|
||||
msgid "The mask must contain at least one non wildcard character."
|
||||
msgstr ""
|
||||
|
||||
#, c-format
|
||||
msgid "The maximum of %u auto join entry has been reached."
|
||||
msgid_plural "The maximum of %u auto join entries has been reached."
|
||||
msgstr[0] ""
|
||||
msgstr[1] ""
|
||||
|
||||
#, c-format
|
||||
msgid "The maximum of %u certificate entry has been reached."
|
||||
msgid_plural "The maximum of %u certificate entries has been reached."
|
||||
msgstr[0] ""
|
||||
msgstr[1] ""
|
||||
|
||||
#, c-format
|
||||
msgid "The memo ignore list for %s is full."
|
||||
msgstr ""
|
||||
|
||||
#, c-format
|
||||
msgid "The memo limit for %s may not be changed."
|
||||
msgstr ""
|
||||
|
||||
#, c-format
|
||||
msgid "The mode lock list of %s is full."
|
||||
msgid "The mode lock list of %s is full, unable to lock %s."
|
||||
msgstr ""
|
||||
|
||||
#, c-format
|
||||
@@ -5393,6 +5523,13 @@ msgstr ""
|
||||
msgid "The password reset request for %s has expired."
|
||||
msgstr ""
|
||||
|
||||
#, c-format
|
||||
msgid "The password you specified is forbidden by %s: %s"
|
||||
msgstr ""
|
||||
|
||||
msgid "The password you specified is forbidden."
|
||||
msgstr ""
|
||||
|
||||
#, c-format
|
||||
msgid "The registration confirmation code you specified for %s is incorrect."
|
||||
msgstr ""
|
||||
@@ -5592,6 +5729,14 @@ msgstr ""
|
||||
msgid "This option prevents a bot from being assigned to a channel by users that aren't Services Operators."
|
||||
msgstr ""
|
||||
|
||||
#, c-format
|
||||
msgid "Timezone changed to %s."
|
||||
msgstr ""
|
||||
|
||||
#, c-format
|
||||
msgid "Timezone for %s changed to %s."
|
||||
msgstr ""
|
||||
|
||||
#, c-format
|
||||
msgid "To delete, type: %s %d"
|
||||
msgstr ""
|
||||
@@ -5706,6 +5851,10 @@ msgstr ""
|
||||
msgid "Type %soption for more information on a specific option. The options will be set on the given nickname."
|
||||
msgstr ""
|
||||
|
||||
#, c-format
|
||||
msgid "Type %sregion to list timezones for a region."
|
||||
msgstr ""
|
||||
|
||||
msgid "Un-Load a module"
|
||||
msgstr ""
|
||||
|
||||
@@ -5734,6 +5883,9 @@ msgstr ""
|
||||
msgid "Underlines kicker"
|
||||
msgstr ""
|
||||
|
||||
msgid "Unknown"
|
||||
msgstr ""
|
||||
|
||||
msgid "Unknown SET option."
|
||||
msgstr ""
|
||||
|
||||
@@ -5758,7 +5910,7 @@ msgid "Unknown command %s. Type %s for help."
|
||||
msgstr ""
|
||||
|
||||
#, c-format
|
||||
msgid "Unknown mode character %c ignored."
|
||||
msgid "Unknown modes %s ignored."
|
||||
msgstr ""
|
||||
|
||||
#, c-format
|
||||
@@ -5896,6 +6048,9 @@ msgstr ""
|
||||
msgid "VIEW [mask | list]"
|
||||
msgstr ""
|
||||
|
||||
msgid "VIEW [vhost-mask | entry-num | list]"
|
||||
msgstr ""
|
||||
|
||||
msgid "Validates a previously requested vhost using DNS"
|
||||
msgstr ""
|
||||
|
||||
@@ -6034,6 +6189,18 @@ msgstr ""
|
||||
msgid "You can not send a single message while you have messages queued."
|
||||
msgstr ""
|
||||
|
||||
#, c-format
|
||||
msgid "You can only have %d access entries on a channel, including access entries from other channels."
|
||||
msgstr ""
|
||||
|
||||
#, c-format
|
||||
msgid "You can only have %d autokick masks on a channel."
|
||||
msgstr ""
|
||||
|
||||
#, c-format
|
||||
msgid "You can only have %d bad words entries on a channel."
|
||||
msgstr ""
|
||||
|
||||
#, c-format
|
||||
msgid "You can't %s yourself!"
|
||||
msgstr ""
|
||||
@@ -6115,6 +6282,14 @@ msgstr[1] ""
|
||||
msgid "You have a new memo from %s. Type %s%zu to read it."
|
||||
msgstr ""
|
||||
|
||||
#, c-format
|
||||
msgid "You have already exceeded your limit of %d channels."
|
||||
msgstr ""
|
||||
|
||||
#, c-format
|
||||
msgid "You have already reached your limit of %d channels."
|
||||
msgstr ""
|
||||
|
||||
#, c-format
|
||||
msgid "You have been invited to %s by %s."
|
||||
msgstr ""
|
||||
@@ -6162,7 +6337,7 @@ msgid "You may drop any nick within your account."
|
||||
msgstr ""
|
||||
|
||||
#, c-format
|
||||
msgid "You may not (un)lock mode %c."
|
||||
msgid "You may not (un)lock modes %s from %s."
|
||||
msgstr ""
|
||||
|
||||
msgid "You may not change the email address of an unconfirmed account."
|
||||
@@ -6207,12 +6382,18 @@ msgstr ""
|
||||
msgid "You must confirm your account before you can register a channel."
|
||||
msgstr ""
|
||||
|
||||
msgid "You must confirm your account before you can view the host offer list."
|
||||
msgstr ""
|
||||
|
||||
msgid "You must confirm your account before you may request a vhost."
|
||||
msgstr ""
|
||||
|
||||
msgid "You must confirm your account before you may send a memo."
|
||||
msgstr ""
|
||||
|
||||
msgid "You must confirm your account before you may take a vhost."
|
||||
msgstr ""
|
||||
|
||||
#, c-format
|
||||
msgid "You must have the %s(ME) privilege on the channel to use this command."
|
||||
msgstr ""
|
||||
@@ -6300,13 +6481,6 @@ msgstr ""
|
||||
msgid "Your account %s has been successfully created."
|
||||
msgstr ""
|
||||
|
||||
msgid "Your account is not confirmed. To confirm it, follow the instructions that were emailed to you."
|
||||
msgstr ""
|
||||
|
||||
#, c-format
|
||||
msgid "Your account is not confirmed. To confirm it, type %s."
|
||||
msgstr ""
|
||||
|
||||
#, c-format
|
||||
msgid "Your account will expire, if not confirmed, in %s."
|
||||
msgstr ""
|
||||
@@ -6374,11 +6548,11 @@ msgid "Your oper block doesn't require logging in."
|
||||
msgstr ""
|
||||
|
||||
#, c-format
|
||||
msgid "Your password is too long. It must be shorter than %u characters."
|
||||
msgid "Your password is too long. It must be shorter than %zu characters."
|
||||
msgstr ""
|
||||
|
||||
#, c-format
|
||||
msgid "Your password is too short. It must be longer than %u characters."
|
||||
msgid "Your password is too short. It must be longer than %zu characters."
|
||||
msgstr ""
|
||||
|
||||
msgid "Your requested vhost has been approved."
|
||||
@@ -6394,6 +6568,9 @@ msgstr ""
|
||||
msgid "Your requested vhost has been validated via DNS."
|
||||
msgstr ""
|
||||
|
||||
msgid "Your vhost"
|
||||
msgstr ""
|
||||
|
||||
#, c-format
|
||||
msgid "Your vhost %s has been requested."
|
||||
msgstr ""
|
||||
@@ -6487,6 +6664,9 @@ msgstr ""
|
||||
msgid "[key|#X-Y]"
|
||||
msgstr ""
|
||||
|
||||
msgid "[language]"
|
||||
msgstr ""
|
||||
|
||||
msgid "[message]"
|
||||
msgstr ""
|
||||
|
||||
@@ -6508,6 +6688,12 @@ msgstr ""
|
||||
msgid "[parameter]"
|
||||
msgstr ""
|
||||
|
||||
msgid "[timezone]"
|
||||
msgstr ""
|
||||
|
||||
msgid "[vhost-mask | entry-num | list] [ALL]"
|
||||
msgstr ""
|
||||
|
||||
msgid "[+daysd] [+limitl] pattern"
|
||||
msgstr ""
|
||||
|
||||
@@ -6627,6 +6813,24 @@ msgstr ""
|
||||
msgid "{number}: {nick} = {vhost} -- created by {creator} at {created}"
|
||||
msgstr ""
|
||||
|
||||
msgid "{number}: {offered_vhost} / {your_vhost} -- {expires}"
|
||||
msgstr ""
|
||||
|
||||
msgid "{number}: {offered_vhost} / {your_vhost} -- {expires} ({reason})"
|
||||
msgstr ""
|
||||
|
||||
msgid "{number}: {vhost}"
|
||||
msgstr ""
|
||||
|
||||
msgid "{number}: {vhost} ({reason})"
|
||||
msgstr ""
|
||||
|
||||
msgid "{number}: {vhost} -- created by {creator} on {created}; {expires}"
|
||||
msgstr ""
|
||||
|
||||
msgid "{number}: {vhost} -- created by {creator} on {created}; {expires} ({reason})"
|
||||
msgstr ""
|
||||
|
||||
msgid "{number}: {word} -- type: {type}"
|
||||
msgstr ""
|
||||
|
||||
|
||||
+13
-4
@@ -1,8 +1,17 @@
|
||||
# Anope IRC Services language file
|
||||
# Copyright (C) 2011
|
||||
# This file is distributed under the same license as the Anope IRC Services package.
|
||||
# Adam <adam@anope.org>, 2011.
|
||||
# Anope IRC Services <https://www.anope.org/>
|
||||
#
|
||||
# Copyright (C) 2003-2025 Anope Contributors
|
||||
# Copyright (C) 2011 Adam <Adam@anope.org>
|
||||
#
|
||||
# Anope is free software. You can use, modify, and/or distribute it under the
|
||||
# terms of version 2 of the GNU General Public License. See docs/LICENSE.txt
|
||||
# for the complete terms of this license and docs/AUTHORS.txt for a list of
|
||||
# contributors.
|
||||
#
|
||||
# Based on the original code of Epona by Lara
|
||||
# Based on the original code of Services by Andy Church
|
||||
#
|
||||
# SPDX-License-Identifier: GPL-2.0-only
|
||||
msgid ""
|
||||
msgstr ""
|
||||
"Project-Id-Version: Anope\n"
|
||||
|
||||
+13
-4
@@ -1,8 +1,17 @@
|
||||
# Anope IRC Services language file
|
||||
# Copyright (C) 2011
|
||||
# This file is distributed under the same license as the Anope IRC Services package.
|
||||
# Adam <adam@anope.org>, 2011.
|
||||
# Anope IRC Services <https://www.anope.org/>
|
||||
#
|
||||
# Copyright (C) 2003-2025 Anope Contributors
|
||||
# Copyright (C) 2011 Adam <Adam@anope.org>
|
||||
#
|
||||
# Anope is free software. You can use, modify, and/or distribute it under the
|
||||
# terms of version 2 of the GNU General Public License. See docs/LICENSE.txt
|
||||
# for the complete terms of this license and docs/AUTHORS.txt for a list of
|
||||
# contributors.
|
||||
#
|
||||
# Based on the original code of Epona by Lara
|
||||
# Based on the original code of Services by Andy Church
|
||||
#
|
||||
# SPDX-License-Identifier: GPL-2.0-only
|
||||
msgid ""
|
||||
msgstr ""
|
||||
"Project-Id-Version: Anope\n"
|
||||
|
||||
+13
-4
@@ -1,8 +1,17 @@
|
||||
# Anope IRC Services language file
|
||||
# Copyright (C) 2011
|
||||
# This file is distributed under the same license as the Anope IRC Services package.
|
||||
# Adam <adam@anope.org>, 2011.
|
||||
# Anope IRC Services <https://www.anope.org/>
|
||||
#
|
||||
# Copyright (C) 2003-2025 Anope Contributors
|
||||
# Copyright (C) 2011 Adam <Adam@anope.org>
|
||||
#
|
||||
# Anope is free software. You can use, modify, and/or distribute it under the
|
||||
# terms of version 2 of the GNU General Public License. See docs/LICENSE.txt
|
||||
# for the complete terms of this license and docs/AUTHORS.txt for a list of
|
||||
# contributors.
|
||||
#
|
||||
# Based on the original code of Epona by Lara
|
||||
# Based on the original code of Services by Andy Church
|
||||
#
|
||||
# SPDX-License-Identifier: GPL-2.0-only
|
||||
msgid ""
|
||||
msgstr ""
|
||||
"Project-Id-Version: Anope\n"
|
||||
|
||||
+13
-4
@@ -1,8 +1,17 @@
|
||||
# Anope IRC Services language file
|
||||
# Copyright (C) 2013-2025
|
||||
# This file is distributed under the same license as the Anope IRC Services package.
|
||||
# Robby <robby@chatbelgie.be>, 2013-2025.
|
||||
# Anope IRC Services <https://www.anope.org/>
|
||||
#
|
||||
# Copyright (C) 2003-2025 Anope Contributors
|
||||
# Copyright (C) 2013-2025 Robby <robby@chatbelgie.be>
|
||||
#
|
||||
# Anope is free software. You can use, modify, and/or distribute it under the
|
||||
# terms of version 2 of the GNU General Public License. See docs/LICENSE.txt
|
||||
# for the complete terms of this license and docs/AUTHORS.txt for a list of
|
||||
# contributors.
|
||||
#
|
||||
# Based on the original code of Epona by Lara
|
||||
# Based on the original code of Services by Andy Church
|
||||
#
|
||||
# SPDX-License-Identifier: GPL-2.0-only
|
||||
msgid ""
|
||||
msgstr ""
|
||||
"Project-Id-Version: Anope\n"
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user