1
0
mirror of https://github.com/anope/anope.git synced 2026-06-15 04:54:46 +02:00

Compare commits

...

149 Commits

Author SHA1 Message Date
Sadie Powell 258daf6c26 Release 2.1.3. 2024-03-04 10:42:12 +00:00
Sadie Powell 57e8b4305e Update the changelogs. 2024-03-04 10:41:31 +00:00
Sadie Powell db4f845fe7 Add NickAlias::GetVhostMask for getting the vident@vhost. 2024-03-04 10:36:10 +00:00
Sadie Powell d15ac93a8f Clean up some more CMake flags. 2024-02-29 23:50:10 +00:00
Sadie Powell 4e0f94bcce Fix some oversights from previous commits. 2024-02-29 23:18:46 +00:00
Sadie Powell 1c1645096f If a user runs an invalid command try to suggest a valid one. 2024-02-29 21:56:14 +00:00
Sadie Powell e0ac5509b4 Consolidate some header files. 2024-02-29 19:32:44 +00:00
Sadie Powell 190c37a68b Rework some platform compatibility code. 2024-02-29 19:11:37 +00:00
Sadie Powell a67bef2dee Update the changelogs. 2024-02-29 17:15:15 +00:00
Sadie Powell 893bbf9251 Fix some oversights. 2024-02-29 17:15:15 +00:00
Sadie Powell 5441093211 Merge branch '2.0' into 2.1. 2024-02-29 16:32:14 +00:00
Sadie Powell ee7455daa8 Fix a copy/paste error in webcpanel. 2024-02-29 16:27:24 +00:00
Sadie Powell 579af3c442 Rip out ns_access and related code.
This is wildly insecure and has been disabled by default for at
least a decade.
2024-02-29 16:14:15 +00:00
Sadie Powell 25bdcfcbc4 Add names for the numerics used by the core. 2024-02-29 13:07:14 +00:00
Sadie Powell 26919f41d2 If a PRIVMSG or NOTICE is empty then send a single space instead.
Currently a bunch of code does source.Reply(" ") to ensure that an
empty line gets rendered but this is a much better way to handle
this problem.

The code that does this already will be updated in a future commit
to avoid breaking translations in progress.
2024-02-29 12:31:19 +00:00
Sadie Powell 5f735b2570 Fix matching extbans on InspIRCd and implement missing matchers. 2024-02-27 20:33:43 +00:00
Sadie Powell 9c80f9e34e Replace OnChannelUnban with an IRCDProto function.
This was added for (and is only used for) for unbanning users on
UnrealIRCd which is an IRCd protocol function so it should be in
IRCDProto.
2024-02-27 13:40:47 +00:00
Sadie Powell b5b3c74477 Make functions that don't use this static. 2024-02-27 10:48:55 +00:00
Sadie Powell 73d4ac6de0 Remove redundant uses of const. 2024-02-27 10:34:27 +00:00
Sadie Powell 7640fad30c Simplify several boolean expressions. 2024-02-27 10:19:44 +00:00
Sadie Powell 9f6d378755 Fix write_pidfile on Windows.
Microsoft's documentation lies again.
2024-02-27 10:19:36 +00:00
Sadie Powell 642e68f53a Fix sending numerics on InspIRCd. 2024-02-26 23:57:55 +00:00
Sadie Powell eb658f87a3 Use fstream for accessing files where possible. 2024-02-26 23:57:55 +00:00
Sadie Powell 1e87849e5c Rework IRCDMessage/IRCDMessageFlag. 2024-02-26 23:56:07 +00:00
Sadie Powell 5fa4acb195 Refactor User::IsServicesOper. 2024-02-26 22:00:21 +00:00
Sadie Powell 79f215606d Allow using more than one fingerprint in an oper block.
Closes #362.
2024-02-26 21:55:59 +00:00
Sadie Powell 2fd4b45f81 Deduplicate InspIRCd CAPAB parsing. 2024-02-26 19:26:21 +00:00
Sadie Powell d3b4a4bd05 Update translator names. 2024-02-26 18:56:11 +00:00
Sadie Powell d914febbec Fix a typo in UnrealIRCd's SendGlobops. 2024-02-26 17:23:15 +00:00
Sadie Powell 2962a0be8c Fix bs_kick not using the correct kick message for automatic kicks.
Closes #354.
2024-02-26 16:45:28 +00:00
Sadie Powell 6be4df3b39 Remove several string format IRCDProto function overloads. 2024-02-26 16:45:28 +00:00
Sadie Powell 4789751e50 Fix a missing override keyword. 2024-02-26 16:45:28 +00:00
Sadie Powell 57674f5869 Replace IRCDProto::CanSendTags with IsTagValid.
Not every IRC server accepts arbitrary tags so this is a better
way to handle tag filtering.
2024-02-26 15:50:35 +00:00
Sadie Powell c6cb4ba159 Fix some coding style issues. 2024-02-26 15:34:17 +00:00
Sadie Powell e341cac8d6 Implement support for the IRCv3 +draft/channel-context tag.
Closes #358.
2024-02-26 15:34:17 +00:00
Sadie Powell 83dd96b9f2 Extract should privmsg logic to its own function. 2024-02-26 14:41:50 +00:00
Sadie Powell cabaa079df Kill checks for obsolete versions of Windows.
Because of the required system functionality Anope will not build
or run on these systems anyway.
2024-02-25 23:56:46 +00:00
Sadie Powell 273e7f249c Remove duplicate suffix from socketengine file names. 2024-02-25 23:54:12 +00:00
Sadie Powell 8c9ca23900 Remove a function which exists for compat with old versions of VS. 2024-02-25 23:49:07 +00:00
Sadie Powell 8e3da86283 Remove a reference to 1.8. 2024-02-25 23:42:14 +00:00
Sadie Powell 97b65b2255 Use unique_ptr for managing std::thread ownership. 2024-02-25 21:54:40 +00:00
Sadie Powell b26f198489 Fix formatting messages on ngircd. 2024-02-22 19:54:09 +00:00
Sadie Powell a99a00d7c5 Fix sending the ngircd PASS handler. 2024-02-22 19:07:11 +00:00
Sadie Powell 283137841f Refactor the InspIRCd module static variables and method. 2024-02-22 17:47:14 +00:00
Sadie Powell 3290ebd36a GetMaxListFor: use size_t and add a default like the other fields. 2024-02-22 17:25:47 +00:00
Sadie Powell c4e9c0bf85 If the IRCd sends a field limit then use it over that of the config. 2024-02-22 17:05:30 +00:00
Sadie Powell 84ad85ee85 Fix a bug in the unrealircd protocol module. 2024-02-22 15:58:23 +00:00
Sadie Powell 9789c3bd8c Deduplicate User::SendMessage. 2024-02-22 14:14:23 +00:00
Sadie Powell a75afb597b Add the IRCv3 reply tag to messages sent as responses to a user. 2024-02-22 13:23:18 +00:00
Sadie Powell f93d9e7698 Store the source message identifier in CommandSource. 2024-02-22 13:19:36 +00:00
Sadie Powell 7423fa9998 Route message tags into more message functions. 2024-02-22 13:03:53 +00:00
Sadie Powell 7cba665270 Fix some oversights in commit 82fa7e1467. 2024-02-22 11:18:05 +00:00
Sadie Powell 9502567453 Fix the NickServ help message showing a wrong min password length.
Closes #357.
2024-02-22 11:01:41 +00:00
Sadie Powell 14472c5a95 Increase minpasslen and maxpasslen slightly. 2024-02-22 10:46:30 +00:00
Sadie Powell d4f4bcf23c Remove UplinkSocket::Message now nothing uses it. 2024-02-22 00:14:08 +00:00
Sadie Powell 82fa7e1467 Convert protocol modules over to Uplink::Send. 2024-02-22 00:14:08 +00:00
Sadie Powell aefbb4fbda Rework SendModeInternal to be usable with Uplink::Send. 2024-02-22 00:14:08 +00:00
Sadie Powell 9b77fdf5b6 Rework SendNumericInternal to be usable with Uplink::Send. 2024-02-22 00:14:08 +00:00
Sadie Powell 7a6979c814 Convert most core protocol handlers to use Uplink::Send. 2024-02-22 00:14:08 +00:00
Sadie Powell c4ab550ec7 Add Uplink::Send, rework message formatting.
This is the new way of sending messages to the uplink inspired by
the work done in the old git master. This will allow us to do new
things involving tags in the future.
2024-02-22 00:14:08 +00:00
Sadie Powell 3ecf6b495b Document IRCDProto::Parse. 2024-02-22 00:14:08 +00:00
Sadie Powell 8475697e3b Inline, constify, and document GetProtocolName. 2024-02-22 00:14:08 +00:00
Sadie Powell 85687781d1 Include tags in OnMessage. 2024-02-22 00:14:08 +00:00
TehPeGaSuS ccfaca32a2 Fix a typo in cs_drop. 2024-02-21 23:09:09 +00:00
Sadie Powell 07373c8cf2 Move IRCDProto member initializers to the header. 2024-02-21 13:55:48 +00:00
Sadie Powell 89594d4557 Add a method to the ns_cert API for replacing a certificate.
This will be used for upgrading certificate fingerprints when the
InspIRCd 1206 protocol support is added.
2024-02-21 13:30:16 +00:00
Sadie Powell b478a1cb53 Make ModuleManager::SetPriority more readable. 2024-02-20 18:38:52 +00:00
Sadie Powell 1fb77e414d Increase the size of the random codes in ns_register and ns_set. 2024-02-19 22:31:07 +00:00
Sadie Powell 22fe5bb724 Require users to use a confirmation code when dropping channels. 2024-02-19 22:20:36 +00:00
Robert Scheck 909b9b2679 Remove a leftover use of the m_ module prefix. 2024-02-17 21:34:03 +00:00
Sadie Powell 49ea709027 Merge branch '2.0' into 2.1. 2024-02-17 20:50:31 +00:00
Sadie Powell 4ea2bc5e46 Mark as 2.0.16-git. 2024-02-17 20:08:10 +00:00
Sadie Powell eabc8b641e Release 2.0.15. 2024-02-17 20:07:09 +00:00
Sadie Powell 2f1ed186d1 Update the change log. 2024-02-17 20:06:08 +00:00
Sadie Powell 4cc68397dc Update the copyright headers for 2024. 2024-02-17 19:58:17 +00:00
Sadie Powell 2b7872139c Prevent resetting the password of suspended accounts.
Closes #351.
2024-02-17 19:52:39 +00:00
TehPeGaSuS e47ad6ed3f Fix some typos in the config change log. 2024-02-17 18:59:17 +00:00
Sadie Powell f3b14694c6 Bump for 2.1.3-git. 2024-02-17 18:15:38 +00:00
Sadie Powell e9424b529c Release 2.1.2. 2024-02-17 18:14:10 +00:00
Sadie Powell a60c796cf6 Update the config changelog. 2024-02-17 18:13:30 +00:00
Sadie Powell fcf16ab20a Merge branch '2.0' into 2.1. 2024-02-11 21:35:31 +00:00
Sadie Powell 8e3be20387 Update the Windows dependencies. 2024-02-11 21:34:00 +00:00
Sadie Powell 689dd44d3b Add a GitHub security policy. 2024-02-11 21:32:23 +00:00
Sadie Powell a25d0aa60e Update the changelog. 2024-02-11 21:14:59 +00:00
Sadie Powell c50d1dc2b5 Remove some outdated development docs. 2024-02-11 21:08:17 +00:00
Sadie Powell 274bb19d03 Switch Thread to use the C++11 equivalent, remove win32/pthread. 2024-02-11 20:35:21 +00:00
Sadie Powell 2c5b84bd1d Replace Condition and Mutex with the C++11 standard equivalents. 2024-02-11 19:53:05 +00:00
Sadie Powell 5c50bcb9c7 Remove the time_t parameter from Tick and TickTimers.
Most uses of Tick do not use the parameter and even when it is used
it is always the same as CurTime.
2024-02-11 18:18:18 +00:00
Sadie Powell cef56abea4 Consistently use time_t for the timer duration. 2024-02-11 18:10:38 +00:00
Sadie Powell 30b9f12711 Remove the now parameter from the Timer class.
This was never actually changed from the default.
2024-02-11 17:56:35 +00:00
Sadie Powell c9e0245f23 Revert "Document ns_no_expire nick default".
This reverts commit 9c9df2ad1f.

Closes #350.
2024-02-11 16:22:01 +00:00
Robby 5337326cc9 Update the dutch language file. 2024-01-31 06:17:01 +01:00
Robby 73d8c85879 Update the dutch language file. 2024-01-31 06:17:00 +01:00
Robby 6237245ab7 Remove an extraneous space in cs_xop, part 2. 2024-01-31 03:20:35 +01:00
Robby 7ae20c2a6d Remove an extraneous space in cs_xop. 2024-01-31 03:08:54 +01:00
Robby ae1829e5a8 Fix a typo in the PASSWORD_TOO_SHORT text string. 2024-01-30 19:15:19 +01:00
Sadie Powell 026661c9a2 Fix irc2sql and webcpanel not being put into the modules folder. 2024-01-30 14:53:08 +00:00
Sadie Powell ec7223ace2 Convert map/multimap/hash_map to an alias template. 2024-01-30 14:29:17 +00:00
Sadie Powell 1f31621bbf Remove various references to old versions. 2024-01-30 14:01:07 +00:00
Sadie Powell dfd41b9b94 Fix Clang and GCC disagreeing about whether a move is needed. 2024-01-24 16:12:29 +00:00
Sadie Powell fdd4aade3b Add a CI workflow for Alpine. 2024-01-24 15:14:21 +00:00
Sadie Powell 0a53f4c26e Merge branch '2.0' into 2.1. 2024-01-24 14:48:53 +00:00
Sadie Powell d6a826a09c Backport CI changes from the 2.1 branch. 2024-01-24 14:45:57 +00:00
Sadie Powell 484160eb4e Shuffle modules around a bit. 2024-01-24 12:34:34 +00:00
Sadie Powell 7ac1fe5847 Rename several modules to remove the m_ prefix. 2024-01-24 12:22:51 +00:00
Sadie Powell 72acef4e15 Mark types that have no inheritors as final. 2024-01-23 16:53:06 +00:00
Sadie Powell a6a0f6c447 Improve the layout of types that inherit from another type. 2024-01-23 15:28:23 +00:00
Sadie Powell 398d674cf4 Fix some CoreExport types that should be DllExport. 2024-01-23 14:06:46 +00:00
Sadie Powell 1467de1c7e Mark all exception types as CoreExport.
From the GCC docs:

>Exception catching of a user defined type in a binary other than
>the one which threw the exception requires a typeinfo lookup.

Closes #335.
2024-01-22 20:06:57 +00:00
Sadie Powell c5023fdfa0 Update the Turkish translation for the changes in 2.1 git.
Co-authored-by: CaPa CuL <capacul@gmail.com>
2024-01-22 19:52:06 +00:00
Sadie Powell 97782248af Merge branch '2.0' into 2.1. 2024-01-22 18:35:12 +00:00
Sadie Powell 016761776b Add a new Turkish translation contributed by CaPa CuL.
Co-authored-by: CaPa CuL <capacul@gmail.com>
2024-01-22 16:29:20 +00:00
Victor Coss c2450eabab Fix typo 2024-01-22 00:38:23 +00:00
Sadie Powell d6ced86021 Fix some module names that were missed in commit 4056af00e3. 2024-01-11 17:13:14 +00:00
Sadie Powell 0d8d1675f7 Fix an oversight in build_subdir. 2024-01-10 17:49:02 +00:00
Sadie Powell 4056af00e3 Parse InspIRCd module names in a way which is 1206 compatible. 2024-01-10 17:47:27 +00:00
Sadie Powell 99b4305573 Add a wrapper for std::string::compare to Anope::string. 2024-01-10 17:07:17 +00:00
Sadie Powell 113301dbba Update the changelogs. 2024-01-09 21:25:44 +00:00
Sadie Powell 349ae043b6 Always build the stats modules.
These have no external dependencies so it makes no sense to not
always build them.
2024-01-09 21:25:44 +00:00
Sadie Powell 710e7dd3a2 Bump the minimum OpenSSL version to 1.1. 2024-01-09 21:25:44 +00:00
Sadie Powell 1e9c6d7931 Always disable SSLv3 support, allow disabling TLSv1.[012]. 2024-01-09 21:25:44 +00:00
Sadie Powell 5772b924cc Drop support for ancient versions of GnuTLS. 2024-01-09 21:25:44 +00:00
Sadie Powell fce5f4cc0f Update the default SSL filenames to use the Certbot names. 2024-01-09 21:25:44 +00:00
Sadie Powell fa7ad6b3df Use native file extensions on macOS and Windows. 2024-01-09 14:35:49 +00:00
Sadie Powell fc2df00cfc Put modules into their own folder on Windows. 2024-01-09 13:57:32 +00:00
Sadie Powell f92c5471c2 Add a string overload of Channel::Kick. 2024-01-08 14:37:50 +00:00
Sadie Powell 0439e3b21b Add a string overload of User::SetModes. 2024-01-08 14:14:57 +00:00
Sadie Powell 5b23fae8bf Add a string overload of Channel::SetModes. 2024-01-08 14:14:37 +00:00
Sadie Powell aac4b0f0a3 Bump the up to date languages for the recent format changes. 2024-01-08 13:47:39 +00:00
Sadie Powell f083795c79 Fix various format string issues. 2024-01-08 13:11:50 +00:00
Sadie Powell 5db79c1e24 Add a non-formatting overload of User::SetModesInternal. 2024-01-08 13:11:50 +00:00
Sadie Powell a4dddfd5f1 Mark format strings with the GNU printf attribute. 2024-01-08 13:11:50 +00:00
Valentin Lorentz 7ddc865cde fr_FR: Generalize gender-neutral grammar
'(e)' and 'le/la' were used in a few places, I generalized them to all
strings referring to people.

I also made role names gender-neutral using contraction (eg. "fondateur"
-> "fondateurice"), and adapted specifiers accordingly.
2024-01-06 23:22:10 +00:00
Sadie Powell 688ecf1c1d Fix an oversight in the mysql module. 2024-01-06 23:19:18 +00:00
Sadie Powell c0453cfec1 Fix a sign conversion issue in the mysql module. 2024-01-06 13:39:03 +00:00
Sadie Powell a9ab0c72a6 Use auto in places where the type is unambiguous. 2024-01-06 13:23:37 +00:00
Robert Scheck de918ef9cf Add missing whitespace in multi-line comment 2024-01-06 12:41:31 +00:00
Sadie Powell 0ee9874112 Update translations for the recent services case fix. 2024-01-05 21:44:08 +00:00
Val Lorentz 388858aee6 Fix inconsistent capitalization of 'services'. 2024-01-05 21:34:26 +00:00
Sadie Powell f22703df59 Fix a translation string and enable translations on CI. 2024-01-05 21:28:54 +00:00
Val Lorentz 4715b76dbe fr_FR: msgmerge + update fuzzy strings. 2024-01-05 21:21:43 +00:00
Sadie Powell 50bd385ccf Add an alias for chanserv/status for the name used by Atheme.
Closes #336.
2024-01-05 21:21:17 +00:00
Sadie Powell e738da9b11 Merge branch '2.0' into 2.1. 2024-01-05 19:52:56 +00:00
Val Lorentz 6e6e053384 fr_FR: Update fuzzy strings 2024-01-05 19:49:56 +00:00
Valentin Lorentz 5edf19d230 fr_FR: Fix trailing spaces 2024-01-05 19:00:19 +00:00
Sadie Powell 4573e1925d Use normal exit codes when exiting the process. 2024-01-05 12:00:28 +00:00
Sadie Powell a40f8e0b9d Update the copyright headers for 2024. 2024-01-04 22:25:48 +00:00
Sadie Powell 9db49ec790 Bump for 2.1.2-git. 2024-01-04 17:55:44 +00:00
Sadie Powell eb2aaf22ed Fix a copy/paste error in the default channel settings. 2024-01-01 17:32:37 +00:00
391 changed files with 10214 additions and 12313 deletions
+19
View File
@@ -0,0 +1,19 @@
# 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.anope.org #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.
+58
View File
@@ -0,0 +1,58 @@
name: Alpine CI
on:
pull_request:
push:
schedule:
- cron: '0 0 * * 0'
jobs:
build:
if: "!contains(github.event.head_commit.message, '[skip alpine ci]')"
container: alpine:edge
runs-on: ubuntu-latest
env:
CXX: ${{ matrix.compiler }}
CXXFLAGS: -Werror
steps:
- uses: actions/checkout@v4
- name: Install dependencies
run: |
echo "http://dl-cdn.alpinelinux.org/alpine/edge/testing" >> /etc/apk/repositories
apk update
apk add \
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 ldap ldap_authentication ldap_oper mysql regex_pcre2 regex_posix regex_tre sql_authentication sql_log sql_oper sqlite ssl_gnutls ssl_openssl
do
ln -s $PWD/modules/extra/$MODULE.cpp $PWD/modules
done
- name: Run CMake
run: |
mkdir build && cd build
cmake -GNinja -DCMAKE_BUILD_TYPE:STRING=DEBUG -DINSTDIR:STRING=$(readlink -f ../run) ..
- name: Build Anope
run: |
ninja -C build install
strategy:
fail-fast: false
matrix:
compiler:
- clang++
- g++
+10 -3
View File
@@ -1,21 +1,24 @@
name: Linux CI
name: Ubuntu CI
on:
- pull_request
- push
jobs:
build:
if: "!contains(github.event.head_commit.message, '[skip ubuntu ci]')"
runs-on: ubuntu-20.04
env:
CXX: ${{ matrix.compiler }}
CXXFLAGS: -Werror
steps:
- uses: actions/checkout@v4
- name: Install dependencies
run: |
sudo apt-get update --assume-yes
sudo apt-get install --assume-yes --no-install-recommends \
clang \
g++ \
gettext \
git \
libgnutls28-dev \
libldap2-dev \
@@ -25,19 +28,23 @@ jobs:
libssl-dev \
libtre-dev \
ninja-build
- name: Enable extras
run: |
for MODULE in m_ldap.cpp m_ldap_authentication.cpp m_ldap_oper.cpp m_mysql.cpp m_regex_pcre2.cpp m_regex_posix.cpp m_regex_tre.cpp m_sql_authentication.cpp m_sql_log.cpp m_sql_oper.cpp m_sqlite.cpp m_ssl_gnutls.cpp m_ssl_openssl.cpp stats
for MODULE in ldap ldap_authentication ldap_oper mysql regex_pcre2 regex_posix regex_tre sql_authentication sql_log sql_oper sqlite ssl_gnutls ssl_openssl
do
ln -s ${{ github.workspace }}/modules/extra/$MODULE ${{ github.workspace }}/modules
ln -s ${{ github.workspace }}/modules/extra/$MODULE.cpp ${{ github.workspace }}/modules
done
- name: Run CMake
run: |
mkdir build && cd build
cmake -GNinja -DCMAKE_BUILD_TYPE:STRING=DEBUG -DINSTDIR:STRING=${{ github.workspace }}/run ..
- name: Build Anope
run: |
ninja -C ${{ github.workspace }}/build install
strategy:
fail-fast: false
matrix:
+1
View File
@@ -6,6 +6,7 @@ on:
- cron: '0 0 * * 0'
jobs:
build:
if: "!contains(github.event.head_commit.message, '[skip windows ci]')"
runs-on: windows-2019
steps:
- uses: actions/checkout@v3
+13 -14
View File
@@ -1,20 +1,19 @@
build/
config.cache
include/sysconf.h
modules/m_ldap.cpp
modules/m_ldap_authentication.cpp
modules/m_ldap_oper.cpp
modules/m_mysql.cpp
modules/m_regex_pcre.cpp
modules/m_regex_pcre2.cpp
modules/m_regex_posix.cpp
modules/m_regex_tre.cpp
modules/m_sql_authentication.cpp
modules/m_sql_log.cpp
modules/m_sql_oper.cpp
modules/m_sqlite.cpp
modules/m_ssl_gnutls.cpp
modules/m_ssl_openssl.cpp
modules/ldap.cpp
modules/ldap_authentication.cpp
modules/ldap_oper.cpp
modules/mysql.cpp
modules/regex_pcre2.cpp
modules/regex_posix.cpp
modules/regex_tre.cpp
modules/sql_authentication.cpp
modules/sql_log.cpp
modules/sql_oper.cpp
modules/sqlite.cpp
modules/ssl_gnutls.cpp
modules/ssl_openssl.cpp
modules/stats
run/
*.mo
+11 -25
View File
@@ -22,6 +22,9 @@ 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 we are using a GNU compiler (have to use CXX because it seems to fail on C), we will be able to determine it's default paths for libraries and includes
if(CMAKE_COMPILER_IS_GNUCXX OR "${CMAKE_CXX_COMPILER_ID}" MATCHES "Clang$")
# First look for the compiler's default library directories
@@ -167,12 +170,12 @@ if(MSVC)
string(REPLACE "/GX " "" CMAKE_CXX_FLAGS ${CMAKE_CXX_FLAGS})
string(REPLACE "/W3 " "" CMAKE_CXX_FLAGS ${CMAKE_CXX_FLAGS})
# Set the compile flags to have warnings on the max setting (but disable a few annoying ones), exception handling turned on, the proper defines
set(CXXFLAGS "${CXXFLAGS} /W4 /wd4100 /wd4127 /wd4250 /wd4251 /wd4355 /wd4706 /wd4800 /wd4996 /EHs")
set(CXXFLAGS "${CXXFLAGS} /W4 /wd4100 /wd4127 /wd4250 /wd4251 /wd4267 /wd4275 /wd4355 /wd4706 /wd4800 /wd4996 /EHs")
add_definitions(-D_CRT_SECURE_NO_WARNINGS)
# Otherwise, we're not using Visual Studio
else()
# Set the compile flags to have all warnings on (including shadowed variables)
set(CXXFLAGS "${CXXFLAGS} -fvisibility=hidden -fvisibility-inlines-hidden -Wall -Wextra -Wpedantic -Wno-unused-parameter ${CMAKE_CXX_FLAGS}")
set(CXXFLAGS "${CXXFLAGS} -fvisibility=hidden -fvisibility-inlines-hidden -Wall -Wextra -Wformat=2 -Wmissing-format-attribute -Wpedantic -Wno-format-nonliteral -Wno-format-zero-length -Wno-unused-parameter ${CMAKE_CXX_FLAGS}")
endif()
# If CMake has found that the given system requires a special library for dl* calls, include it with the linker flags
@@ -180,6 +183,12 @@ if(CMAKE_DL_LIBS)
list(APPEND LINK_LIBS ${CMAKE_DL_LIBS})
endif()
# Find the linker flags required for using threads.
find_package("Threads" REQUIRED)
if(CMAKE_THREAD_LIBS_INIT)
list(APPEND LINK_LIBS ${CMAKE_THREAD_LIBS_INIT})
endif()
# Under MinGW, the -shared flag isn't properly set in the module-specific linker flags, add it from the C flags for shared libraries
if(MINGW)
set(CMAKE_MODULE_LINKER_FLAGS "${CMAKE_MODULE_LINKER_FLAGS} ${CMAKE_SHARED_LIBRARY_CREATE_C_FLAGS}")
@@ -197,29 +206,6 @@ if(NOT MSVC)
if(HAVE_PIPE_FLAG)
set(CXXFLAGS "${CXXFLAGS} -pipe")
endif()
# The following are additional library checks, they are not required for Windows
if(NOT WIN32)
# Check if socket is within the socket library (if the library exists), and add it to the linker flags if needed
check_library_exists(socket socket "" HAVE_SOCKET_LIB)
if(HAVE_SOCKET_LIB)
list(APPEND LINK_LIBS socket)
endif()
# Check if inet_addr is within the nsl library (if the library exists), and add it to the linker flags if needed
check_library_exists(nsl inet_addr "" HAVE_NSL_LIB)
if(HAVE_NSL_LIB)
list(APPEND LINK_LIBS nsl)
endif()
# Check if pthread_create is within the pthread library (if the library exists), and add it to the linker flags if needed
check_library_exists(pthread pthread_create "" HAVE_PTHREAD)
if(HAVE_PTHREAD)
if(NOT APPLE)
set(LDFLAGS "${LDFLAGS} -pthread")
endif()
else()
message(FATAL_ERROR "The pthread library is required to build Anope")
endif()
endif()
endif()
# If DEFUMASK wasn't passed to CMake, set a default depending on if RUNGROUP was passed in or not
+1 -1
View File
@@ -2,7 +2,7 @@
#
# Configuration script for Anope.
#
# Anope (C) 2003-2023 Anope Team
# Anope (C) 2003-2024 Anope Team
# Contact us at team@anope.org
#
# This program is free but copyrighted software; see the file COPYING for
+24 -18
View File
@@ -302,30 +302,31 @@ networkinfo
/*
* Set this to the maximum allowed nick length on your network.
* Be sure to set this correctly, as setting this wrong can result in
* Anope being disconnected from the network.
* Anope being disconnected from the network. Defaults to 31.
*/
nicklen = 31
#nicklen = 31
/* Set this to the maximum allowed ident length on your network.
* Be sure to set this correctly, as setting this wrong can result in
* Anope being disconnected from the network.
* Anope being disconnected from the network. Defaults to 10.
*/
userlen = 10
#userlen = 10
/* Set this to the maximum allowed hostname length on your network.
* Be sure to set this correctly, as setting this wrong can result in
* Anope being disconnected from the network.
* Anope being disconnected from the network. Defaults to 64.
*/
hostlen = 64
#hostlen = 64
/* Set this to the maximum allowed channel length on your network.
* Defaults to 32.
*/
chanlen = 32
#chanlen = 32
/* The maximum number of list modes settable on a channel (such as b, e, I).
* Comment out or set to 0 to disable.
* Set to 0 to disable. Defaults to 100.
*/
modelistsize = 100
#modelistsize = 100
/*
* Characters allowed in nicknames. This always includes the characters described
@@ -522,6 +523,12 @@ options
*/
hideregisteredcommands = yes
/*
* If set, the maximum difference between an invalid and valid command name to allow
* as a suggestion. Defaults to 4.
*/
didyoumeandifference = 4
/* The regex engine to use, as provided by the regex modules.
* Leave commented to disable regex matching.
*
@@ -748,7 +755,6 @@ log
* You may define groups of commands and privileges, as well as who may use them.
*
* This block is recommended, as without it you will be unable to access most oper commands.
* It replaces the old ServicesRoot directive amongst others.
*
* The command names below are defaults and are configured in the *serv.conf's. If you configure
* additional commands with permissions, such as commands from third party modules, the permissions
@@ -766,9 +772,9 @@ log
* memoserv/info - Can see any information with /MEMOSERV INFO
* memoserv/set-limit - Can set the limit of max stored memos on any user and channel
* memoserv/no-limit - Can send memos through limits and throttles
* nickserv/access - Can modify other users access and certificate lists
* nickserv/alist - Can see the channel access list of other users
* nickserv/auspex - Can see any information with /NICKSERV INFO
* nickserv/cert - Can modify other users certificate lists
* nickserv/confirm - Can confirm other users nicknames
* nickserv/drop - Can drop other users nicks
* nickserv/recover - Can recover other users nicks
@@ -789,10 +795,10 @@ log
*
* nickserv/getemail nickserv/suspend nickserv/ajoin nickserv/list
*
* nickserv/saset/autoop nickserv/saset/email nickserv/saset/greet nickserv/saset/password
* nickserv/saset/display nickserv/saset/kill nickserv/saset/language nickserv/saset/message
* nickserv/saset/private nickserv/saset/secure nickserv/saset/url nickserv/saset/noexpire
* nickserv/saset/keepmodes nickserv/saset/neverop
* nickserv/saset/autoop nickserv/saset/display nickserv/saset/email nickserv/saset/greet
* nickserv/saset/kill nickserv/saset/keepmodes nickserv/saset/language nickserv/saset/message
* nickserv/saset/neverop nickserv/saset/noexpire nickserv/saset/password nickserv/saset/private
* nickserv/saset/url
*
* hostserv/set hostserv/del hostserv/list
*
@@ -1199,7 +1205,7 @@ module
* db_redis.
*
* This module allows using Redis (https://redis.io/) as a database backend.
* This module requires that m_redis is loaded and configured properly.
* This module requires that redis is loaded and configured properly.
*
* Redis 2.8 supports keyspace notifications which allows Redis to push notifications
* to Anope about outside modifications to the database. This module supports this and
@@ -1211,7 +1217,7 @@ module
name = "db_redis"
/*
* Redis database to use. This must be configured with m_redis.
* Redis database to use. This must be configured with redis.
*/
engine = "redis/main"
}
@@ -1225,7 +1231,7 @@ module
*
* Without any encryption modules loaded users will not be able to authenticate unless
* there is another module loaded that provides authentication checking, such as
* m_ldap_authentication or m_sql_authentication.
* ldap_authentication or sql_authentication.
*
* With enc_none, passwords will be stored in plain text, allowing for passwords
* to be recovered later but it isn't secure and therefore is not recommended.
+1 -1
View File
@@ -249,7 +249,7 @@ command { service = "BotServ"; name = "INFO"; command = "botserv/info"; }
* botserv/kick/italics - Configures BotServ's italics kicker.
* botserv/kick/repeat - Configures BotServ's repeat kicker.
* botserv/kick/reverses - Configures BotServ's reverse kicker.
* botserv/kick/underlines - Configures BotServ's reverse kicker.
* botserv/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.
*
+4 -5
View File
@@ -76,8 +76,6 @@ module
* access level or superior
* - cs_private: Hide the channel from ChanServ's LIST command
* - restricted: Kick/ban users who are restricted from the channel
* - cs_secure: Enable channel security, requiring the user to be identified with NickServ in
* order to be considered for being on the access list of the channel
* - secureops: Only allow operator status to be given if the user is on the access list
* - securefounder: Only allow the real founder of the channel to drop the channel, change its
* password, or change the founder or successor
@@ -93,10 +91,10 @@ module
* to be a registered nick, otherwise the channel will be dropped.
* - none: No defaults
*
* This directive is optional, if left blank, the options will default to keeptopic, cs_secure, securefounder,
* and signkick. If you really want no defaults, use "none" by itself as the option.
* This directive is optional, if left blank, the options will default to keeptopic, peace,
* securefounder, and signkick. If you really want no defaults, use "none" by itself as the option.
*/
defaults = "keeptopic peace cs_secure securefounder signkick"
defaults = "keeptopic peace securefounder signkick"
/*
* The maximum number of channels which may be registered to a single nickname.
@@ -1261,6 +1259,7 @@ command { service = "ChanServ"; name = "SET EMAIL"; command = "chanserv/set/misc
*/
module { name = "cs_status" }
command { service = "ChanServ"; name = "STATUS"; command = "chanserv/status"; }
command { service = "ChanServ"; name = "WHY"; command = "chanserv/status"; hide = true; }
/*
* cs_suspend
+1 -1
View File
@@ -5,7 +5,7 @@
module
{
name = "m_chanstats"
name = "chanstats"
/*
* The name of this engine.
+77 -76
View File
@@ -19,14 +19,14 @@
module { name = "help" }
/*
* m_dns
* dns
*
* Adds support for the DNS protocol. By itself this module does nothing useful,
* but other modules such as m_dnsbl and os_dns require this.
* but other modules such as dnsbl and os_dns require this.
*/
#module
{
name = "m_dns"
name = "dns"
/*
* The nameserver to use for resolving hostnames, must be an IP or a resolver configuration file.
@@ -80,7 +80,7 @@ module { name = "help" }
}
/*
* m_dnsbl
* 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
@@ -88,7 +88,7 @@ module { name = "help" }
*/
#module
{
name = "m_dnsbl"
name = "dnsbl"
/*
* If set, Anope will check clients against the DNSBLs when services connect to its uplink.
@@ -179,19 +179,19 @@ module { name = "help" }
}
/*
* m_helpchan
* helpchan
*
* Gives users who are op in the specified help channel usermode +h (helpop).
*/
#module
{
name = "m_helpchan"
name = "helpchan"
helpchannel = "#help"
}
/*
* m_httpd
* httpd
*
* Allows services to serve web pages. By itself, this module does nothing useful.
*
@@ -200,7 +200,7 @@ module { name = "help" }
*/
#module
{
name = "m_httpd"
name = "httpd"
httpd
{
@@ -233,13 +233,13 @@ module { name = "help" }
}
/*
* m_ldap [EXTRA]
* ldap [EXTRA]
*
* This module allows other modules to use LDAP. By itself, this module does nothing useful.
*/
#module
{
name = "m_ldap"
name = "ldap"
ldap
{
@@ -254,14 +254,14 @@ module { name = "help" }
}
/*
* m_ldap_authentication [EXTRA]
* ldap_authentication [EXTRA]
*
* This module allows many commands such as IDENTIFY, RELEASE, RECOVER, GHOST, etc. use
* LDAP to authenticate users. Requires m_ldap.
* LDAP to authenticate users. Requires ldap.
*/
#module
{
name = "m_ldap_authentication"
name = "ldap_authentication"
/*
* The distinguished name used for searching for users's accounts.
@@ -314,16 +314,16 @@ module { name = "help" }
}
/*
* m_ldap_oper [EXTRA]
* ldap_oper [EXTRA]
*
* This module dynamically ties users to Anope opertypes when they identify
* via LDAP group membership. Requires m_ldap.
* via LDAP group membership. Requires ldap.
*
* Note that this doesn't give the user privileges on the IRCd, only in Anope.
*/
#module
{
name = "m_ldap_oper"
name = "ldap_oper"
/*
* An optional binddn to use when searching for groups.
@@ -355,13 +355,13 @@ module { name = "help" }
}
/*
* m_mysql [EXTRA]
* mysql [EXTRA]
*
* This module allows other modules to use MySQL.
*/
#module
{
name = "m_mysql"
name = "mysql"
mysql
{
@@ -376,13 +376,13 @@ module { name = "help" }
}
/*
* m_redis
* redis
*
* This module allows other modules to use Redis.
*/
#module
{
name = "m_redis"
name = "redis"
/* A redis database */
redis
@@ -401,29 +401,29 @@ module { name = "help" }
}
/*
* m_regex_pcre2 [EXTRA]
* regex_pcre2 [EXTRA]
*
* Provides the regex engine regex/pcre, which uses version 2 of the Perl Compatible Regular
* Expressions library.
*/
#module { name = "m_regex_pcre2" }
#module { name = "regex_pcre2" }
/*
* m_regex_posix [EXTRA]
* regex_posix [EXTRA]
*
* Provides the regex engine regex/posix, which uses the POSIX compliant regular expressions.
*/
#module { name = "m_regex_posix" }
#module { name = "regex_posix" }
/*
* m_regex_stdlib
* regex_stdlib
*
* Provides the regex engine regex/stdlib, which uses the regular expression library that is part of
* the C++ standard library.
*/
*/
module
{
name = "m_regex_stdlib"
name = "regex_stdlib"
/*
* The syntax scheme to use. Can be set to awk to use the regular expression grammar used by the
@@ -439,23 +439,23 @@ module
}
/*
* m_regex_tre [EXTRA]
* regex_tre [EXTRA]
*
* Provides the regex engine regex/tre, which uses the TRE regex library.
*/
#module { name = "m_regex_tre" }
#module { name = "regex_tre" }
/*
* m_rewrite
* rewrite
*
* Allows rewriting commands sent to/from clients.
*/
#module { name = "m_rewrite" }
#module { name = "rewrite" }
#command
{
service = "ChanServ"; name = "CLEAR"; command = "rewrite"
/* Enable m_rewrite. */
/* Enable rewrite. */
rewrite = true
/* Source message to match. A $ can be used to match anything. */
@@ -476,7 +476,7 @@ module
}
/*
* m_proxyscan
* 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.
@@ -490,7 +490,7 @@ module
*/
#module
{
name = "m_proxyscan"
name = "proxyscan"
/*
* The target IP services tells the proxy to connect back to. This must be a publicly
@@ -558,38 +558,38 @@ module
}
/*
* m_sasl
* sasl
*
* Some IRCds allow "SASL" authentication to let users identify to services
* during the IRCd user registration process. If this module is loaded, Anope will allow
* authenticating users through this mechanism. Supported mechanisms are:
* PLAIN, EXTERNAL.
*/
module { name = "m_sasl" }
module { name = "sasl" }
/*
* m_ssl_gnutls [EXTRA]
* ssl_gnutls [EXTRA]
*
* 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 m_ssl_gnutls or m_ssl_openssl, but not both.
* You may only load either ssl_gnutls or ssl_openssl, but not both.
*/
#module
{
name = "m_ssl_gnutls"
name = "ssl_gnutls"
/*
* An optional certificate and key for m_ssl_gnutls to give to the uplink.
* An optional certificate and key for ssl_gnutls to give to the uplink.
*
* You can generate your own certificate and key pair by using:
*
* certtool --generate-privkey --bits 2048 --outfile anope.key
* certtool --generate-self-signed --load-privkey anope.key --outfile anope.crt
* certtool --generate-privkey --bits 2048 --outfile privkey.pem
* certtool --generate-self-signed --load-privkey privkey.pem --outfile fullchain.pem
*
*/
cert = "data/anope.crt"
key = "data/anope.key"
cert = "data/fullchain.pem"
key = "data/privkey.pem"
/*
* Diffie-Hellman parameters to use when acting as a server. This is only
@@ -606,49 +606,50 @@ module { name = "m_sasl" }
}
/*
* m_ssl_openssl [EXTRA]
* ssl_openssl [EXTRA]
*
* 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 m_ssl_openssl or m_ssl_gnutls, but not both.
* You may only load either ssl_openssl or ssl_gnutls, but not both.
*
*/
#module
{
name = "m_ssl_openssl"
name = "ssl_openssl"
/*
* An optional certificate and key for m_ssl_openssl to give to the uplink.
* An optional certificate and key for ssl_openssl to give to the uplink.
*
* You can generate your own certificate and key pair by using:
*
* openssl genrsa -out anope.key 2048
* openssl req -new -x509 -key anope.key -out anope.crt -days 1095
* openssl genrsa -out privkey.pem 2048
* openssl req -new -x509 -key privkey.pem -out fullchain.pem -days 1095
*/
cert = "data/anope.crt"
key = "data/anope.key"
cert = "data/fullchain.pem"
key = "data/privkey.pem"
/*
* As of 2014 SSL 3.0 is considered insecure, but it might be enabled
* on some systems by default for compatibility reasons.
* You can use the following option to enable or disable it explicitly.
* Leaving this option not set defaults to the default system behavior.
* 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.
*/
#sslv3 = no
#tlsv10 = no
#tlsv11 = no
#tlsv12 = yes
}
/*
* m_sql_authentication [EXTRA]
* sql_authentication [EXTRA]
*
* This module allows authenticating users against an external SQL database using a custom
* query.
*/
#module
{
name = "m_sql_authentication"
name = "sql_authentication"
/* SQL engine to use. Should be configured elsewhere with m_mysql, m_sqlite, etc. */
/* 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,
@@ -690,7 +691,7 @@ module { name = "m_sasl" }
}
/*
* m_sql_log [EXTRA]
* sql_log [EXTRA]
*
* This module adds an additional target option to log{} blocks
* that allows logging Service's logs to SQL. To log to SQL, add
@@ -707,19 +708,19 @@ module { name = "m_sasl" }
* it if it doesn't exist. This module does not create any indexes (keys)
* on the table and it is recommended you add them yourself as necessary.
*/
#module { name = "m_sql_log" }
#module { name = "sql_log" }
/*
* m_sql_oper [EXTRA]
* sql_oper [EXTRA]
*
* This module allows granting users services operator privileges and possibly IRC Operator
* privileges based on an external SQL database using a custom query.
*/
#module
{
name = "m_sql_oper"
name = "sql_oper"
/* SQL engine to use. Should be configured elsewhere with m_mysql, m_sqlite, etc. */
/* 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.
@@ -736,13 +737,13 @@ module { name = "m_sasl" }
}
/*
* m_sqlite [EXTRA]
* sqlite [EXTRA]
*
* This module allows other modules to use SQLite.
*/
#module
{
name = "m_sqlite"
name = "sqlite"
/* A SQLite database */
sqlite
@@ -762,7 +763,7 @@ module { name = "m_sasl" }
* 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 m_httpd.
* This module requires httpd.
*/
#module
{
@@ -779,23 +780,23 @@ module { name = "m_sasl" }
}
/*
* m_xmlrpc
* xmlrpc
*
* Allows remote applications (websites) to execute queries in real time to retrieve data from Anope.
* By itself this module does nothing, but allows other modules (m_xmlrpc_main) to receive and send XMLRPC queries.
* By itself this module does nothing, but allows other modules (xmlrpc_main) to receive and send XMLRPC queries.
*/
#module
{
name = "m_xmlrpc"
name = "xmlrpc"
/* Web service to use. Requires m_httpd. */
/* Web service to use. Requires httpd. */
server = "httpd/main"
}
/*
* m_xmlrpc_main
* xmlrpc_main
*
* Adds the main XMLRPC core functions.
* Requires m_xmlrpc.
* Requires xmlrpc.
*/
#module { name = "m_xmlrpc_main" }
#module { name = "xmlrpc_main" }
+7 -52
View File
@@ -96,8 +96,6 @@ module
* option and the killprotect option must be specified with this one
* - kill_immed: Kill nick immediately if not identified, this one overrides both the killprotect
* and kill_quick options and the killprotect option must be specified with this one
* - ns_secure: Enable nickname security, requiring the nick's password before any operations
* can be done on it
* - ns_private: Hide the nick from NickServ's LIST command
* - hide_email: Hide the nick's e-mail address from NickServ's INFO command
* - hide_mask: Hide the nick's last or current user@host from NickServ's INFO command
@@ -111,12 +109,11 @@ module
* - msg: Messages will be sent as PRIVMSGs instead of NOTICEs, requires options:useprivmsg
* to be enabled as well
* - ns_keep_modes: Enables keepmodes, which retains user modes across sessions
* - ns_no_expire: Enables no expire. Unconfirmed expire overrules this.
*
* This directive is optional, if left blank, the options will default to ns_secure, memo_signon, and
* 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 = "killprotect ns_secure ns_private hide_email hide_mask memo_signon memo_receive autoop"
defaults = "killprotect ns_private hide_email hide_mask memo_signon memo_receive autoop"
/*
* The minimum length of time between consecutive uses of NickServ's REGISTER command. This
@@ -212,16 +209,16 @@ module
/*
* The minimum length of passwords
*
* This directive is optional. If not set it defaults to 8.
* This directive is optional. If not set it defaults to 10.
*/
minpasslen = 8
minpasslen = 10
/*
* The maximum length of passwords
*
* This directive is optional. If not set it defaults to 32.
* This directive is optional. If not set it defaults to 50.
*/
maxpasslen = 32
maxpasslen = 50
}
/*
@@ -249,33 +246,6 @@ command_group
/* Give it a help command. */
command { service = "NickServ"; name = "HELP"; command = "generic/help"; }
/*
* ns_access
*
* Provides the command nickserv/access.
*
* Used for configuring what hosts have access to your account.
*/
module
{
name = "ns_access"
/*
* The maximum number of entries allowed on a nickname's access list.
* If not set, the default is 32. This number cannot be set to 0.
*/
accessmax = 32
/*
* If set, Anope will add the usermask of registering users to the access list of their
* newly created account. If not set, users will always have to identify to NickServ before
* being recognized, unless they manually add an address to the access list of their account.
* This directive is optional.
*/
addaccessonreg = no
}
command { service = "NickServ"; name = "ACCESS"; command = "nickserv/access"; }
/*
* ns_ajoin
*
@@ -531,10 +501,9 @@ command { service = "NickServ"; name = "RESETPASS"; command = "nickserv/resetpas
* nickserv/set/kill, nickserv/saset/kill - Used for configuring nickname protection.
* nickserv/set/language, nickserv/saset/language - Used for configuring what language services use.
* nickserv/set/message, nickserv/saset/message - Used to configure how services send messages to you.
* nickserv/set/password, nickserv/saset/password - Used for changing a users password.
* nickserv/set/secure, nickserv/saset/secure - Used for configuring whether a user can identify by simply being recognized by nickserv/access.
* nickserv/set/neverop, nickserv/saset/neverop - Used to configure whether a user can be added to access lists
* nickserv/saset/noexpire - Used for configuring noexpire, which prevents nicks from expiring.
* nickserv/set/password, nickserv/saset/password - Used for changing a users password.
*/
module
{
@@ -575,9 +544,6 @@ command { service = "NickServ"; name = "SASET MESSAGE"; command = "nickserv/sase
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 = "SET SECURE"; command = "nickserv/set/secure"; }
command { service = "NickServ"; name = "SASET SECURE"; command = "nickserv/saset/secure"; permission = "nickserv/saset/secure"; }
command { service = "NickServ"; name = "SET NEVEROP"; command = "nickserv/set/neverop"; }
command { service = "NickServ"; name = "SASET NEVEROP"; command = "nickserv/saset/neverop"; permission = "nickserv/saset/neverop"; }
@@ -602,17 +568,6 @@ command { service = "NickServ"; name = "SASET URL"; command = "nickserv/saset/mi
#command { service = "NickServ"; name = "SET MASTODON"; command = "nickserv/set/misc"; misc_description = _("Associate a Mastodon account with your account"); }
#command { service = "NickServ"; name = "SASET MASTODON"; command = "nickserv/saset/misc"; misc_description = _("Associate a Mastodon account with this account"); permission = "nickserv/saset/mastodon"; group = "nickserv/admin"; }
/*
* ns_status
*
* Provides the nickserv/status command.
*
* Used to determine if a user is recognized or identified by services.
*/
module { name = "ns_status" }
command { service = "NickServ"; name = "STATUS"; command = "nickserv/status"; }
/*
* ns_suspend
*
+1 -1
View File
@@ -267,7 +267,7 @@ command { service = "OperServ"; name = "CHANKILL"; command = "operserv/chankill"
*
* Provides the command operserv/dns.
*
* This module requires that m_dns is loaded.
* 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,
+10 -9
View File
@@ -283,25 +283,26 @@ networkinfo
/*
* Set this to the maximum allowed nick length on your network.
* Be sure to set this correctly, as setting this wrong can result in
* Anope being disconnected from the network.
* Anope being disconnected from the network. Defaults to 31.
*/
nicklen = 31
#nicklen = 31
/* Set this to the maximum allowed ident length on your network.
* Be sure to set this correctly, as setting this wrong can result in
* Anope being disconnected from the network.
* Anope being disconnected from the network. Defaults to 10.
*/
userlen = 10
#userlen = 10
/* Set this to the maximum allowed hostname length on your network.
* Be sure to set this correctly, as setting this wrong can result in
* Anope being disconnected from the network.
* Anope being disconnected from the network. Defaults to 64.
*/
hostlen = 64
#hostlen = 64
/* Set this to the maximum allowed channel length on your network.
* Defaults to 64.
*/
chanlen = 32
#chanlen = 32
/* The maximum number of list modes settable on a channel (such as b, e, I).
* Comment out or set to 0 to disable.
@@ -483,13 +484,13 @@ log
/*
* [REQUIRED] MySQL Database configuration.
*
* m_mysql
* mysql
*
* This module allows other modules to use MySQL.
*/
module
{
name = "m_mysql"
name = "mysql"
mysql
{
-1
View File
@@ -1 +0,0 @@
astyle --style=java --indent=tab --brackets=break-closing --indent-switches --indent-cases --brackets=break
-1
View File
@@ -1 +0,0 @@
For all bug reports / updates please see https://github.com/anope/anope/issues
-111
View File
@@ -1,111 +0,0 @@
C++-style Casting
=================
In C, you can cast in one of two ways:
(type)var
type(var)
The problem with C-style casting is that it allows a programmer to get away
with too much, and is also not designed to handle C++ classes.
C++ has 4 types of casting in addition to allowing C-style casting. They are:
static_cast
const_cast
dynamic_cast
reinterpret_cast
The syntax is usually *_cast<type>(var).
static_cast
-----------
From my experience, this cast is closest to C-style casting for non-pointer
types as well as between some (but not all) pointer types. This type of cast,
like C-style casting, is performed at compile-time. static_cast can also do
a downcast of a derived class to a base class, but only if the base class is
not a virtual base class. Sometimes the result of this cast can become
undefined. static_cast is a bit more strict that C-style casting, though. It
disallows certain class conversions that would've been allowed with a C-style
cast. static_cast also doesn't allow you to cast to an incomplete type. In
these cases, I would try either dynamic_cast or reinterpret_cast.
const_cast
----------
This cast is mainly to add or remove const-ness or volatile-ness from a
variable. This is safer than using a C-style cast to change the const-ness
of a variable. In most cases if you try to use one of the other casts and it
complains about const-ness, you will want to either use this cast instead or
wrap the other cast around this cast. An example:
const int *a;
static_cast<void *>(a); <-- This will fail.
To remedy the above, you would might try this:
const int *a;
const_cast<void *>(a); <-- But this will still fail.
The real solution is this:
const int *a;
static_cast<void *>(const_cast<int *>(a));
It is not recommended to use const_cast on the this variable within a member
function of a class that is declared const. Instead you should use the mutable
keyword on the variable in the class's definition.
dynamic_cast
------------
This cast can only be used on pointers or references to classes. It can cast a
derived class to a base class, a derived class to another derived class
(provided that both are children of the same base class), or a base class to a
derived class. You can also use this to cast a class to void *. This cast is
done at run-time as opposed to the other casts, and relies on C++'s RTTI to be
enabled. It is meant to be used on polymorphic classes, so use static_cast on
non-polymorphic classes.
derived-to-base conversions are actually done statically, so you use either
dynamic_cast or static_cast on them, regardless of if the classes are
polymorphic or not.
derived-to-derived or base-to-derived conversions, however, rely on run-time
type information, and this cast is used on those classes that are polymorphic.
This is safer than C-style casting in that an invalid pointer conversion will
return a NULL pointer, and an invalid reference conversion will throw a
Bad_cast exception.
Note that in Anope we prefer if Anope::debug_cast is used.
This uses dynamic_cast (and checks for a NULL pointer return) on debug builds
and static_cast on release builds, to speed up the program because of dynamic_cast's
reliance on RTTI.
reinterpret_cast
----------------
This cast I would use only as a last resort if static_cast isn't allowed on a
conversion. It allows for conversions between two unrelated types, such as
going from char * to int *. It can also be used to convert a pointer to an
integral type and vica versa. The sites I've read mention how the result is
non-portable, which I assume means the resulting object code is non-portable,
so since the code is compiled on many systems anyways, I don't see this as
being a huge issue. It is recommended to only use this if necessary, though.
Links
=====
The following links are web sites I've used to get this information, and might
describe some of the above a bit better than I have. :P
https://www.acm.org/crossroads/xrds3-1/ovp3-1.html
http://www.cplusplus.com/doc/tutorial/typecasting.html
http://www.codeguru.com/forum/showthread.php?t=312456
https://web.archive.org/web/20170810222238/http://www.cs.umd.edu/class/sum2003/cmsc311/Notes/BitOp/cast.html
https://www.microsoft.com/en-us/download/details.aspx?id=55984
https://en.wikibooks.org/wiki/C%2B%2B_Programming/Type_Casting
https://web.archive.org/web/20160510114447/http://www.informit.com/guides/content.aspx?g=cplusplus&seqNum=134
-- CyberBotX, Nov 23, 2008
+1 -1
View File
@@ -7,7 +7,7 @@ if(WIN32)
# Add README.txt to list of files for CPack to ignore
add_to_cpack_ignored_files("README.txt$" TRUE)
endif()
set(DOCS Changes Changes.conf DEFCON FAQ INSTALL LANGUAGE MODULES NEWS ${CMAKE_CURRENT_BINARY_DIR}/README.txt WIN32.txt)
set(DOCS Changes Changes.conf DEFCON FAQ INSTALL LANGUAGE MODULES ${CMAKE_CURRENT_BINARY_DIR}/README.txt WIN32.txt)
install(FILES ${DOCS}
DESTINATION ${DOC_DIR}
)
-239
View File
@@ -1,239 +0,0 @@
Originally pulled from: https://wiki.inspircd.org/Coding_Guidelines
---
InspIRCd Coding Guidelines
The following are a set of guidelines for writing patches to InspIRCd, or for
creating modules for distribution with the official package. These guidelines
were written a time after InspIRCd development started, and so not all code
yet follows these. This will be rectified with time.
1. Comments
* Multi Line
Multiple line comments should follow the C-style comment, for example:
/*
* This is a multiple line comment, huzzah..
*/
* Single Line
Single line comments should also be in the C style, for example:
/* This is a boring one-line comment */
* Doxygen commenting
If you wish your comment to show in doxygen, the comment should be directly
above the item you are documenting (a class, function, enum, etc) and the
first line should be "/**". For example:
/** This is a doxygen multiline comment.
* Description of thingymebob here.
*/
The first line after the "**" is used as the short description of the item
(up to the full stop) and everything afterwards as the detailed description.
2. Indentation
Tabs. Tabs. ONLY TABS. Use a single tab for each level of indentation,
for example:
int main()
{
<tab>if (condition)
<tab>{
<tab><tab>code
<tab>}
}
3. Separation
Always put a space in between a keyword like if/while and the condition,
for example:
if (foo == bar)
NOT
if(foo == bar)
4. Braces
Always put braces opening and closing blocks on separate lines, see the
indentation example. For example, place braces like this:
if (apples == "green")
{
cout << "Apples are green" << endl;
}
and not:
if (apples == "green") {
cout << "Apples are green" << endl;
}
The one exception to this is if you are declaring a class method which is
only one line long, in that case the following is acceptable in most cases:
class foo : public bar
{
foo() { }
getrandomfoo() { return rand(); }
};
5. Templates
Where possible, use templates rather than #defines. Avoid use of RTTI.
6. Structs
Structs should be declared in the following fashion:
struct BodyPartBasket
{
int arms;
int legs;
int scrotalsacs;
};
and not like this:
typedef struct
{
int arms;
int legs;
int scrotalsacs;
} BodyPartBasket;
The second way is not required in C++ to be able to do this:
BodyPartBasket mybasket;
Plus, placing the name at the bottom of the declaration makes readability
more difficult (as you have to scroll down to the bottom of the struct to
find its name). (where possible, call them classes rather than structs.)
7. Variable naming
Class and struct names should be in camel case with a leading capital letter,
for example "MyBagOfBones" and not "my_bag_of_bones" or "mybagofbones".
Variable names can be in either camel case with a leading capital letter or
alternatively all lower case, so long as the same naming convention is
adhered to throughout the class. No classes or variables should be named in
capitals unless this makes sense for the name (for example "class DNS").
Constants and enum values should always be completely in CAPITALS and
underscores may be used, for example:
enum DecayState
{
DECAYED_MOULDY = 0,
DECAYED_SMELLY = 1,
DECAYED_MAGGOTS = 2
};
All value names in an enum should be started with the same text which should
be related in some way to the enum's use. For example "DNS_CNAME, DNS_A,
DNS_AAAA".
8. Use of references
Wherever possible, when dealing with any complex class, pass a const reference
rather than a copy of the class. For example:
MyThingy::MyThingy(const std::string &thingyvalue)
{
}
Of course, if you intended to change the string you can just omit the 'const'.
9. Use of char pointers
Whenever you use char pointers (char*, char**) try to use const equivalents.
This is much safer and avoids ugly and dangerous casts. For example:
MyThingy::Thingify(const char* const* wotsits)
{
}
If it is possible without performance loss, consider avoiding char pointers
altogether and using std::string instead.
10. Use of STL
For more information on use of STL in InspIRCd, please see the separate
STL FAQ.
11. Making copies of data
Never ever make a copy of a piece of data unless it is absolutely necessary.
For example, don't use strlcpy() to make a copy of the const char* string
returned by std::string::c_str(), if the change can be done to the std::string
itself. The same goes for unnecessary variable assignments, especially those
which assign large classes.
12. namespace std
Avoid the following:
using namespace std;
It might take a bit more typing, but things work better if you don't set
(then later assume) the namespace -- specify it explicitly when you want to
use it.
13. Linefeeds
Unix linefeeds only please. We do not like to see our screens covered in ^M.
14. Portability
Always make sure your code is portable to all supported operating systems,
remember of course that as of 1.1.8 this includes windows. Don't write code
that only works on windows, or only works on Linux. Test your code on all
platforms or ask for help from other developers who have the platforms you
want to test on.
* new() and delete(), malloc() and free()
Apart from the fact that using malloc() and free() is bad practice in C++
code, you must never use malloc() or free() in InspIRCd, within its modules
or within the core. This is because if you use malloc() or free() in windows,
the memory is claimed from the program's local heap.
In windows, each shared object (module, dll) has its own heap, which is
protected from other dlls and executables. To get around this issue and
allow more posix-like memory access from other dlls in the program (other
modules), InspIRCd overrides the operators new and delete to ensure that
memory allocated by them comes from the windows global heap. If you use
malloc() and free() for this, the ircd will segfault when another module
tries to access the memory you have allocated!
* strdup()
As with malloc(), above, strdup() should be avoided. Where strdup() is
absolutely necessary, use strnewdup() which is our strdup() implementation
that calls operator new instead of using malloc().
char arrays allocated by strnewdup() should be deleted with operator delete[].
* CoreExport and DllImport
Prefix all types you want to import or export to other modules with CoreExport
and DllImport macros. These do nothing in POSIX operating systems, however
in windows these are expanded to the instructions __declspec(dllimport) and
__declspec(dllexport) respectively depending on where they are used and how.
15. External Dependencies
If a module is compiled as standard, or the code is part of the core, you must
not use any dependencies that are not available as standard on all supported
operating systems beyond libstdc++, libc, and whatever else is currently
required to build the core. Modules which use nonstandard dependencies belong
in the modules/extra directory.
16. Profiling and Performance
It is one thing to assume that code performs bad, it is another thing to prove
that it actually is. A lot of experienced programmers talk about 'premature
optimisation', and here is what it means: if you have a piece of code called
once on startup that takes 10 seconds instead of one second to run, and a
piece of code that takes 0.05 seconds to run when it should take 0.01, and
it is called once per second, the second piece of code is the priority.
In other words, make sure that what you think is slow, and a performance
problem in Insp actually is.
To do this, use the callgrind tool from Valgrind (valgrind --tool=cachegrind
bin/inspircd -nofork -debug), and kcachegrind (or similar) to view the output
files.
+27
View File
@@ -1,3 +1,30 @@
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 minumum 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.
+29 -1
View File
@@ -1,3 +1,31 @@
Anope Version 2.1.3
-------------------
Added options:didyoumeandifference.
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 module:defaults from the chanserv module (now always enabled).
Removed the nickserv/saset/secure command.
Removed the nickserv/saset/secure oper privilege.
Removed the nickserv/set/secure command.
Removed the nickserv/status command.
Removed the ns_access module.
Removed the ns_secure option in module:defaults from the nickserv module (now always enabled).
Anope Version 2.1.2
-------------------
Added module:tlsv10 to the ssl_openssl module for configuring whether TLSv1.0 is usable (defaults to no).
Added module:tlsv11 to the ssl_openssl module for configuring whether TLSv1.1 is usable (defaults to yes).
Added module:tlsv12 to the ssl_openssl module for configuring whether TLSv1.2 is usable (defaults to yes).
Removed module:sslv3 from the ssl_openssl module (now always disabled).
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.
Anope Version 2.1.1
-------------------
Added the m_regex_stdlib module.
@@ -5,7 +33,7 @@ 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.
Added nickserv:minpasslen for configuring the minimum password length (defaults to 8).
Removed nickserv:strictpasswords as it is obsolete now nickserv:minpasslen exists.
Removed the inspircd12 and inspircd20 modules (use inspircd instead).
Removed the ns_getpass module (no supported encryption modules).
+1 -1
View File
@@ -10,7 +10,7 @@ Anope DefCon
1) Introduction
Anope 1.6 onwards supports a unique protection mechanism based on the
Anope 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:
-31
View File
@@ -1,31 +0,0 @@
Anope Internal Events
---------------------
1) Intro
2) Using Events
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.
Additionally 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) Using Events
Each Event in Anope calls a function.
You must override these functions in your main modules class.
The full list of functions and parameters are in modules.h. In this
case, you would be overriding OnJoinChannel() and OnPartChannel() like so:
void OnJoinChannel(User *u, Channel *c) override { }
void OnPartChannel(User *u, Channel *c) override { }
Some of these event overrides can be used to prevent or allow things to
happen that would normally not be allowed or denied. You can also use
ModuleManager (not explained here) to set control which order the modules
are queried (when multiple modules hook to the same event).
+1 -1
View File
@@ -37,7 +37,7 @@ Note: You should also read the README and FAQ files!
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 m_mysql, run
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.
+1 -1
View File
@@ -37,7 +37,7 @@ Note : Vous devrez également lire les fichiers README et FAQ !
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 m_mysql,
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.
+1 -1
View File
@@ -12,7 +12,7 @@ Anope Modules
1) Introduction
Anope 1.6 onwards supports external modules. External modules are pieces
Anope 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.
-6
View File
@@ -1,6 +0,0 @@
Highlighted News in Anope 1.9
=============================
* Added in live updating SQL and the ability to execute commands through SQL
* Re-designed configuration file
* Code refresh / rewrite into C++
+1 -1
View File
@@ -1,7 +1,7 @@
Anope -- a set of IRC services for IRC networks
-----------------------------------------------
Anope is 2003-2023 Anope Team <team@anope.org>.
Anope is 2003-2024 Anope Team <team@anope.org>.
Based on Epona 2000-2002 PegSoft <epona@pegsoft.net>.
Based on Services 1996-1999 Andrew Church <achurch@achurch.org>.
+1 -1
View File
@@ -1,4 +1,4 @@
Starting in Anope 1.9.9, Anope has Redis database support (https://redis.io/).
Anope has Redis database support (https://redis.io/).
This document explains the data structure used by Anope, and explains how
keyspace notification works.
+1 -1
View File
@@ -70,7 +70,7 @@ Anope for Windows
If you cannot find whats causing the error, please visit our forums or
our IRC Support channel for assistance.
Some Anope modules require third party libraries, such as m_mysql and
Some Anope modules require third party libraries, such as mysql and
the SSL modules. If these libraries are installed in nonstandard
locations, cmake will probably not find them and should be told where
they are by passing their location to Config.
+2 -2
View File
@@ -1,7 +1,7 @@
Starting with Anope 1.9.4 XMLRPC using PHP's xmlrpc_encode_request and xmlrpc_decode functions is supported.
XMLRPC using PHP's xmlrpc_encode_request and xmlrpc_decode functions is supported.
This allows external applications, such as websites, to execute remote procedure calls to Anope in real time.
Currently there are 5 supported XMLRPC calls, provided by m_xmlrpc_main:
Currently there are 5 supported XMLRPC calls, provided by xmlrpc_main:
checkAuthentication - Takes two parameters, an account name and a password. Checks if the account name is valid and the password
is correct for the account name, useful for making login pages on websites.
+1 -1
View File
@@ -3,7 +3,7 @@
/**
* XMLRPC Functions
*
* (C) 2003-2023 Anope Team
* (C) 2003-2024 Anope Team
* Contact us at team@anope.org
*/
+10 -8
View File
@@ -1,6 +1,6 @@
/*
*
* (C) 2003-2023 Anope Team
* (C) 2003-2024 Anope Team
* Contact us at team@anope.org
*
* Please read COPYING and README for further details.
@@ -27,7 +27,7 @@ enum
* backing each ChanAccess determines whether that ChanAccess has a given
* privilege.
*/
struct CoreExport Privilege
struct CoreExport Privilege final
{
Anope::string name;
Anope::string desc;
@@ -38,7 +38,7 @@ struct CoreExport Privilege
bool operator==(const Privilege &other) const;
};
class CoreExport PrivilegeManager
class CoreExport PrivilegeManager final
{
static std::vector<Privilege> Privileges;
public:
@@ -52,7 +52,8 @@ public:
/* A provider of access. Only used for creating ChanAccesses, as
* they contain pure virtual functions.
*/
class CoreExport AccessProvider : public Service
class CoreExport AccessProvider
: public Service
{
public:
AccessProvider(Module *owner, const Anope::string &name);
@@ -70,7 +71,8 @@ public:
};
/* Represents one entry of an access list on a channel. */
class CoreExport ChanAccess : public Serializable
class CoreExport ChanAccess
: public Serializable
{
Anope::string mask;
/* account this access entry is for, if any */
@@ -96,7 +98,7 @@ public:
NickCore *GetAccount() const;
void Serialize(Serialize::Data &data) const override;
static Serializable* Unserialize(Serializable *obj, Serialize::Data &);
static Serializable *Unserialize(Serializable *obj, Serialize::Data &);
static const unsigned int MAX_DEPTH = 4;
@@ -105,7 +107,7 @@ public:
* @param nc The account
* @param next Next channel to check if any
*/
virtual bool Matches(const User *u, const NickCore *nc, ChannelInfo* &next) const;
virtual bool Matches(const User *u, const NickCore *nc, ChannelInfo *&next) const;
/** Check if this access entry has the given privilege.
* @param name The privilege name
@@ -133,7 +135,7 @@ public:
/* 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
class CoreExport AccessGroup final
{
public:
/* access entries + paths */
+15 -61
View File
@@ -1,6 +1,6 @@
/*
*
* (C) 2003-2023 Anope Team
* (C) 2003-2024 Anope Team
* Contact us at team@anope.org
*
* Please read COPYING and README for further details.
@@ -28,7 +28,9 @@ extern CoreExport nickcoreid_map NickCoreIdList;
/* A registered nickname.
* It matters that Base is here before Extensible (it is inherited by Serializable)
*/
class CoreExport NickAlias : public Serializable, public Extensible
class CoreExport NickAlias final
: public Serializable
, public Extensible
{
Anope::string vhost_ident, vhost_host, vhost_creator;
time_t vhost_created;
@@ -54,7 +56,7 @@ public:
~NickAlias();
void Serialize(Serialize::Data &data) const override;
static Serializable* Unserialize(Serializable *obj, Serialize::Data &);
static Serializable *Unserialize(Serializable *obj, Serialize::Data &);
/** Set a vhost for the user
* @param ident The ident
@@ -83,6 +85,11 @@ public:
*/
const Anope::string &GetVhostHost() const;
/** Retrieve the vhost mask
* @param the mask
*/
Anope::string GetVhostMask() const;
/** Retrieve the vhost creator
* @return the creator
*/
@@ -104,7 +111,9 @@ public:
* account's display.
* It matters that Base is here before Extensible (it is inherited by Serializable)
*/
class CoreExport NickCore : public Serializable, public Extensible
class CoreExport NickCore final
: public Serializable
, public Extensible
{
/* 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;
@@ -118,9 +127,6 @@ public:
Anope::string email;
/* Locale name of the language of the user. Empty means default language */
Anope::string language;
/* Access list, contains user@host masks of users who get certain privileges based
* on if NI_SECURE is set and what (if any) kill protection is enabled. */
std::vector<Anope::string> access;
MemoInfo memos;
std::map<Anope::string, Anope::string> last_modes;
@@ -149,7 +155,7 @@ public:
~NickCore();
void Serialize(Serialize::Data &data) const override;
static Serializable* Unserialize(Serializable *obj, Serialize::Data &);
static Serializable *Unserialize(Serializable *obj, Serialize::Data &);
/** Changes the display for this account
* @param na The new display, must be grouped to this account.
@@ -161,66 +167,14 @@ public:
*/
virtual bool IsServicesOper() const;
/** Add an entry to the nick's access list
*
* @param entry The nick!ident@host entry to add to the access list
*
* Adds a new entry into the access list.
*/
void AddAccess(const Anope::string &entry);
/** Get an entry from the nick's access list by index
*
* @param entry Index in the access list vector to retrieve
* @return The access list entry of the given index if within bounds, an empty string if the vector is empty or the index is out of bounds
*
* Retrieves an entry from the access list corresponding to the given index.
*/
Anope::string GetAccess(unsigned entry) const;
/** Get the number of entries on the access list for this account.
*/
unsigned GetAccessCount() const;
/** Retrieves the account id for this user */
uint64_t GetId();
/** Find an entry in the nick's access list
*
* @param entry The nick!ident@host entry to search for
* @return True if the entry is found in the access list, false otherwise
*
* Search for an entry within the access list.
*/
bool FindAccess(const Anope::string &entry);
/** Erase an entry from the nick's access list
*
* @param entry The nick!ident@host entry to remove
*
* Removes the specified access list entry from the access list.
*/
void EraseAccess(const Anope::string &entry);
/** Clears the entire nick's access list
*
* Deletes all the memory allocated in the access list vector and then clears the vector.
*/
void ClearAccess();
/** Is the given user on this accounts access list?
*
* @param u The user
*
* @return true if the user is on the access list
*/
bool IsOnAccess(const User *u) const;
/** 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 *Find(const Anope::string &nick);
void AddChannelReference(ChannelInfo *ci);
void RemoveChannelReference(ChannelInfo *ci);
+48 -23
View File
@@ -1,6 +1,6 @@
/*
*
* (C) 2003-2023 Anope Team
* (C) 2003-2024 Anope Team
* Contact us at team@anope.org
*
* Please read COPYING and README for further details.
@@ -22,7 +22,7 @@ namespace Anope
* 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
class CoreExport string final
{
private:
/**
@@ -140,8 +140,8 @@ namespace Anope
*/
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; }
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.
@@ -159,21 +159,21 @@ namespace Anope
* Trim leading and trailing white spaces from the string.
*/
inline string& ltrim(const Anope::string &what = " \t\r\n")
inline string &ltrim(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")
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")
inline string &trim(const Anope::string &what = " \t\r\n")
{
this->ltrim(what);
this->rtrim(what);
@@ -210,6 +210,10 @@ namespace Anope
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.
*/
@@ -308,7 +312,7 @@ namespace Anope
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
struct hash_ci final
{
inline size_t operator()(const string &s) const
{
@@ -316,7 +320,7 @@ namespace Anope
}
};
struct hash_cs
struct hash_cs final
{
inline size_t operator()(const string &s) const
{
@@ -324,7 +328,7 @@ namespace Anope
}
};
struct compare
struct compare final
{
inline bool operator()(const string &s1, const string &s2) const
{
@@ -332,9 +336,14 @@ namespace Anope
}
};
template<typename T> class map : public std::map<string, T, ci::less> { };
template<typename T> class multimap : public std::multimap<string, T, ci::less> { };
template<typename T> class hash_map : public std::unordered_map<string, T, hash_ci, compare> { };
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 hash_map = std::unordered_map<string, T, hash_ci, compare>;
#ifndef REPRODUCIBLE_BUILD
static const char *const compiled = __TIME__ " " __DATE__;
@@ -416,7 +425,7 @@ namespace Anope
* initializing language support, loading modules, and loading databases.
* @throws CoreException if something bad went wrong
*/
extern void Init(int ac, char **av);
extern bool Init(int ac, char **av);
/** Calls the save database event
*/
@@ -476,7 +485,7 @@ namespace Anope
* @param ... any number of parameters
* @return a Anope::string
*/
extern CoreExport string printf(const char *fmt, ...);
extern CoreExport string printf(const char *fmt, ...) ATTR_FORMAT(1, 2);
/** Return the last error code
* @return The error code
@@ -486,7 +495,7 @@ namespace Anope
/** Return the last error, uses errno/GetLastError() to determine this
* @return An error message
*/
extern CoreExport const string LastError();
extern CoreExport string LastError();
/** Determines if a path is a file
*/
@@ -548,6 +557,12 @@ namespace Anope
* @param len The length of the string returned
*/
extern CoreExport Anope::string Random(size_t len);
/** Calculates the levenshtein distance between two strings.
* @param s1 The first string.
* @param s2 The second string.
*/
extern CoreExport size_t Distance(const Anope::string &s1, const Anope::string &s2);
}
/** sepstream allows for splitting token separated lists.
@@ -591,7 +606,7 @@ public:
/** Gets every token from this stream
* @param token Tokens are pushed back here
*/
template<typename T> void GetTokens(T& token)
template<typename T> void GetTokens(T &token)
{
token.clear();
Anope::string t;
@@ -614,7 +629,7 @@ public:
/** Fetch the entire remaining stream, without tokenizing
* @return The remaining part of the stream
*/
const Anope::string GetRemaining();
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
@@ -624,7 +639,8 @@ public:
/** A derived form of sepstream, which separates on commas
*/
class commasepstream : public sepstream
class commasepstream final
: public sepstream
{
public:
/** Initialize with comma separator
@@ -634,7 +650,8 @@ public:
/** A derived form of sepstream, which separates on spaces
*/
class spacesepstream : public sepstream
class spacesepstream final
: public sepstream
{
public:
/** Initialize with space separator
@@ -648,7 +665,8 @@ public:
* 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 CoreException : public std::exception
class CoreExport CoreException
: public std::exception
{
protected:
/** Holds the error message to be displayed
@@ -687,7 +705,8 @@ public:
}
};
class ModuleException : public CoreException
class CoreExport ModuleException
: public CoreException
{
public:
/** Default constructor, just uses the error message 'Module threw an exception'.
@@ -704,7 +723,8 @@ public:
virtual ~ModuleException() noexcept = default;
};
class ConvertException : public CoreException
class CoreExport ConvertException final
: public CoreException
{
public:
ConvertException(const Anope::string &reason = "") : CoreException(reason) { }
@@ -714,6 +734,11 @@ public:
/** Convert something to a string
*/
inline Anope::string stringify(const Anope::string &x)
{
return x;
}
template<typename T> inline Anope::string stringify(const T &x)
{
std::ostringstream stream;
+5 -4
View File
@@ -1,7 +1,7 @@
/*
*
* (C) 2008-2011 Adam <Adam@anope.org>
* (C) 2008-2023 Anope Team <team@anope.org>
* (C) 2008-2024 Anope Team <team@anope.org>
*
* Please read COPYING and README for further details.
*/
@@ -43,7 +43,8 @@ public:
* no longer be valid once the object it refers is destructed.
*/
template<typename T>
class Reference : public ReferenceBase
class Reference
: public ReferenceBase
{
protected:
T *ref = nullptr;
@@ -102,14 +103,14 @@ public:
return NULL;
}
inline T* operator->()
inline T *operator->()
{
if (operator bool())
return this->ref;
return NULL;
}
inline T* operator*()
inline T *operator*()
{
if (operator bool())
return this->ref;
+9 -6
View File
@@ -1,7 +1,7 @@
/*
*
* (C) 2008-2011 Robin Burchell <w00t@inspircd.org>
* (C) 2008-2023 Anope Team <team@anope.org>
* (C) 2008-2024 Anope Team <team@anope.org>
*
* Please read COPYING and README for further details.
*/
@@ -19,7 +19,9 @@ 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 : public User, public Serializable
class CoreExport BotInfo final
: public User
, public Serializable
{
/* Channels this bot is assigned to */
Serialize::Checker<std::set<ChannelInfo *> > channels;
@@ -54,7 +56,7 @@ public:
virtual ~BotInfo();
void Serialize(Serialize::Data &data) const;
static Serializable* Unserialize(Serializable *obj, Serialize::Data &);
static Serializable *Unserialize(Serializable *obj, Serialize::Data &);
void GenerateUID();
@@ -106,8 +108,9 @@ public:
/** Called when a user messages this bot
* @param u The user
* @param message The users' message
* @params tags Message tags
*/
virtual void OnMessage(User *u, const Anope::string &message);
virtual 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
@@ -115,7 +118,7 @@ public:
* @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 = "");
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
@@ -128,5 +131,5 @@ public:
* @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);
static BotInfo *Find(const Anope::string &nick, bool nick_only = false);
};
+12 -7
View File
@@ -1,6 +1,6 @@
/* Channel support
*
* (C) 2008-2023 Anope Team
* (C) 2008-2024 Anope Team
* Contact us at team@anope.org
*
* Please read COPYING and README for further details.
@@ -18,7 +18,8 @@ typedef Anope::hash_map<Channel *> channel_map;
extern CoreExport channel_map ChannelList;
/* A user container, there is one of these per user per channel. */
struct ChanUserContainer : public Extensible
struct ChanUserContainer final
: public Extensible
{
User *user;
Channel *chan;
@@ -28,7 +29,9 @@ struct ChanUserContainer : public Extensible
ChanUserContainer(User *u, Channel *c) : user(u), chan(c) { }
};
class CoreExport Channel : public Base, public Extensible
class CoreExport Channel final
: public Base
, public Extensible
{
static std::vector<Channel *> deleting;
@@ -107,7 +110,7 @@ public:
* @param status The status to give the user, if any
* @return The UserContainer for the user
*/
ChanUserContainer* JoinUser(User *u, const ChannelStatus *status);
ChanUserContainer *JoinUser(User *u, const ChannelStatus *status);
/** Remove a user internally from the channel
* @param u The user
@@ -204,7 +207,8 @@ public:
* @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, ...);
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
@@ -233,7 +237,8 @@ public:
* @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, ...);
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.
@@ -297,7 +302,7 @@ public:
* @param name The channel to find
* @return The channel, if found
*/
static Channel* Find(const Anope::string &name);
static Channel *Find(const Anope::string &name);
/** Finds or creates a channel
* @param name The channel name
+13 -9
View File
@@ -1,6 +1,6 @@
/* Declarations for command data.
*
* (C) 2003-2023 Anope Team
* (C) 2003-2024 Anope Team
* Contact us at team@anope.org
*
* Please read COPYING and README for further details.
@@ -15,13 +15,13 @@
#include "anope.h"
#include "channels.h"
struct CommandGroup
struct CommandGroup final
{
Anope::string name, description;
};
/* Used in BotInfo::commands */
struct CommandInfo
struct CommandInfo final
{
typedef Anope::map<CommandInfo> map;
@@ -44,10 +44,11 @@ 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
class CoreExport CommandSource final
{
/* The nick executing the command */
Anope::string nick;
@@ -61,15 +62,17 @@ public:
/* Where the reply should go */
CommandReply *reply;
/* Channel the command was executed on (fantasy) */
Reference<Channel> c;
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;
CommandSource(const Anope::string &n, User *user, NickCore *core, CommandReply *reply, BotInfo *bi);
CommandSource(const Anope::string &n, User *user, NickCore *core, CommandReply *reply, BotInfo *bi, const Anope::string &m = "");
const Anope::string &GetNick() const;
User *GetUser();
@@ -77,7 +80,7 @@ public:
AccessGroup AccessFor(ChannelInfo *ci);
bool IsFounder(ChannelInfo *ci);
void Reply(const char *message, ...);
void Reply(const char *message, ...) ATTR_FORMAT(2, 3);
void Reply(const Anope::string &message);
bool HasCommand(const Anope::string &cmd);
@@ -88,7 +91,8 @@ public:
/** Every services command is a class, inheriting from Command.
*/
class CoreExport Command : public Service
class CoreExport Command
: public Service
{
Anope::string desc;
std::vector<Anope::string> syntax;
@@ -178,5 +182,5 @@ public:
* @param name If found, is set to the command name, eg REGISTER
* @return true if the given command service exists
*/
static bool FindCommandFromService(const Anope::string &command_service, BotInfo* &bi, Anope::string &name);
static bool FindCommandFromService(const Anope::string &command_service, BotInfo *&bi, Anope::string &name);
};
+11 -16
View File
@@ -1,6 +1,6 @@
/*
*
* (C) 2003-2023 Anope Team
* (C) 2003-2024 Anope Team
* Contact us at team@anope.org
*
* Please read COPYING and README for further details.
@@ -42,17 +42,10 @@ namespace Configuration
Block(const Anope::string &);
const Anope::string &GetName() const;
int CountBlock(const Anope::string &name) const;
const Block* GetBlock(const Anope::string &name, int num = 0) const;
Block* GetMutableBlock(const Anope::string &name, int num = 0);
const Block *GetBlock(const Anope::string &name, int num = 0) const;
Block *GetMutableBlock(const Anope::string &name, int num = 0);
template<typename T> inline T Get(const Anope::string &tag) const
{
return this->Get<T>(tag, "");
}
/* VS 2008 has an issue with having a default argument here (def = ""), which is why the above
* function exists.
*/
template<typename T> T Get(const Anope::string &tag, const Anope::string &def) const
template<typename T> T Get(const Anope::string &tag, const Anope::string &def = "") const
{
const Anope::string &value = this->Get<const Anope::string>(tag, def);
if (!value.empty())
@@ -68,7 +61,7 @@ namespace Configuration
const item_map &GetItems() const;
};
template<> CoreExport const Anope::string Block::Get(const Anope::string &tag, const Anope::string& def) 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;
} // namespace Internal
@@ -78,7 +71,7 @@ namespace Configuration
/** Represents a configuration file
*/
class File
class File final
{
Anope::string name;
bool executable;
@@ -98,7 +91,8 @@ namespace Configuration
struct Uplink;
struct CoreExport Conf : Block
struct CoreExport Conf final
: Block
{
/* options:readtimeout */
time_t ReadTimeout;
@@ -152,7 +146,7 @@ namespace Configuration
const Block *GetCommand(CommandSource &);
};
struct Uplink
struct Uplink final
{
Anope::string host;
unsigned port;
@@ -171,7 +165,8 @@ namespace Configuration
* 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 ConfigException : public CoreException
class CoreExport ConfigException final
: public CoreException
{
public:
/** Default constructor, just uses the error message 'Config threw an exception'.
+1 -1
View File
@@ -1,6 +1,6 @@
/*
*
* (C) 2003-2023 Anope Team
* (C) 2003-2024 Anope Team
* Contact us at team@anope.org
*
* Please read COPYING and README for further details.
+33 -27
View File
@@ -1,6 +1,6 @@
/*
*
* (C) 2003-2023 Anope Team
* (C) 2003-2024 Anope Team
* Contact us at team@anope.org
*
* Please read COPYING and README for further details.
@@ -15,7 +15,8 @@
class Extensible;
class CoreExport ExtensibleBase : public Service
class CoreExport ExtensibleBase
: public Service
{
protected:
std::map<Extensible *, void *> items;
@@ -40,12 +41,12 @@ public:
void UnsetExtensibles();
template<typename T> T* GetExt(const Anope::string &name) const;
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> 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);
@@ -53,7 +54,8 @@ public:
};
template<typename T>
class BaseExtensibleItem : public ExtensibleBase
class BaseExtensibleItem
: public ExtensibleBase
{
protected:
virtual T *Create(Extensible *) = 0;
@@ -75,17 +77,17 @@ public:
}
}
T* Set(Extensible *obj, const T &value)
T *Set(Extensible *obj, const T &value)
{
T* t = Set(obj);
T *t = Set(obj);
if (t)
*t = value;
return t;
}
T* Set(Extensible *obj)
T *Set(Extensible *obj)
{
T* t = Create(obj);
T *t = Create(obj);
Unset(obj);
items[obj] = t;
obj->extension_items.insert(this);
@@ -100,7 +102,7 @@ public:
delete value;
}
T* Get(const Extensible *obj) const
T *Get(const Extensible *obj) const
{
std::map<Extensible *, void *>::const_iterator it = items.find(const_cast<Extensible *>(obj));
if (it != items.end())
@@ -113,9 +115,9 @@ public:
return items.find(const_cast<Extensible *>(obj)) != items.end();
}
T* Require(Extensible *obj)
T *Require(Extensible *obj)
{
T* t = Get(obj);
T *t = Get(obj);
if (t)
return t;
@@ -124,10 +126,11 @@ public:
};
template<typename T>
class ExtensibleItem : public BaseExtensibleItem<T>
class ExtensibleItem
: public BaseExtensibleItem<T>
{
protected:
T* Create(Extensible *obj) override
T *Create(Extensible *obj) override
{
return new T(obj);
}
@@ -136,10 +139,11 @@ public:
};
template<typename T>
class PrimitiveExtensibleItem : public BaseExtensibleItem<T>
class PrimitiveExtensibleItem
: public BaseExtensibleItem<T>
{
protected:
T* Create(Extensible *obj) override
T *Create(Extensible *obj) override
{
return new T();
}
@@ -151,7 +155,7 @@ template<>
class PrimitiveExtensibleItem<bool> : public BaseExtensibleItem<bool>
{
protected:
bool* Create(Extensible *) override
bool *Create(Extensible *) override
{
return NULL;
}
@@ -160,14 +164,15 @@ public:
};
template<typename T>
class SerializableExtensibleItem : public PrimitiveExtensibleItem<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);
T *t = this->Get(e);
data[this->name] << *t;
}
@@ -204,13 +209,14 @@ public:
};
template<typename T>
struct ExtensibleRef : ServiceReference<BaseExtensibleItem<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
T *Extensible::GetExt(const Anope::string &name) const
{
ExtensibleRef<T> ref(name);
if (ref)
@@ -221,16 +227,16 @@ T* Extensible::GetExt(const Anope::string &name) const
}
template<typename T>
T* Extensible::Extend(const Anope::string &name, const T &what)
T *Extensible::Extend(const Anope::string &name, const T &what)
{
T* t = Extend<T>(name);
T *t = Extend<T>(name);
if (t)
*t = what;
return t;
}
template<typename T>
T* Extensible::Extend(const Anope::string &name)
T *Extensible::Extend(const Anope::string &name)
{
ExtensibleRef<T> ref(name);
if (ref)
@@ -241,7 +247,7 @@ T* Extensible::Extend(const Anope::string &name)
}
template<typename T>
T* Extensible::Require(const Anope::string &name)
T *Extensible::Require(const Anope::string &name)
{
if (HasExt(name))
return GetExt<T>(name);
+8 -5
View File
@@ -1,7 +1,7 @@
/*
*
* (C) 2002-2011 InspIRCd Development Team
* (C) 2009-2023 Anope Team <team@anope.org>
* (C) 2009-2024 Anope Team <team@anope.org>
*
* Please read COPYING and README for further details.
*/
@@ -27,7 +27,8 @@ namespace Anope
/* ASCII case insensitive ctype. */
template<typename char_type>
class ascii_ctype : public std::ctype<char_type>
class ascii_ctype
: public std::ctype<char_type>
{
public:
char_type do_toupper(char_type c) const override
@@ -49,7 +50,8 @@ namespace Anope
/* rfc1459 case insensitive ctype, { = [, } = ], and | = \ */
template<typename char_type>
class rfc1459_ctype : public ascii_ctype<char_type>
class rfc1459_ctype final
: public ascii_ctype<char_type>
{
public:
char_type do_toupper(char_type c) const override
@@ -78,7 +80,8 @@ namespace ci
* This class is used to implement ci::string, a case-insensitive, ASCII-
* comparing string class.
*/
struct CoreExport ci_char_traits : std::char_traits<char>
struct CoreExport ci_char_traits final
: std::char_traits<char>
{
/** Check if two chars match.
* @param c1st First character
@@ -123,7 +126,7 @@ namespace ci
*/
typedef std::basic_string<char, ci_char_traits, std::allocator<char> > string;
struct CoreExport less
struct CoreExport less final
{
/** Compare two Anope::strings as ci::strings and find which one is less
* @param s1 The first string
+6 -8
View File
@@ -1,6 +1,6 @@
/*
*
* (C) 2008-2023 Anope Team
* (C) 2008-2024 Anope Team
* Contact us at team@anope.org
*
* Please read COPYING and README for further details.
@@ -75,7 +75,7 @@ namespace Language
#define MORE_OBSCURE_PASSWORD _("Please try again with a more obscure password. Passwords should not be\n" \
"something that could be easily guessed (e.g. your real name or your nick) and\n" \
"cannot contain the space or tab characters.\n")
#define PASSWORD_TOO_SHORT _("Your password is too short. It must must be longer than %u characters.")
#define PASSWORD_TOO_SHORT _("Your password is too short. It must be longer than %u characters.")
#define PASSWORD_TOO_LONG _("Your password is too long. It must be shorter than %u characters.")
#define NICK_NOT_REGISTERED _("Your nick isn't registered.")
#define NICK_X_NOT_REGISTERED _("Nick \002%s\002 isn't registered.")
@@ -90,8 +90,6 @@ namespace Language
#define UNKNOWN _("<unknown>")
#define NO_EXPIRE _("does not expire")
#define LIST_INCORRECT_RANGE _("Incorrect range specified. The correct syntax is \002#\037from\037-\037to\037\002.")
#define NICK_IS_REGISTERED _("This nick is owned by someone else. Please choose another.\n" \
"(If this is your nick, type \002%s%s IDENTIFY \037password\037\002.)")
#define NICK_IS_SECURE _("This nickname is registered and protected. If it is your\n" \
"nick, type \002%s%s IDENTIFY \037password\037\002. Otherwise,\n" \
"please choose a different nick.")
@@ -111,9 +109,9 @@ namespace Language
#define CHAN_INFO_HEADER _("Information for channel \002%s\002:")
#define CHAN_EXCEPTED _("\002%s\002 matches an except on %s and cannot be banned until the except has been removed.")
#define MEMO_NEW_X_MEMO_ARRIVED _("There is a new memo on channel %s.\n" \
"Type \002%s%s READ %s %d\002 to read it.")
"Type \002%s%s READ %s %zu\002 to read it.")
#define MEMO_NEW_MEMO_ARRIVED _("You have a new memo from %s.\n" \
"Type \002%s%s READ %d\002 to read it.")
"Type \002%s%s READ %zu\002 to read it.")
#define MEMO_HAVE_NO_MEMOS _("You have no memos.")
#define MEMO_X_HAS_NO_MEMOS _("%s has no memos.")
#define MEMO_SEND_DISABLED _("Sorry, memo sending is temporarily disabled.")
@@ -124,7 +122,7 @@ namespace Language
#define BOT_NOT_ON_CHANNEL _("Bot is not on channel \002%s\002.")
#define HOST_SET_ERROR _("A vHost must be in the format of a valid hostname.")
#define HOST_SET_IDENT_ERROR _("A vHost ident must be in the format of a valid ident.")
#define HOST_SET_TOOLONG _("Error! The vHost is too long, please use a hostname shorter than %d characters.")
#define HOST_SET_IDENTTOOLONG _("Error! The vHost ident is too long, please use an ident shorter than %d characters.")
#define HOST_SET_TOOLONG _("Error! The vHost is too long, please use a hostname shorter than %zu characters.")
#define HOST_SET_IDENTTOOLONG _("Error! The vHost ident is too long, please use an ident shorter than %zu characters.")
#define HOST_NOT_ASSIGNED _("Please contact an Operator to get a vHost assigned to this nick.")
#define HOST_NO_VIDENT _("Your IRCd does not support vIdent's, if this is incorrect, please report this as a possible bug")
+3 -3
View File
@@ -1,6 +1,6 @@
/*
*
* (C) 2003-2023 Anope Team
* (C) 2003-2024 Anope Team
* Contact us at team@anope.org
*
* Please read COPYING and README for further details.
@@ -60,7 +60,7 @@ public:
/** This class handles formatting LIST/VIEW replies.
*/
class CoreExport ListFormatter
class CoreExport ListFormatter final
{
public:
typedef std::map<Anope::string, Anope::string> ListEntry;
@@ -78,7 +78,7 @@ public:
/** This class handles formatting INFO replies
*/
class CoreExport InfoFormatter
class CoreExport InfoFormatter final
{
NickCore *nc;
std::vector<std::pair<Anope::string, Anope::string> > replies;
+4 -4
View File
@@ -1,6 +1,6 @@
/*
*
* (C) 2003-2023 Anope Team
* (C) 2003-2024 Anope Team
* Contact us at team@anope.org
*
* Please read COPYING and README for further details.
@@ -37,7 +37,7 @@ enum LogType
LOG_DEBUG_4
};
struct LogFile
struct LogFile final
{
Anope::string filename;
std::ofstream stream;
@@ -48,7 +48,7 @@ struct LogFile
};
/* Represents a single log message */
class CoreExport Log
class CoreExport Log final
{
public:
/* Bot that should log this message */
@@ -109,7 +109,7 @@ public:
};
/* Configured in the configuration file, actually does the message logging */
class CoreExport LogInfo
class CoreExport LogInfo final
{
public:
BotInfo *bot = nullptr;
+3 -2
View File
@@ -1,6 +1,6 @@
/*
*
* (C) 2003-2023 Anope Team
* (C) 2003-2024 Anope Team
* Contact us at team@anope.org
*
* Please read COPYING and README for further details.
@@ -22,7 +22,8 @@ namespace Mail
extern CoreExport bool Validate(const Anope::string &email);
/* A email message being sent */
class Message : public Thread
class Message final
: public Thread
{
private:
Anope::string sendmail_path;
+5 -4
View File
@@ -1,6 +1,6 @@
/*
*
* (C) 2003-2023 Anope Team
* (C) 2003-2024 Anope Team
* Contact us at team@anope.org
*
* Please read COPYING and README for further details.
@@ -14,7 +14,8 @@
#include "anope.h"
#include "serialize.h"
class CoreExport Memo : public Serializable
class CoreExport Memo final
: public Serializable
{
public:
MemoInfo *mi;
@@ -24,7 +25,7 @@ public:
~Memo();
void Serialize(Serialize::Data &data) const override;
static Serializable* Unserialize(Serializable *obj, Serialize::Data &);
static Serializable *Unserialize(Serializable *obj, Serialize::Data &);
Anope::string owner;
/* When it was sent */
@@ -36,7 +37,7 @@ public:
/* 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
struct CoreExport MemoInfo final
{
int16_t memomax = 0;
Serialize::Checker<std::vector<Memo *> > memos;
+57 -37
View File
@@ -1,6 +1,6 @@
/*
*
* (C) 2003-2023 Anope Team
* (C) 2003-2024 Anope Team
* Contact us at team@anope.org
*
* Please read COPYING and README for further details.
@@ -21,37 +21,42 @@
namespace Message
{
struct CoreExport Away : IRCDMessage
struct CoreExport Away
: IRCDMessage
{
Away(Module *creator, const Anope::string &mname = "AWAY") : IRCDMessage(creator, mname, 0) { SetFlag(IRCDMESSAGE_REQUIRE_USER); SetFlag(IRCDMESSAGE_SOFT_LIMIT); }
Away(Module *creator, const Anope::string &mname = "AWAY") : IRCDMessage(creator, mname, 0) { SetFlag(FLAG_REQUIRE_USER); SetFlag(FLAG_SOFT_LIMIT); }
void Run(MessageSource &source, const std::vector<Anope::string> &params, const Anope::map<Anope::string> &tags) override;
};
struct CoreExport Capab : IRCDMessage
struct CoreExport Capab
: IRCDMessage
{
Capab(Module *creator, const Anope::string &mname = "CAPAB") : IRCDMessage(creator, mname, 1) { SetFlag(IRCDMESSAGE_SOFT_LIMIT); }
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> &params, const Anope::map<Anope::string> &tags) override;
};
struct CoreExport Error : IRCDMessage
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> &params, const Anope::map<Anope::string> &tags) override;
};
struct CoreExport Invite : IRCDMessage
struct CoreExport Invite
: IRCDMessage
{
Invite(Module *creator, const Anope::string &mname = "INVITE") : IRCDMessage(creator, mname, 2) { SetFlag(IRCDMESSAGE_REQUIRE_USER); SetFlag(IRCDMESSAGE_SOFT_LIMIT); }
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> &params, const Anope::map<Anope::string> &tags) override;
};
struct CoreExport Join : IRCDMessage
struct CoreExport Join
: IRCDMessage
{
Join(Module *creator, const Anope::string &mname = "JOIN") : IRCDMessage(creator, mname, 1) { SetFlag(IRCDMESSAGE_REQUIRE_USER); SetFlag(IRCDMESSAGE_SOFT_LIMIT); }
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> &params, const Anope::map<Anope::string> &tags) override;
@@ -67,107 +72,122 @@ namespace Message
static void SJoin(MessageSource &source, const Anope::string &chan, time_t ts, const Anope::string &modes, const std::list<SJoinUser> &users);
};
struct CoreExport Kick : IRCDMessage
struct CoreExport Kick
: IRCDMessage
{
Kick(Module *creator, const Anope::string &mname = "KICK") : IRCDMessage(creator, mname, 2) { SetFlag(IRCDMESSAGE_SOFT_LIMIT); }
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> &params, const Anope::map<Anope::string> &tags) override;
};
struct CoreExport Kill : IRCDMessage
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> &params, const Anope::map<Anope::string> &tags) override;
};
struct CoreExport Mode : IRCDMessage
struct CoreExport Mode
: IRCDMessage
{
Mode(Module *creator, const Anope::string &mname = "MODE") : IRCDMessage(creator, mname, 2) { SetFlag(IRCDMESSAGE_SOFT_LIMIT); }
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> &params, const Anope::map<Anope::string> &tags) override;
};
struct CoreExport MOTD : IRCDMessage
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> &params, const Anope::map<Anope::string> &tags) override;
};
struct CoreExport Notice : IRCDMessage
struct CoreExport Notice
: IRCDMessage
{
Notice(Module *creator, const Anope::string &mname = "NOTICE") : IRCDMessage(creator, mname, 2) { SetFlag(IRCDMESSAGE_REQUIRE_USER); }
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> &params, const Anope::map<Anope::string> &tags) override;
};
struct CoreExport Part : IRCDMessage
struct CoreExport Part
: IRCDMessage
{
Part(Module *creator, const Anope::string &mname = "PART") : IRCDMessage(creator, mname, 1) { SetFlag(IRCDMESSAGE_REQUIRE_USER); SetFlag(IRCDMESSAGE_SOFT_LIMIT); }
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> &params, const Anope::map<Anope::string> &tags) override;
};
struct CoreExport Ping : IRCDMessage
struct CoreExport Ping
: IRCDMessage
{
Ping(Module *creator, const Anope::string &mname = "PING") : IRCDMessage(creator, mname, 1) { SetFlag(IRCDMESSAGE_SOFT_LIMIT); }
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> &params, const Anope::map<Anope::string> &tags) override;
};
struct CoreExport Privmsg : IRCDMessage
struct CoreExport Privmsg
: IRCDMessage
{
Privmsg(Module *creator, const Anope::string &mname = "PRIVMSG") : IRCDMessage(creator, mname, 2) { SetFlag(IRCDMESSAGE_REQUIRE_USER); }
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> &params, const Anope::map<Anope::string> &tags) override;
};
struct CoreExport Quit : IRCDMessage
struct CoreExport Quit
: IRCDMessage
{
Quit(Module *creator, const Anope::string &mname = "QUIT") : IRCDMessage(creator, mname, 1) { SetFlag(IRCDMESSAGE_REQUIRE_USER); }
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> &params, const Anope::map<Anope::string> &tags) override;
};
struct CoreExport SQuit : IRCDMessage
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> &params, const Anope::map<Anope::string> &tags) override;
};
struct CoreExport Stats : IRCDMessage
struct CoreExport Stats
: IRCDMessage
{
Stats(Module *creator, const Anope::string &mname = "STATS") : IRCDMessage(creator, mname, 1) { SetFlag(IRCDMESSAGE_REQUIRE_USER); SetFlag(IRCDMESSAGE_SOFT_LIMIT); }
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> &params, const Anope::map<Anope::string> &tags) override;
};
struct CoreExport Time : IRCDMessage
struct CoreExport Time
: IRCDMessage
{
Time(Module *creator, const Anope::string &mname = "TIME") : IRCDMessage(creator, mname, 0) { SetFlag(IRCDMESSAGE_SOFT_LIMIT); }
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> &params, const Anope::map<Anope::string> &tags) override;
};
struct CoreExport Topic : IRCDMessage
struct CoreExport Topic
: IRCDMessage
{
Topic(Module *creator, const Anope::string &mname = "TOPIC") : IRCDMessage(creator, mname, 2) { SetFlag(IRCDMESSAGE_REQUIRE_USER); }
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> &params, const Anope::map<Anope::string> &tags) override;
};
struct CoreExport Version : IRCDMessage
struct CoreExport Version
: IRCDMessage
{
Version(Module *creator, const Anope::string &mname = "VERSION") : IRCDMessage(creator, mname, 0) { SetFlag(IRCDMESSAGE_SOFT_LIMIT); }
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> &params, const Anope::map<Anope::string> &tags) override;
};
struct CoreExport Whois : IRCDMessage
struct CoreExport Whois
: IRCDMessage
{
Whois(Module *creator, const Anope::string &mname = "WHOIS") : IRCDMessage(creator, mname, 1) { SetFlag(IRCDMESSAGE_SOFT_LIMIT); }
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> &params, const Anope::map<Anope::string> &tags) override;
};
+32 -19
View File
@@ -1,7 +1,7 @@
/* Mode support
*
* (C) 2008-2011 Adam <Adam@anope.org>
* (C) 2008-2023 Anope Team <team@anope.org>
* (C) 2008-2024 Anope Team <team@anope.org>
*
* Please read COPYING and README for further details.
*/
@@ -35,7 +35,8 @@ enum ModeClass
/** This class is the basis of all modes in Anope
*/
class CoreExport Mode : public Base
class CoreExport Mode
: public Base
{
public:
/* Mode name */
@@ -64,7 +65,8 @@ public:
/** This class is a user mode, all user modes use this/inherit from this
*/
class CoreExport UserMode : public Mode
class CoreExport UserMode
: public Mode
{
public:
/** constructor
@@ -74,7 +76,8 @@ public:
UserMode(const Anope::string &name, char mc);
};
class CoreExport UserModeParam : public UserMode
class CoreExport UserModeParam
: public UserMode
{
public:
/** constructor
@@ -92,7 +95,8 @@ public:
/** This class is a channel mode, all channel modes use this/inherit from this
*/
class CoreExport ChannelMode : public Mode
class CoreExport ChannelMode
: public Mode
{
public:
/* channel modes that can possibly unwrap this mode */
@@ -123,7 +127,8 @@ public:
/** This is a mode for lists, eg b/e/I. These modes should inherit from this
*/
class CoreExport ChannelModeList : public ChannelMode
class CoreExport ChannelModeList
: public ChannelMode
{
public:
/** constructor
@@ -161,7 +166,8 @@ public:
/** This is a mode with a parameter, eg +k/l. These modes should use/inherit from this
*/
class CoreExport ChannelModeParam : public ChannelMode
class CoreExport ChannelModeParam
: public ChannelMode
{
public:
/** constructor
@@ -183,7 +189,8 @@ public:
/** This is a mode that is a channel status, eg +v/h/o/a/q.
*/
class CoreExport ChannelModeStatus : public ChannelMode
class CoreExport ChannelModeStatus
: public ChannelMode
{
public:
/* The symbol, eg @ % + */
@@ -206,7 +213,8 @@ public:
* but we still have a representation for it.
*/
template<typename T>
class CoreExport ChannelModeVirtual : public T
class CoreExport ChannelModeVirtual
: public T
{
Anope::string base;
ChannelMode *basech;
@@ -224,7 +232,7 @@ public:
};
/* The status a user has on a channel (+v, +h, +o) etc */
class CoreExport ChannelStatus
class CoreExport ChannelStatus final
{
Anope::string modes;
public:
@@ -239,7 +247,8 @@ public:
Anope::string BuildModePrefixList() const;
};
class CoreExport UserModeOperOnly : public UserMode
class CoreExport UserModeOperOnly
: public UserMode
{
public:
UserModeOperOnly(const Anope::string &mname, char um) : UserMode(mname, um) { }
@@ -247,7 +256,8 @@ public:
bool CanSet(User *u) const override;
};
class CoreExport UserModeNoone : public UserMode
class CoreExport UserModeNoone
: public UserMode
{
public:
UserModeNoone(const Anope::string &mname, char um) : UserMode(mname, um) { }
@@ -257,7 +267,8 @@ public:
/** Channel mode +k (key)
*/
class CoreExport ChannelModeKey : public ChannelModeParam
class CoreExport ChannelModeKey
: public ChannelModeParam
{
public:
ChannelModeKey(char mc) : ChannelModeParam("KEY", mc) { }
@@ -267,7 +278,8 @@ public:
/** This class is used for oper only channel modes
*/
class CoreExport ChannelModeOperOnly : public ChannelMode
class CoreExport ChannelModeOperOnly
: public ChannelMode
{
public:
ChannelModeOperOnly(const Anope::string &mname, char mc) : ChannelMode(mname, mc) { }
@@ -278,7 +290,8 @@ public:
/** This class is used for channel modes only servers may set
*/
class CoreExport ChannelModeNoone : public ChannelMode
class CoreExport ChannelModeNoone
: public ChannelMode
{
public:
ChannelModeNoone(const Anope::string &mname, char mc) : ChannelMode(mname, mc) { }
@@ -292,7 +305,7 @@ public:
* This also contains a mode stacker that will combine multiple modes and set
* them on a channel or user at once
*/
class CoreExport ModeManager
class CoreExport ModeManager final
{
public:
@@ -388,7 +401,7 @@ public:
/** Represents a mask set on a channel (b/e/I)
*/
class CoreExport Entry
class CoreExport Entry final
{
Anope::string name;
Anope::string mask;
@@ -406,9 +419,9 @@ public:
/** Get the banned mask for this entry
* @return The mask
*/
const Anope::string GetMask() const;
Anope::string GetMask() const;
const Anope::string GetNUHMask() const;
Anope::string GetNUHMask() const;
/** Check if this entry matches a user
* @param u The user
+1 -1
View File
@@ -1,6 +1,6 @@
/*
*
* (C) 2003-2023 Anope Team
* (C) 2003-2024 Anope Team
* Contact us at team@anope.org
*
* Please read COPYING and README for further details.
+20 -36
View File
@@ -1,6 +1,6 @@
/* Modular support
*
* (C) 2003-2023 Anope Team
* (C) 2003-2024 Anope Team
* Contact us at team@anope.org
*
* Please read COPYING and README for further details.
@@ -162,7 +162,7 @@ enum
};
typedef unsigned short ModType;
struct ModuleVersionC
struct ModuleVersionC final
{
int version_major, version_minor, version_patch;
};
@@ -170,7 +170,7 @@ struct ModuleVersionC
/** Returned by Module::GetVersion, used to see what version of Anope
* a module is compiled against.
*/
class ModuleVersion
class ModuleVersion final
{
private:
int version_major;
@@ -196,11 +196,15 @@ public:
int GetPatch() const;
};
class NotImplementedException : public CoreException { };
class CoreExport NotImplementedException final
: public CoreException
{
};
/** Every module in Anope is actually a class.
*/
class CoreExport Module : public Extensible
class CoreExport Module
: public Extensible
{
private:
bool permanent;
@@ -773,23 +777,6 @@ public:
*/
virtual void OnChangeCoreDisplay(NickCore *nc, const Anope::string &newdisplay) { throw NotImplementedException(); }
/** called from NickCore::ClearAccess()
* @param nc pointer to the NickCore
*/
virtual void OnNickClearAccess(NickCore *nc) { throw NotImplementedException(); }
/** Called when a user adds an entry to their access list
* @param nc The nick
* @param entry The entry
*/
virtual void OnNickAddAccess(NickCore *nc, const Anope::string &entry) { throw NotImplementedException(); }
/** Called from NickCore::EraseAccess()
* @param nc pointer to the NickCore
* @param entry The access mask
*/
virtual void OnNickEraseAccess(NickCore *nc, const Anope::string &entry) { throw NotImplementedException(); }
/** called from NickCore::ClearCert()
* @param nc pointer to the NickCore
*/
@@ -960,23 +947,26 @@ public:
* @param u The user sending the PRIVMSG
* @param bi The target of the PRIVMSG
* @param message The message
* @param tags Message tags
* @return EVENT_STOP to halt processing
*/
virtual EventReturn OnBotPrivmsg(User *u, BotInfo *bi, Anope::string &message) { throw NotImplementedException(); }
virtual EventReturn OnBotPrivmsg(User *u, BotInfo *bi, Anope::string &message, const Anope::map<Anope::string> &tags) { throw NotImplementedException(); }
/** Called when we receive a NOTICE for one of our clients
* @param u The user sending the NOTICE
* @param bi The target of the NOTICE
* @param tags Message tags
* @param message The message
*/
virtual void OnBotNotice(User *u, BotInfo *bi, Anope::string &message) { throw NotImplementedException(); }
virtual void OnBotNotice(User *u, BotInfo *bi, Anope::string &message, const Anope::map<Anope::string> &tags) { throw NotImplementedException(); }
/** Called when we receive a PRIVMSG for a registered channel we are in
* @param u The source of the message
* @param c The channel
* @param msg The message
* @param tags Message tags
*/
virtual void OnPrivmsg(User *u, Channel *c, Anope::string &msg) { throw NotImplementedException(); }
virtual void OnPrivmsg(User *u, Channel *c, Anope::string &msg, const Anope::map<Anope::string> &tags) { throw NotImplementedException(); }
/** Called when a message is logged
* @param l The log message
@@ -1047,9 +1037,10 @@ public:
* @param source The source of the message
* @param command The command being executed
* @param params Parameters
* @param tags Tags
* @return EVENT_STOP to prevent the protocol module from processing this message
*/
virtual EventReturn OnMessage(MessageSource &source, Anope::string &command, std::vector<Anope::string> &param) { throw NotImplementedException(); }
virtual EventReturn OnMessage(MessageSource &source, Anope::string &command, std::vector<Anope::string> &params, Anope::map<Anope::string> &tagss) { throw NotImplementedException(); }
/** Called to determine if a channel mode can be set by a user
* @param u The user
@@ -1071,13 +1062,6 @@ public:
* @return EVENT_STOP to force the user off of the nick
*/
virtual EventReturn OnNickValidate(User *u, NickAlias *na) { throw NotImplementedException(); }
/** Called when a certain user has to be unbanned on a certain channel.
* May be used to send protocol-specific messages.
* @param u The user to be unbanned
* @param c The channel that user has to be unbanned on
*/
virtual void OnChannelUnban(User *u, ChannelInfo *ci) { throw NotImplementedException(); }
};
enum Implementation
@@ -1095,7 +1079,7 @@ enum Implementation
I_OnCreateChan, I_OnDelChan, I_OnChannelCreate, I_OnChannelDelete, I_OnAkickAdd, I_OnAkickDel, I_OnCheckKick,
I_OnChanInfo, I_OnCheckPriv, I_OnGroupCheckPriv, I_OnNickDrop, I_OnNickGroup, I_OnNickIdentify,
I_OnUserLogin, I_OnNickLogout, I_OnNickRegister, I_OnNickConfirm, I_OnNickSuspend, I_OnNickUnsuspended, I_OnDelNick, I_OnNickCoreCreate,
I_OnDelCore, I_OnChangeCoreDisplay, I_OnNickClearAccess, I_OnNickAddAccess, I_OnNickEraseAccess, I_OnNickClearCert,
I_OnDelCore, I_OnChangeCoreDisplay, I_OnNickClearCert,
I_OnNickAddCert, I_OnNickEraseCert, I_OnNickInfo, I_OnBotInfo, I_OnCheckAuthentication, I_OnNickUpdate,
I_OnFingerprint, I_OnUserAway, I_OnInvite, I_OnDeleteVhost, I_OnSetVhost, I_OnSetDisplayedHost, I_OnMemoSend, I_OnMemoDel,
I_OnChannelModeSet, I_OnChannelModeUnset, I_OnUserModeSet, I_OnUserModeUnset, I_OnChannelModeAdd, I_OnUserModeAdd,
@@ -1103,13 +1087,13 @@ enum Implementation
I_OnPrivmsg, I_OnLog, I_OnLogMessage, I_OnDnsRequest, I_OnCheckModes, I_OnChannelSync, I_OnSetCorrectModes,
I_OnSerializeCheck, I_OnSerializableConstruct, I_OnSerializableDestruct, I_OnSerializableUpdate,
I_OnSerializeTypeCreate, I_OnSetChannelOption, I_OnSetNickOption, I_OnMessage, I_OnCanSet, I_OnCheckDelete,
I_OnExpireTick, I_OnNickValidate, I_OnChannelUnban,
I_OnExpireTick, I_OnNickValidate,
I_SIZE
};
/** Used to manage modules.
*/
class CoreExport ModuleManager
class CoreExport ModuleManager final
{
public:
/** Event handler hooks.
+3 -3
View File
@@ -1,6 +1,6 @@
/* BotServ core functions
*
* (C) 2003-2023 Anope Team
* (C) 2003-2024 Anope Team
* Contact us at team@anope.org
*
* Please read COPYING and README for further details.
@@ -46,13 +46,13 @@ struct BadWords
* @param type The type (SINGLE START END)
* @return The badword
*/
virtual BadWord* AddBadWord(const Anope::string &word, BadWordType type) = 0;
virtual BadWord *AddBadWord(const Anope::string &word, BadWordType type) = 0;
/** Get a badword structure by index
* @param index The index
* @return The badword
*/
virtual BadWord* GetBadWord(unsigned index) const = 0;
virtual BadWord *GetBadWord(unsigned index) const = 0;
/** Get how many badwords are on this channel
* @return The number of badwords in the vector
+1 -1
View File
@@ -1,6 +1,6 @@
/* BotServ core functions
*
* (C) 2003-2023 Anope Team
* (C) 2003-2024 Anope Team
* Contact us at team@anope.org
*
* Please read COPYING and README for further details.
+4 -3
View File
@@ -1,6 +1,6 @@
/*
*
* (C) 2003-2023 Anope Team
* (C) 2003-2024 Anope Team
* Contact us at team@anope.org
*
* Please read COPYING and README for further details.
@@ -20,7 +20,8 @@ protected:
EntryMsg() = default;
};
struct EntryMessageList : Serialize::Checker<std::vector<EntryMsg *> >
struct EntryMessageList
: Serialize::Checker<std::vector<EntryMsg *> >
{
protected:
EntryMessageList() : Serialize::Checker<std::vector<EntryMsg *> >("EntryMsg") { }
@@ -32,5 +33,5 @@ public:
delete (*this)->at(i - 1);
}
virtual EntryMsg* Create() = 0;
virtual EntryMsg *Create() = 0;
};
+3 -2
View File
@@ -1,6 +1,6 @@
/* ChanServ core functions
*
* (C) 2003-2023 Anope Team
* (C) 2003-2024 Anope Team
* Contact us at team@anope.org
*
* Please read COPYING and README for further details.
@@ -29,7 +29,8 @@ protected:
LogSetting() = default;
};
struct LogSettings : Serialize::Checker<std::vector<LogSetting *> >
struct LogSettings
: Serialize::Checker<std::vector<LogSetting *> >
{
typedef std::vector<LogSetting *>::iterator iterator;
+1 -1
View File
@@ -1,6 +1,6 @@
/* ChanServ core functions
*
* (C) 2003-2023 Anope Team
* (C) 2003-2024 Anope Team
* Contact us at team@anope.org
*
* Please read COPYING and README for further details.
+18 -8
View File
@@ -1,6 +1,6 @@
/*
*
* (C) 2003-2023 Anope Team
* (C) 2003-2024 Anope Team
* Contact us at team@anope.org
*
* Please read COPYING and README for further details.
@@ -79,7 +79,7 @@ namespace DNS
Question(const Anope::string &n, QueryType t, unsigned short c = 1) : name(n), type(t), qclass(c) { }
inline bool operator==(const Question & other) const { return name == other.name && type == other.type && qclass == other.qclass; }
struct hash
struct hash final
{
size_t operator()(const Question &q) const
{
@@ -88,7 +88,8 @@ namespace DNS
};
};
struct ResourceRecord : Question
struct ResourceRecord final
: Question
{
unsigned int ttl = 0;
Anope::string rdata;
@@ -113,7 +114,8 @@ namespace DNS
/** DNS manager
*/
class Manager : public Service
class Manager
: public Service
{
public:
Manager(Module *creator) : Service(creator, "DNS::Manager", "dns/manager") { }
@@ -131,7 +133,9 @@ namespace DNS
/** A DNS query.
*/
class Request : public Timer, public Question
class Request
: public Timer
, public Question
{
Manager *manager;
public:
@@ -142,8 +146,14 @@ namespace DNS
/* Creator of this request */
Module *creator;
Request(Manager *mgr, Module *c, const Anope::string &addr, QueryType qt, bool cache = false) : Timer(0), Question(addr, qt), manager(mgr),
use_cache(cache), creator(c) { }
Request(Manager *mgr, Module *c, const Anope::string &addr, QueryType qt, bool cache = false)
: Timer(0)
, Question(addr, qt)
, manager(mgr)
, use_cache(cache)
, creator(c)
{
}
virtual ~Request()
{
@@ -163,7 +173,7 @@ namespace DNS
/** Used to time out the query, xalls OnError and lets the TimerManager
* delete this request.
*/
void Tick(time_t) override
void Tick() override
{
Log(LOG_DEBUG_2) << "Resolver: timeout for query " << this->name;
Query rr(*this);
+3 -2
View File
@@ -1,6 +1,6 @@
/*
*
* (C) 2003-2023 Anope Team
* (C) 2003-2024 Anope Team
* Contact us at team@anope.org
*
* Please read COPYING and README for further details.
@@ -25,7 +25,8 @@ namespace Encryption
virtual Hash GetFinalizedHash() = 0;
};
class Provider : public Service
class Provider
: public Service
{
public:
Provider(Module *creator, const Anope::string &sname) : Service(creator, "Encryption::Provider", sname) { }
+17 -11
View File
@@ -1,6 +1,6 @@
/*
*
* (C) 2012-2023 Anope Team
* (C) 2012-2024 Anope Team
* Contact us at team@anope.org
*
* Please read COPYING and README for further details.
@@ -18,7 +18,7 @@ enum HTTPError
};
/* A message to someone */
struct HTTPReply
struct HTTPReply final
{
HTTPError error = HTTP_ERROR_OK;
Anope::string content_type;
@@ -27,9 +27,9 @@ struct HTTPReply
std::vector<cookie> cookies;
HTTPReply() = default;
HTTPReply& operator=(const HTTPReply &) = default;
HTTPReply &operator=(const HTTPReply &) = default;
HTTPReply(const HTTPReply& other) : error(other.error), length(other.length)
HTTPReply(const HTTPReply &other) : error(other.error), length(other.length)
{
content_type = other.content_type;
headers = other.headers;
@@ -46,7 +46,7 @@ struct HTTPReply
out.clear();
}
struct Data
struct Data final
{
char *buf;
size_t len;
@@ -81,7 +81,7 @@ struct HTTPReply
};
/* A message from someone */
struct HTTPMessage
struct HTTPMessage final
{
std::map<Anope::string, Anope::string> headers;
std::map<Anope::string, Anope::string> cookies;
@@ -93,7 +93,8 @@ struct HTTPMessage
class HTTPClient;
class HTTPProvider;
class HTTPPage : public virtual Base
class HTTPPage
: public virtual Base
{
Anope::string url;
Anope::string content_type;
@@ -115,7 +116,10 @@ public:
virtual bool OnRequest(HTTPProvider *, const Anope::string &, HTTPClient *, HTTPMessage &, HTTPReply &) = 0;
};
class HTTPClient : public ClientSocket, public BinarySocket, public Base
class HTTPClient
: public ClientSocket
, public BinarySocket
, public Base
{
protected:
void WriteClient(const Anope::string &message)
@@ -135,7 +139,9 @@ public:
virtual void SendReply(HTTPReply *) = 0;
};
class HTTPProvider : public ListenSocket, public Service
class HTTPProvider
: public ListenSocket
, public Service
{
Anope::string ip;
unsigned short port;
@@ -163,7 +169,7 @@ public:
virtual bool RegisterPage(HTTPPage *page) = 0;
virtual void UnregisterPage(HTTPPage *page) = 0;
virtual HTTPPage* FindPage(const Anope::string &name) = 0;
virtual HTTPPage *FindPage(const Anope::string &name) = 0;
};
namespace HTTPUtils
@@ -174,7 +180,7 @@ namespace HTTPUtils
for (unsigned i = 0; i < url.length(); ++i)
{
const char& c = url[i];
const char &c = url[i];
if (c == '%' && i + 2 < url.length())
{
+8 -6
View File
@@ -1,6 +1,6 @@
/*
*
* (C) 2011-2023 Anope Team
* (C) 2011-2024 Anope Team
* Contact us at team@anope.org
*
* Please read COPYING and README for further details.
@@ -8,7 +8,7 @@
#pragma once
class LDAPException : public ModuleException
class DllExport LDAPException : public ModuleException
{
public:
LDAPException(const Anope::string &reason) : ModuleException(reason) { }
@@ -16,7 +16,7 @@ public:
virtual ~LDAPException() noexcept = default;
};
struct LDAPModification
struct LDAPModification final
{
enum LDAPOperation
{
@@ -31,7 +31,8 @@ struct LDAPModification
};
typedef std::vector<LDAPModification> LDAPMods;
struct LDAPAttributes : public std::map<Anope::string, std::vector<Anope::string> >
struct LDAPAttributes final
: public std::map<Anope::string, std::vector<Anope::string>>
{
size_t size(const Anope::string &attr) const
{
@@ -74,7 +75,7 @@ enum QueryType
QUERY_MODIFY
};
struct LDAPResult
struct LDAPResult final
{
std::vector<LDAPAttributes> messages;
Anope::string error;
@@ -122,7 +123,8 @@ public:
virtual void OnDelete() { }
};
class LDAPProvider : public Service
class LDAPProvider
: public Service
{
public:
LDAPProvider(Module *c, const Anope::string &n) : Service(c, "LDAPProvider", n) { }
+13 -3
View File
@@ -1,6 +1,6 @@
/* NickServ core functions
*
* (C) 2003-2023 Anope Team
* (C) 2003-2024 Anope Team
* Contact us at team@anope.org
*
* Please read COPYING and README for further details.
@@ -54,6 +54,15 @@ public:
*/
virtual void EraseCert(const Anope::string &entry) = 0;
/** Replaces a fingerprint in the nick's certificate list
*
* @param oldentry The old fingerprint to remove
* @param newentry The new fingerprint to add
*
* Replaces the specified fingerprint in the cert list.
*/
virtual void ReplaceCert(const Anope::string &oldentry, const Anope::string &newentry) = 0;
/** Clears the entire nick's cert list
*
* Deletes all the memory allocated in the certificate list vector and then clears the vector.
@@ -63,10 +72,11 @@ public:
virtual void Check() = 0;
};
class CertService : public Service
class CertService
: public Service
{
public:
CertService(Module *c) : Service(c, "CertService", "certs") { }
virtual NickCore* FindAccountFromCert(const Anope::string &cert) = 0;
virtual NickCore *FindAccountFromCert(const Anope::string &cert) = 0;
};
+4 -3
View File
@@ -1,6 +1,6 @@
/*
*
* (C) 2011-2023 Anope Team
* (C) 2011-2024 Anope Team
* Contact us at team@anope.org
*
* Please read COPYING and README for further details.
@@ -31,7 +31,8 @@ protected:
ForbidData() = default;
};
class ForbidService : public Service
class ForbidService
: public Service
{
public:
ForbidService(Module *m) : Service(m, "ForbidService", "forbid") { }
@@ -40,7 +41,7 @@ public:
virtual void RemoveForbid(ForbidData *d) = 0;
virtual ForbidData* CreateForbid() = 0;
virtual ForbidData *CreateForbid() = 0;
virtual ForbidData *FindForbid(const Anope::string &mask, ForbidType type) = 0;
+3 -2
View File
@@ -1,6 +1,6 @@
/* OperServ ignore interface
*
* (C) 2003-2023 Anope Team
* (C) 2003-2024 Anope Team
* Contact us at team@anope.org
*
* Please read COPYING and README for further details.
@@ -23,7 +23,8 @@ protected:
IgnoreData() = default;
};
class IgnoreService : public Service
class IgnoreService
: public Service
{
protected:
IgnoreService(Module *c) : Service(c, "IgnoreService", "ignore") { }
+6 -4
View File
@@ -1,6 +1,6 @@
/*
*
* (C) 2011-2023 Anope Team
* (C) 2011-2024 Anope Team
* Contact us at team@anope.org
*
* Please read COPYING and README for further details.
@@ -15,14 +15,15 @@ enum NewsType
NEWS_OPER
};
struct NewsMessages
struct NewsMessages final
{
NewsType type;
Anope::string name;
const char *msgs[10];
};
struct NewsItem : Serializable
struct NewsItem
: Serializable
{
NewsType type;
Anope::string text;
@@ -32,7 +33,8 @@ struct NewsItem : Serializable
NewsItem() : Serializable("NewsItem") { }
};
class NewsService : public Service
class NewsService
: public Service
{
public:
NewsService(Module *m) : Service(m, "NewsService", "news") { }
+8 -6
View File
@@ -1,6 +1,6 @@
/*
*
* (C) 2011-2023 Anope Team
* (C) 2011-2024 Anope Team
* Contact us at team@anope.org
*
* Please read COPYING and README for further details.
@@ -8,7 +8,7 @@
#pragma once
struct Session
struct Session final
{
cidr addr; /* A cidr (sockaddrs + len) representing this session */
unsigned count = 1; /* Number of clients with this host */
@@ -17,7 +17,8 @@ struct Session
Session(const sockaddrs &ip, int len) : addr(ip, len) { }
};
struct Exception : Serializable
struct Exception final
: Serializable
{
Anope::string mask; /* Hosts to which this exception applies */
unsigned limit; /* Session limit for exception */
@@ -28,10 +29,11 @@ struct Exception : Serializable
Exception() : Serializable("Exception") { }
void Serialize(Serialize::Data &data) const override;
static Serializable* Unserialize(Serializable *obj, Serialize::Data &data);
static Serializable *Unserialize(Serializable *obj, Serialize::Data &data);
};
class SessionService : public Service
class SessionService
: public Service
{
public:
typedef std::unordered_map<cidr, Session *, cidr::hash> SessionMap;
@@ -68,7 +70,7 @@ void Exception::Serialize(Serialize::Data &data) const
data["expires"] << this->expires;
}
Serializable* Exception::Unserialize(Serializable *obj, Serialize::Data &data)
Serializable *Exception::Unserialize(Serializable *obj, Serialize::Data &data)
{
if (!session_service)
return NULL;
+3 -2
View File
@@ -1,6 +1,6 @@
/*
*
* (C) 2011-2023 Anope Team
* (C) 2011-2024 Anope Team
* Contact us at team@anope.org
*
* Please read COPYING and README for further details.
@@ -8,7 +8,8 @@
#pragma once
class ChanServService : public Service
class ChanServService
: public Service
{
public:
ChanServService(Module *m) : Service(m, "ChanServService", "ChanServ")
+3 -2
View File
@@ -1,6 +1,6 @@
/*
*
* (C) 2011-2023 Anope Team
* (C) 2011-2024 Anope Team
* Contact us at team@anope.org
*
* Please read COPYING and README for further details.
@@ -8,7 +8,8 @@
#pragma once
class GlobalService : public Service
class GlobalService
: public Service
{
public:
GlobalService(Module *m) : Service(m, "GlobalService", "Global")
+3 -2
View File
@@ -1,6 +1,6 @@
/*
*
* (C) 2011-2023 Anope Team
* (C) 2011-2024 Anope Team
* Contact us at team@anope.org
*
* Please read COPYING and README for further details.
@@ -8,7 +8,8 @@
#pragma once
class MemoServService : public Service
class MemoServService
: public Service
{
public:
enum MemoResult
+3 -2
View File
@@ -1,6 +1,6 @@
/*
*
* (C) 2011-2023 Anope Team
* (C) 2011-2024 Anope Team
* Contact us at team@anope.org
*
* Please read COPYING and README for further details.
@@ -8,7 +8,8 @@
#pragma once
class NickServService : public Service
class NickServService
: public Service
{
public:
NickServService(Module *m) : Service(m, "NickServService", "NickServ")
+4 -3
View File
@@ -1,6 +1,6 @@
/*
*
* (C) 2003-2023 Anope Team
* (C) 2003-2024 Anope Team
* Contact us at team@anope.org
*
* Please read COPYING and README for further details.
@@ -10,7 +10,7 @@
namespace Redis
{
struct Reply
struct Reply final
{
enum Type
{
@@ -55,7 +55,8 @@ namespace Redis
virtual void OnError(const Anope::string &error) { Log(owner) << error; }
};
class Provider : public Service
class Provider
: public Service
{
public:
Provider(Module *c, const Anope::string &n) : Service(c, "Redis::Provider", n) { }
+10 -7
View File
@@ -1,6 +1,6 @@
/*
*
* (C) 2014-2023 Anope Team
* (C) 2014-2024 Anope Team
* Contact us at team@anope.org
*
* Please read COPYING and README for further details.
@@ -10,7 +10,7 @@
namespace SASL
{
struct Message
struct Message final
{
Anope::string source;
Anope::string target;
@@ -22,7 +22,8 @@ namespace SASL
class Mechanism;
struct Session;
class Service : public ::Service
class Service
: public ::Service
{
public:
Service(Module *o) : ::Service(o, "SASL::Service", "sasl") { }
@@ -31,7 +32,7 @@ namespace SASL
virtual Anope::string GetAgent() = 0;
virtual Session* GetSession(const Anope::string &uid) = 0;
virtual Session *GetSession(const Anope::string &uid) = 0;
virtual void SendMessage(SASL::Session *session, const Anope::string &type, const Anope::string &data) = 0;
@@ -60,12 +61,13 @@ namespace SASL
};
/* PLAIN, EXTERNAL, etc */
class Mechanism : public ::Service
class Mechanism
: public ::Service
{
public:
Mechanism(Module *o, const Anope::string &sname) : Service(o, "SASL::Mechanism", sname) { }
virtual Session* CreateSession(const Anope::string &uid) { return new Session(this, uid); }
virtual Session *CreateSession(const Anope::string &uid) { return new Session(this, uid); }
virtual void ProcessMessage(Session *session, const Message &) = 0;
@@ -76,7 +78,8 @@ namespace SASL
}
};
class IdentifyRequest : public ::IdentifyRequest
class IdentifyRequest
: public ::IdentifyRequest
{
Anope::string uid;
Anope::string hostname, ip;
+1 -1
View File
@@ -1,6 +1,6 @@
/*
*
* (C) 2003-2023 Anope Team
* (C) 2003-2024 Anope Team
* Contact us at team@anope.org
*
* Please read COPYING and README for further details.
+11 -9
View File
@@ -1,6 +1,6 @@
/*
*
* (C) 2003-2023 Anope Team
* (C) 2003-2024 Anope Team
* Contact us at team@anope.org
*
* Please read COPYING and README for further details.
@@ -11,7 +11,8 @@
namespace SQL
{
class Data : public Serialize::Data
class Data final
: public Serialize::Data
{
public:
typedef std::map<Anope::string, std::stringstream *> Map;
@@ -23,7 +24,7 @@ namespace SQL
Clear();
}
std::iostream& operator[](const Anope::string &key) override
std::iostream &operator[](const Anope::string &key) override
{
std::stringstream *&ss = data[key];
if (!ss)
@@ -81,7 +82,7 @@ namespace SQL
/** A SQL exception, can be thrown at various points
*/
class Exception : public ModuleException
class DllExport Exception : public ModuleException
{
public:
Exception(const Anope::string &reason) : ModuleException(reason) { }
@@ -92,13 +93,13 @@ namespace SQL
/** A SQL query
*/
struct QueryData
struct QueryData final
{
Anope::string data;
bool escape;
};
struct Query
struct Query final
{
Anope::string query;
std::map<Anope::string, QueryData> parameters;
@@ -106,7 +107,7 @@ namespace SQL
Query() { }
Query(const Anope::string &q) : query(q) { }
Query& operator=(const Anope::string &q)
Query &operator=(const Anope::string &q)
{
this->query = q;
this->parameters.clear();
@@ -123,7 +124,7 @@ namespace SQL
return !(*this == other);
}
template<typename T> void SetValue(const Anope::string &key, const T& value, bool escape = true)
template<typename T> void SetValue(const Anope::string &key, const T &value, bool escape = true)
{
try
{
@@ -199,7 +200,8 @@ namespace SQL
/** Class providing the SQL service, modules call this to execute queries
*/
class Provider : public Service
class Provider
: public Service
{
public:
Provider(Module *c, const Anope::string &n) : Service(c, "SQL::Provider", n) { }
+3 -2
View File
@@ -1,6 +1,6 @@
/*
*
* (C) 2010-2023 Anope Team
* (C) 2010-2024 Anope Team
* Contact us at team@anope.org
*
* Please read COPYING and README for further details.
@@ -8,7 +8,8 @@
#pragma once
class SSLService : public Service
class SSLService
: public Service
{
public:
SSLService(Module *o, const Anope::string &n) : Service(o, "SSLService", n) { }
+1 -1
View File
@@ -1,6 +1,6 @@
/*
*
* (C) 2003-2023 Anope Team
* (C) 2003-2024 Anope Team
* Contact us at team@anope.org
*
* Please read COPYING and README for further details.
+5 -4
View File
@@ -1,6 +1,6 @@
/*
*
* (C) 2010-2023 Anope Team
* (C) 2010-2024 Anope Team
* Contact us at team@anope.org
*
* Please read COPYING and README for further details.
@@ -10,7 +10,7 @@
#include "httpd.h"
class XMLRPCRequest
class XMLRPCRequest final
{
std::map<Anope::string, Anope::string> replies;
@@ -18,7 +18,7 @@ public:
Anope::string name;
Anope::string id;
std::deque<Anope::string> data;
HTTPReply& r;
HTTPReply &r;
XMLRPCRequest(HTTPReply &_r) : r(_r) { }
inline void reply(const Anope::string &dname, const Anope::string &ddata) { this->replies.emplace(dname, ddata); }
@@ -34,7 +34,8 @@ public:
virtual bool Run(XMLRPCServiceInterface *iface, HTTPClient *client, XMLRPCRequest &request) = 0;
};
class XMLRPCServiceInterface : public Service
class XMLRPCServiceInterface
: public Service
{
public:
XMLRPCServiceInterface(Module *creator, const Anope::string &sname) : Service(creator, "XMLRPCServiceInterface", sname) { }
+35
View File
@@ -0,0 +1,35 @@
/*
*
* (C) 2003-2024 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.
*/
#pragma once
enum
{
RPL_STATSLINKINFO = 211,
RPL_ENDOFSTATS = 219,
RPL_STATSUPTIME = 242,
RPL_STATSOLINE = 243,
RPL_STATSCONN = 250,
RPL_WHOISREGNICK = 307,
RPL_WHOISUSER = 311,
RPL_WHOISSERVER = 312,
RPL_WHOISOPERATOR = 313,
RPL_WHOISIDLE = 317,
RPL_ENDOFWHOIS = 318,
RPL_VERSION = 351,
RPL_MOTD = 372,
RPL_MOTDSTART = 375,
RPL_ENDOFMOTD = 376,
RPL_YOUREOPER = 381,
RPL_TIME = 391,
ERR_NOSUCHNICK = 401,
ERR_NOMOTD = 422,
};
+5 -5
View File
@@ -1,7 +1,7 @@
/*
*
* (C) 2008-2011 Robin Burchell <w00t@inspircd.org>
* (C) 2008-2023 Anope Team <team@anope.org>
* (C) 2008-2024 Anope Team <team@anope.org>
*
* Please read COPYING and README for further details.
*/
@@ -23,7 +23,7 @@ struct CoreExport Oper
/* Whether the user must be an IRC operator (umode +o) to be considered a services operator */
bool require_oper = true;
Anope::string password;
Anope::string certfp;
std::vector<Anope::string> certfp;
/* Hosts allowed to use this operator block */
std::vector<Anope::string> hosts;
Anope::string vhost;
@@ -40,7 +40,7 @@ struct CoreExport Oper
static Oper *Find(const Anope::string &name);
};
class CoreExport OperType
class CoreExport OperType final
{
private:
/** The name of this opertype, e.g. "sra".
@@ -115,10 +115,10 @@ public:
/** Gets the icommands for this opertype
* @return A list of commands
*/
const std::list<Anope::string> GetCommands() const;
std::list<Anope::string> GetCommands() const;
/** Gets the privileges for this opertype
* @return A list of privileges
*/
const std::list<Anope::string> GetPrivs() const;
std::list<Anope::string> GetPrivs() const;
};
+161 -66
View File
@@ -1,6 +1,6 @@
/*
*
* (C) 2003-2023 Anope Team
* (C) 2003-2024 Anope Team
* Contact us at team@anope.org
*
* Please read COPYING and README for further details.
@@ -17,63 +17,93 @@
#include "modes.h"
/* Encapsulates the IRCd protocol we are speaking. */
class CoreExport IRCDProto : public Service
class CoreExport IRCDProto
: public Service
{
Anope::string proto_name;
protected:
IRCDProto(Module *creator, const Anope::string &proto_name);
public:
/** Retrieves the protocol name. */
const Anope::string &GetProtocolName() const { return proto_name; }
virtual ~IRCDProto();
virtual void SendSVSKillInternal(const MessageSource &, User *, const Anope::string &);
virtual void SendModeInternal(const MessageSource &, const Channel *, const Anope::string &);
virtual void SendModeInternal(const MessageSource &, User *, const Anope::string &);
virtual void SendKickInternal(const MessageSource &, const Channel *, User *, const Anope::string &);
virtual void SendNoticeInternal(const MessageSource &, const Anope::string &dest, const Anope::string &msg);
virtual void SendPrivmsgInternal(const MessageSource &, const Anope::string &dest, const Anope::string &buf);
virtual void SendQuitInternal(User *, const Anope::string &buf);
virtual void SendPartInternal(User *, const Channel *chan, const Anope::string &buf);
virtual void SendGlobopsInternal(const MessageSource &, const Anope::string &buf);
virtual void SendNoticeInternal(const MessageSource &, const Anope::string &dest, const Anope::string &msg, const Anope::map<Anope::string> &tags = {});
virtual void SendPrivmsgInternal(const MessageSource &, const Anope::string &dest, const Anope::string &msg, const Anope::map<Anope::string> &tags = {});
virtual void SendCTCPInternal(const MessageSource &, const Anope::string &dest, const Anope::string &buf);
virtual void SendNumericInternal(int numeric, const Anope::string &dest, const Anope::string &buf);
const Anope::string &GetProtocolName();
virtual bool Parse(const Anope::string &, Anope::map<Anope::string> &, Anope::string &, Anope::string &, std::vector<Anope::string> &);
virtual Anope::string Format(const Anope::string &source, const Anope::string &message);
/** Parses an incoming message from the IRC server.
* @param message The message to parse.
* @param tags The location to store tags.
* @param source The location to store the source.
* @param command The location to store the command name.
* @param params The location to store the parameters.
* @return If the message was well formed then true; otherwise, false.
*/
virtual bool Parse(const Anope::string &message, Anope::map<Anope::string> &tags, Anope::string &source, Anope::string &command, std::vector<Anope::string> &params);
/* Formats an outgoing message so it can be sent to the IRC server.
* @param message The location to store the formatted message.
* @param tags IRCv3 message tags.
* @param source Source of the message.
* @param command Command name.
* @param params Any extra parameters.
* @return If the message was formatted then true; otherwise, false.
*/
virtual bool Format(Anope::string &message, const Anope::map<Anope::string> &tags, const MessageSource &source, const Anope::string &command, const std::vector<Anope::string> &params);
/* Modes used by default by our clients */
Anope::string DefaultPseudoclientModes;
Anope::string DefaultPseudoclientModes = "+io";
/* Can we force change a users's nick? */
bool CanSVSNick;
bool CanSVSNick = false;
/* Can we force join or part users? */
bool CanSVSJoin;
/* Can we set vhosts/vidents on users? */
bool CanSetVHost, CanSetVIdent;
bool CanSVSJoin = false;
/* Can we set vhosts on users? */
bool CanSetVHost = false;
/* Can we set vidents on users? */
bool CanSetVIdent = false;
/* Can we ban specific gecos from being used? */
bool CanSNLine;
bool CanSNLine = false;
/* Can we ban specific nicknames from being used? */
bool CanSQLine;
bool CanSQLine = false;
/* Can we ban specific channel names from being used? */
bool CanSQLineChannel;
bool CanSQLineChannel = false;
/* Can we ban by IP? */
bool CanSZLine;
bool CanSZLine = false;
/* Can we place temporary holds on specific nicknames? */
bool CanSVSHold;
bool CanSVSHold = false;
/* See ns_cert */
bool CanCertFP;
/* Can we send arbitrary message tags? */
bool CanSendTags;
bool CanCertFP = false;
/* Can users log out before being fully connected? */
bool CanSVSLogout;
bool CanSVSLogout = false;
/* Whether this IRCd requires unique IDs for each user or server. See TS6/P10. */
bool RequiresID;
bool RequiresID = false;
/* If this IRCd has unique ids, whether the IDs and nicknames are ambiguous */
bool AmbiguousID;
bool AmbiguousID = false;
/** Can we ask the server to unban a user? */
bool CanClearBans = false;
/* The maximum number of modes we are allowed to set with one MODE command */
unsigned MaxModes;
unsigned MaxModes = 3;
/* The maximum number of bytes a line may have */
unsigned MaxLine;
unsigned MaxLine = 512;
/* Retrieves the next free UID or SID */
virtual Anope::string UID_Retrieve();
@@ -126,29 +156,43 @@ public:
/** Kills a user
* @param source Who is doing the kill
* @param user The user to be killed
* @param fmt Kill reason
* @param msg Kill reason
*/
virtual void SendSVSKill(const MessageSource &source, User *user, const char *fmt, ...);
virtual void SendSVSKill(const MessageSource &source, User *user, const Anope::string &msg);
virtual void SendMode(const MessageSource &source, const Channel *dest, const char *fmt, ...);
virtual void SendMode(const MessageSource &source, User *u, const char *fmt, ...);
virtual void SendModeInternal(const MessageSource &source, Channel *chan, const Anope::string &modes, const std::vector<Anope::string> &values);
template <typename... Args>
void SendMode(const MessageSource &source, Channel *chan, const Anope::string &modes, Args &&...args)
{
SendModeInternal(source, chan, modes, { stringify(args)... });
}
virtual void SendModeInternal(const MessageSource &source, User *u, const Anope::string &modes, const std::vector<Anope::string> &values);
template <typename... Args>
void SendMode(const MessageSource &source, User *u, const Anope::string &modes, Args &&...args)
{
SendModeInternal(source, u, modes, { stringify(args)... });
}
/** Introduces a client to the rest of the network
* @param u The client to introduce
*/
virtual void SendClientIntroduction(User *u) = 0;
virtual void SendKick(const MessageSource &source, const Channel *chan, User *user, const char *fmt, ...);
virtual void SendKick(const MessageSource &source, const Channel *chan, User *user, const Anope::string &msg);
virtual void SendNotice(const MessageSource &source, const Anope::string &dest, const char *fmt, ...);
virtual void SendPrivmsg(const MessageSource &source, const Anope::string &dest, const char *fmt, ...);
virtual void SendAction(const MessageSource &source, const Anope::string &dest, const char *fmt, ...);
virtual void SendCTCP(const MessageSource &source, const Anope::string &dest, const char *fmt, ...);
virtual void SendNotice(const MessageSource &source, const Anope::string &dest, const char *fmt, ...) ATTR_FORMAT(4, 5);
virtual void SendPrivmsg(const MessageSource &source, const Anope::string &dest, const char *fmt, ...) ATTR_FORMAT(4, 5);
virtual void SendAction(const MessageSource &source, const Anope::string &dest, const char *fmt, ...) ATTR_FORMAT(4, 5);
virtual void SendCTCP(const MessageSource &source, const Anope::string &dest, const char *fmt, ...) ATTR_FORMAT(4, 5);
virtual void SendGlobalNotice(BotInfo *bi, const Server *dest, const Anope::string &msg) = 0;
virtual void SendGlobalPrivmsg(BotInfo *bi, const Server *desc, const Anope::string &msg) = 0;
virtual void SendQuit(User *u, const char *fmt, ...);
virtual void SendContextNotice(BotInfo *bi, User *target, Channel *context, const Anope::string &msg);
virtual void SendContextPrivmsg(BotInfo *bi, User *target, Channel *context, const Anope::string &msg);
virtual void SendQuit(User *u, const Anope::string &msg);
virtual void SendPing(const Anope::string &servname, const Anope::string &who);
virtual void SendPong(const Anope::string &servname, const Anope::string &who);
@@ -160,7 +204,7 @@ public:
* stacker to be set "soon".
*/
virtual void SendJoin(User *u, Channel *c, const ChannelStatus *status) = 0;
virtual void SendPart(User *u, const Channel *chan, const char *fmt, ...);
virtual void SendPart(User *u, const Channel *chan, const Anope::string &msg);
/** Force joins a user that isn't ours to a channel.
* @param bi The source of the message
@@ -179,7 +223,7 @@ public:
virtual void SendSVSPart(const MessageSource &source, User *u, const Anope::string &chan, const Anope::string &param) { }
virtual void SendInvite(const MessageSource &source, const Channel *c, User *u);
virtual void SendGlobops(const MessageSource &source, const char *fmt, ...);
virtual void SendGlobops(const MessageSource &source, const Anope::string &msg);
/** Sends a nick change of one of our clients.
*/
@@ -210,7 +254,12 @@ public:
virtual void SendServer(const Server *) = 0;
virtual void SendSquit(Server *, const Anope::string &message);
virtual void SendNumeric(int numeric, const Anope::string &dest, const char *fmt, ...);
virtual void SendNumericInternal(int numeric, const Anope::string &dest, const std::vector<Anope::string> &params);
template <typename... Args>
void SendNumeric(int numeric, const Anope::string &dest, Args &&...args)
{
SendNumericInternal(numeric, dest, { stringify(args)... });
}
virtual void SendLogin(User *u, NickAlias *na) = 0;
virtual void SendLogout(User *u) = 0;
@@ -225,6 +274,8 @@ public:
*/
virtual void SendOper(User *u);
virtual void SendClearBans(const MessageSource &user, Channel *c, User* u) { }
virtual void SendSASLMechanisms(std::vector<Anope::string> &) { }
virtual void SendSASLMessage(const SASL::Message &) { }
virtual void SendSVSLogin(const Anope::string &uid, NickAlias *na) { }
@@ -234,24 +285,36 @@ public:
virtual bool IsIdentValid(const Anope::string &);
virtual bool IsHostValid(const Anope::string &);
virtual bool IsExtbanValid(const Anope::string &) { return false; }
virtual bool IsTagValid(const Anope::string &, const Anope::string &) { return false; }
/** Retrieve the maximum number of list modes settable on this channel
* Defaults to Config->ListSize
*/
virtual unsigned GetMaxListFor(Channel *c);
virtual unsigned GetMaxListFor(Channel *c, ChannelMode *cm);
virtual size_t GetMaxListFor(Channel *c, ChannelMode *cm);
virtual Anope::string NormalizeMask(const Anope::string &mask);
/** Retrieves the maximum length of a channel name. */
virtual size_t GetMaxChannel();
/** Retrieves the maximum length of a hostname. */
virtual size_t GetMaxHost();
/** Retrieves the maximum length of a nickname. */
virtual size_t GetMaxNick();
/** Retrieves the maximum length of a username. */
virtual size_t GetMaxUser();
};
class CoreExport MessageSource
class CoreExport MessageSource final
{
Anope::string source;
User *u = nullptr;
Server *s = nullptr;
public:
MessageSource(const Anope::string &);
explicit MessageSource(const Anope::string &);
MessageSource(User *u);
MessageSource(Server *s);
const Anope::string &GetName() const;
@@ -261,29 +324,61 @@ public:
Server *GetServer() const;
};
enum IRCDMessageFlag
{
IRCDMESSAGE_SOFT_LIMIT,
IRCDMESSAGE_REQUIRE_SERVER,
IRCDMESSAGE_REQUIRE_USER
};
class CoreExport IRCDMessage : public Service
/** Base class for protocol module message handlers. */
class CoreExport IRCDMessage
: public Service
{
Anope::string name;
unsigned param_count;
std::set<IRCDMessageFlag> flags;
public:
IRCDMessage(Module *owner, const Anope::string &n, unsigned p = 0);
unsigned GetParamCount() const;
virtual void Run(MessageSource &, const std::vector<Anope::string> &params, const Anope::map<Anope::string> &tags) = 0;
/** An enumeration of potential flags a command can have. */
enum Flag
: uint8_t
{
/** The parameter count is a minimum instead of an exact limit. */
FLAG_SOFT_LIMIT,
void SetFlag(IRCDMessageFlag f) { flags.insert(f); }
bool HasFlag(IRCDMessageFlag f) const { return flags.count(f); }
/** The message must come from a server. */
FLAG_REQUIRE_SERVER,
/** The message must come from a user. */
FLAG_REQUIRE_USER,
/** The highest flag possible. */
FLAG_MAX,
};
private:
/** The name of the message (e.g. PRIVMSG). */
const Anope::string name;
/** The number of parameters this command takes. */
const size_t param_count;
/** The flags that are set on the command. */
std::bitset<FLAG_MAX> flags;
public:
IRCDMessage(Module *o, const Anope::string &n, size_t pc = 0);
/** Retrieves the parameter count. */
inline size_t GetParamCount() const { return param_count; }
/** Runs the handler for this message.
* @param source Entity that sent the message.
* @param params Message parameters
* @param tags Message tags
*/
virtual void Run(MessageSource &source, const std::vector<Anope::string> &params, const Anope::map<Anope::string> &tags) = 0;
/** Sets the flags for this message. */
inline void SetFlag(Flag flag, bool value = true) { flags.set(flag, value); }
/** Determines if a flag is set. */
inline bool HasFlag(Flag flag) const { return flags[flag]; }
};
/** MessageTokenizer allows tokens in the IRC wire format to be read from a string */
class CoreExport MessageTokenizer
class CoreExport MessageTokenizer final
{
private:
/** The message we are parsing tokens from. */
+13 -10
View File
@@ -1,6 +1,6 @@
/*
*
* (C) 2008-2023 Anope Team
* (C) 2008-2024 Anope Team
* Contact us at team@anope.org
*
* Please read COPYING and README for further details.
@@ -21,7 +21,8 @@ typedef Anope::hash_map<ChannelInfo *> registered_channel_map;
extern CoreExport Serialize::Checker<registered_channel_map> RegisteredChannelList;
/* AutoKick data. */
class CoreExport AutoKick : public Serializable
class CoreExport AutoKick final
: public Serializable
{
public:
/* Channel this autokick is on */
@@ -38,12 +39,14 @@ public:
AutoKick();
~AutoKick();
void Serialize(Serialize::Data &data) const override;
static Serializable* Unserialize(Serializable *obj, Serialize::Data &);
static Serializable *Unserialize(Serializable *obj, Serialize::Data &);
};
/* It matters that Base is here before Extensible (it is inherited by Serializable)
*/
class CoreExport ChannelInfo : public Serializable, public Extensible
class CoreExport ChannelInfo final
: public Serializable
, public Extensible
{
/* channels who reference this one */
Anope::map<int> references;
@@ -92,10 +95,10 @@ public:
ChannelInfo(const ChannelInfo &ci);
~ChannelInfo();
ChannelInfo& operator=(const ChannelInfo &) = default;
ChannelInfo &operator=(const ChannelInfo &) = default;
void Serialize(Serialize::Data &data) const override;
static Serializable* Unserialize(Serializable *obj, Serialize::Data &);
static Serializable *Unserialize(Serializable *obj, Serialize::Data &);
/** Change the founder of the channel
* @params nc The new founder
@@ -166,7 +169,7 @@ public:
* @param t The time the akick was added, defaults to now
* @param lu The time the akick was last used, defaults to never
*/
AutoKick* AddAkick(const Anope::string &user, NickCore *akicknc, const Anope::string &reason, time_t t = Anope::CurTime, time_t lu = 0);
AutoKick *AddAkick(const Anope::string &user, NickCore *akicknc, const Anope::string &reason, time_t t = Anope::CurTime, time_t lu = 0);
/** Add an akick entry to the channel by reason
* @param user The user who added the akick
@@ -175,13 +178,13 @@ public:
* @param t The time the akick was added, defaults to now
* @param lu The time the akick was last used, defaults to never
*/
AutoKick* AddAkick(const Anope::string &user, const Anope::string &mask, const Anope::string &reason, time_t t = Anope::CurTime, time_t lu = 0);
AutoKick *AddAkick(const Anope::string &user, const Anope::string &mask, const Anope::string &reason, time_t t = Anope::CurTime, time_t lu = 0);
/** Get an entry from the channel akick list
* @param index The index in the akick vector
* @return The akick structure, or NULL if not found
*/
AutoKick* GetAkick(unsigned index) const;
AutoKick *GetAkick(unsigned index) const;
/** Get the size of the akick vector for this channel
* @return The akick vector size
@@ -235,7 +238,7 @@ public:
* @param name channel name to lookup
* @return the ChannelInfo associated with the channel
*/
static ChannelInfo* Find(const Anope::string &name);
static ChannelInfo *Find(const Anope::string &name);
void AddChannelReference(const Anope::string &what);
void RemoveChannelReference(const Anope::string &what);
+5 -3
View File
@@ -1,6 +1,6 @@
/*
*
* (C) 2003-2023 Anope Team
* (C) 2003-2024 Anope Team
* Contact us at team@anope.org
*
* Please read COPYING and README for further details.
@@ -15,7 +15,8 @@
#include "anope.h"
#include "service.h"
class RegexException : public CoreException
class CoreExport RegexException final
: public CoreException
{
public:
RegexException(const Anope::string &reason = "") : CoreException(reason) { }
@@ -34,7 +35,8 @@ public:
virtual bool Matches(const Anope::string &str) = 0;
};
class CoreExport RegexProvider : public Service
class CoreExport RegexProvider
: public Service
{
public:
RegexProvider(Module *o, const Anope::string &n) : Service(o, "Regex", n) { }
+17 -14
View File
@@ -1,6 +1,6 @@
/*
*
* (C) 2003-2023 Anope Team
* (C) 2003-2024 Anope Team
* Contact us at team@anope.org
*
* Please read COPYING and README for further details.
@@ -29,7 +29,7 @@ namespace Serialize
virtual ~Data() = default;
virtual std::iostream& operator[](const Anope::string &key) = 0;
virtual std::iostream &operator[](const Anope::string &key) = 0;
virtual std::set<Anope::string> KeySet() const { throw CoreException("Not supported"); }
virtual size_t Hash() const { throw CoreException("Not supported"); }
@@ -49,7 +49,8 @@ namespace Serialize
* abstract data types (Serialize::Data), and then reconstructed or
* updated later at any time.
*/
class CoreExport Serializable : public virtual Base
class CoreExport Serializable
: public virtual Base
{
private:
/* A list of every serializable item in Anope.
@@ -96,7 +97,7 @@ public:
/** Get the type of serializable object this is
* @return The serializable object type
*/
Serialize::Type* GetSerializableType() const { return this->s_type; }
Serialize::Type *GetSerializableType() const { return this->s_type; }
virtual void Serialize(Serialize::Data &data) const = 0;
@@ -107,9 +108,10 @@ public:
* of class that inherits from Serializable. Used for unserializing objects
* of this type, as it requires a function pointer to a static member function.
*/
class CoreExport Serialize::Type : public Base
class CoreExport Serialize::Type final
: public Base
{
typedef Serializable* (*unserialize_func)(Serializable *obj, Serialize::Data &);
typedef Serializable *(*unserialize_func)(Serializable *obj, Serialize::Data &);
static std::vector<Anope::string> TypeOrder;
static std::map<Anope::string, Serialize::Type *> Types;
@@ -166,7 +168,7 @@ public:
*/
void UpdateTimestamp();
Module* GetOwner() const { return this->owner; }
Module *GetOwner() const { return this->owner; }
static Serialize::Type *Find(const Anope::string &name);
@@ -199,23 +201,23 @@ class Serialize::Checker
public:
Checker(const Anope::string &n) : name(n) { }
inline const T* operator->() const
inline const T *operator->() const
{
this->Check();
return &this->obj;
}
inline T* operator->()
inline T *operator->()
{
this->Check();
return &this->obj;
}
inline const T& operator*() const
inline const T &operator*() const
{
this->Check();
return this->obj;
}
inline T& operator*()
inline T &operator*()
{
this->Check();
return this->obj;
@@ -240,7 +242,8 @@ public:
* destructed.
*/
template<typename T>
class Serialize::Reference : public ReferenceBase
class Serialize::Reference final
: public ReferenceBase
{
protected:
T *ref = nullptr;
@@ -302,7 +305,7 @@ public:
return NULL;
}
inline T* operator*() const
inline T *operator*() const
{
if (!this->invalid)
{
@@ -315,7 +318,7 @@ public:
return NULL;
}
inline T* operator->() const
inline T *operator->() const
{
if (!this->invalid)
{
+4 -3
View File
@@ -1,6 +1,6 @@
/*
*
* (C) 2003-2023 Anope Team
* (C) 2003-2024 Anope Team
* Contact us at team@anope.org
*
* Please read COPYING and README for further details.
@@ -25,7 +25,7 @@ namespace Servers
* the only server whose uplink *is* Me that is not a juped server.
* @return Our uplink, or NULL if not uplinked to anything
*/
extern CoreExport Server* GetUplink();
extern CoreExport Server *GetUplink();
/* Server maps by name and id */
extern CoreExport Anope::map<Server *> ByName;
@@ -37,7 +37,8 @@ namespace Servers
/** Class representing a server
*/
class CoreExport Server : public Extensible
class CoreExport Server final
: public Extensible
{
private:
/* Server name */
+6 -4
View File
@@ -1,6 +1,6 @@
/*
*
* (C) 2003-2023 Anope Team
* (C) 2003-2024 Anope Team
* Contact us at team@anope.org
*
* Please read COPYING and README for further details.
@@ -20,7 +20,8 @@
* such as commands, use this. This is also used for modules
* that publish a service (m_ssl_openssl, etc).
*/
class CoreExport Service : public virtual Base
class CoreExport Service
: public virtual Base
{
static std::map<Anope::string, std::map<Anope::string, Service *> > Services;
static std::map<Anope::string, std::map<Anope::string, Anope::string> > Aliases;
@@ -115,7 +116,8 @@ public:
/** Like Reference, but used to refer to a Service.
*/
template<typename T>
class ServiceReference : public Reference<T>
class ServiceReference
: public Reference<T>
{
Anope::string type;
Anope::string name;
@@ -158,7 +160,7 @@ public:
}
};
class ServiceAlias
class ServiceAlias final
{
Anope::string t, f;
public:
+1 -1
View File
@@ -1,6 +1,6 @@
/*
*
* (C) 2003-2023 Anope Team
* (C) 2003-2024 Anope Team
* Contact us at team@anope.org
*
* Please read COPYING and README for further details.
+2 -2
View File
@@ -1,6 +1,6 @@
/*
*
* (C) 2003-2023 Anope Team
* (C) 2003-2024 Anope Team
* Contact us at team@anope.org
*
* Please read COPYING and README for further details.
@@ -14,7 +14,7 @@
#include "services.h"
#include "sockets.h"
class CoreExport SocketEngine
class CoreExport SocketEngine final
{
static const int DefaultSize = 2; // Uplink, mode stacker
public:
+21 -14
View File
@@ -1,6 +1,6 @@
/*
*
* (C) 2003-2023 Anope Team
* (C) 2003-2024 Anope Team
* Contact us at team@anope.org
*
* Please read COPYING and README for further details.
@@ -103,7 +103,7 @@ union CoreExport sockaddrs
void ntop(int type, const void *src);
};
class CoreExport cidr
class CoreExport cidr final
{
sockaddrs addr;
Anope::string cidr_ip;
@@ -120,13 +120,14 @@ public:
bool operator==(const cidr &other) const;
bool operator!=(const cidr &other) const;
struct CoreExport hash
struct CoreExport hash final
{
size_t operator()(const cidr &s) const;
};
};
class SocketException : public CoreException
class CoreExport SocketException final
: public CoreException
{
public:
/** Constructor for socket exceptions
@@ -286,7 +287,8 @@ public:
virtual void ProcessError();
};
class CoreExport BufferedSocket : public virtual Socket
class CoreExport BufferedSocket
: public virtual Socket
{
protected:
/* Things read from the socket */
@@ -311,7 +313,7 @@ public:
/** Gets the new line from the input buffer, if any
*/
const Anope::string GetLine();
Anope::string GetLine();
/** Write to the socket
* @param message The message
@@ -319,7 +321,7 @@ public:
protected:
virtual void Write(const char *buffer, size_t l);
public:
void Write(const char *message, ...);
void Write(const char *message, ...) ATTR_FORMAT(2, 3);
void Write(const Anope::string &message);
/** Get the length of the read buffer
@@ -333,10 +335,11 @@ public:
int WriteBufferLen() const;
};
class CoreExport BinarySocket : public virtual Socket
class CoreExport BinarySocket
: public virtual Socket
{
protected:
struct DataBlock
struct DataBlock final
{
char *orig;
char *buf;
@@ -367,7 +370,7 @@ public:
* @param l The length of the data; if 0 then this function returns without doing anything
*/
virtual void Write(const char *buffer, size_t l);
void Write(const char *message, ...);
void Write(const char *message, ...) ATTR_FORMAT(2, 3);
void Write(const Anope::string &message);
/** Called with data from the socket
@@ -378,7 +381,8 @@ public:
virtual bool Read(const char *buffer, size_t l);
};
class CoreExport ListenSocket : public virtual Socket
class CoreExport ListenSocket
: public virtual Socket
{
public:
/** Constructor
@@ -402,7 +406,8 @@ public:
virtual ClientSocket *OnAccept(int fd, const sockaddrs &addr) = 0;
};
class CoreExport ConnectionSocket : public virtual Socket
class CoreExport ConnectionSocket
: public virtual Socket
{
public:
/* Sockaddrs for connection ip/port */
@@ -435,7 +440,8 @@ public:
virtual void OnError(const Anope::string &error);
};
class CoreExport ClientSocket : public virtual Socket
class CoreExport ClientSocket
: public virtual Socket
{
public:
/* Listen socket this connection came from */
@@ -469,7 +475,8 @@ public:
virtual void OnError(const Anope::string &error);
};
class CoreExport Pipe : public Socket
class CoreExport Pipe
: public Socket
{
public:
/** The FD of the write pipe
+10 -5
View File
@@ -1,6 +1,6 @@
/*
*
* (C) 2003-2023 Anope Team
* (C) 2003-2024 Anope Team
* Contact us at team@anope.org
*
* Please read COPYING and README for further details.
@@ -14,6 +14,9 @@
// The default umask to use for files.
#cmakedefine DEFUMASK @DEFUMASK@
// The extension used for module file extensions.
#define DLL_EXT "@CMAKE_SHARED_LIBRARY_SUFFIX@"
// Whether Anope was built in debug mode.
#cmakedefine01 DEBUG_BUILD
@@ -26,8 +29,10 @@
#ifdef _WIN32
# define popen _popen
# define pclose _pclose
# ifdef _MSC_VER
# define PATH_MAX MAX_PATH
# endif
# define sleep(x) Sleep(x * 1000)
#endif
#if defined __GNUC__
# define ATTR_FORMAT(STRINGPOS, FIRSTPOS) __attribute__((format(printf, STRINGPOS, FIRSTPOS)))
#else
# define ATTR_FORMAT(STRINGPOS, FIRSTPOS)
#endif
+7 -57
View File
@@ -1,6 +1,6 @@
/*
*
* (C) 2003-2023 Anope Team
* (C) 2003-2024 Anope Team
* Contact us at team@anope.org
*
* Please read COPYING and README for further details.
@@ -14,7 +14,11 @@
#include "sockets.h"
#include "extensible.h"
class CoreExport Thread : public Pipe, public Extensible
#include <thread>
class CoreExport Thread
: public Pipe
, public Extensible
{
private:
/* Set to true to tell the thread to finish and we are waiting for it */
@@ -22,7 +26,7 @@ private:
public:
/* Handle for this thread */
pthread_t handle;
std::unique_ptr<std::thread> handle;
/** Threads destructor
*/
@@ -57,57 +61,3 @@ public:
*/
virtual void Run() = 0;
};
class CoreExport Mutex
{
protected:
/* A mutex, used to keep threads in sync */
pthread_mutex_t mutex;
public:
/** Constructor
*/
Mutex();
/** Destructor
*/
~Mutex();
/** Attempt to lock the mutex, will hang until a lock can be achieved
*/
void Lock();
/** Unlock the mutex, it must be locked first
*/
void Unlock();
/** Attempt to lock the mutex, will return true on success and false on fail
* Does not block
* @return true or false
*/
bool TryLock();
};
class CoreExport Condition : public Mutex
{
private:
/* A condition */
pthread_cond_t cond;
public:
/** Constructor
*/
Condition();
/** Destructor
*/
~Condition();
/** Called to wakeup the waiter
*/
void Wakeup();
/** Called to wait for a Wakeup() call
*/
void Wait();
};
+8 -19
View File
@@ -1,6 +1,6 @@
/* Timer include stuff.
*
* (C) 2003-2023 Anope Team
* (C) 2003-2024 Anope Team
* Contact us at team@anope.org
*
* Please read COPYING and README for further details.
@@ -20,17 +20,13 @@ private:
*/
Module *owner;
/** The time this was created
*/
time_t settime;
/** The triggering time
*/
time_t trigger;
/** Numer of seconds between triggers
/** Number of seconds between triggers
*/
long secs;
time_t secs;
/** True if this is a repeating timer
*/
@@ -39,18 +35,16 @@ private:
public:
/** Constructor, initializes the triggering time
* @param time_from_now The number of seconds from now to trigger the timer
* @param now The time now
* @param repeating Repeat this timer every time_from_now if this is true
*/
Timer(long time_from_now, time_t now = Anope::CurTime, bool repeating = false);
Timer(time_t time_from_now, bool repeating = false);
/** Constructor, initializes the triggering time
* @param creator The creator of the timer
* @param time_from_now The number of seconds from now to trigger the timer
* @param now The time now
* @param repeating Repeat this timer every time_from_now if this is true
*/
Timer(Module *creator, long time_from_now, time_t now = Anope::CurTime, bool repeating = false);
Timer(Module *creator, time_t time_from_now, bool repeating = false);
/** Destructor, removes the timer from the list
*/
@@ -81,11 +75,6 @@ public:
*/
long GetSecs() const;
/** Returns the time this timer was created
* @return The time this timer was created
*/
time_t GetSetTime() const;
/** Returns the owner of this timer, if any
* @return The owner of the timer
*/
@@ -94,14 +83,14 @@ public:
/** Called when the timer ticks
* This should be overridden with something useful
*/
virtual void Tick(time_t ctime) = 0;
virtual void Tick() = 0;
};
/** This class manages sets of Timers, and triggers them at their defined times.
* This will ensure timers are not missed, as well as removing timers that have
* expired and allowing the addition of new ones.
*/
class CoreExport TimerManager
class CoreExport TimerManager final
{
/** A list of timers
*/
@@ -120,7 +109,7 @@ public:
/** Tick all pending timers
* @param ctime The current time
*/
static void TickTimers(time_t ctime = Anope::CurTime);
static void TickTimers();
/** Deletes all timers owned by the given module
*/
+30 -19
View File
@@ -1,6 +1,6 @@
/*
*
* (C) 2003-2023 Anope Team
* (C) 2003-2024 Anope Team
* Contact us at team@anope.org
*
* Please read COPYING and README for further details.
@@ -13,14 +13,42 @@
#include "sockets.h"
#include "protocol.h"
#include "servers.h"
namespace Uplink
{
extern void Connect();
extern CoreExport void SendInternal(const Anope::map<Anope::string> &, const MessageSource &, const Anope::string &, const std::vector<Anope::string> &);
template<typename... Args>
void Send(const Anope::map<Anope::string> &tags, const MessageSource &source, const Anope::string &command, Args &&...args)
{
SendInternal(tags, source, command, { stringify(args)... });
}
template<typename... Args>
void Send(const Anope::map<Anope::string> &tags, const Anope::string &command, Args &&...args)
{
SendInternal(tags, Me, command, { stringify(args)... });
}
template<typename... Args>
void Send(const MessageSource &source, const Anope::string &command, Args &&...args)
{
SendInternal({}, source, command, { stringify(args)... });
}
template<typename... Args>
void Send(const Anope::string &command, Args &&...args)
{
SendInternal({}, Me, command, { stringify(args)... });
}
}
/* This is the socket to our uplink */
class UplinkSocket : public ConnectionSocket, public BufferedSocket
class UplinkSocket final
: public ConnectionSocket
, public BufferedSocket
{
public:
bool error;
@@ -29,22 +57,5 @@ public:
bool ProcessRead() override;
void OnConnect() override;
void OnError(const Anope::string &) override;
/* A message sent over the uplink socket */
class CoreExport Message
{
MessageSource source;
std::stringstream buffer;
public:
Message();
Message(const MessageSource &);
~Message();
template<typename T> Message &operator<<(const T &val)
{
this->buffer << val;
return *this;
}
};
};
extern CoreExport UplinkSocket *UplinkSock;
+17 -17
View File
@@ -1,7 +1,7 @@
/*
*
* (C) 2008-2011 Robin Burchell <w00t@inspircd.org>
* (C) 2003-2023 Anope Team <team@anope.org>
* (C) 2003-2024 Anope Team <team@anope.org>
*
* Please read COPYING and README for further details.
*
@@ -28,7 +28,10 @@ extern CoreExport unsigned MaxUserCount;
extern CoreExport time_t MaxUserTime;
/* Online user and channel data. */
class CoreExport User : public virtual Base, public Extensible, public CommandReply
class CoreExport User
: public virtual Base
, public Extensible
, public CommandReply
{
/* true if the user was quit or killed */
bool quit;
@@ -41,8 +44,6 @@ protected:
Anope::string vident;
Anope::string ident;
Anope::string uid;
/* If the user is on the access list of the nick they're on */
bool on_access;
/* Map of user modes and the params this user has (if any) */
ModeList modes;
/* NickCore account the user is currently logged in as, if they are logged in */
@@ -113,7 +114,7 @@ protected:
virtual ~User();
public:
static User* OnIntroduce(const Anope::string &snick, const Anope::string &sident, const Anope::string &shost, const Anope::string &svhost, const Anope::string &sip, Server *sserver, const Anope::string &srealname, time_t ts, const Anope::string &smodes, const Anope::string &suid, NickCore *nc);
static User *OnIntroduce(const Anope::string &snick, const Anope::string &sident, const Anope::string &shost, const Anope::string &svhost, const Anope::string &sip, Server *sserver, const Anope::string &srealname, time_t ts, const Anope::string &smodes, const Anope::string &suid, NickCore *nc);
/** Update the nickname of a user record accordingly, should be
* called from ircd protocol.
@@ -188,8 +189,9 @@ public:
* @param fmt Format of the Message
* @param ... any number of parameters
*/
void SendMessage(BotInfo *source, const char *fmt, ...);
void SendMessage(BotInfo *source, const char *fmt, ...) ATTR_FORMAT(3, 4);
void SendMessage(BotInfo *source, const Anope::string &msg) override;
void SendMessage(CommandSource &source, const Anope::string &msg) override;
/** Identify the user to a nick.
* updates last_seen, logs the user in,
@@ -219,12 +221,6 @@ public:
*/
bool IsIdentified(bool check_nick = false) const;
/** Check if the user is recognized for their nick (on the nicks access list)
* @param check_secure Only returns true if the user has secure off
* @return true or false
*/
bool IsRecognized(bool check_secure = true) const;
/** Check if the user is connected securely.
* @return True if the user is connected securely; otherwise, false.
*/
@@ -247,8 +243,7 @@ public:
*/
bool HasPriv(const Anope::string &privstr);
/** Update the last usermask stored for a user, and check to see if they are recognized
*/
/** Update the last usermask stored for a user. */
void UpdateHost();
/** Check if the user has a mode
@@ -302,13 +297,15 @@ public:
* @param bi The client setting the modes
* @param umodes The modes
*/
void SetModes(BotInfo *bi, const char *umodes, ...);
void SetModes(BotInfo *bi, const char *umodes, ...) ATTR_FORMAT(3, 4);
void SetModes(BotInfo *bi, const Anope::string &umodes);
/** Set a string of modes on a user internally
* @param setter who/what is setting the mode
* @param umodes The modes
*/
void SetModesInternal(const MessageSource &source, const char *umodes, ...);
void SetModesInternal(const MessageSource &source, const char *umodes, ...) ATTR_FORMAT(3, 4);
void SetModesInternal(const MessageSource &source, const Anope::string &umodes);
/** Get modes set for this user.
* @return A string of modes set on the user
@@ -363,12 +360,15 @@ public:
*/
bool BadPassword();
/** Determines whether this user should receive a PRIVMSG instead of a NOTICE. */
bool ShouldPrivmsg() const;
/** Finds a user by nick, or possibly UID
* @param name The nick, or possibly UID, to lookup
* @param nick_only set to true to only look up by nick, not UID
* @return the user, if they exist
*/
static User* Find(const Anope::string &name, bool nick_only = false);
static User *Find(const Anope::string &name, bool nick_only = false);
/** Quits all users who are pending to be quit
*/
+6 -6
View File
@@ -1,6 +1,6 @@
/* Build bumper
*
* (C) 2003-2023 Anope Team
* (C) 2003-2024 Anope Team
* Contact us at team@anope.org
*
* Please read COPYING and README for further details.
@@ -172,19 +172,19 @@ int main(int argc, char *argv[])
std::map<std::string, std::string> versions, old_versions;
if (!read_version_sh(version_sh, versions))
return -1;
return EXIT_FAILURE;
std::string git_version = get_git_hash(git_dir);
if (!write_build_h(buildh, git_version))
return -1;
return EXIT_FAILURE;
read_version_h(versionh, old_versions);
if (versions == old_versions)
return 0;
return EXIT_SUCCESS;
if (!write_version_h(versionh, versions))
return -1;
return EXIT_FAILURE;
return 0;
return EXIT_SUCCESS;
}
+8 -6
View File
@@ -1,6 +1,6 @@
/*
*
* (C) 2008-2023 Anope Team
* (C) 2008-2024 Anope Team
* Contact us at team@anope.org
*
* Please read COPYING and README for further details.
@@ -13,7 +13,8 @@
#include "sockets.h"
/* An Xline, eg, anything added with operserv/akill, or any of the operserv/sxline commands */
class CoreExport XLine : public Serializable
class CoreExport XLine final
: public Serializable
{
void Init();
Anope::string nick, user, host, real;
@@ -44,11 +45,12 @@ public:
bool IsRegex() const;
void Serialize(Serialize::Data &data) const override;
static Serializable* Unserialize(Serializable *obj, Serialize::Data &data);
static Serializable *Unserialize(Serializable *obj, Serialize::Data &data);
};
/* Managers XLines. There is one XLineManager per type of XLine. */
class CoreExport XLineManager : public Service
class CoreExport XLineManager
: public Service
{
char type;
/* List of XLines in this XLineManager */
@@ -123,7 +125,7 @@ public:
* @param index The index
* @return The XLine, or NULL if the index is out of bounds
*/
XLine* GetEntry(unsigned index);
XLine *GetEntry(unsigned index);
/** Clear the XLine vector
* Note: This does not remove the XLines from the IRCd
@@ -143,7 +145,7 @@ public:
* @param mask The mask
* @return The XLine the user matches, or NULL
*/
XLine* HasEntry(const Anope::string &mask);
XLine *HasEntry(const Anope::string &mask);
/** Check a user against all of the xlines in this XLineManager
* @param u The user
+1 -1
View File
@@ -2760,7 +2760,7 @@ msgstr ""
msgid ""
"Alternative methods of modifying channel access lists are\n"
"available. "
"available."
msgstr ""
#, fuzzy
+1 -1
View File
@@ -2540,7 +2540,7 @@ msgstr ""
msgid ""
"Alternative methods of modifying channel access lists are\n"
"available. "
"available."
msgstr "Alternative Methoden zum Bearbeiten der Kanalzugangsliste sind verfügbar."
msgid "Approve the requested vHost of a user"
+1 -1
View File
@@ -2651,7 +2651,7 @@ msgstr ""
msgid ""
"Alternative methods of modifying channel access lists are\n"
"available. "
"available."
msgstr ""
#
+130 -316
View File
@@ -1,5 +1,5 @@
# Anope IRC Services language file
# Copyright (C) 2014-2020
# Copyright (C) 2014-2024
# This file is distributed under the same license as the Anope IRC Services package.
# Adam <adam@anope.org>, 2014.
#
@@ -7,8 +7,8 @@ msgid ""
msgstr ""
"Project-Id-Version: Anope\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2023-12-22 15:42+0000\n"
"PO-Revision-Date: 2023-12-22 15:44+0000\n"
"POT-Creation-Date: 2024-03-04 10:34+0000\n"
"PO-Revision-Date: 2024-03-04 10:34+0000\n"
"Last-Translator: Sadie Powell <sadie@witchery.services>\n"
"Language-Team: English\n"
"Language: en_US\n"
@@ -46,10 +46,6 @@ msgstr "%s added to %s autokick list."
msgid "%s added to %s bad words list."
msgstr "%s added to %s bad words list."
#, c-format
msgid "%s added to %s's access list."
msgstr "%s added to %s's access list."
#, c-format
msgid "%s added to %s's certificate list."
msgstr "%s added to %s's certificate list."
@@ -186,10 +182,6 @@ msgstr "%s deleted from %s autokick list."
msgid "%s deleted from %s bad words list."
msgstr "%s deleted from %s bad words list."
#, c-format
msgid "%s deleted from %s's access list."
msgstr "%s deleted from %s's access list."
#, c-format
msgid "%s deleted from %s's certificate list."
msgstr "%s deleted from %s's certificate list."
@@ -346,10 +338,6 @@ msgstr "%s not found on %s autokick list."
msgid "%s not found on %s bad words list."
msgstr "%s not found on %s bad words list."
#, c-format
msgid "%s not found on %s's access list."
msgstr "%s not found on %s's access list."
#, c-format
msgid "%s not found on %s's certificate list."
msgstr "%s not found on %s's certificate list."
@@ -496,9 +484,6 @@ msgstr "channel"
msgid "channel bantype"
msgstr "channel bantype"
msgid "channel channel"
msgstr "channel channel"
msgid "channel command method [status]"
msgstr "channel command method [status]"
@@ -601,6 +586,9 @@ msgstr "channel VIEW [mask | entry-num | list]"
msgid "channel VIEW [mask | list]"
msgstr "channel VIEW [mask | list]"
msgid "channel [code]"
msgstr "channel [code]"
msgid "channel [description]"
msgstr "channel [description]"
@@ -840,12 +828,12 @@ msgid ""
" \n"
"Accounts that are not used anymore are subject to\n"
"the automatic expiration, i.e. they will be deleted\n"
"after %d days if not used."
"after %lu days if not used."
msgstr ""
" \n"
"Accounts that are not used anymore are subject to\n"
"the automatic expiration, i.e. they will be deleted\n"
"after %d days if not used."
"after %lu days if not used."
msgid ""
" \n"
@@ -941,12 +929,12 @@ msgstr ""
#, c-format
msgid ""
" \n"
"Note that any channel which is not used for %d days\n"
"Note that any channel which is not used for %lu days\n"
"(i.e. which no user on the channel's access list enters\n"
"for that period of time) will be automatically dropped."
msgstr ""
" \n"
"Note that any channel which is not used for %d days\n"
"Note that any channel which is not used for %lu days\n"
"(i.e. which no user on the channel's access list enters\n"
"for that period of time) will be automatically dropped."
@@ -1267,8 +1255,8 @@ msgid "%-8s %s"
msgstr "%-8s %s"
#, c-format
msgid "%2lu %-16s letters: %s, words: %s, lines: %s, smileys: %s, actions: %s"
msgstr "%2lu %-16s letters: %s, words: %s, lines: %s, smileys: %s, actions: %s"
msgid "%2d %-16s letters: %s, words: %s, lines: %s, smileys: %s, actions: %s"
msgstr "%2d %-16s letters: %s, words: %s, lines: %s, smileys: %s, actions: %s"
msgid "%b %d %Y %H:%M:%S %Z"
msgstr "%b %d %Y %H:%M:%S %Z"
@@ -1297,10 +1285,6 @@ msgstr "%d bots available."
msgid "%d modules loaded."
msgstr "%d modules loaded."
#, c-format
msgid "%d nickname(s) in the group."
msgstr "%d nickname(s) in the group."
#, c-format
msgid "%lu nicks are stored in the database, using %.2Lf kB of memory."
msgstr "%lu nicks are stored in the database, using %.2Lf kB of memory."
@@ -1418,20 +1402,20 @@ msgid "%s coverage is too wide; Please use a more specific mask."
msgstr "%s coverage is too wide; Please use a more specific mask."
#, c-format
msgid "%s currently has %d memos, of which %d are unread."
msgstr "%s currently has %d memos, of which %d are unread."
msgid "%s currently has %zu memos, of which %zu are unread."
msgstr "%s currently has %zu memos, of which %zu are unread."
#, c-format
msgid "%s currently has %d memos, of which 1 is unread."
msgstr "%s currently has %d memos, of which 1 is unread."
msgid "%s currently has %zu memos, of which 1 is unread."
msgstr "%s currently has %zu memos, of which 1 is unread."
#, c-format
msgid "%s currently has %d memos."
msgstr "%s currently has %d memos."
msgid "%s currently has %zu memos."
msgstr "%s currently has %zu memos."
#, c-format
msgid "%s currently has %d memos; all of them are unread."
msgstr "%s currently has %d memos; all of them are unread."
msgid "%s currently has %zu memos; all of them are unread."
msgstr "%s currently has %zu memos; all of them are unread."
#, c-format
msgid "%s currently has 1 memo, and it has not yet been read."
@@ -1609,10 +1593,6 @@ msgstr "%s will now notify you of memos when you log on or unset /AWAY."
msgid "%s!%s@%s (%s) added to the bot list."
msgstr "%s!%s@%s (%s) added to the bot list."
#, c-format
msgid "%s's access list is empty."
msgstr "%s's access list is empty."
#, c-format
msgid "%s's auto join list is empty."
msgstr "%s's auto join list is empty."
@@ -1633,6 +1613,10 @@ msgstr "%s's memo limit is %d, and may not be changed."
msgid "%s's memo limit is %d."
msgstr "%s's memo limit is %d."
#, c-format
msgid "%zu nickname(s) in the group."
msgstr "%zu nickname(s) in the group."
#, c-format
msgid "(%s ago)"
msgstr "(%s ago)"
@@ -1745,9 +1729,6 @@ msgstr "ADD [+expiry] mask limit reason"
msgid "ADD [nickname] channel [key]"
msgstr "ADD [nickname] channel [key]"
msgid "ADD [nickname] mask"
msgstr "ADD [nickname] mask"
msgid "ADD [nickname] [fingerprint]"
msgstr "ADD [nickname] [fingerprint]"
@@ -1822,9 +1803,6 @@ msgstr "Account"
msgid "Account %s has already reached the maximum number of simultaneous logins (%u)."
msgstr "Account %s has already reached the maximum number of simultaneous logins (%u)."
msgid "Activate security features"
msgstr "Activate security features"
msgid "Activate the requested vHost for the given nick."
msgstr "Activate the requested vHost for the given nick."
@@ -1961,10 +1939,6 @@ msgstr "All user modes on %s have been synced."
msgid "All vhosts in the group %s have been set to %s."
msgstr "All vhosts in the group %s have been set to %s."
#, c-format
msgid "All vhosts in the group %s have been set to %s@%s."
msgstr "All vhosts in the group %s have been set to %s@%s."
msgid "Allowed to (de)halfop themself"
msgstr "Allowed to (de)halfop themself"
@@ -2142,7 +2116,7 @@ msgstr ""
msgid ""
"Allows Services Operators to manipulate the AKILL list. If\n"
"a user matching an AKILL mask attempts to connect, Services\n"
"a user matching an AKILL mask attempts to connect, services\n"
"will issue a KILL for that user and, on supported server\n"
"types, will instruct all servers to add a ban for the mask\n"
"which the user matched.\n"
@@ -2163,7 +2137,7 @@ msgid ""
"STATS AKILL command."
msgstr ""
"Allows Services Operators to manipulate the AKILL list. If\n"
"a user matching an AKILL mask attempts to connect, Services\n"
"a user matching an AKILL mask attempts to connect, services\n"
"will issue a KILL for that user and, on supported server\n"
"types, will instruct all servers to add a ban for the mask\n"
"which the user matched.\n"
@@ -2627,15 +2601,15 @@ msgid "Bot bans will no longer automatically expire."
msgstr "Bot bans will no longer automatically expire."
#, c-format
msgid "Bot hosts may only be %d characters long."
msgstr "Bot hosts may only be %d characters long."
msgid "Bot hosts may only be %zu characters long."
msgstr "Bot hosts may only be %zu characters long."
msgid "Bot hosts may only contain valid host characters."
msgstr "Bot hosts may only contain valid host characters."
#, c-format
msgid "Bot idents may only be %d characters long."
msgstr "Bot idents may only be %d characters long."
msgid "Bot idents may only be %zu characters long."
msgstr "Bot idents may only be %zu characters long."
msgid "Bot idents may only contain valid ident characters."
msgstr "Bot idents may only contain valid ident characters."
@@ -2651,8 +2625,8 @@ msgid "Bot nick"
msgstr "Bot nick"
#, c-format
msgid "Bot nicks may only be %d characters long."
msgstr "Bot nicks may only be %d characters long."
msgid "Bot nicks may only be %zu characters long."
msgstr "Bot nicks may only be %zu characters long."
msgid "Bot nicks may only contain valid nick characters."
msgstr "Bot nicks may only contain valid nick characters."
@@ -2844,17 +2818,17 @@ msgstr "Changed usermodes of %s to %s."
msgid ""
"Changes the display used to refer to the nickname group in\n"
"Services. The new display MUST be a nick of the group."
"services. The new display MUST be a nick of the group."
msgstr ""
"Changes the display used to refer to the nickname group in\n"
"Services. The new display MUST be a nick of the group."
"services. The new display MUST be a nick of the group."
msgid ""
"Changes the display used to refer to your nickname group in\n"
"Services. The new display MUST be a nick of your group."
"services. The new display MUST be a nick of your group."
msgstr ""
"Changes the display used to refer to your nickname group in\n"
"Services. The new display MUST be a nick of your group."
"services. The new display MUST be a nick of your group."
msgid ""
"Changes the founder of a channel. The new nickname must\n"
@@ -3016,8 +2990,8 @@ msgid "Channels that %s has access on:"
msgstr "Channels that %s has access on:"
#, c-format
msgid "Channels: %lu entries, %lu buckets, longest chain is %d"
msgstr "Channels: %lu entries, %lu buckets, longest chain is %d"
msgid "Channels: %zu entries, %zu buckets, longest chain is %zu"
msgstr "Channels: %zu entries, %zu buckets, longest chain is %zu"
msgid "Chanstats"
msgstr "Chanstats"
@@ -3168,20 +3142,20 @@ msgid "Current module list:"
msgstr "Current module list:"
#, c-format
msgid "Current number of AKILLs: %d"
msgstr "Current number of AKILLs: %d"
msgid "Current number of AKILLs: %zu"
msgstr "Current number of AKILLs: %zu"
#, c-format
msgid "Current number of SNLINEs: %d"
msgstr "Current number of SNLINEs: %d"
msgid "Current number of SNLINEs: %zu"
msgstr "Current number of SNLINEs: %zu"
#, c-format
msgid "Current number of SQLINEs: %d"
msgstr "Current number of SQLINEs: %d"
msgid "Current number of SQLINEs: %zu"
msgstr "Current number of SQLINEs: %zu"
#, c-format
msgid "Current users: %d (%d ops)"
msgstr "Current users: %d (%d ops)"
msgid "Current users: %zu (%d ops)"
msgstr "Current users: %zu (%d ops)"
msgid "DEL oper"
msgstr "DEL oper"
@@ -3195,9 +3169,6 @@ msgstr "DEL [nickname] channel"
msgid "DEL [nickname] fingerprint"
msgstr "DEL [nickname] fingerprint"
msgid "DEL [nickname] mask"
msgstr "DEL [nickname] mask"
msgid "DEL {mask | entry-num | list | id}"
msgstr "DEL {mask | entry-num | list | id}"
@@ -3671,17 +3642,6 @@ msgstr ""
"modes is enabled, services will remember your usermodes\n"
"and attempt to re-set them the next time you authenticate."
msgid ""
"Enables or disables security features for a\n"
"channel. When SECURE is set, only users who have\n"
"identified to services, and are not only recognized, will be\n"
"given access to channels from account-based access entries."
msgstr ""
"Enables or disables security features for a\n"
"channel. When SECURE is set, only users who have\n"
"identified to services, and are not only recognized, will be\n"
"given access to channels from account-based access entries."
msgid ""
"Enables or disables signed kicks for a\n"
"channel. When SIGNKICK is set, kicks issued with\n"
@@ -3833,8 +3793,8 @@ msgid "End of entry message list."
msgstr "End of entry message list."
#, c-format
msgid "End of forbid list - %d/%d entries shown."
msgstr "End of forbid list - %d/%d entries shown."
msgid "End of forbid list - %zu/%zu entries shown."
msgstr "End of forbid list - %zu/%zu entries shown."
msgid "End of forbid list."
msgstr "End of forbid list."
@@ -3918,12 +3878,12 @@ msgid "Error reloading configuration file: %s"
msgstr "Error reloading configuration file: %s"
#, c-format
msgid "Error! The vHost ident is too long, please use an ident shorter than %d characters."
msgstr "Error! The vHost ident is too long, please use an ident shorter than %d characters."
msgid "Error! The vHost ident is too long, please use an ident shorter than %zu characters."
msgstr "Error! The vHost ident is too long, please use an ident shorter than %zu characters."
#, c-format
msgid "Error! The vHost is too long, please use a hostname shorter than %d characters."
msgstr "Error! The vHost is too long, please use a hostname shorter than %d characters."
msgid "Error! The vHost is too long, please use a hostname shorter than %zu characters."
msgstr "Error! The vHost is too long, please use a hostname shorter than %zu characters."
msgid ""
"Examples:\n"
@@ -4250,8 +4210,8 @@ msgid "LIMIT enforced by "
msgstr "LIMIT enforced by "
#, c-format
msgid "LIMIT enforced on %s, %d users removed."
msgstr "LIMIT enforced on %s, %d users removed."
msgid "LIMIT enforced on %s, %zu users removed."
msgstr "LIMIT enforced on %s, %zu users removed."
msgid "LIST threshold"
msgstr "LIST threshold"
@@ -4839,10 +4799,6 @@ msgstr "Manipulate the topic of the specified channel"
msgid "Mask"
msgstr "Mask"
#, c-format
msgid "Mask %s already present on %s's access list."
msgstr "Mask %s already present on %s's access list."
msgid "Mask must be in the form user@host."
msgstr "Mask must be in the form user@host."
@@ -4868,6 +4824,10 @@ msgstr "Memo %d from %s (%s)."
msgid "Memo %d has been deleted."
msgstr "Memo %d has been deleted."
#, c-format
msgid "Memo %zu has been deleted."
msgstr "Memo %zu has been deleted."
msgid "Memo ignore list is empty."
msgstr "Memo ignore list is empty."
@@ -4929,48 +4889,6 @@ msgstr "Modes"
msgid "Modes cleared on %s and the channel destroyed."
msgstr "Modes cleared on %s and the channel destroyed."
#, c-format
msgid ""
"Modifies or displays the access list for your nick. This\n"
"is the list of addresses which will be automatically\n"
"recognized by %s as allowed to use the nick. If\n"
"you want to use the nick from a different address, you\n"
"need to send an IDENTIFY command to make %s\n"
"recognize you. Services Operators may provide a nick\n"
"to modify other users' access lists.\n"
" \n"
"Examples:\n"
" \n"
" ACCESS ADD anyone@*.bepeg.com\n"
" Allows access to user anyone from any machine in\n"
" the bepeg.com domain.\n"
" \n"
" ACCESS DEL anyone@*.bepeg.com\n"
" Reverses the previous command.\n"
" \n"
" ACCESS LIST\n"
" Displays the current access list."
msgstr ""
"Modifies or displays the access list for your nick. This\n"
"is the list of addresses which will be automatically\n"
"recognized by %s as allowed to use the nick. If\n"
"you want to use the nick from a different address, you\n"
"need to send an IDENTIFY command to make %s\n"
"recognize you. Services Operators may provide a nick\n"
"to modify other users' access lists.\n"
" \n"
"Examples:\n"
" \n"
" ACCESS ADD anyone@*.bepeg.com\n"
" Allows access to user anyone from any machine in\n"
" the bepeg.com domain.\n"
" \n"
" ACCESS DEL anyone@*.bepeg.com\n"
" Reverses the previous command.\n"
" \n"
" ACCESS LIST\n"
" Displays the current access list."
msgid ""
"Modifies or displays the certificate list for your nick.\n"
"If you connect to IRC and provide a client certificate with a\n"
@@ -4990,9 +4908,6 @@ msgstr ""
msgid "Modify the list of %s users"
msgstr "Modify the list of %s users"
msgid "Modify the list of authorized addresses"
msgstr "Modify the list of authorized addresses"
msgid "Modify the list of privileged users"
msgstr "Modify the list of privileged users"
@@ -5103,8 +5018,8 @@ msgid "Nick %s isn't registered."
msgstr "Nick %s isn't registered."
#, c-format
msgid "Nick %s was truncated to %d characters."
msgstr "Nick %s was truncated to %d characters."
msgid "Nick %s was truncated to %zu characters."
msgstr "Nick %s was truncated to %zu characters."
#, c-format
msgid "Nick %s will expire."
@@ -5147,8 +5062,8 @@ msgid "Nick %s is now suspended."
msgstr "Nick %s is now suspended."
#, c-format
msgid "Nick too long, max length is %u characters."
msgstr "Nick too long, max length is %u characters."
msgid "Nick too long, max length is %zu characters."
msgstr "Nick too long, max length is %zu characters."
#, c-format
msgid "Nickname %s has been dropped."
@@ -5162,10 +5077,6 @@ msgstr "Nickname %s is already registered!"
msgid "Nickname %s may not be registered."
msgstr "Nickname %s may not be registered."
#, c-format
msgid "Nickname %s registered under your user@host-mask: %s"
msgstr "Nickname %s registered under your user@host-mask: %s"
#, c-format
msgid "Nickname %s registered."
msgstr "Nickname %s registered."
@@ -5395,6 +5306,10 @@ msgstr "Peace option for %s is now on."
msgid "Persistent"
msgstr "Persistent"
#, c-format
msgid "Please confirm that you want to drop %s with DROP %s %s"
msgstr "Please confirm that you want to drop %s with DROP %s %s"
msgid "Please contact an Operator to get a vHost assigned to this nick."
msgstr "Please contact an Operator to get a vHost assigned to this nick."
@@ -5414,24 +5329,24 @@ msgid "Please use the symbol of # when attempting to register."
msgstr "Please use the symbol of # when attempting to register."
#, c-format
msgid "Please wait %d seconds and retry."
msgstr "Please wait %d seconds and retry."
msgid "Please wait %lu seconds and retry."
msgstr "Please wait %lu seconds and retry."
#, c-format
msgid "Please wait %d seconds before requesting a new vHost."
msgstr "Please wait %d seconds before requesting a new vHost."
msgid "Please wait %lu seconds before requesting a new vHost."
msgstr "Please wait %lu seconds before requesting a new vHost."
#, c-format
msgid "Please wait %d seconds before using the %s command again."
msgstr "Please wait %d seconds before using the %s command again."
msgid "Please wait %lu seconds before using the %s command again."
msgstr "Please wait %lu seconds before using the %s command again."
#, c-format
msgid "Please wait %d seconds before using the GROUP command again."
msgstr "Please wait %d seconds before using the GROUP command again."
msgid "Please wait %lu seconds before using the GROUP command again."
msgstr "Please wait %lu seconds before using the GROUP command again."
#, c-format
msgid "Please wait %d seconds before using the REGISTER command again."
msgstr "Please wait %d seconds before using the REGISTER command again."
msgid "Please wait %lu seconds before using the REGISTER command again."
msgstr "Please wait %lu seconds before using the REGISTER command again."
#, c-format
msgid "Pooled %s."
@@ -5619,16 +5534,16 @@ msgid "Registered"
msgstr "Registered"
#, c-format
msgid "Registered channels: %lu entries, %lu buckets, longest chain is %d"
msgstr "Registered channels: %lu entries, %lu buckets, longest chain is %d"
msgid "Registered channels: %zu entries, %zu buckets, longest chain is %zu"
msgstr "Registered channels: %zu entries, %zu buckets, longest chain is %zu"
#, c-format
msgid "Registered nick groups: %lu entries, %lu buckets, longest chain is %d"
msgstr "Registered nick groups: %lu entries, %lu buckets, longest chain is %d"
msgid "Registered nick groups: %zu entries, %zu buckets, longest chain is %zu"
msgstr "Registered nick groups: %zu entries, %zu buckets, longest chain is %zu"
#, c-format
msgid "Registered nicknames: %lu entries, %lu buckets, longest chain is %d"
msgstr "Registered nicknames: %lu entries, %lu buckets, longest chain is %d"
msgid "Registered nicknames: %zu entries, %zu buckets, longest chain is %zu"
msgstr "Registered nicknames: %zu entries, %zu buckets, longest chain is %zu"
#, c-format
msgid "Registered only enforced on %s."
@@ -5677,7 +5592,7 @@ msgid ""
"your nickname as a password is a much worse idea ;) and,\n"
"in fact, %s will not allow it. Also, short\n"
"passwords are vulnerable to trial-and-error searches, so\n"
"you should choose a password at least 5 characters long.\n"
"you should choose a password at least %u characters long.\n"
"Finally, the space character cannot be used in passwords."
msgstr ""
"Registers your nickname in the %s database. Once\n"
@@ -5695,7 +5610,7 @@ msgstr ""
"your nickname as a password is a much worse idea ;) and,\n"
"in fact, %s will not allow it. Also, short\n"
"passwords are vulnerable to trial-and-error searches, so\n"
"you should choose a password at least 5 characters long.\n"
"you should choose a password at least %u characters long.\n"
"Finally, the space character cannot be used in passwords."
msgid "Registration is currently disabled."
@@ -5829,44 +5744,6 @@ msgstr "Returns the key of the given channel."
msgid "Returns the matching accounts that used given email."
msgstr "Returns the matching accounts that used given email."
msgid "Returns the owner status of the given nickname"
msgstr "Returns the owner status of the given nickname"
msgid ""
"Returns whether the user using the given nickname is\n"
"recognized as the owner of the nickname. The response has\n"
"this format:\n"
" \n"
" nickname status-code account\n"
" \n"
"where nickname is the nickname sent with the command,\n"
"status-code is one of the following, and account\n"
"is the account they are logged in as.\n"
" \n"
" 0 - no such user online or nickname not registered\n"
" 1 - user not recognized as nickname's owner\n"
" 2 - user recognized as owner via access list only\n"
" 3 - user recognized as owner via password identification\n"
" \n"
"If no nickname is given, your status will be returned."
msgstr ""
"Returns whether the user using the given nickname is\n"
"recognized as the owner of the nickname. The response has\n"
"this format:\n"
" \n"
" nickname status-code account\n"
" \n"
"where nickname is the nickname sent with the command,\n"
"status-code is one of the following, and account\n"
"is the account they are logged in as.\n"
" \n"
" 0 - no such user online or nickname not registered\n"
" 1 - user not recognized as nickname's owner\n"
" 2 - user recognized as owner via access list only\n"
" 3 - user recognized as owner via password identification\n"
" \n"
"If no nickname is given, your status will be returned."
msgid "Reverses kicker"
msgstr "Reverses kicker"
@@ -5893,8 +5770,8 @@ msgstr "SSL only enforced on %s."
msgid "SSLONLY enforced by "
msgstr "SSLONLY enforced by "
msgid "Save databases and restart Services"
msgstr "Save databases and restart Services"
msgid "Save databases and restart services"
msgstr "Save databases and restart services"
msgid "Searches logs for a matching pattern"
msgstr "Searches logs for a matching pattern"
@@ -5921,29 +5798,10 @@ msgstr "Secure ops option for %s is now off."
msgid "Secure ops option for %s is now on."
msgstr "Secure ops option for %s is now on."
#, c-format
msgid "Secure option for %s is now off."
msgstr "Secure option for %s is now off."
#, c-format
msgid "Secure option for %s is now on."
msgstr "Secure option for %s is now on."
#, c-format
msgid "Secure option is now off for %s."
msgstr "Secure option is now off for %s."
#, c-format
msgid "Secure option is now on for %s."
msgstr "Secure option is now on for %s."
#, c-format
msgid "Secureops enforced on %s."
msgstr "Secureops enforced on %s."
msgid "Security"
msgstr "Security"
#, c-format
msgid ""
"See %s%s HELP %s for more information\n"
@@ -6189,8 +6047,8 @@ msgid "Session limiting is disabled."
msgstr "Session limiting is disabled."
#, c-format
msgid "Sessions: %lu entries, %lu buckets, longest chain is %d"
msgstr "Sessions: %lu entries, %lu buckets, longest chain is %d"
msgid "Sessions: %zu entries, %zu buckets, longest chain is %zu"
msgstr "Sessions: %zu entries, %zu buckets, longest chain is %zu"
msgid "Set SET-options on another nickname"
msgstr "Set SET-options on another nickname"
@@ -6213,8 +6071,8 @@ msgstr "Set the channel as permanent"
msgid "Set the channel description"
msgstr "Set the channel description"
msgid "Set the display of your group in Services"
msgstr "Set the display of your group in Services"
msgid "Set the display of your group in services"
msgstr "Set the display of your group in services"
msgid "Set the founder of a channel"
msgstr "Set the founder of a channel"
@@ -6589,8 +6447,8 @@ msgid "Show status of services and network"
msgstr "Show status of services and network"
#, c-format
msgid "Showed %d/%d matches for %s."
msgstr "Showed %d/%d matches for %s."
msgid "Showed %zu/%zu matches for %s."
msgstr "Showed %zu/%zu matches for %s."
msgid "Sign kicks that are done with the KICK command"
msgstr "Sign kicks that are done with the KICK command"
@@ -6671,10 +6529,6 @@ msgstr "Sorry, nickname grouping is temporarily disabled."
msgid "Sorry, nickname registration is temporarily disabled."
msgstr "Sorry, nickname registration is temporarily disabled."
#, c-format
msgid "Sorry, the maximum of %d access entries has been reached."
msgstr "Sorry, the maximum of %d access entries has been reached."
#, c-format
msgid "Sorry, the maximum of %d auto join entries has been reached."
msgstr "Sorry, the maximum of %d auto join entries has been reached."
@@ -6964,7 +6818,7 @@ msgid ""
" \n"
"Sets read-only mode on or off. In read-only mode, normal\n"
"users will not be allowed to modify any services data,\n"
"including channel and nickname access lists, etc. IRCops\n"
"including channel access lists, etc. Server operators\n"
"with sufficient services privileges will be able to modify\n"
"Services' AKILL, SQLINE, SNLINE and ignore lists, drop,\n"
"suspend or forbid nicknames and channels, and manage news,\n"
@@ -6979,7 +6833,7 @@ msgstr ""
" \n"
"Sets read-only mode on or off. In read-only mode, normal\n"
"users will not be allowed to modify any services data,\n"
"including channel and nickname access lists, etc. IRCops\n"
"including channel access lists, etc. Server operators\n"
"with sufficient services privileges will be able to modify\n"
"Services' AKILL, SQLINE, SNLINE and ignore lists, drop,\n"
"suspend or forbid nicknames and channels, and manage news,\n"
@@ -7500,8 +7354,8 @@ msgstr ""
"to release services's hold on your nick."
#, c-format
msgid "There are %d memos on channel %s."
msgstr "There are %d memos on channel %s."
msgid "There are %zu memos on channel %s."
msgstr "There are %zu memos on channel %s."
msgid ""
"There are no bots available at this time.\n"
@@ -7525,16 +7379,16 @@ msgid "There currently are no logging configurations for %s."
msgstr "There currently are no logging configurations for %s."
#, c-format
msgid "There is %d memo on channel %s."
msgstr "There is %d memo on channel %s."
msgid "There is %zu memo on channel %s."
msgstr "There is %zu memo on channel %s."
#, c-format
msgid ""
"There is a new memo on channel %s.\n"
"Type %s%s READ %s %d to read it."
"Type %s%s READ %s %zu to read it."
msgstr ""
"There is a new memo on channel %s.\n"
"Type %s%s READ %s %d to read it."
"Type %s%s READ %s %zu to read it."
#, c-format
msgid "There is no bot assigned to %s anymore."
@@ -7806,14 +7660,6 @@ msgstr "This command unloads the module named modname."
msgid "This command will resend you the registration confirmation email."
msgstr "This command will resend you the registration confirmation email."
#, c-format
msgid ""
"This nick is owned by someone else. Please choose another.\n"
"(If this is your nick, type %s%s IDENTIFY password.)"
msgstr ""
"This nick is owned by someone else. Please choose another.\n"
"(If this is your nick, type %s%s IDENTIFY password.)"
#, c-format
msgid "This nickname has been forbidden: %s"
msgstr "This nickname has been forbidden: %s"
@@ -7909,9 +7755,6 @@ msgstr "Turn caps lock OFF!"
msgid "Turn chanstats statistics on or off"
msgstr "Turn chanstats statistics on or off"
msgid "Turn nickname security on or off"
msgstr "Turn nickname security on or off"
msgid "Turn protection on or off"
msgstr "Turn protection on or off"
@@ -7943,24 +7786,6 @@ msgstr ""
"(However, anyone who knows your nickname can still get\n"
"information on it using the INFO command.)"
#, c-format
msgid ""
"Turns %s's security features on or off for your\n"
"nick. With SECURE set, you must enter your password\n"
"before you will be recognized as the owner of the nick,\n"
"regardless of whether your address is on the access\n"
"list. However, if you are on the access list, %s\n"
"will not auto-kill you regardless of the setting of the\n"
"KILL option."
msgstr ""
"Turns %s's security features on or off for your\n"
"nick. With SECURE set, you must enter your password\n"
"before you will be recognized as the owner of the nick,\n"
"regardless of whether your address is on the access\n"
"list. However, if you are on the access list, %s\n"
"will not auto-kill you regardless of the setting of the\n"
"KILL option."
msgid "Turns chanstats channel statistics ON or OFF for this user."
msgstr "Turns chanstats channel statistics ON or OFF for this user."
@@ -8125,6 +7950,14 @@ msgstr "Unknown command %s."
msgid "Unknown command %s. \"%s%s HELP\" for help."
msgstr "Unknown command %s. \"%s%s HELP\" for help."
#, c-format
msgid "Unknown command %s. Did you mean %s?"
msgstr "Unknown command %s. Did you mean %s?"
#, c-format
msgid "Unknown command %s. Did you mean %s? \"%s%s HELP\" for help."
msgstr "Unknown command %s. Did you mean %s? \"%s%s HELP\" for help."
#, c-format
msgid "Unknown mode character %c ignored."
msgstr "Unknown mode character %c ignored."
@@ -8222,12 +8055,12 @@ msgid "Users"
msgstr "Users"
#, c-format
msgid "Users (nick): %lu entries, %lu buckets, longest chain is %d"
msgstr "Users (nick): %lu entries, %lu buckets, longest chain is %d"
msgid "Users (nick): %lu entries, %lu buckets, longest chain is %zu"
msgstr "Users (nick): %lu entries, %lu buckets, longest chain is %zu"
#, c-format
msgid "Users (uid): %lu entries, %lu buckets, longest chain is %d"
msgstr "Users (uid): %lu entries, %lu buckets, longest chain is %d"
msgid "Users (uid): %lu entries, %lu buckets, longest chain is %zu"
msgstr "Users (uid): %lu entries, %lu buckets, longest chain is %zu"
msgid "Users list:"
msgstr "Users list:"
@@ -8239,18 +8072,10 @@ msgstr "VHost"
msgid "VHost for %s set to %s."
msgstr "VHost for %s set to %s."
#, c-format
msgid "VHost for %s set to %s@%s."
msgstr "VHost for %s set to %s@%s."
#, c-format
msgid "VHost for group %s set to %s."
msgstr "VHost for group %s set to %s."
#, c-format
msgid "VHost for group %s set to %s@%s."
msgstr "VHost for group %s set to %s@%s."
msgid "VIEW host"
msgstr "VIEW host"
@@ -8417,8 +8242,8 @@ msgstr "You are now in the group of %s."
msgid "You are over your maximum number of memos (%d). You will be unable to receive any new memos until you delete some of your current ones."
msgstr "You are over your maximum number of memos (%d). You will be unable to receive any new memos until you delete some of your current ones."
msgid "You can not NOOP Services."
msgstr "You can not NOOP Services."
msgid "You can not NOOP services."
msgstr "You can not NOOP services."
msgid "You can not disable the founder privilege because it would be impossible to re-enable it at a later time."
msgstr "You can not disable the founder privilege because it would be impossible to re-enable it at a later time."
@@ -8426,8 +8251,8 @@ msgstr "You can not disable the founder privilege because it would be impossible
msgid "You can not jupe an already juped server."
msgstr "You can not jupe an already juped server."
msgid "You can not jupe your Services' pseudoserver or your uplink server."
msgstr "You can not jupe your Services' pseudoserver or your uplink server."
msgid "You can not jupe your services' pseudoserver or your uplink server."
msgstr "You can not jupe your services' pseudoserver or your uplink server."
#, c-format
msgid "You can not reload this module directly, instead reload %s."
@@ -8473,20 +8298,20 @@ msgid "You cannot use this command."
msgstr "You cannot use this command."
#, c-format
msgid "You currently have %d memos, of which %d are unread."
msgstr "You currently have %d memos, of which %d are unread."
msgid "You currently have %zu memos, of which %zu are unread."
msgstr "You currently have %zu memos, of which %zu are unread."
#, c-format
msgid "You currently have %d memos, of which 1 is unread."
msgstr "You currently have %d memos, of which 1 is unread."
msgid "You currently have %zu memos, of which 1 is unread."
msgstr "You currently have %zu memos, of which 1 is unread."
#, c-format
msgid "You currently have %d memos."
msgstr "You currently have %d memos."
msgid "You currently have %zu memos."
msgstr "You currently have %zu memos."
#, c-format
msgid "You currently have %d memos; all of them are unread."
msgstr "You currently have %d memos; all of them are unread."
msgid "You currently have %zu memos; all of them are unread."
msgstr "You currently have %zu memos; all of them are unread."
msgid "You currently have 1 memo, and it has not yet been read."
msgstr "You currently have 1 memo, and it has not yet been read."
@@ -8519,10 +8344,10 @@ msgstr "You have 1 new memo."
#, c-format
msgid ""
"You have a new memo from %s.\n"
"Type %s%s READ %d to read it."
"Type %s%s READ %zu to read it."
msgstr ""
"You have a new memo from %s.\n"
"Type %s%s READ %d to read it."
"Type %s%s READ %zu to read it."
#, c-format
msgid "You have been invited to %s by %s."
@@ -8586,9 +8411,6 @@ msgstr "You may not drop other Services Operators' nicknames."
msgid "You may not suspend other Services Operators' nicknames."
msgstr "You may not suspend other Services Operators' nicknames."
msgid "You may view but not modify the access list of other Services Operators."
msgstr "You may view but not modify the access list of other Services Operators."
msgid "You may view but not modify the certificate list of other Services Operators."
msgstr "You may view but not modify the certificate list of other Services Operators."
@@ -8619,12 +8441,8 @@ msgid "You must confirm your account before you may send a memo."
msgstr "You must confirm your account before you may send a memo."
#, c-format
msgid "You must enter the channel name twice as a confirmation that you wish to drop %s."
msgstr "You must enter the channel name twice as a confirmation that you wish to drop %s."
#, c-format
msgid "You must have been using this nick for at least %d seconds to register."
msgstr "You must have been using this nick for at least %d seconds to register."
msgid "You must have been using this nick for at least %lu seconds to register."
msgstr "You must have been using this nick for at least %lu seconds to register."
#, c-format
msgid "You must have the %s(ME) privilege on the channel to use this command."
@@ -8766,8 +8584,8 @@ msgid "Your password is too long. It must be shorter than %u characters."
msgstr "Your password is too long. It must be shorter than %u characters."
#, c-format
msgid "Your password is too short. It must must be longer than %u characters."
msgstr "Your password is too short. It must must be longer than %u characters."
msgid "Your password is too short. It must be longer than %u characters."
msgstr "Your password is too short. It must be longer than %u characters."
msgid "Your password reset request has expired."
msgstr "Your password reset request has expired."
@@ -8779,10 +8597,6 @@ msgstr "Your vHost has been requested."
msgid "Your vhost of %s is now activated."
msgstr "Your vhost of %s is now activated."
#, c-format
msgid "Your vhost of %s@%s is now activated."
msgstr "Your vhost of %s@%s is now activated."
msgid "Your vhost was removed and the normal cloaking restored."
msgstr "Your vhost was removed and the normal cloaking restored."

Some files were not shown because too many files have changed in this diff Show More