mirror of
https://github.com/anope/anope.git
synced 2026-06-13 18:44:46 +02:00
Compare commits
69 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| f2598bdb6e | |||
| 101fe6882d | |||
| a30afed7b2 | |||
| feedbd6b0d | |||
| 05bc74d9cb | |||
| e0cc7a6c0b | |||
| 2fdcb30beb | |||
| feff8c1fb1 | |||
| ea05ff108a | |||
| bcae4f00e1 | |||
| 01f65c7e64 | |||
| 958521b8c6 | |||
| 06d5233502 | |||
| a4b40f6f67 | |||
| 1d4f61e089 | |||
| 8ff16f17cc | |||
| 2bb115f6e4 | |||
| e46b0f0ccd | |||
| 572d1a94bd | |||
| 9210aae6f9 | |||
| d4b6968108 | |||
| 672acf306f | |||
| a408ceee74 | |||
| 55a564a0b4 | |||
| 027567b4b0 | |||
| 25e81f6ea9 | |||
| ea090fae8d | |||
| 74c5d989bc | |||
| 1dec3ee8fb | |||
| 446a6f6ea5 | |||
| 9d89891a90 | |||
| 1cbfdac929 | |||
| 49d1d9e79b | |||
| eb4510946f | |||
| 104b52b06e | |||
| 697f535f8b | |||
| 35ca9adc25 | |||
| 8f3958d0f4 | |||
| 57fb28e70a | |||
| 1ba8e796c7 | |||
| 645c224ff7 | |||
| 66a9b8605f | |||
| 9ee3f37bee | |||
| 9d7edd3055 | |||
| 2af1c0a5e9 | |||
| 08c8a883ef | |||
| 7cc23d874f | |||
| 324b4ee85e | |||
| 3ba4d4e97d | |||
| 9bb905229d | |||
| f98a3a85d6 | |||
| ef83568646 | |||
| 64fee38976 | |||
| 4768beb328 | |||
| 60c88393a0 | |||
| 07892e8b4b | |||
| 6c801d5780 | |||
| 0b76c8b5e6 | |||
| 942b1a8800 | |||
| 308d7937ef | |||
| 9c2591c20a | |||
| 6c51b17ef1 | |||
| 5a191ce5a6 | |||
| a68730adb1 | |||
| 9d24e8f35c | |||
| 4a8bc79a06 | |||
| b37da9de9e | |||
| a632cdc732 | |||
| c777c8d9aa |
@@ -1,5 +1,5 @@
|
||||
___
|
||||
/ _ \ https://www.anope.org/
|
||||
/ _ \ http://www.anope.org
|
||||
| /_\ | _ __ _ _ _ _ ___
|
||||
| _ || '_ \/ _ \/ _ \ / _ \
|
||||
| | | || | | |_| |_| | __/
|
||||
@@ -7,13 +7,12 @@
|
||||
| |
|
||||
|_| IRC Services
|
||||
CURVER
|
||||
This program will help you to compile your services, and ask you
|
||||
This program will help you to compile your Services, and ask you
|
||||
questions regarding the compile-time settings of it during the
|
||||
process. For more options type SOURCE_DIR/Config --help
|
||||
process. For more options type ./Config --help
|
||||
|
||||
Anope is a set of services for IRC networks that allows users to
|
||||
Anope is a set of Services for IRC networks that allows users to
|
||||
manage their nicks and channels in a secure and efficient way,
|
||||
and administrators to manage their network with powerful tools.
|
||||
|
||||
For all your Anope needs please visit our portal at
|
||||
https://www.anope.org/
|
||||
For all your Anope needs please visit our portal at www.anope.org
|
||||
|
||||
@@ -1,44 +0,0 @@
|
||||
---
|
||||
name: Bug report
|
||||
description: Report a non-security bug in Anope.
|
||||
body:
|
||||
- type: markdown
|
||||
attributes:
|
||||
value: |
|
||||
Thanks for taking the time to fill out this bug report! Please make sure to answer the questions properly and don't just enter the same text into every field as this will make it harder for us to fix your bug.
|
||||
|
||||
If you're looking for help with setting up your services please post on [our support forum](https://github.com/orgs/anope/discussions/categories/support) instead.
|
||||
|
||||
If you're reporting a crash or other security issue [please read our security policy](https://github.com/anope/anope/security/policy#reporting-a-vulnerability) for how to report security issues privately.
|
||||
|
||||
- type: textarea
|
||||
attributes:
|
||||
label: Description
|
||||
validations:
|
||||
required: true
|
||||
|
||||
- type: textarea
|
||||
attributes:
|
||||
label: Steps to reproduce the issue
|
||||
validations:
|
||||
required: true
|
||||
|
||||
- type: textarea
|
||||
attributes:
|
||||
label: Describe the results you received
|
||||
validations:
|
||||
required: true
|
||||
|
||||
- type: textarea
|
||||
attributes:
|
||||
label: Describe the results you expected
|
||||
validations:
|
||||
required: true
|
||||
|
||||
- type: input
|
||||
attributes:
|
||||
label: Anope version
|
||||
description: |-
|
||||
Either the output of `services --version` (2.0) or `anope --version` (2.1).
|
||||
validations:
|
||||
required: true
|
||||
@@ -1,20 +0,0 @@
|
||||
---
|
||||
name: Feature request
|
||||
description: Request that a new feature is added to Anope.
|
||||
body:
|
||||
- type: markdown
|
||||
attributes:
|
||||
value: |
|
||||
Thanks for taking the time to fill out this feature request!
|
||||
|
||||
- type: textarea
|
||||
attributes:
|
||||
label: Description
|
||||
validations:
|
||||
required: true
|
||||
|
||||
- type: textarea
|
||||
attributes:
|
||||
label: Why this would be useful?
|
||||
validations:
|
||||
required: true
|
||||
@@ -1,5 +0,0 @@
|
||||
blank_issues_enabled: false
|
||||
contact_links:
|
||||
- name: Support forum
|
||||
url: https://github.com/orgs/anope/discussions/categories/support
|
||||
about: Please ask support questions here.
|
||||
@@ -1,40 +0,0 @@
|
||||
<!--
|
||||
Please fill in the template below. It will help us process your pull request a lot faster.
|
||||
-->
|
||||
|
||||
## Summary
|
||||
|
||||
<!--
|
||||
Briefly describe what this pull request changes.
|
||||
-->
|
||||
|
||||
## Rationale
|
||||
|
||||
<!--
|
||||
Describe why you have made this change.
|
||||
-->
|
||||
|
||||
## Testing Environment
|
||||
|
||||
<!--
|
||||
Describe the environment in which you have tested this change:
|
||||
-->
|
||||
|
||||
I have tested this pull request on:
|
||||
|
||||
**Operating system name and version:** <!-- e.g. Linux 3.11 -->
|
||||
**Compiler name and version:** <!-- e.g. GCC 4.2.0 -->
|
||||
|
||||
## Checks
|
||||
|
||||
<!--
|
||||
Tick the boxes for the checks you have made.
|
||||
-->
|
||||
|
||||
I have ensured that:
|
||||
|
||||
- [ ] The code I am submitting is my own work and/or I have permission from the author to share it.
|
||||
- [ ] Generative AI (Copilot, ChatGPT, etc) was not used to create any part of this pull request.
|
||||
- [ ] If the pull request contains a security fix I have followed the reporting rules mentioned in [the security policy](https://github.com/anope/anope/security/policy) (delete if not applicable).
|
||||
- [ ] I have documented any features added by this pull request (delete if not applicable).
|
||||
- [ ] This pull request does not introduce any incompatible API changes (stable branches only, delete if not applicable).
|
||||
@@ -1,19 +0,0 @@
|
||||
# Security Policy
|
||||
|
||||
## Supported Versions
|
||||
|
||||
Currently the 2.0 (stable) branch is actively receiving security fixes.
|
||||
|
||||
The 2.1 (development) branch is still early in development and currently only receives security fixes when they are synced from the 2.0 branch.
|
||||
|
||||
Version | Supported
|
||||
------- | ---------
|
||||
2.1.x | :warning:
|
||||
2.0.x | :white_check_mark:
|
||||
1.8.x | :x:
|
||||
|
||||
## 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.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.
|
||||
@@ -1,7 +0,0 @@
|
||||
version: 2
|
||||
updates:
|
||||
- package-ecosystem: github-actions
|
||||
directory: /
|
||||
schedule:
|
||||
interval: monthly
|
||||
target-branch: "2.1"
|
||||
@@ -1,69 +0,0 @@
|
||||
name: Alpine CI
|
||||
on:
|
||||
pull_request:
|
||||
push:
|
||||
schedule:
|
||||
- cron: 0 0 * * 0
|
||||
workflow_dispatch:
|
||||
jobs:
|
||||
build:
|
||||
if: "!contains(github.event.head_commit.message, '[skip alpine ci]')"
|
||||
container: alpine:latest
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- uses: actions/checkout@v6
|
||||
|
||||
- name: Install dependencies
|
||||
run: |-
|
||||
echo "http://dl-cdn.alpinelinux.org/alpine/edge/testing" >> /etc/apk/repositories
|
||||
apk update
|
||||
apk add \
|
||||
argon2-dev \
|
||||
clang \
|
||||
cmake \
|
||||
g++ \
|
||||
gettext \
|
||||
git \
|
||||
gnutls-dev \
|
||||
mariadb-dev \
|
||||
openldap-dev \
|
||||
openssl-dev \
|
||||
pcre2-dev \
|
||||
samurai \
|
||||
sqlite-dev \
|
||||
tre-dev
|
||||
|
||||
- name: Enable extras
|
||||
run: |-
|
||||
for MODULE in enc_argon2 enc_posix ldap mysql regex_pcre2 regex_posix regex_tre sqlite ssl_gnutls ssl_openssl
|
||||
do
|
||||
ln -s $PWD/modules/extra/$MODULE.cpp $PWD/modules
|
||||
done
|
||||
|
||||
- name: Run CMake
|
||||
env:
|
||||
CC: ${{ matrix.compiler.cc }}
|
||||
CXX: ${{ matrix.compiler.cxx }}
|
||||
CXXFLAGS: -Werror
|
||||
run: |-
|
||||
cmake -B "build" \
|
||||
-D "CMAKE_BUILD_TYPE=Debug" \
|
||||
-D "INSTDIR=$(readlink -f ../run)" \
|
||||
-G "Ninja" \
|
||||
-Wdeprecated \
|
||||
-Wdev
|
||||
|
||||
- name: Build and install
|
||||
env:
|
||||
VERBOSE: ${{ runner.debug }}
|
||||
run: |-
|
||||
ninja -C "build" ${{ runner.debug == '1' && '-v' || '' }} install
|
||||
|
||||
strategy:
|
||||
fail-fast: false
|
||||
matrix:
|
||||
compiler:
|
||||
- cc: clang
|
||||
cxx: clang++
|
||||
- cc: gcc
|
||||
cxx: g++
|
||||
@@ -1,66 +0,0 @@
|
||||
name: Ubuntu CI
|
||||
on:
|
||||
pull_request:
|
||||
push:
|
||||
schedule:
|
||||
- cron: 0 0 * * 0
|
||||
workflow_dispatch:
|
||||
jobs:
|
||||
build:
|
||||
if: "!contains(github.event.head_commit.message, '[skip ubuntu ci]')"
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- uses: actions/checkout@v6
|
||||
|
||||
- name: Install dependencies
|
||||
run: |-
|
||||
sudo apt-get update --assume-yes
|
||||
sudo apt-get install --assume-yes --no-install-recommends \
|
||||
clang \
|
||||
g++ \
|
||||
gettext \
|
||||
git \
|
||||
libargon2-dev \
|
||||
libgnutls28-dev \
|
||||
libldap2-dev \
|
||||
libmysqlclient-dev \
|
||||
libpcre2-dev \
|
||||
libsqlite3-dev \
|
||||
libssl-dev \
|
||||
libtre-dev \
|
||||
ninja-build
|
||||
|
||||
- name: Enable extras
|
||||
run: |-
|
||||
for MODULE in enc_argon2 enc_posix ldap mysql regex_pcre2 regex_posix regex_tre sqlite ssl_gnutls ssl_openssl
|
||||
do
|
||||
ln -s ${{ github.workspace }}/modules/extra/$MODULE.cpp ${{ github.workspace }}/modules
|
||||
done
|
||||
|
||||
- name: Run CMake
|
||||
env:
|
||||
CC: ${{ matrix.compiler.cc }}
|
||||
CXX: ${{ matrix.compiler.cxx }}
|
||||
CXXFLAGS: -Werror
|
||||
run: |-
|
||||
cmake -B "build" \
|
||||
-D "CMAKE_BUILD_TYPE=Debug" \
|
||||
-D "INSTDIR=${{ github.workspace }}/run" \
|
||||
-G "Ninja" \
|
||||
-Wdeprecated \
|
||||
-Wdev
|
||||
|
||||
- name: Build and install
|
||||
env:
|
||||
VERBOSE: ${{ runner.debug }}
|
||||
run: |-
|
||||
ninja -C "build" ${{ runner.debug == '1' && '-v' || '' }} install
|
||||
|
||||
strategy:
|
||||
fail-fast: false
|
||||
matrix:
|
||||
compiler:
|
||||
- cc: clang
|
||||
cxx: clang++
|
||||
- cc: gcc
|
||||
cxx: g++
|
||||
@@ -1,96 +0,0 @@
|
||||
name: Windows CI
|
||||
on:
|
||||
pull_request:
|
||||
push:
|
||||
release:
|
||||
types:
|
||||
- published
|
||||
schedule:
|
||||
- cron: 0 0 * * 0
|
||||
workflow_dispatch:
|
||||
jobs:
|
||||
build:
|
||||
if: "!contains(github.event.head_commit.message, '[skip windows ci]')"
|
||||
runs-on: windows-2025
|
||||
env:
|
||||
BUILD_PATH: ${{ github.workspace }}\build
|
||||
BUILD_TYPE: ${{ github.event_name == 'release' && 'Release' || 'Debug' }}
|
||||
CONAN_FILE: ${{ github.workspace }}\src\win32\conanfile.txt
|
||||
CONAN_HOME: ${{ github.workspace }}\build\conan
|
||||
steps:
|
||||
- uses: actions/checkout@v6
|
||||
|
||||
- name: Setup MSVC
|
||||
uses: TheMrMilchmann/setup-msvc-dev@v4
|
||||
with:
|
||||
arch: x64
|
||||
|
||||
- name: Setup NSIS
|
||||
uses: negrutiu/nsis-install@v3
|
||||
with:
|
||||
distro: official
|
||||
|
||||
- name: Setup Conan
|
||||
uses: turtlebrowser/get-conan@v1.2
|
||||
|
||||
- name: Create Conan configuration
|
||||
run: |-
|
||||
conan profile detect
|
||||
(Get-Content ${{ env.CONAN_HOME }}\profiles\default).replace('build_type=Release', 'build_type=${{ env.BUILD_TYPE }}') | Set-Content ${{ env.CONAN_HOME }}\profiles\default
|
||||
(Get-Content ${{ env.CONAN_HOME }}\profiles\default).replace('compiler.cppstd=14', 'compiler.cppstd=17') | Set-Content ${{ env.CONAN_HOME }}\profiles\default
|
||||
|
||||
Write-Output 'core.sources:download_urls=["origin", "https://c3i.jfrog.io/artifactory/conan-center-backup-sources/"]' | Out-File -Append ${{ env.CONAN_HOME }}\global.conf
|
||||
Write-Output 'tools.cmake.cmaketoolchain:generator=Ninja' | Out-File -Append ${{ env.CONAN_HOME }}\global.conf
|
||||
Write-Output 'user.openssl:windows_use_jom=True' | Out-File -Append ${{ env.CONAN_HOME }}\global.conf
|
||||
|
||||
- name: Try to restore libraries from the cache
|
||||
if: github.event_name != 'release'
|
||||
uses: actions/cache/restore@v5
|
||||
id: library-cache
|
||||
with:
|
||||
key: Conan VS${{ env.VisualStudioVersion }} ${{ env.BUILD_TYPE }} ${{ hashFiles(env.CONAN_FILE) }}
|
||||
path: ${{ env.CONAN_HOME }}/p
|
||||
|
||||
- name: Install libraries
|
||||
working-directory: ${{ env.BUILD_PATH }}
|
||||
run: |-
|
||||
(Get-Content ${{ env.CONAN_FILE }}).replace('##', '') | Set-Content ${{ env.CONAN_FILE }}
|
||||
conan install ${{ env.CONAN_FILE }} --build missing --deployer runtime_deploy --deployer-folder extradll --output-folder .
|
||||
conan cache clean "*"
|
||||
|
||||
- name: Save libraries to the cache
|
||||
if: steps.library-cache.outputs.cache-hit != 'true' && github.event_name != 'release'
|
||||
uses: actions/cache/save@v5
|
||||
with:
|
||||
key: ${{ steps.library-cache.outputs.cache-primary-key }}
|
||||
path: ${{ env.CONAN_HOME }}\p
|
||||
|
||||
- name: Run CMake
|
||||
working-directory: ${{ env.BUILD_PATH }}
|
||||
run: |-
|
||||
cmake -D "CMAKE_BUILD_TYPE=${{ env.BUILD_TYPE }}" `
|
||||
-D "CMAKE_TOOLCHAIN_FILE=conan_toolchain.cmake" `
|
||||
-G "Ninja Multi-Config" `
|
||||
-S "${{ github.workspace }}" `
|
||||
-Wdeprecated `
|
||||
-Wdev
|
||||
|
||||
- name: Build installer
|
||||
working-directory: ${{ env.BUILD_PATH }}
|
||||
run: |-
|
||||
ninja -f "build-${{ env.BUILD_TYPE }}.ninja" ${{ runner.debug == '1' && '-v' || '' }} package
|
||||
|
||||
- name: Upload installer
|
||||
if: github.event_name == 'release'
|
||||
working-directory: ${{ env.BUILD_PATH }}
|
||||
env:
|
||||
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||
run: |
|
||||
gh release upload ${{ github.event.release.tag_name }} $(Get-ChildItem anope-*.exe)
|
||||
|
||||
- name: Upload artifact
|
||||
if: github.event_name != 'release'
|
||||
uses: actions/upload-artifact@v7
|
||||
with:
|
||||
name: windows-installer
|
||||
path: ${{ github.workspace }}\build\\anope-*.exe
|
||||
-20
@@ -1,20 +0,0 @@
|
||||
build/
|
||||
config.cache
|
||||
docs/doxygen
|
||||
include/sysconf.h
|
||||
modules/enc_argon2.cpp
|
||||
modules/enc_posix.cpp
|
||||
modules/ldap.cpp
|
||||
modules/mysql.cpp
|
||||
modules/regex_pcre2.cpp
|
||||
modules/regex_posix.cpp
|
||||
modules/regex_tre.cpp
|
||||
modules/sqlite.cpp
|
||||
modules/ssl_gnutls.cpp
|
||||
modules/ssl_openssl.cpp
|
||||
modules/stats
|
||||
modules/xmlrpc.cpp
|
||||
run/
|
||||
*.diff
|
||||
*.mo
|
||||
*.pot
|
||||
@@ -1,60 +0,0 @@
|
||||
(svnadmin) <svn@localhost> <svn svn@31f1291d-b8d6-0310-a050-a5561fc1590b@5417fbe8-f217-4b02-8779-1006273d7864>
|
||||
Adam <adam@anope.org> <adam-@5417fbe8-f217-4b02-8779-1006273d7864>
|
||||
Adam <adam@anope.org> <adam@adam-laptop.(none)>
|
||||
Adam <adam@anope.org> <Adam@anope.org>
|
||||
Adam <adam@anope.org> <Adam@drink-coca-cola.info>
|
||||
Adam <adam@anope.org> <Adam@sigterm.info>
|
||||
Adam Kramer <ribosome@anope.org> <ribosome ribosome@31f1291d-b8d6-0310-a050-a5561fc1590b@5417fbe8-f217-4b02-8779-1006273d7864>
|
||||
Alvaro Toledo <atoledo@keldon.org> <atoledo atoledo@31f1291d-b8d6-0310-a050-a5561fc1590b@5417fbe8-f217-4b02-8779-1006273d7864>
|
||||
Attila Molnar <attilamolnar@hush.com>
|
||||
Björn Stiddien <keeper@anope.org> <keeper keeper@31f1291d-b8d6-0310-a050-a5561fc1590b@5417fbe8-f217-4b02-8779-1006273d7864>
|
||||
Charles Kingsley <chaz@anope.org>
|
||||
Charles Kingsley <chaz@anope.org> <sjaz@5417fbe8-f217-4b02-8779-1006273d7864>
|
||||
Cronus <cronus@nite-serv.com>
|
||||
Daniel Engel <dane@zero.org> <dane dane@31f1291d-b8d6-0310-a050-a5561fc1590b@5417fbe8-f217-4b02-8779-1006273d7864>
|
||||
David Robson <rob@anope.org> <rob rob@31f1291d-b8d6-0310-a050-a5561fc1590b@5417fbe8-f217-4b02-8779-1006273d7864>
|
||||
David Robson <rob@anope.org> <robbeh@5417fbe8-f217-4b02-8779-1006273d7864>
|
||||
Dennis Friis <peavey@inspircd.org> <peavey peavey@inspircd.org@5417fbe8-f217-4b02-8779-1006273d7864>
|
||||
Fabio Scotoni <cculex@gmail.com>
|
||||
Filippo Cortigiani <simos@simosnap.org> <devel@devel.crtnet.it>
|
||||
Filippo Cortigiani <simos@simosnap.org> <simos@H7-25.fritz.box>
|
||||
Florian Schulze <certus@anope.org> <certus certus@31f1291d-b8d6-0310-a050-a5561fc1590b@5417fbe8-f217-4b02-8779-1006273d7864>
|
||||
Gabriel Acevedo H. <drstein@anope.org> <drstein drstein@31f1291d-b8d6-0310-a050-a5561fc1590b@5417fbe8-f217-4b02-8779-1006273d7864>
|
||||
Harakiri <harakiri@overstack.fr>
|
||||
Hendrik Jäger <gitcommit@henk.geekmail.org> <github@henk.geekmail.org>
|
||||
Jan Milants <viper@anope.org>
|
||||
Jan Milants <viper@anope.org> <jantje_85@5417fbe8-f217-4b02-8779-1006273d7864>
|
||||
Jan Milants <viper@anope.org> <viper viper@31f1291d-b8d6-0310-a050-a5561fc1590b@5417fbe8-f217-4b02-8779-1006273d7864>
|
||||
Jens Voss <dukepyrolator@anope.org> <anope@s15355730.onlinehome-server.info>
|
||||
Jens Voss <dukepyrolator@anope.org> <DukePyrolator@5417fbe8-f217-4b02-8779-1006273d7864>
|
||||
Jens Voss <dukepyrolator@anope.org> <DukePyrolator@anope.org>
|
||||
Jens Voss <dukepyrolator@anope.org> <jens@pyrobook.(none)>
|
||||
k4be <k4be@pirc.pl> <34816207+k4bek4be@users.noreply.github.com>
|
||||
Lee Holmes <lethality@anope.org>
|
||||
Lee Holmes <lethality@anope.org> <lee@lethality.me.uk>
|
||||
Mark Summers <mark@goopler.net> <mark mark@31f1291d-b8d6-0310-a050-a5561fc1590b@5417fbe8-f217-4b02-8779-1006273d7864>
|
||||
Matt Schatz <genius3000@g3k.solutions>
|
||||
Matt Ullman <matt@airraidsirens.com> <blindsight@gamesurge.net>
|
||||
Michael Hazell <michaelhazell@hotmail.com> <Techman-@users.noreply.github.com>
|
||||
Michael Stapelberg <michael@robustirc.net> <stapelberg@users.noreply.github.com>
|
||||
Michael Wobst <wobst.michael@web.de>
|
||||
Michael Wobst <wobst.michael@web.de> <michael@static.163.129.251.148.clients.your-server.de>
|
||||
Michael Wobst <wobst.michael@web.de> <michael@wobst.at>
|
||||
Naram Qashat <cyberbotx@anope.org> <cyberbotx@5417fbe8-f217-4b02-8779-1006273d7864>
|
||||
Naram Qashat <cyberbotx@anope.org> <cyberbotx@cyberbotx.com>
|
||||
Naram Qashat <cyberbotx@anope.org> <Naram Qashat cyberbotx@cyberbotx.com@5417fbe8-f217-4b02-8779-1006273d7864>
|
||||
PeGaSuS <droider.pc@gmail.com>
|
||||
PeGaSuS <droider.pc@gmail.com> <25697531+TehPeGaSuS@users.noreply.github.com>
|
||||
Pieter Bootsma <geniusdex@anope.org> <geniusdex geniusdex@31f1291d-b8d6-0310-a050-a5561fc1590b@5417fbe8-f217-4b02-8779-1006273d7864>
|
||||
Robby <robby@chatbelgie.be> <robby@anope.org>
|
||||
Robby <robby@chatbelgie.be> <robby@chat.be>
|
||||
Robert Scheck <robert@fedoraproject.org> <robert-scheck@users.noreply.github.com>
|
||||
Robin Burchell <w00t@inspircd.org> <rburchell@5417fbe8-f217-4b02-8779-1006273d7864>
|
||||
Robin Burchell <w00t@inspircd.org> <Robin Burchell w00t@inspircd.org@5417fbe8-f217-4b02-8779-1006273d7864>
|
||||
Sadie Powell <sadie@sadiepowell.dev> <petpow@saberuk.com>
|
||||
Sadie Powell <sadie@sadiepowell.dev> <sadie@witchery.services>
|
||||
Sebastian Barfurth <github@afreshmelon.com>
|
||||
Sebastian V. <hal9000@denorastats.org>
|
||||
Sebastian V. <hal9000@denorastats.org> <pimpmylinux@5417fbe8-f217-4b02-8779-1006273d7864>
|
||||
Trystan S. Lee <trystan@nomadirc.net> <trystan trystan@31f1291d-b8d6-0310-a050-a5561fc1590b@5417fbe8-f217-4b02-8779-1006273d7864>
|
||||
Val Lorentz <progval+git@progval.net> <progval+git@progval.net>
|
||||
-294
@@ -1,294 +0,0 @@
|
||||
# This usage of CMake requires at least version 3.20
|
||||
cmake_minimum_required(VERSION 3.20 FATAL_ERROR)
|
||||
|
||||
# Set the project as C++ primarily
|
||||
project(Anope CXX)
|
||||
|
||||
# Force the locale to C for later uses of things like gcc so the messages come up in English, not the user's default language
|
||||
set(ENV{LC_ALL} C)
|
||||
|
||||
# We require C++17 to build
|
||||
set(CMAKE_CXX_EXTENSIONS OFF)
|
||||
set(CMAKE_CXX_STANDARD 17)
|
||||
set(CMAKE_CXX_STANDARD_REQUIRED ON)
|
||||
|
||||
# Put modules in their own folder
|
||||
set_property(GLOBAL PROPERTY USE_FOLDERS ON)
|
||||
|
||||
if(CMAKE_BUILD_TYPE STREQUAL "")
|
||||
message(STATUS "CMAKE_BUILD_TYPE has not been specified; defaulting to Debug")
|
||||
set(CMAKE_BUILD_TYPE "Debug")
|
||||
endif()
|
||||
|
||||
# Include the checking functions used later in this CMakeLists.txt
|
||||
include(CheckFunctionExists)
|
||||
include(CheckTypeSize)
|
||||
include(CheckLibraryExists)
|
||||
include(CheckCXXCompilerFlag)
|
||||
|
||||
if(NOT WIN32)
|
||||
include(FindPkgConfig)
|
||||
endif()
|
||||
|
||||
# If extra include directories were specified, tell cmake about them.
|
||||
if(EXTRA_INCLUDE)
|
||||
include_directories(${EXTRA_INCLUDE})
|
||||
endif()
|
||||
|
||||
# If extra library directories were specified, tell cmake about them.
|
||||
if(EXTRA_LIBS)
|
||||
link_directories(${EXTRA_LIBS})
|
||||
endif()
|
||||
|
||||
# Find gettext
|
||||
find_package(Gettext)
|
||||
find_package(Intl)
|
||||
if(Gettext_FOUND AND Intl_FOUND)
|
||||
set(HAVE_LOCALIZATION ON)
|
||||
include_directories(${Intl_INCLUDE_DIRS})
|
||||
link_libraries(${Intl_LIBRARIES})
|
||||
else()
|
||||
message(STATUS "Unable to find gettext and/or libintl -- read docs/LANGUAGE for how to enable localization")
|
||||
set(HAVE_LOCALIZATION OFF)
|
||||
endif()
|
||||
|
||||
# Use the following directories as includes
|
||||
include_directories(
|
||||
${Anope_BINARY_DIR}/include
|
||||
${Anope_SOURCE_DIR}/include
|
||||
${Anope_SOURCE_DIR}/vendor
|
||||
)
|
||||
|
||||
if(WIN32)
|
||||
# If using Windows, include the windows specific folder for anope_windows.h
|
||||
include_directories(${Anope_SOURCE_DIR}/src/win32)
|
||||
endif()
|
||||
|
||||
# If using Visual Studio, set the C++ flags accordingly
|
||||
if(MSVC)
|
||||
# Set the compile flags to have warnings on the max setting (but disable a few annoying ones), exception handling turned on
|
||||
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} /W4 /wd4100 /wd4127 /wd4250 /wd4251 /wd4267 /wd4275 /wd4355 /wd4706 /wd4800 /wd4996 /EHs")
|
||||
add_definitions(-D_CRT_SECURE_NO_WARNINGS)
|
||||
# Otherwise, we're not using Visual Studio
|
||||
else()
|
||||
# Set the compile flags to have all warnings on (including shadowed variables)
|
||||
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -fvisibility=hidden -fvisibility-inlines-hidden -Wall -Wextra -Wformat=2 -Wmissing-format-attribute -Wpedantic")
|
||||
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wno-format-nonliteral -Wno-format-y2k -Wno-format-zero-length -Wno-date-time -Wno-unused-parameter")
|
||||
endif()
|
||||
|
||||
# If CMake has found that the given system requires a special library for dl* calls, include it with the linker flags
|
||||
if(CMAKE_DL_LIBS)
|
||||
link_libraries(${CMAKE_DL_LIBS})
|
||||
endif()
|
||||
|
||||
# Find the linker flags required for using threads.
|
||||
find_package("Threads" REQUIRED)
|
||||
if(CMAKE_THREAD_LIBS_INIT)
|
||||
link_libraries(${CMAKE_THREAD_LIBS_INIT})
|
||||
endif()
|
||||
|
||||
# On Windows, also link Anope to the memory library and Winsock.
|
||||
if(WIN32)
|
||||
link_libraries("Ws2_32")
|
||||
if(MSVC)
|
||||
link_libraries("win32_memory")
|
||||
endif()
|
||||
endif()
|
||||
|
||||
if(NOT PROGRAM_NAME)
|
||||
set(PROGRAM_NAME anope)
|
||||
endif()
|
||||
|
||||
# If we are not using Visual Studio, we'll run the following checks
|
||||
if(NOT MSVC)
|
||||
# Check if the C++ compiler can accept the -pipe flag, and add it to the compile flags if it works
|
||||
check_cxx_compiler_flag(-pipe HAVE_PIPE_FLAG)
|
||||
# If the flag was accepted, add it to the list of flags
|
||||
if(HAVE_PIPE_FLAG)
|
||||
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -pipe")
|
||||
endif()
|
||||
endif()
|
||||
|
||||
# If DEFUMASK wasn't passed to CMake, set a default depending on if RUNGROUP was passed in or not
|
||||
if(NOT DEFUMASK)
|
||||
if(RUNGROUP)
|
||||
set(DEFUMASK "007")
|
||||
else()
|
||||
set(DEFUMASK "077")
|
||||
endif()
|
||||
endif()
|
||||
|
||||
# Set the DEBUG_BUILD for sysconf.h
|
||||
if(CMAKE_BUILD_TYPE STREQUAL "Debug" OR CMAKE_BUILD_TYPE STREQUAL "RelWithDebInfo")
|
||||
set(CMAKE_EXPORT_COMPILE_COMMANDS ON)
|
||||
set(DEBUG_BUILD TRUE)
|
||||
endif()
|
||||
|
||||
# Check for the existence of the following functions
|
||||
check_function_exists(clock_gettime HAVE_CLOCK_GETTIME)
|
||||
check_function_exists(umask HAVE_UMASK)
|
||||
check_function_exists(epoll_wait HAVE_EPOLL)
|
||||
check_function_exists(poll HAVE_POLL)
|
||||
check_function_exists(kqueue HAVE_KQUEUE)
|
||||
|
||||
# Search for the following programs
|
||||
if(NOT WIN32 AND RUNGROUP)
|
||||
find_program(CHGRP "chgrp" REQUIRED)
|
||||
find_program(CHMOD "chmod" REQUIRED)
|
||||
endif()
|
||||
|
||||
# If a INSTDIR was passed in to CMake, use it as the install prefix, otherwise set the default install prefix to the anope directory under the user's home directory
|
||||
if(INSTDIR)
|
||||
set(CMAKE_INSTALL_PREFIX "${INSTDIR}")
|
||||
elseif(NOT CMAKE_INSTALL_PREFIX)
|
||||
set(CMAKE_INSTALL_PREFIX "$ENV{HOME}/anope-${VERSION_MAJOR}-${VERSION_MINOR}")
|
||||
endif()
|
||||
|
||||
# Set default paths for various directories if not already defined
|
||||
if(NOT BIN_DIR)
|
||||
set(BIN_DIR "bin")
|
||||
endif()
|
||||
if(NOT DATA_DIR)
|
||||
set(DATA_DIR "data")
|
||||
endif()
|
||||
if(NOT DOC_DIR)
|
||||
set(DOC_DIR "doc")
|
||||
endif()
|
||||
if(NOT CONF_DIR)
|
||||
set(CONF_DIR "conf")
|
||||
endif()
|
||||
if(NOT MODULE_DIR)
|
||||
set(MODULE_DIR "modules")
|
||||
endif()
|
||||
if(NOT LOCALE_DIR)
|
||||
set(LOCALE_DIR "locale")
|
||||
endif()
|
||||
if(NOT LOG_DIR)
|
||||
set(LOG_DIR "logs")
|
||||
endif()
|
||||
|
||||
# Version number processing
|
||||
# Find all lines in src/version.sh that start with VERSION_
|
||||
file(STRINGS ${Anope_SOURCE_DIR}/src/version.sh VERSIONS REGEX "^VERSION_")
|
||||
# Iterate through the strings found
|
||||
foreach(VERSION_STR ${VERSIONS})
|
||||
string(REGEX REPLACE "^VERSION_([A-Z]+)=\"?([^\"]*)\"?$" "\\1;\\2" VERSION_OUT ${VERSION_STR})
|
||||
list(LENGTH VERSION_OUT VERSION_LEN)
|
||||
list(GET VERSION_OUT 0 VERSION_TYPE)
|
||||
if(${VERSION_LEN} GREATER 1)
|
||||
list(GET VERSION_OUT 1 VERSION_DATA)
|
||||
set(VERSION_${VERSION_TYPE} ${VERSION_DATA})
|
||||
endif()
|
||||
endforeach()
|
||||
|
||||
# Default build version to 0
|
||||
set(VERSION_BUILD 0)
|
||||
|
||||
# Only change the build number if version.h exists
|
||||
if(EXISTS "${Anope_SOURCE_DIR}/include/version.h")
|
||||
# Attempt to read the build number from include/version.h
|
||||
file(STRINGS ${Anope_SOURCE_DIR}/src/version.sh VERSIONS REGEX "^#define VERSION_BUILD")
|
||||
foreach(VERSION_STR ${VERSIONS})
|
||||
# Get the length of the string
|
||||
string(LENGTH ${VERSION_STR} VERSION_LEN)
|
||||
# Subtract 22 from the string's length
|
||||
math(EXPR VERSION_NUM_LEN "${VERSION_LEN} - 22")
|
||||
# Extract the value from the string
|
||||
string(SUBSTRING ${VERSION_STR} 22 ${VERSION_NUM_LEN} VERSION)
|
||||
# Set VERSION_BUILD correctly
|
||||
set(VERSION_BUILD ${VERSION})
|
||||
endforeach()
|
||||
endif()
|
||||
|
||||
# Set the version variables based on what was found above
|
||||
set(VERSION_COMMA "${VERSION_MAJOR},${VERSION_MINOR},${VERSION_PATCH},${VERSION_BUILD}")
|
||||
set(VERSION_DOTTED_NOBUILD "${VERSION_MAJOR}.${VERSION_MINOR}.${VERSION_PATCH}")
|
||||
set(VERSION_DOTTED "${VERSION_DOTTED_NOBUILD}.${VERSION_BUILD}")
|
||||
set(VERSION_FULL "${VERSION_DOTTED}${VERSION_EXTRA}")
|
||||
set(VERSION_FULL_NOBUILD "${VERSION_DOTTED_NOBUILD}${VERSION_EXTRA}")
|
||||
|
||||
# Only do the following for Windows
|
||||
if(WIN32)
|
||||
# Generate the win32.rc file using the above variables
|
||||
configure_file(${Anope_SOURCE_DIR}/src/win32/win32.rc.cmake ${Anope_BINARY_DIR}/src/win32/win32.rc)
|
||||
endif()
|
||||
|
||||
# Get the filename of the Anope binary, to use later
|
||||
set(SERVICES_BINARY "$<TARGET_FILE:${PROGRAM_NAME}>")
|
||||
cmake_path(GET SERVICES_BINARY FILENAME SERVICES_BINARY)
|
||||
|
||||
# At install time, create the following additional directories
|
||||
file(REAL_PATH ${DATA_DIR} ABSOLUTE_DATA_DIR BASE_DIRECTORY ${CMAKE_INSTALL_PREFIX})
|
||||
file(REAL_PATH ${LOG_DIR} ABSOLUTE_LOG_DIR BASE_DIRECTORY ${CMAKE_INSTALL_PREFIX})
|
||||
install(CODE "file(MAKE_DIRECTORY \"\$ENV{DESTDIR}${ABSOLUTE_DATA_DIR}/backups\")")
|
||||
install(CODE "file(MAKE_DIRECTORY \"\$ENV{DESTDIR}${ABSOLUTE_LOG_DIR}\")")
|
||||
if(WIN32)
|
||||
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}${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
|
||||
if(WIN32)
|
||||
install(FILES ${Anope_SOURCE_DIR}/src/win32/anope.bat
|
||||
DESTINATION ${BIN_DIR}
|
||||
)
|
||||
endif()
|
||||
|
||||
file(REAL_PATH ${MODULE_DIR} ABSOLUTE_MODULE_DIR BASE_DIRECTORY ${CMAKE_INSTALL_PREFIX})
|
||||
install(CODE "file(REMOVE_RECURSE \"$ENV{DESTDIR}${ABSOLUTE_MODULE_DIR}\")")
|
||||
|
||||
# Only process the CPack section if we have CPack
|
||||
if(EXISTS "${CMAKE_ROOT}/Modules/CPack.cmake")
|
||||
# Various options for CPack
|
||||
set(CPACK_PACKAGE_NAME "Anope IRC Services")
|
||||
set(CPACK_PACKAGE_VENDOR "Anope Team")
|
||||
set(CPACK_PACKAGE_VERSION_MAJOR ${VERSION_MAJOR})
|
||||
set(CPACK_PACKAGE_VERSION_MINOR ${VERSION_MINOR})
|
||||
set(CPACK_PACKAGE_VERSION_PATCH "${VERSION_PATCH}${VERSION_EXTRA}")
|
||||
set(CPACK_PACKAGE_FILE_NAME "anope-${VERSION_FULL_NOBUILD}")
|
||||
set(CPACK_RESOURCE_FILE_LICENSE "${Anope_SOURCE_DIR}/docs/LICENSE.txt")
|
||||
# The following doesn't actually do anything. :(
|
||||
#set(CPACK_RESOURCE_FILE_README "${Anope_SOURCE_DIR}/docs/README")
|
||||
# The following is primarily for NSIS
|
||||
if(WIN32)
|
||||
# By default, do not warn when built on machines using only VS Express:
|
||||
IF(NOT DEFINED CMAKE_INSTALL_SYSTEM_RUNTIME_LIBS_NO_WARNINGS)
|
||||
SET(CMAKE_INSTALL_SYSTEM_RUNTIME_LIBS_NO_WARNINGS ON)
|
||||
ENDIF(NOT DEFINED CMAKE_INSTALL_SYSTEM_RUNTIME_LIBS_NO_WARNINGS)
|
||||
# Also for Windows, include installing the MSVCRT library
|
||||
include(InstallRequiredSystemLibraries)
|
||||
set(CPACK_GENERATOR "NSIS")
|
||||
set(CPACK_PACKAGE_INSTALL_DIRECTORY "Anope")
|
||||
set(CPACK_PACKAGE_EXECUTABLES "")
|
||||
set(CPACK_NSIS_MENU_LINKS
|
||||
"bin\\\\${SERVICES_BINARY}" "Anope IRC Services"
|
||||
"bin\\\\anope.bat\\\" \\\"-debug -nofork" "Anope IRC Services (Debug and Window Logging)"
|
||||
"bin\\\\anope.bat\\\" \\\"-nofork" "Anope IRC Services (Window Logging)"
|
||||
"bin\\\\anope.bat\\\" \\\"-nothird" "Anope IRC Services (No Third Party Modules)"
|
||||
"https://www.anope.org/" "Anope Web Site"
|
||||
)
|
||||
# The following doesn't work, but a bug report has been filed about it
|
||||
#set(CPACK_CREATE_DESKTOP_LINK_${SERVICES_BINARY} TRUE)
|
||||
set(CPACK_NSIS_MUI_ICON "${Anope_SOURCE_DIR}/src\\\\win32\\\\anope-icon.ico")
|
||||
set(CPACK_NSIS_MUI_UNIICON "${Anope_SOURCE_DIR}/src\\\\win32\\\\anope-icon.ico")
|
||||
set(CPACK_NSIS_INSTALLED_ICON_NAME "${SERVICES_BINARY}")
|
||||
set(CPACK_NSIS_URL_INFO_ABOUT "https://www.anope.org/")
|
||||
set(CPACK_NSIS_COMPRESSOR "/SOLID lzma")
|
||||
endif()
|
||||
set(CPACK_SOURCE_PACKAGE_FILE_NAME "anope-${VERSION_FULL_NOBUILD}-source")
|
||||
set(CPACK_SOURCE_GENERATOR "TGZ")
|
||||
set(CPACK_MONOLITHIC_INSTALL TRUE)
|
||||
include(CPack)
|
||||
endif()
|
||||
|
||||
# Go into the following directories and run their CMakeLists.txt as well
|
||||
add_subdirectory(data)
|
||||
add_subdirectory(docs)
|
||||
add_subdirectory(language)
|
||||
add_subdirectory(src)
|
||||
add_subdirectory(modules)
|
||||
add_subdirectory(include)
|
||||
+842
@@ -0,0 +1,842 @@
|
||||
Anope Version 1.8 SVN
|
||||
---------------------
|
||||
|
||||
Anope Version 1.8.2
|
||||
-------------------
|
||||
** ADDED CONFIGURATION DIRECTIVES **
|
||||
|
||||
** MODIFIED CONFIGURATION DIRECTIVES **
|
||||
|
||||
** DELETED CONFIGURATION DIRECTIVES **
|
||||
|
||||
Anope Version 1.8.1
|
||||
-------------------
|
||||
** ADDED CONFIGURATION DIRECTIVES **
|
||||
|
||||
** MODIFIED CONFIGURATION DIRECTIVES **
|
||||
# IRCDModule <module_name> [REQUIRED]
|
||||
# The ircd protocol module should be used when connecting anope to your
|
||||
# chosen IRCD. This should be one of the following options, or a file
|
||||
# provided by your IRCD author.
|
||||
#
|
||||
# Bahamut 1.4.27 [or later] - "bahamut"
|
||||
# Charybdis 1.0 [or later] - "charybdis"
|
||||
# DreamForge 4.6.7 - "dreamforge"
|
||||
# Hybrid IRCd 7.0 [experimental] - "hybrid"
|
||||
# InspIRCd 1.1 [beta 8 or later] - "inspircd11"
|
||||
# Plexus 3.0 [or later] - "plexus3"
|
||||
# Plexus 2.0 [or later] - "plexus2"
|
||||
# PTLink 6.15.0 [experimental] - "ptlink"
|
||||
# RageIRCd 2.0.x - "rageircd"
|
||||
# Ratbox 2.0.6 [or later] - "ratbox"
|
||||
# ShadowIRCD 4.0x [beta 7 or later] - "shadowircd"
|
||||
# Solid IRCD 3.4.x [3.4.6 or later] - "solidircd"
|
||||
# UltimateIRCd 3.0.0 [or later] - "ultimate3"
|
||||
# UltimateIRCd 2.8.2 [or later] - "ultimate2"
|
||||
# Unreal 3.2 [beta-19 or later] - "unreal32"
|
||||
# Unreal 3.1.1 [or later] - "unreal31"
|
||||
# ViagraIRCd 1.3.x [or later] - "viagra"
|
||||
#
|
||||
|
||||
#IRCDModule "unreal32"
|
||||
|
||||
|
||||
# SuperAdmin [OPTIONAL]
|
||||
# When enabled, Services Roots will be able to use SuperAdmin [ON|OFF]
|
||||
# which will temporarily grant them extra privileges, such as being a
|
||||
# founder of _all_ channels, ability to adjust another users modes etc..
|
||||
|
||||
#SuperAdmin
|
||||
|
||||
|
||||
# UnRestrictSAdmin [OPTIONAL]
|
||||
# On many ircd Anope removes the umode of +a from users whom are not
|
||||
# Service Admin in Anope. This mode is NOT used by Anope for any form
|
||||
# of access. Thus this option allows them to keep the mode without having
|
||||
# to be a Service Admin in Anope
|
||||
#UnRestrictSAdmin
|
||||
|
||||
** DELETED CONFIGURATION DIRECTIVES **
|
||||
|
||||
Anope Version 1.8.0
|
||||
-------------------
|
||||
** ADDED CONFIGURATION DIRECTIVES **
|
||||
|
||||
** MODIFIED CONFIGURATION DIRECTIVES **
|
||||
|
||||
** DELETED CONFIGURATION DIRECTIVES **
|
||||
|
||||
|
||||
Anope Version 1.7.24
|
||||
--------------------
|
||||
** ADDED CONFIGURATION DIRECTIVES **
|
||||
|
||||
** MODIFIED CONFIGURATION DIRECTIVES **
|
||||
|
||||
** DELETED CONFIGURATION DIRECTIVES **
|
||||
|
||||
Anope Version 1.7.23b
|
||||
--------------------
|
||||
** ADDED CONFIGURATION DIRECTIVES **
|
||||
|
||||
** MODIFIED CONFIGURATION DIRECTIVES **
|
||||
|
||||
** DELETED CONFIGURATION DIRECTIVES **
|
||||
|
||||
Anope Version 1.7.23
|
||||
--------------------
|
||||
** ADDED CONFIGURATION DIRECTIVES **
|
||||
# OSIgnoreDBName [OPTIONAL]
|
||||
# Module: os_ignore_db
|
||||
#
|
||||
# Use the given filename as database for services ignores.
|
||||
# If not given, the default of "os_ignore.db" will be used.
|
||||
#
|
||||
#OSIgnoreDBName "os_ignore.db"
|
||||
|
||||
** MODIFIED CONFIGURATION DIRECTIVES **
|
||||
|
||||
** DELETED CONFIGURATION DIRECTIVES **
|
||||
|
||||
Anope Version 1.7.22
|
||||
--------------------
|
||||
** ADDED CONFIGURATION DIRECTIVES **
|
||||
|
||||
** MODIFIED CONFIGURATION DIRECTIVES **
|
||||
# BotCoreModules <list> [RECOMMENDED]
|
||||
# These modules will be loaded as part of BotServ's core.
|
||||
# It is not recommended you change these settings unless you are
|
||||
# sure you understand exactly what it is you are doing.
|
||||
BotCoreModules "bs_help bs_botlist bs_assign bs_set bs_kick bs_badwords bs_act bs_info bs_say bs_unassign bs_bot bs_fantasy bs_fantasy_kick bs_fantasy_kickban bs_fantasy_owner bs_fantasy_seen"
|
||||
|
||||
** DELETED CONFIGURATION DIRECTIVES **
|
||||
|
||||
Anope Version 1.7.21
|
||||
--------------------
|
||||
** ADDED CONFIGURATION DIRECTIVES **
|
||||
|
||||
** MODIFIED CONFIGURATION DIRECTIVES **
|
||||
|
||||
** DELETED CONFIGURATION DIRECTIVES **
|
||||
|
||||
Anope Version 1.7.20
|
||||
--------------------
|
||||
** ADDED CONFIGURATION DIRECTIVES **
|
||||
|
||||
** MODIFIED CONFIGURATION DIRECTIVES **
|
||||
|
||||
** DELETED CONFIGURATION DIRECTIVES **
|
||||
|
||||
Anope Version 1.7.19
|
||||
--------------------
|
||||
** ADDED CONFIGURATION DIRECTIVES **
|
||||
|
||||
** MODIFIED CONFIGURATION DIRECTIVES **
|
||||
|
||||
** DELETED CONFIGURATION DIRECTIVES **
|
||||
|
||||
Anope Version 1.7.18
|
||||
--------------------
|
||||
** ADDED CONFIGURATION DIRECTIVES **
|
||||
###########################################################################
|
||||
#
|
||||
# Encryption settings
|
||||
#
|
||||
###########################################################################
|
||||
|
||||
# EncModule <module_name> [REQUIRED]
|
||||
# The encryption module to use when dealing with passwords.
|
||||
# This determines how the passwords are stored in the databases,
|
||||
# and does not add any security as far as transmitting passwords over
|
||||
# the network goes.
|
||||
# enc_none provides no password encryption, storing the password in
|
||||
# plain text, this is the most versiatle as passwords can easily be
|
||||
# recovered.
|
||||
#
|
||||
# NOTE: users of anope's previous (broken) md5 implementation should
|
||||
# select the enc_old option, or things may break.
|
||||
#
|
||||
# NOTE2: Some of these encryption methods are one-way (md5, sha1, old)
|
||||
# meaning that you can NOT retrive the passwords in plain text once
|
||||
# encrypted.
|
||||
#
|
||||
# Plain Text - enc_none
|
||||
# Previous (broken) MD5 - enc_old
|
||||
# MD5 - enc_md5
|
||||
# SHA1 - enc_sha1
|
||||
#
|
||||
|
||||
EncModule "enc_none"
|
||||
|
||||
** MODIFIED CONFIGURATION DIRECTIVES **
|
||||
|
||||
** DELETED CONFIGURATION DIRECTIVES **
|
||||
|
||||
Anope Version 1.7.17
|
||||
--------------------
|
||||
** ADDED CONFIGURATION DIRECTIVES **
|
||||
|
||||
** MODIFIED CONFIGURATION DIRECTIVES **
|
||||
|
||||
** DELETED CONFIGURATION DIRECTIVES **
|
||||
|
||||
Anope Version 1.7.16
|
||||
--------------------
|
||||
** ADDED CONFIGURATION DIRECTIVES **
|
||||
|
||||
** MODIFIED CONFIGURATION DIRECTIVES **
|
||||
|
||||
** DELETED CONFIGURATION DIRECTIVES **
|
||||
|
||||
Anope Version 1.7.15
|
||||
--------------------
|
||||
** ADDED CONFIGURATION DIRECTIVES **
|
||||
# UseStrictPrivMsg [OPTIONAL]
|
||||
# Using this directive will force services to only respond to privmsgs
|
||||
# addressed to Nick@ServerName - e.g. NickServ@localhost.net.
|
||||
# This should be used on conjunction with ircd aliases.
|
||||
#
|
||||
|
||||
#UseStrictPrivMsg
|
||||
|
||||
# NSResendDelay <time> [RECOMMENDED]
|
||||
# Sets the minimum length of time between consecutive uses of the
|
||||
# RESEND command. If not given, this restriction is disabled (note
|
||||
# that this allows "resend flooding" or "mail bombing").
|
||||
|
||||
NSResendDelay 90s
|
||||
|
||||
NSDefAutoop
|
||||
|
||||
** MODIFIED CONFIGURATION DIRECTIVES **
|
||||
ModuleDelayedAutoload "cs_appendtopic cs_enforce ns_maxemail os_info hs_request"
|
||||
|
||||
# LimitSessions [OPTIONAL]
|
||||
# Enables session limiting. Session limiting prevents users from
|
||||
# connecting more than a certain number of times from the same host at the
|
||||
# same time - thus preventing most types of cloning. Once a host reaches
|
||||
# it's session limit, all clients attempting to connect from that host
|
||||
# will be killed. Exceptions to the default session limit, which are based
|
||||
# on host names, can be defined via the exception list. It should be noted
|
||||
# that session limiting, along with a large exception list, can degrade
|
||||
# services' performance. See the source and comments in sessions.c and the
|
||||
# online help for more information about session limiting.
|
||||
#
|
||||
# NOTE: This option is not available when STREAMLINED is defined in
|
||||
# the Makefile.
|
||||
|
||||
LimitSessions
|
||||
|
||||
** DELETED CONFIGURATION DIRECTIVES **
|
||||
# NSAutoOPDBName [OPTIONAL]
|
||||
# Module: ns_noop
|
||||
#
|
||||
# Use the given filename as database for the autoop list. If not given,
|
||||
# the default of "autoop.db" will be used.
|
||||
#
|
||||
#NSAutoOPDBName "autoop.db"
|
||||
|
||||
# KillClonesAkillExpire <time> [REQUIRED]
|
||||
# Sets the expiry time for autokills added for hosts that have been
|
||||
# killed using the KILLCLONES command.
|
||||
|
||||
KillClonesAkillExpire 30m
|
||||
|
||||
# CheckClones <minusers> <maxdelay> <warningdelay> [DEPRECATED]
|
||||
# Causes Services to try and detect "clones" connecting to the network.
|
||||
# A WALLOPS (or GOPER, if supported on the IRC server) will be sent if
|
||||
# Services thinks it has found clones.
|
||||
#
|
||||
# This feature has been superseded by Session Limiting.
|
||||
#
|
||||
# <minusers> sets the minimum number of users which must successively
|
||||
# connect to the network before Services will send a clone warning.
|
||||
#
|
||||
# <maxdelay> sets the maximum time that can elapse between successive
|
||||
# users before Services decides they are not clones.
|
||||
#
|
||||
# <warningdelay> sets the minimum time between clone warnings for
|
||||
# clones from the same host.
|
||||
#
|
||||
# NOTE: This option is not available when STREAMLINED is defined in
|
||||
# the Makefile.
|
||||
|
||||
# CheckClones 5 10s 30s
|
||||
|
||||
# KillClones [DISCOURAGED] [DEPRECATED]
|
||||
# Causes Services to kill users which trigger the clone warnings. (If
|
||||
# CheckClones is disabled, this will have no effect.)
|
||||
#
|
||||
# This feature has been superceded by Session Limiting.
|
||||
#
|
||||
# BEWARE! The clone checking code is easily fooled; it can be
|
||||
# triggered falsely under many conditions, for example:
|
||||
#
|
||||
# - Multiple users connecting from a shell machine.
|
||||
#
|
||||
# - A single user repeatedly connecting and disconnecting.
|
||||
#
|
||||
# Be very sure you know what you're doing before you even think about
|
||||
# enabling this option, and remember that Services comes with no
|
||||
# warranty.
|
||||
#
|
||||
# If that wasn't enough discouragement:
|
||||
#
|
||||
# ***** DO NOT ENABLE THIS OPTION! *****
|
||||
#
|
||||
# NOTE: This option is not available when STREAMLINED is defined in
|
||||
# the Makefile.
|
||||
|
||||
#KillClones
|
||||
|
||||
Anope Version 1.7.13
|
||||
--------------------
|
||||
** ADDED CONFIGURATION DIRECTIVES **
|
||||
|
||||
** MODIFIED CONFIGURATION DIRECTIVES **
|
||||
|
||||
** DELETED CONFIGURATION DIRECTIVES **
|
||||
|
||||
Anope Version 1.7.12
|
||||
--------------------
|
||||
** ADDED CONFIGURATION DIRECTIVES **
|
||||
|
||||
# BSFantasyCharacter [REQUIRED]
|
||||
# This option allows you to change the default prefix for fantasy
|
||||
# commands in channels. This character will have to be prepended to all
|
||||
# fantasy commands. If you choose "!" (the default), fantasy commands
|
||||
# will, for example, be "!kick", "!op", etc.
|
||||
|
||||
BSFantasyCharacter "!"
|
||||
|
||||
** MODIFIED CONFIGURATION DIRECTIVES **
|
||||
|
||||
** DELETED CONFIGURATION DIRECTIVES **
|
||||
|
||||
Anope Version 1.7.11
|
||||
--------------------
|
||||
** ADDED CONFIGURATION DIRECTIVES **
|
||||
|
||||
# NickLen [REQUIRED]
|
||||
# Set this to the maximum allowed nick length on your network. Anope does
|
||||
# not support values larger than 31, so setting them makes no sense. Be
|
||||
# sure to set this correctly, as setting this wrong can result in services
|
||||
# being disconnected from the network.
|
||||
|
||||
NickLen 31
|
||||
|
||||
** MODIFIED CONFIGURATION DIRECTIVES **
|
||||
# UserKey1|2|3 <value> [RECOMMENDED]
|
||||
#
|
||||
# These keys are required to initiate the random number generator. These
|
||||
# numbers MUST be random as you want your passcodes to be random. Don't
|
||||
# give these keys to anyone! Keep them private!
|
||||
#
|
||||
# *** NOTE ***
|
||||
# If you don't enable these, or keep their default values, any talented
|
||||
# programmer would be able to easily "guess" random strings used to mask
|
||||
# information. Be safe, and come up with three different 7 digit numbers
|
||||
|
||||
#UserKey1 9866235
|
||||
#UserKey2 8362013
|
||||
#UserKey3 2362899
|
||||
|
||||
** DELETED CONFIGURATION DIRECTIVES **
|
||||
|
||||
Anope Version 1.7.10
|
||||
--------------------
|
||||
** ADDED CONFIGURATION DIRECTIVES **
|
||||
|
||||
** MODIFIED CONFIGURATION DIRECTIVES **
|
||||
|
||||
** DELETED CONFIGURATION DIRECTIVES **
|
||||
|
||||
Anope Version 1.7.9
|
||||
-------------------
|
||||
** ADDED CONFIGURATION DIRECTIVES **
|
||||
# IRCDModule <module_name> [REQUIRED]
|
||||
# The ircd protocol module should be used when connecting anope to your
|
||||
# chosen IRCD. This should be one of the following options, or a file
|
||||
# provided by your IRCD author.
|
||||
#
|
||||
# Bahamut 1.4.27 [or later] - "bahamut"
|
||||
# DreamForge 4.6.7 - "dreamforge"
|
||||
# Hybrid IRCd 7.0 [experimental] - "hybrid"
|
||||
# InspIRCd 1.0 Beta 5 - "inspircd"
|
||||
# InspIRCd module is provided by Brain <brain@inspircd.org>
|
||||
# Plexus 2.0 [or later] - "plexus"
|
||||
# PTLink 6.15.0 [experimental] - "ptlink"
|
||||
# RageIRCd 2.0.0 [beta-6 of later] - "rageircd"
|
||||
# Ratbox 2.0.6 [or later] - "ratbox"
|
||||
# ShadowIRCD 4.0x [beta 7 or later] - "shadowircd"
|
||||
# Solid IRCD 3.4.x [3.4.6 or later] - "solidircd"
|
||||
# UltimateIRCd 3.0.0 [or later] - "ultimate3"
|
||||
# UltimateIRCd 2.8.2 [or later] - "ultimate2"
|
||||
# Unreal 3.2 [beta-19 or later] - "unreal32"
|
||||
# Unreal 3.1.1 [or later] - "unreal31"
|
||||
# ViagraIRCd 1.3.x [or later] - "viagra"
|
||||
#
|
||||
|
||||
#IRCDModule "unreal32"
|
||||
|
||||
# HostCoreModules <list> [RECOMMENDED]
|
||||
# These modules will be loaded as part of HostServ's core.
|
||||
# It is not recommended you change these settings unless you are
|
||||
# sure you understand exactly what it is you are doing.
|
||||
HostCoreModules "hs_help hs_on hs_off hs_group hs_list hs_set hs_setall hs_del hs_delall"
|
||||
|
||||
# MemoCoreModules <list> [RECOMMENDED]
|
||||
# These modules will be loaded as part of MemoServ's core.
|
||||
# It is not recommended you change these settings unless you are
|
||||
# sure you understand exactly what it is you are doing.
|
||||
MemoCoreModules "ms_send ms_cancel ms_list ms_read ms_del ms_set ms_info ms_rsend ms_check ms_staff ms_sendall ms_help"
|
||||
|
||||
# HelpCoreModules <list> [RECOMMENDED]
|
||||
# These modules will be loaded as part of HelpServ's core.
|
||||
# It is not recommended you change these settings unless you are
|
||||
# sure you understand exactly what it is you are doing.
|
||||
HelpCoreModules "he_help"
|
||||
|
||||
# BotCoreModules <list> [RECOMMENDED]
|
||||
# These modules will be loaded as part of BotServ's core.
|
||||
# It is not recommended you change these settings unless you are
|
||||
# sure you understand exactly what it is you are doing.
|
||||
BotCoreModules "bs_help bs_botlist bs_assign bs_set bs_kick bs_badwords bs_act bs_info bs_say bs_unassign bs_bot bs_fantasy bs_fantasy_kick bs_fantasy_kickban bs_fantasy_owner bs_fantasy_seen bs_fantasy_unban"
|
||||
|
||||
# OperCoreModules <list> [RECOMMENDED]
|
||||
# These modules will be loaded as part of OperServ's core.
|
||||
# It is not recommended you change these settings unless you are
|
||||
# sure you understand exactly what it is you are doing.
|
||||
OperCoreModules "os_help os_global os_stats os_oper os_admin os_staff os_mode os_kick os_clearmodes os_killclones os_akill os_sgline os_sqline os_szline os_chanlist os_userlist os_logonnews os_randomnews os_opernews os_session os_noop os_jupe os_ignore os_set os_reload os_update os_restart os_quit os_shutdown os_defcon os_chankill os_svsnick os_oline os_umode os_modload os_modunload os_modlist os_modinfo"
|
||||
|
||||
# NickCoreModules <list> [RECOMMENDED]
|
||||
# These modules will be loaded as part of NickServ's core.
|
||||
# It is not recommended you change these settings unless you are
|
||||
# sure you understand exactly what it is you are doing.
|
||||
NickCoreModules "ns_help ns_register ns_group ns_identify ns_access ns_set ns_drop ns_recover ns_release ns_sendpass ns_ghost ns_alist ns_info ns_list ns_logout ns_status ns_update ns_getpass ns_getemail ns_forbid ns_suspend"
|
||||
|
||||
# ChanCoreModules <list> [RECOMMENDED]
|
||||
# These modules will be loaded as part of ChanServ's core.
|
||||
# It is not recommended you change these settings unless you are
|
||||
# sure you understand exactly what it is you are doing.
|
||||
ChanCoreModules "cs_help cs_register cs_identify cs_set cs_xop cs_access cs_akick cs_drop cs_sendpass cs_ban cs_clear cs_modes cs_getkey cs_invite cs_kick cs_list cs_logout cs_topic cs_info cs_getpass cs_forbid cs_suspend cs_status"
|
||||
|
||||
# OSOpersOnly [RECOMMENDED]
|
||||
# If this is defined, only IRC Operators will be permitted to use
|
||||
# OperServ, regardless of module based command access restrictions.
|
||||
|
||||
OSOpersOnly
|
||||
|
||||
# NSEmailMax [OPTIONAL]
|
||||
# Module: ns_maxemail
|
||||
#
|
||||
# Limit the amount of registrations with the same email address to the
|
||||
# amount given here. If set to 0 or left commented, there will be no limit
|
||||
# enforced when registering new accounts or using /msg NickServ SET EMAIL.
|
||||
#
|
||||
#NSEmailMax 1
|
||||
|
||||
# NSAutoOPDBName [OPTIONAL]
|
||||
# Module: ns_noop
|
||||
#
|
||||
# Use the given filename as database for the autoop list. If not given,
|
||||
# the default of "autoop.db" will be used.
|
||||
#
|
||||
#NSAutoOPDBName "autoop.db"
|
||||
|
||||
# OSInfoDBName [OPTIONAL]
|
||||
# Module: os_info
|
||||
#
|
||||
# Use the given filename as database for the oper information lines.
|
||||
# If not given, the default of "os_info.db" will be used.
|
||||
#
|
||||
#OSInfoDBName "os_info.db"
|
||||
|
||||
** MODIFIED CONFIGURATION DIRECTIVES **
|
||||
|
||||
# UserKey1|2|3 <value> [REQUIRED]
|
||||
#
|
||||
# These keys are required to initiate the random number generator. These
|
||||
# numbers MUST be random as you want your passcodes to be random. Don't
|
||||
# give these keys to no anyone! Keep them private!
|
||||
# For those pple who don't understand what to do here: Just pick three
|
||||
# _different_ _random_ numbers with about 6 or 7 digits and put them here.
|
||||
# If the keys don't work, they might be too long or you forgot to remove
|
||||
# the # in front of them. Example:
|
||||
# UserKey1 9866235
|
||||
|
||||
# UserKey1 <your_first_random_number_here>
|
||||
# UserKey2 <your_second_random_number_here>
|
||||
# UserKey3 <you_third_random_number_here>
|
||||
|
||||
# Numeric [OPTIONAL]
|
||||
# Many ircd identify themselves with a Numeric ID when using this option
|
||||
# consult your ircds documentation before using this.
|
||||
#Numeric "3AX"
|
||||
#Numeric "4"
|
||||
|
||||
# ModuleDelayedAutoload [OPTIONAL]
|
||||
#
|
||||
# When compiled with module support, this contains a space separated list
|
||||
# of modules to automaticaly load when services are ready for new clients.
|
||||
# e.g. new pesudo clients such as CatServ :-) *meow*
|
||||
# By default a number of modules that we found worth adding by default are
|
||||
# loaded. Feel free to change this if you want to add more, or remove some
|
||||
# from the list.
|
||||
#
|
||||
ModuleDelayedAutoload "cs_appendtopic cs_enforce ns_maxemail ns_noop os_info"
|
||||
|
||||
** DELETED CONFIGURATION DIRECTIVES **
|
||||
|
||||
###########################################################################
|
||||
#
|
||||
# Proxy detection
|
||||
#
|
||||
###########################################################################
|
||||
|
||||
# Note: if ProxyDetect is not set, all parameters after it in this section
|
||||
# are optional.
|
||||
|
||||
# ProxyDetect [OPTIONAL]
|
||||
#
|
||||
# Enables insecure proxy detection. Services will automatically
|
||||
# scan each incoming user and akill those that use insecure proxy.
|
||||
#
|
||||
# Anope currently supports detection of Wingate (port 23), SOCKS4/5
|
||||
# (port 1080), and HTTP proxy (ports 3128 and 8080). It uses the
|
||||
# protocol of each proxy type to connect to an IRC server, it does
|
||||
# not only check if the port is open (so your users may still have
|
||||
# an open telnet server on their port 23 for example).
|
||||
#
|
||||
# WARNING: You should get the authorization of the administrator of
|
||||
# the computer which runs the proxy detector before enabling it; not
|
||||
# all administrators will accept it. Also note that in certain
|
||||
# countries, port scanning is prohibited.
|
||||
#
|
||||
# This feature requires threading support to be compiled into Anope.
|
||||
|
||||
#ProxyDetect
|
||||
|
||||
# ProxyThreads <number> [REQUIRED]
|
||||
#
|
||||
# Sets the number of threads Services will launch when starting. Each
|
||||
# thread will have the responsibility to scan queued hostname for
|
||||
# proxies.
|
||||
#
|
||||
# This value must be set depending of the number of users you have
|
||||
# on your network. The more threads are used, the more simultaneous
|
||||
# checks can be done. Remember however, that threads are
|
||||
# resource-consuming.
|
||||
#
|
||||
# WARNING: On Linux, each thread takes a background process, and there
|
||||
# is an additional process used for thread management; this is a problem
|
||||
# if you are limited in the number of background process you can use
|
||||
# (on a paid shell for example).
|
||||
|
||||
ProxyThreads 5
|
||||
|
||||
# ProxyMessage... <message> [RECOMMENDED]
|
||||
#
|
||||
# Sets the notices that will be sent out to users before Services
|
||||
# scan them for proxy. You may not use all of them, but just as much as
|
||||
# necessary.
|
||||
|
||||
ProxyMessage1 "I will now detect if you're using an insecure proxy."
|
||||
ProxyMessage2 "If you see a connection on port 23, 1080, 3128 or 8080 from"
|
||||
ProxyMessage3 "my.box.net, please disregard it, as it is the detector in action."
|
||||
ProxyMessage4 "See http://proxy.myirc.net/ for information about our proxy policy."
|
||||
#ProxyMessage5 "Enter"
|
||||
#ProxyMessage6 "whatever"
|
||||
#ProxyMessage7 "you want"
|
||||
#ProxyMessage8 "here."
|
||||
|
||||
# ProxyCheck... [OPTIONAL]
|
||||
#
|
||||
# Determines what types of proxy Anope will try to find (respectively
|
||||
# Wingate on port 23, SOCKS4 on port 1080, SOCKS5 on port 1080, HTTP
|
||||
# proxy on port 3128, HTTP proxy on port 8080 and HTTP proxy on port
|
||||
# 80).
|
||||
|
||||
ProxyCheckWingate
|
||||
ProxyCheckSocks4
|
||||
ProxyCheckSocks5
|
||||
ProxyCheckHTTP1
|
||||
ProxyCheckHTTP2
|
||||
ProxyCheckHTTP3
|
||||
|
||||
# ProxyTimeout <time> [REQUIRED]
|
||||
|
||||
# Sets the maximum length of time we allow a connect/read operation to
|
||||
# take. If you set this value too high, your threads may hang on a single
|
||||
# check for a very long time. The best is to try different values
|
||||
# and see which one is the more efficient for your network.
|
||||
|
||||
ProxyTimeout 15s
|
||||
|
||||
# ProxyTestServer <ip> <port> [REQUIRED]
|
||||
#
|
||||
# Sets the *IP* and port of the IRC server to use as a target when
|
||||
# testing users for proxy.
|
||||
|
||||
ProxyTestServer "1.2.3.4" 6667
|
||||
|
||||
# ProxyExpire <time> [RECOMMENDED]
|
||||
#
|
||||
# Sets the length of time before a proxy host cache entry expires, if
|
||||
# not used. If this is not set the default time is 2 days.
|
||||
|
||||
ProxyExpire 30d
|
||||
|
||||
# ProxyCacheExpire <time> [REQUIRED]
|
||||
#
|
||||
# Sets the length of time before a normal host cache entry expires, if
|
||||
# not used. This cannot be set to 0d.
|
||||
#
|
||||
# Every non-proxy hosts will be stored in cache (to avoid too many scans
|
||||
# to the same host), so you should set this enough low to not fill your
|
||||
# memory, especially on large networks.
|
||||
|
||||
ProxyCacheExpire 1d
|
||||
|
||||
# ProxyAkillReason <reason> [REQUIRED]
|
||||
#
|
||||
# Sets the reason that will be used to AKILL an user from the network
|
||||
# if a proxy is detected.
|
||||
|
||||
ProxyAkillReason "You're using an insecure proxy. See http://proxy.myirc.net/config.html for information about how to config your proxy in a safe manner."
|
||||
|
||||
# WallProxy [OPTIONAL]
|
||||
#
|
||||
# Sends a WALLOPS/GLOBOPS when an user using an insecure proxy is being
|
||||
# AKILLed.
|
||||
|
||||
WallProxy
|
||||
|
||||
# ProxyMax <number> [REQUIRED]
|
||||
#
|
||||
# Sets the maximum proxy cache entries that can be displayed in a single
|
||||
# call to OperServ CACHE.
|
||||
|
||||
ProxyMax 50
|
||||
|
||||
|
||||
Anope Version 1.7.8
|
||||
-------------------
|
||||
** ADDED CONFIGURATION DIRECTIVES **
|
||||
|
||||
# UseTS6 [OPTIONAL]
|
||||
#
|
||||
# Modern hybrid ircd like Ratbox 2.0.x support a protocol called TS6.
|
||||
# However this protocol is optional thus our default support is for without
|
||||
# TS6, if you want to take advantage of TS6, enable this option.
|
||||
|
||||
#UseTS6
|
||||
|
||||
** MODIFIED CONFIGURATION DIRECTIVES **
|
||||
|
||||
** DELETED CONFIGURATION DIRECTIVES **
|
||||
|
||||
Anope Version 1.7.7
|
||||
-------------------
|
||||
** ADDED CONFIGURATION DIRECTIVES **
|
||||
|
||||
# NSAddAccessOnReg [OPTIONAL]
|
||||
#
|
||||
# When enabled, services will add the usermask of registering users to the
|
||||
# access list of their newly created account. If you disable this, users
|
||||
# will always have to identify to nickserv before being recognized, unless
|
||||
# they manually add an address to the access list of their account.
|
||||
|
||||
NSAddAccessOnReg
|
||||
|
||||
# UlineServers [OPTIONAL]
|
||||
#
|
||||
# A list of ulined servers on your network, these servers are assumed they
|
||||
# can set channel modes and we will not attempt to take them from them
|
||||
# WARNING: do not put your user servers in this option
|
||||
|
||||
UlineServers "stats.your.network, proxy.your.network"
|
||||
|
||||
# KillOnSGline [OPTIONAL]
|
||||
#
|
||||
# When enabled, this option makes the services send an (SVS)KILL command
|
||||
# immediately after SGLINE ADD. This eliminates the need of killing the
|
||||
# users after the SGLINE has been added.
|
||||
|
||||
# KillOnSGline
|
||||
|
||||
# KillOnSQline [OPTIONAL]
|
||||
#
|
||||
# When enabled, this option makes the services send an (SVS)KILL command
|
||||
# immediately after SQLINE ADD. This eliminates the need of killing the
|
||||
# users after the SQLINE has been added.
|
||||
|
||||
# KillOnSQline
|
||||
|
||||
** MODIFIED CONFIGURATION DIRECTIVES **
|
||||
|
||||
** DELETED CONFIGURATION DIRECTIVES **
|
||||
|
||||
# NetworkDomain <name> [OPTIONAL]
|
||||
#
|
||||
# If your network has a common domain name, specify it there (for
|
||||
# example, all IRCZONE servers have a name ending in ".irczone.cl",
|
||||
# so "irczone.cl" would be set there.
|
||||
#
|
||||
# You can specify more than one Network Domain by separating each one by
|
||||
# a space: NetworkDomain "localnet.net localnet.com"
|
||||
#
|
||||
# Note that this directive is no longer used by the GLOBAL command, since
|
||||
# it uses a dynamic list of connected servers regardless of their
|
||||
# domains. However, some modules may still use this value, so you might
|
||||
# want to keep it just in case.
|
||||
|
||||
NetworkDomain "localnet.com"
|
||||
|
||||
# ListOpersOnly [DEPRECATED]
|
||||
# When enabled, limits use of the ChanServ and NickServ LIST commands
|
||||
# to IRC operators.
|
||||
#
|
||||
# This directive has been superseded by the NSListOpersOnly and
|
||||
# CSListOpersOnly directives.
|
||||
|
||||
#ListOpersOnly
|
||||
|
||||
Anope Version 1.7.6
|
||||
-------------------
|
||||
** ADDED CONFIGURATION DIRECTIVES **
|
||||
|
||||
# UserKey1|2|3 <value> [REQUIRED]
|
||||
#
|
||||
# These keys are required to initiate the random number generator. These
|
||||
# numbers MUST be random as you want your passcodes to be random. Don't
|
||||
# give these keys to no anyone! Keep them private!
|
||||
|
||||
#UserKey1 9866235
|
||||
#UserKey2 5216332
|
||||
#UserKey3 9651291
|
||||
|
||||
|
||||
# RestrictOperNick [OPTIONAL]
|
||||
# Forbids the registration of nicks that contain nick with services
|
||||
# access. So if Tester is a Services Oper, for example, You can't
|
||||
# register NewTester or Tester123 unless you are an IRC operator.
|
||||
#RestrictOperNicks
|
||||
|
||||
# UseTokens [OPTIONAL]
|
||||
# Allows irc networks to use TOKEN commands instead of the
|
||||
# standard commands. This saves bandwidth but can break older
|
||||
# modules that are not set to trap for TOKEN - if you are using
|
||||
# older modules do NOT use this option
|
||||
#UseTokens
|
||||
|
||||
# UseSVS2MODE [OPTIONAL]
|
||||
# On Unreal IRCD use SVS2MODE instead of SVSMODE, doing this will
|
||||
# show services changing user modes.
|
||||
#UseSVS2MODE
|
||||
|
||||
# NewsCount [OPTIONAL]
|
||||
# The number of LOGON/OPER News item to display when a user logs
|
||||
# on. The default value is 3
|
||||
#NewsCount 3
|
||||
|
||||
# Numeric [OPTIONAL]
|
||||
# Many ircd identify themselves with a Numeric when using this option
|
||||
# consult your ircds documentation before using this
|
||||
#Numeric 0
|
||||
|
||||
# UnRestrictSAdmin [OPTIONAL]
|
||||
# On many ircd Anope removes the umode of +a from users whom are not
|
||||
# Service Admin in Anope. This mode is NOT used by Anope for any form
|
||||
# of access. Thus this option allows them to keep the mode without having
|
||||
# to be a Service Admin in Anope
|
||||
#UnRestrictSAdmin
|
||||
|
||||
|
||||
** MODIFIED CONFIGURATION DIRECTIVES **
|
||||
** DELETED CONFIGURATION DIRECTIVES **
|
||||
|
||||
Anope Version 1.7.5
|
||||
-------------------
|
||||
** ADDED CONFIGURATION DIRECTIVES **
|
||||
|
||||
# UseSVSHOLD [OPTIONAL]
|
||||
# Allows Bahamut-networks to use SVSHOLD instead of the services
|
||||
# enforcer. This option has been introduced in Bahamut 1.4.35 and
|
||||
# places a temporary Q:Line instead of introducing a new nick,
|
||||
# which is better for both CPU and bandwidth. If you enable this
|
||||
# option on a pre-1.4.35 Bahamut, it is most likely to break.
|
||||
#UseSVSHOLD
|
||||
|
||||
** MODIFIED CONFIGURATION DIRECTIVES **
|
||||
|
||||
# NetworkDomain <name> [OPTIONAL]
|
||||
#
|
||||
# If your network has a common domain name, specify it there (for
|
||||
# example, all IRCZONE servers have a name ending in ".irczone.cl",
|
||||
# so "irczone.cl" would be set there.
|
||||
#
|
||||
# You can specify more than one Network Domain by separating each one by
|
||||
# a space: NetworkDomain "localnet.net localnet.com"
|
||||
#
|
||||
# Note that this directive is no longer used by the GLOBAL command, since
|
||||
# it uses a dynamic list of connected servers regardless of their
|
||||
# domains. However, some modules may still use this value, so you might
|
||||
# want to keep it just in case.
|
||||
|
||||
NetworkDomain "localnet.com"
|
||||
|
||||
** DELETED CONFIGURATION DIRECTIVES **
|
||||
|
||||
Anope Version 1.7.4
|
||||
-------------------
|
||||
** ADDED CONFIGURATION DIRECTIVES **
|
||||
|
||||
# NSNickTracking [OPTIONAL]
|
||||
#
|
||||
# When enabled, services will track your last nick identified when issuing
|
||||
# nick changes.
|
||||
|
||||
#NSNickTracking
|
||||
|
||||
** MODIFIED CONFIGURATION DIRECTIVES **
|
||||
** DELETED CONFIGURATION DIRECTIVES **
|
||||
|
||||
Anope Version 1.7.3
|
||||
-------------------
|
||||
** ADDED CONFIGURATION DIRECTIVES **
|
||||
|
||||
# BSCaseSensitive [OPTIONAL]
|
||||
# This option will make botserv use cAsE sEnSiTiVe checking for badwords
|
||||
|
||||
# BSCaseSensitive
|
||||
|
||||
# MSMemoReceipt [OPTIONAL]
|
||||
# Allow the use of memo receipts for the following groups:
|
||||
# 1 - Opers Only
|
||||
# 2 - Everybody
|
||||
#
|
||||
#MSMemoReceipt 1
|
||||
|
||||
Anope Version 1.7.2
|
||||
--------------------
|
||||
No Changes.
|
||||
|
||||
Anope Version 1.7.1
|
||||
--------------------
|
||||
** ADDED CONFIGURATION DIRECTIVES **
|
||||
|
||||
# UseRDB [OPTIONAL]
|
||||
#
|
||||
# Enable this if you want anope to load its data from a remote database.
|
||||
# (e.g. MySQL)
|
||||
#
|
||||
#UseRDB
|
||||
|
||||
# NickRegDelay <seconds> [OPTIONAL]
|
||||
# Prevents users from regging their nick if they are not
|
||||
# connected for at least X seconds.
|
||||
#NickRegDelay 30
|
||||
|
||||
** MODIFIED CONFIGURATION DIRECTIVES **
|
||||
** DELETED CONFIGURATION DIRECTIVES **
|
||||
+577
@@ -0,0 +1,577 @@
|
||||
Anope Version 1.8 SVN
|
||||
---------------------
|
||||
|
||||
Anope Version 1.8.2
|
||||
-------------------
|
||||
*** New Strings:
|
||||
|
||||
*** Mod Strings:
|
||||
|
||||
*** Del Strings:
|
||||
|
||||
Anope Version 1.8.1
|
||||
-------------------
|
||||
*** New Strings:
|
||||
HOST_OFF
|
||||
*** Mod Strings:
|
||||
|
||||
*** Del Strings:
|
||||
|
||||
Anope Version 1.8.0
|
||||
-------------------
|
||||
*** New Strings:
|
||||
|
||||
*** Mod Strings:
|
||||
|
||||
*** Del Strings:
|
||||
|
||||
Anope Version 1.7.24
|
||||
--------------------
|
||||
*** New Strings:
|
||||
OPER_STATS_HOSTSERV_MEM
|
||||
|
||||
*** Mod Strings:
|
||||
NICK_HELP_SASET_AUTOOP
|
||||
|
||||
*** Del Strings:
|
||||
|
||||
Anope Version 1.7.23b
|
||||
--------------------
|
||||
*** New Strings:
|
||||
|
||||
*** Mod Strings:
|
||||
|
||||
*** Del Strings:
|
||||
|
||||
Anope Version 1.7.23
|
||||
--------------------
|
||||
*** New Strings:
|
||||
PASSWORD_TOO_LONG
|
||||
CHAN_LOGOUT_FOUNDER_FAILED
|
||||
|
||||
*** Mod Strings:
|
||||
OPER_HELP_OPER
|
||||
NICK_HELP_SASET_PASSWORD
|
||||
OPER_IGNORE_SYNTAX
|
||||
OPER_HELP_IGNORE
|
||||
CHAN_LOGOUT_ALL_SUCCEEDED
|
||||
OPER_HELP_MODLIST
|
||||
|
||||
*** Del Strings:
|
||||
PASSWORD_TRUNCATED
|
||||
|
||||
Anope Version 1.7.22
|
||||
--------------------
|
||||
*** New Strings:
|
||||
NICK_SASET_LANGUAGE_SYNTAX
|
||||
NICK_SASET_LANGUAGE_UNKNOWN
|
||||
NICK_SASET_LANGUAGE_CHANGED
|
||||
NICK_HELP_SASET_LANGUAGE
|
||||
NICK_HELP_RESEND
|
||||
|
||||
*** Mod Strings:
|
||||
NICK_HELP_SASET
|
||||
NICK_RECOVERED
|
||||
NICK_LIST_SERVADMIN_SYNTAX
|
||||
NICK_SERVADMIN_HELP_LIST
|
||||
CHAN_GETKEY_KEY
|
||||
NICK_SERVADMIN_HELP_LIST
|
||||
CHAN_SERVADMIN_HELP_LIST
|
||||
OPER_HELP_GLOBAL
|
||||
OPER_HELP_UMODE
|
||||
OPER_HELP_OLINE
|
||||
OPER_HELP_KICK
|
||||
OPER_HELP_SVSNICK
|
||||
OPER_HELP_SET_LOGCHAN
|
||||
OPER_HELP_SET_SUPERADMIN
|
||||
CHAN_HELP_AKICK
|
||||
NICK_HELP_RECOVER
|
||||
NICK_HELP_RELEASE
|
||||
NEWS_HELP_LOGON
|
||||
NEWS_HELP_OPER
|
||||
OPER_HELP_IGNORE
|
||||
OPER_IGNORE_TIME_DONE
|
||||
OPER_IGNORE_PERM_DONE
|
||||
OPER_IGNORE_DEL_DONE
|
||||
|
||||
*** Del Strings:
|
||||
NICK_SET_UNKNOWN_OPTION_OR_BAD_NICK
|
||||
OPER_HELP_KILLCLONES
|
||||
|
||||
Anope Version 1.7.21
|
||||
--------------------
|
||||
*** New Strings:
|
||||
|
||||
*** Mod Strings:
|
||||
|
||||
*** Del Strings:
|
||||
|
||||
Anope Version 1.7.20
|
||||
--------------------
|
||||
*** New Strings:
|
||||
NICK_HELP_CONFIRM
|
||||
CHAN_XOP_NOT_AVAILABLE
|
||||
HELP_LIMIT_SERV_OPER
|
||||
HELP_LIMIT_SERV_ADMIN
|
||||
HELP_LIMIT_SERV_ROOT
|
||||
HELP_LIMIT_IRC_OPER
|
||||
HELP_LIMIT_HOST_SETTER
|
||||
HELP_LIMIT_HOST_REMOVER
|
||||
|
||||
*** Mod Strings:
|
||||
OPER_HELP_SET
|
||||
In all of the following strings only the trailing 'Limited to ...' line has been removed:
|
||||
OPER_HELP_EXCEPTION
|
||||
OPER_HELP_SESSION
|
||||
NICK_HELP_SASET
|
||||
NICK_HELP_SASET_DISPLAY
|
||||
NICK_HELP_SASET_PASSWORD
|
||||
NICK_HELP_SASET_URL
|
||||
NICK_HELP_SASET_EMAIL
|
||||
NICK_HELP_SASET_ICQ
|
||||
NICK_HELP_SASET_GREET
|
||||
NICK_HELP_SASET_KILL
|
||||
NICK_HELP_SASET_SECURE
|
||||
NICK_HELP_SASET_PRIVATE
|
||||
NICK_HELP_SASET_HIDE
|
||||
NICK_HELP_SASET_MSG
|
||||
NICK_HELP_SASET_NOEXPIRE
|
||||
NICK_HELP_SASET_AUTOOP
|
||||
NICK_SERVADMIN_HELP_GETPASS
|
||||
NICK_SERVADMIN_HELP_GETEMAIL
|
||||
NICK_SERVADMIN_HELP_FORBID
|
||||
NICK_SERVADMIN_HELP_SUSPEND
|
||||
NICK_SERVADMIN_HELP_UNSUSPEND
|
||||
CHAN_SERVADMIN_HELP_SET_NOEXPIRE
|
||||
CHAN_SERVADMIN_HELP_GETPASS
|
||||
CHAN_SERVADMiN_HELP_FORBID
|
||||
CHAN_SERVADMIN_HELP_SUSPEND
|
||||
CHAN_SERVADMIN_HELP_UNSUSPEND
|
||||
CHAN_SERVADMIN_HELP_STATUS
|
||||
OPER_HELP_MODE
|
||||
OPER_HELP_CLEARMODES
|
||||
OPER_HELP_KICK
|
||||
OPER_HELP_SVSNICK
|
||||
OPER_HELP_AKILL
|
||||
OPER_HELP_SGLINE
|
||||
OPER_HELP_SQLINE
|
||||
OPER_HELP_SZLINE
|
||||
OPER_HELP_SET
|
||||
OPER_HELP_NOOP
|
||||
OPER_HELP_JUPE
|
||||
OPER_HELP_RAW
|
||||
OPER_HELP_UPDATE
|
||||
OPER_HELP_RELOAD
|
||||
OPER_HELP_QUIT
|
||||
OPER_HELP_SHUTDOWN
|
||||
OPER_HELP_RESTART
|
||||
OPER_HELP_KILLCLONES
|
||||
OPER_HELP_CHANLIST
|
||||
OPER_HELP_USERLIST
|
||||
OPER_HELP_MODLOAD
|
||||
OPER_HELP_MODUNLOAD
|
||||
OPER_HELP_MODINFO
|
||||
OPER_HELP_MODLIST
|
||||
BOT_SERVADMIN_HELP_SET_NOBOT
|
||||
BOT_SERVADMIN_HELP_SET_PRIVATE
|
||||
HOST_HELP_SET
|
||||
HOST_HELP_DELALL
|
||||
HOST_HELP_SETALL
|
||||
HOST_HELP_DEL
|
||||
HOST_HELP_LIST
|
||||
|
||||
*** Del Strings:
|
||||
|
||||
Anope Version 1.7.19
|
||||
--------------------
|
||||
*** New Strings:
|
||||
|
||||
*** Mod Strings:
|
||||
CHAN_HELP_LIST
|
||||
BOT_SET_SYNTAX
|
||||
BOT_HELP_SET
|
||||
|
||||
*** Del Strings:
|
||||
|
||||
Anope Version 1.7.18
|
||||
--------------------
|
||||
*** New Strings:
|
||||
|
||||
*** Mod Strings:
|
||||
|
||||
*** Del Strings:
|
||||
|
||||
Anope Version 1.7.17
|
||||
--------------------
|
||||
*** New Strings:
|
||||
|
||||
*** Mod Strings:
|
||||
|
||||
*** Del Strings:
|
||||
|
||||
Anope Version 1.7.16
|
||||
--------------------
|
||||
*** New Strings:
|
||||
|
||||
*** Mod Strings:
|
||||
|
||||
*** Del Strings:
|
||||
|
||||
Anope Version 1.7.15
|
||||
--------------------
|
||||
*** New Strings:
|
||||
INVALID_TARGET
|
||||
NICK_SET_AUTOOP_SYNTAX
|
||||
NICK_SET_AUTOOP_ON
|
||||
NICK_SET_AUTOOP_OFF
|
||||
BOT_LONG_IDENT
|
||||
|
||||
*** Mod Strings:
|
||||
NICK_HELP_SET
|
||||
*** Del Strings:
|
||||
|
||||
Anope Version 1.7.14
|
||||
--------------------
|
||||
*** New Strings:
|
||||
CHAN_X_INVALID
|
||||
|
||||
*** Mod Strings:
|
||||
|
||||
*** Del Strings:
|
||||
|
||||
Anope Version 1.7.13
|
||||
--------------------
|
||||
*** New Strings:
|
||||
|
||||
*** Mod Strings:
|
||||
|
||||
*** Del Strings:
|
||||
|
||||
Anope Version 1.7.12
|
||||
--------------------
|
||||
*** New Strings:
|
||||
OPER_STATS_UPLINK_SERVER
|
||||
OPER_STATS_UPLINK_CAPAB
|
||||
OPER_STATS_UPLINK_SERVER_COUNT
|
||||
|
||||
*** Mod Strings:
|
||||
OPER_HELP_STATS
|
||||
|
||||
*** Del Strings:
|
||||
|
||||
Anope Version 1.7.11
|
||||
---------------------
|
||||
*** New Strings:
|
||||
NICK_SASET_SYNTAX
|
||||
NICK_SASET_DISABLED
|
||||
NICK_SASET_UNKNOWN_OPTION
|
||||
NICK_SASET_BAD_NICK
|
||||
NICK_SASET_OPTION_DISABLED
|
||||
NICK_SASET_DISPLAY_INVALID
|
||||
NICK_SASET_DISPLAY_CHANGED
|
||||
NICK_SASET_PASSWORD_FAILED
|
||||
NICK_SASET_PASSWORD_CHANGED
|
||||
NICK_SASET_PASSWORD_CHANGED_TO
|
||||
NICK_SASET_LANGUAGE_SYNTAX
|
||||
NICK_SASET_LANGUAGE_UNKNOWN
|
||||
NICK_SASET_LANGUAGE_CHANGED
|
||||
NICK_SASET_URL_CHANGED
|
||||
NICK_SASET_URL_UNSET
|
||||
NICK_SASET_EMAIL_CHANGED
|
||||
NICK_SASET_EMAIL_UNSET
|
||||
NICK_SASET_EMAIL_UNSET_IMPOSSIBLE
|
||||
NICK_SASET_ICQ_CHANGED
|
||||
NICK_SASET_ICQ_UNSET
|
||||
NICK_SASET_ICQ_INVALID
|
||||
NICK_SASET_GREET_CHANGED
|
||||
NICK_SASET_GREET_UNSET
|
||||
NICK_SASET_KILL_SYNTAX
|
||||
NICK_SASET_KILL_IMMED_SYNTAX
|
||||
NICK_SASET_KILL_ON
|
||||
NICK_SASET_KILL_QUICK
|
||||
NICK_SASET_KILL_IMMED
|
||||
NICK_SASET_KILL_IMMED_DISABLED
|
||||
NICK_SASET_KILL_OFF
|
||||
NICK_SASET_SECURE_SYNTAX
|
||||
NICK_SASET_SECURE_ON
|
||||
NICK_SASET_SECURE_OFF
|
||||
NICK_SASET_PRIVATE_SYNTAX
|
||||
NICK_SASET_PRIVATE_ON
|
||||
NICK_SASET_PRIVATE_OFF
|
||||
NICK_SASET_HIDE_SYNTAX
|
||||
NICK_SASET_HIDE_EMAIL_ON
|
||||
NICK_SASET_HIDE_EMAIL_OFF
|
||||
NICK_SASET_HIDE_MASK_ON
|
||||
NICK_SASET_HIDE_MASK_OFF
|
||||
NICK_SASET_HIDE_QUIT_ON
|
||||
NICK_SASET_HIDE_QUIT_OFF
|
||||
NICK_SASET_HIDE_STATUS_ON
|
||||
NICK_SASET_HIDE_STATUS_OFF
|
||||
NICK_SASET_MSG_SYNTAX
|
||||
NICK_SASET_MSG_ON
|
||||
NICK_SASET_MSG_OFF
|
||||
NICK_SASET_NOEXPIRE_SYNTAX
|
||||
NICK_SASET_NOEXPIRE_ON
|
||||
NICK_SASET_NOEXPIRE_OFF
|
||||
NICK_HELP_SASET
|
||||
NICK_HELP_SASET_DISPLAY
|
||||
NICK_HELP_SASET_PASSWORD
|
||||
NICK_HELP_SASET_LANGUAGE
|
||||
NICK_HELP_SASET_URL
|
||||
NICK_HELP_SASET_EMAIL
|
||||
NICK_HELP_SASET_ICQ
|
||||
NICK_HELP_SASET_GREET
|
||||
NICK_HELP_SASET_KILL
|
||||
NICK_HELP_SASET_SECURE
|
||||
NICK_HELP_SASET_PRIVATE
|
||||
NICK_HELP_SASET_HIDE
|
||||
NICK_HELP_SASET_MSG
|
||||
NICK_HELP_SASET_NOEXPIRE
|
||||
NICK_HELP_CMD_SASET
|
||||
|
||||
*** Mod Strings:
|
||||
OPER_HELP_MODLIST
|
||||
|
||||
*** Del Strings:
|
||||
NICK_SERVADMIN_HELP_SET
|
||||
NICK_SERVADMIN_HELP_SET_NOEXPIRE
|
||||
NICK_SET_NOEXPIRE_SYNTAX
|
||||
NICK_SET_NOEXPIRE_ON
|
||||
NICK_SET_NOEXPIRE_OFF
|
||||
NICK_SASET_LANGUAGE_SYNTAX
|
||||
NICK_SASET_LANGUAGE_UNKNOWN
|
||||
NICK_SASET_LANGUAGE_CHANGED
|
||||
NICK_HELP_SASET_LANGUAGE
|
||||
|
||||
|
||||
Anope Version 1.7.10
|
||||
--------------------
|
||||
*** New Strings:
|
||||
|
||||
*** Mod Strings:
|
||||
|
||||
*** Del Strings:
|
||||
|
||||
Anope Version 1.7.9
|
||||
-------------------
|
||||
*** New Strings:
|
||||
CHAN_HELP_IRCD_HALFOP
|
||||
CHAN_HELP_IRCD_PROTECT
|
||||
CHAN_GETKEY_SYNTAX
|
||||
CHAN_GETKEY_NOKEY
|
||||
CHAN_GETKEY_KEY
|
||||
OPER_SET_SQL_ERROR_DISABLED
|
||||
NICK_X_SUSPENDED
|
||||
NICK_INFO_SUSPENDED
|
||||
NICK_SUSPEND_SYNTAX
|
||||
NICK_SUSPEND_SUCCEEDED
|
||||
NICK_SUSPEND_FAILED
|
||||
NICK_UNSUSPEND_SYNTAX
|
||||
NICK_UNSUSPEND_SUCCEEDED
|
||||
NICK_UNSUSPEND_FAILED
|
||||
NICK_SERVADMIN_HELP_SUSPEND
|
||||
NICK_SERVADMIN_HELP_UNSUSPEND
|
||||
|
||||
*** Mod Strings:
|
||||
OPER_HELP_SET
|
||||
NICK_HELP
|
||||
CHAN_AOP_CLEAR
|
||||
CHAN_HOP_CLEAR
|
||||
CHAN_SOP_CLEAR
|
||||
CHAN_VOP_CLEAR
|
||||
CHAN_ACCESS_CLEAR
|
||||
CHAN_AKICK_CLEAR
|
||||
CHAN_SET_KEEPTOPIC_ON
|
||||
CHAN_SET_KEEPTOPIC_OFF
|
||||
CHAN_SET_TOPICLOCK_ON
|
||||
CHAN_SET_TOPICLOCK_OFF
|
||||
CHAN_SET_PEACE_ON
|
||||
CHAN_SET_PEACE_OFF
|
||||
CHAN_SET_PRIVATE_ON
|
||||
CHAN_SET_PRIVATE_OFF
|
||||
CHAN_SET_SECUREOPS_ON
|
||||
CHAN_SET_SECUREOPS_OFF
|
||||
CHAN_SET_SECUREFOUNDER_ON
|
||||
CHAN_SET_SECUREFOUNDER_OFF
|
||||
CHAN_SET_RESTRICTED_ON
|
||||
CHAN_SET_RESTRICTED_OFF
|
||||
CHAN_SET_SECURE_ON
|
||||
CHAN_SET_SECURE_OFF
|
||||
CHAN_SET_SIGNKICK_ON
|
||||
CHAN_SET_SIGNKICK_LEVEL
|
||||
CHAN_SET_SIGNKICK_OFF
|
||||
CHAN_SET_OPNOTICE_ON
|
||||
CHAN_SET_OPNOTICE_OFF
|
||||
CHAN_SET_XOP_ON
|
||||
CHAN_SET_XOP_OFF
|
||||
|
||||
*** Del Strings:
|
||||
CHAN_HELP_ULTIMATE
|
||||
OPER_STATS_PROXY_MEM
|
||||
OPER_CACHE_SYNTAX
|
||||
OPER_CACHE_DISABLED
|
||||
OPER_CACHE_NOT_FOUND
|
||||
OPER_CACHE_REMOVED
|
||||
OPER_CACHE_HEADER
|
||||
OPER_CACHE_LIST
|
||||
OPER_CACHE_FOOTER
|
||||
OPER_CACHE_QUEUED
|
||||
OPER_CACHE_PROGRESS
|
||||
OPER_CACHE_NORMAL
|
||||
OPER_CACHE_WINGATE
|
||||
OPER_CACHE_SOCKS4
|
||||
OPER_CACHE_SOCKS5
|
||||
OPER_CACHE_HTTP
|
||||
OPER_HELP_CACHE
|
||||
|
||||
Anope Version 1.7.8
|
||||
-------------------
|
||||
*** New Strings:
|
||||
OPER_HELP_SET_IGNORE
|
||||
OPER_HELP_ADMIN_CMD_EXTRA
|
||||
OPER_HELP_ADMIN_CMD_OLINE
|
||||
OPER_HELP_ADMIN_CMD_UMODE
|
||||
OPER_HELP_ADMIN_CMD_SVSNICK
|
||||
OPER_HELP_OPER_CMD_EXTRA
|
||||
OPER_HELP_OPER_CMD_SGLINE
|
||||
OPER_HELP_OPER_CMD_SQLINE
|
||||
OPER_HELP_OPER_CMD_SZLINE
|
||||
|
||||
*** Mod Strings:
|
||||
HOST_OFF_UNREAL
|
||||
OPER_HELP_OPER_CMD
|
||||
OPER_HELP_ADMIN_CMD
|
||||
|
||||
*** Del Strings:
|
||||
|
||||
Anope Version 1.7.7
|
||||
-------------------
|
||||
*** New Strings:
|
||||
MEMO_NO_RSEND_SELF
|
||||
NICK_REGISTERED_NO_MASK
|
||||
OPER_ADMIN_MOVED
|
||||
OPER_OPER_MOVED
|
||||
OPER_HELP_SET_SQL
|
||||
OPER_SET_SQL_ON
|
||||
OPER_SET_SQL_OFF
|
||||
OPER_SET_SQL_ERROR
|
||||
OPER_SET_SQL_ERROR_INIT
|
||||
OPER_EXCEPTION_EXISTS
|
||||
OPER_EXCEPTION_CHANGED
|
||||
OPER_SET_LIST_OPTION_ON
|
||||
OPER_SET_LIST_OPTION_OFF
|
||||
OPER_HELP_SET_LIST
|
||||
OPER_SUPER_ADMIN_NOT_ENABLED
|
||||
|
||||
*** Mod Strings:
|
||||
|
||||
BOT_SERVADMIN_HELP_BOT
|
||||
NICK_HELP_STATUS
|
||||
|
||||
*** Del Strings:
|
||||
|
||||
Anope Version 1.7.6
|
||||
-------------------
|
||||
*** New Strings:
|
||||
|
||||
CHAN_REGISTER_NONE_CHANNEL
|
||||
CHAN_SYMBOL_REQUIRED
|
||||
OPER_SVSNICK_UNSUPPORTED
|
||||
OPER_SQLINE_UNSUPPORTED
|
||||
OPER_SVSO_UNSUPPORTED
|
||||
OPER_UMODE_UNSUPPORTED
|
||||
CHAN_CLEARED_INVITES
|
||||
NICK_INFO_VHOST2
|
||||
NICK_STATUS_0
|
||||
NICK_STATUS_1
|
||||
NICK_STATUS_2
|
||||
NICK_STATUS_3
|
||||
CHAN_STATUS_SYNTAX
|
||||
CHAN_STATUS_NOT_REGGED
|
||||
CHAN_STATUS_FORBIDDEN
|
||||
CHAN_STATUS_NOTONLINE
|
||||
CHAN_STATUS_INFO
|
||||
NICK_INFO_EXPIRE
|
||||
NICK_GLIST_REPLY
|
||||
NICK_GLIST_REPLY_ADMIN
|
||||
CHAN_INFO_EXPIRE
|
||||
NICK_ACCESS_LIST_EMPTY
|
||||
NICK_ACCESS_LIST_X_EMPTY
|
||||
|
||||
*** Mod Strings:
|
||||
|
||||
*** Del Strings:
|
||||
|
||||
Anope Version 1.7.5
|
||||
-------------------
|
||||
*** New Strings:
|
||||
|
||||
*** Mod Strings:
|
||||
|
||||
MEMO_HELP
|
||||
CHAN_LEVEL_NOJOIN
|
||||
|
||||
*** Del Strings:
|
||||
|
||||
Anope Version 1.7.4
|
||||
-------------------
|
||||
*** New Strings:
|
||||
|
||||
CHAN_CLEARED_HOPS
|
||||
OPER_MODULE_LIST_HEADER
|
||||
OPER_MODULE_LIST_FOOTER
|
||||
NICK_X_IS_SERVICES
|
||||
|
||||
*** Mod Strings:
|
||||
|
||||
CHAN_HELP_CLEAR
|
||||
|
||||
*** Del Strings:
|
||||
|
||||
Anope Version 1.7.3
|
||||
-------------------
|
||||
*** New Strings:
|
||||
|
||||
MEMO_RSEND_PLEASE_WAIT
|
||||
MEMO_RSEND_DISABLED
|
||||
MEMO_RSEND_SYNTAX
|
||||
MEMO_RSEND_NICK_MEMO_TEXT
|
||||
MEMO_RSEND_CHAN_MEMO_TEXT
|
||||
MEMO_RSEND_USER_NOTIFICATION
|
||||
MEMO_HELP_RSEND
|
||||
MEMO_CHECK_SYNTAX
|
||||
MEMO_CHECK_NOT_READ
|
||||
MEMO_CHECK_READ
|
||||
MEMO_CHECK_NO_MEMO
|
||||
MEMO_HELP_CHECK
|
||||
|
||||
*** Mod Strings:
|
||||
MEMO_HELP
|
||||
NICK_LIST_SERVADMIN_SYNTAX
|
||||
NICK_SERVADMIN_HELP_LIST
|
||||
|
||||
Anope Version 1.7.2
|
||||
--------------------
|
||||
No Changes.
|
||||
|
||||
Anope Version 1.7.1
|
||||
--------------------
|
||||
*** New Strings:
|
||||
|
||||
MEMO_SET_NOTIFY_MAIL
|
||||
MEMO_SET_NOTIFY_NOMAIL
|
||||
MEMO_SET_NOTIFY_INVALIDMAIL
|
||||
MEMO_MAIL_SUBJECT
|
||||
MEMO_MAIL_TEXT1
|
||||
MEMO_MAIL_TEXT2
|
||||
MEMO_MAIL_TEXT3
|
||||
NICK_INFO_SERVICES_ROOT
|
||||
NICK_SET_HIDE_STATUS_ON
|
||||
NICK_SET_HIDE_STATUS_OFF
|
||||
NICK_REG_DELAY
|
||||
|
||||
*** Mod Strings:
|
||||
MEMO_SET_NOTIFY_SYNTAX
|
||||
NICK_HELP_SET_HIDE
|
||||
|
||||
*** Del Strings:
|
||||
+140
@@ -0,0 +1,140 @@
|
||||
Anope Version 1.8 SVN
|
||||
---------------------
|
||||
|
||||
Anope Version 1.8.2
|
||||
-------------------
|
||||
- NONE
|
||||
|
||||
Anope Version 1.8.1
|
||||
-------------------
|
||||
- NONE
|
||||
|
||||
Anope Version 1.8.0
|
||||
-------------------
|
||||
ALTER TABLE `anope_ns_access` DROP INDEX display;
|
||||
|
||||
Anope Version 1.7.24
|
||||
--------------------
|
||||
- NONE
|
||||
|
||||
Anope Version 1.7.23b
|
||||
--------------------
|
||||
- NONE
|
||||
|
||||
Anope Version 1.7.23
|
||||
--------------------
|
||||
- NONE
|
||||
|
||||
Anope Version 1.7.22
|
||||
--------------------
|
||||
- NONE
|
||||
|
||||
Anope Version 1.7.21
|
||||
--------------------
|
||||
- NONE
|
||||
|
||||
Anope Version 1.7.20
|
||||
--------------------
|
||||
ALTER TABLE `anope_ns_request` DROP INDEX `nick_index` ;
|
||||
ALTER TABLE `anope_ns_core` DROP INDEX `display_index` ;
|
||||
ALTER TABLE `anope_ns_access` ADD UNIQUE (`display`) ;
|
||||
ALTER TABLE `anope_ms_info` ADD UNIQUE (`nm_id` , `serv`) ;
|
||||
ALTER TABLE `anope_ns_alias` DROP INDEX `nick_index` ;
|
||||
ALTER TABLE `anope_cs_info` DROP INDEX `name_index` ;
|
||||
ALTER TABLE `anope_cs_access` ADD UNIQUE (`channel` , `display`) ;
|
||||
ALTER TABLE `anope_cs_levels` ADD UNIQUE (`channel` , `position`) ;
|
||||
ALTER TABLE `anope_cs_akicks` CHANGE `dmask` `dmask` VARCHAR( 255 ) NOT NULL ;
|
||||
ALTER TABLE `anope_cs_akicks` ADD UNIQUE (`channel` , `dmask`) ;
|
||||
ALTER TABLE `anope_cs_badwords` CHANGE `word` `word` VARCHAR( 255 ) NOT NULL ;
|
||||
ALTER TABLE `anope_cs_badwords` ADD UNIQUE (`channel` , `word`) ;
|
||||
ALTER TABLE `anope_cs_ttb` ADD UNIQUE (`channel` , `ttb_id`) ;
|
||||
ALTER TABLE `anope_os_akills` CHANGE `user` `user` VARCHAR( 255 ) NOT NULL , CHANGE `host` `host` VARCHAR( 255 ) NOT NULL ;
|
||||
ALTER TABLE `anope_os_akills` ADD UNIQUE (`user` , `host`) ;
|
||||
ALTER TABLE `anope_os_sglines` CHANGE `mask` `mask` VARCHAR( 255 ) NOT NULL ;
|
||||
ALTER TABLE `anope_os_sglines` ADD UNIQUE (`mask`) ;
|
||||
ALTER TABLE `anope_os_sqlines` CHANGE `mask` `mask` VARCHAR( 255 ) NOT NULL ;
|
||||
ALTER TABLE `anope_os_sqlines` ADD UNIQUE (`mask`) ;
|
||||
ALTER TABLE `anope_os_szlines` CHANGE `mask` `mask` VARCHAR( 255 ) NOT NULL ;
|
||||
ALTER TABLE `anope_os_szlines` ADD UNIQUE (`mask`) ;
|
||||
ALTER TABLE `anope_os_news` ADD UNIQUE (`type` , `num` , `time`) ;
|
||||
ALTER TABLE `anope_os_exceptions` CHANGE `mask` `mask` VARCHAR( 255 ) NOT NULL ;
|
||||
ALTER TABLE `anope_os_exceptions` ADD UNIQUE (`mask`) ;
|
||||
ALTER TABLE `anope_hs_core` DROP INDEX `nick_index` ;
|
||||
ALTER TABLE `anope_bs_core` DROP INDEX `nick_index` ;
|
||||
ALTER TABLE `anope_ms_info` CHANGE `receiver` `receiver` VARCHAR( 255 ) NOT NULL ;
|
||||
ALTER TABLE `anope_ms_info` ADD INDEX ( `receiver` , `serv` ) ;
|
||||
|
||||
Anope Version 1.7.19
|
||||
--------------------
|
||||
- NONE
|
||||
|
||||
Anope Version 1.7.18
|
||||
--------------------
|
||||
- DROP TABLE IF EXISTS `anope_os_status`
|
||||
- ALTER TABLE `anope_bs_core` ADD `active` TINYINT( 1 ) DEFAULT '1' NOT NULL
|
||||
- ALTER TABLE `anope_cs_access` ADD `active` TINYINT( 1 ) DEFAULT '1' NOT NULL
|
||||
- ALTER TABLE `anope_cs_akicks` ADD `active` TINYINT( 1 ) DEFAULT '1' NOT NULL
|
||||
- ALTER TABLE `anope_cs_badwords` ADD `active` TINYINT( 1 ) DEFAULT '1' NOT NULL
|
||||
- ALTER TABLE `anope_cs_levels` ADD `active` TINYINT( 1 ) DEFAULT '1' NOT NULL
|
||||
- ALTER TABLE `anope_cs_ttb` ADD `active` TINYINT( 1 ) DEFAULT '1' NOT NULL
|
||||
- ALTER TABLE `anope_hs_core` ADD `active` TINYINT( 1 ) DEFAULT '1' NOT NULL
|
||||
- ALTER TABLE `anope_ms_info` ADD `active` TINYINT( 1 ) DEFAULT '1' NOT NULL
|
||||
- ALTER TABLE `anope_ns_access` ADD `active` TINYINT( 1 ) DEFAULT '1' NOT NULL
|
||||
- ALTER TABLE `anope_ns_request` CHANGE `active` `active` TINYINT( 1 ) DEFAULT '1' NOT NULL
|
||||
- ALTER TABLE `anope_os_akills` ADD `active` TINYINT( 1 ) DEFAULT '1' NOT NULL
|
||||
- ALTER TABLE `anope_os_exceptions` ADD `active` TINYINT( 1 ) DEFAULT '1' NOT NULL
|
||||
- ALTER TABLE `anope_os_news` ADD `active` TINYINT( 1 ) DEFAULT '1' NOT NULL
|
||||
- ALTER TABLE `anope_os_sglines` ADD `active` TINYINT( 1 ) DEFAULT '1' NOT NULL
|
||||
- ALTER TABLE `anope_os_sqlines` ADD `active` TINYINT( 1 ) DEFAULT '1' NOT NULL
|
||||
- ALTER TABLE `anope_os_szlines` ADD `active` TINYINT( 1 ) DEFAULT '1' NOT NULL
|
||||
|
||||
Anope Version 1.7.17
|
||||
--------------------
|
||||
- CREATE TABLE anope_cs_ttb (
|
||||
ct_id int(11) NOT NULL auto_increment,
|
||||
channel varchar(255) NOT NULL default '',
|
||||
ttb_id int(11) NOT NULL default '0',
|
||||
value int(11) NOT NULL default '0',
|
||||
PRIMARY KEY (ct_id)
|
||||
) TYPE=MyISAM
|
||||
- ALTER TABLE anope_cs_info DROP ttb
|
||||
|
||||
Anope Version 1.7.16
|
||||
--------------------
|
||||
- NONE
|
||||
|
||||
Anope Version 1.7.15
|
||||
--------------------
|
||||
- NONE
|
||||
|
||||
Anope Version 1.7.14
|
||||
--------------------
|
||||
- NONE
|
||||
|
||||
Anope Version 1.7.13
|
||||
--------------------
|
||||
- NONE
|
||||
|
||||
Anope Version 1.7.12
|
||||
--------------------
|
||||
- NONE
|
||||
|
||||
Anope Version 1.7.11
|
||||
--------------------
|
||||
- NONE
|
||||
|
||||
Anope Version 1.7.10
|
||||
--------------------
|
||||
- NONE
|
||||
|
||||
Anope Version 1.7.9
|
||||
-------------------
|
||||
- DROP TABLE IF EXISTS anope_os_cache
|
||||
|
||||
Anope Version 1.7.8
|
||||
-------------------
|
||||
- NONE
|
||||
|
||||
Anope Version 1.7.7
|
||||
-------------------
|
||||
- ALTER TABLE anope_ns_alias CHANGE status status int(11) unsigned NOT NULL default '0'
|
||||
@@ -1,162 +1,147 @@
|
||||
#!/bin/sh
|
||||
#
|
||||
# Anope IRC Services <https://www.anope.org/>
|
||||
# Configuration script for Services.
|
||||
#
|
||||
# Copyright (C) 2003-2026 Anope Contributors
|
||||
# Anope (c) 2003-2007 Anope team
|
||||
# Contact us at team@anope.org
|
||||
#
|
||||
# Anope is free software. You can use, modify, and/or distribute it under the
|
||||
# terms of version 2 of the GNU General Public License. See docs/LICENSE.txt
|
||||
# for the complete terms of this license and docs/AUTHORS.txt for a list of
|
||||
# contributors.
|
||||
# This program is free but copyrighted software; see the file COPYING for
|
||||
# details.
|
||||
#
|
||||
# Based on the original code of Epona by Lara
|
||||
# Based on the original code of Services by Andy Church
|
||||
# Based on the original code of Epona by PegSoft.
|
||||
# Based on the original code of Services by Andy Church.
|
||||
#
|
||||
# SPDX-License-Identifier: GPL-2.0-only
|
||||
###########################################################################
|
||||
|
||||
SOURCE_DIR="$(cd "$(dirname "$0")" && pwd)"
|
||||
. $SOURCE_DIR/src/version.sh
|
||||
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
|
||||
else
|
||||
return 1
|
||||
fi
|
||||
}
|
||||
|
||||
Load_Cache () {
|
||||
if [ -f $SOURCE_DIR/config.cache -a -r $SOURCE_DIR/config.cache -a ! "$IGNORE_CACHE" ] ; then
|
||||
echo "Using defaults from config.cache. To ignore, $SOURCE_DIR/Config -nocache"
|
||||
echo ""
|
||||
. $SOURCE_DIR/config.cache
|
||||
CAN_QUICK="yes"
|
||||
else
|
||||
CAN_QUICK="no"
|
||||
fi
|
||||
if [ -f config.cache -a -r config.cache -a ! "$IGNORE_CACHE" ] ; then
|
||||
echo "Using defaults from config.cache. To ignore, ./Config -nocache"
|
||||
echo ""
|
||||
. config.cache
|
||||
CAN_QUICK="yes"
|
||||
else
|
||||
CAN_QUICK="no"
|
||||
fi
|
||||
}
|
||||
|
||||
Run_Build_System () {
|
||||
BUILD_DIR="${SOURCE_DIR}/build"
|
||||
CMAKE_COMMAND="${CMAKE:-cmake} -B ${BUILD_DIR} -S ${SOURCE_DIR}"
|
||||
Run_Configure () {
|
||||
WITH_BIN=""
|
||||
WITH_DATA=""
|
||||
WITH_ENC=""
|
||||
WITH_RUN=""
|
||||
WITH_PERM=""
|
||||
WITH_MYSQL=""
|
||||
|
||||
if [ "$INSTDIR" != "" ] ; then
|
||||
CMAKE_COMMAND="${CMAKE_COMMAND} -D INSTDIR=$INSTDIR"
|
||||
fi
|
||||
if [ "$BINDEST" != "" ] ; then
|
||||
WITH_BIN=" --with-bindir=$BINDEST"
|
||||
WITH_DATA=" --with-datadir=$DATDEST"
|
||||
fi
|
||||
|
||||
if [ "$RUNGROUP" != "" ] ; then
|
||||
CMAKE_COMMAND="${CMAKE_COMMAND} -D RUNGROUP=$RUNGROUP"
|
||||
fi
|
||||
if [ "$DATDEST" != "" ] ; then
|
||||
WITH_DATA=" --with-datadir=$DATDEST"
|
||||
fi
|
||||
|
||||
if [ "$UMASK" != "" ] ; then
|
||||
CMAKE_COMMAND="${CMAKE_COMMAND} -D DEFUMASK=$UMASK"
|
||||
fi
|
||||
if [ "$RUNGROUP" != "" ] ; then
|
||||
WITH_RUN=" --with-rungroup=$RUNGROUP"
|
||||
fi
|
||||
|
||||
if [ "$DEBUG" = "yes" ] ; then
|
||||
CMAKE_COMMAND="${CMAKE_COMMAND} -D CMAKE_BUILD_TYPE=Debug"
|
||||
else
|
||||
CMAKE_COMMAND="${CMAKE_COMMAND} -D CMAKE_BUILD_TYPE=Release"
|
||||
fi
|
||||
if [ "$UMASK" != "" ] ; then
|
||||
WITH_PERM=" --with-permissions=$UMASK"
|
||||
fi
|
||||
|
||||
if [ "$EXTRA_INCLUDE_DIRS" != "" ] ; then
|
||||
CMAKE_COMMAND="${CMAKE_COMMAND} -D EXTRA_INCLUDE=$EXTRA_INCLUDE_DIRS"
|
||||
fi
|
||||
if [ "$MYSQL" != "yes" ] ; then
|
||||
WITH_MYSQL=" --without-mysql"
|
||||
fi
|
||||
|
||||
if [ "$EXTRA_LIB_DIRS" != "" ] ; then
|
||||
CMAKE_COMMAND="${CMAKE_COMMAND} -D EXTRA_LIBS=$EXTRA_LIB_DIRS"
|
||||
fi
|
||||
|
||||
if [ "$EXTRA_CONFIG_ARGS" != "" ] ; then
|
||||
CMAKE_COMMAND="${CMAKE_COMMAND} $EXTRA_CONFIG_ARGS"
|
||||
fi
|
||||
echo "./configure $WITH_BIN $WITH_DATA $WITH_ENC $WITH_RUN $WITH_PERM $WITH_MYSQL"
|
||||
|
||||
echo $CMAKE_COMMAND
|
||||
$CMAKE_COMMAND
|
||||
|
||||
if [ $? -ne 0 ]; then
|
||||
echo "You should fix these issues and then run ./Config -quick to rerun CMake."
|
||||
exit 1
|
||||
fi
|
||||
|
||||
echo ""
|
||||
echo "Now run 'make -C ${BUILD_DIR#"$PWD/"} install' to build and install Anope."
|
||||
./configure $WITH_BIN $WITH_DATA $WITH_ENC $WITH_RUN $WITH_PERM $WITH_MYSQL
|
||||
}
|
||||
|
||||
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
|
||||
###########################################################################
|
||||
|
||||
INSTDIR="${HOME}/anope-${VERSION_MAJOR}.${VERSION_MINOR}"
|
||||
BINDEST=$HOME/services
|
||||
DATDEST=$HOME/services
|
||||
RUNGROUP=
|
||||
UMASK=
|
||||
DEBUG="no"
|
||||
EXTRA_INCLUDE_DIRS=
|
||||
EXTRA_LIB_DIRS=
|
||||
EXTRA_CONFIG_ARGS=
|
||||
IRCTYPE="no default"
|
||||
CAN_QUICK="no"
|
||||
|
||||
###########################################################################
|
||||
# Check out the options
|
||||
###########################################################################
|
||||
|
||||
while [ $# -ge 1 ] ; do
|
||||
OPTION=$1
|
||||
while [ "${OPTION#-}" != "$OPTION" ]; do
|
||||
OPTION="${OPTION#-}"
|
||||
done
|
||||
|
||||
if [ "$OPTION" = "--help" ] ; then
|
||||
echo "Config utility for Anope"
|
||||
echo "------------------------"
|
||||
echo "Syntax: ./Config [options]"
|
||||
echo "-nocache Ignore settings saved in config.cache"
|
||||
echo "-nointro Skip intro (disclaimer, etc)"
|
||||
echo "-quick Skip questions, go straight to cmake"
|
||||
exit 0
|
||||
elif [ "$OPTION" = "devel" ] ; then
|
||||
DEBUG="yes"
|
||||
DEVEL="yes"
|
||||
INSTDIR="$SOURCE_DIR/run"
|
||||
elif [ "$OPTION" = "nocache" ] ; then
|
||||
IGNORE_CACHE="1"
|
||||
elif [ "$OPTION" = "nointro" ] ; then
|
||||
NO_INTRO="1"
|
||||
elif [ "$OPTION" = "quick" -o "$OPTION" = "q" ] ; then
|
||||
Load_Cache
|
||||
if [ "$CAN_QUICK" = "yes" ] ; then
|
||||
Run_Build_System
|
||||
else
|
||||
echo ""
|
||||
echo "Can't find cache file (config.cache), aborting..."
|
||||
fi
|
||||
exit 0
|
||||
fi
|
||||
shift 1
|
||||
if [ $1 = "--help" ] ; then
|
||||
echo "Config utility for Anope"
|
||||
echo "------------------------"
|
||||
echo "Syntax: ./Config [options]"
|
||||
echo "-nocache Ignore settings saved in config.cache"
|
||||
echo "-nointro Skip intro (disclaimer, etc)"
|
||||
echo "-quick Skip questions, go straight to configure"
|
||||
exit 0
|
||||
elif [ $1 = "-nocache" ] ; then
|
||||
IGNORE_CACHE="1"
|
||||
elif [ $1 = "-nointro" ] ; then
|
||||
NO_INTRO="1"
|
||||
elif [ $1 = "-quick" -o $1 = "-q" ] ; then
|
||||
Load_Cache
|
||||
if [ $CAN_QUICK = "yes" ] ; then
|
||||
Run_Configure
|
||||
else
|
||||
echo ""
|
||||
echo "Can't find cache file (config.cache), aborting..."
|
||||
fi
|
||||
exit 0
|
||||
fi
|
||||
shift 1
|
||||
done
|
||||
|
||||
###########################################################################
|
||||
# Check for CMake and (optionally) install it
|
||||
###########################################################################
|
||||
|
||||
cmake --version 2>&1 > /dev/null
|
||||
if [ $? -ne 0 ] ; then
|
||||
clear
|
||||
echo "Anope requires CMake 3.20 or newer, which can be downloaded at https://cmake.org/ or through your system's package manager."
|
||||
echo "If you have installed CMake already, ensure it is in your PATH environment variable."
|
||||
exit 0
|
||||
fi
|
||||
|
||||
###########################################################################
|
||||
|
||||
if [ ! "$NO_INTRO" ] ; then
|
||||
export MORE='-e'
|
||||
cat $SOURCE_DIR/.BANNER | sed "s/CURVER/$VERSION_MAJOR.$VERSION_MINOR.$VERSION_PATCH$VERSION_EXTRA/" | sed "s@SOURCE_DIR@$SOURCE_DIR@" | more
|
||||
echo ""
|
||||
clear
|
||||
. ./version.log
|
||||
cat .BANNER | sed "s/CURVER/$VERSION_MAJOR.$VERSION_MINOR.$VERSION_PATCH$VERSION_EXTRA/" | more
|
||||
echo ""
|
||||
else
|
||||
echo ""
|
||||
echo ""
|
||||
fi
|
||||
|
||||
echo "Beginning Anope configuration."
|
||||
echo "Beginning Services configuration."
|
||||
echo ""
|
||||
|
||||
###########################################################################
|
||||
# Load the cache
|
||||
###########################################################################
|
||||
|
||||
if [ ! "$IGNORE_CACHE" ] ; then
|
||||
Load_Cache
|
||||
Load_Cache
|
||||
fi
|
||||
|
||||
# Ask the user anything we need to know ahead of time.
|
||||
@@ -165,47 +150,21 @@ export ok INPUT
|
||||
|
||||
####
|
||||
|
||||
TEMP_YN="n"
|
||||
if [ "$DEVEL" = "yes" ] ; then
|
||||
TEMP_YN="y"
|
||||
fi
|
||||
echo "You are building the 2.1 development branch. This branch is not as well tested"
|
||||
echo "as the 2.0 stable branch and may have compatibility breaks without notice. Are"
|
||||
echo "you sure you want to use this version?"
|
||||
echo -n "[$TEMP_YN] "
|
||||
read YN
|
||||
if [ "$YN" ] ; then
|
||||
if [ "$YN" = "y" ] ; then
|
||||
DEVEL="yes"
|
||||
else
|
||||
DEVEL="no"
|
||||
fi
|
||||
fi
|
||||
echo ""
|
||||
|
||||
if [ "$DEVEL" != "yes" ] ; then
|
||||
echo "If you are building from Git you can run \`git checkout 2.0\` to get the latest"
|
||||
echo "stable code. Otherwise, you can download the latest 2.0 release tarball from"
|
||||
echo "https://github.com/anope/anope/releases/latest"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
####
|
||||
|
||||
ok=0
|
||||
echo "In what directory should Anope be installed?"
|
||||
echo "Note: press Return for the default, or enter a new value."
|
||||
echo "In what directory do you want the binaries to be installed?"
|
||||
while [ $ok -eq 0 ] ; do
|
||||
echo -n "[$INSTDIR] "
|
||||
echo2 "[$BINDEST] "
|
||||
if read INPUT ; then : ; else echo "" ; exit 1 ; fi
|
||||
if [ ! "$INPUT" ] ; then
|
||||
INPUT=$INSTDIR
|
||||
INPUT=$BINDEST
|
||||
fi
|
||||
if [ ! -d "$INPUT" ] ; then
|
||||
if [ -e "$INPUT" ]; then
|
||||
if exists "$INPUT" ; then
|
||||
echo "$INPUT exists, but is not a directory!"
|
||||
else
|
||||
echo "$INPUT does not exist. Create it?"
|
||||
echo -n "[y] "
|
||||
echo2 "[y] "
|
||||
read YN
|
||||
if [ "$YN" != "n" ] ; then
|
||||
if mkdir -p $INPUT ; then
|
||||
@@ -213,161 +172,154 @@ while [ $ok -eq 0 ] ; do
|
||||
fi
|
||||
fi
|
||||
fi
|
||||
elif [ -e "$INPUT/include/services.h" ]; then
|
||||
echo "You cannot use the Anope source directory as a target directory."
|
||||
elif exists "$INPUT/include/services.h" ; then
|
||||
echo "You cannot use the Services source directory as a target directory."
|
||||
else
|
||||
ok=1
|
||||
fi
|
||||
done
|
||||
INSTDIR=$INPUT
|
||||
BINDEST=$INPUT
|
||||
DATDEST=$INPUT
|
||||
echo ""
|
||||
|
||||
|
||||
####
|
||||
|
||||
ok=0
|
||||
echo "Where do you want the data files to be installed?"
|
||||
while [ $ok -eq 0 ] ; do
|
||||
echo2 "[$DATDEST] "
|
||||
if read INPUT ; then : ; else echo "" ; exit 1 ; fi
|
||||
if [ ! "$INPUT" ] ; then
|
||||
INPUT=$DATDEST
|
||||
fi
|
||||
if [ ! -d "$INPUT" ] ; then
|
||||
if exists "$INPUT" ; then
|
||||
echo "$INPUT exists, but is not a directory!"
|
||||
else
|
||||
echo "$INPUT does not exist. Create it?"
|
||||
echo2 "[y] "
|
||||
read YN
|
||||
if [ "$YN" != "n" ] ; then
|
||||
if mkdir -p $INPUT ; then
|
||||
ok=1
|
||||
fi
|
||||
fi
|
||||
fi
|
||||
elif exists "$INPUT/include/services.h" ; then
|
||||
echo "You cannot use the Services source directory as a target directory."
|
||||
else
|
||||
ok=1
|
||||
fi
|
||||
done
|
||||
DATDEST=$INPUT
|
||||
echo ""
|
||||
|
||||
####
|
||||
|
||||
|
||||
OLD_RUNGROUP="$RUNGROUP"
|
||||
if [ "$RUNGROUP" ] ; then
|
||||
echo "Which group should all Anope data files be owned by? (If Anope"
|
||||
echo "should not force files to be owned by a particular group, type \"none\""
|
||||
echo "(without the quotes) and press Return.)"
|
||||
echo "Which group should all Services data files be owned by? (If Services"
|
||||
echo "should not force files to be owned by a particular group, type "\"none\"
|
||||
echo "(without the quotes) and press Return.)"
|
||||
else
|
||||
echo "Which group should all Anope data files be owned by? (If Anope"
|
||||
echo "should not force files to be owned by a particular group, just press"
|
||||
echo "Return.)"
|
||||
echo "Which group should all Services data files be owned by? (If Services"
|
||||
echo "should not force files to be owned by a particular group, just press"
|
||||
echo "Return.)"
|
||||
fi
|
||||
echo -n "[$RUNGROUP] "
|
||||
echo2 "[$RUNGROUP] "
|
||||
if read INPUT ; then : ; else echo "" ; exit 1 ; fi
|
||||
if [ "$INPUT" ] ; then
|
||||
if [ "$INPUT" = "none" ] ; then
|
||||
RUNGROUP=""
|
||||
else
|
||||
RUNGROUP="$INPUT"
|
||||
fi
|
||||
if [ "$INPUT" = "none" ] ; then
|
||||
RUNGROUP=""
|
||||
else
|
||||
RUNGROUP="$INPUT"
|
||||
fi
|
||||
fi
|
||||
echo ""
|
||||
|
||||
####
|
||||
|
||||
if [ ! "$UMASK" -o "$RUNGROUP" != "$OLD_RUNGROUP" ] ; then
|
||||
if [ "$RUNGROUP" ] ; then
|
||||
UMASK=007
|
||||
else
|
||||
UMASK=077
|
||||
fi
|
||||
if [ "$RUNGROUP" ] ; then
|
||||
UMASK=007
|
||||
else
|
||||
UMASK=077
|
||||
fi
|
||||
fi
|
||||
|
||||
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
|
||||
echo -n "[$UMASK] "
|
||||
if read INPUT ; then : ; else echo "" ; exit 1 ; fi
|
||||
if [ ! "$INPUT" ] ; then
|
||||
INPUT=$UMASK
|
||||
fi
|
||||
if [ `echo "$INPUT" | grep -c '[^0-7]'` -gt 0 ] ; then
|
||||
echo "$UMASK is not a valid octal number!"
|
||||
else
|
||||
if [ "`echo $INPUT | cut -c1`" != "0" ] ; then
|
||||
INPUT=0$INPUT
|
||||
fi
|
||||
ok=1
|
||||
fi
|
||||
echo2 "[$UMASK] "
|
||||
if read INPUT ; then : ; else echo "" ; exit 1 ; fi
|
||||
if [ ! "$INPUT" ] ; then
|
||||
INPUT=$UMASK
|
||||
fi
|
||||
if [ `echo "$INPUT" | grep -c '[^0-7]'` -gt 0 ] ; then
|
||||
echo "$UMASK is not a valid octal number!"
|
||||
else
|
||||
if [ "`echo $INPUT | cut -c1`" != "0" ] ; then
|
||||
INPUT=0$INPUT
|
||||
fi
|
||||
ok=1
|
||||
fi
|
||||
done
|
||||
UMASK=$INPUT
|
||||
echo ""
|
||||
|
||||
####
|
||||
|
||||
TEMP_YN="n"
|
||||
if [ "$DEBUG" = "yes" ] ; then
|
||||
TEMP_YN="y"
|
||||
fi
|
||||
echo "Would you like to build a debug version of Anope?"
|
||||
echo -n "[$TEMP_YN] "
|
||||
read YN
|
||||
if [ "$YN" ] ; then
|
||||
if [ "$YN" = "y" ] ; then
|
||||
DEBUG="yes"
|
||||
else
|
||||
DEBUG="no"
|
||||
fi
|
||||
fi
|
||||
ok=0
|
||||
DEF=yes
|
||||
echo "Allow anope to automatically check for mysql libaries?"
|
||||
echo "unless you get errors with make, there is no need to"
|
||||
echo "change this setting."
|
||||
while [ $ok -eq 0 ] ; do
|
||||
echo2 "[$DEF] "
|
||||
if read INPUT ; then : ; else echo "" ; exit 1 ; fi
|
||||
if [ ! "$INPUT" ] ; then
|
||||
INPUT=$DEF
|
||||
fi
|
||||
case $INPUT in
|
||||
n*|N*)
|
||||
MYSQL=
|
||||
ok=1
|
||||
;;
|
||||
y*|Y*)
|
||||
MYSQL="yes"
|
||||
ok=1
|
||||
;;
|
||||
*)
|
||||
echo "Please enter 'yes' or 'no'."
|
||||
;;
|
||||
esac
|
||||
done
|
||||
echo ""
|
||||
|
||||
####
|
||||
|
||||
echo "Are there any extra include directories you wish to use?"
|
||||
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."
|
||||
echo -n "[$EXTRA_INCLUDE_DIRS] "
|
||||
if read INPUT ; then : ; else echo "" ; exit 1 ; fi
|
||||
if [ "$INPUT" ] ; then
|
||||
if [ "$INPUT" = "NONE" ] ; then
|
||||
EXTRA_INCLUDE_DIRS=""
|
||||
else
|
||||
EXTRA_INCLUDE_DIRS=$INPUT
|
||||
fi
|
||||
fi
|
||||
echo ""
|
||||
|
||||
####
|
||||
|
||||
echo "Are there any extra library directories you wish to use?"
|
||||
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."
|
||||
echo -n "[$EXTRA_LIB_DIRS] "
|
||||
if read INPUT ; then : ; else echo "" ; exit 1 ; fi
|
||||
if [ "$INPUT" ] ; then
|
||||
if [ "$INPUT" = "NONE" ] ; then
|
||||
EXTRA_LIB_DIRS=""
|
||||
else
|
||||
EXTRA_LIB_DIRS=$INPUT
|
||||
fi
|
||||
fi
|
||||
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."
|
||||
echo -n "[$EXTRA_CONFIG_ARGS] "
|
||||
if read INPUT ; then : ; else echo "" ; exit 1 ; fi
|
||||
if [ "$INPUT" ] ; then
|
||||
if [ "$INPUT" = "NONE" ] ; then
|
||||
EXTRA_CONFIG_ARGS=""
|
||||
else
|
||||
EXTRA_CONFIG_ARGS=$INPUT
|
||||
fi
|
||||
fi
|
||||
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"
|
||||
cat <<EOT >config.cache
|
||||
BINDEST="$BINDEST"
|
||||
DATDEST="$DATDEST"
|
||||
RUNGROUP="$RUNGROUP"
|
||||
UMASK=$UMASK
|
||||
DEBUG="$DEBUG"
|
||||
DEVEL="$DEVEL"
|
||||
EXTRA_INCLUDE_DIRS="$EXTRA_INCLUDE_DIRS"
|
||||
EXTRA_LIB_DIRS="$EXTRA_LIB_DIRS"
|
||||
EXTRA_CONFIG_ARGS="$EXTRA_CONFIG_ARGS"
|
||||
IRCTYPE="$IRCTYPE"
|
||||
IRCTYPE_DEF="$IRCTYPE_DEF"
|
||||
MYSQL="$MYSQL"
|
||||
EOT
|
||||
echo "done."
|
||||
|
||||
|
||||
################################################################################
|
||||
# Build the build system string
|
||||
# Build the configure string
|
||||
################################################################################
|
||||
|
||||
Run_Build_System
|
||||
Run_Configure
|
||||
|
||||
@@ -0,0 +1,3 @@
|
||||
@echo off
|
||||
cscript /nologo install.js
|
||||
|
||||
+131
@@ -0,0 +1,131 @@
|
||||
CC=@CC@
|
||||
INCLUDEDIR=../include
|
||||
ANOPELIBS=@ANOPELIBS@
|
||||
CFLAGS=@CFLAGS@
|
||||
STRICT=-Wall -ansi -pedantic
|
||||
PROFILE=-pg
|
||||
LDPROFILE=
|
||||
SHELL=/bin/sh
|
||||
SUBDIRS=src
|
||||
BINDEST=@BINDEST@
|
||||
DATDEST=@DATDEST@
|
||||
INSTALL=@INSTALL@
|
||||
RM=@RM@
|
||||
CP=@CP@
|
||||
TOUCH=@TOUCH@
|
||||
MODULE_PATH=@MODULE_PATH@
|
||||
MYSQL=@MYSQL@
|
||||
RDB=@RDB@
|
||||
LDFLAGS=@LDFLAGS@
|
||||
RUNGROUP=@RUNGROUP@
|
||||
SHARED=@SHARED@
|
||||
MODULEFLAGS=@MODULEFLAGS@
|
||||
|
||||
all: language headers build core protocols tools modules
|
||||
strict: language headers strict_build strict_core strict_protocols strict_tools strict_modules
|
||||
profile: language headers profile_build profile_core profile_protocols profile_tools profile_modules
|
||||
|
||||
MAKEARGS = 'CFLAGS=${CFLAGS}' 'CC=${CC}' 'ANOPELIBS=${ANOPELIBS}' \
|
||||
'LDFLAGS=${LDFLAGS}' 'BINDEST=${BINDEST}' 'INSTALL=${INSTALL}' \
|
||||
'INCLUDEDIR=${INCLUDEDIR}' 'RM=${RM}' 'CP=${CP}' \
|
||||
'TOUCH=${TOUCH}' 'SHELL=${SHELL}' 'DATDEST=${DATDEST}' \
|
||||
'RUNGROUP=${RUNGROUP}' 'MODULE_PATH=${MODULE_PATH}' 'RDB=${RDB}'\
|
||||
'MYSQL=${MYSQL}' 'SHARED=${SHARED}' 'MODULEFLAGS=${MODULEFLAGS}'
|
||||
|
||||
build: language headers
|
||||
@for i in $(SUBDIRS); do \
|
||||
echo "*** Building $$i";\
|
||||
( cd $$i; ${MAKE} ${MAKEARGS} all; ) \
|
||||
done
|
||||
|
||||
strict_build:
|
||||
@for i in $(SUBDIRS); do \
|
||||
echo "*** Strict Building $$i";\
|
||||
( cd $$i; ${MAKE} ${MAKEARGS} 'CFLAGS=${CFLAGS} $(STRICT)' all; ) \
|
||||
done
|
||||
|
||||
profile_build:
|
||||
@for i in $(SUBDIRS); do \
|
||||
echo "*** Strict Building $$i";\
|
||||
( cd $$i; ${MAKE} ${MAKEARGS} 'CFLAGS=${CFLAGS} $(PROFILE)' 'LDFLAGS=${LDFLAGS} ${PROFILE}' all; ) \
|
||||
done
|
||||
|
||||
modules: build
|
||||
(cd src/modules ; ./configure ; ${MAKE} ${MAKEARGS} all; )
|
||||
@echo "*** All done, now (g)make install to install Anope/Modules";
|
||||
|
||||
clean_modules:
|
||||
(cd src ; ${MAKE} ${MAKEARGS} clean_modules )
|
||||
|
||||
distclean_modules:
|
||||
(cd src ; ${MAKE} ${MAKEARGS} distclean_modules )
|
||||
|
||||
protocols: build
|
||||
@echo "*** Building protocol support";
|
||||
(cd src/protocol ; ./configure ; ${MAKE} ${MAKEARGS} all; )
|
||||
|
||||
strict_protocols: build
|
||||
@echo "*** Building protocol support";
|
||||
(cd src/protocol ; ./configure ; ${MAKE} ${MAKEARGS} 'CFLAGS=${CFLAGS} $(STRICT)' all; )
|
||||
|
||||
profile_protocols: build
|
||||
@echo "*** Building protocol support";
|
||||
(cd src/protocol ; ./configure ; ${MAKE} ${MAKEARGS} 'CFLAGS=${CFLAGS} ${PROFILE}' 'PROFILE=${PROFILE}' all; )
|
||||
|
||||
core: build
|
||||
@echo "*** Building Core modules";
|
||||
(cd src/ ; ${MAKE} ${MAKEARGS} core; )
|
||||
|
||||
strict_core: build
|
||||
@echo "*** Building Core modules";
|
||||
(cd src/ ; ${MAKE} ${MAKEARGS} 'CFLAGS=${CFLAGS} $(STRICT)' core; )
|
||||
|
||||
profile_core: build
|
||||
@echo "*** Building Core modules";
|
||||
(cd src/ ; ${MAKE} ${MAKEARGS} 'CFLAGS=${CFLAGS} ${PROFILE}' 'PROFILE=${PROFILE}' core; )
|
||||
|
||||
tools: build
|
||||
(cd src/tools ; ${MAKE} ${MAKEARGS} all; )
|
||||
@echo "*** All done, now (g)make install to install Anope/Modules/Tools";
|
||||
|
||||
strict_tools: strict_build
|
||||
(cd src/tools ; ${MAKE} ${MAKEARGS} 'CFLAGS=${CFLAGS} $(STRICT)' all; )
|
||||
@echo "*** All done, now (g)make install to install Anope/Modules/Tools";
|
||||
|
||||
profile_tools: profile_build
|
||||
(cd src/tools ; ${MAKE} ${MAKEARGS} 'CFLAGS=${CFLAGS} $(PROFILE)' all; )
|
||||
@echo "*** All done, now (g)make install to install Anope/Modules/Tools";
|
||||
|
||||
strict_modules: strict_build
|
||||
(cd src/modules ; ./configure ; ${MAKE} ${MAKEARGS} 'CFLAGS=$(CFLAGS) $(STRICT)' all; )
|
||||
@echo "*** All done, now (g)make install to install Anope/Modules";
|
||||
|
||||
profile_modules: profile_build
|
||||
(cd src/modules ; ./configure ; ${MAKE} ${MAKEARGS} 'CFLAGS=${CFLAGS} ${PROFILE}' 'PROFILE=${PROFILE}' all; )
|
||||
@echo "*** All done, now (g)make install to install Anope/Modules";
|
||||
|
||||
language:
|
||||
(cd lang ; $(MAKE) ${MAKEARGS} all language.h ; )
|
||||
|
||||
headers:
|
||||
(cd include ; ${MAKE} ${MAKEARGS} )
|
||||
|
||||
clean:
|
||||
(cd lang ; ${MAKE} ${MAKEARGS} clean )
|
||||
(cd include ; ${MAKE} ${MAKEARGS} clean )
|
||||
(cd src ; ${MAKE} ${MAKEARGS} clean )
|
||||
(cd src/tools ; ${MAKE} ${MAKEARGS} clean )
|
||||
|
||||
distclean: clean
|
||||
(cd lang ; ${MAKE} distclean )
|
||||
(cd include ; ${MAKE} distclean )
|
||||
(cd src ; ${MAKE} distclean )
|
||||
(cd src/tools ; ${MAKE} distclean )
|
||||
rm -f config.log config.status config.cache Makefile src/bin/anoperc
|
||||
|
||||
install: DUMMY
|
||||
(cd src ; ${MAKE} ${MAKEARGS} install)
|
||||
(cd src/tools ; ${MAKE} ${MAKEARGS} install)
|
||||
@echo "*** All done, Anope is now installed. Please read docs/INSTALL for details on what to do now.";
|
||||
|
||||
DUMMY:
|
||||
@@ -0,0 +1,96 @@
|
||||
# Makefile for Anope.
|
||||
#
|
||||
# (C) 2003-2009 Anope Team
|
||||
# Contact us at team@anope.org
|
||||
#
|
||||
# This program is free but copyrighted software; see the file COPYING for
|
||||
# details.
|
||||
#
|
||||
# Based on the original code of Epona by Lara.
|
||||
# Based on the original code of Services by Andy Church.
|
||||
|
||||
include Makefile.inc.win32
|
||||
|
||||
###########################################################################
|
||||
|
||||
all: src core protocols languages tools modules install
|
||||
|
||||
src: include\version.h include\sysconf.h include\language.h include\sysconf.h
|
||||
cd src && $(MAKE) && cd ..
|
||||
|
||||
install:
|
||||
-@mkdir $(DATDEST)\backups
|
||||
-@mkdir $(DATDEST)\logs
|
||||
-@mkdir $(DATDEST)\languages
|
||||
cd lang && $(MAKE) install && cd ..
|
||||
cd src && $(MAKE) install && cd ..
|
||||
cd src\modules && $(MAKE) install && cd ..
|
||||
cd src\modules && $(MAKE) subs-install && cd ..
|
||||
cd src\protocol && $(MAKE) install && cd ..
|
||||
cd src\core && $(MAKE) install && cd ..
|
||||
cd src\tools && $(MAKE) install && cd ..
|
||||
-@echo ---
|
||||
-@echo Anope has been installed successfully!
|
||||
-@echo See docs\INSTALL for details on how to configure Anope for use.
|
||||
-@echo ---
|
||||
|
||||
spotless:
|
||||
cd lang && $(MAKE) spotless && cd ..
|
||||
cd src && $(MAKE) spotless && cd ..
|
||||
cd src\modules && $(MAKE) spotless && cd ..\..
|
||||
cd src\protocol && $(MAKE) spotless && cd ..\..
|
||||
cd src\core && $(MAKE) spotless && cd ..\..
|
||||
cd src\tools && $(MAKE) spotless && cd ..\..
|
||||
-@erase include\language.h include\version.h *.manifest *~ anope.exe version.sh.exe *.obj anopesmtp.exe
|
||||
-@echo --
|
||||
-@echo NOTICE:
|
||||
-@echo You will need to run cscript /nologo install.js again
|
||||
-@echo --
|
||||
|
||||
mypasql:
|
||||
$(MYPASQL_BUILD)
|
||||
|
||||
distclean: spotless
|
||||
|
||||
clean: spotless
|
||||
|
||||
###########################################################################
|
||||
|
||||
|
||||
languages: FRC
|
||||
cd lang && $(MAKE) && cd ..
|
||||
|
||||
tools: FRC
|
||||
cd src\tools && $(MAKE) && cd ..\..
|
||||
|
||||
core: FRC
|
||||
cd src\core && $(MAKE) && cd ..\..
|
||||
|
||||
protocols: FRC
|
||||
cd src\protocol && $(MAKE) && cd ..\..
|
||||
|
||||
modules: FRC
|
||||
cd src\modules && $(MAKE) && cd ..\..
|
||||
|
||||
###########################################################################
|
||||
|
||||
include\sysconf.h:
|
||||
copy include\sysconf.h.win32 include\sysconf.h
|
||||
|
||||
lang\language.h: lang\Makefile lang\index
|
||||
cd lang && $(MAKE) language.h && cd ..
|
||||
|
||||
lang\index:
|
||||
cd lang && $(MAKE) index && cd ..
|
||||
|
||||
include\language.h: lang\language.h
|
||||
cd lang && copy language.h ..\include\language.h && cd ..
|
||||
|
||||
include\version.h: version.sh.exe version.log include\services.h include\pseudo.h include\messages.h
|
||||
version.sh.exe
|
||||
move version.h include\version.h
|
||||
|
||||
version.sh.exe:
|
||||
$(CC) $(BASE_CFLAGS) include\version.sh.c /link $(LFLAGS)
|
||||
|
||||
FRC:
|
||||
@@ -1,46 +0,0 @@
|
||||
## About
|
||||
|
||||
Anope is an open source set of IRC services. It is highly modular, with a vast number of configurable parameters, and is the most used IRC services package. There are also many modules on the [modsite](https://modules.anope.org) to add additional features. It runs on Linux, BSD, and Windows, and supports many modern IRCds, including InspIRCd, UnrealIRCd, and ircd-hybrid. For more details, credits, command line options, and contact information see [docs/README](https://github.com/anope/anope/blob/2.0/docs/README).
|
||||
|
||||
* [Website](https://anope.org)
|
||||
* [GitHub](https://github.com/anope)
|
||||
* IRC \#anope on irc.teranova.net
|
||||
|
||||
## Installation
|
||||
|
||||
### Linux/BSD
|
||||
Download the latest release off of the [releases page](https://github.com/anope/anope/releases).
|
||||
|
||||
|
||||
```
|
||||
$ ./Config
|
||||
$ cd build
|
||||
$ make
|
||||
$ make install
|
||||
```
|
||||
|
||||
Now change to the directory where you installed Anope to, e.g. `$ cd ~/anope/`
|
||||
|
||||
### Windows
|
||||
Download the latest release off of the [releases page](https://github.com/anope/anope/releases) and run the installer.
|
||||
|
||||
|
||||
## Configuration
|
||||
|
||||
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 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.
|
||||
|
||||
## Running
|
||||
|
||||
Run `$ ./bin/anope` to start Anope. If asked to provide logs for support, use the `--support` flag, e.g.: `$ ./bin/anope --support`
|
||||
|
||||
## Installing extra modules
|
||||
|
||||
Extra modules, which are usually modules which require extra libraries to use, such as m\_mysql, can be enabled with the `./extras` command from the source directory. Then re-run `Config`, `make` and `make install` again. Third party modules can be installed by placing them into the `modules/third` directory.
|
||||
Vendored
+863
@@ -0,0 +1,863 @@
|
||||
dnl aclocal.m4 generated automatically by aclocal 1.4-p6
|
||||
|
||||
dnl Copyright (C) 1994, 1995-8, 1999, 2001 Free Software Foundation, Inc.
|
||||
dnl This file is free software; the Free Software Foundation
|
||||
dnl gives unlimited permission to copy and/or distribute it,
|
||||
dnl with or without modifications, as long as this notice is preserved.
|
||||
|
||||
dnl This program is distributed in the hope that it will be useful,
|
||||
dnl but WITHOUT ANY WARRANTY, to the extent permitted by law; without
|
||||
dnl even the implied warranty of MERCHANTABILITY or FITNESS FOR A
|
||||
dnl PARTICULAR PURPOSE.
|
||||
|
||||
# lib-prefix.m4 serial 4 (gettext-0.14.2)
|
||||
dnl Copyright (C) 2001-2005 Free Software Foundation, Inc.
|
||||
dnl This file is free software; the Free Software Foundation
|
||||
dnl gives unlimited permission to copy and/or distribute it,
|
||||
dnl with or without modifications, as long as this notice is preserved.
|
||||
|
||||
dnl From Bruno Haible.
|
||||
|
||||
dnl AC_LIB_ARG_WITH is synonymous to AC_ARG_WITH in autoconf-2.13, and
|
||||
dnl similar to AC_ARG_WITH in autoconf 2.52...2.57 except that is doesn't
|
||||
dnl require excessive bracketing.
|
||||
ifdef([AC_HELP_STRING],
|
||||
[AC_DEFUN([AC_LIB_ARG_WITH], [AC_ARG_WITH([$1],[[$2]],[$3],[$4])])],
|
||||
[AC_DEFUN([AC_][LIB_ARG_WITH], [AC_ARG_WITH([$1],[$2],[$3],[$4])])])
|
||||
|
||||
dnl AC_LIB_PREFIX adds to the CPPFLAGS and LDFLAGS the flags that are needed
|
||||
dnl to access previously installed libraries. The basic assumption is that
|
||||
dnl a user will want packages to use other packages he previously installed
|
||||
dnl with the same --prefix option.
|
||||
dnl This macro is not needed if only AC_LIB_LINKFLAGS is used to locate
|
||||
dnl libraries, but is otherwise very convenient.
|
||||
AC_DEFUN([AC_LIB_PREFIX],
|
||||
[
|
||||
AC_BEFORE([$0], [AC_LIB_LINKFLAGS])
|
||||
AC_REQUIRE([AC_PROG_CC])
|
||||
AC_REQUIRE([AC_CANONICAL_HOST])
|
||||
AC_REQUIRE([AC_LIB_PREPARE_PREFIX])
|
||||
dnl By default, look in $includedir and $libdir.
|
||||
use_additional=yes
|
||||
AC_LIB_WITH_FINAL_PREFIX([
|
||||
eval additional_includedir=\"$includedir\"
|
||||
eval additional_libdir=\"$libdir\"
|
||||
])
|
||||
AC_LIB_ARG_WITH([lib-prefix],
|
||||
[ --with-lib-prefix[=DIR] search for libraries in DIR/include and DIR/lib
|
||||
--without-lib-prefix don't search for libraries in includedir and libdir],
|
||||
[
|
||||
if test "X$withval" = "Xno"; then
|
||||
use_additional=no
|
||||
else
|
||||
if test "X$withval" = "X"; then
|
||||
AC_LIB_WITH_FINAL_PREFIX([
|
||||
eval additional_includedir=\"$includedir\"
|
||||
eval additional_libdir=\"$libdir\"
|
||||
])
|
||||
else
|
||||
additional_includedir="$withval/include"
|
||||
additional_libdir="$withval/lib"
|
||||
fi
|
||||
fi
|
||||
])
|
||||
if test $use_additional = yes; then
|
||||
dnl Potentially add $additional_includedir to $CPPFLAGS.
|
||||
dnl But don't add it
|
||||
dnl 1. if it's the standard /usr/include,
|
||||
dnl 2. if it's already present in $CPPFLAGS,
|
||||
dnl 3. if it's /usr/local/include and we are using GCC on Linux,
|
||||
dnl 4. if it doesn't exist as a directory.
|
||||
if test "X$additional_includedir" != "X/usr/include"; then
|
||||
haveit=
|
||||
for x in $CPPFLAGS; do
|
||||
AC_LIB_WITH_FINAL_PREFIX([eval x=\"$x\"])
|
||||
if test "X$x" = "X-I$additional_includedir"; then
|
||||
haveit=yes
|
||||
break
|
||||
fi
|
||||
done
|
||||
if test -z "$haveit"; then
|
||||
if test "X$additional_includedir" = "X/usr/local/include"; then
|
||||
if test -n "$GCC"; then
|
||||
case $host_os in
|
||||
linux* | gnu* | k*bsd*-gnu) haveit=yes;;
|
||||
esac
|
||||
fi
|
||||
fi
|
||||
if test -z "$haveit"; then
|
||||
if test -d "$additional_includedir"; then
|
||||
dnl Really add $additional_includedir to $CPPFLAGS.
|
||||
CPPFLAGS="${CPPFLAGS}${CPPFLAGS:+ }-I$additional_includedir"
|
||||
fi
|
||||
fi
|
||||
fi
|
||||
fi
|
||||
dnl Potentially add $additional_libdir to $LDFLAGS.
|
||||
dnl But don't add it
|
||||
dnl 1. if it's the standard /usr/lib,
|
||||
dnl 2. if it's already present in $LDFLAGS,
|
||||
dnl 3. if it's /usr/local/lib and we are using GCC on Linux,
|
||||
dnl 4. if it doesn't exist as a directory.
|
||||
if test "X$additional_libdir" != "X/usr/lib"; then
|
||||
haveit=
|
||||
for x in $LDFLAGS; do
|
||||
AC_LIB_WITH_FINAL_PREFIX([eval x=\"$x\"])
|
||||
if test "X$x" = "X-L$additional_libdir"; then
|
||||
haveit=yes
|
||||
break
|
||||
fi
|
||||
done
|
||||
if test -z "$haveit"; then
|
||||
if test "X$additional_libdir" = "X/usr/local/lib"; then
|
||||
if test -n "$GCC"; then
|
||||
case $host_os in
|
||||
linux*) haveit=yes;;
|
||||
esac
|
||||
fi
|
||||
fi
|
||||
if test -z "$haveit"; then
|
||||
if test -d "$additional_libdir"; then
|
||||
dnl Really add $additional_libdir to $LDFLAGS.
|
||||
LDFLAGS="${LDFLAGS}${LDFLAGS:+ }-L$additional_libdir"
|
||||
fi
|
||||
fi
|
||||
fi
|
||||
fi
|
||||
fi
|
||||
])
|
||||
|
||||
dnl AC_LIB_PREPARE_PREFIX creates variables acl_final_prefix,
|
||||
dnl acl_final_exec_prefix, containing the values to which $prefix and
|
||||
dnl $exec_prefix will expand at the end of the configure script.
|
||||
AC_DEFUN([AC_LIB_PREPARE_PREFIX],
|
||||
[
|
||||
dnl Unfortunately, prefix and exec_prefix get only finally determined
|
||||
dnl at the end of configure.
|
||||
if test "X$prefix" = "XNONE"; then
|
||||
acl_final_prefix="$ac_default_prefix"
|
||||
else
|
||||
acl_final_prefix="$prefix"
|
||||
fi
|
||||
if test "X$exec_prefix" = "XNONE"; then
|
||||
acl_final_exec_prefix='${prefix}'
|
||||
else
|
||||
acl_final_exec_prefix="$exec_prefix"
|
||||
fi
|
||||
acl_save_prefix="$prefix"
|
||||
prefix="$acl_final_prefix"
|
||||
eval acl_final_exec_prefix=\"$acl_final_exec_prefix\"
|
||||
prefix="$acl_save_prefix"
|
||||
])
|
||||
|
||||
dnl AC_LIB_WITH_FINAL_PREFIX([statement]) evaluates statement, with the
|
||||
dnl variables prefix and exec_prefix bound to the values they will have
|
||||
dnl at the end of the configure script.
|
||||
AC_DEFUN([AC_LIB_WITH_FINAL_PREFIX],
|
||||
[
|
||||
acl_save_prefix="$prefix"
|
||||
prefix="$acl_final_prefix"
|
||||
acl_save_exec_prefix="$exec_prefix"
|
||||
exec_prefix="$acl_final_exec_prefix"
|
||||
$1
|
||||
exec_prefix="$acl_save_exec_prefix"
|
||||
prefix="$acl_save_prefix"
|
||||
])
|
||||
|
||||
# lib-link.m4 serial 6 (gettext-0.14.3)
|
||||
dnl Copyright (C) 2001-2005 Free Software Foundation, Inc.
|
||||
dnl This file is free software; the Free Software Foundation
|
||||
dnl gives unlimited permission to copy and/or distribute it,
|
||||
dnl with or without modifications, as long as this notice is preserved.
|
||||
|
||||
dnl From Bruno Haible.
|
||||
|
||||
AC_PREREQ(2.50)
|
||||
|
||||
dnl AC_LIB_LINKFLAGS(name [, dependencies]) searches for libname and
|
||||
dnl the libraries corresponding to explicit and implicit dependencies.
|
||||
dnl Sets and AC_SUBSTs the LIB${NAME} and LTLIB${NAME} variables and
|
||||
dnl augments the CPPFLAGS variable.
|
||||
AC_DEFUN([AC_LIB_LINKFLAGS],
|
||||
[
|
||||
AC_REQUIRE([AC_LIB_PREPARE_PREFIX])
|
||||
AC_REQUIRE([AC_LIB_RPATH])
|
||||
define([Name],[translit([$1],[./-], [___])])
|
||||
define([NAME],[translit([$1],[abcdefghijklmnopqrstuvwxyz./-],
|
||||
[ABCDEFGHIJKLMNOPQRSTUVWXYZ___])])
|
||||
AC_CACHE_CHECK([how to link with lib[]$1], [ac_cv_lib[]Name[]_libs], [
|
||||
AC_LIB_LINKFLAGS_BODY([$1], [$2])
|
||||
ac_cv_lib[]Name[]_libs="$LIB[]NAME"
|
||||
ac_cv_lib[]Name[]_ltlibs="$LTLIB[]NAME"
|
||||
ac_cv_lib[]Name[]_cppflags="$INC[]NAME"
|
||||
])
|
||||
LIB[]NAME="$ac_cv_lib[]Name[]_libs"
|
||||
LTLIB[]NAME="$ac_cv_lib[]Name[]_ltlibs"
|
||||
INC[]NAME="$ac_cv_lib[]Name[]_cppflags"
|
||||
AC_LIB_APPENDTOVAR([CPPFLAGS], [$INC]NAME)
|
||||
AC_SUBST([LIB]NAME)
|
||||
AC_SUBST([LTLIB]NAME)
|
||||
dnl Also set HAVE_LIB[]NAME so that AC_LIB_HAVE_LINKFLAGS can reuse the
|
||||
dnl results of this search when this library appears as a dependency.
|
||||
HAVE_LIB[]NAME=yes
|
||||
undefine([Name])
|
||||
undefine([NAME])
|
||||
])
|
||||
|
||||
dnl AC_LIB_HAVE_LINKFLAGS(name, dependencies, includes, testcode)
|
||||
dnl searches for libname and the libraries corresponding to explicit and
|
||||
dnl implicit dependencies, together with the specified include files and
|
||||
dnl the ability to compile and link the specified testcode. If found, it
|
||||
dnl sets and AC_SUBSTs HAVE_LIB${NAME}=yes and the LIB${NAME} and
|
||||
dnl LTLIB${NAME} variables and augments the CPPFLAGS variable, and
|
||||
dnl #defines HAVE_LIB${NAME} to 1. Otherwise, it sets and AC_SUBSTs
|
||||
dnl HAVE_LIB${NAME}=no and LIB${NAME} and LTLIB${NAME} to empty.
|
||||
AC_DEFUN([AC_LIB_HAVE_LINKFLAGS],
|
||||
[
|
||||
AC_REQUIRE([AC_LIB_PREPARE_PREFIX])
|
||||
AC_REQUIRE([AC_LIB_RPATH])
|
||||
define([Name],[translit([$1],[./-], [___])])
|
||||
define([NAME],[translit([$1],[abcdefghijklmnopqrstuvwxyz./-],
|
||||
[ABCDEFGHIJKLMNOPQRSTUVWXYZ___])])
|
||||
|
||||
dnl Search for lib[]Name and define LIB[]NAME, LTLIB[]NAME and INC[]NAME
|
||||
dnl accordingly.
|
||||
AC_LIB_LINKFLAGS_BODY([$1], [$2])
|
||||
|
||||
dnl Add $INC[]NAME to CPPFLAGS before performing the following checks,
|
||||
dnl because if the user has installed lib[]Name and not disabled its use
|
||||
dnl via --without-lib[]Name-prefix, he wants to use it.
|
||||
ac_save_CPPFLAGS="$CPPFLAGS"
|
||||
AC_LIB_APPENDTOVAR([CPPFLAGS], [$INC]NAME)
|
||||
|
||||
AC_CACHE_CHECK([for lib[]$1], [ac_cv_lib[]Name], [
|
||||
ac_save_LIBS="$LIBS"
|
||||
LIBS="$LIBS $LIB[]NAME"
|
||||
AC_TRY_LINK([$3], [$4], [ac_cv_lib[]Name=yes], [ac_cv_lib[]Name=no])
|
||||
LIBS="$ac_save_LIBS"
|
||||
])
|
||||
if test "$ac_cv_lib[]Name" = yes; then
|
||||
HAVE_LIB[]NAME=yes
|
||||
AC_DEFINE([HAVE_LIB]NAME, 1, [Define if you have the $1 library.])
|
||||
AC_MSG_CHECKING([how to link with lib[]$1])
|
||||
AC_MSG_RESULT([$LIB[]NAME])
|
||||
else
|
||||
HAVE_LIB[]NAME=no
|
||||
dnl If $LIB[]NAME didn't lead to a usable library, we don't need
|
||||
dnl $INC[]NAME either.
|
||||
CPPFLAGS="$ac_save_CPPFLAGS"
|
||||
LIB[]NAME=
|
||||
LTLIB[]NAME=
|
||||
fi
|
||||
AC_SUBST([HAVE_LIB]NAME)
|
||||
AC_SUBST([LIB]NAME)
|
||||
AC_SUBST([LTLIB]NAME)
|
||||
undefine([Name])
|
||||
undefine([NAME])
|
||||
])
|
||||
|
||||
dnl Determine the platform dependent parameters needed to use rpath:
|
||||
dnl libext, shlibext, hardcode_libdir_flag_spec, hardcode_libdir_separator,
|
||||
dnl hardcode_direct, hardcode_minus_L.
|
||||
AC_DEFUN([AC_LIB_RPATH],
|
||||
[
|
||||
dnl Tell automake >= 1.10 to complain if config.rpath is missing.
|
||||
m4_ifdef([AC_REQUIRE_AUX_FILE], [AC_REQUIRE_AUX_FILE([config.rpath])])
|
||||
AC_REQUIRE([AC_PROG_CC]) dnl we use $CC, $GCC, $LDFLAGS
|
||||
AC_REQUIRE([AC_LIB_PROG_LD]) dnl we use $LD, $with_gnu_ld
|
||||
AC_REQUIRE([AC_CANONICAL_HOST]) dnl we use $host
|
||||
AC_REQUIRE([AC_CONFIG_AUX_DIR_DEFAULT]) dnl we use $ac_aux_dir
|
||||
AC_CACHE_CHECK([for shared library run path origin], acl_cv_rpath, [
|
||||
CC="$CC" GCC="$GCC" LDFLAGS="$LDFLAGS" LD="$LD" with_gnu_ld="$with_gnu_ld" \
|
||||
${CONFIG_SHELL-/bin/sh} "$ac_aux_dir/config.rpath" "$host" > conftest.sh
|
||||
. ./conftest.sh
|
||||
rm -f ./conftest.sh
|
||||
acl_cv_rpath=done
|
||||
])
|
||||
wl="$acl_cv_wl"
|
||||
libext="$acl_cv_libext"
|
||||
shlibext="$acl_cv_shlibext"
|
||||
hardcode_libdir_flag_spec="$acl_cv_hardcode_libdir_flag_spec"
|
||||
hardcode_libdir_separator="$acl_cv_hardcode_libdir_separator"
|
||||
hardcode_direct="$acl_cv_hardcode_direct"
|
||||
hardcode_minus_L="$acl_cv_hardcode_minus_L"
|
||||
dnl Determine whether the user wants rpath handling at all.
|
||||
AC_ARG_ENABLE(rpath,
|
||||
[ --disable-rpath do not hardcode runtime library paths],
|
||||
:, enable_rpath=yes)
|
||||
])
|
||||
|
||||
dnl AC_LIB_LINKFLAGS_BODY(name [, dependencies]) searches for libname and
|
||||
dnl the libraries corresponding to explicit and implicit dependencies.
|
||||
dnl Sets the LIB${NAME}, LTLIB${NAME} and INC${NAME} variables.
|
||||
AC_DEFUN([AC_LIB_LINKFLAGS_BODY],
|
||||
[
|
||||
define([NAME],[translit([$1],[abcdefghijklmnopqrstuvwxyz./-],
|
||||
[ABCDEFGHIJKLMNOPQRSTUVWXYZ___])])
|
||||
dnl By default, look in $includedir and $libdir.
|
||||
use_additional=yes
|
||||
AC_LIB_WITH_FINAL_PREFIX([
|
||||
eval additional_includedir=\"$includedir\"
|
||||
eval additional_libdir=\"$libdir\"
|
||||
])
|
||||
AC_LIB_ARG_WITH([lib$1-prefix],
|
||||
[ --with-lib$1-prefix[=DIR] search for lib$1 in DIR/include and DIR/lib
|
||||
--without-lib$1-prefix don't search for lib$1 in includedir and libdir],
|
||||
[
|
||||
if test "X$withval" = "Xno"; then
|
||||
use_additional=no
|
||||
else
|
||||
if test "X$withval" = "X"; then
|
||||
AC_LIB_WITH_FINAL_PREFIX([
|
||||
eval additional_includedir=\"$includedir\"
|
||||
eval additional_libdir=\"$libdir\"
|
||||
])
|
||||
else
|
||||
additional_includedir="$withval/include"
|
||||
additional_libdir="$withval/lib"
|
||||
fi
|
||||
fi
|
||||
])
|
||||
dnl Search the library and its dependencies in $additional_libdir and
|
||||
dnl $LDFLAGS. Using breadth-first-seach.
|
||||
LIB[]NAME=
|
||||
LTLIB[]NAME=
|
||||
INC[]NAME=
|
||||
rpathdirs=
|
||||
ltrpathdirs=
|
||||
names_already_handled=
|
||||
names_next_round='$1 $2'
|
||||
while test -n "$names_next_round"; do
|
||||
names_this_round="$names_next_round"
|
||||
names_next_round=
|
||||
for name in $names_this_round; do
|
||||
already_handled=
|
||||
for n in $names_already_handled; do
|
||||
if test "$n" = "$name"; then
|
||||
already_handled=yes
|
||||
break
|
||||
fi
|
||||
done
|
||||
if test -z "$already_handled"; then
|
||||
names_already_handled="$names_already_handled $name"
|
||||
dnl See if it was already located by an earlier AC_LIB_LINKFLAGS
|
||||
dnl or AC_LIB_HAVE_LINKFLAGS call.
|
||||
uppername=`echo "$name" | sed -e 'y|abcdefghijklmnopqrstuvwxyz./-|ABCDEFGHIJKLMNOPQRSTUVWXYZ___|'`
|
||||
eval value=\"\$HAVE_LIB$uppername\"
|
||||
if test -n "$value"; then
|
||||
if test "$value" = yes; then
|
||||
eval value=\"\$LIB$uppername\"
|
||||
test -z "$value" || LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }$value"
|
||||
eval value=\"\$LTLIB$uppername\"
|
||||
test -z "$value" || LTLIB[]NAME="${LTLIB[]NAME}${LTLIB[]NAME:+ }$value"
|
||||
else
|
||||
dnl An earlier call to AC_LIB_HAVE_LINKFLAGS has determined
|
||||
dnl that this library doesn't exist. So just drop it.
|
||||
:
|
||||
fi
|
||||
else
|
||||
dnl Search the library lib$name in $additional_libdir and $LDFLAGS
|
||||
dnl and the already constructed $LIBNAME/$LTLIBNAME.
|
||||
found_dir=
|
||||
found_la=
|
||||
found_so=
|
||||
found_a=
|
||||
if test $use_additional = yes; then
|
||||
if test -n "$shlibext" && test -f "$additional_libdir/lib$name.$shlibext"; then
|
||||
found_dir="$additional_libdir"
|
||||
found_so="$additional_libdir/lib$name.$shlibext"
|
||||
if test -f "$additional_libdir/lib$name.la"; then
|
||||
found_la="$additional_libdir/lib$name.la"
|
||||
fi
|
||||
else
|
||||
if test -f "$additional_libdir/lib$name.$libext"; then
|
||||
found_dir="$additional_libdir"
|
||||
found_a="$additional_libdir/lib$name.$libext"
|
||||
if test -f "$additional_libdir/lib$name.la"; then
|
||||
found_la="$additional_libdir/lib$name.la"
|
||||
fi
|
||||
fi
|
||||
fi
|
||||
fi
|
||||
if test "X$found_dir" = "X"; then
|
||||
for x in $LDFLAGS $LTLIB[]NAME; do
|
||||
AC_LIB_WITH_FINAL_PREFIX([eval x=\"$x\"])
|
||||
case "$x" in
|
||||
-L*)
|
||||
dir=`echo "X$x" | sed -e 's/^X-L//'`
|
||||
if test -n "$shlibext" && test -f "$dir/lib$name.$shlibext"; then
|
||||
found_dir="$dir"
|
||||
found_so="$dir/lib$name.$shlibext"
|
||||
if test -f "$dir/lib$name.la"; then
|
||||
found_la="$dir/lib$name.la"
|
||||
fi
|
||||
else
|
||||
if test -f "$dir/lib$name.$libext"; then
|
||||
found_dir="$dir"
|
||||
found_a="$dir/lib$name.$libext"
|
||||
if test -f "$dir/lib$name.la"; then
|
||||
found_la="$dir/lib$name.la"
|
||||
fi
|
||||
fi
|
||||
fi
|
||||
;;
|
||||
esac
|
||||
if test "X$found_dir" != "X"; then
|
||||
break
|
||||
fi
|
||||
done
|
||||
fi
|
||||
if test "X$found_dir" != "X"; then
|
||||
dnl Found the library.
|
||||
LTLIB[]NAME="${LTLIB[]NAME}${LTLIB[]NAME:+ }-L$found_dir -l$name"
|
||||
if test "X$found_so" != "X"; then
|
||||
dnl Linking with a shared library. We attempt to hardcode its
|
||||
dnl directory into the executable's runpath, unless it's the
|
||||
dnl standard /usr/lib.
|
||||
if test "$enable_rpath" = no || test "X$found_dir" = "X/usr/lib"; then
|
||||
dnl No hardcoding is needed.
|
||||
LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }$found_so"
|
||||
else
|
||||
dnl Use an explicit option to hardcode DIR into the resulting
|
||||
dnl binary.
|
||||
dnl Potentially add DIR to ltrpathdirs.
|
||||
dnl The ltrpathdirs will be appended to $LTLIBNAME at the end.
|
||||
haveit=
|
||||
for x in $ltrpathdirs; do
|
||||
if test "X$x" = "X$found_dir"; then
|
||||
haveit=yes
|
||||
break
|
||||
fi
|
||||
done
|
||||
if test -z "$haveit"; then
|
||||
ltrpathdirs="$ltrpathdirs $found_dir"
|
||||
fi
|
||||
dnl The hardcoding into $LIBNAME is system dependent.
|
||||
if test "$hardcode_direct" = yes; then
|
||||
dnl Using DIR/libNAME.so during linking hardcodes DIR into the
|
||||
dnl resulting binary.
|
||||
LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }$found_so"
|
||||
else
|
||||
if test -n "$hardcode_libdir_flag_spec" && test "$hardcode_minus_L" = no; then
|
||||
dnl Use an explicit option to hardcode DIR into the resulting
|
||||
dnl binary.
|
||||
LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }$found_so"
|
||||
dnl Potentially add DIR to rpathdirs.
|
||||
dnl The rpathdirs will be appended to $LIBNAME at the end.
|
||||
haveit=
|
||||
for x in $rpathdirs; do
|
||||
if test "X$x" = "X$found_dir"; then
|
||||
haveit=yes
|
||||
break
|
||||
fi
|
||||
done
|
||||
if test -z "$haveit"; then
|
||||
rpathdirs="$rpathdirs $found_dir"
|
||||
fi
|
||||
else
|
||||
dnl Rely on "-L$found_dir".
|
||||
dnl But don't add it if it's already contained in the LDFLAGS
|
||||
dnl or the already constructed $LIBNAME
|
||||
haveit=
|
||||
for x in $LDFLAGS $LIB[]NAME; do
|
||||
AC_LIB_WITH_FINAL_PREFIX([eval x=\"$x\"])
|
||||
if test "X$x" = "X-L$found_dir"; then
|
||||
haveit=yes
|
||||
break
|
||||
fi
|
||||
done
|
||||
if test -z "$haveit"; then
|
||||
LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }-L$found_dir"
|
||||
fi
|
||||
if test "$hardcode_minus_L" != no; then
|
||||
dnl FIXME: Not sure whether we should use
|
||||
dnl "-L$found_dir -l$name" or "-L$found_dir $found_so"
|
||||
dnl here.
|
||||
LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }$found_so"
|
||||
else
|
||||
dnl We cannot use $hardcode_runpath_var and LD_RUN_PATH
|
||||
dnl here, because this doesn't fit in flags passed to the
|
||||
dnl compiler. So give up. No hardcoding. This affects only
|
||||
dnl very old systems.
|
||||
dnl FIXME: Not sure whether we should use
|
||||
dnl "-L$found_dir -l$name" or "-L$found_dir $found_so"
|
||||
dnl here.
|
||||
LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }-l$name"
|
||||
fi
|
||||
fi
|
||||
fi
|
||||
fi
|
||||
else
|
||||
if test "X$found_a" != "X"; then
|
||||
dnl Linking with a static library.
|
||||
LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }$found_a"
|
||||
else
|
||||
dnl We shouldn't come here, but anyway it's good to have a
|
||||
dnl fallback.
|
||||
LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }-L$found_dir -l$name"
|
||||
fi
|
||||
fi
|
||||
dnl Assume the include files are nearby.
|
||||
additional_includedir=
|
||||
case "$found_dir" in
|
||||
*/lib | */lib/)
|
||||
basedir=`echo "X$found_dir" | sed -e 's,^X,,' -e 's,/lib/*$,,'`
|
||||
additional_includedir="$basedir/include"
|
||||
;;
|
||||
esac
|
||||
if test "X$additional_includedir" != "X"; then
|
||||
dnl Potentially add $additional_includedir to $INCNAME.
|
||||
dnl But don't add it
|
||||
dnl 1. if it's the standard /usr/include,
|
||||
dnl 2. if it's /usr/local/include and we are using GCC on Linux,
|
||||
dnl 3. if it's already present in $CPPFLAGS or the already
|
||||
dnl constructed $INCNAME,
|
||||
dnl 4. if it doesn't exist as a directory.
|
||||
if test "X$additional_includedir" != "X/usr/include"; then
|
||||
haveit=
|
||||
if test "X$additional_includedir" = "X/usr/local/include"; then
|
||||
if test -n "$GCC"; then
|
||||
case $host_os in
|
||||
linux* | gnu* | k*bsd*-gnu) haveit=yes;;
|
||||
esac
|
||||
fi
|
||||
fi
|
||||
if test -z "$haveit"; then
|
||||
for x in $CPPFLAGS $INC[]NAME; do
|
||||
AC_LIB_WITH_FINAL_PREFIX([eval x=\"$x\"])
|
||||
if test "X$x" = "X-I$additional_includedir"; then
|
||||
haveit=yes
|
||||
break
|
||||
fi
|
||||
done
|
||||
if test -z "$haveit"; then
|
||||
if test -d "$additional_includedir"; then
|
||||
dnl Really add $additional_includedir to $INCNAME.
|
||||
INC[]NAME="${INC[]NAME}${INC[]NAME:+ }-I$additional_includedir"
|
||||
fi
|
||||
fi
|
||||
fi
|
||||
fi
|
||||
fi
|
||||
dnl Look for dependencies.
|
||||
if test -n "$found_la"; then
|
||||
dnl Read the .la file. It defines the variables
|
||||
dnl dlname, library_names, old_library, dependency_libs, current,
|
||||
dnl age, revision, installed, dlopen, dlpreopen, libdir.
|
||||
save_libdir="$libdir"
|
||||
case "$found_la" in
|
||||
*/* | *\\*) . "$found_la" ;;
|
||||
*) . "./$found_la" ;;
|
||||
esac
|
||||
libdir="$save_libdir"
|
||||
dnl We use only dependency_libs.
|
||||
for dep in $dependency_libs; do
|
||||
case "$dep" in
|
||||
-L*)
|
||||
additional_libdir=`echo "X$dep" | sed -e 's/^X-L//'`
|
||||
dnl Potentially add $additional_libdir to $LIBNAME and $LTLIBNAME.
|
||||
dnl But don't add it
|
||||
dnl 1. if it's the standard /usr/lib,
|
||||
dnl 2. if it's /usr/local/lib and we are using GCC on Linux,
|
||||
dnl 3. if it's already present in $LDFLAGS or the already
|
||||
dnl constructed $LIBNAME,
|
||||
dnl 4. if it doesn't exist as a directory.
|
||||
if test "X$additional_libdir" != "X/usr/lib"; then
|
||||
haveit=
|
||||
if test "X$additional_libdir" = "X/usr/local/lib"; then
|
||||
if test -n "$GCC"; then
|
||||
case $host_os in
|
||||
linux* | gnu* | k*bsd*-gnu) haveit=yes;;
|
||||
esac
|
||||
fi
|
||||
fi
|
||||
if test -z "$haveit"; then
|
||||
haveit=
|
||||
for x in $LDFLAGS $LIB[]NAME; do
|
||||
AC_LIB_WITH_FINAL_PREFIX([eval x=\"$x\"])
|
||||
if test "X$x" = "X-L$additional_libdir"; then
|
||||
haveit=yes
|
||||
break
|
||||
fi
|
||||
done
|
||||
if test -z "$haveit"; then
|
||||
if test -d "$additional_libdir"; then
|
||||
dnl Really add $additional_libdir to $LIBNAME.
|
||||
LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }-L$additional_libdir"
|
||||
fi
|
||||
fi
|
||||
haveit=
|
||||
for x in $LDFLAGS $LTLIB[]NAME; do
|
||||
AC_LIB_WITH_FINAL_PREFIX([eval x=\"$x\"])
|
||||
if test "X$x" = "X-L$additional_libdir"; then
|
||||
haveit=yes
|
||||
break
|
||||
fi
|
||||
done
|
||||
if test -z "$haveit"; then
|
||||
if test -d "$additional_libdir"; then
|
||||
dnl Really add $additional_libdir to $LTLIBNAME.
|
||||
LTLIB[]NAME="${LTLIB[]NAME}${LTLIB[]NAME:+ }-L$additional_libdir"
|
||||
fi
|
||||
fi
|
||||
fi
|
||||
fi
|
||||
;;
|
||||
-R*)
|
||||
dir=`echo "X$dep" | sed -e 's/^X-R//'`
|
||||
if test "$enable_rpath" != no; then
|
||||
dnl Potentially add DIR to rpathdirs.
|
||||
dnl The rpathdirs will be appended to $LIBNAME at the end.
|
||||
haveit=
|
||||
for x in $rpathdirs; do
|
||||
if test "X$x" = "X$dir"; then
|
||||
haveit=yes
|
||||
break
|
||||
fi
|
||||
done
|
||||
if test -z "$haveit"; then
|
||||
rpathdirs="$rpathdirs $dir"
|
||||
fi
|
||||
dnl Potentially add DIR to ltrpathdirs.
|
||||
dnl The ltrpathdirs will be appended to $LTLIBNAME at the end.
|
||||
haveit=
|
||||
for x in $ltrpathdirs; do
|
||||
if test "X$x" = "X$dir"; then
|
||||
haveit=yes
|
||||
break
|
||||
fi
|
||||
done
|
||||
if test -z "$haveit"; then
|
||||
ltrpathdirs="$ltrpathdirs $dir"
|
||||
fi
|
||||
fi
|
||||
;;
|
||||
-l*)
|
||||
dnl Handle this in the next round.
|
||||
names_next_round="$names_next_round "`echo "X$dep" | sed -e 's/^X-l//'`
|
||||
;;
|
||||
*.la)
|
||||
dnl Handle this in the next round. Throw away the .la's
|
||||
dnl directory; it is already contained in a preceding -L
|
||||
dnl option.
|
||||
names_next_round="$names_next_round "`echo "X$dep" | sed -e 's,^X.*/,,' -e 's,^lib,,' -e 's,\.la$,,'`
|
||||
;;
|
||||
*)
|
||||
dnl Most likely an immediate library name.
|
||||
LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }$dep"
|
||||
LTLIB[]NAME="${LTLIB[]NAME}${LTLIB[]NAME:+ }$dep"
|
||||
;;
|
||||
esac
|
||||
done
|
||||
fi
|
||||
else
|
||||
dnl Didn't find the library; assume it is in the system directories
|
||||
dnl known to the linker and runtime loader. (All the system
|
||||
dnl directories known to the linker should also be known to the
|
||||
dnl runtime loader, otherwise the system is severely misconfigured.)
|
||||
LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }-l$name"
|
||||
LTLIB[]NAME="${LTLIB[]NAME}${LTLIB[]NAME:+ }-l$name"
|
||||
fi
|
||||
fi
|
||||
fi
|
||||
done
|
||||
done
|
||||
if test "X$rpathdirs" != "X"; then
|
||||
if test -n "$hardcode_libdir_separator"; then
|
||||
dnl Weird platform: only the last -rpath option counts, the user must
|
||||
dnl pass all path elements in one option. We can arrange that for a
|
||||
dnl single library, but not when more than one $LIBNAMEs are used.
|
||||
alldirs=
|
||||
for found_dir in $rpathdirs; do
|
||||
alldirs="${alldirs}${alldirs:+$hardcode_libdir_separator}$found_dir"
|
||||
done
|
||||
dnl Note: hardcode_libdir_flag_spec uses $libdir and $wl.
|
||||
acl_save_libdir="$libdir"
|
||||
libdir="$alldirs"
|
||||
eval flag=\"$hardcode_libdir_flag_spec\"
|
||||
libdir="$acl_save_libdir"
|
||||
LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }$flag"
|
||||
else
|
||||
dnl The -rpath options are cumulative.
|
||||
for found_dir in $rpathdirs; do
|
||||
acl_save_libdir="$libdir"
|
||||
libdir="$found_dir"
|
||||
eval flag=\"$hardcode_libdir_flag_spec\"
|
||||
libdir="$acl_save_libdir"
|
||||
LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }$flag"
|
||||
done
|
||||
fi
|
||||
fi
|
||||
if test "X$ltrpathdirs" != "X"; then
|
||||
dnl When using libtool, the option that works for both libraries and
|
||||
dnl executables is -R. The -R options are cumulative.
|
||||
for found_dir in $ltrpathdirs; do
|
||||
LTLIB[]NAME="${LTLIB[]NAME}${LTLIB[]NAME:+ }-R$found_dir"
|
||||
done
|
||||
fi
|
||||
])
|
||||
|
||||
dnl AC_LIB_APPENDTOVAR(VAR, CONTENTS) appends the elements of CONTENTS to VAR,
|
||||
dnl unless already present in VAR.
|
||||
dnl Works only for CPPFLAGS, not for LIB* variables because that sometimes
|
||||
dnl contains two or three consecutive elements that belong together.
|
||||
AC_DEFUN([AC_LIB_APPENDTOVAR],
|
||||
[
|
||||
for element in [$2]; do
|
||||
haveit=
|
||||
for x in $[$1]; do
|
||||
AC_LIB_WITH_FINAL_PREFIX([eval x=\"$x\"])
|
||||
if test "X$x" = "X$element"; then
|
||||
haveit=yes
|
||||
break
|
||||
fi
|
||||
done
|
||||
if test -z "$haveit"; then
|
||||
[$1]="${[$1]}${[$1]:+ }$element"
|
||||
fi
|
||||
done
|
||||
])
|
||||
|
||||
# lib-ld.m4 serial 3 (gettext-0.13)
|
||||
dnl Copyright (C) 1996-2003 Free Software Foundation, Inc.
|
||||
dnl This file is free software; the Free Software Foundation
|
||||
dnl gives unlimited permission to copy and/or distribute it,
|
||||
dnl with or without modifications, as long as this notice is preserved.
|
||||
|
||||
dnl Subroutines of libtool.m4,
|
||||
dnl with replacements s/AC_/AC_LIB/ and s/lt_cv/acl_cv/ to avoid collision
|
||||
dnl with libtool.m4.
|
||||
|
||||
dnl From libtool-1.4. Sets the variable with_gnu_ld to yes or no.
|
||||
AC_DEFUN([AC_LIB_PROG_LD_GNU],
|
||||
[AC_CACHE_CHECK([if the linker ($LD) is GNU ld], acl_cv_prog_gnu_ld,
|
||||
[# I'd rather use --version here, but apparently some GNU ld's only accept -v.
|
||||
case `$LD -v 2>&1 </dev/null` in
|
||||
*GNU* | *'with BFD'*)
|
||||
acl_cv_prog_gnu_ld=yes ;;
|
||||
*)
|
||||
acl_cv_prog_gnu_ld=no ;;
|
||||
esac])
|
||||
with_gnu_ld=$acl_cv_prog_gnu_ld
|
||||
])
|
||||
|
||||
dnl From libtool-1.4. Sets the variable LD.
|
||||
AC_DEFUN([AC_LIB_PROG_LD],
|
||||
[AC_ARG_WITH(gnu-ld,
|
||||
[ --with-gnu-ld assume the C compiler uses GNU ld [default=no]],
|
||||
test "$withval" = no || with_gnu_ld=yes, with_gnu_ld=no)
|
||||
AC_REQUIRE([AC_PROG_CC])dnl
|
||||
AC_REQUIRE([AC_CANONICAL_HOST])dnl
|
||||
# Prepare PATH_SEPARATOR.
|
||||
# The user is always right.
|
||||
if test "${PATH_SEPARATOR+set}" != set; then
|
||||
echo "#! /bin/sh" >conf$$.sh
|
||||
echo "exit 0" >>conf$$.sh
|
||||
chmod +x conf$$.sh
|
||||
if (PATH="/nonexistent;."; conf$$.sh) >/dev/null 2>&1; then
|
||||
PATH_SEPARATOR=';'
|
||||
else
|
||||
PATH_SEPARATOR=:
|
||||
fi
|
||||
rm -f conf$$.sh
|
||||
fi
|
||||
ac_prog=ld
|
||||
if test "$GCC" = yes; then
|
||||
# Check if gcc -print-prog-name=ld gives a path.
|
||||
AC_MSG_CHECKING([for ld used by GCC])
|
||||
case $host in
|
||||
*-*-mingw*)
|
||||
# gcc leaves a trailing carriage return which upsets mingw
|
||||
ac_prog=`($CC -print-prog-name=ld) 2>&5 | tr -d '\015'` ;;
|
||||
*)
|
||||
ac_prog=`($CC -print-prog-name=ld) 2>&5` ;;
|
||||
esac
|
||||
case $ac_prog in
|
||||
# Accept absolute paths.
|
||||
[[\\/]* | [A-Za-z]:[\\/]*)]
|
||||
[re_direlt='/[^/][^/]*/\.\./']
|
||||
# Canonicalize the path of ld
|
||||
ac_prog=`echo $ac_prog| sed 's%\\\\%/%g'`
|
||||
while echo $ac_prog | grep "$re_direlt" > /dev/null 2>&1; do
|
||||
ac_prog=`echo $ac_prog| sed "s%$re_direlt%/%"`
|
||||
done
|
||||
test -z "$LD" && LD="$ac_prog"
|
||||
;;
|
||||
"")
|
||||
# If it fails, then pretend we aren't using GCC.
|
||||
ac_prog=ld
|
||||
;;
|
||||
*)
|
||||
# If it is relative, then search for the first ld in PATH.
|
||||
with_gnu_ld=unknown
|
||||
;;
|
||||
esac
|
||||
elif test "$with_gnu_ld" = yes; then
|
||||
AC_MSG_CHECKING([for GNU ld])
|
||||
else
|
||||
AC_MSG_CHECKING([for non-GNU ld])
|
||||
fi
|
||||
AC_CACHE_VAL(acl_cv_path_LD,
|
||||
[if test -z "$LD"; then
|
||||
IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}${PATH_SEPARATOR-:}"
|
||||
for ac_dir in $PATH; do
|
||||
test -z "$ac_dir" && ac_dir=.
|
||||
if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then
|
||||
acl_cv_path_LD="$ac_dir/$ac_prog"
|
||||
# Check to see if the program is GNU ld. I'd rather use --version,
|
||||
# but apparently some GNU ld's only accept -v.
|
||||
# Break only if it was the GNU/non-GNU ld that we prefer.
|
||||
case `"$acl_cv_path_LD" -v 2>&1 < /dev/null` in
|
||||
*GNU* | *'with BFD'*)
|
||||
test "$with_gnu_ld" != no && break ;;
|
||||
*)
|
||||
test "$with_gnu_ld" != yes && break ;;
|
||||
esac
|
||||
fi
|
||||
done
|
||||
IFS="$ac_save_ifs"
|
||||
else
|
||||
acl_cv_path_LD="$LD" # Let the user override the test with a path.
|
||||
fi])
|
||||
LD="$acl_cv_path_LD"
|
||||
if test -n "$LD"; then
|
||||
AC_MSG_RESULT($LD)
|
||||
else
|
||||
AC_MSG_RESULT(no)
|
||||
fi
|
||||
test -z "$LD" && AC_MSG_ERROR([no acceptable ld found in \$PATH])
|
||||
AC_LIB_PROG_LD_GNU
|
||||
])
|
||||
|
||||
dnl Macro: anope_CHECK_TYPE_SIZES
|
||||
dnl
|
||||
dnl Check the size of several types and define a valid int16_t and int32_t.
|
||||
dnl
|
||||
AC_DEFUN(anope_CHECK_TYPE_SIZES,
|
||||
[dnl Check type sizes
|
||||
AC_CHECK_SIZEOF(short)
|
||||
AC_CHECK_SIZEOF(int)
|
||||
AC_CHECK_SIZEOF(long)
|
||||
if test "$ac_cv_sizeof_int" = 2 ; then
|
||||
AC_CHECK_TYPE(int16_t, int)
|
||||
AC_CHECK_TYPE(u_int16_t, unsigned int)
|
||||
elif test "$ac_cv_sizeof_short" = 2 ; then
|
||||
AC_CHECK_TYPE(int16_t, short)
|
||||
AC_CHECK_TYPE(u_int16_t, unsigned short)
|
||||
else
|
||||
AC_MSG_ERROR([Cannot find a type with size of 16 bits])
|
||||
fi
|
||||
if test "$ac_cv_sizeof_int" = 4 ; then
|
||||
AC_CHECK_TYPE(int32_t, int)
|
||||
AC_CHECK_TYPE(u_int32_t, unsigned int)
|
||||
elif test "$ac_cv_sizeof_short" = 4 ; then
|
||||
AC_CHECK_TYPE(int32_t, short)
|
||||
AC_CHECK_TYPE(u_int32_t, unsigned short)
|
||||
elif test "$ac_cv_sizeof_long" = 4 ; then
|
||||
AC_CHECK_TYPE(int32_t, long)
|
||||
AC_CHECK_TYPE(u_int32_t, unsigned long)
|
||||
else
|
||||
AC_MSG_ERROR([Cannot find a type with size of 32 bits])
|
||||
fi
|
||||
])
|
||||
|
||||
@@ -0,0 +1,31 @@
|
||||
dnl Macro: anope_CHECK_TYPE_SIZES
|
||||
dnl
|
||||
dnl Check the size of several types and define a valid int16_t and int32_t.
|
||||
dnl
|
||||
AC_DEFUN(anope_CHECK_TYPE_SIZES,
|
||||
[dnl Check type sizes
|
||||
AC_CHECK_SIZEOF(short)
|
||||
AC_CHECK_SIZEOF(int)
|
||||
AC_CHECK_SIZEOF(long)
|
||||
if test "$ac_cv_sizeof_int" = 2 ; then
|
||||
AC_CHECK_TYPE(int16_t, int)
|
||||
AC_CHECK_TYPE(u_int16_t, unsigned int)
|
||||
elif test "$ac_cv_sizeof_short" = 2 ; then
|
||||
AC_CHECK_TYPE(int16_t, short)
|
||||
AC_CHECK_TYPE(u_int16_t, unsigned short)
|
||||
else
|
||||
AC_MSG_ERROR([Cannot find a type with size of 16 bits])
|
||||
fi
|
||||
if test "$ac_cv_sizeof_int" = 4 ; then
|
||||
AC_CHECK_TYPE(int32_t, int)
|
||||
AC_CHECK_TYPE(u_int32_t, unsigned int)
|
||||
elif test "$ac_cv_sizeof_short" = 4 ; then
|
||||
AC_CHECK_TYPE(int32_t, short)
|
||||
AC_CHECK_TYPE(u_int32_t, unsigned short)
|
||||
elif test "$ac_cv_sizeof_long" = 4 ; then
|
||||
AC_CHECK_TYPE(int32_t, long)
|
||||
AC_CHECK_TYPE(u_int32_t, unsigned long)
|
||||
else
|
||||
AC_MSG_ERROR([Cannot find a type with size of 32 bits])
|
||||
fi
|
||||
])
|
||||
Vendored
+1526
File diff suppressed because it is too large
Load Diff
Vendored
+1662
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
+304
@@ -0,0 +1,304 @@
|
||||
dnl autoconf.in for Services.
|
||||
dnl
|
||||
dnl Anope (c) 2003-2007 Anope team
|
||||
dnl Contact us at team@anope.org
|
||||
|
||||
dnl This program is free but copyrighted software; see the file COPYING for
|
||||
dnl details.
|
||||
|
||||
dnl Based heavily on the Unreal configure.in script, and extra thanks to
|
||||
dnl codemastr from UnrealIRCD.
|
||||
|
||||
AC_INIT
|
||||
|
||||
# If no bindir, we tell him to run ./Config.
|
||||
if test "${with_bindir+set}" != set || test "${with_datadir+set}" != set; then
|
||||
echo "You might want to run ./Config or provide some parameters to this script."
|
||||
echo "./configure --help for information about this script"
|
||||
exit 0
|
||||
fi
|
||||
|
||||
AC_CONFIG_SRCDIR([src/actions.c])
|
||||
AC_CONFIG_HEADER(include/sysconf.h)
|
||||
AC_PROG_CC
|
||||
if test "$ac_cv_c_compiler_gnu" = "yes"; then
|
||||
# CFLAGS="$CFLAGS -funsigned-char"
|
||||
AC_CACHE_CHECK(if gcc has a working -pipe, ac_cv_pipe, [
|
||||
save_cflags="$CFLAGS"
|
||||
CFLAGS="$CFLAGS -pipe"
|
||||
AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[]], [[]])],[ac_cv_pipe="yes"],[ac_cv_pipe="no"])
|
||||
CFLAGS="$save_cflags"
|
||||
])
|
||||
if test "$ac_cv_pipe" = "yes"; then
|
||||
CFLAGS="-pipe $CFLAGS"
|
||||
fi
|
||||
fi
|
||||
|
||||
dnl CFLAGS="$CFLAGS -W -Wall"
|
||||
|
||||
AC_PATH_PROG(RM,rm)
|
||||
AC_PATH_PROG(CP,cp)
|
||||
AC_PATH_PROG(TOUCH,touch)
|
||||
AC_PATH_PROG(INSTALL,install)
|
||||
AC_CHECK_LIB(nsl,inet_ntoa,ANOPELIBS="$ANOPELIBS-lnsl ")
|
||||
AC_CHECK_LIB(socket, socket,ANOPELIBS="$ANOPELIBS-lsocket ")
|
||||
AC_CHECK_LIB(resolv, res_query,ANOPELIBS="$ANOPELIBS-lresolv ")
|
||||
AC_CHECK_LIB(bsd, revoke,ANOPELIBS="$ANOPELIBS-lbsd ")
|
||||
|
||||
dnl Does this platform require array notation to assign to a va_list?
|
||||
dnl If cross-compiling, we assume va_list is "normal". If this breaks
|
||||
dnl you, set ac_cv_valistisarray=true and maybe define HAVE_VA_LIST_AS_ARRAY
|
||||
dnl also just to be sure.
|
||||
|
||||
dnl NOTE: this autoconf test is taken from mozilla: www.mozilla.org.
|
||||
|
||||
AC_MSG_CHECKING(whether va_list assignments need array notation)
|
||||
AC_CACHE_VAL(ac_cv_valistisarray,
|
||||
[AC_RUN_IFELSE([AC_LANG_SOURCE([[#include <stdlib.h>
|
||||
#include <stdarg.h>
|
||||
void foo(int i, ...) {
|
||||
va_list ap1, ap2;
|
||||
va_start(ap1, i);
|
||||
ap2 = ap1;
|
||||
if (va_arg(ap2, int) != 123 || va_arg(ap1, int) != 123) { exit(1); }
|
||||
va_end(ap1); va_end(ap2);
|
||||
}
|
||||
int main()
|
||||
{ foo(0, 123); return(0); }]])],[ac_cv_valistisarray=false],[ac_cv_valistisarray=true],[ac_cv_valistisarray=false])])
|
||||
|
||||
if test "$ac_cv_valistisarray" = true ; then
|
||||
AC_DEFINE(HAVE_VA_LIST_AS_ARRAY,[1],[va_list as array])
|
||||
AC_MSG_RESULT(yes)
|
||||
else
|
||||
AC_MSG_RESULT(no)
|
||||
fi
|
||||
|
||||
|
||||
DIS_MYSQL=" MySQL: No"
|
||||
AC_ARG_WITH(mysql, [ --without-mysql Do not use MySQL or attempt to find it],,[
|
||||
AC_ARG_WITH(mysqlconfig-path, [ --with-mysqlconfig-path=PATH Complete path to the mysql_config executable],
|
||||
mysql_config_path="$withval", mysql_config_path="")
|
||||
MYSQLCONF=""
|
||||
if test "$mysql_config_path" != ""; then
|
||||
if test -x "$mysql_config_path"; then
|
||||
MYSQLCONF="$mysql_config_path"
|
||||
echo "checking for mysql_config... $MYSQLCONF" >&6
|
||||
fi
|
||||
fi
|
||||
if test "$MYSQLCONF" = ""; then
|
||||
AC_PATH_PROG(MYSQLCONF,mysql_config, "")
|
||||
fi
|
||||
if test "$MYSQLCONF" != ""; then
|
||||
hold_cflags="$CFLAGS"
|
||||
hold_ldflags="$LDFLAGS"
|
||||
if test "$MYSQL_CFLAGS" = ""; then
|
||||
MYSQL_CFLAGS="`$MYSQLCONF --cflags`"
|
||||
fi
|
||||
if test "$MYSQL_LDFLAGS" = ""; then
|
||||
MYSQL_LDFLAGS="`$MYSQLCONF --libs`"
|
||||
fi
|
||||
CFLAGS="$CFLAGS $MYSQL_CFLAGS"
|
||||
LDFLAGS="$LDFLAGS $MYSQL_LDFLAGS"
|
||||
echo $ECHO_N "checking if mysql_config produces valid values... $ECHO_C" >&6
|
||||
AC_TRY_RUN([
|
||||
#include <mysql.h>
|
||||
|
||||
int main()
|
||||
{
|
||||
MYSQL *mysql = mysql_init(0);
|
||||
|
||||
return 0;
|
||||
}
|
||||
], ac_cv_mysql_valid=yes, ac_cv_mysql_valid=no)
|
||||
echo $ac_cv_mysql_valid >&6
|
||||
if test "$ac_cv_mysql_valid" = "yes"; then
|
||||
AC_DEFINE_UNQUOTED(USE_MYSQL,1,"Use Mysql")
|
||||
AC_DEFINE_UNQUOTED(USE_RDB,1,"Use RDB")
|
||||
MYSQL=" mysql.c "
|
||||
RDB=" rdb.c "
|
||||
AC_SUBST(MYSQL)
|
||||
AC_SUBST(RDB)
|
||||
DIS_MYSQL=" MySQL: Yes"
|
||||
else
|
||||
CFLAGS="$hold_cflags"
|
||||
LDFLAGS="$hold_ldflags"
|
||||
fi
|
||||
fi
|
||||
])
|
||||
|
||||
AC_MSG_CHECKING(whether this is a bit or little endian system)
|
||||
AC_TRY_RUN([
|
||||
int main()
|
||||
{
|
||||
short s = 1;
|
||||
short* ptr = &s;
|
||||
unsigned char c = *((char*)ptr);
|
||||
return c;
|
||||
}
|
||||
]
|
||||
, AC_DEFINE(BIG_ENDIAN)
|
||||
AC_MSG_RESULT(big)
|
||||
, AC_DEFINE(LITTLE_ENDIAN)
|
||||
AC_MSG_RESULT(little)
|
||||
)
|
||||
|
||||
AC_SUBST(ANOPELIBS)
|
||||
AC_SUBST(LDFLAGS)
|
||||
|
||||
AC_CHECK_HEADER(sys/types.h,AC_DEFINE(HAS_SYS_TYPES_H,1,"Has sys/types.h"))
|
||||
|
||||
DIS_MODULES="Modules: Yes"
|
||||
|
||||
dnl module checking based on Unreal's module checking code
|
||||
AC_DEFUN(AC_ENABLE_DYN,
|
||||
[
|
||||
AC_CHECK_FUNC(dlopen,, AC_CHECK_LIB(dl,dlopen,[
|
||||
ANOPELIBS="$ANOPELIBS -ldl"
|
||||
AC_DEFINE(USE_MODULES,1,"Modules are available")
|
||||
USE_MODULES="yes"
|
||||
DIS_MODULES="Modules: Yes"
|
||||
],
|
||||
[
|
||||
AC_MSG_WARN(Dynamic linking is not enabled because dlopen was not found)
|
||||
AC_DEFINE(STATIC_LINKING,"NO_MODULES","modules not available")
|
||||
DIS_MODULES="Modules: No"
|
||||
]))
|
||||
|
||||
hold_cflags=$CFLAGS
|
||||
CFLAGS="$CFLAGS -export-dynamic"
|
||||
AC_CACHE_CHECK(if we need the -export-dynamic flag, ac_cv_export_dynamic, [
|
||||
AC_LINK_IFELSE([AC_LANG_PROGRAM([[]], [[int i;]])],[ac_cv_export_dynamic=yes],[ac_cv_export_dynamic=no])])
|
||||
if test "$ac_cv_export_dynamic" = "no"; then
|
||||
CFLAGS=$hold_cflags
|
||||
fi
|
||||
|
||||
AC_CACHE_CHECK(for compiler option to produce PIC,ac_cv_pic,[
|
||||
if test "$ac_cv_c_compiler_gnu" = "yes"; then
|
||||
ac_cv_pic="-fPIC -DPIC -shared"
|
||||
case `uname -s` in
|
||||
Darwin*[)]
|
||||
ac_cv_pic="-bundle -flat_namespace -undefined suppress"
|
||||
;;
|
||||
HP-UX*[)]
|
||||
ac_cv_pic="-fPIC"
|
||||
;;
|
||||
esac
|
||||
else
|
||||
case `uname -s` in
|
||||
SunOS*[)]
|
||||
ac_cv_pic="-KPIC -DPIC -G"
|
||||
;;
|
||||
esac
|
||||
|
||||
fi
|
||||
|
||||
])
|
||||
|
||||
if test "$ac_cv_c_compiler_gnu" = "yes"; then
|
||||
case `uname -s` in
|
||||
Darwin*[)]
|
||||
SHARED="-bundle -flat_namespace -undefined suppress"
|
||||
AC_SUBST(SHARED)
|
||||
;;
|
||||
*[)]
|
||||
SHARED="-shared"
|
||||
AC_SUBST(SHARED)
|
||||
;;
|
||||
esac
|
||||
fi
|
||||
|
||||
AC_CACHE_CHECK(if your system prepends an underscore on symbols,ac_cv_underscore,[
|
||||
cat >uscore.c << __EOF__
|
||||
int main() {
|
||||
return 0;
|
||||
}
|
||||
__EOF__
|
||||
$CC -o uscore $CFLAGS uscore.c 1>&5
|
||||
if test -z "`strings -a uscore |grep '^_main$'`"; then
|
||||
ac_cv_underscore=no
|
||||
else
|
||||
ac_cv_underscore=yes
|
||||
fi
|
||||
|
||||
rm -f uscore uscore.c
|
||||
])
|
||||
if test "$ac_cv_underscore" = "yes"; then
|
||||
AC_DEFINE(DL_PREFIX,"_","Underscore needed for dlopen")
|
||||
else
|
||||
AC_DEFINE(DL_PREFIX,"","No prefix needed for dlopen")
|
||||
fi
|
||||
|
||||
MODULEFLAGS=$ac_cv_pic
|
||||
AC_SUBST(MODULEFLAGS)
|
||||
AC_DEFINE(USE_MODULES,1,"Modules available")
|
||||
])
|
||||
|
||||
AC_ENABLE_DYN
|
||||
anope_CHECK_TYPE_SIZES
|
||||
|
||||
AC_CHECK_HEADER(strings.h,AC_DEFINE(HAVE_STRINGS_H,1,""))
|
||||
AC_CHECK_HEADER(sys/select.h,AC_DEFINE(HAVE_SYS_SELECT_H,1,""))
|
||||
|
||||
AC_CHECK_FUNCS(backtrace,AC_DEFINE(HAVE_BACKTRACE,1))
|
||||
AC_CHECK_FUNCS(strerror,AC_DEFINE(HAVE_STRERROR,1))
|
||||
AC_CHECK_FUNCS(sys_errlist,AC_DEFINE(HAVE_SYS_ERRLIST,1))
|
||||
AC_CHECK_FUNCS(snprintf,AC_DEFINE(HAVE_SNPRINTF,1))
|
||||
AC_CHECK_FUNCS(stricmp,AC_DEFINE(HAVE_STRICMP,1))
|
||||
AC_CHECK_FUNCS(strcasecmp,AC_DEFINE(HAVE_STRCASECMP,1))
|
||||
AC_CHECK_FUNCS(strdup,AC_DEFINE(HAVE_STRDUP,1))
|
||||
AC_CHECK_FUNCS(strspn,AC_DEFINE(HAVE_STRSPN,1))
|
||||
AC_CHECK_FUNCS(strsignal,AC_DEFINE(HAVE_STRSIGNAL,1))
|
||||
AC_CHECK_FUNCS(gettimeofday,AC_DEFINE(HAVE_GETTIMEOFDAY,1))
|
||||
AC_CHECK_FUNCS(setgrent,AC_DEFINE(HAVE_SETGRENT,1))
|
||||
AC_CHECK_FUNCS(umask,AC_DEFINE(HAVE_UMASK,1))
|
||||
AC_CHECK_FUNCS(fork,AC_DEFINE(HAVE_FORK,1))
|
||||
AC_CHECK_FUNCS(gethostbyname,AC_DEFINE(HAVE_GETHOSTBYNAME,1))
|
||||
AC_CHECK_FUNCS(gethostbyname_r,AC_DEFINE(HAVE_GETHOSTBYNAME_R,1))
|
||||
AC_CHECK_FUNCS(strlcpy,AC_DEFINE(HAVE_STRLCPY,1))
|
||||
AC_CHECK_FUNCS(strlcat,AC_DEFINE(HAVE_STRLCAT,1))
|
||||
|
||||
AC_ARG_WITH(rungroup, [ --with-rungroup=group Specify the rungroup for anope], [
|
||||
AC_DEFINE_UNQUOTED(RUNGROUP,"$withval","Run group")
|
||||
RUNGROUP=$withval
|
||||
])
|
||||
AC_SUBST(RUNGROUP)
|
||||
|
||||
dnl AC_DEFINE_UNQUOTED(MYOSNAME,"`uname -a`","uname")
|
||||
|
||||
AC_ARG_WITH(permissions, [ --with-permissions=permissions Specify the default permissions for anope], AC_DEFINE_UNQUOTED(DEFUMASK,$withval,"Default umask permissions"), AC_DEFINE(DEFUMASK, 007,"Default umask Permissions"))
|
||||
|
||||
AC_ARG_WITH(bindir, [ --with-bindir=bindir Specify the default binary dir for anope], [
|
||||
AC_DEFINE_UNQUOTED(SERVICES_BIN,"${withval}/services","Binary Dir")
|
||||
BINDEST=$withval
|
||||
DATDEST=$withval
|
||||
MODULE_PATH=${withval}/modules/
|
||||
])
|
||||
|
||||
AC_SUBST(BINDEST)
|
||||
|
||||
AC_ARG_WITH(datadir, [ --with-datadir=datadir Specify the location of the services data folder], [
|
||||
AC_DEFINE_UNQUOTED(SERVICES_DIR,"$withval","services bin dir")
|
||||
AC_DEFINE_UNQUOTED(MODULE_PATH,"${withval}/modules/","Module dir")
|
||||
DATDEST=$withval
|
||||
MODULE_PATH=${withval}/modules/
|
||||
])
|
||||
|
||||
AC_SUBST(DATDEST)
|
||||
AC_SUBST(MODULE_PATH)
|
||||
|
||||
AC_CONFIG_FILES( \
|
||||
Makefile \
|
||||
src/bin/anoperc \
|
||||
)
|
||||
|
||||
AC_OUTPUT
|
||||
|
||||
cat <<EOT
|
||||
|
||||
$DIS_MODULES
|
||||
$DIS_MYSQL
|
||||
|
||||
All done! Now run "make" (or possibly "gmake") to compile Anope.
|
||||
See the INSTALL, README and FAQ files if you have any problems.
|
||||
EOT
|
||||
|
||||
@@ -1,6 +0,0 @@
|
||||
# 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 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)
|
||||
install(FILES ${DATA}
|
||||
DESTINATION ${CONF_DIR}
|
||||
)
|
||||
File diff suppressed because it is too large
Load Diff
@@ -1,417 +0,0 @@
|
||||
/*
|
||||
* Example configuration file for BotServ.
|
||||
*/
|
||||
|
||||
/*
|
||||
* First, create the service. If you do not want to have a 'BotServ', but do want the ability to have
|
||||
* ChanServ assigned to channels for the use of fantasy commands, you may delete the below 'service' block.
|
||||
*
|
||||
* Note that deleting a 'service' block for a pseudoclient that is already online will not remove the
|
||||
* client, the client becomes no different from a normal service bot, so you will have to use botserv/bot
|
||||
* to manually delete the client.
|
||||
*
|
||||
* You may then want to map some of the below commands to other services, like placing botserv/bot on
|
||||
* OperServ so you can delete the below client, and mapping assign and unassign to ChanServ so users are
|
||||
* able to control whether or not ChanServ is in the channel. You may also want to map botserv/set/nobot
|
||||
* to OperServ so you can restrict who can assign the other core service clients.
|
||||
*/
|
||||
service
|
||||
{
|
||||
/*
|
||||
* The name of the BotServ client.
|
||||
* If you change this value, you probably want to change the client directive in the configuration for the botserv module too.
|
||||
*/
|
||||
nick = "BotServ"
|
||||
|
||||
/*
|
||||
* The username of the BotServ client.
|
||||
*/
|
||||
user = "services"
|
||||
|
||||
/*
|
||||
* The hostname of the BotServ client.
|
||||
*/
|
||||
host = "${services.host}"
|
||||
|
||||
/*
|
||||
* The realname of the BotServ client.
|
||||
*/
|
||||
real = "Bot Service"
|
||||
|
||||
/*
|
||||
* The modes this client should use.
|
||||
* Do not modify this unless you know what you are doing.
|
||||
*
|
||||
* These modes are very IRCd specific. If left commented, sane defaults
|
||||
* are used based on what protocol module you have loaded.
|
||||
*
|
||||
* Note that setting this option incorrectly could potentially BREAK some, if
|
||||
* not all, usefulness of the client. We will not support you if this client is
|
||||
* unable to do certain things if this option is enabled.
|
||||
*/
|
||||
#modes = "+o"
|
||||
|
||||
/*
|
||||
* An optional comma separated list of channels this service should join. Outside
|
||||
* of log channels this is not very useful, as the service will just idle in the
|
||||
* specified channels, and will not accept any types of commands.
|
||||
*
|
||||
* 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"
|
||||
}
|
||||
|
||||
/*
|
||||
* Core BotServ module.
|
||||
*
|
||||
* Provides essential functionality for BotServ.
|
||||
*/
|
||||
module
|
||||
{
|
||||
name = "botserv"
|
||||
|
||||
/*
|
||||
* The name of the client that should be BotServ.
|
||||
*
|
||||
* This directive is optional.
|
||||
*/
|
||||
client = "BotServ"
|
||||
|
||||
/*
|
||||
* The default bot options for newly registered channels. Note that changing these options
|
||||
* will have no effect on channels which are already registered. The list must be separated
|
||||
* by spaces.
|
||||
*
|
||||
* The options are:
|
||||
* - dontkickops: Channel operators will be protected against BotServ kicks
|
||||
* - dontkickvoices: Voiced users will be protected against BotServ kicks
|
||||
* - greet: The channel's BotServ bot will greet incoming users that have set a greet
|
||||
* in their NickServ settings
|
||||
* - fantasy: Enables the use of BotServ fantasy commands in the channel
|
||||
*
|
||||
* This directive is optional, if left blank, there will be no defaults.
|
||||
*/
|
||||
defaults = "greet fantasy"
|
||||
|
||||
/*
|
||||
* The minimum number of users there must be in a channel before the bot joins it. The best
|
||||
* value for this setting is 1 or 2. This can be 0, the service bots will not part unless
|
||||
* specifically unassigned, and will keep the channel open.
|
||||
*/
|
||||
minusers = 1
|
||||
|
||||
/*
|
||||
* The bots are currently not affected by any modes or bans when they try to join a channel.
|
||||
* But some people may want to make it act like a real bot, that is, for example, remove all
|
||||
* the bans affecting the bot before joining the channel, remove a ban that affects the bot
|
||||
* set by a user when it is in the channel, and so on. Since it consumes a bit more CPU
|
||||
* time, you should not enable this on larger networks.
|
||||
*
|
||||
* This directive is optional.
|
||||
*/
|
||||
#smartjoin = yes
|
||||
|
||||
/*
|
||||
* Modes to set on service bots when they join channels, comment this out for no modes
|
||||
*
|
||||
* This directive is optional.
|
||||
*/
|
||||
botmodes = "ao"
|
||||
|
||||
/*
|
||||
* User modes to set on service bots. Read the comment about the service:modes directive
|
||||
* on why this can be a bad idea to set.
|
||||
*/
|
||||
#botumodes = "i"
|
||||
}
|
||||
|
||||
/*
|
||||
* Core BotServ commands.
|
||||
*
|
||||
* In Anope modules can provide (multiple) commands, each of which has a unique command name. Once these modules
|
||||
* are loaded you can then configure the commands to be added to any client you like with any name you like.
|
||||
*
|
||||
* Additionally, you may provide a permission name that must be in the opertype of users executing the command.
|
||||
*
|
||||
* Sane defaults are provided below that do not need to be edited unless you wish to change the default behavior.
|
||||
*/
|
||||
|
||||
/* Give it a help command. */
|
||||
command { service = "BotServ"; name = "HELP"; command = "generic/help" }
|
||||
|
||||
/*
|
||||
* bs_assign
|
||||
*
|
||||
* Provides the commands:
|
||||
* botserv/assign - Used to assign BotServ bots to channels
|
||||
* botserv/unassign - Used to unassign BotServ bots
|
||||
* botserv/set/nobot - Used to prohibit channels from being assigned BotServ bots.
|
||||
*
|
||||
* Used for assigning and unassigning bots to channels.
|
||||
*/
|
||||
module { name = "bs_assign" }
|
||||
command { service = "BotServ"; name = "ASSIGN"; command = "botserv/assign" }
|
||||
command { service = "BotServ"; name = "UNASSIGN"; command = "botserv/unassign" }
|
||||
command { service = "BotServ"; name = "SET NOBOT"; command = "botserv/set/nobot"; permission = "botserv/set/nobot" }
|
||||
|
||||
/*
|
||||
* bs_autoassign
|
||||
*
|
||||
* Allows service bots to be automatically assigned to channels upon registration.
|
||||
*/
|
||||
#module
|
||||
{
|
||||
name = "bs_autoassign"
|
||||
|
||||
/*
|
||||
* Automatically assign ChanServ to channels upon registration.
|
||||
*/
|
||||
bot = "ChanServ"
|
||||
}
|
||||
|
||||
/*
|
||||
* bs_badwords
|
||||
*
|
||||
* Provides the command botserv/badwords.
|
||||
*
|
||||
* Used for controlling the channel badword list.
|
||||
*/
|
||||
module
|
||||
{
|
||||
name = "bs_badwords"
|
||||
|
||||
/*
|
||||
* The maximum number of entries a single bad words list can have.
|
||||
*/
|
||||
badwordsmax = 50
|
||||
|
||||
/*
|
||||
* If set, BotServ will use case sensitive checking for badwords.
|
||||
*
|
||||
* This directive is optional.
|
||||
*/
|
||||
#casesensitive = yes
|
||||
}
|
||||
command { service = "BotServ"; name = "BADWORDS"; command = "botserv/badwords" }
|
||||
|
||||
/*
|
||||
* bs_bot
|
||||
*
|
||||
* Provides the command botserv/bot.
|
||||
*
|
||||
* Used for administrating BotServ bots.
|
||||
*/
|
||||
module { name = "bs_bot" }
|
||||
command { service = "BotServ"; name = "BOT"; command = "botserv/bot"; permission = "botserv/bot" }
|
||||
|
||||
/*
|
||||
* bs_botlist
|
||||
*
|
||||
* Provides the command botserv/botlist.
|
||||
*
|
||||
* Used for listing all available bots.
|
||||
*/
|
||||
module { name = "bs_botlist" }
|
||||
command { service = "BotServ"; name = "BOTLIST"; command = "botserv/botlist" }
|
||||
|
||||
/*
|
||||
* bs_control
|
||||
*
|
||||
* Provides the commands botserv/act and botserv/say.
|
||||
*
|
||||
* Used for making the bot message a channel.
|
||||
*/
|
||||
module { name = "bs_control" }
|
||||
command { service = "BotServ"; name = "ACT"; command = "botserv/act" }
|
||||
command { service = "BotServ"; name = "SAY"; command = "botserv/say" }
|
||||
|
||||
/*
|
||||
* bs_info
|
||||
*
|
||||
* Provides the command botserv/info.
|
||||
*
|
||||
* Used for getting information on bots or channels.
|
||||
*/
|
||||
module { name = "bs_info" }
|
||||
command { service = "BotServ"; name = "INFO"; command = "botserv/info" }
|
||||
|
||||
/*
|
||||
* bs_kick
|
||||
*
|
||||
* Provides the commands:
|
||||
* botserv/kick - Dummy help wrapper for the KICK command.
|
||||
* botserv/kick/amsg - Configures BotServ's AMSG kicker.
|
||||
* botserv/kick/badwords - Configures BotServ's badwords kicker.
|
||||
* botserv/kick/bolds - Configures BotServ's bold text kicker.
|
||||
* botserv/kick/caps - Configures BotServ's capital letters kicker.
|
||||
* botserv/kick/colors - Configures BotServ's color kicker.
|
||||
* botserv/kick/flood - Configures BotServ's flood kicker.
|
||||
* botserv/kick/italics - Configures BotServ's italics kicker.
|
||||
* botserv/kick/repeat - Configures BotServ's repeat kicker.
|
||||
* botserv/kick/reverses - Configures BotServ's reverse kicker.
|
||||
* botserv/kick/underlines - Configures BotServ's underline kicker.
|
||||
* botserv/set/dontkickops - Used for preventing BotServ from kicking channel operators.
|
||||
* botserv/set/dontkickvoices - Used for preventing BotServ from kicking voices.
|
||||
*
|
||||
* Used for configuring what bots should kick for.
|
||||
*/
|
||||
module
|
||||
{
|
||||
name = "bs_kick"
|
||||
|
||||
/*
|
||||
* The amount of time that data for a user is valid in BotServ. If the data exceeds this time,
|
||||
* it is reset or deleted depending on the case. Do not set it too high, otherwise your
|
||||
* resources will be slightly affected.
|
||||
*/
|
||||
keepdata = 10m
|
||||
|
||||
/*
|
||||
* If set, the bots will use a kick reason that does not state the word when it is kicking.
|
||||
* This is especially useful if you have young people on your network.
|
||||
*
|
||||
* This directive is optional.
|
||||
*/
|
||||
gentlebadwordreason = yes
|
||||
}
|
||||
command { service = "BotServ"; name = "KICK"; command = "botserv/kick" }
|
||||
command { service = "BotServ"; name = "KICK AMSG"; command = "botserv/kick/amsg" }
|
||||
command { service = "BotServ"; name = "KICK BADWORDS"; command = "botserv/kick/badwords" }
|
||||
command { service = "BotServ"; name = "KICK BOLDS"; command = "botserv/kick/bolds" }
|
||||
command { service = "BotServ"; name = "KICK CAPS"; command = "botserv/kick/caps" }
|
||||
command { service = "BotServ"; name = "KICK COLORS"; command = "botserv/kick/colors" }
|
||||
command { service = "BotServ"; name = "KICK FLOOD"; command = "botserv/kick/flood" }
|
||||
command { service = "BotServ"; name = "KICK ITALICS"; command = "botserv/kick/italics" }
|
||||
command { service = "BotServ"; name = "KICK REPEAT"; command = "botserv/kick/repeat" }
|
||||
command { service = "BotServ"; name = "KICK REVERSES"; command = "botserv/kick/reverses" }
|
||||
command { service = "BotServ"; name = "KICK UNDERLINES"; command = "botserv/kick/underlines" }
|
||||
command { service = "BotServ"; name = "SET DONTKICKOPS"; command = "botserv/set/dontkickops" }
|
||||
command { service = "BotServ"; name = "SET DONTKICKVOICES"; command = "botserv/set/dontkickvoices" }
|
||||
|
||||
/*
|
||||
* bs_set
|
||||
*
|
||||
* Provides the commands:
|
||||
* botserv/set/private - Used to prohibit specific BotServ bots from being assigned to channels.
|
||||
*/
|
||||
module { name = "bs_set" }
|
||||
command { service = "BotServ"; name = "SET"; command = "botserv/set" }
|
||||
command { service = "BotServ"; name = "SET BANEXPIRE"; command = "botserv/set/banexpire" }
|
||||
command { service = "BotServ"; name = "SET PRIVATE"; command = "botserv/set/private"; permission = "botserv/set/private" }
|
||||
|
||||
/*
|
||||
* greet
|
||||
*
|
||||
* Provides the commands:
|
||||
* botserv/set/greet - Used for enabling or disabling BotServ's greet messages in a channel.
|
||||
* nickserv/set/greet, nickserv/saset/greet - Used for changing a users greet message, which is displayed when they enter channels.
|
||||
*/
|
||||
module { name = "greet" }
|
||||
command { service = "BotServ"; name = "SET GREET"; command = "botserv/set/greet" }
|
||||
command { service = "NickServ"; name = "SET GREET"; command = "nickserv/set/greet" }
|
||||
command { service = "NickServ"; name = "SASET GREET"; command = "nickserv/saset/greet"; permission = "nickserv/saset/greet" }
|
||||
|
||||
/*
|
||||
* GREET privilege.
|
||||
*
|
||||
* Used by 'greet'.
|
||||
*
|
||||
* Users with this privilege have their greet shown when they join channels.
|
||||
*/
|
||||
privilege
|
||||
{
|
||||
name = "GREET"
|
||||
desc = _("Greet message displayed on join")
|
||||
rank = 40
|
||||
level = 5
|
||||
flag = "g"
|
||||
xop = "AOP"
|
||||
}
|
||||
|
||||
/*
|
||||
* fantasy
|
||||
*
|
||||
* Allows fantasy commands (e.g. !kick) to be used in channels.
|
||||
*
|
||||
* Provides the commands:
|
||||
* botserv/set/fantasy - Used for enabling or disabling BotServ's fantasy commands.
|
||||
*/
|
||||
module
|
||||
{
|
||||
name = "fantasy"
|
||||
|
||||
/*
|
||||
* Defines the prefixes for fantasy commands in channels. One of these will
|
||||
* have to be prepended to all fantasy commands. For example, If you choose
|
||||
* "! ?" as your prefix fantasy commands will be "!kick", "?op", etc.
|
||||
*
|
||||
* This directive is optional, it defaults to "!" if not set.
|
||||
*/
|
||||
#prefix = "! ?"
|
||||
}
|
||||
command { service = "BotServ"; name = "SET FANTASY"; command = "botserv/set/fantasy" }
|
||||
|
||||
/*
|
||||
* Fantasy commands
|
||||
*
|
||||
* Fantasy commands can be executed in channels that have a BotServ bot assigned
|
||||
* by prefixing the command with one of the fantasy characters configured in the
|
||||
* {botserv}:prefix directive.
|
||||
*
|
||||
* Sane defaults are provided below that do not need to be edited unless you
|
||||
* wish to change the default behavior.
|
||||
*/
|
||||
fantasy { name = "ACCESS"; command = "chanserv/access" }
|
||||
fantasy { name = "AKICK"; command = "chanserv/akick" }
|
||||
fantasy { name = "AOP"; command = "chanserv/xop" }
|
||||
fantasy { name = "BAN"; command = "chanserv/ban" }
|
||||
fantasy { name = "CLONE"; command = "chanserv/clone" }
|
||||
fantasy { name = "DEHALFOP"; command = "chanserv/modes" }
|
||||
fantasy { name = "DEOP"; command = "chanserv/modes" }
|
||||
fantasy { name = "DEOWNER"; command = "chanserv/modes" }
|
||||
fantasy { name = "DEPROTECT"; command = "chanserv/modes" }
|
||||
fantasy { name = "DEVOICE"; command = "chanserv/modes" }
|
||||
fantasy { name = "DOWN"; command = "chanserv/down" }
|
||||
fantasy { name = "ENFORCE"; command = "chanserv/enforce" }
|
||||
fantasy { name = "ENTRYMSG"; command = "chanserv/entrymsg" }
|
||||
fantasy { name = "FLAGS"; command = "chanserv/flags" }
|
||||
fantasy { name = "HALFOP"; command = "chanserv/modes" }
|
||||
fantasy { name = "HELP"; command = "generic/help"; prepend_channel = no; require_privilege = no }
|
||||
fantasy { name = "HOP"; command = "chanserv/xop" }
|
||||
fantasy { name = "INFO"; command = "chanserv/info"; prepend_channel = no }
|
||||
fantasy { name = "INVITE"; command = "chanserv/invite" }
|
||||
fantasy { name = "K"; command = "chanserv/kick" }
|
||||
fantasy { name = "KB"; command = "chanserv/ban" }
|
||||
fantasy { name = "KICK"; command = "chanserv/kick" }
|
||||
fantasy { name = "LEVELS"; command = "chanserv/levels" }
|
||||
fantasy { name = "LIST"; command = "chanserv/list"; prepend_channel = no }
|
||||
fantasy { name = "LOG"; command = "chanserv/log" }
|
||||
fantasy { name = "MODE"; command = "chanserv/mode" }
|
||||
fantasy { name = "MUTE"; command = "chanserv/ban"; kick = no; mode = "QUIET" }
|
||||
fantasy { name = "OP"; command = "chanserv/modes" }
|
||||
fantasy { name = "OWNER"; command = "chanserv/modes" }
|
||||
fantasy { name = "PROTECT"; command = "chanserv/modes" }
|
||||
fantasy { name = "QOP"; command = "chanserv/xop" }
|
||||
fantasy { name = "SEEN"; command = "chanserv/seen"; prepend_channel = no }
|
||||
fantasy { name = "SOP"; command = "chanserv/xop" }
|
||||
fantasy { name = "STATUS"; command = "chanserv/status" }
|
||||
fantasy { name = "SUSPEND"; command = "chanserv/suspend"; permission = "chanserv/suspend" }
|
||||
fantasy { name = "SYNC"; command = "chanserv/sync" }
|
||||
fantasy { name = "TOPIC"; command = "chanserv/topic" }
|
||||
fantasy { name = "UNBAN"; command = "chanserv/unban" }
|
||||
fantasy { name = "UNMUTE"; command = "chanserv/unban"; mode = "QUIET" }
|
||||
fantasy { name = "UNSUSPEND"; command = "chanserv/unsuspend"; permission = "chanserv/suspend" }
|
||||
fantasy { name = "UP"; command = "chanserv/up" }
|
||||
fantasy { name = "VOICE"; command = "chanserv/modes" }
|
||||
fantasy { name = "VOP"; command = "chanserv/xop" }
|
||||
File diff suppressed because it is too large
Load Diff
@@ -1,49 +0,0 @@
|
||||
/*
|
||||
* Example configuration file for Chanstats.
|
||||
*
|
||||
* You can enable Chanstats by default by adding CS_STATS to {chanserv}:defaults
|
||||
* and NS_STATS to {nickserv}:defaults.
|
||||
*
|
||||
* Make sure BotServ, ChanServ and NickServ are running.
|
||||
*/
|
||||
|
||||
module
|
||||
{
|
||||
name = "chanstats"
|
||||
|
||||
/*
|
||||
* The name of this engine.
|
||||
* This must match with the name of an SQL engine block.
|
||||
*/
|
||||
|
||||
engine = "mysql/main"
|
||||
|
||||
/*
|
||||
* An optional prefix to prepended to the name of each created table.
|
||||
* Do not use the same prefix for other programs.
|
||||
*/
|
||||
#prefix = "chanstats21_"
|
||||
|
||||
smileyshappy = ":) :-) ;) ;-) :D :-D :P :-P"
|
||||
smileyssad = ":( :-( ;( ;-("
|
||||
smileysother = ":/ :-/"
|
||||
}
|
||||
command { service = "ChanServ"; name = "SET CHANSTATS"; command = "chanserv/set/chanstats" }
|
||||
command { service = "NickServ"; name = "SET CHANSTATS"; command = "nickserv/set/chanstats" }
|
||||
command { service = "NickServ"; name = "SASET CHANSTATS"; command = "nickserv/saset/chanstats"; permission = "nickserv/saset/chanstats" }
|
||||
|
||||
module { name = "cs_fantasy_stats" }
|
||||
command { service = "ChanServ"; name = "STATS"; command = "chanserv/stats" }
|
||||
command { service = "ChanServ"; name = "GSTATS"; command = "chanserv/gstats" }
|
||||
fantasy { name = "STATS"; command = "chanserv/stats" }
|
||||
fantasy { name = "GSTATS"; command = "chanserv/gstats" }
|
||||
|
||||
module { name = "cs_fantasy_top" }
|
||||
command { service = "ChanServ"; name = "TOP"; command = "chanserv/top" }
|
||||
command { service = "ChanServ"; name = "TOP10"; command = "chanserv/top10" }
|
||||
command { service = "ChanServ"; name = "GTOP"; command = "chanserv/gtop" }
|
||||
command { service = "ChanServ"; name = "GTOP10"; command = "chanserv/gtop10" }
|
||||
fantasy { name = "TOP"; command = "chanserv/top" }
|
||||
fantasy { name = "TOP10"; command = "chanserv/top10" }
|
||||
fantasy { name = "GTOP"; command = "chanserv/gtop" }
|
||||
fantasy { name = "GTOP10"; command = "chanserv/gtop10" }
|
||||
@@ -1,7 +1,7 @@
|
||||
#!/bin/sh
|
||||
|
||||
# Crontab script for Anope
|
||||
#
|
||||
#
|
||||
# To know how to install the crontab, read the INSTALL file.
|
||||
|
||||
###############################################################
|
||||
@@ -9,16 +9,13 @@
|
||||
###############################################################
|
||||
|
||||
# Anope binary directory
|
||||
ANOPATH=/home/ircd/anope/bin
|
||||
|
||||
# Anope data directory
|
||||
ANODATA=/home/ircd/anope/data
|
||||
ANOPATH=/home/ircd/services/
|
||||
|
||||
# Name of the pid file
|
||||
ANOPIDF=anope.pid
|
||||
ANOPIDF=services.pid
|
||||
|
||||
# Name of the executable
|
||||
ANOPROG=anope
|
||||
ANOPROG=services
|
||||
|
||||
# Parameters to pass to the executable
|
||||
ANOARGS=""
|
||||
@@ -34,15 +31,14 @@ ANOPID=
|
||||
|
||||
cd $ANOPATH
|
||||
|
||||
if [ -f "$ANODATA/$ANOPIDF" ]
|
||||
if [ -f $ANOPIDF ]
|
||||
then
|
||||
ANOPID=`cat "$ANODATA/$ANOPIDF"`
|
||||
kill -0 $ANOPID 2>/dev/null
|
||||
if [ $? -eq 0 ]
|
||||
ANOPID=`cat $ANOPIDF`
|
||||
if [ `ps auwx | grep $ANOPROG | grep $ANOPID | grep -v -c grep` = 1 ]
|
||||
then
|
||||
exit
|
||||
exit
|
||||
fi
|
||||
rm -f "$ANODATA/$ANOPIDF"
|
||||
rm -f $ANOPIDF
|
||||
fi
|
||||
|
||||
./$ANOPROG $ANOARGS
|
||||
+1597
File diff suppressed because it is too large
Load Diff
@@ -1,152 +0,0 @@
|
||||
/*
|
||||
* Example configuration file for Global.
|
||||
*/
|
||||
|
||||
/*
|
||||
* First, create the service.
|
||||
*/
|
||||
service
|
||||
{
|
||||
/*
|
||||
* The name of the Global client.
|
||||
* If you change this value, you probably want to change the client directive in the configuration for the global module too.
|
||||
*/
|
||||
nick = "Global"
|
||||
|
||||
/*
|
||||
* The username of the Global client.
|
||||
*/
|
||||
user = "services"
|
||||
|
||||
/*
|
||||
* The hostname of the Global client.
|
||||
*/
|
||||
host = "${services.host}"
|
||||
|
||||
/*
|
||||
* The realname of the Global client.
|
||||
*/
|
||||
real = "Global Noticer"
|
||||
|
||||
/*
|
||||
* The modes this client should use.
|
||||
* Do not modify this unless you know what you are doing.
|
||||
*
|
||||
* These modes are very IRCd specific. If left commented, sane defaults
|
||||
* are used based on what protocol module you have loaded.
|
||||
*
|
||||
* Note that setting this option incorrectly could potentially BREAK some, if
|
||||
* not all, usefulness of the client. We will not support you if this client is
|
||||
* unable to do certain things if this option is enabled.
|
||||
*/
|
||||
#modes = "+o"
|
||||
|
||||
/*
|
||||
* An optional comma separated list of channels this service should join. Outside
|
||||
* of log channels this is not very useful, as the service will just idle in the
|
||||
* specified channels, and will not accept any types of commands.
|
||||
*
|
||||
* 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"
|
||||
}
|
||||
|
||||
/*
|
||||
* Core Global module.
|
||||
*
|
||||
* Provides essential functionality for Global.
|
||||
*/
|
||||
module
|
||||
{
|
||||
name = "global"
|
||||
|
||||
/*
|
||||
* The name of the client that should be Global.
|
||||
*/
|
||||
client = "Global"
|
||||
|
||||
/*
|
||||
* This is the global message that will be sent when Anope is being
|
||||
* shutdown/restarted.
|
||||
*
|
||||
* This directive is optional.
|
||||
*/
|
||||
#globaloncycledown = "Services are restarting, they will be back shortly - please be good while they're gone"
|
||||
|
||||
/*
|
||||
* This is the global message that will be sent when Anope (re)joins the
|
||||
* network.
|
||||
*
|
||||
* This directive is optional.
|
||||
*/
|
||||
#globaloncycleup = "Services are now back online - have a nice day"
|
||||
|
||||
/*
|
||||
* If set, Anope will hide the Services Operator's nick in a global
|
||||
* message/notice.
|
||||
*
|
||||
* This directive is optional.
|
||||
*/
|
||||
#anonymousglobal = yes
|
||||
}
|
||||
|
||||
/*
|
||||
* Core Global commands.
|
||||
*
|
||||
* In Anope modules can provide (multiple) commands, each of which has a unique command name. Once these modules
|
||||
* are loaded you can then configure the commands to be added to any client you like with any name you like.
|
||||
*
|
||||
* Additionally, you may provide a permission name that must be in the opertype of users executing the command.
|
||||
*
|
||||
* Sane defaults are provided below that do not need to be edited unless you wish to change the default behavior.
|
||||
*/
|
||||
|
||||
/* Give it a help command. */
|
||||
command { service = "Global"; name = "HELP"; command = "generic/help" }
|
||||
|
||||
/*
|
||||
* gl_global
|
||||
*
|
||||
* Provides the command global/global.
|
||||
*
|
||||
* Used for sending a message to every online user.
|
||||
*/
|
||||
module { name = "gl_global" }
|
||||
command { service = "Global"; name = "GLOBAL"; command = "global/global"; permission = "global/global" }
|
||||
|
||||
/*
|
||||
* gl_queue
|
||||
*
|
||||
* Provides the command global/queue.
|
||||
*
|
||||
* Used for queuing messages to send to every online user.
|
||||
*/
|
||||
module
|
||||
{
|
||||
name = "gl_queue"
|
||||
|
||||
/* The maximum number of messages in a message queue. Defaults to 10. */
|
||||
maxqueue = 10
|
||||
}
|
||||
command { service = "Global"; name = "QUEUE"; command = "global/queue"; permission = "global/queue" }
|
||||
|
||||
/*
|
||||
* gl_server
|
||||
*
|
||||
* Provides the command global/server.
|
||||
*
|
||||
* Used for sending a message to every online user on a server.
|
||||
*/
|
||||
module { name = "gl_server" }
|
||||
command { service = "Global"; name = "SERVER"; command = "global/server"; permission = "global/server" }
|
||||
@@ -1,242 +0,0 @@
|
||||
/*
|
||||
* Example configuration file for HostServ.
|
||||
*/
|
||||
|
||||
/*
|
||||
* First, create the service.
|
||||
*/
|
||||
service
|
||||
{
|
||||
/*
|
||||
* The name of the HostServ client.
|
||||
* If you change this value, you probably want to change the client directive in the configuration for the hostserv module too.
|
||||
*/
|
||||
nick = "HostServ"
|
||||
|
||||
/*
|
||||
* The username of the HostServ client.
|
||||
*/
|
||||
user = "services"
|
||||
|
||||
/*
|
||||
* The hostname of the HostServ client.
|
||||
*/
|
||||
host = "${services.host}"
|
||||
|
||||
/*
|
||||
* The realname of the HostServ client.
|
||||
*/
|
||||
real = "Hostname Service"
|
||||
|
||||
/*
|
||||
* The modes this client should use.
|
||||
* Do not modify this unless you know what you are doing.
|
||||
*
|
||||
* These modes are very IRCd specific. If left commented, sane defaults
|
||||
* are used based on what protocol module you have loaded.
|
||||
*
|
||||
* Note that setting this option incorrectly could potentially BREAK some, if
|
||||
* not all, usefulness of the client. We will not support you if this client is
|
||||
* unable to do certain things if this option is enabled.
|
||||
*/
|
||||
#modes = "+o"
|
||||
|
||||
/*
|
||||
* An optional comma separated list of channels this service should join. Outside
|
||||
* of log channels this is not very useful, as the service will just idle in the
|
||||
* specified channels, and will not accept any types of commands.
|
||||
*
|
||||
* 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"
|
||||
}
|
||||
|
||||
/*
|
||||
* Core HostServ module.
|
||||
*
|
||||
* Provides essential functionality for HostServ.
|
||||
*/
|
||||
module
|
||||
{
|
||||
name = "hostserv"
|
||||
|
||||
/*
|
||||
* The name of the client that should be HostServ.
|
||||
*/
|
||||
client = "HostServ"
|
||||
|
||||
/*
|
||||
* If enabled, vhosts are activated on users immediately when they are set.
|
||||
*/
|
||||
activate_on_set = yes
|
||||
|
||||
/*
|
||||
* If enabled, vhosts are activated on users immediately when they log out of an operator account.
|
||||
*/
|
||||
activate_on_deoper = yes
|
||||
}
|
||||
|
||||
/*
|
||||
* Core HostServ commands.
|
||||
*
|
||||
* In Anope modules can provide (multiple) commands, each of which has a unique command name. Once these modules
|
||||
* are loaded you can then configure the commands to be added to any client you like with any name you like.
|
||||
*
|
||||
* Additionally, you may provide a permission name that must be in the opertype of users executing the command.
|
||||
*
|
||||
* Sane defaults are provided below that do not need to be edited unless you wish to change the default behavior.
|
||||
*/
|
||||
|
||||
/* Give it a help command. */
|
||||
command { service = "HostServ"; name = "HELP"; command = "generic/help" }
|
||||
|
||||
/*
|
||||
* hs_del
|
||||
*
|
||||
* Provides the commands hostserv/del and hostserv/delall.
|
||||
*
|
||||
* Used for removing users' vhosts.
|
||||
*/
|
||||
module { name = "hs_del" }
|
||||
command { service = "HostServ"; name = "DEL"; command = "hostserv/del"; permission = "hostserv/del" }
|
||||
command { service = "HostServ"; name = "DELALL"; command = "hostserv/delall"; permission = "hostserv/del" }
|
||||
|
||||
/*
|
||||
* hs_group
|
||||
*
|
||||
* Provides the command hostserv/group.
|
||||
*
|
||||
* Used for syncing one vhost to many nicks.
|
||||
*/
|
||||
module
|
||||
{
|
||||
name = "hs_group"
|
||||
|
||||
/*
|
||||
* Upon nickserv/group, this option syncs the nick's main vhost to the grouped nick.
|
||||
*/
|
||||
syncongroup = yes
|
||||
|
||||
/*
|
||||
* This makes vhosts act as if they are per account.
|
||||
*/
|
||||
synconset = yes
|
||||
}
|
||||
command { service = "HostServ"; name = "GROUP"; command = "hostserv/group" }
|
||||
|
||||
/*
|
||||
* hs_list
|
||||
*
|
||||
* Provides the command hostserv/list.
|
||||
*
|
||||
* Used for listing actively set vhosts.
|
||||
*/
|
||||
module { name = "hs_list" }
|
||||
command { service = "HostServ"; name = "LIST"; command = "hostserv/list"; permission = "hostserv/list" }
|
||||
|
||||
/*
|
||||
* hs_off
|
||||
*
|
||||
* Provides the command hostserv/off.
|
||||
*
|
||||
* Used for turning off your vhost.
|
||||
*/
|
||||
module { name = "hs_off" }
|
||||
command { service = "HostServ"; name = "OFF"; command = "hostserv/off" }
|
||||
|
||||
/*
|
||||
* hs_offfer
|
||||
*
|
||||
* Provides the commands hostserv/offfer and hostserv/offerlist.
|
||||
*
|
||||
* Used to offer specialized vhosts to users, with template variables available.
|
||||
*/
|
||||
module
|
||||
{
|
||||
name = "hs_offer"
|
||||
|
||||
/*
|
||||
* How long after a vhost is applied can another vhost be taken.
|
||||
*/
|
||||
takedelay = 7d
|
||||
}
|
||||
command { service = "HostServ"; name = "OFFER"; command = "hostserv/offer"; permission = "hostserv/offer" }
|
||||
command { service = "HostServ"; name = "OFFERLIST"; command = "hostserv/offerlist" }
|
||||
|
||||
/*
|
||||
* hs_on
|
||||
*
|
||||
* Provides the command hostserv/on.
|
||||
*
|
||||
* Used for turning on your vhost.
|
||||
*/
|
||||
module { name = "hs_on" }
|
||||
command { service = "HostServ"; name = "ON"; command = "hostserv/on" }
|
||||
|
||||
/*
|
||||
* hs_request
|
||||
*
|
||||
* Provides the commands:
|
||||
* hostserv/request - Requests a vhost.
|
||||
* hostserv/activate - Approves a requested vhost.
|
||||
* hostserv/reject - Rejects a requested vhost.
|
||||
* hostserv/waiting - Lists pending vhost requests.
|
||||
* hostserv/validate - Allows self-service approval of vhosts using DNS
|
||||
* validation (requires the dns module).
|
||||
*
|
||||
* Used to manage vhosts requested by users.
|
||||
*/
|
||||
module
|
||||
{
|
||||
name = "hs_request"
|
||||
|
||||
/*
|
||||
* If set, Anope will send a memo to the user requesting a vhost when it's been
|
||||
* approved or rejected.
|
||||
*/
|
||||
#memouser = yes
|
||||
|
||||
/*
|
||||
* If set, Anope will send a memo to all services staff when a new vhost is requested.
|
||||
*/
|
||||
#memooper = yes
|
||||
|
||||
/*
|
||||
* If DNS validation is enabled, how long should users have to wait between
|
||||
* attempts at DNS validation. Defaults to 5 minutes.
|
||||
*/
|
||||
#validationcooldown = 5m
|
||||
|
||||
/*
|
||||
* If DNS validation is enabled, the TXT record to look for when determining
|
||||
* if the requester controls the domain. Defaults to anope-dns-validation.
|
||||
*/
|
||||
#validationrecord = "anope-dns-validation"
|
||||
}
|
||||
command { service = "HostServ"; name = "REQUEST"; command = "hostserv/request" }
|
||||
command { service = "HostServ"; name = "ACTIVATE"; command = "hostserv/activate"; permission = "hostserv/set" }
|
||||
command { service = "HostServ"; name = "REJECT"; command = "hostserv/reject"; permission = "hostserv/set" }
|
||||
command { service = "HostServ"; name = "WAITING"; command = "hostserv/waiting"; permission = "hostserv/set" }
|
||||
#command { service = "HostServ"; name = "VALIDATE"; command = "hostserv/validate" }
|
||||
|
||||
/*
|
||||
* hs_set
|
||||
*
|
||||
* Provides the commands hostserv/set and hostserv/setall.
|
||||
*
|
||||
* Used for setting users' vhosts.
|
||||
*/
|
||||
module { name = "hs_set" }
|
||||
command { service = "HostServ"; name = "SET"; command = "hostserv/set"; permission = "hostserv/set" }
|
||||
command { service = "HostServ"; name = "SETALL"; command = "hostserv/setall"; permission = "hostserv/set" }
|
||||
@@ -1,251 +0,0 @@
|
||||
/*
|
||||
* Example configuration file for MemoServ.
|
||||
*/
|
||||
|
||||
/*
|
||||
* First, create the service.
|
||||
*/
|
||||
service
|
||||
{
|
||||
/*
|
||||
* The name of the MemoServ client.
|
||||
* If you change this value, you probably want to change the client directive in the configuration for the memoserv module too.
|
||||
*/
|
||||
nick = "MemoServ"
|
||||
|
||||
/*
|
||||
* The username of the MemoServ client.
|
||||
*/
|
||||
user = "services"
|
||||
|
||||
/*
|
||||
* The hostname of the MemoServ client.
|
||||
*/
|
||||
host = "${services.host}"
|
||||
|
||||
/*
|
||||
* The realname of the MemoServ client.
|
||||
*/
|
||||
real = "Memo Service"
|
||||
|
||||
/*
|
||||
* The modes this client should use.
|
||||
* Do not modify this unless you know what you are doing.
|
||||
*
|
||||
* These modes are very IRCd specific. If left commented, sane defaults
|
||||
* are used based on what protocol module you have loaded.
|
||||
*
|
||||
* Note that setting this option incorrectly could potentially BREAK some, if
|
||||
* not all, usefulness of the client. We will not support you if this client is
|
||||
* unable to do certain things if this option is enabled.
|
||||
*/
|
||||
#modes = "+o"
|
||||
|
||||
/*
|
||||
* An optional comma separated list of channels this service should join. Outside
|
||||
* of log channels this is not very useful, as the service will just idle in the
|
||||
* specified channels, and will not accept any types of commands.
|
||||
*
|
||||
* 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"
|
||||
}
|
||||
|
||||
/*
|
||||
* Core MemoServ module.
|
||||
*
|
||||
* Provides essential functionality for MemoServ.
|
||||
*/
|
||||
module
|
||||
{
|
||||
name = "memoserv"
|
||||
/*
|
||||
* The name of the client that should be MemoServ. Clients are configured
|
||||
* with the service blocks.
|
||||
*/
|
||||
client = "MemoServ"
|
||||
|
||||
/*
|
||||
* The maximum number of memos a user is allowed to keep by default. Normal users may set the
|
||||
* limit anywhere between 0 and this value. Services Admins can change it to any value or
|
||||
* disable it.
|
||||
*
|
||||
* This directive is optional, but recommended. If not set, the limit is disabled
|
||||
* by default, and normal users can set any limit they want.
|
||||
*/
|
||||
maxmemos = 20
|
||||
|
||||
/*
|
||||
* The delay between consecutive uses of the MemoServ SEND command. This can help prevent spam
|
||||
* as well as denial-of-service attacks from sending large numbers of memos and filling up disk
|
||||
* space (and memory).
|
||||
*
|
||||
* This directive is optional, but recommended.
|
||||
*/
|
||||
senddelay = 30s
|
||||
}
|
||||
|
||||
/*
|
||||
* Core MemoServ commands.
|
||||
*
|
||||
* In Anope modules can provide (multiple) commands, each of which has a unique command name. Once these modules
|
||||
* are loaded you can then configure the commands to be added to any client you like with any name you like.
|
||||
*
|
||||
* Additionally, you may provide a permission name that must be in the opertype of users executing the command.
|
||||
*
|
||||
* Sane defaults are provided below that do not need to be edited unless you wish to change the default behavior.
|
||||
*/
|
||||
|
||||
/* Give it a help command. */
|
||||
command { service = "MemoServ"; name = "HELP"; command = "generic/help" }
|
||||
|
||||
/*
|
||||
* ms_cancel
|
||||
*
|
||||
* Provides the command memoserv/cancel.
|
||||
*
|
||||
* Used to cancel memos already sent but not yet read.
|
||||
*/
|
||||
module { name = "ms_cancel" }
|
||||
command { service = "MemoServ"; name = "CANCEL"; command = "memoserv/cancel" }
|
||||
|
||||
/*
|
||||
* ms_check
|
||||
*
|
||||
* Provides the command memoserv/check.
|
||||
*
|
||||
* Used to check if a sent memo has been read.
|
||||
*/
|
||||
module { name = "ms_check" }
|
||||
command { service = "MemoServ"; name = "CHECK"; command = "memoserv/check" }
|
||||
|
||||
/*
|
||||
* ms_del
|
||||
*
|
||||
* Provides the command memoserv/del.
|
||||
*
|
||||
* Used to delete your memos.
|
||||
*/
|
||||
module { name = "ms_del" }
|
||||
command { service = "MemoServ"; name = "DEL"; command = "memoserv/del" }
|
||||
|
||||
/*
|
||||
* ms_ignore
|
||||
*
|
||||
* Provides the command memoserv/ignore.
|
||||
*
|
||||
* Used to ignore memos from specific users.
|
||||
*/
|
||||
module
|
||||
{
|
||||
name = "ms_ignore"
|
||||
|
||||
/*
|
||||
* The maximum number of entries that may be on a memo ignore list.
|
||||
*
|
||||
* This directive is optional.
|
||||
*/
|
||||
max = 50
|
||||
}
|
||||
command { service = "MemoServ"; name = "IGNORE"; command = "memoserv/ignore" }
|
||||
|
||||
/*
|
||||
* ms_info
|
||||
*
|
||||
* Provides the command memoserv/info.
|
||||
*
|
||||
* Used to show memo related information about an account or a channel.
|
||||
*/
|
||||
module { name = "ms_info" }
|
||||
command { service = "MemoServ"; name = "INFO"; command = "memoserv/info" }
|
||||
|
||||
/*
|
||||
* ms_list
|
||||
*
|
||||
* Provides the command memoserv/list.
|
||||
*
|
||||
* Used to list your current memos.
|
||||
*/
|
||||
module { name = "ms_list" }
|
||||
command { service = "MemoServ"; name = "LIST"; command = "memoserv/list" }
|
||||
|
||||
/*
|
||||
* ms_read
|
||||
*
|
||||
* Provides the command memoserv/read.
|
||||
*
|
||||
* Used to read your memos.
|
||||
*/
|
||||
module { name = "ms_read" }
|
||||
command { service = "MemoServ"; name = "READ"; command = "memoserv/read" }
|
||||
|
||||
/*
|
||||
* ms_rsend
|
||||
*
|
||||
* Provides the command memoserv/rsend.
|
||||
*
|
||||
* Used to send a memo requiring a receipt be sent back once it is read.
|
||||
*/
|
||||
#module
|
||||
{
|
||||
name = "ms_rsend"
|
||||
|
||||
/*
|
||||
* Only allow Services Operators to use ms_rsend.
|
||||
*
|
||||
* This directive is optional.
|
||||
*/
|
||||
operonly = no
|
||||
}
|
||||
#command { service = "MemoServ"; name = "RSEND"; command = "memoserv/rsend" }
|
||||
|
||||
/*
|
||||
* ms_send
|
||||
*
|
||||
* Provides the command memoserv/send.
|
||||
*
|
||||
* Used to send memos.
|
||||
*/
|
||||
module { name = "ms_send" }
|
||||
command { service = "MemoServ"; name = "SEND"; command = "memoserv/send" }
|
||||
|
||||
/*
|
||||
* ms_sendall
|
||||
*
|
||||
* Provides the command memoserv/sendall.
|
||||
*
|
||||
* Used to send a mass memo to every registered user.
|
||||
*/
|
||||
module { name = "ms_sendall" }
|
||||
command { service = "MemoServ"; name = "SENDALL"; command = "memoserv/sendall"; permission = "memoserv/sendall" }
|
||||
|
||||
/*
|
||||
* ms_set
|
||||
*
|
||||
* Provides the command memoserv/set.
|
||||
*
|
||||
* Used to set settings such as how you are notified of new memos, and your memo limit.
|
||||
*/
|
||||
module { name = "ms_set" }
|
||||
command { service = "MemoServ"; name = "SET"; command = "memoserv/set" }
|
||||
|
||||
/*
|
||||
* ms_staff
|
||||
*
|
||||
* Provides the command memoserv/staff.
|
||||
*
|
||||
* Used to send a memo to all registered staff members.
|
||||
*/
|
||||
module { name = "ms_staff" }
|
||||
command { service = "MemoServ"; name = "STAFF"; command = "memoserv/staff"; permission = "memoserv/staff" }
|
||||
@@ -1,949 +0,0 @@
|
||||
/*
|
||||
* [OPTIONAL] Non-Core Modules
|
||||
*
|
||||
* The following blocks are used to load all non-core modules, including 3rd-party modules.
|
||||
* Modules can be prevented from loading by commenting out the line, other modules can be added by
|
||||
* adding a module block. These modules will be loaded prior to Anope connecting to your network.
|
||||
*
|
||||
* Note that some of these modules are labeled EXTRA, and must be enabled prior to compiling by
|
||||
* running the 'extras' script on Linux and UNIX.
|
||||
*/
|
||||
|
||||
/*
|
||||
* help
|
||||
*
|
||||
* Provides the command generic/help.
|
||||
*
|
||||
* This is a generic help command that can be used with any client.
|
||||
*/
|
||||
module { name = "help" }
|
||||
|
||||
/*
|
||||
* dns
|
||||
*
|
||||
* Adds support for the DNS protocol. By itself this module does nothing useful,
|
||||
* but other modules such as dnsbl and os_dns require this.
|
||||
*/
|
||||
#module
|
||||
{
|
||||
name = "dns"
|
||||
|
||||
/*
|
||||
* The nameserver to use for resolving hostnames, must be an IP or a resolver configuration file.
|
||||
* The below should work fine on all UNIX-like systems. Windows users will have to find their nameservers
|
||||
* from ipconfig /all and put the IP here.
|
||||
*/
|
||||
nameserver = "/etc/resolv.conf"
|
||||
#nameserver = "127.0.0.1"
|
||||
|
||||
/*
|
||||
* How long to wait in seconds before a DNS query has timed out.
|
||||
*/
|
||||
timeout = 5
|
||||
|
||||
/* Only edit below if you are expecting to use os_dns or otherwise answer DNS queries. */
|
||||
|
||||
/*
|
||||
* The IP and port services use to listen for DNS queries.
|
||||
* Note that ports less than 1024 are privileged on UNIX/Linux systems, and
|
||||
* require Anope to be started as root. If you do this, it is recommended you
|
||||
* set options:user and options:group so Anope can change users after binding
|
||||
* to this port.
|
||||
*/
|
||||
ip = "0.0.0.0"
|
||||
port = 53
|
||||
|
||||
/*
|
||||
* SOA record information.
|
||||
*/
|
||||
|
||||
/* Email address of the DNS administrator. */
|
||||
admin = "admin@example.com"
|
||||
|
||||
/* This should be the names of the public facing nameservers serving the records. */
|
||||
nameservers = "ns1.example.com ns2.example.com"
|
||||
|
||||
/* The time secondary servers are allowed to cache for. This should be reasonably low
|
||||
* if you want your records to be updated without much delay.
|
||||
*/
|
||||
refresh = 3600
|
||||
|
||||
/* A notify block. There should probably be one per nameserver listed in 'nameservers'.
|
||||
*/
|
||||
notify
|
||||
{
|
||||
ip = "192.0.2.0"
|
||||
port = 53
|
||||
}
|
||||
}
|
||||
|
||||
/*
|
||||
* dnsbl
|
||||
*
|
||||
* Allows configurable DNS blacklists to check connecting users against. If a user
|
||||
* is found on the blacklist they will be immediately banned. This is a crucial module
|
||||
* to prevent bot attacks.
|
||||
*/
|
||||
#module
|
||||
{
|
||||
name = "dnsbl"
|
||||
|
||||
/*
|
||||
* If set, Anope will check clients against the DNSBLs when services connect to its uplink.
|
||||
* This is not recommended, and on large networks will open a very large amount of DNS queries.
|
||||
* Whilst services are not drastically affected by this, your nameserver/DNSBL might care.
|
||||
*/
|
||||
check_on_connect = no
|
||||
|
||||
/*
|
||||
* If set, Anope will check clients when coming back from a netsplit. This can cause a large number
|
||||
* of DNS queries open at once. Whilst services are not drastically affected by this, your nameserver/DNSBL
|
||||
* might care.
|
||||
*/
|
||||
check_on_netburst = no
|
||||
|
||||
/*
|
||||
* If set, OperServ will add clients found in the DNSBL to the akill list. Without it, OperServ simply sends
|
||||
* a timed G/K-line to the IRCd and forgets about it. Can be useful if your akill list is being fill up by bots.
|
||||
*/
|
||||
add_to_akill = yes
|
||||
|
||||
blacklist
|
||||
{
|
||||
/* Name of the blacklist. */
|
||||
name = "rbl.efnetrbl.org"
|
||||
|
||||
/* How long to set the ban for. */
|
||||
time = 4h
|
||||
|
||||
/* Reason for akill.
|
||||
* {nick} is the nick of the user
|
||||
* {user} is the ident/username of the user
|
||||
* {real} is the realname of the user
|
||||
* {host} is the hostname of the user
|
||||
* {ip} is the IP of the user
|
||||
* {reply} is the reply reason (configured below). Will be nothing if not configured.
|
||||
* {network} is the network name set in networkinfo:networkname
|
||||
*/
|
||||
reason = "You are listed in the EFnet RBL, visit https://rbl.efnetrbl.org/?i={ip} for info"
|
||||
|
||||
/* Replies to ban and their reason. If no replies are configured, all replies get banned. */
|
||||
reply
|
||||
{
|
||||
code = 1
|
||||
reason = "Open Proxy"
|
||||
}
|
||||
|
||||
#reply
|
||||
{
|
||||
code = 2
|
||||
reason = "spamtrap666"
|
||||
}
|
||||
|
||||
#reply
|
||||
{
|
||||
code = 3
|
||||
reason = "spamtrap50"
|
||||
}
|
||||
|
||||
reply
|
||||
{
|
||||
code = 4
|
||||
reason = "TOR"
|
||||
|
||||
/*
|
||||
* If set, users identified to services at the time the result comes back
|
||||
* will not be banned.
|
||||
*/
|
||||
#allow_account = yes
|
||||
}
|
||||
|
||||
reply
|
||||
{
|
||||
code = 5
|
||||
reason = "Drones / Flooding"
|
||||
}
|
||||
}
|
||||
|
||||
#blacklist
|
||||
{
|
||||
name = "dnsbl.dronebl.org"
|
||||
time = 4h
|
||||
reason = "You have a host listed in the DroneBL. For more information, visit https://dronebl.org/lookup?ip={ip}&network={network}"
|
||||
}
|
||||
|
||||
/* Exempt localhost from DNSBL checks */
|
||||
exempt { ip = "127.0.0.0/8" }
|
||||
}
|
||||
|
||||
/*
|
||||
* helpchan
|
||||
*
|
||||
* Gives users who are op in the specified help channel usermode +h (helpop).
|
||||
*/
|
||||
#module
|
||||
{
|
||||
name = "helpchan"
|
||||
|
||||
helpchannel = "#help"
|
||||
}
|
||||
|
||||
/*
|
||||
* httpd
|
||||
*
|
||||
* Allows services to serve web pages. By itself, this module does nothing useful.
|
||||
*
|
||||
* Note that using this will allow users to get the IP of your services.
|
||||
* To prevent this we recommend using a reverse proxy or a tunnel.
|
||||
*/
|
||||
#module
|
||||
{
|
||||
name = "httpd"
|
||||
|
||||
httpd
|
||||
{
|
||||
/* Name of this service. */
|
||||
name = "httpd/main"
|
||||
|
||||
/* IP to listen on. */
|
||||
ip = "0.0.0.0"
|
||||
|
||||
/* Port to listen on. */
|
||||
port = 8080
|
||||
|
||||
/* Time before connections to this server are timed out. */
|
||||
timeout = 30
|
||||
|
||||
/* Listen using SSL. Requires an SSL module. */
|
||||
#ssl = yes
|
||||
|
||||
/* If you are using a reverse proxy that sends one of the
|
||||
* extforward_headers set below, set this to its IP.
|
||||
* This allows services to obtain the real IP of users by
|
||||
* reading the forwarded-for HTTP header.
|
||||
* Multiple IP addresses can be specified separated by a space character.
|
||||
*/
|
||||
#extforward_ip = "192.168.0.255 192.168.1.255"
|
||||
|
||||
/* The header to look for. These probably work as is. */
|
||||
extforward_header = "X-Forwarded-For Forwarded-For"
|
||||
}
|
||||
}
|
||||
|
||||
/*
|
||||
* [EXTRA] ldap
|
||||
*
|
||||
* This module allows other modules to use LDAP. By itself, this module does nothing useful.
|
||||
*/
|
||||
#module
|
||||
{
|
||||
name = "ldap"
|
||||
|
||||
ldap
|
||||
{
|
||||
server = "ldap://127.0.0.1"
|
||||
|
||||
/*
|
||||
* Admin credentials used for performing searches and adding users.
|
||||
*/
|
||||
admin_binddn = "cn=Manager,dc=anope,dc=org"
|
||||
admin_password = "secret"
|
||||
}
|
||||
}
|
||||
|
||||
/*
|
||||
* ldap_authentication
|
||||
*
|
||||
* This module allows many commands such as IDENTIFY, RELEASE, RECOVER, GHOST, etc. use
|
||||
* LDAP to authenticate users. Requires ldap.
|
||||
*/
|
||||
#module
|
||||
{
|
||||
name = "ldap_authentication"
|
||||
|
||||
/*
|
||||
* The distinguished name used for searching for users's accounts.
|
||||
*/
|
||||
basedn = "ou=users,dc=anope,dc=org"
|
||||
|
||||
/*
|
||||
* The search filter used to look up users's accounts.
|
||||
* {account} is replaced with the user's account.
|
||||
* {object_class} is replaced with the object_class configured below.
|
||||
*/
|
||||
search_filter = "(&(uid={account})(objectClass={object_class}))"
|
||||
|
||||
/*
|
||||
* The object class used by LDAP to store user account information.
|
||||
* This is used for adding new users to LDAP if registration is allowed.
|
||||
*/
|
||||
object_class = "anopeUser"
|
||||
|
||||
/*
|
||||
* The attribute value used for account names.
|
||||
*/
|
||||
username_attribute = "uid"
|
||||
|
||||
/*
|
||||
* The attribute value used for email addresses.
|
||||
* This directive is optional.
|
||||
*/
|
||||
email_attribute = "email"
|
||||
|
||||
/*
|
||||
* The attribute value used for passwords.
|
||||
* Used when registering new accounts in LDAP.
|
||||
*/
|
||||
password_attribute = "userPassword"
|
||||
|
||||
/*
|
||||
* If set, the reason to give the users who try to register with NickServ,
|
||||
* including nick registration from grouping.
|
||||
*
|
||||
* If not set, then registration is not blocked.
|
||||
*/
|
||||
#disable_register_reason = "To register on this network visit https://some.misconfigured.site.example/register"
|
||||
|
||||
/*
|
||||
* If set, the reason to give the users who try to "/msg NickServ SET EMAIL".
|
||||
* If not set, then email changing is not blocked.
|
||||
*/
|
||||
#disable_email_reason = "To change your email address visit https://some.misconfigured.site.example"
|
||||
}
|
||||
|
||||
/*
|
||||
* ldap_oper
|
||||
*
|
||||
* This module dynamically ties users to Anope opertypes when they identify
|
||||
* via LDAP group membership. Requires ldap.
|
||||
*
|
||||
* Note that this doesn't give the user privileges on the IRCd, only in Anope.
|
||||
*/
|
||||
#module
|
||||
{
|
||||
name = "ldap_oper"
|
||||
|
||||
/*
|
||||
* An optional binddn to use when searching for groups.
|
||||
* {account} is replaced with the account name of the user.
|
||||
*/
|
||||
#binddn = "cn=Manager,dc=anope,dc=org"
|
||||
|
||||
/*
|
||||
* An optional password to bind with.
|
||||
*/
|
||||
#password = "secret"
|
||||
|
||||
/*
|
||||
* The base DN where the groups are.
|
||||
*/
|
||||
basedn = "ou=groups,dc=anope,dc=org"
|
||||
|
||||
/*
|
||||
* The filter to use when searching for users.
|
||||
* {account} is replaced with the account name of the user.
|
||||
*/
|
||||
filter = "(member=uid={account},ou=users,dc=anope,dc=org)"
|
||||
|
||||
/*
|
||||
* The attribute of the group that is the name of the opertype.
|
||||
* The cn attribute should match a known opertype in the config.
|
||||
*/
|
||||
opertype_attribute = "cn"
|
||||
}
|
||||
|
||||
/*
|
||||
* [EXTRA] mysql
|
||||
*
|
||||
* This module allows other modules to use MySQL.
|
||||
*/
|
||||
#module
|
||||
{
|
||||
name = "mysql"
|
||||
|
||||
mysql
|
||||
{
|
||||
/* The name of this service. */
|
||||
name = "mysql/main"
|
||||
database = "anope"
|
||||
server = "127.0.0.1"
|
||||
username = "anope"
|
||||
password = "mypassword"
|
||||
port = 3306
|
||||
socket = ""
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/*
|
||||
* [EXTRA] regex_pcre2
|
||||
*
|
||||
* Provides the regex engine regex/pcre, which uses version 2 of the Perl Compatible Regular
|
||||
* Expressions library.
|
||||
*/
|
||||
#module { name = "regex_pcre2" }
|
||||
|
||||
/*
|
||||
* [EXTRA] regex_posix
|
||||
*
|
||||
* Provides the regex engine regex/posix, which uses the POSIX compliant regular expressions.
|
||||
*/
|
||||
#module { name = "regex_posix" }
|
||||
|
||||
/*
|
||||
* regex_stdlib
|
||||
*
|
||||
* Provides the regex engine regex/stdlib, which uses the regular expression library that is part of
|
||||
* the C++ standard library.
|
||||
*/
|
||||
module
|
||||
{
|
||||
name = "regex_stdlib"
|
||||
|
||||
/*
|
||||
* The syntax scheme to use. Can be set to awk to use the regular expression grammar used by the
|
||||
* awk utility in POSIX, basic to use the basic POSIX regular expression grammar, ecmascript to
|
||||
* use the modified ECMAScript regular expression grammar, egrep to use the regular expression
|
||||
* grammar used by the grep utility with the -E option in POSIX, extended to use the extended
|
||||
* POSIX regular expression grammar, or grep to use the regular expression grammar used by the
|
||||
* grep utility in POSIX.
|
||||
*
|
||||
* See https://en.cppreference.com/w/cpp/regex/syntax_option_type for more information.
|
||||
*/
|
||||
syntax = "ecmascript"
|
||||
}
|
||||
|
||||
/*
|
||||
* [EXTRA] regex_tre
|
||||
*
|
||||
* Provides the regex engine regex/tre, which uses the TRE regex library.
|
||||
*/
|
||||
#module { name = "regex_tre" }
|
||||
|
||||
/*
|
||||
* rewrite
|
||||
*
|
||||
* Allows rewriting commands sent to/from clients.
|
||||
*/
|
||||
#module { name = "rewrite" }
|
||||
#command
|
||||
{
|
||||
service = "ChanServ"; name = "CLEAR"; command = "rewrite"
|
||||
|
||||
/* Enable rewrite. */
|
||||
rewrite = yes
|
||||
|
||||
/* Source message to match. A $ can be used to match anything. */
|
||||
rewrite_source = "CLEAR $ USERS"
|
||||
|
||||
/*
|
||||
* Message to rewrite the source message to. A $ followed by a number, e.g. $0, gets
|
||||
* replaced by the number-th word from the source_message, starting from 0.
|
||||
*/
|
||||
rewrite_target = "KICK $1 *"
|
||||
|
||||
/*
|
||||
* The command description. This only shows up in HELP's output.
|
||||
* Comment this option to prevent the command from showing in the
|
||||
* HELP command.
|
||||
*/
|
||||
rewrite_description = "Clears all users from a channel"
|
||||
}
|
||||
|
||||
/*
|
||||
* proxyscan
|
||||
*
|
||||
* This module allows you to scan connecting clients for open proxies.
|
||||
* Note that using this will allow users to get the IP of your services.
|
||||
*
|
||||
* Currently the two supported proxy types are HTTP and SOCKS5.
|
||||
*
|
||||
* The proxy scanner works by attempting to connect to clients when they
|
||||
* connect to the network, and if they have a proxy running instruct it to connect
|
||||
* back to services. If services are able to connect through the proxy to itself
|
||||
* then it knows it is an insecure proxy, and will ban it.
|
||||
*/
|
||||
#module
|
||||
{
|
||||
name = "proxyscan"
|
||||
|
||||
/*
|
||||
* The target IP services tells the proxy to connect back to. This must be a publicly
|
||||
* available IP that remote proxies can connect to.
|
||||
*/
|
||||
#target_ip = "127.0.0.1"
|
||||
|
||||
/*
|
||||
* The port services tells the proxy to connect to.
|
||||
*/
|
||||
target_port = 7226
|
||||
|
||||
/*
|
||||
* The listen IP services listen on for incoming connections from suspected proxies.
|
||||
* This probably will be the same as target_ip, but may not be if you are behind a firewall (NAT).
|
||||
*/
|
||||
#listen_ip = "127.0.0.1"
|
||||
|
||||
/*
|
||||
* The port services should listen on for incoming connections from suspected proxies.
|
||||
* This most likely will be the same as target_port.
|
||||
*/
|
||||
listen_port = 7226
|
||||
|
||||
/*
|
||||
* An optional notice sent to clients upon connect.
|
||||
*/
|
||||
#connect_notice = "We will now scan your host for insecure proxies. If you do not consent to this scan please disconnect immediately."
|
||||
|
||||
/*
|
||||
* Who the notice should be sent from.
|
||||
*/
|
||||
#connect_source = "OperServ"
|
||||
|
||||
/*
|
||||
* If set, OperServ will add infected clients to the akill list. Without it, OperServ simply sends
|
||||
* a timed G/K-line to the IRCd and forgets about it. Can be useful if your akill list is being filled up by bots.
|
||||
*/
|
||||
add_to_akill = yes
|
||||
|
||||
/*
|
||||
* How long before connections should be timed out.
|
||||
*/
|
||||
timeout = 5
|
||||
|
||||
proxyscan
|
||||
{
|
||||
/* The type of proxy to check for. A comma separated list is allowed. */
|
||||
type = "HTTP"
|
||||
|
||||
/* The ports to check. */
|
||||
port = "80,8080"
|
||||
|
||||
/* How long to set the ban for. */
|
||||
time = 4h
|
||||
|
||||
/*
|
||||
* The reason to ban the user for.
|
||||
* {type} is replaced with the type of proxy found.
|
||||
* {ip} is replaced with the IP of proxy found.
|
||||
* {port} is replaced with the port.
|
||||
*/
|
||||
reason = "You have an open proxy running on your host ({type}:{ip}:{port})"
|
||||
}
|
||||
}
|
||||
|
||||
/*
|
||||
* [EXTRA] ssl_gnutls
|
||||
*
|
||||
* This module provides SSL services to Anope using GnuTLS, for example to
|
||||
* connect to the uplink server(s) via SSL.
|
||||
*
|
||||
* You may only load either ssl_gnutls or ssl_openssl, but not both.
|
||||
*/
|
||||
#module
|
||||
{
|
||||
name = "ssl_gnutls"
|
||||
|
||||
/*
|
||||
* An optional certificate and key for ssl_gnutls to give to the uplink. All
|
||||
* paths are relative to the config directory.
|
||||
*
|
||||
* You can generate your own certificate and key pair by using:
|
||||
*
|
||||
* certtool --generate-privkey --bits 2048 --outfile privkey.pem
|
||||
* certtool --generate-self-signed --load-privkey privkey.pem --outfile fullchain.pem
|
||||
*
|
||||
*/
|
||||
cert = "fullchain.pem"
|
||||
key = "privkey.pem"
|
||||
|
||||
/*
|
||||
* Diffie-Hellman parameters to use when acting as a server. This is only
|
||||
* required for TLS servers that want to use ephemeral DH cipher suites.
|
||||
*
|
||||
* This is NOT required for Anope to connect to the uplink server(s) via SSL.
|
||||
*
|
||||
* You can generate DH parameters by using:
|
||||
*
|
||||
* certtool --generate-dh-params --bits 2048 --outfile dhparams.pem
|
||||
*
|
||||
*/
|
||||
#dhparams = "dhparams.pem"
|
||||
}
|
||||
|
||||
/*
|
||||
* [EXTRA] ssl_openssl
|
||||
*
|
||||
* This module provides SSL services to Anope using OpenSSL, for example to
|
||||
* connect to the uplink server(s) via SSL.
|
||||
*
|
||||
* You may only load either ssl_openssl or ssl_gnutls, but not both.
|
||||
*
|
||||
*/
|
||||
#module
|
||||
{
|
||||
name = "ssl_openssl"
|
||||
|
||||
/*
|
||||
* An optional certificate and key for ssl_openssl to give to the uplink.
|
||||
* All paths are relative to the config directory.
|
||||
*
|
||||
* You can generate your own certificate and key pair by using:
|
||||
*
|
||||
* openssl genrsa -out privkey.pem 2048
|
||||
* openssl req -new -x509 -key privkey.pem -out fullchain.pem -days 1095
|
||||
*/
|
||||
cert = "fullchain.pem"
|
||||
key = "privkey.pem"
|
||||
|
||||
/*
|
||||
* If you wish to increase security you can disable support for older
|
||||
* versions of TLS with no known vulnerabilities but that provide less
|
||||
* security. For your security SSLv2 and SSLv3 are always disabled.
|
||||
*/
|
||||
#tlsv10 = no
|
||||
#tlsv11 = no
|
||||
#tlsv12 = yes
|
||||
}
|
||||
|
||||
/*
|
||||
* sql_authentication
|
||||
*
|
||||
* This module allows authenticating users against an external SQL database using a custom
|
||||
* query.
|
||||
*/
|
||||
#module
|
||||
{
|
||||
name = "sql_authentication"
|
||||
|
||||
/* SQL engine to use. Should be configured elsewhere with mysql, sqlite, etc. */
|
||||
engine = "mysql/main"
|
||||
|
||||
/* Query to execute to authenticate. A non empty result from this query is considered a success,
|
||||
* and the user will be authenticated.
|
||||
*
|
||||
* @a@ is replaced with the user's account name
|
||||
* @p@ is replaced with the user's password
|
||||
* @n@ is replaced with the user's nickname
|
||||
* @i@ is replaced with the user's IP
|
||||
*
|
||||
* Note that @n@ and @i@ may not always exist in the case of a user identifying outside of the normal
|
||||
* nickserv/identify command, such as through the web panel.
|
||||
*
|
||||
* Furthermore, if a field named email is returned from this query the user's email is
|
||||
* set to its value.
|
||||
*
|
||||
*
|
||||
* We've included some example queries for some popular website/forum systems.
|
||||
*
|
||||
* Drupal 6: "SELECT `mail` AS `email` FROM `users` WHERE `name` = @a@ AND `pass` = MD5(@p@) AND `status` = 1"
|
||||
* e107 cms: "SELECT `user_email` AS `email` FROM `e107_user` WHERE `user_loginname` = @a@ AND `user_password` = MD5(@p@)"
|
||||
* SMF Forum: "SELECT `email_address` AS `email` FROM `smf_members` WHERE `member_name` = @a@ AND `passwd` = SHA1(CONCAT(LOWER(@a@), @p@))"
|
||||
* vBulletin: "SELECT `email` FROM `user` WHERE `username` = @a@ AND `password` = MD5(CONCAT(MD5(@p@), `salt`))"
|
||||
* IP.Board: "SELECT `email` FROM `ibf_members` WHERE `name` = @a@ AND `members_pass_hash` = MD5(CONCAT(MD5(`members_pass_salt`), MD5(@p@)))"
|
||||
*/
|
||||
query = "SELECT `email_addr` AS `email` FROM `my_users` WHERE `username` = @a@ AND `password` = MD5(CONCAT('salt', @p@))"
|
||||
|
||||
/*
|
||||
* If your database uses a password hashing algorithm that can not be compared using a simple
|
||||
* comparison function then you can specify it here to compare locally.
|
||||
*
|
||||
* You will need to have the appropriate encryption module (e.g. enc_bcrypt) loaded in order
|
||||
* for this to work.
|
||||
*/
|
||||
#password_hash = "bcrypt"
|
||||
|
||||
/*
|
||||
* If using the password_hash field (above) you will need to specify the name of the field to
|
||||
* fetch the password from.
|
||||
*
|
||||
* Defaults to "password" if not set.
|
||||
*/
|
||||
#password_field = "password"
|
||||
|
||||
/*
|
||||
* If set, the reason to give the users who try to "/msg NickServ REGISTER".
|
||||
* If not set, then registration is not blocked.
|
||||
*/
|
||||
#disable_reason = "To register on this network visit https://some.misconfigured.site.example/register"
|
||||
|
||||
/*
|
||||
* If set, the reason to give the users who try to "/msg NickServ SET EMAIL".
|
||||
* If not set, then email changing is not blocked.
|
||||
*/
|
||||
#disable_email_reason = "To change your email address visit https://some.misconfigured.site.example"
|
||||
}
|
||||
|
||||
/*
|
||||
* sql_log
|
||||
*
|
||||
* This module adds an additional target option to log{} blocks
|
||||
* that allows logging Services' logs to SQL. To log to SQL, add
|
||||
* the SQL service name to log:targets prefixed by sql_log:. For
|
||||
* example:
|
||||
*
|
||||
* log
|
||||
* {
|
||||
* targets = "services.log sql_log:mysql/main"
|
||||
* ...
|
||||
* }
|
||||
*
|
||||
* By default this module logs to the table `logs`, and will create
|
||||
* it if it doesn't exist. This module does not create any indexes (keys)
|
||||
* on the table and it is recommended you add them yourself as necessary.
|
||||
*/
|
||||
#module { name = "sql_log" }
|
||||
|
||||
/*
|
||||
* sql_oper
|
||||
*
|
||||
* This module allows granting users Services Operator privileges based on an
|
||||
* external SQL database using a custom query.
|
||||
*/
|
||||
#module
|
||||
{
|
||||
name = "sql_oper"
|
||||
|
||||
/* SQL engine to use. Should be configured elsewhere with mysql, sqlite, etc. */
|
||||
engine = "mysql/main"
|
||||
|
||||
/* Query to execute to determine if a user should have operator privileges.
|
||||
* A field named opertype must be returned in order to link the user to their oper type.
|
||||
* The oper types must be configured earlier in anope.conf.
|
||||
*
|
||||
* If a field named modes is returned from this query then those modes are set on the user.
|
||||
* Without this, only a simple +o is sent.
|
||||
*
|
||||
* @a@ is replaced with the user's account name
|
||||
* @i@ is replaced with the user's IP
|
||||
*/
|
||||
query = "SELECT `opertype` FROM `my_users` WHERE `user_name` = @a@"
|
||||
}
|
||||
|
||||
/*
|
||||
* [EXTRA] sqlite
|
||||
*
|
||||
* This module allows other modules to use SQLite.
|
||||
*/
|
||||
#module
|
||||
{
|
||||
name = "sqlite"
|
||||
|
||||
/* A SQLite database */
|
||||
sqlite
|
||||
{
|
||||
/* The name of this service. */
|
||||
name = "sqlite/main"
|
||||
|
||||
/* The database name, it will be created if it does not exist. */
|
||||
database = "anope.sqlite"
|
||||
}
|
||||
}
|
||||
|
||||
/*
|
||||
* webcpanel
|
||||
*
|
||||
* This module creates a web configuration panel that allows users and operators to perform any task
|
||||
* as they could over IRC. If you are using the default configuration you should be able to access
|
||||
* this panel by visiting http://127.0.0.1:8080 in your web browser from the machine Anope is running on.
|
||||
*
|
||||
* This module requires httpd.
|
||||
*/
|
||||
#module
|
||||
{
|
||||
name = "webcpanel"
|
||||
|
||||
/* Web server to use. */
|
||||
server = "httpd/main"
|
||||
|
||||
/*
|
||||
* The directory containing the webcpanel templates. This is relative to the
|
||||
* data directory.
|
||||
*/
|
||||
template_dir = "webcpanel/templates/default"
|
||||
|
||||
/* Page title. */
|
||||
title = "Anope IRC Services"
|
||||
}
|
||||
|
||||
/*
|
||||
* jsonrpc
|
||||
*
|
||||
* Allows remote applications to execute methods within Anope using the JSON-RPC
|
||||
* protocol. See https://www.jsonrpc.org/specification for more information.
|
||||
*
|
||||
* By itself this module does nothing. You should load a RPC method module like
|
||||
* rpc_data which actually provides RPC methods.
|
||||
*
|
||||
* See docs/RPC/jsonrpc.js for an example JavaScript JSON-RPC client.
|
||||
* See docs/RPC/jsonrpc.rb for an example Ruby JSON-RPC client.
|
||||
*
|
||||
* IMPORTANT: this can not be loaded at the same time as the xmlrpc module.
|
||||
*/
|
||||
#module
|
||||
{
|
||||
name = "jsonrpc"
|
||||
|
||||
/*
|
||||
* The maximum number of bits an integer can be have in its native type.
|
||||
*
|
||||
* By default Anope will emit integers as their native JSON type. If you are
|
||||
* using JavaScript (which has 53 bit integers) or another language with
|
||||
* native integer types smaller than 64 bits you may need to limit the size
|
||||
* of integers emitted by Anope.
|
||||
*
|
||||
* If this is enabled a string will be used for values outside of the range
|
||||
* supported by the native data type.
|
||||
*/
|
||||
#integer_bits = 53
|
||||
|
||||
/* Web service to use. Requires httpd. */
|
||||
server = "httpd/main"
|
||||
|
||||
/*
|
||||
* You can also specify one or more authorization tokens to protect access
|
||||
* to the JSON-RPC interface. These tokens should be sent using the Bearer
|
||||
* authorization header as defined in RFC 6750.
|
||||
*/
|
||||
#token
|
||||
{
|
||||
/* The token used for authentication. */
|
||||
token = "BmcxTaiYjoBtayfnxCFq"
|
||||
|
||||
/*
|
||||
* The algorithm which the above token is hashed with. If this is not
|
||||
* set then services will assume the above password is not hashed.
|
||||
*
|
||||
* You will need to have the appropriate encryption module (e.g.
|
||||
* enc_bcrypt) loaded in order for this to work.
|
||||
*/
|
||||
#token_hash = "bcrypt"
|
||||
|
||||
/** A list of glob patterns for methods the token can execute. */
|
||||
methods = "~anope.message* anope.*"
|
||||
}
|
||||
}
|
||||
|
||||
/*
|
||||
* [EXTRA] xmlrpc
|
||||
*
|
||||
* Allows remote applications to execute methods within Anope using the XML-RPC
|
||||
* protocol. See https://xmlrpc.com/spec.md for more information.
|
||||
*
|
||||
* By itself this module does nothing. You should load a RPC method module like
|
||||
* rpc_data which actually provides RPC methods.
|
||||
*
|
||||
* IMPORTANT: this can not be loaded at the same time as the jsonrpc module.
|
||||
*/
|
||||
#module
|
||||
{
|
||||
name = "xmlrpc"
|
||||
|
||||
/*
|
||||
* Whether to enable the use of XML-RPC extensions.
|
||||
*
|
||||
* By default Anope will use some extended XML-RPC types. If your XML-RPC
|
||||
* client can not handle these you will need to disable them.
|
||||
*
|
||||
* If i8 is disabled a string will be used for values outside of the range
|
||||
* supported by the 32-bit int data type.
|
||||
*
|
||||
* If nil is disabled an empty struct will be used instead.
|
||||
*/
|
||||
#enable_i8 = no
|
||||
#enable_nil = no
|
||||
|
||||
/* Web service to use. Requires httpd. */
|
||||
server = "httpd/main"
|
||||
|
||||
/*
|
||||
* You can also specify one or more authorization tokens to protect access
|
||||
* to the XML-RPC interface. These tokens should be sent using the Bearer
|
||||
* authorization header as defined in RFC 6750.
|
||||
*/
|
||||
#token
|
||||
{
|
||||
/* The token used for authentication. */
|
||||
token = "BmcxTaiYjoBtayfnxCFq"
|
||||
|
||||
/*
|
||||
* The algorithm which the above token is hashed with. If this is not
|
||||
* set then services will assume the above password is not hashed.
|
||||
*
|
||||
* You will need to have the appropriate encryption module (e.g.
|
||||
* enc_bcrypt) loaded in order for this to work.
|
||||
*/
|
||||
#token_hash = "bcrypt"
|
||||
|
||||
/** A list of glob patterns for methods the token can execute. */
|
||||
methods = "~anope.message* anope.*"
|
||||
}
|
||||
}
|
||||
|
||||
/*
|
||||
* rpc_user
|
||||
*
|
||||
* Adds support for the following RPC methods:
|
||||
*
|
||||
* anope.checkCredentials anope.identify
|
||||
* anope.listCommands anope.command
|
||||
*
|
||||
* Requires either the jsonrpc or xmlrpc module.
|
||||
*
|
||||
* See docs/RPC/rpc_user.md for API documentation.
|
||||
*/
|
||||
#module
|
||||
{
|
||||
name = "rpc_user"
|
||||
|
||||
/*
|
||||
* Some commands can only be executed by a real IRC user. You can work around
|
||||
* this executing them as an IRC user logged into the account if one exists.
|
||||
*/
|
||||
pretenduser = no
|
||||
}
|
||||
|
||||
/*
|
||||
* rpc_data
|
||||
*
|
||||
* Adds support for the following RPC methods:
|
||||
*
|
||||
* anope.listAccounts anope.account
|
||||
* anope.listChannels anope.channel
|
||||
* anope.listOpers anope.oper
|
||||
* anope.listServers anope.server
|
||||
* anope.listUsers anope.user
|
||||
*
|
||||
* Requires either the jsonrpc or xmlrpc module.
|
||||
*
|
||||
* See docs/RPC/rpc_data.md for API documentation.
|
||||
*/
|
||||
#module { name = "rpc_data" }
|
||||
|
||||
/*
|
||||
* rpc_message
|
||||
*
|
||||
* Adds support for the following RPC methods:
|
||||
*
|
||||
* anope.messageNetwork anope.messageServer
|
||||
* anope.messageUser
|
||||
*
|
||||
* Requires either the jsonrpc or xmlrpc module.
|
||||
*
|
||||
* See docs/RPC/rpc_message.md for API documentation.
|
||||
*/
|
||||
#module { name = "rpc_message" }
|
||||
|
||||
/*
|
||||
* rpc_system
|
||||
*
|
||||
* Adds support for the following RPC methods:
|
||||
*
|
||||
* system.listMethods
|
||||
*
|
||||
* Requires either the jsonrpc or xmlrpc module.
|
||||
*
|
||||
* See https://gggeek.github.io/phpxmlrpc/doc-1.1/ch08.html for API
|
||||
* documentation.
|
||||
*/
|
||||
#module { name = "rpc_system" }
|
||||
@@ -1,851 +0,0 @@
|
||||
/*
|
||||
* Example configuration file for NickServ.
|
||||
*/
|
||||
|
||||
/*
|
||||
* First, create the service.
|
||||
*/
|
||||
service
|
||||
{
|
||||
/*
|
||||
* The name of the NickServ client.
|
||||
* If you change this value, you probably want to change the client directive in the configuration for the nickserv module too.
|
||||
*/
|
||||
nick = "NickServ"
|
||||
|
||||
/*
|
||||
* The username of the NickServ client.
|
||||
*/
|
||||
user = "services"
|
||||
|
||||
/*
|
||||
* The hostname of the NickServ client.
|
||||
*/
|
||||
host = "${services.host}"
|
||||
|
||||
/*
|
||||
* The realname of the NickServ client.
|
||||
*/
|
||||
real = "Nickname Registration Service"
|
||||
|
||||
/*
|
||||
* The modes this client should use.
|
||||
* Do not modify this unless you know what you are doing.
|
||||
*
|
||||
* These modes are very IRCd specific. If left commented, sane defaults
|
||||
* are used based on what protocol module you have loaded.
|
||||
*
|
||||
* Note that setting this option incorrectly could potentially BREAK some, if
|
||||
* not all, usefulness of the client. We will not support you if this client is
|
||||
* unable to do certain things if this option is enabled.
|
||||
*/
|
||||
#modes = "+o"
|
||||
|
||||
/*
|
||||
* An optional comma separated list of channels this service should join. Outside
|
||||
* of log channels this is not very useful, as the service will just idle in the
|
||||
* specified channels, and will not accept any types of commands.
|
||||
*
|
||||
* 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"
|
||||
}
|
||||
|
||||
/*
|
||||
* Core NickServ module.
|
||||
*
|
||||
* Provides essential functionality for NickServ.
|
||||
*/
|
||||
module
|
||||
{
|
||||
name = "nickserv"
|
||||
|
||||
/*
|
||||
* The name of the client that should be NickServ.
|
||||
*/
|
||||
client = "NickServ"
|
||||
|
||||
/*
|
||||
* Requires users to give an email address when they register a nick.
|
||||
*
|
||||
* This directive defaults to "yes" and is recommended to be enabled.
|
||||
*/
|
||||
forceemail = yes
|
||||
|
||||
/*
|
||||
* Require users who change their email address to confirm they
|
||||
* own their new email.
|
||||
*
|
||||
* If {ns_register}:registration is set to mail then this defaults
|
||||
* to yes. Otherwise, it defaults to no.
|
||||
*/
|
||||
#confirmemailchanges = yes
|
||||
|
||||
/*
|
||||
* A message sent to users on connect if they use an unregistered nick. {nick} will be replaced with the user's nickname.
|
||||
*
|
||||
* This directive is optional.
|
||||
*/
|
||||
#unregistered_notice = "Your nickname is not registered. To register it, use: /msg NickServ REGISTER password email"
|
||||
|
||||
/*
|
||||
* The default options for newly registered nicks. Note that changing these options
|
||||
* will have no effect on nicks which are already registered. The list must be separated
|
||||
* by spaces.
|
||||
*
|
||||
* The options are:
|
||||
* - ns_private: Hide the nick from NickServ's LIST command
|
||||
* - hide_email: Hide the nick's email address from NickServ's INFO command
|
||||
* - hide_mask: Hide the nick's last or current user@host from NickServ's INFO command
|
||||
* - hide_status: Hide the nick's services operator access status from NickServ's INFO command
|
||||
* - hide_quit: Hide the nick's last quit message from NickServ's INFO command
|
||||
* - memo_signon: Notify user if they have a new memo when they sign into the nick
|
||||
* - memo_receive: Notify user if they have a new memo as soon as it's received
|
||||
* - memo_mail: Notify user if they have a new memo by mail
|
||||
* - autologin: User will be automatically logged in when they connect with a known SSL cert.
|
||||
* - 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
|
||||
* - ns_keep_modes: Enables keepmodes, which retains user modes across sessions
|
||||
* - protect: Protects the registered nickname from use by unidentified users.
|
||||
* - ns_stats: Enable Chanstats for newly registered nicks
|
||||
*
|
||||
* This directive is optional, if left blank, the options will default to memo_signon, and
|
||||
* memo_receive. If you really want no defaults, use "none" by itself as the option.
|
||||
*/
|
||||
defaults = "autoop hide_email hide_mask memo_receive memo_signon ns_private protect"
|
||||
|
||||
/*
|
||||
* The minimum length of time between consecutive uses of NickServ's REGISTER command. This
|
||||
* directive is optional, but recommended. If not set, it defaults to 15 minutes.
|
||||
*/
|
||||
regdelay = 15m
|
||||
|
||||
/*
|
||||
* The length of time before a nick's registration expires.
|
||||
*
|
||||
* This directive is optional, but recommended. If not set, the default is one year.
|
||||
*/
|
||||
expire = 1y
|
||||
|
||||
/*
|
||||
* Prevents the use of the ACCESS and CERT (excluding their LIST subcommand), DROP, FORBID, SUSPEND
|
||||
* and SET PASSWORD commands by services operators on other services operators.
|
||||
*
|
||||
* This directive is optional, but recommended.
|
||||
*/
|
||||
secureadmins = yes
|
||||
|
||||
/*
|
||||
* If set, Anope will set the channel modes a user has access to upon identifying, assuming
|
||||
* they are not already set.
|
||||
*
|
||||
* This directive is optional.
|
||||
*/
|
||||
modeonid = yes
|
||||
|
||||
/*
|
||||
* If set, Anope will set these user modes on any user who identifies.
|
||||
*
|
||||
* This directive is optional.
|
||||
*/
|
||||
#modesonid = "+R"
|
||||
|
||||
/*
|
||||
* If set, Anope will not show netsplits in the last quit message field
|
||||
* of NickServ's INFO command.
|
||||
*/
|
||||
hidenetsplitquit = yes
|
||||
|
||||
/*
|
||||
* The default period to force users to stop using a protected nickname after.
|
||||
*
|
||||
* Defaults to 1 minute.
|
||||
*/
|
||||
defaultprotect = 1m
|
||||
|
||||
/*
|
||||
* The minimum period that a user can have a user forced off their protected nickname after.
|
||||
*
|
||||
* Defaults to 10 seconds.
|
||||
*/
|
||||
minprotect = 10s
|
||||
|
||||
/*
|
||||
* The maximum period that a user can have a user forced off their protected nickname after.
|
||||
*
|
||||
* Defaults to 10 minutes.
|
||||
*/
|
||||
maxprotect = 10m
|
||||
|
||||
/*
|
||||
* If set, forbids the registration of nicks that contain an existing
|
||||
* nick with services access. For example, if Tester is a Services Oper,
|
||||
* you can't register NewTester or Tester123 unless you are an IRC
|
||||
* Operator.
|
||||
*
|
||||
* NOTE: If you enable this, you will have to be logged in as an IRC
|
||||
* operator in order to register a Services Root nick when setting up
|
||||
* Anope for the first time.
|
||||
*
|
||||
* This directive is optional.
|
||||
*/
|
||||
#restrictopernicks = yes
|
||||
|
||||
/*
|
||||
* The username, hostname, and real name used for pseudoclients created when
|
||||
* Anope needs to hold a nickname. This is only used if your IRCd does not
|
||||
* support SVSHOLDs.
|
||||
*/
|
||||
enforceruser = "enforcer"
|
||||
enforcerhost = "${services.host}"
|
||||
enforcerreal = "Services Enforcer"
|
||||
|
||||
/*
|
||||
* The length of time Anope should hold nicknames for.
|
||||
*
|
||||
* This directive is optional, but recommended. If not set it defaults to 1 minute.
|
||||
*/
|
||||
releasetimeout = 1m
|
||||
|
||||
/*
|
||||
* When a user's nick is forcibly changed to enforce nickname protection their new
|
||||
* nick will be based on this value. Any # in the value will be replaced with a random
|
||||
* number. If your IRCd has support for unique identifiers you can also set this to an
|
||||
* empty string to change a user's nick to their unique identifier.
|
||||
*
|
||||
* Make sure this is a valid nick and that it is is not longer than the maximum nick
|
||||
* length on your IRCd.
|
||||
*
|
||||
* This directive is optional. If not set it defaults to "Guest####"
|
||||
*/
|
||||
guestnick = "Guest####"
|
||||
|
||||
/*
|
||||
* If set, Anope does not allow ownership of nick names, only ownership of accounts.
|
||||
*/
|
||||
nonicknameownership = no
|
||||
|
||||
/*
|
||||
* The minimum length of passwords
|
||||
*
|
||||
* This directive is optional. If not set it defaults to 10.
|
||||
*/
|
||||
minpasslen = 10
|
||||
|
||||
/*
|
||||
* The maximum length of passwords
|
||||
*
|
||||
* This directive is optional. If not set it defaults to 50.
|
||||
*/
|
||||
maxpasslen = 50
|
||||
|
||||
/*
|
||||
* Whether all of the secondary nicks of an account have to expire or be
|
||||
* dropped before the display nick can expire or be dropped.
|
||||
*/
|
||||
preservedisplay = no
|
||||
}
|
||||
|
||||
/*
|
||||
* Core NickServ commands.
|
||||
*
|
||||
* In Anope modules can provide (multiple) commands, each of which has a unique command name. Once these modules
|
||||
* are loaded you can then configure the commands to be added to any client you like with any name you like.
|
||||
*
|
||||
* Additionally, you may provide a permission name that must be in the opertype of users executing the command.
|
||||
*
|
||||
* Sane defaults are provided below that do not need to be edited unless you wish to change the default behavior.
|
||||
*/
|
||||
|
||||
/* Command group configuration for NickServ.
|
||||
*
|
||||
* Commands may optionally be placed into groups to make NickServ's HELP output easier to understand.
|
||||
* Remove the following groups to use the old behavior of simply listing all NickServ commands from HELP.
|
||||
*/
|
||||
command_group
|
||||
{
|
||||
name = "nickserv/admin"
|
||||
description = _("Services Operator commands")
|
||||
}
|
||||
|
||||
/* Give it a help command. */
|
||||
command { service = "NickServ"; name = "HELP"; command = "generic/help" }
|
||||
|
||||
/*
|
||||
* ns_ajoin
|
||||
*
|
||||
* Provides the command nickserv/ajoin.
|
||||
*
|
||||
* Used for configuring channels to join once you identify.
|
||||
*/
|
||||
module
|
||||
{
|
||||
name = "ns_ajoin"
|
||||
|
||||
/*
|
||||
* The maximum number of channels a user can have on NickServ's AJOIN command.
|
||||
*/
|
||||
ajoinmax = 10
|
||||
}
|
||||
command { service = "NickServ"; name = "AJOIN"; command = "nickserv/ajoin" }
|
||||
|
||||
/*
|
||||
* ns_alist
|
||||
*
|
||||
* Provides the command nickserv/alist.
|
||||
*
|
||||
* Used for viewing what channels you have access to.
|
||||
*/
|
||||
module { name = "ns_alist" }
|
||||
command { service = "NickServ"; name = "ALIST"; command = "nickserv/alist" }
|
||||
command { service = "NickServ"; name = "ACCESS"; command = "nickserv/alist"; hide = yes }
|
||||
|
||||
/*
|
||||
* ns_cert
|
||||
*
|
||||
* Provides the command nickserv/cert.
|
||||
*
|
||||
* Used for configuring your SSL certificate list, which can be used to automatically identify you.
|
||||
*/
|
||||
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.
|
||||
*/
|
||||
max = 5
|
||||
}
|
||||
command { service = "NickServ"; name = "CERT"; command = "nickserv/cert" }
|
||||
command { service = "NickServ"; name = "SET AUTOLOGIN"; command = "nickserv/set/autologin" }
|
||||
command { service = "NickServ"; name = "SASET AUTOLOGIN"; command = "nickserv/saset/autologin"; permission = "nickserv/saset/autologin" }
|
||||
|
||||
|
||||
/*
|
||||
* ns_confirm
|
||||
*
|
||||
* Provides the command nickserv/confirm.
|
||||
*
|
||||
* Used for confirming previous account actions.
|
||||
*/
|
||||
module { name = "ns_confirm" }
|
||||
command { service = "NickServ"; name = "CONFIRM"; command = "nickserv/confirm" }
|
||||
|
||||
/*
|
||||
* ns_drop
|
||||
*
|
||||
* Provides the command nickserv/drop.
|
||||
*
|
||||
* Used for unregistering names.
|
||||
*/
|
||||
module { name = "ns_drop" }
|
||||
command { service = "NickServ"; name = "DROP"; command = "nickserv/drop" }
|
||||
|
||||
/*
|
||||
* ns_email
|
||||
*
|
||||
* Provides various functionality relating to email addresses. This includes the
|
||||
* following commands:
|
||||
*
|
||||
* - nickserv/confirm/email: Used for confirming email changes.
|
||||
* - nickserv/getemail: Used for getting accounts by searching for emails.
|
||||
* - nickserv/set/email, nickserv/saset/email: Used for setting an account's
|
||||
* emailvaddress.
|
||||
*/
|
||||
module
|
||||
{
|
||||
name = "ns_email"
|
||||
|
||||
/*
|
||||
* The amount of time a user has after requesting a change of email address
|
||||
* before it expires. Defaults to 1 day.
|
||||
*/
|
||||
#changeexpire = 1d
|
||||
|
||||
/*
|
||||
* The limit to how many registered accounts can use the same email address.
|
||||
* If set to 0 or left commented there will be no limit enforced when
|
||||
* registering new accounts or using /msg NickServ SET EMAIL.
|
||||
*/
|
||||
#maxemails = 1
|
||||
|
||||
/*
|
||||
* Whether to attempt to remove aliases when counting email addresses. This
|
||||
* means removing dots (.) and anything after a plus (+) in the user part of
|
||||
* the address, e.g. foo.bar+baz@example.com -> foobar@example.com.
|
||||
*/
|
||||
#remove_aliases = yes
|
||||
}
|
||||
command { service = "NickServ"; name = "CONFIRM EMAIL"; command = "nickserv/confirm/email" }
|
||||
command { service = "NickServ"; name = "GETEMAIL"; command = "nickserv/getemail"; permission = "nickserv/getemail"; group = "nickserv/admin" }
|
||||
command { service = "NickServ"; name = "SET EMAIL"; command = "nickserv/set/email" }
|
||||
command { service = "NickServ"; name = "SASET EMAIL"; command = "nickserv/saset/email"; permission = "nickserv/saset/email" }
|
||||
|
||||
/*
|
||||
* ns_group
|
||||
*
|
||||
* Provides the commands:
|
||||
* nickserv/group
|
||||
* nickserv/ungroup
|
||||
* nickserv/glist
|
||||
* nickserv/saset/display
|
||||
* nickserv/set/display
|
||||
*
|
||||
* Used for controlling grouped nicknames.
|
||||
*/
|
||||
module
|
||||
{
|
||||
name = "ns_group"
|
||||
|
||||
/*
|
||||
* The minimum length of time between consecutive uses of the GROUP command. This directive is
|
||||
* optional, but recommended. If not set, it defaults to 5 minutes.
|
||||
*/
|
||||
delay = 5m
|
||||
|
||||
/*
|
||||
* The maximum number of nicks allowed in a group.
|
||||
*
|
||||
* This directive is optional, but recommended. If not set or set to 0, no limits will be applied.
|
||||
*/
|
||||
maxaliases = 10
|
||||
|
||||
/*
|
||||
* If set, the NickServ GROUP command won't allow any group changes. This is recommended to
|
||||
* prevent users from accidentally dropping their nicks, as it forces users to explicitly
|
||||
* drop their nicks before adding it to another group.
|
||||
*
|
||||
* This directive is optional, but recommended.
|
||||
*/
|
||||
nogroupchange = yes
|
||||
}
|
||||
command { service = "NickServ"; name = "GLIST"; command = "nickserv/glist" }
|
||||
command { service = "NickServ"; name = "GROUP"; command = "nickserv/group" }
|
||||
command { service = "NickServ"; name = "UNGROUP"; command = "nickserv/ungroup" }
|
||||
command { service = "NickServ"; name = "SET DISPLAY"; command = "nickserv/set/display" }
|
||||
command { service = "NickServ"; name = "SASET DISPLAY"; command = "nickserv/saset/display"; permission = "nickserv/saset/display" }
|
||||
|
||||
# For compatibility with Atheme.
|
||||
command { service = "NickServ"; name = "SET ACCOUNTNAME"; command = "nickserv/set/display"; hide = yes }
|
||||
command { service = "NickServ"; name = "SASET ACCOUNTNAME"; command = "nickserv/saset/display"; permission = "nickserv/saset/display"; hide = yes }
|
||||
|
||||
/*
|
||||
* ns_identify
|
||||
*
|
||||
* Provides the command nickserv/identify.
|
||||
*
|
||||
* Used for identifying to accounts.
|
||||
*/
|
||||
module
|
||||
{
|
||||
name = "ns_identify"
|
||||
|
||||
/*
|
||||
* If set, limits the number of concurrent users that can be logged in as a given account at once.
|
||||
*/
|
||||
maxlogins = 10
|
||||
}
|
||||
command { service = "NickServ"; name = "ID"; command = "nickserv/identify"; hide = yes }
|
||||
command { service = "NickServ"; name = "IDENTIFY"; command = "nickserv/identify" }
|
||||
|
||||
/*
|
||||
* ns_info
|
||||
*
|
||||
* Provides the commands:
|
||||
* nickserv/info. - Used for gathering information about an account.
|
||||
* nickserv/set/hide, nickserv/saset/hide - Used for configuring which options are publicly shown in nickserv/info.
|
||||
*
|
||||
*/
|
||||
module { name = "ns_info" }
|
||||
command { service = "NickServ"; name = "INFO"; command = "nickserv/info" }
|
||||
|
||||
command { service = "NickServ"; name = "SET HIDE"; command = "nickserv/set/hide" }
|
||||
command { service = "NickServ"; name = "SASET HIDE"; command = "nickserv/saset/hide"; permission = "nickserv/saset/hide" }
|
||||
|
||||
/*
|
||||
* ns_list
|
||||
*
|
||||
* Provides the commands:
|
||||
* nickserv/list - Used for retrieving and searching the registered account list.
|
||||
* nickserv/set/private, nickserv/saset/private - Used for configuring whether or a users account shows up in nickserv/list.
|
||||
*
|
||||
*/
|
||||
module
|
||||
{
|
||||
name = "ns_list"
|
||||
|
||||
/*
|
||||
* The maximum number of nicks to be returned for a NickServ LIST command.
|
||||
*/
|
||||
listmax = 50
|
||||
}
|
||||
command { service = "NickServ"; name = "LIST"; command = "nickserv/list" }
|
||||
command { service = "NickServ"; name = "SET PRIVATE"; command = "nickserv/set/private" }
|
||||
command { service = "NickServ"; name = "SASET PRIVATE"; command = "nickserv/saset/private"; permission = "nickserv/saset/private" }
|
||||
|
||||
/*
|
||||
* ns_logout
|
||||
*
|
||||
* Provides the command nickserv/logout.
|
||||
*
|
||||
* Used for logging out of your account.
|
||||
*/
|
||||
module { name = "ns_logout" }
|
||||
command { service = "NickServ"; name = "LOGOUT"; command = "nickserv/logout" }
|
||||
|
||||
/*
|
||||
* ns_recover
|
||||
*
|
||||
* Provides the command nickserv/recover.
|
||||
*
|
||||
* Used for recovering your nick from services or another user.
|
||||
*/
|
||||
module
|
||||
{
|
||||
name = "ns_recover"
|
||||
|
||||
/*
|
||||
* If set, Anope will svsnick and svsjoin users who use the recover
|
||||
* command on an identified user to the nick and channels of the recovered user.
|
||||
*
|
||||
* This directive is optional.
|
||||
*/
|
||||
restoreonrecover = yes
|
||||
}
|
||||
command { service = "NickServ"; name = "RECOVER"; command = "nickserv/recover" }
|
||||
|
||||
# For compatibility with Anope 1.8 and Atheme.
|
||||
command { service = "NickServ"; name = "GHOST"; command = "nickserv/recover"; hide = yes }
|
||||
command { service = "NickServ"; name = "RELEASE"; command = "nickserv/recover"; hide = yes }
|
||||
|
||||
/*
|
||||
* ns_register
|
||||
*
|
||||
* Provides the commands nickserv/confirm/register, nickserv/register, and nickserv/resend.
|
||||
*
|
||||
* Used for registering accounts.
|
||||
*/
|
||||
module
|
||||
{
|
||||
name = "ns_register"
|
||||
|
||||
/*
|
||||
* The method for confirming account registrations. Possible values are:
|
||||
*
|
||||
* "admin" to require confirmation by a Services Operator.
|
||||
* "code" to require confirmation with a code provided via IRC.
|
||||
* "disable" to disable account registration.
|
||||
* "mail" to require confirmation with a code provided via email.
|
||||
* "none" to automatically confirm (this is the default).
|
||||
*/
|
||||
registration = "code"
|
||||
|
||||
/*
|
||||
* The minimum length of time between consecutive uses of NickServ's RESEND command.
|
||||
*
|
||||
* This directive is optional, but recommended. If not set, this restriction will be disabled.
|
||||
*/
|
||||
resenddelay = 90s
|
||||
|
||||
/*
|
||||
* Prevents users from registering their nick if they are not connected
|
||||
* for at least the given number of seconds.
|
||||
*
|
||||
* This directive is optional.
|
||||
*/
|
||||
#nickregdelay = 1m
|
||||
|
||||
/*
|
||||
* The length of time a user using an unconfirmed account has
|
||||
* before the account will be released for general use again.
|
||||
*/
|
||||
#unconfirmedexpire = 1d
|
||||
}
|
||||
command { service = "NickServ"; name = "CONFIRM REGISTER"; command = "nickserv/confirm/register" }
|
||||
command { service = "NickServ"; name = "REGISTER"; command = "nickserv/register" }
|
||||
command { service = "NickServ"; name = "RESEND"; command = "nickserv/resend" }
|
||||
|
||||
/*
|
||||
* ns_resetpass
|
||||
*
|
||||
* Provides the command nickserv/confirm/resetpass and nickserv/resetpass.
|
||||
*
|
||||
* Used for resetting passwords by emailing users a temporary one.
|
||||
*/
|
||||
module
|
||||
{
|
||||
name = "ns_resetpass"
|
||||
|
||||
/*
|
||||
* The amount of time a user has after requesting a password reset before it
|
||||
* expires. Defaults to 1 day.
|
||||
*/
|
||||
#resetexpire = 1d
|
||||
}
|
||||
command { service = "NickServ"; name = "CONFIRM RESETPASS"; command = "nickserv/confirm/resetpass" }
|
||||
command { service = "NickServ"; name = "RESETPASS"; command = "nickserv/resetpass" }
|
||||
|
||||
# For compatibility with Anope 2.0.
|
||||
command { service = "NickServ"; name = "GETPASS"; command = "nickserv/resetpass"; hide = yes }
|
||||
|
||||
/*
|
||||
* ns_sasl
|
||||
*
|
||||
* Provides support for authentication to services via IRCv3 SASL. This is a standardised
|
||||
* alternative to ns_identify that is supported by several IRCds.
|
||||
*
|
||||
* You will need to configure your IRCd to use SASL. See the following links for details:
|
||||
*
|
||||
* InspIRCd: https://docs.inspircd.org/4/modules/sasl/
|
||||
* UnrealIRCd: https://www.unrealircd.org/docs/SASL#Enabling_SASL_on_the_server
|
||||
*/
|
||||
module
|
||||
{
|
||||
name = "ns_sasl"
|
||||
|
||||
/*
|
||||
* The nick of the client which operates as the SASL agent.
|
||||
*/
|
||||
#agent = "NickServ"
|
||||
|
||||
/*
|
||||
* Sets the number of invalid SASL authentication attempts before services
|
||||
* removes a partially-connected user from the network. If not defined then
|
||||
* the value specified in options:badpasslimit will be used instead.
|
||||
*/
|
||||
#badpasslimit = 1
|
||||
|
||||
/*
|
||||
* Sets the time after which invalid SASL authentication attempts are
|
||||
* forgotten about. If a user does not fail to authenticate in this amount
|
||||
* of time, the incorrect password count will reset to zero. If not defined
|
||||
* then the value specified in options:badpasstimeout will be used instead.
|
||||
*/
|
||||
#badpasstimeout = 15m
|
||||
}
|
||||
|
||||
/*
|
||||
* ns_sasl_anonymous, ns_sasl_external, ns_sasl_plain
|
||||
*
|
||||
* Provides support for the following SASL mechanisms:
|
||||
*
|
||||
* ns_sasl_anonymous: Adds the ANONYMOUS mechanism which allows logging out of
|
||||
* an account. See RFC 4505 for more details.
|
||||
* ns_sasl_external: Adds the EXTERNAL mechanism which allows logging into an
|
||||
account using a TLS client certificate. See RFC 4422 for
|
||||
for more details.
|
||||
* ns_sasl_plain: Adds the PLAIN mechanism which allows logging in to an
|
||||
account using a plain text username and password. See RFC
|
||||
4422 for more details.
|
||||
*/
|
||||
module { name = "ns_sasl_anonymous" }
|
||||
module { name = "ns_sasl_external" }
|
||||
module { name = "ns_sasl_plain" }
|
||||
|
||||
/*
|
||||
* ns_set
|
||||
*
|
||||
* Provides the commands:
|
||||
* nickserv/set, nickserv/saset - Dummy help wrappers for the SET and SASET commands.
|
||||
* nickserv/saset/noexpire - Used for configuring noexpire, which prevents nicks from expiring.
|
||||
* nickserv/set/password, nickserv/saset/password - Used for changing a users password.
|
||||
*/
|
||||
module { name = "ns_set" }
|
||||
|
||||
command { service = "NickServ"; name = "SET"; command = "nickserv/set" }
|
||||
command { service = "NickServ"; name = "SASET"; command = "nickserv/saset"; permission = "nickserv/saset/"; group = "nickserv/admin" }
|
||||
|
||||
command { service = "NickServ"; name = "SET PASSWORD"; command = "nickserv/set/password" }
|
||||
command { service = "NickServ"; name = "SASET PASSWORD"; command = "nickserv/saset/password"; permission = "nickserv/saset/password" }
|
||||
|
||||
command { service = "NickServ"; name = "SASET NOEXPIRE"; command = "nickserv/saset/noexpire"; permission = "nickserv/saset/noexpire" }
|
||||
|
||||
/*
|
||||
* ns_set_keepmodes
|
||||
*
|
||||
* Provides the command nickserv/set/keepmodes and nickserv/saset/keepmodes.
|
||||
*
|
||||
* Allows configuring services to keep user modes across logins.
|
||||
*/
|
||||
module
|
||||
{
|
||||
name = "ns_set_keepmodes"
|
||||
|
||||
/*
|
||||
* Anope will try to not restore user modes that aren't settable by users. However, if
|
||||
* you have modes that you don't want to be automatically restored you can list them
|
||||
* here.
|
||||
*/
|
||||
#norestore = "ABCabc"
|
||||
}
|
||||
command { service = "NickServ"; name = "SET KEEPMODES"; command = "nickserv/set/keepmodes" }
|
||||
command { service = "NickServ"; name = "SASET KEEPMODES"; command = "nickserv/saset/keepmodes"; permission = "nickserv/saset/keepmodes" }
|
||||
|
||||
/*
|
||||
* 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_layout
|
||||
*
|
||||
* Provides the command nickserv/set/layout and nickserv/saset/layout.
|
||||
*
|
||||
* Allows configuring the layout that services uses.
|
||||
*/
|
||||
module { name = "ns_set_layout" }
|
||||
command { service = "NickServ"; name = "SET LAYOUT"; command = "nickserv/set/layout" }
|
||||
command { service = "NickServ"; name = "SASET LAYOUT"; command = "nickserv/saset/layout"; permission = "nickserv/saset/layout" }
|
||||
|
||||
/*
|
||||
* ns_set_message
|
||||
*
|
||||
* Provides the commands 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
|
||||
*
|
||||
* Provides the command nickserv/set/misc.
|
||||
*
|
||||
* Allows you to create arbitrary commands to set data, and have that data show
|
||||
* up in nickserv/info. You can configure this using the following fields:
|
||||
*
|
||||
* misc_description: A description of the command to show in the help.
|
||||
* misc_title: A human-readable description of the stored data.
|
||||
* misc_priority: Positive integer representing display order in nickserv/info
|
||||
* and (if enabled) WHOIS output. Entries with unspecified
|
||||
* priority will be prioritized in the order of declaration.
|
||||
* misc_pattern: If defined then a regex pattern (using the engine specified
|
||||
* in <options:regexengine> to validate the data with).
|
||||
* misc_syntax: If defined then the syntax to show in the help output and, if
|
||||
* misc_pattern is defined, when a user specifies an invalid
|
||||
* value.
|
||||
* misc_swhois: Whether to also show the data in the WHOIS output of logged
|
||||
* in users. Requires that your IRCd supports multiple swhois
|
||||
entries.
|
||||
*/
|
||||
module { name = "ns_set_misc" }
|
||||
command { service = "NickServ"; name = "SET URL"; command = "nickserv/set/misc"; misc_description = _("Associate a URL with your account"); misc_pattern = "^https?:\/\/\S+$"; misc_swhois = yes }
|
||||
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 MASTODON"; command = "nickserv/set/misc"; misc_description = _("Associate a Mastodon account with your account"); misc_pattern = "^@\S+@\S+\.\S+$"; misc_title = _("Mastodon") }
|
||||
#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 LOCATION"; command = "nickserv/set/misc"; misc_description = _("Associate a location with your account"); misc_title = _("Location") }
|
||||
#command { service = "NickServ"; name = "SASET LOCATION"; command = "nickserv/saset/misc"; misc_description = _("Associate a location with this account"); permission = "nickserv/saset/location"; group = "nickserv/admin" }
|
||||
|
||||
/*
|
||||
* ns_set_op
|
||||
*
|
||||
* Provides the commands:
|
||||
* nickserv/set/autoop, nickserv/saset/autoop - Allows configuring whether status modes are automatically granted when joining a channel.
|
||||
* nickserv/set/neverop, nickserv/saset/neverop - Allows configuring whether a user can be added to access lists.
|
||||
*/
|
||||
module { name = "ns_set_op" }
|
||||
|
||||
command { service = "NickServ"; name = "SET AUTOOP"; command = "nickserv/set/autoop" }
|
||||
command { service = "NickServ"; name = "SASET AUTOOP"; command = "nickserv/saset/autoop"; permission = "nickserv/saset/autoop" }
|
||||
|
||||
command { service = "NickServ"; name = "SET NEVEROP"; command = "nickserv/set/neverop" }
|
||||
command { service = "NickServ"; name = "SASET NEVEROP"; command = "nickserv/saset/neverop"; permission = "nickserv/saset/neverop" }
|
||||
|
||||
# For compatibility with DALnet Services.
|
||||
command { service = "NickServ"; name = "SET NOOP"; command = "nickserv/set/neverop"; hide = yes }
|
||||
command { service = "NickServ"; name = "SASET NOOP"; command = "nickserv/saset/neverop"; permission = "nickserv/saset/neverop"; hide = yes }
|
||||
|
||||
/*
|
||||
* ns_set_protect
|
||||
*
|
||||
* Provides the commands nickserv/set/protect and nickserv/saset/protect.
|
||||
*
|
||||
* Used for configuring nickname protection.
|
||||
*/
|
||||
module { name = "ns_set_protect" }
|
||||
command { service = "NickServ"; name = "SET PROTECT"; command = "nickserv/set/protect" }
|
||||
command { service = "NickServ"; name = "SASET PROTECT"; command = "nickserv/saset/protect"; permission = "nickserv/saset/protect" }
|
||||
|
||||
# For compatibility with Anope 2.0.
|
||||
command { service = "NickServ"; name = "SET KILL"; command = "nickserv/set/protect"; hide = yes }
|
||||
command { service = "NickServ"; name = "SASET KILL"; command = "nickserv/saset/protect"; permission = "nickserv/saset/protect"; hide = yes }
|
||||
|
||||
/*
|
||||
* ns_set_timezone
|
||||
*
|
||||
* Provides the command nickserv/set/timezone and nickserv/saset/timezone.
|
||||
*
|
||||
* Allows configuring the timezone that services uses.
|
||||
*/
|
||||
module { name = "ns_set_timezone" }
|
||||
command { service = "NickServ"; name = "SET TIMEZONE"; command = "nickserv/set/timezone" }
|
||||
command { service = "NickServ"; name = "SASET TIMEZONE"; command = "nickserv/saset/timezone"; permission = "nickserv/saset/timezone" }
|
||||
|
||||
/*
|
||||
* ns_suspend
|
||||
*
|
||||
* Provides the commands nickserv/suspend and nickserv/unsuspend.
|
||||
*
|
||||
* Used to suspend and unsuspend nicknames. Suspended nicknames can not be used but their settings are preserved.
|
||||
*/
|
||||
module
|
||||
{
|
||||
name = "ns_suspend"
|
||||
|
||||
/*
|
||||
* The length of time before a suspended nick becomes unsuspended.
|
||||
*
|
||||
* This directive is optional. If not set, the default is never.
|
||||
*/
|
||||
#suspendexpire = 90d
|
||||
|
||||
/*
|
||||
* Settings to show to non-opers in NickServ's INFO output.
|
||||
* Comment to completely disable showing any information about
|
||||
* suspended nicknames to non-opers.
|
||||
*/
|
||||
show = "suspended, by, reason, on, expires"
|
||||
}
|
||||
command { service = "NickServ"; name = "SUSPEND"; command = "nickserv/suspend"; permission = "nickserv/suspend"; group = "nickserv/admin" }
|
||||
command { service = "NickServ"; name = "UNSUSPEND"; command = "nickserv/unsuspend"; permission = "nickserv/suspend"; group = "nickserv/admin" }
|
||||
|
||||
/*
|
||||
* ns_update
|
||||
*
|
||||
* Provides the command nickserv/update.
|
||||
*
|
||||
* Used to update your status on all channels, turn on your vhost, etc.
|
||||
*/
|
||||
module { name = "ns_update" }
|
||||
command { service = "NickServ"; name = "UPDATE"; command = "nickserv/update" }
|
||||
@@ -1,742 +0,0 @@
|
||||
/*
|
||||
* Example configuration file for OperServ.
|
||||
*/
|
||||
|
||||
/*
|
||||
* First, create the service.
|
||||
*/
|
||||
service
|
||||
{
|
||||
/*
|
||||
* The name of the OperServ client.
|
||||
* If you change this value, you probably want to change the client directive in the configuration for the operserv module too.
|
||||
*/
|
||||
nick = "OperServ"
|
||||
|
||||
/*
|
||||
* The username of the OperServ client.
|
||||
*/
|
||||
user = "services"
|
||||
|
||||
/*
|
||||
* The hostname of the OperServ client.
|
||||
*/
|
||||
host = "${services.host}"
|
||||
|
||||
/*
|
||||
* The realname of the OperServ client.
|
||||
*/
|
||||
real = "Operator Service"
|
||||
|
||||
/*
|
||||
* The modes this client should use.
|
||||
* Do not modify this unless you know what you are doing.
|
||||
*
|
||||
* These modes are very IRCd specific. If left commented, sane defaults
|
||||
* are used based on what protocol module you have loaded.
|
||||
*
|
||||
* Note that setting this option incorrectly could potentially BREAK some, if
|
||||
* not all, usefulness of the client. We will not support you if this client is
|
||||
* unable to do certain things if this option is enabled.
|
||||
*/
|
||||
#modes = "+o"
|
||||
|
||||
/*
|
||||
* An optional comma separated list of channels this service should join. Outside
|
||||
* of log channels this is not very useful, as the service will just idle in the
|
||||
* specified channels, and will not accept any types of commands.
|
||||
*
|
||||
* 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"
|
||||
}
|
||||
|
||||
/*
|
||||
* Core OperServ module.
|
||||
*
|
||||
* Provides essential functionality for OperServ.
|
||||
*/
|
||||
module
|
||||
{
|
||||
name = "operserv"
|
||||
|
||||
/*
|
||||
* The name of the client that should be OperServ.
|
||||
*/
|
||||
client = "OperServ"
|
||||
|
||||
/*
|
||||
* These define the default expiration times for, respectively, AKILLs, CHANKILLs, SNLINEs,
|
||||
* and SQLINEs.
|
||||
*/
|
||||
autokillexpiry = 30d
|
||||
chankillexpiry = 30d
|
||||
snlineexpiry = 30d
|
||||
sqlineexpiry = 30d
|
||||
|
||||
/*
|
||||
* If set, this option will make Anope send an AKILL command immediately after it has been
|
||||
* added with AKILL ADD. This eliminates the need for killing the user after the AKILL has
|
||||
* been added.
|
||||
*
|
||||
* This directive is optional, but recommended.
|
||||
*/
|
||||
akillonadd = yes
|
||||
|
||||
/*
|
||||
* If set, this option will make Anope send an (SVS)KILL command immediately after SNLINE ADD.
|
||||
* This eliminates the need for killing the user after the SNLINE has been added.
|
||||
*
|
||||
* This directive is optional.
|
||||
*/
|
||||
killonsnline = yes
|
||||
|
||||
/*
|
||||
* If set, this option will make Anope send an (SVS)KILL command immediately after SQLINE ADD.
|
||||
* This eliminates the need for killing the user after the SQLINE has been added.
|
||||
*
|
||||
* This directive is optional.
|
||||
*/
|
||||
killonsqline = yes
|
||||
|
||||
/*
|
||||
* Adds the nickname of the Services Operator issuing an AKILL to the kill reason.
|
||||
*
|
||||
* This directive is optional.
|
||||
*/
|
||||
addakiller = yes
|
||||
|
||||
/*
|
||||
* Adds akill IDs to akills. Akill IDs are given to users in their ban reason and can be used to easily view,
|
||||
* modify, or remove an akill from the ID.
|
||||
*/
|
||||
akillids = yes
|
||||
|
||||
/*
|
||||
* If set, only IRC Operators will be permitted to use OperServ, regardless of command access restrictions.
|
||||
*
|
||||
* This directive is optional, but recommended.
|
||||
*/
|
||||
opersonly = yes
|
||||
}
|
||||
|
||||
/*
|
||||
* Core OperServ commands.
|
||||
*
|
||||
* In Anope modules can provide (multiple) commands, each of which has a unique command name. Once these modules
|
||||
* are loaded you can then configure the commands to be added to any client you like with any name you like.
|
||||
*
|
||||
* Additionally, you may provide a permission name that must be in the opertype of users executing the command.
|
||||
*
|
||||
* Sane defaults are provided below that do not need to be edited unless you wish to change the default behavior.
|
||||
*/
|
||||
|
||||
/* Give it a help command. */
|
||||
command { service = "OperServ"; name = "HELP"; command = "generic/help" }
|
||||
|
||||
/*
|
||||
* os_akill
|
||||
*
|
||||
* Provides the command operserv/akill.
|
||||
*
|
||||
* Used to ban users from the network.
|
||||
*/
|
||||
module { name = "os_akill" }
|
||||
command { service = "OperServ"; name = "AKILL"; command = "operserv/akill"; permission = "operserv/akill" }
|
||||
|
||||
/*
|
||||
* os_chankill
|
||||
*
|
||||
* Provides the command operserv/chankill.
|
||||
*
|
||||
* Used to akill users from an entire channel.
|
||||
*/
|
||||
module { name = "os_chankill" }
|
||||
command { service = "OperServ"; name = "CHANKILL"; command = "operserv/chankill"; permission = "operserv/chankill" }
|
||||
|
||||
/*
|
||||
* os_defcon
|
||||
*
|
||||
* Provides the command operserv/defcon.
|
||||
*
|
||||
* Allows you to set services in DefCon mode, which can be used to restrict services access
|
||||
* during bot attacks.
|
||||
*/
|
||||
#module
|
||||
{
|
||||
name = "os_defcon"
|
||||
|
||||
/*
|
||||
* Default DefCon level (1-5) to use when starting Anope up. Level 5 constitutes normal operation
|
||||
* while level 1 constitutes the most restrictive operation. If this setting is left out or set to
|
||||
* 0, DefCon will be disabled and the rest of this block will be ignored.
|
||||
*/
|
||||
#defaultlevel = 5
|
||||
|
||||
/*
|
||||
* The following 4 directives define what operations will take place when DefCon is set to levels
|
||||
* 1 through 4. Each level is a list that must be separated by spaces.
|
||||
*
|
||||
* The following operations can be defined at each level:
|
||||
* - nonewchannels: Disables registering new channels
|
||||
* - nonewnicks: Disables registering new nicks
|
||||
* - nomlockchanges: Disables changing MLOCK on registered channels
|
||||
* - forcechanmodes: Forces all channels to have the modes given in the later chanmodes directive
|
||||
* - reducedsessions: Reduces the session limit to the value given in the later sessionlimit directive
|
||||
* - nonewclients: KILL any new clients trying to connect
|
||||
* - operonly: Ignore all non-IRCops
|
||||
* - silentoperonly: Silently ignore all non-IRCops
|
||||
* - akillnewclients: AKILL any new clients trying to connect
|
||||
* - nonewmemos: No new memos will be sent to block MemoServ attacks
|
||||
*/
|
||||
level4 = "nonewchannels nonewnicks nomlockchanges reducedsessions"
|
||||
level3 = "nonewchannels nonewnicks nomlockchanges forcechanmodes reducedsessions"
|
||||
level2 = "nonewchannels nonewnicks nomlockchanges forcechanmodes reducedsessions silentoperonly"
|
||||
level1 = "nonewchannels nonewnicks nomlockchanges forcechanmodes reducedsessions silentoperonly akillnewclients"
|
||||
|
||||
/*
|
||||
* New session limit to use when a DefCon level is using "reduced" session limiting.
|
||||
*/
|
||||
#sessionlimit = 2
|
||||
|
||||
/*
|
||||
* Length of time to add an AKILL for when DefCon is preventing new clients from connecting to the
|
||||
* network.
|
||||
*/
|
||||
#akillexpire = 5m
|
||||
|
||||
/*
|
||||
* The channel modes to set on all channels when the DefCon channel mode system is in use.
|
||||
*
|
||||
* Note 1: Choose these modes carefully, because when DefCon switches to a level which does NOT have
|
||||
* the mode setting selected, Anope will set the reverse on all channels, e.g. if this setting
|
||||
* is +RN when DefCon is used, all channels will be set to +RN, when DefCon is removed, all
|
||||
* channels will be set to -RN. You don't want to set this to +k for example, because when DefCon
|
||||
* is removed, all channels are set -k, removing the key from previously keyed channels.
|
||||
*
|
||||
* Note 2: MLOCKed modes will not be lost.
|
||||
*/
|
||||
#chanmodes = "+R"
|
||||
|
||||
/*
|
||||
* This value can be used to automatically return the network to DefCon level 5 after the specified
|
||||
* time period, just in case any IRC Operator forgets to remove a DefCon setting.
|
||||
*
|
||||
* This directive is optional.
|
||||
*/
|
||||
#timeout = 15m
|
||||
|
||||
/*
|
||||
* If set, Anope will send a global message on DefCon level changes.
|
||||
*
|
||||
* This directive is optional.
|
||||
*/
|
||||
#globalondefcon = yes
|
||||
|
||||
/*
|
||||
* If set, Anope will send the global message defined in the message directive on DefCon level
|
||||
* changes.
|
||||
*
|
||||
* This directive is optional.
|
||||
*/
|
||||
#globalondefconmore = yes
|
||||
|
||||
/*
|
||||
* Defines the message that will be sent on DefCon level changes when globalondefconmore is set.
|
||||
*
|
||||
* This directive is required only when globalondefconmore is set.
|
||||
*/
|
||||
#message = "Put your message to send your users here. Don't forget to uncomment globalondefconmore"
|
||||
|
||||
/*
|
||||
* Defines the message that will be sent when DefCon is returned to level 5. This directive is optional,
|
||||
* and will also override globalondefcon and globalondefconmore when set.
|
||||
*/
|
||||
#offmessage = "Services are now back to normal, sorry for any inconvenience"
|
||||
|
||||
/*
|
||||
* Defines the reason to use when clients are KILLed or AKILLed from the network while the proper
|
||||
* DefCon operation is in effect.
|
||||
*/
|
||||
#akillreason = "This network is currently not accepting connections, please try again later."
|
||||
}
|
||||
#command { service = "OperServ"; name = "DEFCON"; command = "operserv/defcon"; permission = "operserv/defcon" }
|
||||
|
||||
/*
|
||||
* os_dns
|
||||
*
|
||||
* Provides the command operserv/dns.
|
||||
*
|
||||
* This module requires that dns is loaded.
|
||||
*
|
||||
* This module allows controlling a DNS zone. This is useful for
|
||||
* controlling what servers users are placed on for load balancing,
|
||||
* and to automatically remove split servers.
|
||||
*
|
||||
* To use this module you must set a nameserver record for services
|
||||
* so that DNS queries go to services.
|
||||
*
|
||||
* Alternatively, you may use a secondary DNS server to hide services' IP,
|
||||
* provide query caching, and provide better fault tolerance.
|
||||
*
|
||||
* To do this using BIND, configure similar to:
|
||||
*
|
||||
* options { max-refresh-time 60 };
|
||||
* zone "irc.example.com" IN {
|
||||
* type secondary;
|
||||
* primaries { 127.0.0.1 port 5353 };
|
||||
* };
|
||||
*
|
||||
* Where 127.0.0.1:5353 is the IP and port services are listening on.
|
||||
* We recommend you externally firewall both UDP and TCP to the port
|
||||
* Anope is listening on.
|
||||
*
|
||||
* Finally set a NS record for irc.example.com. to BIND or services.
|
||||
*/
|
||||
#module
|
||||
{
|
||||
name = "os_dns"
|
||||
|
||||
/* TTL for records. This should be very low if your records change often. */
|
||||
ttl = 1m
|
||||
|
||||
/* If a server drops this many users the server is automatically removed from the DNS zone.
|
||||
* This directive is optional.
|
||||
*/
|
||||
user_drop_mark = 50
|
||||
|
||||
/* The time used for user_drop_mark. */
|
||||
user_drop_time = 1m
|
||||
|
||||
/* When a server is removed from the zone for dropping users, it is readded after this time.
|
||||
* This directive is optional.
|
||||
*/
|
||||
user_drop_readd_time = 5m
|
||||
|
||||
/* If set, when a server splits, it is automatically removed from the zone. */
|
||||
remove_split_servers = yes
|
||||
|
||||
/* If set, when a server connects to the network, it will be automatically added to
|
||||
* the zone if it is a known server.
|
||||
*/
|
||||
readd_connected_servers = no
|
||||
}
|
||||
#command { service = "OperServ"; name = "DNS"; command = "operserv/dns"; permission = "operserv/dns" }
|
||||
|
||||
/*
|
||||
* os_config
|
||||
*
|
||||
* Provides the command operserv/config.
|
||||
*
|
||||
* Used to view and set configuration options while services are running.
|
||||
*/
|
||||
module { name = "os_config" }
|
||||
command { service = "OperServ"; name = "CONFIG"; command = "operserv/config"; permission = "operserv/config" }
|
||||
|
||||
/*
|
||||
* os_forbid
|
||||
*
|
||||
* Provides the command operserv/forbid.
|
||||
*
|
||||
* Used to forbid specific nicks, channels, emails, etc. from being used.
|
||||
*/
|
||||
module
|
||||
{
|
||||
name = "os_forbid"
|
||||
|
||||
/*
|
||||
* Allows loading forbids from a file.
|
||||
*/
|
||||
#file
|
||||
{
|
||||
/*
|
||||
* The type of forbid to add. Can be set to "chan", "email", "nick",
|
||||
* "password", or "register".
|
||||
*/
|
||||
type = "email"
|
||||
|
||||
/*
|
||||
* The file to read forbids from. Each forbid should be placed on a new
|
||||
* line. Surrounding whitespace will be ignored.
|
||||
*/
|
||||
file = "temp-emails.txt"
|
||||
|
||||
/**
|
||||
* The reason why entries from this file are forbidden.
|
||||
*/
|
||||
reason = "Temporary email"
|
||||
}
|
||||
|
||||
}
|
||||
command { service = "OperServ"; name = "FORBID"; command = "operserv/forbid"; permission = "operserv/forbid" }
|
||||
|
||||
/*
|
||||
* os_ignore
|
||||
*
|
||||
* Provides the command operserv/ignore.
|
||||
*
|
||||
* Used to make Anope ignore users.
|
||||
*/
|
||||
module { name = "os_ignore" }
|
||||
command { service = "OperServ"; name = "IGNORE"; command = "operserv/ignore"; permission = "operserv/ignore" }
|
||||
|
||||
/*
|
||||
* os_info
|
||||
*
|
||||
* Provides the command operserv/info.
|
||||
*
|
||||
* Used to add oper only notes to users and channels.
|
||||
*/
|
||||
module { name = "os_info" }
|
||||
command { service = "OperServ"; name = "INFO"; command = "operserv/info"; permission = "operserv/info" }
|
||||
|
||||
/*
|
||||
* os_jupe
|
||||
*
|
||||
* Provides the command operserv/jupe.
|
||||
*
|
||||
* Used to disconnect servers from the network and prevent them from relinking.
|
||||
*/
|
||||
module { name = "os_jupe" }
|
||||
command { service = "OperServ"; name = "JUPE"; command = "operserv/jupe"; permission = "operserv/jupe" }
|
||||
|
||||
/*
|
||||
* os_kick
|
||||
*
|
||||
* Provides the command operserv/kick.
|
||||
*
|
||||
* Used to kick users from channels.
|
||||
*/
|
||||
module { name = "os_kick" }
|
||||
command { service = "OperServ"; name = "KICK"; command = "operserv/kick"; permission = "operserv/kick" }
|
||||
|
||||
/*
|
||||
* os_kill
|
||||
*
|
||||
* Provides the command operserv/kill.
|
||||
*
|
||||
* Used to forcibly disconnect users from the network.
|
||||
*/
|
||||
module { name = "os_kill" }
|
||||
command { service = "OperServ"; name = "KILL"; command = "operserv/kill"; permission = "operserv/kill" }
|
||||
|
||||
/*
|
||||
* os_list
|
||||
*
|
||||
* Provides the commands operserv/chanlist and operserv/userlist.
|
||||
*
|
||||
* Used to list and search the channels and users currently on the network.
|
||||
*/
|
||||
module { name = "os_list" }
|
||||
command { service = "OperServ"; name = "CHANLIST"; command = "operserv/chanlist"; permission = "operserv/chanlist" }
|
||||
command { service = "OperServ"; name = "USERLIST"; command = "operserv/userlist"; permission = "operserv/userlist" }
|
||||
|
||||
/*
|
||||
* os_login
|
||||
*
|
||||
* Provides the commands operserv/login and operserv/logout.
|
||||
*
|
||||
* Used to login to OperServ, only required if your oper block requires this.
|
||||
*/
|
||||
module { name = "os_login" }
|
||||
command { service = "OperServ"; name = "LOGIN"; command = "operserv/login" }
|
||||
command { service = "OperServ"; name = "LOGOUT"; command = "operserv/logout" }
|
||||
|
||||
/*
|
||||
* os_logsearch
|
||||
*
|
||||
* Provides the command operserv/logsearch.
|
||||
*
|
||||
* Used to search services log files.
|
||||
*/
|
||||
module
|
||||
{
|
||||
name = "os_logsearch"
|
||||
|
||||
/* The log file name to search. There should be a log{} block configured to log
|
||||
* to a file of this name.
|
||||
*/
|
||||
logname = "services.log"
|
||||
}
|
||||
command { service = "OperServ"; name = "LOGSEARCH"; command = "operserv/logsearch"; permission = "operserv/logsearch" }
|
||||
|
||||
/*
|
||||
* os_mode
|
||||
*
|
||||
* Provides the commands operserv/mode and operserv/umode.
|
||||
*
|
||||
* Used to change user and channel modes.
|
||||
*/
|
||||
module { name = "os_mode" }
|
||||
command { service = "OperServ"; name = "UMODE"; command = "operserv/umode"; permission = "operserv/umode" }
|
||||
command { service = "OperServ"; name = "MODE"; command = "operserv/mode"; permission = "operserv/mode" }
|
||||
|
||||
/*
|
||||
* os_modinfo
|
||||
*
|
||||
* Provides the commands operserv/modinfo and operserv/modlist.
|
||||
*
|
||||
* Used to show information about loaded modules.
|
||||
*/
|
||||
module { name = "os_modinfo" }
|
||||
command { service = "OperServ"; name = "MODINFO"; command = "operserv/modinfo"; permission = "operserv/modinfo" }
|
||||
command { service = "OperServ"; name = "MODLIST"; command = "operserv/modlist"; permission = "operserv/modinfo" }
|
||||
|
||||
/*
|
||||
* os_module
|
||||
*
|
||||
* Provides the commands operserv/modload, operserv/modreload, and operserv/modunload.
|
||||
*
|
||||
* Used to load, reload, and unload modules.
|
||||
*/
|
||||
module { name = "os_module" }
|
||||
command { service = "OperServ"; name = "MODLOAD"; command = "operserv/modload"; permission = "operserv/modload" }
|
||||
command { service = "OperServ"; name = "MODRELOAD"; command = "operserv/modreload"; permission = "operserv/modload" }
|
||||
command { service = "OperServ"; name = "MODUNLOAD"; command = "operserv/modunload"; permission = "operserv/modload" }
|
||||
|
||||
/*
|
||||
* os_news
|
||||
*
|
||||
* Provides the commands operserv/logonnews, operserv/opernews, and operserv/randomnews.
|
||||
*
|
||||
* Used to configure news notices shown to users when they connect, and opers when they oper.
|
||||
*/
|
||||
module
|
||||
{
|
||||
name = "os_news"
|
||||
|
||||
/*
|
||||
* The service bot names to use to send news to users on connection
|
||||
* and to opers when they oper.
|
||||
*/
|
||||
announcer = "Global"
|
||||
oper_announcer = "OperServ"
|
||||
|
||||
/*
|
||||
* The number of LOGON/OPER news items to display when a user logs on.
|
||||
*
|
||||
* This directive is optional, if not set it will default to 3.
|
||||
*/
|
||||
#newscount = 3
|
||||
|
||||
/*
|
||||
* Whether to show the datetime at which the news entry was added.
|
||||
*
|
||||
* This directive is optional, if not set it will default to yes.
|
||||
*/
|
||||
#showdate = yes
|
||||
}
|
||||
command { service = "OperServ"; name = "LOGONNEWS"; command = "operserv/logonnews"; permission = "operserv/news" }
|
||||
command { service = "OperServ"; name = "OPERNEWS"; command = "operserv/opernews"; permission = "operserv/news" }
|
||||
command { service = "OperServ"; name = "RANDOMNEWS"; command = "operserv/randomnews"; permission = "operserv/news" }
|
||||
|
||||
/*
|
||||
* os_noop
|
||||
*
|
||||
* Provides the command operserv/noop.
|
||||
*
|
||||
* Used to NOOP a server, which prevents users from opering on that server.
|
||||
*/
|
||||
#module { name = "os_noop" }
|
||||
command { service = "OperServ"; name = "NOOP"; command = "operserv/noop"; permission = "operserv/noop" }
|
||||
|
||||
/*
|
||||
* os_oper
|
||||
*
|
||||
* Provides the command operserv/oper.
|
||||
*
|
||||
* Used to configure opers and show information about opertypes.
|
||||
*/
|
||||
module { name = "os_oper" }
|
||||
command { service = "OperServ"; name = "OPER"; command = "operserv/oper"; permission = "operserv/oper" }
|
||||
|
||||
/*
|
||||
* os_reload
|
||||
*
|
||||
* Provides the command operserv/reload.
|
||||
*
|
||||
* Used to reload the anope.conf configuration file.
|
||||
*/
|
||||
module { name = "os_reload" }
|
||||
command { service = "OperServ"; name = "RELOAD"; command = "operserv/reload"; permission = "operserv/reload" }
|
||||
|
||||
/*
|
||||
* os_session
|
||||
*
|
||||
* Provides the commands operserv/exception and operserv/session.
|
||||
*
|
||||
* This module enables session limiting. Session limiting prevents users from connecting more than a certain
|
||||
* number of times from the same IP at the same time - thus preventing most types of cloning.
|
||||
* Once a host reaches its session limit, all clients attempting to connect from that host will
|
||||
* be killed. Exceptions to the default session limit can be defined via the exception list.
|
||||
*
|
||||
* Used to manage the session limit exception list, and view currently active sessions.
|
||||
*/
|
||||
module
|
||||
{
|
||||
name = "os_session"
|
||||
|
||||
/*
|
||||
* Default session limit per host. Once a host reaches its session limit, all clients attempting
|
||||
* to connect from that host will be killed.
|
||||
*
|
||||
* This directive is required if os_session is loaded.
|
||||
*/
|
||||
defaultsessionlimit = 5
|
||||
|
||||
/*
|
||||
* The maximum session limit that may be set for a host in an exception.
|
||||
*
|
||||
* This directive is required if os_session is loaded.
|
||||
*/
|
||||
maxsessionlimit = 100
|
||||
|
||||
/*
|
||||
* Sets the default expiry time for session exceptions.
|
||||
*/
|
||||
#exceptionexpiry = 1d
|
||||
|
||||
/*
|
||||
* The message that will be NOTICE'd to a user just before they are removed from the network because
|
||||
* their host's session limit has been exceeded. It may be used to give a slightly more descriptive
|
||||
* reason for the impending kill as opposed to simply "Session limit exceeded".
|
||||
*
|
||||
* This directive is optional, if not set, nothing will be sent.
|
||||
*/
|
||||
sessionlimitexceeded = "The session limit for your IP {ip} has been exceeded."
|
||||
|
||||
/*
|
||||
* Same as above, but should be used to provide a website address where users can find out more
|
||||
* about session limits and how to go about applying for an exception.
|
||||
*
|
||||
* Note: This directive has been intentionally commented out in an effort to remind you to change
|
||||
* the URL it contains. It is recommended that you supply an address/URL where people can get help
|
||||
* regarding session limits.
|
||||
*
|
||||
* This directive is optional, if not set, nothing will be sent.
|
||||
*/
|
||||
#sessionlimitdetailsloc = "Please visit https://your.website.url/ for more information about session limits."
|
||||
|
||||
/*
|
||||
* If set and is not 0, this directive tells Anope to add an AKILL if the number of subsequent kills
|
||||
* for the same host exceeds this value, preventing the network from experiencing KILL floods.
|
||||
*
|
||||
* This directive is optional.
|
||||
*/
|
||||
maxsessionkill = 15
|
||||
|
||||
/*
|
||||
* Sets the expiry time for AKILLs set for hosts exceeding the maxsessionkill directive limit.
|
||||
*
|
||||
* This directive is optional, if not set, defaults to 30 minutes.
|
||||
*/
|
||||
sessionautokillexpiry = 30m
|
||||
|
||||
/*
|
||||
* Sets the CIDR value used to determine which IP addresses represent the same person.
|
||||
* By default this would limit 3 connections per IPv4 IP and 3 connections per IPv6 IP.
|
||||
* If you are receiving IPv6 clone attacks it may be useful to set session_ipv6_cidr to
|
||||
* 64 or 48.
|
||||
*/
|
||||
session_ipv4_cidr = 32
|
||||
session_ipv6_cidr = 128
|
||||
}
|
||||
command { service = "OperServ"; name = "EXCEPTION"; command = "operserv/exception"; permission = "operserv/exception" }
|
||||
command { service = "OperServ"; name = "SESSION"; command = "operserv/session"; permission = "operserv/session" }
|
||||
|
||||
/*
|
||||
* os_set
|
||||
*
|
||||
* Provides the command operserv/set.
|
||||
*
|
||||
* Used to set various settings such as superadmin, debug mode, etc.
|
||||
*/
|
||||
module
|
||||
{
|
||||
name = "os_set"
|
||||
|
||||
/*
|
||||
* If set, Services Admins will be able to use SUPERADMIN [ON|OFF] which will temporarily grant
|
||||
* them extra privileges such as being a founder on ALL channels.
|
||||
*
|
||||
* This directive is optional.
|
||||
*/
|
||||
#superadmin = yes
|
||||
}
|
||||
command { service = "OperServ"; name = "SET"; command = "operserv/set"; permission = "operserv/set" }
|
||||
|
||||
/*
|
||||
* os_shutdown
|
||||
*
|
||||
* Provides the commands operserv/quit, operserv/restart, and operserv/shutdown.
|
||||
*
|
||||
* Used to quit, restart, or shutdown services.
|
||||
*/
|
||||
module
|
||||
{
|
||||
name = "os_shutdown"
|
||||
|
||||
/*
|
||||
* If enabled then server operators will be required to provide the network
|
||||
* name to confirm that they are quitting, restarting, or shutting down the
|
||||
* right server.
|
||||
*/
|
||||
requirename = yes
|
||||
}
|
||||
#command { service = "OperServ"; name = "QUIT"; command = "operserv/quit"; permission = "operserv/quit" }
|
||||
command { service = "OperServ"; name = "RESTART"; command = "operserv/restart"; permission = "operserv/restart" }
|
||||
command { service = "OperServ"; name = "SHUTDOWN"; command = "operserv/shutdown"; permission = "operserv/shutdown" }
|
||||
|
||||
/*
|
||||
* os_stats
|
||||
*
|
||||
* Provides the operserv/stats command.
|
||||
*
|
||||
* Used to show statistics about services.
|
||||
*/
|
||||
module { name = "os_stats" }
|
||||
command { service = "OperServ"; name = "STATS"; command = "operserv/stats"; permission = "operserv/stats" }
|
||||
|
||||
/*
|
||||
* os_svs
|
||||
*
|
||||
* Provides the commands operserv/svsnick, operserv/svsjoin, and operserv/svspart.
|
||||
*
|
||||
* Used to force users to change nicks, join and part channels.
|
||||
*/
|
||||
module { name = "os_svs" }
|
||||
command { service = "OperServ"; name = "SVSNICK"; command = "operserv/svsnick"; permission = "operserv/svs" }
|
||||
command { service = "OperServ"; name = "SVSJOIN"; command = "operserv/svsjoin"; permission = "operserv/svs" }
|
||||
command { service = "OperServ"; name = "SVSPART"; command = "operserv/svspart"; permission = "operserv/svs" }
|
||||
|
||||
/*
|
||||
* os_sxline
|
||||
*
|
||||
* Provides the operserv/snline and operserv/sqline commands.
|
||||
*
|
||||
* Used to ban real names, nick names, and possibly channels.
|
||||
*/
|
||||
module { name = "os_sxline" }
|
||||
command { service = "OperServ"; name = "SNLINE"; command = "operserv/snline"; permission = "operserv/snline" }
|
||||
command { service = "OperServ"; name = "SQLINE"; command = "operserv/sqline"; permission = "operserv/sqline" }
|
||||
|
||||
/*
|
||||
* os_update
|
||||
*
|
||||
* Provides the operserv/update command.
|
||||
*
|
||||
* Use to immediately update the databases.
|
||||
*/
|
||||
module { name = "os_update" }
|
||||
command { service = "OperServ"; name = "UPDATE"; command = "operserv/update"; permission = "operserv/update" }
|
||||
+433
@@ -0,0 +1,433 @@
|
||||
|
||||
-- If you need to create your db, uncomment the following lines.
|
||||
--
|
||||
-- CREATE DATABASE anope;
|
||||
-- USE anope;
|
||||
|
||||
--
|
||||
-- Table structure for table 'anope_bs_core'
|
||||
--
|
||||
|
||||
DROP TABLE IF EXISTS anope_bs_core;
|
||||
CREATE TABLE anope_bs_core (
|
||||
bs_id int(11) NOT NULL auto_increment,
|
||||
nick varchar(255) NOT NULL default '',
|
||||
`user` text NOT NULL,
|
||||
host text NOT NULL,
|
||||
rname text NOT NULL,
|
||||
flags int(11) NOT NULL default '0',
|
||||
created int(11) NOT NULL default '0',
|
||||
chancount int(11) NOT NULL default '0',
|
||||
active int(1) NOT NULL default '1',
|
||||
PRIMARY KEY (bs_id),
|
||||
UNIQUE KEY nick (nick)
|
||||
) ENGINE=MyISAM DEFAULT CHARSET=latin1;
|
||||
|
||||
-- --------------------------------------------------------
|
||||
|
||||
--
|
||||
-- Table structure for table 'anope_cs_access'
|
||||
--
|
||||
|
||||
DROP TABLE IF EXISTS anope_cs_access;
|
||||
CREATE TABLE anope_cs_access (
|
||||
ca_id int(11) NOT NULL auto_increment,
|
||||
in_use int(11) NOT NULL default '0',
|
||||
`level` int(11) NOT NULL default '0',
|
||||
display varchar(255) NOT NULL default '',
|
||||
channel varchar(255) NOT NULL default '',
|
||||
last_seen int(11) NOT NULL default '0',
|
||||
active tinyint(1) NOT NULL default '1',
|
||||
PRIMARY KEY (ca_id),
|
||||
UNIQUE KEY channel (channel,display)
|
||||
) ENGINE=MyISAM DEFAULT CHARSET=latin1;
|
||||
|
||||
-- --------------------------------------------------------
|
||||
|
||||
--
|
||||
-- Table structure for table 'anope_cs_akicks'
|
||||
--
|
||||
|
||||
DROP TABLE IF EXISTS anope_cs_akicks;
|
||||
CREATE TABLE anope_cs_akicks (
|
||||
ck_id int(11) NOT NULL auto_increment,
|
||||
channel varchar(255) NOT NULL default '',
|
||||
flags int(11) NOT NULL default '0',
|
||||
dmask varchar(255) NOT NULL,
|
||||
reason text NOT NULL,
|
||||
creator text NOT NULL,
|
||||
addtime int(11) NOT NULL default '0',
|
||||
active tinyint(1) NOT NULL default '1',
|
||||
PRIMARY KEY (ck_id),
|
||||
UNIQUE KEY channel (channel,dmask)
|
||||
) ENGINE=MyISAM DEFAULT CHARSET=latin1;
|
||||
|
||||
-- --------------------------------------------------------
|
||||
|
||||
--
|
||||
-- Table structure for table 'anope_cs_badwords'
|
||||
--
|
||||
|
||||
DROP TABLE IF EXISTS anope_cs_badwords;
|
||||
CREATE TABLE anope_cs_badwords (
|
||||
cw_id int(11) NOT NULL auto_increment,
|
||||
channel varchar(255) NOT NULL default '',
|
||||
word varchar(255) NOT NULL,
|
||||
`type` int(11) NOT NULL default '0',
|
||||
active tinyint(1) NOT NULL default '1',
|
||||
PRIMARY KEY (cw_id),
|
||||
UNIQUE KEY channel (channel,word)
|
||||
) ENGINE=MyISAM DEFAULT CHARSET=latin1;
|
||||
|
||||
-- --------------------------------------------------------
|
||||
|
||||
--
|
||||
-- Table structure for table 'anope_cs_info'
|
||||
--
|
||||
|
||||
DROP TABLE IF EXISTS anope_cs_info;
|
||||
CREATE TABLE anope_cs_info (
|
||||
ci_id int(11) NOT NULL auto_increment,
|
||||
`name` varchar(255) NOT NULL default '',
|
||||
founder text NOT NULL,
|
||||
successor text NOT NULL,
|
||||
founderpass tinyblob NOT NULL,
|
||||
descr text NOT NULL,
|
||||
url text NOT NULL,
|
||||
email text NOT NULL,
|
||||
time_registered int(10) unsigned NOT NULL default '0',
|
||||
last_used int(10) unsigned NOT NULL default '0',
|
||||
last_topic text NOT NULL,
|
||||
last_topic_setter text NOT NULL,
|
||||
last_topic_time int(10) unsigned NOT NULL default '0',
|
||||
flags int(10) unsigned NOT NULL default '0',
|
||||
forbidby text NOT NULL,
|
||||
forbidreason text NOT NULL,
|
||||
bantype smallint(6) NOT NULL default '0',
|
||||
accesscount smallint(6) NOT NULL default '0',
|
||||
akickcount smallint(6) NOT NULL default '0',
|
||||
mlock_on int(10) unsigned NOT NULL default '0',
|
||||
mlock_off int(10) unsigned NOT NULL default '0',
|
||||
mlock_limit int(10) unsigned NOT NULL default '0',
|
||||
mlock_key text NOT NULL,
|
||||
mlock_flood text NOT NULL,
|
||||
mlock_redirect text NOT NULL,
|
||||
entry_message text NOT NULL,
|
||||
memomax smallint(5) unsigned NOT NULL default '0',
|
||||
botnick varchar(255) NOT NULL default '',
|
||||
botflags int(10) unsigned NOT NULL default '0',
|
||||
bwcount smallint(6) NOT NULL default '0',
|
||||
capsmin smallint(6) NOT NULL default '0',
|
||||
capspercent smallint(6) NOT NULL default '0',
|
||||
floodlines smallint(6) NOT NULL default '0',
|
||||
floodsecs smallint(6) NOT NULL default '0',
|
||||
repeattimes smallint(6) NOT NULL default '0',
|
||||
active tinyint(1) NOT NULL default '1',
|
||||
PRIMARY KEY (ci_id),
|
||||
UNIQUE KEY `name` (`name`)
|
||||
) ENGINE=MyISAM DEFAULT CHARSET=latin1;
|
||||
|
||||
-- --------------------------------------------------------
|
||||
|
||||
--
|
||||
-- Table structure for table 'anope_cs_levels'
|
||||
--
|
||||
|
||||
DROP TABLE IF EXISTS anope_cs_levels;
|
||||
CREATE TABLE anope_cs_levels (
|
||||
cl_id int(11) NOT NULL auto_increment,
|
||||
channel varchar(255) NOT NULL default '',
|
||||
position int(11) NOT NULL default '0',
|
||||
`level` int(11) NOT NULL default '0',
|
||||
active tinyint(1) NOT NULL default '1',
|
||||
PRIMARY KEY (cl_id),
|
||||
UNIQUE KEY channel (channel,position)
|
||||
) ENGINE=MyISAM DEFAULT CHARSET=latin1;
|
||||
|
||||
-- --------------------------------------------------------
|
||||
|
||||
--
|
||||
-- Table structure for table 'anope_cs_ttb'
|
||||
--
|
||||
|
||||
DROP TABLE IF EXISTS anope_cs_ttb;
|
||||
CREATE TABLE anope_cs_ttb (
|
||||
ct_id int(11) NOT NULL auto_increment,
|
||||
channel varchar(255) NOT NULL default '',
|
||||
ttb_id int(11) NOT NULL default '0',
|
||||
`value` int(11) NOT NULL default '0',
|
||||
active tinyint(1) NOT NULL default '1',
|
||||
PRIMARY KEY (ct_id),
|
||||
UNIQUE KEY channel (channel,ttb_id)
|
||||
) ENGINE=MyISAM DEFAULT CHARSET=latin1;
|
||||
|
||||
-- --------------------------------------------------------
|
||||
|
||||
--
|
||||
-- Table structure for table 'anope_hs_core'
|
||||
--
|
||||
|
||||
DROP TABLE IF EXISTS anope_hs_core;
|
||||
CREATE TABLE anope_hs_core (
|
||||
bs_id int(11) NOT NULL auto_increment,
|
||||
nick varchar(255) NOT NULL default '',
|
||||
vident text NOT NULL,
|
||||
vhost text NOT NULL,
|
||||
creator text NOT NULL,
|
||||
`time` int(11) NOT NULL default '0',
|
||||
active tinyint(1) NOT NULL default '1',
|
||||
PRIMARY KEY (bs_id),
|
||||
UNIQUE KEY nick (nick)
|
||||
) ENGINE=MyISAM DEFAULT CHARSET=latin1;
|
||||
|
||||
-- --------------------------------------------------------
|
||||
|
||||
--
|
||||
-- Table structure for table 'anope_info'
|
||||
--
|
||||
|
||||
DROP TABLE IF EXISTS anope_info;
|
||||
CREATE TABLE anope_info (
|
||||
version int(11) default NULL,
|
||||
`date` datetime default NULL
|
||||
) ENGINE=MyISAM DEFAULT CHARSET=latin1;
|
||||
|
||||
-- --------------------------------------------------------
|
||||
|
||||
--
|
||||
-- Table structure for table 'anope_ms_info'
|
||||
--
|
||||
|
||||
DROP TABLE IF EXISTS anope_ms_info;
|
||||
CREATE TABLE anope_ms_info (
|
||||
nm_id int(11) NOT NULL auto_increment,
|
||||
receiver varchar(255) NOT NULL,
|
||||
number int(11) NOT NULL default '0',
|
||||
flags int(11) NOT NULL default '0',
|
||||
`time` int(11) NOT NULL default '0',
|
||||
sender text NOT NULL,
|
||||
`text` blob NOT NULL,
|
||||
serv enum('NICK','CHAN') NOT NULL default 'NICK',
|
||||
active tinyint(1) NOT NULL default '1',
|
||||
PRIMARY KEY (nm_id),
|
||||
UNIQUE KEY nm_id (nm_id,serv),
|
||||
KEY receiver (receiver,serv)
|
||||
) ENGINE=MyISAM DEFAULT CHARSET=latin1;
|
||||
|
||||
-- --------------------------------------------------------
|
||||
|
||||
--
|
||||
-- Table structure for table 'anope_ns_access'
|
||||
--
|
||||
|
||||
DROP TABLE IF EXISTS anope_ns_access;
|
||||
CREATE TABLE anope_ns_access (
|
||||
na_id int(11) NOT NULL auto_increment,
|
||||
display varchar(255) NOT NULL default '',
|
||||
access text NOT NULL,
|
||||
active tinyint(1) NOT NULL default '1',
|
||||
PRIMARY KEY (na_id),
|
||||
UNIQUE KEY display (display)
|
||||
) ENGINE=MyISAM DEFAULT CHARSET=latin1;
|
||||
|
||||
-- --------------------------------------------------------
|
||||
|
||||
--
|
||||
-- Table structure for table 'anope_ns_alias'
|
||||
--
|
||||
|
||||
DROP TABLE IF EXISTS anope_ns_alias;
|
||||
CREATE TABLE anope_ns_alias (
|
||||
na_id int(11) NOT NULL auto_increment,
|
||||
display varchar(255) NOT NULL default '',
|
||||
nick varchar(255) NOT NULL default '',
|
||||
time_registered int(10) unsigned NOT NULL default '0',
|
||||
last_seen int(10) unsigned NOT NULL default '0',
|
||||
`status` int(11) unsigned NOT NULL default '0',
|
||||
last_usermask text NOT NULL,
|
||||
last_realname text NOT NULL,
|
||||
last_quit text NOT NULL,
|
||||
active tinyint(1) NOT NULL default '1',
|
||||
PRIMARY KEY (na_id),
|
||||
UNIQUE KEY nick (nick)
|
||||
) ENGINE=MyISAM DEFAULT CHARSET=latin1;
|
||||
|
||||
-- --------------------------------------------------------
|
||||
|
||||
--
|
||||
-- Table structure for table 'anope_ns_core'
|
||||
--
|
||||
|
||||
DROP TABLE IF EXISTS anope_ns_core;
|
||||
CREATE TABLE anope_ns_core (
|
||||
nc_id int(11) NOT NULL auto_increment,
|
||||
display varchar(255) NOT NULL default '',
|
||||
pass tinyblob NOT NULL,
|
||||
email text NOT NULL,
|
||||
icq int(10) unsigned NOT NULL default '0',
|
||||
url text NOT NULL,
|
||||
flags int(11) NOT NULL default '0',
|
||||
`language` smallint(5) unsigned NOT NULL default '0',
|
||||
accesscount smallint(6) NOT NULL default '0',
|
||||
memocount smallint(5) unsigned NOT NULL default '0',
|
||||
memomax smallint(5) unsigned NOT NULL default '0',
|
||||
channelcount smallint(5) unsigned NOT NULL default '0',
|
||||
channelmax smallint(5) unsigned NOT NULL default '0',
|
||||
greet text NOT NULL,
|
||||
active tinyint(1) NOT NULL default '1',
|
||||
PRIMARY KEY (nc_id),
|
||||
UNIQUE KEY display (display)
|
||||
) ENGINE=MyISAM DEFAULT CHARSET=latin1;
|
||||
|
||||
-- --------------------------------------------------------
|
||||
|
||||
--
|
||||
-- Table structure for table 'anope_ns_request'
|
||||
--
|
||||
|
||||
DROP TABLE IF EXISTS anope_ns_request;
|
||||
CREATE TABLE anope_ns_request (
|
||||
nr_id int(11) NOT NULL auto_increment,
|
||||
nick varchar(255) NOT NULL default '',
|
||||
passcode text NOT NULL,
|
||||
`password` tinyblob NOT NULL,
|
||||
email text NOT NULL,
|
||||
requested int(11) NOT NULL default '0',
|
||||
active tinyint(1) NOT NULL default '1',
|
||||
PRIMARY KEY (nr_id),
|
||||
UNIQUE KEY nick (nick)
|
||||
) ENGINE=MyISAM DEFAULT CHARSET=latin1;
|
||||
|
||||
-- --------------------------------------------------------
|
||||
|
||||
--
|
||||
-- Table structure for table 'anope_os_akills'
|
||||
--
|
||||
|
||||
DROP TABLE IF EXISTS anope_os_akills;
|
||||
CREATE TABLE anope_os_akills (
|
||||
ok_id int(11) NOT NULL auto_increment,
|
||||
`user` varchar(255) NOT NULL,
|
||||
host varchar(255) NOT NULL,
|
||||
xby text NOT NULL,
|
||||
reason text NOT NULL,
|
||||
seton int(11) NOT NULL default '0',
|
||||
expire int(11) NOT NULL default '0',
|
||||
active tinyint(1) NOT NULL default '1',
|
||||
PRIMARY KEY (ok_id),
|
||||
UNIQUE KEY `user` (`user`,host)
|
||||
) ENGINE=MyISAM DEFAULT CHARSET=latin1;
|
||||
|
||||
-- --------------------------------------------------------
|
||||
|
||||
--
|
||||
-- Table structure for table 'anope_os_core'
|
||||
--
|
||||
|
||||
DROP TABLE IF EXISTS anope_os_core;
|
||||
CREATE TABLE anope_os_core (
|
||||
oc_id int(11) NOT NULL auto_increment,
|
||||
maxusercnt int(11) NOT NULL default '0',
|
||||
maxusertime int(11) NOT NULL default '0',
|
||||
akills_count int(11) NOT NULL default '0',
|
||||
sglines_count int(11) NOT NULL default '0',
|
||||
sqlines_count int(11) NOT NULL default '0',
|
||||
szlines_count int(11) NOT NULL default '0',
|
||||
PRIMARY KEY (oc_id)
|
||||
) ENGINE=MyISAM DEFAULT CHARSET=latin1;
|
||||
|
||||
-- --------------------------------------------------------
|
||||
|
||||
--
|
||||
-- Table structure for table 'anope_os_exceptions'
|
||||
--
|
||||
|
||||
DROP TABLE IF EXISTS anope_os_exceptions;
|
||||
CREATE TABLE anope_os_exceptions (
|
||||
oe_id int(11) NOT NULL auto_increment,
|
||||
mask varchar(255) NOT NULL,
|
||||
lim int(11) NOT NULL default '0',
|
||||
who text NOT NULL,
|
||||
reason text NOT NULL,
|
||||
`time` int(11) NOT NULL default '0',
|
||||
expires int(11) NOT NULL default '0',
|
||||
active tinyint(1) NOT NULL default '1',
|
||||
PRIMARY KEY (oe_id),
|
||||
UNIQUE KEY mask (mask)
|
||||
) ENGINE=MyISAM DEFAULT CHARSET=latin1;
|
||||
|
||||
-- --------------------------------------------------------
|
||||
|
||||
--
|
||||
-- Table structure for table 'anope_os_news'
|
||||
--
|
||||
|
||||
DROP TABLE IF EXISTS anope_os_news;
|
||||
CREATE TABLE anope_os_news (
|
||||
on_id int(11) NOT NULL auto_increment,
|
||||
`type` int(11) NOT NULL default '0',
|
||||
num int(11) NOT NULL default '0',
|
||||
ntext text NOT NULL,
|
||||
who text NOT NULL,
|
||||
`time` int(11) NOT NULL default '0',
|
||||
active tinyint(1) NOT NULL default '1',
|
||||
PRIMARY KEY (on_id),
|
||||
UNIQUE KEY `type` (`type`,num,`time`)
|
||||
) ENGINE=MyISAM DEFAULT CHARSET=latin1;
|
||||
|
||||
-- --------------------------------------------------------
|
||||
|
||||
--
|
||||
-- Table structure for table 'anope_os_sglines'
|
||||
--
|
||||
|
||||
DROP TABLE IF EXISTS anope_os_sglines;
|
||||
CREATE TABLE anope_os_sglines (
|
||||
og_id int(11) NOT NULL auto_increment,
|
||||
mask varchar(255) NOT NULL,
|
||||
xby text NOT NULL,
|
||||
reason text NOT NULL,
|
||||
seton int(11) NOT NULL default '0',
|
||||
expire int(11) NOT NULL default '0',
|
||||
active tinyint(1) NOT NULL default '1',
|
||||
PRIMARY KEY (og_id),
|
||||
UNIQUE KEY mask (mask)
|
||||
) ENGINE=MyISAM DEFAULT CHARSET=latin1;
|
||||
|
||||
-- --------------------------------------------------------
|
||||
|
||||
--
|
||||
-- Table structure for table 'anope_os_sqlines'
|
||||
--
|
||||
|
||||
DROP TABLE IF EXISTS anope_os_sqlines;
|
||||
CREATE TABLE anope_os_sqlines (
|
||||
og_id int(11) NOT NULL auto_increment,
|
||||
mask varchar(255) NOT NULL,
|
||||
xby text NOT NULL,
|
||||
reason text NOT NULL,
|
||||
seton int(11) NOT NULL default '0',
|
||||
expire int(11) NOT NULL default '0',
|
||||
active tinyint(1) NOT NULL default '1',
|
||||
PRIMARY KEY (og_id),
|
||||
UNIQUE KEY mask (mask)
|
||||
) ENGINE=MyISAM DEFAULT CHARSET=latin1;
|
||||
|
||||
-- --------------------------------------------------------
|
||||
|
||||
--
|
||||
-- Table structure for table 'anope_os_szlines'
|
||||
--
|
||||
|
||||
DROP TABLE IF EXISTS anope_os_szlines;
|
||||
CREATE TABLE anope_os_szlines (
|
||||
og_id int(11) NOT NULL auto_increment,
|
||||
mask varchar(255) NOT NULL,
|
||||
xby text NOT NULL,
|
||||
reason text NOT NULL,
|
||||
seton int(11) NOT NULL default '0',
|
||||
expire int(11) NOT NULL default '0',
|
||||
active tinyint(1) NOT NULL default '1',
|
||||
PRIMARY KEY (og_id),
|
||||
UNIQUE KEY mask (mask)
|
||||
) ENGINE=MyISAM DEFAULT CHARSET=latin1;
|
||||
@@ -1,94 +0,0 @@
|
||||
Since the first commit in March 2004 90 people have submitted patches, commits,
|
||||
and other useful contributions to Anope. These people, ordered by the number of
|
||||
contributions they have made, are:
|
||||
|
||||
* Adam <adam@anope.org>
|
||||
* Sadie Powell <sadie@sadiepowell.dev>
|
||||
* Robin Burchell <w00t@inspircd.org>
|
||||
* Naram Qashat <cyberbotx@anope.org>
|
||||
* Pieter Bootsma <geniusdex@anope.org>
|
||||
* Jens Voss <dukepyrolator@anope.org>
|
||||
* David Robson <rob@anope.org>
|
||||
* Florian Schulze <certus@anope.org>
|
||||
* Daniel Engel <dane@zero.org>
|
||||
* Trystan S. Lee <trystan@nomadirc.net>
|
||||
* Robby <robby@chatbelgie.be>
|
||||
* Charles Kingsley <chaz@anope.org>
|
||||
* Lee Holmes <lethality@anope.org>
|
||||
* Gabriel Acevedo H. <drstein@anope.org>
|
||||
* Jan Milants <viper@anope.org>
|
||||
* Adam Kramer <ribosome@anope.org>
|
||||
* Attila Molnar <attilamolnar@hush.com>
|
||||
* Michael Wobst <wobst.michael@web.de>
|
||||
* PeGaSuS <droider.pc@gmail.com>
|
||||
* Matt Schatz <genius3000@g3k.solutions>
|
||||
* Mark Summers <mark@goopler.net>
|
||||
* Daniel Vassdal <shutter@canternet.org>
|
||||
* MatthewM <mcm@they-got.us>
|
||||
* Sebastian V. <hal9000@denorastats.org>
|
||||
* Alvaro Toledo <atoledo@keldon.org>
|
||||
* Björn Stiddien <keeper@anope.org>
|
||||
* n0kS Phr33d0m <god@politeia.in>
|
||||
* Hendrik Jäger <gitcommit@henk.geekmail.org>
|
||||
* k4be <k4be@pirc.pl>
|
||||
* Thomas Fargeix <t.fargeix@gmail.com>
|
||||
* CaPa CuL <capacul@gmail.com>
|
||||
* Val Lorentz <progval+git@progval.net>
|
||||
* Bram Matthys <syzop@vulnscan.org>
|
||||
* Federico G. Schwindt <fgsch@lodoss.net>
|
||||
* Alexander Barton <alex@barton.de>
|
||||
* Cronus <cronus@nite-serv.com>
|
||||
* Dragone2 <dragone2@risposteinformatiche.it>
|
||||
* H7-25 <simos@simosnap.org>
|
||||
* Jyzee <jyzee.git@gmail.com>
|
||||
* Sebastian Barfurth <github@afreshmelon.com>
|
||||
* Zantox <jyoerger10@msn.com>
|
||||
* Zoddo <zoddo.ino@gmail.com>
|
||||
* Dominic Hargreaves <dom@earth.li>
|
||||
* Michael Hazell <michaelhazell@hotmail.com>
|
||||
* Robert Scheck <robert@fedoraproject.org>
|
||||
* Dennis Friis <peavey@inspircd.org>
|
||||
* Filippo Cortigiani <simos@simosnap.org>
|
||||
* KidProtect
|
||||
* Michał Zegan <webczat_200@poczta.onet.pl>
|
||||
* AlphaTech <alphat3ch@icloud.com>
|
||||
* Austin Ellis <siniStar@IRC4Fun.net>
|
||||
* bonnedav <theD_2011@hotmail.com>
|
||||
* Denis M. (Phr33d0m) <god@politeia.in>
|
||||
* Harakiri <harakiri@overstack.fr>
|
||||
* Marcin Łabanowski <marcin@6irc.net>
|
||||
* Matt Ullman <matt@airraidsirens.com>
|
||||
* Michael Stapelberg <michael@robustirc.net>
|
||||
* Alexander Maassen <outsider@twingoversum.scarynet.org>
|
||||
* artemiiav <artemiiav@gmail.com>
|
||||
* blackbeard420 <blackbeard@blackbeard420.me>
|
||||
* BoGu5 <bogus@onzin.org>
|
||||
* Chris Langsenkamp <chris@langsenkamp.com>
|
||||
* Clem Morton
|
||||
* crazycatdevs
|
||||
* Daniel Oaks <danneh@danneh.net>
|
||||
* Fabio Scotoni <cculex@gmail.com>
|
||||
* ItsOnlyBinary
|
||||
* Jason Foster <retsofaj@gmail.com>
|
||||
* Jeremy <jeremy@ssnet.ca>
|
||||
* Josh Soref
|
||||
* KindOne <ineedalifetoday@live.com>
|
||||
* linuxdaemon
|
||||
* Mantas Mikulėnas <grawity@gmail.com>
|
||||
* Matthew Beeching <jobe@mdbnet.co.uk>
|
||||
* Michael <michaelhazell@hotmail.com>
|
||||
* Mingjie Shen <shen497@purdue.edu>
|
||||
* nekoswag
|
||||
* Peter Tseng <pht24@cornell.edu>
|
||||
* Romain Rivière <lecoyote@lecoyote.org>
|
||||
* Sam James (sam_c) <sam@cmpct.info>
|
||||
* ShutterQuick <shutter@canternet.org>
|
||||
* Sketch <denverfreeburn@outlook.com>
|
||||
* Tim Gunter <tim@vanillaforums.com>
|
||||
* Toni Kaija <diftraku@gmail.com>
|
||||
* Victor Coss <gtaxl@gtaxl.net>
|
||||
* VisioN <vision@myirc.us>
|
||||
* westor <westor7@gmail.com>
|
||||
* Wilson Birney <wpb@360scada.com>
|
||||
* Yann Sionneau <yann@sionneau.net>
|
||||
* Zach Bloomquist <zrbq@live.com>
|
||||
@@ -0,0 +1,4 @@
|
||||
Reported Bugs from Bugzilla: http://bugs.anope.org/
|
||||
---------------------------------------------------
|
||||
|
||||
|
||||
-351
@@ -1,351 +0,0 @@
|
||||
# Anope Change Log
|
||||
|
||||
## Anope 2.1.25 (unreleased)
|
||||
|
||||
### Changes
|
||||
|
||||
* Fixed a crash when a temporary ban expires.
|
||||
|
||||
* Fixed a potential crash caused by unusual timestamps being passed to `Anope::strftime`.
|
||||
|
||||
* Fixed confirming accounts when `{ns_register}:registration` is set to "admin".
|
||||
|
||||
* Fixed migrating access entries from xop to flags granting new privileges in cases where multiple privileges share the same flag.
|
||||
|
||||
* Fixed migrating access entries sometimes giving the wrong flags.
|
||||
|
||||
* Fixed not being able to update the description of a flags access entry.
|
||||
|
||||
## Anope 2.1.24 (2026-04-01)
|
||||
|
||||
### Breaking Changes
|
||||
|
||||
* If a database contains duplicate corrupt entries from a prior write failure the oldest ones will now be purged from the database. This is a destructive action so make sure you take a manual backup of your database before upgrading.
|
||||
|
||||
* Removed support for storing the Anope database in Redis. The Redis code was extremely bitrotted, had not been tested in years, and to our knowledge has almost no (if any) users. It is recommended that db_redis users migrate to db_json or db_sql.
|
||||
|
||||
* SQL tables now use versioned prefixes by default. For the SQL database backends the default is `anope21_` and for ChanStats the default is `chanstats21_`. If you do not have a prefix explicitly set in your config you will need to add one it. Alternatively, you may also want to consider exporting to db_json and re-importing to update your SQL schema for the recent database layout changes.
|
||||
|
||||
### Changes
|
||||
|
||||
* Added some helper methods to `CommandSource` to allow quickly translting messages.
|
||||
|
||||
* Changed the Config script to allow multiple dashes in front of options, i.e. `-quick` and `--quick` are now equivalent.
|
||||
|
||||
* Converted some language strings to use format strings instead of concatenation.
|
||||
|
||||
* Fixed a rare crash in the ns_cert module.
|
||||
|
||||
* Fixed building Anope as a unity build.
|
||||
|
||||
* Fixed the ns_cert module erasing certificate entries if using an old database.
|
||||
|
||||
* Fixed users having the wrong real name in log messages on InspIRCd if it has been previously changed with `CHGNAME` or `SETNAME`.
|
||||
|
||||
## Anope 2.1.23 (2026-04-01)
|
||||
|
||||
### Changes
|
||||
|
||||
* Added examples to several BotServ commands.
|
||||
|
||||
* Added missing fields to the `RPL_STATSLINKINFO` output.
|
||||
|
||||
* Added support for migrating access entries between systems (currently only `chanserv/flags` is supported).
|
||||
|
||||
* Added the default levels to the `chanserv/levels` DESC help.
|
||||
|
||||
* Changed access listing commands to only show their own access entries unless `ALL` is specified.
|
||||
|
||||
* Fixed a non-translatable string which has been marked as translatable.
|
||||
|
||||
* Fixed the missing AUTOLOGIN extension.
|
||||
|
||||
* Fixed translating the help output when the flexible layout is used.
|
||||
|
||||
* Improved the accuracy of the X-line expiry time in `operserv/stats`.
|
||||
|
||||
* Updated the Portuguese translation.
|
||||
|
||||
* Updated the Romanian translation.
|
||||
|
||||
## Anope 2.1.22 (2026-03-01)
|
||||
|
||||
### Breaking Changes
|
||||
|
||||
* Automatic login using a known SSL fingerprint now requires the `AUTOLOGIN` option to be set on accounts with `/NS SET AUTOLOGIN ON`. Automatic login is largely obsolete now SASL EXTERNAL exists and is widely supported.
|
||||
|
||||
* Conan 2 is now used for packaging dependencies on Windows. If you are building from source you will need to upgrade Conan.
|
||||
|
||||
* Non-breaking spaces in translatable messages now use 0x1B instead of 0x1A due to recent msgfmt releases treating 0x1A as an EOF character. If you have an out of tree translation you will need to update it.
|
||||
|
||||
* User TLS certificates are now stored in their own `NSCert` table instead of as a column in the `NickCore` table. If you are reading this information you will need to update your code.
|
||||
|
||||
### Changes
|
||||
|
||||
* Fixed `{botserv}:botmodes` erroneously allowing setting non-status modes on channels.
|
||||
|
||||
* Fixed echoing message tags on Solanum.
|
||||
|
||||
* Fixed handling incoming `FIDENT` messages on InspIRCd.
|
||||
|
||||
* Fixed matching stacked extended bans on InspIRCd and UnrealIRCd.
|
||||
|
||||
* Fixed parameter modes in `chanserv/mode` locks erroneously requiring a parameter to unset a lock.
|
||||
|
||||
* Fixed restoring the object identifier when unserialising objects in db_json.
|
||||
|
||||
* Fixed the consistency of indenting and line wrapping command examples in help output.
|
||||
|
||||
* Redesigned the output of `nickserv/list` to show more relevant information.
|
||||
|
||||
```
|
||||
/NICKSERV LIST *
|
||||
-NickServ- List of entries matching *:
|
||||
-NickServ- alice (account: alice)
|
||||
-NickServ- alice|work (account: alice)
|
||||
-NickServ- bob -- Unconfirmed (account: bob)
|
||||
-NickServ- mallory -- Suspended (account: mallory)
|
||||
-NickServ- End of list - 4/4 matches shown.
|
||||
```
|
||||
|
||||
* The cs_set_misc and ns_set_misc modules now can use a separate title from the command name.
|
||||
|
||||
```
|
||||
/NICKSERV SET MASTODON @example@mastodon.social
|
||||
-NickServ- Mastodon for testuser set to @example@mastodon.social
|
||||
```
|
||||
|
||||
* The cs_set_misc and ns_set_misc modules now support validation of user-specified data.
|
||||
|
||||
```
|
||||
/NICKSERV SET MASTODON example.mastodon.social
|
||||
-NickServ- Mastodon syntax is invalid.
|
||||
-NickServ- Syntax: SET MASTODON [@user@host.tld]
|
||||
```
|
||||
|
||||
* The db_atheme module can now import arbitrary metadata to fields from the ns_set_misc module.
|
||||
|
||||
* The local clock will now be checked for synchronisation with the IRCd clock on UnrealIRCd.
|
||||
|
||||
* The `nickserv/cert` command will now show the time a TLS certificate was created and the nickname of the creator if the `VIEW` subcommand is used.
|
||||
|
||||
```
|
||||
/NICKSERV CERT VIEW
|
||||
-NickServ- d41d8cd98f00b204e9800998ecf8427e -- created by nick1 at Wed 25 Feb 00:18:50 GMT
|
||||
```
|
||||
|
||||
* The ns_set_misc module can now add account data to the WHOIS output of authenticated users on InspIRCd (with the swhois_ext module) and UnrealIRCd.
|
||||
|
||||
```
|
||||
/WHOIS nick1
|
||||
* [nick1] (nick1@example.com): nick1
|
||||
* [nick1] Mastodon: @example@mastodon.social
|
||||
* [nick1] irc.example.com :Example-IRC server
|
||||
...
|
||||
* [nick1] End of WHOIS list.
|
||||
```
|
||||
|
||||
* The regex_posix module is now available on Windows (using the PCRE2 POSIX compatibility layer).
|
||||
|
||||
* The regex_tre module is now available on Windows.
|
||||
|
||||
* The Windows dependencies have been updated.
|
||||
|
||||
## Anope 2.1.21 (2026-02-07)
|
||||
|
||||
### Breaking Changes
|
||||
|
||||
* `{fantasy}:fantasycharacter` has been replaced with `{fantasy}:prefix` which allows multiple-character fantasy prefixes. If you have multiple custom fantasy characters set you should separate them with a space when upgrading your config.
|
||||
|
||||
* The db_json module will now terminate the process if it fails to write the database. This replicates the behaviour previously used by the db_flatfile module.
|
||||
|
||||
* When adding an unregistered user to an access list you must now explicitly specify their hostmask. This prevents accidentally adding a hostmask which is too wide.
|
||||
|
||||
### Changes
|
||||
|
||||
* Added cleaning up of hostmasks when adding them to an access list and `{chanserv}:disallow_malformed_hostmask` to allow rejecting them instead.
|
||||
|
||||
* Changed access commands to add the account of a user who is logged in to an account but not using a nickname belonging to that account.
|
||||
|
||||
* Fixed a crash when clearing channel entry messages.
|
||||
|
||||
* Fixed a memory leak when cloning akicks.
|
||||
|
||||
* Fixed cleaning up ban masks.
|
||||
|
||||
* Fixed confirming accounts using the webcpanel.
|
||||
|
||||
* Fixed importing the time a nickname was used from Atheme.
|
||||
|
||||
* Fixed limiting the number of accounts per email address.
|
||||
|
||||
* Fixed locking modes that take a parameter when they are added.
|
||||
|
||||
* Fixed the `chanserv/enforce` command erroneously enforcing against channel founders.
|
||||
|
||||
* Fixed the syntax of the `chanserv/suspend` command.
|
||||
|
||||
* Fixed the syntax of the `nickserv/suspend` command.
|
||||
|
||||
* Improved password rehash detection in the enc_argon2 module.
|
||||
|
||||
* Various minor improvements to how services work internally.
|
||||
|
||||
## Anope 2.1.20 (2025-12-01)
|
||||
|
||||
### Breaking Changes
|
||||
|
||||
* Changed the registration of database types added by modules to be delayed until after the module constructor has been called. This might affect any custom modules you are using.
|
||||
|
||||
* Moved akicks out of the core into cs_akick. Modules which depend on akicks now require the cs_akick module to be loaded.
|
||||
|
||||
### Changes
|
||||
|
||||
* Added `{db_json}:preserve_unknown_data` to configure whether unknown database types are kept in the JSON database. By default unknown database types from unloaded modules will be preserved in the database to allow reloading later. This setting can be used to disable this and prune the database.
|
||||
|
||||
* Added support for forbidding passwords. This is intended to be used with file forbids (see below).
|
||||
|
||||
```
|
||||
/OPERSERV FORBID ADD PASSWORD +30d hunter2 This password is insecure
|
||||
-OperServ- Added a forbid on hunter2 of type password to expire on Mon 29 Dec 2025 11:51:13 AM UTC (30 days from now).
|
||||
```
|
||||
|
||||
* Added support for loading forbids from a file.
|
||||
|
||||
```cpp
|
||||
file
|
||||
{
|
||||
type = "email"
|
||||
file = "temp-emails.txt"
|
||||
reason = "Temporary email"
|
||||
}
|
||||
```
|
||||
|
||||
* Added support for the UnrealIRCd `+F` flood profile mode.
|
||||
|
||||
* Added the `anope-mkpasswd` script to help generate passwords for use in the config.
|
||||
|
||||
```
|
||||
$ ./anope-mkpasswd argon2id hunter2
|
||||
For use in the database:
|
||||
argon2id:$argon2id$v=19$m=65536,t=3,p=4$AmGWdtn1OUT9WSKSqESsPw$iguvHs6oIi/hF7e3t/bGNwgqP41vl/J4qP3a/yH9SLo
|
||||
|
||||
For use in an oper:
|
||||
password = "$argon2id$v=19$m=65536,t=3,p=4$AmGWdtn1OUT9WSKSqESsPw$iguvHs6oIi/hF7e3t/bGNwgqP41vl/J4qP3a/yH9SLo"
|
||||
password_hash = "argon2id"
|
||||
|
||||
For use in an jsonrpc/xmlrpc token:
|
||||
token = "$argon2id$v=19$m=65536,t=3,p=4$AmGWdtn1OUT9WSKSqESsPw$iguvHs6oIi/hF7e3t/bGNwgqP41vl/J4qP3a/yH9SLo"
|
||||
token_hash = "argon2id"
|
||||
|
||||
Make sure you have the enc_argon2 module loaded!
|
||||
```
|
||||
|
||||
* Added the DISPLAY flag to `nickserv/list` to only show account display nicknames.
|
||||
|
||||
```
|
||||
/NICKSERV LIST *
|
||||
-NickServ- List of entries matching *:
|
||||
-NickServ- nick1 (last mask: foo@example.com)
|
||||
-NickServ- nick1|afk (last mask: bar@example.com)
|
||||
-NickServ- nick2 (last mask: baz@example.com)
|
||||
-NickServ- End of list - 3/3 matches shown.
|
||||
|
||||
/NICKSERV LIST * DISPLAY
|
||||
-NickServ- List of entries matching *:
|
||||
-NickServ- nick1 (last mask: foo@example.com)
|
||||
-NickServ- nick2 (last mask: baz@example.com)
|
||||
-NickServ- End of list - 2/2 matches shown.
|
||||
```
|
||||
|
||||
* Added the hs_offer module which allows offering templated vhosts to users (based on a
|
||||
modsite module by @genius3000 on GitHub).
|
||||
|
||||
```
|
||||
/HOSTSERV OFFER ADD {account}.users.example.com
|
||||
|
||||
/HOSTSERV OFFERLIST
|
||||
-HostServ- Current host offer list:
|
||||
-HostServ- 2: {account}.users.example.com / FooBar.users.example.com -- does not expire
|
||||
-HostServ- End of host offer list.
|
||||
```
|
||||
|
||||
* Changed chanserv/mode lock messages to stack the responses into one message per type instead of sending one message per mode.
|
||||
|
||||
```
|
||||
/CHANSERV MODE #stest LOCK ADD +bb foo!foo@foo bar!bar@bar
|
||||
-ChanServ- +bb foo!foo@foo bar!bar@bar has been locked on #stest.
|
||||
```
|
||||
|
||||
* Changed database objects to rehook to their type when it becomes available again.
|
||||
|
||||
* Changed the `nickserv/set/language` and `nickserv/set/timezone` commands to allow setting back to the default value by omitting the last parameter.
|
||||
|
||||
```
|
||||
/NICKSERV SET LANGUAGE
|
||||
12:23 -NickServ- Language changed to English.
|
||||
|
||||
/NICKSERV SET TIMEZONE
|
||||
12:24 -NickServ- Timezone changed to UTC.
|
||||
```
|
||||
|
||||
* Changed the default install directory from `~/anope` to `~/anope-2.1`.
|
||||
|
||||
* Changed the enc_sha1 module to use a vendored SHA-1 implementation.
|
||||
|
||||
* Expanded password obscurity checks and added an event hook to allow modules to reject passwords.
|
||||
|
||||
* Fixed the rpc_user module sending the "invalid account" and "invalid password" error codes inverted.
|
||||
|
||||
* Fixed unintentionally reloading the core database when reloading a module that provides a database type.
|
||||
|
||||
* Removed a bunch of obsolete build system cruft.
|
||||
|
||||
## Anope 2.1.19 (2025-11-01)
|
||||
|
||||
### Breaking Changes
|
||||
|
||||
* `pkg-config` is now required to find dependencies for the following modules on UNIX systems:
|
||||
- enc_argon2
|
||||
- ldap
|
||||
- mysql
|
||||
- regex_pcre2
|
||||
- regex_tre
|
||||
|
||||
* Support for InspIRCd v3 has been dropped ahead of it going EOL in two months. Please migrate to InspIRCd v4 to keep using Anope 2.1 with InspIRCd.
|
||||
|
||||
### Changes
|
||||
|
||||
* Added a Romanian translation (contributed by @KidProtect on GitHub).
|
||||
|
||||
* Added support for associating a timezone with an account to allow users to receive timestamps in their local timezone.
|
||||
|
||||
```
|
||||
/NICKSERV SET TIMEZONE Europe/London
|
||||
-NickServ- Timezone changed to Europe/Berlin.
|
||||
|
||||
/NICKSERV INFO test
|
||||
-NickServ- Account registered: Thu 09 Oct 2025 15:22:45 CEST (45 seconds ago)
|
||||
```
|
||||
|
||||
NOTE: This requires a compiler with C++20 timezone support.
|
||||
|
||||
* Added support for IRCv3 message tags when using Solanum git.
|
||||
|
||||
* Added support for language-specific time formats.
|
||||
|
||||
```
|
||||
/NICKSERV SET LANGUAGE tr_TR.UTF-8
|
||||
-NickServ- Dil Türkçe olarak değiştirildi.
|
||||
|
||||
/NICKSERV INFO test
|
||||
-NickServ- Hesap kaydedildi: Prş 09 Eki 2025 15:22:45 (6 dakika, 16 saniye önce)
|
||||
```
|
||||
|
||||
* Channel entry messages are now tagged with an IRCv3 time tag for the time they were created on supporting IRCds. This defaults to on but can be disabled using `{cs_entrymsg}:timestamp`.
|
||||
|
||||
* Reordered the information in the `nickserv/info` command output to show the registration dates before the seen information.
|
||||
|
||||
* Updated the Turkish translation (contributed by @CaPaCuL on GitHub).
|
||||
|
||||
* Updated the vendored libraries.
|
||||
@@ -1,11 +0,0 @@
|
||||
# We only need to install these docs on Windows as most Windows installations will be binary, not source
|
||||
if(WIN32)
|
||||
# Only install given files from this directory
|
||||
# NOTE: I would've had this just find all files in the directory, but that would include files not needed (like this file)
|
||||
execute_process(COMMAND ${CMAKE_COMMAND} -E copy ${CMAKE_CURRENT_SOURCE_DIR}/README ${CMAKE_CURRENT_BINARY_DIR}/README.txt)
|
||||
set(DOCS CHANGES.md DEFCON FAQ INSTALL LANGUAGE MODULES ${CMAKE_CURRENT_BINARY_DIR}/README.txt WIN32.md)
|
||||
install(FILES ${DOCS}
|
||||
DESTINATION ${DOC_DIR}
|
||||
)
|
||||
set_directory_properties(PROPERTIES ADDITIONAL_MAKE_CLEAN_FILES "${CMAKE_CURRENT_BINARY_DIR}/README.txt")
|
||||
endif()
|
||||
@@ -1,12 +1,12 @@
|
||||
GNU GENERAL PUBLIC LICENSE
|
||||
Version 2, June 1991
|
||||
GNU GENERAL PUBLIC LICENSE
|
||||
Version 2, June 1991
|
||||
|
||||
Copyright (C) 1989, 1991 Free Software Foundation, Inc.,
|
||||
<https://fsf.org/>
|
||||
Copyright (C) 1989, 1991 Free Software Foundation, Inc.
|
||||
675 Mass Ave, Cambridge, MA 02139, USA
|
||||
Everyone is permitted to copy and distribute verbatim copies
|
||||
of this license document, but changing it is not allowed.
|
||||
|
||||
Preamble
|
||||
Preamble
|
||||
|
||||
The licenses for most software are designed to take away your
|
||||
freedom to share and change it. By contrast, the GNU General Public
|
||||
@@ -15,7 +15,7 @@ software--to make sure the software is free for all its users. This
|
||||
General Public License applies to most of the Free Software
|
||||
Foundation's software and to any other program whose authors commit to
|
||||
using it. (Some other Free Software Foundation software is covered by
|
||||
the GNU Lesser General Public License instead.) You can apply it to
|
||||
the GNU Library General Public License instead.) You can apply it to
|
||||
your programs, too.
|
||||
|
||||
When we speak of free software, we are referring to freedom, not
|
||||
@@ -55,8 +55,8 @@ patent must be licensed for everyone's free use or not licensed at all.
|
||||
|
||||
The precise terms and conditions for copying, distribution and
|
||||
modification follow.
|
||||
|
||||
GNU GENERAL PUBLIC LICENSE
|
||||
|
||||
GNU GENERAL PUBLIC LICENSE
|
||||
TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION
|
||||
|
||||
0. This License applies to any program or other work which contains
|
||||
@@ -110,7 +110,7 @@ above, provided that you also meet all of these conditions:
|
||||
License. (Exception: if the Program itself is interactive but
|
||||
does not normally print such an announcement, your work based on
|
||||
the Program is not required to print an announcement.)
|
||||
|
||||
|
||||
These requirements apply to the modified work as a whole. If
|
||||
identifiable sections of that work are not derived from the Program,
|
||||
and can be reasonably considered independent and separate works in
|
||||
@@ -168,7 +168,7 @@ access to copy from a designated place, then offering equivalent
|
||||
access to copy the source code from the same place counts as
|
||||
distribution of the source code, even though third parties are not
|
||||
compelled to copy the source along with the object code.
|
||||
|
||||
|
||||
4. You may not copy, modify, sublicense, or distribute the Program
|
||||
except as expressly provided under this License. Any attempt
|
||||
otherwise to copy, modify, sublicense or distribute the Program is
|
||||
@@ -225,7 +225,7 @@ impose that choice.
|
||||
|
||||
This section is intended to make thoroughly clear what is believed to
|
||||
be a consequence of the rest of this License.
|
||||
|
||||
|
||||
8. If the distribution and/or use of the Program is restricted in
|
||||
certain countries either by patents or by copyrighted interfaces, the
|
||||
original copyright holder who places the Program under this License
|
||||
@@ -255,7 +255,7 @@ make exceptions for this. Our decision will be guided by the two goals
|
||||
of preserving the free status of all derivatives of our free software and
|
||||
of promoting the sharing and reuse of software generally.
|
||||
|
||||
NO WARRANTY
|
||||
NO WARRANTY
|
||||
|
||||
11. BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY
|
||||
FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN
|
||||
@@ -277,9 +277,9 @@ YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER
|
||||
PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE
|
||||
POSSIBILITY OF SUCH DAMAGES.
|
||||
|
||||
END OF TERMS AND CONDITIONS
|
||||
|
||||
How to Apply These Terms to Your New Programs
|
||||
END OF TERMS AND CONDITIONS
|
||||
|
||||
Appendix: How to Apply These Terms to Your New Programs
|
||||
|
||||
If you develop a new program, and you want it to be of the greatest
|
||||
possible use to the public, the best way to achieve this is to make it
|
||||
@@ -291,7 +291,7 @@ convey the exclusion of warranty; and each file should have at least
|
||||
the "copyright" line and a pointer to where the full notice is found.
|
||||
|
||||
<one line to give the program's name and a brief idea of what it does.>
|
||||
Copyright (C) <year> <name of author>
|
||||
Copyright (C) 19yy <name of author>
|
||||
|
||||
This program is free software; you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
@@ -303,15 +303,16 @@ the "copyright" line and a pointer to where the full notice is found.
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
GNU General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License along
|
||||
with this program; if not, see <https://www.gnu.org/licenses/>.
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with this program; if not, write to the Free Software
|
||||
Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
|
||||
|
||||
Also add information on how to contact you by electronic and paper mail.
|
||||
|
||||
If the program is interactive, make it output a short notice like this
|
||||
when it starts in an interactive mode:
|
||||
|
||||
Gnomovision version 69, Copyright (C) year name of author
|
||||
Gnomovision version 69, Copyright (C) 19yy name of author
|
||||
Gnomovision comes with ABSOLUTELY NO WARRANTY; for details type `show w'.
|
||||
This is free software, and you are welcome to redistribute it
|
||||
under certain conditions; type `show c' for details.
|
||||
@@ -328,11 +329,11 @@ necessary. Here is a sample; alter the names:
|
||||
Yoyodyne, Inc., hereby disclaims all copyright interest in the program
|
||||
`Gnomovision' (which makes passes at compilers) written by James Hacker.
|
||||
|
||||
<signature of Moe Ghoul>, 1 April 1989
|
||||
Moe Ghoul, President of Vice
|
||||
<signature of Ty Coon>, 1 April 1989
|
||||
Ty Coon, President of Vice
|
||||
|
||||
This General Public License does not permit incorporating your program into
|
||||
proprietary programs. If your program is a subroutine library, you may
|
||||
consider it more useful to permit linking proprietary applications with the
|
||||
library. If this is what you want to do, use the GNU Lesser General
|
||||
library. If this is what you want to do, use the GNU Library General
|
||||
Public License instead of this License.
|
||||
+55
-30
@@ -1,4 +1,4 @@
|
||||
Anope DefCon
|
||||
Anope DefCon
|
||||
------------
|
||||
|
||||
1) Introduction
|
||||
@@ -10,8 +10,8 @@ Anope DefCon
|
||||
|
||||
1) Introduction
|
||||
|
||||
Anope supports a unique protection mechanism based on the
|
||||
military "Defense Readiness Condition" (DefCon) system. It is based on
|
||||
Anope 1.6 onwards supports a unique protection mechanism based on the
|
||||
military "Defense Readiness Condition" (DefCon) system. It is based on
|
||||
5 levels of defense readiness defined as:
|
||||
|
||||
DEFCON5 Normal peacetime readiness
|
||||
@@ -23,19 +23,18 @@ Anope DefCon
|
||||
These are configurable levels that mandates what actions Anope should
|
||||
take in case of emergency and change in readiness status.
|
||||
|
||||
It is used to prevent abuse to both Anope, and the IRCd on which they
|
||||
It is used to prevent abuse to both Services, and the ircd on which they
|
||||
are running. Also to protect the users, primarily in the event of Clones
|
||||
and/or FloodBOT attacks.
|
||||
and/or FloodBOT attacks.
|
||||
|
||||
2) Installation
|
||||
|
||||
The DefCon system is part of Anope's core,
|
||||
|
||||
The DefCon system has to be configured on your operserv.conf file to
|
||||
be enabled. Defcon will be disabled if "defaultlevel" in the defcon
|
||||
block is left commented, or set to 0. Look for the defcon block
|
||||
on your operserv.conf file for more information on enabling and
|
||||
configuring it.
|
||||
The DefCon system has to be configured on your services.conf file to
|
||||
be enabled. All directives are optional unless they depend on what
|
||||
options you enable for each level. Look for the "DefCon configuration"
|
||||
section on your services.conf file for more information.
|
||||
|
||||
Make sure you restart Anope after changing the DefCon configuration
|
||||
directives.
|
||||
@@ -44,26 +43,47 @@ Anope DefCon
|
||||
|
||||
Pre-defined DefCon actions:
|
||||
|
||||
No new channel registrations
|
||||
No New Nick Registrations
|
||||
No Mode Lock changes
|
||||
Force Chan Mode
|
||||
Use Reduced Session Limit
|
||||
KILL any new clients trying to connect
|
||||
Ignore everyone but opers
|
||||
Silently ignore everyone but opers
|
||||
AKILL all new clients trying to connect
|
||||
No new memos sent to block MemoServ attacks
|
||||
No new channel registrations 1
|
||||
No New Nick Registrations 2
|
||||
No MLOCK changes 4
|
||||
Force Chan Mode 8
|
||||
Use Reduced Session Limit 16
|
||||
KILL any new clients trying to connect 32
|
||||
Services will ignore everyone but opers 64
|
||||
Services will silently ignore everyone but opers 128
|
||||
AKILL all new clients trying to connect 256
|
||||
No new memos sent to block MemoServ attacks 512
|
||||
|
||||
Information regarding how to enable this for specific defcon levels can
|
||||
be found in operserv.conf
|
||||
These are the values used to determine each defcon setting, are set via:
|
||||
|
||||
DefCon1 XX
|
||||
DefCon2 XX
|
||||
DefCon3 XX
|
||||
DefCon4 XX
|
||||
|
||||
To set the desired value, you simply add the value of the numbers together
|
||||
and place that as your DefCon# setting. For instance:
|
||||
|
||||
Say you wish to set:
|
||||
|
||||
No Channel Registrations, No Nickname Registrations and Services Ignoring
|
||||
everyone except for Operators. You would do this by:
|
||||
|
||||
1 + 2 + 128 (Each value listed above is added together)
|
||||
Giving: 131
|
||||
|
||||
You would then place this as which ever Defcon setting you want:
|
||||
|
||||
DefCon1 131
|
||||
|
||||
The recommended default values are safe to use on any network.
|
||||
|
||||
4) Usage
|
||||
|
||||
Anope starts up in DEFCON5 (normal readiness). To change the Defcon level
|
||||
in action use:
|
||||
|
||||
/msg OperServ DEFCON 1|2|3|4|5
|
||||
Anope starts up in DEFCON5 (normal readiness). To change the Defcon level
|
||||
in action use:
|
||||
|
||||
/msg OperServ DEFCON 1|2|3|4|5
|
||||
|
||||
5) Usage Example
|
||||
|
||||
@@ -71,23 +91,28 @@ Anope DefCon
|
||||
|
||||
/msg OperServ DEFCON 4
|
||||
|
||||
*** Global -- from OperServ: dengel Changed the DEFCON level to 4
|
||||
|
||||
-OperServ- Services are now at DEFCON 4
|
||||
-OperServ- * No new channel registrations
|
||||
-OperServ- * No new nick registrations
|
||||
-OperServ- * No mode lock changes
|
||||
-OperServ- * No MLOCK changes
|
||||
-OperServ- * Use the reduced session limit of 5
|
||||
|
||||
-Global- The Defcon Level is now at: 4
|
||||
-Global- The Defcon Level is now at Level: 4
|
||||
|
||||
Restore normal readiness:
|
||||
|
||||
/msg OperServ DEFCON 5
|
||||
|
||||
*** Global -- from OperServ: dengel Changed the DEFCON level to 5
|
||||
|
||||
-OperServ- Services are now at DEFCON 5
|
||||
|
||||
-Global- Services are now back to normal, sorry for any inconvenience
|
||||
|
||||
6) Support
|
||||
|
||||
You might get DefCon support by posting on our online forum, or maybe on
|
||||
our #anope channel at /server irc.teranova.net.
|
||||
You might get DefCon support by posting on our online forum, or maybe on
|
||||
our #anope channel at /server irc.anope.org.
|
||||
|
||||
|
||||
-313
@@ -1,313 +0,0 @@
|
||||
DOXYFILE_ENCODING = UTF-8
|
||||
PROJECT_NAME = "Anope"
|
||||
PROJECT_NUMBER = 2.0
|
||||
PROJECT_BRIEF =
|
||||
PROJECT_LOGO =
|
||||
PROJECT_ICON = src/win32/anope-icon.ico
|
||||
OUTPUT_DIRECTORY = docs/doxygen
|
||||
CREATE_SUBDIRS = NO
|
||||
CREATE_SUBDIRS_LEVEL = 8
|
||||
ALLOW_UNICODE_NAMES = NO
|
||||
OUTPUT_LANGUAGE = English
|
||||
BRIEF_MEMBER_DESC = YES
|
||||
REPEAT_BRIEF = YES
|
||||
ABBREVIATE_BRIEF = "The $name class" \
|
||||
"The $name widget" \
|
||||
"The $name file" \
|
||||
is \
|
||||
provides \
|
||||
specifies \
|
||||
contains \
|
||||
represents \
|
||||
a \
|
||||
an \
|
||||
the
|
||||
ALWAYS_DETAILED_SEC = NO
|
||||
INLINE_INHERITED_MEMB = NO
|
||||
FULL_PATH_NAMES = YES
|
||||
STRIP_FROM_PATH =
|
||||
STRIP_FROM_INC_PATH =
|
||||
SHORT_NAMES = NO
|
||||
JAVADOC_AUTOBRIEF = NO
|
||||
JAVADOC_BANNER = NO
|
||||
QT_AUTOBRIEF = NO
|
||||
MULTILINE_CPP_IS_BRIEF = NO
|
||||
PYTHON_DOCSTRING = YES
|
||||
INHERIT_DOCS = YES
|
||||
SEPARATE_MEMBER_PAGES = NO
|
||||
TAB_SIZE = 4
|
||||
ALIASES =
|
||||
OPTIMIZE_OUTPUT_FOR_C = NO
|
||||
OPTIMIZE_OUTPUT_JAVA = NO
|
||||
OPTIMIZE_FOR_FORTRAN = NO
|
||||
OPTIMIZE_OUTPUT_VHDL = NO
|
||||
OPTIMIZE_OUTPUT_SLICE = NO
|
||||
EXTENSION_MAPPING =
|
||||
MARKDOWN_SUPPORT = YES
|
||||
TOC_INCLUDE_HEADINGS = 5
|
||||
MARKDOWN_ID_STYLE = GITHUB
|
||||
AUTOLINK_SUPPORT = YES
|
||||
AUTOLINK_IGNORE_WORDS =
|
||||
BUILTIN_STL_SUPPORT = YES
|
||||
CPP_CLI_SUPPORT = NO
|
||||
SIP_SUPPORT = NO
|
||||
IDL_PROPERTY_SUPPORT = YES
|
||||
DISTRIBUTE_GROUP_DOC = NO
|
||||
GROUP_NESTED_COMPOUNDS = NO
|
||||
SUBGROUPING = YES
|
||||
INLINE_GROUPED_CLASSES = NO
|
||||
INLINE_SIMPLE_STRUCTS = NO
|
||||
TYPEDEF_HIDES_STRUCT = NO
|
||||
LOOKUP_CACHE_SIZE = 0
|
||||
NUM_PROC_THREADS = 0
|
||||
TIMESTAMP = NO
|
||||
EXTRACT_ALL = YES
|
||||
EXTRACT_PRIVATE = NO
|
||||
EXTRACT_PRIV_VIRTUAL = NO
|
||||
EXTRACT_PACKAGE = NO
|
||||
EXTRACT_STATIC = NO
|
||||
EXTRACT_LOCAL_CLASSES = NO
|
||||
EXTRACT_LOCAL_METHODS = NO
|
||||
EXTRACT_ANON_NSPACES = NO
|
||||
RESOLVE_UNNAMED_PARAMS = YES
|
||||
HIDE_UNDOC_MEMBERS = NO
|
||||
HIDE_UNDOC_CLASSES = NO
|
||||
HIDE_UNDOC_NAMESPACES = YES
|
||||
HIDE_FRIEND_COMPOUNDS = NO
|
||||
HIDE_IN_BODY_DOCS = NO
|
||||
INTERNAL_DOCS = NO
|
||||
CASE_SENSE_NAMES = SYSTEM
|
||||
HIDE_SCOPE_NAMES = NO
|
||||
HIDE_COMPOUND_REFERENCE= NO
|
||||
SHOW_HEADERFILE = YES
|
||||
SHOW_INCLUDE_FILES = YES
|
||||
SHOW_GROUPED_MEMB_INC = NO
|
||||
FORCE_LOCAL_INCLUDES = NO
|
||||
INLINE_INFO = YES
|
||||
SORT_MEMBER_DOCS = YES
|
||||
SORT_BRIEF_DOCS = NO
|
||||
SORT_MEMBERS_CTORS_1ST = NO
|
||||
SORT_GROUP_NAMES = NO
|
||||
SORT_BY_SCOPE_NAME = NO
|
||||
STRICT_PROTO_MATCHING = NO
|
||||
GENERATE_TODOLIST = YES
|
||||
GENERATE_TESTLIST = YES
|
||||
GENERATE_BUGLIST = YES
|
||||
GENERATE_DEPRECATEDLIST= YES
|
||||
ENABLED_SECTIONS =
|
||||
MAX_INITIALIZER_LINES = 30
|
||||
SHOW_USED_FILES = YES
|
||||
SHOW_FILES = YES
|
||||
SHOW_NAMESPACES = YES
|
||||
FILE_VERSION_FILTER =
|
||||
LAYOUT_FILE =
|
||||
CITE_BIB_FILES =
|
||||
EXTERNAL_TOOL_PATH =
|
||||
QUIET = NO
|
||||
WARNINGS = YES
|
||||
WARN_IF_UNDOCUMENTED = NO
|
||||
WARN_IF_DOC_ERROR = YES
|
||||
WARN_IF_INCOMPLETE_DOC = YES
|
||||
WARN_NO_PARAMDOC = NO
|
||||
WARN_IF_UNDOC_ENUM_VAL = NO
|
||||
WARN_LAYOUT_FILE = YES
|
||||
WARN_AS_ERROR = NO
|
||||
WARN_FORMAT = "$file:$line: $text"
|
||||
WARN_LINE_FORMAT = "at line $line of file $file"
|
||||
WARN_LOGFILE =
|
||||
INPUT = README.md \
|
||||
include
|
||||
INPUT_ENCODING = UTF-8
|
||||
INPUT_FILE_ENCODING =
|
||||
FILE_PATTERNS =
|
||||
RECURSIVE = YES
|
||||
EXCLUDE =
|
||||
EXCLUDE_SYMLINKS = YES
|
||||
EXCLUDE_PATTERNS =
|
||||
EXCLUDE_SYMBOLS =
|
||||
EXAMPLE_PATH =
|
||||
EXAMPLE_PATTERNS =
|
||||
EXAMPLE_RECURSIVE = NO
|
||||
IMAGE_PATH =
|
||||
INPUT_FILTER =
|
||||
FILTER_PATTERNS =
|
||||
FILTER_SOURCE_FILES = NO
|
||||
FILTER_SOURCE_PATTERNS =
|
||||
USE_MDFILE_AS_MAINPAGE = README.md
|
||||
IMPLICIT_DIR_DOCS = YES
|
||||
FORTRAN_COMMENT_AFTER = 72
|
||||
SOURCE_BROWSER = NO
|
||||
INLINE_SOURCES = NO
|
||||
STRIP_CODE_COMMENTS = YES
|
||||
REFERENCED_BY_RELATION = NO
|
||||
REFERENCES_RELATION = NO
|
||||
REFERENCES_LINK_SOURCE = YES
|
||||
SOURCE_TOOLTIPS = YES
|
||||
USE_HTAGS = NO
|
||||
VERBATIM_HEADERS = YES
|
||||
ALPHABETICAL_INDEX = YES
|
||||
IGNORE_PREFIX =
|
||||
GENERATE_HTML = YES
|
||||
HTML_OUTPUT = html
|
||||
HTML_FILE_EXTENSION = .html
|
||||
HTML_HEADER =
|
||||
HTML_FOOTER =
|
||||
HTML_STYLESHEET =
|
||||
HTML_EXTRA_STYLESHEET =
|
||||
HTML_EXTRA_FILES =
|
||||
HTML_COLORSTYLE = AUTO_LIGHT
|
||||
HTML_COLORSTYLE_HUE = 220
|
||||
HTML_COLORSTYLE_SAT = 100
|
||||
HTML_COLORSTYLE_GAMMA = 80
|
||||
HTML_DYNAMIC_MENUS = YES
|
||||
HTML_DYNAMIC_SECTIONS = NO
|
||||
HTML_CODE_FOLDING = YES
|
||||
HTML_COPY_CLIPBOARD = YES
|
||||
HTML_PROJECT_COOKIE =
|
||||
HTML_INDEX_NUM_ENTRIES = 100
|
||||
GENERATE_DOCSET = NO
|
||||
DOCSET_FEEDNAME = "Doxygen generated documentation"
|
||||
DOCSET_FEEDURL =
|
||||
DOCSET_BUNDLE_ID = org.doxygen.Project
|
||||
DOCSET_PUBLISHER_ID = org.doxygen.Publisher
|
||||
DOCSET_PUBLISHER_NAME = Publisher
|
||||
GENERATE_HTMLHELP = NO
|
||||
CHM_FILE =
|
||||
HHC_LOCATION =
|
||||
GENERATE_CHI = NO
|
||||
CHM_INDEX_ENCODING =
|
||||
BINARY_TOC = NO
|
||||
TOC_EXPAND = NO
|
||||
SITEMAP_URL =
|
||||
GENERATE_QHP = NO
|
||||
QCH_FILE =
|
||||
QHP_NAMESPACE = org.doxygen.Project
|
||||
QHP_VIRTUAL_FOLDER = doc
|
||||
QHP_CUST_FILTER_NAME =
|
||||
QHP_CUST_FILTER_ATTRS =
|
||||
QHP_SECT_FILTER_ATTRS =
|
||||
QHG_LOCATION =
|
||||
GENERATE_ECLIPSEHELP = NO
|
||||
ECLIPSE_DOC_ID = org.doxygen.Project
|
||||
DISABLE_INDEX = NO
|
||||
GENERATE_TREEVIEW = NO
|
||||
FULL_SIDEBAR = NO
|
||||
ENUM_VALUES_PER_LINE = 4
|
||||
SHOW_ENUM_VALUES = NO
|
||||
TREEVIEW_WIDTH = 250
|
||||
EXT_LINKS_IN_WINDOW = NO
|
||||
OBFUSCATE_EMAILS = YES
|
||||
HTML_FORMULA_FORMAT = png
|
||||
FORMULA_FONTSIZE = 10
|
||||
FORMULA_MACROFILE =
|
||||
USE_MATHJAX = NO
|
||||
MATHJAX_VERSION = MathJax_2
|
||||
MATHJAX_FORMAT = HTML-CSS
|
||||
MATHJAX_RELPATH = http://cdn.mathjax.org/mathjax/latest
|
||||
MATHJAX_EXTENSIONS =
|
||||
MATHJAX_CODEFILE =
|
||||
SEARCHENGINE = YES
|
||||
SERVER_BASED_SEARCH = NO
|
||||
EXTERNAL_SEARCH = NO
|
||||
SEARCHENGINE_URL =
|
||||
SEARCHDATA_FILE = searchdata.xml
|
||||
EXTERNAL_SEARCH_ID =
|
||||
EXTRA_SEARCH_MAPPINGS =
|
||||
GENERATE_LATEX = NO
|
||||
LATEX_OUTPUT = latex
|
||||
LATEX_CMD_NAME =
|
||||
MAKEINDEX_CMD_NAME = makeindex
|
||||
LATEX_MAKEINDEX_CMD = makeindex
|
||||
COMPACT_LATEX = NO
|
||||
PAPER_TYPE = a4
|
||||
EXTRA_PACKAGES =
|
||||
LATEX_HEADER =
|
||||
LATEX_FOOTER =
|
||||
LATEX_EXTRA_STYLESHEET =
|
||||
LATEX_EXTRA_FILES =
|
||||
PDF_HYPERLINKS = YES
|
||||
USE_PDFLATEX = YES
|
||||
LATEX_BATCHMODE = NO
|
||||
LATEX_HIDE_INDICES = NO
|
||||
LATEX_BIB_STYLE = plainnat
|
||||
LATEX_EMOJI_DIRECTORY =
|
||||
GENERATE_RTF = NO
|
||||
RTF_OUTPUT = rtf
|
||||
COMPACT_RTF = NO
|
||||
RTF_HYPERLINKS = NO
|
||||
RTF_STYLESHEET_FILE =
|
||||
RTF_EXTENSIONS_FILE =
|
||||
RTF_EXTRA_FILES =
|
||||
GENERATE_MAN = NO
|
||||
MAN_OUTPUT = man
|
||||
MAN_EXTENSION = .3
|
||||
MAN_SUBDIR =
|
||||
MAN_LINKS = NO
|
||||
GENERATE_XML = NO
|
||||
XML_OUTPUT = xml
|
||||
XML_PROGRAMLISTING = YES
|
||||
XML_NS_MEMB_FILE_SCOPE = NO
|
||||
GENERATE_DOCBOOK = NO
|
||||
DOCBOOK_OUTPUT = docbook
|
||||
GENERATE_AUTOGEN_DEF = NO
|
||||
GENERATE_SQLITE3 = NO
|
||||
SQLITE3_OUTPUT = sqlite3
|
||||
SQLITE3_RECREATE_DB = YES
|
||||
GENERATE_PERLMOD = NO
|
||||
PERLMOD_LATEX = NO
|
||||
PERLMOD_PRETTY = YES
|
||||
PERLMOD_MAKEVAR_PREFIX =
|
||||
ENABLE_PREPROCESSING = YES
|
||||
MACRO_EXPANSION = YES
|
||||
EXPAND_ONLY_PREDEF = NO
|
||||
SEARCH_INCLUDES = YES
|
||||
INCLUDE_PATH =
|
||||
INCLUDE_FILE_PATTERNS =
|
||||
PREDEFINED = CoreExport=/**/ \
|
||||
ATTR_NOT_NULL(...)=/**/
|
||||
EXPAND_AS_DEFINED =
|
||||
SKIP_FUNCTION_MACROS = YES
|
||||
TAGFILES =
|
||||
GENERATE_TAGFILE =
|
||||
ALLEXTERNALS = NO
|
||||
EXTERNAL_GROUPS = YES
|
||||
EXTERNAL_PAGES = YES
|
||||
HIDE_UNDOC_RELATIONS = YES
|
||||
HAVE_DOT = NO
|
||||
DOT_NUM_THREADS = 0
|
||||
DOT_COMMON_ATTR = "fontname=Helvetica,fontsize=10"
|
||||
DOT_EDGE_ATTR = "labelfontname=Helvetica,labelfontsize=10"
|
||||
DOT_NODE_ATTR = "shape=box,height=0.2,width=0.4"
|
||||
DOT_FONTPATH =
|
||||
CLASS_GRAPH = YES
|
||||
COLLABORATION_GRAPH = YES
|
||||
GROUP_GRAPHS = YES
|
||||
UML_LOOK = NO
|
||||
UML_LIMIT_NUM_FIELDS = 10
|
||||
DOT_UML_DETAILS = NO
|
||||
DOT_WRAP_THRESHOLD = 17
|
||||
TEMPLATE_RELATIONS = NO
|
||||
INCLUDE_GRAPH = YES
|
||||
INCLUDED_BY_GRAPH = YES
|
||||
CALL_GRAPH = NO
|
||||
CALLER_GRAPH = NO
|
||||
GRAPHICAL_HIERARCHY = YES
|
||||
DIRECTORY_GRAPH = YES
|
||||
DIR_GRAPH_MAX_DEPTH = 1
|
||||
DOT_IMAGE_FORMAT = png
|
||||
INTERACTIVE_SVG = NO
|
||||
DOT_PATH =
|
||||
DOTFILE_DIRS =
|
||||
DIA_PATH =
|
||||
DIAFILE_DIRS =
|
||||
PLANTUML_JAR_PATH =
|
||||
PLANTUML_CFG_FILE =
|
||||
PLANTUML_INCLUDE_PATH =
|
||||
PLANTUMLFILE_DIRS =
|
||||
DOT_GRAPH_MAX_NODES = 50
|
||||
MAX_DOT_GRAPH_DEPTH = 0
|
||||
DOT_MULTI_TARGETS = NO
|
||||
GENERATE_LEGEND = YES
|
||||
DOT_CLEANUP = YES
|
||||
MSCGEN_TOOL =
|
||||
MSCFILE_DIRS =
|
||||
+416
@@ -0,0 +1,416 @@
|
||||
Anope Internal Events
|
||||
---------------------
|
||||
|
||||
1) Intro
|
||||
2) Complex Events
|
||||
3) Triggered Events
|
||||
4) Triggered Events List
|
||||
|
||||
1) Introduction to Internal Events
|
||||
|
||||
Internal Events are setup to give module developers more information
|
||||
about what the core is doing at different times. This information can
|
||||
be as complex as data we are feeding to the uplink, to simple triggered
|
||||
events such as the databases being saved. A list of triggered events
|
||||
can be found below. Additional there is a module included with the core
|
||||
which can provide some clue as to how to use the code in your modules.
|
||||
The rest of this document assumes that you are used to writing modules.
|
||||
|
||||
2) Complex Events
|
||||
|
||||
This type of events are based around what happens when we talk to the
|
||||
IRCd, much like MESSAGE events that the IRCD sends to us. The events
|
||||
are triggered when Anope writes to the ircd. To watch for these events
|
||||
you must have some knowledge of how the IRCd command system works. In
|
||||
our example we will trap for NICK events.
|
||||
|
||||
A) All functions most be formatted as:
|
||||
|
||||
int functioname(char *source, int ac, char **av);
|
||||
|
||||
B) In AnopeInit you must declare EvtMessage in some fashion, it is into
|
||||
this variable that we will create the event handler. Here is what the
|
||||
base AnopeInit should look like at this point:
|
||||
|
||||
int AnopeInit(int argc, char **argv)
|
||||
{
|
||||
EvtMessage *msg = NULL;
|
||||
int status;
|
||||
|
||||
moduleAddAuthor(AUTHOR);
|
||||
moduleAddVersion(VERSION);
|
||||
return MOD_CONT;
|
||||
}
|
||||
|
||||
Note that AUTHOR and VERSION should be defined above the AnopeInit
|
||||
function, just like you should do with any module.
|
||||
|
||||
C) Pass "createEventHandler" the name of the message in this case NICK,
|
||||
and the function that was created in Step A. At this point you should
|
||||
assign the return of "createEventHandler" to the EvtMessage variable.
|
||||
|
||||
msg = createEventHandler("NICK", my_nick);
|
||||
|
||||
D) The Handler is not ready for use yet; now you must add it to the hash
|
||||
with "moduleAddEventHandler". You will want to pass to this function
|
||||
the return of "createEventHandler".
|
||||
|
||||
status = moduleAddEventHandler(msg);
|
||||
|
||||
It will return the same module error codes as adding a regular message,
|
||||
which you can use to confirm it was added correctly.
|
||||
|
||||
E) With that setup in your function you will be passed 3 items. The source
|
||||
most of the time this will be set to ServerName or NULL; consult our
|
||||
IRCd documentation about how messages are formatted. AC is the count of
|
||||
variables you will find in AV.
|
||||
|
||||
int my_nick(char *source, int ac, char **av)
|
||||
{
|
||||
alog("Internal Event - nick is %s",av[0]);
|
||||
return MOD_CONT;
|
||||
}
|
||||
|
||||
3) Triggered Events
|
||||
|
||||
These events also known as "event hooks" are internal events such as
|
||||
expiring of nicks to the saving of databases.
|
||||
|
||||
A) All functions most be formatted as:
|
||||
|
||||
int functioname(int argc, char **argv);
|
||||
|
||||
B) In AnopeInit you must declare EvtHook in some fashion; it is into
|
||||
this variable that we will create the event handler. Here is what
|
||||
the base AnopeInit should look like at this point:
|
||||
|
||||
int AnopeInit(int argc, char **argv)
|
||||
{
|
||||
EvtHook *hook = NULL;
|
||||
int status;
|
||||
|
||||
moduleAddAuthor(AUTHOR);
|
||||
moduleAddVersion(VERSION);
|
||||
return MOD_CONT;
|
||||
}
|
||||
|
||||
C) Pass "createEventHook" the name of the event. In this case we are
|
||||
going to hook to the saving of databases, "EVENT_DB_SAVING".
|
||||
|
||||
hook = createEventHook(EVENT_DB_SAVING, my_save);
|
||||
|
||||
D) The Handler is not ready for use yet; now you must add it to the hash
|
||||
with "moduleAddEventHook". You will want to pass to this function the
|
||||
return of "createEventHook"
|
||||
|
||||
status = moduleAddEventHook(hook);
|
||||
|
||||
It will return the same module error codes as adding a regular message,
|
||||
which you can use to confirm it was added correctly.
|
||||
|
||||
E) With that setup in your function you will be passed 1 item. The message
|
||||
is very simple; it could be as simple as a start, stop or message. In
|
||||
the case of saving it has a start and stop.
|
||||
|
||||
int my_save(int argc, char **argv)
|
||||
{
|
||||
if (argc < 1) {
|
||||
return MOD_CONT;
|
||||
}
|
||||
|
||||
if (!stricmp(argv[0], EVENT_START)) {
|
||||
alog("Saving the databases! has started");
|
||||
} else {
|
||||
alog("Saving the databases is complete");
|
||||
}
|
||||
return MOD_CONT;
|
||||
}
|
||||
|
||||
4) Triggered Events List
|
||||
|
||||
Here's a list of all event hooks we currently offer, with a description
|
||||
of what argument is being passed to the event functions for this type of
|
||||
event. All arguments are plain-text strings (char *). The list is sorted
|
||||
in alphabetical order.
|
||||
|
||||
Note that all events are emitted AFTER the action has taken place, so
|
||||
any deleted nick/channel/etc won't exist anymore and any created one will
|
||||
exist when your function is being run, unless noted otherwise.
|
||||
|
||||
Also note that EVENT_START and EVENT_STOP should not be matched with an
|
||||
equal sign, but with string comparision. See the bundled events module for
|
||||
an example on how to do this.
|
||||
|
||||
The arguments are given as av[0] for the first argument, av[1] for the
|
||||
second argument, and so on. If av[0] and av[1] are given, the event has
|
||||
two arguments, and argc should be 2.
|
||||
|
||||
EVENT_ACCESS_ADD
|
||||
An user has been added to a channel access list.
|
||||
av[0] Name of the channel the user has been added to.
|
||||
av[1] The nickname of the user that has just added an entry to the
|
||||
access list.
|
||||
av[2] The nickname of the user that has been added to the access
|
||||
list.
|
||||
av[3] The level number the user has been added with.
|
||||
|
||||
EVENT_ACCESS_CHANGE
|
||||
An user level has been changed on a channel access list.
|
||||
av[0] Name of the channel the access list has been modified which.
|
||||
av[1] The nickname of the user that has just modified the access
|
||||
list of the channel.
|
||||
av[2] The nickname of the user wich his access level has just been
|
||||
modified.
|
||||
av[3] The new access level for the user.
|
||||
|
||||
EVENT_ACCESS_CLEAR
|
||||
A channel access list has been cleared.
|
||||
av[0] Name of the channel the access list has been cleared of
|
||||
av[1] The nickname of the user that has cleared the access list
|
||||
|
||||
EVENT_ACCESS_DEL
|
||||
An user has been deleted of a channel access list.
|
||||
av[0] Name of the channel the access entry has been deleted which.
|
||||
av[1] The nickname of the user that has just deleted the access entry.
|
||||
av[2] [OPTIONAL] The nickname of the user wich his access level has just
|
||||
been removed. Not present if numbers were used (e.g. /cs access
|
||||
del 7).
|
||||
|
||||
EVENT_BOT_ASSIGN
|
||||
A BotServ bot has been assigned to a channel.
|
||||
av[0] Name of the channel the bot has been assigned to.
|
||||
av[1] The nickname of the bot that has been assigned to the channel.
|
||||
|
||||
EVENT_BOT_BAN
|
||||
A BotServ bot has banned a user, e.g. kickers.
|
||||
av[0] The nick of the user banned.
|
||||
av[1] The Channel the user was banned from.
|
||||
av[2] The mask that was banned.
|
||||
|
||||
EVENT_BOT_CHANGE
|
||||
The properties of a BotServ bot have been changed.
|
||||
av[0] The nickname of the bot involved.
|
||||
|
||||
EVENT_BOT_CREATE
|
||||
A new BotServ bot has been created, and is ready to use.
|
||||
av[0] The nickname of the newly created bot.
|
||||
|
||||
EVENT_BOT_DEL
|
||||
A BotServ bot is being deleted from BotServ. This event is being sent
|
||||
just before the actual deletion is performed.
|
||||
av[0] The nickname of the bot being deleted.
|
||||
|
||||
EVENT_BOT_FANTASY
|
||||
A fantasy command of the bot has been triggered. This event should be
|
||||
used to create your own fantasy commands.
|
||||
av[0] The fantasy command that has been triggered without leading '!'.
|
||||
av[1] The nickname of the user that has triggered the fantasy
|
||||
command.
|
||||
av[2] The name of the channel the fantasy command has been triggered
|
||||
on.
|
||||
av[3] Contains any optional paramenters passed after the fantasy
|
||||
command. If none are present, this will not exist, and argc will
|
||||
will be 3.
|
||||
|
||||
EVENT_BOT_FANTASY_NO_ACCESS
|
||||
A fantasy command of the bot has been triggered by someone without
|
||||
access to BotServ FANTASY commands on the channel. This will NOT
|
||||
trigger if someone with access has triggered a fantasy command; use
|
||||
EVENT_BOT_FANTASY for those. Hook to both events to catch both event
|
||||
triggers.
|
||||
av[0] The fantasy command that has been triggered without leading '!'.
|
||||
av[1] The nickname of the user that has triggered the fantasy
|
||||
command.
|
||||
av[2] The name of the channel the fantasy command has been triggered
|
||||
on.
|
||||
av[3] Contains any optional paramenters passed after the fantasy
|
||||
command. If none are present, this will not exist, and argc will
|
||||
will be 3.
|
||||
|
||||
EVENT_BOT_JOIN
|
||||
A BotServ bot has joined a channel and opped itself.
|
||||
av[0] The channel name the bot has just joined.
|
||||
av[1] The nickname of the bot that has joined the channel.
|
||||
|
||||
EVENT_BOT_KICK
|
||||
A BotServ bot has kicked a user from a channel.
|
||||
av[0] The name of the user that has been kicked.
|
||||
av[1] The name of the channel the user was kicked from.
|
||||
av[2] The reason for the kick.
|
||||
|
||||
EVENT_BOT_UNASSIGN
|
||||
A BotServ bot is being unassigned from a channel. This event is being
|
||||
sent before the actual removing of the bot is done.
|
||||
av[0] The channel name the bot has been unassigned from.
|
||||
av[1] The nickname of the bot that has been unassigned.
|
||||
|
||||
EVENT_CHAN_DROP
|
||||
A channel has been dropped and deleted.
|
||||
av[0] The name of the channel that has been dropped.
|
||||
|
||||
EVENT_CHAN_EXPIRE
|
||||
A channel has been expired and will be deleted. The event will be
|
||||
emitted just before the actual channel deletion happens.
|
||||
av[0] The name of the channel that has been expired.
|
||||
|
||||
EVENT_CHAN_FORBIDDEN
|
||||
A channel has been forbidden (ChanServ FORBID).
|
||||
av[0] The name of the channel that has been forbidden.
|
||||
|
||||
EVENT_CHAN_KICK
|
||||
Someone has just been kicked from a channel.
|
||||
av[0] The nick of the user that has been kicked.
|
||||
av[1] The channel the user has been kicked from.
|
||||
|
||||
EVENT_CHAN_REGISTERED
|
||||
A new channel has been registered.
|
||||
av[0] The name of the channel that has been registered.
|
||||
|
||||
EVENT_CHAN_SUSPENDED
|
||||
A channel has been suspended (ChanServ SUSPEND).
|
||||
av[0] The name of the channel that has been suspended.
|
||||
|
||||
EVENT_CHAN_UNSUSPEND
|
||||
A channel has been unsuspended (ChanServ UNSUSPEND).
|
||||
av[0] The name of the channel that has been unsuspended.
|
||||
|
||||
EVENT_CHANGE_NICK
|
||||
A user has just changed it's nick.
|
||||
av[0] The new nickname of the user.
|
||||
|
||||
EVENT_CONNECT
|
||||
This event is emitted when the connection to our uplink hub is being
|
||||
made.
|
||||
av[0] EVENT_START or EVENT_STOP, to indicate if it's emitted before
|
||||
or after the connection has been made. EVENT_STOP is emitted
|
||||
before our burst is being sent over the link.
|
||||
|
||||
EVENT_DB_EXPIRE
|
||||
This event is emitted when the expiry routines for all things that can
|
||||
expire in Anope are being run.
|
||||
av[0] EVENT_START or EVENT_STOP, to indicate if it's being emitted
|
||||
before or after the expiry routines have been run.
|
||||
|
||||
EVENT_DB_SAVING
|
||||
This event is emitted when the databases are being saved.
|
||||
av[0] EVENT_START or EVENT_STOP, to indicate if it's emitted before
|
||||
or after the saving routines have been run.
|
||||
|
||||
EVENT_DB_BACKUP
|
||||
This event is emitted when the databases are backed up.
|
||||
av[0] EVENT_START when the backup commences, and EVENT_STOP when it
|
||||
finishes.
|
||||
|
||||
EVENT_DEFCON_LEVEL
|
||||
The DefCon level has just been changed. This event is emitted before
|
||||
any DefCon-related action is taken. The internal DefConLevel has
|
||||
already been raised at this point.
|
||||
av[0] The new level of DefCon being invoked.
|
||||
|
||||
EVENT_GROUP
|
||||
A user has grouped it's nickname to another user group.
|
||||
av[0] The nickname of the user that joined the group.
|
||||
|
||||
EVENT_JOIN_CHANNEL
|
||||
A user joins a channel.
|
||||
av[0] EVENT_START or EVENT_STOP. EVENT_START when the user has passed
|
||||
all access checks and is allowed to join, but has not yet
|
||||
joined the channel. EVENT_STOP when the user has joined and all
|
||||
needed modes are set etc.
|
||||
av[1] The nickname of the user joining the channel.
|
||||
av[2] The name of the channel the user has joined.
|
||||
|
||||
EVENT_NEWNICK
|
||||
A new user has been introduced on the network.
|
||||
av[0] The nickname of the newly introduced user.
|
||||
|
||||
EVENT_NICK_DROPPED
|
||||
A user's nick has just been dropped. Note that the nickname information
|
||||
has already been deleted!
|
||||
av[0] The nickname of the user that has just been dropped.
|
||||
|
||||
EVENT_NICK_EXPIRE
|
||||
A user's nick has just expired. Note that, as with EVENT_NICK_DROPPED,
|
||||
the nickname information has already been deleted!
|
||||
av[0] The nickname of the user that has just expired.
|
||||
|
||||
EVENT_NICK_FORBIDDEN
|
||||
A user's nick has just been forbidden.
|
||||
av[0] The nickname that has just been forbidden.
|
||||
|
||||
EVENT_NICK_IDENTIFY
|
||||
A user has just identified for it's nickname with NickServ.
|
||||
av[0] The nickname of the user that just identified.
|
||||
|
||||
EVENT_NICK_LOGOUT
|
||||
A user has just (been) logged out.
|
||||
av[0] The nickname of the user that has (been) logged out.
|
||||
|
||||
EVENT_NICK_REGISTERED
|
||||
A new user has just registered it's nickname. This event is being
|
||||
emitted when the registration is completed, but the user modes have not
|
||||
yet been set.
|
||||
av[0] The nickname of the newly registered user.
|
||||
|
||||
EVENT_NICK_SUSPENDED
|
||||
A user's nick has just been suspended.
|
||||
av[0] The nickname that has just been suspended.
|
||||
|
||||
EVENT_NICK_UNSUSPEND
|
||||
A user's nick has just been unsuspended.
|
||||
av[0] The nickname that has just been unsuspended.
|
||||
|
||||
EVENT_PART_CHANNEL
|
||||
A user parts a channel.
|
||||
av[0] EVENT_START or EVENT_STOP. EVENT_START when the user is about
|
||||
to be removed from the channel internally, EVENT_STOP when
|
||||
this has been done.
|
||||
av[1] The nickname of the user parting the channel.
|
||||
av[2] The name of the channel the user has parted.
|
||||
av[3] The reason the user parted the channel, this is not always sent
|
||||
so check the count to make sure it was passed. (ac == 4)
|
||||
|
||||
EVENT_RELOAD
|
||||
This event is emitted after the configuration file has been reloaded.
|
||||
av[0] Always EVENT_START.
|
||||
|
||||
EVENT_RESTART
|
||||
This event is emitted before the services are being restarted.
|
||||
av[0] Always EVENT_START.
|
||||
|
||||
EVENT_SERVER_CONNECT
|
||||
A new server has just connected to the network.
|
||||
av[0] The name of the new server.
|
||||
|
||||
EVENT_SERVER_SQUIT
|
||||
A server has sent an SQUIT and is about to be removed from the
|
||||
network. This event is being sent before the server is actually
|
||||
removed from the network.
|
||||
av[0] The name of the server that is being removed.
|
||||
|
||||
EVENT_SHUTDOWN
|
||||
This event is emitted when Anope is being shut down.
|
||||
av[0] EVENT_START or EVENT_STOP, to indicate where in the process of
|
||||
restarting the core is. With EVENT_START, services are still
|
||||
fully online and operating. With EVENT_STOP, every internal
|
||||
clean up has been done already, and the SQUIT has been sent;
|
||||
the only thing done after emitting the event is closing the
|
||||
socket to the uplink hub.
|
||||
|
||||
EVENT_SIGNAL
|
||||
This event is emitted when Anope is quitting because of a signal it
|
||||
received.
|
||||
av[0] The quit message that will be sent with the SQUIT for this
|
||||
shutdown.
|
||||
|
||||
EVENT_TOPIC_UPDATED
|
||||
A channel topic has been succesfully updated. Note that this event is
|
||||
only emitted if the new topic has been fully accepted and set by the
|
||||
Anope core.
|
||||
av[0] The name of the channel involved.
|
||||
av[1] The new topic set on the channel.
|
||||
|
||||
EVENT_USER_LOGOFF
|
||||
A user has left the network. This event is emitted before the internal
|
||||
removal is performed, so the user still exists internally.
|
||||
av[0] The nickname of the user leaving the network.
|
||||
@@ -1,10 +1,480 @@
|
||||
Frequently Asked Questions (FAQ) concerning Anope
|
||||
-------------------------------------------------
|
||||
------------------------------------------------
|
||||
|
||||
The information in the 2.0 FAQ is subject to change at any
|
||||
moment due to new developments. Please visit our website
|
||||
for the most up to date information.
|
||||
NOTE:
|
||||
An updated version of this FAQ can be found on our website: www.anope.org
|
||||
|
||||
An updated version of the FAQ can be found here:
|
||||
Table of Contents
|
||||
-----------------
|
||||
|
||||
https://wiki.anope.org/index.php/2.0/FAQ
|
||||
1) General
|
||||
1.1) What is Anope?
|
||||
1.2) Where can I find Anope?
|
||||
1.3) Does Anope run under Windows?
|
||||
1.4) Can I send you questions without reading the FAQ, INSTALL or README
|
||||
files?
|
||||
1.5) I need support for the XYZ protocol.
|
||||
1.6) Your Services program doesn't do XYZ like DALnet (or other) Services.
|
||||
What's wrong?
|
||||
1.7) I've got a great new idea for Services. Do you want it?
|
||||
1.8) Examples of features we have been asked about and why we won't add (or
|
||||
haven't yet added) them, so don't ask us about them:
|
||||
1.9) Can you help me?
|
||||
1.10) Where is RootServ?
|
||||
|
||||
2) Installation / Configuration
|
||||
2.1) When I run "make", I get an error message like "missing separator",
|
||||
"Unassociated shell command", "Unexpected end of line seen", etc.
|
||||
2.2) I get an error like "Makefile.inc not found".
|
||||
2.3) I typed "./services" at the command line, but nothing happened!
|
||||
2.4) Whenever I start Anope, I get a message on my IRC server saying
|
||||
"connection refused" or something similar, and Anope gives an error
|
||||
message from the server saying "Closing Link: ...".
|
||||
2.5) My IRC server is giving me messages like "Connection to
|
||||
services.whatever.net[127.0.0.1] activated" and then "Access denied --
|
||||
no N line". Why?
|
||||
2.6) When I say "/connect services.*", it doesn't work!
|
||||
2.7) Anope starts up okay, but if I try to register a nickname, it comes
|
||||
back with "Sorry, registration failed."
|
||||
2.8) Anope reports (via /stats u or /msg OperServ STATS) a different number
|
||||
of users online than I get from doing /lusers.
|
||||
|
||||
3) OperServ
|
||||
3.1) Using the OperServ JUPE command results in server messages like
|
||||
"Server juped.server introduced by non-hub server services.my.net".
|
||||
3.2) I can't use the ADMIN command to add Services admins, it tells me
|
||||
"Permission denied."
|
||||
3.3) When I add an AKILL, the users matching it don't get killed.
|
||||
3.4) Trying to use OperServ gives me "Access denied", but my nick is in the
|
||||
ServicesRoot directive and is registered, and I've identified for my
|
||||
nick.
|
||||
3.5) When I used the OperServ RAW command, Anope and/or my network crashed,
|
||||
or did weird things! Please fix this bug!
|
||||
3.6) I would like to have the list of the different RAW on OperServ.
|
||||
3.7) I can't get /OS UMODES and /OS SVSNICK to work!
|
||||
3.8) What is a Super-Admin? How does it work? Why might it not work?
|
||||
3.9) How can i enable the OperServ RAW command?
|
||||
|
||||
4) Bugs / Crashes
|
||||
4.1) Anope always dies after about five minutes, saying "FATAL ERROR! Can't
|
||||
back up nick.db".
|
||||
4.2) Anope crashed with a segmentation fault.
|
||||
4.3) I've found a bug that's not mentioned here or in the README or BUGS
|
||||
files. What should I do?
|
||||
4.4) My FreeBSD box complains about 'Shared object "nss_dns.so.1" not
|
||||
found'
|
||||
4.5) Anope and long (more then 30 character) nicknames.
|
||||
|
||||
5) ChanServ
|
||||
5.1) Anope's channel mode setting doesn't work. I can't set modes with
|
||||
OperServ, and every time ChanServ tries to set a mode, my server
|
||||
reverses the change.
|
||||
5.2) Anope ignored the SET SUCCESSOR setting and deleted a channel when the
|
||||
founder expired.
|
||||
5.3) How to auto voice all those whom join my #channel?
|
||||
5.4) Channel options like RESTRICTED or SECUREOPS don't work. What's wrong?
|
||||
|
||||
6) BotServ
|
||||
6.1) How do I add bots to BotServ?
|
||||
6.2) Why do kick triggers and fantasy commands fail to work with my Bahamut
|
||||
IRCd?
|
||||
|
||||
7) Language
|
||||
7.1) Anope complains in the logfile about being unable to load the default
|
||||
language.
|
||||
7.2) Anope spricht kein Deutsch!, etc. (Anope doesn't speak my language!)
|
||||
7.3) I selected a language other than English, but sometimes Anope sends
|
||||
responses in English instead.
|
||||
|
||||
8) DevNull
|
||||
8.1) What is the purpose of DevNull?
|
||||
|
||||
-------------------------------------------------------------------------------
|
||||
|
||||
1) General
|
||||
|
||||
1.1) What is Anope?
|
||||
|
||||
Anope is a set of services for IRC networks. See the README file for more
|
||||
information. And in case you were wondering, Anope is Epona spelt backwards
|
||||
:)
|
||||
|
||||
1.2) Where can I find Anope?
|
||||
|
||||
The latest version can always be found at the official Anope distribution
|
||||
site:
|
||||
|
||||
* http://www.anope.org/
|
||||
|
||||
New version announcements can also be found at http://www.anope.org/ in the
|
||||
main page.
|
||||
|
||||
1.3) Does Anope run under Windows?
|
||||
|
||||
Yes. For more information on how to obtain the windows version of Anope
|
||||
visit http://wiki.anope.org/Windows
|
||||
|
||||
1.4) Can I send you questions without reading the FAQ, INSTALL or README files?
|
||||
|
||||
No. If you don't read those files, your messages will most probably be
|
||||
ignored. We don't mean to be rude, but if we took the time to write down
|
||||
some documentation, we'd expect you to take some time to read it.
|
||||
|
||||
1.5) I need support for the XYZ protocol.
|
||||
|
||||
Since Anope 1.7.9, support for other IRCD's, and thus protocols, has been
|
||||
made modular. More information on making a support file for your favorite
|
||||
IRCD can be found in the docs/IRCD file.
|
||||
|
||||
1.6) Your Services program doesn't do XYZ like DALnet (or other) Services.
|
||||
What's wrong?
|
||||
|
||||
Nothing is wrong, except your expectations. Anope is a completely
|
||||
different program from that used on DALnet; they are similar in concept
|
||||
only.
|
||||
|
||||
1.7) I've got a great new idea for Services. Do you want it?
|
||||
|
||||
We are always interested in hearing new ideas. HOWEVER, do not expect your
|
||||
proposal to be in the next Anope release for sure. As a rule, we usually
|
||||
don't add anything that can be equivalently done by other means, or that we
|
||||
consider totally useless; see question 1.8 for examples of things we don't
|
||||
plan to add.
|
||||
|
||||
Our general intent is for Anope to provide as much functionality as
|
||||
possible--while staying as lean as possible. So features which are
|
||||
arguably beneficial will tend to be added, while features of limited or no
|
||||
benefit or which can be equally provided by something else already in use
|
||||
will tend to be passed over.
|
||||
|
||||
If you'd like to give us your idea, you can go to our website at
|
||||
http://www.anope.org/ and add it on our online Forum, in the Feature
|
||||
Requests section.
|
||||
|
||||
1.8) Examples of features we have been asked about and why we won't add (or
|
||||
haven't yet added) them, so don't ask us about them:
|
||||
|
||||
* An option to make ChanServ stay in some/all registered channels: we see
|
||||
absolutely no necessity for this feature, since BotServ already does this
|
||||
anyway.
|
||||
|
||||
* A "current time" field in NickServ and ChanServ INFO displays: Most
|
||||
people have clocks of some sort either on their computer screens or on
|
||||
their walls (or both), and all IRC servers, as well as Services, have a
|
||||
command to return the server's current time. Thus a current-time field in
|
||||
INFO displays would simply take up extra space for no reason.
|
||||
|
||||
1.9) Can you help me?
|
||||
|
||||
No, we can't help you unless you tell us what you need help with.
|
||||
|
||||
1.10) Where is RootServ?
|
||||
|
||||
Anope does not supply RootServ. All functions you would find in RootServ
|
||||
have been integrated into OperServ. If you really want to use RootServ, you
|
||||
can set the OperServAlias in services.conf to be RootServ. This will enable
|
||||
the RootServ nick to be used for OperServ as well. Read the comments near
|
||||
OperServAlias in the configuration file for more information.
|
||||
|
||||
|
||||
2) Installation / Configuration
|
||||
|
||||
2.1) When I run "make", I get an error message like "missing separator",
|
||||
"Unassociated shell command", "Unexpected end of line seen", etc.
|
||||
|
||||
Your make program isn't compatible with the Makefile for Anope. The
|
||||
Makefile was designed to work with GNU make, and as such may not work on
|
||||
other systems' "make" programs. If you get an error from "make", obtain
|
||||
GNU make from ftp://prep.ai.mit.edu/pub/gnu/ (or wherever you prefer) and
|
||||
use it instead of your system's default "make". Note that GNU make may
|
||||
already be installed on your system; try using the command "gmake" instead
|
||||
of "make".
|
||||
|
||||
The make programs bundled with SunOS/Solaris and FreeBSD have been reported
|
||||
not to work; you will need to use GNU make on these systems.
|
||||
|
||||
2.2) I get an error like "Makefile.inc not found".
|
||||
|
||||
You forgot to run the Config script first. See the INSTALL file for
|
||||
compilation instructions.
|
||||
|
||||
2.3) I typed "./services" at the command line, but nothing happened!
|
||||
|
||||
Anope puts itself in the background when it starts, so you get your shell
|
||||
prompt right back. Meanwhile, Anope will continue setting up, then connect
|
||||
to the IRC server specified in services.conf (or on the command line). If
|
||||
it doesn't connect, you probably specified the wrong server type in the
|
||||
configuration file. (Also make sure that you are actually running one of
|
||||
the supported servers. There are a gazillion different variations on the
|
||||
basic IRC protocol out there, and we have neither the time nor the desire
|
||||
to add support for them.)
|
||||
|
||||
The recommended server, under which Epona (the original code base used by
|
||||
Anope) was developed, is Bahamut. DreamForge 4.6.7 will also work fine, but
|
||||
it's a bit obsolete nowadays. Derivatives of Bahamut and DreamForge may
|
||||
also work, if they don't change the server<->server protocol too much;
|
||||
contact their authors for more information. Most people, though, are
|
||||
running Anope with UnrealIRCd, UltimateIRCd or Bahamut.
|
||||
|
||||
As always, you can check the log file (services.log by default) for error
|
||||
messages. You can also start services with the -nofork command line option
|
||||
to prevent it from running in the background, and it will output the
|
||||
messages written to the log file to the console as well.
|
||||
|
||||
2.4) Whenever I start Anope, I get a message on my IRC server saying
|
||||
"connection refused" or something similar, and Anope gives an error
|
||||
message from the server saying "Closing Link: ...".
|
||||
|
||||
See section 3 of the INSTALL file.
|
||||
|
||||
2.5) My IRC server is giving me messages like "Connection to
|
||||
services.whatever.net[127.0.0.1] activated" and then "Access denied -- no
|
||||
N line". Why?
|
||||
|
||||
This is typically caused by including a port number in the C:line for
|
||||
services, which tells your server to try to autoconnect to it (depending on
|
||||
the class (Y:line) settings). This is not what you want, because Anope
|
||||
will connect to the server itself, but does not listen for servers to
|
||||
connect to it. The solution is to remove the port number from the C:line.
|
||||
|
||||
2.6) When I say "/connect services.*", it doesn't work!
|
||||
|
||||
Of course not. RTFM (Read The Fine Manual), and see the previous answer.
|
||||
|
||||
2.7) Anope starts up okay, but if I try to register a nickname, it comes back
|
||||
with "Sorry, registration failed."
|
||||
|
||||
Make sure you've selected the correct IRC server type in the configure
|
||||
script; see question 2.4 for details.
|
||||
|
||||
2.8) Anope reports (via /stats u or /msg OperServ STATS) a different number of
|
||||
users online than I get from doing /lusers.
|
||||
|
||||
Anope doesn't count its own pseudo-clients (NickServ, ChanServ, etc.) in
|
||||
its user count, while the IRC server does.
|
||||
|
||||
|
||||
3) OperServ
|
||||
|
||||
3.1) Using the OperServ JUPE command results in server messages like "Server
|
||||
juped.server introduced by non-hub server services.my.net".
|
||||
|
||||
Services' uplink must have an H: line for Services in the ircd.conf file,
|
||||
which looks something like:
|
||||
|
||||
H:*::services.whatever.net
|
||||
|
||||
3.2) I can't use the ADMIN command to add Services admins, it tells me
|
||||
"Permission denied."
|
||||
|
||||
Did you define yourself as the Services root? You need to insert your
|
||||
nickname in the ServicesRoot directive in services.conf. Also, you must be
|
||||
a global IRC Operator and your nickname must be registered and properly
|
||||
indentified with NickServ.
|
||||
|
||||
3.3) When I add an AKILL, the users matching it don't get killed.
|
||||
|
||||
Use the AkillOnAdd configuration directive.
|
||||
|
||||
3.4) Trying to use OperServ gives me "Access denied", but my nick is in the
|
||||
ServicesRoot directive and is registered, and I've identified for my nick.
|
||||
|
||||
You need to be a global oper (i.e. user mode +o) to access OperServ. This
|
||||
can be configured via the OSOpersOnly directive in services.conf .
|
||||
|
||||
3.5) When I used the OperServ RAW command, Anope and/or my network crashed, or
|
||||
did weird things! Please fix this bug!
|
||||
|
||||
"That's not a bug, it's a feature."
|
||||
|
||||
Have you ever typed /msg OperServ HELP RAW? It's clearly stated there that
|
||||
this command is dangerous and that its use may result in very bad things.
|
||||
|
||||
And that's why this command has been disabled by default. If you enabled
|
||||
and used it, YOU'RE ON YOUR OWN. All help requests will be ignored, even if
|
||||
the problem happens not immediately.
|
||||
|
||||
3.6) I would like to have the list of the different RAW on OperServ.
|
||||
|
||||
If you have to ask, you should not be messing with RAW :)
|
||||
|
||||
3.7) I can't get /OS UMODES and /OS SVSNICK to work!
|
||||
|
||||
You need to be a SuperAdmin to be able to use these commands.
|
||||
|
||||
3.8) What is a Super-Admin? How does it work? Why might it not work?
|
||||
|
||||
Super-Admin's have extra privileges, including being founder on all
|
||||
channels. It must be activated on a per user basis and is only available to
|
||||
Services Roots. It is set using OperServ and is not persistent. It only
|
||||
works if SuperAdmin is not commented in the services configuration file.
|
||||
This is commented by default. Read /msg OperServ HELP SET SUPERADMIN for
|
||||
further help.
|
||||
|
||||
3.9) How can i enable the OperServ RAW command?
|
||||
|
||||
Enabling the OperServ RAW command is VERY dangerous and should never be
|
||||
done on a real network without thinking about it very well first. The RAW
|
||||
command can easily break your whole network if used incorrectly, and thus
|
||||
you will receive NO SUPPORT if you enable RAW on your network.
|
||||
|
||||
Before you enable RAW, be very sure you really want to enable it, and keep
|
||||
in mind that you will NOT BE ABLE to receive ANY SUPPORT anymore, because
|
||||
Anope's stability cannot be guaranteed if RAW is enabled.
|
||||
|
||||
The RAW command comes bundled as a core module for operserv. To load it,
|
||||
add the os_raw module to the list of OperServ core modules. But be sure to
|
||||
keep in mind that when you enable the RAW command, you CANNOT GET ANY
|
||||
SUPPORT for Anope anymore.
|
||||
|
||||
|
||||
4) Bugs / Crashes
|
||||
|
||||
4.1) Anope always dies after about five minutes, saying "FATAL ERROR! Can't
|
||||
back up nick.db".
|
||||
|
||||
Make sure that the user Anope runs as has write access to the data
|
||||
directory, and that the data directory actually exists (the latter
|
||||
shouldn't be a problem if you ran the Config script). This means Anope
|
||||
needs write and execute permission on the data directory itself and execute
|
||||
permission on every parent directory of the data directory.
|
||||
|
||||
4.2) Anope crashed with a segmentation fault.
|
||||
|
||||
See if you can reproduce this by doing a certain sequence of things. If
|
||||
so, please report it to us (see part 6 of README file). If not, you're
|
||||
probably out of luck; if you like, you can report it to us anyway, but
|
||||
chances are it won't get fixed if we don't have instructions on reproducing
|
||||
it. If you do have such a problem, you may find the crontab utility useful
|
||||
for dealing with it.
|
||||
|
||||
Also, see the DumpCore directive in the configuration file. It allows Anope
|
||||
to dump its core whenever it's segfaulting, usually calling it core and
|
||||
placing it into Anope's main directory. Open up gdb by issuing the
|
||||
following command at your shell:
|
||||
|
||||
* gdb services core
|
||||
|
||||
(of course replacing 'core' with the name of the core if different) and
|
||||
type 'bt' at the gdb prompt. After that, send us the output you got and
|
||||
keep the core file in a safe place, in case we need it to dig deeper into
|
||||
the problem.
|
||||
|
||||
4.3) I've found a bug that's not mentioned here or in the README or BUGS files.
|
||||
What should I do?
|
||||
|
||||
See section 6 of the README file.
|
||||
|
||||
4.4) My FreeBSD box complains about 'Shared object "nss_dns.so.1" not found'
|
||||
|
||||
We haven't figured out the exact cause yet, but as a quickfix you can
|
||||
delete the /etc/nsswitch.conf file. Please keep in mind that removing a
|
||||
configuration file can be dangerous, so only do this if you know what you
|
||||
are doing.
|
||||
|
||||
4.5) Anope and long (more then 30 character) nicknames.
|
||||
|
||||
By default anope only supports nicknames up to 30 characters (NICKLEN=30).
|
||||
If your IRCd allows for longer nicknames or has been modified to do so
|
||||
anope will start logging a lot of ("NICK from nonexistent nick") messages.
|
||||
This is because once a user uses a nick that is too long for anope to handle,
|
||||
anope loses track of the user for the remainder of the session.
|
||||
It is POSSIBLE but not NOT RECOMMENDED to extend the maximum length of nicknames
|
||||
anope can track, however this will also break database compatibility. DBs saved
|
||||
with anope set to allow for example 40 chars cannot be read by a default anope
|
||||
and vice versa. So changing the maximum nick length is only possible
|
||||
when starting with fresh databases and even then the consequences of this are
|
||||
UNTESTED.
|
||||
In order to change the maximum internal nick length, change the NICKMAX setting
|
||||
in include/config.h, recompile anope and start without databases.
|
||||
|
||||
|
||||
5) ChanServ
|
||||
|
||||
5.1) Anope's channel mode setting doesn't work. I can't set modes with
|
||||
OperServ, and every time ChanServ tries to set a mode, my server reverses
|
||||
the change.
|
||||
|
||||
Make sure EVERY server on your network has a U: line for Services in
|
||||
ircd.conf, for example:
|
||||
|
||||
U:services.whatever.net:*:*
|
||||
|
||||
5.2) Anope ignored the SET SUCCESSOR setting and deleted a channel when the
|
||||
founder expired.
|
||||
|
||||
Normally, this is because the successor had too many channels registered;
|
||||
in this case, you will see an entry in the log file like the following:
|
||||
|
||||
[date] Successor (SuccessorNick) of channel #somechannel owns too many
|
||||
channels, deleting channel #somechannel
|
||||
|
||||
If you don't get a message like this or you can verify that the successor
|
||||
wasn't running into the channel limit, please report it using the
|
||||
bug-reporting procedure below (see section 6 of the README file).
|
||||
|
||||
5.3) How to auto voice all those whom join my #channel?
|
||||
|
||||
Execute the following commands (/cs is an alias for /msg ChanServ):
|
||||
|
||||
/cs set #channel secure off
|
||||
/cs set #channel xop off
|
||||
/cs levels #channel set AUTOVOICE -1
|
||||
|
||||
5.4) Channel options like RESTRICTED or SECUREOPS don't work. What's wrong?
|
||||
|
||||
Make sure that you didn't put any of your normal IRCd's as a ULined server
|
||||
in Anope. Some access checks for clients from ULined servers are skipped to
|
||||
avoid fights between the ULined servers. This is usually only useful when
|
||||
you have a statistics server connected to your network.
|
||||
|
||||
|
||||
6) BotServ
|
||||
|
||||
6.1) How do I add bots to BotServ?
|
||||
|
||||
Read /msg BotServ HELP and /msg BotServ HELP BOT. Note that you need to be
|
||||
opered up and identified as a Services Administrator before you can use the
|
||||
BOT command.
|
||||
|
||||
6.2) Why do kick triggers and fantasy commands fail to work with my Bahamut
|
||||
IRCd?
|
||||
|
||||
Bahamut allows you to setup a server as 'serviceshub'. This will filter
|
||||
certain data services usually don't need to process. This option also
|
||||
filters channel messages, because DALnet's services have no use for them.
|
||||
Anope parses the channel messages for kick triggers and fantasy commands.
|
||||
To make sure these work the server type of the hub they're linked to should
|
||||
be simply 'hub' and not 'serviceshub'.
|
||||
|
||||
|
||||
7) Language
|
||||
|
||||
7.1) Anope complains in the logfile about being unable to load the default
|
||||
language.
|
||||
|
||||
You forgot to run "make install".
|
||||
|
||||
7.2) Anope spricht kein Deutsch!, etc. (Anope doesn't speak my language!)
|
||||
|
||||
See section 5 of the README file.
|
||||
|
||||
7.3) I selected a language other than English, but sometimes Anope sends
|
||||
responses in English instead.
|
||||
|
||||
Some language files are not complete--in other words, they don't have a
|
||||
translation of every message Anope uses, but only some of them. In this
|
||||
case, the missing messages will be displayed in English. You can either
|
||||
wait for the primary translator to provide us with a translation, or do the
|
||||
translation yourself and send us the messages translated into your
|
||||
language.
|
||||
|
||||
|
||||
8) DevNull
|
||||
|
||||
8.1) What is the purpose of DevNull?
|
||||
|
||||
DevNull functions as a message sink. Any message sent to it will be
|
||||
ignored. It will not be logged, there will be no response. It will be lost
|
||||
forever. Whether it's useful or not is up to you; we just provide you with
|
||||
the option.
|
||||
|
||||
+99
-46
@@ -6,7 +6,7 @@ Anope Installation Instructions
|
||||
3) Setting up the IRCd
|
||||
4) Starting Anope
|
||||
5) Setting up a crontab
|
||||
|
||||
|
||||
Note: You should also read the README and FAQ files!
|
||||
|
||||
1) Installing Anope
|
||||
@@ -19,88 +19,139 @@ Note: You should also read the README and FAQ files!
|
||||
The very first thing you need to do is to get the Anope package (if not
|
||||
already done). You can find it at:
|
||||
|
||||
https://www.anope.org/
|
||||
|
||||
Anope requires cmake to build. You can check if CMake is already
|
||||
installed on your system using the command:
|
||||
|
||||
cmake --version
|
||||
|
||||
If it's installed, you will get a line that says something similar to
|
||||
"cmake version 3.28.3". If the version is less than 3.20.0 or you get
|
||||
an error saying the command was not found, you will not be able to use
|
||||
CMake unless you install it yourself into your home directory. CMake
|
||||
can be downloaded from:
|
||||
|
||||
https://cmake.org/download/
|
||||
http://www.anope.org/
|
||||
|
||||
Next, unpack the package in your home directory, and go into the created
|
||||
directory.
|
||||
|
||||
If there are any extra modules you want to enable, such as mysql, run
|
||||
the 'extras' script to enable them. If you do not know you can come back
|
||||
later and enable them.
|
||||
|
||||
Now type ./Config to start the configuration script. It will ask you a
|
||||
few questions, and figure out how to compile Anope on your system. If
|
||||
you are unsure about the answer to a question, use the default value.
|
||||
you are unsure about the answer to a question, use the default value.
|
||||
|
||||
Now cd build and type make and make install. This will install
|
||||
NOTE: although you may specify different binary and data paths, it is
|
||||
RECOMMENDED that you use the same value for both.
|
||||
|
||||
You can now type make to compile Anope. If there are errors in the
|
||||
Makefile, *try to use gmake* instead. If it still doesn't work, you (or
|
||||
the system administrator if it's a shell) must install GNU make. You may
|
||||
find it at ftp://prep.ai.mit.edu/pub/gnu/.
|
||||
|
||||
Now type make install (or gmake install; see above). This will install
|
||||
all the needed files in the paths you specified with the configure
|
||||
script, and setup file permissions. You should ensure that the data
|
||||
directory is not accessible by other users, as malicious users may
|
||||
cause trouble on your network if passwords are not encrypted, or read
|
||||
the memos of any user.
|
||||
|
||||
Now go into the conf directory (by default, ~/anope/conf). Copy the example
|
||||
configuration file (anope.example.conf) to anope.conf, and open the latter
|
||||
If you see errors during this process, please mail us with the *complete*
|
||||
error output, and don't forget to mention your OS, compiler and C library
|
||||
versions.
|
||||
|
||||
Now go into the data directory (by default, ~/services). Copy the example
|
||||
configuration file (example.conf) to services.conf, and open the latter
|
||||
with your favorite text editor. It contains all the configuration
|
||||
directives Anope will use at startup. Read the instructions contained in
|
||||
the file carefully. Using the default values is NOT a good idea, and will
|
||||
most likely not work!
|
||||
|
||||
If you need help, you should visit https://forum.anope.org/ or #anope on
|
||||
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.
|
||||
If you need help, you should subscribe to the Anope mailing list and mail
|
||||
there to get help from other users. See the README file for more
|
||||
information.
|
||||
|
||||
2) Upgrading Anope
|
||||
|
||||
If you got a .diff file and want to patch the old Anope sources with it,
|
||||
do the following:
|
||||
|
||||
* Copy the .diff file into the root Anope sources directory.
|
||||
* Type patch -p1 <file.diff
|
||||
|
||||
Note that upgrading anope with a patchfile isn't recommended. You should
|
||||
download a new, clean source package, as this will give the best results.
|
||||
|
||||
To upgrade Anope, just follow the installation instructions described in
|
||||
section 1. There are however a few specific guidelines:
|
||||
|
||||
* IMPORTANT: Back up your old databases!
|
||||
* If you are upgrading to a new major release, ALWAYS restart a
|
||||
fresh configuration file from anope.example.conf.
|
||||
fresh configuration file from example.conf.
|
||||
|
||||
3) Setting up the IRCd
|
||||
|
||||
Anope acts as an IRC server with pseudo-clients on it. To link them to
|
||||
your network, you'll need to configure your IRCd to allow services to link.
|
||||
Services acts as an IRC server with pseudo-clients on it. To link them to
|
||||
your network, you'll need to add some lines in the ircd.conf of their hub
|
||||
server (as stated in the RemoteServer configuration directive).
|
||||
|
||||
The configuration varies depending on the IRCd, but you will probably need
|
||||
a link block (also called connect block, or C line), a U line (also called
|
||||
a shared block), and be sure that the IRCd is listening on the given port
|
||||
in the link block.
|
||||
For samples below we'll take services.localhost.net as the name of the
|
||||
Services (as stated in the ServerName configuration directive). Note that
|
||||
this samples are made to be as generic as possible, but there might be
|
||||
small variations, depending on your IRCd. For IRCd-specific help with
|
||||
configuration, read near the end of this section.
|
||||
|
||||
Example link configurations can be found in anope.example.conf for some of the
|
||||
popular IRCds.
|
||||
First, the C/N lines, that allow Services to link. They also need a
|
||||
Y:line to work correctly.
|
||||
|
||||
Y:27:180:0:0:4000000
|
||||
C:127.0.0.1:mypass:services.localhost.net::30
|
||||
N:127.0.0.1:mypass:services.localhost.net::30
|
||||
|
||||
"mypass" is the same password you mentioned in the RemoteServer
|
||||
configuration directive. 127.0.0.1 is the IP from which Services connect
|
||||
from (linking in localhost is the most efficient way to run Services).
|
||||
|
||||
Then, you have to set-up an U:line, that will allow Services to change
|
||||
channel modes, topics, and much more without being opped in the channel.
|
||||
|
||||
U:services.localhost.net:*:*
|
||||
|
||||
NOTE: if you have more than one server in your network, this line MUST
|
||||
be added on ALL servers, or things won't work correctly.
|
||||
|
||||
Finally, you'll need to add an H:line, to make the OperServ JUPE command
|
||||
work correctly.
|
||||
|
||||
H:*::Services.LocalHost.Net
|
||||
|
||||
Don't forget to /rehash your IRCd to apply changes.
|
||||
|
||||
A new trend in ircd configuration is popping all over the place, good
|
||||
examples are the latest Hybrid, Unreal and Bahamut, which use a more
|
||||
"readable" form of configuration. For those, use something like:
|
||||
|
||||
link services.localhost.net
|
||||
{
|
||||
username *;
|
||||
hostname localhost;
|
||||
bind-ip *;
|
||||
port 6667;
|
||||
hub *;
|
||||
password-connect "mypass";
|
||||
password-receive "mypass";
|
||||
class servers;
|
||||
};
|
||||
|
||||
Note that this block-style configuration files differ heavily, depending
|
||||
on the IRCd. Consult the interactive link maker (link is below) for more
|
||||
details on the exact configuration used by your IRCd.
|
||||
|
||||
If you're unable to get a link with your IRCd after reading this section,
|
||||
you might try the interactive link maker, which is located at:
|
||||
|
||||
http://anope.org/ilm.php
|
||||
|
||||
4) Starting Anope
|
||||
|
||||
Go into the directory where binaries were installed (by default, this is
|
||||
~/anope/bin). Type ./anope to launch Anope.
|
||||
~/services). Type ./services to launch Anope.
|
||||
|
||||
If there are syntax errors in the configuration file they will be
|
||||
displayed on the screen. Correct them until there are no errors anymore.
|
||||
A successful startup won't generate any message.
|
||||
A successful startup won't generate any message.
|
||||
|
||||
Give Anope at least one minute to link to your network, as certain
|
||||
Give Services at least one minute to link to your network, as certain
|
||||
IRCds on some OSes may be really slow for the link process. If nothing
|
||||
happens after about a minute, it is probably a configuration problem. Try
|
||||
to launch Anope with ./anope -debug -nofork to see any errors that it
|
||||
to launch Anope with ./services -debug -nofork to see any errors that it
|
||||
encounters, and try to correct them.
|
||||
|
||||
If you need help to solve errors, feel free to subscribe to the Anope
|
||||
@@ -109,19 +160,21 @@ Note: You should also read the README and FAQ files!
|
||||
5) Setting up a crontab
|
||||
|
||||
A crontab entry will allow you to check periodically whether Anope is
|
||||
still running, and restart it if not.
|
||||
still running, and restart it if not. You'll need to have Anope binaries
|
||||
and data installed in the same directory for this to work without
|
||||
modification.
|
||||
|
||||
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 cron.sh, and try to launch the
|
||||
First rename the example.chk script that is in Anope path (by default,
|
||||
this is ~/services) to services.chk 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 services.chk, 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/cron.sh >/dev/null 2>&1
|
||||
*/5 * * * * /home/ircd/services/services.chk >/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
|
||||
|
||||
-144
@@ -1,144 +0,0 @@
|
||||
Instructions d'installation d'Anope
|
||||
-----------------------------------
|
||||
|
||||
1) Installation d'Anope
|
||||
2) Mettre à jour Anope
|
||||
3) Configuration de l'IRCd
|
||||
4) Mettre en route Anope
|
||||
5) Mettre en place un crontab
|
||||
|
||||
Note : Vous devrez également lire les fichiers README et FAQ !
|
||||
|
||||
1) Installation d'Anope
|
||||
|
||||
NOTE IMPORTANTE : il est déconseillé d'utiliser (et même d'installer)
|
||||
Anope en tant que root. Utilisez un utilisateur non
|
||||
privilégié. Celui que vous utilisez pour l'IRCd ou
|
||||
un utilisateur dédié suffira.
|
||||
|
||||
La première chose que vous devez faire est d'obtenir le package Anope
|
||||
(si ce n'est déjà fait). Vous pouvez le trouver ici :
|
||||
|
||||
https://www.anope.org/
|
||||
|
||||
Anope nécessite cmake pour être compilé. Vous pouvez vérifier si CMake
|
||||
est déjà installé sur votre système avec la commande :
|
||||
|
||||
cmake --version
|
||||
|
||||
Si CMake est installé, vous aurez une ligne qui dit quelque chose comme
|
||||
"cmake version 3.28.3". Si la version est inférieure à 3.20.0 ou si vous
|
||||
obtenez une erreur disant que la commande n'a pas été trouvée, vous ne
|
||||
pourrez pas utiliser CMake à moins de l'installer vous-même dans votre
|
||||
répertoire home. CMake peut être téléchargé ici :
|
||||
|
||||
https://cmake.org/download/
|
||||
|
||||
Ensuite, décompressez le package dans votre répertoire home, et allez
|
||||
dans le répértoire qui vient d'être créé.
|
||||
|
||||
Si il y a des modules facultatifs que vous voulez activer comme mysql,
|
||||
exécuter le script 'extras' pour les activer. Si vous ne savez pas, vous
|
||||
pouvez les activer plus tard.
|
||||
|
||||
Maintenant, tapez ./Config pour lancer le script de configuration. Il
|
||||
va vous poser quelques questions, et déterminer comment compiler Anope
|
||||
sur votre système. Si vous ne savez pas comment répondre à une question,
|
||||
utilisez la valeur par défaut.
|
||||
|
||||
Allez dans le dossier build (cd build) et tapez make et make install.
|
||||
Ceci va installer tous les fichiers nécessaires dans les dossiers que
|
||||
vous avez indiqués avec le script Config et régler les permissions des
|
||||
fichiers. Vous devez vous assurer que le répertoire data n'est pas
|
||||
accessible par les autres utilisateurs, car des utilisateurs
|
||||
malveillants pourraient causer des problèmes sur votre réseau, si les
|
||||
mots de passe ne sont pas chiffrés, ou lire les mémos de tous les
|
||||
utilisateurs.
|
||||
|
||||
Allez maintenant dans le répertoire conf (par défaut, ~/anope/conf).
|
||||
Copiez l'exemple de fichier de configuration (anope.example.conf) en
|
||||
anope.conf et ouvrez ce dernier avec votre éditeur de texte favori.
|
||||
Il contient toutes les directives de configuration qu'Anope va utiliser
|
||||
en démarrant. Lisez attentivement les instructions contenues dans le
|
||||
fichier. L'utilisation des valeurs par défaut n'est pas toujours
|
||||
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.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
|
||||
pour plus d'informations.
|
||||
|
||||
2) Mettre à jour Anope
|
||||
|
||||
Pour mettre à jour Anope, suivez simplement les instructions
|
||||
d'installation décrites dans la section 1. Prenez garde cependant :
|
||||
|
||||
* IMPORTANT : Sauvegardez vos anciennes bases de données !
|
||||
* Si vous mettez à jour vers une nouvelle version majeure,
|
||||
recommencez *toujours* toute votre configuration à partir du
|
||||
fichier anope.example.conf.
|
||||
|
||||
3) Configuration de l'IRCd
|
||||
|
||||
Anope agit comme un serveur IRC avec des pseudo-clients.
|
||||
Pour les relier à votre réseau, vous aurez besoin de configurer votre
|
||||
IRCd pour permettre aux services de se connecter.
|
||||
|
||||
La configuration dépend de l'IRCd utilisé, mais vous aurez probablement
|
||||
besoin d'un bloc link (aussi appelé connect block, ou C:line) et un
|
||||
U:line (aussi appelé shared block). Assurez-vous que l'IRCd écoute
|
||||
sur le port donné dans le bloc link.
|
||||
|
||||
Des exemples de configurations de bloc link peuvent être trouvés dans
|
||||
le fichier anope.example.conf pour certains des IRCd les plus populaires.
|
||||
|
||||
Souvenez-vous de /rehash votre IRCd pour appliquer les changements.
|
||||
|
||||
4) Mettre en route Anope
|
||||
|
||||
Allez dans le répertoire où les fichiers binaires ont été installés
|
||||
(par défaut, ~/anope/bin). Tapez ./anope pour lancer Anope.
|
||||
|
||||
S'il y a des erreurs de syntaxe dans le fichier de configuration, elles
|
||||
seront affichées à l'écran. Corrigez-les jusqu'à ce qu'il n'y en ait
|
||||
plus. Un démarrage réussi ne générera pas de message.
|
||||
|
||||
Donnez aux services au moins une minute pour se connecter à votre
|
||||
réseau, car certains IRCds sur certains systèmes peuvent être très
|
||||
lents pour le processus de liaison. Si rien ne se passe après environ
|
||||
une minute, il y a probablement un problème de configuration. Essayez
|
||||
de lancer Anope en mode debug avec ./anope -debug -nofork pour voir
|
||||
toutes les erreurs rencontrées et essayez de les corriger.
|
||||
|
||||
Si vous avez besoin d'aide pour résoudre des erreurs, n'hésitez pas à
|
||||
vous abonner à la liste de diffusion Anope et d'y poser vos question.
|
||||
Voir le fichier README pour plus de détails.
|
||||
|
||||
5) Mettre en place un crontab
|
||||
|
||||
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 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 cron.sh et essayez de lancer le script pour voir
|
||||
si cela fonctionne (Anope ne doit pas être en marche lorsque vous
|
||||
testez cela ;))
|
||||
|
||||
Lorsque c'est fait, vous devrez ajouter l'entrée crontab. Entrez
|
||||
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/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).
|
||||
Consultez les pages de manuel de votre système pour plus de détails sur
|
||||
la syntaxe du fichier crontab. Les pages de manuel intéressantes sont
|
||||
crontab(5), crontab(1) et cron(8).
|
||||
|
||||
Sauvegardez, quittez, et c'est installé !
|
||||
@@ -0,0 +1,606 @@
|
||||
How To Add IRCd Support
|
||||
-----------------------
|
||||
|
||||
1) Files to Edit
|
||||
2) Modifing the Header File
|
||||
3) The Code
|
||||
4) Modes
|
||||
5) Functions / Events
|
||||
6) CAPAB/PROTOCTL
|
||||
|
||||
1) Files to Edit
|
||||
|
||||
When preparing to add support to Anope for your ircd, you need to edit
|
||||
the following files.
|
||||
|
||||
A) Make a copy of the .c and .h file of the IRCd that matches the ircd
|
||||
that you are attempting to add support for best.
|
||||
B) Make a backup copy of include/services.h, include/sysconf.h.in
|
||||
C) Make a backup copy of Config and configure.in
|
||||
|
||||
First step in this process is to rename the .c and .h file after the IRCd
|
||||
that you are going to be adding support for. Its recommended that you come
|
||||
up with a name that is clear and easy to understand.
|
||||
|
||||
Now that you have the files that you will need to create your own ircd
|
||||
support, starting with Config. This file is a shell script file; scroll
|
||||
down until you find the list of ircs for the user to select. Indicate
|
||||
the based ircd version which is supported such as a series 1.x or 2.2.x,
|
||||
placing in the comment side an exact version that the support is for or
|
||||
"experimental" if you are not the ircd developer. The next step is to
|
||||
decide how the IRCd will be defined, following the existing examples edit
|
||||
'IRCTYPE_DEF="IRC_RATBOX"' to be the descriptive define for your ircd.
|
||||
|
||||
With the Config file ready to go, edit configure.in and find in there the
|
||||
reference to --with-ircd. You should see the various other ircds, and
|
||||
you will want to add yours in there using the same IRC_ name you came up
|
||||
with above. Important in this step is to make sure that you set the
|
||||
IRCDFILE to the name of the .c file you set in step 1. Once you have the
|
||||
configure.in created you can remove the old configure and at the command
|
||||
prompt type "autconf"; this will generate the new configure file.
|
||||
|
||||
Getting close to actually modify code. Open sysconf.h.in and add two
|
||||
lines for your given ircd, which is similar to this:
|
||||
|
||||
/* "First IRCD type" */
|
||||
#undef IRC_RATBOX
|
||||
|
||||
Open services.h and add a line with the rest of the ircd include files to
|
||||
match the name of the .h file you set in step 1.
|
||||
|
||||
#include "ratbox.h"
|
||||
|
||||
Taking the .c and .h file open them and replace the #ifdef IRC_* with the
|
||||
IRC_ name you set in step two. Ensure that the code comments at the top
|
||||
of the file match the ircd that the code will be for.
|
||||
|
||||
You are now ready to start getting into the code.
|
||||
|
||||
2) Modifying the Header File
|
||||
|
||||
Now that you have gotten past the first part of the creation process, you
|
||||
are into the code. This part is the harder and more complex part. You
|
||||
will need a general understanding of C code to continue. Here are the
|
||||
step by step instructions required to make this work.
|
||||
|
||||
Open the .h file and find the section of code with
|
||||
|
||||
#define PROTECT_SET_MODE "+"
|
||||
#define PROTECT_UNSET_MODE "-"
|
||||
#define CS_CMD_PROTECT "PROTECT"
|
||||
#define CS_CMD_DEPROTECT "DEPROTECT"
|
||||
#define FANT_PROTECT_ADD "!protect"
|
||||
#define FANT_PROTECT_DEL "!deprotect"
|
||||
#define LEVEL_PROTECT_WORD "AUTOPROTECT"
|
||||
#define LEVELINFO_PROTECT_WORD "PROTECT"
|
||||
#define LEVELINFO_PROTECTME_WORD "PROTECTME"
|
||||
|
||||
If the ircd supports a protective/admin (not owner) mode, set the
|
||||
PROTECT_SET_MODE and PROTECT_UNSET_MODE to be that mode. On most ircds
|
||||
it's usermode "a" so you will be setting it to "+a" and "-a". The next
|
||||
two are based more on what this mode is called. When you message ChanServ
|
||||
to get this mode, this is the command you will be using. After this are
|
||||
the fantasy commands which can be used in channel to get these modes. The
|
||||
next three relate to the ACCESS LEVEL list system. Again these are the
|
||||
words to gain these levels in the ACCESS LEVEL system. If your ircd does
|
||||
not have these functions, leave them at what ever value is currently set;
|
||||
the core code will ignore the request of the user.
|
||||
|
||||
Now that this is set, you can define the MODES. All user modes are stored
|
||||
with UMODE_ followed by a letter matching the modes case; be careful to
|
||||
use the correct case as this will make it clear when you setup MODES in
|
||||
the .c in a few. Use hex values for the modes so starting at 0x00000001
|
||||
to 0x8000000. In most cases you want to list all modes. If you run out of
|
||||
values look at removing any modes that do not impact services.
|
||||
|
||||
Channel modes are done much like user modes, with the exception that
|
||||
bans, exceptions, invites, and modes that are applied to a user such as
|
||||
op and voice are not defined here. All other modes are defined in here.
|
||||
Again be clear and use the correct case and use hex values as done with
|
||||
user modes.
|
||||
|
||||
Finally we come to DEFAULT_MLOCK; this is the mode that services will set
|
||||
by default on channels when they are registered. In general you want this
|
||||
to be what is acceptable by the ircd; in most cases this is "+nt"
|
||||
|
||||
3) The Code
|
||||
|
||||
Here is where the code of the .c file comes in. Be prepared to spend at
|
||||
least an hour, if not longer, going over the code and getting it right;
|
||||
Especially if you are setting up an ircd that is completely different
|
||||
than the one you used as a base. This section covers the majority of the
|
||||
code that is in use.
|
||||
|
||||
The first bit of code you will face is:
|
||||
|
||||
const char version_protocol[] = "Ratbox IRCD";
|
||||
|
||||
This the protocol name which will appear in various places; especially
|
||||
when you do -version at the command prompt, this is where you state the
|
||||
server name. The version is not always needed unless you are showing that
|
||||
the support is for one branch of a ircd family, such as Unreal 3.1 and
|
||||
Unreal 3.2.
|
||||
|
||||
Once you have decided on this little piece of code, you will come to
|
||||
flood mode characters being used for setting and removing. If your IRCd
|
||||
does not support flood modes, you can just use ""; we will be setting if
|
||||
your IRCD supports flooding or not in a little bit.
|
||||
|
||||
const char flood_mode_char_set[] = "+f";
|
||||
const char flood_mode_char_remove[] = "-f";
|
||||
|
||||
The next task that you will face is setting whether the IRCD sends time
|
||||
stamps on modes but does not tell us that it will do so. If it does, set
|
||||
UseTSMODE to 1; if it does not set it to be 0. If you're not sure refer
|
||||
to your IRCd's documentation on how MODE is sent.
|
||||
|
||||
int UseTSMODE = 0;
|
||||
|
||||
Now you've come to the part where you setup your ircd. There are two
|
||||
structs which hold this information; This allows you to quickly setup
|
||||
your specific ircd.
|
||||
|
||||
IRCDVar ircd[] = { }
|
||||
|
||||
This struct contains your basic IRCd functions. Your base source file has
|
||||
the list of all available variables; note that you should not swap any
|
||||
around, or you will break stuff. Here is a brief description of the usage
|
||||
of each.
|
||||
|
||||
1) Name: This member tells Anope about the IRCD's name. It may contain
|
||||
text about it's name and version. This is used to identify the
|
||||
build on startup.
|
||||
|
||||
2) NickServ Mode: This is the user mode set by Anope on NickServ.
|
||||
Normally you want this to be some form of oper flag,
|
||||
or a services flag.
|
||||
|
||||
3) ChanServ Mode: This is the user mode set by Anope on ChanServ.
|
||||
Normally you want this to be some form of oper flag,
|
||||
or a services flag.
|
||||
|
||||
4) MemoServ Mode: This is the user mode set by Anope on MemoServ.
|
||||
Normally you want this to be some form of oper flag,
|
||||
or a services flag.
|
||||
|
||||
5) HostServ Mode: This is the user mode set by Anope on HostServ.
|
||||
Normally you want this to be some form of oper flag,
|
||||
or a services flag. Note that if your ircd does not
|
||||
support HostServ, you can safely make this NULL or +,
|
||||
as there is a check before bringing HostServ online.
|
||||
|
||||
6) OperServ Mode: This is the user mode set by Anope on OperServ.
|
||||
Normally you want this to be some form of oper flag,
|
||||
or a services flag.
|
||||
|
||||
7) BotServ Mode: This is the user mode set by Anope on BotServ.
|
||||
Normally you want this to be some form of oper flag,
|
||||
or a services flag.
|
||||
|
||||
8) HelpServ Mode: This is the user mode set by Anope on HelpServ.
|
||||
Normally you want this to be some form of oper flag,
|
||||
or a services flag.
|
||||
|
||||
9) DevNull Mode: This is the user mode set by Anope on DevNull.
|
||||
Normally you want this to be some form of oper flag,
|
||||
or a services flag.
|
||||
|
||||
10) Global Mode: This is the user mode set by Anope on Global.
|
||||
Normally you want this to be some form of oper flag,
|
||||
or a services flag.
|
||||
|
||||
11) NickServ Alias Mode: This is the user mode set by Anope on the alias
|
||||
of NickServ. Normally you want this to be some
|
||||
form of oper flag, or a services flag.
|
||||
|
||||
12) ChanServ Alias Mode: This is the user mode set by Anope on the alias
|
||||
of ChanServ. Normally you want this to be some
|
||||
form of oper flag, or a services flag.
|
||||
|
||||
13) MemoServ Alias Mode: This is the user mode set by Anope on the alias
|
||||
of MemoServ. Normally you want this to be some
|
||||
form of oper flag, or a services flag.
|
||||
|
||||
14) HostServ Alias Mode: This is the user mode set by Anope on the alias
|
||||
of MemoServ. Normally you want this to be some
|
||||
form of oper flag, or a services flag. Note that
|
||||
if your ircd does not support HostServ, you can
|
||||
safely make this NULL or +, as there is a check
|
||||
before bringing HostServ online.
|
||||
|
||||
15) OperServ Alias Mode: This is the user mode set by Anope on the alias
|
||||
of OperServ. Normally you want this to be some
|
||||
form of oper flag, or a services flag.
|
||||
|
||||
16) BotServ Alias Mode: This is the user mode set by Anope on the alias
|
||||
of BotServ. Normally you want this to be some
|
||||
form of oper flag, or a services flag.
|
||||
|
||||
17) HelpServ Alias Mode: This is the user mode set by Anope on the alias
|
||||
of HelpServ. Normally you want this to be some
|
||||
form of oper flag, or a services flag.
|
||||
|
||||
18) DevNull Alias Mode: This is the user mode set by Anope on the alias
|
||||
of DevNull. Normally you want this to be some
|
||||
form of oper flag, or a services flag.
|
||||
|
||||
19) Global Alias Mode: This is the user mode set by Anope on the alias
|
||||
of Global. Normally you want this to be some form
|
||||
of oper flag, or a services flag.
|
||||
|
||||
20) BotServ Bots Mode: This is the user mode set by Anope on all BotServ
|
||||
bots. Normally you want this to be a some form of
|
||||
service or bot flag; you can use + for no mode at
|
||||
all.
|
||||
|
||||
21) Max Channelmode Symbols: This is the total number of possible channel
|
||||
modes that can appear before a nick. Do
|
||||
remember to count each possible mode, so +ov
|
||||
is 2.
|
||||
|
||||
22) Modes to Remove: This is every mode that Anope should remove when
|
||||
stripping channel modes.
|
||||
|
||||
23) Channelmode for bots: When a BotServ bot joins a channel, this is the
|
||||
mode set on them. Normally you will want them
|
||||
opped (+o), and protected (+a) on IRCd's that
|
||||
support it.
|
||||
|
||||
24) SVSNICK: Can the ircd use SVSNICK to change some ones nick? Otherwise,
|
||||
KILL is used. Use 1 for yes, 0 for no.
|
||||
|
||||
25) VHOST: Can a user's host be changed on the fly? Enabling this allow
|
||||
HostServ online. Use 1 for yes, 0 for no.
|
||||
|
||||
26) OWNER: Has a channel umode for being the channel owner. For example,
|
||||
UnrealIRCd has mode +q. Use 1 for yes, 0 for no.
|
||||
|
||||
27) OWNER MODE SET: What mode to set to make someone the owner. If the
|
||||
IRCd doesn't support owners, set this to NULL.
|
||||
|
||||
28) OWNER MODE UNSET: What mode to unset to take away someone's channel
|
||||
owner status. If the IRCd doesn't support owners,
|
||||
set this to NULL.
|
||||
|
||||
29) ADMIN MODE SET: What mode to set to make someone a channel admin.
|
||||
If the IRCd dosn't support admins, set to NULL.
|
||||
|
||||
30) ADMIN MODE UNSET: What mode to unset to take away channel admin.
|
||||
If the IRCd dosn't support admins, set to NULL.
|
||||
|
||||
31) Mode on Nick Register: What mode to give users when they register
|
||||
with NickServ. If your ircd doesn't set expect
|
||||
a mode to be set on registration, you should
|
||||
set this to NULL.
|
||||
|
||||
32) Mode on Nick Unregister: What mode to set give users when they cancel
|
||||
their registration with NickServ. If your
|
||||
IRCd doesn't set a mode for registered users
|
||||
you should set this to NULL.
|
||||
|
||||
33) Mode on Nick Change: What mode to give users when they change their
|
||||
nick. If your ircd doesn't set a mode, you
|
||||
should set this to NULL.
|
||||
|
||||
34) SGLINE: Does the IRCd support realname (geocs) bans? Use 1 for yes,
|
||||
0 for no.
|
||||
|
||||
35) SQLINE: Does the IRCd support nick bans? Use 1 for yes, 0 for no.
|
||||
|
||||
36) SZLINE: Does the IRCd support SZLINES? Use 1 for yes, 0 for no.
|
||||
|
||||
37) HALFOP: Is channel mode +h for halfop supported by the IRCd? Use 1 for
|
||||
yes, 0 for no.
|
||||
|
||||
38) Number of Server Args: When an IRCd connects, this is the number of
|
||||
parameters that are passed.
|
||||
|
||||
39) Join to Set: Services must join a channel to set any modes on that
|
||||
channel. Use 1 for yes, 0 for no.
|
||||
|
||||
40) Join to Message: Services must join a channel to send any message to
|
||||
that channel (cannot override +n). Use 1 for yes,
|
||||
0 for no.
|
||||
|
||||
41) Exceptions: Support for channel exceptions (mode +e). Use 1 for yes,
|
||||
0 for no.
|
||||
|
||||
42) TS Topic Forward: Some IRCd's (like UnrealIRCd) like their topic TS
|
||||
set forward by +1. Use 1 for yes, 0 for no.
|
||||
|
||||
43) TS Topic Backward: Some IRCd's (mainly older DreamForge-like ones)
|
||||
like their topic TS set back by -1. Use 1 for yes,
|
||||
0 for no.
|
||||
|
||||
44) Protected Umode: UMODE_ define that defines the protected usermod.
|
||||
Use 0 for no support, or enter the UMODE_ define.
|
||||
|
||||
45) Admin: Support for channel admins (Mainly used by UltimateIRCd). Use
|
||||
1 for yes, 0 for no.
|
||||
|
||||
46) SQline Channels: The IRCd's supports banning channel names via
|
||||
SQLINES. Use 1 for yes, 0 for no.
|
||||
|
||||
47) Quit On Kill: When we (SVS)KILL a user, does the IRCd send back a
|
||||
QUIT message for that user? Use 1 for yes, 0 for no.
|
||||
|
||||
48) SVSMODE -b: We can use SVSMODE to unban hosts from a channel. Use
|
||||
1 for yes, 0 for no.
|
||||
|
||||
49) Protect: Support for channel protect (mode +a, mainly being used by
|
||||
UnrealIRCd and ViagraIRCd). Use 1 for yes, 0 for no.
|
||||
|
||||
50) Reverse: We can do a reverse check when unbanning. For use with
|
||||
DreamForge based IRCd's. Use 1 for yes, 0 for no.
|
||||
|
||||
51) Register Channels: Supports sending a channelmode for registered
|
||||
channels. Use 1 for yes, 0 for no.
|
||||
|
||||
52) Registered Mode: Channelmode to set on registered channels, see the
|
||||
option above. Use 1 for yes, 0 for no.
|
||||
|
||||
53) vIdent: Support for including a user's ident in their vHost. Use
|
||||
1 for yes, 0 for no.
|
||||
|
||||
54) SVSHOLD: Support for temporarily 'holding' a nick, instead of using
|
||||
a nick enforcer client. Use 1 for yes, 0 for no.
|
||||
|
||||
55) TS on MODE: We need to send a timestamp when modes are being changed.
|
||||
Use 1 for yes, 0 for no.
|
||||
|
||||
56) NICKIP: The IP address of new users is being sent along with their
|
||||
hostname when new users are being introduced on the network.
|
||||
Use 1 for yes, 0 for no.
|
||||
|
||||
57) Umode: We can use OperServ to change a user's mode. Use 1 for yes,
|
||||
0 for no.
|
||||
|
||||
58) O:LINE: We can use OperServ to give some user a temporary O:LINE.
|
||||
Use 1 for yes, 0 for no.
|
||||
|
||||
59) Vhost On Nick: On NICK the IRCd sends the VHOST. Use 1 for yes,
|
||||
0 for no.
|
||||
|
||||
60) Change Realname: Change real name. Use 1 for yes, 0 for no.
|
||||
|
||||
61) Extra Help: If the IRCd has more help for functions in ChanServ than
|
||||
the default help, you should put the language string
|
||||
identifier here. Use 0 for no extra help.
|
||||
|
||||
62) No Knock: CMODE_ that defines NO KNOCK. Use 0 for no support.
|
||||
|
||||
63) Admin Only: CMODE_ that defines Admin Only. Use 0 for no support.
|
||||
|
||||
64) Default MLock: Default channelmodes for MLOCK. Use 0 for no modes.
|
||||
|
||||
65) Vhost Umode: UMODE_ that indicates if the user currently has a vHost.
|
||||
Use 0 for no support.
|
||||
|
||||
66) Flood Mode: The IRCd has a channelmode for blocking floods. Use 1 for
|
||||
yes, 0 for no.
|
||||
|
||||
67) Link Mode: The IRCd has a channelmode for linking a channel to some
|
||||
other channel. Use 1 for yes, 0 for no.
|
||||
|
||||
68) CMode F: CMODE_ that defines flood mode. Use 0 for no support.
|
||||
|
||||
69) CMode L: CMODE_ that defines link mode. Use 0 for no support.
|
||||
|
||||
70) Check Nick ID: Should we check if a user should remain identified when
|
||||
changing their nick? This is for IRCd's that remove
|
||||
their registered-user mode when someone changes their
|
||||
nick (like Bahamut does).
|
||||
Use 1 for yes, 0 for no.
|
||||
|
||||
71) No Knock Requires +i: Does the No Knock channel mode require invite
|
||||
only channels? Use 1 for yes, 0 for no.
|
||||
|
||||
72) Chan Modes: If sent in CAPAB/PROTOCOL, we store it in here. This is
|
||||
NULL by default.
|
||||
|
||||
73) Tokens: Can we use tokens to talk to the IRCd? Use 1 for yes,
|
||||
0 for no.
|
||||
|
||||
74) Token Case Senstive: Are the IRCd's TOKENS/COMMANDS case sensitive?
|
||||
Use 1 for yes, 0 for no.
|
||||
|
||||
75) base64 SJOIN TS: Are the timestamps sent with a SJOIN in base64? Use
|
||||
1 for yes, 0 for no.
|
||||
|
||||
76) Supports +I: Does the IRCd support channelmode +I? Use 1 for yes,
|
||||
0 for no.
|
||||
|
||||
77) SJOIN Ban Char: Character used to identify bans. Use ''.
|
||||
|
||||
78) SJOIN Except Char: Character used to identify exceptions. use ''.
|
||||
|
||||
79) SVSMODE UCMODE: Can we clear user channel modes with SVSMODE? Use
|
||||
1 for yes, 0 for no.
|
||||
|
||||
80) SGline Enforce: Does the IRCd enforce SGLINES for us or do we need to
|
||||
do so? Use 1 for yes, 0 for no.
|
||||
|
||||
81) Vhost Character: The character used to represent the vHost mode, if
|
||||
this is supported by the IRCd.
|
||||
|
||||
82) TS6: Does the IRCd support TS6? Use 1 for yes, 0 for no.
|
||||
|
||||
83) UMode +h: Does the IRCd support usermode +h for helpers?
|
||||
Use 1 for yes, 0 for no.
|
||||
|
||||
84) P10: Is this IRCd a P10-style IRCd? Use 1 for yes, 0 for no.
|
||||
|
||||
85) Character Set: Unreal passes the character set during PROTOCTL,
|
||||
the value is stored here. Set this NULL to start.
|
||||
|
||||
86) Reports sync: Does the IRCd report when it's in sync (or done bursting,
|
||||
depending on how you want to say it)? Remember to set
|
||||
the sync state for servers correctly if it does.
|
||||
Use 1 for yes, 0 for no.
|
||||
|
||||
87) Channel CIDR: Set to 1 if channel bans, excepts and invites
|
||||
support CIDR masks. Expected syntax: *!*@ip/mask.
|
||||
When set to 1, anope will only parse strict CIDR masks.
|
||||
IRCd's that try to correct invalid CIDR's (like nefarious)
|
||||
will need a custom implementation in the core.
|
||||
Contact the anope Dev Team if this is the case.
|
||||
Set to 0 if CIDR's are not supported by your IRCd.
|
||||
|
||||
88) Throttle Mode: The IRCd has a channelmode for throttling joins per-user.
|
||||
Use 1 for yes, 0 for no.
|
||||
|
||||
89) CMode j: CMODE_ that defines throttle mode. Use 0 for no support.
|
||||
|
||||
So we've had this long list. Now there's a second struct to fill. This
|
||||
struct isn't as long as the previous one though, so we'll handle it quite
|
||||
quick compared to the previous one.
|
||||
|
||||
IRCDCAPAB ircdcap[] = { }
|
||||
|
||||
This struct is based on the CAPAB defines. You should review the CAPAB
|
||||
table below to see how this should be done.
|
||||
|
||||
Define Table
|
||||
--------------------------------------------------------------------------
|
||||
Define | Value | Token | Description
|
||||
----------------|------------|-----------|--------------------------------
|
||||
CAPAB_NOQUIT | 0x00000001 | NOQUIT | NOQUIT protocol support
|
||||
CAPAB_TSMODE | 0x00000002 | TS | Chanmodes are timestamped
|
||||
CAPAB_UNCONNECT | 0x00000004 | UNCONNECT | UNCONNECT protocol support
|
||||
CAPAB_NICKIP | 0x00000008 | NICKIP | IP sent in the NICK line
|
||||
CAPAB_NSJOIN | 0x00000010 | SSJOIN | Smart SJOIN support
|
||||
CAPAB_ZIP | 0x00000020 | ZIP | Support for gzipped links
|
||||
CAPAB_BURST | 0x00000040 | BURST | Supports BURST command
|
||||
CAPAB_TS3 | 0x00000080 | TS3 | Support for TS3 protocol
|
||||
CAPAB_TS5 | 0x00000100 | TS5 | Support for TS5 protocol
|
||||
CAPAB_DKEY | 0x00000200 | DKEY | DH-Key exchange using DKEY
|
||||
CAPAB_DOZIP | 0x00000400 | ZIP | Link traffic will be gzipped
|
||||
CAPAB_DODKEY | 0x00000800 | DKEY | Do DKEY with this link
|
||||
CAPAB_QS | 0x00001000 | QS | Supports quit storm removal
|
||||
CAPAB_SCS | 0x00002000 | SCS | String Cache System support
|
||||
CAPAB_PT4 | 0x00004000 | PT4 | Support for PT4 protocol
|
||||
CAPAB_UID | 0x00008000 | UID | Support for UIDs
|
||||
CAPAB_KNOCK | 0x00010000 | KNOCK | Supports KNOCK
|
||||
CAPAB_CLIENT | 0x00020000 | CLIENT | Supports CLIENT
|
||||
CAPAB_IPV6 | 0x00040000 | IPV6 | Support for IPv6 addresses
|
||||
CAPAB_SSJ5 | 0x00080000 | SSJ5 | Smart Join protocol 5 support
|
||||
CAPAB_SN2 | 0x00100000 | SN2 | Support for SN2 protocol
|
||||
CAPAB_VHOST | 0x00200000 | VHOST | Supports VHOST protocol
|
||||
CAPAB_TOKEN | 0x00400000 | TOKEN | Supports s2s tokens
|
||||
CAPAB_SSJ3 | 0x00800000 | SSJ3 | Smart Join protocol 3 support
|
||||
CAPAB_NICK2 | 0x01000000 | NICK2 | Support for extended NICK (v2)
|
||||
CAPAB_UMODE2 | 0x02000000 | UMODE2 | Supports UMODE2 command
|
||||
CAPAB_VL | 0x04000000 | VL | VLine information in info field
|
||||
CAPAB_TLKEXT | 0x08000000 | TLKEXT | Not 8, but 10 params in TKL's
|
||||
CAPAB_CHANMODE | 0x10000000 | CHANMODE | Channel modes are passed here
|
||||
CAPAB_SJB64 | 0x20000000 | SJB64 | SJOIN timestamps are base64 encoded
|
||||
CAPAB_NICKCHARS | 0x40000000 | NICKCHARS | Character set used by the IRCD for nicks
|
||||
|
||||
|
||||
4) Modes
|
||||
|
||||
The next thing you should do is defining the user modes. You will want to
|
||||
have your .h file handy for this part.
|
||||
|
||||
unsigned long umodes[128] = { }
|
||||
|
||||
This array goes from 0 to 127 in the ASCII character set. Insert the user
|
||||
modes at the slot where the mode fits. If you are adding a the user mode
|
||||
of +i find the 105th (ASCII code of 'i') character slot in the array, and
|
||||
place the UMODE_i into this slot. Your base .c file should contain a good
|
||||
start for this, as well as a little help locating the characters.
|
||||
|
||||
The following mode set is for the channel symbols. During a SJOIN event
|
||||
the modes are sent usually before the nick. These normally are @, +, %
|
||||
etc.. depending on the ircd. Starting at ASCII 0 and running to 127.
|
||||
Replace the 0 with the character (o = @, h = %) for the given mode. In the
|
||||
case of halfop which is usually sent as % replace the 37th character with
|
||||
'h', do this until all modes that are possible be received in this manor
|
||||
have been inserted into the array.
|
||||
|
||||
Now that you have that complete, the following array is ready to be dealt
|
||||
with. This is the cmmodes array, like the others it is a ASCII array
|
||||
starting at 0 and going to 127. However at the given letter you will want
|
||||
to enter the add, and delete function for the given mode. In the case of
|
||||
bans (+b) there is add_ban, and del_ban. Anope provides functions for
|
||||
bans, exceptions and invites, should your ircd have more then these please
|
||||
contact Anope to discuss what can be done to add this mode.
|
||||
|
||||
5) Functions and Events
|
||||
|
||||
A brief word about functions and events. All events are captured using:
|
||||
|
||||
void moduleAddIRCDMsgs(void)
|
||||
{
|
||||
m = createMessage("NICK", anope_event_nick);
|
||||
addCoreMessage(IRCD,m);
|
||||
}
|
||||
|
||||
Each event should have a event handler if its important enough to be
|
||||
processed by services. All event functions should be formed like this:
|
||||
|
||||
int anope_event_capab(char *source, int ac, char **av)
|
||||
{
|
||||
return MOD_CONT;
|
||||
}
|
||||
|
||||
They will receive the source; this can be NULL at times depending on the
|
||||
event. Next, ac is the number of arguments that are in the event, and av
|
||||
holds the values for each; so av[0] is the first variable, av[1] will be
|
||||
the second one, and so on. Events are likely to pass to various upper
|
||||
level event handlers; see the previous ircd source for how they handle
|
||||
these events.
|
||||
|
||||
All commands are formed like this:
|
||||
|
||||
void anope_cmd_svsnoop(char *server, int set)
|
||||
{
|
||||
send_cmd(NULL, "SVSNOOP %s %s", server, (set ? "+" : "-"));
|
||||
}
|
||||
|
||||
They may take any number of arguments, depending on the command. They
|
||||
should eventually come to a send_cmd(); this root function is how
|
||||
commands are sent to the IRCd.
|
||||
|
||||
6) CAPAB/PROTOCTL
|
||||
|
||||
Most IRCD send a CAPAB or PROTOCTL line so that they can work out what
|
||||
the other end of the connection is capable of doing. Anope has a function
|
||||
to read these lines and set itself up to to handle these events better.
|
||||
When adding support for your ircd, take the following steps.
|
||||
|
||||
1) In the ircd.c find the function anope_cmd_capab(); this function will
|
||||
send the CAPAB/PROTOCTL line (consult your ircd documentation for
|
||||
which to send). In a single line type in the tokens that anope must
|
||||
send. Here is an example of Hybrid's capab line:
|
||||
|
||||
/* CAPAB */
|
||||
void anope_cmd_capab()
|
||||
{
|
||||
send_cmd(NULL, "CAPAB TS5 EX IE HOPS HUB AOPS");
|
||||
}
|
||||
|
||||
2) In the ircd.h file make sure to place the defines (see below) that
|
||||
match your IRCd's tokens; only use the ones that matter to your ircd.
|
||||
Should your IRCd add new features not covered in the defined, please
|
||||
contact the Anope Dev team before doing so. See README for information
|
||||
on how to contact the Anope team.
|
||||
|
||||
3) Ensure that the CAPAB/PROTOCTL event his handled correctly.
|
||||
|
||||
A) In the function "moduleAddIRCDMsgs" making sure that you have the
|
||||
following two lines:
|
||||
|
||||
m = createMessage("CAPAB", anope_event_capab);
|
||||
addCoreMessage(IRCD,m);
|
||||
|
||||
B) Add the function to handle the event
|
||||
|
||||
int anope_event_capab(char *source, int ac, char **av)
|
||||
{
|
||||
capab_parse(ac, av);
|
||||
return MOD_CONT;
|
||||
}
|
||||
|
||||
This function should call the capab_parse function which parses
|
||||
the received CAPAB/PROTOCTL line.
|
||||
@@ -1,63 +0,0 @@
|
||||
Anope Multi Language Support
|
||||
----------------------------
|
||||
|
||||
1) Building Anope with gettext support
|
||||
2) Adding a new language
|
||||
3) Using languages with modules
|
||||
4) Updating a language file
|
||||
|
||||
1) Building Anope with gettext support
|
||||
|
||||
To build Anope with gettext support, gettext and its development libraries must be installed on the system.
|
||||
|
||||
On Debian-based systems install the locales-all package.
|
||||
|
||||
On RHEL-based systems run `yum list glibc-langpack-*` and install the languages you want to enable.
|
||||
|
||||
If you have already built Anope you will need to delete the build directory and rebuild from scratch.
|
||||
|
||||
Building Anope on Windows with gettext support is explained in docs/WIN32.md
|
||||
|
||||
2) Adding a new language
|
||||
|
||||
Anope uses gettext (https://www.gnu.org/software/gettext/) to translate messages for users. To add a new language
|
||||
install gettext and run `msginit -l language -o anope.language.po -i anope.pot`. For example if I was translating to
|
||||
Spanish I could run `msginit -l es_ES -o anope.es_ES.po -i anope.pot`. Open the newly generating .po file and start
|
||||
translating. Once you are done simply rerun ./Config; make && make install and add the language to your anope.conf.
|
||||
|
||||
Poedit (https://poedit.net/) is a popular po file editor, and we recommend using it or another editor designed to edit
|
||||
po files (especially on Windows).
|
||||
|
||||
There are several control characters within the messages. These are mostly IRC formatting codes (https://modern.ircdocs.horse/formatting)
|
||||
but 0x1B is special to Anope and is used to prevent the automatic linewrapper from breaking messages in the middle of
|
||||
text that should not be split (e.g. commands). Your editor may not show these so be careful you don't delete them!
|
||||
|
||||
If you have finished a language file translation and you want others to use it, please file a pull request on GitHub.
|
||||
You'll of course get full credit for it.
|
||||
|
||||
3) Using languages with modules
|
||||
|
||||
Module authors can easily add the ability to have their modules translated by adding _() around the strings they
|
||||
want translated (messages to the user, etc).
|
||||
|
||||
If you want to translate a module someone has made, first generate a .pot file if there isn't one already using
|
||||
`xgettext -s -d modulename -o modulename.pot --from-code=utf-8 --keyword --keyword=_ modulename.cpp`.
|
||||
The .pot file is a template of all of the language strings extracted from the source file.
|
||||
|
||||
Next, run msginit on the .pot file with
|
||||
`msginit -l language -o modulename.language.po -i modulename.pot`.
|
||||
Translate the new .po file and rerun ./Config; make && make install.
|
||||
|
||||
All .po and .pot files should be placed in modules/third/language. Additionally an update script is provided there
|
||||
that will create .pot files and merge any changes to it with existing .po files.
|
||||
|
||||
4) Updating a language file
|
||||
|
||||
Poedit (https://poedit.net/) is a popular po file editor, and we recommend using it or another editor designed to edit
|
||||
po files (especially on Windows).
|
||||
|
||||
Before editing the relevant file in languages/, run `update.sh` in the languages/ folder, i.e. `cd` to it and run
|
||||
./update.sh
|
||||
This will update the language file to contain all strings that need a translation.
|
||||
|
||||
Then commit only the changed .po files in git.
|
||||
+44
-48
@@ -12,7 +12,7 @@ Anope Modules
|
||||
|
||||
1) Introduction
|
||||
|
||||
Anope supports external modules. External modules are pieces
|
||||
Anope 1.6 onwards supports external modules. External modules are pieces
|
||||
of code that can be attached to a running Anope process dynamically. These
|
||||
modules can serve several purposes, and perform all kind of operations to
|
||||
enhance your network.
|
||||
@@ -22,16 +22,16 @@ Anope Modules
|
||||
1. If modules are supported by your system, they will be configured
|
||||
automatically when you run ./Config. The modules will be installed
|
||||
to the modules directory in your data path (by default this will
|
||||
be ~/anope/data/modules).
|
||||
be ~/services/modules).
|
||||
|
||||
2. Compile Anope as usual using ./Config. The "make" process will now
|
||||
compile module support into Anope, and compile the default sample
|
||||
modules, and any other module located in the modules folder or any
|
||||
of its sub-directories, eg. modules/extra.
|
||||
Note: you might need to run "make distclean" prior to running ./Config
|
||||
|
||||
3. Install Anope as usual. The "make install" process will place the
|
||||
compiled modules in their runtime location, making them available
|
||||
for loading.
|
||||
2. Compile Anope as usual. The (g)make process will now compile module
|
||||
support into Anope, and compile the default sample modules, and/or
|
||||
any other module located on the modules folder ("src/modules/").
|
||||
|
||||
3. Install Anope as usual. The install process will place the compiled
|
||||
modules in their runtime location, making them available for loading.
|
||||
|
||||
4. Start or restart services to make use of the new Anope executable.
|
||||
Note that you do not need to restart to load new or changed modules,
|
||||
@@ -42,64 +42,59 @@ Anope Modules
|
||||
All module manipulation commands are done through OperServ. These are:
|
||||
|
||||
MODLOAD Load a module
|
||||
MODRELOAD Reload a module
|
||||
MODUNLOAD Unload a module
|
||||
MODUNLOAD Un-Load a module
|
||||
MODLIST List loaded modules
|
||||
MODINFO Info about a loaded module
|
||||
|
||||
Access to the above commands require the operserv/modload and modlist
|
||||
permissions. Refer to operserv.example.conf.
|
||||
These commands available to Service Roots only.
|
||||
|
||||
You can also load (and pre-load) Modules automatically by loading them
|
||||
on startup. To do so, edit any one of the configuration files (you may
|
||||
want to use modules.conf for third-party/extra modules, or a config
|
||||
file relevant to the *Serv your module operates on, eg. hostserv.conf),
|
||||
and use the following method to load a module on startup or reload:
|
||||
module { name="hs_modname" }
|
||||
on startup. To do so, edit your services.conf file and change the values
|
||||
of "ModuleAutoload" and "ModuleDelayedAutoload" to include the modules
|
||||
you want to load every time Anope starts.
|
||||
|
||||
4) Usage Example
|
||||
|
||||
/msg OperServ modload ns_identify
|
||||
-OperServ- Module ns_identify loaded
|
||||
/msg OperServ modload hs_moo
|
||||
*** Global -- from OperServ: dengel loaded module hs_moo
|
||||
-OperServ- Module hs_moo loaded
|
||||
|
||||
/msg OperServ modinfo ns_identify
|
||||
-OperServ- Module: ns_identify Version: 1.9.7 Author: Anope loaded: Jun 17 18:43:08 2012 BST (2 minutes ago)
|
||||
-OperServ- Providing service: nickserv/identify
|
||||
-OperServ- Command ID on NickServ is linked to nickserv/identify
|
||||
-OperServ- Command IDENTIFY on NickServ is linked to nickserv/identify
|
||||
/msg OperServ modinfo hs_moo
|
||||
-OperServ- Module: hs_moo Version: 1.1 Author: Anope loaded: Mar 21 10:54:37 2004 CLT
|
||||
-OperServ- Providing command: /msg HostServ moo
|
||||
|
||||
/msg OperServ modreload ns_identify
|
||||
-OperServ- Module ns_identify reloaded
|
||||
/msg HostServ moo
|
||||
-HostServ- MOO! - This command was loaded via a module!
|
||||
|
||||
/msg OperServ modunload ns_identify
|
||||
-OperServ- Module ns_identify unloaded
|
||||
/msg OperServ modunload hs_moo
|
||||
*** Global -- from OperServ: dengel unloaded module hs_moo
|
||||
-OperServ- Module hs_moo unloaded
|
||||
|
||||
/msg NickServ IDENTIFY
|
||||
-NickServ- Unknown command identify. "/msg NickServ HELP" for help.
|
||||
NOTE: Doing the above, with the command still existing in a config file,
|
||||
will result in a log message, similar to the following:
|
||||
<@NickServ> Command IDENTIFY exists on me, but its service nickserv/identify was not found!
|
||||
/msg HostServ moo
|
||||
-HostServ- Unknown command moo. "/msg HostServ HELP" for help.
|
||||
|
||||
* Note that the name of the module source file is "ns_identify.cpp", yet we
|
||||
load and reference the module as "ns_identify" only. By naming convention
|
||||
* Note that the name of the module file is "hs_moo.c", yet we load
|
||||
and reference the module as "hs_moo" only. By naming convention
|
||||
modules have an abbreviated service name they attach to (hs_ for
|
||||
HostServ, cs_ for ChanServ, etc) followed by a descriptive keyword.
|
||||
|
||||
5) More Modules
|
||||
|
||||
You can download more useful modules from https://modules.anope.org/. Just
|
||||
grab the module file (usually with a .cpp extension). Place the module
|
||||
file in your modules (anope-1.9.x/modules/third) folder; although any of
|
||||
the other folders within the modules directory will work.
|
||||
Anope ships with three sample modules that only illustrates some of the
|
||||
implemented module capabilities. They don't really do much or anything
|
||||
useful.
|
||||
|
||||
You can download more useful modules from http://modules.anope.org/. Just
|
||||
grab the module file (usually with a .c extension). Place the module
|
||||
file in your modules (src/modules) folder; the same folder that contains
|
||||
both hs_moo.c and catserv.c module files.
|
||||
|
||||
The new modules need to be compiled and installed before you can make
|
||||
use of them:
|
||||
|
||||
|
||||
1. Make sure you're in the main source directory. (usually anope-1.X.XX/)
|
||||
2. Run ./Config to find and configure modules, then `cd build`.
|
||||
3. Run `make` to compile Anope, and any modules.
|
||||
4. Run `make install` to copy the compiled binaries to the ~/anope/
|
||||
directory.
|
||||
2. Run `make modules` to compile any new or changed modules.
|
||||
3. Run `make install` to install the modules.
|
||||
|
||||
You can now use /msg OperServ MODLOAD to load the new modules.
|
||||
|
||||
@@ -111,18 +106,19 @@ 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.teranova.net.
|
||||
at /server irc.anope.org.
|
||||
|
||||
7) Information for Developers
|
||||
|
||||
There are a number of useful documents on the Anope Wiki. The Anope Wiki
|
||||
can be reached at:
|
||||
|
||||
* http://wiki.anope.org/
|
||||
|
||||
* https://wiki.anope.org/
|
||||
|
||||
8) Modules Repository
|
||||
|
||||
You can find modules at https://modules.anope.org/
|
||||
You can find modules at http://modules.anope.org
|
||||
|
||||
These modules are 3rd party and as such are not supported by the Anope Team.
|
||||
Contact the Module Author directly with problems, not the Anope Team.
|
||||
|
||||
+109
@@ -0,0 +1,109 @@
|
||||
Anope MySQL Support
|
||||
-------------------
|
||||
|
||||
1) Introduction
|
||||
|
||||
Anope 1.6 onwards supports MySQL databases. On Anope 1.6.0 only PHASE 1
|
||||
has been implemented. Since the next phases require major changes in the
|
||||
core, we decided to save it for 2.0. However, having your db's easily
|
||||
accessible on your website is still a great feature.
|
||||
|
||||
PHASE 1:Anope will be able to save all it's databases to MySQL. It will
|
||||
happen in conjunction with the current FFF databases. This first step is
|
||||
nothing more than a MySQL dump of the databases (i.e. read-only), since
|
||||
Anope will not (for now) read from Mysql. (COMPLETED)
|
||||
|
||||
PHASE 2:The next step is load the databases from MySQL, being able to
|
||||
replace the FFF completely as an archive method (since all changes to
|
||||
the MySQL db would be lost on the next Services save). All, while keeping
|
||||
FFF intact. This is still not the final goal, but it's a milestone.
|
||||
(COMPLETED)
|
||||
|
||||
UPDATE: Anope 1.7.0 (Revision 11 and above) finally supports phase 2!
|
||||
A new config directive called 'UseRDB' has been added.
|
||||
If you enable this, anope will automatically try to load its
|
||||
data from MySQL (if configured and compiled with).
|
||||
|
||||
PHASE 3:The next step, and most convoluted of all (since we'll need to
|
||||
modify pretty much all the source) is to load/save (SELECT/INSERT) data
|
||||
in realtime. That way the MySQL db could be modified externally (web?).
|
||||
Again, the FFF will be kept intact.
|
||||
|
||||
2) Requirements
|
||||
|
||||
1. MySQL server version 3.23.32 or greater
|
||||
2. MySQL libs and development files (usually called mysql-dev).
|
||||
3. A MySQL user account
|
||||
4. A MySQL database
|
||||
|
||||
3) Installation
|
||||
|
||||
1. The ./Config script automatically detects if your system is capable
|
||||
of running Anope with MySQL support. There is no need anymore to
|
||||
answer yes when asked.
|
||||
|
||||
Note: You might need to run "make distclean" prior to running ./Config
|
||||
|
||||
2. Compile Anope as usual. The (g)make process will now compile MySQL
|
||||
support into Anope.
|
||||
|
||||
3. Install Anope as usual.
|
||||
|
||||
4) Configuration
|
||||
|
||||
1. Go to your "services bin directory" (eg: /home/someuser/services/) and run mydbgen
|
||||
to help on the schema creation and adjustments.
|
||||
|
||||
2. Edit services.conf and add your MySQL data to the MySQL configuration
|
||||
block.
|
||||
|
||||
3. Start or restart services to make use of the new Anope executable.
|
||||
|
||||
5) Security
|
||||
|
||||
To add a layer of security you have the option of encrypting or encoding
|
||||
all passwords for nicks and chans. Use the "MysqlSecure" directive on your
|
||||
services.conf file to enable it. The available storage methods are:
|
||||
|
||||
#MysqlSecure ""
|
||||
|
||||
or
|
||||
|
||||
MysqlSecure ""
|
||||
|
||||
Disables security. All passwords will be saved on the MySQL database
|
||||
as clear text, with no encryption or encoding. FASTEST
|
||||
|
||||
MysqlSecure "des"
|
||||
|
||||
Encrypts all passwords using a UNIX DES encryption. This is a one way
|
||||
encryption algorithm. You can only validate it against another DES
|
||||
encrypted string, using the same "salt" (the first two characters of
|
||||
the encrypted string). FAST
|
||||
|
||||
MysqlSecure "md5"
|
||||
|
||||
Calculates an MD5 128-bit checksum for the password. The value is
|
||||
returned as a 32-digit hex number that may be used as a hash key.
|
||||
This is a one way encryption algorithm. SLOW
|
||||
|
||||
MysqlSecure "sha"
|
||||
|
||||
Calculates an SHA 160-bit checksum for the password. The value is
|
||||
returned as a 40-digit hex number. This is a one way encryption
|
||||
algorithm. SLOWEST
|
||||
|
||||
MysqlSecure "mykey"
|
||||
|
||||
Encodes the passwords using "mykey" as the encryption password. It
|
||||
produces a binary string and can be decoded using the MySQL built in
|
||||
function DECODE(crypt_str,mykey). VARIABLE
|
||||
|
||||
Caveat: Keep in mind that this if you use any method other than clear
|
||||
text, services will need to encrypt/encode every single password on
|
||||
every database save. On large networks, it may impact responsiveness
|
||||
during the saves.
|
||||
|
||||
Caveat: If you enable MysqlSecure you can not longer use the UseRDB directive
|
||||
as all the password types are encrypted with a one way encryption method for
|
||||
older MySQL servers.
|
||||
@@ -0,0 +1,55 @@
|
||||
Highlighted News in Anope 1.8
|
||||
============================================
|
||||
* Added a new and improved ./Config script.
|
||||
* Added MySQL phase 2 implementation (see docs/MYSQL).
|
||||
* Added NickServ registration delays.
|
||||
* Added read receipts for memos.
|
||||
* Added a way for modules to store data with internal structures.
|
||||
* Added nick tracking support.
|
||||
* Added support for SVSHOLD.
|
||||
* Added support for U:Lined servers.
|
||||
* Added support for TS6 IRCd's.
|
||||
* Added support for Windows.
|
||||
* Added internal events for modules.
|
||||
* Added a way to suspend nicks.
|
||||
* Added support for module configuration directives.
|
||||
* Added translation support for modules.
|
||||
* Added a module pack with handy modules.
|
||||
* Added IRCd protocol modules.
|
||||
* Added support for new IRCd's. Currently supported:
|
||||
- Bahamut 1.4.27 or later (including 1.8)
|
||||
- Charybdis 1.0 or later
|
||||
- DreamForge 4.6.7
|
||||
- Hybrid 7 or later
|
||||
- InspIRCd 1.0 or later (including 1.1)
|
||||
- Plexus 2.0 or later (including 3.0)
|
||||
- PTLink 6.15 or later
|
||||
- RageIRCd 2.0 or later
|
||||
- Ratbox 2.0.6 or later
|
||||
- ShadowIRCd 4.0 beta 7 or later
|
||||
- Solid IRCd 3.4.6 or later
|
||||
- UltimateIRCd 2.8.2 or later (including 3.0)
|
||||
- UnrealIRCd 3.1.1 or later (including 3.2)
|
||||
- ViagraIRCd 1.3 or later
|
||||
* Added new languages. Currently included:
|
||||
Catalan, German, English, Spanish, French, Greek,
|
||||
Hungarian, Italian, Dutch, Polish, Portugese,
|
||||
Russian, Turkish
|
||||
* Added support for CIDR channel lists.
|
||||
* Converted the core to be completely modular.
|
||||
* Improved random number algorithm.
|
||||
* Removed proxy detector (see docs/PROXY).
|
||||
* Fixed various exploits and vulnerabilities.
|
||||
* Fixed various language typos and inconsistencies.
|
||||
* Fixed a bug in the database system causing nickserv passwords
|
||||
to be saved incorrectly. Note that this breaks backwards
|
||||
compatibility on nick.db !!!
|
||||
|
||||
|
||||
|
||||
For the full changes, see the Changes file.
|
||||
|
||||
For announcements and discussions about Anope, please visit our
|
||||
web site http://www.anope.org
|
||||
|
||||
|
||||
+1299
File diff suppressed because it is too large
Load Diff
+139
@@ -0,0 +1,139 @@
|
||||
Highlighted News in Anope 1.7 (and soon 1.8)
|
||||
============================================
|
||||
* Added a new and improved ./Config script.
|
||||
* Added MySQL phase 2 implementation (see docs/MYSQL).
|
||||
* Added NickServ registration delays.
|
||||
* Added read receipts for memos.
|
||||
* Added a way for modules to store data with internal structures.
|
||||
* Added nick tracking support.
|
||||
* Added support for SVSHOLD.
|
||||
* Added support for U:Lined servers.
|
||||
* Added support for TS6 IRCd's.
|
||||
* Added support for Windows.
|
||||
* Added internal events for modules.
|
||||
* Added a way to suspend nicks.
|
||||
* Added support for module configuration directives.
|
||||
* Added translation support for modules.
|
||||
* Added a module pack with handy modules.
|
||||
* Added IRCd protocol modules.
|
||||
* Added support for new IRCd's. Currently supported:
|
||||
- Bahamut 1.4.27 or later (including 1.8)
|
||||
- Charybdis 1.0 or later
|
||||
- DreamForge 4.6.7
|
||||
- Hybrid 7 or later
|
||||
- InspIRCd 1.0 or later (including 1.1)
|
||||
- Plexus 2.0 or later (including 3.0)
|
||||
- PTLink 6.15 or later
|
||||
- RageIRCd 2.0 or later
|
||||
- Ratbox 2.0.6 or later
|
||||
- ShadowIRCd 4.0 beta 7 or later
|
||||
- Solid IRCd 3.4.6 or later
|
||||
- UltimateIRCd 2.8.2 or later (including 3.0)
|
||||
- UnrealIRCd 3.1.1 or later (including 3.2)
|
||||
- ViagraIRCd 1.3 or later
|
||||
* Added new languages. Currently included:
|
||||
Catalan, German, English, Spanish, French, Greek,
|
||||
Hungarian, Italian, Dutch, Polish, Portugese,
|
||||
Russian, Turkish
|
||||
* Added support for CIDR channel lists.
|
||||
* Converted the core to be completely modular.
|
||||
* Improved random number algorithm.
|
||||
* Removed proxy detector (see docs/PROXY).
|
||||
* Fixed various exploits and vulnerabilities.
|
||||
* Fixed various language typos and inconsistencies.
|
||||
* Fixed a bug in the database system causing nickserv passwords
|
||||
to be saved incorrectly. Note that this breaks backwards
|
||||
compatibility on nick.db !!!
|
||||
|
||||
Highlighted News in Anope 1.6
|
||||
=============================
|
||||
* Fixed various exploits and vulnerabilities.
|
||||
* Fixed various language typos and inconsistencies.
|
||||
* Improved ignore system.
|
||||
* Improved ./configure script.
|
||||
* Removed all compile warning fixed.
|
||||
* Converted HelpServ into a proper service.
|
||||
* Added external module support.
|
||||
* Added Defense Condition (DEFCON) System.
|
||||
* Added MySQL support for mirroring databases.
|
||||
* Added multi-server configuration.
|
||||
* Added multi-domain /OS GLOBAL support.
|
||||
* Added combined +oq +oa +ha +va on net-joins.
|
||||
* Added support for ircd changes and upgrades.
|
||||
* Added HostSetters configuration directive.
|
||||
* Added /OS STAFF command.
|
||||
* Added /OS SVSNICK command.
|
||||
* Added /OS CHANKILL command.
|
||||
* Added /MS STAFF command.
|
||||
* Added /NS UPDATE command.
|
||||
* Added /MS SENDALL command.
|
||||
* Added /NS GETMAIL command.
|
||||
* Added /HS DELALL command.
|
||||
* Added /HS LIST command with pattern matching.
|
||||
* New support scripts and tools.
|
||||
* New ircd support, complete list: DreamForge 4.6.7, Bahamut 1.4.27,
|
||||
UnrealIRCd 3.1.1, UltimateIRCd 2.8.2,
|
||||
UltimateIRCd 3.0.0, Hybrid IRCd 7.0
|
||||
ViagraIRCd 1.3.x, PTlink 6.15.0
|
||||
* New Language files, complete list: cat.l, de.l, en_us.l, es.l, fr.l,
|
||||
gr.l, it.l, nl.l, pt.l, ru.l, tr.l
|
||||
|
||||
Highlighted News in Anope 1.4
|
||||
=============================
|
||||
|
||||
After the change from Epona to Anope
|
||||
------------------------------------
|
||||
* New Italian Language file
|
||||
* Added support for UltimateIRCd 3.0 and later
|
||||
* Services realtime logging to a channel
|
||||
* SuperAdmin directive for access to "super" commands.
|
||||
* Ban system is now exception aware.
|
||||
* HostServ for hostname masquerading.
|
||||
* Smarter XOP System.
|
||||
* Email verification/handshake upon registration.
|
||||
* Services can now /ignore users.
|
||||
* Smarter memo notification for channels.
|
||||
* Channel can be SUSPENDed instead of FORBIDen.
|
||||
|
||||
Before the change from Epona to Anope
|
||||
-------------------------------------
|
||||
* HostServ for networks that support them.
|
||||
* UnrealIRCd support has been rewritten, it is now fully
|
||||
working (hopefully) and officially supported again.
|
||||
* Added support for UltimateIRCd 2.8.2 and later.
|
||||
* A multi-threaded proxy detector that can scan Wingates,
|
||||
SOCKS 4/5 and HTTP proxies on ports 3128 and 8080. Don't use
|
||||
it if you have not been authorized to use it by your system
|
||||
administrator!
|
||||
* The ChanServ AOP/SOP/VOP commands, and, on networks that
|
||||
support halfops, the HOP command, have been added. They
|
||||
allow a more user-friendly control of channel privileges.
|
||||
* Use of services IDs that allow an user to be automatically
|
||||
identified after a split (if he was identified before the split)
|
||||
in a secure way. This also saves lots of bandwidth.
|
||||
* Services' default language can now be set in services.conf.
|
||||
* The OperServ RANDOMNEWS command provides an easy way to show
|
||||
network news in a random manner without flooding your users
|
||||
with them (one news per connection).
|
||||
* The BotServ SET PRIVATE option allows services admins to
|
||||
make the bot usable by IRC operators only.
|
||||
* The OperServ SQLINE command allows you to forbid nick masks
|
||||
and even channel masks with the latest Bahamut.
|
||||
* The ChanServ AKICK STICK command allows akicks to be permanently
|
||||
kept on channel.
|
||||
* The ChanServ SET TOPIC command has been renamed to TOPIC, and
|
||||
a new BAN command has been added. They both have their own
|
||||
associated levels.
|
||||
* A SET PEACE command has been added to ChanServ. It prevents
|
||||
users to use pejorative services commands (DEOP, KICK, ...)
|
||||
on users with greater or equal levels.
|
||||
|
||||
Networks using Bahamut must upgrade to Bahamut 1.4.27 or later,
|
||||
while networks using UnrealIRCd must upgrade to Unreal 3.1.1.
|
||||
|
||||
For the full changes, see the Changes file.
|
||||
|
||||
For announcements and discussions about Anope, please visit our
|
||||
web site http://www.anope.org
|
||||
|
||||
|
||||
+41
@@ -0,0 +1,41 @@
|
||||
Anope Proxy Detector
|
||||
--------------------
|
||||
|
||||
1) Introduction
|
||||
2) Alternatives
|
||||
|
||||
1) Introduction
|
||||
|
||||
Anope has had a built-in proxy detector since it's first version. Recently,
|
||||
however, this built-in proxy detector has been removed. This was because
|
||||
the Anope team found that the proxy detector was showing it's age, and the
|
||||
time needed to restore it to a good state wasn't worth it, also considering
|
||||
that there are currently good alternatives out there which do the job as
|
||||
good as it can be done already.
|
||||
|
||||
2) Alternatives
|
||||
|
||||
A) Blitzed Open Proxy Monitor (BOPM)
|
||||
B) NeoStats + OPSB
|
||||
|
||||
Note that these are seperate projects and that the Anope team won't give
|
||||
support on these programs. For support, please refer to the sites of the
|
||||
creators of the software packages.
|
||||
|
||||
A) Blitzed Open Proxy Monitor (BOPM)
|
||||
|
||||
URL: http://wiki.blitzed.org/BOPM
|
||||
|
||||
BOPM is currently the leading proxy detector for IRC networks out
|
||||
there. Altough it is not designed to run on a central place for the
|
||||
entire network, it can be done with some minor tweaking on most IRCd's.
|
||||
The Anope Team advises BOPM for the best security.
|
||||
|
||||
B) NeoStats + OPSB
|
||||
|
||||
URL: http://www.neostats.net/
|
||||
|
||||
NeoStats is the swiss knife of IRC tools. In combination with the OPSB
|
||||
module by NeoStats Software, it can scan for proxies in a similar way
|
||||
as BOPM does. The OPSB module is based on BOPM and has been adjusted to
|
||||
be able to scan all clients from one centralized proxy detector.
|
||||
+192
-70
@@ -1,14 +1,16 @@
|
||||
Anope -- a set of IRC services for IRC networks
|
||||
-----------------------------------------------
|
||||
|
||||
Anope is 2003-2026 Anope Team <team@anope.org>.
|
||||
Anope is 2003-2009 Anope Team <team@anope.org>.
|
||||
Based on Epona 2000-2002 PegSoft <epona@pegsoft.net>.
|
||||
Based on Services 1996-1999 Andrew Church <achurch@achurch.org>.
|
||||
|
||||
This program is free but copyrighted software; see the file COPYING for
|
||||
details.
|
||||
|
||||
Information about Anope may be found at https://www.anope.org/
|
||||
Information about Anope may be found at http://www.anope.org/
|
||||
Information about Epona may be found at http://www.epona.org/
|
||||
Information about Services may be found at http://www.ircservices.esper.net/
|
||||
|
||||
Table of Contents
|
||||
-----------------
|
||||
@@ -17,7 +19,7 @@ Table of Contents
|
||||
3) Installation
|
||||
4) Command Line Options
|
||||
5) Messages Translation
|
||||
6) Contact
|
||||
6) Contact and Mailing List
|
||||
|
||||
1) Credits
|
||||
|
||||
@@ -74,8 +76,8 @@ Table of Contents
|
||||
* Adam <adam@anope.org>
|
||||
* Alvaro Toledo <atoledo@keldon.org>
|
||||
* Amanda Folson <amanda@anope.org>
|
||||
* Andrew Berquist <vash@anope.org>
|
||||
* Björn Stiddien <keeper@anope.org>
|
||||
* Andrew Berquist <vash@anope.org>
|
||||
* Björn Stiddien <keeper@anope.org>
|
||||
* Charles Kingsley <chaz@anope.org>
|
||||
* Chris Hogben <heinz@anope.org>
|
||||
* Daniel Engel <dane@zero.org>
|
||||
@@ -89,38 +91,59 @@ Table of Contents
|
||||
* Jens Voss <dukepyrolator@anope.org>
|
||||
* JH <jh@irc-chat.net>
|
||||
* Joris Vink <joris@anope.org>
|
||||
* Lee Holmes <lethality@anope.org>
|
||||
* Lucas Nussbaum <lucas@lucas-nussbaum.net>
|
||||
* Mark Summers <mark@goopler.net>
|
||||
* Matthew Beeching <jobe@mdbnet.co.uk>
|
||||
* Matthew Beeching <jobe@invictachat.net>
|
||||
* Naram Qashat <cyberbotx@anope.org>
|
||||
* Phil Lavin <phil@anope.org>
|
||||
* Pieter Bootsma <geniusdex@anope.org>
|
||||
* Robin Burchell <w00t@inspircd.org>
|
||||
* Sean Roe <therock247uk@anope.org>
|
||||
* Sebastian V <hal9000@anope.org>
|
||||
* Thomas Juberg Stensås <ShadowMaster@Shadow-Realm.org>
|
||||
* Thomas Juberg Stensås <ShadowMaster@Shadow-Realm.org>
|
||||
* Trystan .S Lee <trystan@nomadirc.net>
|
||||
* openglx <openglx@brasnerd.com.br>
|
||||
|
||||
Anope Translations:
|
||||
|
||||
* Robby <robby@chatbelgie.be> (nl_NL)
|
||||
* Kein <kein-of@yandex.ru> (ru_RU)
|
||||
* Maik Funke <Han@mefalcon.org> (de_DE)
|
||||
* Isaac Fontal <i_fontal@hotmail.com> (es_ES)
|
||||
* Janos Kapitany <sarkanyka@cjbchat.hu> (hu_HU)
|
||||
* Szymon S'wierkosz <szymek@adres.pl> (pl_PL)
|
||||
* Christopher N. <saka@epiknet.org> (fr_FR)
|
||||
* Yusuf Kurekci <ysfm.20@gmail.com> (tr_TR)
|
||||
* GeniusDex <geniusdex@anope.org> (nl.l)
|
||||
* Kein <kein-of@yandex.ru> (ru.l)
|
||||
* Stuff <the.stuff@gmx.de> (de.l)
|
||||
* Gabriel Acevedo H. <drstein@anope.org> (es.l)
|
||||
* Janos Kapitany <sarkanyka@cjbchat.hu> (hun.l)
|
||||
* Szymon S'wierkosz <szymek@adres.pl> (pl.l)
|
||||
|
||||
Anope Web panel:
|
||||
|
||||
* Denis M. (Phr33d0m) <god@politeia.in>
|
||||
Anope uses the strlcat() and strlcpy() functions from OpenSSH 2.5.1p2.
|
||||
These functions are copyrighted by Todd C. Miller:
|
||||
|
||||
Copyright (c) 1998 Todd C. Miller <Todd.Miller@courtesan.com>
|
||||
All rights reserved.
|
||||
|
||||
Redistribution and use in source and binary forms, with or without
|
||||
modification, are permitted provided that the following conditions
|
||||
are met:
|
||||
1. Redistributions of source code must retain the above copyright
|
||||
notice, this list of conditions and the following disclaimer.
|
||||
2. Redistributions in binary form must reproduce the above copyright
|
||||
notice, this list of conditions and the following disclaimer in the
|
||||
documentation and/or other materials provided with the distribution.
|
||||
3. The name of the author may not be used to endorse or promote
|
||||
products derived from this software without specific prior written
|
||||
permission.
|
||||
|
||||
THIS SOFTWARE IS PROVIDED `AS IS'' AND ANY EXPRESS OR IMPLIED
|
||||
WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
|
||||
MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
|
||||
IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
|
||||
INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
|
||||
BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS
|
||||
OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
|
||||
ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR
|
||||
TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE
|
||||
USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
|
||||
SUCH DAMAGE.
|
||||
|
||||
|
||||
2) Presentation
|
||||
|
||||
Anope is a set of services for IRC networks that allows users to manage
|
||||
Anope is a set of Services for IRC networks that allows users to manage
|
||||
their nicks and channels in a secure and efficient way, and administrators
|
||||
to manage their network with powerful tools.
|
||||
|
||||
@@ -160,19 +183,29 @@ Table of Contents
|
||||
they log on, to set modes and to kick users from any channel, to
|
||||
send notices quickly to the entire network, and much more!
|
||||
|
||||
* HostServ, a neat service that allows users to show custom vhosts
|
||||
* HostServ, a neat service that allows users to show custom vHosts
|
||||
(virtual hosts) instead of their real IP address; this only works
|
||||
on daemons supporting ip cloaking, such as UnrealIRCd.
|
||||
on daemons supporting ip cloaking, such as UnrealIRCd, UltimateIRCd
|
||||
and ViagraIRCd.
|
||||
|
||||
* HelpServ, a skeleton service used to serve help files.
|
||||
|
||||
Anope currently works with:
|
||||
|
||||
* InspIRCd 4 or later
|
||||
* ircd-hybrid 8.2.34 or later
|
||||
* ircd-ratbox 3 or later
|
||||
* ngIRCd 19.2 or later
|
||||
* Plexus 3 or later
|
||||
* Solanum (all versions)
|
||||
* UnrealIRCd 6 or later
|
||||
* Bahamut 1.4.27 or later (including 1.8)
|
||||
* Charybdis 1.0 or later
|
||||
* DreamForge 4.6.7
|
||||
* Hybrid 7 or later
|
||||
* InspIRCd 1.0 or later (including 1.1)
|
||||
* Plexus 2.0 or later (including 3.0)
|
||||
* PTlink 6.15 or later
|
||||
* RageIRCd 2.0 beta-6 or later
|
||||
* Ratbox 2.0.6 or later
|
||||
* ShadowIRCd 4.0 beta 7 or later
|
||||
* Solid IRCd 3.4.6 or later
|
||||
* UltimateIRCd 2.8.2 or later (including 3.0)
|
||||
* UnrealIRCd 3.1.1 or later (including 3.2)
|
||||
* ViagraIRCd 1.3 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.
|
||||
@@ -186,72 +219,161 @@ Table of Contents
|
||||
4) Command Line Options
|
||||
|
||||
Normally, Anope can be run simply by invoking the "services" executable.
|
||||
Any of the following command-line options can be specified to change
|
||||
Anope will then use the defaults specified in the services.conf file, and
|
||||
connect to the specified uplink server. Alternatively, any of the
|
||||
following command-line options can be specified to change the default
|
||||
values:
|
||||
|
||||
-remote server[:port] Connect to the specified server
|
||||
-local host -or- Connect from the specified address (e.g. for
|
||||
[host]:[port] multihomed servers)
|
||||
-name servername Our server name (e.g. services.some.net)
|
||||
-desc string Description of us (e.g. SomeNet Services)
|
||||
-user username Username for Services' nicks (e.g. services)
|
||||
-host hostname Hostname for Services' nicks (e.g. esper.net)
|
||||
-dir directory Directory containing Services' data files
|
||||
(e.g. /usr/local/lib/services)
|
||||
-log filename Services log filename (e.g. services.log)
|
||||
-update secs How often to update databases (in seconds)
|
||||
-expire secs How often to check for nick/channel
|
||||
expiration (in seconds)
|
||||
|
||||
Additionally, the following command-line options can be used to modify
|
||||
the behavior of Anope:
|
||||
|
||||
--debug Enable debugging mode; more info sent to log (give
|
||||
-debug Enable debugging mode; more info sent to log (give
|
||||
option more times for more info)
|
||||
--readonly Enable read-only mode; no changes to databases
|
||||
allowed
|
||||
--nofork Do not fork after startup; log messages will be
|
||||
written to terminal
|
||||
--noexpire Expiration routines won't be run at all
|
||||
--version Display the version of Anope
|
||||
--nothird Do not load the non-core modules specified
|
||||
--protocoldebug Debug each incoming message after protocol parsing
|
||||
--support Used for support, same as --debug --nofork --nothird
|
||||
|
||||
Upon starting, Anope will parse its command-line parameters then
|
||||
(assuming the --nofork option is not given) detach itself and run in the
|
||||
background. If Anope encounters a problem reading the database files or
|
||||
cannot connect to its uplink server, it will terminate immediately;
|
||||
otherwise, it will run until the connection is terminated (or a QUIT,
|
||||
SHUTDOWN, or RESTART command is sent; see OperServ's help).
|
||||
-readonly Enable read-only mode; no changes to databases
|
||||
allowed, .db files and log not written
|
||||
-skeleton Enable skeleton mode; like read-only mode, but only
|
||||
OperServ is available
|
||||
-nofork Do not fork after startup; log messages will be
|
||||
written to terminal (as well as to the log file
|
||||
if not in read-only mode)
|
||||
-forceload Try to load as much of the databases as possible,
|
||||
even if errors are encountered
|
||||
-noexpire Expiration routines won't be run at all
|
||||
-logchan Startup with logchan enabled
|
||||
-version Display the version of Anope
|
||||
-nothird Do not load the modules specified in ModulesAutoload
|
||||
or ModulesDelayedAutoload in the config file
|
||||
-protocoldebug Debug each incoming message after protocol parsing
|
||||
-support Used for support, same as -debug -nofork -nothird
|
||||
|
||||
Upon starting, Anope will parse its command-line parameters, open its
|
||||
logfile, then (assuming the -nofork option is not given) detach itself
|
||||
and run in the background. If Anope encounters a problem reading the
|
||||
database files or cannot connect to its uplink server, it will terminate
|
||||
immediately; otherwise, it will run until the connection is terminated
|
||||
(or a QUIT, SHUTDOWN, or RESTART command is sent; see OperServ's help).
|
||||
In the case of an error, an appropriate error message will be written to
|
||||
the log file.
|
||||
|
||||
If Anope is run with the "--readonly" command-line option, it can serve as
|
||||
If Anope is run with the "-readonly" command-line option, it can serve as
|
||||
a "backup" to the full version of services. A "full" version of services
|
||||
(run without --readonly) will automatically reintroduce its pseudo-clients
|
||||
(run without -readonly) will automatically reintroduce its pseudo-clients
|
||||
(NickServ, ChanServ, etc.), while a "backup" services will not, thus
|
||||
allowing full services to be brought up at any time without disrupting
|
||||
the network (and without having to take backup services down beforehand).
|
||||
|
||||
The "--debug" option is useful if you find or suspect a problem in Anope.
|
||||
If Anope is run with the "-skeleton" command-line option, it will not try
|
||||
to load the nickname or channel databases, and will respond with "service
|
||||
is inactive" messages to any commands sent to NickServ, ChanServ,
|
||||
MemoServ or BotServ. This can be useful as an emergency stopgap measure
|
||||
when the main copy of Anope cannot be started.
|
||||
|
||||
The "-debug" option is useful if you find or suspect a problem in Anope.
|
||||
Giving it once on the command line will cause all traffic to and from
|
||||
services as well as some other debugging information to be recorded in
|
||||
the log file; if you send a bug report, PLEASE include an excerpt from
|
||||
the log file WITH DEBUGGING ACTIVE; we cannot emphasize enough how
|
||||
important this is to tracking down problems. (You can also enable
|
||||
debugging while Anope is running using OperServ's SET DEBUG command.)
|
||||
If you repeat use --debug=<level>, the debugging level will be increased,
|
||||
which provides more detailed information but may also slow Anope down
|
||||
considerably and make the log file grow dramatically faster. In general,
|
||||
a debug level of 1 is sufficient for the coding team to be able to trace
|
||||
a problem, because all network traffic is included and we can usually
|
||||
reproduce the problem.
|
||||
debugging while Services is running using OperServ's SET DEBUG command.)
|
||||
If you repeat the -debug option more than once, the debugging level will
|
||||
be increased, which provides more detailed information but may also slow
|
||||
Anope down considerably and make the log file grow dramatically faster
|
||||
(in particular, at debug level 4 a message is written to the log for
|
||||
every character received from the server). In general, a debug level of 1
|
||||
is sufficient for the coding team to be able to trace a problem, because
|
||||
all network traffic is included and we can usually reproduce the problem.
|
||||
|
||||
The "-forceload" option is provided to attempt recovery of data from
|
||||
corrupted or truncated databases. Normally, if Anope encounters an error
|
||||
writing to a database file, it will attempt to restore the original
|
||||
version of the file and report an error to the logfile and through
|
||||
WALLOPS. However, if this should fail (which normally should not happen),
|
||||
or if Anope is terminated abruptly e.g. by kill -9 or a power failure,
|
||||
then one or more of the databases may be corrupt. Normally, this will
|
||||
cause Anope to abort the next time you try to run it; however, if yo
|
||||
give the -forceload option to Anope, it will instead read as much as it
|
||||
can, then skip to the next database. For obvious reasons, it's highly
|
||||
recommended to keep backup copies of your databases in case something
|
||||
does happen (since Anope will stop at the first error in a database, even
|
||||
with -forceload, meaning you lose any data after that).
|
||||
|
||||
5) Messages Translations
|
||||
|
||||
Please see LANGUAGE for this information
|
||||
Anope has a powerful option in NickServ allowing users to choose what
|
||||
language it must use when sending messages to users. Messages are stored
|
||||
in language files (located in the lang directory).
|
||||
|
||||
Anope is currently provided with thirteen languages: Catalan, Dutch,
|
||||
English, French, German, Greek, Hungarian, Italian, Polish, Portuguese,
|
||||
Russian, Spanish and Turkish. If you want to translate Anope messages
|
||||
into another language, follow this instructions:
|
||||
|
||||
* Copy the lang/en_us.l file to a meaningful name (for example, if
|
||||
you would like to translate messages in Spanish, you would rename
|
||||
it to es.l).
|
||||
|
||||
* Edit the file with your favorite text editor. Carefully read the
|
||||
instructions given at the top of the file, and start translating
|
||||
the whole file. The file is big, so make sure you have some coffee
|
||||
available ;) Try to avoid the use of English words as much as
|
||||
possible. If the new language contains only a few 'special'
|
||||
characters, try and use latin representations of it, if possible.
|
||||
Remember that most clients are only capable of handling the
|
||||
ISO-8859-1 charset. Of course, if you are translating Anope to a
|
||||
language with a totally different charset, such as Russian, feel
|
||||
free to use the one that suites it best (and the one that is in use
|
||||
by most speakers of that language ;)).
|
||||
|
||||
* When this is done, you have two solutions: either patch Services
|
||||
source code so they take in account the new language file
|
||||
(basically, you'll have to modify lang/Makefile, language.c and
|
||||
maybe services.h), or send us the translated file so we can make
|
||||
the patch and include your language in the next Anope release.
|
||||
|
||||
* Note that there is a language tool on bin/langtool.pl that can aid
|
||||
the verification process on newly created language files. Try to
|
||||
use it before you submit a language file.
|
||||
|
||||
When new major releases come out, you'll not have to retranslate the
|
||||
whole file; the Changes.lang file will help you to know which messages
|
||||
were added, modified or deleted.
|
||||
|
||||
If you did a language file translation, and want to let others use it,
|
||||
please send it to team@anope.org (don't forget to mention clearly your
|
||||
(nick)name, your e-mail and the language name). You'll of course get full
|
||||
credit for it, and will even get future final major releases before
|
||||
anyone else to complete the translation!... ;)
|
||||
|
||||
6) Contact
|
||||
|
||||
For announcements and discussions about Anope, please visit our
|
||||
Portal and Forums at https://www.anope.org/ -- make sure you register
|
||||
yourself to get full benefits.
|
||||
Portal and Forums at http://www.anope.org/ -- make sure you register
|
||||
yourself and your network to get full benefits.
|
||||
|
||||
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.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.
|
||||
|
||||
The more precise you are the sooner you'll be likely to get an answer.
|
||||
channel (irc.anope.org #anope). Once you join our Support channel, just
|
||||
type "? report" for instructions on how to report a Bug. 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. The more precise you are,
|
||||
the sooner you'll be likely to get an answer.
|
||||
|
||||
If you think you found a bug, add it to the bug tracking system
|
||||
(https://github.com/anope/anope/issues) and - again - be as precise as possible.
|
||||
Also say whether the bug happens always or under what circumstances, and anything
|
||||
(http://bugs.anope.org) and - again - be as precise as possible. Also say
|
||||
whether the bug happens always or under what circumstances, and anything
|
||||
that could be useful to track your bug down. If you wrote a patch, send
|
||||
it over. :)
|
||||
|
||||
@@ -1,270 +0,0 @@
|
||||
// SPDX-License-Identifier: CC0-1.0
|
||||
"use strict";
|
||||
|
||||
/** Implements methods for accessing an Anope JSON-RPC server. */
|
||||
class AnopeRPC {
|
||||
|
||||
/**
|
||||
* Initializes a new AnopeRPC instance with the specified RPC host.
|
||||
*
|
||||
* @param {string} host The RPC host base URL.
|
||||
* @param {string} token The bearer token for authorizing with the RPC interface.
|
||||
*/
|
||||
constructor(host, token = "") {
|
||||
this.host = host;
|
||||
this.token = token;
|
||||
}
|
||||
|
||||
/**
|
||||
* Executes an arbitrary RPC query.
|
||||
*
|
||||
* @param {string} method The name of the method to execute.
|
||||
* @param {...*} params The parameters pass to the method.
|
||||
* @returns {*} The result of the RPC query.
|
||||
*/
|
||||
async run(method, ...params) {
|
||||
const body = JSON.stringify({
|
||||
"jsonrpc": "2.0",
|
||||
"method": method,
|
||||
"params": params.map((p) => p.toString()),
|
||||
"id": Math.random().toString(36).slice(2)
|
||||
});
|
||||
const headers = new Headers();
|
||||
if (this.token) {
|
||||
headers.append("Authorization", `Bearer ${btoa(this.token)}`);
|
||||
}
|
||||
const response = await fetch(this.host, {
|
||||
method: 'POST',
|
||||
headers: headers,
|
||||
body: body
|
||||
});
|
||||
if (!response.ok) {
|
||||
throw new Error(`HTTP returned ${response.status}`)
|
||||
}
|
||||
const json = await response.json();
|
||||
if ("error" in json) {
|
||||
throw new Error(`JSON-RPC returned ${json.error.code}: ${json.error.message}`)
|
||||
}
|
||||
if ("result" in json) {
|
||||
return json.result;
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
||||
/**
|
||||
* Retrieves a list of accounts.
|
||||
*
|
||||
* Requires the rpc_data module to be loaded.
|
||||
*
|
||||
* @param {string} detail The level of detail to request.
|
||||
* @returns {(array|object)} A list of accounts.
|
||||
*/
|
||||
listAccounts(detail = "name") {
|
||||
return this.run("anope.listAccounts", detail);
|
||||
}
|
||||
|
||||
/**
|
||||
* Retrieves information about the specified account.
|
||||
*
|
||||
* Requires the rpc_data module to be loaded.
|
||||
*
|
||||
* @param {string} name The name of the account.
|
||||
* @returns {object} An object containing information about the account.
|
||||
*/
|
||||
account(name) {
|
||||
return this.run("anope.account", name);
|
||||
}
|
||||
|
||||
/**
|
||||
* Retrieves a list of channels.
|
||||
*
|
||||
* Requires the rpc_data module to be loaded.
|
||||
*
|
||||
* @param {string} detail The level of detail to request.
|
||||
* @returns {(array|object)} A list of channels.
|
||||
*/
|
||||
listChannels(detail = "name") {
|
||||
return this.run("anope.listChannels", detail);
|
||||
}
|
||||
|
||||
/**
|
||||
* Retrieves information about the specified channel.
|
||||
*
|
||||
* Requires the rpc_data module to be loaded.
|
||||
*
|
||||
* @param {string} name The name of the channel.
|
||||
* @returns {object} An object containing information about the channel.
|
||||
*/
|
||||
channel(name) {
|
||||
return this.run("anope.channel", name);
|
||||
}
|
||||
|
||||
/**
|
||||
* Retrieves a list of services operators.
|
||||
*
|
||||
* Requires the rpc_data module to be loaded.
|
||||
*
|
||||
* @param {string} detail The level of detail to request.
|
||||
* @returns {(array|object)} A list of services operators.
|
||||
*/
|
||||
listOpers(detail = "name") {
|
||||
return this.run("anope.listOpers", detail);
|
||||
}
|
||||
|
||||
/**
|
||||
* Retrieves information about the specified services operator.
|
||||
*
|
||||
* Requires the rpc_data module to be loaded.
|
||||
*
|
||||
* @param {string} name The name of the services operator.
|
||||
* @returns {object} An object containing information about the services operator.
|
||||
*/
|
||||
oper(name) {
|
||||
return this.run("anope.oper", name);
|
||||
}
|
||||
|
||||
/**
|
||||
* Retrieves a list of servers.
|
||||
*
|
||||
* Requires the rpc_data module to be loaded.
|
||||
*
|
||||
* @param {string} detail The level of detail to request.
|
||||
* @returns {(array|object)} A list of servers.
|
||||
*/
|
||||
listServers(detail = "name") {
|
||||
return this.run("anope.listServers", detail);
|
||||
}
|
||||
|
||||
/**
|
||||
* Retrieves information about the specified server.
|
||||
*
|
||||
* Requires the rpc_data module to be loaded.
|
||||
*
|
||||
* @param {string} name The name of the server.
|
||||
* @returns {object} An object containing information about the server.
|
||||
*/
|
||||
server(name) {
|
||||
return this.run("anope.server", name);
|
||||
}
|
||||
|
||||
/**
|
||||
* Retrieves a list of users.
|
||||
*
|
||||
* Requires the rpc_data module to be loaded.
|
||||
*
|
||||
* @param {string} detail The level of detail to request.
|
||||
* @returns {(array|object)} A list of users.
|
||||
*/
|
||||
listUsers(detail = "name") {
|
||||
return this.run("anope.listUsers", detail);
|
||||
}
|
||||
|
||||
/**
|
||||
* Retrieves information about the specified user.
|
||||
*
|
||||
* Requires the rpc_data module to be loaded.
|
||||
*
|
||||
* @param {string} nick The nick of the user.
|
||||
* @returns {object} An object containing information about the user.
|
||||
*/
|
||||
user(nick) {
|
||||
return this.run("anope.user", nick);
|
||||
}
|
||||
|
||||
/**
|
||||
* Sends a message to every user on the network.
|
||||
*
|
||||
* Requires the rpc_message module to be loaded.
|
||||
*
|
||||
* @param {...*} messages One or more messages to send.
|
||||
*/
|
||||
messageNetwork(...messages) {
|
||||
return this.run("anope.messageNetwork", ...messages);
|
||||
}
|
||||
|
||||
/**
|
||||
* Sends a message to every user on the specified server.
|
||||
*
|
||||
* Requires the rpc_message module to be loaded.
|
||||
*
|
||||
* @param {string} name The name of the server.
|
||||
* @param {...*} messages One or more messages to send.
|
||||
*/
|
||||
messageServer(server, ...messages) {
|
||||
return this.run("anope.messageServer", server, ...messages);
|
||||
}
|
||||
|
||||
/**
|
||||
* Sends a message to the specified user.
|
||||
*
|
||||
* Requires the rpc_message module to be loaded.
|
||||
*
|
||||
* @param {string} source The source pseudoclient to send the message from.
|
||||
* @param {string} target The target user to send the message to.
|
||||
* @param {...*} messages One or more messages to send.
|
||||
*/
|
||||
messageUser(source, target, ...messages) {
|
||||
return this.run("anope.messageUser", source, target, ...messages);
|
||||
}
|
||||
|
||||
/**
|
||||
* Checks whether the specified credentials are valid.
|
||||
*
|
||||
* Requires the rpc_user module to be loaded.
|
||||
*
|
||||
* @param {string} account A nickname belonging to the account to check.
|
||||
* @param {string} password The password for the specified account.
|
||||
* @returns {object} An object containing basic information about the account.
|
||||
*/
|
||||
checkCredentials(account, password) {
|
||||
return this.run("anope.checkCredentials", account, password);
|
||||
}
|
||||
|
||||
/**
|
||||
* Identifies an IRC user to the specified account.
|
||||
*
|
||||
* Requires the rpc_user module to be loaded.
|
||||
*
|
||||
* @param {string} account Either an account identifier or nickname belonging to the account to
|
||||
* identify to.
|
||||
* @param {string} password The nickname of the IRC user to identify to the account.
|
||||
*/
|
||||
identify(account, user) {
|
||||
return this.run("anope.identify", account, user);
|
||||
}
|
||||
|
||||
/**
|
||||
* Lists all commands that exist on the network.
|
||||
*
|
||||
* Requires the rpc_user module to be loaded.
|
||||
*
|
||||
* @param {...*} services The nicknames of the services to list commands for.
|
||||
* @returns {object} An object containing information about the available commands.
|
||||
*/
|
||||
listCommands(...services) {
|
||||
return this.run("anope.listCommands", ...services);
|
||||
}
|
||||
|
||||
/**
|
||||
* Lists all commands that exist on the network.
|
||||
*
|
||||
* Requires the rpc_user module to be loaded.
|
||||
*
|
||||
* @param {string} account If non-empty then the account to execute the command as.
|
||||
* @param {string} service The service which the command exists on.
|
||||
* @param {...*} command The the command to execute and any parameters to pass to it.
|
||||
* @returns {object} An object containing information about the available commands.
|
||||
*/
|
||||
command(account, service, ...command) {
|
||||
return this.run("anope.command", account, service, ...command);
|
||||
}
|
||||
}
|
||||
|
||||
/*
|
||||
const arpc = new AnopeRPC("http://127.0.0.1:8080/jsonrpc");
|
||||
arpc.listServers("full").then(servers => {
|
||||
console.log(servers);
|
||||
}).catch (error => {
|
||||
console.log(error);
|
||||
});
|
||||
*/
|
||||
@@ -1,242 +0,0 @@
|
||||
# SPDX-License-Identifier: CC0-1.0
|
||||
|
||||
require "base64"
|
||||
require "json"
|
||||
require "net/http"
|
||||
|
||||
# Implements methods for accessing an Anope JSON-RPC server.
|
||||
class AnopeRPC
|
||||
|
||||
# The RPC host base URL.
|
||||
attr_accessor :host
|
||||
|
||||
# The bearer token for authorizing with the RPC interface.
|
||||
attr_accessor :token
|
||||
|
||||
# Initializes a new AnopeRPC instance with the specified RPC host.
|
||||
#
|
||||
# @param host [String] The RPC host base URL.
|
||||
# @param token [String] The bearer token for authorizing with the RPC interface.
|
||||
def initialize(host, token = nil)
|
||||
@host = URI(host)
|
||||
@token = token
|
||||
end
|
||||
|
||||
# Executes an arbitrary RPC query.
|
||||
#
|
||||
# @param method [String] The name of the method to execute.
|
||||
# @param params [Object] The parameters pass to the method.
|
||||
# @return [Object] The result of the RPC query.
|
||||
private def run(method, *params)
|
||||
body = {
|
||||
jsonrpc: "2.0",
|
||||
method: method,
|
||||
params: params.map(&:to_s),
|
||||
id: rand(36**16).to_s(36)
|
||||
}.to_json
|
||||
|
||||
headers = {}
|
||||
headers["Authorization"] = "Bearer #{Base64.strict_encode64(@token)}" if @token
|
||||
|
||||
response = Net::HTTP.post(@host, body, headers)
|
||||
raise "HTTP returned #{response.status}" unless response.is_a?(Net::HTTPSuccess)
|
||||
|
||||
json = JSON.parse(response.body, symbolize_names: true)
|
||||
raise "JSON-RPC returned #{json[:error][:code]}: #{json[:error][:message]}" if json.key?(:error)
|
||||
|
||||
json.dig(:result)
|
||||
end
|
||||
|
||||
# Retrieves a list of accounts.
|
||||
#
|
||||
# Requires the rpc_data module to be loaded.
|
||||
#
|
||||
# @param detail [Symbol] detail The level of detail to request.
|
||||
# @return [Array] If the detail level is set to :name then an array of account names.
|
||||
# @return [Hash] If the detail level is set to :full then a hash of information about the
|
||||
# accounts.
|
||||
def list_accounts(detail = :name)
|
||||
self.run("anope.listAccounts", detail)
|
||||
end
|
||||
|
||||
# Retrieves information about the specified account.
|
||||
#
|
||||
# Requires the rpc_data module to be loaded.
|
||||
#
|
||||
# @param name [String] The name of the account.
|
||||
# @return [Hash] A hash containing information about the account.
|
||||
def account(name)
|
||||
self.run("anope.account", name)
|
||||
end
|
||||
|
||||
# Retrieves a list of channels.
|
||||
#
|
||||
# Requires the rpc_data module to be loaded.
|
||||
#
|
||||
# @param detail [Symbol] detail The level of detail to request.
|
||||
# @return [Array] If the detail level is set to :name then an array of channel names.
|
||||
# @return [Hash] If the detail level is set to :full then a hash of information about the
|
||||
# channels.
|
||||
def list_channels(detail = :name)
|
||||
self.run("anope.listChannels", detail)
|
||||
end
|
||||
|
||||
# Retrieves information about the specified channel.
|
||||
#
|
||||
# Requires the rpc_data module to be loaded.
|
||||
#
|
||||
# @param name [String] The name of the channel.
|
||||
# @return [Hash] A hash containing information about the channel.
|
||||
def channel(name)
|
||||
self.run("anope.channel", name)
|
||||
end
|
||||
|
||||
# Retrieves a list of services operators.
|
||||
#
|
||||
# Requires the rpc_data module to be loaded.
|
||||
#
|
||||
# @param detail [Symbol] detail The level of detail to request.
|
||||
# @return [Array] If the detail level is set to :name then an array of services operator names.
|
||||
# @return [Hash] If the detail level is set to :full then a hash of information about the
|
||||
# services operators.
|
||||
def list_opers(detail = :name)
|
||||
self.run("anope.listOpers", detail)
|
||||
end
|
||||
|
||||
# Retrieves information about the specified services operator.
|
||||
#
|
||||
# Requires the rpc_data module to be loaded.
|
||||
#
|
||||
# @param name [String] The name of the services operator.
|
||||
# @return [Hash] A hash containing information about the services operator.
|
||||
def oper(name)
|
||||
self.run("anope.oper", name)
|
||||
end
|
||||
|
||||
# Retrieves a list of servers.
|
||||
#
|
||||
# Requires the rpc_data module to be loaded.
|
||||
#
|
||||
# @param detail [Symbol] detail The level of detail to request.
|
||||
# @return [Array] If the detail level is set to :name then an array of server names.
|
||||
# @return [Hash] If the detail level is set to :full then a hash of information about the
|
||||
# servers.
|
||||
def list_servers(detail = :name)
|
||||
self.run("anope.listServers", detail)
|
||||
end
|
||||
|
||||
# Retrieves information about the specified server.
|
||||
#
|
||||
# Requires the rpc_data module to be loaded.
|
||||
#
|
||||
# @param name [String] The name of the server.
|
||||
# @return [Hash] A hash containing information about the server.
|
||||
def server(name)
|
||||
self.run("anope.server", name)
|
||||
end
|
||||
|
||||
# Retrieves a list of users.
|
||||
#
|
||||
# Requires the rpc_data module to be loaded.
|
||||
#
|
||||
# @param detail [Symbol] detail The level of detail to request.
|
||||
# @return [Array] If the detail level is set to :name then an array of user nicknames.
|
||||
# @return [Hash] If the detail level is set to :full then a hash of information about the
|
||||
# users.
|
||||
def list_users(detail = :name)
|
||||
self.run("anope.listUsers", detail)
|
||||
end
|
||||
|
||||
# Retrieves information about the specified user.
|
||||
#
|
||||
# Requires the rpc_data module to be loaded.
|
||||
#
|
||||
# @param name [String] The name of the user.
|
||||
# @return [Hash] A hash containing information about the user.
|
||||
def user(name)
|
||||
self.run("anope.user", name)
|
||||
end
|
||||
|
||||
# Sends a message to every user on the network.
|
||||
#
|
||||
# Requires the rpc_message module to be loaded.
|
||||
#
|
||||
# @param messages [Array<String>] One or more messages to send.
|
||||
def message_network(*messages)
|
||||
self.run("anope.messageNetwork", *messages)
|
||||
end
|
||||
|
||||
# Sends a message to every user on the specified server.
|
||||
#
|
||||
# Requires the rpc_message module to be loaded.
|
||||
#
|
||||
# @param name [String] The name of the server.
|
||||
# @param messages [Array<String>] One or more messages to send.
|
||||
def message_server(server, *messages)
|
||||
self.run("anope.messageServer", server, *messages)
|
||||
end
|
||||
|
||||
# Sends a message to the specified user.
|
||||
#
|
||||
# Requires the rpc_message module to be loaded.
|
||||
#
|
||||
# @param source [String] The source pseudoclient to send the message from.
|
||||
# @param target [String] The target user to send the message to.
|
||||
# @param messages [Array<String>] One or more messages to send.
|
||||
def message_user(source, target, *messages)
|
||||
self.run("anope.messageUser", source, target, *messages)
|
||||
end
|
||||
|
||||
# Checks whether the specified credentials are valid.
|
||||
#
|
||||
# Requires the rpc_user module to be loaded.
|
||||
#
|
||||
# @param account [String] A nickname belonging to the account to check.
|
||||
# @param password [String] The password for the specified account.
|
||||
# @return [Hash] A hash containing basic information about the account.
|
||||
def check_credentials(account, password)
|
||||
self.run("anope.checkCredentials", account, password)
|
||||
end
|
||||
|
||||
# Identifies an IRC user to the specified account.
|
||||
#
|
||||
# Requires the rpc_user module to be loaded.
|
||||
#
|
||||
# @param account [String] Either an account identifier or nickname belonging to the account to
|
||||
# identify to.
|
||||
# @param password [String] The nickname of the IRC user to identify to the account.
|
||||
def identify(account, user)
|
||||
self.run("anope.identify", account, user)
|
||||
end
|
||||
|
||||
# Lists all commands that exist on the network.
|
||||
#
|
||||
# Requires the rpc_user module to be loaded.
|
||||
#
|
||||
# @param services [Array<String>] The nicknames of the services to list commands for.
|
||||
# @return [Hash] A hash containing information about the available commands.
|
||||
def list_commands(*services)
|
||||
self.run("anope.listCommands", *services)
|
||||
end
|
||||
|
||||
# Lists all commands that exist on the network.
|
||||
#
|
||||
# Requires the rpc_user module to be loaded.
|
||||
#
|
||||
# @param account [String] If non-empty then the account to execute the command as.
|
||||
# @param service [String] The service which the command exists on.
|
||||
# @param command [Array<String>] The the command to execute and any parameters to pass to it.
|
||||
# @return [Hash] A hash containing information about the available commands.
|
||||
def command(account, service, *command)
|
||||
self.run("anope.command", account, service, *command)
|
||||
end
|
||||
end
|
||||
|
||||
=begin
|
||||
arpc = AnopeRPC.new("http://127.0.0.1:8080/jsonrpc")
|
||||
begin
|
||||
pp arpc.list_servers(:full)
|
||||
rescue StandardError => err
|
||||
STDERR.puts err
|
||||
end
|
||||
=end
|
||||
@@ -1,463 +0,0 @@
|
||||
# Anope `rpc_data` RPC interface
|
||||
|
||||
## `anope.listAccounts`
|
||||
|
||||
Lists all accounts that exist on the network.
|
||||
|
||||
### Parameters
|
||||
|
||||
Index | Description
|
||||
----- | -----------
|
||||
0 | If specified then the level of detail to retrieve. Can be set to "full" to retrieve all information or "name" to just retrieve the account names. Defaults to "name".
|
||||
|
||||
### Errors
|
||||
|
||||
Code | Description
|
||||
------ | -----------
|
||||
-32099 | The specified detail level does not exist.
|
||||
|
||||
### Result
|
||||
|
||||
If the detail level is not specified or is "name" then an array of account names.
|
||||
|
||||
If the detail level is "full" then a mapping of account names to information about the account. See `anope.account` for more information on the data structure.
|
||||
|
||||
#### Example
|
||||
|
||||
```json
|
||||
["account1", "account2", "account3"]
|
||||
```
|
||||
|
||||
## `anope.account`
|
||||
|
||||
Retrieves information about the specified account.
|
||||
|
||||
### Parameters
|
||||
|
||||
Index | Description
|
||||
----- | -----------
|
||||
0 | Either a nickname belonging to the account or an account identifier.
|
||||
|
||||
### Errors
|
||||
|
||||
Code | Description
|
||||
------ | -----------
|
||||
-32099 | The specified account does not exist.
|
||||
|
||||
### Result
|
||||
|
||||
Returns a map containing information about the account.
|
||||
|
||||
Key | Type | Description
|
||||
--- | ---- | -----------
|
||||
display | string | The display nickname of the account.
|
||||
email | string or null | The email address associated with the account or null if one has not been specified.
|
||||
extensions | map | A key-value map of the extensions set on this account by modules.
|
||||
language | string or null | The language associated with the account or null if the account uses the default language.
|
||||
lastmail | int | The time at which an email was last sent for this account.
|
||||
nicks | map | Information about nicknames that belong to the account keyed by the nickname.
|
||||
nicks.\*.extensions | map | A key-value map of the extensions set on this nickname by modules.
|
||||
nicks.\*.lastseen | int | The time at which this nickname was last used.
|
||||
nicks.\*.registered | int | The time at which this nickname was registered.
|
||||
nicks.\*.vhost | map or null | The vhost associated with the account or null if the user has no vhost.
|
||||
nicks.\*.vhost.created | int | The time at which the vhost was created.
|
||||
nicks.\*.vhost.creator | string | The nickname of the creator of the vhost.
|
||||
nicks.\*.vhost.host | string | The host segment of the vhost.
|
||||
nicks.\*.vhost.ident | string or null | The ident segment of the vhost or null if there is not one.
|
||||
nicks.\*.vhost.mask | string | The user@host or host mask of the vhost.
|
||||
opertype | map or null | The oper type associated with the account or null if they are not a services operator.
|
||||
opertype.commands | array[string] | The commands that the services operator type can use.
|
||||
opertype.name | string | The name of the services operator type.
|
||||
opertype.privileges | array[string] | The privileges that the services operator type has.
|
||||
registered | int | The time at which the account was registered.
|
||||
uniqueid | uint | The unique immutable identifier of the account.
|
||||
users | array[string] | The IRC users who are currently logged in to this account.
|
||||
|
||||
#### Example
|
||||
|
||||
```json
|
||||
{
|
||||
"display": "foo",
|
||||
"email": "example@example.com",
|
||||
"extensions": {
|
||||
"AUTOOP": true,
|
||||
"HIDE_EMAIL": true,
|
||||
"HIDE_MASK": true,
|
||||
"MEMO_RECEIVE": true,
|
||||
"MEMO_SIGNON": true,
|
||||
"NS_PRIVATE": true,
|
||||
"PROTECT": true,
|
||||
"PROTECT_AFTER": 69
|
||||
},
|
||||
"language": null,
|
||||
"lastmail": 1745071858,
|
||||
"nicks": {
|
||||
"foo": {
|
||||
"extensions": {
|
||||
"NS_NO_EXPIRE": true
|
||||
},
|
||||
"lastseen": 1745074153,
|
||||
"registered": 1745071857,
|
||||
"vhost": null
|
||||
},
|
||||
"bar": {
|
||||
"extensions": {},
|
||||
"lastseen": 1745072602,
|
||||
"registered": 1745071857,
|
||||
"vhost": {
|
||||
"created": 1745072653,
|
||||
"creator": "foo",
|
||||
"host": "bar.baz",
|
||||
"ident": "foo",
|
||||
"mask": "foo@bar.baz"
|
||||
}
|
||||
}
|
||||
},
|
||||
"opertype": {
|
||||
"commands": ["hostserv/*", "operserv/session"],
|
||||
"name": "Helper",
|
||||
"privileges": ["chanserv/no-register-limit"]
|
||||
},
|
||||
"registered": 1745071857,
|
||||
"uniqueid": 11085415958920757000,
|
||||
"users": [
|
||||
"foo"
|
||||
]
|
||||
}
|
||||
```
|
||||
## `anope.listChannels`
|
||||
|
||||
Lists all channels that exist on the network.
|
||||
|
||||
### Parameters
|
||||
|
||||
Index | Description
|
||||
----- | -----------
|
||||
0 | If specified then the level of detail to retrieve. Can be set to "full" to retrieve all information or "name" to just retrieve the channel names. Defaults to "name".
|
||||
|
||||
### Errors
|
||||
|
||||
Code | Description
|
||||
------ | -----------
|
||||
-32099 | The specified detail level does not exist.
|
||||
|
||||
### Result
|
||||
|
||||
If the detail level is not specified or is "name" then an array of channel names.
|
||||
|
||||
If the detail level is "full" then a mapping of channel names to information about the channel. See `anope.channel` for more information on the data structure.
|
||||
|
||||
#### Example
|
||||
|
||||
```json
|
||||
["#chan1", "#chan2", "#chan3"]
|
||||
```
|
||||
|
||||
## `anope.channel`
|
||||
|
||||
Retrieves information about the specified channel.
|
||||
|
||||
### Parameters
|
||||
|
||||
Index | Description
|
||||
----- | -----------
|
||||
0 | The name of the channel.
|
||||
|
||||
### Errors
|
||||
|
||||
Code | Description
|
||||
------ | -----------
|
||||
-32099 | The specified channel does not exist.
|
||||
|
||||
### Result
|
||||
|
||||
Returns a map containing information about the channel.
|
||||
|
||||
Key | Type | Description
|
||||
--- | ---- | -----------
|
||||
created | int | The UNIX time at which the channel was originally created.
|
||||
listmodes | map | List modes which are set on the channel keyed by the mode character.
|
||||
modes | array[string] | Flag and parameter modes which are set on the channel.
|
||||
name | string | The name of the channel.
|
||||
registered | boolean | Whether the channel is registered.
|
||||
topic | map or null | The channel topic or null if no topic is set.
|
||||
topic.setat | int | The time at which the topic was set.
|
||||
topic.setby | string | The nick or nuh of the user who set the topic.
|
||||
topic.value | string | The text of the topic.
|
||||
users | array[string] | The users that are current in the channel prefixed by their status mode prefixes.
|
||||
|
||||
#### Example
|
||||
|
||||
```json
|
||||
{
|
||||
"created": 1740402691,
|
||||
"listmodes": {
|
||||
"b": ["foo!bar@baz", "account:bax"],
|
||||
},
|
||||
"modes": ["+knrt", "secret"],
|
||||
"name": "#chan1",
|
||||
"registered": true,
|
||||
"topic": {
|
||||
"setat": 1740404706,
|
||||
"setby": "nick1",
|
||||
"value": "Example channel topic"
|
||||
},
|
||||
"users": ["@nick1", "nick2"]
|
||||
}
|
||||
```
|
||||
|
||||
## `anope.listOpers`
|
||||
|
||||
Lists all services operators that exist on the network.
|
||||
|
||||
### Parameters
|
||||
|
||||
Index | Description
|
||||
----- | -----------
|
||||
0 | If specified then the level of detail to retrieve. Can be set to "full" to retrieve all information or "name" to just retrieve the services operator nicknames. Defaults to "name".
|
||||
|
||||
### Errors
|
||||
|
||||
Code | Description
|
||||
------ | -----------
|
||||
-32099 | The specified detail level does not exist.
|
||||
|
||||
### Result
|
||||
|
||||
If the detail level is not specified or is "name" then an array of services operator names.
|
||||
|
||||
If the detail level is "full" then a mapping of services operator names to information about the services operator. See `anope.oper` for more information on the data structure.
|
||||
|
||||
#### Example
|
||||
|
||||
```json
|
||||
["nick1", "nick2", "nick3"]
|
||||
```
|
||||
|
||||
## `anope.oper`
|
||||
|
||||
Retrieves information about the specified services operator.
|
||||
|
||||
### Parameters
|
||||
|
||||
Index | Description
|
||||
----- | -----------
|
||||
0 | The name of the services operator.
|
||||
|
||||
### Errors
|
||||
|
||||
Code | Description
|
||||
------ | -----------
|
||||
-32099 | The specified services operator does not exist.
|
||||
|
||||
### Result
|
||||
|
||||
Returns a map containing information about the services operator.
|
||||
|
||||
Key | Type | Description
|
||||
--- | ---- | -----------
|
||||
fingerprints | array[string] or null | The client certificate fingerprints that a user must be using to log in as this services operator or null if there are no client certificate restrictions.
|
||||
hosts | array[string] or null | The user@ip and user@ip masks that a user must be connecting from to log in as this services operator or null if there are no host restrictions.
|
||||
name | string | The name of the services operator.
|
||||
operonly | boolean | Whether a user has to be a server operator to log in as this services operator.
|
||||
opertype | map | The oper type associated with the services operator.
|
||||
opertype.commands | array[string] | The commands that the services operator type can use.
|
||||
opertype.name | string | The name of the services operator type.
|
||||
opertype.privileges | array[string] | The privileges that the services operator type has.
|
||||
password | boolean | Whether a user has to specify a password to log in as the services operator.
|
||||
vhost | string or null | The vhost of the services operator or null if there is no vhost.
|
||||
|
||||
#### Example
|
||||
|
||||
```json
|
||||
{
|
||||
"fingerprints": null,
|
||||
"hosts": ["*@*.example.com"],
|
||||
"name": "stest",
|
||||
"operonly": true,
|
||||
"opertype": {
|
||||
"commands": ["hostserv/*", "operserv/session"],
|
||||
"name": "Helper",
|
||||
"privileges": ["chanserv/no-register-limit"]
|
||||
},
|
||||
"password": false,
|
||||
"vhost": null
|
||||
}
|
||||
```
|
||||
|
||||
## `anope.listServers`
|
||||
|
||||
Lists all servers that exist on the network.
|
||||
|
||||
### Parameters
|
||||
|
||||
Index | Description
|
||||
----- | -----------
|
||||
0 | If specified then the level of detail to retrieve. Can be set to "full" to retrieve all information or "name" to just retrieve the server names. Defaults to "name".
|
||||
|
||||
### Errors
|
||||
|
||||
Code | Description
|
||||
------ | -----------
|
||||
-32099 | The specified detail level does not exist.
|
||||
|
||||
### Result
|
||||
|
||||
If the detail level is not specified or is "name" then an array of server names.
|
||||
|
||||
If the detail level is "full" then a mapping of server names to information about the server. See `anope.server` for more information on the data structure.
|
||||
|
||||
#### Example
|
||||
|
||||
```json
|
||||
["irc1.example.com", "irc2.example.com", "services.example.com"]
|
||||
```
|
||||
|
||||
## `anope.server`
|
||||
|
||||
Retrieves information about the specified server.
|
||||
|
||||
### Parameters
|
||||
|
||||
Index | Description
|
||||
----- | -----------
|
||||
0 | The name of the server.
|
||||
|
||||
### Errors
|
||||
|
||||
Code | Description
|
||||
------ | -----------
|
||||
-32099 | The specified server does not exist.
|
||||
|
||||
### Result
|
||||
|
||||
Returns a map containing information about the server.
|
||||
|
||||
Key | Type | Description
|
||||
--- | ---- | -----------
|
||||
description | string | The description of the server.
|
||||
downlinks | array[string] | The servers which are behind this server
|
||||
juped | boolean | Whether the server has been juped.
|
||||
name | string | The name of the server.
|
||||
sid | string or null | The unique immutable identifier of the server or null if the IRCd does not use SIDs.
|
||||
synced | boolean | Whether the server has finished syncing.
|
||||
ulined | boolean | Whether the server is U-lined.
|
||||
uplink | string or null | The server in front of this server or null if it is the services server.
|
||||
|
||||
#### Example
|
||||
|
||||
```json
|
||||
{
|
||||
"description": "Anope IRC Services",
|
||||
"downlinks": ["irc.example.com"],
|
||||
"juped": false,
|
||||
"name": "services.example.com",
|
||||
"sid": "00B",
|
||||
"synced": true,
|
||||
"ulined": true,
|
||||
"uplink": null
|
||||
}
|
||||
```
|
||||
|
||||
## `anope.listUsers`
|
||||
|
||||
Lists all users that exist on the network.
|
||||
|
||||
### Parameters
|
||||
|
||||
Index | Description
|
||||
----- | -----------
|
||||
0 | If specified then the level of detail to retrieve. Can be set to "full" to retrieve all information or "name" to just retrieve the user nicknames. Defaults to "name".
|
||||
|
||||
### Errors
|
||||
|
||||
Code | Description
|
||||
------ | -----------
|
||||
-32099 | The specified detail level does not exist.
|
||||
|
||||
### Result
|
||||
|
||||
If the detail level is not specified or is "name" then an array of user nicknames.
|
||||
|
||||
If the detail level is "full" then a mapping of user nicknames to information about the user. See `anope.user` for more information on the data structure.
|
||||
|
||||
#### Example
|
||||
|
||||
```json
|
||||
["nick1", "nick2", "nick3"]
|
||||
```
|
||||
|
||||
## `anope.user`
|
||||
|
||||
Retrieves information about the specified user.
|
||||
|
||||
### Parameters
|
||||
|
||||
Index | Description
|
||||
----- | -----------
|
||||
0 | The nickname of the user.
|
||||
|
||||
### Errors
|
||||
|
||||
Code | Description
|
||||
------ | -----------
|
||||
-32099 | The specified user does not exist.
|
||||
|
||||
### Result
|
||||
|
||||
Returns a map containing information about the user.
|
||||
|
||||
Key | Type | Description
|
||||
--- | ---- | -----------
|
||||
account | map or null | The user's account or null if they are not logged in to an account.
|
||||
account.display | string | The display nickname of the account.
|
||||
account.opertype | string or null | The account's oper type or null if the account is not a services operator.
|
||||
account.uniqueid | uint | The unique immutable identifier of the account.
|
||||
address | string | The IP address the user is connecting from.
|
||||
away | map or null | The user's away state or null if they are not away.
|
||||
away.message | string | The away message specified by the user.
|
||||
away.time | int | The UNIX time at which the user went away.
|
||||
channels | array[string] | The channels that the user is in prefixed by their status mode prefixes.
|
||||
chost | string or null | The cloaked hostname of the user or null if they have no cloak.
|
||||
fingerprint | string or null | The fingerprint of the user's client certificate or null if they are not using one.
|
||||
host | string | The real hostname of the user.
|
||||
ident | string | The username (ident) of the user.
|
||||
modes | array[string] | Flag and parameter modes which are set on the user.
|
||||
nick | string | The nickname of the user.
|
||||
nickchanged | int | The time at which the user last changed their nickname.
|
||||
real | string | The real name of the user.
|
||||
server | string | The server that the user is connected to.
|
||||
signon | int | The time at which the user connected to the network.
|
||||
tls | bool | Whether the user is connected using TLS (SSL).
|
||||
uid | string or null | The unique immutable identifier of the user or null if the IRCd does not use UIDs.
|
||||
vhost | string or null | The virtual host of the user or null if they have no vhost.
|
||||
vident | string or null | The virtual ident (username) of the user or null if they have no vident.
|
||||
|
||||
#### Example
|
||||
|
||||
```json
|
||||
{
|
||||
"account": {
|
||||
"display": "nick1",
|
||||
"opertype": "Services Root",
|
||||
"uniqueid": "17183514657819486040"
|
||||
},
|
||||
"address": "127.0.0.1",
|
||||
"away": null,
|
||||
"channels": ["@#chan1", "#chan2"],
|
||||
"chost": "localhost",
|
||||
"fingerprint": null,
|
||||
"host": "localhost",
|
||||
"id": "9TSAAAAAA",
|
||||
"ident": "user1",
|
||||
"modes": ["+r"],
|
||||
"nick": "nick1",
|
||||
"nickchanged": 1740408318,
|
||||
"real": "An IRC User",
|
||||
"server": "irc.example.com",
|
||||
"signon": 1740408296,
|
||||
"tls": true,
|
||||
"vhost": "staff.example.com",
|
||||
"vident": null,
|
||||
}
|
||||
```
|
||||
@@ -1,67 +0,0 @@
|
||||
# Anope `rpc_message` RPC interface
|
||||
|
||||
## `anope.messageNetwork`
|
||||
|
||||
Sends a message to all users on the network.
|
||||
|
||||
### Parameters
|
||||
|
||||
Index | Description
|
||||
----- | -----------
|
||||
0+ | One or more messages to send.
|
||||
|
||||
### Errors
|
||||
|
||||
Code | Description
|
||||
------ | -----------
|
||||
-32099 | The global service is not available.
|
||||
|
||||
### Result
|
||||
|
||||
This procedure returns no result.
|
||||
|
||||
## `anope.messageServer`
|
||||
|
||||
Sends a message to all users on the specified server.
|
||||
|
||||
### Parameters
|
||||
|
||||
Index | Description
|
||||
----- | -----------
|
||||
0 | The name of the server to message users on.
|
||||
1+ | One or more messages to send.
|
||||
|
||||
### Errors
|
||||
|
||||
Code | Description
|
||||
------ | -----------
|
||||
-32099 | The global service is not available.
|
||||
-32098 | The specified server does not exist.
|
||||
|
||||
### Result
|
||||
|
||||
This procedure returns no result.
|
||||
|
||||
## `anope.messageUser`
|
||||
|
||||
Sends a message to the specified user.
|
||||
|
||||
### Parameters
|
||||
|
||||
Index | Description
|
||||
----- | -----------
|
||||
0 | The source pseudoclient to send the message from.
|
||||
1 | The target user to send the message to.
|
||||
2+ | One or more messages to send.
|
||||
|
||||
### Errors
|
||||
|
||||
Code | Description
|
||||
------ | -----------
|
||||
-32099 | The specified source does not exist.
|
||||
-32098 | The specified target does not exist.
|
||||
|
||||
### Result
|
||||
|
||||
This procedure returns no result.
|
||||
|
||||
@@ -1,175 +0,0 @@
|
||||
# Anope `rpc_user` RPC interface
|
||||
|
||||
## `anope.checkCredentials`
|
||||
|
||||
Checks whether the specified credentials are valid.
|
||||
|
||||
### Parameters
|
||||
|
||||
Index | Description
|
||||
----- | -----------
|
||||
0 | A nickname belonging to the account to check.
|
||||
1 | The password for the specified account.
|
||||
|
||||
### Errors
|
||||
|
||||
Code | Description
|
||||
------ | -----------
|
||||
-32099 | The specified account does not exist.
|
||||
-32098 | The specified password is not correct.
|
||||
-32097 | The specified account is suspended.
|
||||
|
||||
### Result
|
||||
|
||||
Returns a map containing basic information about the account. More information about the account can be found by calling [the `anope.account` event using the value from the `uniqueid` field (requires the rpc_data module)](./rpc_user.md).
|
||||
|
||||
Key | Type | Description
|
||||
--- | ---- | -----------
|
||||
account | string | The display nickname of the account.
|
||||
confirmed | boolean | Whether the account has been confirmed.
|
||||
uniqueid | uint | The unique immutable identifier of the account.
|
||||
|
||||
#### Example
|
||||
|
||||
```json
|
||||
{
|
||||
"account": "foo",
|
||||
"confirmed": true,
|
||||
"uniqueid": 11085415958920757000,
|
||||
}
|
||||
```
|
||||
|
||||
## `anope.identify`
|
||||
|
||||
Identifies an IRC user to the specified account.
|
||||
|
||||
### Parameters
|
||||
|
||||
Index | Description
|
||||
----- | -----------
|
||||
0 | Either an account identifier or nickname belonging to the account to identify to.
|
||||
1 | The nickname of the IRC user to identify to the account.
|
||||
|
||||
### Errors
|
||||
|
||||
Code | Description
|
||||
------ | -----------
|
||||
-32099 | The specified account does not exist.
|
||||
-32098 | The specified IRC user does not exist.
|
||||
|
||||
### Result
|
||||
|
||||
This procedure returns no result.
|
||||
|
||||
## `anope.listCommands`
|
||||
|
||||
Lists all commands that exist on the network.
|
||||
|
||||
### Parameters
|
||||
|
||||
Index | Description
|
||||
----- | -----------
|
||||
0...n | The nicknames of the services to list commands for. If none are specified then all commands are returned.
|
||||
|
||||
### Errors
|
||||
|
||||
Code | Description
|
||||
------ | -----------
|
||||
-32098 | The specified service does not exist.
|
||||
|
||||
### Result
|
||||
|
||||
Returns a map containing information about the available commands.
|
||||
|
||||
Key | Type | Description
|
||||
--- | ---- | -----------
|
||||
\* | map | A key-value map of services to the commands that exist on them.
|
||||
\*.\* | string | A key-value map of commands to information about the commands.
|
||||
\*.\*.group | string or null | The group that the command belongs to or null if the command is not grouped.
|
||||
\*.\*.hidden | boolean | Whether the command is visible in the help output.
|
||||
\*.\*.maxparams | uint or null | The maximum number of parameters that the command accepts or null if there is no limit.
|
||||
\*.\*.minparams | uint | The minimum number of parameters that the command accepts.
|
||||
\*.\*.permission | string or null | The services operator permission required to execute the command or null if no permissions are required.
|
||||
\*.\*.requiresaccount | boolean | Whether a caller must be logged into an account to execute the command.
|
||||
\*.\*.requiresuser | boolean | Whether an IRC user is required to execute the command.
|
||||
|
||||
#### Example
|
||||
|
||||
```json
|
||||
{
|
||||
"Global": {
|
||||
"GLOBAL": {
|
||||
"group": null,
|
||||
"hidden": false,
|
||||
"maxparams": 1,
|
||||
"minparams": 0,
|
||||
"permission": "global/global",
|
||||
"requiresaccount": true,
|
||||
"requiresuser": false
|
||||
},
|
||||
"HELP": {
|
||||
"group": null,
|
||||
"hidden": false,
|
||||
"maxparams": null,
|
||||
"minparams": 0,
|
||||
"permission": null,
|
||||
"requireaccount": false,
|
||||
"requireuser": false
|
||||
},
|
||||
"QUEUE": {
|
||||
"group": null,
|
||||
"hidden": false,
|
||||
"maxparams": 2,
|
||||
"minparams": 1,
|
||||
"permission": "global/queue",
|
||||
"requireaccount": true,
|
||||
"requireuser": false
|
||||
},
|
||||
"SERVER": {
|
||||
"group": null,
|
||||
"hidden": false,
|
||||
"maxparams": 2,
|
||||
"minparams": 1,
|
||||
"permission": "global/server",
|
||||
"requireaccount": true,
|
||||
"requireuser": false
|
||||
}
|
||||
}
|
||||
}
|
||||
```
|
||||
|
||||
## `anope.commands`
|
||||
|
||||
Executes the specified command.
|
||||
|
||||
### Parameters
|
||||
|
||||
Index | Description
|
||||
----- | -----------
|
||||
0 | If non-empty then the account to execute the command as.
|
||||
1 | The service which the command exists on.
|
||||
2...n | The the command to execute and any parameters to pass to it.
|
||||
|
||||
### Errors
|
||||
|
||||
Code | Description
|
||||
------ | -----------
|
||||
-32099 | The specified account does not exist.
|
||||
-32098 | The specified service does not exist.
|
||||
-32097 | The specified command does not exist.
|
||||
|
||||
### Result
|
||||
|
||||
Returns an array of messages returned by the command.
|
||||
|
||||
#### Example
|
||||
|
||||
```json
|
||||
[
|
||||
"Global commands:",
|
||||
" GLOBAL Send a message to all users",
|
||||
" HELP Displays this list and give information about commands",
|
||||
" QUEUE Manages your pending message queue.",
|
||||
" SERVER Send a message to all users on a server"
|
||||
]
|
||||
```
|
||||
@@ -1,57 +0,0 @@
|
||||
# Building Anope on Windows
|
||||
|
||||
## Dependencies
|
||||
|
||||
You will need the following software installed to build Anope:
|
||||
|
||||
* [CMake 3.20 or newer](https://cmake.org/download/#latest)
|
||||
* [Conan 2 or newer](https://conan.io/downloads) (optional if you don't want to build extra modules)
|
||||
* [NSIS 3 or newer](https://nsis.sourceforge.io/Download)
|
||||
* [Visual Studio 2022 or newer](https://visualstudio.microsoft.com/downloads/) (*NOT* Visual Studio Code)
|
||||
|
||||
## Building
|
||||
|
||||
First you need to download the latest version of the Anope source code from [the releases page](https://github.com/anope/anope/releases) and unpack it using Windows Explorer.
|
||||
|
||||
---
|
||||
|
||||
Once you have the source code unpacked you need open the Command Prompt and move to the directory in which Anope has been unpacked. You can do this by pressing Control+R and then entering `cmd.exe` and pressing enter. Once the terminal opens you can move to the directory using the following command (assuming you unpacked to `C:\Users\Example\Downloads\anope-2.1`):
|
||||
|
||||
```cmd
|
||||
cd C:\Users\Example\Downloads\anope-2.1
|
||||
```
|
||||
|
||||
---
|
||||
|
||||
If you want to build with multiple-language support or want to use the enc_argon2, mysql, regex_pcre2, regex_posix, regex_tre, sqlite, or ssl_openssl extra modules you will now need to install the third-party dependencies using Conan. Before you can do this you need to create a Conan profile for C++17 using the following command:
|
||||
|
||||
```cmd
|
||||
conan profile detect
|
||||
notepad ~\.conan2\profiles\default
|
||||
```
|
||||
|
||||
When Notepad opens you should find the line beginning with `compiler.cppstd=` and replace the entire line with `compiler.cppstd=17` and save the file.
|
||||
|
||||
Now you're ready to install the third-party dependencies using the following command:
|
||||
|
||||
|
||||
```cmd
|
||||
conan install .\src\win32 --build missing --deployer runtime_deploy --deployer-folder .\build\extradll --output-folder .
|
||||
call .\conanbuild.bat
|
||||
```
|
||||
|
||||
This will probably take a long time if its the first time you have run it.
|
||||
|
||||
---
|
||||
|
||||
Now you're ready to build Anope.
|
||||
|
||||
```cmd
|
||||
cd .\build
|
||||
cmake -A x64 -D "CMAKE_BUILD_TYPE=Release" -D "CMAKE_TOOLCHAIN_FILE=conan_toolchain.cmake" ..
|
||||
msbuild PACKAGE.vcxproj /P:Configuration=Release /P:Platform=x64 /VERBOSITY:MINIMAL
|
||||
```
|
||||
|
||||
Once the build finishes the installer will be available in the build directory. You can install this by opening the directory in Windows Explorer and then running it as you would with most Windows installers.
|
||||
|
||||
Once installed Anope will be available at `C:\Program Files\Anope`.
|
||||
+209
@@ -0,0 +1,209 @@
|
||||
Anope for Windows
|
||||
-----------------
|
||||
|
||||
1) Building the Source
|
||||
2) Installation
|
||||
3) Compiling Modules
|
||||
4) Other compile options
|
||||
5) Credits
|
||||
|
||||
1) Building the Source
|
||||
|
||||
NOTE: If you have downloaded one of the pre-compiled installers, you do
|
||||
NOT need to complete this step, and you can proceed to step 2.
|
||||
|
||||
If you want to build Anope from source on a Win32 system, you will need
|
||||
to follow this instructions:
|
||||
|
||||
1) Download the required files:
|
||||
|
||||
* Current Anope source:
|
||||
http://sourceforge.net/project/showfiles.php?group_id=94081
|
||||
|
||||
If you have Visual C++ 6, 7 (.NET 2002/2003) or 8 (2005) skip ahead to step 2, else you
|
||||
need to download the following free components from Microsoft. Once
|
||||
downloaded, install these packages.
|
||||
|
||||
* Microsoft Visual C++ 2008 Express Edition:
|
||||
http://www.microsoft.com/express/vc/
|
||||
|
||||
or
|
||||
|
||||
* Microsoft Visual C++ 2005 Express Edition:
|
||||
http://msdn.microsoft.com/vstudio/express/visualc/download/
|
||||
|
||||
then download and install:
|
||||
|
||||
* Microsoft Windows PlatformSDK: (Requires WGA validation)
|
||||
http://www.microsoft.com/downloads/details.aspx?FamilyId=0BAF2B35-C656-4969-ACE8-E4C0C0716ADB&displaylang=en
|
||||
|
||||
(NOTE: Although this says for Windows Server 2003, it does infact work on all supported
|
||||
versions of Windows. When installing, you should select the Custom option, and ensure
|
||||
that only the top selection, and the bottom selection are checked. This will cut down
|
||||
install time dramatically)
|
||||
|
||||
* MySQL for Windows (only needed if building with MySQL enabled):
|
||||
http://dev.mysql.com/
|
||||
|
||||
(NOTE: Anope can be compiled against MySQL Version 3.23 and above)
|
||||
|
||||
|
||||
2) Unpack the Anope tarball with your favorite uncompression program
|
||||
(WinZip or WinRAR, etc).
|
||||
|
||||
3) Bring up the Visual C++ Command Prompt; This will launch a
|
||||
DOS Command Prompt like window, which will set the environment
|
||||
properties needed to make Anope.
|
||||
|
||||
Change directories to where you unpacked the source code in step 2, by typing:
|
||||
|
||||
cd <path to extracted source>
|
||||
|
||||
e.g.
|
||||
|
||||
cd c:\anope-trunk
|
||||
|
||||
4) You now need to configure Anope to your requirements. At the prompt type:
|
||||
|
||||
Config.bat
|
||||
|
||||
NOTE: If you run an Anti-Virus program such as McAfee or Norton, you may
|
||||
be unable to run this command due to the protection in place. Some Anti-
|
||||
Virus programs may detect the Anope Configuration Tool as a worm, however
|
||||
this is not the case. If you are prompted to allow or deny execution of
|
||||
the script, you should choose allow. If the script fails to run, and no
|
||||
notice is displayed, please check your Anti-Virus settings before seeking
|
||||
assistance.
|
||||
|
||||
An interactive configuration program should guide you through the install
|
||||
options, and then detect your Microsoft Visual C++ Library files. If it
|
||||
fails to detect them, you should check you have everything installed.
|
||||
|
||||
If you cannot find whats causing the error, please visit our forums or
|
||||
our IRC Support channel for assistance.
|
||||
|
||||
5) You are now ready to compile. At the prompt type:
|
||||
|
||||
nmake -f Makefile.win32
|
||||
|
||||
Once you are back at the command prompt again, if there have been no
|
||||
errors, you are ready to go.
|
||||
|
||||
Should you encounter errors with the installation process, check the
|
||||
messages displayed for advice on resolving them. If you are unable to
|
||||
resolve the issues yourself, seek assistance on our forums or in our
|
||||
IRC Support channel.
|
||||
|
||||
6) Anope will install the files where they belong. The only thing you need
|
||||
to do is rename "data/example.conf" to be "data/services.conf".
|
||||
|
||||
You have now completed the building phase of Anope for Windows. You can
|
||||
now move on to the next section, which is related to setting up Anope.
|
||||
|
||||
2) Installation
|
||||
|
||||
Since Anope for Windows does not use a visual interface, you must do the
|
||||
configuration with a text editor before proceeding with running Anope
|
||||
itself.
|
||||
|
||||
NOTE: You may need to open the configuration file with Wordpad, or a text
|
||||
editor which supports UNIX line endings. Opening the configuration file in
|
||||
Notepad will cause strange characters to appear, and you may not be able to
|
||||
edit the file correctly.
|
||||
|
||||
Open services.conf, and read through it carefully and adjust the settings
|
||||
you think you need to adjust. Pay special attention to these settings:
|
||||
|
||||
A) IRCDModule: This is the name of an IRCd Module that Anope will use
|
||||
to communicate with your server. Anope supports 15 IRCds,
|
||||
so ensure you set the right value here.
|
||||
B) RemoteServer: This is the address to your ircd, along with the port
|
||||
and password. You should consult your ircd
|
||||
documentation on how to link ircds.
|
||||
C) ServicesRoot: Remove the # and change the names to your nick so you
|
||||
can take control of services once they are online.
|
||||
D) UserKey1/2/3: Remove the # infront of the three UserKey settings, and
|
||||
change the parameters to numbers; around 6-7 digits will
|
||||
do.
|
||||
|
||||
If you are unsure of the settings, you can go to the dos command prompt
|
||||
and run "anope.exe -nofork -debug" and watch the information as it
|
||||
attempts to connect.
|
||||
|
||||
You can launch services in two ways. If you are sure that the entered
|
||||
configuration information is correct, simply double clicking the Anope
|
||||
executable will cause it to start; no window will pop up. If you'd rather
|
||||
have a more textual output, you can start at the dos prompt and type in
|
||||
"anope.exe". If services are successfully started up the dos prompt will
|
||||
seem to hang; at this point you can safely close the dos window.
|
||||
|
||||
3) Compiling Modules
|
||||
|
||||
If you want to build other modules than the ones shipped by default, you
|
||||
will need to modify the Makefile.inc.win32 file, in the src\modules folder.
|
||||
|
||||
A) Add modules; find the line stating "SRCS=" and add the name of the
|
||||
file to the end of the line. So if you have two files:
|
||||
|
||||
SRCS=file.c file2.c
|
||||
|
||||
If you are compiling a folder of module components, such as the example
|
||||
"catserv", you will need to add/change the "SUBS=" line. If you were
|
||||
compiling the "catserv" example, the line would look like this:
|
||||
|
||||
SUBS=catserv
|
||||
|
||||
B) When you've done this, use the same command prompt you set up in part
|
||||
1, change directories to the src\modules folder, and type:
|
||||
|
||||
nmake -f Makefile.win32
|
||||
|
||||
followed afterwards, by:
|
||||
|
||||
nmake -f Makefile.win32 install
|
||||
|
||||
C) You should now be able to load your modules on IRC via OperServ, or via
|
||||
the services.conf file.
|
||||
|
||||
|
||||
4) Other compile options
|
||||
|
||||
A) If you have trouble recompiling Anope, you should try:
|
||||
|
||||
nmake -f Makefile.win32 distclean
|
||||
|
||||
This will clean up the source directory and allow for chages to be applied
|
||||
to previously compiled files.
|
||||
|
||||
B) A list of valid options are:
|
||||
|
||||
install
|
||||
distclean
|
||||
clean
|
||||
spotless
|
||||
all
|
||||
core
|
||||
protocols
|
||||
mypasql
|
||||
languages
|
||||
modules
|
||||
|
||||
The syntax for these options is:
|
||||
|
||||
nmake -f Makefile.win32 [option]
|
||||
|
||||
5) Credits
|
||||
|
||||
Anope is based on Epona and IRCServices. See CREDITS for more credits and
|
||||
a complete list of all developers.
|
||||
|
||||
Anope's Windows-specific code is provided by:
|
||||
|
||||
* Dominick Meglio <codemastr@unrealircd.com>
|
||||
* Trystan Scott Lee <trystan@nomadirc.net>
|
||||
* Chris Hogben <heinz@anope.org>
|
||||
|
||||
Anope's Windows Installer was made using:
|
||||
|
||||
* NSIS 2.20 <http://nsis.sourceforge.net>
|
||||
|
||||
@@ -1,326 +0,0 @@
|
||||
Anope Version 2.1.18
|
||||
--------------------
|
||||
Added a check that a non-deprecated database module is loaded.
|
||||
Added support for flexible and monospace layouts to make text easier to read on clients that use a variable-width font.
|
||||
Added support for logging about deprecated modules on boot.
|
||||
Added support for per-IRCd hints when a link fails.
|
||||
Added support for self-service validation of vhosts using DNS TXT records.
|
||||
Added support for separate bad password limits for pre-connection SASL authentication.
|
||||
Added support for SRV and TXT records to the dns module.
|
||||
Added the --nodb option to disable database and encrytption module checks.
|
||||
Added the nickname registration date to the nickserv/glist output.
|
||||
Changed db_flatfile to be import-only (migrate to db_json).
|
||||
Changed the default registration confirmation type to code validation.
|
||||
Changed the fantasy !help command to not require the FANTASY privilege by default.
|
||||
Changed various length measurement code to be UTF-8 aware.
|
||||
Disabled the nickname registration delay by default.
|
||||
Fixed reporting the MySQL version that the mysql module was built against.
|
||||
Improved the layout of the nickserv/info command.
|
||||
Modularised the ns_sasl module to make it easier to pick SASL mechanisms.
|
||||
Moved duration rounding logic from Anope::Expires to Anope::Duration.
|
||||
Removed support for importing old databases from 1.8.
|
||||
Removed support for verifying "old MD5" passwords from 1.7.
|
||||
Reworked how memory is allocated when formatting messages.
|
||||
|
||||
Anope Version 2.1.17
|
||||
--------------------
|
||||
Allowed opers to resend passwords for users in nickserv/resend.
|
||||
Fixed HostServ using a different valid username character set to the protocol module.
|
||||
Fixed losing the channel and nickname registration time when upgrading from an earlier 2.1 release.
|
||||
Improved the messages sent when a user is forced off a protected nickname.
|
||||
Simplified copying modules to the runtime directory on Windows.
|
||||
|
||||
Anope Version 2.1.16
|
||||
--------------------
|
||||
Added support for on-IRC code confirmation.
|
||||
Added the ability for fantasy commands to be executable without the FANTASY privilege.
|
||||
Added the ability to prepend to topics as well as appending to them.
|
||||
Changed various fields to serialize to the database as a string not an integer.
|
||||
Disabled db_flatfile by default in preparation for becoming import-only.
|
||||
Fixed a memory leak in the db_json module.
|
||||
Fixed building on OpenSSL 1.1.1 (for now).
|
||||
Fixed removed and later re-added temporary bans being removed automatically.
|
||||
Fixed sometimes sending malformed LMODE messages on InspIRCd.
|
||||
Fixed the "did you mean" message suggesting unloaded commands.
|
||||
Fixed various issues with the example config files.
|
||||
Marked db_json as the recommended database module.
|
||||
Moved the BAN, UNBAN, and KICK commands to the chanserv/management group.
|
||||
Removed support for the 1.8-style seen command.
|
||||
Reworked confirmation to allow confirmation of multiple account actions.
|
||||
When dropping a display nickname the new display will now be the oldest in the group.
|
||||
|
||||
Anope Version 2.1.15
|
||||
--------------------
|
||||
Added a workaround to the jsonrpc module for JavaScript truncating big integers.
|
||||
Added an example Ruby library for accessing the RPC interface.
|
||||
Added away state and tls usage to the anope.user RPC event.
|
||||
Added support for looking up accounts by identifier in the anope.account RPC event.
|
||||
Added support for storing the setter and set time and setter of list modes and restoring them on InspIRCd and Solanum.
|
||||
Added support for token authentication to the RPC modules.
|
||||
Added the anope.checkCredentials, anope.identify, anope.listCommands, and anope.command RPC events to the new rpc_user module.
|
||||
Bumped the minimum supported version of ircd-hybrid to 8.2.34.
|
||||
Deprecated irc2sql in favour of rpc_data.
|
||||
Dropped support for Bahamut as it has no known users.
|
||||
Fixed creating duplicate Stats rows on some servers.
|
||||
Fixed loading databases in db_json.
|
||||
Fixed restoring cloaked hosts on InspIRCd when the cloak module is not loaded.
|
||||
Fixed some variable shadowing that potentially caused issues with the SQL database backends.
|
||||
Fixed sometimes writing accounts to the database without a unique identifier.
|
||||
Fixed various documentation issues with the example JavaScript JSON-RPC client.
|
||||
Improved CTCP handling and added support for more CTCP types.
|
||||
|
||||
Anope Version 2.1.14
|
||||
--------------------
|
||||
Added a detail specifier to the anope.list{Channels,Opers,Servers,Users} RPC methods.
|
||||
Added a matcher for the InspIRCd oper extban.
|
||||
Added support for hashed operator passwords.
|
||||
Added support for hiding the date news was added in os_news.
|
||||
Added support for local password comparison to the sql_authentication module.
|
||||
Added support for monthly backups to db_json.
|
||||
Added support for unbanning virtual modes using cs_unban.
|
||||
Added the !unmute fantasy command.
|
||||
Added the anope.account and anope.listAccounts RPC methods to the rpc_data module.
|
||||
Added the protection time to the INFO output.
|
||||
Allowed unprivileged channel successors to remove themselves from succession.
|
||||
Bumped the minimum required CMake version to 3.20.
|
||||
Changed deletion callbacks to specify the mask that was deleted if only one was.
|
||||
Changed nickserv/alist to show all permissions not just the highest ranked one.
|
||||
Fixed NEVEROP not being respected in chanserv/set/founder and chanserv/set/successor.
|
||||
Fixed stripping IRC formatting codes from messages.
|
||||
Messages are now automatically line wrapped to options:linelength.
|
||||
Redocumented the ns_sasl module.
|
||||
Removed hardcoded command names from several messages.
|
||||
Updated the Windows CI to Windows Server 2025 and Visual Studio 2022.
|
||||
|
||||
Anope Version 2.1.13
|
||||
--------------------
|
||||
Added a Config check to ensure users actually want to use the development branch.
|
||||
Added a flag to the version string when Anope is compiled in reproducible mode.
|
||||
Added a warning on rehash when the max password is longer than the maximum bcrypt password length.
|
||||
Added an ALLTIME handler on InspIRCd.
|
||||
Added an opt-out for extended XML-RPC types.
|
||||
Added RPC messages for sending global messages.
|
||||
Added support for importing cs_set_misc and ns_set_misc data from Atheme.
|
||||
Added support for importing news from Atheme.
|
||||
Added support for oper-only quit messages.
|
||||
Added support for the experimental "services cloak" system from the InspIRCd development branch.
|
||||
Added support for using defines from the environment.
|
||||
Added support for using defines within the value of a variable.
|
||||
Blacklisted an old version of an UnrealIRCd module that is known to send malformed S2S messages.
|
||||
Changed RPC events to be registered as core services.
|
||||
Changed the database to refer to accounts by their account identifier instead of their display nick.
|
||||
Changed the syntax of defines from "foo" to "${foo}".
|
||||
Deduplicated JSON generation code in the jsonrpc module.
|
||||
Fixed a warning when importing an Atheme account that uses external authentication.
|
||||
Fixed counting email addresses in ns_maxemail.
|
||||
Fixed db_atheme creating duplicate accounts, bots, and nicks when importing over an existing database.
|
||||
Fixed deleting old database backups after Anope has been restarted.
|
||||
Fixed importing user metadata from Anope 1.8.
|
||||
Fixed including a port in uplink messages when connecting to a UNIX socket endpoint.
|
||||
Fixed memo ignores being erroneously case sensitive.
|
||||
Fixed modules with third-party dependencies writing generic log messages instead of module log messages.
|
||||
Fixed not performing SQL database updates in some rare circumstances.
|
||||
Fixed sending global messages with the default sender.
|
||||
Imported mkauthors from InspIRCd and used it to generate docs/AUTHORS.txt
|
||||
Moved around a bunch of module headers.
|
||||
Moved database serialization from the serializable to the serializable type.
|
||||
Moved the SASL protocol interface to its own service.
|
||||
Refactored handling S2S metadata on InspIRCd.
|
||||
Updated more messages to use gettext plural forms.
|
||||
|
||||
Anope Version 2.1.12
|
||||
--------------------
|
||||
Added an example JavaScript library for accessing the RPC interface.
|
||||
Added an option to require specifying the server name when running destructive network commands like restart or shutdown.
|
||||
Added support for importing X-line identifiers from Atheme.
|
||||
Added support for JSON-RPC to the RPC interface.
|
||||
Added support for killing SASL users that fail to log in repeatedly.
|
||||
Added support for more RPC response types to the RPC interface.
|
||||
Added support for multiple targets in chanserv/modes.
|
||||
Added support for SSL client certificate fallback fingerprints on InspIRCd.
|
||||
Added the anope. prefix to the channel and user RPC events and moved them to the rpc_data module.
|
||||
Added the anope.listChannels, anope.listServers, anope.listUsers, and anope.server RPC events to the new rpc_data module.
|
||||
Added the OPERONLY, UNUSED and VANITY filters to botserv/botlist.
|
||||
Added the system.listMethods RPC event to the new rpc_system module.
|
||||
Deprecated support for InspIRCd v3 (scheduled to be removed in around a year).
|
||||
Fixed enc_bcrypt silently truncating passwords longer than 71 characters.
|
||||
Fixed ns_set_language being able to be loaded when Anope was built without language support.
|
||||
Fixed sql_authentication not being able to use the IP address of a RPC, SASL, or web user in SQL queries.
|
||||
Made modules that use third-party libraries log the version in use on load.
|
||||
Redesigned the RPC interface to add support for emitting multiple data types.
|
||||
Replaced the opers RPC event with rpc.listOpers and rpc.oper events in the new rpc_data module.
|
||||
Updated the Dutch translation.
|
||||
|
||||
Anope Version 2.1.11
|
||||
--------------------
|
||||
Added support for database migrations to the mysql module.
|
||||
Added support for renicking users to their UID when enforcing nickname protection.
|
||||
Added support for sending channel URLs to joining users.
|
||||
Allowed selecting languages using a shorter version of their name.
|
||||
Changed various messages to use human-readable durations instead of seconds.
|
||||
Improved the creation of expiry and duration messages.
|
||||
Improved the translation system with support for plural forms.
|
||||
Reworked how guest nicknames are generated.
|
||||
Simplified how account identifiers are allocated.
|
||||
|
||||
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.
|
||||
Added a way for protocol modules to report an error to the uplink.
|
||||
Added more account settings to the webcpanel.
|
||||
Added self-test functionality for all encryption modules.
|
||||
Added support for challenge authentication on InspIRCd.
|
||||
Added support for importing databases from Atheme.
|
||||
Added support for sending client tags on UnrealIRCd.
|
||||
Added support for the InspIRCd 1206 (v4) protocol.
|
||||
Added the --nopid option to disable writing a pid file.
|
||||
Added the enc_argon2 module to encrypt passwords with Argon2.
|
||||
Added the enc_sha2 module to encrypt passwords with HMAC-SHA-2.
|
||||
Added the global/queue command for queueing multi-line messages.
|
||||
Added the global/server command for sending messages to an individual server.
|
||||
Added the PASSWORD category to operserv/stats to view password encryption methods.
|
||||
Added the verify-only enc_posix module to validate passwords from Atheme that were encrypted with Argon2.
|
||||
Changed nickserv/drop to use confirmation codes to confirm a nickname drop.
|
||||
Changed various paths to be relative to the data and config directories.
|
||||
Converted some IRCDProto member functions to variables.
|
||||
Converted the enc_md5, enc_none, enc_old, enc_sha1, and enc_sha256 modules to be verify-only.
|
||||
Deduplicated page headers and footers in the webcpanel templates.
|
||||
Deprecated the enc_sha256 module.
|
||||
Fixed inconsistent spelling/casing of email, vhost, and vident.
|
||||
Fixed various bugs in the inspircd module.
|
||||
Improved portability of email sending.
|
||||
Improved protocol debug messages.
|
||||
Improved the performance and reliability of internal conversion logic.
|
||||
Improved the randomness of randomly generated numbers.
|
||||
Refactored the enc_bcrypt module and exposed it as an encryption context.
|
||||
Removed several duplicate translation strings.
|
||||
Replaced the custom MD5 implementation in enc_md5 with a vendored one.
|
||||
Replaced the custom SHA256 implementation in enc_sha256 with a vendored one.
|
||||
The ldap_authentication, ldap_oper, sql_authentication, sql_log, and sql_oper modules are now always enabled.
|
||||
|
||||
Anope Version 2.1.3
|
||||
-------------------
|
||||
Added alternate command suggestions when a user runs an invalid command.
|
||||
Added support for the IRCv3 +draft/channel-context tag.
|
||||
Added support for the IRCv3 +draft/reply tag.
|
||||
Allow using more than one fingerprint in an oper block.
|
||||
Changed chanserv/drop to use confirmation codes to confirm a channel drop.
|
||||
Cleaned up more of the codebase to use Modern C++17.
|
||||
Enabled using more field limits sent by the IRC server instead of requiring the user to configure them.
|
||||
Fixed NickServ lying about the minimum password length.
|
||||
Fixed a crash when sending emails.
|
||||
Fixed bs_kick not using the correct kick message for automatic kicks.
|
||||
Increased the security of randomly generated confirmation codes.
|
||||
Removed the ns_access module and associated cs_secure and ns_secure options.
|
||||
Removed the ns_status module.
|
||||
Reworked how messages are sent in protocol modules to allow sending message tags.
|
||||
|
||||
Anope Version 2.1.2
|
||||
-------------------
|
||||
Bumped the minimum OpenSSL version to 1.1.0.
|
||||
Bumped the minimum GnuTLS version to 3.0.0.
|
||||
Disabled SSLv3 support in the m_ssl_openssl module.
|
||||
Modernized mutex and thread code to use Modern C++.
|
||||
Normalised the program exit codes.
|
||||
Updated the Dutch translation.
|
||||
Updated the French translation.
|
||||
|
||||
Anope Version 2.1.1
|
||||
-------------------
|
||||
Added the UNBANME privilege to allow users to unban themselves.
|
||||
Fixed building on Windows systems without chgrp/chmod.
|
||||
Fixed creating sockets in the m_dns, m_httpd, m_proxyscan, and m_redis modules.
|
||||
Fixed reading the values of command line arguments.
|
||||
Moved core privilege descriptions to the example configs.
|
||||
Updated the Italian translation.
|
||||
Updated the Polish translation.
|
||||
|
||||
Anope Version 2.1.0
|
||||
-------------------
|
||||
Added support for access list entry descriptions.
|
||||
Added support for linking over a UNIX socket.
|
||||
Added support for server-initiated logins and logouts on UnrealIRCd.
|
||||
Added support for server-initiated logouts on InspIRCd.
|
||||
Added support for the ANONYMOUS SASL mechanism.
|
||||
Allowed users to opt-out of being added to channel access lists.
|
||||
Cleaned up the codebase to use Modern C++17.
|
||||
Modernized the build system to use a modern version of CMake.
|
||||
Removed support for using insecure encryption methods as the primary method.
|
||||
Removed the Windows-only anopesmtp tool.
|
||||
Removed the two day X-line cap.
|
||||
Updated all references to IRCServices to refer to Anope instead.
|
||||
@@ -1,204 +0,0 @@
|
||||
Anope Version 2.1.18
|
||||
--------------------
|
||||
Added the hostserv/validate command.
|
||||
Added the nickserv/saset/layout command.
|
||||
Added the nickserv/set/layout command.
|
||||
Added the ns_sasl_anonymous module.
|
||||
Added the ns_sasl_external module.
|
||||
Added the ns_sasl_plain module.
|
||||
Added the ns_set_layout module.
|
||||
Added the ns_set_op module.
|
||||
Added {hs_request}:validationcooldown (defaults to 5 minutes).
|
||||
Added {hs_request}:validationrecord (defaults to "anope-dns-validation").
|
||||
Added {ns_sasl}:badpasslimit (defaults to options:badpasslimit).
|
||||
Added {ns_sasl}:badpasstimeout (defaults to options:badpasstimeout).
|
||||
Moved nickserv/set/autoop and nickserv/saset/autoop to the ns_set_op module.
|
||||
Moved nickserv/set/display and nickserv/saset/display to the ns_set_group module.
|
||||
Moved nickserv/set/neverop and nickserv/saset/neverop to the ns_set_op module.
|
||||
Removed the db_old module.
|
||||
Removed the enc_old module.
|
||||
Removed {db_flatfile}:fork (module is now import-only).
|
||||
Removed {db_flatfile}:keepbackups (module is now import-only).
|
||||
Removed {db_flatfile}:nobackupokay (module is now import-only).
|
||||
|
||||
Anope Version 2.1.17
|
||||
--------------------
|
||||
Added the nickserv/resend oper privilege.
|
||||
|
||||
Anope Version 2.1.16
|
||||
--------------------
|
||||
Added fantasy:require_privilege (defaults to yes).
|
||||
Added the nickserv/confirm/email command.
|
||||
Added the nickserv/confirm/email oper privilege.
|
||||
Added the nickserv/confirm/register command.
|
||||
Added the ns_confirm module.
|
||||
Added {ns_email}:changeexpire (defaults to 1 day).
|
||||
Added {ns_resetpass}:resetexpire (defaults to 1 day).
|
||||
Removed the irc2sql module (migrate to JSON-RPC instead).
|
||||
Removed {ns_seen}:simple (1.8-style seen has been removed).
|
||||
Renamed the nickserv/confirm oper privilege to nickserv/confirm/register.
|
||||
|
||||
Anope Version 2.1.15
|
||||
--------------------
|
||||
Added the ns_email module.
|
||||
Added the rpc_user module.
|
||||
Added {jsonrpc}:integer_bits (defaults to 64).
|
||||
Added {jsonrpc}:token.
|
||||
Added {nickserv}:enforcerreal (defaults to "Services Enforcer").
|
||||
Added {xmlrpc}:token.
|
||||
Moved nickserv/set/email and nickserv/saset/email to the ns_email module.
|
||||
Removed the bahamut module.
|
||||
Removed the ns_getemail module (load ns_email instead).
|
||||
Removed the ns_maxemail module (load ns_email instead).
|
||||
Removed the rpc_main module (migrate to the other RPC modules).
|
||||
Removed {chanstats}:cs_def_chanstats (add CS_STATS to {chanserv}:defaults instead).
|
||||
Removed {chanstats}:ns_def_chanstats (add NS_STATS to {nickserv}:defaults instead).
|
||||
Renamed service:gecos to service:real.
|
||||
|
||||
Anope Version 2.1.14
|
||||
--------------------
|
||||
Added oper:password_hash.
|
||||
Added options:codelength (defaults to 15).
|
||||
Added {os_news}:showdate (defaults to yes).
|
||||
Added {sql_authentication}:password_field (defaults to "password").
|
||||
Added {sql_authentication}:password_hash.
|
||||
Changed the default value for options:linelength to "100".
|
||||
Changed the default value for {enc_sha2}:algorithm to "sha512".
|
||||
Changed the default value for {ns_seen}:purgetime to "90d".
|
||||
Changed the syntax for template variables in mail:emailchange_message, mail:emailchange_subject, mail:memo_message, mail:memo_subject, mail:registration_message, mail:registration_subject, mail:reset_message, mail:reset_subject, {chanserv}:signkickformat, {dnsbl}:blacklist:reason, {ldap_authentication}:search_filter, {ldap_oper}:binddn, {ldap_oper}:filter, {nickserv}:unregistered_notice, {os_session}:sessionlimitexceeded, {proxyscan}:proxyscan:reason.
|
||||
|
||||
Anope Version 2.1.13
|
||||
--------------------
|
||||
Added options:linelength (defaults to 120).
|
||||
Added the db_json module.
|
||||
Added the rpc_message module.
|
||||
Added {nickserv}:defaultprotect (defaults to 1m).
|
||||
Added {nickserv}:maxprotect (defaults to 10m).
|
||||
Added {nickserv}:minprotect (defaults to 10s)
|
||||
Added {xmlrpc}:enable_i8 (defaults to yes).
|
||||
Added {xmlrpc}:enable_nil (defaults to yes).
|
||||
Changed the syntax for using defines (all existing defines will need to be updated).
|
||||
Removed {nickserv}:kill (replaced by custom protection timer durations).
|
||||
Removed {nickserv}:killquick (replaced by custom protection timer durations).
|
||||
Removed {ns_set_kill}:allowkillimmed (replaced by custom protection timer durations).
|
||||
Renamed the nickserv/saset/kill command to nickserv/saset/protect.
|
||||
Renamed the nickserv/saset/kill oper privilege to nickserv/saset/protect.
|
||||
Renamed the nickserv/set/kill command to nickserv/set/protect.
|
||||
Renamed the ns_set_kill module to ns_set_protect.
|
||||
Renamed the sasl module to ns_sasl and moved it to nickserv.example.conf.
|
||||
|
||||
Anope Version 2.1.12
|
||||
--------------------
|
||||
Added the jsonrpc module.
|
||||
Added the rpc_data module.
|
||||
Added the rpc_system module.
|
||||
Added {hostserv}:activate_on_deoper (defaults to yes).
|
||||
Added {os_shutdown}:requirename (defaults to yes).
|
||||
Moved nickserv/set/keepmodes and nickserv/saset/keepmodes to the ns_set_keepmodes module.
|
||||
Moved the xmlrpc module to extra.
|
||||
Renamed the xmlrpc_main module to rpc_main.
|
||||
|
||||
Anope Version 2.1.11
|
||||
--------------------
|
||||
Moved nickserv/set/kill and nickserv/saset/kill to the ns_set_kill module.
|
||||
Moved {ns_set}:allowkillimmed to {ns_set_kill}:allowkillimmed.
|
||||
Replaced {nickserv}:guestnickprefix with {nickserv}:guestnick (defaults to Guest####).
|
||||
|
||||
Anope Version 2.1.10
|
||||
--------------------
|
||||
Added options:servicealias (defaults to no)
|
||||
Moved nickserv/set/message and nickserv/saset/message to the ns_set_message module.
|
||||
Removed options:useprivmsg (replaced by loading the ns_set_message module to enable).
|
||||
Removed options:usestrictprivmsg (feature unusable on modern servers, consider migrating to options:servicealias instead).
|
||||
|
||||
Anope Version 2.1.9
|
||||
-------------------
|
||||
No significant changes.
|
||||
|
||||
Anope Version 2.1.8
|
||||
-------------------
|
||||
Added the nickserv/drop/display oper privilege.
|
||||
Added {nickserv}:preservedisplay (defaults to no).
|
||||
|
||||
Anope Version 2.1.7
|
||||
-------------------
|
||||
Moved nickserv/set/language and nickserv/saset/language to the ns_set_language module.
|
||||
Renamed the FANTASIA channel privilege to FANTASY.
|
||||
Renamed {cs_suspend}:expire to {cs_suspend}:suspendexpire.
|
||||
|
||||
Anope Version 2.1.6
|
||||
-------------------
|
||||
Added {ns_cert}:automatic (defaults to yes).
|
||||
Removed {hybrid,inspircd,solanum,unrealircd}:use_server_side_mlock (now always enabled).
|
||||
Removed {inspircd}:use_server_side_topiclock (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.
|
||||
Added the enc_argon2 module.
|
||||
Added the enc_posix module.
|
||||
Added the enc_sha2 module.
|
||||
Added the gl_queue module.
|
||||
Added the gl_server module.
|
||||
Added the global/queue oper privilege.
|
||||
Added the global/server oper privilege.
|
||||
Changed serverinfo:motd to be relative to the config directory.
|
||||
Changed serverinfo:pid to be relative to the data directory.
|
||||
Changed the default value of mail:sendmailpath to "/usr/sbin/sendmail -it".
|
||||
Changed the default value of {chanserv}:accessmax to 1000.
|
||||
Changed the default value of {chanserv}:inhabit to 1 minute.
|
||||
Changed the default value of {cs_mode}:max to 50.
|
||||
Changed the default value of {ms_ignore}:max to 50.
|
||||
Removed options:seed (not needed with modern random number generation).
|
||||
Replaced {webcpanel}:template with {webcpanel}:template_dir (defaults to webcpanel/templates/default).
|
||||
|
||||
Anope Version 2.1.3
|
||||
-------------------
|
||||
Added options:didyoumeandifference (defaults to 4).
|
||||
Added support for multiple SSL fingerprints in oper:certfp.
|
||||
Added the chanserv/cert oper privilege for modifying other user's certificate lists.
|
||||
Changed networkinfo:chanlen to default to 32 if not set.
|
||||
Changed networkinfo:hostlen to default to 64 if not set.
|
||||
Changed networkinfo:modelistsize to default to 100 if not set.
|
||||
Changed networkinfo:nicklen to default to 31 if not set.
|
||||
Changed networkinfo:userlen to default to 10 if not set.
|
||||
Increased the default maximum password length to 50 characters.
|
||||
Increased the default minimum password length to 10 characters.
|
||||
Removed the cs_secure option in {chanserv}:defaults (now always enabled as support for nick access lists has been removed).
|
||||
Removed the nickserv/saset/secure command (support for nick access lists has been removed).
|
||||
Removed the nickserv/saset/secure oper privilege (support for nick access lists has been removed).
|
||||
Removed the nickserv/set/secure command (support for nick access lists has been removed).
|
||||
Removed the nickserv/status command (obsolete with modern IRCv3 extensions and the removal of nick access lists).
|
||||
Removed the ns_access module (support for nick access lists has been removed).
|
||||
Removed the ns_secure option in {nickserv}:defaults (now always enabled as support for nick access lists has been removed).
|
||||
|
||||
Anope Version 2.1.2
|
||||
-------------------
|
||||
Added {ssl_openssl}:tlsv10 for configuring whether TLSv1.0 is usable (defaults to no).
|
||||
Added {ssl_openssl}:tlsv11 for configuring whether TLSv1.1 is usable (defaults to yes).
|
||||
Added {ssl_openssl}:tlsv12 for configuring whether TLSv1.2 is usable (defaults to yes).
|
||||
Removed the m_ prefix from the names of the chanstats, dns, dnsbl, helpchan, httpd, ldap, ldap_oper, mysql, proxyscan, redis, regex_pcre2, regex_posix, regex_stdlib, regex_tre, rewrite, sasl, sql_log, sql_oper, sqlite, ssl_gnutls, ssl_openssl, xmlrpc, and xmlrpc_main modules.
|
||||
Removed {ssl_openssl}:sslv3 (now always disabled).
|
||||
|
||||
Anope Version 2.1.1
|
||||
-------------------
|
||||
Added the m_regex_stdlib module.
|
||||
Removed the m_regex_pcre module (use m_regex_pcre2 instead).
|
||||
|
||||
Anope Version 2.1.0
|
||||
-------------------
|
||||
Added {nickserv}:minpasslen for configuring the minimum password length (defaults to 8).
|
||||
Removed {nickserv}:strictpasswords (obsolete now {nickserv}:minpasslen exists).
|
||||
Removed the inspircd12 and inspircd20 modules (use inspircd instead).
|
||||
Removed the ns_getpass module (no supported encryption modules).
|
||||
Removed the os_oline module (no supported IRCds).
|
||||
Removed the unreal module (use unrealircd instead).
|
||||
Renamed {nickserv}:passlen to {nickserv}:maxpasslen.
|
||||
Renamed the charybdis module to solanum.
|
||||
Renamed the inspircd3 module to inspircd.
|
||||
Renamed the unreal4 module to unrealircd.
|
||||
Replaced uplink:ipv6 with uplink:protocol (defaults to ipv4).
|
||||
@@ -1,168 +0,0 @@
|
||||
#!/usr/bin/env perl
|
||||
|
||||
#
|
||||
# Script taken from InspIRCd, https://www.inspircd.org/
|
||||
#
|
||||
# This program is distributed in the hope that it will be useful, but WITHOUT
|
||||
# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
|
||||
# FOR A PARTICULAR PURPOSE. See the GNU General Public License for more
|
||||
# details.
|
||||
#
|
||||
# You should have received a copy of the GNU General Public License
|
||||
# along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
#
|
||||
|
||||
|
||||
BEGIN { require 5.8.0; }
|
||||
|
||||
use strict;
|
||||
use warnings FATAL => qw(all);
|
||||
|
||||
use File::Copy ();
|
||||
use Cwd;
|
||||
|
||||
sub list_extras ();
|
||||
sub enable_extras (@);
|
||||
sub disable_extras (@);
|
||||
|
||||
# Routine to list out the extra/ modules that have been enabled.
|
||||
# Note: when getting any filenames out and comparing, it's important to lc it if the
|
||||
# file system is not case-sensitive (== Epoc, MacOS, OS/2 (incl DOS/DJGPP), VMS, Win32
|
||||
# (incl NetWare, Symbian)). Cygwin may or may not be case-sensitive, depending on
|
||||
# configuration, however, File::Spec does not currently tell us (it assumes Unix behavior).
|
||||
sub list_extras () {
|
||||
use File::Spec;
|
||||
# @_ not used
|
||||
my $srcdir = File::Spec->catdir("modules");
|
||||
my $abs_srcdir = File::Spec->rel2abs($srcdir);
|
||||
local $_;
|
||||
my $dd;
|
||||
opendir $dd, File::Spec->catdir($abs_srcdir, "extra") or die (File::Spec->catdir($abs_srcdir, "extra") . ": $!\n");
|
||||
my @extras = map { File::Spec->case_tolerant() ? lc($_) : $_ } (readdir($dd));
|
||||
closedir $dd;
|
||||
undef $dd;
|
||||
opendir $dd, $abs_srcdir or die "$abs_srcdir: $!\n";
|
||||
my @sources = map { File::Spec->case_tolerant() ? lc($_) : $_ } (readdir($dd));
|
||||
closedir $dd;
|
||||
undef $dd;
|
||||
my $maxlen = (sort { $b <=> $a } (map {length($_)} (@extras)))[0];
|
||||
my %extras = ();
|
||||
EXTRA: for my $extra (@extras) {
|
||||
next if (File::Spec->curdir() eq $extra || File::Spec->updir() eq $extra);
|
||||
my $abs_extra = File::Spec->catfile($abs_srcdir, "extra", $extra);
|
||||
my $abs_source = File::Spec->catfile($abs_srcdir, $extra);
|
||||
next unless ($extra =~ m/\.(cpp|h)$/ || (-d $abs_extra)); # C++ Source/Header, or directory
|
||||
if (-l $abs_source) {
|
||||
# Symlink, is it in the right place?
|
||||
my $targ = readlink($abs_source);
|
||||
my $abs_targ = File::Spec->rel2abs($targ, $abs_srcdir);
|
||||
if ($abs_targ eq $abs_extra) {
|
||||
$extras{$extra} = "\e[32;1menabled\e[0m";
|
||||
} else {
|
||||
$extras{$extra} = sprintf("\e[31;1mwrong symlink target (%s)\e[0m", $abs_targ);
|
||||
}
|
||||
} elsif (-e $abs_source) {
|
||||
my ($devext, $inoext) = stat($abs_extra);
|
||||
my ($devsrc, $inosrc, undef, $lnksrc) = stat($abs_source);
|
||||
if ($lnksrc > 1) {
|
||||
if ($devsrc == $devext && $inosrc == $inoext) {
|
||||
$extras{$extra} = "\e[32;1menabled\e[0m";
|
||||
} else {
|
||||
$extras{$extra} = sprintf("\e[31;1mwrong hardlink target (%d:%d)\e[0m", $devsrc, $inosrc);
|
||||
}
|
||||
} else {
|
||||
open my $extfd, "<", $abs_extra;
|
||||
open my $srcfd, "<", $abs_source;
|
||||
local $/ = undef;
|
||||
if (scalar(<$extfd>) eq scalar(<$srcfd>)) {
|
||||
$extras{$extra} = "\e[32;1menabled\e[0m";
|
||||
} else {
|
||||
$extras{$extra} = sprintf("\e[31;1mout of synch (re-copy)\e[0m");
|
||||
}
|
||||
}
|
||||
} else {
|
||||
$extras{$extra} = "\e[33;1mdisabled\e[0m";
|
||||
}
|
||||
}
|
||||
|
||||
for my $extra (sort {$a cmp $b} keys(%extras)) {
|
||||
my $text = $extras{$extra};
|
||||
if ($text =~ m/needed by/ && $text !~ m/enabled/) {
|
||||
printf "\e[31;1;5m%-*s = %s%s\e[0m\n", $maxlen, $extra, $text, ($text =~ m/needed by/ ? ")" : "");
|
||||
} else {
|
||||
printf "%-*s = %s%s\n", $maxlen, $extra, $text, ($text =~ m/needed by/ ? "\e[0m)" : "");
|
||||
}
|
||||
}
|
||||
return keys(%extras) if wantarray; # Can be used by manage_extras.
|
||||
}
|
||||
|
||||
sub enable_extras (@) {
|
||||
my (@extras) = @_;
|
||||
for my $extra (@extras) {
|
||||
my $extrapath = "modules/extra/$extra";
|
||||
if (!-e $extrapath) {
|
||||
print STDERR "Cannot enable \e[32;1m$extra\e[0m : No such file or directory in modules/extra\n";
|
||||
next;
|
||||
}
|
||||
my $source = "modules/$extra";
|
||||
if (-e $source) {
|
||||
print STDERR "Cannot enable \e[32;1m$extra\e[0m : destination in modules exists (might already be enabled?)\n";
|
||||
next;
|
||||
}
|
||||
print "Enabling $extra ... \n";
|
||||
symlink "extra/$extra", $source or print STDERR "$source: Cannot link to 'extra/$extra': $!\n";
|
||||
}
|
||||
}
|
||||
|
||||
sub disable_extras (@)
|
||||
{
|
||||
opendir my $dd, "modules/extra/";
|
||||
my @files = readdir($dd);
|
||||
closedir $dd;
|
||||
my (@extras) = @_;
|
||||
EXTRA: for my $extra (@extras) {
|
||||
my $extrapath = "modules/extra/$extra";
|
||||
my $source = "modules/$extra";
|
||||
if (!-e $extrapath) {
|
||||
print STDERR "Cannot disable \e[32;1m$extra\e[0m : Is not an extra\n";
|
||||
next;
|
||||
}
|
||||
if ((! -l $source) || readlink($source) ne "extra/$extra") {
|
||||
print STDERR "Cannot disable \e[32;1m$extra\e[0m : Source is not a link or doesn't refer to the right file. Remove manually if this is in error.\n";
|
||||
next;
|
||||
}
|
||||
# Now remove.
|
||||
print "Disabling $extra ... \n";
|
||||
unlink "modules/$extra" or print STDERR "Cannot disable \e[32;1m$extra\e[0m : $!\n";
|
||||
}
|
||||
}
|
||||
|
||||
my $clearscreen = `clear`;
|
||||
print $clearscreen;
|
||||
while (1)
|
||||
{
|
||||
list_extras; # print the module list
|
||||
print "\nPlease enter the name of the module or type 'q' to quit.: ";
|
||||
my $input = <STDIN>;
|
||||
chop($input); # remove the trailing \n from the user input
|
||||
|
||||
if ($input eq "q") {
|
||||
if (-e "build/CMakeFiles") {
|
||||
system("cmake", "build/.");
|
||||
print "\nNow cd build, then run make to build Anope.\n\n";
|
||||
} else {
|
||||
print "\nBuild directory not found. You should run ./Config now.\n\n"
|
||||
}
|
||||
exit 0;
|
||||
}
|
||||
print $clearscreen;
|
||||
if ($input eq "") {
|
||||
next;
|
||||
}
|
||||
|
||||
if (-e "modules/$input") {
|
||||
disable_extras($input)
|
||||
} else {
|
||||
enable_extras($input)
|
||||
}
|
||||
}
|
||||
@@ -1,18 +0,0 @@
|
||||
# Generate sysconf.h from the earlier configuration
|
||||
configure_file(
|
||||
"${CMAKE_CURRENT_SOURCE_DIR}/sysconf.h.cmake"
|
||||
"${CMAKE_CURRENT_BINARY_DIR}/sysconf.h"
|
||||
)
|
||||
|
||||
# Generate version-bin executable to modify version.h, setting it's linker flags as well
|
||||
add_executable(version-bin version.cpp)
|
||||
set(version_BINARY "$<TARGET_FILE:version-bin>")
|
||||
# Modify version.h from the above executable, with dependencies to version.cpp
|
||||
# and all of the source files in the main build
|
||||
add_custom_command(OUTPUT ${CMAKE_CURRENT_BINARY_DIR}/version.h ${CMAKE_CURRENT_BINARY_DIR}/build.h
|
||||
COMMAND version-bin ${Anope_SOURCE_DIR} ${CMAKE_CURRENT_BINARY_DIR}/version.h ${CMAKE_CURRENT_BINARY_DIR}/build.h
|
||||
DEPENDS version-bin ${SRC_SRCS}
|
||||
)
|
||||
|
||||
# Add a custom target to the above file
|
||||
add_custom_target(headers DEPENDS ${CMAKE_CURRENT_BINARY_DIR}/version.h ${CMAKE_CURRENT_BINARY_DIR}/build.h)
|
||||
@@ -0,0 +1,20 @@
|
||||
|
||||
all: services.h extern.h pseudo.h version.h
|
||||
|
||||
version.h: Makefile version.sh services.h pseudo.h messages.h $(SRCS)
|
||||
sh version.sh
|
||||
|
||||
services.h: sysconf.h config.h extern.h
|
||||
touch $@
|
||||
|
||||
extern.h: slist.h
|
||||
touch $@
|
||||
|
||||
pseudo.h: commands.h timeout.h encrypt.h datafiles.h slist.h
|
||||
touch $@
|
||||
|
||||
clean:
|
||||
(rm -f language.h)
|
||||
|
||||
distclean: clean
|
||||
(rm -f sysconf.h version.h)
|
||||
@@ -1,187 +0,0 @@
|
||||
// Anope IRC Services <https://www.anope.org/>
|
||||
//
|
||||
// Copyright (C) 2003-2026 Anope Contributors
|
||||
//
|
||||
// Anope is free software. You can use, modify, and/or distribute it under the
|
||||
// terms of version 2 of the GNU General Public License. See docs/LICENSE.txt
|
||||
// for the complete terms of this license and docs/AUTHORS.txt for a list of
|
||||
// contributors.
|
||||
//
|
||||
// Based on the original code of Epona by Lara
|
||||
// Based on the original code of Services by Andy Church
|
||||
//
|
||||
// SPDX-License-Identifier: GPL-2.0-only
|
||||
|
||||
#pragma once
|
||||
|
||||
#include "services.h"
|
||||
#include "anope.h"
|
||||
#include "serialize.h"
|
||||
#include "service.h"
|
||||
|
||||
enum
|
||||
{
|
||||
ACCESS_INVALID = -10000,
|
||||
ACCESS_FOUNDER = 10001
|
||||
};
|
||||
|
||||
/* A privilege, probably configured using a privilege{} block. Most
|
||||
* commands require specific privileges to be executed. The AccessProvider
|
||||
* backing each ChanAccess determines whether that ChanAccess has a given
|
||||
* privilege.
|
||||
*/
|
||||
struct CoreExport Privilege final
|
||||
{
|
||||
Anope::string name;
|
||||
Anope::string desc;
|
||||
/* Rank relative to other privileges */
|
||||
int rank;
|
||||
|
||||
Privilege(const Anope::string &name, const Anope::string &desc, int rank);
|
||||
bool operator==(const Privilege &other) const;
|
||||
};
|
||||
|
||||
class CoreExport PrivilegeManager final
|
||||
{
|
||||
static std::vector<Privilege> Privileges;
|
||||
public:
|
||||
static void AddPrivilege(Privilege p);
|
||||
static void RemovePrivilege(Privilege &p);
|
||||
static Privilege *FindPrivilege(const Anope::string &name);
|
||||
static std::vector<Privilege> &GetPrivileges();
|
||||
static void ClearPrivileges();
|
||||
};
|
||||
|
||||
/* A provider of access. Only used for creating ChanAccesses, as
|
||||
* they contain pure virtual functions.
|
||||
*/
|
||||
class CoreExport AccessProvider
|
||||
: public Service
|
||||
{
|
||||
public:
|
||||
AccessProvider(Module *owner, const Anope::string &name);
|
||||
virtual ~AccessProvider();
|
||||
|
||||
/** Creates a new ChanAccess entry using this provider.
|
||||
* @return The new entry
|
||||
*/
|
||||
virtual ChanAccess *Create() = 0;
|
||||
|
||||
virtual void GetAccess(CommandSource& source, const Privilege *p, Anope::map<Anope::string> &access) = 0;
|
||||
static void SendAccess(CommandSource &source, const Anope::string &pname);
|
||||
|
||||
private:
|
||||
static std::list<AccessProvider *> Providers;
|
||||
public:
|
||||
static const std::list<AccessProvider *>& GetProviders();
|
||||
};
|
||||
|
||||
/* Represents one entry of an access list on a channel. */
|
||||
class CoreExport ChanAccess
|
||||
: public Serializable
|
||||
{
|
||||
public:
|
||||
struct Type final
|
||||
: public Serialize::Type
|
||||
{
|
||||
Type();
|
||||
void Serialize(Serializable *obj, Serialize::Data &data) const override;
|
||||
Serializable *Unserialize(Serializable *obj, Serialize::Data &data) const override;
|
||||
};
|
||||
|
||||
private:
|
||||
Anope::string mask;
|
||||
/* account this access entry is for, if any */
|
||||
Serialize::Reference<NickCore> nc;
|
||||
|
||||
public:
|
||||
typedef std::vector<ChanAccess *> Path;
|
||||
|
||||
/* The provider that created this access entry */
|
||||
AccessProvider *provider;
|
||||
/* Channel this access entry is on */
|
||||
Serialize::Reference<ChannelInfo> ci;
|
||||
Anope::string creator;
|
||||
Anope::string description;
|
||||
time_t last_seen;
|
||||
time_t created;
|
||||
|
||||
ChanAccess(AccessProvider *p);
|
||||
virtual ~ChanAccess();
|
||||
|
||||
void SetMask(const Anope::string &mask, ChannelInfo *ci);
|
||||
const Anope::string &Mask() const;
|
||||
NickCore *GetAccount() const;
|
||||
|
||||
static const unsigned int MAX_DEPTH = 4;
|
||||
|
||||
/** Check if this access entry matches the given user or account
|
||||
* @param u The user
|
||||
* @param nc The account
|
||||
* @param next Next channel to check if any
|
||||
*/
|
||||
virtual bool Matches(const User *u, const NickCore *nc, ChannelInfo *&next) const;
|
||||
|
||||
/** Check if this access entry has the given privilege.
|
||||
* @param name The privilege name
|
||||
*/
|
||||
virtual bool HasPriv(const Anope::string &name) const = 0;
|
||||
|
||||
/** Serialize the access given by this access entry into a human
|
||||
* readable form. chanserv/access will return a number, chanserv/xop
|
||||
* will be AOP, SOP, etc.
|
||||
*/
|
||||
virtual Anope::string AccessSerialize() const = 0;
|
||||
|
||||
/** Unserialize this access entry from the given data. This data
|
||||
* will be fetched from AccessSerialize.
|
||||
*/
|
||||
virtual void AccessUnserialize(const Anope::string &data) = 0;
|
||||
|
||||
/* Comparison operators to other Access entries */
|
||||
virtual bool operator>(const ChanAccess &other) const;
|
||||
virtual bool operator<(const ChanAccess &other) const;
|
||||
bool operator>=(const ChanAccess &other) const;
|
||||
bool operator<=(const ChanAccess &other) const;
|
||||
};
|
||||
|
||||
/* A group of access entries. This is used commonly, for example with ChannelInfo::AccessFor,
|
||||
* to show what access a user has on a channel because users can match multiple access entries.
|
||||
*/
|
||||
class CoreExport AccessGroup final
|
||||
{
|
||||
public:
|
||||
/* access entries + paths */
|
||||
std::vector<ChanAccess::Path> paths;
|
||||
/* Channel these access entries are on */
|
||||
const ChannelInfo *ci;
|
||||
/* Account these entries affect, if any */
|
||||
const NickCore *nc;
|
||||
/* super_admin always gets all privs. founder is a special case where ci->founder == nc */
|
||||
bool super_admin, founder;
|
||||
|
||||
AccessGroup();
|
||||
|
||||
/** Check if this access group has a certain privilege. Eg, it
|
||||
* will check every ChanAccess entry of this group for any that
|
||||
* has the given privilege.
|
||||
* @param priv The privilege
|
||||
* @return true if any entry has the given privilege
|
||||
*/
|
||||
bool HasPriv(const Anope::string &priv) const;
|
||||
|
||||
/** Get the "highest" access entry from this group of entries.
|
||||
* The highest entry is determined by the entry that has the privilege
|
||||
* with the highest rank (see Privilege::rank).
|
||||
* @return The "highest" entry
|
||||
*/
|
||||
const ChanAccess *Highest() const;
|
||||
|
||||
/* Comparison operators to other AccessGroups */
|
||||
bool operator>(const AccessGroup &other) const;
|
||||
bool operator<(const AccessGroup &other) const;
|
||||
bool operator>=(const AccessGroup &other) const;
|
||||
bool operator<=(const AccessGroup &other) const;
|
||||
|
||||
inline bool empty() const { return paths.empty(); }
|
||||
};
|
||||
@@ -1,271 +0,0 @@
|
||||
// Anope IRC Services <https://www.anope.org/>
|
||||
//
|
||||
// Copyright (C) 2003-2026 Anope Contributors
|
||||
//
|
||||
// Anope is free software. You can use, modify, and/or distribute it under the
|
||||
// terms of version 2 of the GNU General Public License. See docs/LICENSE.txt
|
||||
// for the complete terms of this license and docs/AUTHORS.txt for a list of
|
||||
// contributors.
|
||||
//
|
||||
// Based on the original code of Epona by Lara
|
||||
// Based on the original code of Services by Andy Church
|
||||
//
|
||||
// SPDX-License-Identifier: GPL-2.0-only
|
||||
|
||||
#pragma once
|
||||
|
||||
#include "extensible.h"
|
||||
#include "serialize.h"
|
||||
#include "anope.h"
|
||||
#include "memo.h"
|
||||
#include "base.h"
|
||||
|
||||
typedef Anope::unordered_map<NickAlias *> nickalias_map;
|
||||
typedef Anope::unordered_map<NickCore *> nickcore_map;
|
||||
typedef std::unordered_map<uint64_t, NickCore *> nickcoreid_map;
|
||||
|
||||
extern CoreExport Serialize::Checker<nickalias_map> NickAliasList;
|
||||
extern CoreExport Serialize::Checker<nickcore_map> NickCoreList;
|
||||
extern CoreExport Serialize::Checker<nickcoreid_map> NickCoreIdList;
|
||||
|
||||
/* A registered nickname.
|
||||
* It matters that Base is here before Extensible (it is inherited by Serializable)
|
||||
*/
|
||||
class CoreExport NickAlias final
|
||||
: public Serializable
|
||||
, public Extensible
|
||||
{
|
||||
public:
|
||||
struct Type final
|
||||
: public Serialize::Type
|
||||
{
|
||||
Type();
|
||||
void Serialize(Serializable *obj, Serialize::Data &data) const override;
|
||||
Serializable *Unserialize(Serializable *obj, Serialize::Data &data) const override;
|
||||
};
|
||||
|
||||
private:
|
||||
Anope::string vhost_ident, vhost_host, vhost_creator;
|
||||
time_t vhost_created = 0;
|
||||
|
||||
public:
|
||||
Anope::string nick;
|
||||
Anope::string last_quit;
|
||||
/* Last cloaked user@host this nick was seen using. */
|
||||
Anope::string last_userhost;
|
||||
/* Last real user@host this nick was seen using. */
|
||||
Anope::string last_userhost_real;
|
||||
time_t registered = Anope::CurTime;
|
||||
time_t last_seen = Anope::CurTime;
|
||||
|
||||
/* Account this nick is tied to. Multiple nicks can be tied to a single account. */
|
||||
Serialize::Reference<NickCore> nc;
|
||||
|
||||
/** Constructor
|
||||
* @param nickname The nick
|
||||
* @param nickcore The nickcore for this nick
|
||||
*/
|
||||
NickAlias(const Anope::string &nickname, NickCore *nickcore);
|
||||
~NickAlias();
|
||||
|
||||
/** Set a vhost for the user
|
||||
* @param ident The ident
|
||||
* @param host The host
|
||||
* @param creator Who created the vhost
|
||||
* @param time When the vhost was created
|
||||
*/
|
||||
void SetVHost(const Anope::string &ident, const Anope::string &host, const Anope::string &creator, time_t created = Anope::CurTime);
|
||||
|
||||
/** Remove a users vhost
|
||||
**/
|
||||
void RemoveVHost();
|
||||
|
||||
/** Check if the user has a vhost
|
||||
* @return true or false
|
||||
*/
|
||||
bool HasVHost() const;
|
||||
|
||||
/** Retrieve the vhost ident
|
||||
* @return the ident
|
||||
*/
|
||||
const Anope::string &GetVHostIdent() const;
|
||||
|
||||
/** Retrieve the vhost host
|
||||
* @return the host
|
||||
*/
|
||||
const Anope::string &GetVHostHost() const;
|
||||
|
||||
/** Retrieve the vhost mask
|
||||
* @param the mask
|
||||
*/
|
||||
Anope::string GetVHostMask() const;
|
||||
|
||||
/** Retrieve the vhost creator
|
||||
* @return the creator
|
||||
*/
|
||||
const Anope::string &GetVHostCreator() const;
|
||||
|
||||
/** Retrieve when the vhost was created
|
||||
* @return the time it was created
|
||||
*/
|
||||
time_t GetVHostCreated() const;
|
||||
|
||||
/** Update the last seen time for the nickname.
|
||||
* @param u The user who is using the nickname.
|
||||
*/
|
||||
void UpdateSeen(User *u);
|
||||
|
||||
/** Finds a registered nick
|
||||
* @param nick The nick to lookup
|
||||
* @return the nick, if found
|
||||
*/
|
||||
static NickAlias *Find(const Anope::string &nick);
|
||||
static NickAlias *FindId(uint64_t uid);
|
||||
};
|
||||
|
||||
/* A registered account. Each account must have a NickAlias with the same nick as the
|
||||
* account's display.
|
||||
* It matters that Base is here before Extensible (it is inherited by Serializable)
|
||||
*/
|
||||
class CoreExport NickCore final
|
||||
: public Serializable
|
||||
, public Extensible
|
||||
{
|
||||
public:
|
||||
struct Type final
|
||||
: public Serialize::Type
|
||||
{
|
||||
Type();
|
||||
void Serialize(Serializable *obj, Serialize::Data &data) const override;
|
||||
Serializable *Unserialize(Serializable *obj, Serialize::Data &data) const override;
|
||||
};
|
||||
|
||||
private:
|
||||
/* Channels which reference this core in some way (this is on their access list, akick list, is founder, successor, etc) */
|
||||
Serialize::Checker<std::map<ChannelInfo *, int> > chanaccess;
|
||||
/* Unique identifier for the account. */
|
||||
uint64_t uniqueid;
|
||||
public:
|
||||
/* Name of the account. Find(display)->nc == this. */
|
||||
Anope::string display;
|
||||
/* User password in form of hashm:data */
|
||||
Anope::string pass;
|
||||
Anope::string email;
|
||||
/* Locale name of the language of the user. Empty means default language */
|
||||
Anope::string language;
|
||||
/* Last time an email was sent to this user */
|
||||
time_t lastmail = 0;
|
||||
/* The time this account was registered */
|
||||
time_t registered = Anope::CurTime;
|
||||
MemoInfo memos;
|
||||
std::map<Anope::string, ModeData> last_modes;
|
||||
|
||||
/* Nicknames registered that are grouped to this account.
|
||||
* for n in aliases, n->nc == this.
|
||||
*/
|
||||
Serialize::Checker<std::vector<NickAlias *> > aliases;
|
||||
|
||||
/* Set if this user is a services operator. o->ot must exist. */
|
||||
Oper *o = nullptr;
|
||||
|
||||
/* Unsaved data */
|
||||
|
||||
/** The display nick for this account. */
|
||||
Serialize::Reference<NickAlias> na;
|
||||
/* Number of channels registered by this account */
|
||||
uint16_t channelcount = 0;
|
||||
/* Users online now logged into this account */
|
||||
std::list<User *> users;
|
||||
|
||||
/** Constructor
|
||||
* @param display The display nick
|
||||
* @param id The account id
|
||||
*/
|
||||
NickCore(const Anope::string &nickdisplay, uint64_t nickid = 0);
|
||||
~NickCore();
|
||||
|
||||
/** Changes the display for this account
|
||||
* @param na The new display, must be grouped to this account.
|
||||
*/
|
||||
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.
|
||||
*/
|
||||
bool IsServicesOper() const;
|
||||
|
||||
/** Retrieves the account id for this user */
|
||||
uint64_t GetId();
|
||||
|
||||
/** Finds an account
|
||||
* @param nick The account name to find
|
||||
* @return The account, if it exists
|
||||
*/
|
||||
static NickCore *Find(const Anope::string &nick);
|
||||
static NickCore *FindId(uint64_t uid);
|
||||
|
||||
void AddChannelReference(ChannelInfo *ci);
|
||||
void RemoveChannelReference(ChannelInfo *ci);
|
||||
void GetChannelReferences(std::deque<ChannelInfo *> &queue);
|
||||
};
|
||||
|
||||
/* A request to check if an account/password is valid. These can exist for
|
||||
* extended periods due to the time some authentication modules take.
|
||||
*/
|
||||
class CoreExport IdentifyRequest
|
||||
{
|
||||
/* Owner of this request, used to cleanup requests if a module is unloaded
|
||||
* while a request us pending */
|
||||
Module *owner;
|
||||
Anope::string account;
|
||||
Anope::string password;
|
||||
Anope::string address;
|
||||
|
||||
std::set<Module *> holds;
|
||||
bool dispatched = false;
|
||||
bool success = false;
|
||||
|
||||
static std::set<IdentifyRequest *> Requests;
|
||||
|
||||
protected:
|
||||
IdentifyRequest(Module *o, const Anope::string &acc, const Anope::string &pass, const Anope::string &ip);
|
||||
virtual ~IdentifyRequest();
|
||||
|
||||
public:
|
||||
/* One of these is called when the request goes through */
|
||||
virtual void OnSuccess(NickAlias *na) = 0;
|
||||
virtual void OnFail() = 0;
|
||||
|
||||
Module *GetOwner() const { return owner; }
|
||||
const Anope::string &GetAccount() const { return account; }
|
||||
const Anope::string &GetPassword() const { return password; }
|
||||
const Anope::string &GetAddress() const { return address; }
|
||||
|
||||
/* Holds this request. When a request is held it must be Released later
|
||||
* for the request to complete. Multiple modules may hold a request at any time,
|
||||
* but the request is not complete until every module has released it. If you do not
|
||||
* require holding this (eg, your password check is done in this thread and immediately)
|
||||
* then you don't need to hold the request before calling `Success()`.
|
||||
* @param m The module holding this request
|
||||
*/
|
||||
void Hold(Module *m);
|
||||
|
||||
/** Releases a held request
|
||||
* @param m The module releasing the hold
|
||||
*/
|
||||
void Release(Module *m);
|
||||
|
||||
/** Called by modules when this IdentifyRequest has succeeded.
|
||||
* If this request is behind held it must still be Released after calling this.
|
||||
* @param m The module confirming authentication
|
||||
*/
|
||||
void Success(Module *m, NickAlias *na);
|
||||
|
||||
/** Used to either finalize this request or marks
|
||||
* it as dispatched and begins waiting for the module(s)
|
||||
* that have holds to finish.
|
||||
*/
|
||||
void Dispatch();
|
||||
|
||||
static void ModuleUnload(Module *m);
|
||||
};
|
||||
-735
@@ -1,735 +0,0 @@
|
||||
// Anope IRC Services <https://www.anope.org/>
|
||||
//
|
||||
// Copyright (C) 2003-2026 Anope Contributors
|
||||
//
|
||||
// Anope is free software. You can use, modify, and/or distribute it under the
|
||||
// terms of version 2 of the GNU General Public License. See docs/LICENSE.txt
|
||||
// for the complete terms of this license and docs/AUTHORS.txt for a list of
|
||||
// contributors.
|
||||
//
|
||||
// Based on the original code of Epona by Lara
|
||||
// Based on the original code of Services by Andy Church
|
||||
//
|
||||
// SPDX-License-Identifier: GPL-2.0-only
|
||||
|
||||
#pragma once
|
||||
|
||||
#include <signal.h>
|
||||
|
||||
#include "hashcomp.h"
|
||||
|
||||
#define UTF_CPP_CPLUSPLUS 201703L
|
||||
#include "utfcpp/unchecked.h"
|
||||
|
||||
namespace Anope
|
||||
{
|
||||
/**
|
||||
* A wrapper string class around all the other string classes, this class will
|
||||
* allow us to only require one type of string everywhere that can be converted
|
||||
* at any time to a specific type of string.
|
||||
*/
|
||||
class CoreExport string final
|
||||
{
|
||||
private:
|
||||
/**
|
||||
* The actual string is stored in an std::string as it can be converted to
|
||||
* ci::string, or a C-style string at any time.
|
||||
*/
|
||||
std::string _string;
|
||||
public:
|
||||
/**
|
||||
* Extras.
|
||||
*/
|
||||
typedef std::string::iterator iterator;
|
||||
typedef std::string::const_iterator const_iterator;
|
||||
typedef std::string::reverse_iterator reverse_iterator;
|
||||
typedef std::string::const_reverse_iterator const_reverse_iterator;
|
||||
typedef std::string::size_type size_type;
|
||||
typedef std::string::value_type value_type;
|
||||
static const size_type npos = static_cast<size_type>(-1);
|
||||
|
||||
/**
|
||||
* Constructors that can take in any type of string.
|
||||
*/
|
||||
string() : _string("") { }
|
||||
string(char chr) : _string() { _string = chr; }
|
||||
string(size_type n, char chr) : _string(n, chr) { }
|
||||
string(const char *_str) : _string(_str) { }
|
||||
string(const char *_str, size_type n) : _string(_str, n) { }
|
||||
string(const std::string &_str) : _string(_str) { }
|
||||
string(const ci::string &_str) : _string(_str.c_str()) { }
|
||||
string(const std::string_view &_sv) : _string(_sv.begin(), _sv.end()) { }
|
||||
string(const string &_str, size_type pos, size_type n = npos) : _string(_str._string, pos, n) { }
|
||||
template <class InputIterator> string(InputIterator first, InputIterator last) : _string(first, last) { }
|
||||
string(const string &) = default;
|
||||
|
||||
/**
|
||||
* Assignment operators, so any type of string can be assigned to this class.
|
||||
*/
|
||||
inline string &operator=(char chr) { this->_string = chr; return *this; }
|
||||
inline string &operator=(const char *_str) { this->_string = _str; return *this; }
|
||||
inline string &operator=(const std::string &_str) { this->_string = _str; return *this; }
|
||||
inline string &operator=(const string &_str) { if (this != &_str) this->_string = _str._string; return *this; }
|
||||
|
||||
/**
|
||||
* Equality operators, to compare to any type of string.
|
||||
*/
|
||||
inline bool operator==(const char *_str) const { return this->_string == _str; }
|
||||
inline bool operator==(const std::string &_str) const { return this->_string == _str; }
|
||||
inline bool operator==(const string &_str) const { return this->_string == _str._string; }
|
||||
|
||||
inline bool equals_cs(const char *_str) const { return this->_string == _str; }
|
||||
inline bool equals_cs(const std::string &_str) const { return this->_string == _str; }
|
||||
inline bool equals_cs(const string &_str) const { return this->_string == _str._string; }
|
||||
|
||||
inline bool equals_ci(const char *_str) const { return ci::string(this->_string.c_str()) == _str; }
|
||||
inline bool equals_ci(const std::string &_str) const { return ci::string(this->_string.c_str()) == _str.c_str(); }
|
||||
inline bool equals_ci(const string &_str) const { return ci::string(this->_string.c_str()) == _str._string.c_str(); }
|
||||
|
||||
/**
|
||||
* Inequality operators, exact opposites of the above.
|
||||
*/
|
||||
inline bool operator!=(const char *_str) const { return !operator==(_str); }
|
||||
inline bool operator!=(const std::string &_str) const { return !operator==(_str); }
|
||||
inline bool operator!=(const string &_str) const { return !operator==(_str); }
|
||||
|
||||
/**
|
||||
* Compound addition operators, overloaded to do concatenation.
|
||||
*/
|
||||
inline string &operator+=(char chr) { this->_string += chr; return *this; }
|
||||
inline string &operator+=(const char *_str) { this->_string += _str; return *this; }
|
||||
inline string &operator+=(const std::string &_str) { this->_string += _str; return *this; }
|
||||
inline string &operator+=(const string &_str) { if (this != &_str) this->_string += _str._string; return *this; }
|
||||
|
||||
/**
|
||||
* Addition operators, overloaded to do concatenation.
|
||||
*/
|
||||
inline const string operator+(char chr) const { return string(*this) += chr; }
|
||||
inline const string operator+(const char *_str) const { return string(*this) += _str; }
|
||||
inline const string operator+(const std::string &_str) const { return string(*this) += _str; }
|
||||
inline const string operator+(const string &_str) const { return string(*this) += _str; }
|
||||
|
||||
friend const string operator+(char chr, const string &str);
|
||||
friend const string operator+(const char *_str, const string &str);
|
||||
friend const string operator+(const std::string &_str, const string &str);
|
||||
|
||||
/**
|
||||
* Less-than operator.
|
||||
*/
|
||||
inline bool operator<(const string &_str) const { return this->_string < _str._string; }
|
||||
|
||||
/**
|
||||
* The following functions return the various types of strings.
|
||||
*/
|
||||
inline const char *c_str() const { return this->_string.c_str(); }
|
||||
inline const char *data() const { return this->_string.data(); }
|
||||
inline std::string &str() { return this->_string; }
|
||||
inline const std::string &str() const { return this->_string; }
|
||||
inline ci::string ci_str() const { return ci::string(this->_string.c_str()); }
|
||||
|
||||
/**
|
||||
* Returns if the string is empty or not.
|
||||
*/
|
||||
inline bool empty() const { return this->_string.empty(); }
|
||||
|
||||
/**
|
||||
* Returns the string's length.
|
||||
*/
|
||||
inline size_type length() const { return this->_string.length(); }
|
||||
inline size_type utf8length() const { return utf8::unchecked::distance(str().begin(), str().end()); }
|
||||
|
||||
/**
|
||||
* Returns the size of the currently allocated storage space in the string object.
|
||||
* This can be equal or greater than the length of the string.
|
||||
*/
|
||||
inline size_type capacity() const { return this->_string.capacity(); }
|
||||
|
||||
/**
|
||||
* Add a char to the end of the string.
|
||||
*/
|
||||
inline void push_back(char c) { return this->_string.push_back(c); }
|
||||
|
||||
inline string &append(const string &s) { this->_string.append(s.str()); return *this; }
|
||||
inline string &append(const char *s, size_t n) { this->_string.append(s, n); return *this; }
|
||||
|
||||
/**
|
||||
* Resizes the string content to n characters.
|
||||
*/
|
||||
inline void resize(size_type n) { return this->_string.resize(n); }
|
||||
|
||||
/**
|
||||
* Erases characters from the string.
|
||||
*/
|
||||
inline iterator erase(const iterator &i) { return this->_string.erase(i); }
|
||||
inline iterator erase(const iterator &first, const iterator &last) { return this->_string.erase(first, last); }
|
||||
inline void erase(size_type pos = 0, size_type n = std::string::npos) { this->_string.erase(pos, n); }
|
||||
|
||||
/**
|
||||
* Trim leading and trailing white spaces from the string.
|
||||
*/
|
||||
|
||||
inline string <rim(const Anope::string &what = " \t\r\n")
|
||||
{
|
||||
while (!this->_string.empty() && what.find(this->_string[0]) != Anope::string::npos)
|
||||
this->_string.erase(this->_string.begin());
|
||||
return *this;
|
||||
}
|
||||
|
||||
inline string &rtrim(const Anope::string &what = " \t\r\n")
|
||||
{
|
||||
while (!this->_string.empty() && what.find(this->_string[this->_string.length() - 1]) != Anope::string::npos)
|
||||
this->_string.erase(this->_string.length() - 1);
|
||||
return *this;
|
||||
}
|
||||
|
||||
inline string &trim(const Anope::string &what = " \t\r\n")
|
||||
{
|
||||
this->ltrim(what);
|
||||
this->rtrim(what);
|
||||
return *this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Clears the string.
|
||||
*/
|
||||
inline void clear() { this->_string.clear(); }
|
||||
|
||||
/**
|
||||
* Find substrings of the string.
|
||||
*/
|
||||
inline size_type find(const string &_str, size_type pos = 0) const { return this->_string.find(_str._string, pos); }
|
||||
inline size_type find(char chr, size_type pos = 0) const { return this->_string.find(chr, pos); }
|
||||
inline size_type find_ci(const string &_str, size_type pos = 0) const { return ci::string(this->_string.c_str()).find(ci::string(_str._string.c_str()), pos); }
|
||||
inline size_type find_ci(char chr, size_type pos = 0) const { return ci::string(this->_string.c_str()).find(chr, pos); }
|
||||
|
||||
inline size_type rfind(const string &_str, size_type pos = npos) const { return this->_string.rfind(_str._string, pos); }
|
||||
inline size_type rfind(char chr, size_type pos = npos) const { return this->_string.rfind(chr, pos); }
|
||||
inline size_type rfind_ci(const string &_str, size_type pos = npos) const { return ci::string(this->_string.c_str()).rfind(ci::string(_str._string.c_str()), pos); }
|
||||
inline size_type rfind_ci(char chr, size_type pos = npos) const { return ci::string(this->_string.c_str()).rfind(chr, pos); }
|
||||
|
||||
inline size_type find_first_of(const string &_str, size_type pos = 0) const { return this->_string.find_first_of(_str._string, pos); }
|
||||
inline size_type find_first_of_ci(const string &_str, size_type pos = 0) const { return ci::string(this->_string.c_str()).find_first_of(ci::string(_str._string.c_str()), pos); }
|
||||
|
||||
inline size_type find_first_not_of(const string &_str, size_type pos = 0) const { return this->_string.find_first_not_of(_str._string, pos); }
|
||||
inline size_type find_first_not_of_ci(const string &_str, size_type pos = 0) const { return ci::string(this->_string.c_str()).find_first_not_of(ci::string(_str._string.c_str()), pos); }
|
||||
|
||||
inline size_type find_last_of(const string &_str, size_type pos = npos) const { return this->_string.find_last_of(_str._string, pos); }
|
||||
inline size_type find_last_of_ci(const string &_str, size_type pos = npos) const { return ci::string(this->_string.c_str()).find_last_of(ci::string(_str._string.c_str()), pos); }
|
||||
|
||||
inline size_type find_last_not_of(const string &_str, size_type pos = npos) const { return this->_string.find_last_not_of(_str._string, pos); }
|
||||
inline size_type find_last_not_of_ci(const string &_str, size_type pos = npos) const { return ci::string(this->_string.c_str()).find_last_not_of(ci::string(_str._string.c_str()), pos); }
|
||||
|
||||
inline int compare(size_t pos, size_t len, const string &str) const { return ci::string(this->_string.c_str()).compare(pos, len, ci::string(str.c_str())); }
|
||||
inline int compare(size_t pos, size_t len, const string &str, size_t subpos, size_type sublen = npos) const { return ci::string(this->_string.c_str()).compare(pos, len, ci::string(str.c_str()), subpos, sublen); }
|
||||
inline int compare(size_t pos, size_t len, const char *s, size_type n = npos) const { return ci::string(this->_string.c_str()).compare(pos, len, s, n); }
|
||||
|
||||
/**
|
||||
* Determine if string consists of only numbers.
|
||||
*/
|
||||
inline bool is_number_only() const { return this->find_first_not_of("0123456789.-") == npos; }
|
||||
inline bool is_pos_number_only() const { return this->find_first_not_of("0123456789.") == npos; }
|
||||
|
||||
/**
|
||||
* In IRC messages we use a substitute (ASCII 0x1B) instead of a space
|
||||
* (ASCII 0x20) so it doesn't get line wrapped when put into a message.
|
||||
* The line wrapper will convert this to a space before it is sent to
|
||||
* clients.
|
||||
*/
|
||||
inline Anope::string nobreak() const { return this->replace_all_cs("\x20", "\x1B"); }
|
||||
|
||||
/**
|
||||
* Replace parts of the string.
|
||||
*/
|
||||
inline string replace(size_type pos, size_type n, const string &_str) { return string(this->_string.replace(pos, n, _str._string)); }
|
||||
inline string replace(size_type pos, size_type n, const string &_str, size_type pos1, size_type n1) { return string(this->_string.replace(pos, n, _str._string, pos1, n1)); }
|
||||
inline string replace(size_type pos, size_type n, size_type n1, char chr) { return string(this->_string.replace(pos, n, n1, chr)); }
|
||||
inline string replace(iterator first, iterator last, const string &_str) { return string(this->_string.replace(first, last, _str._string)); }
|
||||
inline string replace(iterator first, iterator last, size_type n, char chr) { return string(this->_string.replace(first, last, n, chr)); }
|
||||
template <class InputIterator> inline string replace(iterator first, iterator last, InputIterator f, InputIterator l) { return string(this->_string.replace(first, last, f, l)); }
|
||||
inline string replace_all_cs(const string &_orig, const string &_repl) const
|
||||
{
|
||||
Anope::string new_string = *this;
|
||||
size_type pos = new_string.find(_orig), orig_length = _orig.length(), repl_length = _repl.length();
|
||||
while (pos != npos)
|
||||
{
|
||||
new_string = new_string.substr(0, pos) + _repl + new_string.substr(pos + orig_length);
|
||||
pos = new_string.find(_orig, pos + repl_length);
|
||||
}
|
||||
return new_string;
|
||||
}
|
||||
inline string replace_all_ci(const string &_orig, const string &_repl) const
|
||||
{
|
||||
Anope::string new_string = *this;
|
||||
size_type pos = new_string.find_ci(_orig), orig_length = _orig.length(), repl_length = _repl.length();
|
||||
while (pos != npos)
|
||||
{
|
||||
new_string = new_string.substr(0, pos) + _repl + new_string.substr(pos + orig_length);
|
||||
pos = new_string.find_ci(_orig, pos + repl_length);
|
||||
}
|
||||
return new_string;
|
||||
}
|
||||
|
||||
/**
|
||||
* Get the string in lowercase.
|
||||
*/
|
||||
inline string lower() const
|
||||
{
|
||||
Anope::string new_string = *this;
|
||||
for (auto &chr : new_string)
|
||||
chr = Anope::tolower(chr);
|
||||
return new_string;
|
||||
}
|
||||
|
||||
/**
|
||||
* Get the string in uppercase.
|
||||
*/
|
||||
inline string upper() const
|
||||
{
|
||||
Anope::string new_string = *this;
|
||||
for (auto &chr : new_string)
|
||||
chr = Anope::toupper(chr);
|
||||
return new_string;
|
||||
}
|
||||
|
||||
/**
|
||||
* Get a substring of the string.
|
||||
*/
|
||||
inline string substr(size_type pos = 0, size_type n = npos) const { return string(this->_string.substr(pos, n)); }
|
||||
|
||||
/**
|
||||
* Iterators to the string.
|
||||
*/
|
||||
inline iterator begin() { return this->_string.begin(); }
|
||||
inline const_iterator begin() const { return this->_string.begin(); }
|
||||
inline iterator end() { return this->_string.end(); }
|
||||
inline const_iterator end() const { return this->_string.end(); }
|
||||
inline reverse_iterator rbegin() { return this->_string.rbegin(); }
|
||||
inline const_reverse_iterator rbegin() const { return this->_string.rbegin(); }
|
||||
inline reverse_iterator rend() { return this->_string.rend(); }
|
||||
inline const_reverse_iterator rend() const { return this->_string.rend(); }
|
||||
|
||||
/**
|
||||
* Subscript operator, to access individual characters of the string.
|
||||
*/
|
||||
inline char &operator[](size_type n) { return this->_string[n]; }
|
||||
inline const char &operator[](size_type n) const { return this->_string[n]; }
|
||||
|
||||
/**
|
||||
* Stream insertion operator, must be friend because they cannot be inside the class.
|
||||
*/
|
||||
friend std::ostream &operator<<(std::ostream &os, const string &_str);
|
||||
friend std::istream &operator>>(std::istream &is, string &_str);
|
||||
};
|
||||
|
||||
inline std::ostream &operator<<(std::ostream &os, const string &_str) { return os << _str._string; }
|
||||
/* This is not standard to make operator>> behave like operator<< in that it will allow extracting a whole line, not just one word */
|
||||
inline std::istream &operator>>(std::istream &is, string &_str) { return std::getline(is, _str._string); }
|
||||
|
||||
inline const string operator+(char chr, const string &str) { string tmp(chr); tmp += str; return tmp; }
|
||||
inline const string operator+(const char *_str, const string &str) { string tmp(_str); tmp += str; return tmp; }
|
||||
inline const string operator+(const std::string &_str, const string &str) { string tmp(_str); tmp += str; return tmp; }
|
||||
|
||||
struct hash_ci final
|
||||
{
|
||||
inline size_t operator()(const string &s) const
|
||||
{
|
||||
return std::hash<std::string>()(s.lower().str());
|
||||
}
|
||||
};
|
||||
|
||||
struct hash_cs final
|
||||
{
|
||||
inline size_t operator()(const string &s) const
|
||||
{
|
||||
return std::hash<std::string>()(s.str());
|
||||
}
|
||||
};
|
||||
|
||||
struct compare final
|
||||
{
|
||||
inline bool operator()(const string &s1, const string &s2) const
|
||||
{
|
||||
return s1.equals_ci(s2);
|
||||
}
|
||||
};
|
||||
|
||||
template<typename T>
|
||||
using map = std::map<string, T, ci::less>;
|
||||
|
||||
template<typename T>
|
||||
using multimap = std::multimap<string, T, ci::less>;
|
||||
|
||||
template<typename T>
|
||||
using unordered_map = std::unordered_map<string, T, hash_ci, compare>;
|
||||
|
||||
#if !REPRODUCIBLE_BUILD
|
||||
static const char *const compiled = __TIME__ " " __DATE__;
|
||||
#endif
|
||||
|
||||
/** The time Anope started.
|
||||
*/
|
||||
extern CoreExport time_t StartTime;
|
||||
|
||||
/** The value to return from main()
|
||||
*/
|
||||
extern int ReturnValue;
|
||||
|
||||
extern sig_atomic_t Signal;
|
||||
extern CoreExport bool Quitting;
|
||||
extern CoreExport bool Restarting;
|
||||
extern CoreExport Anope::string QuitReason;
|
||||
|
||||
/** The current system time, which is pretty close to being accurate.
|
||||
* Use this unless you need very specific time checks
|
||||
*/
|
||||
extern CoreExport time_t CurTime;
|
||||
extern CoreExport long long CurTimeNs;
|
||||
|
||||
/** The debug level we are running at.
|
||||
*/
|
||||
extern CoreExport unsigned Debug;
|
||||
|
||||
/** Other command line options.
|
||||
*/
|
||||
extern CoreExport bool ReadOnly, NoFork, NoThird, NoDB, NoPID, NoExpire, ProtocolDebug;
|
||||
|
||||
/** The root of the Anope installation. Usually ~/anope
|
||||
*/
|
||||
extern CoreExport Anope::string ServicesDir;
|
||||
|
||||
/** Anope binary name (eg anope)
|
||||
*/
|
||||
extern CoreExport Anope::string ServicesBin;
|
||||
|
||||
/** Various directory paths. These can be set at runtime by command line args
|
||||
*/
|
||||
extern CoreExport Anope::string ConfigDir;
|
||||
extern CoreExport Anope::string DataDir;
|
||||
extern CoreExport Anope::string ModuleDir;
|
||||
extern CoreExport Anope::string LocaleDir;
|
||||
extern CoreExport Anope::string LogDir;
|
||||
|
||||
/** The uplink we are currently connected to
|
||||
*/
|
||||
extern CoreExport size_t CurrentUplink;
|
||||
|
||||
/** Various methods to determine the Anope version running
|
||||
*/
|
||||
extern CoreExport string Version();
|
||||
extern CoreExport string VersionShort();
|
||||
extern CoreExport string VersionBuildString();
|
||||
extern CoreExport unsigned VersionMajor();
|
||||
extern CoreExport unsigned VersionMinor();
|
||||
extern CoreExport unsigned VersionPatch();
|
||||
|
||||
/** Determines if we are still attached to the terminal, and can print
|
||||
* messages to the user via stderr/stdout.
|
||||
* @return true if still attached
|
||||
*/
|
||||
extern bool AtTerm();
|
||||
|
||||
/** Used to "fork" the process and go into the background during initial startup
|
||||
* while we are AtTerm(). The actual fork is not done here, but earlier, and this
|
||||
* simply notifies the parent via kill() to exit().
|
||||
*/
|
||||
extern void Fork();
|
||||
|
||||
/** Does something with the signal in Anope::Signal
|
||||
*/
|
||||
extern void HandleSignal();
|
||||
|
||||
/** One of the first functions called, does general initialization such as reading
|
||||
* command line args, loading the configuration, doing the initial fork() if necessary,
|
||||
* initializing language support, loading modules, and loading databases.
|
||||
* @throws CoreException if something bad went wrong
|
||||
*/
|
||||
extern bool Init(int ac, char **av);
|
||||
|
||||
/** Calls the save database event
|
||||
*/
|
||||
extern CoreExport void SaveDatabases();
|
||||
|
||||
/** Check whether two strings match.
|
||||
* @param str The string to check against the pattern (e.g. foobar)
|
||||
* @param mask The pattern to check (e.g. foo*bar)
|
||||
* @param case_sensitive Whether or not the match is case sensitive, default false.
|
||||
* @param use_regex Whether or not to try regex. case_sensitive is not used in regex.
|
||||
*/
|
||||
extern CoreExport bool Match(const string &str, const string &mask, bool case_sensitive = false, bool use_regex = false);
|
||||
|
||||
/** Converts a string to hex
|
||||
* @param the data to be converted
|
||||
* @return a anope::string containing the hex value
|
||||
*/
|
||||
extern CoreExport string Hex(const string &data);
|
||||
extern CoreExport string Hex(const char *data, unsigned len);
|
||||
|
||||
/** Converts a string from hex
|
||||
* @param src The data to be converted
|
||||
* @param dest The destination string
|
||||
*/
|
||||
extern CoreExport void Unhex(const string &src, string &dest);
|
||||
extern CoreExport void Unhex(const string &src, char *dest, size_t sz);
|
||||
|
||||
/** Encrypts what is in 'src' to 'dest'
|
||||
* @param src The source string to encrypt
|
||||
* @param dest The destination where the encrypted string is placed
|
||||
*/
|
||||
extern CoreExport bool Encrypt(const Anope::string &src, Anope::string &dest);
|
||||
|
||||
/** Return the last error code
|
||||
* @return The error code
|
||||
*/
|
||||
extern CoreExport int LastErrorCode();
|
||||
|
||||
/** Return the last error, uses errno/GetLastError() to determine this
|
||||
* @return An error message
|
||||
*/
|
||||
extern CoreExport string LastError();
|
||||
|
||||
/** Determines if a path is a file
|
||||
*/
|
||||
extern CoreExport bool IsFile(const Anope::string &file);
|
||||
|
||||
/** Converts a string into seconds
|
||||
* @param s The string, eg 3d
|
||||
* @return The time represented by the string, eg 259,200
|
||||
*/
|
||||
extern CoreExport time_t DoTime(const Anope::string &s);
|
||||
|
||||
/** Retrieves a human readable string representing the time in seconds
|
||||
* @param seconds The time on seconds, eg 60
|
||||
* @param nc The account to use language settings for to translate this string, if applicable
|
||||
* @param round Whether to round the duration to produce a shorter output.
|
||||
* @return A human readable string, eg "1 minute"
|
||||
*/
|
||||
extern CoreExport Anope::string Duration(time_t seconds, const NickCore *nc = nullptr, bool round = false);
|
||||
|
||||
/** Generates a human readable string of type "expires in ..."
|
||||
* @param expires time in seconds
|
||||
* @param nc The account to use language settings for to translate this string, if applicable
|
||||
* @return A human readable string, eg "expires in 5 days"
|
||||
*/
|
||||
extern CoreExport Anope::string Expires(time_t seconds, const NickCore *nc = NULL);
|
||||
|
||||
/** Converts a time in seconds (epoch) to a human readable format.
|
||||
* @param t The time
|
||||
* @param nc The account to use language settings for to translate this string, if applicable
|
||||
* @param short_output If true, the output is just a date (eg, "Apr 12 20:18:22 2009 MSD"), else it includes the date and how long ago/from now that date is, (eg "Apr 12 20:18:22 2009 MSD (1313 days, 9 hours, 32 minutes ago)"
|
||||
*/
|
||||
extern CoreExport Anope::string strftime(time_t t, const NickCore *nc = NULL, bool short_output = false);
|
||||
|
||||
/** Parses a raw message from the uplink and calls its command handler.
|
||||
* @param message Raw message from the uplink
|
||||
*/
|
||||
extern void Process(const Anope::string &message);
|
||||
|
||||
/** Calls the command handler for an already parsed message.
|
||||
* @param source Source of the message.
|
||||
* @param command Command name.
|
||||
* @param params Any extra parameters.
|
||||
* @param tags IRCv3 message tags.
|
||||
*/
|
||||
extern CoreExport void ProcessInternal(MessageSource &src, const Anope::string &command, const std::vector<Anope::string> ¶ms, const Anope::map<Anope::string> & tags);
|
||||
|
||||
/** Does a blocking dns query and returns the first IP.
|
||||
* @param host host to look up
|
||||
* @param type inet addr type
|
||||
* @return the IP if it was found, else the host
|
||||
*/
|
||||
extern Anope::string Resolve(const Anope::string &host, int type);
|
||||
|
||||
/** Does a blocking dns query and returns all IPs.
|
||||
* @param host host to look up
|
||||
* @param type inet addr type
|
||||
* @return A list of all IPs that the host resolves to
|
||||
*/
|
||||
extern std::vector<Anope::string> ResolveMultiple(const Anope::string &host, int type);
|
||||
|
||||
/** Generate a string of random letters and numbers
|
||||
* @param len The length of the string returned
|
||||
*/
|
||||
extern CoreExport Anope::string Random(size_t len);
|
||||
|
||||
/** Generate a random number. */
|
||||
extern CoreExport int RandomNumber();
|
||||
|
||||
/** Update the current time. */
|
||||
extern CoreExport void UpdateTime();
|
||||
}
|
||||
|
||||
/** sepstream allows for splitting token separated lists.
|
||||
* Each successive call to sepstream::GetToken() returns
|
||||
* the next token, until none remain, at which point the method returns
|
||||
* an empty string.
|
||||
*/
|
||||
class CoreExport sepstream
|
||||
{
|
||||
private:
|
||||
/** Original string.
|
||||
*/
|
||||
Anope::string tokens;
|
||||
/** Separator value
|
||||
*/
|
||||
char sep;
|
||||
/** Current string position
|
||||
*/
|
||||
size_t pos = 0;
|
||||
/** If set then GetToken() can return an empty string
|
||||
*/
|
||||
bool allow_empty;
|
||||
public:
|
||||
/** Create a sepstream and fill it with the provided data
|
||||
*/
|
||||
sepstream(const Anope::string &source, char separator, bool allowempty = false);
|
||||
|
||||
/** Retrieves the underlying string. */
|
||||
const auto &GetString() const { return tokens; }
|
||||
|
||||
/** Fetch the next token from the stream
|
||||
* @param token The next token from the stream is placed here
|
||||
* @return True if tokens still remain, false if there are none left
|
||||
*/
|
||||
bool GetToken(Anope::string &token);
|
||||
|
||||
/** Gets token number 'num' from the stream
|
||||
* @param token The token is placed here
|
||||
* @param num The token number to fetch
|
||||
* @return True if the token was able to be fetched
|
||||
*/
|
||||
bool GetToken(Anope::string &token, int num);
|
||||
|
||||
/** Gets every token from this stream
|
||||
* @param token Tokens are pushed back here
|
||||
*/
|
||||
template<typename T> void GetTokens(T &token)
|
||||
{
|
||||
token.clear();
|
||||
Anope::string t;
|
||||
while (this->GetToken(t))
|
||||
token.push_back(t);
|
||||
}
|
||||
|
||||
/** Gets token number 'num' from the stream and all remaining tokens.
|
||||
* @param token The token is placed here
|
||||
* @param num The token number to fetch
|
||||
* @return True if the token was able to be fetched
|
||||
*/
|
||||
bool GetTokenRemainder(Anope::string &token, int num);
|
||||
|
||||
/** Determines the number of tokens in this stream.
|
||||
* @return The number of tokens in this stream
|
||||
*/
|
||||
int NumTokens();
|
||||
|
||||
/** Fetch the entire remaining stream, without tokenizing
|
||||
* @return The remaining part of the stream
|
||||
*/
|
||||
Anope::string GetRemaining();
|
||||
|
||||
/** Returns true if the end of the stream has been reached
|
||||
* @return True if the end of the stream has been reached, otherwise false
|
||||
*/
|
||||
bool StreamEnd();
|
||||
};
|
||||
|
||||
/** A derived form of sepstream, which separates on commas
|
||||
*/
|
||||
class commasepstream final
|
||||
: public sepstream
|
||||
{
|
||||
public:
|
||||
/** Initialize with comma separator
|
||||
*/
|
||||
commasepstream(const Anope::string &source, bool allowempty = false) : sepstream(source, ',', allowempty) { }
|
||||
};
|
||||
|
||||
/** A derived form of sepstream, which separates on spaces
|
||||
*/
|
||||
class spacesepstream final
|
||||
: public sepstream
|
||||
{
|
||||
public:
|
||||
/** Initialize with space separator
|
||||
*/
|
||||
spacesepstream(const Anope::string &source) : sepstream(source, ' ') { }
|
||||
};
|
||||
|
||||
/** This class can be used on its own to represent an exception, or derived to represent a module-specific exception.
|
||||
* When a module whishes to abort, e.g. within a constructor, it should throw an exception using ModuleException or
|
||||
* a class derived from ModuleException. If a module throws an exception during its constructor, the module will not
|
||||
* be loaded. If this happens, the error message returned by ModuleException::GetReason will be displayed to the user
|
||||
* attempting to load the module, or dumped to the console if the ircd is currently loading for the first time.
|
||||
*/
|
||||
class CoreExport CoreException
|
||||
: public std::exception
|
||||
{
|
||||
protected:
|
||||
/** Holds the error message to be displayed
|
||||
*/
|
||||
Anope::string err;
|
||||
/** Source of the exception
|
||||
*/
|
||||
Anope::string source;
|
||||
public:
|
||||
/** This constructor can be used to specify an error message before throwing.
|
||||
*/
|
||||
CoreException(const Anope::string &message) : err(message), source("The core") { }
|
||||
/** This constructor can be used to specify an error message before throwing,
|
||||
* and to specify the source of the exception.
|
||||
*/
|
||||
CoreException(const Anope::string &message, const Anope::string &src) : err(message), source(src) { }
|
||||
/** This destructor solves world hunger, cancels the world debt, and causes the world to end.
|
||||
* Actually no, it does nothing. Never mind.
|
||||
* @throws Nothing!
|
||||
*/
|
||||
virtual ~CoreException() noexcept = default;
|
||||
/** Returns the reason for the exception.
|
||||
* The module should probably put something informative here as the user will see this upon failure.
|
||||
*/
|
||||
virtual const Anope::string &GetReason() const
|
||||
{
|
||||
return err;
|
||||
}
|
||||
|
||||
virtual const Anope::string &GetSource() const
|
||||
{
|
||||
return source;
|
||||
}
|
||||
};
|
||||
|
||||
class CoreExport ModuleException
|
||||
: public CoreException
|
||||
{
|
||||
public:
|
||||
/** This constructor can be used to specify an error message before throwing.
|
||||
*/
|
||||
ModuleException(const Anope::string &message) : CoreException(message, "A Module") { }
|
||||
/** This destructor solves world hunger, cancels the world debt, and causes the world to end.
|
||||
* Actually no, it does nothing. Never mind.
|
||||
* @throws Nothing!
|
||||
*/
|
||||
virtual ~ModuleException() noexcept = default;
|
||||
};
|
||||
|
||||
/** Casts to be used instead of dynamic_cast, this uses dynamic_cast
|
||||
* for debug builds and static_cast on release builds
|
||||
* to speed up the program because dynamic_cast relies on RTTI.
|
||||
*/
|
||||
#ifdef DEBUG_BUILD
|
||||
# include <typeinfo>
|
||||
template<typename T, typename O> inline T anope_dynamic_static_cast(O ptr)
|
||||
{
|
||||
T ret = dynamic_cast<T>(ptr);
|
||||
if (ptr != NULL && ret == NULL)
|
||||
throw CoreException(Anope::string("anope_dynamic_static_cast<") + typeid(T).name() + ">(" + typeid(O).name() + ") fail");
|
||||
return ret;
|
||||
}
|
||||
#else
|
||||
template<typename T, typename O> inline T anope_dynamic_static_cast(O ptr)
|
||||
{
|
||||
return static_cast<T>(ptr);
|
||||
}
|
||||
#endif
|
||||
|
||||
#include "convert.h"
|
||||
-145
@@ -1,145 +0,0 @@
|
||||
// Anope IRC Services <https://www.anope.org/>
|
||||
//
|
||||
// Copyright (C) 2003-2026 Anope Contributors
|
||||
// Copyright (C) 2008-2011 Adam <Adam@anope.org>
|
||||
//
|
||||
// Anope is free software. You can use, modify, and/or distribute it under the
|
||||
// terms of version 2 of the GNU General Public License. See docs/LICENSE.txt
|
||||
// for the complete terms of this license and docs/AUTHORS.txt for a list of
|
||||
// contributors.
|
||||
//
|
||||
// Based on the original code of Epona by Lara
|
||||
// Based on the original code of Services by Andy Church
|
||||
//
|
||||
// SPDX-License-Identifier: GPL-2.0-only
|
||||
|
||||
#pragma once
|
||||
|
||||
#include "services.h"
|
||||
|
||||
/** The base class that most classes in Anope inherit from
|
||||
*/
|
||||
class CoreExport Base
|
||||
{
|
||||
/* References to this base class */
|
||||
std::set<ReferenceBase *> *references = nullptr;
|
||||
public:
|
||||
virtual ~Base();
|
||||
|
||||
/** Adds a reference to this object. Eg, when a Reference
|
||||
* is created referring to this object this is called. It is used to
|
||||
* cleanup references when this object is destructed.
|
||||
*/
|
||||
void AddReference(ReferenceBase *r);
|
||||
|
||||
void DelReference(ReferenceBase *r);
|
||||
};
|
||||
|
||||
class ReferenceBase
|
||||
{
|
||||
protected:
|
||||
bool invalid = false;
|
||||
public:
|
||||
ReferenceBase() = default;
|
||||
ReferenceBase(const ReferenceBase &other) : invalid(other.invalid) { }
|
||||
virtual ~ReferenceBase() = default;
|
||||
inline void Invalidate() { this->invalid = true; }
|
||||
};
|
||||
|
||||
/** Used to hold pointers to objects that may be deleted. A Reference will
|
||||
* no longer be valid once the object it refers is destructed.
|
||||
*/
|
||||
template<typename T>
|
||||
class Reference
|
||||
: public ReferenceBase
|
||||
{
|
||||
protected:
|
||||
T *ref = nullptr;
|
||||
public:
|
||||
Reference() = default;
|
||||
|
||||
Reference(T *obj) : ref(obj)
|
||||
{
|
||||
if (ref)
|
||||
ref->AddReference(this);
|
||||
}
|
||||
|
||||
Reference(const Reference<T> &other) : ReferenceBase(other), ref(other.ref)
|
||||
{
|
||||
if (operator bool())
|
||||
ref->AddReference(this);
|
||||
}
|
||||
|
||||
virtual ~Reference()
|
||||
{
|
||||
if (operator bool())
|
||||
ref->DelReference(this);
|
||||
}
|
||||
|
||||
inline Reference<T>& operator=(const Reference<T> &other)
|
||||
{
|
||||
if (this != &other)
|
||||
{
|
||||
if (*this)
|
||||
this->ref->DelReference(this);
|
||||
|
||||
this->ref = other.ref;
|
||||
this->invalid = other.invalid;
|
||||
|
||||
if (*this)
|
||||
this->ref->AddReference(this);
|
||||
}
|
||||
return *this;
|
||||
}
|
||||
|
||||
/* We explicitly call operator bool here in several places to prevent other
|
||||
* operators, such operator T*, from being called instead, which will mess
|
||||
* with any class inheriting from this that overloads this operator.
|
||||
*/
|
||||
virtual operator bool()
|
||||
{
|
||||
if (!this->invalid)
|
||||
return this->ref != NULL;
|
||||
return false;
|
||||
}
|
||||
|
||||
inline operator T*()
|
||||
{
|
||||
if (operator bool())
|
||||
return this->ref;
|
||||
return NULL;
|
||||
}
|
||||
|
||||
inline T *operator->()
|
||||
{
|
||||
if (operator bool())
|
||||
return this->ref;
|
||||
return NULL;
|
||||
}
|
||||
|
||||
inline T *operator*()
|
||||
{
|
||||
if (operator bool())
|
||||
return this->ref;
|
||||
return NULL;
|
||||
}
|
||||
|
||||
/** Note that we can't have an operator< that returns this->ref < other.ref
|
||||
* because this function is used to sort objects in containers (such as set
|
||||
* or map), and if the references themselves can change if the object they
|
||||
* refer to is invalidated or changed, then this screws with the order that
|
||||
* the objects would be in the container without properly adjusting the
|
||||
* container, resulting in weird stuff.
|
||||
*
|
||||
* As such, we don't allow storing references in containers that require
|
||||
* operator<, because they would not be able to compare what the references
|
||||
* actually referred to.
|
||||
*/
|
||||
|
||||
inline bool operator==(const Reference<T> &other)
|
||||
{
|
||||
if (!this->invalid)
|
||||
return this->ref == other;
|
||||
return false;
|
||||
}
|
||||
};
|
||||
-161
@@ -1,161 +0,0 @@
|
||||
// Anope IRC Services <https://www.anope.org/>
|
||||
//
|
||||
// Copyright (C) 2003-2026 Anope Contributors
|
||||
// Copyright (C) 2008-2011 Robin Burchell <w00t@inspircd.org>
|
||||
//
|
||||
// Anope is free software. You can use, modify, and/or distribute it under the
|
||||
// terms of version 2 of the GNU General Public License. See docs/LICENSE.txt
|
||||
// for the complete terms of this license and docs/AUTHORS.txt for a list of
|
||||
// contributors.
|
||||
//
|
||||
// Based on the original code of Epona by Lara
|
||||
// Based on the original code of Services by Andy Church
|
||||
//
|
||||
// SPDX-License-Identifier: GPL-2.0-only
|
||||
|
||||
|
||||
|
||||
#pragma once
|
||||
|
||||
#include "users.h"
|
||||
#include "anope.h"
|
||||
#include "serialize.h"
|
||||
#include "commands.h"
|
||||
|
||||
|
||||
typedef Anope::map<BotInfo *> botinfo_map;
|
||||
|
||||
extern CoreExport Serialize::Checker<botinfo_map> BotListByNick, BotListByUID;
|
||||
|
||||
/* A service bot (NickServ, ChanServ, a BotServ bot, etc). */
|
||||
class CoreExport BotInfo final
|
||||
: public User
|
||||
, public Serializable
|
||||
{
|
||||
public:
|
||||
struct Type final
|
||||
: public Serialize::Type
|
||||
{
|
||||
Type();
|
||||
void Serialize(Serializable *obj, Serialize::Data &data) const override;
|
||||
Serializable *Unserialize(Serializable *obj, Serialize::Data &data) const override;
|
||||
};
|
||||
|
||||
private:
|
||||
/* Channels this bot is assigned to */
|
||||
Serialize::Checker<std::set<ChannelInfo *> > channels;
|
||||
public:
|
||||
time_t created;
|
||||
/* Last time this bot said something (via privmsg) */
|
||||
time_t lastmsg;
|
||||
/* Map of actual command names -> service name/permission required */
|
||||
CommandInfo::map commands;
|
||||
/** CTCP responses this bot can send. */
|
||||
Anope::map<std::function<void(BotInfo *, User *, const Anope::string &)>> ctcps;
|
||||
/* 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 */
|
||||
std::vector<Anope::string> botchannels;
|
||||
/* Whether or not this bot is introduced to the network */
|
||||
bool introduced;
|
||||
/* Bot can only be assigned by irc ops */
|
||||
bool oper_only;
|
||||
/* Bot is defined in the configuration file */
|
||||
bool conf;
|
||||
|
||||
/** Create a new bot.
|
||||
* @param nick The nickname to assign to the bot.
|
||||
* @param user The ident to give the bot.
|
||||
* @param host The hostname to give the bot.
|
||||
* @param real The realname to give the bot.
|
||||
* @param bmodes The modes to give the bot.
|
||||
*/
|
||||
BotInfo(const Anope::string &nick, const Anope::string &user = "", const Anope::string &host = "", const Anope::string &real = "", const Anope::string &bmodes = "");
|
||||
|
||||
/** Destroy a bot, clearing up appropriately.
|
||||
*/
|
||||
virtual ~BotInfo();
|
||||
|
||||
void Serialize(Serialize::Data &data) const;
|
||||
static Serializable *Unserialize(Serializable *obj, Serialize::Data &);
|
||||
|
||||
void GenerateUID();
|
||||
|
||||
void OnKill();
|
||||
|
||||
/** Change the nickname for the bot.
|
||||
* @param newnick The nick to change to
|
||||
*/
|
||||
void SetNewNick(const Anope::string &newnick);
|
||||
|
||||
/** Return the channels this bot is assigned to
|
||||
*/
|
||||
const std::set<ChannelInfo *> &GetChannels() const;
|
||||
|
||||
/** Assign this bot to a given channel, removing the existing assigned bot if one exists.
|
||||
* @param u The user assigning the bot, or NULL
|
||||
* @param ci The channel registration to assign the bot to.
|
||||
*/
|
||||
void Assign(User *u, ChannelInfo *ci);
|
||||
|
||||
/** Remove this bot from a given channel.
|
||||
* @param u The user requesting the unassign, or NULL.
|
||||
* @param ci The channel registration to remove the bot from.
|
||||
*/
|
||||
void UnAssign(User *u, ChannelInfo *ci);
|
||||
|
||||
/** Get the number of channels this bot is assigned to
|
||||
*/
|
||||
unsigned GetChannelCount() const;
|
||||
|
||||
/** Join this bot to a channel
|
||||
* @param c The channel
|
||||
* @param status The status the bot should have on the channel
|
||||
*/
|
||||
void Join(Channel *c, ChannelStatus *status = NULL);
|
||||
|
||||
/** Join this bot to a channel
|
||||
* @param chname The channel name
|
||||
* @param status The status the bot should have on the channel
|
||||
*/
|
||||
void Join(const Anope::string &chname, ChannelStatus *status = NULL);
|
||||
|
||||
/** Part this bot from a channel
|
||||
* @param c The channel
|
||||
* @param reason The reason we're parting
|
||||
*/
|
||||
void Part(Channel *c, const Anope::string &reason = "");
|
||||
|
||||
/** Called when a user messages this bot
|
||||
* @param u The user
|
||||
* @param message The users' message
|
||||
* @params tags Message tags
|
||||
*/
|
||||
void OnMessage(User *u, const Anope::string &message, const Anope::map<Anope::string> &tags);
|
||||
|
||||
/** Link a command name to a command in services
|
||||
* @param cname The command name
|
||||
* @param sname The service name
|
||||
* @param permission Permission required to execute the command, if any
|
||||
* @return The commandinfo for the newly created command
|
||||
*/
|
||||
CommandInfo &SetCommand(const Anope::string &cname, const Anope::string &sname, const Anope::string &permission = "");
|
||||
|
||||
/** Get command info for a command
|
||||
* @param cname The command name
|
||||
* @return A struct containing service name and permission
|
||||
*/
|
||||
CommandInfo *GetCommand(const Anope::string &cname);
|
||||
|
||||
/** Get the command that users can use to send a message to this bot. */
|
||||
Anope::string GetQueryCommand(const Anope::string &command = "", const Anope::string &extra = "") const;
|
||||
|
||||
/** Find a bot by nick
|
||||
* @param nick The nick
|
||||
* @param nick_only True to only look by nick, and not by UID
|
||||
* @return The bot, if it exists
|
||||
*/
|
||||
static BotInfo *Find(const Anope::string &nick, bool nick_only = false);
|
||||
};
|
||||
@@ -1,327 +0,0 @@
|
||||
// Anope IRC Services <https://www.anope.org/>
|
||||
//
|
||||
// Copyright (C) 2003-2026 Anope Contributors
|
||||
//
|
||||
// Anope is free software. You can use, modify, and/or distribute it under the
|
||||
// terms of version 2 of the GNU General Public License. See docs/LICENSE.txt
|
||||
// for the complete terms of this license and docs/AUTHORS.txt for a list of
|
||||
// contributors.
|
||||
//
|
||||
// Based on the original code of Epona by Lara
|
||||
// Based on the original code of Services by Andy Church
|
||||
//
|
||||
// SPDX-License-Identifier: GPL-2.0-only
|
||||
|
||||
#pragma once
|
||||
|
||||
#include "anope.h"
|
||||
#include "extensible.h"
|
||||
#include "modes.h"
|
||||
#include "serialize.h"
|
||||
|
||||
typedef Anope::unordered_map<Channel *> channel_map;
|
||||
|
||||
extern CoreExport channel_map ChannelList;
|
||||
|
||||
/* A user's membership to a channel, there is one of these per user per channel. */
|
||||
struct Membership final
|
||||
: public Extensible
|
||||
{
|
||||
User *user;
|
||||
Channel *chan;
|
||||
/* Status the user has in the channel */
|
||||
ChannelStatus status;
|
||||
|
||||
Membership(User *u, Channel *c)
|
||||
: user(u)
|
||||
, chan(c)
|
||||
{
|
||||
}
|
||||
};
|
||||
|
||||
class CoreExport Channel final
|
||||
: public Base
|
||||
, public Extensible
|
||||
{
|
||||
static std::vector<Channel *> deleting;
|
||||
|
||||
public:
|
||||
typedef std::multimap<Anope::string, ModeData> ModeList;
|
||||
private:
|
||||
/** A map of channel modes with their parameters set on this channel
|
||||
*/
|
||||
ModeList modes;
|
||||
|
||||
public:
|
||||
/* Channel name */
|
||||
Anope::string name;
|
||||
/* Set if this channel is registered. ci->c == this. Contains information relevant to the registered channel */
|
||||
Serialize::Reference<ChannelInfo> ci;
|
||||
/* When the channel was created */
|
||||
time_t created;
|
||||
/* If the channel has just been created in a netjoin */
|
||||
bool syncing = false;
|
||||
/* Is configured in the conf as a channel bots should be in */
|
||||
bool botchannel = false;
|
||||
|
||||
/* Users in the channel */
|
||||
typedef std::map<User *, Membership *> ChanUserList;
|
||||
ChanUserList users;
|
||||
|
||||
/* Current topic of the channel */
|
||||
Anope::string topic;
|
||||
/* Who set the topic */
|
||||
Anope::string topic_setter;
|
||||
/* The timestamp associated with the topic. Not necessarily anywhere close to Anope::CurTime.
|
||||
* This is the time the topic was *originally set*. When we restore the topic we want to change the TS back
|
||||
* to this, but we can only do this on certain IRCds.
|
||||
*/
|
||||
time_t topic_ts = 0;
|
||||
/* The actual time the topic was set, probably close to Anope::CurTime */
|
||||
time_t topic_time = 0;
|
||||
|
||||
time_t server_modetime = 0; /* Time of last server MODE */
|
||||
time_t chanserv_modetime = 0; /* Time of last check_modes() */
|
||||
int16_t server_modecount = 0; /* Number of server MODEs this second */
|
||||
int16_t chanserv_modecount = 0; /* Number of check_mode()'s this sec */
|
||||
bool bouncy_modes = false; /* Did we fail to set modes here? */
|
||||
|
||||
private:
|
||||
/** Constructor
|
||||
* @param name The channel name
|
||||
* @param ts The time the channel was created
|
||||
*/
|
||||
Channel(const Anope::string &nname, time_t ts = Anope::CurTime);
|
||||
|
||||
public:
|
||||
/** Destructor
|
||||
*/
|
||||
~Channel();
|
||||
|
||||
/** Call if we need to unset all modes and clear all user status (internally).
|
||||
* Only useful if we get a SJOIN with a TS older than what we have here
|
||||
*/
|
||||
void Reset();
|
||||
|
||||
/** Restore the channel topic, set mlock (key), set stickied bans, etc
|
||||
*/
|
||||
void Sync();
|
||||
|
||||
/** Check if a channels modes are correct.
|
||||
*/
|
||||
void CheckModes();
|
||||
|
||||
/** Check if this channel should be deleted
|
||||
*/
|
||||
bool CheckDelete();
|
||||
|
||||
/** Join a user internally to the channel
|
||||
* @param u The user
|
||||
* @param status The status to give the user, if any
|
||||
* @return The membership for the user
|
||||
*/
|
||||
Membership *JoinUser(User *u, const ChannelStatus *status);
|
||||
|
||||
/** Remove a user internally from the channel
|
||||
* @param u The user
|
||||
*/
|
||||
void DeleteUser(User *u);
|
||||
|
||||
/** Check if the user is on the channel
|
||||
* @param u The user
|
||||
* @return A membership if found, else NULL
|
||||
*/
|
||||
Membership *FindUser(User *u) const;
|
||||
|
||||
/** Check if a user has a status on a channel
|
||||
* @param u The user
|
||||
* @param cms The status mode, or NULL to represent no status
|
||||
* @return true or false
|
||||
*/
|
||||
bool HasUserStatus(User *u, ChannelModeStatus *cms);
|
||||
|
||||
/** Check if a user has a status on a channel
|
||||
* Use the overloaded function for ChannelModeStatus* to check for no status
|
||||
* @param u The user
|
||||
* @param name The mode name, eg CMODE_OP, CMODE_VOICE
|
||||
* @return true or false
|
||||
*/
|
||||
bool HasUserStatus(User *u, const Anope::string &name);
|
||||
|
||||
/** See if a channel has a mode
|
||||
* @param name The mode name
|
||||
* @return The number of modes set
|
||||
* @param param The optional mode param
|
||||
*/
|
||||
size_t HasMode(const Anope::string &name, const Anope::string ¶m = "");
|
||||
|
||||
/** Set a mode internally on a channel, this is not sent out to the IRCd
|
||||
* @param setter The setter
|
||||
* @param cm The mode
|
||||
* @param data Data about the mode.
|
||||
* @param enforce_mlock true if mlocks should be enforced, false to override mlock
|
||||
*/
|
||||
void SetModeInternal(MessageSource &source, ChannelMode *cm, const ModeData &data = {}, bool enforce_mlock = true);
|
||||
|
||||
/** Remove a mode internally on a channel, this is not sent out to the IRCd
|
||||
* @param setter The Setter
|
||||
* @param cm The mode
|
||||
* @param param The param
|
||||
* @param enforce_mlock true if mlocks should be enforced, false to override mlock
|
||||
*/
|
||||
void RemoveModeInternal(MessageSource &source, ChannelMode *cm, const Anope::string ¶m = "", bool enforce_mlock = true);
|
||||
|
||||
/** Set a mode on a channel
|
||||
* @param bi The client setting the modes
|
||||
* @param cm The mode
|
||||
* @param data Data about the mode
|
||||
* @param enforce_mlock true if mlocks should be enforced, false to override mlock
|
||||
*/
|
||||
void SetMode(BotInfo *bi, ChannelMode *cm, const ModeData &data = {}, bool enforce_mlock = true);
|
||||
|
||||
/**
|
||||
* Set a mode on a channel
|
||||
* @param bi The client setting the modes
|
||||
* @param name The mode name
|
||||
* @param data Data about the mode
|
||||
* @param enforce_mlock true if mlocks should be enforced, false to override mlock
|
||||
*/
|
||||
void SetMode(BotInfo *bi, const Anope::string &name, const ModeData &data = {}, bool enforce_mlock = true);
|
||||
|
||||
/** Remove a mode from a channel
|
||||
* @param bi The client setting the modes
|
||||
* @param cm The mode
|
||||
* @param param Optional param arg for the mode
|
||||
* @param enforce_mlock true if mlocks should be enforced, false to override mlock
|
||||
*/
|
||||
void RemoveMode(BotInfo *bi, ChannelMode *cm, const Anope::string ¶m = "", bool enforce_mlock = true);
|
||||
|
||||
/**
|
||||
* Remove a mode from a channel
|
||||
* @param bi The client setting the modes
|
||||
* @param name The mode name
|
||||
* @param param Optional param arg for the mode
|
||||
* @param enforce_mlock true if mlocks should be enforced, false to override mlock
|
||||
*/
|
||||
void RemoveMode(BotInfo *bi, const Anope::string &name, const Anope::string ¶m = "", bool enforce_mlock = true);
|
||||
|
||||
/** Get a modes parameter for the channel
|
||||
* @param name The mode
|
||||
* @param target a string to put the param into
|
||||
* @return true if the parameter was fetched, false if on error (mode not set) etc.
|
||||
*/
|
||||
bool GetParam(const Anope::string &name, Anope::string &target) const;
|
||||
|
||||
/** Set a string of modes on the channel
|
||||
* @param bi The client setting the modes
|
||||
* @param enforce_mlock Should mlock be enforced on this mode change
|
||||
* @param cmodes The modes to set
|
||||
*/
|
||||
void SetModes(BotInfo *bi, bool enforce_mlock, const char *cmodes, ...) ATTR_FORMAT(4, 5);
|
||||
void SetModes(BotInfo *bi, bool enforce_mlock, const Anope::string &cmodes);
|
||||
|
||||
/** Set a string of modes internally on a channel
|
||||
* @param source The setter
|
||||
* @param mode the modes
|
||||
* @param enforce_mlock true to enforce mlock
|
||||
*/
|
||||
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
|
||||
* @param list The mode of the list to check (eg CMODE_BAN)
|
||||
* @return true if the user matches the list
|
||||
*/
|
||||
bool MatchesList(User *u, const Anope::string &list);
|
||||
|
||||
/** Kick a user from a channel internally
|
||||
* @param source The sender of the kick
|
||||
* @param nick The nick being kicked
|
||||
* @param reason The reason for the kick
|
||||
*/
|
||||
void KickInternal(const MessageSource &source, const Anope::string &nick, const Anope::string &reason);
|
||||
|
||||
/** Kick a user from the channel
|
||||
* @param bi The sender, can be NULL for the service bot for this channel
|
||||
* @param u The user being kicked
|
||||
* @param reason The reason for the kick
|
||||
* @return true if the kick was successful, false if a module blocked the kick
|
||||
*/
|
||||
bool Kick(BotInfo *bi, User *u, const char *reason = NULL, ...) ATTR_FORMAT(4, 5);
|
||||
bool Kick(BotInfo *bi, User *u, const Anope::string &reason);
|
||||
|
||||
/** Get all modes set on this channel, excluding status modes.
|
||||
* @return a map of modes and their optional parameters.
|
||||
*/
|
||||
const ModeList &GetModes() const;
|
||||
|
||||
/** Get a list of modes on a channel
|
||||
* @param name A mode name to get the list of
|
||||
* @return a vector of the list mode entries
|
||||
*/
|
||||
std::vector<Anope::string> GetModeList(const Anope::string &name);
|
||||
|
||||
/** Get a string of the modes set on this channel
|
||||
* @param complete Include mode parameters
|
||||
* @param plus If set to false (with complete), mode parameters will not be given for modes requiring no parameters to be unset
|
||||
* @return A mode string
|
||||
*/
|
||||
Anope::string GetModes(bool complete, bool plus);
|
||||
|
||||
/** Update the topic of the channel internally, and reset it if topiclock etc says to
|
||||
* @param user The user setting the new topic
|
||||
* @param newtopic The new topic
|
||||
* @param ts The time the new topic is being set
|
||||
*/
|
||||
void ChangeTopicInternal(User *u, const Anope::string &user, const Anope::string &newtopic, time_t ts = Anope::CurTime);
|
||||
|
||||
/** Update the topic of the channel, and reset it if topiclock etc says to
|
||||
* @param user The user setting the topic
|
||||
* @param newtopic The new topic
|
||||
* @param ts The time when the new topic is being set
|
||||
*/
|
||||
void ChangeTopic(const Anope::string &user, const Anope::string &newtopic, time_t ts = Anope::CurTime);
|
||||
|
||||
/** Set the correct modes, or remove the ones granted without permission,
|
||||
* for the specified user.
|
||||
* @param user The user to give/remove modes to/from
|
||||
* @param give_modes if true modes may be given to the user
|
||||
*/
|
||||
void SetCorrectModes(User *u, bool give_modes);
|
||||
|
||||
/** Unbans a user from this channel.
|
||||
* @param u The user to unban
|
||||
* @param mode The mode to unban
|
||||
* @param full Whether or not to match using the user's real host and IP
|
||||
* @return whether or not a ban was removed
|
||||
*/
|
||||
bool Unban(User *u, const Anope::string &mode, bool full = false);
|
||||
|
||||
/** Check whether a user is permitted to be on this channel
|
||||
* @param u The user
|
||||
* @return true if they are allowed, false if they aren't and were kicked
|
||||
*/
|
||||
bool CheckKick(User *user);
|
||||
|
||||
/** Find which bot should send mode/topic/etc changes for this channel
|
||||
* @return The bot
|
||||
*/
|
||||
BotInfo *WhoSends() const;
|
||||
|
||||
/** Finds a channel
|
||||
* @param name The channel to find
|
||||
* @return The channel, if found
|
||||
*/
|
||||
static Channel *Find(const Anope::string &name);
|
||||
|
||||
/** Finds or creates a channel
|
||||
* @param name The channel name
|
||||
* @param created Set to true if the channel was just created
|
||||
* @param ts The time the channel was created
|
||||
*/
|
||||
static Channel *FindOrCreate(const Anope::string &name, bool &created, time_t ts = Anope::CurTime);
|
||||
|
||||
void QueueForDeletion();
|
||||
|
||||
static void DeleteChannels();
|
||||
};
|
||||
+27
-191
@@ -1,198 +1,34 @@
|
||||
// Anope IRC Services <https://www.anope.org/>
|
||||
//
|
||||
// Copyright (C) 2003-2026 Anope Contributors
|
||||
//
|
||||
// Anope is free software. You can use, modify, and/or distribute it under the
|
||||
// terms of version 2 of the GNU General Public License. See docs/LICENSE.txt
|
||||
// for the complete terms of this license and docs/AUTHORS.txt for a list of
|
||||
// contributors.
|
||||
//
|
||||
// Based on the original code of Epona by Lara
|
||||
// Based on the original code of Services by Andy Church
|
||||
//
|
||||
// SPDX-License-Identifier: GPL-2.0-only
|
||||
|
||||
#pragma once
|
||||
|
||||
#include "service.h"
|
||||
#include "anope.h"
|
||||
#include "channels.h"
|
||||
#include "textproc.h"
|
||||
|
||||
struct CommandGroup final
|
||||
{
|
||||
Anope::string name, description;
|
||||
};
|
||||
|
||||
/* Used in BotInfo::commands */
|
||||
struct CommandInfo final
|
||||
{
|
||||
typedef Anope::map<CommandInfo> map;
|
||||
|
||||
/* Service name of the command */
|
||||
Anope::string name;
|
||||
/* Permission required to execute the command */
|
||||
Anope::string permission;
|
||||
/* Group this command is in */
|
||||
Anope::string group;
|
||||
/* Whether to hide this command in help and suggestions */
|
||||
bool hide = false;
|
||||
/* Whether to prepend the channel name (only used with fantasy) */
|
||||
bool prepend_channel = false;
|
||||
/* Whether to require the FANTASY privilege (only used with fantasy) */
|
||||
bool require_privilege = true;
|
||||
};
|
||||
|
||||
/* Where the replies from commands go to. User inherits from this and is the normal
|
||||
* source of a CommandReply
|
||||
/* Declarations for command data.
|
||||
*
|
||||
* (C) 2003-2009 Anope Team
|
||||
* Contact us at team@anope.org
|
||||
*
|
||||
* Please read COPYING and README for furhter details.
|
||||
*
|
||||
* Based on the original code of Epona by Lara.
|
||||
* Based on the original code of Services by Andy Church.
|
||||
*
|
||||
* $Id$
|
||||
*
|
||||
*/
|
||||
struct CoreExport CommandReply
|
||||
{
|
||||
virtual ~CommandReply() = default;
|
||||
virtual void SendMessage(BotInfo *source, const Anope::string &msg) = 0;
|
||||
virtual void SendMessage(CommandSource &source, const Anope::string &msg);
|
||||
};
|
||||
|
||||
/* The source for a command */
|
||||
class CoreExport CommandSource final
|
||||
{
|
||||
/* The nick executing the command */
|
||||
Anope::string nick;
|
||||
/* User executing the command, may be NULL */
|
||||
Reference<User> u;
|
||||
public:
|
||||
/* The account executing the command */
|
||||
Reference<NickCore> nc;
|
||||
/* for web clients */
|
||||
Anope::string ip;
|
||||
/* Where the reply should go */
|
||||
CommandReply *reply;
|
||||
/* Channel the command was executed on (fantasy) */
|
||||
Reference<Channel> c = nullptr;
|
||||
/* The service this command is on */
|
||||
Reference<BotInfo> service;
|
||||
/* The actual name of the command being executed */
|
||||
Anope::string command;
|
||||
/* The permission of the command being executed */
|
||||
Anope::string permission;
|
||||
/* The unique identifier of the executing message. */
|
||||
Anope::string msgid;
|
||||
#include "modules.h"
|
||||
|
||||
CommandSource(const Anope::string &n, User *user, NickCore *core, CommandReply *reply, BotInfo *bi, const Anope::string &m = "");
|
||||
/*************************************************************************/
|
||||
|
||||
const Anope::string &GetNick() const;
|
||||
User *GetUser();
|
||||
NickCore *GetAccount();
|
||||
AccessGroup AccessFor(ChannelInfo *ci);
|
||||
bool IsFounder(ChannelInfo *ci);
|
||||
|
||||
void Reply(const char *message, ...) ATTR_FORMAT(2, 3);
|
||||
void Reply(int count, const char *singular, const char *plural, ...) ATTR_FORMAT(4, 5);
|
||||
void Reply(const Anope::string &message);
|
||||
|
||||
const char *Translate(const char *message);
|
||||
const char *Translate(const Anope::string &message);
|
||||
const char *Translate(int count, const char *single, const char *plural);
|
||||
const char *Translate(int count, const Anope::string &single, const Anope::string &plural);
|
||||
|
||||
bool HasCommand(const Anope::string &cmd);
|
||||
bool HasPriv(const Anope::string &cmd);
|
||||
bool IsServicesOper();
|
||||
bool IsOper();
|
||||
};
|
||||
|
||||
/** Every services command is a class, inheriting from Command.
|
||||
/* Routines for looking up commands. Command lists are arrays that must be
|
||||
* terminated with a NULL name.
|
||||
*/
|
||||
class CoreExport Command
|
||||
: public Service
|
||||
{
|
||||
Anope::string desc;
|
||||
std::vector<std::pair<Anope::string, std::function<bool(CommandSource&)>>> syntax;
|
||||
/* Allow unregistered users to use this command */
|
||||
bool allow_unregistered = false;
|
||||
/* Command requires that a user is executing it */
|
||||
bool require_user = false;
|
||||
|
||||
public:
|
||||
/* Maximum parameters accepted by this command */
|
||||
size_t max_params;
|
||||
/* Minimum parameters required to use this command */
|
||||
size_t min_params;
|
||||
extern MDE Command *lookup_cmd(Command *list, char *name);
|
||||
extern void run_cmd(char *service, User *u, Command *list,
|
||||
char *name);
|
||||
extern void help_cmd(char *service, User *u, Command *list,
|
||||
char *name);
|
||||
extern void do_run_cmd(char *service, User * u, Command *c,const char *cmd);
|
||||
extern MDE void do_help_limited(char *service, User * u, Command * c);
|
||||
extern void do_help_cmd(char *service, User * u, Command *c,const char *cmd);
|
||||
extern MDE void mod_help_cmd(char *service, User *u, CommandHash *cmdTable[],const char *cmd);
|
||||
extern MDE void mod_run_cmd(char *service, User *u, CommandHash *cmdTable[],const char *cmd);
|
||||
|
||||
/* Module which owns us */
|
||||
Module *module;
|
||||
|
||||
protected:
|
||||
/** Create a new command.
|
||||
* @param owner The owner of the command
|
||||
* @param sname The command name
|
||||
* @param min_params The minimum number of parameters the parser will require to execute this command
|
||||
* @param max_params The maximum number of parameters the parser will create, after max_params, all will be combined into the last argument.
|
||||
* NOTE: If max_params is not set (default), there is no limit to the max number of params.
|
||||
*/
|
||||
Command(Module *owner, const Anope::string &sname, size_t min_params, size_t max_params = 0);
|
||||
|
||||
public:
|
||||
virtual ~Command() = default;
|
||||
|
||||
protected:
|
||||
void SetDesc(const Anope::string &d);
|
||||
|
||||
void ClearSyntax();
|
||||
void SetSyntax(const Anope::string &s, const std::function<bool(CommandSource&)> &p = nullptr);
|
||||
virtual void SendSyntax(CommandSource &);
|
||||
|
||||
void AllowUnregistered(bool b);
|
||||
void RequireUser(bool b);
|
||||
|
||||
public:
|
||||
inline bool AllowUnregistered() const { return this->allow_unregistered; }
|
||||
inline bool RequireUser() const { return this->require_user; }
|
||||
|
||||
/** Get the command description
|
||||
* @param source The source wanting the command description
|
||||
* @return The commands description
|
||||
*/
|
||||
virtual Anope::string GetDesc(CommandSource &source) const;
|
||||
|
||||
/** Execute this command.
|
||||
* @param source The source
|
||||
* @param params Command parameters
|
||||
*/
|
||||
virtual void Execute(CommandSource &source, const std::vector<Anope::string> ¶ms) = 0;
|
||||
|
||||
/** Called when help is requested for the client this command is on.
|
||||
* @param source The source
|
||||
*/
|
||||
virtual void OnServHelp(CommandSource &source, HelpWrapper &help);
|
||||
|
||||
/** Requested when the user is requesting help on this command. Help on this command should be sent to the user.
|
||||
* @param source The source
|
||||
* @param subcommand The subcommand the user is requesting help on, or an empty string. (e.g. /ns help set foo bar lol gives a subcommand of "FOO BAR LOL")
|
||||
* @return true if help was provided to the user, false otherwise.
|
||||
*/
|
||||
virtual bool OnHelp(CommandSource &source, const Anope::string &subcommand);
|
||||
|
||||
/** Requested when the user provides bad syntax to this command (not enough params, etc).
|
||||
* @param source The source
|
||||
* @param subcommand The subcommand the user tried to use
|
||||
*/
|
||||
virtual void OnSyntaxError(CommandSource &source, const Anope::string &subcommand);
|
||||
|
||||
/** Runs a command
|
||||
* @param source The source of the command
|
||||
* @param message The full message to run, the command is at the beginning of the message
|
||||
*/
|
||||
static bool Run(CommandSource &source, const Anope::string &message);
|
||||
|
||||
bool Run(CommandSource &source, const Anope::string &, const CommandInfo &, std::vector<Anope::string> ¶ms);
|
||||
|
||||
/** Looks up a command name from the service name.
|
||||
* Note that if the same command exists multiple places this will return the first one encountered
|
||||
* @param command_service The command service to lookup, eg, nickserv/register
|
||||
* @param bot If found, is set to the bot the command is on, eg NickServ
|
||||
* @param name If found, is set to the command name, eg REGISTER
|
||||
* @return true if the given command service exists
|
||||
*/
|
||||
static bool FindFromService(const Anope::string &command_service, BotInfo *&bi, Anope::string &name);
|
||||
};
|
||||
/*************************************************************************/
|
||||
|
||||
+74
-178
@@ -1,180 +1,76 @@
|
||||
// Anope IRC Services <https://www.anope.org/>
|
||||
//
|
||||
// Copyright (C) 2003-2026 Anope Contributors
|
||||
//
|
||||
// Anope is free software. You can use, modify, and/or distribute it under the
|
||||
// terms of version 2 of the GNU General Public License. See docs/LICENSE.txt
|
||||
// for the complete terms of this license and docs/AUTHORS.txt for a list of
|
||||
// contributors.
|
||||
//
|
||||
// Based on the original code of Epona by Lara
|
||||
// Based on the original code of Services by Andy Church
|
||||
//
|
||||
// SPDX-License-Identifier: GPL-2.0-only
|
||||
|
||||
#pragma once
|
||||
|
||||
#include "account.h"
|
||||
#include "regchannel.h"
|
||||
#include "users.h"
|
||||
#include "opertype.h"
|
||||
#include "miscutils.h"
|
||||
|
||||
namespace Configuration
|
||||
{
|
||||
class CoreExport Block
|
||||
{
|
||||
friend class Configuration::Conf;
|
||||
|
||||
public:
|
||||
typedef Anope::map<Anope::string> ItemMap;
|
||||
typedef Anope::multimap<Block> BlockMap;
|
||||
typedef Anope::iterator_range<BlockMap::const_iterator> BlockList;
|
||||
|
||||
private:
|
||||
Anope::string name;
|
||||
ItemMap items;
|
||||
BlockMap blocks;
|
||||
unsigned linenum;
|
||||
|
||||
/* Represents a missing tag. */
|
||||
static Block EmptyBlock;
|
||||
|
||||
public:
|
||||
Block(const Anope::string &);
|
||||
const Anope::string &GetName() const;
|
||||
size_t CountBlock(const Anope::string &name) const;
|
||||
BlockList GetBlocks(const Anope::string &name) const;
|
||||
const Block &GetBlock(const Anope::string &name, size_t num = 0) const;
|
||||
Block *GetMutableBlock(const Anope::string &name, size_t num = 0);
|
||||
|
||||
template<typename T> T Get(const Anope::string &tag, const Anope::string &def = "") const
|
||||
{
|
||||
return Anope::TryConvert<T>(this->Get<const Anope::string>(tag, def)).value_or(T());
|
||||
}
|
||||
|
||||
bool Set(const Anope::string &tag, const Anope::string &value);
|
||||
const ItemMap &GetItems() const;
|
||||
};
|
||||
|
||||
template<> CoreExport const Anope::string Block::Get(const Anope::string &tag, const Anope::string &def) const;
|
||||
template<> CoreExport time_t Block::Get(const Anope::string &tag, const Anope::string &def) const;
|
||||
template<> CoreExport bool Block::Get(const Anope::string &tag, const Anope::string &def) const;
|
||||
|
||||
/** Represents a configuration file
|
||||
*/
|
||||
class File final
|
||||
{
|
||||
Anope::string name;
|
||||
bool executable;
|
||||
FILE *fp = nullptr;
|
||||
public:
|
||||
File(const Anope::string &, bool);
|
||||
~File();
|
||||
const Anope::string &GetName() const;
|
||||
Anope::string GetPath() const;
|
||||
|
||||
bool IsOpen() const;
|
||||
bool Open();
|
||||
void Close();
|
||||
bool End() const;
|
||||
Anope::string Read();
|
||||
};
|
||||
|
||||
struct Uplink;
|
||||
|
||||
class CoreExport Conf final
|
||||
: public Block
|
||||
{
|
||||
private:
|
||||
/** Replaces defined variables within a string. */
|
||||
Anope::string ReplaceVars(const Anope::string &str, const File &file, unsigned linenumber);
|
||||
|
||||
public:
|
||||
/* options:readtimeout */
|
||||
time_t ReadTimeout;
|
||||
/* If we should default to privmsging clients */
|
||||
bool DefPrivmsg;
|
||||
/* Default language */
|
||||
Anope::string DefLanguage;
|
||||
/* options:timeoutcheck */
|
||||
time_t TimeoutCheck;
|
||||
/* options:servicealias */
|
||||
bool ServiceAlias;
|
||||
/* networkinfo:nickchars */
|
||||
Anope::string NickChars;
|
||||
|
||||
/* List of uplink servers to try and connect to */
|
||||
std::vector<Uplink> Uplinks;
|
||||
/* A vector of our logfile options */
|
||||
std::vector<LogInfo> LogInfos;
|
||||
/* Array of ulined servers */
|
||||
std::vector<Anope::string> Ulines;
|
||||
/* List of available opertypes */
|
||||
std::vector<OperType *> MyOperTypes;
|
||||
/* List of pairs of opers and their opertype from the config */
|
||||
std::vector<Oper *> Opers;
|
||||
/* Map of fantasy commands */
|
||||
CommandInfo::map Fantasy;
|
||||
/* Command groups */
|
||||
std::vector<CommandGroup> CommandGroups;
|
||||
/* List of modules to autoload */
|
||||
std::vector<Anope::string> ModulesAutoLoad;
|
||||
|
||||
/* module configuration blocks */
|
||||
std::map<Anope::string, Block *> modules;
|
||||
Anope::map<Anope::string> bots;
|
||||
|
||||
Conf();
|
||||
~Conf();
|
||||
|
||||
void LoadConf(File &file);
|
||||
void Post(Conf *old);
|
||||
|
||||
Block &GetModule(const Module *);
|
||||
Block &GetModule(const Anope::string &name);
|
||||
|
||||
BotInfo *GetClient(const Anope::string &name);
|
||||
|
||||
const Block &GetCommand(CommandSource &);
|
||||
};
|
||||
|
||||
struct Uplink final
|
||||
{
|
||||
Anope::string host;
|
||||
unsigned port;
|
||||
Anope::string password;
|
||||
int protocol;
|
||||
|
||||
Uplink(const Anope::string &_host, int _port, const Anope::string &_password, int _protocol) : host(_host), port(_port), password(_password), protocol(_protocol) { }
|
||||
inline bool operator==(const Uplink &other) const { return host == other.host && port == other.port && password == other.password && protocol == other.protocol; }
|
||||
inline bool operator!=(const Uplink &other) const { return !(*this == other); }
|
||||
Anope::string str() const;
|
||||
};
|
||||
}
|
||||
|
||||
/** This class can be used on its own to represent an exception, or derived to represent a module-specific exception.
|
||||
* When a module whishes to abort, e.g. within a constructor, it should throw an exception using ModuleException or
|
||||
* a class derived from ModuleException. If a module throws an exception during its constructor, the module will not
|
||||
* be loaded. If this happens, the error message returned by ModuleException::GetReason will be displayed to the user
|
||||
* attempting to load the module, or dumped to the console if the ircd is currently loading for the first time.
|
||||
/* Services configuration.
|
||||
*
|
||||
* (C) 2003-2009 Anope Team
|
||||
* Contact us at team@anope.org
|
||||
*
|
||||
* Please read COPYING and README for furhter details.
|
||||
*
|
||||
* Based on the original code of Epona by Lara.
|
||||
* Based on the original code of Services by Andy Church.
|
||||
*
|
||||
* $Id$
|
||||
*
|
||||
*/
|
||||
class CoreExport ConfigException final
|
||||
: public CoreException
|
||||
{
|
||||
public:
|
||||
/** Default constructor, just uses the error message 'Config threw an exception'.
|
||||
*/
|
||||
ConfigException() : CoreException("Config threw an exception", "Config Parser") { }
|
||||
/** This constructor can be used to specify an error message before throwing.
|
||||
*/
|
||||
ConfigException(const Anope::string &message) : CoreException(message, "Config Parser") { }
|
||||
/** This destructor solves world hunger, cancels the world debt, and causes the world to end.
|
||||
* Actually no, it does nothing. Never mind.
|
||||
* @throws Nothing!
|
||||
*/
|
||||
virtual ~ConfigException() noexcept = default;
|
||||
};
|
||||
|
||||
extern Configuration::File ServicesConf;
|
||||
extern CoreExport Configuration::Conf *Config;
|
||||
#ifndef CONFIG_H
|
||||
#define CONFIG_H
|
||||
|
||||
/* Note that most of the options which used to be here have been moved to
|
||||
* services.conf. */
|
||||
|
||||
/*************************************************************************/
|
||||
|
||||
/******* General configuration *******/
|
||||
|
||||
/* Name of configuration file (in Services directory) */
|
||||
#define SERVICES_CONF "services.conf"
|
||||
|
||||
/* Name of log file (in Services directory) */
|
||||
#define LOG_FILENAME "services.log"
|
||||
|
||||
/* Maximum amount of data from/to the network to buffer (bytes). */
|
||||
#define NET_BUFSIZE 65536
|
||||
|
||||
/******* OperServ configuration *******/
|
||||
|
||||
/* Define this to enable OperServ's svs commands (superadmin only). */
|
||||
#define USE_OSSVS
|
||||
|
||||
/* Define this to enable OperServ's debugging commands (Services root
|
||||
* only). These commands are undocumented; "use the source, Luke!" */
|
||||
/* #define DEBUG_COMMANDS */
|
||||
|
||||
/******************* END OF USER-CONFIGURABLE SECTION ********************/
|
||||
|
||||
/* Size of input buffer (note: this is different from BUFSIZ)
|
||||
* This must be big enough to hold at least one full IRC message, or messy
|
||||
* things will happen. */
|
||||
#define BUFSIZE 1024
|
||||
|
||||
/* Extra warning: If you change CHANMAX, your ChanServ database will be
|
||||
* unusable.
|
||||
*/
|
||||
|
||||
/* Maximum length of a channel name, including the trailing null. Any
|
||||
* channels with a length longer than (CHANMAX-1) including the leading #
|
||||
* will not be usable with ChanServ. */
|
||||
#define CHANMAX 64
|
||||
|
||||
/* Maximum length of a nickname, including the trailing null. This MUST be
|
||||
* at least one greater than the maximum allowable nickname length on your
|
||||
* network, or people will run into problems using Services! The default
|
||||
* (32) works with all servers I know of. */
|
||||
#define NICKMAX 32
|
||||
|
||||
/* Maximum length of a password */
|
||||
#define PASSMAX 32
|
||||
|
||||
/* Maximum length of a username */
|
||||
#define USERMAX 10
|
||||
|
||||
/* Maximum length of a domain */
|
||||
#define HOSTMAX 64
|
||||
|
||||
/**************************************************************************/
|
||||
|
||||
#endif /* CONFIG_H */
|
||||
|
||||
@@ -1,135 +0,0 @@
|
||||
// Anope IRC Services <https://www.anope.org/>
|
||||
//
|
||||
// Copyright (C) 2003-2026 Anope Contributors
|
||||
//
|
||||
// Anope is free software. You can use, modify, and/or distribute it under the
|
||||
// terms of version 2 of the GNU General Public License. See docs/LICENSE.txt
|
||||
// for the complete terms of this license and docs/AUTHORS.txt for a list of
|
||||
// contributors.
|
||||
//
|
||||
// Based on the original code of Epona by Lara
|
||||
// Based on the original code of Services by Andy Church
|
||||
//
|
||||
// SPDX-License-Identifier: GPL-2.0-only
|
||||
|
||||
#pragma once
|
||||
|
||||
#include <optional>
|
||||
|
||||
namespace Anope
|
||||
{
|
||||
/** Attempts to convert a string to any type.
|
||||
* @param in The value to convert.
|
||||
* @param leftover If non-nullptr then the location to store leftover data.
|
||||
*/
|
||||
template<typename T>
|
||||
inline std::optional<T> TryConvert(const Anope::string &in, Anope::string *leftover = nullptr)
|
||||
{
|
||||
std::istringstream tmp(in.str());
|
||||
T out;
|
||||
if (!(tmp >> out))
|
||||
return std::nullopt;
|
||||
|
||||
if (leftover)
|
||||
{
|
||||
leftover->clear();
|
||||
std::getline(tmp, leftover->str());
|
||||
}
|
||||
else
|
||||
{
|
||||
char extra;
|
||||
if (tmp >> extra)
|
||||
return std::nullopt;
|
||||
}
|
||||
return out;
|
||||
}
|
||||
|
||||
/** Converts a string to any type.
|
||||
* @param in The value to convert.
|
||||
* @param def The default to use if the conversion failed.
|
||||
* @param leftover If non-nullptr then the location to store leftover data.
|
||||
*/
|
||||
template<typename T>
|
||||
inline T Convert(const Anope::string &in, T def, Anope::string *leftover = nullptr)
|
||||
{
|
||||
return TryConvert<T>(in, leftover).value_or(def);
|
||||
}
|
||||
|
||||
/** Attempts to convert any type to a string.
|
||||
* @param in The value to convert.
|
||||
*/
|
||||
template <class T>
|
||||
inline std::optional<Anope::string> TryString(const T &in)
|
||||
{
|
||||
std::ostringstream tmp;
|
||||
if (!(tmp << in))
|
||||
return std::nullopt;
|
||||
return tmp.str();
|
||||
}
|
||||
|
||||
/** No-op function that returns the string that was passed to it.
|
||||
* @param in The string to return.
|
||||
*/
|
||||
inline const string &ToString(const string &in)
|
||||
{
|
||||
return in;
|
||||
}
|
||||
|
||||
/** Converts a std::string to a string.
|
||||
* @param in The value to convert.
|
||||
*/
|
||||
inline string ToString(const std::string &in)
|
||||
{
|
||||
return in;
|
||||
}
|
||||
|
||||
/** Converts a char array to a string.
|
||||
* @param in The value to convert.
|
||||
*/
|
||||
inline string ToString(const char *in)
|
||||
{
|
||||
return string(in);
|
||||
}
|
||||
|
||||
/** Converts a char to a string.
|
||||
* @param in The value to convert.
|
||||
*/
|
||||
inline string ToString(char in)
|
||||
{
|
||||
return string(1, static_cast<string::value_type>(in));
|
||||
}
|
||||
|
||||
/** Converts an unsigned char to a string.
|
||||
* @param in The value to convert.
|
||||
*/
|
||||
inline string ToString(unsigned char in)
|
||||
{
|
||||
return string(1, static_cast<string::value_type>(in));
|
||||
}
|
||||
|
||||
/** Converts a bool to a string.
|
||||
* @param in The value to convert.
|
||||
*/
|
||||
inline string ToString(bool in)
|
||||
{
|
||||
return (in ? "1" : "0");
|
||||
}
|
||||
|
||||
/** Converts a type that std::to_string is implemented for to a string.
|
||||
* @param in The value to convert.
|
||||
*/
|
||||
template<typename Stringable>
|
||||
inline std::enable_if_t<std::is_arithmetic_v<Stringable>, string> ToString(const Stringable &in)
|
||||
{
|
||||
return std::to_string(in);
|
||||
}
|
||||
|
||||
/** Converts any type to a string.
|
||||
* @param in The value to convert.
|
||||
*/
|
||||
template <class T>
|
||||
inline std::enable_if_t<!std::is_arithmetic_v<T>, string> ToString(const T &in)
|
||||
{
|
||||
return TryString(in).value_or(Anope::string());
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,71 @@
|
||||
/* Database file descriptor structure and file handling routine prototypes.
|
||||
*
|
||||
* (C) 2003-2009 Anope Team
|
||||
* Contact us at team@anope.org
|
||||
*
|
||||
* Please read COPYING and README for furhter details.
|
||||
*
|
||||
* Based on the original code of Epona by Lara.
|
||||
* Based on the original code of Services by Andy Church.
|
||||
*
|
||||
* $Id$
|
||||
*
|
||||
*/
|
||||
|
||||
#ifndef DATAFILES_H
|
||||
#define DATAFILES_H
|
||||
|
||||
#ifndef _WIN32
|
||||
#include <sys/param.h>
|
||||
#endif
|
||||
|
||||
/*************************************************************************/
|
||||
|
||||
typedef struct dbFILE_ dbFILE;
|
||||
struct dbFILE_ {
|
||||
int mode; /* 'r' for reading, 'w' for writing */
|
||||
FILE *fp; /* The normal file descriptor */
|
||||
FILE *backupfp; /* Open file pointer to a backup copy of
|
||||
* the database file (if non-NULL) */
|
||||
char filename[MAXPATHLEN]; /* Name of the database file */
|
||||
char backupname[MAXPATHLEN]; /* Name of the backup file */
|
||||
};
|
||||
|
||||
/*************************************************************************/
|
||||
|
||||
/* Prototypes and macros: */
|
||||
|
||||
E void check_file_version(dbFILE *f);
|
||||
E int get_file_version(dbFILE *f);
|
||||
E int write_file_version(dbFILE *f, uint32 version);
|
||||
|
||||
E dbFILE *open_db(const char *service, const char *filename, const char *mode, uint32 version);
|
||||
E void restore_db(dbFILE *f); /* Restore to state before open_db() */
|
||||
E void close_db(dbFILE *f);
|
||||
E void backup_databases(void);
|
||||
|
||||
#define read_db(f,buf,len) (fread((buf),1,(len),(f)->fp))
|
||||
#define write_db(f,buf,len) (fwrite((buf),1,(len),(f)->fp))
|
||||
#define getc_db(f) (fgetc((f)->fp))
|
||||
|
||||
E int read_int16(uint16 *ret, dbFILE *f);
|
||||
E int write_int16(uint16 val, dbFILE *f);
|
||||
E int read_int32(uint32 *ret, dbFILE *f);
|
||||
E int write_int32(uint32 val, dbFILE *f);
|
||||
E int read_ptr(void **ret, dbFILE *f);
|
||||
E int write_ptr(const void *ptr, dbFILE *f);
|
||||
E int read_string(char **ret, dbFILE *f);
|
||||
E int write_string(const char *s, dbFILE *f);
|
||||
|
||||
#define read_int8(ret,f) ((*(ret)=fgetc((f)->fp))==EOF ? -1 : 0)
|
||||
#define write_int8(val,f) (fputc((val),(f)->fp)==EOF ? -1 : 0)
|
||||
#define read_buffer(buf,f) (read_db((f),(buf),sizeof(buf)) == sizeof(buf))
|
||||
#define write_buffer(buf,f) (write_db((f),(buf),sizeof(buf)) == sizeof(buf))
|
||||
#define read_buflen(buf,len,f) (read_db((f),(buf),(len)) == (len))
|
||||
#define write_buflen(buf,len,f) (write_db((f),(buf),(len)) == (len))
|
||||
#define read_variable(var,f) (read_db((f),&(var),sizeof(var)) == sizeof(var))
|
||||
#define write_variable(var,f) (write_db((f),&(var),sizeof(var)) == sizeof(var))
|
||||
|
||||
/*************************************************************************/
|
||||
|
||||
#endif /* DATAFILES_H */
|
||||
+38
-56
@@ -1,58 +1,40 @@
|
||||
// Anope IRC Services <https://www.anope.org/>
|
||||
//
|
||||
// Copyright (C) 2003-2026 Anope Contributors
|
||||
//
|
||||
// Anope is free software. You can use, modify, and/or distribute it under the
|
||||
// terms of version 2 of the GNU General Public License. See docs/LICENSE.txt
|
||||
// for the complete terms of this license and docs/AUTHORS.txt for a list of
|
||||
// contributors.
|
||||
//
|
||||
// Based on the original code of Epona by Lara
|
||||
// Based on the original code of Services by Andy Church
|
||||
//
|
||||
// SPDX-License-Identifier: GPL-2.0-only
|
||||
/* Set default values for any constants that should be in include files but
|
||||
*
|
||||
* (C) 2003-2009 Anope Team
|
||||
* Contact us at team@anope.org
|
||||
*
|
||||
* Please read COPYING and README for furhter details.
|
||||
*
|
||||
* Based on the original code of Epona by Lara.
|
||||
* Based on the original code of Services by Andy Church.
|
||||
*
|
||||
*
|
||||
* $Id$
|
||||
*
|
||||
*/
|
||||
|
||||
#pragma once
|
||||
/*************************************************************************/
|
||||
|
||||
class AccessGroup;
|
||||
class BotInfo;
|
||||
namespace BotServ { class BadWord; }
|
||||
class ChanAccess;
|
||||
class Channel;
|
||||
class ChannelInfo;
|
||||
class ChannelStatus;
|
||||
namespace ChanServ { class AutoKick; class ModeLock; }
|
||||
class ClientSocket;
|
||||
class Command;
|
||||
class CommandSource;
|
||||
namespace Configuration { class Conf; }
|
||||
class ConnectionSocket;
|
||||
namespace DNS { struct Query; }
|
||||
class Entry;
|
||||
class IdentifyRequest;
|
||||
class InfoFormatter;
|
||||
class IRCDProto;
|
||||
class ListenSocket;
|
||||
class Log;
|
||||
struct Membership;
|
||||
class Memo;
|
||||
struct MemoInfo;
|
||||
class MessageSource;
|
||||
struct ModeData;
|
||||
class Module;
|
||||
class NickAlias;
|
||||
class NickCore;
|
||||
namespace NickServ { struct Cert; }
|
||||
struct Oper;
|
||||
namespace OperServ { struct Exception; }
|
||||
class OperType;
|
||||
class ReferenceBase;
|
||||
class Regex;
|
||||
namespace SASL { struct Message; }
|
||||
class Serializable;
|
||||
class Server;
|
||||
class Socket;
|
||||
class Thread;
|
||||
class User;
|
||||
class XLine;
|
||||
class XLineManager;
|
||||
#ifndef NAME_MAX
|
||||
# define NAME_MAX 255
|
||||
#endif
|
||||
|
||||
#ifndef BUFSIZ
|
||||
# define BUFSIZ 256
|
||||
#else
|
||||
# if BUFSIZ < 256
|
||||
# define BUFSIZ 256
|
||||
# endif
|
||||
#endif
|
||||
|
||||
/* Length of an array: */
|
||||
#define lenof(a) (sizeof(a) / sizeof(*(a)))
|
||||
|
||||
/* Telling compilers about printf()-like functions: */
|
||||
#ifdef __GNUC__
|
||||
# define FORMAT(type,fmt,start) __attribute__((format(type,fmt,start)))
|
||||
#else
|
||||
# define FORMAT(type,fmt,start)
|
||||
#endif
|
||||
|
||||
/*************************************************************************/
|
||||
|
||||
@@ -0,0 +1,127 @@
|
||||
/* depricated.h
|
||||
*
|
||||
* (C) 2003-2009 Anope Team
|
||||
* Contact us at team@anope.org
|
||||
*
|
||||
* Please read COPYING and README for furhter details.
|
||||
*
|
||||
* Based on the original code of Epona by Lara.
|
||||
* Based on the original code of Services by Andy Church.
|
||||
*
|
||||
*
|
||||
*/
|
||||
|
||||
/*
|
||||
All of these functions were replaced in 1.7.6, you should move your modules
|
||||
to use the new functions
|
||||
*/
|
||||
|
||||
#define change_user_mode(u, modes, arg) common_svsmode(u, modes, arg)
|
||||
#define GetIdent(x) common_get_vident(x)
|
||||
#define GetHost(x) common_get_vhost(x)
|
||||
|
||||
#define NEWNICK(nick,user,host,real,modes,qline) \
|
||||
anope_cmd_bot_nick(nick,user,host,real,modes)
|
||||
|
||||
#define s_akill(user, host, who, when, expires, reason) \
|
||||
anope_cmd_akill(user, host, who, when, expires, reason)
|
||||
|
||||
#define set_umode(user, ac, av) anope_set_umode(user, ac, av)
|
||||
|
||||
#define s_svsnoop(server, set) anope_cmd_svsnoop(server, set)
|
||||
|
||||
#define s_sqline(mask, reason) anope_cmd_sqline(mask, reason)
|
||||
|
||||
#define s_sgline(mask, reason) anope_cmd_sgline(mask, reason)
|
||||
#define s_szline(mask, reason) anope_cmd_szline(mask, reason)
|
||||
#define s_unsgline(mask) anope_cmd_unsgline(mask)
|
||||
#define s_unsqline(mask) anope_cmd_unsqline(mask)
|
||||
#define s_unszline(mask) anope_cmd_unszline(mask)
|
||||
|
||||
#define s_rakill(user, host) anope_cmd_remove_akill(user, host)
|
||||
|
||||
|
||||
# define NICKSERV_MODE ircd->nickservmode
|
||||
# define CHANSERV_MODE ircd->chanservmode
|
||||
# define HOSTSERV_MODE ircd->hostservmode
|
||||
# define MEMOSERV_MODE ircd->memoservmode
|
||||
# define BOTSERV_MODE ircd->botservmode
|
||||
# define HELPSERV_MODE ircd->helpservmode
|
||||
# define OPERSERV_MODE ircd->oprservmode
|
||||
# define DEVNULL_MODE ircd->devnullmode
|
||||
# define GLOBAL_MODE ircd->globalmode
|
||||
# define NICKSERV_ALIAS_MODE ircd->nickservaliasmode
|
||||
# define CHANSERV_ALIAS_MODE ircd->chanservaliasmode
|
||||
# define MEMOSERV_ALIAS_MODE ircd->memoservaliasmode
|
||||
# define BOTSERV_ALIAS_MODE ircd->botservaliasmode
|
||||
# define HELPSERV_ALIAS_MODE ircd->helpservaliasmode
|
||||
# define OPERSERV_ALIAS_MODE ircd->operservaliasmode
|
||||
# define DEVNULL_ALIAS_MODE ircd->devnullaliasmode
|
||||
# define GLOBAL_ALIAS_MODE ircd->globalaliasmode
|
||||
# define HOSTSERV_ALIAS_MODE ircd->hostservaliasmode
|
||||
# define BOTSERV_BOTS_MODE ircd->botserv_bot_mode
|
||||
#define CHAN_MAX_SYMBOL ircd->max_symbols
|
||||
#define MODESTOREMOVE ircd->modestoremove
|
||||
|
||||
#ifdef IRC_HYBRID
|
||||
# define HAS_HALFOP
|
||||
# define HAS_EXCEPT
|
||||
#endif
|
||||
|
||||
#ifdef IRC_VIAGRA
|
||||
# define HAS_HALFOP
|
||||
# define HAS_VHOST
|
||||
# define HAS_VIDENT
|
||||
# define HAS_EXCEPT
|
||||
#endif
|
||||
|
||||
#ifdef IRC_BAHAMUT
|
||||
# define HAS_NICKIP
|
||||
# define HAS_EXCEPT
|
||||
# define HAS_SVSHOLD
|
||||
#endif
|
||||
|
||||
#ifdef IRC_RAGE2
|
||||
# define HAS_HALFOP
|
||||
# define HAS_EXCEPT
|
||||
# define HAS_VHOST
|
||||
# define HAS_NICKVHOST
|
||||
#endif
|
||||
|
||||
#ifdef IRC_PTLINK
|
||||
# define HAS_NICKVHOST
|
||||
# define HAS_VHOST
|
||||
# define HAS_FMODE
|
||||
# define HAS_EXCEPT
|
||||
#endif
|
||||
|
||||
#ifdef IRC_ULTIMATE2
|
||||
# define IRC_ULTIMATE /* gotta do this for old mods */
|
||||
# define HAS_FMODE
|
||||
# define HAS_HALFOP
|
||||
# define HAS_LMODE
|
||||
# define HAS_VHOST
|
||||
# define HAS_VIDENT
|
||||
# define HAS_EXCEPT
|
||||
#endif
|
||||
|
||||
#if defined(IRC_UNREAL31) || defined(IRC_UNREAL32)
|
||||
# define IRC_UNREAL /* gotta do this for old mods */
|
||||
# define HAS_FMODE
|
||||
# define HAS_HALFOP
|
||||
# define HAS_LMODE
|
||||
# define HAS_NICKVHOST
|
||||
# define HAS_VHOST
|
||||
# define HAS_VIDENT
|
||||
# define HAS_EXCEPT
|
||||
#endif
|
||||
|
||||
#ifdef IRC_ULTIMATE3
|
||||
# define HAS_HALFOP
|
||||
# define HAS_VHOST
|
||||
# define HAS_NICKVHOST
|
||||
# define HAS_VIDENT
|
||||
# define HAS_EXCEPT
|
||||
#endif
|
||||
|
||||
|
||||
@@ -0,0 +1,22 @@
|
||||
/* Include file for high-level encryption routines.
|
||||
*
|
||||
* (C) 2003-2009 Anope Team
|
||||
* Contact us at team@anope.org
|
||||
*
|
||||
* Please read COPYING and README for furhter details.
|
||||
*
|
||||
* Based on the original code of Epona by Lara.
|
||||
* Based on the original code of Services by Andy Church.
|
||||
*
|
||||
* $Id$
|
||||
*
|
||||
*/
|
||||
|
||||
typedef struct encryption_ {
|
||||
int (*encrypt)(const char *src, int len, char *dest, int size);
|
||||
int (*encrypt_in_place)(char *buf, int size);
|
||||
int (*encrypt_check_len)(int passlen, int bufsize);
|
||||
int (*decrypt)(const char *src, char *dest, int size);
|
||||
int (*check_password)(const char *plaintext, const char *password);
|
||||
} Encryption;
|
||||
|
||||
@@ -0,0 +1,64 @@
|
||||
/* Prototypes and external variable declarations.
|
||||
*
|
||||
* (C) 2003-2009 Anope Team
|
||||
* Contact us at team@anope.org
|
||||
*
|
||||
* Please read COPYING and README for furhter details.
|
||||
*
|
||||
* Based on the original code of Epona by Lara.
|
||||
* Based on the original code of Services by Andy Church.
|
||||
*
|
||||
* $Id$
|
||||
*
|
||||
*/
|
||||
|
||||
#define EVENT_START "start"
|
||||
#define EVENT_STOP "stop"
|
||||
|
||||
#define EVENT_DB_SAVING "db_saving"
|
||||
#define EVENT_DB_BACKUP "db_backup"
|
||||
#define EVENT_NEWNICK "newnick"
|
||||
#define EVENT_BOT_UNASSIGN "bot_unassign"
|
||||
#define EVENT_BOT_JOIN "bot_join"
|
||||
#define EVENT_BOT_CREATE "bot_create"
|
||||
#define EVENT_BOT_CHANGE "bot_change"
|
||||
#define EVENT_BOT_FANTASY "bot_command"
|
||||
#define EVENT_BOT_FANTASY_NO_ACCESS "bot_command_no_access"
|
||||
#define EVENT_BOT_DEL "bot_del"
|
||||
#define EVENT_BOT_ASSIGN "bot_assign"
|
||||
#define EVENT_BOT_KICK "bot_kick"
|
||||
#define EVENT_BOT_BAN "bot_ban"
|
||||
#define EVENT_TOPIC_UPDATED "chan_topic_updated"
|
||||
#define EVENT_CHAN_EXPIRE "chan_expire"
|
||||
#define EVENT_CHAN_REGISTERED "chan_registered"
|
||||
#define EVENT_CHAN_DROP "chan_dropped"
|
||||
#define EVENT_CHAN_FORBIDDEN "chan_forbidden"
|
||||
#define EVENT_CHAN_SUSPENDED "chan_suspended"
|
||||
#define EVENT_CHAN_UNSUSPEND "chan_unsuspend"
|
||||
#define EVENT_CONNECT "connect"
|
||||
#define EVENT_DB_EXPIRE "db_expire"
|
||||
#define EVENT_RESTART "restart"
|
||||
#define EVENT_RELOAD "reload"
|
||||
#define EVENT_SHUTDOWN "shutdown"
|
||||
#define EVENT_SIGNAL "signal"
|
||||
#define EVENT_NICK_REGISTERED "nick_registered"
|
||||
#define EVENT_NICK_DROPPED "nick_dropped"
|
||||
#define EVENT_NICK_FORBIDDEN "nick_forbidden"
|
||||
#define EVENT_NICK_EXPIRE "nick_expire"
|
||||
#define EVENT_CHANGE_NICK "change_nick"
|
||||
#define EVENT_USER_LOGOFF "user_logoff"
|
||||
#define EVENT_GROUP "nick_group"
|
||||
#define EVENT_NICK_IDENTIFY "nick_id"
|
||||
#define EVENT_SERVER_SQUIT "server_squit"
|
||||
#define EVENT_SERVER_CONNECT "server_connect"
|
||||
#define EVENT_DEFCON_LEVEL "defcon_level"
|
||||
#define EVENT_NICK_SUSPENDED "nick_suspended"
|
||||
#define EVENT_NICK_UNSUSPEND "nick_unsuspend"
|
||||
#define EVENT_JOIN_CHANNEL "join_channel"
|
||||
#define EVENT_PART_CHANNEL "part_channel"
|
||||
#define EVENT_ACCESS_ADD "access_add"
|
||||
#define EVENT_ACCESS_CHANGE "access_change"
|
||||
#define EVENT_ACCESS_DEL "access_del"
|
||||
#define EVENT_ACCESS_CLEAR "access_clear"
|
||||
#define EVENT_NICK_LOGOUT "nick_logout"
|
||||
#define EVENT_CHAN_KICK "chan_kick"
|
||||
@@ -1,270 +0,0 @@
|
||||
// Anope IRC Services <https://www.anope.org/>
|
||||
//
|
||||
// Copyright (C) 2003-2026 Anope Contributors
|
||||
//
|
||||
// Anope is free software. You can use, modify, and/or distribute it under the
|
||||
// terms of version 2 of the GNU General Public License. See docs/LICENSE.txt
|
||||
// for the complete terms of this license and docs/AUTHORS.txt for a list of
|
||||
// contributors.
|
||||
//
|
||||
// Based on the original code of Epona by Lara
|
||||
// Based on the original code of Services by Andy Church
|
||||
//
|
||||
// SPDX-License-Identifier: GPL-2.0-only
|
||||
|
||||
#pragma once
|
||||
|
||||
#include "anope.h"
|
||||
#include "serialize.h"
|
||||
#include "service.h"
|
||||
#include "logger.h"
|
||||
|
||||
class Extensible;
|
||||
|
||||
class CoreExport ExtensibleBase
|
||||
: public Service
|
||||
{
|
||||
protected:
|
||||
std::map<Extensible *, void *> items;
|
||||
|
||||
ExtensibleBase(Module *m, const Anope::string &n);
|
||||
~ExtensibleBase();
|
||||
|
||||
public:
|
||||
virtual void Unset(Extensible *obj) = 0;
|
||||
|
||||
/* called when an object we are keep track of is serializing */
|
||||
virtual void ExtensibleSerialize(const Extensible *, const Serializable *, Serialize::Data &) const { }
|
||||
virtual void ExtensibleUnserialize(Extensible *, Serializable *, Serialize::Data &) { }
|
||||
};
|
||||
|
||||
class CoreExport Extensible
|
||||
{
|
||||
public:
|
||||
std::set<ExtensibleBase *> extension_items;
|
||||
|
||||
virtual ~Extensible();
|
||||
|
||||
void UnsetExtensibles();
|
||||
|
||||
template<typename T> T *GetExt(const Anope::string &name) const;
|
||||
bool HasExt(const Anope::string &name) const;
|
||||
|
||||
template<typename T> T *Extend(const Anope::string &name, const T &what);
|
||||
template<typename T> T *Extend(const Anope::string &name);
|
||||
template<typename T> T *Require(const Anope::string &name);
|
||||
template<typename T> void Shrink(const Anope::string &name);
|
||||
|
||||
static void ExtensibleSerialize(const Extensible *, const Serializable *, Serialize::Data &data);
|
||||
static void ExtensibleUnserialize(Extensible *, Serializable *, Serialize::Data &data);
|
||||
};
|
||||
|
||||
template<typename T>
|
||||
class BaseExtensibleItem
|
||||
: public ExtensibleBase
|
||||
{
|
||||
protected:
|
||||
virtual T *Create(Extensible *) = 0;
|
||||
|
||||
public:
|
||||
BaseExtensibleItem(Module *m, const Anope::string &n) : ExtensibleBase(m, n) { }
|
||||
|
||||
~BaseExtensibleItem()
|
||||
{
|
||||
while (!items.empty())
|
||||
{
|
||||
std::map<Extensible *, void *>::iterator it = items.begin();
|
||||
Extensible *obj = it->first;
|
||||
T *value = static_cast<T *>(it->second);
|
||||
|
||||
obj->extension_items.erase(this);
|
||||
items.erase(it);
|
||||
delete value;
|
||||
}
|
||||
}
|
||||
|
||||
T *Set(Extensible *obj, const T &value)
|
||||
{
|
||||
T *t = Set(obj);
|
||||
if (t)
|
||||
*t = value;
|
||||
return t;
|
||||
}
|
||||
|
||||
T *Set(Extensible *obj)
|
||||
{
|
||||
T *t = Create(obj);
|
||||
Unset(obj);
|
||||
items[obj] = t;
|
||||
obj->extension_items.insert(this);
|
||||
return t;
|
||||
}
|
||||
|
||||
void Unset(Extensible *obj) override
|
||||
{
|
||||
T *value = Get(obj);
|
||||
items.erase(obj);
|
||||
obj->extension_items.erase(this);
|
||||
delete value;
|
||||
}
|
||||
|
||||
T *Get(const Extensible *obj) const
|
||||
{
|
||||
std::map<Extensible *, void *>::const_iterator it = items.find(const_cast<Extensible *>(obj));
|
||||
if (it != items.end())
|
||||
return static_cast<T *>(it->second);
|
||||
return NULL;
|
||||
}
|
||||
|
||||
bool HasExt(const Extensible *obj) const
|
||||
{
|
||||
return items.find(const_cast<Extensible *>(obj)) != items.end();
|
||||
}
|
||||
|
||||
T *Require(Extensible *obj)
|
||||
{
|
||||
T *t = Get(obj);
|
||||
if (t)
|
||||
return t;
|
||||
|
||||
return Set(obj);
|
||||
}
|
||||
};
|
||||
|
||||
template<typename T>
|
||||
class ExtensibleItem
|
||||
: public BaseExtensibleItem<T>
|
||||
{
|
||||
protected:
|
||||
T *Create(Extensible *obj) override
|
||||
{
|
||||
return new T(obj);
|
||||
}
|
||||
public:
|
||||
ExtensibleItem(Module *m, const Anope::string &n) : BaseExtensibleItem<T>(m, n) { }
|
||||
};
|
||||
|
||||
template<typename T>
|
||||
class PrimitiveExtensibleItem
|
||||
: public BaseExtensibleItem<T>
|
||||
{
|
||||
protected:
|
||||
T *Create(Extensible *obj) override
|
||||
{
|
||||
return new T();
|
||||
}
|
||||
public:
|
||||
PrimitiveExtensibleItem(Module *m, const Anope::string &n) : BaseExtensibleItem<T>(m, n) { }
|
||||
};
|
||||
|
||||
template<>
|
||||
class PrimitiveExtensibleItem<bool> : public BaseExtensibleItem<bool>
|
||||
{
|
||||
protected:
|
||||
bool *Create(Extensible *) override
|
||||
{
|
||||
return NULL;
|
||||
}
|
||||
public:
|
||||
PrimitiveExtensibleItem(Module *m, const Anope::string &n) : BaseExtensibleItem<bool>(m, n) { }
|
||||
};
|
||||
|
||||
template<typename T>
|
||||
class SerializableExtensibleItem
|
||||
: public PrimitiveExtensibleItem<T>
|
||||
{
|
||||
public:
|
||||
SerializableExtensibleItem(Module *m, const Anope::string &n) : PrimitiveExtensibleItem<T>(m, n) { }
|
||||
|
||||
void ExtensibleSerialize(const Extensible *e, const Serializable *s, Serialize::Data &data) const override
|
||||
{
|
||||
T *t = this->Get(e);
|
||||
data.Store(this->name, *t);
|
||||
}
|
||||
|
||||
void ExtensibleUnserialize(Extensible *e, Serializable *s, Serialize::Data &data) override
|
||||
{
|
||||
T t;
|
||||
if (data.TryLoad(this->name, t))
|
||||
this->Set(e, t);
|
||||
else
|
||||
this->Unset(e);
|
||||
}
|
||||
};
|
||||
|
||||
template<>
|
||||
class SerializableExtensibleItem<bool> : public PrimitiveExtensibleItem<bool>
|
||||
{
|
||||
public:
|
||||
SerializableExtensibleItem(Module *m, const Anope::string &n) : PrimitiveExtensibleItem<bool>(m, n) { }
|
||||
|
||||
void ExtensibleSerialize(const Extensible *e, const Serializable *s, Serialize::Data &data) const override
|
||||
{
|
||||
data.Store(this->name, this->HasExt(e));
|
||||
}
|
||||
|
||||
void ExtensibleUnserialize(Extensible *e, Serializable *s, Serialize::Data &data) override
|
||||
{
|
||||
if (data.Load<bool>(this->name))
|
||||
this->Set(e);
|
||||
else
|
||||
this->Unset(e);
|
||||
}
|
||||
};
|
||||
|
||||
template<typename T>
|
||||
struct ExtensibleRef final
|
||||
: ServiceReference<BaseExtensibleItem<T> >
|
||||
{
|
||||
ExtensibleRef(const Anope::string &n) : ServiceReference<BaseExtensibleItem<T> >("Extensible", n) { }
|
||||
};
|
||||
|
||||
template<typename T>
|
||||
T *Extensible::GetExt(const Anope::string &name) const
|
||||
{
|
||||
ExtensibleRef<T> ref(name);
|
||||
if (ref)
|
||||
return ref->Get(this);
|
||||
|
||||
Log(LOG_DEBUG) << "GetExt for nonexistent type " << name << " on " << static_cast<const void *>(this);
|
||||
return NULL;
|
||||
}
|
||||
|
||||
template<typename T>
|
||||
T *Extensible::Extend(const Anope::string &name, const T &what)
|
||||
{
|
||||
T *t = Extend<T>(name);
|
||||
if (t)
|
||||
*t = what;
|
||||
return t;
|
||||
}
|
||||
|
||||
template<typename T>
|
||||
T *Extensible::Extend(const Anope::string &name)
|
||||
{
|
||||
ExtensibleRef<T> ref(name);
|
||||
if (ref)
|
||||
return ref->Set(this);
|
||||
|
||||
Log(LOG_DEBUG) << "Extend for nonexistent type " << name << " on " << static_cast<void *>(this);
|
||||
return NULL;
|
||||
}
|
||||
|
||||
template<typename T>
|
||||
T *Extensible::Require(const Anope::string &name)
|
||||
{
|
||||
if (HasExt(name))
|
||||
return GetExt<T>(name);
|
||||
else
|
||||
return Extend<T>(name);
|
||||
}
|
||||
|
||||
template<typename T>
|
||||
void Extensible::Shrink(const Anope::string &name)
|
||||
{
|
||||
ExtensibleRef<T> ref(name);
|
||||
if (ref)
|
||||
ref->Unset(this);
|
||||
else
|
||||
Log(LOG_DEBUG) << "Shrink for nonexistent type " << name << " on " << static_cast<void *>(this);
|
||||
}
|
||||
+1413
File diff suppressed because it is too large
Load Diff
@@ -1,199 +0,0 @@
|
||||
// Anope IRC Services <https://www.anope.org/>
|
||||
//
|
||||
// Copyright (C) 2003-2026 Anope Contributors
|
||||
// Copyright (C) 2009-2011 InspIRCd Development Team
|
||||
//
|
||||
// Anope is free software. You can use, modify, and/or distribute it under the
|
||||
// terms of version 2 of the GNU General Public License. See docs/LICENSE.txt
|
||||
// for the complete terms of this license and docs/AUTHORS.txt for a list of
|
||||
// contributors.
|
||||
//
|
||||
// Based on the original code of Epona by Lara
|
||||
// Based on the original code of Services by Andy Church
|
||||
//
|
||||
// SPDX-License-Identifier: GPL-2.0-only
|
||||
|
||||
#pragma once
|
||||
|
||||
#include <string>
|
||||
#include <locale>
|
||||
#include <unordered_map>
|
||||
|
||||
#include "services.h"
|
||||
|
||||
namespace Anope
|
||||
{
|
||||
class string;
|
||||
|
||||
/* Casemap in use by Anope. ci::string's comparison functions use this (and thus Anope::string) */
|
||||
extern std::locale casemap;
|
||||
|
||||
extern CoreExport void CaseMapRebuild();
|
||||
extern CoreExport unsigned char tolower(unsigned char);
|
||||
extern CoreExport unsigned char toupper(unsigned char);
|
||||
|
||||
/* ASCII case insensitive ctype. */
|
||||
template<typename char_type>
|
||||
class ascii_ctype
|
||||
: public std::ctype<char_type>
|
||||
{
|
||||
public:
|
||||
char_type do_toupper(char_type c) const override
|
||||
{
|
||||
if (c >= 'a' && c <= 'z')
|
||||
return c - 32;
|
||||
else
|
||||
return c;
|
||||
}
|
||||
|
||||
char_type do_tolower(char_type c) const override
|
||||
{
|
||||
if (c >= 'A' && c <= 'Z')
|
||||
return c + 32;
|
||||
else
|
||||
return c;
|
||||
}
|
||||
};
|
||||
|
||||
/* rfc1459 case insensitive ctype, { = [, } = ], and | = \ */
|
||||
template<typename char_type>
|
||||
class rfc1459_ctype final
|
||||
: public ascii_ctype<char_type>
|
||||
{
|
||||
public:
|
||||
char_type do_toupper(char_type c) const override
|
||||
{
|
||||
if (c == '{' || c == '}' || c == '|')
|
||||
return c - 32;
|
||||
else
|
||||
return ascii_ctype<char_type>::do_toupper(c);
|
||||
}
|
||||
|
||||
char_type do_tolower(char_type c) const override
|
||||
{
|
||||
if (c == '[' || c == ']' || c == '\\')
|
||||
return c + 32;
|
||||
else
|
||||
return ascii_ctype<char_type>::do_tolower(c);
|
||||
}
|
||||
};
|
||||
}
|
||||
|
||||
/** The ci namespace contains a number of helper classes relevant to case insensitive strings.
|
||||
*/
|
||||
namespace ci
|
||||
{
|
||||
/** The ci_char_traits class is used for ASCII-style comparison of strings.
|
||||
* This class is used to implement ci::string, a case-insensitive, ASCII-
|
||||
* comparing string class.
|
||||
*/
|
||||
struct CoreExport ci_char_traits final
|
||||
: std::char_traits<char>
|
||||
{
|
||||
/** Check if two chars match.
|
||||
* @param c1st First character
|
||||
* @param c2nd Second character
|
||||
* @return true if the characters are equal
|
||||
*/
|
||||
static bool eq(char c1st, char c2nd);
|
||||
|
||||
/** Check if two chars do NOT match.
|
||||
* @param c1st First character
|
||||
* @param c2nd Second character
|
||||
* @return true if the characters are unequal
|
||||
*/
|
||||
static bool ne(char c1st, char c2nd);
|
||||
|
||||
/** Check if one char is less than another.
|
||||
* @param c1st First character
|
||||
* @param c2nd Second character
|
||||
* @return true if c1st is less than c2nd
|
||||
*/
|
||||
static bool lt(char c1st, char c2nd);
|
||||
|
||||
/** Compare two strings of size n.
|
||||
* @param str1 First string
|
||||
* @param str2 Second string
|
||||
* @param n Length to compare to
|
||||
* @return similar to strcmp, zero for equal, less than zero for str1
|
||||
* being less and greater than zero for str1 being greater than str2.
|
||||
*/
|
||||
static int compare(const char *str1, const char *str2, size_t n);
|
||||
|
||||
/** Find a char within a string up to position n.
|
||||
* @param s1 String to find in
|
||||
* @param n Position to search up to
|
||||
* @param c Character to search for
|
||||
* @return Pointer to the first occurrence of c in s1
|
||||
*/
|
||||
static const char *find(const char *s1, int n, char c);
|
||||
};
|
||||
|
||||
/** This typedef declares ci::string based upon ci_char_traits.
|
||||
*/
|
||||
typedef std::basic_string<char, ci_char_traits, std::allocator<char> > string;
|
||||
|
||||
struct CoreExport less final
|
||||
{
|
||||
/** Compare two Anope::strings as ci::strings and find which one is less
|
||||
* @param s1 The first string
|
||||
* @param s2 The second string
|
||||
* @return true if s1 < s2, else false
|
||||
*/
|
||||
bool operator()(const Anope::string &s1, const Anope::string &s2) const;
|
||||
};
|
||||
}
|
||||
|
||||
/* Define operators for + and == with ci::string to std::string for easy assignment
|
||||
* and comparison
|
||||
*
|
||||
* Operator +
|
||||
*/
|
||||
inline std::string operator+(std::string &leftval, ci::string &rightval)
|
||||
{
|
||||
return leftval + std::string(rightval.c_str());
|
||||
}
|
||||
|
||||
/* Define operators for + and == with ci::string to std::string for easy assignment
|
||||
* and comparison
|
||||
*
|
||||
* Operator +
|
||||
*/
|
||||
inline ci::string operator+(ci::string &leftval, std::string &rightval)
|
||||
{
|
||||
return leftval + ci::string(rightval.c_str());
|
||||
}
|
||||
|
||||
/* Define operators for + and == with ci::string to std::string for easy assignment
|
||||
* and comparison
|
||||
*
|
||||
* Operator ==
|
||||
*/
|
||||
inline bool operator==(const std::string &leftval, const ci::string &rightval)
|
||||
{
|
||||
return leftval.c_str() == rightval;
|
||||
}
|
||||
|
||||
/* Define operators for + and == with ci::string to std::string for easy assignment
|
||||
* and comparison
|
||||
*
|
||||
* Operator ==
|
||||
*/
|
||||
inline bool operator==(const ci::string &leftval, const std::string &rightval)
|
||||
{
|
||||
return leftval == rightval.c_str();
|
||||
}
|
||||
|
||||
/* Define operators != for ci::string to std::string for easy comparison
|
||||
*/
|
||||
inline bool operator!=(const ci::string &leftval, const std::string &rightval)
|
||||
{
|
||||
return !(leftval == rightval.c_str());
|
||||
}
|
||||
|
||||
/* Define operators != for std::string to ci::string for easy comparison
|
||||
*/
|
||||
inline bool operator!=(const std::string &leftval, const ci::string &rightval)
|
||||
{
|
||||
return !(leftval.c_str() == rightval);
|
||||
}
|
||||
@@ -1,180 +0,0 @@
|
||||
// Anope IRC Services <https://www.anope.org/>
|
||||
//
|
||||
// Copyright (C) 2003-2026 Anope Contributors
|
||||
//
|
||||
// Anope is free software. You can use, modify, and/or distribute it under the
|
||||
// terms of version 2 of the GNU General Public License. See docs/LICENSE.txt
|
||||
// for the complete terms of this license and docs/AUTHORS.txt for a list of
|
||||
// contributors.
|
||||
//
|
||||
// Based on the original code of Epona by Lara
|
||||
// Based on the original code of Services by Andy Church
|
||||
//
|
||||
// SPDX-License-Identifier: GPL-2.0-only
|
||||
|
||||
#pragma once
|
||||
|
||||
#include "anope.h"
|
||||
|
||||
namespace Language
|
||||
{
|
||||
|
||||
/* Languages we support as configured in anope.conf. They are
|
||||
* added to this list if we detect a language exists in the correct
|
||||
* location for each language.
|
||||
*/
|
||||
extern CoreExport std::vector<Anope::string> Languages;
|
||||
|
||||
/* Domains to search when looking for translations other than the
|
||||
* default "anope domain. This is used by modules who add their own
|
||||
* language files (and thus domains) to Anope. If a module is loaded
|
||||
* and we detect a language file exists for at least one of the supported
|
||||
* languages for the module, then we add the module's domain (its name)
|
||||
* here.
|
||||
*
|
||||
* When strings are translated they are checked against all domains.
|
||||
*/
|
||||
extern std::vector<Anope::string> Domains;
|
||||
|
||||
/** Initialize the language system. Finds valid language files and
|
||||
* populates the Languages list.
|
||||
*/
|
||||
extern void InitLanguages();
|
||||
|
||||
/** Sets the locale to the specified language.
|
||||
* @param lang The language to translate to.
|
||||
*/
|
||||
extern CoreExport void SetLocale(const char *lang);
|
||||
|
||||
/** Sets the locale back to the default. */
|
||||
extern CoreExport void ResetLocale();
|
||||
|
||||
/** Translates a string to the default language.
|
||||
* @param string A string to translate
|
||||
* @return The translated string if found, else the original string.
|
||||
*/
|
||||
extern CoreExport const char *Translate(const char *string);
|
||||
|
||||
/** Translates a string to the language of the given user.
|
||||
* @param u The user to translate the string for
|
||||
* @param string A string to translate
|
||||
* @return The translated string if found, else the original string.
|
||||
*/
|
||||
extern CoreExport const char *Translate(User *u, const char *string);
|
||||
|
||||
/** Translates a string to the language of the given account.
|
||||
* @param nc The account to translate the string for
|
||||
* @param string A string to translate
|
||||
* @return The translated string if count, else the original string
|
||||
*/
|
||||
extern CoreExport const char *Translate(const NickCore *nc, const char *string);
|
||||
|
||||
/** Translates a string to the given language.
|
||||
* @param lang The language to translate to
|
||||
* @param string The string to translate
|
||||
* @return The translated string if found, else the original string.
|
||||
*/
|
||||
extern CoreExport const char *Translate(const char *lang, const char *string);
|
||||
|
||||
/** Translates a plural string to the default language.
|
||||
* @param count The number of items the string is counting.
|
||||
* @param singular The string to translate if there is one of \p count
|
||||
* @param plural The string to translate if there is multiple of \p count
|
||||
* @return The translated string if found, else the original string.
|
||||
*/
|
||||
extern CoreExport const char *Translate(int count, const char *singular, const char *plural);
|
||||
|
||||
/** Translates a plural string to the language of the given user.
|
||||
* @param u The user to translate the string for
|
||||
* @param count The number of items the string is counting.
|
||||
* @param singular The string to translate if there is one of \p count
|
||||
* @param plural The string to translate if there is multiple of \p count
|
||||
* @return The translated string if found, else the original string.
|
||||
*/
|
||||
extern CoreExport const char *Translate(User *u, int count, const char *singular, const char *plural);
|
||||
|
||||
/** Translates a plural string to the language of the given account.
|
||||
* @param nc The account to translate the string for
|
||||
* @param count The number of items the string is counting.
|
||||
* @param singular The string to translate if there is one of \p count
|
||||
* @param plural The string to translate if there is multiple of \p count
|
||||
* @return The translated string if count, else the original string
|
||||
*/
|
||||
extern CoreExport const char *Translate(const NickCore *nc, int count, const char *singular, const char *plural);
|
||||
|
||||
/** Translates a plural string to the given language.
|
||||
* @param lang The language to translate to
|
||||
* @param count The number of items the string is counting.
|
||||
* @param singular The string to translate if there is one of \p count
|
||||
* @param plural The string to translate if there is multiple of \p count
|
||||
* @return The translated string if found, else the original string.
|
||||
*/
|
||||
extern CoreExport const char *Translate(const char *lang, int count, const char *singular, const char *plural);
|
||||
|
||||
} // namespace Language
|
||||
|
||||
/* Commonly used language strings */
|
||||
#define ACCESS_DENIED _("Access denied.")
|
||||
#define BAD_EXPIRY_TIME _("Invalid expiry time.")
|
||||
#define BAD_USERHOST_MASK _("Mask must be in the form \037user\037@\037host\037.")
|
||||
#define CONFIRM_DROP _("Please confirm that you want to drop \002%s\002 with \002%s\033%s\033%s\002")
|
||||
#define CONFIRM_REGISTER_ADMIN _("All new accounts must be confirmed by an administrator. Please wait for your registration to be confirmed.")
|
||||
#define CONFIRM_REGISTER_CODE _("All new accounts must be confirmed. To confirm your account, type \002%s\002.")
|
||||
#define CONFIRM_REGISTER_MAIL _("All new accounts must be confirmed. To confirm your account, follow the instructions that were emailed to you.")
|
||||
#define LIST_INCORRECT_RANGE _("Incorrect range specified. The correct syntax is \002#\037from\037-\037to\037\002.")
|
||||
#define MAIL_X_INVALID _("\002%s\002 is not a valid email address.")
|
||||
#define MORE_INFO _("Type \002%s\002 for more information.")
|
||||
#define NO_EXPIRE _("does not expire")
|
||||
#define PASSWORD_INCORRECT _("Password incorrect.")
|
||||
#define READ_ONLY_MODE _("Services are temporarily in read-only mode.")
|
||||
#define TIME_NEVER _("Never")
|
||||
#define TIME_NOW _("Now")
|
||||
#define TIME_UNKNOWN _("Unknown")
|
||||
#define TRY_AGAIN_LATER _("The \002%s\002 command is temporarily unavailable. Please try again later.")
|
||||
#define USERHOST_MASK_TOO_WIDE _("%s coverage is too wide; Please use a more specific mask.")
|
||||
|
||||
#define BOT_DOES_NOT_EXIST _("Bot \002%s\002 does not exist.")
|
||||
#define BOT_NOT_ASSIGNED _("You must assign a bot to the channel before using this command.")
|
||||
#define BOT_NOT_ON_CHANNEL _("Bot is not on channel \002%s\002.")
|
||||
|
||||
#define CHAN_ACCESS_LIMIT N_("You can only have %u access entry on a channel.", "You can only have %u access entries on a channel.")
|
||||
#define CHAN_ACCESS_LIMIT_DEEP N_("You can only have %u access entry on a channel, including access entries from other channels.", "You can only have %u access entries on a channel, including access entries from other channels.")
|
||||
#define CHAN_ACCESS_LEVEL_RANGE _("Access level must be between %d and %d inclusive.")
|
||||
#define CHAN_ACCESS_MALFORMED _("You cannot add a malformed mask to an access list. Did you mean to add %s instead?")
|
||||
#define CHAN_ACCESS_FOREIGN N_("%u access entry from other access systems not shown; use \002%s\033ALL\002 to view all access entries.", "%u access entries from other access systems not shown; use \002%s\033ALL\002 to view all access entries.")
|
||||
#define CHAN_EXCEPTED _("\002%s\002 matches an except on %s and cannot be banned until the except has been removed.")
|
||||
#define CHAN_INFO_HEADER _("Information about channel \002%s\002:")
|
||||
#define CHAN_LIMIT_EXCEEDED _("You have already exceeded your limit of \002%d\002 channels.")
|
||||
#define CHAN_LIMIT_REACHED _("You have already reached your limit of \002%d\002 channels.")
|
||||
#define CHAN_NOT_ALLOWED_TO_JOIN _("You are not permitted to be on this channel.")
|
||||
#define CHAN_SETTING_CHANGED _("%s for %s set to %s.")
|
||||
#define CHAN_SETTING_INVALID _("%s syntax is invalid.")
|
||||
#define CHAN_SETTING_UNSET _("%s for %s unset.")
|
||||
#define CHAN_SYMBOL_REQUIRED _("Please use the symbol of \002#\002 when attempting to register.")
|
||||
#define CHAN_X_INVALID _("Channel %s is not a valid channel.")
|
||||
#define CHAN_X_NOT_IN_USE _("Channel \002%s\002 doesn't exist.")
|
||||
#define CHAN_X_NOT_REGISTERED _("Channel \002%s\002 isn't registered.")
|
||||
#define CHAN_X_SUSPENDED _("Channel %s is currently suspended.")
|
||||
|
||||
#define HOST_NO_VIDENT _("Your IRCd does not support vidents. If this is incorrect please report this as a possible bug.")
|
||||
#define HOST_NOT_ASSIGNED _("Please contact an Operator to get a vhost assigned to this nick.")
|
||||
#define HOST_SET_VHOST_ERROR _("A vhost must be in the format of a valid hostname.")
|
||||
#define HOST_SET_VHOST_TOO_LONG _("Error! The vhost is too long, please use a hostname shorter than %zu characters.")
|
||||
#define HOST_SET_VIDENT_ERROR _("A vident must be in the format of a valid ident.")
|
||||
#define HOST_SET_VIDENT_TOO_LONG _("Error! The vident is too long, please use an ident shorter than %zu characters.")
|
||||
|
||||
#define MEMO_HAVE_NO_MEMOS _("You have no memos.")
|
||||
#define MEMO_HAVE_NO_NEW_MEMOS _("You have no new memos.")
|
||||
#define MEMO_NEW_MEMO_ARRIVED _("You have a new memo from %s. Type \002%s\033%zu\002 to read it.")
|
||||
#define MEMO_NEW_X_MEMO_ARRIVED _("There is a new memo on channel %s. Type \002%s\033%s\033%zu\002 to read it.")
|
||||
#define MEMO_X_HAS_NO_MEMOS _("%s has no memos.")
|
||||
#define MEMO_X_HAS_NO_NEW_MEMOS _("%s has no new memos.")
|
||||
|
||||
#define NICK_ALREADY_REGISTERED _("Nickname \002%s\002 is already registered!")
|
||||
#define NICK_CANNOT_BE_REGISTERED _("Nickname \002%s\002 may not be registered.")
|
||||
#define NICK_IDENTIFY_REQUIRED _("You must be logged into an account to use that command.")
|
||||
#define NICK_SET_DISPLAY_CHANGED _("The new display is now \002%s\002.")
|
||||
#define NICK_X_NOT_IN_USE _("Nick \002%s\002 isn't currently in use.")
|
||||
#define NICK_X_NOT_ON_CHAN _("\002%s\002 is not currently on channel %s.")
|
||||
#define NICK_X_NOT_REGISTERED _("Nick \002%s\002 isn't registered.")
|
||||
#define NICK_X_SUSPENDED _("Nick %s is currently suspended.")
|
||||
@@ -1,62 +0,0 @@
|
||||
// Anope IRC Services <https://www.anope.org/>
|
||||
//
|
||||
// Copyright (C) 2003-2026 Anope Contributors
|
||||
//
|
||||
// Anope is free software. You can use, modify, and/or distribute it under the
|
||||
// terms of version 2 of the GNU General Public License. See docs/LICENSE.txt
|
||||
// for the complete terms of this license and docs/AUTHORS.txt for a list of
|
||||
// contributors.
|
||||
//
|
||||
// Based on the original code of Epona by Lara
|
||||
// Based on the original code of Services by Andy Church
|
||||
//
|
||||
// SPDX-License-Identifier: GPL-2.0-only
|
||||
|
||||
#pragma once
|
||||
|
||||
#include "services.h"
|
||||
#include "anope.h"
|
||||
|
||||
/** A class to process numbered lists (passed to most DEL/LIST/VIEW commands).
|
||||
* The function HandleNumber is called for every number in the list. Note that
|
||||
* if descending is true it gets called in descending order. This is so deleting
|
||||
* the index passed to the function from an array will not cause the other indexes
|
||||
* passed to the function to be incorrect. This keeps us from having to have an
|
||||
* 'in use' flag on everything.
|
||||
*/
|
||||
class CoreExport NumberList
|
||||
{
|
||||
private:
|
||||
bool is_valid = true;
|
||||
|
||||
std::set<unsigned> numbers;
|
||||
|
||||
bool desc;
|
||||
public:
|
||||
/** Processes a numbered list
|
||||
* @param list The list
|
||||
* @param descending True to make HandleNumber get called with numbers in descending order
|
||||
*/
|
||||
NumberList(const Anope::string &list, bool descending);
|
||||
|
||||
/** Destructor, does nothing
|
||||
*/
|
||||
virtual ~NumberList() = default;
|
||||
|
||||
/** Should be called after the constructors are done running. This calls the callbacks.
|
||||
*/
|
||||
void Process();
|
||||
|
||||
/** Called with a number from the list
|
||||
* @param number The number
|
||||
*/
|
||||
virtual void HandleNumber(unsigned number);
|
||||
|
||||
/** Called when there is an error with the numbered list
|
||||
* Return false to immediately stop processing the list and return
|
||||
* This is all done before we start calling HandleNumber, so no numbers will have been processed yet
|
||||
* @param list The list
|
||||
* @return false to stop processing
|
||||
*/
|
||||
virtual bool InvalidRange(const Anope::string &list);
|
||||
};
|
||||
@@ -1,144 +0,0 @@
|
||||
// Anope IRC Services <https://www.anope.org/>
|
||||
//
|
||||
// Copyright (C) 2003-2026 Anope Contributors
|
||||
//
|
||||
// Anope is free software. You can use, modify, and/or distribute it under the
|
||||
// terms of version 2 of the GNU General Public License. See docs/LICENSE.txt
|
||||
// for the complete terms of this license and docs/AUTHORS.txt for a list of
|
||||
// contributors.
|
||||
//
|
||||
// Based on the original code of Epona by Lara
|
||||
// Based on the original code of Services by Andy Church
|
||||
//
|
||||
// SPDX-License-Identifier: GPL-2.0-only
|
||||
|
||||
#pragma once
|
||||
|
||||
#include "anope.h"
|
||||
#include "defs.h"
|
||||
|
||||
enum LogType
|
||||
{
|
||||
/* Used whenever an administrator uses an administrative command */
|
||||
LOG_ADMIN,
|
||||
/* Used whenever an administrator overrides something, such as adding
|
||||
* access to a channel where they don't have permission to.
|
||||
*/
|
||||
LOG_OVERRIDE,
|
||||
/* Any other command usage */
|
||||
LOG_COMMAND,
|
||||
LOG_SERVER,
|
||||
LOG_CHANNEL,
|
||||
LOG_USER,
|
||||
LOG_MODULE,
|
||||
LOG_NORMAL,
|
||||
LOG_TERMINAL,
|
||||
LOG_RAWIO,
|
||||
LOG_DEBUG,
|
||||
LOG_DEBUG_2,
|
||||
LOG_DEBUG_3,
|
||||
LOG_DEBUG_4
|
||||
};
|
||||
|
||||
struct LogFile final
|
||||
{
|
||||
Anope::string filename;
|
||||
std::ofstream stream;
|
||||
|
||||
LogFile(const Anope::string &name);
|
||||
~LogFile();
|
||||
const Anope::string &GetName() const;
|
||||
};
|
||||
|
||||
/* Represents a single log message */
|
||||
class CoreExport Log final
|
||||
{
|
||||
public:
|
||||
/* Bot that should log this message */
|
||||
BotInfo *bi = nullptr;
|
||||
/* For commands, the user executing the command, but might not always exist */
|
||||
User *u = nullptr;
|
||||
/* For commands, the account executing the command, but will not always exist */
|
||||
NickCore *nc = nullptr;
|
||||
/* For commands, the command being executed */
|
||||
Command *c = nullptr;
|
||||
/* For commands, the command source */
|
||||
CommandSource *source = nullptr;
|
||||
/* Used for LOG_CHANNEL */
|
||||
Channel *chan = nullptr;
|
||||
/* For commands, the channel the command was executed on, will not always exist */
|
||||
const ChannelInfo *ci = nullptr;
|
||||
/* For LOG_SERVER */
|
||||
Server *s = nullptr;
|
||||
/* For LOG_MODULE */
|
||||
Module *m = nullptr;
|
||||
LogType type;
|
||||
Anope::string category;
|
||||
|
||||
std::stringstream buf;
|
||||
|
||||
Log(LogType type = LOG_NORMAL, const Anope::string &category = "", BotInfo *bi = NULL);
|
||||
|
||||
/* LOG_COMMAND/OVERRIDE/ADMIN */
|
||||
Log(LogType type, CommandSource &source, Command *c, ChannelInfo *ci = NULL);
|
||||
|
||||
/* LOG_CHANNEL */
|
||||
Log(User *u, Channel *c, const Anope::string &category = "");
|
||||
|
||||
/* LOG_USER */
|
||||
Log(User *u, const Anope::string &category = "", BotInfo *bi = NULL);
|
||||
|
||||
/* LOG_SERVER */
|
||||
Log(Server *s, const Anope::string &category = "", BotInfo *bi = NULL);
|
||||
|
||||
Log(BotInfo *b, const Anope::string &category = "");
|
||||
|
||||
Log(Module *m, const Anope::string &category = "", BotInfo *bi = NULL);
|
||||
|
||||
~Log();
|
||||
|
||||
private:
|
||||
Anope::string FormatSource() const;
|
||||
Anope::string FormatCommand() const;
|
||||
|
||||
public:
|
||||
Anope::string BuildPrefix() const;
|
||||
|
||||
template<typename T> Log &operator<<(T val)
|
||||
{
|
||||
this->buf << val;
|
||||
return *this;
|
||||
}
|
||||
};
|
||||
|
||||
/* Configured in the configuration file, actually does the message logging */
|
||||
class CoreExport LogInfo final
|
||||
{
|
||||
public:
|
||||
BotInfo *bot = nullptr;
|
||||
std::vector<Anope::string> targets;
|
||||
std::vector<LogFile *> logfiles;
|
||||
int last_day = 0;
|
||||
std::vector<Anope::string> sources;
|
||||
int log_age;
|
||||
std::vector<Anope::string> admin;
|
||||
std::vector<Anope::string> override;
|
||||
std::vector<Anope::string> commands;
|
||||
std::vector<Anope::string> servers;
|
||||
std::vector<Anope::string> users;
|
||||
std::vector<Anope::string> channels;
|
||||
std::vector<Anope::string> normal;
|
||||
bool raw_io;
|
||||
bool debug;
|
||||
|
||||
LogInfo(int logage, bool rawio, bool debug);
|
||||
|
||||
~LogInfo();
|
||||
|
||||
void OpenLogFiles();
|
||||
|
||||
bool HasType(LogType ltype, const Anope::string &type) const;
|
||||
|
||||
/* Logs the message l if configured to */
|
||||
void ProcessMessage(const Log *l);
|
||||
};
|
||||
@@ -1,58 +0,0 @@
|
||||
// Anope IRC Services <https://www.anope.org/>
|
||||
//
|
||||
// Copyright (C) 2003-2026 Anope Contributors
|
||||
//
|
||||
// Anope is free software. You can use, modify, and/or distribute it under the
|
||||
// terms of version 2 of the GNU General Public License. See docs/LICENSE.txt
|
||||
// for the complete terms of this license and docs/AUTHORS.txt for a list of
|
||||
// contributors.
|
||||
//
|
||||
// Based on the original code of Epona by Lara
|
||||
// Based on the original code of Services by Andy Church
|
||||
//
|
||||
// SPDX-License-Identifier: GPL-2.0-only
|
||||
|
||||
#pragma once
|
||||
|
||||
#include "anope.h"
|
||||
#include "threadengine.h"
|
||||
#include "serialize.h"
|
||||
|
||||
namespace Mail
|
||||
{
|
||||
extern CoreExport bool Send(User *from, NickCore *to, BotInfo *service, const Anope::string &subject, const Anope::string &message);
|
||||
extern CoreExport bool Send(NickCore *to, const Anope::string &subject, const Anope::string &message);
|
||||
extern CoreExport bool Validate(const Anope::string &email);
|
||||
|
||||
/* A email message being sent */
|
||||
class Message final
|
||||
: public Thread
|
||||
{
|
||||
private:
|
||||
Anope::string error;
|
||||
Anope::string sendmail_path;
|
||||
Anope::string send_from;
|
||||
Anope::string mail_to;
|
||||
Anope::string addr;
|
||||
Anope::string subject;
|
||||
Anope::string message;
|
||||
Anope::string content_type;
|
||||
bool dont_quote_addresses;
|
||||
|
||||
public:
|
||||
/** Construct this message. Once constructed call Thread::Start to launch the mail sending.
|
||||
* @param sf Config->SendFrom
|
||||
* @param mailto Name of person being mailed (u->nick, nc->display, etc)
|
||||
* @param addr Destination address to mail
|
||||
* @param subject Message subject
|
||||
* @param message The actual message
|
||||
*/
|
||||
Message(const Anope::string &sf, const Anope::string &mailto, const Anope::string &addr, const Anope::string &subject, const Anope::string &message);
|
||||
|
||||
~Message();
|
||||
|
||||
/* Called from within the thread to actually send the mail */
|
||||
void Run() override;
|
||||
};
|
||||
|
||||
} // namespace Mail
|
||||
@@ -0,0 +1,25 @@
|
||||
# Make file for Win32
|
||||
#
|
||||
# (C) 2003-2009 Anope Team
|
||||
# Contact us at team@anope.org
|
||||
#
|
||||
# Please read COPYING and README for further details.
|
||||
#
|
||||
# Based on the original code of Epona by Lara.
|
||||
# Based on the original code of Services by Andy Church.
|
||||
#
|
||||
# $Id$
|
||||
#
|
||||
|
||||
###########################################################################
|
||||
|
||||
clean:
|
||||
-@erase language.h
|
||||
|
||||
spotless: clean
|
||||
-@erase sysconf.h version.h
|
||||
|
||||
distclean: spotless
|
||||
|
||||
|
||||
FRC:
|
||||
@@ -1,61 +0,0 @@
|
||||
// Anope IRC Services <https://www.anope.org/>
|
||||
//
|
||||
// Copyright (C) 2003-2026 Anope Contributors
|
||||
//
|
||||
// Anope is free software. You can use, modify, and/or distribute it under the
|
||||
// terms of version 2 of the GNU General Public License. See docs/LICENSE.txt
|
||||
// for the complete terms of this license and docs/AUTHORS.txt for a list of
|
||||
// contributors.
|
||||
//
|
||||
// Based on the original code of Epona by Lara
|
||||
// Based on the original code of Services by Andy Church
|
||||
//
|
||||
// SPDX-License-Identifier: GPL-2.0-only
|
||||
|
||||
#pragma once
|
||||
|
||||
#include "anope.h"
|
||||
#include "serialize.h"
|
||||
|
||||
class CoreExport Memo final
|
||||
: public Serializable
|
||||
{
|
||||
public:
|
||||
struct Type final
|
||||
: public Serialize::Type
|
||||
{
|
||||
Type();
|
||||
void Serialize(Serializable *obj, Serialize::Data &data) const override;
|
||||
Serializable *Unserialize(Serializable *obj, Serialize::Data &data) const override;
|
||||
};
|
||||
|
||||
MemoInfo *mi;
|
||||
bool unread;
|
||||
bool receipt;
|
||||
Memo();
|
||||
~Memo();
|
||||
|
||||
Anope::string owner;
|
||||
/* When it was sent */
|
||||
time_t time;
|
||||
Anope::string sender;
|
||||
Anope::string text;
|
||||
};
|
||||
|
||||
/* Memo info structures. Since both nicknames and channels can have memos,
|
||||
* we encapsulate memo data in a MemoInfo to make it easier to handle.
|
||||
*/
|
||||
struct CoreExport MemoInfo final
|
||||
{
|
||||
int16_t memomax = 0;
|
||||
Serialize::Checker<std::vector<Memo *> > memos;
|
||||
std::set<Anope::string, ci::less> ignores;
|
||||
|
||||
MemoInfo();
|
||||
Memo *GetMemo(unsigned index) const;
|
||||
unsigned GetIndex(Memo *m) const;
|
||||
void Del(unsigned index);
|
||||
bool HasIgnore(User *u);
|
||||
|
||||
static MemoInfo *GetMemoInfo(const Anope::string &targ, bool &is_chan);
|
||||
};
|
||||
+18
-201
@@ -1,206 +1,23 @@
|
||||
// Anope IRC Services <https://www.anope.org/>
|
||||
//
|
||||
// Copyright (C) 2003-2026 Anope Contributors
|
||||
//
|
||||
// Anope is free software. You can use, modify, and/or distribute it under the
|
||||
// terms of version 2 of the GNU General Public License. See docs/LICENSE.txt
|
||||
// for the complete terms of this license and docs/AUTHORS.txt for a list of
|
||||
// contributors.
|
||||
//
|
||||
// Based on the original code of Epona by Lara
|
||||
// Based on the original code of Services by Andy Church
|
||||
//
|
||||
// SPDX-License-Identifier: GPL-2.0-only
|
||||
|
||||
#pragma once
|
||||
|
||||
#include "protocol.h"
|
||||
|
||||
/* Common IRCD messages.
|
||||
* Protocol modules may chose to include some, none, or all of these handlers
|
||||
* as they see fit.
|
||||
/* Declarations of IRC message structures, variables, and functions.
|
||||
*
|
||||
* (C) 2003-2009 Anope Team
|
||||
* Contact us at team@anope.org
|
||||
*
|
||||
* Please read COPYING and README for furhter details.
|
||||
*
|
||||
* Based on the original code of Epona by Lara.
|
||||
* Based on the original code of Services by Andy Church.
|
||||
*
|
||||
* $Id$
|
||||
*
|
||||
*/
|
||||
|
||||
namespace Message
|
||||
{
|
||||
/*************************************************************************/
|
||||
#include "modules.h"
|
||||
|
||||
struct CoreExport Away
|
||||
: IRCDMessage
|
||||
{
|
||||
Away(Module *creator, const Anope::string &mname = "AWAY") : IRCDMessage(creator, mname, 0) { SetFlag(FLAG_REQUIRE_USER); SetFlag(FLAG_SOFT_LIMIT); }
|
||||
extern Message messages[];
|
||||
extern void moduleAddMsgs(void);
|
||||
extern Message *find_message(const char *name);
|
||||
|
||||
void Run(MessageSource &source, const std::vector<Anope::string> ¶ms, const Anope::map<Anope::string> &tags) override;
|
||||
};
|
||||
|
||||
struct CoreExport Capab
|
||||
: IRCDMessage
|
||||
{
|
||||
Capab(Module *creator, const Anope::string &mname = "CAPAB") : IRCDMessage(creator, mname, 1) { SetFlag(FLAG_SOFT_LIMIT); }
|
||||
|
||||
void Run(MessageSource &source, const std::vector<Anope::string> ¶ms, const Anope::map<Anope::string> &tags) override;
|
||||
};
|
||||
|
||||
struct CoreExport Error
|
||||
: IRCDMessage
|
||||
{
|
||||
Error(Module *creator, const Anope::string &mname = "ERROR") : IRCDMessage(creator, mname, 1) { }
|
||||
|
||||
void Run(MessageSource &source, const std::vector<Anope::string> ¶ms, const Anope::map<Anope::string> &tags) override;
|
||||
};
|
||||
|
||||
struct CoreExport Ignore final
|
||||
: IRCDMessage
|
||||
{
|
||||
Ignore(Module *creator, const Anope::string &mname);
|
||||
void Run(MessageSource &source, const std::vector<Anope::string> ¶ms, const Anope::map<Anope::string> &tags) override;
|
||||
};
|
||||
|
||||
struct CoreExport Invite
|
||||
: IRCDMessage
|
||||
{
|
||||
Invite(Module *creator, const Anope::string &mname = "INVITE") : IRCDMessage(creator, mname, 2) { SetFlag(FLAG_REQUIRE_USER); SetFlag(FLAG_SOFT_LIMIT); }
|
||||
|
||||
void Run(MessageSource &source, const std::vector<Anope::string> ¶ms, const Anope::map<Anope::string> &tags) override;
|
||||
};
|
||||
|
||||
struct CoreExport Join
|
||||
: IRCDMessage
|
||||
{
|
||||
Join(Module *creator, const Anope::string &mname = "JOIN") : IRCDMessage(creator, mname, 1) { SetFlag(FLAG_REQUIRE_USER); SetFlag(FLAG_SOFT_LIMIT); }
|
||||
|
||||
void Run(MessageSource &source, const std::vector<Anope::string> ¶ms, const Anope::map<Anope::string> &tags) override;
|
||||
|
||||
typedef std::pair<ChannelStatus, User *> SJoinUser;
|
||||
|
||||
/** Handle a SJOIN.
|
||||
* @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 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::vector<Anope::string> &modeparams, const std::list<SJoinUser> &users);
|
||||
};
|
||||
|
||||
struct CoreExport Kick
|
||||
: IRCDMessage
|
||||
{
|
||||
Kick(Module *creator, const Anope::string &mname = "KICK") : IRCDMessage(creator, mname, 2) { SetFlag(FLAG_SOFT_LIMIT); }
|
||||
|
||||
void Run(MessageSource &source, const std::vector<Anope::string> ¶ms, const Anope::map<Anope::string> &tags) override;
|
||||
};
|
||||
|
||||
struct CoreExport Kill
|
||||
: IRCDMessage
|
||||
{
|
||||
Kill(Module *creator, const Anope::string &mname = "KILL") : IRCDMessage(creator, mname, 2) { }
|
||||
|
||||
void Run(MessageSource &source, const std::vector<Anope::string> ¶ms, const Anope::map<Anope::string> &tags) override;
|
||||
};
|
||||
|
||||
struct CoreExport Mode
|
||||
: IRCDMessage
|
||||
{
|
||||
Mode(Module *creator, const Anope::string &mname = "MODE") : IRCDMessage(creator, mname, 2) { SetFlag(FLAG_SOFT_LIMIT); }
|
||||
|
||||
void Run(MessageSource &source, const std::vector<Anope::string> ¶ms, const Anope::map<Anope::string> &tags) override;
|
||||
};
|
||||
|
||||
struct CoreExport MOTD
|
||||
: IRCDMessage
|
||||
{
|
||||
MOTD(Module *creator, const Anope::string &mname = "MOTD") : IRCDMessage(creator, mname, 1) { }
|
||||
|
||||
void Run(MessageSource &source, const std::vector<Anope::string> ¶ms, const Anope::map<Anope::string> &tags) override;
|
||||
};
|
||||
|
||||
struct CoreExport Notice
|
||||
: IRCDMessage
|
||||
{
|
||||
Notice(Module *creator, const Anope::string &mname = "NOTICE") : IRCDMessage(creator, mname, 2) { SetFlag(FLAG_REQUIRE_USER); }
|
||||
|
||||
void Run(MessageSource &source, const std::vector<Anope::string> ¶ms, const Anope::map<Anope::string> &tags) override;
|
||||
};
|
||||
|
||||
struct CoreExport Part
|
||||
: IRCDMessage
|
||||
{
|
||||
Part(Module *creator, const Anope::string &mname = "PART") : IRCDMessage(creator, mname, 1) { SetFlag(FLAG_REQUIRE_USER); SetFlag(FLAG_SOFT_LIMIT); }
|
||||
|
||||
void Run(MessageSource &source, const std::vector<Anope::string> ¶ms, const Anope::map<Anope::string> &tags) override;
|
||||
};
|
||||
|
||||
struct CoreExport Ping
|
||||
: IRCDMessage
|
||||
{
|
||||
Ping(Module *creator, const Anope::string &mname = "PING") : IRCDMessage(creator, mname, 1) { SetFlag(FLAG_SOFT_LIMIT); }
|
||||
|
||||
void Run(MessageSource &source, const std::vector<Anope::string> ¶ms, const Anope::map<Anope::string> &tags) override;
|
||||
};
|
||||
|
||||
struct CoreExport Privmsg
|
||||
: IRCDMessage
|
||||
{
|
||||
Privmsg(Module *creator, const Anope::string &mname = "PRIVMSG") : IRCDMessage(creator, mname, 2) { SetFlag(FLAG_REQUIRE_USER); }
|
||||
|
||||
void Run(MessageSource &source, const std::vector<Anope::string> ¶ms, const Anope::map<Anope::string> &tags) override;
|
||||
};
|
||||
|
||||
struct CoreExport Quit
|
||||
: IRCDMessage
|
||||
{
|
||||
Quit(Module *creator, const Anope::string &mname = "QUIT") : IRCDMessage(creator, mname, 1) { SetFlag(FLAG_REQUIRE_USER); }
|
||||
|
||||
void Run(MessageSource &source, const std::vector<Anope::string> ¶ms, const Anope::map<Anope::string> &tags) override;
|
||||
};
|
||||
|
||||
struct CoreExport SQuit
|
||||
: IRCDMessage
|
||||
{
|
||||
SQuit(Module *creator, const Anope::string &mname = "SQUIT") : IRCDMessage(creator, mname, 2) { }
|
||||
|
||||
void Run(MessageSource &source, const std::vector<Anope::string> ¶ms, const Anope::map<Anope::string> &tags) override;
|
||||
};
|
||||
|
||||
struct CoreExport Stats
|
||||
: IRCDMessage
|
||||
{
|
||||
Stats(Module *creator, const Anope::string &mname = "STATS") : IRCDMessage(creator, mname, 1) { SetFlag(FLAG_REQUIRE_USER); SetFlag(FLAG_SOFT_LIMIT); }
|
||||
|
||||
void Run(MessageSource &source, const std::vector<Anope::string> ¶ms, const Anope::map<Anope::string> &tags) override;
|
||||
};
|
||||
|
||||
struct CoreExport Time
|
||||
: IRCDMessage
|
||||
{
|
||||
Time(Module *creator, const Anope::string &mname = "TIME") : IRCDMessage(creator, mname, 0) { SetFlag(FLAG_SOFT_LIMIT); }
|
||||
|
||||
void Run(MessageSource &source, const std::vector<Anope::string> ¶ms, const Anope::map<Anope::string> &tags) override;
|
||||
};
|
||||
|
||||
struct CoreExport Topic
|
||||
: IRCDMessage
|
||||
{
|
||||
Topic(Module *creator, const Anope::string &mname = "TOPIC") : IRCDMessage(creator, mname, 2) { SetFlag(FLAG_REQUIRE_USER); }
|
||||
|
||||
void Run(MessageSource &source, const std::vector<Anope::string> ¶ms, const Anope::map<Anope::string> &tags) override;
|
||||
};
|
||||
|
||||
struct CoreExport Version
|
||||
: IRCDMessage
|
||||
{
|
||||
Version(Module *creator, const Anope::string &mname = "VERSION") : IRCDMessage(creator, mname, 0) { SetFlag(FLAG_SOFT_LIMIT); }
|
||||
|
||||
void Run(MessageSource &source, const std::vector<Anope::string> ¶ms, const Anope::map<Anope::string> &tags) override;
|
||||
};
|
||||
|
||||
struct CoreExport Whois
|
||||
: IRCDMessage
|
||||
{
|
||||
Whois(Module *creator, const Anope::string &mname = "WHOIS") : IRCDMessage(creator, mname, 1) { SetFlag(FLAG_SOFT_LIMIT); }
|
||||
|
||||
void Run(MessageSource &source, const std::vector<Anope::string> ¶ms, const Anope::map<Anope::string> &tags) override;
|
||||
};
|
||||
|
||||
} // namespace Message
|
||||
/*************************************************************************/
|
||||
|
||||
@@ -1,87 +0,0 @@
|
||||
// Anope IRC Services <https://www.anope.org/>
|
||||
//
|
||||
// Copyright (C) 2003-2026 Anope Contributors
|
||||
//
|
||||
// Anope is free software. You can use, modify, and/or distribute it under the
|
||||
// terms of version 2 of the GNU General Public License. See docs/LICENSE.txt
|
||||
// for the complete terms of this license and docs/AUTHORS.txt for a list of
|
||||
// contributors.
|
||||
//
|
||||
// Based on the original code of Epona by Lara
|
||||
// Based on the original code of Services by Andy Church
|
||||
//
|
||||
// SPDX-License-Identifier: GPL-2.0-only
|
||||
|
||||
#pragma once
|
||||
|
||||
#include <iterator>
|
||||
#include <utility>
|
||||
|
||||
namespace Anope
|
||||
{
|
||||
template <typename Iterator>
|
||||
class iterator_range;
|
||||
|
||||
/** Returns a range containing all elements equivalent to \p value.
|
||||
* @param collection The collection to search within.
|
||||
* @param value The value to search for.
|
||||
*/
|
||||
template <typename Collection, typename Value>
|
||||
auto equal_range(const Collection& collection, const Value& value)
|
||||
{
|
||||
return iterator_range(collection.equal_range(value));
|
||||
}
|
||||
|
||||
/** Returns a range representing a reverse iterator for the specified colleciton.
|
||||
* @param collection The collection to create a reverse iterator for.
|
||||
*/
|
||||
template <typename Collection>
|
||||
auto reverse_range(const Collection& collection)
|
||||
{
|
||||
return iterator_range(collection.rbegin(), collection.rend());
|
||||
}
|
||||
}
|
||||
|
||||
/** Represents a range of iterators. */
|
||||
template <typename Iterator>
|
||||
class Anope::iterator_range final
|
||||
{
|
||||
private:
|
||||
/** An iterator which points to the start of the range. */
|
||||
const Iterator begini;
|
||||
|
||||
/* An iterator which points to one past the end of the range. */
|
||||
const Iterator endi;
|
||||
|
||||
public:
|
||||
/** Initialises a new iterator range with the specified iterators.
|
||||
* @param begin An iterator which points to the start of the range.
|
||||
* @param end An iterator which points to one past the end of the range.
|
||||
*/
|
||||
explicit iterator_range(Iterator begin, Iterator end)
|
||||
: begini(begin)
|
||||
, endi(end)
|
||||
{
|
||||
}
|
||||
|
||||
/** Initialises a new iterator range from a pair of iterators.
|
||||
* @param range A pair of iterators in the format [first, last).
|
||||
*/
|
||||
explicit iterator_range(std::pair<Iterator, Iterator> range)
|
||||
: begini(range.first)
|
||||
, endi(range.second)
|
||||
{
|
||||
}
|
||||
|
||||
/** Determines whether the iterator range is empty. */
|
||||
bool empty() const { return begini == endi; }
|
||||
|
||||
/** Retrieves an iterator which points to the start of the range. */
|
||||
const Iterator& begin() const { return begini; }
|
||||
|
||||
/** Retrieves an iterator which points to one past the end of the range. */
|
||||
const Iterator& end() const { return endi; }
|
||||
|
||||
/** Retrieves the number of hops within the iterator range. */
|
||||
typename std::iterator_traits<Iterator>::difference_type count() const { return std::distance(begini, endi); }
|
||||
};
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user