mirror of
https://github.com/anope/anope.git
synced 2026-06-15 18:14:46 +02:00
Compare commits
188 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| f3c94e5d23 | |||
| f2ab092742 | |||
| 7d5ca5c90b | |||
| 8ee85efd70 | |||
| 0cab675825 | |||
| f1751dcb21 | |||
| 8b02613549 | |||
| c9625ccf3f | |||
| 435ce51196 | |||
| 57ac7cb4db | |||
| 8cb2b801e9 | |||
| 66b45534a8 | |||
| 499077826c | |||
| bc4d34ebd8 | |||
| f40719787f | |||
| 934a13c21f | |||
| e5602f956d | |||
| de11a19e03 | |||
| b437468b84 | |||
| 0a99571c0f | |||
| e704fa6266 | |||
| f908514095 | |||
| bafcba023c | |||
| 9a44b74186 | |||
| 883935c3e0 | |||
| 6d34054b78 | |||
| 3da9b6df0d | |||
| 0ab0e4737c | |||
| cdf356ed33 | |||
| 7d268bb4ca | |||
| 184350ff4a | |||
| 4cdbf560e1 | |||
| cbccc79d37 | |||
| 9b188a6c04 | |||
| 2f74513246 | |||
| 94dbb19593 | |||
| 8232759a92 | |||
| b006966d25 | |||
| 6037f63ae5 | |||
| 5cdb65ca52 | |||
| f9e4ca4d06 | |||
| 66c9be8627 | |||
| 546f65c38e | |||
| 9fcb022d5e | |||
| 5a0c6b1f18 | |||
| ade8db023e | |||
| 2ae733bcd1 | |||
| cc37e6d69a | |||
| 101c68f786 | |||
| ec0cd9e7f9 | |||
| ab0b851d28 | |||
| 4e3720b810 | |||
| 4b48fc98d3 | |||
| 82993c8d1e | |||
| d352718a39 | |||
| d44632e57d | |||
| 80451011dd | |||
| b4e673b2f4 | |||
| 58a78e9aa5 | |||
| 6da4a148fa | |||
| a3edb09eda | |||
| 27beb8f877 | |||
| 136680f917 | |||
| 378ae21ac7 | |||
| e35a86661d | |||
| 528b5938ec | |||
| 03bee17063 | |||
| fe18050c49 | |||
| aa0496f69b | |||
| 4ee22ab05e | |||
| 63ad540e55 | |||
| a1165eea94 | |||
| bfca74f6b3 | |||
| 3acf74483c | |||
| a3ec8329f4 | |||
| 7d0184ca34 | |||
| 31bc597c81 | |||
| e0b687f289 | |||
| 2de0dddb1c | |||
| ff65b68dfa | |||
| 94456a6063 | |||
| 41ea346551 | |||
| 439ad3e736 | |||
| 347d82f59b | |||
| fe68f40634 | |||
| 08b1344056 | |||
| ff67a80a71 | |||
| 230e85798d | |||
| 9604690e9d | |||
| 01e0cf4868 | |||
| 693eeed762 | |||
| 6e5713d64a | |||
| 249ad3dfea | |||
| b94c3740b9 | |||
| 59ec42f0e6 | |||
| 8a65f116b6 | |||
| 8105607257 | |||
| 601da1141e | |||
| 8c0edef714 | |||
| c3efd9426d | |||
| a386439f86 | |||
| 016a5b3903 | |||
| 60aeb2a71a | |||
| 54ea63df66 | |||
| 01fc3ea22e | |||
| 3388736fab | |||
| 0065a0f405 | |||
| 490f832dc0 | |||
| a44acb6de5 | |||
| 13e5ddf807 | |||
| e42c728ab8 | |||
| 4eec5c5435 | |||
| 2667d9e90c | |||
| f2b66278aa | |||
| 5b7d952626 | |||
| 24375d53e6 | |||
| 88ac47e217 | |||
| 8a1bffba9b | |||
| 01eef7a392 | |||
| 67b76fadca | |||
| 7861712437 | |||
| ccc088d946 | |||
| 4468fe77fa | |||
| e71a9e2894 | |||
| f80bdf06ba | |||
| 2d6033c73f | |||
| 756dc49813 | |||
| aa92559aa0 | |||
| eb12a89b8e | |||
| d4a34308e5 | |||
| aab3a8e5b6 | |||
| c72e12d0a6 | |||
| bce0d629fd | |||
| 7d0dacc86c | |||
| 729aa4ab4a | |||
| 18e9e12261 | |||
| 9d68b29c9e | |||
| a4792412ba | |||
| 8bb83f6b1a | |||
| da99a53dfa | |||
| a9e9ac32a0 | |||
| 05e6df23a2 | |||
| 3f9fc23270 | |||
| cb21c7c1fa | |||
| 4008e64f26 | |||
| 1cf5918574 | |||
| afe87bf693 | |||
| ff1c5adb8b | |||
| c36030c826 | |||
| 33a02b1223 | |||
| 68f4556609 | |||
| 23db58a303 | |||
| ee69dc3105 | |||
| e9243c3fde | |||
| 4cfee23303 | |||
| be3822523b | |||
| 111f81aa95 | |||
| f12e1ad222 | |||
| 72318a6bf0 | |||
| 2f77cb38e2 | |||
| 84ca4c0d27 | |||
| 1f9a197b18 | |||
| 0c5bf51378 | |||
| 1647968c50 | |||
| 5473311bd7 | |||
| f3ebb67469 | |||
| 0d149ce195 | |||
| d68ba1b570 | |||
| 1877833e73 | |||
| 63c3710785 | |||
| 0043d137e5 | |||
| 3e5d3c5bdc | |||
| 62deedfa75 | |||
| 44af4eac6b | |||
| 5fdc637327 | |||
| 7c93007aa6 | |||
| e8fee93a7e | |||
| 260539e987 | |||
| 4603cd467b | |||
| 00549bc9b2 | |||
| e0a6f7456b | |||
| 5a54b37aeb | |||
| 2e43665266 | |||
| 8b4cd65e2a | |||
| c08aaa86d1 | |||
| 87a8af0ad7 | |||
| 4691dfa3f0 | |||
| d41764bfd6 |
+1
-1
@@ -14,6 +14,6 @@ Version | Supported
|
||||
|
||||
## Reporting a Vulnerability
|
||||
|
||||
Please do not report security vulnerabilities on GitHub. Instead, email the details to team@anope.org or get the attention of a developer in our development IRC channel at irc.anope.org #anope-devel and PM them the details.
|
||||
Please do not report security vulnerabilities on GitHub. Instead, email the details to team@anope.org or get the attention of a developer in our development IRC channel at irc.teranova.net #anope-devel and PM them the details.
|
||||
|
||||
We will triage your issue as soon as possible and try to release a fixed version within a week of receiving your report.
|
||||
|
||||
@@ -2,6 +2,9 @@ name: Windows CI
|
||||
on:
|
||||
pull_request:
|
||||
push:
|
||||
release:
|
||||
types:
|
||||
- published
|
||||
schedule:
|
||||
- cron: '0 0 * * 0'
|
||||
jobs:
|
||||
@@ -12,12 +15,12 @@ jobs:
|
||||
- uses: actions/checkout@v4
|
||||
|
||||
- name: Setup MSBuild
|
||||
uses: microsoft/setup-msbuild@v1.3
|
||||
uses: microsoft/setup-msbuild@v2
|
||||
|
||||
- name: Setup Conan
|
||||
uses: turtlebrowser/get-conan@v1.2
|
||||
with:
|
||||
version: 1.59.0
|
||||
version: 1.64.0
|
||||
|
||||
- name: Install libraries
|
||||
run: |
|
||||
@@ -27,9 +30,17 @@ jobs:
|
||||
run: |
|
||||
mkdir ${{ github.workspace }}\build
|
||||
cd ${{ github.workspace }}\build
|
||||
cmake -A "x64" -G "Visual Studio 16 2019" ..
|
||||
cmake -A "x64" -D "CMAKE_BUILD_TYPE=${{ github.event_name == 'release' && 'Release' || 'Debug' }}" -G "Visual Studio 16 2019" ..
|
||||
|
||||
- name: Build Anope
|
||||
working-directory: ${{ github.workspace }}\build
|
||||
run: |
|
||||
msbuild PACKAGE.vcxproj /M:3 /P:Configuration=Release /P:Platform=x64 /VERBOSITY:MINIMAL
|
||||
msbuild PACKAGE.vcxproj /M:3 /P:Configuration=${{ github.event_name == 'release' && 'Release' || 'Debug' }} /P:Platform=x64 /VERBOSITY:MINIMAL
|
||||
|
||||
- name: Upload installer
|
||||
if: "${{ github.event_name == 'release' }}"
|
||||
working-directory: ${{ github.workspace }}\build
|
||||
env:
|
||||
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||
run: |
|
||||
gh release upload ${{ github.event.release.tag_name }} $(Get-ChildItem anope-*.exe)
|
||||
|
||||
+17
-30
@@ -31,12 +31,8 @@ if(CMAKE_COMPILER_IS_GNUCXX OR "${CMAKE_CXX_COMPILER_ID}" MATCHES "Clang$")
|
||||
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 (only when not on MinGW, which uses semicolons already), and if on MinGW, just copy the line
|
||||
if(NOT MINGW)
|
||||
string(REGEX REPLACE ":" ";" LIBRARIES ${LINE})
|
||||
else()
|
||||
set(LIBRARIES "${LINE}")
|
||||
endif()
|
||||
# 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
|
||||
@@ -106,13 +102,6 @@ if(NOT MSVC)
|
||||
endif()
|
||||
endif()
|
||||
|
||||
# If running under MinGW, we have to force the resource compiler settings (hopefully this will be fixed in a later version of CMake)
|
||||
if(MINGW)
|
||||
set(CMAKE_RC_COMPILER_INIT windres)
|
||||
enable_language(RC)
|
||||
set(CMAKE_RC_COMPILE_OBJECT "<CMAKE_RC_COMPILER> <FLAGS> <DEFINES> -o <OBJECT> <SOURCE>")
|
||||
endif()
|
||||
|
||||
# Include the checking functions used later in this CMakeLists.txt
|
||||
include(CheckFunctionExists)
|
||||
include(CheckTypeSize)
|
||||
@@ -189,11 +178,6 @@ if(CMAKE_THREAD_LIBS_INIT)
|
||||
list(APPEND LINK_LIBS ${CMAKE_THREAD_LIBS_INIT})
|
||||
endif()
|
||||
|
||||
# Under MinGW, the -shared flag isn't properly set in the module-specific linker flags, add it from the C flags for shared libraries
|
||||
if(MINGW)
|
||||
set(CMAKE_MODULE_LINKER_FLAGS "${CMAKE_MODULE_LINKER_FLAGS} ${CMAKE_SHARED_LIBRARY_CREATE_C_FLAGS}")
|
||||
endif()
|
||||
|
||||
if(NOT PROGRAM_NAME)
|
||||
set(PROGRAM_NAME anope)
|
||||
endif()
|
||||
@@ -256,8 +240,8 @@ endif()
|
||||
if(NOT BIN_DIR)
|
||||
set(BIN_DIR "bin")
|
||||
endif()
|
||||
if(NOT DB_DIR)
|
||||
set(DB_DIR "data")
|
||||
if(NOT DATA_DIR)
|
||||
set(DATA_DIR "data")
|
||||
endif()
|
||||
if(NOT DOC_DIR)
|
||||
set(DOC_DIR "doc")
|
||||
@@ -265,14 +249,14 @@ endif()
|
||||
if(NOT CONF_DIR)
|
||||
set(CONF_DIR "conf")
|
||||
endif()
|
||||
if(NOT LIB_DIR)
|
||||
set(LIB_DIR "lib")
|
||||
if(NOT MODULE_DIR)
|
||||
set(MODULE_DIR "modules")
|
||||
endif()
|
||||
if(NOT LOCALE_DIR)
|
||||
set(LOCALE_DIR "locale")
|
||||
endif()
|
||||
if(NOT LOGS_DIR)
|
||||
set(LOGS_DIR "logs")
|
||||
if(NOT LOG_DIR)
|
||||
set(LOG_DIR "logs")
|
||||
endif()
|
||||
|
||||
# Version number processing
|
||||
@@ -350,15 +334,17 @@ set(SERVICES_BINARY "$<TARGET_FILE:${PROGRAM_NAME}>")
|
||||
get_filename_component(SERVICES_BINARY ${SERVICES_BINARY} NAME)
|
||||
|
||||
# At install time, create the following additional directories
|
||||
install(CODE "file(MAKE_DIRECTORY \"\$ENV{DESTDIR}\${CMAKE_INSTALL_PREFIX}/${DB_DIR}/backups\")")
|
||||
install(CODE "file(MAKE_DIRECTORY \"\$ENV{DESTDIR}\${CMAKE_INSTALL_PREFIX}/${LOGS_DIR}\")")
|
||||
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})
|
||||
install(CODE "file(MAKE_DIRECTORY \"\$ENV{DESTDIR}${ABSOLUTE_DATA_DIR}/backups\")")
|
||||
install(CODE "file(MAKE_DIRECTORY \"\$ENV{DESTDIR}${ABSOLUTE_LOG_DIR}\")")
|
||||
if(WIN32)
|
||||
install(CODE "file(MAKE_DIRECTORY \"\$ENV{DESTDIR}\${CMAKE_INSTALL_PREFIX}/${DB_DIR}/runtime\")")
|
||||
install(CODE "file(MAKE_DIRECTORY \"\$ENV{DESTDIR}${ABSOLUTE_DATA_DIR}/runtime\")")
|
||||
endif()
|
||||
# On non-Windows platforms, if RUNGROUP is set, change the permissions of the below directories, as well as the group of the data directory
|
||||
if(NOT WIN32 AND RUNGROUP)
|
||||
install(CODE "execute_process(COMMAND ${CHMOD} 2775 \"\$ENV{DESTDIR}\${CMAKE_INSTALL_PREFIX}/\${DB_DIR}/backups\")")
|
||||
install(CODE "execute_process(COMMAND ${CHMOD} 2775 \"\$ENV{DESTDIR}\${CMAKE_INSTALL_PREFIX}/\${LOGS_DIR}\")")
|
||||
install(CODE "execute_process(COMMAND ${CHMOD} 2775 \"\$ENV{DESTDIR}${ABSOLUTE_DATA_DIR}/backups\")")
|
||||
install(CODE "execute_process(COMMAND ${CHMOD} 2775 \"\$ENV{DESTDIR}${ABSOLUTE_LOG_DIR}\")")
|
||||
install(CODE "execute_process(COMMAND ${CHGRP} -R ${RUNGROUP} \"\$ENV{DESTDIR}\${CMAKE_INSTALL_PREFIX}\")")
|
||||
endif()
|
||||
# On Windows platforms, install extra files
|
||||
@@ -368,7 +354,8 @@ if(WIN32)
|
||||
)
|
||||
endif()
|
||||
|
||||
install(CODE "file(REMOVE_RECURSE \"$ENV{DESTDIR}${CMAKE_INSTALL_PREFIX}/${LIB_DIR}/modules\")")
|
||||
get_filename_component(ABSOLUTE_MODULE_DIR ${MODULE_DIR} REALPATH BASE_DIR ${CMAKE_INSTALL_PREFIX})
|
||||
install(CODE "file(REMOVE_RECURSE \"$ENV{DESTDIR}${ABSOLUTE_MODULE_DIR}\")")
|
||||
|
||||
# Only process the CPack section if we have CPack
|
||||
if(EXISTS "${CMAKE_ROOT}/Modules/CPack.cmake")
|
||||
|
||||
@@ -13,10 +13,6 @@
|
||||
#
|
||||
###########################################################################
|
||||
|
||||
echo2 () {
|
||||
$ECHO2 "$*$ECHO2SUF" # these are defined later
|
||||
}
|
||||
|
||||
exists () { # because some shells don't have test -e
|
||||
if [ -f $1 -o -d $1 -o -p $1 -o -c $1 -o -b $1 ] ; then
|
||||
return 0
|
||||
@@ -42,7 +38,6 @@ Run_Build_System () {
|
||||
WITH_PERM=""
|
||||
EXTRA_INCLUDE=""
|
||||
EXTRA_LIBS=""
|
||||
GEN_TYPE=""
|
||||
|
||||
if [ "$INSTDIR" != "" ] ; then
|
||||
WITH_INST="-DINSTDIR:STRING=$INSTDIR"
|
||||
@@ -70,45 +65,25 @@ Run_Build_System () {
|
||||
EXTRA_LIBS="-DEXTRA_LIBS:STRING=$EXTRA_LIB_DIRS"
|
||||
fi
|
||||
|
||||
if [ "$SOURCE_DIR" = "." ] ; then
|
||||
pwdsave=`pwd`
|
||||
test -d build || mkdir build
|
||||
cd "build"
|
||||
REAL_SOURCE_DIR=".."
|
||||
else
|
||||
REAL_SOURCE_DIR="$SOURCE_DIR"
|
||||
fi
|
||||
BUILD_PATHS="-B ${SOURCE_DIR}/build ${SOURCE_DIR}"
|
||||
|
||||
echo "cmake $GEN_TYPE $WITH_INST $WITH_RUN $WITH_PERM $BUILD_TYPE $EXTRA_INCLUDE $EXTRA_LIBS $EXTRA_CONFIG_ARGS $REAL_SOURCE_DIR"
|
||||
CMAKE="cmake $GEN_TYPE $WITH_INST $WITH_RUN $WITH_PERM $BUILD_TYPE $EXTRA_INCLUDE $EXTRA_LIBS $EXTRA_CONFIG_ARGS $BUILD_PATHS"
|
||||
echo $CMAKE
|
||||
$CMAKE
|
||||
|
||||
cmake $GEN_TYPE $WITH_INST $WITH_RUN $WITH_PERM $BUILD_TYPE $EXTRA_INCLUDE $EXTRA_LIBS $EXTRA_CONFIG_ARGS $REAL_SOURCE_DIR
|
||||
if [ $? -ne 0 ]; then
|
||||
echo "You should fix these issues and then run ./Config -quick to rerun CMake."
|
||||
exit 1
|
||||
fi
|
||||
|
||||
echo ""
|
||||
if [ "$SOURCE_DIR" = "." ] ; then
|
||||
echo "Now cd build, then run make to build Anope."
|
||||
cd "$pwdsave"
|
||||
else
|
||||
if [ "$PWD" = "${SOURCE_DIR}/build" ]; then
|
||||
echo "Now run make to build Anope."
|
||||
else
|
||||
echo "Now cd build, then run make to build Anope."
|
||||
fi
|
||||
}
|
||||
|
||||
ECHO2SUF=''
|
||||
if [ "`echo -n a ; echo -n b`" = "ab" ] ; then
|
||||
ECHO2='echo -n'
|
||||
elif [ "`echo 'a\c' ; echo 'b\c'`" = "ab" ] ; then
|
||||
ECHO2='echo' ; ECHO2SUF='\c'
|
||||
elif [ "`printf 'a' 2>&1 ; printf 'b' 2>&1`" = "ab" ] ; then
|
||||
ECHO2='printf "%s"'
|
||||
else
|
||||
# oh well...
|
||||
ECHO2='echo'
|
||||
fi
|
||||
export ECHO2 ECHO2SUF
|
||||
|
||||
###########################################################################
|
||||
# Init values
|
||||
###########################################################################
|
||||
@@ -121,7 +96,7 @@ EXTRA_INCLUDE_DIRS=
|
||||
EXTRA_LIB_DIRS=
|
||||
EXTRA_CONFIG_ARGS=
|
||||
CAN_QUICK="no"
|
||||
SOURCE_DIR=`dirname $0`
|
||||
SOURCE_DIR="$(cd "$(dirname "$0")" && pwd)"
|
||||
|
||||
###########################################################################
|
||||
# Check out the options
|
||||
@@ -138,7 +113,7 @@ while [ $# -ge 1 ] ; do
|
||||
exit 0
|
||||
elif [ $1 = "-devel" ] ; then
|
||||
DEBUG="yes"
|
||||
INSTDIR="$PWD/run"
|
||||
INSTDIR="$SOURCE_DIR/run"
|
||||
elif [ $1 = "-nocache" ] ; then
|
||||
IGNORE_CACHE="1"
|
||||
elif [ $1 = "-nointro" ] ; then
|
||||
@@ -199,7 +174,7 @@ export ok INPUT
|
||||
ok=0
|
||||
echo "In what directory should Anope be installed?"
|
||||
while [ $ok -eq 0 ] ; do
|
||||
echo2 "[$INSTDIR] "
|
||||
echo -n "[$INSTDIR] "
|
||||
if read INPUT ; then : ; else echo "" ; exit 1 ; fi
|
||||
if [ ! "$INPUT" ] ; then
|
||||
INPUT=$INSTDIR
|
||||
@@ -209,7 +184,7 @@ while [ $ok -eq 0 ] ; do
|
||||
echo "$INPUT exists, but is not a directory!"
|
||||
else
|
||||
echo "$INPUT does not exist. Create it?"
|
||||
echo2 "[y] "
|
||||
echo -n "[y] "
|
||||
read YN
|
||||
if [ "$YN" != "n" ] ; then
|
||||
if mkdir -p $INPUT ; then
|
||||
@@ -238,7 +213,7 @@ else
|
||||
echo "should not force files to be owned by a particular group, just press"
|
||||
echo "Return.)"
|
||||
fi
|
||||
echo2 "[$RUNGROUP] "
|
||||
echo -n "[$RUNGROUP] "
|
||||
if read INPUT ; then : ; else echo "" ; exit 1 ; fi
|
||||
if [ "$INPUT" ] ; then
|
||||
if [ "$INPUT" = "none" ] ; then
|
||||
@@ -263,7 +238,7 @@ ok=0
|
||||
echo "What should the default umask for data files be (in octal)?"
|
||||
echo "(077 = only accessible by owner; 007 = accessible by owner and group)"
|
||||
while [ $ok -eq 0 ] ; do
|
||||
echo2 "[$UMASK] "
|
||||
echo -n "[$UMASK] "
|
||||
if read INPUT ; then : ; else echo "" ; exit 1 ; fi
|
||||
if [ ! "$INPUT" ] ; then
|
||||
INPUT=$UMASK
|
||||
@@ -287,7 +262,7 @@ if [ "$DEBUG" = "yes" ] ; then
|
||||
TEMP_YN="y"
|
||||
fi
|
||||
echo "Would you like to build a debug version of Anope?"
|
||||
echo2 "[$TEMP_YN] "
|
||||
echo -n "[$TEMP_YN] "
|
||||
read YN
|
||||
if [ "$YN" ] ; then
|
||||
if [ "$YN" = "y" ] ; then
|
||||
@@ -305,7 +280,7 @@ echo "You may only need to do this if CMake is unable to locate"
|
||||
echo "missing dependencies without hints."
|
||||
echo "Separate directories with semicolons."
|
||||
echo "If you need no extra include directories, enter NONE in all caps."
|
||||
echo2 "[$EXTRA_INCLUDE_DIRS] "
|
||||
echo -n "[$EXTRA_INCLUDE_DIRS] "
|
||||
if read INPUT ; then : ; else echo "" ; exit 1 ; fi
|
||||
if [ "$INPUT" ] ; then
|
||||
if [ "$INPUT" = "NONE" ] ; then
|
||||
@@ -323,7 +298,7 @@ echo "You may only need to do this if CMake is unable to locate"
|
||||
echo "missing dependencies without hints."
|
||||
echo "Separate directories with semicolons."
|
||||
echo "If you need no extra library directories, enter NONE in all caps."
|
||||
echo2 "[$EXTRA_LIB_DIRS] "
|
||||
echo -n "[$EXTRA_LIB_DIRS] "
|
||||
if read INPUT ; then : ; else echo "" ; exit 1 ; fi
|
||||
if [ "$INPUT" ] ; then
|
||||
if [ "$INPUT" = "NONE" ] ; then
|
||||
@@ -338,7 +313,7 @@ echo ""
|
||||
|
||||
echo "Are there any extra arguments you wish to pass to CMake?"
|
||||
echo "If you need no extra arguments to CMake, enter NONE in all caps."
|
||||
echo2 "[$EXTRA_CONFIG_ARGS] "
|
||||
echo -n "[$EXTRA_CONFIG_ARGS] "
|
||||
if read INPUT ; then : ; else echo "" ; exit 1 ; fi
|
||||
if [ "$INPUT" ] ; then
|
||||
if [ "$INPUT" = "NONE" ] ; then
|
||||
@@ -355,7 +330,7 @@ echo ""
|
||||
# Store values
|
||||
################################################################################
|
||||
|
||||
echo2 "Saving configuration results in config.cache... "
|
||||
echo -n "Saving configuration results in config.cache... "
|
||||
|
||||
cat <<EOT >$SOURCE_DIR/config.cache
|
||||
INSTDIR="$INSTDIR"
|
||||
|
||||
@@ -4,7 +4,7 @@ Anope is an open source set of IRC services. It is highly modular, with a vast n
|
||||
|
||||
* [Website](https://anope.org)
|
||||
* [GitHub](https://github.com/anope)
|
||||
* IRC \#anope on irc.anope.org
|
||||
* IRC \#anope on irc.teranova.net
|
||||
|
||||
## Installation
|
||||
|
||||
@@ -33,7 +33,7 @@ Copy conf/anope.example.conf to conf/anope.conf
|
||||
$ cp conf/anope.example.conf conf/anope.conf
|
||||
```
|
||||
|
||||
Edit anope.conf, configuring the uplink, serverinfo, and protocol module configurations. Example link blocks for popular IRCds are included in the anope.example.conf documentation. The [Anope wiki](https://wiki.anope.org) is also a good source of information. Our support channel is located at #anope on [irc.anope.org](irc://irc.anope.org/#anope).
|
||||
Edit anope.conf, configuring the uplink, serverinfo, and protocol module configurations. Example link blocks for popular IRCds are included in the the example.conf documentation. The [Anope wiki](https://wiki.anope.org) is also a good source of information. Our support channel is located at #anope on [irc.teranova.net](ircs://irc.teranova.net/anope).
|
||||
|
||||
Note that the example configuration file includes other example configuration files. If you want to modify the other example configuration files, copy them (e.g. `modules.example.conf` to `modules.conf`) and modify the `include` directive in `anope.conf` to include the new file.
|
||||
|
||||
|
||||
+2
-2
@@ -1,6 +1,6 @@
|
||||
# Only install example.chk and anope.example.conf from this directory
|
||||
# Only install cron.example.sh and anope.example.conf 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)
|
||||
set(DATA example.chk anope.example.conf botserv.example.conf hostserv.example.conf modules.example.conf operserv.example.conf chanserv.example.conf global.example.conf memoserv.example.conf nickserv.example.conf chanstats.example.conf irc2sql.example.conf stats.standalone.example.conf)
|
||||
set(DATA cron.example.sh anope.example.conf botserv.example.conf hostserv.example.conf modules.example.conf operserv.example.conf chanserv.example.conf global.example.conf memoserv.example.conf nickserv.example.conf chanstats.example.conf irc2sql.example.conf stats.standalone.example.conf)
|
||||
install(FILES ${DATA}
|
||||
DESTINATION ${CONF_DIR}
|
||||
)
|
||||
|
||||
+13
-57
@@ -265,26 +265,7 @@ serverinfo
|
||||
* - solanum
|
||||
* - unrealircd
|
||||
*/
|
||||
module
|
||||
{
|
||||
name = "inspircd"
|
||||
|
||||
/*
|
||||
* Some protocol modules can enforce mode locks server-side. This reduces the spam caused by
|
||||
* services immediately reversing mode changes for locked modes.
|
||||
*
|
||||
* If the protocol module you have loaded does not support this, this setting will have no effect.
|
||||
*/
|
||||
use_server_side_mlock = yes
|
||||
|
||||
/*
|
||||
* Some protocol modules can enforce topic locks server-side. This reduces the spam caused by
|
||||
* services immediately reversing topic changes.
|
||||
*
|
||||
* If the protocol module you have loaded does not support this, this setting will have no effect.
|
||||
*/
|
||||
use_server_side_topiclock = yes
|
||||
}
|
||||
module { name = "inspircd" }
|
||||
|
||||
/*
|
||||
* [REQUIRED] Network Information
|
||||
@@ -421,7 +402,7 @@ options
|
||||
/*
|
||||
* Sets the delay between automatic database updates.
|
||||
*/
|
||||
updatetimeout = 5m
|
||||
updatetimeout = 2m
|
||||
|
||||
/*
|
||||
* Sets the delay between checks for expired nicknames and channels.
|
||||
@@ -433,12 +414,6 @@ options
|
||||
*/
|
||||
readtimeout = 5s
|
||||
|
||||
/*
|
||||
* Sets the interval between sending warning messages for program errors via
|
||||
* WALLOPS/GLOBOPS.
|
||||
*/
|
||||
warningtimeout = 4h
|
||||
|
||||
/*
|
||||
* Sets the (maximum) frequency at which the timeout list is checked. This,
|
||||
* combined with readtimeout above, determines how accurately timed events,
|
||||
@@ -455,26 +430,11 @@ options
|
||||
timeoutcheck = 3s
|
||||
|
||||
/*
|
||||
* If set, this will allow users to let services send PRIVMSGs to them
|
||||
* instead of NOTICEs. Also see the "msg" option of nickserv:defaults,
|
||||
* which also toggles the default communication (PRIVMSG or NOTICE) to
|
||||
* use for unregistered users.
|
||||
*
|
||||
* This is a feature that is against the IRC RFC and should be used ONLY
|
||||
* if absolutely necessary.
|
||||
*
|
||||
* This directive is optional, and not recommended.
|
||||
* If set Anope will tell users to use a server-side alias for messaging
|
||||
* services instead of /msg. The alias for each service defaults to the
|
||||
* bot name but can be configured in the service block.
|
||||
*/
|
||||
#useprivmsg = yes
|
||||
|
||||
/*
|
||||
* If set, will force services to only respond to PRIVMSGs addresses to
|
||||
* Nick@ServerName - e.g. NickServ@example.com. This should be used in
|
||||
* conjunction with IRCd aliases. This directive is optional.
|
||||
*
|
||||
* This option will have no effect on some IRCds, such as TS6 IRCds.
|
||||
*/
|
||||
#usestrictprivmsg = yes
|
||||
#servicealias = yes
|
||||
|
||||
/*
|
||||
* If set, Anope will only show /stats o to IRC Operators. This directive
|
||||
@@ -530,7 +490,7 @@ options
|
||||
*
|
||||
* Removing .UTF-8 will instead use the default encoding for the language, e.g. iso-8859-1 for western European languages.
|
||||
*/
|
||||
languages = "ca_ES.UTF-8 de_DE.UTF-8 el_GR.UTF-8 es_ES.UTF-8 fr_FR.UTF-8 hu_HU.UTF-8 it_IT.UTF-8 nl_NL.UTF-8 pl_PL.UTF-8 pt_PT.UTF-8 ru_RU.UTF-8 tr_TR.UTF-8"
|
||||
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"
|
||||
|
||||
/*
|
||||
* Default language that non- and newly-registered nicks will receive messages in.
|
||||
@@ -749,13 +709,14 @@ log
|
||||
*
|
||||
* Available privileges:
|
||||
* botserv/administration - Can view and assign private BotServ bots
|
||||
* botserv/fantasy - Can use fantasy commands without the FANTASIA privilege
|
||||
* botserv/fantasy - Can use fantasy commands without the FANTASY privilege
|
||||
* chanserv/administration - Can modify the settings of any channel (including changing of the owner!)
|
||||
* chanserv/access/list - Can view channel access and akick lists, but not modify them
|
||||
* chanserv/access/modify - Can modify channel access and akick lists, and use /chanserv enforce
|
||||
* chanserv/auspex - Can see any information with /CHANSERV INFO
|
||||
* chanserv/no-register-limit - May register an unlimited number of channels and nicknames
|
||||
* chanserv/kick - Can kick and ban users from channels through ChanServ
|
||||
* chanserv/drop/override - Allows dropping channels without using a confirmation code
|
||||
* memoserv/info - Can see any information with /MEMOSERV INFO
|
||||
* memoserv/set-limit - Can set the limit of max stored memos on any user and channel
|
||||
* memoserv/no-limit - Can send memos through limits and throttles
|
||||
@@ -764,6 +725,8 @@ log
|
||||
* nickserv/cert - Can modify other users certificate lists
|
||||
* nickserv/confirm - Can confirm other users nicknames
|
||||
* nickserv/drop - Can drop other users nicks
|
||||
* nickserv/drop/display - Allows dropping display nicks when preservedisplay is enabled
|
||||
* nickserv/drop/override - Allows dropping nicks without using a confirmation code
|
||||
* nickserv/recover - Can recover other users nicks
|
||||
* operserv/config - Can modify services's configuration
|
||||
* operserv/oper/modify - Can add and remove operators with at most the same privileges
|
||||
@@ -839,8 +802,6 @@ opertype
|
||||
*
|
||||
* This can be used to automatically oper users who identify for services operator accounts, and is
|
||||
* useful for setting modes such as Plexus's user mode +N.
|
||||
*
|
||||
* Note that some IRCds, such as InspIRCd, do not allow directly setting +o, and this will not work.
|
||||
*/
|
||||
#modes = "+o"
|
||||
}
|
||||
@@ -932,7 +893,7 @@ mail
|
||||
* If set, this option enables the mail commands in Anope. You may choose
|
||||
* to disable it if you have no Sendmail-compatible mailer installed. Whilst
|
||||
* this directive (and entire block) is optional, it is required if
|
||||
* nickserv:registration is set to yes.
|
||||
* nickserv:registration is set to mail.
|
||||
*/
|
||||
usemail = yes
|
||||
|
||||
@@ -1151,11 +1112,6 @@ module
|
||||
* This is only useful with very large databases, with hundreds
|
||||
* of thousands of objects, that have a noticeable delay from
|
||||
* writing databases.
|
||||
*
|
||||
* If your database is large enough cause a noticeable delay when
|
||||
* saving you should consider a more powerful alternative such
|
||||
* as db_sql or db_redis, which incrementally update their
|
||||
* databases asynchronously in real time.
|
||||
*/
|
||||
fork = no
|
||||
}
|
||||
@@ -1311,7 +1267,7 @@ module
|
||||
* [EXTRA] enc_posix
|
||||
*
|
||||
* Provides verify-only support for passwords encrypted using the POSIX crypt()
|
||||
* function. Load this if you are migratign from another services packages such
|
||||
* function. Load this if you are migrating from another services packages such
|
||||
* as Atheme. See https://en.wikipedia.org/wiki/Crypt_(C) for more information.
|
||||
*
|
||||
* You must load another encryption method before this to re-encrypt passwords
|
||||
|
||||
@@ -59,6 +59,17 @@ service
|
||||
* Prefixes may be given to the channels in the form of mode characters or prefix symbols.
|
||||
*/
|
||||
#channels = "@#services,#mychan"
|
||||
|
||||
/*
|
||||
* The server alias that can be used to securely message this service. If
|
||||
* your IRC server does not have an alias for this service you can set this
|
||||
* to an empty string to tell users to use /msg instead.
|
||||
*
|
||||
* This setting is ignored when options:servicealias is disabled.
|
||||
*
|
||||
* Defaults to the nick of the service if not set.
|
||||
*/
|
||||
#alias = "BS"
|
||||
}
|
||||
|
||||
/*
|
||||
@@ -334,10 +345,10 @@ privilege
|
||||
/*
|
||||
* fantasy
|
||||
*
|
||||
* Allows 'fantasist' commands to be used in channels.
|
||||
* Allows fantasy commands (e.g. !kick) to be used in channels.
|
||||
*
|
||||
* Provides the commands:
|
||||
* botserv/set/fantasy - Used for enabling or disabling BotServ's fantasist commands.
|
||||
* botserv/set/fantasy - Used for enabling or disabling BotServ's fantasy commands.
|
||||
*/
|
||||
module
|
||||
{
|
||||
|
||||
@@ -49,6 +49,17 @@ service
|
||||
* Prefixes may be given to the channels in the form of mode characters or prefix symbols.
|
||||
*/
|
||||
#channels = "@#services,#mychan"
|
||||
|
||||
/*
|
||||
* The server alias that can be used to securely message this service. If
|
||||
* your IRC server does not have an alias for this service you can set this
|
||||
* to an empty string to tell users to use /msg instead.
|
||||
*
|
||||
* This setting is ignored when options:servicealias is disabled.
|
||||
*
|
||||
* Defaults to the nick of the service if not set.
|
||||
*/
|
||||
#alias = "CS"
|
||||
}
|
||||
|
||||
/*
|
||||
@@ -107,10 +118,9 @@ module
|
||||
/*
|
||||
* The length of time before a channel registration expires.
|
||||
*
|
||||
* This directive is optional, but recommended.
|
||||
* If not set, the default is 30 days.
|
||||
* This directive is optional. If not set, the default is never.
|
||||
*/
|
||||
expire = 30d
|
||||
#expire = 90d
|
||||
|
||||
/*
|
||||
* The maximum number of entries on a channel's access list.
|
||||
@@ -392,7 +402,7 @@ privilege
|
||||
}
|
||||
|
||||
/*
|
||||
* FANTASIA privilege.
|
||||
* FANTASY privilege.
|
||||
*
|
||||
* Used by botserv/main and chanserv/xop.
|
||||
*
|
||||
@@ -400,7 +410,7 @@ privilege
|
||||
*/
|
||||
privilege
|
||||
{
|
||||
name = "FANTASIA"
|
||||
name = "FANTASY"
|
||||
desc = _("Allowed to use fantasy commands")
|
||||
rank = 30
|
||||
level = 3
|
||||
@@ -1278,7 +1288,7 @@ module
|
||||
* This directive is optional.
|
||||
* If not set, the default is never.
|
||||
*/
|
||||
expire = 90d
|
||||
suspendexpire = 90d
|
||||
|
||||
/*
|
||||
* Settings to show to non-opers in ChanServ's INFO output.
|
||||
|
||||
@@ -49,6 +49,17 @@ service
|
||||
* Prefixes may be given to the channels in the form of mode characters or prefix symbols.
|
||||
*/
|
||||
#channels = "@#services,#mychan"
|
||||
|
||||
/*
|
||||
* The server alias that can be used to securely message this service. If
|
||||
* your IRC server does not have an alias for this service you can set this
|
||||
* to an empty string to tell users to use /msg instead.
|
||||
*
|
||||
* This setting is ignored when options:servicealias is disabled.
|
||||
*
|
||||
* Defaults to the nick of the service if not set.
|
||||
*/
|
||||
#alias = "GL"
|
||||
}
|
||||
|
||||
/*
|
||||
|
||||
@@ -49,6 +49,17 @@ service
|
||||
* Prefixes may be given to the channels in the form of mode characters or prefix symbols.
|
||||
*/
|
||||
#channels = "@#services,#mychan"
|
||||
|
||||
/*
|
||||
* The server alias that can be used to securely message this service. If
|
||||
* your IRC server does not have an alias for this service you can set this
|
||||
* to an empty string to tell users to use /msg instead.
|
||||
*
|
||||
* This setting is ignored when options:servicealias is disabled.
|
||||
*
|
||||
* Defaults to the nick of the service if not set.
|
||||
*/
|
||||
#alias = "HS"
|
||||
}
|
||||
|
||||
/*
|
||||
|
||||
@@ -49,6 +49,17 @@ service
|
||||
* Prefixes may be given to the channels in the form of mode characters or prefix symbols.
|
||||
*/
|
||||
#channels = "@#services,#mychan"
|
||||
|
||||
/*
|
||||
* The server alias that can be used to securely message this service. If
|
||||
* your IRC server does not have an alias for this service you can set this
|
||||
* to an empty string to tell users to use /msg instead.
|
||||
*
|
||||
* This setting is ignored when options:servicealias is disabled.
|
||||
*
|
||||
* Defaults to the nick of the service if not set.
|
||||
*/
|
||||
#alias = "MS"
|
||||
}
|
||||
|
||||
/*
|
||||
|
||||
@@ -372,6 +372,7 @@ module { name = "help" }
|
||||
username = "anope"
|
||||
password = "mypassword"
|
||||
port = 3306
|
||||
socket = ""
|
||||
}
|
||||
}
|
||||
|
||||
@@ -754,7 +755,7 @@ module { name = "sasl" }
|
||||
name = "sqlite/main"
|
||||
|
||||
/* The database name, it will be created if it does not exist. */
|
||||
database = "anope.db"
|
||||
database = "anope.sqlite"
|
||||
}
|
||||
}
|
||||
|
||||
@@ -772,16 +773,16 @@ module { name = "sasl" }
|
||||
name = "webcpanel"
|
||||
|
||||
/* Web server to use. */
|
||||
server = "httpd/main";
|
||||
server = "httpd/main"
|
||||
|
||||
/*
|
||||
* The directory containing the webcpanel templates. This is relative to the
|
||||
* data directory.
|
||||
*/
|
||||
template_dir = "webcpanel/templates/default";
|
||||
template_dir = "webcpanel/templates/default"
|
||||
|
||||
/* Page title. */
|
||||
title = "Anope IRC Services";
|
||||
title = "Anope IRC Services"
|
||||
}
|
||||
|
||||
/*
|
||||
|
||||
+53
-14
@@ -49,6 +49,17 @@ service
|
||||
* Prefixes may be given to the channels in the form of mode characters or prefix symbols.
|
||||
*/
|
||||
#channels = "@#services,#mychan"
|
||||
|
||||
/*
|
||||
* The server alias that can be used to securely message this service. If
|
||||
* your IRC server does not have an alias for this service you can set this
|
||||
* to an empty string to tell users to use /msg instead.
|
||||
*
|
||||
* This setting is ignored when options:servicealias is disabled.
|
||||
*
|
||||
* Defaults to the nick of the service if not set.
|
||||
*/
|
||||
#alias = "NS"
|
||||
}
|
||||
|
||||
/*
|
||||
@@ -106,8 +117,7 @@ module
|
||||
* - memo_mail: Notify user if they have a new memo by mail
|
||||
* - autoop: User will be automatically opped in channels they enter and have access to
|
||||
* - neverop: User can not be added to access lists
|
||||
* - msg: Messages will be sent as PRIVMSGs instead of NOTICEs, requires options:useprivmsg
|
||||
* to be enabled as well
|
||||
* - msg: Messages will be sent as PRIVMSGs instead of NOTICEs
|
||||
* - ns_keep_modes: Enables keepmodes, which retains user modes across sessions
|
||||
*
|
||||
* This directive is optional, if left blank, the options will default to memo_signon, and
|
||||
@@ -124,9 +134,9 @@ module
|
||||
/*
|
||||
* The length of time before a nick's registration expires.
|
||||
*
|
||||
* This directive is optional, but recommended. If not set, the default is 90 days.
|
||||
* This directive is optional, but recommended. If not set, the default is one year.
|
||||
*/
|
||||
expire = 90d
|
||||
expire = 1y
|
||||
|
||||
/*
|
||||
* Prevents the use of the ACCESS and CERT (excluding their LIST subcommand), DROP, FORBID, SUSPEND
|
||||
@@ -219,6 +229,12 @@ module
|
||||
* This directive is optional. If not set it defaults to 50.
|
||||
*/
|
||||
maxpasslen = 50
|
||||
|
||||
/*
|
||||
* Whether all of the secondary nicks of a nick group have to expire or be
|
||||
dropped before the display nick can expire or be dropped.
|
||||
*/
|
||||
preservedisplay = no
|
||||
}
|
||||
|
||||
/*
|
||||
@@ -286,6 +302,12 @@ module
|
||||
{
|
||||
name = "ns_cert"
|
||||
|
||||
/*
|
||||
* Should users who are connected with a SSL client certificate have its fingerprint be added to
|
||||
* their account when they register. Defaults to yes.
|
||||
*/
|
||||
automatic = yes
|
||||
|
||||
/*
|
||||
* The maximum number of entries allowed on a nickname's certificate fingerprint list.
|
||||
* The default is 5. This number cannot be set to 0.
|
||||
@@ -500,8 +522,6 @@ command { service = "NickServ"; name = "RESETPASS"; command = "nickserv/resetpas
|
||||
* nickserv/set/email, nickserv/saset/email - Used for setting a users email address.
|
||||
* nickserv/set/keepmodes, nickserv/saset/keepmodes - Configure whether or not services should retain a user's modes across sessions.
|
||||
* nickserv/set/kill, nickserv/saset/kill - Used for configuring nickname protection.
|
||||
* nickserv/set/language, nickserv/saset/language - Used for configuring what language services use.
|
||||
* nickserv/set/message, nickserv/saset/message - Used to configure how services send messages to you.
|
||||
* nickserv/set/neverop, nickserv/saset/neverop - Used to configure whether a user can be added to access lists
|
||||
* nickserv/saset/noexpire - Used for configuring noexpire, which prevents nicks from expiring.
|
||||
* nickserv/set/password, nickserv/saset/password - Used for changing a users password.
|
||||
@@ -536,12 +556,6 @@ command { service = "NickServ"; name = "SASET KEEPMODES"; command = "nickserv/sa
|
||||
command { service = "NickServ"; name = "SET KILL"; command = "nickserv/set/kill"; }
|
||||
command { service = "NickServ"; name = "SASET KILL"; command = "nickserv/saset/kill"; permission = "nickserv/saset/kill"; }
|
||||
|
||||
command { service = "NickServ"; name = "SET LANGUAGE"; command = "nickserv/set/language"; }
|
||||
command { service = "NickServ"; name = "SASET LANGUAGE"; command = "nickserv/saset/language"; permission = "nickserv/saset/language"; }
|
||||
|
||||
command { service = "NickServ"; name = "SET MESSAGE"; command = "nickserv/set/message"; }
|
||||
command { service = "NickServ"; name = "SASET MESSAGE"; command = "nickserv/saset/message"; permission = "nickserv/saset/message"; }
|
||||
|
||||
command { service = "NickServ"; name = "SET PASSWORD"; command = "nickserv/set/password"; }
|
||||
command { service = "NickServ"; name = "SASET PASSWORD"; command = "nickserv/saset/password"; permission = "nickserv/saset/password"; }
|
||||
|
||||
@@ -550,6 +564,31 @@ command { service = "NickServ"; name = "SASET NEVEROP"; command = "nickserv/sase
|
||||
|
||||
command { service = "NickServ"; name = "SASET NOEXPIRE"; command = "nickserv/saset/noexpire"; permission = "nickserv/saset/noexpire"; }
|
||||
|
||||
/*
|
||||
* ns_set_language
|
||||
*
|
||||
* Provides the command nickserv/set/language and nickserv/saset/language.
|
||||
*
|
||||
* Allows configuring the language that services uses.
|
||||
*/
|
||||
module { name = "ns_set_language" }
|
||||
command { service = "NickServ"; name = "SET LANGUAGE"; command = "nickserv/set/language"; }
|
||||
command { service = "NickServ"; name = "SASET LANGUAGE"; command = "nickserv/saset/language"; permission = "nickserv/saset/language"; }
|
||||
|
||||
/*
|
||||
* ns_set_message
|
||||
*
|
||||
* Provides the command nickserv/set/message and nickserv/saset/message.
|
||||
*
|
||||
* Allows users to let services send them PRIVMSGs instead of NOTICEs.
|
||||
*
|
||||
* This might cause problems with badly written clients as the IRC RFC
|
||||
* requires that automatic responses to a PRIVMSG use a NOTICE to avoid
|
||||
* message loops. Only enable this if you are sure this can not happen.
|
||||
*/
|
||||
#module { name = "ns_set_message" }
|
||||
#command { service = "NickServ"; name = "SET MESSAGE"; command = "nickserv/set/message"; }
|
||||
#command { service = "NickServ"; name = "SASET MESSAGE"; command = "nickserv/saset/message"; permission = "nickserv/saset/message"; }
|
||||
|
||||
/*
|
||||
* ns_set_misc
|
||||
@@ -564,10 +603,10 @@ command { service = "NickServ"; name = "SET URL"; command = "nickserv/set/misc";
|
||||
command { service = "NickServ"; name = "SASET URL"; command = "nickserv/saset/misc"; misc_description = _("Associate a URL with this account"); permission = "nickserv/saset/url"; group = "nickserv/admin"; }
|
||||
#command { service = "NickServ"; name = "SET DISCORD"; command = "nickserv/set/misc"; misc_description = _("Associate a Discord account with your account"); }
|
||||
#command { service = "NickServ"; name = "SASET DISCORD"; command = "nickserv/saset/misc"; misc_description = _("Associate a Discord account with this account"); permission = "nickserv/saset/discord"; group = "nickserv/admin"; }
|
||||
#command { service = "NickServ"; name = "SET FACEBOOK"; command = "nickserv/set/misc"; misc_description = _("Associate a Facebook URL with your account"); }
|
||||
#command { service = "NickServ"; name = "SASET FACEBOOK"; command = "nickserv/saset/misc"; misc_description = _("Associate a Facebook URL with this account"); permission = "nickserv/saset/facebook"; group = "nickserv/admin"; }
|
||||
#command { service = "NickServ"; name = "SET MASTODON"; command = "nickserv/set/misc"; misc_description = _("Associate a Mastodon account with your account"); }
|
||||
#command { service = "NickServ"; name = "SASET MASTODON"; command = "nickserv/saset/misc"; misc_description = _("Associate a Mastodon account with this account"); permission = "nickserv/saset/mastodon"; group = "nickserv/admin"; }
|
||||
#command { service = "NickServ"; name = "SET TIMEZONE"; command = "nickserv/set/misc"; misc_description = _("Associate a time zone with your account"); }
|
||||
#command { service = "NickServ"; name = "SASET TIMEZONE"; command = "nickserv/saset/misc"; misc_description = _("Associate a time zone with this account"); permission = "nickserv/saset/timezone"; group = "nickserv/admin"; }
|
||||
|
||||
/*
|
||||
* ns_suspend
|
||||
|
||||
@@ -49,6 +49,17 @@ service
|
||||
* Prefixes may be given to the channels in the form of mode characters or prefix symbols.
|
||||
*/
|
||||
#channels = "@#services,#mychan"
|
||||
|
||||
/*
|
||||
* The server alias that can be used to securely message this service. If
|
||||
* your IRC server does not have an alias for this service you can set this
|
||||
* to an empty string to tell users to use /msg instead.
|
||||
*
|
||||
* This setting is ignored when options:servicealias is disabled.
|
||||
*
|
||||
* Defaults to the nick of the service if not set.
|
||||
*/
|
||||
#alias = "OS"
|
||||
}
|
||||
|
||||
/*
|
||||
@@ -503,7 +514,7 @@ command { service = "OperServ"; name = "RANDOMNEWS"; command = "operserv/randomn
|
||||
*
|
||||
* Used to NOOP a server, which prevents users from opering on that server.
|
||||
*/
|
||||
module { name = "os_noop" }
|
||||
#module { name = "os_noop" }
|
||||
command { service = "OperServ"; name = "NOOP"; command = "operserv/noop"; permission = "operserv/noop"; }
|
||||
|
||||
/*
|
||||
|
||||
@@ -371,12 +371,6 @@ options
|
||||
*/
|
||||
readtimeout = 5s
|
||||
|
||||
/*
|
||||
* Sets the interval between sending warning messages for program errors via
|
||||
* WALLOPS/GLOBOPS.
|
||||
*/
|
||||
warningtimeout = 4h
|
||||
|
||||
/*
|
||||
* If set, Anope will only show /stats o to IRC Operators. This directive
|
||||
* is optional.
|
||||
|
||||
@@ -1,3 +1,78 @@
|
||||
Anope Version 2.1.10
|
||||
--------------------
|
||||
Added support for NEXTBANS on UnrealIRCd.
|
||||
Changed hostmask access entries added by nick to use that nick as the default description.
|
||||
Changed modes to be handled internally in their split form.
|
||||
Changed ns_cert to notify a user that their certificate is being automatically added to their account.
|
||||
Fixed matching users against extended bans.
|
||||
Fixed parsing name-only extended bans on InspIRCd.
|
||||
Fixed respecting the preferred extended ban format on InspIRCd.
|
||||
Fixed the name of the cron script in the docs.
|
||||
Updated the list of supported IRCds.
|
||||
Updated the location of the Anope IRC channels
|
||||
|
||||
Anope Version 2.1.9
|
||||
-------------------
|
||||
Bumped the minimum supported version of UnrealIRCd to 6.
|
||||
Fixed granting IRC operator status to services operators.
|
||||
Fixed making users an IRC operator on InspIRCd.
|
||||
Fixed nonicknameownership on InspIRCd v4.
|
||||
Fixed some messages not being translatable.
|
||||
Fixed the Argon2 module not having test vectors.
|
||||
Increased the default nickname expiry period to one year.
|
||||
|
||||
Anope Version 2.1.8
|
||||
-------------------
|
||||
Added account identifiers to the nickserv/info output.
|
||||
Added support for bool, float, and uint SQL columns.
|
||||
Added the ability to automatically determine SQL column types based on the native type.
|
||||
Added UNIX socket support to mysql module.
|
||||
Changed smartjoin to use SendClearBans where available.
|
||||
Dropped support for MinGW in favour of native builds.
|
||||
Fixed parsing named extbans on InspIRCd.
|
||||
Fixed parsing SVSMODE and SVS2MODE from UnrealIRCd.
|
||||
Fixed sending global messages to remotely linked servers.
|
||||
Removed the services server name from the CTCP version response.
|
||||
|
||||
Anope Version 2.1.7
|
||||
-------------------
|
||||
Added importing of akick reasons, forbid reasons, opers and session exceptions to db_atheme.
|
||||
Added support for sending tag messages.
|
||||
Added the ability to look up account information of an authenticated user.
|
||||
Fixed a crash in ns_cert when an IRC user is not present during a nick registration.
|
||||
Fixed a null pointer dereference in the global module.
|
||||
Fixed a rare memory leak in os_akill and os_sxline.
|
||||
Improved the performance of some code that looks up the primary nick from an account.
|
||||
Removed the broken Catalan, Hungarian, and Russian translations.
|
||||
Reworked the protocol interface for sending messages.
|
||||
Updated the Turkish translation.
|
||||
|
||||
Anope Version 2.1.6
|
||||
-------------------
|
||||
Added opportunistic upgrading of TLS fingerprints to more secure algorithms on InspIRCd.
|
||||
Added support for logging out partially connected users on Plexus.
|
||||
Added the account registration time to nickserv/info.
|
||||
Changed ns_cert to automatically add a TLS fingerprint to new accounts if available.
|
||||
Clarified that a non-deprecated encryption module must be loaded.
|
||||
Fixed creating the runtime directory on Windows.
|
||||
Fixed mistakenly allowing badpasslimit to be set to a negative value.
|
||||
Fixed parsing backup TLS fingerprints on InspIRCd.
|
||||
Fixed parsing the flood mode on UnrealIRCd.
|
||||
Fixed parsing the history mode on UnrealIRCd.
|
||||
Fixed various iterator invalidation issues.
|
||||
Partially rewrote the Portuguese translation.
|
||||
Removed some incorrect strings from the Turkish translation.
|
||||
Renamed the --modulesdir option to --moduledir to match the name of other path options.
|
||||
|
||||
Anope Version 2.1.5
|
||||
-------------------
|
||||
Added an example systemd unit file.
|
||||
Added support for BIGLINES on UnrealIRCd.
|
||||
Bumped the minimum supported version of Bahamut to 2.0.
|
||||
Fixed truncating messages in global/global and global/server.
|
||||
Improved building Anope for use as a system package.
|
||||
Updated the Turkish translation.
|
||||
|
||||
Anope Version 2.1.4
|
||||
-------------------
|
||||
Added a check for a non-deprecated encryption module on start.
|
||||
|
||||
@@ -1,3 +1,35 @@
|
||||
Anope Version 2.1.10
|
||||
--------------------
|
||||
Added options:servicealias.
|
||||
Moved nickserv/set/message and nickserv/saset/message to the ns_set_message module.
|
||||
Removed options:useprivmsg.
|
||||
Removed options:usestrictprivmsg
|
||||
|
||||
Anope Version 2.1.9
|
||||
-------------------
|
||||
No significant changes.
|
||||
|
||||
Anope Version 2.1.8
|
||||
-------------------
|
||||
Added module:preservedisplay to the nickserv module.
|
||||
Added the nickserv/drop/display oper privilege.
|
||||
|
||||
Anope Version 2.1.7
|
||||
-------------------
|
||||
Moved nickserv/set/language and nickserv/saset/language to the ns_set_language module.
|
||||
Renamed module:expire for the cs_suspend module to suspendexpire.
|
||||
Renamed the FANTASIA privilege to FANTASY.
|
||||
|
||||
Anope Version 2.1.6
|
||||
-------------------
|
||||
Added module:automatic to the ns_cert module (defaults to yes).
|
||||
Removed module:use_server_side_mlock for the protocol modules (now always enabled).
|
||||
Removed module:use_server_side_topiclock for the protocol modules (now always enabled).
|
||||
|
||||
Anope Version 2.1.5
|
||||
-------------------
|
||||
Added the nickserv/drop/override and chanserv/drop/override oper privileges.
|
||||
|
||||
Anope Version 2.1.4
|
||||
-------------------
|
||||
Added the db_atheme module.
|
||||
|
||||
+1
-1
@@ -90,4 +90,4 @@ Anope DefCon
|
||||
6) Support
|
||||
|
||||
You might get DefCon support by posting on our online forum, or maybe on
|
||||
our #anope channel at /server irc.anope.org.
|
||||
our #anope channel at /server irc.teranova.net.
|
||||
|
||||
+5
-5
@@ -60,7 +60,7 @@ Note: You should also read the README and FAQ files!
|
||||
most likely not work!
|
||||
|
||||
If you need help, you should visit https://forum.anope.org/ or #anope on
|
||||
irc.anope.org. Provide *complete* error output, along with other relevant
|
||||
irc.teranova.net. Provide *complete* error output, along with other relevant
|
||||
information eg. OS, compiler and C++ library versions.
|
||||
See the README file for more information.
|
||||
|
||||
@@ -111,17 +111,17 @@ Note: You should also read the README and FAQ files!
|
||||
A crontab entry will allow you to check periodically whether Anope is
|
||||
still running, and restart it if not.
|
||||
|
||||
First rename the example.chk script that is in Anope path (by default,
|
||||
this is ~/anope/conf) to anope.chk and edit it. You'll need to
|
||||
First rename the cron.example.sh script that is in Anope path (by default,
|
||||
this is ~/anope/conf) to cron.sh and edit it. You'll need to
|
||||
modify the CONFIGURATION part of the file. Then ensure that the file is
|
||||
marked as executable by typing chmod +x anope.chk, and try to launch the
|
||||
marked as executable by typing chmod +x cron.sh, and try to launch the
|
||||
script to see if it works (Anope must not be running when you do this ;))
|
||||
|
||||
When this is done, you'll have to add the crontab entry. Type crontab -e.
|
||||
This will open the default text editor with the crontab file. Enter the
|
||||
following (with correct path):
|
||||
|
||||
*/5 * * * * /home/ircd/anope/conf/anope.chk >/dev/null 2>&1
|
||||
*/5 * * * * /home/ircd/anope/conf/cron.sh >/dev/null 2>&1
|
||||
|
||||
The */5 at the beginning means "check every 5 minutes". You may replace
|
||||
the 5 with other another number if you want (but less than 60). Consult
|
||||
|
||||
+5
-5
@@ -64,7 +64,7 @@ Note : Vous devrez également lire les fichiers README et FAQ !
|
||||
recommandée, et Anope ne fonctionnera probablement pas !
|
||||
|
||||
Si vous avez besoin d'aide, vous pouvez aller sur le site
|
||||
https://forum.anope.org/ ou le canal #anope sur irc.anope.org.
|
||||
https://forum.anope.org/ ou le canal #anope sur irc.teranova.net.
|
||||
Fournissez *l'essemble* des erreurs qui apparaîssent, en plus de
|
||||
toutes informations utiles, comme les versions de votre OS, du
|
||||
compilateur utilisé et de la librairie C++. Lisez le fichier README
|
||||
@@ -121,11 +121,11 @@ Note : Vous devrez également lire les fichiers README et FAQ !
|
||||
Une entrée crontab vous permettra de vérifier périodiquement si Anope
|
||||
est toujours en cours d'exécution et de le redémarrer s'il n'est pas.
|
||||
|
||||
D'abord renommez le script example.chk qui est dans les dossiers
|
||||
d'Anope (par défaut, ~/anope/conf) en anope.chk et modifiez-le.
|
||||
D'abord renommez le script cron.example.sh qui est dans les dossiers
|
||||
d'Anope (par défaut, ~/anope/conf) en cron.sh et modifiez-le.
|
||||
Vous aurez besoin de modifier la partie CONFIGURATION du fichier.
|
||||
Assurez-vous ensuite que le fichier est marqué comme exécutable en
|
||||
tapant chmod +x anope.chk et essayez de lancer le script pour voir
|
||||
tapant chmod +x cron.sh et essayez de lancer le script pour voir
|
||||
si cela fonctionne (Anope ne doit pas être en marche lorsque vous
|
||||
testez cela ;))
|
||||
|
||||
@@ -133,7 +133,7 @@ Note : Vous devrez également lire les fichiers README et FAQ !
|
||||
crontab -e. Cela va ouvrir l'éditeur de texte par défaut avec le
|
||||
fichier crontab. Entrez la ligne suivante (avec le chemin correct) :
|
||||
|
||||
*/5 * * * * /home/ircd/anope/conf/anope.chk > /dev/null 2>&1
|
||||
*/5 * * * * /home/ircd/anope/conf/cron.sh > /dev/null 2>&1
|
||||
|
||||
Le */5 au début signifie "vérifier toutes les 5 minutes". Vous pouvez
|
||||
remplacer le 5 par un autre numéro si vous voulez (mais moins de 60).
|
||||
|
||||
@@ -19,6 +19,8 @@ Anope Multi Language Support
|
||||
Then execute:
|
||||
dpkg-reconfigure locales
|
||||
|
||||
If you have already built Anope you will need to delete the build directory and rebuild from scratch.
|
||||
|
||||
Building Anope on Windows with gettext support is explained in docs/WIN32.txt
|
||||
|
||||
2) Adding a new language
|
||||
|
||||
+1
-1
@@ -111,7 +111,7 @@ Anope Modules
|
||||
Use modules at your own risk, and make sure you get them from a
|
||||
reputable source. You might get module support by contacting the module
|
||||
author, posting on our online forum, or maybe on our #anope channel
|
||||
at /server irc.anope.org.
|
||||
at /server irc.teranova.net.
|
||||
|
||||
7) Information for Developers
|
||||
|
||||
|
||||
+5
-5
@@ -166,14 +166,14 @@ Table of Contents
|
||||
|
||||
Anope currently works with:
|
||||
|
||||
* Bahamut 1.4.27 or later (including 1.8)
|
||||
* ircd-hybrid 8.2.23 or later
|
||||
* Bahamut 2.0 or later
|
||||
* InspIRCd 3 or later
|
||||
* ircd-hybrid 8.2.23 or later
|
||||
* ircd-ratbox 3 or later
|
||||
* ngIRCd 19.2 or later
|
||||
* Plexus 3 or later
|
||||
* Ratbox 2.0.6 or later
|
||||
* Solanum (all versions)
|
||||
* UnrealIRCd 4 or later
|
||||
* UnrealIRCd 6 or later
|
||||
|
||||
Anope could also work with some of the daemons derived by the ones listed
|
||||
above, but there's no support for them if they work or don't work.
|
||||
@@ -245,7 +245,7 @@ Table of Contents
|
||||
|
||||
If you read the documentation carefully, and didn't find the answer to
|
||||
your question, feel free to post on the website forums or join our irc
|
||||
channel (irc.anope.org #anope). Once you join our Support channel be as
|
||||
channel (irc.teranova.net #anope). Once you join our Support channel be as
|
||||
precise as possible when asking a question, because we have no extraordinary
|
||||
powers and can't guess things if they aren't provided.
|
||||
|
||||
|
||||
+5
-1
@@ -130,6 +130,8 @@ public:
|
||||
Anope::string language;
|
||||
/* Last time an email was sent to this user */
|
||||
time_t lastmail = 0;
|
||||
/* The time this account was registered */
|
||||
time_t time_registered = Anope::CurTime;
|
||||
MemoInfo memos;
|
||||
std::map<Anope::string, Anope::string> last_modes;
|
||||
|
||||
@@ -143,6 +145,8 @@ public:
|
||||
|
||||
/* Unsaved data */
|
||||
|
||||
/** The display nick for this account. */
|
||||
NickAlias *na = nullptr;
|
||||
/* Number of channels registered by this account */
|
||||
uint16_t channelcount = 0;
|
||||
/* Users online now logged into this account */
|
||||
@@ -161,7 +165,7 @@ public:
|
||||
/** Changes the display for this account
|
||||
* @param na The new display, must be grouped to this account.
|
||||
*/
|
||||
void SetDisplay(const NickAlias *na);
|
||||
void SetDisplay(NickAlias *na);
|
||||
|
||||
/** Checks whether this account is a services oper or not.
|
||||
* @return True if this account is a services oper, false otherwise.
|
||||
|
||||
+14
-7
@@ -601,6 +601,20 @@ namespace Anope
|
||||
/** Expands a module path. */
|
||||
inline auto ExpandModule(const Anope::string &path) { return Expand(ModuleDir, path); }
|
||||
|
||||
/** Formats a CTCP message for sending to a client.
|
||||
* @param name The name of the CTCP.
|
||||
* @param body If present then the body of the CTCP.
|
||||
* @return A formatted CTCP ready to send to a client.
|
||||
*/
|
||||
extern CoreExport Anope::string FormatCTCP(const Anope::string &name, const Anope::string &body = "");
|
||||
|
||||
/** Parses a CTCP message received from a client.
|
||||
* @param text The raw message to parse.
|
||||
* @param name The location to store the name of the CTCP.
|
||||
* @param body The location to store body of the CTCP if one is present.
|
||||
* @return True if the message was a well formed CTCP; otherwise, false.
|
||||
*/
|
||||
extern CoreExport bool ParseCTCP(const Anope::string &text, Anope::string &name, Anope::string &body);
|
||||
}
|
||||
|
||||
/** sepstream allows for splitting token separated lists.
|
||||
@@ -717,9 +731,6 @@ protected:
|
||||
*/
|
||||
Anope::string source;
|
||||
public:
|
||||
/** Default constructor, just uses the error message 'Core threw an exception'.
|
||||
*/
|
||||
CoreException() : err("Core threw an exception"), source("The core") { }
|
||||
/** This constructor can be used to specify an error message before throwing.
|
||||
*/
|
||||
CoreException(const Anope::string &message) : err(message), source("The core") { }
|
||||
@@ -750,10 +761,6 @@ class CoreExport ModuleException
|
||||
: public CoreException
|
||||
{
|
||||
public:
|
||||
/** Default constructor, just uses the error message 'Module threw an exception'.
|
||||
*/
|
||||
ModuleException() : CoreException("Module threw an exception", "A Module") { }
|
||||
|
||||
/** This constructor can be used to specify an error message before throwing.
|
||||
*/
|
||||
ModuleException(const Anope::string &message) : CoreException(message, "A Module") { }
|
||||
|
||||
@@ -31,6 +31,8 @@ public:
|
||||
time_t lastmsg;
|
||||
/* Map of actual command names -> service name/permission required */
|
||||
CommandInfo::map commands;
|
||||
/* The server-side alias used to message this bot. */
|
||||
Anope::string alias;
|
||||
/* Modes the bot should have as configured in service:modes */
|
||||
Anope::string botmodes;
|
||||
/* Channels the bot should be in as configured in service:channels */
|
||||
@@ -126,6 +128,9 @@ public:
|
||||
*/
|
||||
CommandInfo *GetCommand(const Anope::string &cname);
|
||||
|
||||
/** Get the command that users can use to send a message to this bot. */
|
||||
Anope::string GetQueryCommand() const;
|
||||
|
||||
/** Find a bot by nick
|
||||
* @param nick The nick
|
||||
* @param nick_only True to only look by nick, and not by UID
|
||||
|
||||
+1
-1
@@ -215,7 +215,7 @@ public:
|
||||
* @param mode the modes
|
||||
* @param enforce_mlock true to enforce mlock
|
||||
*/
|
||||
void SetModesInternal(MessageSource &source, const Anope::string &mode, time_t ts = 0, bool enforce_mlock = true);
|
||||
void SetModesInternal(MessageSource &source, const Anope::string &modes, const std::vector<Anope::string> ¶ms, time_t ts = 0, bool enforce_mlock = true);
|
||||
|
||||
/** Does the given user match the given list? (CMODE_BAN, CMODE_EXCEPT, etc, a list mode)
|
||||
* @param u The user
|
||||
|
||||
+2
-6
@@ -88,21 +88,17 @@ namespace Configuration
|
||||
{
|
||||
/* options:readtimeout */
|
||||
time_t ReadTimeout;
|
||||
/* options:useprivmsg */
|
||||
bool UsePrivmsg;
|
||||
/* If we should default to privmsging clients */
|
||||
bool DefPrivmsg;
|
||||
/* Default language */
|
||||
Anope::string DefLanguage;
|
||||
/* options:timeoutcheck */
|
||||
time_t TimeoutCheck;
|
||||
/* options:usestrictprivmsg */
|
||||
bool UseStrictPrivmsg;
|
||||
/* options:servicealias */
|
||||
bool ServiceAlias;
|
||||
/* networkinfo:nickchars */
|
||||
Anope::string NickChars;
|
||||
|
||||
/* either "/msg " or "/" */
|
||||
Anope::string StrictPrivmsg;
|
||||
/* List of uplink servers to try and connect to */
|
||||
std::vector<Uplink> Uplinks;
|
||||
/* A vector of our logfile options */
|
||||
|
||||
@@ -173,7 +173,7 @@ public:
|
||||
void ExtensibleSerialize(const Extensible *e, const Serializable *s, Serialize::Data &data) const override
|
||||
{
|
||||
T *t = this->Get(e);
|
||||
data[this->name] << *t;
|
||||
data.Store(this->name, *t);
|
||||
}
|
||||
|
||||
void ExtensibleUnserialize(Extensible *e, Serializable *s, Serialize::Data &data) override
|
||||
@@ -194,7 +194,7 @@ public:
|
||||
|
||||
void ExtensibleSerialize(const Extensible *e, const Serializable *s, Serialize::Data &data) const override
|
||||
{
|
||||
data[this->name] << true;
|
||||
data.Store(this->name, true);
|
||||
}
|
||||
|
||||
void ExtensibleUnserialize(Extensible *e, Serializable *s, Serialize::Data &data) override
|
||||
|
||||
+6
-6
@@ -65,9 +65,9 @@ namespace Language
|
||||
} // namespace Language
|
||||
|
||||
/* Commonly used language strings */
|
||||
#define CONFIRM_DROP _("Please confirm that you want to drop \002%s\002 with \002%s%s DROP %s %s\002")
|
||||
#define CONFIRM_DROP _("Please confirm that you want to drop \002%s\002 with \002%s DROP %s %s\002")
|
||||
#define SERVICE_UNAVAILABLE _("Sorry, %s is temporarily unavailable.")
|
||||
#define MORE_INFO _("\002%s%s HELP %s\002 for more information.")
|
||||
#define MORE_INFO _("\002%s HELP %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.")
|
||||
@@ -93,7 +93,7 @@ namespace Language
|
||||
#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_IS_SECURE _("This nickname is registered and protected. If it is your\n" \
|
||||
"nick, type \002%s%s IDENTIFY \037password\037\002. Otherwise,\n" \
|
||||
"nick, type \002%s IDENTIFY \037password\037\002. Otherwise,\n" \
|
||||
"please choose a different nick.")
|
||||
#define FORCENICKCHANGE_NOW _("This nickname has been registered; you may not use it.")
|
||||
#define NICK_CANNOT_BE_REGISTERED _("Nickname \002%s\002 may not be registered.")
|
||||
@@ -108,12 +108,12 @@ namespace Language
|
||||
#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 for channel \002%s\002:")
|
||||
#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.\n" \
|
||||
"Type \002%s%s READ %s %zu\002 to read it.")
|
||||
"Type \002%s READ %s %zu\002 to read it.")
|
||||
#define MEMO_NEW_MEMO_ARRIVED _("You have a new memo from %s.\n" \
|
||||
"Type \002%s%s READ %zu\002 to read it.")
|
||||
"Type \002%s READ %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.")
|
||||
|
||||
+3
-2
@@ -66,10 +66,11 @@ namespace Message
|
||||
* @param source The source of the SJOIN
|
||||
* @param chan The channel the users are joining to
|
||||
* @param ts The TS for the channel
|
||||
* @param modes The modes sent with the SJOIN, if any
|
||||
* @param modes The mode letters sent with the SJOIN, if any
|
||||
* @param modeparams The mode parameters sent with the SJOIN, if any
|
||||
* @param users The users and their status, if any
|
||||
*/
|
||||
static void SJoin(MessageSource &source, const Anope::string &chan, time_t ts, const Anope::string &modes, const std::list<SJoinUser> &users);
|
||||
static void SJoin(MessageSource &source, const Anope::string &chan, time_t ts, const Anope::string &modes, const std::vector<Anope::string> &modeparams, const std::list<SJoinUser> &users);
|
||||
};
|
||||
|
||||
struct CoreExport Kick
|
||||
|
||||
+4
-1
@@ -216,9 +216,12 @@ template<typename T>
|
||||
class CoreExport ChannelModeVirtual
|
||||
: public T
|
||||
{
|
||||
Anope::string base;
|
||||
private:
|
||||
ChannelMode *basech;
|
||||
|
||||
protected:
|
||||
Anope::string base;
|
||||
|
||||
public:
|
||||
ChannelModeVirtual(const Anope::string &mname, const Anope::string &basename);
|
||||
|
||||
|
||||
+120
-118
@@ -199,6 +199,8 @@ public:
|
||||
class CoreExport NotImplementedException final
|
||||
: public CoreException
|
||||
{
|
||||
public:
|
||||
NotImplementedException() : CoreException("") { }
|
||||
};
|
||||
|
||||
/** Every module in Anope is actually a class.
|
||||
@@ -288,7 +290,7 @@ public:
|
||||
* @param cu The user, channel, and status of the user being kicked
|
||||
* @param kickmsg The reason for the kick.
|
||||
*/
|
||||
virtual void OnPreUserKicked(const MessageSource &source, ChanUserContainer *cu, const Anope::string &kickmsg) { throw NotImplementedException(); }
|
||||
virtual void OnPreUserKicked(const MessageSource &source, ChanUserContainer *cu, const Anope::string &kickmsg) ATTR_NOT_NULL(3) { throw NotImplementedException(); }
|
||||
|
||||
/** Called when a user has been kicked from a channel.
|
||||
* @param source The kicker
|
||||
@@ -297,13 +299,13 @@ public:
|
||||
* @param status The status the kicked user had on the channel before they were kicked
|
||||
* @param kickmsg The reason for the kick.
|
||||
*/
|
||||
virtual void OnUserKicked(const MessageSource &source, User *target, const Anope::string &channel, ChannelStatus &status, const Anope::string &kickmsg) { throw NotImplementedException(); }
|
||||
virtual void OnUserKicked(const MessageSource &source, User *target, const Anope::string &channel, ChannelStatus &status, const Anope::string &kickmsg) ATTR_NOT_NULL(3) { throw NotImplementedException(); }
|
||||
|
||||
/** Called when the configuration is being (re)loaded.
|
||||
* @param conf The config that is being built now and will replace the global Config object
|
||||
* @throws A ConfigException to abort the config (re)loading process.
|
||||
*/
|
||||
virtual void OnReload(Configuration::Conf *conf) { throw NotImplementedException(); }
|
||||
virtual void OnReload(Configuration::Conf *conf) ATTR_NOT_NULL(2) { throw NotImplementedException(); }
|
||||
|
||||
/** Called before a bot is assigned to a channel.
|
||||
* @param sender The user assigning the bot
|
||||
@@ -311,35 +313,35 @@ public:
|
||||
* @param bi The bot being assigned.
|
||||
* @return EVENT_CONTINUE to let other modules decide, EVENT_STOP to deny the assign.
|
||||
*/
|
||||
virtual EventReturn OnPreBotAssign(User *sender, ChannelInfo *ci, BotInfo *bi) { throw NotImplementedException(); }
|
||||
virtual EventReturn OnPreBotAssign(User *sender, ChannelInfo *ci, BotInfo *bi) ATTR_NOT_NULL(2, 3, 4) { throw NotImplementedException(); }
|
||||
|
||||
/** Called when a bot is assigned ot a channel
|
||||
*/
|
||||
virtual void OnBotAssign(User *sender, ChannelInfo *ci, BotInfo *bi) { throw NotImplementedException(); }
|
||||
virtual void OnBotAssign(User *sender, ChannelInfo *ci, BotInfo *bi) ATTR_NOT_NULL(2, 3, 4) { throw NotImplementedException(); }
|
||||
|
||||
/** Called before a bot is unassigned from a channel.
|
||||
* @param sender The user unassigning the bot
|
||||
* @param ci The channel the bot is being removed from
|
||||
* @return EVENT_CONTINUE to let other modules decide, EVENT_STOP to deny the unassign.
|
||||
*/
|
||||
virtual EventReturn OnBotUnAssign(User *sender, ChannelInfo *ci) { throw NotImplementedException(); }
|
||||
virtual EventReturn OnBotUnAssign(User *sender, ChannelInfo *ci) ATTR_NOT_NULL(3) { throw NotImplementedException(); }
|
||||
|
||||
/** Called when a new user connects to the network.
|
||||
* @param u The connecting user.
|
||||
* @param exempt set to true/is true if the user should be excepted from bans etc
|
||||
*/
|
||||
virtual void OnUserConnect(User *u, bool &exempt) { throw NotImplementedException(); }
|
||||
virtual void OnUserConnect(User *u, bool &exempt) ATTR_NOT_NULL(2) { throw NotImplementedException(); }
|
||||
|
||||
/** Called when a new server connects to the network.
|
||||
* @param s The server that has connected to the network
|
||||
*/
|
||||
virtual void OnNewServer(Server *s) { throw NotImplementedException(); }
|
||||
virtual void OnNewServer(Server *s) ATTR_NOT_NULL(2) { throw NotImplementedException(); }
|
||||
|
||||
/** Called after a user changed the nick
|
||||
* @param u The user.
|
||||
* @param oldnick The old nick of the user
|
||||
*/
|
||||
virtual void OnUserNickChange(User *u, const Anope::string &oldnick) { throw NotImplementedException(); }
|
||||
virtual void OnUserNickChange(User *u, const Anope::string &oldnick) ATTR_NOT_NULL(2) { throw NotImplementedException(); }
|
||||
|
||||
/** Called when someone uses the generic/help command
|
||||
* @param source Command source
|
||||
@@ -360,14 +362,14 @@ public:
|
||||
* @param params The parameters the user is sending
|
||||
* @return EVENT_CONTINUE to let other modules decide, EVENT_STOP to halt the command and not process it
|
||||
*/
|
||||
virtual EventReturn OnPreCommand(CommandSource &source, Command *command, std::vector<Anope::string> ¶ms) { throw NotImplementedException(); }
|
||||
virtual EventReturn OnPreCommand(CommandSource &source, Command *command, std::vector<Anope::string> ¶ms) ATTR_NOT_NULL(3) { throw NotImplementedException(); }
|
||||
|
||||
/** Called after a command has been executed.
|
||||
* @param source The source of the command
|
||||
* @param command The command the user executed
|
||||
* @param params The parameters the user sent
|
||||
*/
|
||||
virtual void OnPostCommand(CommandSource &source, Command *command, const std::vector<Anope::string> ¶ms) { throw NotImplementedException(); }
|
||||
virtual void OnPostCommand(CommandSource &source, Command *command, const std::vector<Anope::string> ¶ms) ATTR_NOT_NULL(3) { throw NotImplementedException(); }
|
||||
|
||||
/** Called when the databases are saved
|
||||
*/
|
||||
@@ -389,7 +391,7 @@ public:
|
||||
* @param params The params
|
||||
* @return EVENT_STOP to halt processing and not run the command, EVENT_ALLOW to allow the command to be executed
|
||||
*/
|
||||
virtual EventReturn OnBotFantasy(CommandSource &source, Command *c, ChannelInfo *ci, const std::vector<Anope::string> ¶ms) { throw NotImplementedException(); }
|
||||
virtual EventReturn OnBotFantasy(CommandSource &source, Command *c, ChannelInfo *ci, const std::vector<Anope::string> ¶ms) ATTR_NOT_NULL(3, 4) { throw NotImplementedException(); }
|
||||
|
||||
/** Called on fantasy command without access
|
||||
* @param source The source of the command
|
||||
@@ -398,31 +400,31 @@ public:
|
||||
* @param params The params
|
||||
* @return EVENT_STOP to halt processing and not run the command, EVENT_ALLOW to allow the command to be executed
|
||||
*/
|
||||
virtual EventReturn OnBotNoFantasyAccess(CommandSource &source, Command *c, ChannelInfo *ci, const std::vector<Anope::string> ¶ms) { throw NotImplementedException(); }
|
||||
virtual EventReturn OnBotNoFantasyAccess(CommandSource &source, Command *c, ChannelInfo *ci, const std::vector<Anope::string> ¶ms) ATTR_NOT_NULL(3, 4) { throw NotImplementedException(); }
|
||||
|
||||
/** Called when a bot places a ban
|
||||
* @param u User being banned
|
||||
* @param ci Channel the ban is placed on
|
||||
* @param mask The mask being banned
|
||||
*/
|
||||
virtual void OnBotBan(User *u, ChannelInfo *ci, const Anope::string &mask) { throw NotImplementedException(); }
|
||||
virtual void OnBotBan(User *u, ChannelInfo *ci, const Anope::string &mask) ATTR_NOT_NULL(2, 3) { throw NotImplementedException(); }
|
||||
|
||||
/** Called before a badword is added to the badword list
|
||||
* @param ci The channel
|
||||
* @param bw The badword
|
||||
*/
|
||||
virtual void OnBadWordAdd(ChannelInfo *ci, const BadWord *bw) { throw NotImplementedException(); }
|
||||
virtual void OnBadWordAdd(ChannelInfo *ci, const 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) { throw NotImplementedException(); }
|
||||
virtual void OnBadWordDel(ChannelInfo *ci, const BadWord *bw) ATTR_NOT_NULL(2, 3) { throw NotImplementedException(); }
|
||||
|
||||
/** Called when a bot is created or destroyed
|
||||
*/
|
||||
virtual void OnCreateBot(BotInfo *bi) { throw NotImplementedException(); }
|
||||
virtual void OnDelBot(BotInfo *bi) { throw NotImplementedException(); }
|
||||
virtual void OnCreateBot(BotInfo *bi) ATTR_NOT_NULL(2) { throw NotImplementedException(); }
|
||||
virtual void OnDelBot(BotInfo *bi) ATTR_NOT_NULL(2) { throw NotImplementedException(); }
|
||||
|
||||
/** Called before a bot kicks a user
|
||||
* @param bi The bot sending the kick
|
||||
@@ -431,13 +433,13 @@ public:
|
||||
* @param reason The reason
|
||||
* @return EVENT_CONTINUE to let other modules decide, EVENT_STOP to halt the command and not process it
|
||||
*/
|
||||
virtual EventReturn OnBotKick(BotInfo *bi, Channel *c, User *u, const Anope::string &reason) { throw NotImplementedException(); }
|
||||
virtual EventReturn OnBotKick(BotInfo *bi, Channel *c, User *u, const Anope::string &reason) ATTR_NOT_NULL(2, 3, 4) { throw NotImplementedException(); }
|
||||
|
||||
/** Called before a user parts a channel
|
||||
* @param u The user
|
||||
* @param c The channel
|
||||
*/
|
||||
virtual void OnPrePartChannel(User *u, Channel *c) {}
|
||||
virtual void OnPrePartChannel(User *u, Channel *c) ATTR_NOT_NULL(2, 3) { throw NotImplementedException(); }
|
||||
|
||||
/** Called when a user parts a channel
|
||||
* @param u The user
|
||||
@@ -445,14 +447,14 @@ public:
|
||||
* @param channel The channel name
|
||||
* @param msg The part reason
|
||||
*/
|
||||
virtual void OnPartChannel(User *u, Channel *c, const Anope::string &channel, const Anope::string &msg) { throw NotImplementedException(); }
|
||||
virtual void OnPartChannel(User *u, Channel *c, const Anope::string &channel, const Anope::string &msg) ATTR_NOT_NULL(2, 3) { throw NotImplementedException(); }
|
||||
|
||||
/** Called when a user leaves a channel.
|
||||
* From either parting, being kicked, or quitting/killed!
|
||||
* @param u The user
|
||||
* @param c The channel
|
||||
*/
|
||||
virtual void OnLeaveChannel(User *u, Channel *c) { throw NotImplementedException(); }
|
||||
virtual void OnLeaveChannel(User *u, Channel *c) ATTR_NOT_NULL(2, 3) { throw NotImplementedException(); }
|
||||
|
||||
/** Called after a user joins a channel
|
||||
* If this event triggers the user is allowed to be in the channel, and will
|
||||
@@ -461,7 +463,7 @@ public:
|
||||
* @param u The user
|
||||
* @param channel The channel
|
||||
*/
|
||||
virtual void OnJoinChannel(User *u, Channel *c) { throw NotImplementedException(); }
|
||||
virtual void OnJoinChannel(User *u, Channel *c) ATTR_NOT_NULL(2, 3) { throw NotImplementedException(); }
|
||||
|
||||
/** Called when a new topic is set
|
||||
* @param source The user changing the topic, if any
|
||||
@@ -469,18 +471,18 @@ public:
|
||||
* @param setter The user who set the new topic, if there is no source
|
||||
* @param topic The new topic
|
||||
*/
|
||||
virtual void OnTopicUpdated(User *source, Channel *c, const Anope::string &user, const Anope::string &topic) { throw NotImplementedException(); }
|
||||
virtual void OnTopicUpdated(User *source, Channel *c, const Anope::string &user, const Anope::string &topic) ATTR_NOT_NULL(3) { throw NotImplementedException(); }
|
||||
|
||||
/** Called before a channel expires
|
||||
* @param ci The channel
|
||||
* @param expire Set to true to allow the chan to expire
|
||||
*/
|
||||
virtual void OnPreChanExpire(ChannelInfo *ci, bool &expire) { throw NotImplementedException(); }
|
||||
virtual void OnPreChanExpire(ChannelInfo *ci, bool &expire) ATTR_NOT_NULL(2) { throw NotImplementedException(); }
|
||||
|
||||
/** Called before a channel expires
|
||||
* @param ci The channel
|
||||
*/
|
||||
virtual void OnChanExpire(ChannelInfo *ci) { throw NotImplementedException(); }
|
||||
virtual void OnChanExpire(ChannelInfo *ci) ATTR_NOT_NULL(2) { throw NotImplementedException(); }
|
||||
|
||||
/** Called before Anope connects to its uplink
|
||||
*/
|
||||
@@ -492,7 +494,7 @@ public:
|
||||
|
||||
/** Called when we are almost done synching with the uplink, just before we send the EOB
|
||||
*/
|
||||
virtual void OnPreUplinkSync(Server *serv) { throw NotImplementedException(); }
|
||||
virtual void OnPreUplinkSync(Server *serv) ATTR_NOT_NULL(2) { throw NotImplementedException(); }
|
||||
|
||||
/** Called when Anope disconnects from its uplink, before it tries to reconnect
|
||||
*/
|
||||
@@ -510,12 +512,12 @@ public:
|
||||
* @param na The nick
|
||||
* @param expire Set to true to allow the nick to expire
|
||||
*/
|
||||
virtual void OnPreNickExpire(NickAlias *na, bool &expire) { throw NotImplementedException(); }
|
||||
virtual void OnPreNickExpire(NickAlias *na, bool &expire) ATTR_NOT_NULL(2) { throw NotImplementedException(); }
|
||||
|
||||
/** Called when a nick drops
|
||||
* @param na The nick
|
||||
*/
|
||||
virtual void OnNickExpire(NickAlias *na) { throw NotImplementedException(); }
|
||||
virtual void OnNickExpire(NickAlias *na) ATTR_NOT_NULL(2) { throw NotImplementedException(); }
|
||||
|
||||
/** Called when defcon level changes
|
||||
* @param level The level
|
||||
@@ -526,13 +528,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) { throw NotImplementedException(); }
|
||||
virtual EventReturn OnExceptionAdd(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) { throw NotImplementedException(); }
|
||||
virtual void OnExceptionDel(CommandSource &source, Exception *ex) ATTR_NOT_NULL(3) { throw NotImplementedException(); }
|
||||
|
||||
/** Called before a XLine is added
|
||||
* @param source The source of the XLine
|
||||
@@ -540,31 +542,31 @@ public:
|
||||
* @param xlm The xline manager it was added to
|
||||
* @return EVENT_CONTINUE to let other modules decide, EVENT_STOP to halt the command and not process it
|
||||
*/
|
||||
virtual EventReturn OnAddXLine(CommandSource &source, const XLine *x, XLineManager *xlm) { throw NotImplementedException(); }
|
||||
virtual EventReturn OnAddXLine(CommandSource &source, const XLine *x, XLineManager *xlm) ATTR_NOT_NULL(3, 4) { throw NotImplementedException(); }
|
||||
|
||||
/** Called before a XLine is deleted
|
||||
* @param source The source of the XLine
|
||||
* @param x The XLine
|
||||
* @param xlm The xline manager it was deleted from
|
||||
*/
|
||||
virtual void OnDelXLine(CommandSource &source, const XLine *x, XLineManager *xlm) { throw NotImplementedException(); }
|
||||
virtual void OnDelXLine(CommandSource &source, const XLine *x, XLineManager *xlm) ATTR_NOT_NULL(4) { throw NotImplementedException(); }
|
||||
|
||||
/** Called when a user is checked for whether they are a services oper
|
||||
* @param u The user
|
||||
* @return EVENT_ALLOW to allow, anything else to deny
|
||||
*/
|
||||
virtual EventReturn IsServicesOper(User *u) { throw NotImplementedException(); }
|
||||
virtual EventReturn IsServicesOper(User *u) ATTR_NOT_NULL(2) { throw NotImplementedException(); }
|
||||
|
||||
/** Called when a server quits
|
||||
* @param server The server
|
||||
*/
|
||||
virtual void OnServerQuit(Server *server) { throw NotImplementedException(); }
|
||||
virtual void OnServerQuit(Server *server) ATTR_NOT_NULL(2) { throw NotImplementedException(); }
|
||||
|
||||
/** Called when a user quits, or is killed
|
||||
* @param u The user
|
||||
* @param msg The quit message
|
||||
*/
|
||||
virtual void OnUserQuit(User *u, const Anope::string &msg) { throw NotImplementedException(); }
|
||||
virtual void OnUserQuit(User *u, const Anope::string &msg) ATTR_NOT_NULL(2) { throw NotImplementedException(); }
|
||||
|
||||
/** Called when a user is quit, before and after being internally removed from
|
||||
* This is different from OnUserQuit, which takes place at the time of the quit.
|
||||
@@ -572,43 +574,43 @@ public:
|
||||
* all lists (channels, user list, etc)
|
||||
* @param u The user
|
||||
*/
|
||||
virtual void OnPreUserLogoff(User *u) { throw NotImplementedException(); }
|
||||
virtual void OnPostUserLogoff(User *u) { throw NotImplementedException(); }
|
||||
virtual void OnPreUserLogoff(User *u) ATTR_NOT_NULL(2) { throw NotImplementedException(); }
|
||||
virtual void OnPostUserLogoff(User *u) ATTR_NOT_NULL(2) { throw NotImplementedException(); }
|
||||
|
||||
/** Called when a new bot is made
|
||||
* @param bi The bot
|
||||
*/
|
||||
virtual void OnBotCreate(BotInfo *bi) { throw NotImplementedException(); }
|
||||
virtual void OnBotCreate(BotInfo *bi) ATTR_NOT_NULL(2) { throw NotImplementedException(); }
|
||||
|
||||
/** Called when a bot is changed
|
||||
* @param bi The bot
|
||||
*/
|
||||
virtual void OnBotChange(BotInfo *bi) { throw NotImplementedException(); }
|
||||
virtual void OnBotChange(BotInfo *bi) ATTR_NOT_NULL(2) { throw NotImplementedException(); }
|
||||
|
||||
/** Called when a bot is deleted
|
||||
* @param bi The bot
|
||||
*/
|
||||
virtual void OnBotDelete(BotInfo *bi) { throw NotImplementedException(); }
|
||||
virtual void OnBotDelete(BotInfo *bi) ATTR_NOT_NULL(2) { throw NotImplementedException(); }
|
||||
|
||||
/** Called after an access entry is deleted from a channel
|
||||
* @param ci The channel
|
||||
* @param source The source of the command
|
||||
* @param access The access entry that was removed
|
||||
*/
|
||||
virtual void OnAccessDel(ChannelInfo *ci, CommandSource &source, ChanAccess *access) { throw NotImplementedException(); }
|
||||
virtual void OnAccessDel(ChannelInfo *ci, CommandSource &source, ChanAccess *access) ATTR_NOT_NULL(2, 4) { throw NotImplementedException(); }
|
||||
|
||||
/** Called when access is added
|
||||
* @param ci The channel
|
||||
* @param source The source of the command
|
||||
* @param access The access changed
|
||||
*/
|
||||
virtual void OnAccessAdd(ChannelInfo *ci, CommandSource &source, ChanAccess *access) { throw NotImplementedException(); }
|
||||
virtual void OnAccessAdd(ChannelInfo *ci, CommandSource &source, ChanAccess *access) ATTR_NOT_NULL(2, 4) { throw NotImplementedException(); }
|
||||
|
||||
/** Called when the access list is cleared
|
||||
* @param ci The channel
|
||||
* @param u The user who cleared the access
|
||||
*/
|
||||
virtual void OnAccessClear(ChannelInfo *ci, CommandSource &source) { throw NotImplementedException(); }
|
||||
virtual void OnAccessClear(ChannelInfo *ci, CommandSource &source) ATTR_NOT_NULL(2) { throw NotImplementedException(); }
|
||||
|
||||
/** Called when a level for a channel is changed
|
||||
* @param source The source of the command
|
||||
@@ -616,63 +618,63 @@ public:
|
||||
* @param priv The privilege changed
|
||||
* @param what The new level
|
||||
*/
|
||||
virtual void OnLevelChange(CommandSource &source, ChannelInfo *ci, const Anope::string &priv, int16_t what) { throw NotImplementedException(); }
|
||||
virtual void OnLevelChange(CommandSource &source, ChannelInfo *ci, const Anope::string &priv, int16_t what) ATTR_NOT_NULL(3) { throw NotImplementedException(); }
|
||||
|
||||
/** Called right before a channel is dropped
|
||||
* @param source The user dropping the channel
|
||||
* @param ci The channel
|
||||
*/
|
||||
virtual EventReturn OnChanDrop(CommandSource &source, ChannelInfo *ci) { throw NotImplementedException(); }
|
||||
virtual EventReturn OnChanDrop(CommandSource &source, ChannelInfo *ci) ATTR_NOT_NULL(3) { throw NotImplementedException(); }
|
||||
|
||||
/** Called when a channel is registered
|
||||
* @param ci The channel
|
||||
*/
|
||||
virtual void OnChanRegistered(ChannelInfo *ci) { throw NotImplementedException(); }
|
||||
virtual void OnChanRegistered(ChannelInfo *ci) ATTR_NOT_NULL(2) { throw NotImplementedException(); }
|
||||
|
||||
/** Called when a channel is suspended
|
||||
* @param ci The channel
|
||||
*/
|
||||
virtual void OnChanSuspend(ChannelInfo *ci) { throw NotImplementedException(); }
|
||||
virtual void OnChanSuspend(ChannelInfo *ci) ATTR_NOT_NULL(2) { throw NotImplementedException(); }
|
||||
|
||||
/** Called when a channel is unsuspended
|
||||
* @param ci The channel
|
||||
*/
|
||||
virtual void OnChanUnsuspend(ChannelInfo *ci) { throw NotImplementedException(); }
|
||||
virtual void OnChanUnsuspend(ChannelInfo *ci) ATTR_NOT_NULL(2) { throw NotImplementedException(); }
|
||||
|
||||
/** Called when a channel is being created, for any reason
|
||||
* @param ci The channel
|
||||
*/
|
||||
virtual void OnCreateChan(ChannelInfo *ci) { throw NotImplementedException(); }
|
||||
virtual void OnCreateChan(ChannelInfo *ci) ATTR_NOT_NULL(2) { throw NotImplementedException(); }
|
||||
|
||||
/** Called when a channel is being deleted, for any reason
|
||||
* @param ci The channel
|
||||
*/
|
||||
virtual void OnDelChan(ChannelInfo *ci) { throw NotImplementedException(); }
|
||||
virtual void OnDelChan(ChannelInfo *ci) ATTR_NOT_NULL(2) { throw NotImplementedException(); }
|
||||
|
||||
/** Called when a new channel is created
|
||||
* Note that this channel may not be introduced to the uplink at this point.
|
||||
* @param c The channel
|
||||
*/
|
||||
virtual void OnChannelCreate(Channel *c) { throw NotImplementedException(); }
|
||||
virtual void OnChannelCreate(Channel *c) ATTR_NOT_NULL(2) { throw NotImplementedException(); }
|
||||
|
||||
/** Called when a channel is deleted
|
||||
* @param c The channel
|
||||
*/
|
||||
virtual void OnChannelDelete(Channel *c) { throw NotImplementedException(); }
|
||||
virtual void OnChannelDelete(Channel *c) ATTR_NOT_NULL(2) { throw NotImplementedException(); }
|
||||
|
||||
/** Called after adding an akick to a channel
|
||||
* @param source The source of the command
|
||||
* @param ci The channel
|
||||
* @param ak The akick
|
||||
*/
|
||||
virtual void OnAkickAdd(CommandSource &source, ChannelInfo *ci, const AutoKick *ak) { throw NotImplementedException(); }
|
||||
virtual void OnAkickAdd(CommandSource &source, ChannelInfo *ci, const 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) { throw NotImplementedException(); }
|
||||
virtual void OnAkickDel(CommandSource &source, ChannelInfo *ci, const 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
|
||||
@@ -682,7 +684,7 @@ public:
|
||||
* @param reason The reason for the kick
|
||||
* @return EVENT_STOP to prevent the user from joining by kicking/banning the user
|
||||
*/
|
||||
virtual EventReturn OnCheckKick(User *u, Channel *c, Anope::string &mask, Anope::string &reason) { throw NotImplementedException(); }
|
||||
virtual EventReturn OnCheckKick(User *u, Channel *c, Anope::string &mask, Anope::string &reason) ATTR_NOT_NULL(2, 3) { throw NotImplementedException(); }
|
||||
|
||||
/** Called when a user requests info for a channel
|
||||
* @param source The user requesting info
|
||||
@@ -690,109 +692,109 @@ public:
|
||||
* @param info Data to show the user requesting information
|
||||
* @param show_hidden true if we should show the user everything
|
||||
*/
|
||||
virtual void OnChanInfo(CommandSource &source, ChannelInfo *ci, InfoFormatter &info, bool show_hidden) { throw NotImplementedException(); }
|
||||
virtual void OnChanInfo(CommandSource &source, ChannelInfo *ci, InfoFormatter &info, bool show_hidden) ATTR_NOT_NULL(3) { throw NotImplementedException(); }
|
||||
|
||||
/** Checks if access has the channel privilege 'priv'.
|
||||
* @param access THe access struct
|
||||
* @param priv The privilege being checked for
|
||||
* @return EVENT_ALLOW for yes, EVENT_STOP to stop all processing
|
||||
*/
|
||||
virtual EventReturn OnCheckPriv(const ChanAccess *access, const Anope::string &priv) { throw NotImplementedException(); }
|
||||
virtual EventReturn OnCheckPriv(const ChanAccess *access, const Anope::string &priv) ATTR_NOT_NULL(2) { throw NotImplementedException(); }
|
||||
|
||||
/** Check whether an access group has a privilege
|
||||
* @param group The group
|
||||
* @param priv The privilege
|
||||
* @return MOD_ALLOW to allow, MOD_STOP to stop
|
||||
*/
|
||||
virtual EventReturn OnGroupCheckPriv(const AccessGroup *group, const Anope::string &priv) { throw NotImplementedException(); }
|
||||
virtual EventReturn OnGroupCheckPriv(const AccessGroup *group, const Anope::string &priv) ATTR_NOT_NULL(2) { throw NotImplementedException(); }
|
||||
|
||||
/** Called when a nick is dropped
|
||||
* @param source The source of the command
|
||||
* @param na The nick
|
||||
*/
|
||||
virtual void OnNickDrop(CommandSource &source, NickAlias *na) { throw NotImplementedException(); }
|
||||
virtual void OnNickDrop(CommandSource &source, NickAlias *na) ATTR_NOT_NULL(3) { throw NotImplementedException(); }
|
||||
|
||||
/** Called when a user groups their nick
|
||||
* @param u The user grouping
|
||||
* @param target The target they're grouping to
|
||||
*/
|
||||
virtual void OnNickGroup(User *u, NickAlias *target) { throw NotImplementedException(); }
|
||||
virtual void OnNickGroup(User *u, NickAlias *target) ATTR_NOT_NULL(2, 3) { throw NotImplementedException(); }
|
||||
|
||||
/** Called when a user identifies to a nick
|
||||
* @param u The user
|
||||
*/
|
||||
virtual void OnNickIdentify(User *u) { throw NotImplementedException(); }
|
||||
virtual void OnNickIdentify(User *u) ATTR_NOT_NULL(2) { throw NotImplementedException(); }
|
||||
|
||||
/** Called when a user is logged into an account
|
||||
* @param u The user
|
||||
*/
|
||||
virtual void OnUserLogin(User *u) { throw NotImplementedException(); }
|
||||
virtual void OnUserLogin(User *u) ATTR_NOT_NULL(2) { throw NotImplementedException(); }
|
||||
|
||||
/** Called when a nick logs out
|
||||
* @param u The nick
|
||||
*/
|
||||
virtual void OnNickLogout(User *u) { throw NotImplementedException(); }
|
||||
virtual void OnNickLogout(User *u) ATTR_NOT_NULL(2) { throw NotImplementedException(); }
|
||||
|
||||
/** Called when a nick is registered
|
||||
* @param user The user registering the nick, of any
|
||||
* @param The nick
|
||||
* @param pass The password of the newly registered nick
|
||||
*/
|
||||
virtual void OnNickRegister(User *user, NickAlias *na, const Anope::string &pass) { throw NotImplementedException(); }
|
||||
virtual void OnNickRegister(User *user, NickAlias *na, const Anope::string &pass) ATTR_NOT_NULL(3) { throw NotImplementedException(); }
|
||||
|
||||
/** Called when a nick is confirmed. This will never be called if registration confirmation is not enabled.
|
||||
* @param user The user confirming the nick
|
||||
* @param The account being confirmed
|
||||
* @param nc The account being confirmed
|
||||
*/
|
||||
virtual void OnNickConfirm(User *user, NickCore *) { throw NotImplementedException(); }
|
||||
virtual void OnNickConfirm(User *user, NickCore *nc) ATTR_NOT_NULL(2, 3) { throw NotImplementedException(); }
|
||||
|
||||
/** Called when a nick is suspended
|
||||
* @param na The nick alias
|
||||
*/
|
||||
virtual void OnNickSuspend(NickAlias *na) { throw NotImplementedException(); }
|
||||
virtual void OnNickSuspend(NickAlias *na) ATTR_NOT_NULL(2) { throw NotImplementedException(); }
|
||||
|
||||
/** Called when a nick is unsuspended
|
||||
* @param na The nick alias
|
||||
*/
|
||||
virtual void OnNickUnsuspended(NickAlias *na) { throw NotImplementedException(); }
|
||||
virtual void OnNickUnsuspended(NickAlias *na) ATTR_NOT_NULL(2) { throw NotImplementedException(); }
|
||||
|
||||
/** Called on delnick()
|
||||
* @ param na pointer to the nickalias
|
||||
*/
|
||||
virtual void OnDelNick(NickAlias *na) { throw NotImplementedException(); }
|
||||
virtual void OnDelNick(NickAlias *na) ATTR_NOT_NULL(2) { throw NotImplementedException(); }
|
||||
|
||||
/** Called when a nickcore is created
|
||||
* @param nc The nickcore
|
||||
*/
|
||||
virtual void OnNickCoreCreate(NickCore *nc) { throw NotImplementedException(); }
|
||||
virtual void OnNickCoreCreate(NickCore *nc) ATTR_NOT_NULL(2) { throw NotImplementedException(); }
|
||||
|
||||
/** Called on delcore()
|
||||
* @param nc pointer to the NickCore
|
||||
*/
|
||||
virtual void OnDelCore(NickCore *nc) { throw NotImplementedException(); }
|
||||
virtual void OnDelCore(NickCore *nc) ATTR_NOT_NULL(2) { throw NotImplementedException(); }
|
||||
|
||||
/** Called on change_core_display()
|
||||
* @param nc pointer to the NickCore
|
||||
* @param newdisplay the new display
|
||||
*/
|
||||
virtual void OnChangeCoreDisplay(NickCore *nc, const Anope::string &newdisplay) { throw NotImplementedException(); }
|
||||
virtual void OnChangeCoreDisplay(NickCore *nc, const Anope::string &newdisplay) ATTR_NOT_NULL(2) { throw NotImplementedException(); }
|
||||
|
||||
/** called from NickCore::ClearCert()
|
||||
* @param nc pointer to the NickCore
|
||||
*/
|
||||
virtual void OnNickClearCert(NickCore *nc) { throw NotImplementedException(); }
|
||||
virtual void OnNickClearCert(NickCore *nc) ATTR_NOT_NULL(2) { throw NotImplementedException(); }
|
||||
|
||||
/** Called when a user adds an entry to their cert list
|
||||
* @param nc The nick
|
||||
* @param entry The entry
|
||||
*/
|
||||
virtual void OnNickAddCert(NickCore *nc, const Anope::string &entry) { throw NotImplementedException(); }
|
||||
virtual void OnNickAddCert(NickCore *nc, const Anope::string &entry) ATTR_NOT_NULL(2) { throw NotImplementedException(); }
|
||||
|
||||
/** Called from NickCore::EraseCert()
|
||||
* @param nc pointer to the NickCore
|
||||
* @param entry The fingerprint
|
||||
*/
|
||||
virtual void OnNickEraseCert(NickCore *nc, const Anope::string &entry) { throw NotImplementedException(); }
|
||||
virtual void OnNickEraseCert(NickCore *nc, const Anope::string &entry) ATTR_NOT_NULL(2) { throw NotImplementedException(); }
|
||||
|
||||
/** Called when a user requests info for a nick
|
||||
* @param source The user requesting info
|
||||
@@ -800,55 +802,55 @@ public:
|
||||
* @param info Data to show the user requesting information
|
||||
* @param show_hidden true if we should show the user everything
|
||||
*/
|
||||
virtual void OnNickInfo(CommandSource &source, NickAlias *na, InfoFormatter &info, bool show_hidden) { throw NotImplementedException(); }
|
||||
virtual void OnNickInfo(CommandSource &source, NickAlias *na, InfoFormatter &info, bool show_hidden) ATTR_NOT_NULL(3) { throw NotImplementedException(); }
|
||||
|
||||
/** Called when a user uses botserv/info on a bot or channel.
|
||||
*/
|
||||
virtual void OnBotInfo(CommandSource &source, BotInfo *bi, ChannelInfo *ci, InfoFormatter &info) { throw NotImplementedException(); }
|
||||
virtual void OnBotInfo(CommandSource &source, BotInfo *bi, ChannelInfo *ci, InfoFormatter &info) ATTR_NOT_NULL(4) { throw NotImplementedException(); }
|
||||
|
||||
/** Check whether a username and password is correct
|
||||
* @param u The user trying to identify, if applicable.
|
||||
* @param req The login request
|
||||
*/
|
||||
virtual void OnCheckAuthentication(User *u, IdentifyRequest *req) { throw NotImplementedException(); }
|
||||
virtual void OnCheckAuthentication(User *u, IdentifyRequest *req) ATTR_NOT_NULL(3) { throw NotImplementedException(); }
|
||||
|
||||
/** Called when a user does /ns update
|
||||
* @param u The user
|
||||
*/
|
||||
virtual void OnNickUpdate(User *u) { throw NotImplementedException(); }
|
||||
virtual void OnNickUpdate(User *u) ATTR_NOT_NULL(2) { throw NotImplementedException(); }
|
||||
|
||||
/** Called when we get informed about a users SSL fingerprint
|
||||
* when we call this, the fingerprint should already be stored in the user struct
|
||||
* @param u pointer to the user
|
||||
*/
|
||||
virtual void OnFingerprint(User *u) { throw NotImplementedException(); }
|
||||
virtual void OnFingerprint(User *u) ATTR_NOT_NULL(2) { throw NotImplementedException(); }
|
||||
|
||||
/** Called when a user becomes (un)away
|
||||
* @param message The message, is .empty() if unaway
|
||||
*/
|
||||
virtual void OnUserAway(User *u, const Anope::string &message) { throw NotImplementedException(); }
|
||||
virtual void OnUserAway(User *u, const Anope::string &message) ATTR_NOT_NULL(2) { throw NotImplementedException(); }
|
||||
|
||||
/** Called when a user invites one of our users to a channel
|
||||
* @param source The user doing the inviting
|
||||
* @param c The channel the user is inviting to
|
||||
* @param targ The user being invited
|
||||
*/
|
||||
virtual void OnInvite(User *source, Channel *c, User *targ) { throw NotImplementedException(); }
|
||||
virtual void OnInvite(User *source, Channel *c, User *targ) ATTR_NOT_NULL(2, 3, 4) { throw NotImplementedException(); }
|
||||
|
||||
/** Called when a vhost is deleted
|
||||
* @param na The nickalias of the vhost
|
||||
*/
|
||||
virtual void OnDeleteVHost(NickAlias *na) { throw NotImplementedException(); }
|
||||
virtual void OnDeleteVHost(NickAlias *na) ATTR_NOT_NULL(2) { throw NotImplementedException(); }
|
||||
|
||||
/** Called when a vhost is set
|
||||
* @param na The nickalias of the vhost
|
||||
*/
|
||||
virtual void OnSetVHost(NickAlias *na) { throw NotImplementedException(); }
|
||||
virtual void OnSetVHost(NickAlias *na) ATTR_NOT_NULL(2) { throw NotImplementedException(); }
|
||||
|
||||
/** Called when a users host changes
|
||||
* @param u The user
|
||||
*/
|
||||
virtual void OnSetDisplayedHost(User *) { throw NotImplementedException(); }
|
||||
virtual void OnSetDisplayedHost(User *u) ATTR_NOT_NULL(2) { throw NotImplementedException(); }
|
||||
|
||||
/** Called when a memo is sent
|
||||
* @param source The source of the memo
|
||||
@@ -856,14 +858,14 @@ public:
|
||||
* @param mi Memo info for target
|
||||
* @param m The memo
|
||||
*/
|
||||
virtual void OnMemoSend(const Anope::string &source, const Anope::string &target, MemoInfo *mi, Memo *m) { throw NotImplementedException(); }
|
||||
virtual void OnMemoSend(const Anope::string &source, const Anope::string &target, MemoInfo *mi, Memo *m) ATTR_NOT_NULL(4, 5) { throw NotImplementedException(); }
|
||||
|
||||
/** Called when a memo is deleted
|
||||
* @param target The target the memo is being deleted from (nick or channel)
|
||||
* @param mi The memo info
|
||||
* @param m The memo
|
||||
*/
|
||||
virtual void OnMemoDel(const Anope::string &target, MemoInfo *mi, const Memo *m) { throw NotImplementedException(); }
|
||||
virtual void OnMemoDel(const Anope::string &target, MemoInfo *mi, const Memo *m) ATTR_NOT_NULL(3, 4) { throw NotImplementedException(); }
|
||||
|
||||
/** Called when a mode is set on a channel
|
||||
* @param c The channel
|
||||
@@ -872,7 +874,7 @@ public:
|
||||
* @param param The mode param, if there is one
|
||||
* @return EVENT_STOP to make mlock/secureops etc checks not happen
|
||||
*/
|
||||
virtual EventReturn OnChannelModeSet(Channel *c, MessageSource &setter, ChannelMode *mode, const Anope::string ¶m) { throw NotImplementedException(); }
|
||||
virtual EventReturn OnChannelModeSet(Channel *c, MessageSource &setter, ChannelMode *mode, const Anope::string ¶m) ATTR_NOT_NULL(2, 4) { throw NotImplementedException(); }
|
||||
|
||||
/** Called when a mode is unset on a channel
|
||||
* @param c The channel
|
||||
@@ -881,67 +883,67 @@ public:
|
||||
* @param param The mode param, if there is one
|
||||
* @return EVENT_STOP to make mlock/secureops etc checks not happen
|
||||
*/
|
||||
virtual EventReturn OnChannelModeUnset(Channel *c, MessageSource &setter, ChannelMode *mode, const Anope::string ¶m) { throw NotImplementedException(); }
|
||||
virtual EventReturn OnChannelModeUnset(Channel *c, MessageSource &setter, ChannelMode *mode, const Anope::string ¶m) ATTR_NOT_NULL(2, 4) { throw NotImplementedException(); }
|
||||
|
||||
/** Called when a mode is set on a user
|
||||
* @param setter who/what is setting the mode
|
||||
* @param u The user
|
||||
* @param mname The mode name
|
||||
*/
|
||||
virtual void OnUserModeSet(const MessageSource &setter, User *u, const Anope::string &mname) { throw NotImplementedException(); }
|
||||
virtual void OnUserModeSet(const MessageSource &setter, User *u, const Anope::string &mname) ATTR_NOT_NULL(3) { throw NotImplementedException(); }
|
||||
|
||||
/** Called when a mode is unset from a user
|
||||
* @param setter who/what is setting the mode
|
||||
* @param u The user
|
||||
* @param mname The mode name
|
||||
*/
|
||||
virtual void OnUserModeUnset(const MessageSource &setter, User *u, const Anope::string &mname) { throw NotImplementedException(); }
|
||||
virtual void OnUserModeUnset(const MessageSource &setter, User *u, const Anope::string &mname) ATTR_NOT_NULL(3) { throw NotImplementedException(); }
|
||||
|
||||
/** Called when a channel mode is introduced into Anope
|
||||
* @param cm The mode
|
||||
*/
|
||||
virtual void OnChannelModeAdd(ChannelMode *cm) { throw NotImplementedException(); }
|
||||
virtual void OnChannelModeAdd(ChannelMode *cm) ATTR_NOT_NULL(2) { throw NotImplementedException(); }
|
||||
|
||||
/** Called when a user mode is introduced into Anope
|
||||
* @param um The mode
|
||||
*/
|
||||
virtual void OnUserModeAdd(UserMode *um) { throw NotImplementedException(); }
|
||||
virtual void OnUserModeAdd(UserMode *um) ATTR_NOT_NULL(2) { throw NotImplementedException(); }
|
||||
|
||||
/** Called when a mode is about to be mlocked
|
||||
* @param ci The channel the mode is being locked on
|
||||
* @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) { throw NotImplementedException(); }
|
||||
virtual EventReturn OnMLock(ChannelInfo *ci, 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) { throw NotImplementedException(); }
|
||||
virtual EventReturn OnUnMLock(ChannelInfo *ci, 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
|
||||
* @param m The module
|
||||
*/
|
||||
virtual void OnModuleLoad(User *u, Module *m) { throw NotImplementedException(); }
|
||||
virtual void OnModuleLoad(User *u, Module *m) ATTR_NOT_NULL(3) { throw NotImplementedException(); }
|
||||
|
||||
/** Called before a module is unloaded
|
||||
* @param u The user, can be NULL
|
||||
* @param m The module
|
||||
*/
|
||||
virtual void OnModuleUnload(User *u, Module *m) { throw NotImplementedException(); }
|
||||
virtual void OnModuleUnload(User *u, Module *m) ATTR_NOT_NULL(3) { throw NotImplementedException(); }
|
||||
|
||||
/** Called when a server is synced
|
||||
* @param s The server, can be our uplink server
|
||||
*/
|
||||
virtual void OnServerSync(Server *s) { throw NotImplementedException(); }
|
||||
virtual void OnServerSync(Server *s) ATTR_NOT_NULL(2) { throw NotImplementedException(); }
|
||||
|
||||
/** Called when we sync with our uplink
|
||||
* @param s Our uplink
|
||||
*/
|
||||
virtual void OnUplinkSync(Server *s) { throw NotImplementedException(); }
|
||||
virtual void OnUplinkSync(Server *s) ATTR_NOT_NULL(2) { throw NotImplementedException(); }
|
||||
|
||||
/** Called when we receive a PRIVMSG for one of our clients
|
||||
* @param u The user sending the PRIVMSG
|
||||
@@ -950,7 +952,7 @@ public:
|
||||
* @param tags Message tags
|
||||
* @return EVENT_STOP to halt processing
|
||||
*/
|
||||
virtual EventReturn OnBotPrivmsg(User *u, BotInfo *bi, Anope::string &message, const Anope::map<Anope::string> &tags) { throw NotImplementedException(); }
|
||||
virtual EventReturn OnBotPrivmsg(User *u, BotInfo *bi, Anope::string &message, const Anope::map<Anope::string> &tags) ATTR_NOT_NULL(2, 3) { throw NotImplementedException(); }
|
||||
|
||||
/** Called when we receive a NOTICE for one of our clients
|
||||
* @param u The user sending the NOTICE
|
||||
@@ -958,7 +960,7 @@ public:
|
||||
* @param tags Message tags
|
||||
* @param message The message
|
||||
*/
|
||||
virtual void OnBotNotice(User *u, BotInfo *bi, Anope::string &message, const Anope::map<Anope::string> &tags) { throw NotImplementedException(); }
|
||||
virtual void OnBotNotice(User *u, BotInfo *bi, Anope::string &message, const Anope::map<Anope::string> &tags) ATTR_NOT_NULL(2, 3) { throw NotImplementedException(); }
|
||||
|
||||
/** Called when we receive a PRIVMSG for a registered channel we are in
|
||||
* @param u The source of the message
|
||||
@@ -966,12 +968,12 @@ public:
|
||||
* @param msg The message
|
||||
* @param tags Message tags
|
||||
*/
|
||||
virtual void OnPrivmsg(User *u, Channel *c, Anope::string &msg, const Anope::map<Anope::string> &tags) { throw NotImplementedException(); }
|
||||
virtual void OnPrivmsg(User *u, Channel *c, Anope::string &msg, const Anope::map<Anope::string> &tags) ATTR_NOT_NULL(2, 3) { throw NotImplementedException(); }
|
||||
|
||||
/** Called when a message is logged
|
||||
* @param l The log message
|
||||
*/
|
||||
virtual void OnLog(Log *l) { throw NotImplementedException(); }
|
||||
virtual void OnLog(Log *l) ATTR_NOT_NULL(2) { throw NotImplementedException(); }
|
||||
|
||||
/** Called when a log message is actually logged to a given log info
|
||||
* The message has already passed validation checks by the LogInfo
|
||||
@@ -979,13 +981,13 @@ public:
|
||||
* @param l The log message
|
||||
* @param msg The final formatted message, derived from 'l'
|
||||
*/
|
||||
virtual void OnLogMessage(LogInfo *li, const Log *l, const Anope::string &msg) { throw NotImplementedException(); }
|
||||
virtual void OnLogMessage(LogInfo *li, const Log *l, const Anope::string &msg) ATTR_NOT_NULL(2, 3) { throw NotImplementedException(); }
|
||||
|
||||
/** Called when a DNS request (question) is received.
|
||||
* @param req The dns request
|
||||
* @param reply The reply that will be sent
|
||||
*/
|
||||
virtual void OnDnsRequest(DNS::Query &req, DNS::Query *reply) { throw NotImplementedException(); }
|
||||
virtual void OnDnsRequest(DNS::Query &req, DNS::Query *reply) ATTR_NOT_NULL(3) { throw NotImplementedException(); }
|
||||
|
||||
/** Called when a channels modes are being checked to see if they are allowed,
|
||||
* mostly to ensure mlock/+r are set.
|
||||
@@ -998,7 +1000,7 @@ public:
|
||||
* for a newly created channel to set the correct modes, topic,
|
||||
* set.
|
||||
*/
|
||||
virtual void OnChannelSync(Channel *c) { throw NotImplementedException(); }
|
||||
virtual void OnChannelSync(Channel *c) ATTR_NOT_NULL(2) { throw NotImplementedException(); }
|
||||
|
||||
/** Called to set the correct modes on the user on the given channel
|
||||
* @param user The user
|
||||
@@ -1007,13 +1009,13 @@ public:
|
||||
* @param give_modes If giving modes is desired
|
||||
* @param take_modes If taking modes is desired
|
||||
*/
|
||||
virtual void OnSetCorrectModes(User *user, Channel *chan, AccessGroup &access, bool &give_modes, bool &take_modes) { throw NotImplementedException(); }
|
||||
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 *) { throw NotImplementedException(); }
|
||||
virtual void OnSerializableConstruct(Serializable *) { throw NotImplementedException(); }
|
||||
virtual void OnSerializableDestruct(Serializable *) { throw NotImplementedException(); }
|
||||
virtual void OnSerializableUpdate(Serializable *) { throw NotImplementedException(); }
|
||||
virtual void OnSerializeTypeCreate(Serialize::Type *) { 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 OnSerializeTypeCreate(Serialize::Type *st) ATTR_NOT_NULL(2) { throw NotImplementedException(); }
|
||||
|
||||
/** Called when a chanserv/set command is used
|
||||
* @param source The source of the command
|
||||
@@ -1022,7 +1024,7 @@ public:
|
||||
* @param setting The setting passed to the command. Probably ON/OFF.
|
||||
* @return EVENT_ALLOW to bypass access checks, EVENT_STOP to halt immediately.
|
||||
*/
|
||||
virtual EventReturn OnSetChannelOption(CommandSource &source, Command *cmd, ChannelInfo *ci, const Anope::string &setting) { throw NotImplementedException(); }
|
||||
virtual EventReturn OnSetChannelOption(CommandSource &source, Command *cmd, ChannelInfo *ci, const Anope::string &setting) ATTR_NOT_NULL(3, 4) { throw NotImplementedException(); }
|
||||
|
||||
/** Called when a nickserv/set command is used.
|
||||
* @param source The source of the command
|
||||
@@ -1031,7 +1033,7 @@ public:
|
||||
* @param setting The setting passed to the command. Probably ON/OFF.
|
||||
* @return EVENT_STOP to halt immediately
|
||||
*/
|
||||
virtual EventReturn OnSetNickOption(CommandSource &source, Command *cmd, NickCore *nc, const Anope::string &setting) { throw NotImplementedException(); }
|
||||
virtual EventReturn OnSetNickOption(CommandSource &source, Command *cmd, NickCore *nc, const Anope::string &setting) ATTR_NOT_NULL(3, 4) { throw NotImplementedException(); }
|
||||
|
||||
/** Called whenever a message is received from the uplink
|
||||
* @param source The source of the message
|
||||
@@ -1046,9 +1048,9 @@ public:
|
||||
* @param u The user
|
||||
* @param cm The mode
|
||||
*/
|
||||
virtual EventReturn OnCanSet(User *u, const ChannelMode *cm) { throw NotImplementedException(); }
|
||||
virtual EventReturn OnCanSet(User *u, const ChannelMode *cm) ATTR_NOT_NULL(2, 3) { throw NotImplementedException(); }
|
||||
|
||||
virtual EventReturn OnCheckDelete(Channel *) { throw NotImplementedException(); }
|
||||
virtual EventReturn OnCheckDelete(Channel *c) ATTR_NOT_NULL(2) { throw NotImplementedException(); }
|
||||
|
||||
/** Called every options:expiretimeout seconds. Should be used to expire nicks,
|
||||
* channels, etc.
|
||||
@@ -1061,7 +1063,7 @@ public:
|
||||
* @param na The nick they are on
|
||||
* @return EVENT_STOP to force the user off of the nick
|
||||
*/
|
||||
virtual EventReturn OnNickValidate(User *u, NickAlias *na) { throw NotImplementedException(); }
|
||||
virtual EventReturn OnNickValidate(User *u, NickAlias *na) ATTR_NOT_NULL(2, 3) { throw NotImplementedException(); }
|
||||
};
|
||||
|
||||
enum Implementation
|
||||
|
||||
@@ -79,4 +79,5 @@ public:
|
||||
CertService(Module *c) : Service(c, "CertService", "certs") { }
|
||||
|
||||
virtual NickCore *FindAccountFromCert(const Anope::string &cert) = 0;
|
||||
virtual void ReplaceCert(const Anope::string &oldcert, const Anope::string &newcert) = 0;
|
||||
};
|
||||
|
||||
@@ -0,0 +1,46 @@
|
||||
/*
|
||||
*
|
||||
* (C) 2011-2024 Anope Team
|
||||
* Contact us at team@anope.org
|
||||
*
|
||||
* Please read COPYING and README for further details.
|
||||
*/
|
||||
|
||||
#pragma once
|
||||
|
||||
struct MyOper final
|
||||
: Oper
|
||||
, Serializable
|
||||
{
|
||||
MyOper(const Anope::string &n, OperType *o) : Oper(n, o), Serializable("Oper") { }
|
||||
|
||||
void Serialize(Serialize::Data &data) const override
|
||||
{
|
||||
data.Store("name", this->name);
|
||||
data.Store("type", this->ot->GetName());
|
||||
}
|
||||
|
||||
static Serializable *Unserialize(Serializable *obj, Serialize::Data &data)
|
||||
{
|
||||
Anope::string stype, sname;
|
||||
|
||||
data["type"] >> stype;
|
||||
data["name"] >> sname;
|
||||
|
||||
OperType *ot = OperType::Find(stype);
|
||||
if (ot == NULL)
|
||||
return NULL;
|
||||
NickCore *nc = NickCore::Find(sname);
|
||||
if (nc == NULL)
|
||||
return NULL;
|
||||
|
||||
MyOper *myo;
|
||||
if (obj)
|
||||
myo = anope_dynamic_static_cast<MyOper *>(obj);
|
||||
else
|
||||
myo = new MyOper(nc->display, ot);
|
||||
nc->o = myo;
|
||||
Log(LOG_NORMAL, "operserv/oper") << "Tied oper " << nc->display << " to type " << ot->GetName();
|
||||
return myo;
|
||||
}
|
||||
};
|
||||
@@ -62,12 +62,12 @@ static ServiceReference<SessionService> session_service("SessionService", "sessi
|
||||
|
||||
void Exception::Serialize(Serialize::Data &data) const
|
||||
{
|
||||
data["mask"] << this->mask;
|
||||
data["limit"] << this->limit;
|
||||
data["who"] << this->who;
|
||||
data["reason"] << this->reason;
|
||||
data["time"] << this->time;
|
||||
data["expires"] << this->expires;
|
||||
data.Store("mask", this->mask);
|
||||
data.Store("limit", this->limit);
|
||||
data.Store("who", this->who);
|
||||
data.Store("reason", this->reason);
|
||||
data.Store("time", this->time);
|
||||
data.Store("expires", this->expires);
|
||||
}
|
||||
|
||||
Serializable *Exception::Unserialize(Serializable *obj, Serialize::Data &data)
|
||||
|
||||
+6
-14
@@ -19,7 +19,7 @@ namespace SQL
|
||||
public:
|
||||
typedef std::map<Anope::string, std::stringstream *> Map;
|
||||
Map data;
|
||||
std::map<Anope::string, Type> types;
|
||||
std::map<Anope::string, Serialize::DataType> types;
|
||||
|
||||
~Data()
|
||||
{
|
||||
@@ -34,14 +34,6 @@ namespace SQL
|
||||
return *ss;
|
||||
}
|
||||
|
||||
std::set<Anope::string> KeySet() const override
|
||||
{
|
||||
std::set<Anope::string> keys;
|
||||
for (const auto &[key, _] : this->data)
|
||||
keys.insert(key);
|
||||
return keys;
|
||||
}
|
||||
|
||||
size_t Hash() const override
|
||||
{
|
||||
size_t hash = 0;
|
||||
@@ -68,17 +60,17 @@ namespace SQL
|
||||
this->data.clear();
|
||||
}
|
||||
|
||||
void SetType(const Anope::string &key, Type t) override
|
||||
void SetType(const Anope::string &key, Serialize::DataType dt) override
|
||||
{
|
||||
this->types[key] = t;
|
||||
this->types[key] = dt;
|
||||
}
|
||||
|
||||
Type GetType(const Anope::string &key) const override
|
||||
Serialize::DataType GetType(const Anope::string &key) const override
|
||||
{
|
||||
std::map<Anope::string, Type>::const_iterator it = this->types.find(key);
|
||||
auto it = this->types.find(key);
|
||||
if (it != this->types.end())
|
||||
return it->second;
|
||||
return DT_TEXT;
|
||||
return Serialize::DataType::TEXT;
|
||||
}
|
||||
};
|
||||
|
||||
|
||||
+12
-14
@@ -41,9 +41,9 @@ public:
|
||||
|
||||
virtual ~IRCDProto();
|
||||
|
||||
virtual void SendNoticeInternal(const MessageSource &, const Anope::string &dest, const Anope::string &msg, const Anope::map<Anope::string> &tags = {});
|
||||
virtual void SendPrivmsgInternal(const MessageSource &, const Anope::string &dest, const Anope::string &msg, const Anope::map<Anope::string> &tags = {});
|
||||
virtual void SendCTCPInternal(const MessageSource &, const Anope::string &dest, const Anope::string &buf);
|
||||
virtual void SendNotice(const MessageSource &source, const Anope::string &dest, const Anope::string &msg, const Anope::map<Anope::string> &tags = {});
|
||||
virtual void SendPrivmsg(const MessageSource &source, const Anope::string &dest, const Anope::string &msg, const Anope::map<Anope::string> &tags = {});
|
||||
virtual void SendTagmsg(const MessageSource &source, const Anope::string &dest, const Anope::map<Anope::string> &tags);
|
||||
|
||||
/** Parses an incoming message from the IRC server.
|
||||
* @param message The message to parse.
|
||||
@@ -74,6 +74,9 @@ public:
|
||||
/* Can we force join or part users? */
|
||||
bool CanSVSJoin = false;
|
||||
|
||||
/** Can we force servers to remove opers? */
|
||||
bool CanSVSNOOP = false;
|
||||
|
||||
/* Can we set vhosts on users? */
|
||||
bool CanSetVHost = false;
|
||||
|
||||
@@ -98,9 +101,6 @@ public:
|
||||
/* See ns_cert */
|
||||
bool CanCertFP = false;
|
||||
|
||||
/* Can users log out before being fully connected? */
|
||||
bool CanSVSLogout = false;
|
||||
|
||||
/* Whether this IRCd requires unique IDs for each user or server. See TS6/P10. */
|
||||
bool RequiresID = false;
|
||||
|
||||
@@ -110,6 +110,9 @@ public:
|
||||
/** Can we ask the server to unban a user? */
|
||||
bool CanClearBans = false;
|
||||
|
||||
/** Can we send tag messages? */
|
||||
bool CanTagMessage = false;
|
||||
|
||||
/* The maximum length of a channel name. */
|
||||
size_t MaxChannel = 0;
|
||||
|
||||
@@ -213,11 +216,6 @@ public:
|
||||
|
||||
virtual void SendKick(const MessageSource &source, const Channel *chan, User *user, const Anope::string &msg);
|
||||
|
||||
virtual void SendNotice(const MessageSource &source, const Anope::string &dest, const char *fmt, ...) ATTR_FORMAT(4, 5);
|
||||
virtual void SendPrivmsg(const MessageSource &source, const Anope::string &dest, const char *fmt, ...) ATTR_FORMAT(4, 5);
|
||||
virtual void SendAction(const MessageSource &source, const Anope::string &dest, const char *fmt, ...) ATTR_FORMAT(4, 5);
|
||||
virtual void SendCTCP(const MessageSource &source, const Anope::string &dest, const char *fmt, ...) ATTR_FORMAT(4, 5);
|
||||
|
||||
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;
|
||||
|
||||
@@ -242,9 +240,9 @@ public:
|
||||
* @param bi The source of the message
|
||||
* @param u The user to join
|
||||
* @param chan The channel to join the user to
|
||||
* @param param Channel key?
|
||||
* @param key Channel key
|
||||
*/
|
||||
virtual void SendSVSJoin(const MessageSource &source, User *u, const Anope::string &chan, const Anope::string ¶m) { }
|
||||
virtual void SendSVSJoin(const MessageSource &source, User *u, const Anope::string &chan, const Anope::string &key) { }
|
||||
|
||||
/** Force parts a user that isn't ours from a channel.
|
||||
* @param source The source of the message
|
||||
@@ -299,7 +297,7 @@ public:
|
||||
/** Send a channel creation message to the uplink.
|
||||
* On most TS6 IRCds this is a SJOIN with no nick
|
||||
*/
|
||||
virtual void SendChannel(Channel *c) { }
|
||||
virtual void SendChannel(Channel *c) = 0;
|
||||
|
||||
/** Make the user an IRC operator
|
||||
* Normally this is a simple +o, though some IRCds require us to send the oper type
|
||||
|
||||
+30
-9
@@ -18,23 +18,44 @@
|
||||
|
||||
namespace Serialize
|
||||
{
|
||||
enum class DataType
|
||||
: uint8_t
|
||||
{
|
||||
BOOL,
|
||||
FLOAT,
|
||||
INT,
|
||||
TEXT,
|
||||
UINT,
|
||||
};
|
||||
|
||||
class Data
|
||||
{
|
||||
public:
|
||||
enum Type
|
||||
{
|
||||
DT_TEXT,
|
||||
DT_INT
|
||||
};
|
||||
|
||||
virtual ~Data() = default;
|
||||
|
||||
virtual std::iostream &operator[](const Anope::string &key) = 0;
|
||||
virtual std::set<Anope::string> KeySet() const { throw CoreException("Not supported"); }
|
||||
|
||||
template <typename T>
|
||||
void Store(const Anope::string &key, const T &value)
|
||||
{
|
||||
using Type = std::remove_cv_t<std::remove_reference_t<T>>;
|
||||
|
||||
if constexpr (std::is_same_v<Type, bool>)
|
||||
SetType(key, DataType::BOOL);
|
||||
else if constexpr (std::is_floating_point_v<Type>)
|
||||
SetType(key, DataType::FLOAT);
|
||||
else if constexpr (std::is_integral_v<Type> && std::is_signed_v<Type>)
|
||||
SetType(key, DataType::INT);
|
||||
else if constexpr (std::is_integral_v<Type> && std::is_unsigned_v<Type>)
|
||||
SetType(key, DataType::UINT);
|
||||
|
||||
this->operator[](key) << value;
|
||||
}
|
||||
|
||||
virtual size_t Hash() const { throw CoreException("Not supported"); }
|
||||
|
||||
virtual void SetType(const Anope::string &key, Type t) { }
|
||||
virtual Type GetType(const Anope::string &key) const { return DT_TEXT; }
|
||||
virtual void SetType(const Anope::string &key, DataType dt) { }
|
||||
virtual DataType GetType(const Anope::string &key) const { return DataType::TEXT; }
|
||||
};
|
||||
|
||||
extern void RegisterTypes();
|
||||
|
||||
@@ -16,6 +16,7 @@
|
||||
#include <cstdint>
|
||||
#include <cstdio>
|
||||
#include <cstdlib>
|
||||
#include <cstring>
|
||||
|
||||
#include <algorithm>
|
||||
#include <bitset>
|
||||
|
||||
@@ -20,6 +20,21 @@
|
||||
// Whether Anope was built in debug mode.
|
||||
#cmakedefine01 DEBUG_BUILD
|
||||
|
||||
// The default config directory.
|
||||
#define DEFAULT_CONF_DIR "@CONF_DIR@"
|
||||
|
||||
// The default data directory.
|
||||
#define DEFAULT_DATA_DIR "@DATA_DIR@"
|
||||
|
||||
// The default locale directory.
|
||||
#define DEFAULT_LOCALE_DIR "@LOCALE_DIR@"
|
||||
|
||||
// The default log directory.
|
||||
#define DEFAULT_LOG_DIR "@LOG_DIR@"
|
||||
|
||||
// The default module directory.
|
||||
#define DEFAULT_MODULE_DIR "@MODULE_DIR@"
|
||||
|
||||
// Whether the clock_gettime() function is available.
|
||||
#cmakedefine01 HAVE_CLOCK_GETTIME
|
||||
|
||||
@@ -36,6 +51,8 @@
|
||||
|
||||
#if defined __GNUC__
|
||||
# define ATTR_FORMAT(STRINGPOS, FIRSTPOS) __attribute__((format(printf, STRINGPOS, FIRSTPOS)))
|
||||
# define ATTR_NOT_NULL(...) __attribute__((nonnull(__VA_ARGS__)))
|
||||
#else
|
||||
# define ATTR_FORMAT(STRINGPOS, FIRSTPOS)
|
||||
# define ATTR_NOT_NULL(...)
|
||||
#endif
|
||||
|
||||
+10
-5
@@ -107,14 +107,14 @@ protected:
|
||||
* @param suid The unique identifier of the user.
|
||||
* @param nc The account the user is identified as, if any
|
||||
*/
|
||||
User(const Anope::string &snick, const Anope::string &sident, const Anope::string &shost, const Anope::string &svhost, const Anope::string &sip, Server *sserver, const Anope::string &srealname, time_t ts, const Anope::string &smodes, const Anope::string &suid, NickCore *nc);
|
||||
User(const Anope::string &snick, const Anope::string &sident, const Anope::string &shost, const Anope::string &svhost, const Anope::string &sip, Server *sserver, const Anope::string &srealname, time_t ts, const Anope::string &smodes, const std::vector<Anope::string> &smodeparams, const Anope::string &suid, NickCore *nc);
|
||||
|
||||
/** Destroy a user.
|
||||
*/
|
||||
virtual ~User();
|
||||
|
||||
public:
|
||||
static User *OnIntroduce(const Anope::string &snick, const Anope::string &sident, const Anope::string &shost, const Anope::string &svhost, const Anope::string &sip, Server *sserver, const Anope::string &srealname, time_t ts, const Anope::string &smodes, const Anope::string &suid, NickCore *nc);
|
||||
static User *OnIntroduce(const Anope::string &snick, const Anope::string &sident, const Anope::string &shost, const Anope::string &svhost, const Anope::string &sip, Server *sserver, const Anope::string &srealname, time_t ts, const Anope::string &smodes, const Anope::string &suid, NickCore *nc, const std::vector<Anope::string> &smodeparams = {});
|
||||
|
||||
/** Update the nickname of a user record accordingly, should be
|
||||
* called from ircd protocol.
|
||||
@@ -215,6 +215,11 @@ public:
|
||||
*/
|
||||
NickCore *Account() const;
|
||||
|
||||
/** Get the account nick the user is logged in using
|
||||
* @return The account nick or NULL
|
||||
*/
|
||||
NickAlias *AccountNick() const;
|
||||
|
||||
/** Check if the user is identified for their nick
|
||||
* @param check_nick True to check if the user is identified to the nickname they are on too
|
||||
* @return true or false
|
||||
@@ -302,10 +307,10 @@ public:
|
||||
|
||||
/** Set a string of modes on a user internally
|
||||
* @param setter who/what is setting the mode
|
||||
* @param umodes The modes
|
||||
* @param umodes The mode letters
|
||||
* @param umodeparams The mode values
|
||||
*/
|
||||
void SetModesInternal(const MessageSource &source, const char *umodes, ...) ATTR_FORMAT(3, 4);
|
||||
void SetModesInternal(const MessageSource &source, const Anope::string &umodes);
|
||||
void SetModesInternal(const MessageSource &source, const Anope::string &umodes, const std::vector<Anope::string> &umodeparams = {});
|
||||
|
||||
/** Get modes set for this user.
|
||||
* @return A string of modes set on the user
|
||||
|
||||
+1
-1
@@ -42,7 +42,7 @@ static std::string get_git_hash(const std::string &git_dir)
|
||||
}
|
||||
fd.close();
|
||||
|
||||
return "g" + filebuf.substr(0, 7);
|
||||
return filebuf.substr(0, 7);
|
||||
}
|
||||
|
||||
static bool read_version_sh(const std::string &version_sh, std::map<std::string, std::string> &versions)
|
||||
|
||||
-10057
File diff suppressed because it is too large
Load Diff
+132
-85
@@ -7,8 +7,8 @@ msgid ""
|
||||
msgstr ""
|
||||
"Project-Id-Version: Anope\n"
|
||||
"Report-Msgid-Bugs-To: \n"
|
||||
"POT-Creation-Date: 2024-03-15 12:41+0000\n"
|
||||
"PO-Revision-Date: 2024-03-15 12:41+0000\n"
|
||||
"POT-Creation-Date: 2024-10-22 16:28+0100\n"
|
||||
"PO-Revision-Date: 2024-10-22 16:29+0100\n"
|
||||
"Last-Translator: Sadie Powell <sadie@witchery.services>\n"
|
||||
"Language-Team: English\n"
|
||||
"Language: en_US\n"
|
||||
@@ -16,7 +16,7 @@ msgstr ""
|
||||
"Content-Type: text/plain; charset=ISO-8859-1\n"
|
||||
"Content-Transfer-Encoding: 8bit\n"
|
||||
"Plural-Forms: nplurals=2; plural=(n != 1);\n"
|
||||
"X-Generator: Poedit 3.4\n"
|
||||
"X-Generator: Poedit 3.4.2\n"
|
||||
|
||||
#, c-format
|
||||
msgid "%d channel(s) cleared, and %d channel(s) dropped."
|
||||
@@ -82,47 +82,47 @@ msgid ""
|
||||
"It has been created for users that can't host or\n"
|
||||
"configure a bot, or for use on networks that don't\n"
|
||||
"allow user bots. Available commands are listed\n"
|
||||
"below; to use them, type %s%s command. For\n"
|
||||
"below; to use them, type %s command. For\n"
|
||||
"more information on a specific command, type\n"
|
||||
"%s%s %s command.\n"
|
||||
"%s %s command.\n"
|
||||
msgstr ""
|
||||
"%s allows you to have a bot on your own channel.\n"
|
||||
"It has been created for users that can't host or\n"
|
||||
"configure a bot, or for use on networks that don't\n"
|
||||
"allow user bots. Available commands are listed\n"
|
||||
"below; to use them, type %s%s command. For\n"
|
||||
"below; to use them, type %s command. For\n"
|
||||
"more information on a specific command, type\n"
|
||||
"%s%s %s command.\n"
|
||||
"%s %s command.\n"
|
||||
|
||||
#, c-format
|
||||
msgid ""
|
||||
"%s allows you to register a nickname and\n"
|
||||
"prevent others from using it. The following\n"
|
||||
"commands allow for registration and maintenance of\n"
|
||||
"nicknames; to use them, type %s%s command.\n"
|
||||
"nicknames; to use them, type %s command.\n"
|
||||
"For more information on a specific command, type\n"
|
||||
"%s%s %s command.\n"
|
||||
"%s %s command.\n"
|
||||
msgstr ""
|
||||
"%s allows you to register a nickname and\n"
|
||||
"prevent others from using it. The following\n"
|
||||
"commands allow for registration and maintenance of\n"
|
||||
"nicknames; to use them, type %s%s command.\n"
|
||||
"nicknames; to use them, type %s command.\n"
|
||||
"For more information on a specific command, type\n"
|
||||
"%s%s %s command.\n"
|
||||
"%s %s command.\n"
|
||||
|
||||
#, c-format
|
||||
msgid ""
|
||||
"%s allows you to register an account.\n"
|
||||
"The following commands allow for registration and maintenance of\n"
|
||||
"accounts; to use them, type %s%s command.\n"
|
||||
"accounts; to use them, type %s command.\n"
|
||||
"For more information on a specific command, type\n"
|
||||
"%s%s %s command.\n"
|
||||
"%s %s command.\n"
|
||||
msgstr ""
|
||||
"%s allows you to register an account.\n"
|
||||
"The following commands allow for registration and maintenance of\n"
|
||||
"accounts; to use them, type %s%s command.\n"
|
||||
"accounts; to use them, type %s command.\n"
|
||||
"For more information on a specific command, type\n"
|
||||
"%s%s %s command.\n"
|
||||
"%s %s command.\n"
|
||||
|
||||
#, c-format
|
||||
msgid ""
|
||||
@@ -131,16 +131,16 @@ msgid ""
|
||||
"malicious users from \"taking over\" channels by limiting\n"
|
||||
"who is allowed channel operator privileges. Available\n"
|
||||
"commands are listed below; to use them, type\n"
|
||||
"%s%s command. For more information on a\n"
|
||||
"specific command, type %s%s HELP command.\n"
|
||||
"%s command. For more information on a\n"
|
||||
"specific command, type %s HELP command.\n"
|
||||
msgstr ""
|
||||
"%s allows you to register and control various\n"
|
||||
"aspects of channels. %s can often prevent\n"
|
||||
"malicious users from \"taking over\" channels by limiting\n"
|
||||
"who is allowed channel operator privileges. Available\n"
|
||||
"commands are listed below; to use them, type\n"
|
||||
"%s%s command. For more information on a\n"
|
||||
"specific command, type %s%s HELP command.\n"
|
||||
"%s command. For more information on a\n"
|
||||
"specific command, type %s HELP command.\n"
|
||||
|
||||
#, c-format
|
||||
msgid "%s already exists in %s bad words list."
|
||||
@@ -387,8 +387,8 @@ msgid "%s will now permanently be ignored."
|
||||
msgstr "%s will now permanently be ignored."
|
||||
|
||||
#, c-format
|
||||
msgid "%s%s HELP %s for more information."
|
||||
msgstr "%s%s HELP %s for more information."
|
||||
msgid "%s HELP %s for more information."
|
||||
msgstr "%s HELP %s for more information."
|
||||
|
||||
msgid "ADD nick user host real"
|
||||
msgstr "ADD nick user host real"
|
||||
@@ -458,11 +458,11 @@ msgstr ""
|
||||
#, c-format
|
||||
msgid ""
|
||||
"User access levels can be seen by using the\n"
|
||||
"%s command; type %s%s HELP LEVELS for\n"
|
||||
"%s command; type %s HELP LEVELS for\n"
|
||||
"information."
|
||||
msgstr ""
|
||||
"User access levels can be seen by using the\n"
|
||||
"%s command; type %s%s HELP LEVELS for\n"
|
||||
"%s command; type %s HELP LEVELS for\n"
|
||||
"information."
|
||||
|
||||
#, c-format
|
||||
@@ -866,9 +866,9 @@ msgid ""
|
||||
"fantasy commands on a channel when prefixed\n"
|
||||
"with one of the following fantasy characters: %s\n"
|
||||
" \n"
|
||||
"Note that users wanting to use fantaisist\n"
|
||||
"commands MUST have enough access for both\n"
|
||||
"the FANTASIA and the command they are executing."
|
||||
"Note that users wanting to use fantasy commands\n"
|
||||
"MUST have enough access for both the FANTASY\n"
|
||||
"privilege and the command they are executing."
|
||||
msgstr ""
|
||||
" \n"
|
||||
"Enables or disables fantasy mode on a channel.\n"
|
||||
@@ -876,9 +876,9 @@ msgstr ""
|
||||
"fantasy commands on a channel when prefixed\n"
|
||||
"with one of the following fantasy characters: %s\n"
|
||||
" \n"
|
||||
"Note that users wanting to use fantaisist\n"
|
||||
"commands MUST have enough access for both\n"
|
||||
"the FANTASIA and the command they are executing."
|
||||
"Note that users wanting to use fantasy commands\n"
|
||||
"MUST have enough access for both the FANTASY\n"
|
||||
"privilege and the command they are executing."
|
||||
|
||||
msgid ""
|
||||
" \n"
|
||||
@@ -947,12 +947,12 @@ msgstr ""
|
||||
#, c-format
|
||||
msgid ""
|
||||
" \n"
|
||||
"See the %s command (%s%s HELP ACCESS) for\n"
|
||||
"See the %s command (%s HELP ACCESS) for\n"
|
||||
"information on giving a subset of these privileges to\n"
|
||||
"other channel users.\n"
|
||||
msgstr ""
|
||||
" \n"
|
||||
"See the %s command (%s%s HELP ACCESS) for\n"
|
||||
"See the %s command (%s HELP ACCESS) for\n"
|
||||
"information on giving a subset of these privileges to\n"
|
||||
"other channel users.\n"
|
||||
|
||||
@@ -1219,11 +1219,11 @@ msgstr ""
|
||||
#, c-format
|
||||
msgid ""
|
||||
" \n"
|
||||
"Type %s%s HELP command for help on any of the\n"
|
||||
"Type %s HELP command for help on any of the\n"
|
||||
"above commands."
|
||||
msgstr ""
|
||||
" \n"
|
||||
"Type %s%s HELP command for help on any of the\n"
|
||||
"Type %s HELP command for help on any of the\n"
|
||||
"above commands."
|
||||
|
||||
#, c-format
|
||||
@@ -1249,10 +1249,6 @@ msgstr " Loaded at: %p"
|
||||
msgid " but %s mysteriously dematerialized."
|
||||
msgstr " but %s mysteriously dematerialized."
|
||||
|
||||
#, c-format
|
||||
msgid "\"/msg %s\" is no longer supported. Use \"/msg %s@%s\" or \"/%s\" instead."
|
||||
msgstr "\"/msg %s\" is no longer supported. Use \"/msg %s@%s\" or \"/%s\" instead."
|
||||
|
||||
msgid "\"Jupiter\" a server"
|
||||
msgstr "\"Jupiter\" a server"
|
||||
|
||||
@@ -1812,6 +1808,12 @@ msgstr "Account"
|
||||
msgid "Account %s has already reached the maximum number of simultaneous logins (%u)."
|
||||
msgstr "Account %s has already reached the maximum number of simultaneous logins (%u)."
|
||||
|
||||
msgid "Account id"
|
||||
msgstr "Account id"
|
||||
|
||||
msgid "Account registered"
|
||||
msgstr "Account registered"
|
||||
|
||||
msgid "Accounts can not be registered right now. Please try again later."
|
||||
msgstr "Accounts can not be registered right now. Please try again later."
|
||||
|
||||
@@ -1875,6 +1877,13 @@ msgstr ""
|
||||
"Adding, deleting, or clearing entry messages requires the\n"
|
||||
"SET permission."
|
||||
|
||||
msgid ""
|
||||
"Additionally, Services Operators with the chanserv/drop/override permission can\n"
|
||||
"replace code with OVERRIDE to drop without a confirmation code."
|
||||
msgstr ""
|
||||
"Additionally, Services Operators with the chanserv/drop/override permission can\n"
|
||||
"replace code with OVERRIDE to drop without a confirmation code."
|
||||
|
||||
msgid ""
|
||||
"Additionally, Services Operators with the nickserv/confirm permission can\n"
|
||||
"replace passcode with a users nick to force validate them."
|
||||
@@ -1882,6 +1891,13 @@ msgstr ""
|
||||
"Additionally, Services Operators with the nickserv/confirm permission can\n"
|
||||
"replace passcode with a users nick to force validate them."
|
||||
|
||||
msgid ""
|
||||
"Additionally, Services Operators with the nickserv/drop/override permission can\n"
|
||||
"replace code with OVERRIDE to drop without a confirmation code."
|
||||
msgstr ""
|
||||
"Additionally, Services Operators with the nickserv/drop/override permission can\n"
|
||||
"replace code with OVERRIDE to drop without a confirmation code."
|
||||
|
||||
#, c-format
|
||||
msgid ""
|
||||
"Additionally, if fantasy is enabled fantasy commands\n"
|
||||
@@ -2937,6 +2953,14 @@ msgstr ""
|
||||
"become the new founder, but if the access list is empty, the\n"
|
||||
"channel will be dropped."
|
||||
|
||||
#, c-format
|
||||
msgid "Changing your usermodes to %s"
|
||||
msgstr "Changing your usermodes to %s"
|
||||
|
||||
#, c-format
|
||||
msgid "Changing your vhost to %s"
|
||||
msgstr "Changing your vhost to %s"
|
||||
|
||||
msgid "Channel"
|
||||
msgstr "Channel"
|
||||
|
||||
@@ -3652,8 +3676,8 @@ msgstr "Email for %s is invalid."
|
||||
msgid "Email matched: %s (%s) to %s."
|
||||
msgstr "Email matched: %s (%s) to %s."
|
||||
|
||||
msgid "Enable fantaisist commands"
|
||||
msgstr "Enable fantaisist commands"
|
||||
msgid "Enable fantasy commands"
|
||||
msgstr "Enable fantasy commands"
|
||||
|
||||
msgid "Enable greet messages"
|
||||
msgstr "Enable greet messages"
|
||||
@@ -4177,12 +4201,12 @@ msgid "Info about a loaded module"
|
||||
msgstr "Info about a loaded module"
|
||||
|
||||
#, c-format
|
||||
msgid "Information for bot %s:"
|
||||
msgstr "Information for bot %s:"
|
||||
msgid "Information about bot %s:"
|
||||
msgstr "Information about bot %s:"
|
||||
|
||||
#, c-format
|
||||
msgid "Information for channel %s:"
|
||||
msgstr "Information for channel %s:"
|
||||
msgid "Information about channel %s:"
|
||||
msgstr "Information about channel %s:"
|
||||
|
||||
#, c-format
|
||||
msgid "Invalid duration %s, using %d days."
|
||||
@@ -4762,7 +4786,7 @@ msgid ""
|
||||
"Maintains the bad words list for a channel. The bad\n"
|
||||
"words list determines which words are to be kicked\n"
|
||||
"when the bad words kicker is enabled. For more information,\n"
|
||||
"type %s%s HELP KICK %s.\n"
|
||||
"type %s HELP KICK %s.\n"
|
||||
" \n"
|
||||
"The ADD command adds the given word to the\n"
|
||||
"bad words list. If SINGLE is specified, a kick will be\n"
|
||||
@@ -4777,7 +4801,7 @@ msgstr ""
|
||||
"Maintains the bad words list for a channel. The bad\n"
|
||||
"words list determines which words are to be kicked\n"
|
||||
"when the bad words kicker is enabled. For more information,\n"
|
||||
"type %s%s HELP KICK %s.\n"
|
||||
"type %s HELP KICK %s.\n"
|
||||
" \n"
|
||||
"The ADD command adds the given word to the\n"
|
||||
"bad words list. If SINGLE is specified, a kick will be\n"
|
||||
@@ -5127,6 +5151,9 @@ msgstr "Nick %s is now released."
|
||||
msgid "Nick %s is now suspended."
|
||||
msgstr "Nick %s is now suspended."
|
||||
|
||||
msgid "Nick registered"
|
||||
msgstr "Nick registered"
|
||||
|
||||
#, c-format
|
||||
msgid "Nick too long, max length is %zu characters."
|
||||
msgstr "Nick too long, max length is %zu characters."
|
||||
@@ -5383,8 +5410,8 @@ msgid "Persistent"
|
||||
msgstr "Persistent"
|
||||
|
||||
#, c-format
|
||||
msgid "Please confirm that you want to drop %s with %s%s DROP %s %s"
|
||||
msgstr "Please confirm that you want to drop %s with %s%s DROP %s %s"
|
||||
msgid "Please confirm that you want to drop %s with %s DROP %s %s"
|
||||
msgstr "Please confirm that you want to drop %s with %s DROP %s %s"
|
||||
|
||||
msgid "Please contact an Operator to get a vhost assigned to this nick."
|
||||
msgstr "Please contact an Operator to get a vhost assigned to this nick."
|
||||
@@ -5880,18 +5907,18 @@ msgstr "Secureops enforced on %s."
|
||||
|
||||
#, c-format
|
||||
msgid ""
|
||||
"See %s%s HELP %s for more information\n"
|
||||
"See %s HELP %s for more information\n"
|
||||
"about the access list."
|
||||
msgstr ""
|
||||
"See %s%s HELP %s for more information\n"
|
||||
"See %s HELP %s for more information\n"
|
||||
"about the access list."
|
||||
|
||||
#, c-format
|
||||
msgid ""
|
||||
"See %s%s HELP %s for more information\n"
|
||||
"See %s HELP %s for more information\n"
|
||||
"about the flags system."
|
||||
msgstr ""
|
||||
"See %s%s HELP %s for more information\n"
|
||||
"See %s HELP %s for more information\n"
|
||||
"about the flags system."
|
||||
|
||||
msgid "Send a memo to a nick or channel"
|
||||
@@ -6205,7 +6232,7 @@ msgid ""
|
||||
"option tells the bot to kick users who say certain words\n"
|
||||
"on the channels.\n"
|
||||
"You can define bad words for your channel using the\n"
|
||||
"BADWORDS command. Type %s%s HELP BADWORDS for\n"
|
||||
"BADWORDS command. Type %s HELP BADWORDS for\n"
|
||||
"more information.\n"
|
||||
" \n"
|
||||
"ttb is the number of times a user can be kicked\n"
|
||||
@@ -6216,7 +6243,7 @@ msgstr ""
|
||||
"option tells the bot to kick users who say certain words\n"
|
||||
"on the channels.\n"
|
||||
"You can define bad words for your channel using the\n"
|
||||
"BADWORDS command. Type %s%s HELP BADWORDS for\n"
|
||||
"BADWORDS command. Type %s HELP BADWORDS for\n"
|
||||
"more information.\n"
|
||||
" \n"
|
||||
"ttb is the number of times a user can be kicked\n"
|
||||
@@ -6442,7 +6469,7 @@ msgid ""
|
||||
" LIMIT Sets the maximum number of memos you can\n"
|
||||
" receive\n"
|
||||
" \n"
|
||||
"Type %s%s HELP %s option for more information\n"
|
||||
"Type %s HELP %s option for more information\n"
|
||||
"on a specific option."
|
||||
msgstr ""
|
||||
"Sets various memo options. option can be one of:\n"
|
||||
@@ -6452,7 +6479,7 @@ msgstr ""
|
||||
" LIMIT Sets the maximum number of memos you can\n"
|
||||
" receive\n"
|
||||
" \n"
|
||||
"Type %s%s HELP %s option for more information\n"
|
||||
"Type %s HELP %s option for more information\n"
|
||||
"on a specific option."
|
||||
|
||||
msgid "Sets various nickname options. option can be one of:"
|
||||
@@ -6508,8 +6535,8 @@ msgstr ""
|
||||
"may not get set automatically."
|
||||
|
||||
#, c-format
|
||||
msgid "Setting %s not known. Type %s%s HELP LEVELS for a list of valid settings."
|
||||
msgstr "Setting %s not known. Type %s%s HELP LEVELS for a list of valid settings."
|
||||
msgid "Setting %s not known. Type %s HELP LEVELS for a list of valid settings."
|
||||
msgstr "Setting %s not known. Type %s HELP LEVELS for a list of valid settings."
|
||||
|
||||
msgid "Setting for DEBUG must be ON, OFF, or a positive number."
|
||||
msgstr "Setting for DEBUG must be ON, OFF, or a positive number."
|
||||
@@ -7419,10 +7446,10 @@ msgstr "There is %zu memo on channel %s."
|
||||
#, c-format
|
||||
msgid ""
|
||||
"There is a new memo on channel %s.\n"
|
||||
"Type %s%s READ %s %zu to read it."
|
||||
"Type %s READ %s %zu to read it."
|
||||
msgstr ""
|
||||
"There is a new memo on channel %s.\n"
|
||||
"Type %s%s READ %s %zu to read it."
|
||||
"Type %s READ %s %zu to read it."
|
||||
|
||||
#, c-format
|
||||
msgid "There is no bot assigned to %s anymore."
|
||||
@@ -7719,20 +7746,20 @@ msgstr "This nickname is suspended."
|
||||
#, c-format
|
||||
msgid ""
|
||||
"This nickname is registered and protected. If it is your\n"
|
||||
"nick, type %s%s IDENTIFY password. Otherwise,\n"
|
||||
"nick, type %s IDENTIFY password. Otherwise,\n"
|
||||
"please choose a different nick."
|
||||
msgstr ""
|
||||
"This nickname is registered and protected. If it is your\n"
|
||||
"nick, type %s%s IDENTIFY password. Otherwise,\n"
|
||||
"nick, type %s IDENTIFY password. Otherwise,\n"
|
||||
"please choose a different nick."
|
||||
|
||||
#, c-format
|
||||
msgid "To delete, type: %s%s %s %d"
|
||||
msgstr "To delete, type: %s%s %s %d"
|
||||
msgid "To delete, type: %s %s %d"
|
||||
msgstr "To delete, type: %s %s %d"
|
||||
|
||||
#, c-format
|
||||
msgid "To delete, type: %s%s %s %s %d"
|
||||
msgstr "To delete, type: %s%s %s %s %d"
|
||||
msgid "To delete, type: %s %s %s %d"
|
||||
msgstr "To delete, type: %s %s %s %d"
|
||||
|
||||
msgid "To protect ops against bot kicks"
|
||||
msgstr "To protect ops against bot kicks"
|
||||
@@ -7887,21 +7914,21 @@ msgstr "Type"
|
||||
|
||||
#, c-format
|
||||
msgid ""
|
||||
"Type %s%s HELP %s option for more information\n"
|
||||
"Type %s HELP %s option for more information\n"
|
||||
"on a specific option."
|
||||
msgstr ""
|
||||
"Type %s%s HELP %s option for more information\n"
|
||||
"Type %s HELP %s option for more information\n"
|
||||
"on a specific option."
|
||||
|
||||
#, c-format
|
||||
msgid ""
|
||||
"Type %s%s HELP %s option for more information\n"
|
||||
"Type %s HELP %s option for more information\n"
|
||||
"on a specific option.\n"
|
||||
" \n"
|
||||
"Note: access to this command is controlled by the\n"
|
||||
"level SET."
|
||||
msgstr ""
|
||||
"Type %s%s HELP %s option for more information\n"
|
||||
"Type %s HELP %s option for more information\n"
|
||||
"on a specific option.\n"
|
||||
" \n"
|
||||
"Note: access to this command is controlled by the\n"
|
||||
@@ -7909,25 +7936,25 @@ msgstr ""
|
||||
|
||||
#, c-format
|
||||
msgid ""
|
||||
"Type %s%s HELP %s option for more information\n"
|
||||
"Type %s HELP %s option for more information\n"
|
||||
"on a specific option. The options will be set on the given\n"
|
||||
"nickname."
|
||||
msgstr ""
|
||||
"Type %s%s HELP %s option for more information\n"
|
||||
"Type %s HELP %s option for more information\n"
|
||||
"on a specific option. The options will be set on the given\n"
|
||||
"nickname."
|
||||
|
||||
#, c-format
|
||||
msgid ""
|
||||
"Type %s%s HELP %s option for more information on a\n"
|
||||
"Type %s HELP %s option for more information on a\n"
|
||||
"particular option."
|
||||
msgstr ""
|
||||
"Type %s%s HELP %s option for more information on a\n"
|
||||
"Type %s HELP %s option for more information on a\n"
|
||||
"particular option."
|
||||
|
||||
#, c-format
|
||||
msgid "Type %s%s SET EMAIL email in order to set your email."
|
||||
msgstr "Type %s%s SET EMAIL email in order to set your email."
|
||||
msgid "Type %s SET EMAIL email in order to set your email."
|
||||
msgstr "Type %s SET EMAIL email in order to set your email."
|
||||
|
||||
msgid "Un-Load a module"
|
||||
msgstr "Un-Load a module"
|
||||
@@ -7975,16 +8002,16 @@ msgid "Unknown command %s."
|
||||
msgstr "Unknown command %s."
|
||||
|
||||
#, c-format
|
||||
msgid "Unknown command %s. \"%s%s HELP\" for help."
|
||||
msgstr "Unknown command %s. \"%s%s HELP\" for help."
|
||||
msgid "Unknown command %s. \"%s HELP\" for help."
|
||||
msgstr "Unknown command %s. \"%s HELP\" for help."
|
||||
|
||||
#, c-format
|
||||
msgid "Unknown command %s. Did you mean %s?"
|
||||
msgstr "Unknown command %s. Did you mean %s?"
|
||||
|
||||
#, c-format
|
||||
msgid "Unknown command %s. Did you mean %s? \"%s%s HELP\" for help."
|
||||
msgstr "Unknown command %s. Did you mean %s? \"%s%s HELP\" for help."
|
||||
msgid "Unknown command %s. Did you mean %s? \"%s HELP\" for help."
|
||||
msgstr "Unknown command %s. Did you mean %s? \"%s HELP\" for help."
|
||||
|
||||
#, c-format
|
||||
msgid "Unknown mode character %c ignored."
|
||||
@@ -8072,6 +8099,10 @@ msgstr "Used to manage the list of privileged users"
|
||||
msgid "Used to modify the channel status of you or other users"
|
||||
msgstr "Used to modify the channel status of you or other users"
|
||||
|
||||
#, c-format
|
||||
msgid "User %s isn't currently logged in to an account."
|
||||
msgstr "User %s isn't currently logged in to an account."
|
||||
|
||||
msgid "User has been banned from the channel"
|
||||
msgstr "User has been banned from the channel"
|
||||
|
||||
@@ -8325,10 +8356,6 @@ msgstr "You can't add a channel to its own access list."
|
||||
msgid "You can't logout %s, they are a Services Operator."
|
||||
msgstr "You can't logout %s, they are a Services Operator."
|
||||
|
||||
#, c-format
|
||||
msgid "You cannot %s on this network."
|
||||
msgstr "You cannot %s on this network."
|
||||
|
||||
#, c-format
|
||||
msgid "You cannot set the %c flag."
|
||||
msgstr "You cannot set the %c flag."
|
||||
@@ -8403,10 +8430,10 @@ msgstr "You have 1 new memo."
|
||||
#, c-format
|
||||
msgid ""
|
||||
"You have a new memo from %s.\n"
|
||||
"Type %s%s READ %zu to read it."
|
||||
"Type %s READ %zu to read it."
|
||||
msgstr ""
|
||||
"You have a new memo from %s.\n"
|
||||
"Type %s%s READ %zu to read it."
|
||||
"Type %s READ %zu to read it."
|
||||
|
||||
#, c-format
|
||||
msgid "You have been invited to %s by %s."
|
||||
@@ -8467,6 +8494,10 @@ msgstr "You may not change the email of other Services Operators."
|
||||
msgid "You may not change the password of other Services Operators."
|
||||
msgstr "You may not change the password of other Services Operators."
|
||||
|
||||
#, c-format
|
||||
msgid "You may not drop %s as it is the display nick for the account."
|
||||
msgstr "You may not drop %s as it is the display nick for the account."
|
||||
|
||||
msgid "You may not drop other Services Operators' nicknames."
|
||||
msgstr "You may not drop other Services Operators' nicknames."
|
||||
|
||||
@@ -8564,6 +8595,10 @@ msgstr "Your IRCd does not support SVSPART."
|
||||
msgid "Your IRCd does not support vidents. If this is incorrect please report this as a possible bug."
|
||||
msgstr "Your IRCd does not support vidents. If this is incorrect please report this as a possible bug."
|
||||
|
||||
#, c-format
|
||||
msgid "Your SSL certificate fingerprint %s has been automatically added to your certificate list."
|
||||
msgstr "Your SSL certificate fingerprint %s has been automatically added to your certificate list."
|
||||
|
||||
#, c-format
|
||||
msgid "Your account %s has been successfully created."
|
||||
msgstr "Your account %s has been successfully created."
|
||||
@@ -8870,3 +8905,15 @@ msgstr "{nick | channel}"
|
||||
|
||||
msgid "{nick | channel} memo-text"
|
||||
msgstr "{nick | channel} memo-text"
|
||||
|
||||
#, c-format
|
||||
#~ msgid "\"/msg %s\" is no longer supported. Use \"/msg %s@%s\" or \"/%s\" instead."
|
||||
#~ msgstr "\"/msg %s\" is no longer supported. Use \"/msg %s@%s\" or \"/%s\" instead."
|
||||
|
||||
#, c-format
|
||||
#~ msgid "To delete, type: %s%s %s %s %d"
|
||||
#~ msgstr "To delete, type: %s%s %s %s %d"
|
||||
|
||||
#, c-format
|
||||
#~ msgid "You cannot %s on this network."
|
||||
#~ msgstr "You cannot %s on this network."
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
+2350
-4599
File diff suppressed because it is too large
Load Diff
-10224
File diff suppressed because it is too large
Load Diff
+260
-367
File diff suppressed because it is too large
Load Diff
@@ -94,7 +94,9 @@ macro(build_modules SRC)
|
||||
target_link_libraries(${SO} ${PROGRAM_NAME})
|
||||
endif()
|
||||
# Set the module to be installed to the module directory under the data directory
|
||||
install(TARGETS ${SO} DESTINATION ${LIB_DIR}/modules)
|
||||
install(TARGETS ${SO}
|
||||
DESTINATION ${MODULE_DIR}
|
||||
LIBRARY)
|
||||
endif()
|
||||
endif()
|
||||
endforeach()
|
||||
@@ -168,7 +170,9 @@ macro(build_subdir)
|
||||
endif()
|
||||
|
||||
# Set the module to be installed to the module directory under the data directory
|
||||
install(TARGETS ${SO} DESTINATION ${LIB_DIR}/modules)
|
||||
install(TARGETS ${SO}
|
||||
DESTINATION ${MODULE_DIR}
|
||||
LIBRARY)
|
||||
endmacro()
|
||||
|
||||
include_directories(${CMAKE_CURRENT_SOURCE_DIR})
|
||||
|
||||
+19
-10
@@ -57,12 +57,20 @@ public:
|
||||
BotInfo *bi = user->server == Me ? dynamic_cast<BotInfo *>(user) : NULL;
|
||||
if (bi && Config->GetModule(this)->Get<bool>("smartjoin"))
|
||||
{
|
||||
/* We check for bans */
|
||||
for (const auto &entry : c->GetModeList("BAN"))
|
||||
if (IRCD->CanClearBans)
|
||||
{
|
||||
Entry ban("BAN", entry);
|
||||
if (ban.Matches(user))
|
||||
c->RemoveMode(NULL, "BAN", ban.GetMask());
|
||||
// We can ask the IRCd to clear bans.
|
||||
IRCD->SendClearBans(bi, c, bi);
|
||||
}
|
||||
else
|
||||
{
|
||||
// We have to check for bans.
|
||||
for (const auto &entry : c->GetModeList("BAN"))
|
||||
{
|
||||
Entry ban("BAN", entry);
|
||||
if (ban.Matches(user))
|
||||
c->RemoveMode(NULL, "BAN", ban.GetMask());
|
||||
}
|
||||
}
|
||||
|
||||
Anope::string Limit;
|
||||
@@ -75,7 +83,8 @@ public:
|
||||
{
|
||||
ChannelMode *cm = ModeManager::FindChannelModeByName("OP");
|
||||
char symbol = cm ? anope_dynamic_static_cast<ChannelModeStatus *>(cm)->symbol : 0;
|
||||
IRCD->SendNotice(bi, (symbol ? Anope::string(symbol) : "") + c->name, "%s invited %s into the channel.", user->nick.c_str(), user->nick.c_str());
|
||||
const auto message = Anope::printf("%s invited %s into the channel.", user->nick.c_str(), user->nick.c_str());
|
||||
IRCD->SendNotice(bi, (symbol ? Anope::string(symbol) : "") + c->name, message);
|
||||
}
|
||||
|
||||
ModeManager::ProcessModes();
|
||||
@@ -144,11 +153,11 @@ public:
|
||||
"It has been created for users that can't host or\n"
|
||||
"configure a bot, or for use on networks that don't\n"
|
||||
"allow user bots. Available commands are listed\n"
|
||||
"below; to use them, type \002%s%s \037command\037\002. For\n"
|
||||
"below; to use them, type \002%s \037command\037\002. For\n"
|
||||
"more information on a specific command, type\n"
|
||||
"\002%s%s %s \037command\037\002.\n"),
|
||||
BotServ->nick.c_str(), Config->StrictPrivmsg.c_str(), BotServ->nick.c_str(),
|
||||
Config->StrictPrivmsg.c_str(), BotServ->nick.c_str(), source.command.c_str());
|
||||
"\002%s %s \037command\037\002.\n"),
|
||||
BotServ->nick.c_str(), BotServ->GetQueryCommand().c_str(),
|
||||
BotServ->GetQueryCommand().c_str(), source.command.c_str());
|
||||
}
|
||||
|
||||
return EVENT_CONTINUE;
|
||||
|
||||
@@ -21,9 +21,9 @@ struct BadWordImpl final
|
||||
|
||||
void Serialize(Serialize::Data &data) const override
|
||||
{
|
||||
data["ci"] << this->chan;
|
||||
data["word"] << this->word;
|
||||
data.SetType("type", Serialize::Data::DT_INT); data["type"] << this->type;
|
||||
data.Store("ci", this->chan);
|
||||
data.Store("word", this->word);
|
||||
data.Store("type", this->type);
|
||||
}
|
||||
|
||||
static Serializable *Unserialize(Serializable *obj, Serialize::Data &);
|
||||
@@ -430,7 +430,7 @@ public:
|
||||
source.Reply(_("Maintains the \002bad words list\002 for a channel. The bad\n"
|
||||
"words list determines which words are to be kicked\n"
|
||||
"when the bad words kicker is enabled. For more information,\n"
|
||||
"type \002%s%s HELP KICK %s\002.\n"
|
||||
"type \002%s HELP KICK %s\002.\n"
|
||||
" \n"
|
||||
"The \002ADD\002 command adds the given word to the\n"
|
||||
"bad words list. If SINGLE is specified, a kick will be\n"
|
||||
@@ -440,7 +440,7 @@ public:
|
||||
"will be done if a user says a word that ends with\n"
|
||||
"\037word\037. If you don't specify anything, a kick will\n"
|
||||
"be issued every time \037word\037 is said by a user.\n"
|
||||
" \n"), Config->StrictPrivmsg.c_str(), source.service->nick.c_str(), source.command.c_str());
|
||||
" \n"), source.service->GetQueryCommand().c_str(), source.command.c_str());
|
||||
source.Reply(_("The \002DEL\002 command removes the given word from the\n"
|
||||
"bad words list. If a list of entry numbers is given, those\n"
|
||||
"entries are deleted. (See the example for LIST below.)\n"
|
||||
|
||||
@@ -56,7 +56,7 @@ public:
|
||||
return;
|
||||
}
|
||||
|
||||
IRCD->SendPrivmsg(*ci->bi, ci->name, "%s", text.c_str());
|
||||
IRCD->SendPrivmsg(*ci->bi, ci->name, text);
|
||||
ci->bi->lastmsg = Anope::CurTime;
|
||||
|
||||
bool override = !source.AccessFor(ci).HasPriv("SAY");
|
||||
@@ -111,11 +111,7 @@ public:
|
||||
return;
|
||||
}
|
||||
|
||||
message = message.replace_all_cs("\1", "");
|
||||
if (message.empty())
|
||||
return;
|
||||
|
||||
IRCD->SendAction(*ci->bi, ci->name, "%s", message.c_str());
|
||||
IRCD->SendPrivmsg(*ci->bi, ci->name, Anope::FormatCTCP("ACTION", message));
|
||||
ci->bi->lastmsg = Anope::CurTime;
|
||||
|
||||
bool override = !source.AccessFor(ci).HasPriv("SAY");
|
||||
|
||||
@@ -50,7 +50,7 @@ public:
|
||||
|
||||
if (bi)
|
||||
{
|
||||
source.Reply(_("Information for bot \002%s\002:"), bi->nick.c_str());
|
||||
source.Reply(_("Information about bot \002%s\002:"), bi->nick.c_str());
|
||||
info[_("Mask")] = bi->GetIdent() + "@" + bi->host;
|
||||
info[_("Real name")] = bi->realname;
|
||||
info[_("Created")] = Anope::strftime(bi->created, source.GetAccount());
|
||||
|
||||
+27
-27
@@ -53,26 +53,28 @@ struct KickerDataImpl final
|
||||
if (kd == NULL)
|
||||
return;
|
||||
|
||||
data["kickerdata:amsgs"] << kd->amsgs;
|
||||
data["kickerdata:badwords"] << kd->badwords;
|
||||
data["kickerdata:bolds"] << kd->bolds;
|
||||
data["kickerdata:caps"] << kd->caps;
|
||||
data["kickerdata:colors"] << kd->colors;
|
||||
data["kickerdata:flood"] << kd->flood;
|
||||
data["kickerdata:italics"] << kd->italics;
|
||||
data["kickerdata:repeat"] << kd->repeat;
|
||||
data["kickerdata:reverses"] << kd->reverses;
|
||||
data["kickerdata:underlines"] << kd->underlines;
|
||||
data.Store("kickerdata:amsgs", kd->amsgs);
|
||||
data.Store("kickerdata:badwords", kd->badwords);
|
||||
data.Store("kickerdata:bolds", kd->bolds);
|
||||
data.Store("kickerdata:caps", kd->caps);
|
||||
data.Store("kickerdata:colors", kd->colors);
|
||||
data.Store("kickerdata:flood", kd->flood);
|
||||
data.Store("kickerdata:italics", kd->italics);
|
||||
data.Store("kickerdata:repeat", kd->repeat);
|
||||
data.Store("kickerdata:reverses", kd->reverses);
|
||||
data.Store("kickerdata:underlines", kd->underlines);
|
||||
data.Store("capsmin", kd->capsmin);
|
||||
data.Store("capspercent", kd->capspercent);
|
||||
data.Store("floodlines", kd->floodlines);
|
||||
data.Store("floodsecs", kd->floodsecs);
|
||||
data.Store("repeattimes", kd->repeattimes);
|
||||
data.Store("dontkickops", kd->dontkickops);
|
||||
data.Store("dontkickvoices", kd->dontkickvoices);
|
||||
|
||||
data.SetType("capsmin", Serialize::Data::DT_INT); data["capsmin"] << kd->capsmin;
|
||||
data.SetType("capspercent", Serialize::Data::DT_INT); data["capspercent"] << kd->capspercent;
|
||||
data.SetType("floodlines", Serialize::Data::DT_INT); data["floodlines"] << kd->floodlines;
|
||||
data.SetType("floodsecs", Serialize::Data::DT_INT); data["floodsecs"] << kd->floodsecs;
|
||||
data.SetType("repeattimes", Serialize::Data::DT_INT); data["repeattimes"] << kd->repeattimes;
|
||||
data.SetType("dontkickops", Serialize::Data::DT_INT); data["dontkickops"] << kd->dontkickops;
|
||||
data.SetType("dontkickvoices", Serialize::Data::DT_INT); data["dontkickvoices"] << kd->dontkickvoices;
|
||||
std::ostringstream oss;
|
||||
for (auto ttbtype : kd->ttb)
|
||||
data["ttb"] << ttbtype << " ";
|
||||
oss << ttbtype << " ";
|
||||
data.Store("ttb", oss.str());
|
||||
}
|
||||
|
||||
void ExtensibleUnserialize(Extensible *e, Serializable *s, Serialize::Data &data) override
|
||||
@@ -151,11 +153,11 @@ public:
|
||||
}
|
||||
}
|
||||
|
||||
source.Reply(_("Type \002%s%s HELP %s \037option\037\002 for more information\n"
|
||||
source.Reply(_("Type \002%s HELP %s \037option\037\002 for more information\n"
|
||||
"on a specific option.\n"
|
||||
" \n"
|
||||
"Note: access to this command is controlled by the\n"
|
||||
"level SET."), Config->StrictPrivmsg.c_str(), source.service->nick.c_str(), this_name.c_str());
|
||||
"level SET."), source.service->GetQueryCommand().c_str(), this_name.c_str());
|
||||
|
||||
return true;
|
||||
}
|
||||
@@ -306,12 +308,12 @@ public:
|
||||
"option tells the bot to kick users who say certain words\n"
|
||||
"on the channels.\n"
|
||||
"You can define bad words for your channel using the\n"
|
||||
"\002BADWORDS\002 command. Type \002%s%s HELP BADWORDS\002 for\n"
|
||||
"\002BADWORDS\002 command. Type \002%s HELP BADWORDS\002 for\n"
|
||||
"more information.\n"
|
||||
" \n"
|
||||
"\037ttb\037 is the number of times a user can be kicked\n"
|
||||
"before it gets banned. Don't give ttb to disable\n"
|
||||
"the ban system once activated."), Config->StrictPrivmsg.c_str(), source.service->nick.c_str());
|
||||
"the ban system once activated."), source.service->GetQueryCommand().c_str());
|
||||
return true;
|
||||
}
|
||||
};
|
||||
@@ -1216,11 +1218,9 @@ public:
|
||||
/* If it's a /me, cut the CTCP part because the ACTION will cause
|
||||
* problems with the caps or badwords kicker
|
||||
*/
|
||||
if (realbuf.substr(0, 8).equals_ci("\1ACTION ") && realbuf[realbuf.length() - 1] == '\1')
|
||||
{
|
||||
realbuf.erase(0, 8);
|
||||
realbuf.erase(realbuf.length() - 1);
|
||||
}
|
||||
Anope::string ctcpname, ctcpbody;
|
||||
if (Anope::ParseCTCP(msg, ctcpname, ctcpbody) && ctcpname.equals_ci("ACTION"))
|
||||
realbuf = ctcpbody;
|
||||
|
||||
if (realbuf.empty())
|
||||
return;
|
||||
|
||||
@@ -58,8 +58,8 @@ public:
|
||||
}
|
||||
}
|
||||
}
|
||||
source.Reply(_("Type \002%s%s HELP %s \037option\037\002 for more information on a\n"
|
||||
"particular option."), Config->StrictPrivmsg.c_str(), source.service->nick.c_str(), this_name.c_str());
|
||||
source.Reply(_("Type \002%s HELP %s \037option\037\002 for more information on a\n"
|
||||
"particular option."), source.service->GetQueryCommand().c_str(), this_name.c_str());
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
@@ -262,9 +262,9 @@ public:
|
||||
"malicious users from \"taking over\" channels by limiting\n"
|
||||
"who is allowed channel operator privileges. Available\n"
|
||||
"commands are listed below; to use them, type\n"
|
||||
"\002%s%s \037command\037\002. For more information on a\n"
|
||||
"specific command, type \002%s%s HELP \037command\037\002.\n"),
|
||||
ChanServ->nick.c_str(), ChanServ->nick.c_str(), Config->StrictPrivmsg.c_str(), ChanServ->nick.c_str(), Config->StrictPrivmsg.c_str(), ChanServ->nick.c_str());
|
||||
"\002%s \037command\037\002. For more information on a\n"
|
||||
"specific command, type \002%s HELP \037command\037\002.\n"),
|
||||
ChanServ->nick.c_str(), ChanServ->nick.c_str(), ChanServ->GetQueryCommand().c_str(), ChanServ->GetQueryCommand().c_str());
|
||||
return EVENT_CONTINUE;
|
||||
}
|
||||
|
||||
@@ -382,8 +382,11 @@ public:
|
||||
return EVENT_CONTINUE;
|
||||
}
|
||||
|
||||
void OnPostInit() override
|
||||
void OnUplinkSync(Server* s) override
|
||||
{
|
||||
// We need to do this when the uplink is synced as we may not know if
|
||||
// the mode exists before then on some IRCds (e.g. InspIRCd).
|
||||
|
||||
if (!persist)
|
||||
return;
|
||||
|
||||
|
||||
@@ -87,6 +87,7 @@ class CommandCSAccess final
|
||||
void DoAdd(CommandSource &source, ChannelInfo *ci, const std::vector<Anope::string> ¶ms)
|
||||
{
|
||||
Anope::string mask = params[2];
|
||||
Anope::string description = params.size() > 4 ? params[4] : "";
|
||||
Privilege *p = NULL;
|
||||
int level = ACCESS_INVALID;
|
||||
|
||||
@@ -172,7 +173,11 @@ class CommandCSAccess final
|
||||
{
|
||||
User *targ = User::Find(mask, true);
|
||||
if (targ != NULL)
|
||||
{
|
||||
mask = "*!*@" + targ->GetDisplayedHost();
|
||||
if (description.empty())
|
||||
description = targ->nick;
|
||||
}
|
||||
else
|
||||
{
|
||||
source.Reply(NICK_X_NOT_REGISTERED, mask.c_str());
|
||||
@@ -216,7 +221,7 @@ class CommandCSAccess final
|
||||
access->level = level;
|
||||
access->last_seen = 0;
|
||||
access->created = Anope::CurTime;
|
||||
access->description = params.size() > 4 ? params[4] : "";
|
||||
access->description = description;
|
||||
ci->AddAccess(access);
|
||||
|
||||
FOREACH_MOD(OnAccessAdd, (ci, source, access));
|
||||
@@ -625,8 +630,8 @@ public:
|
||||
Anope::string cmd;
|
||||
if (Command::FindCommandFromService("chanserv/levels", bi, cmd))
|
||||
source.Reply(_("\002User access levels\002 can be seen by using the\n"
|
||||
"\002%s\002 command; type \002%s%s HELP LEVELS\002 for\n"
|
||||
"information."), cmd.c_str(), Config->StrictPrivmsg.c_str(), bi->nick.c_str());
|
||||
"\002%s\002 command; type \002%s HELP LEVELS\002 for\n"
|
||||
"information."), cmd.c_str(), bi->GetQueryCommand().c_str());
|
||||
return true;
|
||||
}
|
||||
};
|
||||
@@ -660,7 +665,10 @@ class CommandCSLevels final
|
||||
{
|
||||
Privilege *p = PrivilegeManager::FindPrivilege(what);
|
||||
if (p == NULL)
|
||||
source.Reply(_("Setting \002%s\002 not known. Type \002%s%s HELP LEVELS\002 for a list of valid settings."), what.c_str(), Config->StrictPrivmsg.c_str(), source.service->nick.c_str());
|
||||
{
|
||||
source.Reply(_("Setting \002%s\002 not known. Type \002%s HELP LEVELS\002 for a list of valid settings."),
|
||||
what.c_str(), source.service->GetQueryCommand().c_str());
|
||||
}
|
||||
else
|
||||
{
|
||||
bool override = !source.AccessFor(ci).HasPriv("FOUNDER");
|
||||
@@ -701,7 +709,8 @@ class CommandCSLevels final
|
||||
return;
|
||||
}
|
||||
|
||||
source.Reply(_("Setting \002%s\002 not known. Type \002%s%s HELP LEVELS\002 for a list of valid settings."), what.c_str(), Config->StrictPrivmsg.c_str(), source.service->nick.c_str());
|
||||
source.Reply(_("Setting \002%s\002 not known. Type \002%s HELP LEVELS\002 for a list of valid settings."),
|
||||
what.c_str(), source.service->GetQueryCommand().c_str());
|
||||
}
|
||||
|
||||
static void DoList(CommandSource &source, ChannelInfo *ci)
|
||||
|
||||
@@ -50,7 +50,7 @@ public:
|
||||
}
|
||||
|
||||
auto *code = dropcode.Get(ci);
|
||||
if (params.size() < 2 || !code || !code->equals_ci(params[1]))
|
||||
if (params.size() < 2 || ((!code || !code->equals_ci(params[1])) && (!source.HasPriv("chanserv/drop/override") || params[1] != "OVERRIDE")))
|
||||
{
|
||||
if (!code)
|
||||
{
|
||||
@@ -58,8 +58,8 @@ public:
|
||||
*code = Anope::Random(15);
|
||||
}
|
||||
|
||||
source.Reply(CONFIRM_DROP, ci->name.c_str(), Config->StrictPrivmsg.c_str(),
|
||||
source.service->nick.c_str(), ci->name.c_str(), code->c_str());
|
||||
source.Reply(CONFIRM_DROP, ci->name.c_str(), source.service->GetQueryCommand().c_str(),
|
||||
ci->name.c_str(), code->c_str());
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -94,6 +94,10 @@ public:
|
||||
source.Reply(_("Unregisters the named channel. Can only be used by\n"
|
||||
"the \002channel founder\002."));
|
||||
|
||||
source.Reply(" ");
|
||||
if (source.HasPriv("chanserv/drop/override"))
|
||||
source.Reply(_("Additionally, Services Operators with the \037chanserv/drop/override\037 permission can\n"
|
||||
"replace \037code\037 with \002OVERRIDE\002 to drop without a confirmation code."));
|
||||
return true;
|
||||
}
|
||||
};
|
||||
|
||||
@@ -32,10 +32,10 @@ struct EntryMsgImpl final
|
||||
|
||||
void Serialize(Serialize::Data &data) const override
|
||||
{
|
||||
data["ci"] << this->chan;
|
||||
data["creator"] << this->creator;
|
||||
data["message"] << this->message;
|
||||
data.SetType("when", Serialize::Data::DT_INT); data["when"] << this->when;
|
||||
data.Store("ci", this->chan);
|
||||
data.Store("creator", this->creator);
|
||||
data.Store("message", this->message);
|
||||
data.Store("when", this->when);
|
||||
}
|
||||
|
||||
static Serializable *Unserialize(Serializable *obj, Serialize::Data &data);
|
||||
|
||||
@@ -79,7 +79,7 @@ FlagsAccessProvider *FlagsAccessProvider::ap;
|
||||
class CommandCSFlags final
|
||||
: public Command
|
||||
{
|
||||
void DoModify(CommandSource &source, ChannelInfo *ci, Anope::string mask, const Anope::string &flags, const Anope::string &description)
|
||||
void DoModify(CommandSource &source, ChannelInfo *ci, Anope::string mask, const Anope::string &flags, Anope::string description)
|
||||
{
|
||||
if (flags.empty())
|
||||
{
|
||||
@@ -131,7 +131,11 @@ class CommandCSFlags final
|
||||
{
|
||||
User *targ = User::Find(mask, true);
|
||||
if (targ != NULL)
|
||||
{
|
||||
mask = "*!*@" + targ->GetDisplayedHost();
|
||||
if (description.empty())
|
||||
description = targ->nick;
|
||||
}
|
||||
else
|
||||
{
|
||||
source.Reply(NICK_X_NOT_REGISTERED, mask.c_str());
|
||||
|
||||
+10
-10
@@ -37,14 +37,14 @@ struct LogSettingImpl final
|
||||
|
||||
void Serialize(Serialize::Data &data) const override
|
||||
{
|
||||
data["ci"] << chan;
|
||||
data["service_name"] << service_name;
|
||||
data["command_service"] << command_service;
|
||||
data["command_name"] << command_name;
|
||||
data["method"] << method;
|
||||
data["extra"] << extra;
|
||||
data["creator"] << creator;
|
||||
data.SetType("created", Serialize::Data::DT_INT); data["created"] << created;
|
||||
data.Store("ci", chan);
|
||||
data.Store("service_name", service_name);
|
||||
data.Store("command_service", command_service);
|
||||
data.Store("command_name", command_name);
|
||||
data.Store("method", method);
|
||||
data.Store("extra", extra);
|
||||
data.Store("creator", creator);
|
||||
data.Store("created", created);
|
||||
}
|
||||
|
||||
static Serializable *Unserialize(Serializable *obj, Serialize::Data &data)
|
||||
@@ -391,11 +391,11 @@ public:
|
||||
/* Sending a channel message or notice in response to a fantasy command */;
|
||||
else if (log->method.equals_ci("MESSAGE") && l->ci->c)
|
||||
{
|
||||
IRCD->SendPrivmsg(l->ci->WhoSends(), log->extra + l->ci->c->name, "%s", buffer.c_str());
|
||||
IRCD->SendPrivmsg(l->ci->WhoSends(), log->extra + l->ci->c->name, buffer);
|
||||
l->ci->WhoSends()->lastmsg = Anope::CurTime;
|
||||
}
|
||||
else if (log->method.equals_ci("NOTICE") && l->ci->c)
|
||||
IRCD->SendNotice(l->ci->WhoSends(), log->extra + l->ci->c->name, "%s", buffer.c_str());
|
||||
IRCD->SendNotice(l->ci->WhoSends(), log->extra + l->ci->c->name, buffer);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -205,12 +205,12 @@ struct ModeLocksImpl final
|
||||
|
||||
void ModeLockImpl::Serialize(Serialize::Data &data) const
|
||||
{
|
||||
data["ci"] << this->ci;
|
||||
data["set"] << this->set;
|
||||
data["name"] << this->name;
|
||||
data["param"] << this->param;
|
||||
data["setter"] << this->setter;
|
||||
data.SetType("created", Serialize::Data::DT_INT); data["created"] << this->created;
|
||||
data.Store("ci", this->ci);
|
||||
data.Store("set", this->set);
|
||||
data.Store("name", this->name);
|
||||
data.Store("param", this->param);
|
||||
data.Store("setter", this->setter);
|
||||
data.Store("created", this->created);
|
||||
}
|
||||
|
||||
Serializable *ModeLockImpl::Unserialize(Serializable *obj, Serialize::Data &data)
|
||||
@@ -658,7 +658,8 @@ class CommandCSMode final
|
||||
}
|
||||
else
|
||||
{
|
||||
for (const auto &mode : ci->c->GetModeList(cm->name))
|
||||
std::vector<Anope::string> v = ci->c->GetModeList(cm->name);
|
||||
for (const auto &mode : v)
|
||||
{
|
||||
if (Anope::Match(mode, param))
|
||||
ci->c->RemoveMode(NULL, cm, mode);
|
||||
|
||||
@@ -100,9 +100,9 @@ public:
|
||||
Anope::string cmd;
|
||||
if (Command::FindCommandFromService("chanserv/access", bi, cmd))
|
||||
source.Reply(_(" \n"
|
||||
"See the \002%s\002 command (\002%s%s HELP ACCESS\002) for\n"
|
||||
"See the \002%s\002 command (\002%s HELP ACCESS\002) for\n"
|
||||
"information on giving a subset of these privileges to\n"
|
||||
"other channel users.\n"), cmd.c_str(), Config->StrictPrivmsg.c_str(), bi->nick.c_str());
|
||||
"other channel users.\n"), cmd.c_str(), bi->GetQueryCommand().c_str());
|
||||
source.Reply(_(" \n"
|
||||
"NOTICE: In order to register a channel, you must have\n"
|
||||
"first registered your nickname."));
|
||||
|
||||
@@ -46,13 +46,13 @@ struct SeenInfo final
|
||||
|
||||
void Serialize(Serialize::Data &data) const override
|
||||
{
|
||||
data["nick"] << nick;
|
||||
data["vhost"] << vhost;
|
||||
data["type"] << type;
|
||||
data["nick2"] << nick2;
|
||||
data["channel"] << channel;
|
||||
data["message"] << message;
|
||||
data.SetType("last", Serialize::Data::DT_INT); data["last"] << last;
|
||||
data.Store("nick", nick);
|
||||
data.Store("vhost", vhost);
|
||||
data.Store("type", type);
|
||||
data.Store("nick2", nick2);
|
||||
data.Store("channel", channel);
|
||||
data.Store("message", message);
|
||||
data.Store("last", last);
|
||||
}
|
||||
|
||||
static Serializable *Unserialize(Serializable *obj, Serialize::Data &data)
|
||||
|
||||
@@ -59,8 +59,8 @@ public:
|
||||
c->OnServHelp(source);
|
||||
}
|
||||
}
|
||||
source.Reply(_("Type \002%s%s HELP %s \037option\037\002 for more information on a\n"
|
||||
"particular option."), Config->StrictPrivmsg.c_str(), source.service->nick.c_str(), this_name.c_str());
|
||||
source.Reply(_("Type \002%s HELP %s \037option\037\002 for more information on a\n"
|
||||
"particular option."), source.service->GetQueryCommand().c_str(), this_name.c_str());
|
||||
return true;
|
||||
}
|
||||
};
|
||||
@@ -513,12 +513,13 @@ public:
|
||||
/* Set the perm mode */
|
||||
if (cm)
|
||||
{
|
||||
if (ci->c && !ci->c->HasMode("PERM"))
|
||||
ci->c->SetMode(NULL, cm);
|
||||
/* Add it to the channels mlock */
|
||||
ModeLocks *ml = ci->Require<ModeLocks>("modelocks");
|
||||
if (ml)
|
||||
ml->SetMLock(cm, true, "", source.GetNick());
|
||||
|
||||
if (ci->c && !ci->c->HasMode("PERM"))
|
||||
ci->c->SetMode(NULL, cm);
|
||||
}
|
||||
/* No botserv bot, no channel mode, give them ChanServ.
|
||||
* Yes, this works fine with no BotServ.
|
||||
@@ -556,12 +557,13 @@ public:
|
||||
/* Unset perm mode */
|
||||
if (cm)
|
||||
{
|
||||
if (ci->c && ci->c->HasMode("PERM"))
|
||||
ci->c->RemoveMode(NULL, cm);
|
||||
/* Remove from mlock */
|
||||
ModeLocks *ml = ci->GetExt<ModeLocks>("modelocks");
|
||||
if (ml)
|
||||
ml->RemoveMLock(cm, true);
|
||||
|
||||
if (ci->c && ci->c->HasMode("PERM"))
|
||||
ci->c->RemoveMode(NULL, cm);
|
||||
}
|
||||
/* No channel mode, no BotServ, but using ChanServ as the botserv bot
|
||||
* which was assigned when persist was set on
|
||||
@@ -1068,7 +1070,7 @@ class CSSet final
|
||||
if (!last_value.empty())
|
||||
modes += "," + last_value;
|
||||
}
|
||||
data["last_modes"] << modes;
|
||||
data.Store("last_modes", modes);
|
||||
}
|
||||
|
||||
void ExtensibleUnserialize(Extensible *e, Serializable *s, Serialize::Data &data) override
|
||||
@@ -1146,7 +1148,7 @@ public:
|
||||
if (c->ci && keep_modes.HasExt(c->ci))
|
||||
{
|
||||
Channel::ModeList ml = c->ci->last_modes;
|
||||
for (const auto &[last_mode, last_value] : c->ci->last_modes)
|
||||
for (const auto &[last_mode, last_value] : ml)
|
||||
c->SetMode(c->ci->WhoSends(), last_mode, last_value);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -46,9 +46,9 @@ struct CSMiscData final
|
||||
|
||||
void Serialize(Serialize::Data &sdata) const override
|
||||
{
|
||||
sdata["ci"] << this->object;
|
||||
sdata["name"] << this->name;
|
||||
sdata["data"] << this->data;
|
||||
sdata.Store("ci", this->object);
|
||||
sdata.Store("name", this->name);
|
||||
sdata.Store("data", this->data);
|
||||
}
|
||||
|
||||
static Serializable *Unserialize(Serializable *obj, Serialize::Data &data)
|
||||
|
||||
@@ -11,57 +11,47 @@
|
||||
class StatusUpdate final
|
||||
: public Module
|
||||
{
|
||||
public:
|
||||
StatusUpdate(const Anope::string &modname, const Anope::string &creator) : Module(modname, creator, VENDOR)
|
||||
private:
|
||||
void OnAccessChange(ChannelInfo *ci, ChanAccess *access, bool adding)
|
||||
{
|
||||
if (!ci->c)
|
||||
return;
|
||||
|
||||
for (const auto &[_, uc] : ci->c->users)
|
||||
{
|
||||
auto *user = uc->user;
|
||||
|
||||
ChannelInfo *next;
|
||||
if (user->server != Me && access->Matches(user, user->Account(), next))
|
||||
{
|
||||
auto ag = ci->AccessFor(user);
|
||||
|
||||
for (auto *cms : ModeManager::GetStatusChannelModesByRank())
|
||||
{
|
||||
if (!ag.HasPriv("AUTO" + cms->name))
|
||||
ci->c->RemoveMode(NULL, cms, user->GetUID());
|
||||
}
|
||||
|
||||
if (adding)
|
||||
ci->c->SetCorrectModes(user, true);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public:
|
||||
StatusUpdate(const Anope::string &modname, const Anope::string &creator)
|
||||
: Module(modname, creator, VENDOR)
|
||||
{
|
||||
}
|
||||
|
||||
void OnAccessAdd(ChannelInfo *ci, CommandSource &, ChanAccess *access) override
|
||||
{
|
||||
if (ci->c)
|
||||
{
|
||||
for (const auto &[_, uc] : ci->c->users)
|
||||
{
|
||||
User *user = uc->user;
|
||||
|
||||
ChannelInfo *next;
|
||||
if (user->server != Me && access->Matches(user, user->Account(), next))
|
||||
{
|
||||
AccessGroup ag = ci->AccessFor(user);
|
||||
|
||||
for (auto *cms : ModeManager::GetStatusChannelModesByRank())
|
||||
{
|
||||
if (!ag.HasPriv("AUTO" + cms->name))
|
||||
ci->c->RemoveMode(NULL, cms, user->GetUID());
|
||||
}
|
||||
ci->c->SetCorrectModes(user, true);
|
||||
}
|
||||
}
|
||||
}
|
||||
OnAccessChange(ci, access, true);
|
||||
}
|
||||
|
||||
void OnAccessDel(ChannelInfo *ci, CommandSource &, ChanAccess *access) override
|
||||
{
|
||||
if (ci->c)
|
||||
{
|
||||
for (const auto &[_, uc] : ci->c->users)
|
||||
{
|
||||
User *user = uc->user;
|
||||
|
||||
ChannelInfo *next;
|
||||
if (user->server != Me && access->Matches(user, user->Account(), next))
|
||||
{
|
||||
AccessGroup ag = ci->AccessFor(user);
|
||||
|
||||
for (auto *cms : ModeManager::GetStatusChannelModesByRank())
|
||||
{
|
||||
if (!ag.HasPriv("AUTO" + cms->name))
|
||||
ci->c->RemoveMode(NULL, cms, user->GetUID());
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
OnAccessChange(ci, access, false);
|
||||
}
|
||||
};
|
||||
|
||||
|
||||
@@ -20,11 +20,11 @@ struct CSSuspendInfo final
|
||||
|
||||
void Serialize(Serialize::Data &data) const override
|
||||
{
|
||||
data["chan"] << what;
|
||||
data["by"] << by;
|
||||
data["reason"] << reason;
|
||||
data["time"] << when;
|
||||
data["expires"] << expires;
|
||||
data.Store("chan", what);
|
||||
data.Store("by", by);
|
||||
data.Store("reason", reason);
|
||||
data.Store("time", when);
|
||||
data.Store("expires", expires);
|
||||
}
|
||||
|
||||
static Serializable *Unserialize(Serializable *obj, Serialize::Data &data)
|
||||
@@ -67,7 +67,7 @@ public:
|
||||
const Anope::string &chan = params[0];
|
||||
Anope::string expiry = params[1];
|
||||
Anope::string reason = params.size() > 2 ? params[2] : "";
|
||||
time_t expiry_secs = Config->GetModule(this->owner)->Get<time_t>("expire");
|
||||
time_t expiry_secs = Config->GetModule(this->owner)->Get<time_t>("suspendexpire");
|
||||
|
||||
if (!expiry.empty() && expiry[0] != '+')
|
||||
{
|
||||
|
||||
@@ -179,7 +179,11 @@ private:
|
||||
{
|
||||
User *targ = User::Find(mask, true);
|
||||
if (targ != NULL)
|
||||
{
|
||||
mask = "*!*@" + targ->GetDisplayedHost();
|
||||
if (description.empty())
|
||||
description = targ->nick;
|
||||
}
|
||||
else
|
||||
{
|
||||
source.Reply(NICK_X_NOT_REGISTERED, mask.c_str());
|
||||
@@ -590,11 +594,11 @@ public:
|
||||
source.Reply(_("Alternative methods of modifying channel access lists are\n"
|
||||
"available."));
|
||||
if (!access_cmd.empty())
|
||||
source.Reply(_("See \002%s%s HELP %s\002 for more information\n"
|
||||
"about the access list."), Config->StrictPrivmsg.c_str(), access_bi->nick.c_str(), access_cmd.c_str());
|
||||
source.Reply(_("See \002%s HELP %s\002 for more information\n"
|
||||
"about the access list."), access_bi->GetQueryCommand().c_str(), access_cmd.c_str());
|
||||
if (!flags_cmd.empty())
|
||||
source.Reply(_("See \002%s%s HELP %s\002 for more information\n"
|
||||
"about the flags system."), Config->StrictPrivmsg.c_str(), flags_bi->nick.c_str(), flags_cmd.c_str());
|
||||
source.Reply(_("See \002%s HELP %s\002 for more information\n"
|
||||
"about the flags system."), flags_bi->GetQueryCommand().c_str(), flags_cmd.c_str());
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
+262
-83
@@ -20,6 +20,8 @@
|
||||
#include "modules/info.h"
|
||||
#include "modules/ns_cert.h"
|
||||
#include "modules/os_forbid.h"
|
||||
#include "modules/os_oper.h"
|
||||
#include "modules/os_session.h"
|
||||
#include "modules/suspend.h"
|
||||
|
||||
// Handles reading from an Atheme database row.
|
||||
@@ -83,20 +85,39 @@ public:
|
||||
|
||||
struct ModeData final
|
||||
{
|
||||
char letter;
|
||||
Anope::string name;
|
||||
Anope::string value;
|
||||
bool set;
|
||||
|
||||
ModeData(const Anope::string &n, bool s, const Anope::string &v = "")
|
||||
: name(n)
|
||||
: letter(0)
|
||||
, name(n)
|
||||
, value(v)
|
||||
, set(s)
|
||||
{
|
||||
}
|
||||
|
||||
ModeData(char l, const Anope::string &v = "")
|
||||
: letter(l)
|
||||
, value(v)
|
||||
, set(true)
|
||||
{
|
||||
}
|
||||
|
||||
Anope::string str() const
|
||||
{
|
||||
std::stringstream buf;
|
||||
buf << '+' << (name.empty() ? letter : name);
|
||||
if (value.empty())
|
||||
buf << ' ' << value;
|
||||
return buf.str();
|
||||
}
|
||||
};
|
||||
|
||||
struct ChannelData final
|
||||
{
|
||||
Anope::unordered_map<AutoKick *> akicks;
|
||||
Anope::string bot;
|
||||
Anope::string info_adder;
|
||||
Anope::string info_message;
|
||||
@@ -126,6 +147,12 @@ struct UserData final
|
||||
time_t vhost_ts = 0;
|
||||
};
|
||||
|
||||
namespace
|
||||
{
|
||||
// Whether we can safely import clones.
|
||||
bool import_clones = true;
|
||||
}
|
||||
|
||||
class DBAtheme final
|
||||
: public Module
|
||||
{
|
||||
@@ -133,71 +160,70 @@ private:
|
||||
ServiceReference<AccessProvider> accessprov;
|
||||
PrimitiveExtensibleItem<ChannelData> chandata;
|
||||
std::map<Anope::string, char> flags;
|
||||
ServiceReference<ForbidService> forbidsvc;
|
||||
PrimitiveExtensibleItem<UserData> userdata;
|
||||
ServiceReference<XLineManager> sglinemgr;
|
||||
ServiceReference<XLineManager> snlinemgr;
|
||||
ServiceReference<XLineManager> sqlinemgr;
|
||||
|
||||
Anope::map<std::function<bool(DBAtheme*,AthemeRow&)>> rowhandlers = {
|
||||
{ "AC", &DBAtheme::HandleIgnore },
|
||||
{ "AR", &DBAtheme::HandleIgnore },
|
||||
{ "BE", &DBAtheme::HandleBE },
|
||||
{ "BLE", &DBAtheme::HandleIgnore },
|
||||
{ "BOT", &DBAtheme::HandleBOT },
|
||||
{ "BOT-COUNT", &DBAtheme::HandleIgnore },
|
||||
{ "BW", &DBAtheme::HandleBW },
|
||||
{ "CA", &DBAtheme::HandleCA },
|
||||
{ "CF", &DBAtheme::HandleIgnore },
|
||||
{ "CFCHAN", &DBAtheme::HandleIgnore },
|
||||
{ "CFDBV", &DBAtheme::HandleIgnore },
|
||||
{ "CFMD", &DBAtheme::HandleIgnore },
|
||||
{ "CFOP", &DBAtheme::HandleIgnore },
|
||||
{ "CLONES-CD", &DBAtheme::HandleIgnore },
|
||||
{ "CLONES-CK", &DBAtheme::HandleIgnore },
|
||||
{ "CLONES-DBV", &DBAtheme::HandleIgnore },
|
||||
{ "CLONES-EX", &DBAtheme::HandleIgnore },
|
||||
{ "CLONES-GR", &DBAtheme::HandleIgnore },
|
||||
{ "CSREQ", &DBAtheme::HandleIgnore },
|
||||
{ "CSREQ", &DBAtheme::HandleIgnore },
|
||||
{ "DBV", &DBAtheme::HandleDBV },
|
||||
{ "GACL", &DBAtheme::HandleIgnore },
|
||||
{ "GDBV", &DBAtheme::HandleIgnore },
|
||||
{ "GE", &DBAtheme::HandleIgnore },
|
||||
{ "GFA", &DBAtheme::HandleIgnore },
|
||||
{ "GRP", &DBAtheme::HandleIgnore },
|
||||
{ "GRVER", &DBAtheme::HandleGRVER },
|
||||
{ "HE", &DBAtheme::HandleIgnore },
|
||||
{ "HO", &DBAtheme::HandleIgnore },
|
||||
{ "HR", &DBAtheme::HandleHR },
|
||||
{ "JM", &DBAtheme::HandleIgnore },
|
||||
{ "KID", &DBAtheme::HandleIgnore },
|
||||
{ "KL", &DBAtheme::HandleKL },
|
||||
{ "LUID", &DBAtheme::HandleIgnore },
|
||||
{ "MC", &DBAtheme::HandleMC },
|
||||
{ "MCFP", &DBAtheme::HandleMCFP },
|
||||
{ "MDA", &DBAtheme::HandleMDA },
|
||||
{ "MDC", &DBAtheme::HandleMDC },
|
||||
{ "MDEP", &DBAtheme::HandleIgnore },
|
||||
{ "MDG", &DBAtheme::HandleIgnore },
|
||||
{ "MDN", &DBAtheme::HandleMDN },
|
||||
{ "MDU", &DBAtheme::HandleMDU },
|
||||
{ "ME", &DBAtheme::HandleME },
|
||||
{ "MI", &DBAtheme::HandleMI },
|
||||
{ "MM", &DBAtheme::HandleMM },
|
||||
{ "MN", &DBAtheme::HandleMN },
|
||||
{ "MU", &DBAtheme::HandleMU },
|
||||
{ "NAM", &DBAtheme::HandleNAM },
|
||||
{ "QID", &DBAtheme::HandleIgnore },
|
||||
{ "QL", &DBAtheme::HandleQL },
|
||||
{ "RM", &DBAtheme::HandleIgnore },
|
||||
{ "RR", &DBAtheme::HandleIgnore },
|
||||
{ "RW", &DBAtheme::HandleIgnore },
|
||||
{ "SI", &DBAtheme::HandleIgnore },
|
||||
{ "SO", &DBAtheme::HandleIgnore },
|
||||
{ "TS", &DBAtheme::HandleIgnore },
|
||||
{ "XID", &DBAtheme::HandleIgnore },
|
||||
{ "XL", &DBAtheme::HandleXL },
|
||||
{ "AC", &DBAtheme::HandleIgnore },
|
||||
{ "AR", &DBAtheme::HandleIgnore },
|
||||
{ "BE", &DBAtheme::HandleBE },
|
||||
{ "BLE", &DBAtheme::HandleIgnore },
|
||||
{ "BOT", &DBAtheme::HandleBOT },
|
||||
{ "BOT-COUNT", &DBAtheme::HandleIgnore },
|
||||
{ "BW", &DBAtheme::HandleBW },
|
||||
{ "CA", &DBAtheme::HandleCA },
|
||||
{ "CF", &DBAtheme::HandleIgnore },
|
||||
{ "CFCHAN", &DBAtheme::HandleIgnore },
|
||||
{ "CFDBV", &DBAtheme::HandleIgnore },
|
||||
{ "CFMD", &DBAtheme::HandleIgnore },
|
||||
{ "CFOP", &DBAtheme::HandleIgnore },
|
||||
{ "CLONES-CD", &DBAtheme::HandleIgnore },
|
||||
{ "CLONES-CK", &DBAtheme::HandleIgnore },
|
||||
{ "CLONES-DBV", &DBAtheme::HandleCLONESDBV },
|
||||
{ "CLONES-EX", &DBAtheme::HandleCLONESEX },
|
||||
{ "CLONES-GR", &DBAtheme::HandleIgnore },
|
||||
{ "CSREQ", &DBAtheme::HandleIgnore },
|
||||
{ "CSREQ", &DBAtheme::HandleIgnore },
|
||||
{ "DBV", &DBAtheme::HandleDBV },
|
||||
{ "GACL", &DBAtheme::HandleIgnore },
|
||||
{ "GDBV", &DBAtheme::HandleIgnore },
|
||||
{ "GE", &DBAtheme::HandleIgnore },
|
||||
{ "GFA", &DBAtheme::HandleIgnore },
|
||||
{ "GRP", &DBAtheme::HandleIgnore },
|
||||
{ "GRVER", &DBAtheme::HandleGRVER },
|
||||
{ "HE", &DBAtheme::HandleIgnore },
|
||||
{ "HO", &DBAtheme::HandleIgnore },
|
||||
{ "HR", &DBAtheme::HandleHR },
|
||||
{ "JM", &DBAtheme::HandleIgnore },
|
||||
{ "KID", &DBAtheme::HandleIgnore },
|
||||
{ "KL", &DBAtheme::HandleKL },
|
||||
{ "LUID", &DBAtheme::HandleIgnore },
|
||||
{ "MC", &DBAtheme::HandleMC },
|
||||
{ "MCFP", &DBAtheme::HandleMCFP },
|
||||
{ "MDA", &DBAtheme::HandleMDA },
|
||||
{ "MDC", &DBAtheme::HandleMDC },
|
||||
{ "MDEP", &DBAtheme::HandleIgnore },
|
||||
{ "MDG", &DBAtheme::HandleIgnore },
|
||||
{ "MDN", &DBAtheme::HandleMDN },
|
||||
{ "MDU", &DBAtheme::HandleMDU },
|
||||
{ "ME", &DBAtheme::HandleME },
|
||||
{ "MI", &DBAtheme::HandleMI },
|
||||
{ "MM", &DBAtheme::HandleMM },
|
||||
{ "MN", &DBAtheme::HandleMN },
|
||||
{ "MU", &DBAtheme::HandleMU },
|
||||
{ "NAM", &DBAtheme::HandleNAM },
|
||||
{ "QID", &DBAtheme::HandleIgnore },
|
||||
{ "QL", &DBAtheme::HandleQL },
|
||||
{ "RM", &DBAtheme::HandleIgnore },
|
||||
{ "RR", &DBAtheme::HandleIgnore },
|
||||
{ "RW", &DBAtheme::HandleIgnore },
|
||||
{ "SI", &DBAtheme::HandleIgnore },
|
||||
{ "SO", &DBAtheme::HandleSO },
|
||||
{ "TS", &DBAtheme::HandleIgnore },
|
||||
{ "XID", &DBAtheme::HandleIgnore },
|
||||
{ "XL", &DBAtheme::HandleXL },
|
||||
};
|
||||
|
||||
void ApplyAccess(Anope::string &in, char flag, Anope::string &out, std::initializer_list<const char*> privs)
|
||||
@@ -403,6 +429,9 @@ private:
|
||||
return;
|
||||
}
|
||||
|
||||
// We are processing an encrypted password.
|
||||
flags.erase(pos, 1);
|
||||
|
||||
// Atheme supports several password hashing methods. We can only import
|
||||
// some of them currently.
|
||||
//
|
||||
@@ -480,7 +509,7 @@ private:
|
||||
|
||||
bool HandleBE(AthemeRow &row)
|
||||
{
|
||||
// BE <email <created> <creator> <reason>
|
||||
// BE <email> <created> <creator> <reason>
|
||||
auto email = row.Get();
|
||||
auto created = row.GetNum<time_t>();
|
||||
auto creator = row.Get();
|
||||
@@ -489,19 +518,19 @@ private:
|
||||
if (!row)
|
||||
return row.LogError(this);
|
||||
|
||||
if (!forbidsvc)
|
||||
if (!forbid_service)
|
||||
{
|
||||
Log(this) << "Unable to convert forbidden email " << email << " as os_forbid is not loaded";
|
||||
return true;
|
||||
}
|
||||
|
||||
auto *forbid = forbidsvc->CreateForbid();
|
||||
auto *forbid = forbid_service->CreateForbid();
|
||||
forbid->created = created;
|
||||
forbid->creator = creator;
|
||||
forbid->mask = email;
|
||||
forbid->reason = reason;
|
||||
forbid->type = FT_EMAIL;
|
||||
forbidsvc->AddForbid(forbid);
|
||||
forbid_service->AddForbid(forbid);
|
||||
return true;
|
||||
}
|
||||
|
||||
@@ -583,10 +612,11 @@ private:
|
||||
auto *nc = NickCore::Find(mask);
|
||||
if (flags.find('b') != Anope::string::npos)
|
||||
{
|
||||
auto *data = chandata.Require(ci);
|
||||
if (nc)
|
||||
ci->AddAkick(setter, nc, "", modifiedtime, modifiedtime);
|
||||
data->akicks[mask] = ci->AddAkick(setter, nc, "", modifiedtime, modifiedtime);
|
||||
else
|
||||
ci->AddAkick(setter, mask, "", modifiedtime, modifiedtime);
|
||||
data->akicks[mask] = ci->AddAkick(setter, mask, "", modifiedtime, modifiedtime);
|
||||
return true;
|
||||
}
|
||||
|
||||
@@ -626,15 +656,59 @@ private:
|
||||
}
|
||||
|
||||
if (flags != "+")
|
||||
Log(this) << "Unable to convert channel access flags " << flags << " for " << ci->name;
|
||||
Log(this) << "Unable to convert channel access flags " << flags << " for " << mask << " on " << ci->name;
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
bool HandleCLONESDBV(AthemeRow &row)
|
||||
{
|
||||
// CLONES-DBV <version>
|
||||
auto version = row.GetNum<unsigned>();
|
||||
if (version != 3)
|
||||
{
|
||||
Log(this) << "Clones database is version " << version << " which is not supported!";
|
||||
import_clones = false;
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
bool HandleCLONESEX(AthemeRow &row)
|
||||
{
|
||||
if (!import_clones)
|
||||
return HandleIgnore(row);
|
||||
|
||||
// CLONES-EX <ip> <allowed> <warn> <expires> <reason>
|
||||
auto ip = row.Get();
|
||||
auto allowed = row.GetNum<unsigned>();
|
||||
/* auto warn = */ row.GetNum<unsigned>();
|
||||
auto expires = row.GetNum<time_t>();
|
||||
auto reason = row.GetRemaining();
|
||||
|
||||
if (!row)
|
||||
return row.LogError(this);
|
||||
|
||||
if (!session_service)
|
||||
{
|
||||
Log(this) << "Unable to import session limit for " << ip << " as os_session is not loaded";
|
||||
return true;
|
||||
}
|
||||
|
||||
auto *exception = session_service->CreateException();
|
||||
exception->mask = ip;
|
||||
exception->limit = allowed;
|
||||
exception->who = "Unknown";
|
||||
exception->time = Anope::CurTime;
|
||||
exception->expires = expires;
|
||||
exception->reason = reason;
|
||||
session_service->AddException(exception);
|
||||
return true;
|
||||
}
|
||||
|
||||
bool HandleDBV(AthemeRow &row)
|
||||
{
|
||||
// DBV <version>
|
||||
unsigned version = row.GetNum<unsigned>();
|
||||
auto version = row.GetNum<unsigned>();
|
||||
if (version != 12)
|
||||
{
|
||||
Log(this) << "Database is version " << version << " which is not supported!";
|
||||
@@ -646,7 +720,7 @@ private:
|
||||
bool HandleGRVER(AthemeRow &row)
|
||||
{
|
||||
// GRVER <version>
|
||||
unsigned version = row.GetNum<unsigned>();
|
||||
auto version = row.GetNum<unsigned>();
|
||||
if (version != 1)
|
||||
{
|
||||
Log(this) << "Database grammar is version " << version << " which is not supported!";
|
||||
@@ -718,6 +792,12 @@ private:
|
||||
return true;
|
||||
}
|
||||
|
||||
bool HandleIgnoreMetadata(const Anope::string &target, const Anope::string &key, const Anope::string &value)
|
||||
{
|
||||
Log(LOG_DEBUG_3) << "Intentionally ignoring Atheme database metadata for " << target << ": " << key << " = " << value;
|
||||
return true;
|
||||
}
|
||||
|
||||
bool HandleMC(AthemeRow &row)
|
||||
{
|
||||
// MC <channel> <regtime> <used> <flags> <mlock-on> <mlock-off> <mlock-limit> [<mlock-key>]
|
||||
@@ -822,7 +902,7 @@ private:
|
||||
bool HandleMDA(AthemeRow &row)
|
||||
{
|
||||
// MDA <channel> <account/mask> <key> <value>
|
||||
auto display = row.Get();
|
||||
auto channel = row.Get();
|
||||
auto mask = row.Get();
|
||||
auto key = row.Get();
|
||||
auto value = row.GetRemaining();
|
||||
@@ -830,7 +910,23 @@ private:
|
||||
if (!row)
|
||||
return row.LogError(this);
|
||||
|
||||
Log(this) << "Unknown channel access metadata " << key << " = " << value;
|
||||
auto *ci = ChannelInfo::Find(channel);
|
||||
if (!ci)
|
||||
{
|
||||
Log(this) << "Missing ChannelInfo for MDA: " << channel;
|
||||
return false;
|
||||
}
|
||||
|
||||
if (key == "reason")
|
||||
{
|
||||
auto *data = chandata.Require(ci);
|
||||
auto akick = data->akicks.find(mask);
|
||||
if (akick != data->akicks.end())
|
||||
akick->second->reason = value;
|
||||
}
|
||||
else
|
||||
Log(this) << "Unknown channel access metadata for " << mask << " on " << ci->name << ": " << key << " = " << value;
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
@@ -858,6 +954,8 @@ private:
|
||||
ci->Extend<bool>("BS_FANTASY");
|
||||
else if (key == "private:botserv:no-bot")
|
||||
ci->Extend<bool>("BS_NOBOT");
|
||||
else if (key == "private:channelts")
|
||||
return HandleIgnoreMetadata(ci->name, key, value);
|
||||
else if (key == "private:close:closer")
|
||||
data->suspend_by = value;
|
||||
else if (key == "private:close:reason")
|
||||
@@ -892,29 +990,60 @@ private:
|
||||
data->info_adder = value;
|
||||
else if (key == "private:mark:timestamp")
|
||||
data->info_ts = Anope::Convert<time_t>(value, 0);
|
||||
else if (key == "private:mlockext")
|
||||
{
|
||||
spacesepstream mlocks(value);
|
||||
for (Anope::string mlock; mlocks.GetToken(mlock); )
|
||||
data->mlocks.emplace_back(mlock[0], mlock.substr(1));
|
||||
}
|
||||
else if (key == "private:templates")
|
||||
return HandleIgnoreMetadata(ci->name, key, value);
|
||||
else if (key == "private:topic:setter")
|
||||
ci->last_topic_setter = value;
|
||||
else if (key == "private:topic:text")
|
||||
ci->last_topic = value;
|
||||
else if (key == "private:topic:ts")
|
||||
ci->last_topic_time = Anope::Convert<time_t>(value, 0);
|
||||
else if (key.compare(0, 14, "private:stats:", 14) == 0)
|
||||
return HandleIgnoreMetadata(ci->name, key, value);
|
||||
else
|
||||
Log(this) << "Unknown channel metadata " << key << " = " << value;
|
||||
Log(this) << "Unknown channel metadata for " << ci->name << ": " << key << " = " << value;
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
bool HandleMDN(AthemeRow &row)
|
||||
{
|
||||
// MDN <display> <key> <value>
|
||||
auto display = row.Get();
|
||||
// MDN <nick> <key> <value>
|
||||
auto nick = row.Get();
|
||||
auto key = row.Get();
|
||||
auto value = row.GetRemaining();
|
||||
|
||||
if (!row)
|
||||
return row.LogError(this);
|
||||
|
||||
Log(this) << "Unknown nick metadata " << key << " = " << value;
|
||||
if (!forbid_service)
|
||||
{
|
||||
Log(this) << "Unable to convert forbidden nick " << nick << " metadata as os_forbid is not loaded";
|
||||
return true;
|
||||
}
|
||||
|
||||
auto *forbid = forbid_service->FindForbidExact(nick, FT_NICK);
|
||||
if (!forbid)
|
||||
{
|
||||
Log(this) << "Missing forbid for MDN: " << nick;
|
||||
return false;
|
||||
}
|
||||
|
||||
if (key == "private:mark:reason")
|
||||
forbid->reason = value;
|
||||
else if (key == "private:mark:setter")
|
||||
forbid->creator = value;
|
||||
else if (key == "private:mark:timestamp")
|
||||
forbid->created = Anope::Convert<time_t>(value, 0);
|
||||
else
|
||||
Log(this) << "Unknown forbidden nick metadata for " << forbid->mask << ": " << key << " = " << value;
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
@@ -967,12 +1096,20 @@ private:
|
||||
data->last_mask = value;
|
||||
else if (key == "private:lastquit:message")
|
||||
data->last_quit = value;
|
||||
else if (key == "private:loginfail:failnum")
|
||||
return HandleIgnoreMetadata(nc->display, key, value);
|
||||
else if (key == "private:loginfail:lastfailaddr")
|
||||
return HandleIgnoreMetadata(nc->display, key, value);
|
||||
else if (key == "private:loginfail:lastfailtime")
|
||||
return HandleIgnoreMetadata(nc->display, key, value);
|
||||
else if (key == "private:mark:reason")
|
||||
data->info_message = value;
|
||||
else if (key == "private:mark:setter")
|
||||
data->info_adder = value;
|
||||
else if (key == "private:mark:timestamp")
|
||||
data->info_ts = Anope::Convert<time_t>(value, 0);
|
||||
else if (key == "private:swhois")
|
||||
return HandleIgnoreMetadata(nc->display, key, value);
|
||||
else if (key == "private:usercloak")
|
||||
data->vhost = value;
|
||||
else if (key == "private:usercloak-assigner")
|
||||
@@ -982,7 +1119,7 @@ private:
|
||||
else if (key.compare(0, 18, "private:usercloak:", 18) == 0)
|
||||
data->vhost_nick[key.substr(18)] = value;
|
||||
else
|
||||
Log(this) << "Unknown account metadata " << key << " = " << value;
|
||||
Log(this) << "Unknown account metadata for " << nc->display << ": " << key << " = " << value;
|
||||
|
||||
return true;
|
||||
}
|
||||
@@ -1131,7 +1268,7 @@ private:
|
||||
auto display = row.Get();
|
||||
auto pass = row.Get();
|
||||
auto email = row.Get();
|
||||
/* auto regtime = */ row.GetNum<time_t>();
|
||||
auto regtime = row.GetNum<time_t>();
|
||||
/* auto lastlogin = */ row.Get();
|
||||
auto flags = row.Get();
|
||||
auto language = row.Get();
|
||||
@@ -1141,6 +1278,7 @@ private:
|
||||
|
||||
auto *nc = new NickCore(display);
|
||||
nc->email = email;
|
||||
nc->time_registered = regtime;
|
||||
ApplyPassword(nc, flags, pass);
|
||||
|
||||
// No equivalent: bglmNQrS
|
||||
@@ -1199,18 +1337,18 @@ private:
|
||||
if (!row)
|
||||
return row.LogError(this);
|
||||
|
||||
if (!forbidsvc)
|
||||
if (!forbid_service)
|
||||
{
|
||||
Log(this) << "Unable to convert forbidden nick " << nick << " as os_forbid is not loaded";
|
||||
return true;
|
||||
}
|
||||
|
||||
auto *forbid = forbidsvc->CreateForbid();
|
||||
auto *forbid = forbid_service->CreateForbid();
|
||||
forbid->creator = "Unknown";
|
||||
forbid->mask = nick;
|
||||
forbid->reason = "Unknown";
|
||||
forbid->type = FT_NICK;
|
||||
forbidsvc->AddForbid(forbid);
|
||||
forbid_service->AddForbid(forbid);
|
||||
return true;
|
||||
}
|
||||
|
||||
@@ -1238,6 +1376,43 @@ private:
|
||||
return true;
|
||||
}
|
||||
|
||||
bool HandleSO(AthemeRow &row)
|
||||
{
|
||||
// SO <display> <type> <flags>
|
||||
auto display = row.Get();
|
||||
auto type = row.Get();
|
||||
auto flags = row.Get();
|
||||
|
||||
if (!row)
|
||||
return row.LogError(this);
|
||||
|
||||
auto *nc = NickCore::Find(display);
|
||||
if (!nc)
|
||||
{
|
||||
Log(this) << "Missing NickCore for SO: " << display;
|
||||
return false;
|
||||
}
|
||||
|
||||
auto *ot = OperType::Find(type);
|
||||
if (!ot)
|
||||
{
|
||||
// Attempt to convert oper types.
|
||||
if (type == "sra")
|
||||
ot = OperType::Find("Services Root");
|
||||
else if (type == "ircop")
|
||||
ot = OperType::Find("Services Operator");
|
||||
}
|
||||
|
||||
if (!ot)
|
||||
{
|
||||
Log(this) << "Unable to convert operator status for " << nc->display << " as there is no equivalent oper type: " << type;
|
||||
return true;
|
||||
}
|
||||
|
||||
nc->o = new MyOper(nc->display, ot);
|
||||
return true;
|
||||
}
|
||||
|
||||
bool HandleXL(AthemeRow &row)
|
||||
{
|
||||
// XL <id> <real> <duration> <settime> <setby> <reason>
|
||||
@@ -1267,7 +1442,6 @@ public:
|
||||
: Module(modname, creator, DATABASE | VENDOR)
|
||||
, accessprov("AccessProvider", "access/flags")
|
||||
, chandata(this, "ATHEME_CHANDATA")
|
||||
, forbidsvc("ForbidService", "forbid")
|
||||
, userdata(this, "ATHEME_USERDATA")
|
||||
, sglinemgr("XLineManager","xlinemanager/sgline")
|
||||
, snlinemgr("XLineManager","xlinemanager/snline")
|
||||
@@ -1416,16 +1590,21 @@ public:
|
||||
|
||||
for (const auto &mlock : data->mlocks)
|
||||
{
|
||||
auto mh = ModeManager::FindChannelModeByName(mlock.name);
|
||||
ChannelMode *mh;
|
||||
if (mlock.name.empty())
|
||||
mh = ModeManager::FindChannelModeByChar(mlock.letter);
|
||||
else
|
||||
mh = ModeManager::FindChannelModeByName(mlock.name);
|
||||
if (!mh)
|
||||
{
|
||||
Log(this) << "Unable to find mode while importing mode lock: " << mlock.name;
|
||||
Log(this) << "Unable to find mode while importing mode lock on " << ci->name << ": " << mlock.str();
|
||||
continue;
|
||||
}
|
||||
|
||||
ml->SetMLock(mh, mlock.set, mlock.value, "Unknown");
|
||||
}
|
||||
}
|
||||
Anope::SaveDatabases();
|
||||
}
|
||||
};
|
||||
|
||||
|
||||
@@ -71,14 +71,6 @@ public:
|
||||
return this->ss;
|
||||
}
|
||||
|
||||
std::set<Anope::string> KeySet() const override
|
||||
{
|
||||
std::set<Anope::string> keys;
|
||||
for (const auto &[key, _]: this->data)
|
||||
keys.insert(key);
|
||||
return keys;
|
||||
}
|
||||
|
||||
size_t Hash() const override
|
||||
{
|
||||
size_t hash = 0;
|
||||
@@ -311,6 +303,8 @@ public:
|
||||
for (auto *base : items)
|
||||
{
|
||||
Serialize::Type *s_type = base->GetSerializableType();
|
||||
if (!s_type)
|
||||
continue;
|
||||
|
||||
data.fs = databases[s_type->GetOwner()];
|
||||
if (!data.fs || !data.fs->is_open())
|
||||
|
||||
@@ -252,7 +252,7 @@ static Anope::string GetLevelName(int level)
|
||||
case 15:
|
||||
return "NOKICK";
|
||||
case 16:
|
||||
return "FANTASIA";
|
||||
return "FANTASY";
|
||||
case 17:
|
||||
return "SAY";
|
||||
case 18:
|
||||
@@ -537,24 +537,18 @@ static void LoadNicks()
|
||||
case LANG_DE:
|
||||
nc->language = "de_DE.UTF-8";
|
||||
break;
|
||||
case LANG_CAT:
|
||||
nc->language = "ca_ES.UTF-8"; // yes, iso639 defines catalan as CA
|
||||
break;
|
||||
case LANG_GR:
|
||||
nc->language = "el_GR.UTF-8";
|
||||
break;
|
||||
case LANG_NL:
|
||||
nc->language = "nl_NL.UTF-8";
|
||||
break;
|
||||
case LANG_RU:
|
||||
nc->language = "ru_RU.UTF-8";
|
||||
break;
|
||||
case LANG_HUN:
|
||||
nc->language = "hu_HU.UTF-8";
|
||||
break;
|
||||
case LANG_PL:
|
||||
nc->language = "pl_PL.UTF-8";
|
||||
break;
|
||||
case LANG_CAT:
|
||||
case LANG_HUN:
|
||||
case LANG_RU:
|
||||
case LANG_EN_US:
|
||||
case LANG_JA_JIS:
|
||||
case LANG_JA_EUC:
|
||||
@@ -1348,6 +1342,7 @@ public:
|
||||
if (ci->c)
|
||||
ci->c->CheckModes();
|
||||
}
|
||||
Anope::SaveDatabases();
|
||||
}
|
||||
};
|
||||
|
||||
|
||||
@@ -34,14 +34,6 @@ public:
|
||||
return *stream;
|
||||
}
|
||||
|
||||
std::set<Anope::string> KeySet() const override
|
||||
{
|
||||
std::set<Anope::string> keys;
|
||||
for (const auto &[key, _] : this->data)
|
||||
keys.insert(key);
|
||||
return keys;
|
||||
}
|
||||
|
||||
size_t Hash() const override
|
||||
{
|
||||
size_t hash = 0;
|
||||
|
||||
@@ -37,7 +37,7 @@ private:
|
||||
}
|
||||
else
|
||||
{
|
||||
if (Anope::CurTime - Config->GetBlock("options")->Get<time_t>("updatetimeout", "5m") > lastwarn)
|
||||
if (Anope::CurTime - Config->GetBlock("options")->Get<time_t>("updatetimeout", "2m") > lastwarn)
|
||||
{
|
||||
Log() << "Unable to locate SQL reference, going to readonly...";
|
||||
Anope::ReadOnly = this->ro = true;
|
||||
|
||||
@@ -139,8 +139,19 @@ public:
|
||||
, argon2dprovider(this, Argon2_d)
|
||||
, argon2iprovider(this, Argon2_i)
|
||||
, argon2idprovider(this, Argon2_id)
|
||||
|
||||
{
|
||||
argon2dprovider.Check({
|
||||
{ "$argon2d$v=19$m=10,t=10,p=1$VGhlIHF1aWNrIGJyb3duIGZveCBqdW1wcyBvdmVyIHRoZSBsYXp5IGRvZw$fNS8JrvE8EqKwQ", "" },
|
||||
{ "$argon2d$v=19$m=10,t=10,p=1$VGhlIHF1aWNrIGJyb3duIGZveCBqdW1wcyBvdmVyIHRoZSBsYXp5IGRvZw$hTvpprMF0TwszQ", "The quick brown fox jumps over the lazy dog" },
|
||||
});
|
||||
argon2iprovider.Check({
|
||||
{ "$argon2i$v=19$m=10,t=10,p=1$VGhlIHF1aWNrIGJyb3duIGZveCBqdW1wcyBvdmVyIHRoZSBsYXp5IGRvZw$neE6hYxRp4TCJA", "" },
|
||||
{ "$argon2i$v=19$m=10,t=10,p=1$VGhlIHF1aWNrIGJyb3duIGZveCBqdW1wcyBvdmVyIHRoZSBsYXp5IGRvZw$/JAt4FdP1MFD+A", "The quick brown fox jumps over the lazy dog" },
|
||||
});
|
||||
argon2idprovider.Check({
|
||||
{ "$argon2id$v=19$m=10,t=10,p=1$VGhlIHF1aWNrIGJyb3duIGZveCBqdW1wcyBvdmVyIHRoZSBsYXp5IGRvZw$wuNeHixFDS6Tkg", "" },
|
||||
{ "$argon2id$v=19$m=10,t=10,p=1$VGhlIHF1aWNrIGJyb3duIGZveCBqdW1wcyBvdmVyIHRoZSBsYXp5IGRvZw$Po8RcmxZ7vHmdg", "The quick brown fox jumps over the lazy dog" },
|
||||
});
|
||||
}
|
||||
|
||||
void OnReload(Configuration::Conf *conf) override
|
||||
|
||||
+68
-24
@@ -121,6 +121,7 @@ class MySQLService final
|
||||
Anope::string user;
|
||||
Anope::string password;
|
||||
unsigned int port;
|
||||
Anope::string socket;
|
||||
|
||||
MYSQL *sql = nullptr;
|
||||
|
||||
@@ -136,7 +137,7 @@ public:
|
||||
*/
|
||||
std::mutex Lock;
|
||||
|
||||
MySQLService(Module *o, const Anope::string &n, const Anope::string &d, const Anope::string &s, const Anope::string &u, const Anope::string &p, unsigned int po);
|
||||
MySQLService(Module *o, const Anope::string &n, const Anope::string &d, const Anope::string &s, const Anope::string &u, const Anope::string &p, unsigned int po, const Anope::string &so);
|
||||
|
||||
~MySQLService();
|
||||
|
||||
@@ -157,6 +158,29 @@ public:
|
||||
Anope::string BuildQuery(const Query &q);
|
||||
|
||||
Anope::string FromUnixtime(time_t) override;
|
||||
|
||||
Anope::string GetColumnType(Serialize::DataType dt)
|
||||
{
|
||||
switch (dt)
|
||||
{
|
||||
case Serialize::DataType::BOOL:
|
||||
return "TINYINT NOT NULL";
|
||||
|
||||
case Serialize::DataType::FLOAT:
|
||||
return "DOUBLE PRECISION NOT NULL";
|
||||
|
||||
case Serialize::DataType::INT:
|
||||
return "BIGINT NOT NULL";
|
||||
|
||||
case Serialize::DataType::TEXT:
|
||||
return "TEXT";
|
||||
|
||||
case Serialize::DataType::UINT:
|
||||
return "BIGINT UNSIGNED NOT NULL";
|
||||
}
|
||||
|
||||
return "TEXT"; // Should never be reached
|
||||
}
|
||||
};
|
||||
|
||||
/** The SQL thread used to execute queries
|
||||
@@ -248,13 +272,14 @@ public:
|
||||
const Anope::string &user = block->Get<const Anope::string>("username", "anope");
|
||||
const Anope::string &password = block->Get<const Anope::string>("password");
|
||||
unsigned int port = block->Get<unsigned int>("port", "3306");
|
||||
const Anope::string &socket = block->Get<const Anope::string>("socket");
|
||||
|
||||
try
|
||||
{
|
||||
auto *ss = new MySQLService(this, connname, database, server, user, password, port);
|
||||
auto *ss = new MySQLService(this, connname, database, server, user, password, port, socket);
|
||||
this->MySQLServices.emplace(connname, ss);
|
||||
|
||||
Log(LOG_NORMAL, "mysql") << "MySQL: Successfully connected to server " << connname << " (" << server << ")";
|
||||
Log(LOG_NORMAL, "mysql") << "MySQL: Successfully connected to server " << connname << " (" << (socket.empty() ? server + ":" + port : socket) << ")";
|
||||
}
|
||||
catch (const SQL::Exception &ex)
|
||||
{
|
||||
@@ -309,13 +334,14 @@ public:
|
||||
}
|
||||
};
|
||||
|
||||
MySQLService::MySQLService(Module *o, const Anope::string &n, const Anope::string &d, const Anope::string &s, const Anope::string &u, const Anope::string &p, unsigned int po)
|
||||
MySQLService::MySQLService(Module *o, const Anope::string &n, const Anope::string &d, const Anope::string &s, const Anope::string &u, const Anope::string &p, unsigned int po, const Anope::string &so)
|
||||
: Provider(o, n)
|
||||
, database(d)
|
||||
, server(s)
|
||||
, user(u)
|
||||
, password(p)
|
||||
, port(po)
|
||||
, socket(so)
|
||||
{
|
||||
Connect();
|
||||
}
|
||||
@@ -354,9 +380,14 @@ Result MySQLService::RunQuery(const Query &query)
|
||||
{
|
||||
this->Lock.lock();
|
||||
|
||||
Anope::string real_query = this->BuildQuery(query);
|
||||
if (!this->CheckConnection())
|
||||
{
|
||||
this->Lock.unlock();
|
||||
return MySQLResult(query, query.query, mysql_error(this->sql));
|
||||
}
|
||||
|
||||
if (this->CheckConnection() && !mysql_real_query(this->sql, real_query.c_str(), real_query.length()))
|
||||
Anope::string real_query = this->BuildQuery(query);
|
||||
if (!mysql_real_query(this->sql, real_query.c_str(), real_query.length()))
|
||||
{
|
||||
MYSQL_RES *res = mysql_store_result(this->sql);
|
||||
unsigned int id = mysql_insert_id(this->sql);
|
||||
@@ -402,19 +433,15 @@ std::vector<Query> MySQLService::CreateTable(const Anope::string &table, const D
|
||||
|
||||
if (known_cols.empty())
|
||||
{
|
||||
Anope::string query_text = "CREATE TABLE `" + table + "` (`id` int(10) unsigned NOT NULL AUTO_INCREMENT,"
|
||||
Anope::string query_text = "CREATE TABLE `" + table + "` (`id` BIGINT UNSIGNED NOT NULL AUTO_INCREMENT UNIQUE,"
|
||||
" `timestamp` timestamp NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP";
|
||||
for (const auto &[column, _] : data.data)
|
||||
{
|
||||
known_cols.insert(column);
|
||||
|
||||
query_text += ", `" + column + "` ";
|
||||
if (data.GetType(column) == Serialize::Data::DT_INT)
|
||||
query_text += "int(11)";
|
||||
else
|
||||
query_text += "text";
|
||||
query_text += ", `" + column + "` " + GetColumnType(data.GetType(column));
|
||||
}
|
||||
query_text += ", PRIMARY KEY (`id`), KEY `timestamp_idx` (`timestamp`))";
|
||||
query_text += ", PRIMARY KEY (`id`), KEY `timestamp_idx` (`timestamp`)) ROW_FORMAT=DYNAMIC";
|
||||
queries.push_back(query_text);
|
||||
}
|
||||
else
|
||||
@@ -426,11 +453,7 @@ std::vector<Query> MySQLService::CreateTable(const Anope::string &table, const D
|
||||
|
||||
known_cols.insert(column);
|
||||
|
||||
Anope::string query_text = "ALTER TABLE `" + table + "` ADD `" + column + "` ";
|
||||
if (data.GetType(column) == Serialize::Data::DT_INT)
|
||||
query_text += "int(11)";
|
||||
else
|
||||
query_text += "text";
|
||||
Anope::string query_text = "ALTER TABLE `" + table + "` ADD `" + column + "` " + GetColumnType(data.GetType(column));
|
||||
|
||||
queries.push_back(query_text);
|
||||
}
|
||||
@@ -466,11 +489,29 @@ Query MySQLService::BuildInsert(const Anope::string &table, unsigned int id, Dat
|
||||
Anope::string buf;
|
||||
*value >> buf;
|
||||
|
||||
bool escape = true;
|
||||
if (buf.empty())
|
||||
auto escape = true;
|
||||
switch (data.GetType(field))
|
||||
{
|
||||
buf = "NULL";
|
||||
escape = false;
|
||||
case Serialize::DataType::BOOL:
|
||||
case Serialize::DataType::FLOAT:
|
||||
case Serialize::DataType::INT:
|
||||
case Serialize::DataType::UINT:
|
||||
{
|
||||
if (buf.empty())
|
||||
buf = "0";
|
||||
escape = false;
|
||||
break;
|
||||
}
|
||||
|
||||
case Serialize::DataType::TEXT:
|
||||
{
|
||||
if (buf.empty())
|
||||
{
|
||||
buf = "NULL";
|
||||
escape = false;
|
||||
}
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
query.SetValue(field, buf, escape);
|
||||
@@ -491,12 +532,15 @@ void MySQLService::Connect()
|
||||
const unsigned int timeout = 1;
|
||||
mysql_options(this->sql, MYSQL_OPT_CONNECT_TIMEOUT, reinterpret_cast<const char *>(&timeout));
|
||||
|
||||
bool connect = mysql_real_connect(this->sql, this->server.c_str(), this->user.c_str(), this->password.c_str(), this->database.c_str(), this->port, NULL, CLIENT_MULTI_RESULTS);
|
||||
bool connect = mysql_real_connect(this->sql, this->server.c_str(), this->user.c_str(), this->password.c_str(), this->database.c_str(), this->port, this->socket.empty() ? nullptr : this->socket.c_str(), CLIENT_MULTI_RESULTS);
|
||||
|
||||
if (!connect)
|
||||
throw SQL::Exception("Unable to connect to MySQL service " + this->name + ": " + mysql_error(this->sql));
|
||||
|
||||
Log(LOG_DEBUG) << "Successfully connected to MySQL service " << this->name << " at " << this->server << ":" << this->port;
|
||||
if (this->socket.empty())
|
||||
Log(LOG_DEBUG) << "Successfully connected to MySQL service " << this->name << " at " << this->server << ":" << this->port;
|
||||
else
|
||||
Log(LOG_DEBUG) << "Successfully connected to MySQL service " << this->name << " at " << this->socket;
|
||||
}
|
||||
|
||||
|
||||
|
||||
+54
-11
@@ -68,6 +68,31 @@ public:
|
||||
Anope::string BuildQuery(const Query &q);
|
||||
|
||||
Anope::string FromUnixtime(time_t) override;
|
||||
|
||||
Anope::string GetColumnType(Serialize::DataType dt)
|
||||
{
|
||||
switch (dt)
|
||||
{
|
||||
case Serialize::DataType::BOOL:
|
||||
return "INTEGER";
|
||||
|
||||
case Serialize::DataType::FLOAT:
|
||||
return "REAL";
|
||||
|
||||
case Serialize::DataType::INT:
|
||||
return "INTEGER";
|
||||
|
||||
case Serialize::DataType::TEXT:
|
||||
return "TEXT";
|
||||
|
||||
// SQLite lacks support for 64-bit unsigned integers so we have to
|
||||
// store them as text columns instead.
|
||||
case Serialize::DataType::UINT:
|
||||
return "TEXT";
|
||||
}
|
||||
|
||||
return "TEXT"; // Should never be reached
|
||||
}
|
||||
};
|
||||
|
||||
class ModuleSQLite final
|
||||
@@ -237,11 +262,7 @@ std::vector<Query> SQLiteService::CreateTable(const Anope::string &table, const
|
||||
{
|
||||
known_cols.insert(column);
|
||||
|
||||
query_text += ", `" + column + "` ";
|
||||
if (data.GetType(column) == Serialize::Data::DT_INT)
|
||||
query_text += "int(11)";
|
||||
else
|
||||
query_text += "text";
|
||||
query_text += ", `" + column + "` " + GetColumnType(data.GetType(column));
|
||||
}
|
||||
|
||||
query_text += ")";
|
||||
@@ -266,11 +287,7 @@ std::vector<Query> SQLiteService::CreateTable(const Anope::string &table, const
|
||||
|
||||
known_cols.insert(column);
|
||||
|
||||
Anope::string query_text = "ALTER TABLE `" + table + "` ADD `" + column + "` ";
|
||||
if (data.GetType(column) == Serialize::Data::DT_INT)
|
||||
query_text += "int(11)";
|
||||
else
|
||||
query_text += "text";
|
||||
Anope::string query_text = "ALTER TABLE `" + table + "` ADD `" + column + "` " + GetColumnType(data.GetType(column));;
|
||||
|
||||
queries.push_back(query_text);
|
||||
}
|
||||
@@ -307,7 +324,33 @@ Query SQLiteService::BuildInsert(const Anope::string &table, unsigned int id, Da
|
||||
{
|
||||
Anope::string buf;
|
||||
*value >> buf;
|
||||
query.SetValue(field, buf);
|
||||
|
||||
auto escape = true;
|
||||
switch (data.GetType(field))
|
||||
{
|
||||
case Serialize::DataType::BOOL:
|
||||
case Serialize::DataType::FLOAT:
|
||||
case Serialize::DataType::INT:
|
||||
{
|
||||
if (buf.empty())
|
||||
buf = "0";
|
||||
escape = false;
|
||||
break;
|
||||
}
|
||||
|
||||
case Serialize::DataType::TEXT:
|
||||
case Serialize::DataType::UINT:
|
||||
{
|
||||
if (buf.empty())
|
||||
{
|
||||
buf = "NULL";
|
||||
escape = false;
|
||||
}
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
query.SetValue(field, buf, escape);
|
||||
}
|
||||
|
||||
return query;
|
||||
|
||||
+7
-7
@@ -17,7 +17,7 @@ class CommandBSSetFantasy final
|
||||
public:
|
||||
CommandBSSetFantasy(Module *creator, const Anope::string &sname = "botserv/set/fantasy") : Command(creator, sname, 2, 2)
|
||||
{
|
||||
this->SetDesc(_("Enable fantaisist commands"));
|
||||
this->SetDesc(_("Enable fantasy commands"));
|
||||
this->SetSyntax(_("\037channel\037 {\037ON|OFF\037}"));
|
||||
}
|
||||
|
||||
@@ -73,9 +73,9 @@ public:
|
||||
"fantasy commands on a channel when prefixed\n"
|
||||
"with one of the following fantasy characters: \002%s\002\n"
|
||||
" \n"
|
||||
"Note that users wanting to use fantaisist\n"
|
||||
"commands MUST have enough access for both\n"
|
||||
"the FANTASIA and the command they are executing."),
|
||||
"Note that users wanting to use fantasy commands\n"
|
||||
"MUST have enough access for both the FANTASY\n"
|
||||
"privilege and the command they are executing."),
|
||||
Config->GetModule(this->owner)->Get<const Anope::string>("fantasycharacter", "!").c_str());
|
||||
return true;
|
||||
}
|
||||
@@ -186,10 +186,10 @@ public:
|
||||
source.permission = info.permission;
|
||||
|
||||
AccessGroup ag = c->ci->AccessFor(u);
|
||||
bool has_fantasia = ag.HasPriv("FANTASIA") || source.HasPriv("botserv/fantasy");
|
||||
bool has_fantasy = ag.HasPriv("FANTASY") || source.HasPriv("botserv/fantasy");
|
||||
|
||||
EventReturn MOD_RESULT;
|
||||
if (has_fantasia)
|
||||
if (has_fantasy)
|
||||
{
|
||||
FOREACH_RESULT(OnBotFantasy, MOD_RESULT, (source, cmd, c->ci, params));
|
||||
}
|
||||
@@ -198,7 +198,7 @@ public:
|
||||
FOREACH_RESULT(OnBotNoFantasyAccess, MOD_RESULT, (source, cmd, c->ci, params));
|
||||
}
|
||||
|
||||
if (MOD_RESULT == EVENT_STOP || !has_fantasia)
|
||||
if (MOD_RESULT == EVENT_STOP || !has_fantasy)
|
||||
return;
|
||||
|
||||
if (MOD_RESULT != EVENT_ALLOW && !info.permission.empty() && !source.HasCommand(info.permission))
|
||||
|
||||
@@ -29,7 +29,7 @@ private:
|
||||
|
||||
public:
|
||||
CommandGLGlobal(Module *creator)
|
||||
: Command(creator, "global/global", 0)
|
||||
: Command(creator, "global/global", 0, 1)
|
||||
, global("GlobalService", "Global")
|
||||
{
|
||||
this->SetDesc(_("Send a message to all users"));
|
||||
|
||||
@@ -29,7 +29,7 @@ private:
|
||||
|
||||
public:
|
||||
CommandGLServer(Module *creator)
|
||||
: Command(creator, "global/server", 1)
|
||||
: Command(creator, "global/server", 1, 2)
|
||||
, global("GlobalService", "Global")
|
||||
{
|
||||
this->SetDesc(_("Send a message to all users on a server"));
|
||||
|
||||
@@ -137,9 +137,6 @@ public:
|
||||
if (!sender)
|
||||
return false;
|
||||
|
||||
if (!server)
|
||||
server = Servers::GetUplink();
|
||||
|
||||
Anope::string line;
|
||||
if (source && !Config->GetModule(this)->Get<bool>("anonymousglobal"))
|
||||
{
|
||||
@@ -153,9 +150,9 @@ public:
|
||||
}
|
||||
|
||||
if (server)
|
||||
this->ServerGlobal(sender, Servers::GetUplink(), true, line);
|
||||
else
|
||||
this->ServerGlobal(sender, server, false, line);
|
||||
else
|
||||
this->ServerGlobal(sender, Servers::GetUplink(), true, line);
|
||||
return true;
|
||||
}
|
||||
|
||||
|
||||
+2
-1
@@ -198,7 +198,8 @@ public:
|
||||
Anope::string *greet = ns_greet.Get(user->Account());
|
||||
if (bs_greet.HasExt(c->ci) && greet != NULL && !greet->empty() && c->FindUser(c->ci->bi) && c->ci->AccessFor(user).HasPriv("GREET"))
|
||||
{
|
||||
IRCD->SendPrivmsg(*c->ci->bi, c->name, "[%s] %s", user->Account()->display.c_str(), greet->c_str());
|
||||
const auto message = Anope::printf("[%s] %s", user->Account()->display.c_str(), greet->c_str());
|
||||
IRCD->SendPrivmsg(*c->ci->bi, c->name, message);
|
||||
c->ci->bi->lastmsg = Anope::CurTime;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -43,7 +43,7 @@ public:
|
||||
|
||||
const NickAlias *na = NickAlias::Find(u->nick);
|
||||
if (!na || na->nc != u->Account() || !na->HasVHost())
|
||||
na = NickAlias::Find(u->Account()->display);
|
||||
na = u->AccountNick();
|
||||
if (!na || !na->HasVHost())
|
||||
return;
|
||||
|
||||
|
||||
@@ -27,7 +27,7 @@ public:
|
||||
|
||||
const NickAlias *na = NickAlias::Find(u->nick);
|
||||
if (!na || na->nc != u->Account() || !na->HasVHost())
|
||||
na = NickAlias::Find(u->Account()->display);
|
||||
na = u->AccountNick();
|
||||
|
||||
if (!na || !na->HasVHost())
|
||||
source.Reply(HOST_NOT_ASSIGNED);
|
||||
|
||||
@@ -29,7 +29,7 @@ public:
|
||||
User *u = source.GetUser();
|
||||
const NickAlias *na = NickAlias::Find(u->nick);
|
||||
if (!na || na->nc != u->Account() || !na->HasVHost())
|
||||
na = NickAlias::Find(u->Account()->display);
|
||||
na = u->AccountNick();
|
||||
if (na && u->Account() == na->nc && na->HasVHost())
|
||||
{
|
||||
source.Reply(_("Your vhost of \002%s\002 is now activated."), na->GetVHostMask().c_str());
|
||||
|
||||
@@ -32,10 +32,10 @@ struct HostRequestImpl final
|
||||
|
||||
void Serialize(Serialize::Data &data) const override
|
||||
{
|
||||
data["nick"] << this->nick;
|
||||
data["ident"] << this->ident;
|
||||
data["host"] << this->host;
|
||||
data.SetType("time", Serialize::Data::DT_INT); data["time"] << this->time;
|
||||
data.Store("nick", this->nick);
|
||||
data.Store("ident", this->ident);
|
||||
data.Store("host", this->host);
|
||||
data.Store("time", this->time);
|
||||
}
|
||||
|
||||
static Serializable *Unserialize(Serializable *obj, Serialize::Data &data)
|
||||
|
||||
+19
-20
@@ -117,7 +117,7 @@ void IRC2SQL::OnUserConnect(User *u, bool &exempt)
|
||||
this->RunQuery(query);
|
||||
|
||||
if (ctcpuser && (Me->IsSynced() || ctcpeob) && u->server != Me)
|
||||
IRCD->SendPrivmsg(StatServ, u->GetUID(), "\1VERSION\1");
|
||||
IRCD->SendPrivmsg(StatServ, u->GetUID(), Anope::FormatCTCP("VERSION"));
|
||||
|
||||
}
|
||||
|
||||
@@ -299,28 +299,27 @@ void IRC2SQL::OnTopicUpdated(User *source, Channel *c, const Anope::string &user
|
||||
|
||||
void IRC2SQL::OnBotNotice(User *u, BotInfo *bi, Anope::string &message, const Anope::map<Anope::string> &tags)
|
||||
{
|
||||
Anope::string versionstr;
|
||||
if (bi != StatServ)
|
||||
return;
|
||||
if (message[0] == '\1' && message[message.length() - 1] == '\1')
|
||||
{
|
||||
if (message.substr(0, 9).equals_ci("\1VERSION "))
|
||||
{
|
||||
if (u->HasExt("CTCPVERSION"))
|
||||
return;
|
||||
u->Extend<bool>("CTCPVERSION");
|
||||
|
||||
versionstr = Anope::NormalizeBuffer(message.substr(9, message.length() - 10));
|
||||
if (versionstr.empty())
|
||||
return;
|
||||
query = "UPDATE `" + prefix + "user` "
|
||||
"SET version=@version@ "
|
||||
"WHERE nick=@nick@";
|
||||
query.SetValue("version", versionstr);
|
||||
query.SetValue("nick", u->nick);
|
||||
this->RunQuery(query);
|
||||
}
|
||||
}
|
||||
Anope::string ctcpname, ctcpbody;
|
||||
if (!Anope::ParseCTCP(message, ctcpname, ctcpbody) || ctcpname != "VERSION")
|
||||
return;
|
||||
|
||||
if (u->HasExt("CTCPVERSION"))
|
||||
return;
|
||||
|
||||
u->Extend<bool>("CTCPVERSION");
|
||||
auto versionstr = Anope::NormalizeBuffer(message.substr(9, message.length() - 10));
|
||||
if (versionstr.empty())
|
||||
return;
|
||||
|
||||
query = "UPDATE `" + prefix + "user` "
|
||||
"SET version=@version@ "
|
||||
"WHERE nick=@nick@";
|
||||
query.SetValue("version", versionstr);
|
||||
query.SetValue("nick", u->nick);
|
||||
this->RunQuery(query);
|
||||
}
|
||||
|
||||
MODULE_INIT(IRC2SQL)
|
||||
|
||||
@@ -20,7 +20,7 @@ class MemoServCore final
|
||||
static bool SendMemoMail(NickCore *nc, MemoInfo *mi, Memo *m)
|
||||
{
|
||||
Anope::string subject = Language::Translate(nc, Config->GetBlock("mail")->Get<const Anope::string>("memo_subject").c_str()),
|
||||
message = Language::Translate(Config->GetBlock("mail")->Get<const Anope::string>("memo_message").c_str());
|
||||
message = Language::Translate(nc, Config->GetBlock("mail")->Get<const Anope::string>("memo_message").c_str());
|
||||
|
||||
subject = subject.replace_all_cs("%n", nc->display);
|
||||
subject = subject.replace_all_cs("%s", m->sender);
|
||||
@@ -101,7 +101,7 @@ public:
|
||||
if (ci->AccessFor(cu->user).HasPriv("MEMO"))
|
||||
{
|
||||
if (cu->user->Account() && cu->user->Account()->HasExt("MEMO_RECEIVE"))
|
||||
cu->user->SendMessage(MemoServ, MEMO_NEW_X_MEMO_ARRIVED, ci->name.c_str(), Config->StrictPrivmsg.c_str(), MemoServ->nick.c_str(), ci->name.c_str(), mi->memos->size());
|
||||
cu->user->SendMessage(MemoServ, MEMO_NEW_X_MEMO_ARRIVED, ci->name.c_str(), MemoServ->GetQueryCommand().c_str(), ci->name.c_str(), mi->memos->size());
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -116,7 +116,7 @@ public:
|
||||
{
|
||||
User *user = User::Find(na->nick, true);
|
||||
if (user && user->IsIdentified())
|
||||
user->SendMessage(MemoServ, MEMO_NEW_MEMO_ARRIVED, source.c_str(), Config->StrictPrivmsg.c_str(), MemoServ->nick.c_str(), mi->memos->size());
|
||||
user->SendMessage(MemoServ, MEMO_NEW_MEMO_ARRIVED, source.c_str(), MemoServ->GetQueryCommand().c_str(), mi->memos->size());
|
||||
}
|
||||
}
|
||||
|
||||
@@ -229,8 +229,8 @@ public:
|
||||
if (!params.empty() || source.c || source.service != *MemoServ)
|
||||
return;
|
||||
source.Reply(_(" \n"
|
||||
"Type \002%s%s HELP \037command\037\002 for help on any of the\n"
|
||||
"above commands."), Config->StrictPrivmsg.c_str(), MemoServ->nick.c_str());
|
||||
"Type \002%s HELP \037command\037\002 for help on any of the\n"
|
||||
"above commands."), MemoServ->GetQueryCommand().c_str());
|
||||
}
|
||||
};
|
||||
|
||||
|
||||
@@ -91,9 +91,9 @@ public:
|
||||
if (Command::FindCommandFromService("memoserv/del", bi, cmd))
|
||||
{
|
||||
if (ci)
|
||||
source.Reply(_("To delete, type: \002%s%s %s %s %d\002"), Config->StrictPrivmsg.c_str(), bi->nick.c_str(), cmd.c_str(), ci->name.c_str(), index + 1);
|
||||
source.Reply(_("To delete, type: \002%s %s %s %d\002"), bi->GetQueryCommand().c_str(), cmd.c_str(), ci->name.c_str(), index + 1);
|
||||
else
|
||||
source.Reply(_("To delete, type: \002%s%s %s %d\002"), Config->StrictPrivmsg.c_str(), bi->nick.c_str(), cmd.c_str(), index + 1);
|
||||
source.Reply(_("To delete, type: \002%s %s %d\002"), bi->GetQueryCommand().c_str(), cmd.c_str(), index + 1);
|
||||
}
|
||||
|
||||
source.Reply("%s", m->text.c_str());
|
||||
|
||||
@@ -232,8 +232,8 @@ public:
|
||||
" LIMIT Sets the maximum number of memos you can\n"
|
||||
" receive\n"
|
||||
" \n"
|
||||
"Type \002%s%s HELP %s \037option\037\002 for more information\n"
|
||||
"on a specific option."), Config->StrictPrivmsg.c_str(), source.service->nick.c_str(), source.command.c_str());
|
||||
"Type \002%s HELP %s \037option\037\002 for more information\n"
|
||||
"on a specific option."), source.service->GetQueryCommand().c_str(), source.command.c_str());
|
||||
}
|
||||
else if (subcommand.equals_ci("NOTIFY"))
|
||||
source.Reply(_("Syntax: \002NOTIFY {ON | LOGON | NEW | MAIL | NOMAIL | OFF}\002\n"
|
||||
|
||||
@@ -98,7 +98,7 @@ class NickServRelease final
|
||||
|
||||
public:
|
||||
NickServRelease(Module *me, NickAlias *na, time_t delay)
|
||||
: User(na->nick, Config->GetModule("nickserv")->Get<const Anope::string>("enforceruser", "user"), Config->GetModule("nickserv")->Get<const Anope::string>("enforcerhost", Me->GetName()), "", "", Me, "Services Enforcer", Anope::CurTime, "", IRCD->UID_Retrieve(), NULL)
|
||||
: User(na->nick, Config->GetModule("nickserv")->Get<const Anope::string>("enforceruser", "user"), Config->GetModule("nickserv")->Get<const Anope::string>("enforcerhost", Me->GetName()), "", "", Me, "Services Enforcer", Anope::CurTime, "", {}, IRCD->UID_Retrieve(), NULL)
|
||||
, Timer(me, delay)
|
||||
, nick(na->nick)
|
||||
{
|
||||
@@ -195,7 +195,7 @@ public:
|
||||
|
||||
if (!na->nc->HasExt("KILL_IMMED"))
|
||||
{
|
||||
u->SendMessage(NickServ, NICK_IS_SECURE, Config->StrictPrivmsg.c_str(), NickServ->nick.c_str());
|
||||
u->SendMessage(NickServ, NICK_IS_SECURE, NickServ->GetQueryCommand().c_str());
|
||||
}
|
||||
if (na->nc->HasExt("KILLPROTECT"))
|
||||
{
|
||||
@@ -362,8 +362,8 @@ public:
|
||||
u->SendMessage(NickServ, _("You must now supply an email for your nick.\n"
|
||||
"This email will allow you to retrieve your password in\n"
|
||||
"case you forget it."));
|
||||
u->SendMessage(NickServ, _("Type \002%s%s SET EMAIL \037email\037\002 in order to set your email."),
|
||||
Config->StrictPrivmsg.c_str(), NickServ->nick.c_str());
|
||||
u->SendMessage(NickServ, _("Type \002%s SET EMAIL \037email\037\002 in order to set your email."),
|
||||
NickServ->GetQueryCommand().c_str());
|
||||
}
|
||||
|
||||
for (auto *c : collides)
|
||||
@@ -465,15 +465,15 @@ public:
|
||||
source.Reply(_("\002%s\002 allows you to register a nickname and\n"
|
||||
"prevent others from using it. The following\n"
|
||||
"commands allow for registration and maintenance of\n"
|
||||
"nicknames; to use them, type \002%s%s \037command\037\002.\n"
|
||||
"nicknames; to use them, type \002%s \037command\037\002.\n"
|
||||
"For more information on a specific command, type\n"
|
||||
"\002%s%s %s \037command\037\002.\n"), NickServ->nick.c_str(), Config->StrictPrivmsg.c_str(), NickServ->nick.c_str(), Config->StrictPrivmsg.c_str(), NickServ->nick.c_str(), source.command.c_str());
|
||||
"\002%s %s \037command\037\002.\n"), NickServ->nick.c_str(), NickServ->GetQueryCommand().c_str(), NickServ->GetQueryCommand().c_str(), source.command.c_str());
|
||||
else
|
||||
source.Reply(_("\002%s\002 allows you to register an account.\n"
|
||||
"The following commands allow for registration and maintenance of\n"
|
||||
"accounts; to use them, type \002%s%s \037command\037\002.\n"
|
||||
"accounts; to use them, type \002%s \037command\037\002.\n"
|
||||
"For more information on a specific command, type\n"
|
||||
"\002%s%s %s \037command\037\002.\n"), NickServ->nick.c_str(), Config->StrictPrivmsg.c_str(), NickServ->nick.c_str(), Config->StrictPrivmsg.c_str(), NickServ->nick.c_str(), source.command.c_str());
|
||||
"\002%s %s \037command\037\002.\n"), NickServ->nick.c_str(), NickServ->GetQueryCommand().c_str(), NickServ->GetQueryCommand().c_str(), source.command.c_str());
|
||||
return EVENT_CONTINUE;
|
||||
}
|
||||
|
||||
@@ -486,7 +486,7 @@ public:
|
||||
"Services Operators can also drop any nickname without needing\n"
|
||||
"to identify for the nick, and may view the access list for\n"
|
||||
"any nickname."));
|
||||
time_t nickserv_expire = Config->GetModule(this)->Get<time_t>("expire", "90d");
|
||||
time_t nickserv_expire = Config->GetModule(this)->Get<time_t>("expire", "1y");
|
||||
if (nickserv_expire >= 86400)
|
||||
source.Reply(_(" \n"
|
||||
"Accounts that are not used anymore are subject to\n"
|
||||
@@ -536,6 +536,9 @@ public:
|
||||
if (nickserv_expire && Anope::CurTime - na->last_seen >= nickserv_expire)
|
||||
expire = true;
|
||||
|
||||
if (na->nc->na == na && na->nc->aliases->size() > 1 && Config->GetModule("nickserv")->Get<bool>("preservedisplay"))
|
||||
expire = false;
|
||||
|
||||
FOREACH_MOD(OnPreNickExpire, (na, expire));
|
||||
|
||||
if (expire)
|
||||
@@ -551,7 +554,7 @@ public:
|
||||
{
|
||||
if (!na->nc->HasExt("UNCONFIRMED"))
|
||||
{
|
||||
time_t nickserv_expire = Config->GetModule(this)->Get<time_t>("expire", "90d");
|
||||
time_t nickserv_expire = Config->GetModule(this)->Get<time_t>("expire", "1y");
|
||||
if (!na->HasExt("NS_NO_EXPIRE") && nickserv_expire && !Anope::NoExpire && (source.HasPriv("nickserv/auspex") || na->last_seen != Anope::CurTime))
|
||||
info[_("Expires")] = Anope::strftime(na->last_seen + nickserv_expire, source.GetAccount());
|
||||
}
|
||||
|
||||
@@ -40,14 +40,14 @@ struct AJoinEntry final
|
||||
}
|
||||
}
|
||||
|
||||
void Serialize(Serialize::Data &sd) const override
|
||||
void Serialize(Serialize::Data &data) const override
|
||||
{
|
||||
if (!this->owner)
|
||||
return;
|
||||
|
||||
sd["owner"] << this->owner->display;
|
||||
sd["channel"] << this->channel;
|
||||
sd["key"] << this->key;
|
||||
data.Store("owner", this->owner->display);
|
||||
data.Store("channel", this->channel);
|
||||
data.Store("key", this->key);
|
||||
}
|
||||
|
||||
static Serializable *Unserialize(Serializable *obj, Serialize::Data &sd)
|
||||
|
||||
@@ -26,6 +26,17 @@ struct CertServiceImpl final
|
||||
return it->second;
|
||||
return NULL;
|
||||
}
|
||||
|
||||
void ReplaceCert(const Anope::string &oldcert, const Anope::string &newcert) override
|
||||
{
|
||||
auto *nc = FindAccountFromCert(oldcert);
|
||||
if (!nc)
|
||||
return;
|
||||
|
||||
auto *cl = nc->GetExt<NSCertList>("certificates");
|
||||
if (cl)
|
||||
cl->ReplaceCert(oldcert, newcert);
|
||||
}
|
||||
};
|
||||
|
||||
struct NSCertListImpl final
|
||||
@@ -111,6 +122,14 @@ public:
|
||||
|
||||
FOREACH_MOD(OnNickEraseCert, (this->nc, oldentry));
|
||||
certmap.erase(oldentry);
|
||||
|
||||
if (std::find(this->certs.begin(), this->certs.end(), newentry) != this->certs.end())
|
||||
{
|
||||
// The cert we're upgrading to already exists.
|
||||
this->certs.erase(it);
|
||||
return;
|
||||
}
|
||||
|
||||
*it = newentry;
|
||||
certmap[newentry] = nc;
|
||||
FOREACH_MOD(OnNickAddCert, (this->nc, newentry));
|
||||
@@ -149,8 +168,10 @@ public:
|
||||
if (c == NULL || !c->GetCertCount())
|
||||
return;
|
||||
|
||||
std::ostringstream oss;
|
||||
for (unsigned i = 0; i < c->GetCertCount(); ++i)
|
||||
data["cert"] << c->GetCert(i) << " ";
|
||||
oss << c->GetCert(i) << " ";
|
||||
data.Store("cert", oss.str());
|
||||
}
|
||||
|
||||
void ExtensibleUnserialize(Extensible *e, Serializable *s, Serialize::Data &data) override
|
||||
@@ -397,6 +418,18 @@ public:
|
||||
Log(NickServ) << u->GetMask() << " automatically identified for account " << nc->display << " via SSL certificate fingerprint";
|
||||
}
|
||||
|
||||
void OnNickRegister(User *u, NickAlias *na, const Anope::string &pass) override
|
||||
{
|
||||
if (!Config->GetModule(this)->Get<bool>("automatic", "yes") || !u || u->fingerprint.empty())
|
||||
return;
|
||||
|
||||
auto *cl = certs.Require(na->nc);
|
||||
cl->AddCert(u->fingerprint);
|
||||
|
||||
auto *NickServ = Config->GetClient("NickServ");
|
||||
u->SendMessage(NickServ, _("Your SSL certificate fingerprint \002%s\002 has been automatically added to your certificate list."), u->fingerprint.c_str());
|
||||
}
|
||||
|
||||
EventReturn OnNickValidate(User *u, NickAlias *na) override
|
||||
{
|
||||
NSCertList *cl = certs.Get(na->nc);
|
||||
|
||||
@@ -57,8 +57,14 @@ public:
|
||||
return;
|
||||
}
|
||||
|
||||
if (na->nc->na == na && na->nc->aliases->size() > 1 && Config->GetModule("nickserv")->Get<bool>("preservedisplay") && !source.HasPriv("nickserv/drop/display"))
|
||||
{
|
||||
source.Reply(_("You may not drop \002%s\002 as it is the display nick for the account."), na->nick.c_str());
|
||||
return;
|
||||
}
|
||||
|
||||
auto *code = dropcode.Get(na);
|
||||
if (params.size() < 2 || !code || !code->equals_ci(params[1]))
|
||||
if (params.size() < 2 || ((!code || !code->equals_ci(params[1])) && (!source.HasPriv("nickserv/drop/override") || params[1] != "OVERRIDE")))
|
||||
{
|
||||
if (!code)
|
||||
{
|
||||
@@ -66,8 +72,8 @@ public:
|
||||
*code = Anope::Random(15);
|
||||
}
|
||||
|
||||
source.Reply(CONFIRM_DROP, na->nick.c_str(), Config->StrictPrivmsg.c_str(),
|
||||
source.service->nick.c_str(), na->nick.c_str(), code->c_str());
|
||||
source.Reply(CONFIRM_DROP, na->nick.c_str(), source.service->GetQueryCommand().c_str(),
|
||||
na->nick.c_str(), code->c_str());
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -87,11 +93,17 @@ public:
|
||||
"is dropped you may lose all of your access and channels that\n"
|
||||
"you may own. Any other user will be able to gain control of\n"
|
||||
"this nick."));
|
||||
|
||||
source.Reply(" ");
|
||||
if (!source.HasPriv("nickserv/drop"))
|
||||
source.Reply(_("You may drop any nick within your group."));
|
||||
else
|
||||
source.Reply(_("As a Services Operator, you may drop any nick."));
|
||||
|
||||
source.Reply(" ");
|
||||
if (source.HasPriv("nickserv/drop/override"))
|
||||
source.Reply(_("Additionally, Services Operators with the \037nickserv/drop/override\037 permission can\n"
|
||||
"replace \037code\037 with \002OVERRIDE\002 to drop without a confirmation code."));
|
||||
return true;
|
||||
}
|
||||
};
|
||||
|
||||
@@ -15,11 +15,12 @@
|
||||
|
||||
#include "module.h"
|
||||
|
||||
class CommandNSGetEMail final
|
||||
class CommandNSGetEmail final
|
||||
: public Command
|
||||
{
|
||||
public:
|
||||
CommandNSGetEMail(Module *creator) : Command(creator, "nickserv/getemail", 1, 1)
|
||||
CommandNSGetEmail(Module *creator)
|
||||
: Command(creator, "nickserv/getemail", 1, 1)
|
||||
{
|
||||
this->SetDesc(_("Matches and returns all users that registered using given email"));
|
||||
this->SetSyntax(_("\037email\037"));
|
||||
@@ -59,16 +60,19 @@ public:
|
||||
}
|
||||
};
|
||||
|
||||
class NSGetEMail final
|
||||
class NSGetEmail final
|
||||
: public Module
|
||||
{
|
||||
CommandNSGetEMail commandnsgetemail;
|
||||
private:
|
||||
CommandNSGetEmail commandnsgetemail;
|
||||
|
||||
public:
|
||||
NSGetEMail(const Anope::string &modname, const Anope::string &creator) : Module(modname, creator, VENDOR),
|
||||
commandnsgetemail(this)
|
||||
NSGetEmail(const Anope::string &modname, const Anope::string &creator)
|
||||
: Module(modname, creator, VENDOR)
|
||||
, commandnsgetemail(this)
|
||||
{
|
||||
|
||||
}
|
||||
};
|
||||
|
||||
MODULE_INIT(NSGetEMail)
|
||||
MODULE_INIT(NSGetEmail)
|
||||
|
||||
@@ -24,8 +24,35 @@ public:
|
||||
|
||||
void Execute(CommandSource &source, const std::vector<Anope::string> ¶ms) override
|
||||
{
|
||||
Anope::string nick;
|
||||
if (params.empty())
|
||||
{
|
||||
// Use the display of the source if logged in; otherwise, use their nick.
|
||||
nick = source.nc ? source.nc->na->nick : source.GetNick();
|
||||
}
|
||||
else if (params[0][0] == '=' && params[0].length() > 1)
|
||||
{
|
||||
// Look up the account of the specified user.
|
||||
nick = params[0].substr(1);
|
||||
auto *u = User::Find(nick);
|
||||
if (!u)
|
||||
{
|
||||
source.Reply(NICK_X_NOT_IN_USE, nick.c_str());
|
||||
return;
|
||||
}
|
||||
if (!u->AccountNick())
|
||||
{
|
||||
source.Reply(_("User \002%s\002 isn't currently logged in to an account."), nick.c_str());
|
||||
return;
|
||||
}
|
||||
nick = u->AccountNick()->nick;
|
||||
}
|
||||
else
|
||||
{
|
||||
// Just use the nick the user specified.
|
||||
nick = params[0];
|
||||
}
|
||||
|
||||
const Anope::string &nick = params.size() ? params[0] : (source.nc ? source.nc->display : source.GetNick());
|
||||
NickAlias *na = NickAlias::Find(nick);
|
||||
bool has_auspex = source.HasPriv("nickserv/auspex");
|
||||
|
||||
@@ -62,6 +89,7 @@ public:
|
||||
InfoFormatter info(source.nc);
|
||||
|
||||
info[_("Account")] = na->nc->display;
|
||||
info[_("Account id")] = Anope::ToString(na->nc->GetId());
|
||||
if (nick_online)
|
||||
{
|
||||
bool shown = false;
|
||||
@@ -88,7 +116,8 @@ public:
|
||||
info[_("Last seen address")] = na->last_realhost;
|
||||
}
|
||||
|
||||
info[_("Registered")] = Anope::strftime(na->time_registered, source.GetAccount());
|
||||
info[_("Account registered")] = Anope::strftime(na->nc->time_registered, source.GetAccount());
|
||||
info[_("Nick registered")] = Anope::strftime(na->time_registered, source.GetAccount());
|
||||
|
||||
if (!nick_online)
|
||||
info[_("Last seen")] = Anope::strftime(na->last_seen, source.GetAccount());
|
||||
|
||||
@@ -401,7 +401,7 @@ public:
|
||||
u->SendMessage(NickServ, _("All new accounts must be validated by an administrator. Please wait for your registration to be confirmed."));
|
||||
else
|
||||
u->SendMessage(NickServ, _("Your email address is not confirmed. To confirm it, follow the instructions that were emailed to you."));
|
||||
const NickAlias *this_na = NickAlias::Find(u->Account()->display);
|
||||
const NickAlias *this_na = u->AccountNick();
|
||||
time_t time_registered = Anope::CurTime - this_na->time_registered;
|
||||
time_t unconfirmed_expire = Config->GetModule(this)->Get<time_t>("unconfirmedexpire", "1d");
|
||||
if (unconfirmed_expire > time_registered)
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user