1
0
mirror of https://github.com/anope/anope.git synced 2026-06-12 17:04:47 +02:00

Compare commits

...

311 Commits

Author SHA1 Message Date
Sadie Powell a861a059f6 Fix the config parser using int for values that can not be negative. 2026-06-08 15:41:00 +01:00
Sadie Powell 90da25f84f Add Block::GetBlocks which returns an iterable list of blocks. 2026-06-08 15:39:28 +01:00
Sadie Powell ab362c9828 Pascalize some typedefs in Configuration::Block. 2026-06-08 14:17:30 +01:00
Kufat d1f6da1817 Allow specifying the order of ns_set_misc entries. 2026-06-08 09:36:18 +01:00
Sadie Powell 9280d90aba Make it clear that the hmac-* algos can't be used in the config. 2026-06-08 09:09:19 +01:00
Sadie Powell c71f69208d Add various config options to the argon2 algo in anope-mkpasswd. 2026-06-08 09:08:19 +01:00
Sadie Powell d0080b85a7 Fix a typo in the default Argon2 priority in the example config. 2026-06-08 09:07:16 +01:00
Sadie Powell 745e94783d Respect BCRYPT_ROUNDS from the environment in anope-mkpasswd. 2026-06-08 08:58:15 +01:00
Sadie Powell c32be6a711 Fix a missing colon when REPRODUCIBLE_BUILD is defined. 2026-06-08 08:54:46 +01:00
Kufat 9dd3acfc87 Append EXTRA_CONFIG_ARGS to CMake command 2026-06-05 20:34:09 +01:00
Sadie Powell 82b6da3763 Merge branch '2.0' into 2.1. 2026-05-26 10:48:07 +01:00
Sadie Powell 8e691eac80 Update the change log. 2026-05-26 10:44:44 +01:00
Sadie Powell 2327c6ac9a Fix an escaped value that wasn't escaped enough in chanstats. 2026-05-26 10:36:50 +01:00
Sadie Powell e23ea8f8ea Escape user-provided values in ldap_authentication and ldap_oper. 2026-05-26 09:30:15 +01:00
Sadie Powell 449cfa6503 Add EscapeDN and EscapeSF to the LDAP API. 2026-05-26 09:29:57 +01:00
Sadie Powell 59c60849b6 Remove hard coded references to default access levels. 2026-05-21 11:52:32 +01:00
Sadie Powell 6d2c4fb612 Merge branch '2.0' into 2.1. 2026-05-20 22:14:37 +01:00
Sadie Powell 01fc7421b6 Backport the pull request checks from 2.0. 2026-05-20 22:13:38 +01:00
TehPeGaSuS 3a59a81aa4 Update the Portuguese translation. 2026-05-20 20:57:10 +01:00
Sadie Powell c24de0ca8f Fix update.sh on recent gettext. 2026-05-20 17:42:17 +01:00
KidProtect 18555638c9 Update the Romanian translation. 2026-05-20 09:59:48 +01:00
Sadie Powell d5a653fe94 Make it clearer how to enable localisation. 2026-05-19 16:14:14 +01:00
Sadie Powell ad3be96283 Increase {nickserv}:regdelay to 15 minutes, add {ns_group}:delay. 2026-05-17 16:06:42 +01:00
Sadie Powell d689c0686d Update the Conan dependencies. 2026-05-16 20:57:44 +01:00
Sadie Powell 4ca2952069 Update the change log. 2026-05-16 20:57:44 +01:00
Sadie Powell caf904c938 Fix updating the access description in cs_flags. 2026-05-16 11:23:25 +01:00
Sadie Powell 8930cc2a92 Avoid potential crashes from calling strftime on a weird value. 2026-05-15 19:51:57 +01:00
Sadie Powell 47b927d788 Fix a crash from an uninitialised field in migrated flags. 2026-05-15 19:45:28 +01:00
Sadie Powell 647a07ff96 Fix an crash when a user migrates their own access. 2026-05-15 15:54:57 +01:00
Sadie Powell a856e80b1e Move migration messages to cs_flags, split non-migratable and non-migrated. 2026-05-15 09:06:02 +01:00
Sadie Powell 55746e1098 Fix users getting extra privileges when migrating to flags. 2026-05-15 08:43:03 +01:00
Sadie Powell e0da3bae18 Fix confirming accounts when admin-only confirmation is enabled. 2026-05-14 19:24:29 +01:00
Sadie Powell c1cf7b0bcc Fix checking if an access entry has a flag when migrating.
Closes #574.
2026-05-13 23:41:01 +01:00
Sadie Powell 1cf64a49c0 Fix the unique runtime library names on Windows. 2026-05-12 14:20:21 +01:00
Sadie Powell 92ed0071d7 Make the runtime copy error more verbose. 2026-05-12 14:10:04 +01:00
Sadie Powell 9469cb8b0e Merge branch '2.0' into 2.1 2026-05-12 13:53:36 +01:00
Sadie Powell e0b715b185 Sync the CI scripts. 2026-05-12 11:28:28 +01:00
Sadie Powell e6d7306202 Backport the mailmap changes from 2.1. 2026-05-12 11:26:06 +01:00
Sadie Powell 2107d18d9e Remove suggestion to email language file updates to team@.
Its 2026 and its way easier for everyone involved to just file a
pull request.
2026-05-11 13:00:55 +01:00
Sadie Powell acb9428635 Backport the locales-all advice from 2.1. 2026-05-11 12:58:47 +01:00
Sadie Powell d942da1df5 Update author list. 2026-05-06 12:01:57 +01:00
Sadie Powell a961259556 Merge branch '2.0' into 2.1. 2026-05-06 12:00:21 +01:00
Sadie Powell 27a19dcc52 Update the mailmap. 2026-05-06 11:59:03 +01:00
Sadie Powell e45814bfd6 Deduplicate the timer constructors with delegation. 2026-05-02 15:40:19 +01:00
Sadie Powell f12b590a6d Change Timer::Tick to return bool, get rid of the repeating field. 2026-05-02 15:40:19 +01:00
Sadie Powell c0bafe10b4 Avoid double deleting the ban timer in cs_ban. 2026-05-02 10:55:25 +01:00
dependabot[bot] 5f40d0d6bb Bump negrutiu/nsis-install from 2 to 3
Bumps [negrutiu/nsis-install](https://github.com/negrutiu/nsis-install) from 2 to 3.
- [Release notes](https://github.com/negrutiu/nsis-install/releases)
- [Commits](https://github.com/negrutiu/nsis-install/compare/v2...v3)

---
updated-dependencies:
- dependency-name: negrutiu/nsis-install
  dependency-version: '3'
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
2026-05-01 21:27:36 +01:00
Sadie Powell 6b416cc64d Bump for 2.1.25-git. 2026-05-01 12:39:20 +01:00
Sadie Powell 331c33c350 Release 2.1.24. 2026-05-01 12:38:33 +01:00
Sadie Powell 10eef1af23 Update the change log. 2026-05-01 12:38:18 +01:00
Sadie Powell 90ff716ed3 Remove using statements that break unity builds. 2026-04-30 13:37:03 +01:00
Sadie Powell f67c70e485 Get rid of the using statement for Configuration::Uplink.
This breaks unity builds.
2026-04-30 13:23:06 +01:00
Sadie Powell fd5e10c54c Fix an inverted default for should_commit. 2026-04-27 20:10:53 +01:00
Sadie Powell 029565c894 Convert some messages in cs_enforce to use format strings. 2026-04-26 18:26:23 +01:00
Sadie Powell 9b8862826c Sort the files before running xgettext so we get consistent output. 2026-04-26 18:24:19 +01:00
Sadie Powell e2dc77641a Add some helper methods to CommandSource for translation. 2026-04-26 18:07:56 +01:00
Sadie Powell 7eb710a009 Update the change log. 2026-04-26 12:57:03 +01:00
Sadie Powell b33b5a6630 Use versioned prefixes for the SQL database tables. 2026-04-26 12:49:54 +01:00
Sadie Powell f4d5b1f01d Clean up the Config script a bit. 2026-04-26 12:45:57 +01:00
Sadie Powell b61daf81b0 Allow as many dashes as provided on Config options. 2026-04-23 19:23:12 +01:00
Sadie Powell da3f667188 Update the change log. 2026-04-23 19:08:55 +01:00
Sadie Powell 040cd99027 Add more debug logging to db_json. 2026-04-23 19:08:55 +01:00
Sadie Powell 6c7977f239 Remove duplicate objects from corrupt databases on database write. 2026-04-23 19:08:55 +01:00
Sadie Powell 9b8570a2ee Banish Redis support to the shadow realm.
Nobody actually uses this and it hasn't been tested in years so it
a massive pain to maintain. It may be replaced with an alternate
NoSQL database such as MongoDB in the future.
2026-04-23 17:42:42 +01:00
Sadie Powell 64f386e29e Skip deserialising the old cert column when its empty. 2026-04-23 13:48:12 +01:00
Sadie Powell 9434be29bc Delete the cert object after removing it from the cert list. 2026-04-23 13:41:11 +01:00
Sadie Powell 9aff71fb2f Merge branch '2.0' into 2.1. 2026-04-16 11:54:36 +01:00
Sadie Powell ba26d9a15c Add a missing FNAME handler on InspIRCd 3+.
Closes #572.
2026-04-16 11:50:10 +01:00
Sadie Powell 22dc33de9f Add support for the ratified channel-context tag. 2026-04-09 12:01:16 +01:00
dependabot[bot] 11d6f58a1a Bump microsoft/setup-msbuild from 2 to 3
Bumps [microsoft/setup-msbuild](https://github.com/microsoft/setup-msbuild) from 2 to 3.
- [Release notes](https://github.com/microsoft/setup-msbuild/releases)
- [Commits](https://github.com/microsoft/setup-msbuild/compare/v2...v3)

---
updated-dependencies:
- dependency-name: microsoft/setup-msbuild
  dependency-version: '3'
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
2026-04-01 22:06:38 +01:00
Sadie Powell f32d6453f5 Bump for 2.1.24-git. 2026-04-01 10:58:23 +01:00
Sadie Powell 1606bb01a3 Release 2.1.23. 2026-04-01 10:57:58 +01:00
Sadie Powell 3d86c82ac5 Update the change log. 2026-03-30 17:49:06 +01:00
Sadie Powell a858a1e0a0 Fix the missing AUTOLOGIN extension. 2026-03-30 17:48:07 +01:00
Sadie Powell eaa24d3b0a Fix the location of &* on types. 2026-03-26 16:32:56 +00:00
Sadie Powell 5355b53008 Remove the remaining istream use in Data. 2026-03-26 16:32:56 +00:00
Sadie Powell 85a32077b5 Add Data::Load, make the istream operator private. 2026-03-26 14:35:31 +00:00
Sadie Powell 5006993d0a Make the hops parameter to Server optional. 2026-03-26 12:25:09 +00:00
Sadie Powell 1b2b4386c1 Use ProtocolException instead of setting Quitting manually. 2026-03-26 12:06:25 +00:00
Sadie Powell b199d74088 Fix the message counts in RPL_STATSLINKINFO. 2026-03-26 11:57:13 +00:00
Sadie Powell 7e2ef3774b Move NET_BUFSIZE to socket_transport. 2026-03-24 20:18:15 +00:00
Sadie Powell e002f39509 Abolish the few remaining uses of BUFSIZE. 2026-03-23 02:14:51 +00:00
Sadie Powell d3395a5d39 Include the file name in the translation files.
This was not available when we stripped the line details and it
provides a good compromise between diff noise and clarity.
2026-03-19 00:01:53 +00:00
Sadie Powell 1deff337fe Skip the run and vendor directory when updating the translations. 2026-03-19 00:01:53 +00:00
KidProtect adf457ffb2 Update the Romanian translation. 2026-03-18 20:27:11 +00:00
TehPeGaSuS 550adc13f3 Update the Portuguese translation. 2026-03-18 20:26:04 +00:00
Sadie Powell 04bdcb8ce6 Update the en_US language file. 2026-03-17 00:50:26 +00:00
Sadie Powell 0a99866e5b Add more examples to the BotServ modules. 2026-03-17 00:47:31 +00:00
Sadie Powell c22f7a9038 Add examples to the greet module and improve the help output. 2026-03-17 00:46:11 +00:00
Sadie Powell 074ad6556c Allow migrating access entries to the flags access system. 2026-03-16 19:18:59 +00:00
Sadie Powell a657cb5edf Move access entries for other access systems under an ALL option.
This should hopefully make it clearer that the access systems are
separate.
2026-03-16 19:18:35 +00:00
Sadie Powell 63032dc8d9 Fix translating the help output when the flexible layout is used. 2026-03-16 18:21:29 +00:00
TehPeGaSuS 404f55502e Finish the Portuguese (Portugal) translation. 2026-03-16 17:52:32 +00:00
Sadie Powell 73f3621af6 Update the en_US translation file. 2026-03-16 15:17:33 +00:00
Sadie Powell 2a1409face Fix a non-translatable string which has been marked as translatable. 2026-03-16 15:16:55 +00:00
Sadie Powell 9834040948 Fix checking the wrong config option in os_stats. 2026-03-11 16:41:50 +00:00
Sadie Powell f111e3b3ec Deduplicate the messages in the os_stats akill stats. 2026-03-11 16:37:15 +00:00
Sadie Powell 22a1924bfd Allow Command::FindCommandFromService to skip hidden commands. 2026-03-11 05:44:48 +00:00
Sadie Powell fa5bb3f1bf Show the default levels in LEVELS DESC.
Closes #564.
2026-03-10 23:30:35 +00:00
Sadie Powell 12545ccbde Use auto in as many places as possible. 2026-03-05 18:04:33 +00:00
dependabot[bot] 98703052cc Bump actions/upload-artifact from 6 to 7
Bumps [actions/upload-artifact](https://github.com/actions/upload-artifact) from 6 to 7.
- [Release notes](https://github.com/actions/upload-artifact/releases)
- [Commits](https://github.com/actions/upload-artifact/compare/v6...v7)

---
updated-dependencies:
- dependency-name: actions/upload-artifact
  dependency-version: '7'
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
2026-03-01 19:04:34 +00:00
KidProtect 15635779af Update the Romanian translation. 2026-03-01 18:54:31 +00:00
Sadie Powell 1fc58c7a57 Bump for 2.1.23-git. 2026-03-01 03:00:19 +00:00
Sadie Powell e9614986d0 Release 2.1.22. 2026-03-01 03:00:19 +00:00
Sadie Powell dde9113418 Fix erroneously repeating the command name in the example wrapper. 2026-03-01 03:00:19 +00:00
Sadie Powell 99f7ea8307 Clarify the purpose of the autologin option in the change log. 2026-03-01 02:53:19 +00:00
Sadie Powell f912e30b25 Disable autologin by default in the example configs. 2026-03-01 02:47:55 +00:00
Sadie Powell 2ca5045593 Update the change log. 2026-02-28 17:28:29 +00:00
Sadie Powell be6a454579 Update author list. 2026-02-26 16:40:13 +00:00
Sadie Powell 1ffeb85727 Allow mkauthors to omit users that don't want to be included. 2026-02-26 16:39:43 +00:00
Sadie Powell 95fc992355 Update the mailmap. 2026-02-26 16:37:22 +00:00
Sadie Powell 0df341fa32 Fix echoing tags on Solanum. 2026-02-25 18:32:19 +00:00
Sadie Powell decbab5d09 Fix translating examples. 2026-02-25 15:56:58 +00:00
Sadie Powell 9409560597 Tweak the layout and ergonomics the ExampleWrapper class. 2026-02-25 15:38:11 +00:00
Sadie Powell a02b81f219 Fix iterating the status mode list while unsetting modes. 2026-02-25 03:37:29 +00:00
Sadie Powell 6c86cd108a Add a default command help implementation. 2026-02-25 03:11:10 +00:00
Sadie Powell 3ea5b078dc Fix some minor typos in the change log. 2026-02-25 00:50:45 +00:00
Sadie Powell d77fd4bde1 Update the change log. 2026-02-25 00:39:01 +00:00
Sadie Powell da723d562f Fix the missing command blocks for nickserv/{sa,}set/autologin. 2026-02-25 00:12:50 +00:00
Sadie Powell 5db1a57833 Fix handling incoming FIDENT messages on InspIRCd. 2026-02-25 00:03:24 +00:00
Sadie Powell a01cd481b9 Send the clock synchronisation TS token on UnrealIRCd. 2026-02-24 23:57:39 +00:00
Sadie Powell aa41fffd49 Remove some obsolete InspIRCd compatibility code. 2026-02-24 21:10:48 +00:00
Sadie Powell 8062d01a90 Rework the output of nickserv/list.
* Add a new account name field to the output.
* Remove the last mask field from the output. This is almost never
  useful nowadays.
* Move the suspended and unconfirmed status to a new status field.
2026-02-24 19:11:48 +00:00
Sadie Powell d0c2baeed4 Add a type for wrapping examples instead of using manual linewraps.
At a later date we should revise the examples for all commands for
consistency.
2026-02-24 18:21:44 +00:00
Sadie Powell 538b2cf035 Refactor the logic in ns_cert. 2026-02-24 15:54:56 +00:00
Sadie Powell 7aeac28ca7 Rewrite the Windows install docs to reflect how it works now. 2026-02-24 13:06:23 +00:00
Sadie Powell 3244eef71d Update the change log. 2026-02-24 01:33:21 +00:00
Sadie Powell f91cf1745d Fix db_json restoring the object identifier when unserialising. 2026-02-24 01:07:47 +00:00
Sadie Powell f380b27ed3 Move fingerprints to their own table. 2026-02-22 17:03:32 +00:00
Sadie Powell 66f53128ce Add support for disabling automatic login.
Automatic login was created before we had SASL. Now, if a user wants
to log in using their client certificate they can use SASL EXTERNAL.
2026-02-22 17:01:34 +00:00
Sadie Powell 45496780f8 Add more configuration options to {cs,ns}_set_misc.
* Add titles which are separate from the command name.
* Add support for sending data entries as swhois.
* Add validation of data using regexps.
2026-02-19 16:36:29 +00:00
Sadie Powell 8500fefe91 Allow importing custom Atheme metadata to {cs,ns}_set_misc. 2026-02-19 16:35:11 +00:00
Sadie Powell 7242c740c8 Fix matching stacked extended bans. 2026-02-18 17:39:13 +00:00
Sadie Powell d43acc2381 Store modes as their object form in ModeStatus.
This has the side effect of preventing users from putting nonsense
modes in {botserv}:botmodes and other related fields.
2026-02-16 23:24:04 +00:00
Sadie Powell 2f1f04f7cb Short circuit empty format strings in Anope::Format.
This fixes a bug where Anope would loop infinitely when passed an
empty format string.
2026-02-16 00:55:08 +00:00
Sadie Powell 5b2ab323ab Reset the swhois status on InspIRCd when reconnecting. 2026-02-15 11:16:21 +00:00
Sadie Powell 5aa71469e1 Remove trailing semicolons from the config file. 2026-02-14 15:41:54 +00:00
Sadie Powell 5aeb078391 Revamp support for swhois. 2026-02-14 15:09:22 +00:00
Sadie Powell bc737c20c9 Implement support for the ratified +reply tag. 2026-02-13 15:48:49 +00:00
Sadie Powell 7d7ca934b3 Fix some places that weren't updated for the new nbsp character. 2026-02-10 21:58:04 +00:00
Sadie Powell 238adae2cd Fix the description of access entries imported from Atheme. 2026-02-08 19:51:38 +00:00
Sadie Powell 407f604d48 Update the change log. 2026-02-08 14:11:09 +00:00
Sadie Powell 76af25f0b4 Deduplicate some of the Windows extra module enabling code. 2026-02-08 14:11:09 +00:00
Sadie Powell bf5ab14a21 Also build regex_tre on Windows. 2026-02-08 14:11:09 +00:00
Sadie Powell 766a18b0f1 Allow building regex_posix against the PCRE2 POSIX compat layer. 2026-02-08 12:35:16 +00:00
Sadie Powell 1f0c76516b Change to a more reliable method for installing NSIS.
[skip alpine ci]
[skip ubuntu ci]
2026-02-08 10:54:52 +00:00
Sadie Powell aef1925b1d Fix finding gettext on Windows.
Unfortunately we need to move our escape character from 0x1A to 0x1B
because newer versions of gettext treat the former as an EOF character.
2026-02-08 00:23:41 +00:00
Sadie Powell e7aa0cb583 Migrate the Windows dependencies to Conan 2.
[skip alpine ci]
[skip ubuntu ci]
2026-02-07 21:14:20 +00:00
Sadie Powell bd72a444df Bump for 2.1.22-git. 2026-02-07 13:24:31 +00:00
Sadie Powell 147638bf5a Release 2.1.21. 2026-02-07 13:23:13 +00:00
Sadie Powell 1d8086b12d Update the change log. 2026-02-06 17:31:01 +00:00
Sadie Powell e6fcf3ffb3 Make being unable to write the database fatal as it was in db_flatifle. 2026-02-06 17:17:08 +00:00
Sadie Powell de122145d9 Fix locking modes that take parameters only when adding. 2026-02-06 16:51:17 +00:00
Sadie Powell 84b94bdbf1 Fix some uses of Entry that didn't have their arguments swapped. 2026-01-30 11:09:28 +01:00
Sadie Powell 5a4781161a Update the change log. 2026-01-30 09:27:58 +00:00
Sadie Powell 7b70119294 Merge branch '2.0' into 2.1. 2026-01-30 08:52:32 +00:00
Sadie Powell bc9e035038 Extract all public types in Doxygen documentation. 2026-01-30 08:51:21 +00:00
Sadie Powell c3e62d3772 Improve the usability of adding hostmasks to access lists.
* When adding a user by their nickname check for their account
  instead of just adding their hostmask.

* Allow opting out of cleaning up of malformed hostmasks.
2026-01-28 19:47:56 +00:00
Sadie Powell 48bb6089fa Swap the mode and mask params to Entry and make the mode optional. 2026-01-26 18:57:29 +00:00
Sadie Powell debfa59be6 Bump for 2.0.20-git. 2026-01-26 13:55:35 +00:00
Sadie Powell e321749d1f Release 2.0.19. 2026-01-26 13:53:05 +00:00
Sadie Powell 8a2d7526cd Update the change log. 2026-01-26 13:52:40 +00:00
Sadie Powell a0676ef8b1 Merge branch '2.0' into 2.1. 2026-01-26 13:11:45 +00:00
Sadie Powell e1f34ee5d6 Add a Doxygen config file. 2026-01-26 13:11:17 +00:00
Sadie Powell 6e18030285 Improve the ban mask parsing in Entry. 2026-01-20 12:34:55 +00:00
Sadie Powell 172f443421 Improve the error messages when an access list is full. 2026-01-19 11:53:54 +00:00
Sadie Powell 655c4fb5eb Clean up the target mask code in access modules. 2026-01-19 10:43:59 +00:00
Sadie Powell 650f953cb1 Clean up masks when adding them to an access list.
Closes #554.
2026-01-19 00:35:31 +00:00
Sadie Powell db3f60292f Fix importing the last used time of nicks in db_atheme. 2026-01-16 23:43:13 +00:00
Sadie Powell 792308ed5d Rename ChanUserContainer to Membership. 2026-01-14 17:17:37 +00:00
Sadie Powell 3af9da7c05 Update the change log. 2026-01-14 16:43:29 +00:00
Sadie Powell 59d8c28c85 Fix changing user passwords with SASET.
Closes #553.
2026-01-12 17:11:15 +00:00
Sadie Powell 520826cdea Remove some dead code from the webcpanel module. 2026-01-10 21:41:22 +00:00
Sadie Powell bfb47ab5a6 Rework the interface for service references. 2026-01-10 21:23:23 +00:00
Sadie Powell 25cd6c96e3 Fix cloning akick entries in cs_clone. 2026-01-10 17:45:01 +00:00
Sadie Powell 5dbbac21ec Fix confirming usernames using the webcpanel. 2026-01-08 14:30:08 +00:00
Sadie Powell 81aa37543e Merge branch '2.0' into 2.1. 2026-01-01 18:07:12 +00:00
Sadie Powell 4ac5cf89e3 Update the copyright headers for 2025. 2026-01-01 18:04:37 +00:00
dependabot[bot] c479bc75d9 Bump actions/cache from 4 to 5
Bumps [actions/cache](https://github.com/actions/cache) from 4 to 5.
- [Release notes](https://github.com/actions/cache/releases)
- [Changelog](https://github.com/actions/cache/blob/main/RELEASES.md)
- [Commits](https://github.com/actions/cache/compare/v4...v5)

---
updated-dependencies:
- dependency-name: actions/cache
  dependency-version: '5'
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
2026-01-01 16:14:00 +00:00
dependabot[bot] 6e4dc4947e Bump actions/upload-artifact from 5 to 6
Bumps [actions/upload-artifact](https://github.com/actions/upload-artifact) from 5 to 6.
- [Release notes](https://github.com/actions/upload-artifact/releases)
- [Commits](https://github.com/actions/upload-artifact/compare/v5...v6)

---
updated-dependencies:
- dependency-name: actions/upload-artifact
  dependency-version: '6'
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
2026-01-01 16:13:49 +00:00
Sadie Powell 05002301cc Fix a crash when clearing the entry message list. 2025-12-27 10:47:58 +00:00
Sadie Powell 1d18ba3358 Fix RequireVersion to use an unsigned integer. 2025-12-20 00:13:35 +00:00
Sadie Powell 65827611e7 Add better error handling in Anope::LastError. 2025-12-20 00:13:35 +00:00
Sadie Powell 0ae67cb371 Rename Serializable::id to object_id to avoid conflicts. 2025-12-20 00:13:35 +00:00
Sadie Powell 93e5b871e1 Version numbers should be unsigned. 2025-12-17 14:30:45 +00:00
Sadie Powell 0f433ebe9c Remove or fix various useless uses of const. 2025-12-17 14:10:42 +00:00
Sadie Powell 3e8c5b2685 Comment out options that users generally shouldn't change. 2025-12-17 14:10:10 +00:00
Sadie Powell 3fe9097439 The default expiry is 30 days not 90 days.
Ref: #548
2025-12-16 23:56:16 +00:00
Sadie Powell 57446ee49b Improve the BotServ fantasy commands
- Allow multiple character fantasy prefixes.
- Allow using the command alias as the command prefix.
- Match the service name case insensitively.
2025-12-14 11:14:07 +00:00
Sadie Powell 852aae5e4f Fix the syntax of chanserv/suspend and nickserv/suspend.
Closes #540
Closes #547
2025-12-13 20:23:20 +00:00
Sadie Powell caa9b27a6c Fix the spelling of unload in os_module. 2025-12-13 15:06:37 +00:00
Sadie Powell adcdaeca04 Fix the documented default for {chanserv}:expire.
Closes #548.
2025-12-12 16:19:00 +00:00
Sadie Powell 641e011e13 Fix inconsistencies in reading the NickServ expiry time. 2025-12-12 16:16:42 +00:00
Sadie Powell aba75c1f31 Fix an inverted condition in ns_email. 2025-12-11 10:57:54 +00:00
Sadie Powell f367820714 Implement better rehash detection support in enc_argon2. 2025-12-08 11:44:34 +00:00
Sadie Powell f526932882 Backport CI changes from the 2.1 branch. 2025-12-03 16:26:32 +00:00
Sadie Powell db2f7ca192 Merge branch '2.0' into 2.1. 2025-12-03 16:20:33 +00:00
Sadie Powell 5a9f581491 Fix chanserv/enforce enforcing against founders.
Closes #532.
2025-12-03 16:18:50 +00:00
dependabot[bot] 6b707049f2 Bump actions/upload-artifact from 4 to 5
Bumps [actions/upload-artifact](https://github.com/actions/upload-artifact) from 4 to 5.
- [Release notes](https://github.com/actions/upload-artifact/releases)
- [Commits](https://github.com/actions/upload-artifact/compare/v4...v5)

---
updated-dependencies:
- dependency-name: actions/upload-artifact
  dependency-version: '5'
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
2025-12-01 19:42:24 +00:00
dependabot[bot] 3d845097de Bump actions/checkout from 5 to 6
Bumps [actions/checkout](https://github.com/actions/checkout) from 5 to 6.
- [Release notes](https://github.com/actions/checkout/releases)
- [Changelog](https://github.com/actions/checkout/blob/main/CHANGELOG.md)
- [Commits](https://github.com/actions/checkout/compare/v5...v6)

---
updated-dependencies:
- dependency-name: actions/checkout
  dependency-version: '6'
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
2025-12-01 19:42:04 +00:00
Sadie Powell f368f5c541 Bump for 2.1.21-git. 2025-12-01 12:41:21 +00:00
Sadie Powell 87cf324d13 Release 2.1.20. 2025-12-01 12:40:45 +00:00
Sadie Powell 8b2a29a0b0 Update author list. 2025-12-01 12:38:47 +00:00
Sadie Powell bd7f0050d2 Update the change log. 2025-12-01 12:35:39 +00:00
Sadie Powell 1eb26e8a38 Write a real version to anoperc. 2025-11-29 10:43:30 +00:00
Sadie Powell 52ee467755 Improve the usability of anope-mkpasswd slightly. 2025-11-25 15:45:57 +00:00
Sadie Powell d179c0351e Add a script for generating passwords for the config and database.
Closes #381
2025-11-25 14:26:18 +00:00
Sadie Powell 6ca027db00 Start work on the change log for the next release. 2025-11-25 01:53:42 +00:00
Sadie Powell 08bebeb9f0 Unmark a message with no translatable content as translatable. 2025-11-25 00:48:41 +00:00
Sadie Powell 52063fe05f Fix some messages that should use plural forms. 2025-11-25 00:48:41 +00:00
Sadie Powell 20a8fcc574 Stop inconsistently apologising in error messages. 2025-11-25 00:48:41 +00:00
Sadie Powell e0331dae2a Add the TRY_AGAIN_LATER message for when a command is unavailable.
This replaces SERVICE_UNAVAILABLE and other custom messages.
2025-11-25 00:48:41 +00:00
Sadie Powell bee669b42e Sort defs alphabetically and remove obsolete entries. 2025-11-25 00:48:41 +00:00
Sadie Powell be965f2618 Rework the module headers to use namespaces and static services. 2025-11-25 00:48:41 +00:00
Sadie Powell 62ca6c96eb Move akick from the core to cs_akick. 2025-11-24 12:41:34 +00:00
Sadie Powell cadeac2dea Even more build system cleanup. 2025-11-21 16:33:01 +00:00
Sadie Powell c5e03de667 Attempt to re-parent objects after reloading. 2025-11-21 11:42:47 +00:00
Sadie Powell 6ce719437f Rename an event for consistency. 2025-11-21 00:56:30 +00:00
Sadie Powell 88658a12f3 Create and check objects following the type order.
This is probably fine as it was but its best to be sure.
2025-11-21 00:56:09 +00:00
Sadie Powell 9256b051fc Delay running the type creation event until after initialisation.
Doing this during the ctor can run into circumstances where the
vtable has not been fully initialised and the call gets routed to
the pure virtual implementation causing a crash.
2025-11-20 23:59:56 +00:00
Sadie Powell 20ca0c76e0 Store hs_offer data with the correct data type. 2025-11-20 23:59:32 +00:00
Sadie Powell 9cc2ea8a56 Don't reload the main database when reloading a module. 2025-11-20 20:09:09 +00:00
Sadie Powell e62ca67d2e Initialize the HostOffer type before the HostOffer list. 2025-11-20 19:14:09 +00:00
Sadie Powell e4eb3f1cc5 Move the hs_offer list into the module class. 2025-11-20 15:16:51 +00:00
Sadie Powell 319a523b4f Add support for loading forbids from a file.
Closes #365.
2025-11-20 15:05:36 +00:00
Sadie Powell cfe1317b5d Allow forbidding passwords. 2025-11-20 13:07:13 +00:00
Sadie Powell 50a2dd227f Upload the installer build artifact when not doing a release. 2025-11-18 16:01:04 +00:00
Sadie Powell b33ebc0058 Version the install directory. 2025-11-18 04:00:04 +00:00
Sadie Powell 6e151a693a Clean up more obsolete build system cruft. 2025-11-18 04:00:04 +00:00
Sadie Powell 838de2f5b8 Kill a bunch of obsolete build system cruft. 2025-11-18 02:18:05 +00:00
Sadie Powell 5cc5d0effd Extract build_module from build_modules. 2025-11-18 01:41:11 +00:00
Sadie Powell ca27e1e60f Misc fixes to hs_offer.
- Cache the network name to avoid looking it up repeatedly.
- Fix {regdate} and {regepoch} being inverted.
- Fix building the add reason and make it optional as intended.
- Use a dummy templating function when adding to allow more reliable
  checks for whether the offered vhost is acceptable.
2025-11-18 01:14:58 +00:00
Sadie Powell 73175a0187 Use the name of the language in ns_set_language not the code. 2025-11-17 23:50:19 +00:00
Sadie Powell dc32f6945e Improve the help for nickserv/{sa,}set/{language,timezone}. 2025-11-17 23:13:18 +00:00
Sadie Powell 0489b47236 Redocument options:defaultlanguage. 2025-11-17 23:07:18 +00:00
Sadie Powell 4fbcc7f391 Fix an uninitialized read in hs_offer. 2025-11-17 22:31:36 +00:00
Sadie Powell 6e26d96a44 Update the en_US language file. 2025-11-17 22:18:19 +00:00
Sadie Powell d3d77c5893 Fix a missing period in hs_offer. 2025-11-17 22:17:19 +00:00
Sadie Powell 6c163e53d8 Import a refactored version of hs_offer from the modsite.
Co-authored-by: Matt Schatz <genius3000@g3k.solutions>
2025-11-17 22:16:12 +00:00
Sadie Powell 5ae45d96af Allow setting the language and timezone back to the default. 2025-11-15 16:52:24 +00:00
Sadie Powell e2af62352d Add a workaround for some broken databases. 2025-11-15 00:01:52 +00:00
Sadie Powell c2681733df Merge branch '2.0' into 2.1. 2025-11-13 13:24:07 +00:00
Sadie Powell f6c093ae23 Fix not respecting the mode state when removing a mode lock. 2025-11-13 13:23:05 +00:00
Sadie Powell 2c3ee456c1 Deduplicate mode locking code, stack more lock messages. 2025-11-13 12:52:04 +00:00
Sadie Powell 5e55a223c9 Fix synchronising channels on link.
The uplink may not be fully connected yet in the place that this was
previously called.
2025-11-12 22:00:19 +00:00
Sadie Powell 0fffae7bb5 Centralise logic for determining if a mode needs a param in cs_mode. 2025-11-12 22:00:19 +00:00
Sadie Powell 989a2da73a Fix getting the brief mode lock string. 2025-11-12 22:00:05 +00:00
Sadie Powell 213f3dd41b Only require a param in LOCK DEL when deleting a list/status mode.
Closes #535.
2025-11-12 20:57:06 +00:00
Sadie Powell 1c84a5e3c9 Fix a syntax error in a cs_mode help message.
Closes #537.
2025-11-12 19:52:03 +00:00
Sadie Powell f721e0974e Update author list. 2025-11-12 19:49:59 +00:00
Sadie Powell 7da2364b69 Switch enc_sha1 to use a vendored library. 2025-11-12 19:49:59 +00:00
Sadie Powell fa0c6ba821 Consistently use the same header layout on all files. 2025-11-12 19:49:59 +00:00
Sadie Powell dee4574ae7 Resynchronise the license file with the latest copy from the FSF. 2025-11-12 19:30:27 +00:00
Sadie Powell 61396e8c01 Disable channel suspend expiry by default. 2025-11-12 13:48:15 +00:00
Sadie Powell 32e5339b54 Remove an obsolete command from the example config and resort. 2025-11-12 01:01:38 +00:00
Sadie Powell c4e0c41f11 Use bool for boolean fields not int. 2025-11-11 23:50:49 +00:00
Sadie Powell b2ee8a5b4b Fix a typo in cs_mode. 2025-11-11 22:26:17 +00:00
Sadie Powell 4b05ec26b7 Make mlock messages consistent, centralise mode string formatting.
Closes #356.
2025-11-11 21:12:32 +00:00
Sadie Powell e1fe7e17d3 Add support for the UnrealIRCd flood profile mode. 2025-11-11 17:49:21 +00:00
Sadie Powell e6fa71af9d Refactor UnrealIRCd mode protoctl parsing code. 2025-11-11 17:49:00 +00:00
Sadie Powell 1ce39c8e76 Add an option to not preserve old data in db_json. 2025-11-10 17:16:21 +00:00
Sadie Powell 88785bfdef Sort the core language strings and rename for consistency. 2025-11-10 14:58:49 +00:00
Sadie Powell 815df5c292 Remove an InspIRCd mode that hasn't existed since 1.2. 2025-11-10 13:46:18 +00:00
Sadie Powell 0016106772 Add an event for password validation, expand obscurity checks. 2025-11-10 03:13:23 +00:00
Sadie Powell 253cca7b3b Fix some time-related language strings. 2025-11-10 00:59:46 +00:00
Sadie Powell 71c3d7608a Merge branch '2.0' into 2.1. 2025-11-09 16:38:38 +00:00
Sadie Powell f4c565aa08 Fix reading the settings in m_dns. 2025-11-09 15:56:30 +00:00
Sadie Powell 8843e89e9f Fix some missing documentation. 2025-11-09 12:40:32 +00:00
Sadie Powell 8562445038 Fix double lookups on accounts when authenticating. 2025-11-09 11:42:58 +00:00
Sadie Powell fb1014a53c Cache the NickCore in rpc_user. 2025-11-08 18:04:16 +00:00
Sadie Powell 0ea89852d0 Fix an inverted condition in rpc_user. 2025-11-08 18:02:04 +00:00
Sadie Powell 5a56f95b35 Allow only showing accounts in nickserv/list. 2025-11-08 15:15:51 +00:00
Sadie Powell ebab5b4f1d Bring ns_list into the 21st century. 2025-11-08 15:07:35 +00:00
Sadie Powell 8a8cee4061 Add a method for consistently updating the NickAlias seen data. 2025-11-02 17:23:57 +00:00
Sadie Powell 1d59b05e29 Fix a typo in the OnNickRegister documentation comment. 2025-11-02 16:43:17 +00:00
Sadie Powell 002128217c Bump for 2.1.20-git. 2025-11-01 02:32:50 +00:00
Sadie Powell 0bb51f6551 Release 2.1.19. 2025-11-01 02:32:32 +00:00
Sadie Powell 28ce7bccb6 Update the change log. 2025-11-01 02:32:12 +00:00
Sadie Powell a70ef47359 Numerics should always be unsigned. 2025-10-29 13:14:35 +00:00
Sadie Powell 90ac540960 Force CMake to recheck for new modules when building. 2025-10-24 10:26:47 +01:00
Sadie Powell 909a77efb9 Remove unnecessary return statements at the end of blocks. 2025-10-24 10:22:29 +01:00
Sadie Powell 59c8867e64 Remove some dead code from the inspircd protocol module. 2025-10-23 18:50:42 +01:00
Sadie Powell 08d47a5dad Drop support for InspIRCd v3. 2025-10-23 13:54:27 +01:00
Sadie Powell 41403c7e36 Update the Turkish translation.
Co-authored-by: CaPa CuL <capacul@gmail.com>
2025-10-21 11:46:34 +01:00
TehPeGaSuS b8ef28509c Update account display format in ns_info.
This makes it more clear that the numbers are the actual account ID.
2025-10-21 11:32:02 +01:00
Sadie Powell cf6e56130a Improve some confirmation messages sent by NickServ. 2025-10-18 14:43:38 +01:00
Sadie Powell a3f6ffd2c7 Enable TAGMSG on Solanum. 2025-10-18 11:44:16 +01:00
Sadie Powell b9554f8539 Add an IRCv3 time tag to entry messages. 2025-10-18 00:39:05 +01:00
Sadie Powell 84dc0f3cc8 Error out if a user tries to use an undefined variable. 2025-10-16 14:50:09 +01:00
Sadie Powell 75f764e353 The Debian language advice now works for Ubuntu. 2025-10-12 21:41:42 +01:00
Sadie Powell 302c4f334e Add support for S2S tags on Solanum. 2025-10-10 22:36:09 +01:00
Sadie Powell 5148b349b7 Fix some obsolete strings in the Romanian translation. 2025-10-09 17:17:38 +01:00
KidProtect bbe31a6a38 Add a Romanian translation.
#531
2025-10-09 17:09:27 +01:00
Sadie Powell 8cb310c72e Enable workflow_dispatch and scheduled builds for all CI runners. 2025-10-09 16:41:44 +01:00
Sadie Powell 4a1ad182d4 Fix building on Windows. 2025-10-09 15:00:46 +01:00
Sadie Powell 75a893b18d Make the change log more detailed and add examples. 2025-10-09 14:30:23 +01:00
Sadie Powell 753db88ae9 Add the new layout changelog. 2025-10-09 14:08:14 +01:00
Sadie Powell 9f6f0b445b Improve the date format used when using non-English languages. 2025-10-09 13:38:16 +01:00
Sadie Powell dfa0bf5e5d Update the en_US language file. 2025-10-08 13:45:55 +01:00
Sadie Powell cc35c22d2a Temporarily suppress a warning from the UTF8-CPP library. 2025-10-08 13:41:31 +01:00
Sadie Powell 1dafc96521 Use a more reliable way of detecting <chrono> TZDB support. 2025-10-06 22:47:23 +01:00
Sadie Powell 5d1dd21887 Fix some minor bugs with setting the user timezone. 2025-10-05 20:04:25 +01:00
Sadie Powell 8b6c6fdd81 Add support for users setting their local timezone. 2025-10-05 18:55:33 +01:00
Sadie Powell 1a5d49b7f6 Replace calculate_libraries with inline CMake code. 2025-10-05 18:04:45 +01:00
Sadie Powell 0b3e55ed8f Update the vendored libraries. 2025-10-05 17:49:54 +01:00
Sadie Powell 7a09cebcfb Remove an unnecessary virtual keyword from some methods. 2025-10-05 17:49:54 +01:00
Sadie Powell da5c68f274 Disable a harmless warning on Linux. 2025-10-05 16:41:02 +01:00
Sadie Powell 9782c1f94b Use the correct language for the date in Anope::strftime. 2025-10-02 15:29:43 +01:00
Sadie Powell ee6b022f4d Reorder some of the information in nickserv/info. 2025-10-02 14:29:06 +01:00
Sadie Powell 85b0e9d02f Bump for 2.1.19-git. 2025-10-01 11:09:12 +01:00
crazycatdevs f03e802f58 Fix creating channel entries in irc2sql.
Related to #526 : MySQL doesn't accept the timestamp in topictime, must use FROM_UNIXTIME() like it's done in OnTopicUpdated
2025-09-05 14:45:57 +01:00
400 changed files with 32530 additions and 16189 deletions
+2 -1
View File
@@ -35,5 +35,6 @@ I have ensured that:
- [ ] The code I am submitting is my own work and/or I have permission from the author to share it.
- [ ] Generative AI (Copilot, ChatGPT, etc) was not used to create any part of this pull request.
- [ ] I have documented any features added by this pull request.
- [ ] If the pull request contains a security fix I have followed the reporting rules mentioned in [the security policy](https://github.com/anope/anope/security/policy) (delete if not applicable).
- [ ] I have documented any features added by this pull request (delete if not applicable).
- [ ] This pull request does not introduce any incompatible API changes (stable branches only, delete if not applicable).
+26 -16
View File
@@ -3,20 +3,18 @@ on:
pull_request:
push:
schedule:
- cron: '0 0 * * 0'
- cron: 0 0 * * 0
workflow_dispatch:
jobs:
build:
if: "!contains(github.event.head_commit.message, '[skip alpine ci]')"
container: alpine:edge
container: alpine:latest
runs-on: ubuntu-latest
env:
CXX: ${{ matrix.compiler }}
CXXFLAGS: -Werror
steps:
- uses: actions/checkout@v5
- uses: actions/checkout@v6
- name: Install dependencies
run: |
run: |-
echo "http://dl-cdn.alpinelinux.org/alpine/edge/testing" >> /etc/apk/repositories
apk update
apk add \
@@ -36,24 +34,36 @@ jobs:
tre-dev
- name: Enable extras
run: |
run: |-
for MODULE in enc_argon2 enc_posix ldap mysql regex_pcre2 regex_posix regex_tre sqlite ssl_gnutls ssl_openssl
do
ln -s $PWD/modules/extra/$MODULE.cpp $PWD/modules
done
- name: Run CMake
run: |
mkdir build && cd build
cmake -GNinja -DCMAKE_BUILD_TYPE:STRING=DEBUG -DINSTDIR:STRING=$(readlink -f ../run) ..
env:
CC: ${{ matrix.compiler.cc }}
CXX: ${{ matrix.compiler.cxx }}
CXXFLAGS: -Werror
run: |-
cmake -B "build" \
-D "CMAKE_BUILD_TYPE=Debug" \
-D "INSTDIR=$(readlink -f ../run)" \
-G "Ninja" \
-Wdeprecated \
-Wdev
- name: Build Anope
run: |
ninja -C build install
- name: Build and install
env:
VERBOSE: ${{ runner.debug }}
run: |-
ninja -C "build" ${{ runner.debug == '1' && '-v' || '' }} install
strategy:
fail-fast: false
matrix:
compiler:
- clang++
- g++
- cc: clang
cxx: clang++
- cc: gcc
cxx: g++
+29 -17
View File
@@ -1,19 +1,19 @@
name: Ubuntu CI
on:
- pull_request
- push
pull_request:
push:
schedule:
- cron: 0 0 * * 0
workflow_dispatch:
jobs:
build:
if: "!contains(github.event.head_commit.message, '[skip ubuntu ci]')"
runs-on: ubuntu-24.04
env:
CXX: ${{ matrix.compiler }}
CXXFLAGS: -Werror
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v5
- uses: actions/checkout@v6
- name: Install dependencies
run: |
run: |-
sudo apt-get update --assume-yes
sudo apt-get install --assume-yes --no-install-recommends \
clang \
@@ -31,24 +31,36 @@ jobs:
ninja-build
- name: Enable extras
run: |
run: |-
for MODULE in enc_argon2 enc_posix ldap mysql regex_pcre2 regex_posix regex_tre sqlite ssl_gnutls ssl_openssl
do
ln -s ${{ github.workspace }}/modules/extra/$MODULE.cpp ${{ github.workspace }}/modules
done
- name: Run CMake
run: |
mkdir build && cd build
cmake -GNinja -DCMAKE_BUILD_TYPE:STRING=DEBUG -DINSTDIR:STRING=${{ github.workspace }}/run ..
env:
CC: ${{ matrix.compiler.cc }}
CXX: ${{ matrix.compiler.cxx }}
CXXFLAGS: -Werror
run: |-
cmake -B "build" \
-D "CMAKE_BUILD_TYPE=Debug" \
-D "INSTDIR=${{ github.workspace }}/run" \
-G "Ninja" \
-Wdeprecated \
-Wdev
- name: Build Anope
run: |
ninja -C ${{ github.workspace }}/build install
- name: Build and install
env:
VERBOSE: ${{ runner.debug }}
run: |-
ninja -C "build" ${{ runner.debug == '1' && '-v' || '' }} install
strategy:
fail-fast: false
matrix:
compiler:
- clang++
- g++
- cc: clang
cxx: clang++
- cc: gcc
cxx: g++
+58 -30
View File
@@ -6,63 +6,91 @@ on:
types:
- published
schedule:
- cron: '0 0 * * 0'
- cron: 0 0 * * 0
workflow_dispatch:
jobs:
build:
if: "!contains(github.event.head_commit.message, '[skip windows ci]')"
runs-on: windows-2025
env:
BUILD_PATH: ${{ github.workspace }}\build
BUILD_TYPE: ${{ github.event_name == 'release' && 'Release' || 'Debug' }}
CONAN_USER_HOME: ${{ github.workspace }}/win/build
CONAN_USER_HOME_SHORT: None
CONAN_FILE: ${{ github.workspace }}\src\win32\conanfile.txt
CONAN_HOME: ${{ github.workspace }}\build\conan
steps:
- uses: actions/checkout@v5
- uses: actions/checkout@v6
- name: Setup MSVC
uses: TheMrMilchmann/setup-msvc-dev@v4
with:
arch: x64
- name: Setup NSIS
run: |-
choco install nsis
- name: Setup MSBuild
uses: microsoft/setup-msbuild@v2
uses: negrutiu/nsis-install@v3
with:
distro: official
- name: Setup Conan
uses: turtlebrowser/get-conan@v1.2
with:
version: 1.66.0
- name: Create Conan configuration
run: |-
conan profile detect
(Get-Content ${{ env.CONAN_HOME }}\profiles\default).replace('build_type=Release', 'build_type=${{ env.BUILD_TYPE }}') | Set-Content ${{ env.CONAN_HOME }}\profiles\default
(Get-Content ${{ env.CONAN_HOME }}\profiles\default).replace('compiler.cppstd=14', 'compiler.cppstd=17') | Set-Content ${{ env.CONAN_HOME }}\profiles\default
Write-Output 'core.sources:download_urls=["origin", "https://c3i.jfrog.io/artifactory/conan-center-backup-sources/"]' | Out-File -Append ${{ env.CONAN_HOME }}\global.conf
Write-Output 'tools.cmake.cmaketoolchain:generator=Ninja' | Out-File -Append ${{ env.CONAN_HOME }}\global.conf
Write-Output 'user.openssl:windows_use_jom=True' | Out-File -Append ${{ env.CONAN_HOME }}\global.conf
- name: Try to restore libraries from the cache
uses: actions/cache/restore@v4
if: github.event_name != 'release'
uses: actions/cache/restore@v5
id: library-cache
with:
key: conan-${{ hashFiles('src/win32/conanfile.txt') }}
path: ${{ env.CONAN_USER_HOME }}/.conan
key: Conan VS${{ env.VisualStudioVersion }} ${{ env.BUILD_TYPE }} ${{ hashFiles(env.CONAN_FILE) }}
path: ${{ env.CONAN_HOME }}/p
- name: Install libraries
run: |
conan install ${{ github.workspace }}\src\win32 --build=missing
working-directory: ${{ env.BUILD_PATH }}
run: |-
(Get-Content ${{ env.CONAN_FILE }}).replace('##', '') | Set-Content ${{ env.CONAN_FILE }}
conan install ${{ env.CONAN_FILE }} --build missing --deployer runtime_deploy --deployer-folder extradll --output-folder .
conan cache clean "*"
- name: Save libraries to the cache
if: ${{ steps.library-cache.outputs.cache-hit != 'true' }}
uses: actions/cache/save@v4
if: steps.library-cache.outputs.cache-hit != 'true' && github.event_name != 'release'
uses: actions/cache/save@v5
with:
key: ${{ steps.library-cache.outputs.cache-primary-key }}
path: ${{ env.CONAN_USER_HOME }}/.conan
key: ${{ steps.library-cache.outputs.cache-primary-key }}
path: ${{ env.CONAN_HOME }}\p
- name: Run CMake
run: |
mkdir ${{ github.workspace }}\build
cd ${{ github.workspace }}\build
cmake -A x64 -D "CMAKE_BUILD_TYPE=${{ env.BUILD_TYPE }}" -G "Visual Studio 17 2022" ..
working-directory: ${{ env.BUILD_PATH }}
run: |-
cmake -D "CMAKE_BUILD_TYPE=${{ env.BUILD_TYPE }}" `
-D "CMAKE_TOOLCHAIN_FILE=conan_toolchain.cmake" `
-G "Ninja Multi-Config" `
-S "${{ github.workspace }}" `
-Wdeprecated `
-Wdev
- name: Build Anope
working-directory: ${{ github.workspace }}\build
run: |
msbuild PACKAGE.vcxproj /M:5 /P:Configuration=${{ env.BUILD_TYPE }} /P:Platform=x64 /VERBOSITY:MINIMAL
- name: Build installer
working-directory: ${{ env.BUILD_PATH }}
run: |-
ninja -f "build-${{ env.BUILD_TYPE }}.ninja" ${{ runner.debug == '1' && '-v' || '' }} package
- name: Upload installer
if: "${{ github.event_name == 'release' }}"
working-directory: ${{ github.workspace }}\build
if: github.event_name == 'release'
working-directory: ${{ env.BUILD_PATH }}
env:
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: |
gh release upload ${{ github.event.release.tag_name }} $(Get-ChildItem anope-*.exe)
- name: Upload artifact
if: github.event_name != 'release'
uses: actions/upload-artifact@v7
with:
name: windows-installer
path: ${{ github.workspace }}\build\\anope-*.exe
+2
View File
@@ -1,5 +1,6 @@
build/
config.cache
docs/doxygen
include/sysconf.h
modules/enc_argon2.cpp
modules/enc_posix.cpp
@@ -14,5 +15,6 @@ modules/ssl_openssl.cpp
modules/stats
modules/xmlrpc.cpp
run/
*.diff
*.mo
*.pot
+2 -2
View File
@@ -15,7 +15,6 @@ Daniel Engel <dane@zero.org> <dane dane@31f1291d-b8d6-0310-a050-a5561fc1590b@541
David Robson <rob@anope.org> <rob rob@31f1291d-b8d6-0310-a050-a5561fc1590b@5417fbe8-f217-4b02-8779-1006273d7864>
David Robson <rob@anope.org> <robbeh@5417fbe8-f217-4b02-8779-1006273d7864>
Dennis Friis <peavey@inspircd.org> <peavey peavey@inspircd.org@5417fbe8-f217-4b02-8779-1006273d7864>
Dragone2 <dragone2@risposteinformatiche.it> <davide.paolini8@gmail.com>
Fabio Scotoni <cculex@gmail.com>
Filippo Cortigiani <simos@simosnap.org> <devel@devel.crtnet.it>
Filippo Cortigiani <simos@simosnap.org> <simos@H7-25.fritz.box>
@@ -52,7 +51,8 @@ Robby <robby@chatbelgie.be> <robby@chat.be>
Robert Scheck <robert@fedoraproject.org> <robert-scheck@users.noreply.github.com>
Robin Burchell <w00t@inspircd.org> <rburchell@5417fbe8-f217-4b02-8779-1006273d7864>
Robin Burchell <w00t@inspircd.org> <Robin Burchell w00t@inspircd.org@5417fbe8-f217-4b02-8779-1006273d7864>
Sadie Powell <sadie@witchery.services> <petpow@saberuk.com>
Sadie Powell <sadie@sadiepowell.dev> <petpow@saberuk.com>
Sadie Powell <sadie@sadiepowell.dev> <sadie@witchery.services>
Sebastian Barfurth <github@afreshmelon.com>
Sebastian V. <hal9000@denorastats.org>
Sebastian V. <hal9000@denorastats.org> <pimpmylinux@5417fbe8-f217-4b02-8779-1006273d7864>
+33 -137
View File
@@ -1,22 +1,12 @@
# This usage of CMake requires at least version 3.20
cmake_minimum_required(VERSION 3.20 FATAL_ERROR)
# Set the project as C++ primarily, but have C enabled for the checks required later
# Set the project as C++ primarily
project(Anope CXX)
enable_language(C)
# Override the module include path to include our directory, for our Anope.cmake, as well as we are using our own version of the NSIS template
set(CMAKE_MODULE_PATH ${Anope_SOURCE_DIR}/cmake)
include(Anope)
# Force the locale to C for later uses of things like gcc so the messages come up in English, not the user's default language
set(ENV{LC_ALL} C)
# Start with empty defaults for library and include directories, to be used by GNU compilers only
set(DEFAULT_LIBRARY_DIRS)
set(DEFAULT_INCLUDE_DIRS)
# We require C++17 to build
set(CMAKE_CXX_EXTENSIONS OFF)
set(CMAKE_CXX_STANDARD 17)
@@ -25,81 +15,9 @@ set(CMAKE_CXX_STANDARD_REQUIRED ON)
# Put modules in their own folder
set_property(GLOBAL PROPERTY USE_FOLDERS ON)
# If we are using a GNU compiler (have to use CXX because it seems to fail on C), we will be able to determine it's default paths for libraries and includes
if(CMAKE_COMPILER_IS_GNUCXX OR "${CMAKE_CXX_COMPILER_ID}" MATCHES "Clang$")
# First look for the compiler's default library directories
execute_process(COMMAND ${CMAKE_C_COMPILER} -print-search-dirs OUTPUT_VARIABLE LINES OUTPUT_STRIP_TRAILING_WHITESPACE)
# Find only the part after "libraries: "
string(REGEX REPLACE ".*\nlibraries: (.*)$" "\\1" LINE "${LINES}")
# Replace the colons in the list with semicolons
string(REGEX REPLACE ":" ";" LIBRARIES ${LINE})
# Iterate through the libraries
foreach(LIBRARY ${LIBRARIES})
# Check if the first character is an equal sign, and skip that library directory as it is (I believe) the primary default and shows up later in the list anyways
string(SUBSTRING ${LIBRARY} 0 1 FIRST_CHAR)
if(NOT FIRST_CHAR STREQUAL "=")
# If the directory had no = in front of it, make sure it's absolute and add it to the list of default library directories
get_filename_component(LIBRARY ${LIBRARY} ABSOLUTE)
list(APPEND DEFAULT_LIBRARY_DIRS ${LIBRARY})
endif()
endforeach()
# Remove duplicate entries from the list
if(DEFAULT_LIBRARY_DIRS)
list(REMOVE_DUPLICATES DEFAULT_LIBRARY_DIRS)
endif()
# Create a temporary file to test for the default include directories
FILE(WRITE empty.cpp "")
# Next, we look for the compiler's default include directories
# Run the command to find the default include directories
execute_process(COMMAND ${CMAKE_C_COMPILER} -v -x c++ -E ${CMAKE_CURRENT_SOURCE_DIR}/empty.cpp ERROR_VARIABLE LINES OUTPUT_QUIET ERROR_STRIP_TRAILING_WHITESPACE)
# Remove the empty file, it is no longer needed
FILE(REMOVE empty.cpp)
# Convert the new lines to semicolons
string(REGEX REPLACE "\n" ";" LINES ${LINES})
# Temporary variable saying if we are in the search list or not
set(IN_SEARCH_LIST FALSE)
# Iterate through the lines
foreach(LINE ${LINES})
# If the line has the following on it, the next lines will contain directory names
if(LINE STREQUAL "#include <...> search starts here:")
set(IN_SEARCH TRUE)
else()
# If the line has the following on it, we hit the end of the list
if(LINE STREQUAL "End of search list.")
set(IN_SEARCH FALSE)
else()
# If we are within the block between the above two lines...
if(IN_SEARCH)
# Get everything but the first character of the line
string(LENGTH ${LINE} LINE_LENGTH)
math(EXPR LINE_LENGTH "${LINE_LENGTH} - 1")
string(SUBSTRING ${LINE} 1 ${LINE_LENGTH} INCLUDE)
# For systems like Mac OS X, look for include paths that say " (framework directory)" at the end of them and strip that off
string(REGEX REPLACE " \\(framework directory\\)$" "" INCLUDE ${INCLUDE})
# Convert the path to an absolute one, just in case it wasn't
get_filename_component(INCLUDE ${INCLUDE} ABSOLUTE)
# Add that directory to the list of default include directories
list(APPEND DEFAULT_INCLUDE_DIRS ${INCLUDE})
endif()
endif()
endif()
endforeach()
# Remove duplicate entries from the list
if(DEFAULT_INCLUDE_DIRS)
list(REMOVE_DUPLICATES DEFAULT_INCLUDE_DIRS)
endif()
endif()
# If the user specifies -DCMAKE_BUILD_TYPE on the command line, take their definition
# and dump it in the cache along with proper documentation, otherwise set CMAKE_BUILD_TYPE
# to Debug
# Only do this if not using Visual Studio
if(NOT MSVC)
if(CMAKE_BUILD_TYPE)
set(CMAKE_BUILD_TYPE ${CMAKE_BUILD_TYPE} CACHE STRING "Choose the type of build, options are: None(CMAKE_CXX_FLAGS or CMAKE_C_FLAGS used) Debug Release RelWithDebInfo MinSizeRel.")
else()
set(CMAKE_BUILD_TYPE DEBUG CACHE STRING "Choose the type of build, options are: None(CMAKE_CXX_FLAGS or CMAKE_C_FLAGS used) Debug Release RelWithDebInfo MinSizeRel.")
endif()
if(CMAKE_BUILD_TYPE STREQUAL "")
message(STATUS "CMAKE_BUILD_TYPE has not been specified; defaulting to Debug")
set(CMAKE_BUILD_TYPE "Debug")
endif()
# Include the checking functions used later in this CMakeLists.txt
@@ -108,6 +26,10 @@ include(CheckTypeSize)
include(CheckLibraryExists)
include(CheckCXXCompilerFlag)
if(NOT WIN32)
include(FindPkgConfig)
endif()
# If extra include directories were specified, tell cmake about them.
if(EXTRA_INCLUDE)
include_directories(${EXTRA_INCLUDE})
@@ -118,20 +40,15 @@ if(EXTRA_LIBS)
link_directories(${EXTRA_LIBS})
endif()
# setup conan
if(EXISTS "${CMAKE_CURRENT_SOURCE_DIR}/conanbuildinfo.cmake")
include("${CMAKE_CURRENT_SOURCE_DIR}/conanbuildinfo.cmake")
conan_basic_setup()
endif()
# Find gettext
find_package(Gettext)
find_package(Intl)
if(GETTEXT_FOUND AND Intl_FOUND)
if(Gettext_FOUND AND Intl_FOUND)
set(HAVE_LOCALIZATION ON)
include_directories(${Intl_INCLUDE_DIRS})
link_libraries(${Intl_LIBRARIES})
else()
message("Unable to find gettext and libintl; disabling localization")
message(STATUS "Unable to find gettext and/or libintl -- read docs/LANGUAGE for how to enable localization")
set(HAVE_LOCALIZATION OFF)
endif()
@@ -149,28 +66,33 @@ endif()
# If using Visual Studio, set the C++ flags accordingly
if(MSVC)
# Remove the default exception handling flags, also remove default warning level flag
string(REPLACE "/EHsc " "" CMAKE_CXX_FLAGS ${CMAKE_CXX_FLAGS})
string(REPLACE "/GX " "" CMAKE_CXX_FLAGS ${CMAKE_CXX_FLAGS})
string(REPLACE "/W3 " "" CMAKE_CXX_FLAGS ${CMAKE_CXX_FLAGS})
# Set the compile flags to have warnings on the max setting (but disable a few annoying ones), exception handling turned on, the proper defines
set(CXXFLAGS "${CXXFLAGS} /W4 /wd4100 /wd4127 /wd4250 /wd4251 /wd4267 /wd4275 /wd4355 /wd4706 /wd4800 /wd4996 /EHs")
# Set the compile flags to have warnings on the max setting (but disable a few annoying ones), exception handling turned on
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} /W4 /wd4100 /wd4127 /wd4250 /wd4251 /wd4267 /wd4275 /wd4355 /wd4706 /wd4800 /wd4996 /EHs")
add_definitions(-D_CRT_SECURE_NO_WARNINGS)
# Otherwise, we're not using Visual Studio
else()
# Set the compile flags to have all warnings on (including shadowed variables)
set(CXXFLAGS "${CXXFLAGS} -fvisibility=hidden -fvisibility-inlines-hidden -Wall -Wextra -Wformat=2 -Wmissing-format-attribute -Wpedantic -Wno-format-nonliteral -Wno-format-zero-length -Wno-unused-parameter ${CMAKE_CXX_FLAGS}")
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -fvisibility=hidden -fvisibility-inlines-hidden -Wall -Wextra -Wformat=2 -Wmissing-format-attribute -Wpedantic")
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wno-format-nonliteral -Wno-format-y2k -Wno-format-zero-length -Wno-date-time -Wno-unused-parameter")
endif()
# If CMake has found that the given system requires a special library for dl* calls, include it with the linker flags
if(CMAKE_DL_LIBS)
list(APPEND LINK_LIBS ${CMAKE_DL_LIBS})
link_libraries(${CMAKE_DL_LIBS})
endif()
# Find the linker flags required for using threads.
find_package("Threads" REQUIRED)
if(CMAKE_THREAD_LIBS_INIT)
list(APPEND LINK_LIBS ${CMAKE_THREAD_LIBS_INIT})
link_libraries(${CMAKE_THREAD_LIBS_INIT})
endif()
# On Windows, also link Anope to the memory library and Winsock.
if(WIN32)
link_libraries("Ws2_32")
if(MSVC)
link_libraries("win32_memory")
endif()
endif()
if(NOT PROGRAM_NAME)
@@ -183,7 +105,7 @@ if(NOT MSVC)
check_cxx_compiler_flag(-pipe HAVE_PIPE_FLAG)
# If the flag was accepted, add it to the list of flags
if(HAVE_PIPE_FLAG)
set(CXXFLAGS "${CXXFLAGS} -pipe")
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -pipe")
endif()
endif()
@@ -197,7 +119,7 @@ if(NOT DEFUMASK)
endif()
# Set the DEBUG_BUILD for sysconf.h
if(CMAKE_BUILD_TYPE STREQUAL "DEBUG" OR CMAKE_BUILD_TYPE STREQUAL "RELWITHDEBINFO")
if(CMAKE_BUILD_TYPE STREQUAL "Debug" OR CMAKE_BUILD_TYPE STREQUAL "RelWithDebInfo")
set(CMAKE_EXPORT_COMPILE_COMMANDS ON)
set(DEBUG_BUILD TRUE)
endif()
@@ -209,15 +131,6 @@ check_function_exists(epoll_wait HAVE_EPOLL)
check_function_exists(poll HAVE_POLL)
check_function_exists(kqueue HAVE_KQUEUE)
# Strip the leading and trailing spaces from the compile flags
if(CXXFLAGS)
string(STRIP ${CXXFLAGS} CXXFLAGS)
endif()
# Strip the leading and trailing spaces from the linker flags
if(LDFLAGS)
string(STRIP ${LDFLAGS} LDFLAGS)
endif()
# Search for the following programs
if(NOT WIN32 AND RUNGROUP)
find_program(CHGRP "chgrp" REQUIRED)
@@ -228,7 +141,7 @@ endif()
if(INSTDIR)
set(CMAKE_INSTALL_PREFIX "${INSTDIR}")
elseif(NOT CMAKE_INSTALL_PREFIX)
set(CMAKE_INSTALL_PREFIX "$ENV{HOME}/anope")
set(CMAKE_INSTALL_PREFIX "$ENV{HOME}/anope-${VERSION_MAJOR}-${VERSION_MINOR}")
endif()
# Set default paths for various directories if not already defined
@@ -300,29 +213,13 @@ if(WIN32)
configure_file(${Anope_SOURCE_DIR}/src/win32/win32.rc.cmake ${Anope_BINARY_DIR}/src/win32/win32.rc)
endif()
# Add the initial files to ignore which will be ignored regardless of if you are building in-source or out-of-source
add_to_cpack_ignored_files(".git\;config.cache\;CMakeFiles\;sysconf.h$\;build" TRUE)
# Add the files we don't want the periods converted for
add_to_cpack_ignored_files(".\\\\\\\\.so$;.\\\\\\\\.o$;.\\\\\\\\.s$;${Anope_SOURCE_DIR}/Makefile$")
# If the two directories are the same, we are building in-source, thus we need to ignore more files from the build
if(${Anope_SOURCE_DIR} STREQUAL ${Anope_BINARY_DIR})
# Add the files that need their periods converted
add_to_cpack_ignored_files("Makefile\;cmake_install.cmake\;sysconf.h$\;CMakeCache.txt\;install_manifest.txt" TRUE)
# Add the files we don't want the periods converted for
add_to_cpack_ignored_files(".\\\\\\\\.so$;CPack.;anope-${VERSION_FULL_NOBUILD}-source\\\\\\\\..")
# If using Visual Studio, add these files as well
if(MSVC)
add_to_cpack_ignored_files(".vcproj$\;.sln$\;.ncb$\;.suo$\;.dir$\;.ilk$\;.exp$\;.pdb$\;.lib$\;/debug$;/release$;/relwithdebinfo$;/minsizerel$" TRUE)
endif()
endif()
# Get the filename of the Anope binary, to use later
set(SERVICES_BINARY "$<TARGET_FILE:${PROGRAM_NAME}>")
get_filename_component(SERVICES_BINARY ${SERVICES_BINARY} NAME)
cmake_path(GET SERVICES_BINARY FILENAME SERVICES_BINARY)
# At install time, create the following additional directories
get_filename_component(ABSOLUTE_DATA_DIR ${DATA_DIR} REALPATH BASE_DIR ${CMAKE_INSTALL_PREFIX})
get_filename_component(ABSOLUTE_LOG_DIR ${LOG_DIR} REALPATH BASE_DIR ${CMAKE_INSTALL_PREFIX})
file(REAL_PATH ${DATA_DIR} ABSOLUTE_DATA_DIR BASE_DIRECTORY ${CMAKE_INSTALL_PREFIX})
file(REAL_PATH ${LOG_DIR} ABSOLUTE_LOG_DIR BASE_DIRECTORY ${CMAKE_INSTALL_PREFIX})
install(CODE "file(MAKE_DIRECTORY \"\$ENV{DESTDIR}${ABSOLUTE_DATA_DIR}/backups\")")
install(CODE "file(MAKE_DIRECTORY \"\$ENV{DESTDIR}${ABSOLUTE_LOG_DIR}\")")
if(WIN32)
@@ -341,7 +238,7 @@ if(WIN32)
)
endif()
get_filename_component(ABSOLUTE_MODULE_DIR ${MODULE_DIR} REALPATH BASE_DIR ${CMAKE_INSTALL_PREFIX})
file(REAL_PATH ${MODULE_DIR} ABSOLUTE_MODULE_DIR BASE_DIRECTORY ${CMAKE_INSTALL_PREFIX})
install(CODE "file(REMOVE_RECURSE \"$ENV{DESTDIR}${ABSOLUTE_MODULE_DIR}\")")
# Only process the CPack section if we have CPack
@@ -353,7 +250,7 @@ if(EXISTS "${CMAKE_ROOT}/Modules/CPack.cmake")
set(CPACK_PACKAGE_VERSION_MINOR ${VERSION_MINOR})
set(CPACK_PACKAGE_VERSION_PATCH "${VERSION_PATCH}${VERSION_EXTRA}")
set(CPACK_PACKAGE_FILE_NAME "anope-${VERSION_FULL_NOBUILD}")
set(CPACK_RESOURCE_FILE_LICENSE "${Anope_SOURCE_DIR}/docs/COPYING")
set(CPACK_RESOURCE_FILE_LICENSE "${Anope_SOURCE_DIR}/docs/LICENSE.txt")
# The following doesn't actually do anything. :(
#set(CPACK_RESOURCE_FILE_README "${Anope_SOURCE_DIR}/docs/README")
# The following is primarily for NSIS
@@ -384,7 +281,6 @@ if(EXISTS "${CMAKE_ROOT}/Modules/CPack.cmake")
endif()
set(CPACK_SOURCE_PACKAGE_FILE_NAME "anope-${VERSION_FULL_NOBUILD}-source")
set(CPACK_SOURCE_GENERATOR "TGZ")
set(CPACK_SOURCE_IGNORE_FILES "$ENV{CPACK_IGNORED_FILES}")
set(CPACK_MONOLITHIC_INSTALL TRUE)
include(CPack)
endif()
+38 -37
View File
@@ -1,17 +1,21 @@
#!/bin/sh
#
# Configuration script for Anope.
# Anope IRC Services <https://www.anope.org/>
#
# Anope (C) 2003-2025 Anope Team
# Contact us at team@anope.org
# Copyright (C) 2003-2026 Anope Contributors
#
# This program is free but copyrighted software; see the file COPYING for
# details.
# Anope is free software. You can use, modify, and/or distribute it under the
# terms of version 2 of the GNU General Public License. See docs/LICENSE.txt
# for the complete terms of this license and docs/AUTHORS.txt for a list of
# contributors.
#
# Based on the original code of Epona by PegSoft.
# Based on the original code of Services by Andy Church.
# Based on the original code of Epona by Lara
# Based on the original code of Services by Andy Church
#
###########################################################################
# SPDX-License-Identifier: GPL-2.0-only
SOURCE_DIR="$(cd "$(dirname "$0")" && pwd)"
. $SOURCE_DIR/src/version.sh
Load_Cache () {
if [ -f $SOURCE_DIR/config.cache -a -r $SOURCE_DIR/config.cache -a ! "$IGNORE_CACHE" ] ; then
@@ -25,43 +29,41 @@ Load_Cache () {
}
Run_Build_System () {
WITH_INST=""
WITH_RUN=""
WITH_PERM=""
EXTRA_INCLUDE=""
EXTRA_LIBS=""
BUILD_DIR="${SOURCE_DIR}/build"
CMAKE_COMMAND="${CMAKE:-cmake} -B ${BUILD_DIR} -S ${SOURCE_DIR}"
if [ "$INSTDIR" != "" ] ; then
WITH_INST="-DINSTDIR:STRING=$INSTDIR"
CMAKE_COMMAND="${CMAKE_COMMAND} -D INSTDIR=$INSTDIR"
fi
if [ "$RUNGROUP" != "" ] ; then
WITH_RUN="-DRUNGROUP:STRING=$RUNGROUP"
CMAKE_COMMAND="${CMAKE_COMMAND} -D RUNGROUP=$RUNGROUP"
fi
if [ "$UMASK" != "" ] ; then
WITH_PERM="-DDEFUMASK:STRING=$UMASK"
CMAKE_COMMAND="${CMAKE_COMMAND} -D DEFUMASK=$UMASK"
fi
if [ "$DEBUG" = "yes" ] ; then
BUILD_TYPE="-DCMAKE_BUILD_TYPE:STRING=DEBUG"
CMAKE_COMMAND="${CMAKE_COMMAND} -D CMAKE_BUILD_TYPE=Debug"
else
BUILD_TYPE="-DCMAKE_BUILD_TYPE:STRING=RELEASE"
CMAKE_COMMAND="${CMAKE_COMMAND} -D CMAKE_BUILD_TYPE=Release"
fi
if [ "$EXTRA_INCLUDE_DIRS" != "" ] ; then
EXTRA_INCLUDE="-DEXTRA_INCLUDE:STRING=$EXTRA_INCLUDE_DIRS"
CMAKE_COMMAND="${CMAKE_COMMAND} -D EXTRA_INCLUDE=$EXTRA_INCLUDE_DIRS"
fi
if [ "$EXTRA_LIB_DIRS" != "" ] ; then
EXTRA_LIBS="-DEXTRA_LIBS:STRING=$EXTRA_LIB_DIRS"
CMAKE_COMMAND="${CMAKE_COMMAND} -D EXTRA_LIBS=$EXTRA_LIB_DIRS"
fi
BUILD_PATHS="-B ${SOURCE_DIR}/build ${SOURCE_DIR}"
if [ "$EXTRA_CONFIG_ARGS" != "" ] ; then
CMAKE_COMMAND="${CMAKE_COMMAND} $EXTRA_CONFIG_ARGS"
fi
CMAKE="cmake $GEN_TYPE $WITH_INST $WITH_RUN $WITH_PERM $BUILD_TYPE $EXTRA_INCLUDE $EXTRA_LIBS $EXTRA_CONFIG_ARGS $BUILD_PATHS"
echo $CMAKE
$CMAKE
echo $CMAKE_COMMAND
$CMAKE_COMMAND
if [ $? -ne 0 ]; then
echo "You should fix these issues and then run ./Config -quick to rerun CMake."
@@ -69,18 +71,14 @@ Run_Build_System () {
fi
echo ""
if [ "$PWD" = "${SOURCE_DIR}/build" ]; then
echo "Now run make to build Anope."
else
echo "Now cd build, then run make to build Anope."
fi
echo "Now run 'make -C ${BUILD_DIR#"$PWD/"} install' to build and install Anope."
}
###########################################################################
# Init values
###########################################################################
INSTDIR=$HOME/anope
INSTDIR="${HOME}/anope-${VERSION_MAJOR}.${VERSION_MINOR}"
RUNGROUP=
UMASK=
DEBUG="no"
@@ -88,14 +86,18 @@ EXTRA_INCLUDE_DIRS=
EXTRA_LIB_DIRS=
EXTRA_CONFIG_ARGS=
CAN_QUICK="no"
SOURCE_DIR="$(cd "$(dirname "$0")" && pwd)"
###########################################################################
# Check out the options
###########################################################################
while [ $# -ge 1 ] ; do
if [ $1 = "--help" ] ; then
OPTION=$1
while [ "${OPTION#-}" != "$OPTION" ]; do
OPTION="${OPTION#-}"
done
if [ "$OPTION" = "--help" ] ; then
echo "Config utility for Anope"
echo "------------------------"
echo "Syntax: ./Config [options]"
@@ -103,15 +105,15 @@ while [ $# -ge 1 ] ; do
echo "-nointro Skip intro (disclaimer, etc)"
echo "-quick Skip questions, go straight to cmake"
exit 0
elif [ $1 = "-devel" ] ; then
elif [ "$OPTION" = "devel" ] ; then
DEBUG="yes"
DEVEL="yes"
INSTDIR="$SOURCE_DIR/run"
elif [ $1 = "-nocache" ] ; then
elif [ "$OPTION" = "nocache" ] ; then
IGNORE_CACHE="1"
elif [ $1 = "-nointro" ] ; then
elif [ "$OPTION" = "nointro" ] ; then
NO_INTRO="1"
elif [ $1 = "-quick" -o $1 = "-q" ] ; then
elif [ "$OPTION" = "quick" -o "$OPTION" = "q" ] ; then
Load_Cache
if [ "$CAN_QUICK" = "yes" ] ; then
Run_Build_System
@@ -140,7 +142,6 @@ fi
if [ ! "$NO_INTRO" ] ; then
export MORE='-e'
. $SOURCE_DIR/src/version.sh
cat $SOURCE_DIR/.BANNER | sed "s/CURVER/$VERSION_MAJOR.$VERSION_MINOR.$VERSION_PATCH$VERSION_EXTRA/" | sed "s@SOURCE_DIR@$SOURCE_DIR@" | more
echo ""
else
-106
View File
@@ -1,106 +0,0 @@
###############################################################################
# calculate_libraries(<source filename> <output variable for linker flags> <output variable for extra depends>)
#
# This macro is used in most of the module (sub)directories to calculate the
# library dependencies for the given source file.
###############################################################################
macro(calculate_libraries SRC SRC_LDFLAGS EXTRA_DEPENDS)
# Set up a temporary LDFLAGS for this file
set(THIS_LDFLAGS "${LDFLAGS}")
# Reset extra dependencies
set(EXTRA_DEPENDENCIES)
# Reset library paths
set(LIBRARY_PATHS)
# Reset libraries
set(LIBRARIES)
# Check to see if there are any lines matching: /* RequiredLibraries: [something] */
if(WIN32)
file(STRINGS ${SRC} REQUIRED_LIBRARIES REGEX "/\\*[ \t]*RequiredWindowsLibraries:[ \t]*.*[ \t]*\\*/")
else()
file(STRINGS ${SRC} REQUIRED_LIBRARIES REGEX "/\\*[ \t]*RequiredLibraries:[ \t]*.*[ \t]*\\*/")
endif()
# Iterate through those lines
foreach(REQUIRED_LIBRARY ${REQUIRED_LIBRARIES})
# Strip off the /* RequiredLibraries: and */ from the line
string(REGEX REPLACE "/\\*[ \t]*Required.*Libraries:[ \t]*([^ \t]*)[ \t]*\\*/" "\\1" REQUIRED_LIBRARY ${REQUIRED_LIBRARY})
# Replace all commas with semicolons
string(REGEX REPLACE "," ";" REQUIRED_LIBRARY ${REQUIRED_LIBRARY})
# Iterate through the libraries given
foreach(LIBRARY ${REQUIRED_LIBRARY})
# If the library has multiple names extract the alternate.
unset(LIBRARY_ALT)
if (${LIBRARY} MATCHES "^.+\\|.+$")
string(REGEX REPLACE ".+\\|(.*)" "\\1" LIBRARY_ALT ${LIBRARY})
string(REGEX REPLACE "(.+)\\|.*" "\\1" LIBRARY ${LIBRARY})
endif()
# Locate the library to see if it exists
if(DEFAULT_LIBRARY_DIRS OR DEFINED $ENV{VCINSTALLDIR})
find_library(FOUND_${LIBRARY}_LIBRARY NAMES ${LIBRARY} ${LIBRARY_ALT} PATHS ${DEFAULT_LIBRARY_DIRS} $ENV{VCINSTALLDIR}/lib ${EXTRA_INCLUDE} ${EXTRA_LIBS})
else()
find_library(FOUND_${LIBRARY}_LIBRARY NAMES ${LIBRARY} ${LIBRARY_ALT} PATHS ${EXTRA_INCLUDE} ${EXTRA_LIBS} NO_DEFAULT_PATH)
find_library(FOUND_${LIBRARY}_LIBRARY NAMES ${LIBRARY} ${LIBRARY_ALT} PATHS ${EXTRA_INCLUDE} ${EXTRA_LIBS})
endif()
# If the library was found, we will add it to the linker flags
if(FOUND_${LIBRARY}_LIBRARY)
if(MSVC)
# For Visual Studio, instead of editing the linker flags, we'll add the library to a separate list of extra dependencies
list(APPEND EXTRA_DEPENDENCIES "${FOUND_${LIBRARY}_LIBRARY}")
else()
# Get the path only of the library, to add it to library paths.
get_filename_component(LIBRARY_PATH ${FOUND_${LIBRARY}_LIBRARY} PATH)
list(APPEND LIBRARY_PATHS "${LIBRARY_PATH}")
# Extract the library short name, add it to the library path
get_filename_component(LIBRARY_NAME ${FOUND_${LIBRARY}_LIBRARY} NAME_WE)
string(REGEX REPLACE "^lib" "" LIBRARY_NAME ${LIBRARY_NAME})
list(APPEND LIBRARIES ${LIBRARY_NAME})
endif()
else()
# In the case of the library not being found, we fatally error so CMake stops trying to generate
message(FATAL_ERROR "${SRC} needs library ${LIBRARY} but we were unable to locate that library! Check that the library is within the search path of your OS.")
endif()
endforeach()
endforeach()
# Remove duplicates from the library paths
if(LIBRARY_PATHS)
list(REMOVE_DUPLICATES LIBRARY_PATHS)
endif()
# Remove diplicates from the libraries
if(LIBRARIES)
list(REMOVE_DUPLICATES LIBRARIES)
endif()
# Iterate through library paths and add them to the linker flags
foreach(LIBRARY_PATH ${LIBRARY_PATHS})
if(NOT "${LIBRARY_PATH}" IN_LIST DEFAULT_LIBRARY_DIRS)
set(THIS_LDFLAGS "${THIS_LDFLAGS} -L${LIBRARY_PATH}")
endif()
endforeach()
# Iterate through libraries and add them to the linker flags
foreach(LIBRARY ${LIBRARIES})
list(APPEND EXTRA_DEPENDENCIES "${LIBRARY}")
endforeach()
set(${SRC_LDFLAGS} "${THIS_LDFLAGS}")
set(${EXTRA_DEPENDS} "${EXTRA_DEPENDENCIES}")
endmacro()
###############################################################################
# add_to_cpack_ignored_files(<item> [TRUE])
#
# A macro to update the environment variable CPACK_IGNORED_FILES which
# contains a list of files for CPack to ignore. If the optional 2nd argument
# of TRUE is given, periods will be converted to \\. for CPack.
###############################################################################
macro(add_to_cpack_ignored_files ITEM)
# Temporary copy of the original item
set(REAL_ITEM "${ITEM}")
# If we have 2+ arguments, assume that the second one was something like TRUE (doesn't matter really) and convert periods so they will be \\. for CPack
if(${ARGC} GREATER 1)
string(REPLACE "." "\\\\." REAL_ITEM ${REAL_ITEM})
endif()
# If the environment variable is already defined, just tack the item to the end
if(DEFINED ENV{CPACK_IGNORED_FILES})
set(ENV{CPACK_IGNORED_FILES} "$ENV{CPACK_IGNORED_FILES};${REAL_ITEM}")
# Otherwise set the environment variable to the item
else()
set(ENV{CPACK_IGNORED_FILES} "${REAL_ITEM}")
endif()
endmacro()
-825
View File
@@ -1,825 +0,0 @@
; CPack install script designed for a nmake build
;--------------------------------
; You must define these values
!define VERSION "@CPACK_PACKAGE_VERSION@"
!define INST_DIR "@CPACK_TEMPORARY_DIRECTORY@"
;--------------------------------
;Variables
Var MUI_TEMP
Var STARTMENU_FOLDER
Var SV_ALLUSERS
Var START_MENU
Var DO_NOT_ADD_TO_PATH
Var ADD_TO_PATH_ALL_USERS
Var ADD_TO_PATH_CURRENT_USER
Var INSTALL_DESKTOP
;--------------------------------
;Include Modern UI
!include "MUI2.nsh"
;Default installation folder
InstallDir "$PROGRAMFILES\@CPACK_PACKAGE_INSTALL_DIRECTORY@"
;--------------------------------
;General
;Name and file
Name "@CPACK_PACKAGE_NAME@ @CPACK_PACKAGE_VERSION@"
OutFile "@CPACK_TOPLEVEL_DIRECTORY@/@CPACK_OUTPUT_FILE_NAME@"
;Set compression
SetCompressor @CPACK_NSIS_COMPRESSOR@
@CPACK_NSIS_DEFINES@
!include Sections.nsh
;--- Component support macros: ---
; The code for the add/remove functionality is from:
; http://nsis.sourceforge.net/Add/Remove_Functionality
; It has been modified slightly and extended to provide
; inter-component dependencies.
Var AR_SecFlags
Var AR_RegFlags
@CPACK_NSIS_SECTION_SELECTED_VARS@
; Loads the "selected" flag for the section named SecName into the
; variable VarName.
!macro LoadSectionSelectedIntoVar SecName VarName
SectionGetFlags ${${SecName}} $${VarName}
IntOp $${VarName} $${VarName} & ${SF_SELECTED} ;Turn off all other bits
!macroend
; Loads the value of a variable... can we get around this?
!macro LoadVar VarName
IntOp $R0 0 + $${VarName}
!macroend
; Sets the value of a variable
!macro StoreVar VarName IntValue
IntOp $${VarName} 0 + ${IntValue}
!macroend
!macro InitSection SecName
; This macro reads component installed flag from the registry and
;changes checked state of the section on the components page.
;Input: section index constant name specified in Section command.
ClearErrors
;Reading component status from registry
ReadRegDWORD $AR_RegFlags HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\@CPACK_PACKAGE_NAME@\Components\${SecName}" "Installed"
IfErrors "default_${SecName}"
;Status will stay default if registry value not found
;(component was never installed)
IntOp $AR_RegFlags $AR_RegFlags & ${SF_SELECTED} ;Turn off all other bits
SectionGetFlags ${${SecName}} $AR_SecFlags ;Reading default section flags
IntOp $AR_SecFlags $AR_SecFlags & 0xFFFE ;Turn lowest (enabled) bit off
IntOp $AR_SecFlags $AR_RegFlags | $AR_SecFlags ;Change lowest bit
; Note whether this component was installed before
!insertmacro StoreVar ${SecName}_was_installed $AR_RegFlags
IntOp $R0 $AR_RegFlags & $AR_RegFlags
;Writing modified flags
SectionSetFlags ${${SecName}} $AR_SecFlags
"default_${SecName}:"
!insertmacro LoadSectionSelectedIntoVar ${SecName} ${SecName}_selected
!macroend
!macro FinishSection SecName
; This macro reads section flag set by user and removes the section
;if it is not selected.
;Then it writes component installed flag to registry
;Input: section index constant name specified in Section command.
SectionGetFlags ${${SecName}} $AR_SecFlags ;Reading section flags
;Checking lowest bit:
IntOp $AR_SecFlags $AR_SecFlags & ${SF_SELECTED}
IntCmp $AR_SecFlags 1 "leave_${SecName}"
;Section is not selected:
;Calling Section uninstall macro and writing zero installed flag
!insertmacro "Remove_${${SecName}}"
WriteRegDWORD HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\@CPACK_PACKAGE_NAME@\Components\${SecName}" \
"Installed" 0
Goto "exit_${SecName}"
"leave_${SecName}:"
;Section is selected:
WriteRegDWORD HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\@CPACK_PACKAGE_NAME@\Components\${SecName}" \
"Installed" 1
"exit_${SecName}:"
!macroend
!macro RemoveSection_CPack SecName
; This macro is used to call section's Remove_... macro
;from the uninstaller.
;Input: section index constant name specified in Section command.
!insertmacro "Remove_${${SecName}}"
!macroend
; Determine whether the selection of SecName changed
!macro MaybeSelectionChanged SecName
!insertmacro LoadVar ${SecName}_selected
SectionGetFlags ${${SecName}} $R1
IntOp $R1 $R1 & ${SF_SELECTED} ;Turn off all other bits
; See if the status has changed:
IntCmp $R0 $R1 "${SecName}_unchanged"
!insertmacro LoadSectionSelectedIntoVar ${SecName} ${SecName}_selected
IntCmp $R1 ${SF_SELECTED} "${SecName}_was_selected"
!insertmacro "Deselect_required_by_${SecName}"
goto "${SecName}_unchanged"
"${SecName}_was_selected:"
!insertmacro "Select_${SecName}_depends"
"${SecName}_unchanged:"
!macroend
;--- End of Add/Remove macros ---
;--------------------------------
;Interface Settings
!define MUI_ABORTWARNING
;----------------------------------------
; based upon a script of "Written by KiCHiK 2003-01-18 05:57:02"
;----------------------------------------
!verbose 3
!include "WinMessages.NSH"
!verbose 4
;====================================================
; get_NT_environment
; Returns: the selected environment
; Output : head of the stack
;====================================================
!macro select_NT_profile UN
Function ${UN}select_NT_profile
StrCmp $ADD_TO_PATH_ALL_USERS "1" 0 environment_single
DetailPrint "Selected environment for all users"
Push "all"
Return
environment_single:
DetailPrint "Selected environment for current user only."
Push "current"
Return
FunctionEnd
!macroend
!insertmacro select_NT_profile ""
!insertmacro select_NT_profile "un."
;----------------------------------------------------
!define NT_current_env 'HKCU "Environment"'
!define NT_all_env 'HKLM "SYSTEM\CurrentControlSet\Control\Session Manager\Environment"'
!ifndef WriteEnvStr_RegKey
!ifdef ALL_USERS
!define WriteEnvStr_RegKey \
'HKLM "SYSTEM\CurrentControlSet\Control\Session Manager\Environment"'
!else
!define WriteEnvStr_RegKey 'HKCU "Environment"'
!endif
!endif
; AddToPath - Adds the given dir to the search path.
; Input - head of the stack
; Note - Win9x systems requires reboot
Function AddToPath
Exch $0
Push $1
Push $2
Push $3
# don't add if the path doesn't exist
IfFileExists "$0\*.*" "" AddToPath_done
ReadEnvStr $1 PATH
Push "$1;"
Push "$0;"
Call StrStr
Pop $2
StrCmp $2 "" "" AddToPath_done
Push "$1;"
Push "$0\;"
Call StrStr
Pop $2
StrCmp $2 "" "" AddToPath_done
GetFullPathName /SHORT $3 $0
Push "$1;"
Push "$3;"
Call StrStr
Pop $2
StrCmp $2 "" "" AddToPath_done
Push "$1;"
Push "$3\;"
Call StrStr
Pop $2
StrCmp $2 "" "" AddToPath_done
Call IsNT
Pop $1
StrCmp $1 1 AddToPath_NT
; Not on NT
StrCpy $1 $WINDIR 2
FileOpen $1 "$1\autoexec.bat" a
FileSeek $1 -1 END
FileReadByte $1 $2
IntCmp $2 26 0 +2 +2 # DOS EOF
FileSeek $1 -1 END # write over EOF
FileWrite $1 "$\r$\nSET PATH=%PATH%;$3$\r$\n"
FileClose $1
SetRebootFlag true
Goto AddToPath_done
AddToPath_NT:
ReadRegStr $1 ${WriteEnvStr_RegKey} "PATH"
StrCmp $1 "" AddToPath_NTdoIt
Push $1
Call Trim
Pop $1
StrCpy $0 "$1;$0"
AddToPath_NTdoIt:
WriteRegExpandStr ${WriteEnvStr_RegKey} "PATH" $0
SendMessage ${HWND_BROADCAST} ${WM_WININICHANGE} 0 "STR:Environment" /TIMEOUT=5000
AddToPath_done:
Pop $3
Pop $2
Pop $1
Pop $0
FunctionEnd
; RemoveFromPath - Remove a given dir from the path
; Input: head of the stack
Function un.RemoveFromPath
Exch $0
Push $1
Push $2
Push $3
Push $4
Push $5
Push $6
IntFmt $6 "%c" 26 # DOS EOF
Call un.IsNT
Pop $1
StrCmp $1 1 unRemoveFromPath_NT
; Not on NT
StrCpy $1 $WINDIR 2
FileOpen $1 "$1\autoexec.bat" r
GetTempFileName $4
FileOpen $2 $4 w
GetFullPathName /SHORT $0 $0
StrCpy $0 "SET PATH=%PATH%;$0"
Goto unRemoveFromPath_dosLoop
unRemoveFromPath_dosLoop:
FileRead $1 $3
StrCpy $5 $3 1 -1 # read last char
StrCmp $5 $6 0 +2 # if DOS EOF
StrCpy $3 $3 -1 # remove DOS EOF so we can compare
StrCmp $3 "$0$\r$\n" unRemoveFromPath_dosLoopRemoveLine
StrCmp $3 "$0$\n" unRemoveFromPath_dosLoopRemoveLine
StrCmp $3 "$0" unRemoveFromPath_dosLoopRemoveLine
StrCmp $3 "" unRemoveFromPath_dosLoopEnd
FileWrite $2 $3
Goto unRemoveFromPath_dosLoop
unRemoveFromPath_dosLoopRemoveLine:
SetRebootFlag true
Goto unRemoveFromPath_dosLoop
unRemoveFromPath_dosLoopEnd:
FileClose $2
FileClose $1
StrCpy $1 $WINDIR 2
Delete "$1\autoexec.bat"
CopyFiles /SILENT $4 "$1\autoexec.bat"
Delete $4
Goto unRemoveFromPath_done
unRemoveFromPath_NT:
ReadRegStr $1 ${WriteEnvStr_RegKey} "PATH"
StrCpy $5 $1 1 -1 # copy last char
StrCmp $5 ";" +2 # if last char != ;
StrCpy $1 "$1;" # append ;
Push $1
Push "$0;"
Call un.StrStr ; Find `$0;` in $1
Pop $2 ; pos of our dir
StrCmp $2 "" unRemoveFromPath_done
; else, it is in path
# $0 - path to add
# $1 - path var
StrLen $3 "$0;"
StrLen $4 $2
StrCpy $5 $1 -$4 # $5 is now the part before the path to remove
StrCpy $6 $2 "" $3 # $6 is now the part after the path to remove
StrCpy $3 $5$6
StrCpy $5 $3 1 -1 # copy last char
StrCmp $5 ";" 0 +2 # if last char == ;
StrCpy $3 $3 -1 # remove last char
WriteRegExpandStr ${WriteEnvStr_RegKey} "PATH" $3
SendMessage ${HWND_BROADCAST} ${WM_WININICHANGE} 0 "STR:Environment" /TIMEOUT=5000
unRemoveFromPath_done:
Pop $6
Pop $5
Pop $4
Pop $3
Pop $2
Pop $1
Pop $0
FunctionEnd
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
; Uninstall stuff
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
###########################################
# Utility Functions #
###########################################
;====================================================
; IsNT - Returns 1 if the current system is NT, 0
; otherwise.
; Output: head of the stack
;====================================================
; IsNT
; no input
; output, top of the stack = 1 if NT or 0 if not
;
; Usage:
; Call IsNT
; Pop $R0
; ($R0 at this point is 1 or 0)
!macro IsNT un
Function ${un}IsNT
Push $0
ReadRegStr $0 HKLM "SOFTWARE\Microsoft\Windows NT\CurrentVersion" CurrentVersion
StrCmp $0 "" 0 IsNT_yes
; we are not NT.
Pop $0
Push 0
Return
IsNT_yes:
; NT!!!
Pop $0
Push 1
FunctionEnd
!macroend
!insertmacro IsNT ""
!insertmacro IsNT "un."
; StrStr
; input, top of stack = string to search for
; top of stack-1 = string to search in
; output, top of stack (replaces with the portion of the string remaining)
; modifies no other variables.
;
; Usage:
; Push "this is a long ass string"
; Push "ass"
; Call StrStr
; Pop $R0
; ($R0 at this point is "ass string")
!macro StrStr un
Function ${un}StrStr
Exch $R1 ; st=haystack,old$R1, $R1=needle
Exch ; st=old$R1,haystack
Exch $R2 ; st=old$R1,old$R2, $R2=haystack
Push $R3
Push $R4
Push $R5
StrLen $R3 $R1
StrCpy $R4 0
; $R1=needle
; $R2=haystack
; $R3=len(needle)
; $R4=cnt
; $R5=tmp
loop:
StrCpy $R5 $R2 $R3 $R4
StrCmp $R5 $R1 done
StrCmp $R5 "" done
IntOp $R4 $R4 + 1
Goto loop
done:
StrCpy $R1 $R2 "" $R4
Pop $R5
Pop $R4
Pop $R3
Pop $R2
Exch $R1
FunctionEnd
!macroend
!insertmacro StrStr ""
!insertmacro StrStr "un."
Function Trim ; Added by Pelaca
Exch $R1
Push $R2
Loop:
StrCpy $R2 "$R1" 1 -1
StrCmp "$R2" " " RTrim
StrCmp "$R2" "$\n" RTrim
StrCmp "$R2" "$\r" RTrim
StrCmp "$R2" ";" RTrim
GoTo Done
RTrim:
StrCpy $R1 "$R1" -1
Goto Loop
Done:
Pop $R2
Exch $R1
FunctionEnd
Function ConditionalAddToRegistry
Pop $0
Pop $1
StrCmp "$0" "" ConditionalAddToRegistry_EmptyString
WriteRegStr SHCTX "Software\Microsoft\Windows\CurrentVersion\Uninstall\@CPACK_PACKAGE_NAME@" \
"$1" "$0"
;MessageBox MB_OK "Set Registry: '$1' to '$0'"
DetailPrint "Set install registry entry: '$1' to '$0'"
ConditionalAddToRegistry_EmptyString:
FunctionEnd
;--------------------------------
!ifdef CPACK_USES_DOWNLOAD
Function DownloadFile
IfFileExists $INSTDIR\* +2
CreateDirectory $INSTDIR
Pop $0
; Skip if already downloaded
IfFileExists $INSTDIR\$0 0 +2
Return
StrCpy $1 "@CPACK_DOWNLOAD_SITE@"
try_again:
NSISdl::download "$1/$0" "$INSTDIR\$0"
Pop $1
StrCmp $1 "success" success
StrCmp $1 "Cancelled" cancel
MessageBox MB_OK "Download failed: $1"
cancel:
Return
success:
FunctionEnd
!endif
;--------------------------------
; Installation types
@CPACK_NSIS_INSTALLATION_TYPES@
;--------------------------------
; Component sections
@CPACK_NSIS_COMPONENT_SECTIONS@
;--------------------------------
; Define some macro setting for the gui
@CPACK_NSIS_INSTALLER_MUI_ICON_CODE@
@CPACK_NSIS_INSTALLER_ICON_CODE@
@CPACK_NSIS_INSTALLER_MUI_COMPONENTS_DESC@
;--------------------------------
;Pages
!define MUI_LANGDLL_REGISTRY_ROOT "SHCTX"
!define MUI_LANGDLL_REGISTRY_KEY "Software\Microsoft\Windows\CurrentVersion\Uninstall\@CPACK_PACKAGE_NAME@"
!define MUI_LANGDLL_REGISTRY_VALUENAME "NSIS:Language"
!insertmacro MUI_PAGE_WELCOME
!insertmacro MUI_PAGE_LICENSE "@CPACK_RESOURCE_FILE_LICENSE@"
!insertmacro MUI_PAGE_DIRECTORY
;Start Menu Folder Page Configuration
!define MUI_STARTMENUPAGE_REGISTRY_ROOT "SHCTX"
!define MUI_STARTMENUPAGE_REGISTRY_KEY "Software\@CPACK_PACKAGE_VENDOR@\@CPACK_PACKAGE_INSTALL_REGISTRY_KEY@"
!define MUI_STARTMENUPAGE_REGISTRY_VALUENAME "Start Menu Folder"
!insertmacro MUI_PAGE_STARTMENU Application $STARTMENU_FOLDER
@CPACK_NSIS_PAGE_COMPONENTS@
!insertmacro MUI_PAGE_INSTFILES
!define MUI_FINISHPAGE_SHOWREADME "$INSTDIR\doc\README.txt"
!insertmacro MUI_PAGE_FINISH
!insertmacro MUI_UNPAGE_CONFIRM
!insertmacro MUI_UNPAGE_INSTFILES
;--------------------------------
;Languages
!insertmacro MUI_LANGUAGE "Dutch"
!insertmacro MUI_LANGUAGE "English"
!insertmacro MUI_LANGUAGE "French"
!insertmacro MUI_LANGUAGE "German"
!insertmacro MUI_LANGUAGE "Italian"
!insertmacro MUI_LANGUAGE "Portuguese"
!insertmacro MUI_LANGUAGE "Spanish"
;--------------------------------
;Installer Sections
Section "-Core installation"
;Use the entire tree produced by the INSTALL target. Keep the
;list of directories here in sync with the RMDir commands below.
SetOutPath "$INSTDIR"
@CPACK_NSIS_FULL_INSTALL@
;Store installation folder
WriteRegStr SHCTX "Software\@CPACK_PACKAGE_VENDOR@\@CPACK_PACKAGE_INSTALL_REGISTRY_KEY@" "" $INSTDIR
;Create uninstaller
WriteUninstaller "$INSTDIR\Uninstall.exe"
Push "DisplayName"
Push "@CPACK_NSIS_DISPLAY_NAME@"
Call ConditionalAddToRegistry
Push "DisplayVersion"
Push "@CPACK_PACKAGE_VERSION@"
Call ConditionalAddToRegistry
Push "Publisher"
Push "@CPACK_PACKAGE_VENDOR@"
Call ConditionalAddToRegistry
Push "UninstallString"
Push "$INSTDIR\Uninstall.exe"
Call ConditionalAddToRegistry
Push "NoRepair"
Push "1"
Call ConditionalAddToRegistry
!ifdef CPACK_NSIS_ADD_REMOVE
;Create add/remove functionality
Push "ModifyPath"
Push "$INSTDIR\AddRemove.exe"
Call ConditionalAddToRegistry
!else
Push "NoModify"
Push "1"
Call ConditionalAddToRegistry
!endif
; Optional registration
Push "DisplayIcon"
Push "$INSTDIR\@CPACK_NSIS_INSTALLED_ICON_NAME@"
Call ConditionalAddToRegistry
Push "HelpLink"
Push "@CPACK_NSIS_HELP_LINK@"
Call ConditionalAddToRegistry
Push "URLInfoAbout"
Push "@CPACK_NSIS_URL_INFO_ABOUT@"
Call ConditionalAddToRegistry
Push "Contact"
Push "@CPACK_NSIS_CONTACT@"
Call ConditionalAddToRegistry
!insertmacro MUI_STARTMENU_WRITE_BEGIN Application
;Create shortcuts
CreateDirectory "$SMPROGRAMS\$STARTMENU_FOLDER"
@CPACK_NSIS_CREATE_ICONS@
@CPACK_NSIS_CREATE_ICONS_EXTRA@
CreateShortCut "$SMPROGRAMS\$STARTMENU_FOLDER\Uninstall.lnk" "$INSTDIR\Uninstall.exe"
; Write special uninstall registry entries
Push "StartMenu"
Push "$STARTMENU_FOLDER"
Call ConditionalAddToRegistry
Push "DoNotAddToPath"
Push "$DO_NOT_ADD_TO_PATH"
Call ConditionalAddToRegistry
Push "AddToPathAllUsers"
Push "$ADD_TO_PATH_ALL_USERS"
Call ConditionalAddToRegistry
Push "AddToPathCurrentUser"
Push "$ADD_TO_PATH_CURRENT_USER"
Call ConditionalAddToRegistry
Push "InstallToDesktop"
Push "$INSTALL_DESKTOP"
Call ConditionalAddToRegistry
@CPACK_NSIS_EXTRA_INSTALL_COMMANDS@
!insertmacro MUI_STARTMENU_WRITE_END
SectionEnd
;--------------------------------
; determine admin versus local install
Function un.onInit
ClearErrors
UserInfo::GetName
IfErrors noLM
Pop $0
UserInfo::GetAccountType
Pop $1
StrCmp $1 "Admin" 0 +3
SetShellVarContext all
;MessageBox MB_OK 'User "$0" is in the Admin group'
Goto done
StrCmp $1 "Power" 0 +3
SetShellVarContext all
;MessageBox MB_OK 'User "$0" is in the Power Users group'
Goto done
noLM:
;Get installation folder from registry if available
done:
!insertmacro MUI_UNGETLANGUAGE
FunctionEnd
;--- Add/Remove callback functions: ---
!macro SectionList MacroName
;This macro used to perform operation on multiple sections.
;List all of your components in following manner here.
@CPACK_NSIS_COMPONENT_SECTION_LIST@
!macroend
Section -FinishComponents
;Removes unselected components and writes component status to registry
!insertmacro SectionList "FinishSection"
!ifdef CPACK_NSIS_ADD_REMOVE
; Get the name of the installer executable
System::Call 'kernel32::GetModuleFileNameA(i 0, t .R0, i 1024) i r1'
StrCpy $R3 $R0
; Strip off the last 13 characters, to see if we have AddRemove.exe
StrLen $R1 $R0
IntOp $R1 $R0 - 13
StrCpy $R2 $R0 13 $R1
StrCmp $R2 "AddRemove.exe" addremove_installed
; We're not running AddRemove.exe, so install it
CopyFiles $R3 $INSTDIR\AddRemove.exe
addremove_installed:
!endif
SectionEnd
;--- End of Add/Remove callback functions ---
;--------------------------------
; Component dependencies
Function .onSelChange
!insertmacro SectionList MaybeSelectionChanged
FunctionEnd
;--------------------------------
;Uninstaller Section
Section "Uninstall"
ReadRegStr $START_MENU SHCTX \
"Software\Microsoft\Windows\CurrentVersion\Uninstall\@CPACK_PACKAGE_NAME@" "StartMenu"
;MessageBox MB_OK "Start menu is in: $START_MENU"
ReadRegStr $DO_NOT_ADD_TO_PATH SHCTX \
"Software\Microsoft\Windows\CurrentVersion\Uninstall\@CPACK_PACKAGE_NAME@" "DoNotAddToPath"
ReadRegStr $ADD_TO_PATH_ALL_USERS SHCTX \
"Software\Microsoft\Windows\CurrentVersion\Uninstall\@CPACK_PACKAGE_NAME@" "AddToPathAllUsers"
ReadRegStr $ADD_TO_PATH_CURRENT_USER SHCTX \
"Software\Microsoft\Windows\CurrentVersion\Uninstall\@CPACK_PACKAGE_NAME@" "AddToPathCurrentUser"
;MessageBox MB_OK "Add to path: $DO_NOT_ADD_TO_PATH all users: $ADD_TO_PATH_ALL_USERS"
ReadRegStr $INSTALL_DESKTOP SHCTX \
"Software\Microsoft\Windows\CurrentVersion\Uninstall\@CPACK_PACKAGE_NAME@" "InstallToDesktop"
;MessageBox MB_OK "Install to desktop: $INSTALL_DESKTOP "
@CPACK_NSIS_EXTRA_UNINSTALL_COMMANDS@
;Remove files we installed.
;Keep the list of directories here in sync with the File commands above.
@CPACK_NSIS_DELETE_FILES@
@CPACK_NSIS_DELETE_DIRECTORIES@
!ifdef CPACK_NSIS_ADD_REMOVE
;Remove the add/remove program
Delete "$INSTDIR\AddRemove.exe"
!endif
;Remove the uninstaller itself.
Delete "$INSTDIR\Uninstall.exe"
DeleteRegKey SHCTX "Software\Microsoft\Windows\CurrentVersion\Uninstall\@CPACK_PACKAGE_NAME@"
;Remove the installation directory if it is empty.
RMDir "$INSTDIR"
; Remove the registry entries.
DeleteRegKey SHCTX "Software\@CPACK_PACKAGE_VENDOR@\@CPACK_PACKAGE_INSTALL_REGISTRY_KEY@"
; Removes all optional components
!insertmacro SectionList "RemoveSection_CPack"
!insertmacro MUI_STARTMENU_GETFOLDER Application $MUI_TEMP
Delete "$SMPROGRAMS\$MUI_TEMP\Uninstall.lnk"
@CPACK_NSIS_DELETE_ICONS@
@CPACK_NSIS_DELETE_ICONS_EXTRA@
;Delete empty start menu parent directories
StrCpy $MUI_TEMP "$SMPROGRAMS\$MUI_TEMP"
startMenuDeleteLoop:
ClearErrors
RMDir $MUI_TEMP
GetFullPathName $MUI_TEMP "$MUI_TEMP\.."
IfErrors startMenuDeleteLoopDone
StrCmp "$MUI_TEMP" "$SMPROGRAMS" startMenuDeleteLoopDone startMenuDeleteLoop
startMenuDeleteLoopDone:
; If the user changed the shortcut, then uninstall may not work. This should
; try to fix it.
StrCpy $MUI_TEMP "$START_MENU"
Delete "$SMPROGRAMS\$MUI_TEMP\Uninstall.lnk"
@CPACK_NSIS_DELETE_ICONS_EXTRA@
;Delete empty start menu parent directories
StrCpy $MUI_TEMP "$SMPROGRAMS\$MUI_TEMP"
secondStartMenuDeleteLoop:
ClearErrors
RMDir $MUI_TEMP
GetFullPathName $MUI_TEMP "$MUI_TEMP\.."
IfErrors secondStartMenuDeleteLoopDone
StrCmp "$MUI_TEMP" "$SMPROGRAMS" secondStartMenuDeleteLoopDone secondStartMenuDeleteLoop
secondStartMenuDeleteLoopDone:
DeleteRegKey /ifempty SHCTX "Software\@CPACK_PACKAGE_VENDOR@\@CPACK_PACKAGE_INSTALL_REGISTRY_KEY@"
Push $INSTDIR\bin
StrCmp $DO_NOT_ADD_TO_PATH_ "1" doNotRemoveFromPath 0
Call un.RemoveFromPath
doNotRemoveFromPath:
SectionEnd
;--------------------------------
; determine admin versus local install
; Is install for "AllUsers" or "JustMe"?
; Default to "JustMe" - set to "AllUsers" if admin or on Win9x
; This function is used for the very first "custom page" of the installer.
; This custom page does not show up visibly, but it executes prior to the
; first visible page and sets up $INSTDIR properly...
; Choose different default installation folder based on SV_ALLUSERS...
; "Program Files" for AllUsers, "My Documents" for JustMe...
Function .onInit
!insertmacro MUI_LANGDLL_DISPLAY
; Reads components status for registry
!insertmacro SectionList "InitSection"
StrCpy $SV_ALLUSERS "JustMe"
StrCpy $INSTDIR "$DOCUMENTS\@CPACK_PACKAGE_INSTALL_DIRECTORY@"
ClearErrors
UserInfo::GetName
IfErrors noLM
Pop $0
UserInfo::GetAccountType
Pop $1
StrCmp $1 "Admin" 0 +3
SetShellVarContext all
;MessageBox MB_OK 'User "$0" is in the Admin group'
StrCpy $SV_ALLUSERS "AllUsers"
Goto done
StrCmp $1 "Power" 0 +3
SetShellVarContext all
;MessageBox MB_OK 'User "$0" is in the Power Users group'
StrCpy $SV_ALLUSERS "AllUsers"
Goto done
noLM:
StrCpy $SV_ALLUSERS "AllUsers"
;Get installation folder from registry if available
done:
StrCmp $SV_ALLUSERS "AllUsers" 0 +2
StrCpy $INSTDIR "$PROGRAMFILES\@CPACK_PACKAGE_INSTALL_DIRECTORY@"
FunctionEnd
+53 -29
View File
@@ -127,8 +127,9 @@ define
* and serverinfo configuration would look like:
*
* # This goes in inspircd.conf, *NOT* your Anope config!
* <module name="account">
* <module name="hidechans">
* <module name="services_account">
* <module name="services">
* <module name="spanningtree">
* <bind address="127.0.0.1" port="7000" type="servers">
* <link name="services.example.com"
@@ -136,7 +137,7 @@ define
* port="7000"
* sendpass="mypassword"
* recvpass="mypassword">
* <uline server="services.example.com" silent="yes">
* <services server="services.example.com" silent="yes">
*
* An example configuration for UnrealIRCd that is compatible with the below uplink
* and serverinfo configuration would look like:
@@ -327,7 +328,7 @@ networkinfo
*
* It is recommended you DON'T change this.
*/
vhost_chars = "abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789.-/"
#vhost_chars = "abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789.-/"
/*
* If enabled, allows vhosts to not contain dots (.).
@@ -509,12 +510,15 @@ options
*
* Removing .UTF-8 will instead use the default encoding for the language, e.g. iso-8859-1 for western European languages.
*/
languages = "de_DE.UTF-8 el_GR.UTF-8 es_ES.UTF-8 fr_FR.UTF-8 it_IT.UTF-8 nl_NL.UTF-8 pl_PL.UTF-8 pt_PT.UTF-8 tr_TR.UTF-8"
languages = "de_DE.UTF-8 el_GR.UTF-8 es_ES.UTF-8 fr_FR.UTF-8 it_IT.UTF-8 nl_NL.UTF-8 pl_PL.UTF-8 pt_PT.UTF-8 ro_RO.UTF-8 tr_TR.UTF-8"
/*
* Default language that non- and newly-registered nicks will receive messages in.
* Set to "en" to enable English. Defaults to the language the system uses.
*/
* Default language that unregistered users and users of newly-registered
* accounts will receive messages in.
*
* Defaults to the language the system uses. Set to "en_US" to override this
* with English.
*/
#defaultlanguage = "es_ES.UTF-8"
}
@@ -1080,6 +1084,34 @@ mail
* The file that db_atheme will import your main database from.
*/
database = "atheme.db"
/*
* If you have custom data in your Atheme database that you want converted
* to Anope misc data to be shown with cs_set_misc you can configure that
* using one or more cs_set_misc blocks.
*/
#cs_set_misc
{
/* The key name used by Atheme. */
atheme = "private:misc:data"
/* The cs_set_misc entry to import into. */
anope = "MISC_DATA"
}
/*
* If you have custom data in your Atheme database that you want converted
* to Anope misc data to be shown with ns_set_misc you can configure that
* using one or more ns_set_misc blocks.
*/
#ns_set_misc
{
/* The key name used by Atheme. */
atheme = "private:misc:data"
/* The ns_set_misc entry to import into. */
anope = "MISC_DATA"
}
}
/*
@@ -1146,8 +1178,20 @@ module
* Allows Anope to continue writing the database even if the original can
* not be backed up. This is not recommended as it may result in total data
* loss during the circumstances described above.
*
* Defaults to no.
*/
#ignore_backup_failure = yes
/*
* Whether to preserve unknown data within the database. When a module is
* unloaded its data will be kept in the database so that it continues to
* function when reloaded. You can turn this off to clean up unknown data
* on the next database write.
*
* Defaults to yes.
*/
#preserve_unknown_data = no
}
/*
@@ -1184,7 +1228,7 @@ module
* An optional prefix to prepended to the name of each created table.
* Do not use the same prefix for other programs.
*/
#prefix = "anope_db_"
#prefix = "anope21_"
/*
* Whether or not to import data from another database module in to SQL on
@@ -1204,26 +1248,6 @@ module
import = no
}
/*
* db_redis.
*
* This module allows using Redis (https://redis.io/) as a database backend.
* 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
* will internally reflect any changes made to the database immediately once notified.
* See docs/REDIS for more information regarding this.
*/
#module
{
name = "db_redis"
/*
* Redis database to use. This must be configured with redis.
*/
engine = "redis/main"
}
/*
* [RECOMMENDED] Encryption modules.
@@ -1272,7 +1296,7 @@ module
/** The memory hardness in kibibytes of the Argon2 algorithm. Defaults to
* 128 mebibytes.
*/
#memory_cost = 121072
#memory_cost = 131072
/** The time hardness (iterations) of the Argon2 algorithm. Defaults to 3.
*/
+84 -81
View File
@@ -148,7 +148,7 @@ module
*/
/* Give it a help command. */
command { service = "BotServ"; name = "HELP"; command = "generic/help"; }
command { service = "BotServ"; name = "HELP"; command = "generic/help" }
/*
* bs_assign
@@ -161,9 +161,9 @@ command { service = "BotServ"; name = "HELP"; command = "generic/help"; }
* Used for assigning and unassigning bots to channels.
*/
module { name = "bs_assign" }
command { service = "BotServ"; name = "ASSIGN"; command = "botserv/assign"; }
command { service = "BotServ"; name = "UNASSIGN"; command = "botserv/unassign"; }
command { service = "BotServ"; name = "SET NOBOT"; command = "botserv/set/nobot"; permission = "botserv/set/nobot"; }
command { service = "BotServ"; name = "ASSIGN"; command = "botserv/assign" }
command { service = "BotServ"; name = "UNASSIGN"; command = "botserv/unassign" }
command { service = "BotServ"; name = "SET NOBOT"; command = "botserv/set/nobot"; permission = "botserv/set/nobot" }
/*
* bs_autoassign
@@ -203,7 +203,7 @@ module
*/
#casesensitive = yes
}
command { service = "BotServ"; name = "BADWORDS"; command = "botserv/badwords"; }
command { service = "BotServ"; name = "BADWORDS"; command = "botserv/badwords" }
/*
* bs_bot
@@ -213,7 +213,7 @@ command { service = "BotServ"; name = "BADWORDS"; command = "botserv/badwords";
* Used for administrating BotServ bots.
*/
module { name = "bs_bot" }
command { service = "BotServ"; name = "BOT"; command = "botserv/bot"; permission = "botserv/bot"; }
command { service = "BotServ"; name = "BOT"; command = "botserv/bot"; permission = "botserv/bot" }
/*
* bs_botlist
@@ -223,7 +223,7 @@ command { service = "BotServ"; name = "BOT"; command = "botserv/bot"; permission
* Used for listing all available bots.
*/
module { name = "bs_botlist" }
command { service = "BotServ"; name = "BOTLIST"; command = "botserv/botlist"; }
command { service = "BotServ"; name = "BOTLIST"; command = "botserv/botlist" }
/*
* bs_control
@@ -233,8 +233,8 @@ command { service = "BotServ"; name = "BOTLIST"; command = "botserv/botlist"; }
* Used for making the bot message a channel.
*/
module { name = "bs_control" }
command { service = "BotServ"; name = "ACT"; command = "botserv/act"; }
command { service = "BotServ"; name = "SAY"; command = "botserv/say"; }
command { service = "BotServ"; name = "ACT"; command = "botserv/act" }
command { service = "BotServ"; name = "SAY"; command = "botserv/say" }
/*
* bs_info
@@ -244,7 +244,7 @@ command { service = "BotServ"; name = "SAY"; command = "botserv/say"; }
* Used for getting information on bots or channels.
*/
module { name = "bs_info" }
command { service = "BotServ"; name = "INFO"; command = "botserv/info"; }
command { service = "BotServ"; name = "INFO"; command = "botserv/info" }
/*
* bs_kick
@@ -285,19 +285,19 @@ module
*/
gentlebadwordreason = yes
}
command { service = "BotServ"; name = "KICK"; command = "botserv/kick"; }
command { service = "BotServ"; name = "KICK AMSG"; command = "botserv/kick/amsg"; }
command { service = "BotServ"; name = "KICK BADWORDS"; command = "botserv/kick/badwords"; }
command { service = "BotServ"; name = "KICK BOLDS"; command = "botserv/kick/bolds"; }
command { service = "BotServ"; name = "KICK CAPS"; command = "botserv/kick/caps"; }
command { service = "BotServ"; name = "KICK COLORS"; command = "botserv/kick/colors"; }
command { service = "BotServ"; name = "KICK FLOOD"; command = "botserv/kick/flood"; }
command { service = "BotServ"; name = "KICK ITALICS"; command = "botserv/kick/italics"; }
command { service = "BotServ"; name = "KICK REPEAT"; command = "botserv/kick/repeat"; }
command { service = "BotServ"; name = "KICK REVERSES"; command = "botserv/kick/reverses"; }
command { service = "BotServ"; name = "KICK UNDERLINES"; command = "botserv/kick/underlines"; }
command { service = "BotServ"; name = "SET DONTKICKOPS"; command = "botserv/set/dontkickops"; }
command { service = "BotServ"; name = "SET DONTKICKVOICES"; command = "botserv/set/dontkickvoices"; }
command { service = "BotServ"; name = "KICK"; command = "botserv/kick" }
command { service = "BotServ"; name = "KICK AMSG"; command = "botserv/kick/amsg" }
command { service = "BotServ"; name = "KICK BADWORDS"; command = "botserv/kick/badwords" }
command { service = "BotServ"; name = "KICK BOLDS"; command = "botserv/kick/bolds" }
command { service = "BotServ"; name = "KICK CAPS"; command = "botserv/kick/caps" }
command { service = "BotServ"; name = "KICK COLORS"; command = "botserv/kick/colors" }
command { service = "BotServ"; name = "KICK FLOOD"; command = "botserv/kick/flood" }
command { service = "BotServ"; name = "KICK ITALICS"; command = "botserv/kick/italics" }
command { service = "BotServ"; name = "KICK REPEAT"; command = "botserv/kick/repeat" }
command { service = "BotServ"; name = "KICK REVERSES"; command = "botserv/kick/reverses" }
command { service = "BotServ"; name = "KICK UNDERLINES"; command = "botserv/kick/underlines" }
command { service = "BotServ"; name = "SET DONTKICKOPS"; command = "botserv/set/dontkickops" }
command { service = "BotServ"; name = "SET DONTKICKVOICES"; command = "botserv/set/dontkickvoices" }
/*
* bs_set
@@ -306,9 +306,9 @@ command { service = "BotServ"; name = "SET DONTKICKVOICES"; command = "botserv/s
* botserv/set/private - Used to prohibit specific BotServ bots from being assigned to channels.
*/
module { name = "bs_set" }
command { service = "BotServ"; name = "SET"; command = "botserv/set"; }
command { service = "BotServ"; name = "SET BANEXPIRE"; command = "botserv/set/banexpire"; }
command { service = "BotServ"; name = "SET PRIVATE"; command = "botserv/set/private"; permission = "botserv/set/private"; }
command { service = "BotServ"; name = "SET"; command = "botserv/set" }
command { service = "BotServ"; name = "SET BANEXPIRE"; command = "botserv/set/banexpire" }
command { service = "BotServ"; name = "SET PRIVATE"; command = "botserv/set/private"; permission = "botserv/set/private" }
/*
* greet
@@ -318,9 +318,9 @@ command { service = "BotServ"; name = "SET PRIVATE"; command = "botserv/set/priv
* nickserv/set/greet, nickserv/saset/greet - Used for changing a users greet message, which is displayed when they enter channels.
*/
module { name = "greet" }
command { service = "BotServ"; name = "SET GREET"; command = "botserv/set/greet"; }
command { service = "NickServ"; name = "SET GREET"; command = "nickserv/set/greet"; }
command { service = "NickServ"; name = "SASET GREET"; command = "nickserv/saset/greet"; permission = "nickserv/saset/greet"; }
command { service = "BotServ"; name = "SET GREET"; command = "botserv/set/greet" }
command { service = "NickServ"; name = "SET GREET"; command = "nickserv/set/greet" }
command { service = "NickServ"; name = "SASET GREET"; command = "nickserv/saset/greet"; permission = "nickserv/saset/greet" }
/*
* GREET privilege.
@@ -352,63 +352,66 @@ module
name = "fantasy"
/*
* Defines the prefixes for fantasy commands in channels. One of these characters will have to be prepended
* to all fantasy commands. If you choose "!", for example, fantasy commands will be "!kick",
* "!op", etc. This directive is optional, if left out, the default fantasy character is "!".
* Defines the prefixes for fantasy commands in channels. One of these will
* have to be prepended to all fantasy commands. For example, If you choose
* "! ?" as your prefix fantasy commands will be "!kick", "?op", etc.
*
* This directive is optional, it defaults to "!" if not set.
*/
#fantasycharacter = "!."
#prefix = "! ?"
}
command { service = "BotServ"; name = "SET FANTASY"; command = "botserv/set/fantasy"; }
command { service = "BotServ"; name = "SET FANTASY"; command = "botserv/set/fantasy" }
/*
* Fantasy commands
*
* Fantasy commands can be executed in channels that have a BotServ bot by prefixing the
* command with one of the fantasy characters configured in botserv's fantasycharacter
* directive.
* Fantasy commands can be executed in channels that have a BotServ bot assigned
* by prefixing the command with one of the fantasy characters configured in the
* {botserv}:prefix directive.
*
* Sane defaults are provided below that do not need to be edited unless you wish to change the default behavior.
* Sane defaults are provided below that do not need to be edited unless you
* wish to change the default behavior.
*/
fantasy { name = "ACCESS"; command = "chanserv/access"; }
fantasy { name = "AKICK"; command = "chanserv/akick"; }
fantasy { name = "AOP"; command = "chanserv/xop"; }
fantasy { name = "BAN"; command = "chanserv/ban"; }
fantasy { name = "CLONE"; command = "chanserv/clone"; }
fantasy { name = "DEHALFOP"; command = "chanserv/modes"; }
fantasy { name = "DEOP"; command = "chanserv/modes"; }
fantasy { name = "DEOWNER"; command = "chanserv/modes"; }
fantasy { name = "DEPROTECT"; command = "chanserv/modes"; }
fantasy { name = "DEVOICE"; command = "chanserv/modes"; }
fantasy { name = "DOWN"; command = "chanserv/down"; }
fantasy { name = "ENFORCE"; command = "chanserv/enforce"; }
fantasy { name = "ENTRYMSG"; command = "chanserv/entrymsg"; }
fantasy { name = "FLAGS"; command = "chanserv/flags"; }
fantasy { name = "HALFOP"; command = "chanserv/modes"; }
fantasy { name = "HELP"; command = "generic/help"; prepend_channel = no; require_privilege = no; }
fantasy { name = "HOP"; command = "chanserv/xop"; }
fantasy { name = "INFO"; command = "chanserv/info"; prepend_channel = no; }
fantasy { name = "INVITE"; command = "chanserv/invite"; }
fantasy { name = "K"; command = "chanserv/kick"; }
fantasy { name = "KB"; command = "chanserv/ban"; }
fantasy { name = "KICK"; command = "chanserv/kick"; }
fantasy { name = "LEVELS"; command = "chanserv/levels"; }
fantasy { name = "LIST"; command = "chanserv/list"; prepend_channel = no; }
fantasy { name = "LOG"; command = "chanserv/log"; }
fantasy { name = "MODE"; command = "chanserv/mode"; }
fantasy { name = "MUTE"; command = "chanserv/ban"; kick = no; mode = "QUIET"; }
fantasy { name = "OP"; command = "chanserv/modes"; }
fantasy { name = "OWNER"; command = "chanserv/modes"; }
fantasy { name = "PROTECT"; command = "chanserv/modes"; }
fantasy { name = "QOP"; command = "chanserv/xop"; }
fantasy { name = "SEEN"; command = "chanserv/seen"; prepend_channel = no; }
fantasy { name = "SOP"; command = "chanserv/xop"; }
fantasy { name = "STATUS"; command = "chanserv/status"; }
fantasy { name = "SUSPEND"; command = "chanserv/suspend"; permission = "chanserv/suspend"; }
fantasy { name = "SYNC"; command = "chanserv/sync"; }
fantasy { name = "TOPIC"; command = "chanserv/topic"; }
fantasy { name = "UNBAN"; command = "chanserv/unban"; }
fantasy { name = "UNMUTE"; command = "chanserv/unban"; mode = "QUIET"; }
fantasy { name = "UNSUSPEND"; command = "chanserv/unsuspend"; permission = "chanserv/suspend"; }
fantasy { name = "UP"; command = "chanserv/up"; }
fantasy { name = "VOICE"; command = "chanserv/modes"; }
fantasy { name = "VOP"; command = "chanserv/xop"; }
fantasy { name = "ACCESS"; command = "chanserv/access" }
fantasy { name = "AKICK"; command = "chanserv/akick" }
fantasy { name = "AOP"; command = "chanserv/xop" }
fantasy { name = "BAN"; command = "chanserv/ban" }
fantasy { name = "CLONE"; command = "chanserv/clone" }
fantasy { name = "DEHALFOP"; command = "chanserv/modes" }
fantasy { name = "DEOP"; command = "chanserv/modes" }
fantasy { name = "DEOWNER"; command = "chanserv/modes" }
fantasy { name = "DEPROTECT"; command = "chanserv/modes" }
fantasy { name = "DEVOICE"; command = "chanserv/modes" }
fantasy { name = "DOWN"; command = "chanserv/down" }
fantasy { name = "ENFORCE"; command = "chanserv/enforce" }
fantasy { name = "ENTRYMSG"; command = "chanserv/entrymsg" }
fantasy { name = "FLAGS"; command = "chanserv/flags" }
fantasy { name = "HALFOP"; command = "chanserv/modes" }
fantasy { name = "HELP"; command = "generic/help"; prepend_channel = no; require_privilege = no }
fantasy { name = "HOP"; command = "chanserv/xop" }
fantasy { name = "INFO"; command = "chanserv/info"; prepend_channel = no }
fantasy { name = "INVITE"; command = "chanserv/invite" }
fantasy { name = "K"; command = "chanserv/kick" }
fantasy { name = "KB"; command = "chanserv/ban" }
fantasy { name = "KICK"; command = "chanserv/kick" }
fantasy { name = "LEVELS"; command = "chanserv/levels" }
fantasy { name = "LIST"; command = "chanserv/list"; prepend_channel = no }
fantasy { name = "LOG"; command = "chanserv/log" }
fantasy { name = "MODE"; command = "chanserv/mode" }
fantasy { name = "MUTE"; command = "chanserv/ban"; kick = no; mode = "QUIET" }
fantasy { name = "OP"; command = "chanserv/modes" }
fantasy { name = "OWNER"; command = "chanserv/modes" }
fantasy { name = "PROTECT"; command = "chanserv/modes" }
fantasy { name = "QOP"; command = "chanserv/xop" }
fantasy { name = "SEEN"; command = "chanserv/seen"; prepend_channel = no }
fantasy { name = "SOP"; command = "chanserv/xop" }
fantasy { name = "STATUS"; command = "chanserv/status" }
fantasy { name = "SUSPEND"; command = "chanserv/suspend"; permission = "chanserv/suspend" }
fantasy { name = "SYNC"; command = "chanserv/sync" }
fantasy { name = "TOPIC"; command = "chanserv/topic" }
fantasy { name = "UNBAN"; command = "chanserv/unban" }
fantasy { name = "UNMUTE"; command = "chanserv/unban"; mode = "QUIET" }
fantasy { name = "UNSUSPEND"; command = "chanserv/unsuspend"; permission = "chanserv/suspend" }
fantasy { name = "UP"; command = "chanserv/up" }
fantasy { name = "VOICE"; command = "chanserv/modes" }
fantasy { name = "VOP"; command = "chanserv/xop" }
+90 -58
View File
@@ -119,7 +119,7 @@ module
/*
* The length of time before a channel registration expires.
*
* This directive is optional. If not set, the default is never.
* This directive is optional. If not set, the default is 30 days.
*/
#expire = 90d
@@ -179,6 +179,12 @@ module
*/
disallow_channel_access = no
/*
* If set, prevents malformed hostmasks from being added to access lists
* instead of attempting to fix their format.
*/
#disallow_malformed_hostmask = yes
/*
* If set, ChanServ will always lower the timestamp of registered channels to their registration date.
* This prevents several race conditions where unauthorized users can join empty registered channels and set
@@ -246,6 +252,7 @@ privilege
rank = 10
level = 3
flag = "f"
flag_migration_requires = "ACCESS_CHANGE"
xop = "VOP"
}
@@ -490,6 +497,7 @@ privilege
rank = 110
level = 4
flag = "h"
flag_migration_requires = "HALFOP"
xop = "HOP"
}
@@ -632,6 +640,7 @@ privilege
rank = 220
level = 5
flag = "o"
flag_migration_requires = "OP"
xop = "AOP"
}
@@ -704,6 +713,7 @@ privilege
rank = 300
level = 10
flag = "a"
flag_migration_requires = "PROTECT"
xop = "SOP"
}
@@ -847,6 +857,7 @@ privilege
rank = 60
level = 3
flag = "v"
flag_migration_requires = "VOICE"
xop = "VOP"
}
@@ -891,7 +902,7 @@ command_group
}
/* Give it a help command. */
command { service = "ChanServ"; name = "HELP"; command = "generic/help"; }
command { service = "ChanServ"; name = "HELP"; command = "generic/help" }
/*
* cs_access
@@ -907,8 +918,8 @@ command { service = "ChanServ"; name = "HELP"; command = "generic/help"; }
* entry by the other access system, which could be an XOP command name, or a set of flags.
*/
module { name = "cs_access" }
command { service = "ChanServ"; name = "ACCESS"; command = "chanserv/access"; group = "chanserv/access"; }
command { service = "ChanServ"; name = "LEVELS"; command = "chanserv/levels"; group = "chanserv/access"; }
command { service = "ChanServ"; name = "ACCESS"; command = "chanserv/access"; group = "chanserv/access" }
command { service = "ChanServ"; name = "LEVELS"; command = "chanserv/levels"; group = "chanserv/access" }
/*
* cs_akick
@@ -931,7 +942,7 @@ module
*/
autokickreason = "User has been banned from the channel"
}
command { service = "ChanServ"; name = "AKICK"; command = "chanserv/akick"; group = "chanserv/management"; }
command { service = "ChanServ"; name = "AKICK"; command = "chanserv/akick"; group = "chanserv/management" }
/*
* cs_ban
@@ -947,7 +958,7 @@ command { service = "ChanServ"; name = "AKICK"; command = "chanserv/akick"; grou
* Used for banning users from channels.
*/
module { name = "cs_ban" }
command { service = "ChanServ"; name = "BAN"; command = "chanserv/ban"; group = "chanserv/management"; }
command { service = "ChanServ"; name = "BAN"; command = "chanserv/ban"; group = "chanserv/management" }
/*
* cs_clone
@@ -957,7 +968,7 @@ command { service = "ChanServ"; name = "BAN"; command = "chanserv/ban"; group =
* Used for copying channel settings from one channel to another.
*/
module { name = "cs_clone" }
command { service = "ChanServ"; name = "CLONE"; command = "chanserv/clone"; group = "chanserv/management"; }
command { service = "ChanServ"; name = "CLONE"; command = "chanserv/clone"; group = "chanserv/management" }
/*
* cs_drop
@@ -967,7 +978,7 @@ command { service = "ChanServ"; name = "CLONE"; command = "chanserv/clone"; grou
* Used for unregistering channels.
*/
module { name = "cs_drop" }
command { service = "ChanServ"; name = "DROP"; command = "chanserv/drop"; }
command { service = "ChanServ"; name = "DROP"; command = "chanserv/drop" }
/*
* cs_enforce
@@ -977,7 +988,7 @@ command { service = "ChanServ"; name = "DROP"; command = "chanserv/drop"; }
* Used to enforce various channel settings such as secureops and restricted.
*/
module { name = "cs_enforce" }
command { service = "ChanServ"; name = "ENFORCE"; command = "chanserv/enforce"; group = "chanserv/management"; }
command { service = "ChanServ"; name = "ENFORCE"; command = "chanserv/enforce"; group = "chanserv/management" }
/*
* cs_entrymsg
@@ -990,10 +1001,22 @@ module
{
name = "cs_entrymsg"
/* The maximum number of entrymsgs allowed per channel. If not set, defaults to 5. */
/*
* The maximum number of entry messages allowed per channel.
*
* Defaults to 5
*/
maxentries = 5
/*
* Whether to include an IRCv3 time tag for the original add time on entry
* messages.
*
* Defaults to yes.
*/
#timestamp = no
}
command { service = "ChanServ"; name = "ENTRYMSG"; command = "chanserv/entrymsg"; group = "chanserv/management"; }
command { service = "ChanServ"; name = "ENTRYMSG"; command = "chanserv/entrymsg"; group = "chanserv/management" }
/*
* cs_flags
@@ -1008,7 +1031,7 @@ command { service = "ChanServ"; name = "ENTRYMSG"; command = "chanserv/entrymsg"
* privilege set granted by the access entry.
*/
module { name = "cs_flags" }
command { service = "ChanServ"; name = "FLAGS"; command = "chanserv/flags"; group = "chanserv/access"; }
command { service = "ChanServ"; name = "FLAGS"; command = "chanserv/flags"; group = "chanserv/access" }
/*
* cs_getkey
@@ -1018,7 +1041,7 @@ command { service = "ChanServ"; name = "FLAGS"; command = "chanserv/flags"; grou
* Used for getting the key for channels.
*/
module { name = "cs_getkey" }
command { service = "ChanServ"; name = "GETKEY"; command = "chanserv/getkey"; }
command { service = "ChanServ"; name = "GETKEY"; command = "chanserv/getkey" }
/*
* cs_info
@@ -1028,7 +1051,7 @@ command { service = "ChanServ"; name = "GETKEY"; command = "chanserv/getkey"; }
* Used for getting information about channels.
*/
module { name = "cs_info" }
command { service = "ChanServ"; name = "INFO"; command = "chanserv/info"; }
command { service = "ChanServ"; name = "INFO"; command = "chanserv/info" }
/*
* cs_invite
@@ -1038,7 +1061,7 @@ command { service = "ChanServ"; name = "INFO"; command = "chanserv/info"; }
* Used for inviting yourself in to channels.
*/
module { name = "cs_invite" }
command { service = "ChanServ"; name = "INVITE"; command = "chanserv/invite"; }
command { service = "ChanServ"; name = "INVITE"; command = "chanserv/invite" }
/*
* cs_kick
@@ -1048,7 +1071,7 @@ command { service = "ChanServ"; name = "INVITE"; command = "chanserv/invite"; }
* Used for kicking users from channels.
*/
module { name = "cs_kick" }
command { service = "ChanServ"; name = "KICK"; command = "chanserv/kick"; group = "chanserv/management"; }
command { service = "ChanServ"; name = "KICK"; command = "chanserv/kick"; group = "chanserv/management" }
/*
* cs_list
@@ -1066,8 +1089,8 @@ module
*/
listmax = 50
}
command { service = "ChanServ"; name = "LIST"; command = "chanserv/list"; }
command { service = "ChanServ"; name = "SET PRIVATE"; command = "chanserv/set/private"; }
command { service = "ChanServ"; name = "LIST"; command = "chanserv/list" }
command { service = "ChanServ"; name = "SET PRIVATE"; command = "chanserv/set/private" }
/*
* cs_log
@@ -1108,7 +1131,7 @@ module
method = "MESSAGE @"
}
}
command { service = "ChanServ"; name = "LOG"; command = "chanserv/log"; group = "chanserv/management"; }
command { service = "ChanServ"; name = "LOG"; command = "chanserv/log"; group = "chanserv/management" }
/*
* cs_mode
@@ -1137,7 +1160,7 @@ module
*/
max = 50
}
command { service = "ChanServ"; name = "MODE"; command = "chanserv/mode"; group = "chanserv/management"; }
command { service = "ChanServ"; name = "MODE"; command = "chanserv/mode"; group = "chanserv/management" }
command { service = "ChanServ"; name = "OWNER"; command = "chanserv/modes"; group = "chanserv/status"; set = "OWNER" }
command { service = "ChanServ"; name = "DEOWNER"; command = "chanserv/modes"; group = "chanserv/status"; unset = "OWNER" }
@@ -1162,7 +1185,7 @@ command { service = "ChanServ"; name = "DEVOICE"; command = "chanserv/modes"; gr
* Used for registering channels.
*/
module { name = "cs_register" }
command { service = "ChanServ"; name = "REGISTER"; command = "chanserv/register"; }
command { service = "ChanServ"; name = "REGISTER"; command = "chanserv/register" }
/*
* cs_seen
@@ -1179,7 +1202,7 @@ module
/* Sets the time to keep seen entries in the seen database. */
purgetime = 90d
}
command { service = "OperServ"; name = "SEEN"; command = "operserv/seen"; permission = "operserv/seen"; }
command { service = "OperServ"; name = "SEEN"; command = "operserv/seen"; permission = "operserv/seen" }
/*
* cs_set
@@ -1225,34 +1248,43 @@ module
*/
persist_lower_ts = yes
}
command { service = "ChanServ"; name = "SET"; command = "chanserv/set"; group = "chanserv/management"; }
command { service = "ChanServ"; name = "SET AUTOOP"; command = "chanserv/set/autoop"; }
command { service = "ChanServ"; name = "SET BANTYPE"; command = "chanserv/set/bantype"; }
command { service = "ChanServ"; name = "SET DESCRIPTION"; command = "chanserv/set/description"; }
command { service = "ChanServ"; name = "SET DESC"; command = "chanserv/set/description"; hide = yes; }
command { service = "ChanServ"; name = "SET FOUNDER"; command = "chanserv/set/founder"; }
command { service = "ChanServ"; name = "SET KEEPMODES"; command = "chanserv/set/keepmodes"; }
command { service = "ChanServ"; name = "SET PEACE"; command = "chanserv/set/peace"; }
command { service = "ChanServ"; name = "SET PERSIST"; command = "chanserv/set/persist"; }
command { service = "ChanServ"; name = "SET RESTRICTED"; command = "chanserv/set/restricted"; }
command { service = "ChanServ"; name = "SET SECURE"; command = "chanserv/set/secure"; }
command { service = "ChanServ"; name = "SET SECUREFOUNDER"; command = "chanserv/set/securefounder"; }
command { service = "ChanServ"; name = "SET SECUREOPS"; command = "chanserv/set/secureops"; }
command { service = "ChanServ"; name = "SET SIGNKICK"; command = "chanserv/set/signkick"; }
command { service = "ChanServ"; name = "SET SUCCESSOR"; command = "chanserv/set/successor"; }
command { service = "ChanServ"; name = "SET NOEXPIRE"; command = "chanserv/saset/noexpire"; permission = "chanserv/saset/noexpire"; }
command { service = "ChanServ"; name = "SET"; command = "chanserv/set"; group = "chanserv/management" }
command { service = "ChanServ"; name = "SET AUTOOP"; command = "chanserv/set/autoop" }
command { service = "ChanServ"; name = "SET BANTYPE"; command = "chanserv/set/bantype" }
command { service = "ChanServ"; name = "SET DESCRIPTION"; command = "chanserv/set/description" }
command { service = "ChanServ"; name = "SET DESC"; command = "chanserv/set/description"; hide = yes }
command { service = "ChanServ"; name = "SET FOUNDER"; command = "chanserv/set/founder" }
command { service = "ChanServ"; name = "SET KEEPMODES"; command = "chanserv/set/keepmodes" }
command { service = "ChanServ"; name = "SET NOEXPIRE"; command = "chanserv/saset/noexpire"; permission = "chanserv/saset/noexpire" }
command { service = "ChanServ"; name = "SET PEACE"; command = "chanserv/set/peace" }
command { service = "ChanServ"; name = "SET PERSIST"; command = "chanserv/set/persist" }
command { service = "ChanServ"; name = "SET RESTRICTED"; command = "chanserv/set/restricted" }
command { service = "ChanServ"; name = "SET SECUREFOUNDER"; command = "chanserv/set/securefounder" }
command { service = "ChanServ"; name = "SET SECUREOPS"; command = "chanserv/set/secureops" }
command { service = "ChanServ"; name = "SET SIGNKICK"; command = "chanserv/set/signkick" }
command { service = "ChanServ"; name = "SET SUCCESSOR"; command = "chanserv/set/successor" }
/*
* cs_set_misc
*
* Provides the command chanserv/set/misc.
*
* Allows you to create arbitrary commands to set data, and have that data show up in chanserv/info.
* A field named misc_description may be given for use with help output.
* Allows you to create arbitrary commands to set data, and have that data show
* up in chanserv/info. You can configure this using the following fields:
*
* misc_description: A description of the command to show in the help.
* misc_title: A human-readable description of the stored data.
* misc_numeric: If defined then the numeric (in the range 1-999) to send the
* data to users with when they join the channel.
* misc_pattern: If defined then a regex pattern (using the engine specified
* in <options:regexengine> to validate the data with).
* misc_syntax: If defined then the syntax to show in the help output and, if
* misc_pattern is defined, when a user specifies an invalid
* value.
*/
module { name = "cs_set_misc" }
command { service = "ChanServ"; name = "SET URL"; command = "chanserv/set/misc"; misc_description = _("Associate a URL with the channel"); misc_numeric = 328; }
command { service = "ChanServ"; name = "SET EMAIL"; command = "chanserv/set/misc"; misc_description = _("Associate an email address with the channel"); }
command { service = "ChanServ"; name = "SET URL"; command = "chanserv/set/misc"; misc_description = _("Associate a URL with the channel"); misc_numeric = 328; misc_pattern = "^https?:\/\/\S+$" }
#command { service = "ChanServ"; name = "SET EMAIL"; command = "chanserv/set/misc"; misc_description = _("Associate an email address with the channel"); misc_pattern = "^\S+@\S.\S+$"; misc_title = _("Email address") }
/*
* cs_status
@@ -1263,8 +1295,8 @@ command { service = "ChanServ"; name = "SET EMAIL"; command = "chanserv/set/misc
* or not they match any autokick entries.
*/
module { name = "cs_status" }
command { service = "ChanServ"; name = "STATUS"; command = "chanserv/status"; }
command { service = "ChanServ"; name = "WHY"; command = "chanserv/status"; hide = yes; }
command { service = "ChanServ"; name = "STATUS"; command = "chanserv/status" }
command { service = "ChanServ"; name = "WHY"; command = "chanserv/status"; hide = yes }
/*
* cs_statusupdate
@@ -1291,7 +1323,7 @@ module
* This directive is optional.
* If not set, the default is never.
*/
suspendexpire = 90d
#suspendexpire = 90d
/*
* Settings to show to non-opers in ChanServ's INFO output.
@@ -1300,8 +1332,8 @@ module
*/
show = "suspended, by, reason, on, expires"
}
command { service = "ChanServ"; name = "SUSPEND"; command = "chanserv/suspend"; permission = "chanserv/suspend"; group = "chanserv/admin"; }
command { service = "ChanServ"; name = "UNSUSPEND"; command = "chanserv/unsuspend"; permission = "chanserv/suspend"; group = "chanserv/admin"; }
command { service = "ChanServ"; name = "SUSPEND"; command = "chanserv/suspend"; permission = "chanserv/suspend"; group = "chanserv/admin" }
command { service = "ChanServ"; name = "UNSUSPEND"; command = "chanserv/unsuspend"; permission = "chanserv/suspend"; group = "chanserv/admin" }
/*
* cs_sync
@@ -1311,7 +1343,7 @@ command { service = "ChanServ"; name = "UNSUSPEND"; command = "chanserv/unsuspen
* Used to sync users channel status modes with what access they have.
*/
module { name = "cs_sync" }
command { service = "ChanServ"; name = "SYNC"; command = "chanserv/sync"; group = "chanserv/management"; }
command { service = "ChanServ"; name = "SYNC"; command = "chanserv/sync"; group = "chanserv/management" }
/*
* cs_topic
@@ -1322,8 +1354,8 @@ command { service = "ChanServ"; name = "SYNC"; command = "chanserv/sync"; group
*
*/
module { name = "cs_topic" }
command { service = "ChanServ"; name = "TOPIC"; command = "chanserv/topic"; group = "chanserv/management"; }
command { service = "ChanServ"; name = "SET KEEPTOPIC"; command = "chanserv/set/keeptopic"; }
command { service = "ChanServ"; name = "TOPIC"; command = "chanserv/topic"; group = "chanserv/management" }
command { service = "ChanServ"; name = "SET KEEPTOPIC"; command = "chanserv/set/keeptopic" }
/*
* cs_unban
@@ -1333,7 +1365,7 @@ command { service = "ChanServ"; name = "SET KEEPTOPIC"; command = "chanserv/set/
* Used for unbanning users from channels.
*/
module { name = "cs_unban" }
command { service = "ChanServ"; name = "UNBAN"; command = "chanserv/unban"; group = "chanserv/management"; }
command { service = "ChanServ"; name = "UNBAN"; command = "chanserv/unban"; group = "chanserv/management" }
/*
* cs_updown
@@ -1343,8 +1375,8 @@ command { service = "ChanServ"; name = "UNBAN"; command = "chanserv/unban"; grou
* Used for setting or removing your status modes on a channel.
*/
module { name = "cs_updown" }
command { service = "ChanServ"; name = "DOWN"; command = "chanserv/down"; group = "chanserv/status"; }
command { service = "ChanServ"; name = "UP"; command = "chanserv/up"; group = "chanserv/status"; }
command { service = "ChanServ"; name = "DOWN"; command = "chanserv/down"; group = "chanserv/status" }
command { service = "ChanServ"; name = "UP"; command = "chanserv/up"; group = "chanserv/status" }
/*
* cs_xop
@@ -1361,8 +1393,8 @@ command { service = "ChanServ"; name = "UP"; command = "chanserv/up"; group = "c
* can not view the entire access list at once, and instead should use another access system to do that.
*/
module { name = "cs_xop" }
command { service = "ChanServ"; name = "QOP"; command = "chanserv/xop"; group = "chanserv/access"; }
command { service = "ChanServ"; name = "SOP"; command = "chanserv/xop"; group = "chanserv/access"; }
command { service = "ChanServ"; name = "AOP"; command = "chanserv/xop"; group = "chanserv/access"; }
command { service = "ChanServ"; name = "HOP"; command = "chanserv/xop"; group = "chanserv/access"; }
command { service = "ChanServ"; name = "VOP"; command = "chanserv/xop"; group = "chanserv/access"; }
command { service = "ChanServ"; name = "QOP"; command = "chanserv/xop"; group = "chanserv/access" }
command { service = "ChanServ"; name = "SOP"; command = "chanserv/xop"; group = "chanserv/access" }
command { service = "ChanServ"; name = "AOP"; command = "chanserv/xop"; group = "chanserv/access" }
command { service = "ChanServ"; name = "HOP"; command = "chanserv/xop"; group = "chanserv/access" }
command { service = "ChanServ"; name = "VOP"; command = "chanserv/xop"; group = "chanserv/access" }
+16 -16
View File
@@ -22,28 +22,28 @@ module
* An optional prefix to prepended to the name of each created table.
* Do not use the same prefix for other programs.
*/
prefix = "anope_"
#prefix = "chanstats21_"
smileyshappy = ":) :-) ;) ;-) :D :-D :P :-P"
smileyssad = ":( :-( ;( ;-("
smileysother = ":/ :-/"
}
command { service = "ChanServ"; name = "SET CHANSTATS"; command = "chanserv/set/chanstats"; }
command { service = "NickServ"; name = "SET CHANSTATS"; command = "nickserv/set/chanstats"; }
command { service = "NickServ"; name = "SASET CHANSTATS"; command = "nickserv/saset/chanstats"; permission = "nickserv/saset/chanstats"; }
command { service = "ChanServ"; name = "SET CHANSTATS"; command = "chanserv/set/chanstats" }
command { service = "NickServ"; name = "SET CHANSTATS"; command = "nickserv/set/chanstats" }
command { service = "NickServ"; name = "SASET CHANSTATS"; command = "nickserv/saset/chanstats"; permission = "nickserv/saset/chanstats" }
module { name = "cs_fantasy_stats" }
command { service = "ChanServ"; name = "STATS"; command = "chanserv/stats"; }
command { service = "ChanServ"; name = "GSTATS"; command = "chanserv/gstats"; }
fantasy { name = "STATS"; command = "chanserv/stats"; }
fantasy { name = "GSTATS"; command = "chanserv/gstats"; }
command { service = "ChanServ"; name = "STATS"; command = "chanserv/stats" }
command { service = "ChanServ"; name = "GSTATS"; command = "chanserv/gstats" }
fantasy { name = "STATS"; command = "chanserv/stats" }
fantasy { name = "GSTATS"; command = "chanserv/gstats" }
module { name = "cs_fantasy_top" }
command { service = "ChanServ"; name = "TOP"; command = "chanserv/top"; }
command { service = "ChanServ"; name = "TOP10"; command = "chanserv/top10"; }
command { service = "ChanServ"; name = "GTOP"; command = "chanserv/gtop"; }
command { service = "ChanServ"; name = "GTOP10"; command = "chanserv/gtop10"; }
fantasy { name = "TOP"; command = "chanserv/top"; }
fantasy { name = "TOP10"; command = "chanserv/top10"; }
fantasy { name = "GTOP"; command = "chanserv/gtop"; }
fantasy { name = "GTOP10"; command = "chanserv/gtop10"; }
command { service = "ChanServ"; name = "TOP"; command = "chanserv/top" }
command { service = "ChanServ"; name = "TOP10"; command = "chanserv/top10" }
command { service = "ChanServ"; name = "GTOP"; command = "chanserv/gtop" }
command { service = "ChanServ"; name = "GTOP10"; command = "chanserv/gtop10" }
fantasy { name = "TOP"; command = "chanserv/top" }
fantasy { name = "TOP10"; command = "chanserv/top10" }
fantasy { name = "GTOP"; command = "chanserv/gtop" }
fantasy { name = "GTOP10"; command = "chanserv/gtop10" }
+4 -4
View File
@@ -113,7 +113,7 @@ module
*/
/* Give it a help command. */
command { service = "Global"; name = "HELP"; command = "generic/help"; }
command { service = "Global"; name = "HELP"; command = "generic/help" }
/*
* gl_global
@@ -123,7 +123,7 @@ command { service = "Global"; name = "HELP"; command = "generic/help"; }
* Used for sending a message to every online user.
*/
module { name = "gl_global" }
command { service = "Global"; name = "GLOBAL"; command = "global/global"; permission = "global/global"; }
command { service = "Global"; name = "GLOBAL"; command = "global/global"; permission = "global/global" }
/*
* gl_queue
@@ -139,7 +139,7 @@ module
/* The maximum number of messages in a message queue. Defaults to 10. */
maxqueue = 10
}
command { service = "Global"; name = "QUEUE"; command = "global/queue"; permission = "global/queue"; }
command { service = "Global"; name = "QUEUE"; command = "global/queue"; permission = "global/queue" }
/*
* gl_server
@@ -149,4 +149,4 @@ command { service = "Global"; name = "QUEUE"; command = "global/queue"; permissi
* Used for sending a message to every online user on a server.
*/
module { name = "gl_server" }
command { service = "Global"; name = "SERVER"; command = "global/server"; permission = "global/server"; }
command { service = "Global"; name = "SERVER"; command = "global/server"; permission = "global/server" }
+33 -14
View File
@@ -99,7 +99,7 @@ module
*/
/* Give it a help command. */
command { service = "HostServ"; name = "HELP"; command = "generic/help"; }
command { service = "HostServ"; name = "HELP"; command = "generic/help" }
/*
* hs_del
@@ -109,8 +109,8 @@ command { service = "HostServ"; name = "HELP"; command = "generic/help"; }
* Used for removing users' vhosts.
*/
module { name = "hs_del" }
command { service = "HostServ"; name = "DEL"; command = "hostserv/del"; permission = "hostserv/del"; }
command { service = "HostServ"; name = "DELALL"; command = "hostserv/delall"; permission = "hostserv/del"; }
command { service = "HostServ"; name = "DEL"; command = "hostserv/del"; permission = "hostserv/del" }
command { service = "HostServ"; name = "DELALL"; command = "hostserv/delall"; permission = "hostserv/del" }
/*
* hs_group
@@ -133,7 +133,7 @@ module
*/
synconset = yes
}
command { service = "HostServ"; name = "GROUP"; command = "hostserv/group"; }
command { service = "HostServ"; name = "GROUP"; command = "hostserv/group" }
/*
* hs_list
@@ -143,7 +143,7 @@ command { service = "HostServ"; name = "GROUP"; command = "hostserv/group"; }
* Used for listing actively set vhosts.
*/
module { name = "hs_list" }
command { service = "HostServ"; name = "LIST"; command = "hostserv/list"; permission = "hostserv/list"; }
command { service = "HostServ"; name = "LIST"; command = "hostserv/list"; permission = "hostserv/list" }
/*
* hs_off
@@ -153,7 +153,26 @@ command { service = "HostServ"; name = "LIST"; command = "hostserv/list"; permis
* Used for turning off your vhost.
*/
module { name = "hs_off" }
command { service = "HostServ"; name = "OFF"; command = "hostserv/off"; }
command { service = "HostServ"; name = "OFF"; command = "hostserv/off" }
/*
* hs_offfer
*
* Provides the commands hostserv/offfer and hostserv/offerlist.
*
* Used to offer specialized vhosts to users, with template variables available.
*/
module
{
name = "hs_offer"
/*
* How long after a vhost is applied can another vhost be taken.
*/
takedelay = 7d
}
command { service = "HostServ"; name = "OFFER"; command = "hostserv/offer"; permission = "hostserv/offer" }
command { service = "HostServ"; name = "OFFERLIST"; command = "hostserv/offerlist" }
/*
* hs_on
@@ -163,7 +182,7 @@ command { service = "HostServ"; name = "OFF"; command = "hostserv/off"; }
* Used for turning on your vhost.
*/
module { name = "hs_on" }
command { service = "HostServ"; name = "ON"; command = "hostserv/on"; }
command { service = "HostServ"; name = "ON"; command = "hostserv/on" }
/*
* hs_request
@@ -205,11 +224,11 @@ module
*/
#validationrecord = "anope-dns-validation"
}
command { service = "HostServ"; name = "REQUEST"; command = "hostserv/request"; }
command { service = "HostServ"; name = "ACTIVATE"; command = "hostserv/activate"; permission = "hostserv/set"; }
command { service = "HostServ"; name = "REJECT"; command = "hostserv/reject"; permission = "hostserv/set"; }
command { service = "HostServ"; name = "WAITING"; command = "hostserv/waiting"; permission = "hostserv/set"; }
#command { service = "HostServ"; name = "VALIDATE"; command = "hostserv/validate"; }
command { service = "HostServ"; name = "REQUEST"; command = "hostserv/request" }
command { service = "HostServ"; name = "ACTIVATE"; command = "hostserv/activate"; permission = "hostserv/set" }
command { service = "HostServ"; name = "REJECT"; command = "hostserv/reject"; permission = "hostserv/set" }
command { service = "HostServ"; name = "WAITING"; command = "hostserv/waiting"; permission = "hostserv/set" }
#command { service = "HostServ"; name = "VALIDATE"; command = "hostserv/validate" }
/*
* hs_set
@@ -219,5 +238,5 @@ command { service = "HostServ"; name = "WAITING"; command = "hostserv/waiting";
* Used for setting users' vhosts.
*/
module { name = "hs_set" }
command { service = "HostServ"; name = "SET"; command = "hostserv/set"; permission = "hostserv/set"; }
command { service = "HostServ"; name = "SETALL"; command = "hostserv/setall"; permission = "hostserv/set"; }
command { service = "HostServ"; name = "SET"; command = "hostserv/set"; permission = "hostserv/set" }
command { service = "HostServ"; name = "SETALL"; command = "hostserv/setall"; permission = "hostserv/set" }
+13 -13
View File
@@ -108,7 +108,7 @@ module
*/
/* Give it a help command. */
command { service = "MemoServ"; name = "HELP"; command = "generic/help"; }
command { service = "MemoServ"; name = "HELP"; command = "generic/help" }
/*
* ms_cancel
@@ -118,7 +118,7 @@ command { service = "MemoServ"; name = "HELP"; command = "generic/help"; }
* Used to cancel memos already sent but not yet read.
*/
module { name = "ms_cancel" }
command { service = "MemoServ"; name = "CANCEL"; command = "memoserv/cancel"; }
command { service = "MemoServ"; name = "CANCEL"; command = "memoserv/cancel" }
/*
* ms_check
@@ -128,7 +128,7 @@ command { service = "MemoServ"; name = "CANCEL"; command = "memoserv/cancel"; }
* Used to check if a sent memo has been read.
*/
module { name = "ms_check" }
command { service = "MemoServ"; name = "CHECK"; command = "memoserv/check"; }
command { service = "MemoServ"; name = "CHECK"; command = "memoserv/check" }
/*
* ms_del
@@ -138,7 +138,7 @@ command { service = "MemoServ"; name = "CHECK"; command = "memoserv/check"; }
* Used to delete your memos.
*/
module { name = "ms_del" }
command { service = "MemoServ"; name = "DEL"; command = "memoserv/del"; }
command { service = "MemoServ"; name = "DEL"; command = "memoserv/del" }
/*
* ms_ignore
@@ -158,7 +158,7 @@ module
*/
max = 50
}
command { service = "MemoServ"; name = "IGNORE"; command = "memoserv/ignore"; }
command { service = "MemoServ"; name = "IGNORE"; command = "memoserv/ignore" }
/*
* ms_info
@@ -168,7 +168,7 @@ command { service = "MemoServ"; name = "IGNORE"; command = "memoserv/ignore"; }
* Used to show memo related information about an account or a channel.
*/
module { name = "ms_info" }
command { service = "MemoServ"; name = "INFO"; command = "memoserv/info"; }
command { service = "MemoServ"; name = "INFO"; command = "memoserv/info" }
/*
* ms_list
@@ -178,7 +178,7 @@ command { service = "MemoServ"; name = "INFO"; command = "memoserv/info"; }
* Used to list your current memos.
*/
module { name = "ms_list" }
command { service = "MemoServ"; name = "LIST"; command = "memoserv/list"; }
command { service = "MemoServ"; name = "LIST"; command = "memoserv/list" }
/*
* ms_read
@@ -188,7 +188,7 @@ command { service = "MemoServ"; name = "LIST"; command = "memoserv/list"; }
* Used to read your memos.
*/
module { name = "ms_read" }
command { service = "MemoServ"; name = "READ"; command = "memoserv/read"; }
command { service = "MemoServ"; name = "READ"; command = "memoserv/read" }
/*
* ms_rsend
@@ -208,7 +208,7 @@ command { service = "MemoServ"; name = "READ"; command = "memoserv/read"; }
*/
operonly = no
}
#command { service = "MemoServ"; name = "RSEND"; command = "memoserv/rsend"; }
#command { service = "MemoServ"; name = "RSEND"; command = "memoserv/rsend" }
/*
* ms_send
@@ -218,7 +218,7 @@ command { service = "MemoServ"; name = "READ"; command = "memoserv/read"; }
* Used to send memos.
*/
module { name = "ms_send" }
command { service = "MemoServ"; name = "SEND"; command = "memoserv/send"; }
command { service = "MemoServ"; name = "SEND"; command = "memoserv/send" }
/*
* ms_sendall
@@ -228,7 +228,7 @@ command { service = "MemoServ"; name = "SEND"; command = "memoserv/send"; }
* Used to send a mass memo to every registered user.
*/
module { name = "ms_sendall" }
command { service = "MemoServ"; name = "SENDALL"; command = "memoserv/sendall"; permission = "memoserv/sendall"; }
command { service = "MemoServ"; name = "SENDALL"; command = "memoserv/sendall"; permission = "memoserv/sendall" }
/*
* ms_set
@@ -238,7 +238,7 @@ command { service = "MemoServ"; name = "SENDALL"; command = "memoserv/sendall";
* Used to set settings such as how you are notified of new memos, and your memo limit.
*/
module { name = "ms_set" }
command { service = "MemoServ"; name = "SET"; command = "memoserv/set"; }
command { service = "MemoServ"; name = "SET"; command = "memoserv/set" }
/*
* ms_staff
@@ -248,4 +248,4 @@ command { service = "MemoServ"; name = "SET"; command = "memoserv/set"; }
* Used to send a memo to all registered staff members.
*/
module { name = "ms_staff" }
command { service = "MemoServ"; name = "STAFF"; command = "memoserv/staff"; permission = "memoserv/staff"; }
command { service = "MemoServ"; name = "STAFF"; command = "memoserv/staff"; permission = "memoserv/staff" }
-24
View File
@@ -374,30 +374,6 @@ module { name = "help" }
}
}
/*
* redis
*
* This module allows other modules to use Redis.
*/
#module
{
name = "redis"
/* A redis database */
redis
{
/* The name of this service */
name = "redis/main"
/*
* The redis database to use. New connections default to 0.
*/
db = 0
ip = "127.0.0.1"
port = 6379
}
}
/*
* [EXTRA] regex_pcre2
+107 -72
View File
@@ -113,6 +113,7 @@ module
* - memo_signon: Notify user if they have a new memo when they sign into the nick
* - memo_receive: Notify user if they have a new memo as soon as it's received
* - memo_mail: Notify user if they have a new memo by mail
* - autologin: User will be automatically logged in when they connect with a known SSL cert.
* - autoop: User will be automatically opped in channels they enter and have access to
* - neverop: User can not be added to access lists
* - msg: Messages will be sent as PRIVMSGs instead of NOTICEs
@@ -127,9 +128,9 @@ module
/*
* The minimum length of time between consecutive uses of NickServ's REGISTER command. This
* directive is optional, but recommended. If not set, this restriction will be disabled.
* directive is optional, but recommended. If not set, it defaults to 15 minutes.
*/
regdelay = 5m
regdelay = 15m
/*
* The length of time before a nick's registration expires.
@@ -280,7 +281,7 @@ command_group
}
/* Give it a help command. */
command { service = "NickServ"; name = "HELP"; command = "generic/help"; }
command { service = "NickServ"; name = "HELP"; command = "generic/help" }
/*
* ns_ajoin
@@ -298,7 +299,7 @@ module
*/
ajoinmax = 10
}
command { service = "NickServ"; name = "AJOIN"; command = "nickserv/ajoin"; }
command { service = "NickServ"; name = "AJOIN"; command = "nickserv/ajoin" }
/*
* ns_alist
@@ -308,8 +309,8 @@ command { service = "NickServ"; name = "AJOIN"; command = "nickserv/ajoin"; }
* Used for viewing what channels you have access to.
*/
module { name = "ns_alist" }
command { service = "NickServ"; name = "ALIST"; command = "nickserv/alist"; }
command { service = "NickServ"; name = "ACCESS"; command = "nickserv/alist"; hide = yes; }
command { service = "NickServ"; name = "ALIST"; command = "nickserv/alist" }
command { service = "NickServ"; name = "ACCESS"; command = "nickserv/alist"; hide = yes }
/*
* ns_cert
@@ -334,7 +335,10 @@ module
*/
max = 5
}
command { service = "NickServ"; name = "CERT"; command = "nickserv/cert"; }
command { service = "NickServ"; name = "CERT"; command = "nickserv/cert" }
command { service = "NickServ"; name = "SET AUTOLOGIN"; command = "nickserv/set/autologin" }
command { service = "NickServ"; name = "SASET AUTOLOGIN"; command = "nickserv/saset/autologin"; permission = "nickserv/saset/autologin" }
/*
* ns_confirm
@@ -344,7 +348,7 @@ command { service = "NickServ"; name = "CERT"; command = "nickserv/cert"; }
* Used for confirming previous account actions.
*/
module { name = "ns_confirm" }
command { service = "NickServ"; name = "CONFIRM"; command = "nickserv/confirm"; }
command { service = "NickServ"; name = "CONFIRM"; command = "nickserv/confirm" }
/*
* ns_drop
@@ -354,7 +358,7 @@ command { service = "NickServ"; name = "CONFIRM"; command = "nickserv/confirm";
* Used for unregistering names.
*/
module { name = "ns_drop" }
command { service = "NickServ"; name = "DROP"; command = "nickserv/drop"; }
command { service = "NickServ"; name = "DROP"; command = "nickserv/drop" }
/*
* ns_email
@@ -391,10 +395,10 @@ module
*/
#remove_aliases = yes
}
command { service = "NickServ"; name = "CONFIRM EMAIL"; command = "nickserv/confirm/email"; }
command { service = "NickServ"; name = "GETEMAIL"; command = "nickserv/getemail"; permission = "nickserv/getemail"; group = "nickserv/admin"; }
command { service = "NickServ"; name = "SET EMAIL"; command = "nickserv/set/email"; }
command { service = "NickServ"; name = "SASET EMAIL"; command = "nickserv/saset/email"; permission = "nickserv/saset/email"; }
command { service = "NickServ"; name = "CONFIRM EMAIL"; command = "nickserv/confirm/email" }
command { service = "NickServ"; name = "GETEMAIL"; command = "nickserv/getemail"; permission = "nickserv/getemail"; group = "nickserv/admin" }
command { service = "NickServ"; name = "SET EMAIL"; command = "nickserv/set/email" }
command { service = "NickServ"; name = "SASET EMAIL"; command = "nickserv/saset/email"; permission = "nickserv/saset/email" }
/*
* ns_group
@@ -412,6 +416,12 @@ module
{
name = "ns_group"
/*
* The minimum length of time between consecutive uses of the GROUP command. This directive is
* optional, but recommended. If not set, it defaults to 5 minutes.
*/
delay = 5m
/*
* The maximum number of nicks allowed in a group.
*
@@ -428,15 +438,15 @@ module
*/
nogroupchange = yes
}
command { service = "NickServ"; name = "GLIST"; command = "nickserv/glist"; }
command { service = "NickServ"; name = "GROUP"; command = "nickserv/group"; }
command { service = "NickServ"; name = "UNGROUP"; command = "nickserv/ungroup"; }
command { service = "NickServ"; name = "SET DISPLAY"; command = "nickserv/set/display"; }
command { service = "NickServ"; name = "SASET DISPLAY"; command = "nickserv/saset/display"; permission = "nickserv/saset/display"; }
command { service = "NickServ"; name = "GLIST"; command = "nickserv/glist" }
command { service = "NickServ"; name = "GROUP"; command = "nickserv/group" }
command { service = "NickServ"; name = "UNGROUP"; command = "nickserv/ungroup" }
command { service = "NickServ"; name = "SET DISPLAY"; command = "nickserv/set/display" }
command { service = "NickServ"; name = "SASET DISPLAY"; command = "nickserv/saset/display"; permission = "nickserv/saset/display" }
# For compatibility with Atheme.
command { service = "NickServ"; name = "SET ACCOUNTNAME"; command = "nickserv/set/display"; hide = yes; }
command { service = "NickServ"; name = "SASET ACCOUNTNAME"; command = "nickserv/saset/display"; permission = "nickserv/saset/display"; hide = yes; }
command { service = "NickServ"; name = "SET ACCOUNTNAME"; command = "nickserv/set/display"; hide = yes }
command { service = "NickServ"; name = "SASET ACCOUNTNAME"; command = "nickserv/saset/display"; permission = "nickserv/saset/display"; hide = yes }
/*
* ns_identify
@@ -454,8 +464,8 @@ module
*/
maxlogins = 10
}
command { service = "NickServ"; name = "ID"; command = "nickserv/identify"; hide = yes; }
command { service = "NickServ"; name = "IDENTIFY"; command = "nickserv/identify"; }
command { service = "NickServ"; name = "ID"; command = "nickserv/identify"; hide = yes }
command { service = "NickServ"; name = "IDENTIFY"; command = "nickserv/identify" }
/*
* ns_info
@@ -466,10 +476,10 @@ command { service = "NickServ"; name = "IDENTIFY"; command = "nickserv/identify"
*
*/
module { name = "ns_info" }
command { service = "NickServ"; name = "INFO"; command = "nickserv/info"; }
command { service = "NickServ"; name = "INFO"; command = "nickserv/info" }
command { service = "NickServ"; name = "SET HIDE"; command = "nickserv/set/hide"; }
command { service = "NickServ"; name = "SASET HIDE"; command = "nickserv/saset/hide"; permission = "nickserv/saset/hide"; }
command { service = "NickServ"; name = "SET HIDE"; command = "nickserv/set/hide" }
command { service = "NickServ"; name = "SASET HIDE"; command = "nickserv/saset/hide"; permission = "nickserv/saset/hide" }
/*
* ns_list
@@ -488,9 +498,9 @@ module
*/
listmax = 50
}
command { service = "NickServ"; name = "LIST"; command = "nickserv/list"; }
command { service = "NickServ"; name = "SET PRIVATE"; command = "nickserv/set/private"; }
command { service = "NickServ"; name = "SASET PRIVATE"; command = "nickserv/saset/private"; permission = "nickserv/saset/private"; }
command { service = "NickServ"; name = "LIST"; command = "nickserv/list" }
command { service = "NickServ"; name = "SET PRIVATE"; command = "nickserv/set/private" }
command { service = "NickServ"; name = "SASET PRIVATE"; command = "nickserv/saset/private"; permission = "nickserv/saset/private" }
/*
* ns_logout
@@ -500,7 +510,7 @@ command { service = "NickServ"; name = "SASET PRIVATE"; command = "nickserv/sase
* Used for logging out of your account.
*/
module { name = "ns_logout" }
command { service = "NickServ"; name = "LOGOUT"; command = "nickserv/logout"; }
command { service = "NickServ"; name = "LOGOUT"; command = "nickserv/logout" }
/*
* ns_recover
@@ -521,11 +531,11 @@ module
*/
restoreonrecover = yes
}
command { service = "NickServ"; name = "RECOVER"; command = "nickserv/recover"; }
command { service = "NickServ"; name = "RECOVER"; command = "nickserv/recover" }
# For compatibility with Anope 1.8 and Atheme.
command { service = "NickServ"; name = "GHOST"; command = "nickserv/recover"; hide = yes; }
command { service = "NickServ"; name = "RELEASE"; command = "nickserv/recover"; hide = yes; }
command { service = "NickServ"; name = "GHOST"; command = "nickserv/recover"; hide = yes }
command { service = "NickServ"; name = "RELEASE"; command = "nickserv/recover"; hide = yes }
/*
* ns_register
@@ -570,9 +580,9 @@ module
*/
#unconfirmedexpire = 1d
}
command { service = "NickServ"; name = "CONFIRM REGISTER"; command = "nickserv/confirm/register"; }
command { service = "NickServ"; name = "REGISTER"; command = "nickserv/register"; }
command { service = "NickServ"; name = "RESEND"; command = "nickserv/resend"; }
command { service = "NickServ"; name = "CONFIRM REGISTER"; command = "nickserv/confirm/register" }
command { service = "NickServ"; name = "REGISTER"; command = "nickserv/register" }
command { service = "NickServ"; name = "RESEND"; command = "nickserv/resend" }
/*
* ns_resetpass
@@ -591,11 +601,11 @@ module
*/
#resetexpire = 1d
}
command { service = "NickServ"; name = "CONFIRM RESETPASS"; command = "nickserv/confirm/resetpass"; }
command { service = "NickServ"; name = "RESETPASS"; command = "nickserv/resetpass"; }
command { service = "NickServ"; name = "CONFIRM RESETPASS"; command = "nickserv/confirm/resetpass" }
command { service = "NickServ"; name = "RESETPASS"; command = "nickserv/resetpass" }
# For compatibility with Anope 2.0.
command { service = "NickServ"; name = "GETPASS"; command = "nickserv/resetpass"; hide = yes; }
command { service = "NickServ"; name = "GETPASS"; command = "nickserv/resetpass"; hide = yes }
/*
* ns_sasl
@@ -661,13 +671,13 @@ module { name = "ns_sasl_plain" }
*/
module { name = "ns_set" }
command { service = "NickServ"; name = "SET"; command = "nickserv/set"; }
command { service = "NickServ"; name = "SASET"; command = "nickserv/saset"; permission = "nickserv/saset/"; group = "nickserv/admin"; }
command { service = "NickServ"; name = "SET"; command = "nickserv/set" }
command { service = "NickServ"; name = "SASET"; command = "nickserv/saset"; permission = "nickserv/saset/"; group = "nickserv/admin" }
command { service = "NickServ"; name = "SET PASSWORD"; command = "nickserv/set/password"; }
command { service = "NickServ"; name = "SASET PASSWORD"; command = "nickserv/saset/password"; permission = "nickserv/saset/password"; }
command { service = "NickServ"; name = "SET PASSWORD"; command = "nickserv/set/password" }
command { service = "NickServ"; name = "SASET PASSWORD"; command = "nickserv/saset/password"; permission = "nickserv/saset/password" }
command { service = "NickServ"; name = "SASET NOEXPIRE"; command = "nickserv/saset/noexpire"; permission = "nickserv/saset/noexpire"; }
command { service = "NickServ"; name = "SASET NOEXPIRE"; command = "nickserv/saset/noexpire"; permission = "nickserv/saset/noexpire" }
/*
* ns_set_keepmodes
@@ -687,8 +697,8 @@ module
*/
#norestore = "ABCabc"
}
command { service = "NickServ"; name = "SET KEEPMODES"; command = "nickserv/set/keepmodes"; }
command { service = "NickServ"; name = "SASET KEEPMODES"; command = "nickserv/saset/keepmodes"; permission = "nickserv/saset/keepmodes"; }
command { service = "NickServ"; name = "SET KEEPMODES"; command = "nickserv/set/keepmodes" }
command { service = "NickServ"; name = "SASET KEEPMODES"; command = "nickserv/saset/keepmodes"; permission = "nickserv/saset/keepmodes" }
/*
* ns_set_language
@@ -698,8 +708,8 @@ command { service = "NickServ"; name = "SASET KEEPMODES"; command = "nickserv/sa
* Allows configuring the language that services uses.
*/
module { name = "ns_set_language" }
command { service = "NickServ"; name = "SET LANGUAGE"; command = "nickserv/set/language"; }
command { service = "NickServ"; name = "SASET LANGUAGE"; command = "nickserv/saset/language"; permission = "nickserv/saset/language"; }
command { service = "NickServ"; name = "SET LANGUAGE"; command = "nickserv/set/language" }
command { service = "NickServ"; name = "SASET LANGUAGE"; command = "nickserv/saset/language"; permission = "nickserv/saset/language" }
/*
* ns_set_layout
@@ -709,8 +719,8 @@ command { service = "NickServ"; name = "SASET LANGUAGE"; command = "nickserv/sas
* Allows configuring the layout that services uses.
*/
module { name = "ns_set_layout" }
command { service = "NickServ"; name = "SET LAYOUT"; command = "nickserv/set/layout"; }
command { service = "NickServ"; name = "SASET LAYOUT"; command = "nickserv/saset/layout"; permission = "nickserv/saset/layout"; }
command { service = "NickServ"; name = "SET LAYOUT"; command = "nickserv/set/layout" }
command { service = "NickServ"; name = "SASET LAYOUT"; command = "nickserv/saset/layout"; permission = "nickserv/saset/layout" }
/*
* ns_set_message
@@ -724,24 +734,38 @@ command { service = "NickServ"; name = "SASET LAYOUT"; command = "nickserv/saset
* message loops. Only enable this if you are sure this can not happen.
*/
#module { name = "ns_set_message" }
#command { service = "NickServ"; name = "SET MESSAGE"; command = "nickserv/set/message"; }
#command { service = "NickServ"; name = "SASET MESSAGE"; command = "nickserv/saset/message"; permission = "nickserv/saset/message"; }
#command { service = "NickServ"; name = "SET MESSAGE"; command = "nickserv/set/message" }
#command { service = "NickServ"; name = "SASET MESSAGE"; command = "nickserv/saset/message"; permission = "nickserv/saset/message" }
/*
* ns_set_misc
*
* Provides the command nickserv/set/misc.
*
* Allows you to create arbitrary commands to set data, and have that data show up in nickserv/info.
* A field named misc_description may be given for use with help output.
* Allows you to create arbitrary commands to set data, and have that data show
* up in nickserv/info. You can configure this using the following fields:
*
* misc_description: A description of the command to show in the help.
* misc_title: A human-readable description of the stored data.
* misc_priority: Positive integer representing display order in nickserv/info
* and (if enabled) WHOIS output. Entries with unspecified
* priority will be prioritized in the order of declaration.
* misc_pattern: If defined then a regex pattern (using the engine specified
* in <options:regexengine> to validate the data with).
* misc_syntax: If defined then the syntax to show in the help output and, if
* misc_pattern is defined, when a user specifies an invalid
* value.
* misc_swhois: Whether to also show the data in the WHOIS output of logged
* in users. Requires that your IRCd supports multiple swhois
entries.
*/
module { name = "ns_set_misc" }
command { service = "NickServ"; name = "SET URL"; command = "nickserv/set/misc"; misc_description = _("Associate a URL with your account"); }
command { service = "NickServ"; name = "SASET URL"; command = "nickserv/saset/misc"; misc_description = _("Associate a URL with this account"); permission = "nickserv/saset/url"; group = "nickserv/admin"; }
#command { service = "NickServ"; name = "SET MASTODON"; command = "nickserv/set/misc"; misc_description = _("Associate a Mastodon account with your account"); }
#command { service = "NickServ"; name = "SASET MASTODON"; command = "nickserv/saset/misc"; misc_description = _("Associate a Mastodon account with this account"); permission = "nickserv/saset/mastodon"; group = "nickserv/admin"; }
#command { service = "NickServ"; name = "SET LOCATION"; command = "nickserv/set/misc"; misc_description = _("Associate a location with your account"); }
#command { service = "NickServ"; name = "SASET LOCATION"; command = "nickserv/saset/misc"; misc_description = _("Associate a location with this account"); permission = "nickserv/saset/location"; group = "nickserv/admin"; }
command { service = "NickServ"; name = "SET URL"; command = "nickserv/set/misc"; misc_description = _("Associate a URL with your account"); misc_pattern = "^https?:\/\/\S+$"; misc_swhois = yes }
command { service = "NickServ"; name = "SASET URL"; command = "nickserv/saset/misc"; misc_description = _("Associate a URL with this account"); permission = "nickserv/saset/url"; group = "nickserv/admin" }
#command { service = "NickServ"; name = "SET MASTODON"; command = "nickserv/set/misc"; misc_description = _("Associate a Mastodon account with your account"); misc_pattern = "^@\S+@\S+\.\S+$"; misc_title = _("Mastodon") }
#command { service = "NickServ"; name = "SASET MASTODON"; command = "nickserv/saset/misc"; misc_description = _("Associate a Mastodon account with this account"); permission = "nickserv/saset/mastodon"; group = "nickserv/admin" }
#command { service = "NickServ"; name = "SET LOCATION"; command = "nickserv/set/misc"; misc_description = _("Associate a location with your account"); misc_title = _("Location") }
#command { service = "NickServ"; name = "SASET LOCATION"; command = "nickserv/saset/misc"; misc_description = _("Associate a location with this account"); permission = "nickserv/saset/location"; group = "nickserv/admin" }
/*
* ns_set_op
@@ -752,15 +776,15 @@ command { service = "NickServ"; name = "SASET URL"; command = "nickserv/saset/mi
*/
module { name = "ns_set_op" }
command { service = "NickServ"; name = "SET AUTOOP"; command = "nickserv/set/autoop"; }
command { service = "NickServ"; name = "SASET AUTOOP"; command = "nickserv/saset/autoop"; permission = "nickserv/saset/autoop"; }
command { service = "NickServ"; name = "SET AUTOOP"; command = "nickserv/set/autoop" }
command { service = "NickServ"; name = "SASET AUTOOP"; command = "nickserv/saset/autoop"; permission = "nickserv/saset/autoop" }
command { service = "NickServ"; name = "SET NEVEROP"; command = "nickserv/set/neverop"; }
command { service = "NickServ"; name = "SASET NEVEROP"; command = "nickserv/saset/neverop"; permission = "nickserv/saset/neverop"; }
command { service = "NickServ"; name = "SET NEVEROP"; command = "nickserv/set/neverop" }
command { service = "NickServ"; name = "SASET NEVEROP"; command = "nickserv/saset/neverop"; permission = "nickserv/saset/neverop" }
# For compatibility with DALnet Services.
command { service = "NickServ"; name = "SET NOOP"; command = "nickserv/set/neverop"; hide = yes; }
command { service = "NickServ"; name = "SASET NOOP"; command = "nickserv/saset/neverop"; permission = "nickserv/saset/neverop"; hide = yes; }
command { service = "NickServ"; name = "SET NOOP"; command = "nickserv/set/neverop"; hide = yes }
command { service = "NickServ"; name = "SASET NOOP"; command = "nickserv/saset/neverop"; permission = "nickserv/saset/neverop"; hide = yes }
/*
* ns_set_protect
@@ -770,12 +794,23 @@ command { service = "NickServ"; name = "SASET NOOP"; command = "nickserv/saset/n
* Used for configuring nickname protection.
*/
module { name = "ns_set_protect" }
command { service = "NickServ"; name = "SET PROTECT"; command = "nickserv/set/protect"; }
command { service = "NickServ"; name = "SASET PROTECT"; command = "nickserv/saset/protect"; permission = "nickserv/saset/protect"; }
command { service = "NickServ"; name = "SET PROTECT"; command = "nickserv/set/protect" }
command { service = "NickServ"; name = "SASET PROTECT"; command = "nickserv/saset/protect"; permission = "nickserv/saset/protect" }
# For compatibility with Anope 2.0.
command { service = "NickServ"; name = "SET KILL"; command = "nickserv/set/protect"; hide = yes; }
command { service = "NickServ"; name = "SASET KILL"; command = "nickserv/saset/protect"; permission = "nickserv/saset/protect"; hide = yes; }
command { service = "NickServ"; name = "SET KILL"; command = "nickserv/set/protect"; hide = yes }
command { service = "NickServ"; name = "SASET KILL"; command = "nickserv/saset/protect"; permission = "nickserv/saset/protect"; hide = yes }
/*
* ns_set_timezone
*
* Provides the command nickserv/set/timezone and nickserv/saset/timezone.
*
* Allows configuring the timezone that services uses.
*/
module { name = "ns_set_timezone" }
command { service = "NickServ"; name = "SET TIMEZONE"; command = "nickserv/set/timezone" }
command { service = "NickServ"; name = "SASET TIMEZONE"; command = "nickserv/saset/timezone"; permission = "nickserv/saset/timezone" }
/*
* ns_suspend
@@ -802,8 +837,8 @@ module
*/
show = "suspended, by, reason, on, expires"
}
command { service = "NickServ"; name = "SUSPEND"; command = "nickserv/suspend"; permission = "nickserv/suspend"; group = "nickserv/admin"; }
command { service = "NickServ"; name = "UNSUSPEND"; command = "nickserv/unsuspend"; permission = "nickserv/suspend"; group = "nickserv/admin"; }
command { service = "NickServ"; name = "SUSPEND"; command = "nickserv/suspend"; permission = "nickserv/suspend"; group = "nickserv/admin" }
command { service = "NickServ"; name = "UNSUSPEND"; command = "nickserv/unsuspend"; permission = "nickserv/suspend"; group = "nickserv/admin" }
/*
* ns_update
@@ -813,4 +848,4 @@ command { service = "NickServ"; name = "UNSUSPEND"; command = "nickserv/unsuspen
* Used to update your status on all channels, turn on your vhost, etc.
*/
module { name = "ns_update" }
command { service = "NickServ"; name = "UPDATE"; command = "nickserv/update"; }
command { service = "NickServ"; name = "UPDATE"; command = "nickserv/update" }
+73 -46
View File
@@ -143,7 +143,7 @@ module
*/
/* Give it a help command. */
command { service = "OperServ"; name = "HELP"; command = "generic/help"; }
command { service = "OperServ"; name = "HELP"; command = "generic/help" }
/*
* os_akill
@@ -153,7 +153,7 @@ command { service = "OperServ"; name = "HELP"; command = "generic/help"; }
* Used to ban users from the network.
*/
module { name = "os_akill" }
command { service = "OperServ"; name = "AKILL"; command = "operserv/akill"; permission = "operserv/akill"; }
command { service = "OperServ"; name = "AKILL"; command = "operserv/akill"; permission = "operserv/akill" }
/*
* os_chankill
@@ -163,7 +163,7 @@ command { service = "OperServ"; name = "AKILL"; command = "operserv/akill"; perm
* Used to akill users from an entire channel.
*/
module { name = "os_chankill" }
command { service = "OperServ"; name = "CHANKILL"; command = "operserv/chankill"; permission = "operserv/chankill"; }
command { service = "OperServ"; name = "CHANKILL"; command = "operserv/chankill"; permission = "operserv/chankill" }
/*
* os_defcon
@@ -271,7 +271,7 @@ command { service = "OperServ"; name = "CHANKILL"; command = "operserv/chankill"
*/
#akillreason = "This network is currently not accepting connections, please try again later."
}
#command { service = "OperServ"; name = "DEFCON"; command = "operserv/defcon"; permission = "operserv/defcon"; }
#command { service = "OperServ"; name = "DEFCON"; command = "operserv/defcon"; permission = "operserv/defcon" }
/*
* os_dns
@@ -292,10 +292,10 @@ command { service = "OperServ"; name = "CHANKILL"; command = "operserv/chankill"
*
* To do this using BIND, configure similar to:
*
* options { max-refresh-time 60; };
* options { max-refresh-time 60 };
* zone "irc.example.com" IN {
* type secondary;
* primaries { 127.0.0.1 port 5353; };
* primaries { 127.0.0.1 port 5353 };
* };
*
* Where 127.0.0.1:5353 is the IP and port services are listening on.
@@ -332,7 +332,7 @@ command { service = "OperServ"; name = "CHANKILL"; command = "operserv/chankill"
*/
readd_connected_servers = no
}
#command { service = "OperServ"; name = "DNS"; command = "operserv/dns"; permission = "operserv/dns"; }
#command { service = "OperServ"; name = "DNS"; command = "operserv/dns"; permission = "operserv/dns" }
/*
* os_config
@@ -342,7 +342,7 @@ command { service = "OperServ"; name = "CHANKILL"; command = "operserv/chankill"
* Used to view and set configuration options while services are running.
*/
module { name = "os_config" }
command { service = "OperServ"; name = "CONFIG"; command = "operserv/config"; permission = "operserv/config"; }
command { service = "OperServ"; name = "CONFIG"; command = "operserv/config"; permission = "operserv/config" }
/*
* os_forbid
@@ -351,8 +351,35 @@ command { service = "OperServ"; name = "CONFIG"; command = "operserv/config"; pe
*
* Used to forbid specific nicks, channels, emails, etc. from being used.
*/
module { name = "os_forbid" }
command { service = "OperServ"; name = "FORBID"; command = "operserv/forbid"; permission = "operserv/forbid"; }
module
{
name = "os_forbid"
/*
* Allows loading forbids from a file.
*/
#file
{
/*
* The type of forbid to add. Can be set to "chan", "email", "nick",
* "password", or "register".
*/
type = "email"
/*
* The file to read forbids from. Each forbid should be placed on a new
* line. Surrounding whitespace will be ignored.
*/
file = "temp-emails.txt"
/**
* The reason why entries from this file are forbidden.
*/
reason = "Temporary email"
}
}
command { service = "OperServ"; name = "FORBID"; command = "operserv/forbid"; permission = "operserv/forbid" }
/*
* os_ignore
@@ -362,7 +389,7 @@ command { service = "OperServ"; name = "FORBID"; command = "operserv/forbid"; pe
* Used to make Anope ignore users.
*/
module { name = "os_ignore" }
command { service = "OperServ"; name = "IGNORE"; command = "operserv/ignore"; permission = "operserv/ignore"; }
command { service = "OperServ"; name = "IGNORE"; command = "operserv/ignore"; permission = "operserv/ignore" }
/*
* os_info
@@ -372,7 +399,7 @@ command { service = "OperServ"; name = "IGNORE"; command = "operserv/ignore"; pe
* Used to add oper only notes to users and channels.
*/
module { name = "os_info" }
command { service = "OperServ"; name = "INFO"; command = "operserv/info"; permission = "operserv/info"; }
command { service = "OperServ"; name = "INFO"; command = "operserv/info"; permission = "operserv/info" }
/*
* os_jupe
@@ -382,7 +409,7 @@ command { service = "OperServ"; name = "INFO"; command = "operserv/info"; permis
* Used to disconnect servers from the network and prevent them from relinking.
*/
module { name = "os_jupe" }
command { service = "OperServ"; name = "JUPE"; command = "operserv/jupe"; permission = "operserv/jupe"; }
command { service = "OperServ"; name = "JUPE"; command = "operserv/jupe"; permission = "operserv/jupe" }
/*
* os_kick
@@ -392,7 +419,7 @@ command { service = "OperServ"; name = "JUPE"; command = "operserv/jupe"; permis
* Used to kick users from channels.
*/
module { name = "os_kick" }
command { service = "OperServ"; name = "KICK"; command = "operserv/kick"; permission = "operserv/kick"; }
command { service = "OperServ"; name = "KICK"; command = "operserv/kick"; permission = "operserv/kick" }
/*
* os_kill
@@ -402,7 +429,7 @@ command { service = "OperServ"; name = "KICK"; command = "operserv/kick"; permis
* Used to forcibly disconnect users from the network.
*/
module { name = "os_kill" }
command { service = "OperServ"; name = "KILL"; command = "operserv/kill"; permission = "operserv/kill"; }
command { service = "OperServ"; name = "KILL"; command = "operserv/kill"; permission = "operserv/kill" }
/*
* os_list
@@ -412,8 +439,8 @@ command { service = "OperServ"; name = "KILL"; command = "operserv/kill"; permis
* Used to list and search the channels and users currently on the network.
*/
module { name = "os_list" }
command { service = "OperServ"; name = "CHANLIST"; command = "operserv/chanlist"; permission = "operserv/chanlist"; }
command { service = "OperServ"; name = "USERLIST"; command = "operserv/userlist"; permission = "operserv/userlist"; }
command { service = "OperServ"; name = "CHANLIST"; command = "operserv/chanlist"; permission = "operserv/chanlist" }
command { service = "OperServ"; name = "USERLIST"; command = "operserv/userlist"; permission = "operserv/userlist" }
/*
* os_login
@@ -423,8 +450,8 @@ command { service = "OperServ"; name = "USERLIST"; command = "operserv/userlist"
* Used to login to OperServ, only required if your oper block requires this.
*/
module { name = "os_login" }
command { service = "OperServ"; name = "LOGIN"; command = "operserv/login"; }
command { service = "OperServ"; name = "LOGOUT"; command = "operserv/logout"; }
command { service = "OperServ"; name = "LOGIN"; command = "operserv/login" }
command { service = "OperServ"; name = "LOGOUT"; command = "operserv/logout" }
/*
* os_logsearch
@@ -442,7 +469,7 @@ module
*/
logname = "services.log"
}
command { service = "OperServ"; name = "LOGSEARCH"; command = "operserv/logsearch"; permission = "operserv/logsearch"; }
command { service = "OperServ"; name = "LOGSEARCH"; command = "operserv/logsearch"; permission = "operserv/logsearch" }
/*
* os_mode
@@ -452,8 +479,8 @@ command { service = "OperServ"; name = "LOGSEARCH"; command = "operserv/logsearc
* Used to change user and channel modes.
*/
module { name = "os_mode" }
command { service = "OperServ"; name = "UMODE"; command = "operserv/umode"; permission = "operserv/umode"; }
command { service = "OperServ"; name = "MODE"; command = "operserv/mode"; permission = "operserv/mode"; }
command { service = "OperServ"; name = "UMODE"; command = "operserv/umode"; permission = "operserv/umode" }
command { service = "OperServ"; name = "MODE"; command = "operserv/mode"; permission = "operserv/mode" }
/*
* os_modinfo
@@ -463,8 +490,8 @@ command { service = "OperServ"; name = "MODE"; command = "operserv/mode"; permis
* Used to show information about loaded modules.
*/
module { name = "os_modinfo" }
command { service = "OperServ"; name = "MODINFO"; command = "operserv/modinfo"; permission = "operserv/modinfo"; }
command { service = "OperServ"; name = "MODLIST"; command = "operserv/modlist"; permission = "operserv/modinfo"; }
command { service = "OperServ"; name = "MODINFO"; command = "operserv/modinfo"; permission = "operserv/modinfo" }
command { service = "OperServ"; name = "MODLIST"; command = "operserv/modlist"; permission = "operserv/modinfo" }
/*
* os_module
@@ -474,9 +501,9 @@ command { service = "OperServ"; name = "MODLIST"; command = "operserv/modlist";
* Used to load, reload, and unload modules.
*/
module { name = "os_module" }
command { service = "OperServ"; name = "MODLOAD"; command = "operserv/modload"; permission = "operserv/modload"; }
command { service = "OperServ"; name = "MODRELOAD"; command = "operserv/modreload"; permission = "operserv/modload"; }
command { service = "OperServ"; name = "MODUNLOAD"; command = "operserv/modunload"; permission = "operserv/modload"; }
command { service = "OperServ"; name = "MODLOAD"; command = "operserv/modload"; permission = "operserv/modload" }
command { service = "OperServ"; name = "MODRELOAD"; command = "operserv/modreload"; permission = "operserv/modload" }
command { service = "OperServ"; name = "MODUNLOAD"; command = "operserv/modunload"; permission = "operserv/modload" }
/*
* os_news
@@ -510,9 +537,9 @@ module
*/
#showdate = yes
}
command { service = "OperServ"; name = "LOGONNEWS"; command = "operserv/logonnews"; permission = "operserv/news"; }
command { service = "OperServ"; name = "OPERNEWS"; command = "operserv/opernews"; permission = "operserv/news"; }
command { service = "OperServ"; name = "RANDOMNEWS"; command = "operserv/randomnews"; permission = "operserv/news"; }
command { service = "OperServ"; name = "LOGONNEWS"; command = "operserv/logonnews"; permission = "operserv/news" }
command { service = "OperServ"; name = "OPERNEWS"; command = "operserv/opernews"; permission = "operserv/news" }
command { service = "OperServ"; name = "RANDOMNEWS"; command = "operserv/randomnews"; permission = "operserv/news" }
/*
* os_noop
@@ -522,7 +549,7 @@ command { service = "OperServ"; name = "RANDOMNEWS"; command = "operserv/randomn
* Used to NOOP a server, which prevents users from opering on that server.
*/
#module { name = "os_noop" }
command { service = "OperServ"; name = "NOOP"; command = "operserv/noop"; permission = "operserv/noop"; }
command { service = "OperServ"; name = "NOOP"; command = "operserv/noop"; permission = "operserv/noop" }
/*
* os_oper
@@ -532,7 +559,7 @@ command { service = "OperServ"; name = "NOOP"; command = "operserv/noop"; permis
* Used to configure opers and show information about opertypes.
*/
module { name = "os_oper" }
command { service = "OperServ"; name = "OPER"; command = "operserv/oper"; permission = "operserv/oper"; }
command { service = "OperServ"; name = "OPER"; command = "operserv/oper"; permission = "operserv/oper" }
/*
* os_reload
@@ -542,7 +569,7 @@ command { service = "OperServ"; name = "OPER"; command = "operserv/oper"; permis
* Used to reload the anope.conf configuration file.
*/
module { name = "os_reload" }
command { service = "OperServ"; name = "RELOAD"; command = "operserv/reload"; permission = "operserv/reload"; }
command { service = "OperServ"; name = "RELOAD"; command = "operserv/reload"; permission = "operserv/reload" }
/*
* os_session
@@ -625,8 +652,8 @@ module
session_ipv4_cidr = 32
session_ipv6_cidr = 128
}
command { service = "OperServ"; name = "EXCEPTION"; command = "operserv/exception"; permission = "operserv/exception"; }
command { service = "OperServ"; name = "SESSION"; command = "operserv/session"; permission = "operserv/session"; }
command { service = "OperServ"; name = "EXCEPTION"; command = "operserv/exception"; permission = "operserv/exception" }
command { service = "OperServ"; name = "SESSION"; command = "operserv/session"; permission = "operserv/session" }
/*
* os_set
@@ -647,7 +674,7 @@ module
*/
#superadmin = yes
}
command { service = "OperServ"; name = "SET"; command = "operserv/set"; permission = "operserv/set"; }
command { service = "OperServ"; name = "SET"; command = "operserv/set"; permission = "operserv/set" }
/*
* os_shutdown
@@ -667,9 +694,9 @@ module
*/
requirename = yes
}
#command { service = "OperServ"; name = "QUIT"; command = "operserv/quit"; permission = "operserv/quit"; }
command { service = "OperServ"; name = "RESTART"; command = "operserv/restart"; permission = "operserv/restart"; }
command { service = "OperServ"; name = "SHUTDOWN"; command = "operserv/shutdown"; permission = "operserv/shutdown"; }
#command { service = "OperServ"; name = "QUIT"; command = "operserv/quit"; permission = "operserv/quit" }
command { service = "OperServ"; name = "RESTART"; command = "operserv/restart"; permission = "operserv/restart" }
command { service = "OperServ"; name = "SHUTDOWN"; command = "operserv/shutdown"; permission = "operserv/shutdown" }
/*
* os_stats
@@ -679,7 +706,7 @@ command { service = "OperServ"; name = "SHUTDOWN"; command = "operserv/shutdown"
* Used to show statistics about services.
*/
module { name = "os_stats" }
command { service = "OperServ"; name = "STATS"; command = "operserv/stats"; permission = "operserv/stats"; }
command { service = "OperServ"; name = "STATS"; command = "operserv/stats"; permission = "operserv/stats" }
/*
* os_svs
@@ -689,9 +716,9 @@ command { service = "OperServ"; name = "STATS"; command = "operserv/stats"; perm
* Used to force users to change nicks, join and part channels.
*/
module { name = "os_svs" }
command { service = "OperServ"; name = "SVSNICK"; command = "operserv/svsnick"; permission = "operserv/svs"; }
command { service = "OperServ"; name = "SVSJOIN"; command = "operserv/svsjoin"; permission = "operserv/svs"; }
command { service = "OperServ"; name = "SVSPART"; command = "operserv/svspart"; permission = "operserv/svs"; }
command { service = "OperServ"; name = "SVSNICK"; command = "operserv/svsnick"; permission = "operserv/svs" }
command { service = "OperServ"; name = "SVSJOIN"; command = "operserv/svsjoin"; permission = "operserv/svs" }
command { service = "OperServ"; name = "SVSPART"; command = "operserv/svspart"; permission = "operserv/svs" }
/*
* os_sxline
@@ -701,8 +728,8 @@ command { service = "OperServ"; name = "SVSPART"; command = "operserv/svspart";
* Used to ban real names, nick names, and possibly channels.
*/
module { name = "os_sxline" }
command { service = "OperServ"; name = "SNLINE"; command = "operserv/snline"; permission = "operserv/snline"; }
command { service = "OperServ"; name = "SQLINE"; command = "operserv/sqline"; permission = "operserv/sqline"; }
command { service = "OperServ"; name = "SNLINE"; command = "operserv/snline"; permission = "operserv/snline" }
command { service = "OperServ"; name = "SQLINE"; command = "operserv/sqline"; permission = "operserv/sqline" }
/*
* os_update
@@ -712,4 +739,4 @@ command { service = "OperServ"; name = "SQLINE"; command = "operserv/sqline"; pe
* Use to immediately update the databases.
*/
module { name = "os_update" }
command { service = "OperServ"; name = "UPDATE"; command = "operserv/update"; permission = "operserv/update"; }
command { service = "OperServ"; name = "UPDATE"; command = "operserv/update"; permission = "operserv/update" }
+8 -6
View File
@@ -1,9 +1,9 @@
Since the first commit in March 2004 88 people have submitted patches, commits,
Since the first commit in March 2004 90 people have submitted patches, commits,
and other useful contributions to Anope. These people, ordered by the number of
contributions they have made, are:
* Adam <adam@anope.org>
* Sadie Powell <sadie@witchery.services>
* Sadie Powell <sadie@sadiepowell.dev>
* Robin Burchell <w00t@inspircd.org>
* Naram Qashat <cyberbotx@anope.org>
* Pieter Bootsma <geniusdex@anope.org>
@@ -20,25 +20,25 @@ contributions they have made, are:
* Adam Kramer <ribosome@anope.org>
* Attila Molnar <attilamolnar@hush.com>
* Michael Wobst <wobst.michael@web.de>
* Mark Summers <mark@goopler.net>
* Matt Schatz <genius3000@g3k.solutions>
* PeGaSuS <droider.pc@gmail.com>
* Matt Schatz <genius3000@g3k.solutions>
* Mark Summers <mark@goopler.net>
* Daniel Vassdal <shutter@canternet.org>
* MatthewM <mcm@they-got.us>
* Sebastian V. <hal9000@denorastats.org>
* Alvaro Toledo <atoledo@keldon.org>
* Dragone2 <dragone2@risposteinformatiche.it>
* Björn Stiddien <keeper@anope.org>
* n0kS Phr33d0m <god@politeia.in>
* Hendrik Jäger <gitcommit@henk.geekmail.org>
* k4be <k4be@pirc.pl>
* Thomas Fargeix <t.fargeix@gmail.com>
* CaPa CuL <capacul@gmail.com>
* Val Lorentz <progval+git@progval.net>
* Bram Matthys <syzop@vulnscan.org>
* Federico G. Schwindt <fgsch@lodoss.net>
* Alexander Barton <alex@barton.de>
* CaPa CuL <capacul@gmail.com>
* Cronus <cronus@nite-serv.com>
* Dragone2 <dragone2@risposteinformatiche.it>
* H7-25 <simos@simosnap.org>
* Jyzee <jyzee.git@gmail.com>
* Sebastian Barfurth <github@afreshmelon.com>
@@ -49,6 +49,7 @@ contributions they have made, are:
* Robert Scheck <robert@fedoraproject.org>
* Dennis Friis <peavey@inspircd.org>
* Filippo Cortigiani <simos@simosnap.org>
* KidProtect
* Michał Zegan <webczat_200@poczta.onet.pl>
* AlphaTech <alphat3ch@icloud.com>
* Austin Ellis <siniStar@IRC4Fun.net>
@@ -64,6 +65,7 @@ contributions they have made, are:
* BoGu5 <bogus@onzin.org>
* Chris Langsenkamp <chris@langsenkamp.com>
* Clem Morton
* crazycatdevs
* Daniel Oaks <danneh@danneh.net>
* Fabio Scotoni <cculex@gmail.com>
* ItsOnlyBinary
+351
View File
@@ -0,0 +1,351 @@
# Anope Change Log
## Anope 2.1.25 (unreleased)
### Changes
* Fixed a crash when a temporary ban expires.
* Fixed a potential crash caused by unusual timestamps being passed to `Anope::strftime`.
* Fixed confirming accounts when `{ns_register}:registration` is set to "admin".
* Fixed migrating access entries from xop to flags granting new privileges in cases where multiple privileges share the same flag.
* Fixed migrating access entries sometimes giving the wrong flags.
* Fixed not being able to update the description of a flags access entry.
## Anope 2.1.24 (2026-04-01)
### Breaking Changes
* If a database contains duplicate corrupt entries from a prior write failure the oldest ones will now be purged from the database. This is a destructive action so make sure you take a manual backup of your database before upgrading.
* Removed support for storing the Anope database in Redis. The Redis code was extremely bitrotted, had not been tested in years, and to our knowledge has almost no (if any) users. It is recommended that db_redis users migrate to db_json or db_sql.
* SQL tables now use versioned prefixes by default. For the SQL database backends the default is `anope21_` and for ChanStats the default is `chanstats21_`. If you do not have a prefix explicitly set in your config you will need to add one it. Alternatively, you may also want to consider exporting to db_json and re-importing to update your SQL schema for the recent database layout changes.
### Changes
* Added some helper methods to `CommandSource` to allow quickly translting messages.
* Changed the Config script to allow multiple dashes in front of options, i.e. `-quick` and `--quick` are now equivalent.
* Converted some language strings to use format strings instead of concatenation.
* Fixed a rare crash in the ns_cert module.
* Fixed building Anope as a unity build.
* Fixed the ns_cert module erasing certificate entries if using an old database.
* Fixed users having the wrong real name in log messages on InspIRCd if it has been previously changed with `CHGNAME` or `SETNAME`.
## Anope 2.1.23 (2026-04-01)
### Changes
* Added examples to several BotServ commands.
* Added missing fields to the `RPL_STATSLINKINFO` output.
* Added support for migrating access entries between systems (currently only `chanserv/flags` is supported).
* Added the default levels to the `chanserv/levels` DESC help.
* Changed access listing commands to only show their own access entries unless `ALL` is specified.
* Fixed a non-translatable string which has been marked as translatable.
* Fixed the missing AUTOLOGIN extension.
* Fixed translating the help output when the flexible layout is used.
* Improved the accuracy of the X-line expiry time in `operserv/stats`.
* Updated the Portuguese translation.
* Updated the Romanian translation.
## Anope 2.1.22 (2026-03-01)
### Breaking Changes
* Automatic login using a known SSL fingerprint now requires the `AUTOLOGIN` option to be set on accounts with `/NS SET AUTOLOGIN ON`. Automatic login is largely obsolete now SASL EXTERNAL exists and is widely supported.
* Conan 2 is now used for packaging dependencies on Windows. If you are building from source you will need to upgrade Conan.
* Non-breaking spaces in translatable messages now use 0x1B instead of 0x1A due to recent msgfmt releases treating 0x1A as an EOF character. If you have an out of tree translation you will need to update it.
* User TLS certificates are now stored in their own `NSCert` table instead of as a column in the `NickCore` table. If you are reading this information you will need to update your code.
### Changes
* Fixed `{botserv}:botmodes` erroneously allowing setting non-status modes on channels.
* Fixed echoing message tags on Solanum.
* Fixed handling incoming `FIDENT` messages on InspIRCd.
* Fixed matching stacked extended bans on InspIRCd and UnrealIRCd.
* Fixed parameter modes in `chanserv/mode` locks erroneously requiring a parameter to unset a lock.
* Fixed restoring the object identifier when unserialising objects in db_json.
* Fixed the consistency of indenting and line wrapping command examples in help output.
* Redesigned the output of `nickserv/list` to show more relevant information.
```
/NICKSERV LIST *
-NickServ- List of entries matching *:
-NickServ- alice (account: alice)
-NickServ- alice|work (account: alice)
-NickServ- bob -- Unconfirmed (account: bob)
-NickServ- mallory -- Suspended (account: mallory)
-NickServ- End of list - 4/4 matches shown.
```
* The cs_set_misc and ns_set_misc modules now can use a separate title from the command name.
```
/NICKSERV SET MASTODON @example@mastodon.social
-NickServ- Mastodon for testuser set to @example@mastodon.social
```
* The cs_set_misc and ns_set_misc modules now support validation of user-specified data.
```
/NICKSERV SET MASTODON example.mastodon.social
-NickServ- Mastodon syntax is invalid.
-NickServ- Syntax: SET MASTODON [@user@host.tld]
```
* The db_atheme module can now import arbitrary metadata to fields from the ns_set_misc module.
* The local clock will now be checked for synchronisation with the IRCd clock on UnrealIRCd.
* The `nickserv/cert` command will now show the time a TLS certificate was created and the nickname of the creator if the `VIEW` subcommand is used.
```
/NICKSERV CERT VIEW
-NickServ- d41d8cd98f00b204e9800998ecf8427e -- created by nick1 at Wed 25 Feb 00:18:50 GMT
```
* The ns_set_misc module can now add account data to the WHOIS output of authenticated users on InspIRCd (with the swhois_ext module) and UnrealIRCd.
```
/WHOIS nick1
* [nick1] (nick1@example.com): nick1
* [nick1] Mastodon: @example@mastodon.social
* [nick1] irc.example.com :Example-IRC server
...
* [nick1] End of WHOIS list.
```
* The regex_posix module is now available on Windows (using the PCRE2 POSIX compatibility layer).
* The regex_tre module is now available on Windows.
* The Windows dependencies have been updated.
## Anope 2.1.21 (2026-02-07)
### Breaking Changes
* `{fantasy}:fantasycharacter` has been replaced with `{fantasy}:prefix` which allows multiple-character fantasy prefixes. If you have multiple custom fantasy characters set you should separate them with a space when upgrading your config.
* The db_json module will now terminate the process if it fails to write the database. This replicates the behaviour previously used by the db_flatfile module.
* When adding an unregistered user to an access list you must now explicitly specify their hostmask. This prevents accidentally adding a hostmask which is too wide.
### Changes
* Added cleaning up of hostmasks when adding them to an access list and `{chanserv}:disallow_malformed_hostmask` to allow rejecting them instead.
* Changed access commands to add the account of a user who is logged in to an account but not using a nickname belonging to that account.
* Fixed a crash when clearing channel entry messages.
* Fixed a memory leak when cloning akicks.
* Fixed cleaning up ban masks.
* Fixed confirming accounts using the webcpanel.
* Fixed importing the time a nickname was used from Atheme.
* Fixed limiting the number of accounts per email address.
* Fixed locking modes that take a parameter when they are added.
* Fixed the `chanserv/enforce` command erroneously enforcing against channel founders.
* Fixed the syntax of the `chanserv/suspend` command.
* Fixed the syntax of the `nickserv/suspend` command.
* Improved password rehash detection in the enc_argon2 module.
* Various minor improvements to how services work internally.
## Anope 2.1.20 (2025-12-01)
### Breaking Changes
* Changed the registration of database types added by modules to be delayed until after the module constructor has been called. This might affect any custom modules you are using.
* Moved akicks out of the core into cs_akick. Modules which depend on akicks now require the cs_akick module to be loaded.
### Changes
* Added `{db_json}:preserve_unknown_data` to configure whether unknown database types are kept in the JSON database. By default unknown database types from unloaded modules will be preserved in the database to allow reloading later. This setting can be used to disable this and prune the database.
* Added support for forbidding passwords. This is intended to be used with file forbids (see below).
```
/OPERSERV FORBID ADD PASSWORD +30d hunter2 This password is insecure
-OperServ- Added a forbid on hunter2 of type password to expire on Mon 29 Dec 2025 11:51:13 AM UTC (30 days from now).
```
* Added support for loading forbids from a file.
```cpp
file
{
type = "email"
file = "temp-emails.txt"
reason = "Temporary email"
}
```
* Added support for the UnrealIRCd `+F` flood profile mode.
* Added the `anope-mkpasswd` script to help generate passwords for use in the config.
```
$ ./anope-mkpasswd argon2id hunter2
For use in the database:
argon2id:$argon2id$v=19$m=65536,t=3,p=4$AmGWdtn1OUT9WSKSqESsPw$iguvHs6oIi/hF7e3t/bGNwgqP41vl/J4qP3a/yH9SLo
For use in an oper:
password = "$argon2id$v=19$m=65536,t=3,p=4$AmGWdtn1OUT9WSKSqESsPw$iguvHs6oIi/hF7e3t/bGNwgqP41vl/J4qP3a/yH9SLo"
password_hash = "argon2id"
For use in an jsonrpc/xmlrpc token:
token = "$argon2id$v=19$m=65536,t=3,p=4$AmGWdtn1OUT9WSKSqESsPw$iguvHs6oIi/hF7e3t/bGNwgqP41vl/J4qP3a/yH9SLo"
token_hash = "argon2id"
Make sure you have the enc_argon2 module loaded!
```
* Added the DISPLAY flag to `nickserv/list` to only show account display nicknames.
```
/NICKSERV LIST *
-NickServ- List of entries matching *:
-NickServ- nick1 (last mask: foo@example.com)
-NickServ- nick1|afk (last mask: bar@example.com)
-NickServ- nick2 (last mask: baz@example.com)
-NickServ- End of list - 3/3 matches shown.
/NICKSERV LIST * DISPLAY
-NickServ- List of entries matching *:
-NickServ- nick1 (last mask: foo@example.com)
-NickServ- nick2 (last mask: baz@example.com)
-NickServ- End of list - 2/2 matches shown.
```
* Added the hs_offer module which allows offering templated vhosts to users (based on a
modsite module by @genius3000 on GitHub).
```
/HOSTSERV OFFER ADD {account}.users.example.com
/HOSTSERV OFFERLIST
-HostServ- Current host offer list:
-HostServ- 2: {account}.users.example.com / FooBar.users.example.com -- does not expire
-HostServ- End of host offer list.
```
* Changed chanserv/mode lock messages to stack the responses into one message per type instead of sending one message per mode.
```
/CHANSERV MODE #stest LOCK ADD +bb foo!foo@foo bar!bar@bar
-ChanServ- +bb foo!foo@foo bar!bar@bar has been locked on #stest.
```
* Changed database objects to rehook to their type when it becomes available again.
* Changed the `nickserv/set/language` and `nickserv/set/timezone` commands to allow setting back to the default value by omitting the last parameter.
```
/NICKSERV SET LANGUAGE
12:23 -NickServ- Language changed to English.
/NICKSERV SET TIMEZONE
12:24 -NickServ- Timezone changed to UTC.
```
* Changed the default install directory from `~/anope` to `~/anope-2.1`.
* Changed the enc_sha1 module to use a vendored SHA-1 implementation.
* Expanded password obscurity checks and added an event hook to allow modules to reject passwords.
* Fixed the rpc_user module sending the "invalid account" and "invalid password" error codes inverted.
* Fixed unintentionally reloading the core database when reloading a module that provides a database type.
* Removed a bunch of obsolete build system cruft.
## Anope 2.1.19 (2025-11-01)
### Breaking Changes
* `pkg-config` is now required to find dependencies for the following modules on UNIX systems:
- enc_argon2
- ldap
- mysql
- regex_pcre2
- regex_tre
* Support for InspIRCd v3 has been dropped ahead of it going EOL in two months. Please migrate to InspIRCd v4 to keep using Anope 2.1 with InspIRCd.
### Changes
* Added a Romanian translation (contributed by @KidProtect on GitHub).
* Added support for associating a timezone with an account to allow users to receive timestamps in their local timezone.
```
/NICKSERV SET TIMEZONE Europe/London
-NickServ- Timezone changed to Europe/Berlin.
/NICKSERV INFO test
-NickServ- Account registered: Thu 09 Oct 2025 15:22:45 CEST (45 seconds ago)
```
NOTE: This requires a compiler with C++20 timezone support.
* Added support for IRCv3 message tags when using Solanum git.
* Added support for language-specific time formats.
```
/NICKSERV SET LANGUAGE tr_TR.UTF-8
-NickServ- Dil Türkçe olarak değiştirildi.
/NICKSERV INFO test
-NickServ- Hesap kaydedildi: Prş 09 Eki 2025 15:22:45 (6 dakika, 16 saniye önce)
```
* Channel entry messages are now tagged with an IRCv3 time tag for the time they were created on supporting IRCds. This defaults to on but can be disabled using `{cs_entrymsg}:timestamp`.
* Reordered the information in the `nickserv/info` command output to show the registration dates before the seen information.
* Updated the Turkish translation (contributed by @CaPaCuL on GitHub).
* Updated the vendored libraries.
+1 -5
View File
@@ -3,11 +3,7 @@ if(WIN32)
# Only install given files from this directory
# NOTE: I would've had this just find all files in the directory, but that would include files not needed (like this file)
execute_process(COMMAND ${CMAKE_COMMAND} -E copy ${CMAKE_CURRENT_SOURCE_DIR}/README ${CMAKE_CURRENT_BINARY_DIR}/README.txt)
if(IN_SOURCE)
# Add README.txt to list of files for CPack to ignore
add_to_cpack_ignored_files("README.txt$" TRUE)
endif()
set(DOCS Changes Changes.conf DEFCON FAQ INSTALL LANGUAGE MODULES ${CMAKE_CURRENT_BINARY_DIR}/README.txt WIN32.txt)
set(DOCS CHANGES.md DEFCON FAQ INSTALL LANGUAGE MODULES ${CMAKE_CURRENT_BINARY_DIR}/README.txt WIN32.md)
install(FILES ${DOCS}
DESTINATION ${DOC_DIR}
)
-347
View File
@@ -1,347 +0,0 @@
GNU GENERAL PUBLIC LICENSE
Version 2, June 1991
Copyright (C) 1989, 1991 Free Software Foundation, Inc.
51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA
Everyone is permitted to copy and distribute verbatim copies
of this license document, but changing it is not allowed.
Preamble
The licenses for most software are designed to take away your
freedom to share and change it. By contrast, the GNU General Public
License is intended to guarantee your freedom to share and change free
software--to make sure the software is free for all its users. This
General Public License applies to most of the Free Software
Foundation's software and to any other program whose authors commit to
using it. (Some other Free Software Foundation software is covered by
the GNU Lesser General Public License instead.) You can apply it to
your programs, too.
When we speak of free software, we are referring to freedom, not
price. Our General Public Licenses are designed to make sure that you
have the freedom to distribute copies of free software (and charge for
this service if you wish), that you receive source code or can get it
if you want it, that you can change the software or use pieces of it
in new free programs; and that you know you can do these things.
To protect your rights, we need to make restrictions that forbid
anyone to deny you these rights or to ask you to surrender the rights.
These restrictions translate to certain responsibilities for you if you
distribute copies of the software, or if you modify it.
For example, if you distribute copies of such a program, whether
gratis or for a fee, you must give the recipients all the rights that
you have. You must make sure that they, too, receive or can get the
source code. And you must show them these terms so they know their
rights.
We protect your rights with two steps: (1) copyright the software, and
(2) offer you this license which gives you legal permission to copy,
distribute and/or modify the software.
Also, for each author's protection and ours, we want to make certain
that everyone understands that there is no warranty for this free
software. If the software is modified by someone else and passed on, we
want its recipients to know that what they have is not the original, so
that any problems introduced by others will not reflect on the original
authors' reputations.
Finally, any free program is threatened constantly by software
patents. We wish to avoid the danger that redistributors of a free
program will individually obtain patent licenses, in effect making the
program proprietary. To prevent this, we have made it clear that any
patent must be licensed for everyone's free use or not licensed at all.
The precise terms and conditions for copying, distribution and
modification follow.
GNU GENERAL PUBLIC LICENSE
TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION
0. This License applies to any program or other work which contains
a notice placed by the copyright holder saying it may be distributed
under the terms of this General Public License. The "Program", below,
refers to any such program or work, and a "work based on the Program"
means either the Program or any derivative work under copyright law:
that is to say, a work containing the Program or a portion of it,
either verbatim or with modifications and/or translated into another
language. (Hereinafter, translation is included without limitation in
the term "modification".) Each licensee is addressed as "you".
Activities other than copying, distribution and modification are not
covered by this License; they are outside its scope. The act of
running the Program is not restricted, and the output from the Program
is covered only if its contents constitute a work based on the
Program (independent of having been made by running the Program).
Whether that is true depends on what the Program does.
1. You may copy and distribute verbatim copies of the Program's
source code as you receive it, in any medium, provided that you
conspicuously and appropriately publish on each copy an appropriate
copyright notice and disclaimer of warranty; keep intact all the
notices that refer to this License and to the absence of any warranty;
and give any other recipients of the Program a copy of this License
along with the Program.
You may charge a fee for the physical act of transferring a copy, and
you may at your option offer warranty protection in exchange for a fee.
2. You may modify your copy or copies of the Program or any portion
of it, thus forming a work based on the Program, and copy and
distribute such modifications or work under the terms of Section 1
above, provided that you also meet all of these conditions:
a) You must cause the modified files to carry prominent notices
stating that you changed the files and the date of any change.
b) You must cause any work that you distribute or publish, that in
whole or in part contains or is derived from the Program or any
part thereof, to be licensed as a whole at no charge to all third
parties under the terms of this License.
c) If the modified program normally reads commands interactively
when run, you must cause it, when started running for such
interactive use in the most ordinary way, to print or display an
announcement including an appropriate copyright notice and a
notice that there is no warranty (or else, saying that you provide
a warranty) and that users may redistribute the program under
these conditions, and telling the user how to view a copy of this
License. (Exception: if the Program itself is interactive but
does not normally print such an announcement, your work based on
the Program is not required to print an announcement.)
These requirements apply to the modified work as a whole. If
identifiable sections of that work are not derived from the Program,
and can be reasonably considered independent and separate works in
themselves, then this License, and its terms, do not apply to those
sections when you distribute them as separate works. But when you
distribute the same sections as part of a whole which is a work based
on the Program, the distribution of the whole must be on the terms of
this License, whose permissions for other licensees extend to the entire
whole, and thus to each and every part regardless of who wrote it.
Thus, it is not the intent of this section to claim rights or contest
your rights to work written entirely by you; rather, the intent is to
exercise the right to control the distribution of derivative or
collective works based on the Program.
In addition, mere aggregation of another work not based on the Program
with the Program (or with a work based on the Program) on a volume of
a storage or distribution medium does not bring the other work under
the scope of this License.
3. You may copy and distribute the Program (or a work based on it,
under Section 2) in object code or executable form under the terms of
Sections 1 and 2 above provided that you also do one of the following:
a) Accompany it with the complete corresponding machine-readable
source code, which must be distributed under the terms of Sections
1 and 2 above on a medium customarily used for software interchange; or,
b) Accompany it with a written offer, valid for at least three years,
to give any third party, for a charge no more than your cost of
physically performing source distribution, a complete machine-readable
copy of the corresponding source code, to be distributed under the terms
of Sections 1 and 2 above on a medium customarily used for software
interchange; or,
c) Accompany it with the information you received as to the offer
to distribute corresponding source code. (This alternative is allowed
only for noncommercial distribution and only if you received the program
in object code or executable form with such an offer, in accord with
Subsection b above.)
The source code for a work means the preferred form of the work for
making modifications to it. For an executable work, complete source
code means all the source code for all modules it contains, plus any
associated interface definition files, plus the scripts used to
control compilation and installation of the executable. However, as a
special exception, the source code distributed need not include
anything that is normally distributed (in either source or binary
form) with the major components (compiler, kernel, and so on) of the
operating system on which the executable runs, unless that component
itself accompanies the executable.
If distribution of executable or object code is made by offering
access to copy from a designated place, then offering equivalent
access to copy the source code from the same place counts as
distribution of the source code, even though third parties are not
compelled to copy the source along with the object code.
4. You may not copy, modify, sublicense, or distribute the Program
except as expressly provided under this License. Any attempt
otherwise to copy, modify, sublicense or distribute the Program is
void, and will automatically terminate your rights under this License.
However, parties who have received copies, or rights, from you under
this License will not have their licenses terminated so long as such
parties remain in full compliance.
5. You are not required to accept this License, since you have not
signed it. However, nothing else grants you permission to modify or
distribute the Program or its derivative works. These actions are
prohibited by law if you do not accept this License. Therefore, by
modifying or distributing the Program (or any work based on the
Program), you indicate your acceptance of this License to do so, and
all its terms and conditions for copying, distributing or modifying
the Program or works based on it.
6. Each time you redistribute the Program (or any work based on the
Program), the recipient automatically receives a license from the
original licensor to copy, distribute or modify the Program subject to
these terms and conditions. You may not impose any further
restrictions on the recipients' exercise of the rights granted herein.
You are not responsible for enforcing compliance by third parties to
this License.
7. If, as a consequence of a court judgment or allegation of patent
infringement or for any other reason (not limited to patent issues),
conditions are imposed on you (whether by court order, agreement or
otherwise) that contradict the conditions of this License, they do not
excuse you from the conditions of this License. If you cannot
distribute so as to satisfy simultaneously your obligations under this
License and any other pertinent obligations, then as a consequence you
may not distribute the Program at all. For example, if a patent license
would not permit royalty-free redistribution of the Program by all those
who receive copies directly or indirectly through you, then the only way
you could satisfy both it and this License would be to refrain entirely
from distribution of the Program.
If any portion of this section is held invalid or unenforceable under
any particular circumstance, the balance of the section is intended to
apply and the section as a whole is intended to apply in other
circumstances.
It is not the purpose of this section to induce you to infringe any
patents or other property right claims or to contest validity of any
such claims; this section has the sole purpose of protecting the
integrity of the free software distribution system, which is implemented
by public license practices. Many people have made generous contributions
to the wide range of software distributed through that system in reliance
on consistent application of that system; it is up to the author/donor to
decide if he or she is willing to distribute software through any other
system and a licensee cannot impose that choice.
This section is intended to make thoroughly clear what is believed to be
a consequence of the rest of this License.
8. If the distribution and/or use of the Program is restricted in
certain countries either by patents or by copyrighted interfaces, the
original copyright holder who places the Program under this License
may add an explicit geographical distribution limitation excluding
those countries, so that distribution is permitted only in or among
countries not thus excluded. In such case, this License incorporates
the limitation as if written in the body of this License.
9. The Free Software Foundation may publish revised and/or new versions
of the General Public License from time to time. Such new versions will
be similar in spirit to the present version, but may differ in detail to
address new problems or concerns.
Each version is given a distinguishing version number. If the Program
specifies a version number of this License which applies to it and "any
later version", you have the option of following the terms and conditions
either of that version or of any later version published by the Free
Software Foundation. If the Program does not specify a version number of
this License, you may choose any version ever published by the Free Software
Foundation.
10. If you wish to incorporate parts of the Program into other free
programs whose distribution conditions are different, write to the author
to ask for permission. For software which is copyrighted by the Free
Software Foundation, write to the Free Software Foundation; we sometimes
make exceptions for this. Our decision will be guided by the two goals
of preserving the free status of all derivatives of our free software and
of promoting the sharing and reuse of software generally.
NO WARRANTY
11. BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY
FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN
OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES
PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED
OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS
TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU. SHOULD THE
PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING,
REPAIR OR CORRECTION.
12. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING
WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR
REDISTRIBUTE THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES,
INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING
OUT OF THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED
TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY
YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER
PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE
POSSIBILITY OF SUCH DAMAGES.
END OF TERMS AND CONDITIONS
How to Apply These Terms to Your New Programs
If you develop a new program, and you want it to be of the greatest
possible use to the public, the best way to achieve this is to make
it free software which everyone can redistribute and change under
these terms.
To do so, attach the following notices to the program. It is safest
to attach them to the start of each source file to most effectively
convey the exclusion of warranty; and each file should have at least
the "copyright" line and a pointer to where the full notice is found.
<one line to give the program's name and an idea of what it does.>
Copyright (C) yyyy name of author
This program is free software; you can redistribute it and/or
modify it under the terms of the GNU General Public License
as published by the Free Software Foundation; either version 2
of the License, or (at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software
Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
02110-1301, USA.
Also add information on how to contact you by electronic and paper mail.
If the program is interactive, make it output a short notice like this
when it starts in an interactive mode:
Gnomovision version 69, Copyright (C) year name of author
Gnomovision comes with ABSOLUTELY NO WARRANTY; for details
type `show w'. This is free software, and you are welcome
to redistribute it under certain conditions; type `show c'
for details.
The hypothetical commands `show w' and `show c' should show the appropriate
parts of the General Public License. Of course, the commands you use may
be called something other than `show w' and `show c'; they could even be
mouse-clicks or menu items--whatever suits your program.
You should also get your employer (if you work as a programmer) or your
school, if any, to sign a "copyright disclaimer" for the program, if
necessary. Here is a sample; alter the names:
Yoyodyne, Inc., hereby disclaims all copyright interest in the program
`Gnomovision' (which makes passes at compilers) written by James Hacker.
<signature of Ty Coon>, 1 April 1989
Ty Coon, President of Vice
This General Public License does not permit incorporating your program into
proprietary programs. If your program is a subroutine library, you may
consider it more useful to permit linking proprietary applications with the
library. If this is what you want to do, use the GNU Lesser General
Public License instead of this License.
+313
View File
@@ -0,0 +1,313 @@
DOXYFILE_ENCODING = UTF-8
PROJECT_NAME = "Anope"
PROJECT_NUMBER = 2.0
PROJECT_BRIEF =
PROJECT_LOGO =
PROJECT_ICON = src/win32/anope-icon.ico
OUTPUT_DIRECTORY = docs/doxygen
CREATE_SUBDIRS = NO
CREATE_SUBDIRS_LEVEL = 8
ALLOW_UNICODE_NAMES = NO
OUTPUT_LANGUAGE = English
BRIEF_MEMBER_DESC = YES
REPEAT_BRIEF = YES
ABBREVIATE_BRIEF = "The $name class" \
"The $name widget" \
"The $name file" \
is \
provides \
specifies \
contains \
represents \
a \
an \
the
ALWAYS_DETAILED_SEC = NO
INLINE_INHERITED_MEMB = NO
FULL_PATH_NAMES = YES
STRIP_FROM_PATH =
STRIP_FROM_INC_PATH =
SHORT_NAMES = NO
JAVADOC_AUTOBRIEF = NO
JAVADOC_BANNER = NO
QT_AUTOBRIEF = NO
MULTILINE_CPP_IS_BRIEF = NO
PYTHON_DOCSTRING = YES
INHERIT_DOCS = YES
SEPARATE_MEMBER_PAGES = NO
TAB_SIZE = 4
ALIASES =
OPTIMIZE_OUTPUT_FOR_C = NO
OPTIMIZE_OUTPUT_JAVA = NO
OPTIMIZE_FOR_FORTRAN = NO
OPTIMIZE_OUTPUT_VHDL = NO
OPTIMIZE_OUTPUT_SLICE = NO
EXTENSION_MAPPING =
MARKDOWN_SUPPORT = YES
TOC_INCLUDE_HEADINGS = 5
MARKDOWN_ID_STYLE = GITHUB
AUTOLINK_SUPPORT = YES
AUTOLINK_IGNORE_WORDS =
BUILTIN_STL_SUPPORT = YES
CPP_CLI_SUPPORT = NO
SIP_SUPPORT = NO
IDL_PROPERTY_SUPPORT = YES
DISTRIBUTE_GROUP_DOC = NO
GROUP_NESTED_COMPOUNDS = NO
SUBGROUPING = YES
INLINE_GROUPED_CLASSES = NO
INLINE_SIMPLE_STRUCTS = NO
TYPEDEF_HIDES_STRUCT = NO
LOOKUP_CACHE_SIZE = 0
NUM_PROC_THREADS = 0
TIMESTAMP = NO
EXTRACT_ALL = YES
EXTRACT_PRIVATE = NO
EXTRACT_PRIV_VIRTUAL = NO
EXTRACT_PACKAGE = NO
EXTRACT_STATIC = NO
EXTRACT_LOCAL_CLASSES = NO
EXTRACT_LOCAL_METHODS = NO
EXTRACT_ANON_NSPACES = NO
RESOLVE_UNNAMED_PARAMS = YES
HIDE_UNDOC_MEMBERS = NO
HIDE_UNDOC_CLASSES = NO
HIDE_UNDOC_NAMESPACES = YES
HIDE_FRIEND_COMPOUNDS = NO
HIDE_IN_BODY_DOCS = NO
INTERNAL_DOCS = NO
CASE_SENSE_NAMES = SYSTEM
HIDE_SCOPE_NAMES = NO
HIDE_COMPOUND_REFERENCE= NO
SHOW_HEADERFILE = YES
SHOW_INCLUDE_FILES = YES
SHOW_GROUPED_MEMB_INC = NO
FORCE_LOCAL_INCLUDES = NO
INLINE_INFO = YES
SORT_MEMBER_DOCS = YES
SORT_BRIEF_DOCS = NO
SORT_MEMBERS_CTORS_1ST = NO
SORT_GROUP_NAMES = NO
SORT_BY_SCOPE_NAME = NO
STRICT_PROTO_MATCHING = NO
GENERATE_TODOLIST = YES
GENERATE_TESTLIST = YES
GENERATE_BUGLIST = YES
GENERATE_DEPRECATEDLIST= YES
ENABLED_SECTIONS =
MAX_INITIALIZER_LINES = 30
SHOW_USED_FILES = YES
SHOW_FILES = YES
SHOW_NAMESPACES = YES
FILE_VERSION_FILTER =
LAYOUT_FILE =
CITE_BIB_FILES =
EXTERNAL_TOOL_PATH =
QUIET = NO
WARNINGS = YES
WARN_IF_UNDOCUMENTED = NO
WARN_IF_DOC_ERROR = YES
WARN_IF_INCOMPLETE_DOC = YES
WARN_NO_PARAMDOC = NO
WARN_IF_UNDOC_ENUM_VAL = NO
WARN_LAYOUT_FILE = YES
WARN_AS_ERROR = NO
WARN_FORMAT = "$file:$line: $text"
WARN_LINE_FORMAT = "at line $line of file $file"
WARN_LOGFILE =
INPUT = README.md \
include
INPUT_ENCODING = UTF-8
INPUT_FILE_ENCODING =
FILE_PATTERNS =
RECURSIVE = YES
EXCLUDE =
EXCLUDE_SYMLINKS = YES
EXCLUDE_PATTERNS =
EXCLUDE_SYMBOLS =
EXAMPLE_PATH =
EXAMPLE_PATTERNS =
EXAMPLE_RECURSIVE = NO
IMAGE_PATH =
INPUT_FILTER =
FILTER_PATTERNS =
FILTER_SOURCE_FILES = NO
FILTER_SOURCE_PATTERNS =
USE_MDFILE_AS_MAINPAGE = README.md
IMPLICIT_DIR_DOCS = YES
FORTRAN_COMMENT_AFTER = 72
SOURCE_BROWSER = NO
INLINE_SOURCES = NO
STRIP_CODE_COMMENTS = YES
REFERENCED_BY_RELATION = NO
REFERENCES_RELATION = NO
REFERENCES_LINK_SOURCE = YES
SOURCE_TOOLTIPS = YES
USE_HTAGS = NO
VERBATIM_HEADERS = YES
ALPHABETICAL_INDEX = YES
IGNORE_PREFIX =
GENERATE_HTML = YES
HTML_OUTPUT = html
HTML_FILE_EXTENSION = .html
HTML_HEADER =
HTML_FOOTER =
HTML_STYLESHEET =
HTML_EXTRA_STYLESHEET =
HTML_EXTRA_FILES =
HTML_COLORSTYLE = AUTO_LIGHT
HTML_COLORSTYLE_HUE = 220
HTML_COLORSTYLE_SAT = 100
HTML_COLORSTYLE_GAMMA = 80
HTML_DYNAMIC_MENUS = YES
HTML_DYNAMIC_SECTIONS = NO
HTML_CODE_FOLDING = YES
HTML_COPY_CLIPBOARD = YES
HTML_PROJECT_COOKIE =
HTML_INDEX_NUM_ENTRIES = 100
GENERATE_DOCSET = NO
DOCSET_FEEDNAME = "Doxygen generated documentation"
DOCSET_FEEDURL =
DOCSET_BUNDLE_ID = org.doxygen.Project
DOCSET_PUBLISHER_ID = org.doxygen.Publisher
DOCSET_PUBLISHER_NAME = Publisher
GENERATE_HTMLHELP = NO
CHM_FILE =
HHC_LOCATION =
GENERATE_CHI = NO
CHM_INDEX_ENCODING =
BINARY_TOC = NO
TOC_EXPAND = NO
SITEMAP_URL =
GENERATE_QHP = NO
QCH_FILE =
QHP_NAMESPACE = org.doxygen.Project
QHP_VIRTUAL_FOLDER = doc
QHP_CUST_FILTER_NAME =
QHP_CUST_FILTER_ATTRS =
QHP_SECT_FILTER_ATTRS =
QHG_LOCATION =
GENERATE_ECLIPSEHELP = NO
ECLIPSE_DOC_ID = org.doxygen.Project
DISABLE_INDEX = NO
GENERATE_TREEVIEW = NO
FULL_SIDEBAR = NO
ENUM_VALUES_PER_LINE = 4
SHOW_ENUM_VALUES = NO
TREEVIEW_WIDTH = 250
EXT_LINKS_IN_WINDOW = NO
OBFUSCATE_EMAILS = YES
HTML_FORMULA_FORMAT = png
FORMULA_FONTSIZE = 10
FORMULA_MACROFILE =
USE_MATHJAX = NO
MATHJAX_VERSION = MathJax_2
MATHJAX_FORMAT = HTML-CSS
MATHJAX_RELPATH = http://cdn.mathjax.org/mathjax/latest
MATHJAX_EXTENSIONS =
MATHJAX_CODEFILE =
SEARCHENGINE = YES
SERVER_BASED_SEARCH = NO
EXTERNAL_SEARCH = NO
SEARCHENGINE_URL =
SEARCHDATA_FILE = searchdata.xml
EXTERNAL_SEARCH_ID =
EXTRA_SEARCH_MAPPINGS =
GENERATE_LATEX = NO
LATEX_OUTPUT = latex
LATEX_CMD_NAME =
MAKEINDEX_CMD_NAME = makeindex
LATEX_MAKEINDEX_CMD = makeindex
COMPACT_LATEX = NO
PAPER_TYPE = a4
EXTRA_PACKAGES =
LATEX_HEADER =
LATEX_FOOTER =
LATEX_EXTRA_STYLESHEET =
LATEX_EXTRA_FILES =
PDF_HYPERLINKS = YES
USE_PDFLATEX = YES
LATEX_BATCHMODE = NO
LATEX_HIDE_INDICES = NO
LATEX_BIB_STYLE = plainnat
LATEX_EMOJI_DIRECTORY =
GENERATE_RTF = NO
RTF_OUTPUT = rtf
COMPACT_RTF = NO
RTF_HYPERLINKS = NO
RTF_STYLESHEET_FILE =
RTF_EXTENSIONS_FILE =
RTF_EXTRA_FILES =
GENERATE_MAN = NO
MAN_OUTPUT = man
MAN_EXTENSION = .3
MAN_SUBDIR =
MAN_LINKS = NO
GENERATE_XML = NO
XML_OUTPUT = xml
XML_PROGRAMLISTING = YES
XML_NS_MEMB_FILE_SCOPE = NO
GENERATE_DOCBOOK = NO
DOCBOOK_OUTPUT = docbook
GENERATE_AUTOGEN_DEF = NO
GENERATE_SQLITE3 = NO
SQLITE3_OUTPUT = sqlite3
SQLITE3_RECREATE_DB = YES
GENERATE_PERLMOD = NO
PERLMOD_LATEX = NO
PERLMOD_PRETTY = YES
PERLMOD_MAKEVAR_PREFIX =
ENABLE_PREPROCESSING = YES
MACRO_EXPANSION = YES
EXPAND_ONLY_PREDEF = NO
SEARCH_INCLUDES = YES
INCLUDE_PATH =
INCLUDE_FILE_PATTERNS =
PREDEFINED = CoreExport=/**/ \
ATTR_NOT_NULL(...)=/**/
EXPAND_AS_DEFINED =
SKIP_FUNCTION_MACROS = YES
TAGFILES =
GENERATE_TAGFILE =
ALLEXTERNALS = NO
EXTERNAL_GROUPS = YES
EXTERNAL_PAGES = YES
HIDE_UNDOC_RELATIONS = YES
HAVE_DOT = NO
DOT_NUM_THREADS = 0
DOT_COMMON_ATTR = "fontname=Helvetica,fontsize=10"
DOT_EDGE_ATTR = "labelfontname=Helvetica,labelfontsize=10"
DOT_NODE_ATTR = "shape=box,height=0.2,width=0.4"
DOT_FONTPATH =
CLASS_GRAPH = YES
COLLABORATION_GRAPH = YES
GROUP_GRAPHS = YES
UML_LOOK = NO
UML_LIMIT_NUM_FIELDS = 10
DOT_UML_DETAILS = NO
DOT_WRAP_THRESHOLD = 17
TEMPLATE_RELATIONS = NO
INCLUDE_GRAPH = YES
INCLUDED_BY_GRAPH = YES
CALL_GRAPH = NO
CALLER_GRAPH = NO
GRAPHICAL_HIERARCHY = YES
DIRECTORY_GRAPH = YES
DIR_GRAPH_MAX_DEPTH = 1
DOT_IMAGE_FORMAT = png
INTERACTIVE_SVG = NO
DOT_PATH =
DOTFILE_DIRS =
DIA_PATH =
DIAFILE_DIRS =
PLANTUML_JAR_PATH =
PLANTUML_CFG_FILE =
PLANTUML_INCLUDE_PATH =
PLANTUMLFILE_DIRS =
DOT_GRAPH_MAX_NODES = 50
MAX_DOT_GRAPH_DEPTH = 0
DOT_MULTI_TARGETS = NO
GENERATE_LEGEND = YES
DOT_CLEANUP = YES
MSCGEN_TOOL =
MSCFILE_DIRS =
+5 -11
View File
@@ -10,18 +10,13 @@ Anope Multi Language Support
To build Anope with gettext support, gettext and its development libraries must be installed on the system.
On Debian install the locales-all package.
On Debian-based systems install the locales-all package.
On Ubuntu run locale-gen for each language you want to enable.
For example:
locale-gen es_ES.UTF-8
Then execute:
dpkg-reconfigure locales
On RHEL-based systems run `yum list glibc-langpack-*` and install the languages you want to enable.
If you have already built Anope you will need to delete the build directory and rebuild from scratch.
Building Anope on Windows with gettext support is explained in docs/WIN32.txt
Building Anope on Windows with gettext support is explained in docs/WIN32.md
2) Adding a new language
@@ -34,11 +29,10 @@ Anope Multi Language Support
po files (especially on Windows).
There are several control characters within the messages. These are mostly IRC formatting codes (https://modern.ircdocs.horse/formatting)
but 0x1A is special to Anope and is used to prevent the automatic linewrapper from breaking messages in the middle of
but 0x1B is special to Anope and is used to prevent the automatic linewrapper from breaking messages in the middle of
text that should not be split (e.g. commands). Your editor may not show these so be careful you don't delete them!
If you have finished a language file translation and you want others to use it, please file a pull request on GitHub
or send it to team@anope.org (don't forget to mention clearly your (nick)name, your email and the language name).
If you have finished a language file translation and you want others to use it, please file a pull request on GitHub.
You'll of course get full credit for it.
3) Using languages with modules
+338
View File
@@ -0,0 +1,338 @@
GNU GENERAL PUBLIC LICENSE
Version 2, June 1991
Copyright (C) 1989, 1991 Free Software Foundation, Inc.,
<https://fsf.org/>
Everyone is permitted to copy and distribute verbatim copies
of this license document, but changing it is not allowed.
Preamble
The licenses for most software are designed to take away your
freedom to share and change it. By contrast, the GNU General Public
License is intended to guarantee your freedom to share and change free
software--to make sure the software is free for all its users. This
General Public License applies to most of the Free Software
Foundation's software and to any other program whose authors commit to
using it. (Some other Free Software Foundation software is covered by
the GNU Lesser General Public License instead.) You can apply it to
your programs, too.
When we speak of free software, we are referring to freedom, not
price. Our General Public Licenses are designed to make sure that you
have the freedom to distribute copies of free software (and charge for
this service if you wish), that you receive source code or can get it
if you want it, that you can change the software or use pieces of it
in new free programs; and that you know you can do these things.
To protect your rights, we need to make restrictions that forbid
anyone to deny you these rights or to ask you to surrender the rights.
These restrictions translate to certain responsibilities for you if you
distribute copies of the software, or if you modify it.
For example, if you distribute copies of such a program, whether
gratis or for a fee, you must give the recipients all the rights that
you have. You must make sure that they, too, receive or can get the
source code. And you must show them these terms so they know their
rights.
We protect your rights with two steps: (1) copyright the software, and
(2) offer you this license which gives you legal permission to copy,
distribute and/or modify the software.
Also, for each author's protection and ours, we want to make certain
that everyone understands that there is no warranty for this free
software. If the software is modified by someone else and passed on, we
want its recipients to know that what they have is not the original, so
that any problems introduced by others will not reflect on the original
authors' reputations.
Finally, any free program is threatened constantly by software
patents. We wish to avoid the danger that redistributors of a free
program will individually obtain patent licenses, in effect making the
program proprietary. To prevent this, we have made it clear that any
patent must be licensed for everyone's free use or not licensed at all.
The precise terms and conditions for copying, distribution and
modification follow.
GNU GENERAL PUBLIC LICENSE
TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION
0. This License applies to any program or other work which contains
a notice placed by the copyright holder saying it may be distributed
under the terms of this General Public License. The "Program", below,
refers to any such program or work, and a "work based on the Program"
means either the Program or any derivative work under copyright law:
that is to say, a work containing the Program or a portion of it,
either verbatim or with modifications and/or translated into another
language. (Hereinafter, translation is included without limitation in
the term "modification".) Each licensee is addressed as "you".
Activities other than copying, distribution and modification are not
covered by this License; they are outside its scope. The act of
running the Program is not restricted, and the output from the Program
is covered only if its contents constitute a work based on the
Program (independent of having been made by running the Program).
Whether that is true depends on what the Program does.
1. You may copy and distribute verbatim copies of the Program's
source code as you receive it, in any medium, provided that you
conspicuously and appropriately publish on each copy an appropriate
copyright notice and disclaimer of warranty; keep intact all the
notices that refer to this License and to the absence of any warranty;
and give any other recipients of the Program a copy of this License
along with the Program.
You may charge a fee for the physical act of transferring a copy, and
you may at your option offer warranty protection in exchange for a fee.
2. You may modify your copy or copies of the Program or any portion
of it, thus forming a work based on the Program, and copy and
distribute such modifications or work under the terms of Section 1
above, provided that you also meet all of these conditions:
a) You must cause the modified files to carry prominent notices
stating that you changed the files and the date of any change.
b) You must cause any work that you distribute or publish, that in
whole or in part contains or is derived from the Program or any
part thereof, to be licensed as a whole at no charge to all third
parties under the terms of this License.
c) If the modified program normally reads commands interactively
when run, you must cause it, when started running for such
interactive use in the most ordinary way, to print or display an
announcement including an appropriate copyright notice and a
notice that there is no warranty (or else, saying that you provide
a warranty) and that users may redistribute the program under
these conditions, and telling the user how to view a copy of this
License. (Exception: if the Program itself is interactive but
does not normally print such an announcement, your work based on
the Program is not required to print an announcement.)
These requirements apply to the modified work as a whole. If
identifiable sections of that work are not derived from the Program,
and can be reasonably considered independent and separate works in
themselves, then this License, and its terms, do not apply to those
sections when you distribute them as separate works. But when you
distribute the same sections as part of a whole which is a work based
on the Program, the distribution of the whole must be on the terms of
this License, whose permissions for other licensees extend to the
entire whole, and thus to each and every part regardless of who wrote it.
Thus, it is not the intent of this section to claim rights or contest
your rights to work written entirely by you; rather, the intent is to
exercise the right to control the distribution of derivative or
collective works based on the Program.
In addition, mere aggregation of another work not based on the Program
with the Program (or with a work based on the Program) on a volume of
a storage or distribution medium does not bring the other work under
the scope of this License.
3. You may copy and distribute the Program (or a work based on it,
under Section 2) in object code or executable form under the terms of
Sections 1 and 2 above provided that you also do one of the following:
a) Accompany it with the complete corresponding machine-readable
source code, which must be distributed under the terms of Sections
1 and 2 above on a medium customarily used for software interchange; or,
b) Accompany it with a written offer, valid for at least three
years, to give any third party, for a charge no more than your
cost of physically performing source distribution, a complete
machine-readable copy of the corresponding source code, to be
distributed under the terms of Sections 1 and 2 above on a medium
customarily used for software interchange; or,
c) Accompany it with the information you received as to the offer
to distribute corresponding source code. (This alternative is
allowed only for noncommercial distribution and only if you
received the program in object code or executable form with such
an offer, in accord with Subsection b above.)
The source code for a work means the preferred form of the work for
making modifications to it. For an executable work, complete source
code means all the source code for all modules it contains, plus any
associated interface definition files, plus the scripts used to
control compilation and installation of the executable. However, as a
special exception, the source code distributed need not include
anything that is normally distributed (in either source or binary
form) with the major components (compiler, kernel, and so on) of the
operating system on which the executable runs, unless that component
itself accompanies the executable.
If distribution of executable or object code is made by offering
access to copy from a designated place, then offering equivalent
access to copy the source code from the same place counts as
distribution of the source code, even though third parties are not
compelled to copy the source along with the object code.
4. You may not copy, modify, sublicense, or distribute the Program
except as expressly provided under this License. Any attempt
otherwise to copy, modify, sublicense or distribute the Program is
void, and will automatically terminate your rights under this License.
However, parties who have received copies, or rights, from you under
this License will not have their licenses terminated so long as such
parties remain in full compliance.
5. You are not required to accept this License, since you have not
signed it. However, nothing else grants you permission to modify or
distribute the Program or its derivative works. These actions are
prohibited by law if you do not accept this License. Therefore, by
modifying or distributing the Program (or any work based on the
Program), you indicate your acceptance of this License to do so, and
all its terms and conditions for copying, distributing or modifying
the Program or works based on it.
6. Each time you redistribute the Program (or any work based on the
Program), the recipient automatically receives a license from the
original licensor to copy, distribute or modify the Program subject to
these terms and conditions. You may not impose any further
restrictions on the recipients' exercise of the rights granted herein.
You are not responsible for enforcing compliance by third parties to
this License.
7. If, as a consequence of a court judgment or allegation of patent
infringement or for any other reason (not limited to patent issues),
conditions are imposed on you (whether by court order, agreement or
otherwise) that contradict the conditions of this License, they do not
excuse you from the conditions of this License. If you cannot
distribute so as to satisfy simultaneously your obligations under this
License and any other pertinent obligations, then as a consequence you
may not distribute the Program at all. For example, if a patent
license would not permit royalty-free redistribution of the Program by
all those who receive copies directly or indirectly through you, then
the only way you could satisfy both it and this License would be to
refrain entirely from distribution of the Program.
If any portion of this section is held invalid or unenforceable under
any particular circumstance, the balance of the section is intended to
apply and the section as a whole is intended to apply in other
circumstances.
It is not the purpose of this section to induce you to infringe any
patents or other property right claims or to contest validity of any
such claims; this section has the sole purpose of protecting the
integrity of the free software distribution system, which is
implemented by public license practices. Many people have made
generous contributions to the wide range of software distributed
through that system in reliance on consistent application of that
system; it is up to the author/donor to decide if he or she is willing
to distribute software through any other system and a licensee cannot
impose that choice.
This section is intended to make thoroughly clear what is believed to
be a consequence of the rest of this License.
8. If the distribution and/or use of the Program is restricted in
certain countries either by patents or by copyrighted interfaces, the
original copyright holder who places the Program under this License
may add an explicit geographical distribution limitation excluding
those countries, so that distribution is permitted only in or among
countries not thus excluded. In such case, this License incorporates
the limitation as if written in the body of this License.
9. The Free Software Foundation may publish revised and/or new versions
of the General Public License from time to time. Such new versions will
be similar in spirit to the present version, but may differ in detail to
address new problems or concerns.
Each version is given a distinguishing version number. If the Program
specifies a version number of this License which applies to it and "any
later version", you have the option of following the terms and conditions
either of that version or of any later version published by the Free
Software Foundation. If the Program does not specify a version number of
this License, you may choose any version ever published by the Free Software
Foundation.
10. If you wish to incorporate parts of the Program into other free
programs whose distribution conditions are different, write to the author
to ask for permission. For software which is copyrighted by the Free
Software Foundation, write to the Free Software Foundation; we sometimes
make exceptions for this. Our decision will be guided by the two goals
of preserving the free status of all derivatives of our free software and
of promoting the sharing and reuse of software generally.
NO WARRANTY
11. BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY
FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN
OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES
PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED
OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS
TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU. SHOULD THE
PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING,
REPAIR OR CORRECTION.
12. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING
WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR
REDISTRIBUTE THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES,
INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING
OUT OF THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED
TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY
YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER
PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE
POSSIBILITY OF SUCH DAMAGES.
END OF TERMS AND CONDITIONS
How to Apply These Terms to Your New Programs
If you develop a new program, and you want it to be of the greatest
possible use to the public, the best way to achieve this is to make it
free software which everyone can redistribute and change under these terms.
To do so, attach the following notices to the program. It is safest
to attach them to the start of each source file to most effectively
convey the exclusion of warranty; and each file should have at least
the "copyright" line and a pointer to where the full notice is found.
<one line to give the program's name and a brief idea of what it does.>
Copyright (C) <year> <name of author>
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 2 of the License, or
(at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License along
with this program; if not, see <https://www.gnu.org/licenses/>.
Also add information on how to contact you by electronic and paper mail.
If the program is interactive, make it output a short notice like this
when it starts in an interactive mode:
Gnomovision version 69, Copyright (C) year name of author
Gnomovision comes with ABSOLUTELY NO WARRANTY; for details type `show w'.
This is free software, and you are welcome to redistribute it
under certain conditions; type `show c' for details.
The hypothetical commands `show w' and `show c' should show the appropriate
parts of the General Public License. Of course, the commands you use may
be called something other than `show w' and `show c'; they could even be
mouse-clicks or menu items--whatever suits your program.
You should also get your employer (if you work as a programmer) or your
school, if any, to sign a "copyright disclaimer" for the program, if
necessary. Here is a sample; alter the names:
Yoyodyne, Inc., hereby disclaims all copyright interest in the program
`Gnomovision' (which makes passes at compilers) written by James Hacker.
<signature of Moe Ghoul>, 1 April 1989
Moe Ghoul, President of Vice
This General Public License does not permit incorporating your program into
proprietary programs. If your program is a subroutine library, you may
consider it more useful to permit linking proprietary applications with the
library. If this is what you want to do, use the GNU Lesser General
Public License instead of this License.
+1 -1
View File
@@ -43,7 +43,7 @@ Anope Modules
MODLOAD Load a module
MODRELOAD Reload a module
MODUNLOAD Un-Load a module
MODUNLOAD Unload a module
MODLIST List loaded modules
MODINFO Info about a loaded module
+2 -2
View File
@@ -1,7 +1,7 @@
Anope -- a set of IRC services for IRC networks
-----------------------------------------------
Anope is 2003-2025 Anope Team <team@anope.org>.
Anope is 2003-2026 Anope Team <team@anope.org>.
Based on Epona 2000-2002 PegSoft <epona@pegsoft.net>.
Based on Services 1996-1999 Andrew Church <achurch@achurch.org>.
@@ -166,7 +166,7 @@ Table of Contents
Anope currently works with:
* InspIRCd 3 or later
* InspIRCd 4 or later
* ircd-hybrid 8.2.34 or later
* ircd-ratbox 3 or later
* ngIRCd 19.2 or later
-160
View File
@@ -1,160 +0,0 @@
Anope has Redis database support (https://redis.io/).
This document explains the data structure used by Anope, and explains how
keyspace notification works.
This is not a tutorial on how to use Redis, see https://redis.io/documentation
for that.
Table of Contents
-----------------
1) Data structure
2) Keyspace notifications
3) Examples of modifying, deleting, and creating objects
1) Data structure
There are 4 key namespaces in Anope, they are:
id - The keys in id are used to atomically create object ids for new
objects. For example, if I were to create a new BotInfo I would first:
redis 127.0.0.1:6379> INCR id:BotInfo
To get the object ID of the new object.
ids - The keys in ids contain a set of all object ids of the given type.
For example:
redis 127.0.0.1:6379> SMEMBERS ids:BotInfo
Returns "1", "2", "3", "4", "5", "6", "7", "8" because I have 8 bots that
have IDs 1, 2, 3, 4, 5, 6, 7, and 8, respectively.
hash - The keys in hash are the actual objects, stored as hashes. For
example, if I had just looked up all BotInfo ids and wanted to iterate
over all of them, I would start by:
redis 127.0.0.1:6379> HGETALL hash:BotInfo:1
Which gets all keys and values from the hash of type BotInfo with id 1.
This may return:
"nick" -> "BotServ"
"user" -> "services"
"host" -> "services.anope.org"
"created" -> "1368704765"
value - The keys in value only exist to aid looking up object IDs. They
are sets of object IDs and are used to map key+value pairs to objects.
For example:
redis 127.0.0.1:6379> SMEMBERS value:NickAlias:nick:Adam
Returns a set of object ids of NickAlias objects that have the key
'nick' set to the value 'Adam' in its hash. Clearly this can only
ever contain at most one object, since it is not possible to have
more than one registered nick with the same name, but other keys
will contain more than one, such as:
redis 127.0.0.1:6379> SMEMBERS value:NickCore:email:adam@anope.org
Which would return all accounts with the email "adam@anope.org".
redis 127.0.0.1:6379> SMEMBERS value:ChanAccess:mask:Adam
Which would return all access entries set on the account "Adam".
Behavior similar to SQL's AND, can be achieved using the
SINTER command, which does set intersection on one or more sets.
2) Keyspace notifications
Redis 2.7 (unstable) and 2.8 (stable) and newer support keyspace notifications
(https://redis.io/topics/notifications). This allows Redis to notify Anope of
any external changes to objects in the database. Once notified, Anope will
immediately update the object. Otherwise, Anope keeps all objects in memory
and will not regularly read from the database once started.
You can use this to modify objects in Redis and have them immediately reflected
back into Anope. Additionally you can use this feature to run multiple Anope
instances simultaneously from the same database (see also, Redis database
replication).
To use keyspace notifications you MUST execute
redis 127.0.0.1:6379> CONFIG SET notify-keyspace-events KA
OK
or set notify-keyspace-events in redis.conf properly. Anope always executes
CONFIG SET when it first connects.
If you do not enable keyspace events properly Anope will be UNABLE to see any
object modifications you do.
The key space ids and value are managed entirely by Anope, you do
not (and should not) modify them. Once you modify the object (hash), Anope will
update them for you to correctly reflect any changes made to the object.
Finally, always use atomic operations. If you are inserting a new object with
multiple commands, or inserting multiple objects at once, specifically if the
objects depend on each other, you MUST use a transaction.
3) Examples of modifying, deleting, and creating objects
These examples will ONLY work if you meet the criteria in section 2.
If I want to change the email account 'Adam' to 'Adam@anope.org', I would execute the following:
redis 127.0.0.1:6379> SMEMBERS value:NickCore:display:Adam
Which returns a value of "1", which is the object id I want to modify.
Now to change the email:
redis 127.0.0.1:6379> HSET hash:NickCore:1 email Adam@anope.org
You can now see this in NickServ's INFO command:
-NickServ- Email address: Adam@anope.org
If I want to drop the account "Adam", I would execute the following:
redis 127.0.0.1:6379> SMEMBERS value:NickCore:display:Adam
Which returns a value of "1". I would then check:
redis 127.0.0.1:6379> SMEMBERS value:NickAlias:nc:Adam
To see what nicknames depend on this account to exist, as I will
have to remove those too. This returns the values "2", and "3".
Finally, I can drop the nick using a transaction via:
redis 127.0.0.1:6379> MULTI
OK
redis 127.0.0.1:6379> DEL hash:NickAlias:2
QUEUED
redis 127.0.0.1:6379> DEL hash:NickAlias:3
QUEUED
redis 127.0.0.1:6379> DEL hash:NickCore:1
QUEUED
redis 127.0.0.1:6379> EXEC
Or alternatively simply:
redis 127.0.0.1:6379> DEL hash:NickAlias:2 hash:NickAlias:3 hash:NickCore:1
If I wanted to create a BotServ bot, I would execute the following:
redis 127.0.0.1:6379> INCR id:BotInfo
Which returns a new object ID for me, in this example it will be "8".
Now I can create the object:
HMSET hash:BotInfo:8 nick redis user redis host services.anope.org realname "Anope IRC Services"
Note if you are using HSET instead of HMSET you will need to use a transaction, as shown in the above example.
If you are watching your services logs you will immediately see:
USERS: redis!redis@services.anope.org (Anope IRC Services) connected to the network (services.anope.org)
And the bot redis will be in BotServ's bot list.
Notice how ids:BotInfo and the value keys are updated automatically.
+57
View File
@@ -0,0 +1,57 @@
# Building Anope on Windows
## Dependencies
You will need the following software installed to build Anope:
* [CMake 3.20 or newer](https://cmake.org/download/#latest)
* [Conan 2 or newer](https://conan.io/downloads) (optional if you don't want to build extra modules)
* [NSIS 3 or newer](https://nsis.sourceforge.io/Download)
* [Visual Studio 2022 or newer](https://visualstudio.microsoft.com/downloads/) (*NOT* Visual Studio Code)
## Building
First you need to download the latest version of the Anope source code from [the releases page](https://github.com/anope/anope/releases) and unpack it using Windows Explorer.
---
Once you have the source code unpacked you need open the Command Prompt and move to the directory in which Anope has been unpacked. You can do this by pressing Control+R and then entering `cmd.exe` and pressing enter. Once the terminal opens you can move to the directory using the following command (assuming you unpacked to `C:\Users\Example\Downloads\anope-2.1`):
```cmd
cd C:\Users\Example\Downloads\anope-2.1
```
---
If you want to build with multiple-language support or want to use the enc_argon2, mysql, regex_pcre2, regex_posix, regex_tre, sqlite, or ssl_openssl extra modules you will now need to install the third-party dependencies using Conan. Before you can do this you need to create a Conan profile for C++17 using the following command:
```cmd
conan profile detect
notepad ~\.conan2\profiles\default
```
When Notepad opens you should find the line beginning with `compiler.cppstd=` and replace the entire line with `compiler.cppstd=17` and save the file.
Now you're ready to install the third-party dependencies using the following command:
```cmd
conan install .\src\win32 --build missing --deployer runtime_deploy --deployer-folder .\build\extradll --output-folder .
call .\conanbuild.bat
```
This will probably take a long time if its the first time you have run it.
---
Now you're ready to build Anope.
```cmd
cd .\build
cmake -A x64 -D "CMAKE_BUILD_TYPE=Release" -D "CMAKE_TOOLCHAIN_FILE=conan_toolchain.cmake" ..
msbuild PACKAGE.vcxproj /P:Configuration=Release /P:Platform=x64 /VERBOSITY:MINIMAL
```
Once the build finishes the installer will be available in the build directory. You can install this by opening the directory in Windows Explorer and then running it as you would with most Windows installers.
Once installed Anope will be available at `C:\Program Files\Anope`.
-161
View File
@@ -1,161 +0,0 @@
Anope for Windows
-----------------
1) Building the Source
2) Installation
3) Compiling Modules
4) Other compile options
5) Credits
1) Building the Source
NOTE: If you have downloaded one of the pre-compiled installers, you do
NOT need to complete this step, and you can proceed to step 2.
If you want to build Anope from source on a Win32 system, you will need
to follow this instructions:
1) Download the required files:
* Current Anope source:
https://github.com/anope/anope/releases
* CMake:
https://cmake.org/download/
(NOTE: When installing, tell CMake to add itself to the PATH.)
If you have Visual C++ 10 or 11 (2010/2012) skip ahead to step 2, else you
need to download and install the following free component from Microsoft.
* Microsoft Visual C++ 2010 Express Edition:
http://www.microsoft.com/visualstudio/eng/downloads#d-2010-express
2) Unpack the Anope tarball with your favorite uncompression program
(WinZip or WinRAR, etc).
3) Bring up the Visual C++ Command Prompt; This will launch a
DOS Command Prompt like window, which will set the environment
properties needed to make Anope.
Create a new directory, which will be used to hold the build files. You can make it
be a directory under the source directory unpacked in step 2, or somewhere else entirely.
Change directories to this new folder, by typing:
cd <path to build directory>
e.g.
cd c:\anope-build
4) You now need to configure Anope to your requirements. At the prompt type:
<path to source directory>\Config.exe
NOTE: If you run an Anti-Virus program such as McAfee or Norton, you may
be unable to run this command due to the protection in place. Some Anti-
Virus programs may detect the Anope Configuration Tool as a worm, however
this is not the case. If you are prompted to allow or deny execution of
the script, you should choose allow. If the script fails to run, and no
notice is displayed, please check your Anti-Virus settings before seeking
assistance.
An interactive configuration program should guide you through the install
options. You will be given a choice to use NMake or not. NMake will compile
inside the command prompt window you are in. If you want to build within
the Visual C++ IDE, say no to that option, and it'll create a Solution for
you to open up.
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 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.
The libraries used to build the 'extra' modules are available at
https://github.com/Adam-/windows-scripts.
5) You are now ready to compile. If you said you wanted to use NMake in step 4,
at the prompt type:
nmake
Once you are back at the command prompt again, if there have been no
errors, you are ready to go.
If instead you decided to use the Visual C++ IDE, open up the Anope.sln
file. After the IDE has fully loaded, hit F7 to build everything.
Should you encounter errors with the installation process, check the
messages displayed for advice on resolving them. If you are unable to
resolve the issues yourself, seek assistance on our forums or in our
IRC Support channel.
6) Finally you will need to install Anope. If you said you wanted to use NMake
in step 4, at the prompt type:
nmake install
Otherwise, if you decided to use the Visual C++ IDE, find the project called
INSTALL within the Solution Explorer. Right-click on INSTALL and choose Build.
When you have done this, all the files will be installed to where they belong.
The only thing you need to do is rename "data/anope.example.conf" to be "data/anope.conf",
and then follow the steps to set up Anope.
You have now completed the building phase of Anope for Windows. You can
now move on to the next section, which is related to setting up Anope.
2) Installation
Since Anope for Windows does not use a visual interface, you must do the
configuration with a text editor before proceeding with running Anope
itself.
NOTE: You may need to open the configuration file with Wordpad, or a text
editor which supports UNIX line endings. Opening the configuration file in
Notepad will cause strange characters to appear, and you may not be able to
edit the file correctly.
Open anope.conf, and read through it carefully and adjust the settings
you think you need to adjust.
If you are unsure of the settings, you can go to the dos command prompt
and run "anope.exe --nofork --debug" and watch the information as it
attempts to connect.
You can launch services in two ways. If you are sure that the entered
configuration information is correct, simply double clicking the Anope
executable will cause it to start; no window will pop up. If you'd rather
have a more textual output, you can start at the dos prompt and type in
"anope.exe". If services are successfully started up the dos prompt will
seem to hang; at this point you can safely close the dos window.
3) Compiling Modules
If you want to build other modules than the ones shipped by default, you
will need to rerun Config.exe
4) Other compile options
A) If you have trouble recompiling Anope, you should delete all files and folders
within the build folder you created in step 3 of section 1. Afterwards, follow
the directions from step 4 of section 1 down.
5) Credits
Anope is based on Epona and IRCServices. See CREDITS for more credits and
a complete list of all developers.
Anope's Windows-specific code is provided by:
* Dominick Meglio <codemastr@unrealircd.com>
* Trystan Scott Lee <trystan@nomadirc.net>
* Chris Hogben <heinz@anope.org>
Anope's Windows Installer was made using:
* NSIS 2.20 <http://nsis.sourceforge.net>
+6 -10
View File
@@ -1,8 +1,11 @@
# Set version.cpp to use C++ as well as set its compile flags
set_source_files_properties(version.cpp PROPERTIES LANGUAGE CXX COMPILE_FLAGS "${CXXFLAGS}")
# Generate sysconf.h from the earlier configuration
configure_file(
"${CMAKE_CURRENT_SOURCE_DIR}/sysconf.h.cmake"
"${CMAKE_CURRENT_BINARY_DIR}/sysconf.h"
)
# Generate version-bin executable to modify version.h, setting it's linker flags as well
add_executable(version-bin version.cpp)
set_target_properties(version-bin PROPERTIES LINKER_LANGUAGE CXX LINK_FLAGS "${LDFLAGS}")
set(version_BINARY "$<TARGET_FILE:version-bin>")
# Modify version.h from the above executable, with dependencies to version.cpp
# and all of the source files in the main build
@@ -10,13 +13,6 @@ add_custom_command(OUTPUT ${CMAKE_CURRENT_BINARY_DIR}/version.h ${CMAKE_CURRENT_
COMMAND version-bin ${Anope_SOURCE_DIR} ${CMAKE_CURRENT_BINARY_DIR}/version.h ${CMAKE_CURRENT_BINARY_DIR}/build.h
DEPENDS version-bin ${SRC_SRCS}
)
# Add version-bin to list of files for CPack to ignore
get_filename_component(version_BINARY ${version_BINARY} NAME)
add_to_cpack_ignored_files("${version_BINARY}$" TRUE)
if(NOT WIN32)
add_to_cpack_ignored_files("version.h$" TRUE)
add_to_cpack_ignored_files("build.h$" TRUE)
endif()
# Add a custom target to the above file
add_custom_target(headers DEPENDS ${CMAKE_CURRENT_BINARY_DIR}/version.h ${CMAKE_CURRENT_BINARY_DIR}/build.h)
+16 -10
View File
@@ -1,13 +1,16 @@
/*
*
* (C) 2003-2025 Anope Team
* Contact us at team@anope.org
*
* Please read COPYING and README for further details.
*
* Based on the original code of Epona by Lara.
* Based on the original code of Services by Andy Church.
*/
// Anope IRC Services <https://www.anope.org/>
//
// Copyright (C) 2003-2026 Anope Contributors
//
// Anope is free software. You can use, modify, and/or distribute it under the
// terms of version 2 of the GNU General Public License. See docs/LICENSE.txt
// for the complete terms of this license and docs/AUTHORS.txt for a list of
// contributors.
//
// Based on the original code of Epona by Lara
// Based on the original code of Services by Andy Church
//
// SPDX-License-Identifier: GPL-2.0-only
#pragma once
@@ -64,6 +67,9 @@ public:
*/
virtual ChanAccess *Create() = 0;
virtual void GetAccess(CommandSource& source, const Privilege *p, Anope::map<Anope::string> &access) = 0;
static void SendAccess(CommandSource &source, const Anope::string &pname);
private:
static std::list<AccessProvider *> Providers;
public:
+21 -13
View File
@@ -1,13 +1,16 @@
/*
*
* (C) 2003-2025 Anope Team
* Contact us at team@anope.org
*
* Please read COPYING and README for further details.
*
* Based on the original code of Epona by Lara.
* Based on the original code of Services by Andy Church.
*/
// Anope IRC Services <https://www.anope.org/>
//
// Copyright (C) 2003-2026 Anope Contributors
//
// Anope is free software. You can use, modify, and/or distribute it under the
// terms of version 2 of the GNU General Public License. See docs/LICENSE.txt
// for the complete terms of this license and docs/AUTHORS.txt for a list of
// contributors.
//
// Based on the original code of Epona by Lara
// Based on the original code of Services by Andy Church
//
// SPDX-License-Identifier: GPL-2.0-only
#pragma once
@@ -107,6 +110,11 @@ public:
*/
time_t GetVHostCreated() const;
/** Update the last seen time for the nickname.
* @param u The user who is using the nickname.
*/
void UpdateSeen(User *u);
/** Finds a registered nick
* @param nick The nick to lookup
* @return the nick, if found
@@ -184,7 +192,7 @@ public:
/** Checks whether this account is a services oper or not.
* @return True if this account is a services oper, false otherwise.
*/
virtual bool IsServicesOper() const;
bool IsServicesOper() const;
/** Retrieves the account id for this user */
uint64_t GetId();
@@ -225,7 +233,7 @@ protected:
public:
/* One of these is called when the request goes through */
virtual void OnSuccess() = 0;
virtual void OnSuccess(NickAlias *na) = 0;
virtual void OnFail() = 0;
Module *GetOwner() const { return owner; }
@@ -251,7 +259,7 @@ public:
* If this request is behind held it must still be Released after calling this.
* @param m The module confirming authentication
*/
void Success(Module *m);
void Success(Module *m, NickAlias *na);
/** Used to either finalize this request or marks
* it as dispatched and begins waiting for the module(s)
+21 -15
View File
@@ -1,19 +1,24 @@
/*
*
* (C) 2003-2025 Anope Team
* Contact us at team@anope.org
*
* Please read COPYING and README for further details.
*
* Based on the original code of Epona by Lara.
* Based on the original code of Services by Andy Church.
*/
// Anope IRC Services <https://www.anope.org/>
//
// Copyright (C) 2003-2026 Anope Contributors
//
// Anope is free software. You can use, modify, and/or distribute it under the
// terms of version 2 of the GNU General Public License. See docs/LICENSE.txt
// for the complete terms of this license and docs/AUTHORS.txt for a list of
// contributors.
//
// Based on the original code of Epona by Lara
// Based on the original code of Services by Andy Church
//
// SPDX-License-Identifier: GPL-2.0-only
#pragma once
#include <signal.h>
#include "hashcomp.h"
#define UTF_CPP_CPLUSPLUS 201703L
#include "utfcpp/unchecked.h"
namespace Anope
@@ -53,6 +58,7 @@ namespace Anope
string(const char *_str, size_type n) : _string(_str, n) { }
string(const std::string &_str) : _string(_str) { }
string(const ci::string &_str) : _string(_str.c_str()) { }
string(const std::string_view &_sv) : _string(_sv.begin(), _sv.end()) { }
string(const string &_str, size_type pos, size_type n = npos) : _string(_str._string, pos, n) { }
template <class InputIterator> string(InputIterator first, InputIterator last) : _string(first, last) { }
string(const string &) = default;
@@ -224,12 +230,12 @@ namespace Anope
inline bool is_pos_number_only() const { return this->find_first_not_of("0123456789.") == npos; }
/**
* In IRC messages we use a substitute (ASCII 0x1A) instead of a space
* In IRC messages we use a substitute (ASCII 0x1B) instead of a space
* (ASCII 0x20) so it doesn't get line wrapped when put into a message.
* The line wrapper will convert this to a space before it is sent to
* clients.
*/
inline Anope::string nobreak() const { return this->replace_all_cs("\x20", "\x1A"); }
inline Anope::string nobreak() const { return this->replace_all_cs("\x20", "\x1B"); }
/**
* Replace parts of the string.
@@ -412,9 +418,9 @@ namespace Anope
extern CoreExport string Version();
extern CoreExport string VersionShort();
extern CoreExport string VersionBuildString();
extern CoreExport int VersionMajor();
extern CoreExport int VersionMinor();
extern CoreExport int VersionPatch();
extern CoreExport unsigned VersionMajor();
extern CoreExport unsigned VersionMinor();
extern CoreExport unsigned VersionPatch();
/** Determines if we are still attached to the terminal, and can print
* messages to the user via stderr/stdout.
+14 -7
View File
@@ -1,10 +1,17 @@
/*
*
* (C) 2008-2011 Adam <Adam@anope.org>
* (C) 2008-2025 Anope Team <team@anope.org>
*
* Please read COPYING and README for further details.
*/
// Anope IRC Services <https://www.anope.org/>
//
// Copyright (C) 2003-2026 Anope Contributors
// Copyright (C) 2008-2011 Adam <Adam@anope.org>
//
// Anope is free software. You can use, modify, and/or distribute it under the
// terms of version 2 of the GNU General Public License. See docs/LICENSE.txt
// for the complete terms of this license and docs/AUTHORS.txt for a list of
// contributors.
//
// Based on the original code of Epona by Lara
// Based on the original code of Services by Andy Church
//
// SPDX-License-Identifier: GPL-2.0-only
#pragma once
+17 -8
View File
@@ -1,10 +1,19 @@
/*
*
* (C) 2008-2011 Robin Burchell <w00t@inspircd.org>
* (C) 2008-2025 Anope Team <team@anope.org>
*
* Please read COPYING and README for further details.
*/
// Anope IRC Services <https://www.anope.org/>
//
// Copyright (C) 2003-2026 Anope Contributors
// Copyright (C) 2008-2011 Robin Burchell <w00t@inspircd.org>
//
// Anope is free software. You can use, modify, and/or distribute it under the
// terms of version 2 of the GNU General Public License. See docs/LICENSE.txt
// for the complete terms of this license and docs/AUTHORS.txt for a list of
// contributors.
//
// Based on the original code of Epona by Lara
// Based on the original code of Services by Andy Church
//
// SPDX-License-Identifier: GPL-2.0-only
#pragma once
@@ -124,7 +133,7 @@ public:
* @param message The users' message
* @params tags Message tags
*/
virtual void OnMessage(User *u, const Anope::string &message, const Anope::map<Anope::string> &tags);
void OnMessage(User *u, const Anope::string &message, const Anope::map<Anope::string> &tags);
/** Link a command name to a command in services
* @param cname The command name
+25 -15
View File
@@ -1,10 +1,16 @@
/* Channel support
*
* (C) 2008-2025 Anope Team
* Contact us at team@anope.org
*
* Please read COPYING and README for further details.
*/
// Anope IRC Services <https://www.anope.org/>
//
// Copyright (C) 2003-2026 Anope Contributors
//
// Anope is free software. You can use, modify, and/or distribute it under the
// terms of version 2 of the GNU General Public License. See docs/LICENSE.txt
// for the complete terms of this license and docs/AUTHORS.txt for a list of
// contributors.
//
// Based on the original code of Epona by Lara
// Based on the original code of Services by Andy Church
//
// SPDX-License-Identifier: GPL-2.0-only
#pragma once
@@ -17,8 +23,8 @@ typedef Anope::unordered_map<Channel *> channel_map;
extern CoreExport channel_map ChannelList;
/* A user container, there is one of these per user per channel. */
struct ChanUserContainer final
/* A user's membership to a channel, there is one of these per user per channel. */
struct Membership final
: public Extensible
{
User *user;
@@ -26,7 +32,11 @@ struct ChanUserContainer final
/* Status the user has in the channel */
ChannelStatus status;
ChanUserContainer(User *u, Channel *c) : user(u), chan(c) { }
Membership(User *u, Channel *c)
: user(u)
, chan(c)
{
}
};
class CoreExport Channel final
@@ -55,7 +65,7 @@ public:
bool botchannel = false;
/* Users in the channel */
typedef std::map<User *, ChanUserContainer *> ChanUserList;
typedef std::map<User *, Membership *> ChanUserList;
ChanUserList users;
/* Current topic of the channel */
@@ -108,9 +118,9 @@ public:
/** Join a user internally to the channel
* @param u The user
* @param status The status to give the user, if any
* @return The UserContainer for the user
* @return The membership for the user
*/
ChanUserContainer *JoinUser(User *u, const ChannelStatus *status);
Membership *JoinUser(User *u, const ChannelStatus *status);
/** Remove a user internally from the channel
* @param u The user
@@ -119,9 +129,9 @@ public:
/** Check if the user is on the channel
* @param u The user
* @return A user container if found, else NULL
* @return A membership if found, else NULL
*/
ChanUserContainer *FindUser(User *u) const;
Membership *FindUser(User *u) const;
/** Check if a user has a status on a channel
* @param u The user
+21 -13
View File
@@ -1,13 +1,16 @@
/* Declarations for command data.
*
* (C) 2003-2025 Anope Team
* Contact us at team@anope.org
*
* Please read COPYING and README for further details.
*
* Based on the original code of Epona by Lara.
* Based on the original code of Services by Andy Church.
*/
// Anope IRC Services <https://www.anope.org/>
//
// Copyright (C) 2003-2026 Anope Contributors
//
// Anope is free software. You can use, modify, and/or distribute it under the
// terms of version 2 of the GNU General Public License. See docs/LICENSE.txt
// for the complete terms of this license and docs/AUTHORS.txt for a list of
// contributors.
//
// Based on the original code of Epona by Lara
// Based on the original code of Services by Andy Church
//
// SPDX-License-Identifier: GPL-2.0-only
#pragma once
@@ -87,6 +90,11 @@ public:
void Reply(int count, const char *singular, const char *plural, ...) ATTR_FORMAT(4, 5);
void Reply(const Anope::string &message);
const char *Translate(const char *message);
const char *Translate(const Anope::string &message);
const char *Translate(int count, const char *single, const char *plural);
const char *Translate(int count, const Anope::string &single, const Anope::string &plural);
bool HasCommand(const Anope::string &cmd);
bool HasPriv(const Anope::string &cmd);
bool IsServicesOper();
@@ -132,7 +140,7 @@ protected:
void ClearSyntax();
void SetSyntax(const Anope::string &s, const std::function<bool(CommandSource&)> &p = nullptr);
void SendSyntax(CommandSource &);
virtual void SendSyntax(CommandSource &);
void AllowUnregistered(bool b);
void RequireUser(bool b);
@@ -145,7 +153,7 @@ public:
* @param source The source wanting the command description
* @return The commands description
*/
virtual const Anope::string GetDesc(CommandSource &source) const;
virtual Anope::string GetDesc(CommandSource &source) const;
/** Execute this command.
* @param source The source
@@ -186,5 +194,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 FindFromService(const Anope::string &command_service, BotInfo *&bi, Anope::string &name);
};
+26 -20
View File
@@ -1,13 +1,16 @@
/*
*
* (C) 2003-2025 Anope Team
* Contact us at team@anope.org
*
* Please read COPYING and README for further details.
*
* Based on the original code of Epona by Lara.
* Based on the original code of Services by Andy Church.
*/
// Anope IRC Services <https://www.anope.org/>
//
// Copyright (C) 2003-2026 Anope Contributors
//
// Anope is free software. You can use, modify, and/or distribute it under the
// terms of version 2 of the GNU General Public License. See docs/LICENSE.txt
// for the complete terms of this license and docs/AUTHORS.txt for a list of
// contributors.
//
// Based on the original code of Epona by Lara
// Based on the original code of Services by Andy Church
//
// SPDX-License-Identifier: GPL-2.0-only
#pragma once
@@ -15,6 +18,7 @@
#include "regchannel.h"
#include "users.h"
#include "opertype.h"
#include "miscutils.h"
namespace Configuration
{
@@ -23,14 +27,15 @@ namespace Configuration
friend class Configuration::Conf;
public:
typedef Anope::map<Anope::string> item_map;
typedef Anope::multimap<Block> block_map;
typedef Anope::map<Anope::string> ItemMap;
typedef Anope::multimap<Block> BlockMap;
typedef Anope::iterator_range<BlockMap::const_iterator> BlockList;
private:
Anope::string name;
item_map items;
block_map blocks;
int linenum;
ItemMap items;
BlockMap blocks;
unsigned linenum;
/* Represents a missing tag. */
static Block EmptyBlock;
@@ -38,9 +43,10 @@ namespace Configuration
public:
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);
size_t CountBlock(const Anope::string &name) const;
BlockList GetBlocks(const Anope::string &name) const;
const Block &GetBlock(const Anope::string &name, size_t num = 0) const;
Block *GetMutableBlock(const Anope::string &name, size_t num = 0);
template<typename T> T Get(const Anope::string &tag, const Anope::string &def = "") const
{
@@ -48,7 +54,7 @@ namespace Configuration
}
bool Set(const Anope::string &tag, const Anope::string &value);
const item_map &GetItems() const;
const ItemMap &GetItems() const;
};
template<> CoreExport const Anope::string Block::Get(const Anope::string &tag, const Anope::string &def) const;
@@ -82,7 +88,7 @@ namespace Configuration
{
private:
/** Replaces defined variables within a string. */
Anope::string ReplaceVars(const Anope::string &str, const File &file, int linenumber);
Anope::string ReplaceVars(const Anope::string &str, const File &file, unsigned linenumber);
public:
/* options:readtimeout */
+13 -10
View File
@@ -1,13 +1,16 @@
/*
*
* (C) 2003-2025 Anope Team
* Contact us at team@anope.org
*
* Please read COPYING and README for further details.
*
* Based on the original code of Epona by Lara.
* Based on the original code of Services by Andy Church.
*/
// Anope IRC Services <https://www.anope.org/>
//
// Copyright (C) 2003-2026 Anope Contributors
//
// Anope is free software. You can use, modify, and/or distribute it under the
// terms of version 2 of the GNU General Public License. See docs/LICENSE.txt
// for the complete terms of this license and docs/AUTHORS.txt for a list of
// contributors.
//
// Based on the original code of Epona by Lara
// Based on the original code of Services by Andy Church
//
// SPDX-License-Identifier: GPL-2.0-only
#pragma once
+22 -20
View File
@@ -1,26 +1,27 @@
/*
*
* (C) 2003-2025 Anope Team
* Contact us at team@anope.org
*
* Please read COPYING and README for further details.
*
* Based on the original code of Epona by Lara.
* Based on the original code of Services by Andy Church.
*/
// Anope IRC Services <https://www.anope.org/>
//
// Copyright (C) 2003-2026 Anope Contributors
//
// Anope is free software. You can use, modify, and/or distribute it under the
// terms of version 2 of the GNU General Public License. See docs/LICENSE.txt
// for the complete terms of this license and docs/AUTHORS.txt for a list of
// contributors.
//
// Based on the original code of Epona by Lara
// Based on the original code of Services by Andy Church
//
// SPDX-License-Identifier: GPL-2.0-only
#pragma once
class AccessGroup;
class AutoKick;
class BotInfo;
class CallBack;
namespace BotServ { class BadWord; }
class ChanAccess;
class Channel;
class ChannelInfo;
class ChannelStatus;
struct ModeData;
struct ChanUserContainer;
namespace ChanServ { class AutoKick; class ModeLock; }
class ClientSocket;
class Command;
class CommandSource;
@@ -33,14 +34,21 @@ class InfoFormatter;
class IRCDProto;
class ListenSocket;
class Log;
struct Membership;
class Memo;
struct MemoInfo;
class MessageSource;
struct ModeData;
class Module;
class NickAlias;
class NickCore;
namespace NickServ { struct Cert; }
struct Oper;
namespace OperServ { struct Exception; }
class OperType;
class ReferenceBase;
class Regex;
namespace SASL { struct Message; }
class Serializable;
class Server;
class Socket;
@@ -48,9 +56,3 @@ class Thread;
class User;
class XLine;
class XLineManager;
struct BadWord;
struct Exception;
struct MemoInfo;
struct ModeLock;
struct Oper;
namespace SASL { struct Message; }
+15 -11
View File
@@ -1,10 +1,16 @@
/*
*
* (C) 2003-2025 Anope Team
* Contact us at team@anope.org
*
* Please read COPYING and README for further details.
*/
// Anope IRC Services <https://www.anope.org/>
//
// Copyright (C) 2003-2026 Anope Contributors
//
// Anope is free software. You can use, modify, and/or distribute it under the
// terms of version 2 of the GNU General Public License. See docs/LICENSE.txt
// for the complete terms of this license and docs/AUTHORS.txt for a list of
// contributors.
//
// Based on the original code of Epona by Lara
// Based on the original code of Services by Andy Church
//
// SPDX-License-Identifier: GPL-2.0-only
#pragma once
@@ -179,7 +185,7 @@ public:
void ExtensibleUnserialize(Extensible *e, Serializable *s, Serialize::Data &data) override
{
T t;
if (data[this->name] >> t)
if (data.TryLoad(this->name, t))
this->Set(e, t);
else
this->Unset(e);
@@ -199,9 +205,7 @@ public:
void ExtensibleUnserialize(Extensible *e, Serializable *s, Serialize::Data &data) override
{
bool b = false;
data[this->name] >> b;
if (b)
if (data.Load<bool>(this->name))
this->Set(e);
else
this->Unset(e);
+14 -7
View File
@@ -1,10 +1,17 @@
/*
*
* (C) 2002-2011 InspIRCd Development Team
* (C) 2009-2025 Anope Team <team@anope.org>
*
* Please read COPYING and README for further details.
*/
// Anope IRC Services <https://www.anope.org/>
//
// Copyright (C) 2003-2026 Anope Contributors
// Copyright (C) 2009-2011 InspIRCd Development Team
//
// Anope is free software. You can use, modify, and/or distribute it under the
// terms of version 2 of the GNU General Public License. See docs/LICENSE.txt
// for the complete terms of this license and docs/AUTHORS.txt for a list of
// contributors.
//
// Based on the original code of Epona by Lara
// Based on the original code of Services by Andy Church
//
// SPDX-License-Identifier: GPL-2.0-only
#pragma once
+85 -63
View File
@@ -1,10 +1,16 @@
/*
*
* (C) 2008-2025 Anope Team
* Contact us at team@anope.org
*
* Please read COPYING and README for further details.
*/
// Anope IRC Services <https://www.anope.org/>
//
// Copyright (C) 2003-2026 Anope Contributors
//
// Anope is free software. You can use, modify, and/or distribute it under the
// terms of version 2 of the GNU General Public License. See docs/LICENSE.txt
// for the complete terms of this license and docs/AUTHORS.txt for a list of
// contributors.
//
// Based on the original code of Epona by Lara
// Based on the original code of Services by Andy Church
//
// SPDX-License-Identifier: GPL-2.0-only
#pragma once
@@ -35,6 +41,14 @@ namespace Language
*/
extern void InitLanguages();
/** Sets the locale to the specified language.
* @param lang The language to translate to.
*/
extern CoreExport void SetLocale(const char *lang);
/** Sets the locale back to the default. */
extern CoreExport void ResetLocale();
/** Translates a string to the default language.
* @param string A string to translate
* @return The translated string if found, else the original string.
@@ -100,59 +114,67 @@ namespace Language
} // namespace Language
/* Commonly used language strings */
#define CONFIRM_DROP _("Please confirm that you want to drop \002%s\002 with \002%s\032%s\032%s\002")
#define SERVICE_UNAVAILABLE _("Sorry, %s is temporarily unavailable.")
#define MORE_INFO _("Type \002%s\002 for more information.")
#define BAD_USERHOST_MASK _("Mask must be in the form \037user\037@\037host\037.")
#define BAD_EXPIRY_TIME _("Invalid expiry time.")
#define USERHOST_MASK_TOO_WIDE _("%s coverage is too wide; Please use a more specific mask.")
#define READ_ONLY_MODE _("Services are temporarily in read-only mode.")
#define PASSWORD_INCORRECT _("Password incorrect.")
#define ACCESS_DENIED _("Access denied.")
#define MORE_OBSCURE_PASSWORD _("Please try again with a more obscure password. Passwords should not be " \
"something that could be easily guessed (e.g. your real name or your nick) and " \
"cannot contain the space or tab characters.")
#define PASSWORD_TOO_SHORT _("Your password is too short. It must be longer than %u characters.")
#define PASSWORD_TOO_LONG _("Your password is too long. It must be shorter than %u characters.")
#define NICK_X_NOT_REGISTERED _("Nick \002%s\002 isn't registered.")
#define NICK_X_NOT_IN_USE _("Nick \002%s\002 isn't currently in use.")
#define NICK_X_NOT_ON_CHAN _("\002%s\002 is not currently on channel %s.")
#define NICK_X_SUSPENDED _("Nick %s is currently suspended.")
#define CHAN_X_SUSPENDED _("Channel %s is currently suspended.")
#define CHAN_X_NOT_REGISTERED _("Channel \002%s\002 isn't registered.")
#define CHAN_X_NOT_IN_USE _("Channel \002%s\002 doesn't exist.")
#define NICK_IDENTIFY_REQUIRED _("You must be logged into an account to use that command.")
#define MAIL_X_INVALID _("\002%s\002 is not a valid email address.")
#define UNKNOWN _("<unknown>")
#define NO_EXPIRE _("does not expire")
#define LIST_INCORRECT_RANGE _("Incorrect range specified. The correct syntax is \002#\037from\037-\037to\037\002.")
#define NICK_CANNOT_BE_REGISTERED _("Nickname \002%s\002 may not be registered.")
#define NICK_ALREADY_REGISTERED _("Nickname \002%s\002 is already registered!")
#define NICK_SET_DISPLAY_CHANGED _("The new display is now \002%s\002.")
#define CHAN_NOT_ALLOWED_TO_JOIN _("You are not permitted to be on this channel.")
#define CHAN_X_INVALID _("Channel %s is not a valid channel.")
#define CHAN_REACHED_CHANNEL_LIMIT _("Sorry, you have already reached your limit of \002%d\002 channels.")
#define CHAN_EXCEEDED_CHANNEL_LIMIT _("Sorry, you have already exceeded your limit of \002%d\002 channels.")
#define CHAN_SYMBOL_REQUIRED _("Please use the symbol of \002#\002 when attempting to register.")
#define CHAN_SETTING_CHANGED _("%s for %s set to %s.")
#define CHAN_SETTING_UNSET _("%s for %s unset.")
#define CHAN_ACCESS_LEVEL_RANGE _("Access level must be between %d and %d inclusive.")
#define CHAN_INFO_HEADER _("Information about channel \002%s\002:")
#define CHAN_EXCEPTED _("\002%s\002 matches an except on %s and cannot be banned until the except has been removed.")
#define MEMO_NEW_X_MEMO_ARRIVED _("There is a new memo on channel %s. " \
"Type \002%s\032%s\032%zu\002 to read it.")
#define MEMO_NEW_MEMO_ARRIVED _("You have a new memo from %s. " \
"Type \002%s\032%zu\002 to read it.")
#define MEMO_HAVE_NO_MEMOS _("You have no memos.")
#define MEMO_X_HAS_NO_MEMOS _("%s has no memos.")
#define MEMO_HAVE_NO_NEW_MEMOS _("You have no new memos.")
#define MEMO_X_HAS_NO_NEW_MEMOS _("%s has no new memos.")
#define BOT_DOES_NOT_EXIST _("Bot \002%s\002 does not exist.")
#define BOT_NOT_ASSIGNED _("You must assign a bot to the channel before using this command.")
#define BOT_NOT_ON_CHANNEL _("Bot is not on channel \002%s\002.")
#define HOST_SET_ERROR _("A vhost must be in the format of a valid hostname.")
#define HOST_SET_IDENT_ERROR _("A vident must be in the format of a valid ident.")
#define HOST_SET_TOOLONG _("Error! The vhost is too long, please use a hostname shorter than %zu characters.")
#define HOST_SET_IDENTTOOLONG _("Error! The vident is too long, please use an ident shorter than %zu characters.")
#define HOST_NOT_ASSIGNED _("Please contact an Operator to get a vhost assigned to this nick.")
#define HOST_NO_VIDENT _("Your IRCd does not support vidents. If this is incorrect please report this as a possible bug.")
#define ACCESS_DENIED _("Access denied.")
#define BAD_EXPIRY_TIME _("Invalid expiry time.")
#define BAD_USERHOST_MASK _("Mask must be in the form \037user\037@\037host\037.")
#define CONFIRM_DROP _("Please confirm that you want to drop \002%s\002 with \002%s\033%s\033%s\002")
#define CONFIRM_REGISTER_ADMIN _("All new accounts must be confirmed by an administrator. Please wait for your registration to be confirmed.")
#define CONFIRM_REGISTER_CODE _("All new accounts must be confirmed. To confirm your account, type \002%s\002.")
#define CONFIRM_REGISTER_MAIL _("All new accounts must be confirmed. To confirm your account, follow the instructions that were emailed to you.")
#define LIST_INCORRECT_RANGE _("Incorrect range specified. The correct syntax is \002#\037from\037-\037to\037\002.")
#define MAIL_X_INVALID _("\002%s\002 is not a valid email address.")
#define MORE_INFO _("Type \002%s\002 for more information.")
#define NO_EXPIRE _("does not expire")
#define PASSWORD_INCORRECT _("Password incorrect.")
#define READ_ONLY_MODE _("Services are temporarily in read-only mode.")
#define TIME_NEVER _("Never")
#define TIME_NOW _("Now")
#define TIME_UNKNOWN _("Unknown")
#define TRY_AGAIN_LATER _("The \002%s\002 command is temporarily unavailable. Please try again later.")
#define USERHOST_MASK_TOO_WIDE _("%s coverage is too wide; Please use a more specific mask.")
#define BOT_DOES_NOT_EXIST _("Bot \002%s\002 does not exist.")
#define BOT_NOT_ASSIGNED _("You must assign a bot to the channel before using this command.")
#define BOT_NOT_ON_CHANNEL _("Bot is not on channel \002%s\002.")
#define CHAN_ACCESS_LIMIT N_("You can only have %u access entry on a channel.", "You can only have %u access entries on a channel.")
#define CHAN_ACCESS_LIMIT_DEEP N_("You can only have %u access entry on a channel, including access entries from other channels.", "You can only have %u access entries on a channel, including access entries from other channels.")
#define CHAN_ACCESS_LEVEL_RANGE _("Access level must be between %d and %d inclusive.")
#define CHAN_ACCESS_MALFORMED _("You cannot add a malformed mask to an access list. Did you mean to add %s instead?")
#define CHAN_ACCESS_FOREIGN N_("%u access entry from other access systems not shown; use \002%s\033ALL\002 to view all access entries.", "%u access entries from other access systems not shown; use \002%s\033ALL\002 to view all access entries.")
#define CHAN_EXCEPTED _("\002%s\002 matches an except on %s and cannot be banned until the except has been removed.")
#define CHAN_INFO_HEADER _("Information about channel \002%s\002:")
#define CHAN_LIMIT_EXCEEDED _("You have already exceeded your limit of \002%d\002 channels.")
#define CHAN_LIMIT_REACHED _("You have already reached your limit of \002%d\002 channels.")
#define CHAN_NOT_ALLOWED_TO_JOIN _("You are not permitted to be on this channel.")
#define CHAN_SETTING_CHANGED _("%s for %s set to %s.")
#define CHAN_SETTING_INVALID _("%s syntax is invalid.")
#define CHAN_SETTING_UNSET _("%s for %s unset.")
#define CHAN_SYMBOL_REQUIRED _("Please use the symbol of \002#\002 when attempting to register.")
#define CHAN_X_INVALID _("Channel %s is not a valid channel.")
#define CHAN_X_NOT_IN_USE _("Channel \002%s\002 doesn't exist.")
#define CHAN_X_NOT_REGISTERED _("Channel \002%s\002 isn't registered.")
#define CHAN_X_SUSPENDED _("Channel %s is currently suspended.")
#define HOST_NO_VIDENT _("Your IRCd does not support vidents. If this is incorrect please report this as a possible bug.")
#define HOST_NOT_ASSIGNED _("Please contact an Operator to get a vhost assigned to this nick.")
#define HOST_SET_VHOST_ERROR _("A vhost must be in the format of a valid hostname.")
#define HOST_SET_VHOST_TOO_LONG _("Error! The vhost is too long, please use a hostname shorter than %zu characters.")
#define HOST_SET_VIDENT_ERROR _("A vident must be in the format of a valid ident.")
#define HOST_SET_VIDENT_TOO_LONG _("Error! The vident is too long, please use an ident shorter than %zu characters.")
#define MEMO_HAVE_NO_MEMOS _("You have no memos.")
#define MEMO_HAVE_NO_NEW_MEMOS _("You have no new memos.")
#define MEMO_NEW_MEMO_ARRIVED _("You have a new memo from %s. Type \002%s\033%zu\002 to read it.")
#define MEMO_NEW_X_MEMO_ARRIVED _("There is a new memo on channel %s. Type \002%s\033%s\033%zu\002 to read it.")
#define MEMO_X_HAS_NO_MEMOS _("%s has no memos.")
#define MEMO_X_HAS_NO_NEW_MEMOS _("%s has no new memos.")
#define NICK_ALREADY_REGISTERED _("Nickname \002%s\002 is already registered!")
#define NICK_CANNOT_BE_REGISTERED _("Nickname \002%s\002 may not be registered.")
#define NICK_IDENTIFY_REQUIRED _("You must be logged into an account to use that command.")
#define NICK_SET_DISPLAY_CHANGED _("The new display is now \002%s\002.")
#define NICK_X_NOT_IN_USE _("Nick \002%s\002 isn't currently in use.")
#define NICK_X_NOT_ON_CHAN _("\002%s\002 is not currently on channel %s.")
#define NICK_X_NOT_REGISTERED _("Nick \002%s\002 isn't registered.")
#define NICK_X_SUSPENDED _("Nick %s is currently suspended.")
+13 -10
View File
@@ -1,13 +1,16 @@
/*
*
* (C) 2003-2025 Anope Team
* Contact us at team@anope.org
*
* Please read COPYING and README for further details.
*
* Based on the original code of Epona by Lara.
* Based on the original code of Services by Andy Church.
*/
// Anope IRC Services <https://www.anope.org/>
//
// Copyright (C) 2003-2026 Anope Contributors
//
// Anope is free software. You can use, modify, and/or distribute it under the
// terms of version 2 of the GNU General Public License. See docs/LICENSE.txt
// for the complete terms of this license and docs/AUTHORS.txt for a list of
// contributors.
//
// Based on the original code of Epona by Lara
// Based on the original code of Services by Andy Church
//
// SPDX-License-Identifier: GPL-2.0-only
#pragma once
+13 -10
View File
@@ -1,13 +1,16 @@
/*
*
* (C) 2003-2025 Anope Team
* Contact us at team@anope.org
*
* Please read COPYING and README for further details.
*
* Based on the original code of Epona by Lara.
* Based on the original code of Services by Andy Church.
*/
// Anope IRC Services <https://www.anope.org/>
//
// Copyright (C) 2003-2026 Anope Contributors
//
// Anope is free software. You can use, modify, and/or distribute it under the
// terms of version 2 of the GNU General Public License. See docs/LICENSE.txt
// for the complete terms of this license and docs/AUTHORS.txt for a list of
// contributors.
//
// Based on the original code of Epona by Lara
// Based on the original code of Services by Andy Church
//
// SPDX-License-Identifier: GPL-2.0-only
#pragma once
+13 -10
View File
@@ -1,13 +1,16 @@
/*
*
* (C) 2003-2025 Anope Team
* Contact us at team@anope.org
*
* Please read COPYING and README for further details.
*
* Based on the original code of Epona by Lara.
* Based on the original code of Services by Andy Church.
*/
// Anope IRC Services <https://www.anope.org/>
//
// Copyright (C) 2003-2026 Anope Contributors
//
// Anope is free software. You can use, modify, and/or distribute it under the
// terms of version 2 of the GNU General Public License. See docs/LICENSE.txt
// for the complete terms of this license and docs/AUTHORS.txt for a list of
// contributors.
//
// Based on the original code of Epona by Lara
// Based on the original code of Services by Andy Church
//
// SPDX-License-Identifier: GPL-2.0-only
#pragma once
+13 -10
View File
@@ -1,13 +1,16 @@
/*
*
* (C) 2003-2025 Anope Team
* Contact us at team@anope.org
*
* Please read COPYING and README for further details.
*
* Based on the original code of Epona by Lara.
* Based on the original code of Services by Andy Church.
*/
// Anope IRC Services <https://www.anope.org/>
//
// Copyright (C) 2003-2026 Anope Contributors
//
// Anope is free software. You can use, modify, and/or distribute it under the
// terms of version 2 of the GNU General Public License. See docs/LICENSE.txt
// for the complete terms of this license and docs/AUTHORS.txt for a list of
// contributors.
//
// Based on the original code of Epona by Lara
// Based on the original code of Services by Andy Church
//
// SPDX-License-Identifier: GPL-2.0-only
#pragma once
+13 -10
View File
@@ -1,13 +1,16 @@
/*
*
* (C) 2003-2025 Anope Team
* Contact us at team@anope.org
*
* Please read COPYING and README for further details.
*
* Based on the original code of Epona by Lara.
* Based on the original code of Services by Andy Church.
*/
// Anope IRC Services <https://www.anope.org/>
//
// Copyright (C) 2003-2026 Anope Contributors
//
// Anope is free software. You can use, modify, and/or distribute it under the
// terms of version 2 of the GNU General Public License. See docs/LICENSE.txt
// for the complete terms of this license and docs/AUTHORS.txt for a list of
// contributors.
//
// Based on the original code of Epona by Lara
// Based on the original code of Services by Andy Church
//
// SPDX-License-Identifier: GPL-2.0-only
#pragma once
+87
View File
@@ -0,0 +1,87 @@
// Anope IRC Services <https://www.anope.org/>
//
// Copyright (C) 2003-2026 Anope Contributors
//
// Anope is free software. You can use, modify, and/or distribute it under the
// terms of version 2 of the GNU General Public License. See docs/LICENSE.txt
// for the complete terms of this license and docs/AUTHORS.txt for a list of
// contributors.
//
// Based on the original code of Epona by Lara
// Based on the original code of Services by Andy Church
//
// SPDX-License-Identifier: GPL-2.0-only
#pragma once
#include <iterator>
#include <utility>
namespace Anope
{
template <typename Iterator>
class iterator_range;
/** Returns a range containing all elements equivalent to \p value.
* @param collection The collection to search within.
* @param value The value to search for.
*/
template <typename Collection, typename Value>
auto equal_range(const Collection& collection, const Value& value)
{
return iterator_range(collection.equal_range(value));
}
/** Returns a range representing a reverse iterator for the specified colleciton.
* @param collection The collection to create a reverse iterator for.
*/
template <typename Collection>
auto reverse_range(const Collection& collection)
{
return iterator_range(collection.rbegin(), collection.rend());
}
}
/** Represents a range of iterators. */
template <typename Iterator>
class Anope::iterator_range final
{
private:
/** An iterator which points to the start of the range. */
const Iterator begini;
/* An iterator which points to one past the end of the range. */
const Iterator endi;
public:
/** Initialises a new iterator range with the specified iterators.
* @param begin An iterator which points to the start of the range.
* @param end An iterator which points to one past the end of the range.
*/
explicit iterator_range(Iterator begin, Iterator end)
: begini(begin)
, endi(end)
{
}
/** Initialises a new iterator range from a pair of iterators.
* @param range A pair of iterators in the format [first, last).
*/
explicit iterator_range(std::pair<Iterator, Iterator> range)
: begini(range.first)
, endi(range.second)
{
}
/** Determines whether the iterator range is empty. */
bool empty() const { return begini == endi; }
/** Retrieves an iterator which points to the start of the range. */
const Iterator& begin() const { return begini; }
/** Retrieves an iterator which points to one past the end of the range. */
const Iterator& end() const { return endi; }
/** Retrieves the number of hops within the iterator range. */
typename std::iterator_traits<Iterator>::difference_type count() const { return std::distance(begini, endi); }
};
+27 -17
View File
@@ -1,10 +1,17 @@
/* Mode support
*
* (C) 2008-2011 Adam <Adam@anope.org>
* (C) 2008-2025 Anope Team <team@anope.org>
*
* Please read COPYING and README for further details.
*/
// Anope IRC Services <https://www.anope.org/>
//
// Copyright (C) 2003-2026 Anope Contributors
// Copyright (C) 2008-2011 Adam <Adam@anope.org>
//
// Anope is free software. You can use, modify, and/or distribute it under the
// terms of version 2 of the GNU General Public License. See docs/LICENSE.txt
// for the complete terms of this license and docs/AUTHORS.txt for a list of
// contributors.
//
// Based on the original code of Epona by Lara
// Based on the original code of Services by Andy Church
//
// SPDX-License-Identifier: GPL-2.0-only
#pragma once
@@ -235,11 +242,9 @@ template<typename T>
class CoreExport ChannelModeVirtual
: public T
{
private:
ChannelMode *basech;
protected:
Anope::string base;
ChannelMode *basech;
public:
ChannelModeVirtual(const Anope::string &mname, const Anope::string &basename);
@@ -256,16 +261,20 @@ public:
/* The status a user has on a channel (+v, +h, +o) etc */
class CoreExport ChannelStatus final
{
Anope::string modes;
private:
std::set<ChannelMode *> modes;
static bool IsValidMode(ChannelMode *cm);
public:
ChannelStatus() = default;
ChannelStatus(const Anope::string &modes);
void AddMode(char c);
void DelMode(char c);
bool HasMode(char c) const;
void AddMode(ChannelMode *cm);
void DelMode(ChannelMode *cm);
bool HasMode(ChannelMode *cm) const;
bool Empty() const;
void Clear();
const Anope::string &Modes() const;
const auto &Modes() const { return modes; }
Anope::string BuildModePrefixList() const;
};
@@ -434,17 +443,18 @@ public:
Anope::string nick, user, host, real;
/** Constructor
* @param mask A full or partial nick!ident@host/cidr#real name mask
* @param mode What mode this host is for, can be empty for unknown/no mode
* @param host A full or partial nick!ident@host/cidr#real name mask
* @Param real Whether to allow a real name in the mask.
*/
Entry(const Anope::string &mode, const Anope::string &host);
Entry(const Anope::string &mask, const Anope::string &mode = "", bool real = true);
/** Get the banned mask for this entry
* @return The mask
*/
Anope::string GetMask() const;
Anope::string GetNUHMask() const;
Anope::string GetCleanMask() const;
/** Check if this entry matches a user
* @param u The user
+13 -15
View File
@@ -1,13 +1,16 @@
/*
*
* (C) 2003-2025 Anope Team
* Contact us at team@anope.org
*
* Please read COPYING and README for further details.
*
* Based on the original code of Epona by Lara.
* Based on the original code of Services by Andy Church.
*/
// Anope IRC Services <https://www.anope.org/>
//
// Copyright (C) 2003-2026 Anope Contributors
//
// Anope is free software. You can use, modify, and/or distribute it under the
// terms of version 2 of the GNU General Public License. See docs/LICENSE.txt
// for the complete terms of this license and docs/AUTHORS.txt for a list of
// contributors.
//
// Based on the original code of Epona by Lara
// Based on the original code of Services by Andy Church
//
// SPDX-License-Identifier: GPL-2.0-only
#pragma once
@@ -45,8 +48,3 @@
#include "uplink.h"
#include "users.h"
#include "xline.h"
#include "modules/chanserv/service.h"
#include "modules/global/service.h"
#include "modules/memoserv/service.h"
#include "modules/nickserv/service.h"
+51 -37
View File
@@ -1,13 +1,16 @@
/* Modular support
*
* (C) 2003-2025 Anope Team
* Contact us at team@anope.org
*
* Please read COPYING and README for further details.
*
* Based on the original code of Epona by Lara.
* Based on the original code of Services by Andy Church.
*/
// Anope IRC Services <https://www.anope.org/>
//
// Copyright (C) 2003-2026 Anope Contributors
//
// Anope is free software. You can use, modify, and/or distribute it under the
// terms of version 2 of the GNU General Public License. See docs/LICENSE.txt
// for the complete terms of this license and docs/AUTHORS.txt for a list of
// contributors.
//
// Based on the original code of Epona by Lara
// Based on the original code of Services by Andy Church
//
// SPDX-License-Identifier: GPL-2.0-only
#pragma once
@@ -166,7 +169,7 @@ typedef unsigned short ModType;
struct ModuleVersionC final
{
int version_major, version_minor, version_patch;
unsigned version_major, version_minor, version_patch;
};
/** Returned by Module::GetVersion, used to see what version of Anope
@@ -175,9 +178,9 @@ struct ModuleVersionC final
class ModuleVersion final
{
private:
int version_major;
int version_minor;
int version_patch;
unsigned version_major;
unsigned version_minor;
unsigned version_patch;
public:
ModuleVersion(const ModuleVersionC &);
@@ -185,17 +188,17 @@ public:
/** Get the major version of Anope this was built against
* @return The major version
*/
int GetMajor() const;
unsigned GetMajor() const;
/** Get the minor version of Anope this was built against
* @return The minor version
*/
int GetMinor() const;
unsigned GetMinor() const;
/** Get the patch version this was built against
* @return The patch version
*/
int GetPatch() const;
unsigned GetPatch() const;
};
class CoreExport NotImplementedException final
@@ -289,10 +292,10 @@ public:
/** Called before a user has been kicked from a channel.
* @param source The kicker
* @param cu The user, channel, and status of the user being kicked
* @param memb The membership for the user who is being kicked
* @param kickmsg The reason for the kick.
*/
virtual void OnPreUserKicked(const MessageSource &source, ChanUserContainer *cu, const Anope::string &kickmsg) ATTR_NOT_NULL(3) { throw NotImplementedException(); }
virtual void OnPreUserKicked(const MessageSource &source, Membership *memb, const Anope::string &kickmsg) ATTR_NOT_NULL(3) { throw NotImplementedException(); }
/** Called when a user has been kicked from a channel.
* @param source The kicker
@@ -415,13 +418,13 @@ public:
* @param ci The channel
* @param bw The badword
*/
virtual void OnBadWordAdd(ChannelInfo *ci, const BadWord *bw) ATTR_NOT_NULL(2, 3) { throw NotImplementedException(); }
virtual void OnBadWordAdd(ChannelInfo *ci, const BotServ::BadWord *bw) ATTR_NOT_NULL(2, 3) { throw NotImplementedException(); }
/** Called before a badword is deleted from a channel
* @param ci The channel
* @param bw The badword
*/
virtual void OnBadWordDel(ChannelInfo *ci, const BadWord *bw) ATTR_NOT_NULL(2, 3) { throw NotImplementedException(); }
virtual void OnBadWordDel(ChannelInfo *ci, const BotServ::BadWord *bw) ATTR_NOT_NULL(2, 3) { throw NotImplementedException(); }
/** Called when a bot is created or destroyed
*/
@@ -530,13 +533,13 @@ public:
* @param ex The exception
* @return EVENT_CONTINUE to let other modules decide, EVENT_STOP to halt the command and not process it
*/
virtual EventReturn OnExceptionAdd(Exception *ex) ATTR_NOT_NULL(2) { throw NotImplementedException(); }
virtual EventReturn OnExceptionAdd(OperServ::Exception *ex) ATTR_NOT_NULL(2) { throw NotImplementedException(); }
/** Called before an exception is deleted
* @param source The source deleting it
* @param ex The exception
*/
virtual void OnExceptionDel(CommandSource &source, Exception *ex) ATTR_NOT_NULL(3) { throw NotImplementedException(); }
virtual void OnExceptionDel(CommandSource &source, OperServ::Exception *ex) ATTR_NOT_NULL(3) { throw NotImplementedException(); }
/** Called before a XLine is added
* @param source The source of the XLine
@@ -598,15 +601,17 @@ public:
* @param ci The channel
* @param source The source of the command
* @param access The access entry that was removed
* @param migrated Whether the access entry was deleted because of being migrated to another system.
*/
virtual void OnAccessDel(ChannelInfo *ci, CommandSource &source, ChanAccess *access) ATTR_NOT_NULL(2, 4) { throw NotImplementedException(); }
virtual void OnAccessDel(ChannelInfo *ci, CommandSource &source, ChanAccess *access, bool migrated) ATTR_NOT_NULL(2, 4) { throw NotImplementedException(); }
/** Called when access is added
* @param ci The channel
* @param source The source of the command
* @param access The access changed
* @param migrated Whether the access entry was added because of being migrated to another system.
*/
virtual void OnAccessAdd(ChannelInfo *ci, CommandSource &source, ChanAccess *access) ATTR_NOT_NULL(2, 4) { throw NotImplementedException(); }
virtual void OnAccessAdd(ChannelInfo *ci, CommandSource &source, ChanAccess *access, bool migrated) ATTR_NOT_NULL(2, 4) { throw NotImplementedException(); }
/** Called when the access list is cleared
* @param ci The channel
@@ -669,14 +674,14 @@ public:
* @param ci The channel
* @param ak The akick
*/
virtual void OnAkickAdd(CommandSource &source, ChannelInfo *ci, const AutoKick *ak) ATTR_NOT_NULL(3, 4) { throw NotImplementedException(); }
virtual void OnAKickAdd(CommandSource &source, ChannelInfo *ci, const ChanServ::AutoKick *ak) ATTR_NOT_NULL(3, 4) { throw NotImplementedException(); }
/** Called before removing an akick from a channel
* @param source The source of the command
* @param ci The channel
* @param ak The akick
*/
virtual void OnAkickDel(CommandSource &source, ChannelInfo *ci, const AutoKick *ak) ATTR_NOT_NULL(3, 4) { throw NotImplementedException(); }
virtual void OnAKickDel(CommandSource &source, ChannelInfo *ci, const ChanServ::AutoKick *ak) ATTR_NOT_NULL(3, 4) { throw NotImplementedException(); }
/** Called after a user join a channel when we decide whether to kick them or not
* @param u The user
@@ -739,7 +744,7 @@ public:
/** Called when a nick is registered
* @param user The user registering the nick, of any
* @param The nick
* @param na The nick
* @param pass The password of the newly registered nick
*/
virtual void OnNickRegister(User *user, NickAlias *na, const Anope::string &pass) ATTR_NOT_NULL(3) { throw NotImplementedException(); }
@@ -790,13 +795,13 @@ public:
* @param nc The nick
* @param entry The entry
*/
virtual void OnNickAddCert(NickCore *nc, const Anope::string &entry) ATTR_NOT_NULL(2) { throw NotImplementedException(); }
virtual void OnNickAddCert(NickCore *nc, const NickServ::Cert *entry) ATTR_NOT_NULL(2, 3) { throw NotImplementedException(); }
/** Called from NickCore::EraseCert()
* @param nc pointer to the NickCore
* @param entry The fingerprint
*/
virtual void OnNickEraseCert(NickCore *nc, const Anope::string &entry) ATTR_NOT_NULL(2) { throw NotImplementedException(); }
virtual void OnNickEraseCert(NickCore *nc, const NickServ::Cert *entry) ATTR_NOT_NULL(2, 3) { throw NotImplementedException(); }
/** Called when a user requests info for a nick
* @param source The user requesting info
@@ -916,14 +921,14 @@ public:
* @param lock The mode lock
* @return EVENT_CONTINUE to let other modules decide, EVENT_STOP to deny the mlock.
*/
virtual EventReturn OnMLock(ChannelInfo *ci, ModeLock *lock) ATTR_NOT_NULL(2, 3) { throw NotImplementedException(); }
virtual EventReturn OnMLock(ChannelInfo *ci, ChanServ::ModeLock *lock) ATTR_NOT_NULL(2, 3) { throw NotImplementedException(); }
/** Called when a mode is about to be unlocked
* @param ci The channel the mode is being unlocked from
* @param lock The mode lock
* @return EVENT_CONTINUE to let other modules decide, EVENT_STOP to deny the mlock.
*/
virtual EventReturn OnUnMLock(ChannelInfo *ci, ModeLock *lock) ATTR_NOT_NULL(2, 3) { throw NotImplementedException(); }
virtual EventReturn OnUnMLock(ChannelInfo *ci, ChanServ::ModeLock *lock) ATTR_NOT_NULL(2, 3) { throw NotImplementedException(); }
/** Called after a module is loaded
* @param u The user loading the module, can be NULL
@@ -1013,10 +1018,11 @@ public:
*/
virtual void OnSetCorrectModes(User *user, Channel *chan, AccessGroup &access, bool &give_modes, bool &take_modes) ATTR_NOT_NULL(2, 3) { throw NotImplementedException(); }
virtual void OnSerializeCheck(Serialize::Type *st) ATTR_NOT_NULL(2) { throw NotImplementedException(); }
virtual void OnSerializableConstruct(Serializable *st) ATTR_NOT_NULL(2) { throw NotImplementedException(); }
virtual void OnSerializableDestruct(Serializable *st) ATTR_NOT_NULL(2) { throw NotImplementedException(); }
virtual void OnSerializableUpdate(Serializable *st) ATTR_NOT_NULL(2) { throw NotImplementedException(); }
virtual void OnSerializeTypeCheck(Serialize::Type *st) ATTR_NOT_NULL(2) { throw NotImplementedException(); }
virtual void OnSerializeTypeCreate(Serialize::Type *st) ATTR_NOT_NULL(2) { throw NotImplementedException(); }
/** Called when a chanserv/set command is used
@@ -1067,6 +1073,13 @@ public:
* @return EVENT_STOP to force the user off of the nick
*/
virtual EventReturn OnNickValidate(User *u, NickAlias *na) ATTR_NOT_NULL(2, 3) { throw NotImplementedException(); }
/** Called when a password needs to be validated.
* @param source The source that is trying to use the password.
* @param nc The account the password is being validated for, or nullptr if not registered yet.
* @param pass The password which needs to be validated.
*/
virtual EventReturn OnPasswordValidate(CommandSource &source, NickCore *nc, const Anope::string &pass) { throw NotImplementedException(); }
};
enum Implementation
@@ -1076,8 +1089,8 @@ enum Implementation
I_OnAccessClear,
I_OnAccessDel,
I_OnAddXLine,
I_OnAkickAdd,
I_OnAkickDel,
I_OnAKickAdd,
I_OnAKickDel,
I_OnBadWordAdd,
I_OnBadWordDel,
I_OnBotAssign,
@@ -1159,6 +1172,7 @@ enum Implementation
I_OnNickUpdate,
I_OnNickValidate,
I_OnPartChannel,
I_OnPasswordValidate,
I_OnPostCommand,
I_OnPostHelp,
I_OnPostInit,
@@ -1180,7 +1194,7 @@ enum Implementation
I_OnSerializableConstruct,
I_OnSerializableDestruct,
I_OnSerializableUpdate,
I_OnSerializeCheck,
I_OnSerializeTypeCheck,
I_OnSerializeTypeCreate,
I_OnServerConnect,
I_OnServerDisconnect,
@@ -1259,7 +1273,7 @@ public:
* @param minor The minor version
* @param patch The patch version
*/
static void RequireVersion(int major, int minor, int patch);
static void RequireVersion(unsigned major, unsigned minor, unsigned patch);
/** Change the priority of one event in a module.
* Each module event has a list of modules which are attached to that event type. If you wish to be called before or after other specific modules, you may use this
+44 -31
View File
@@ -1,43 +1,56 @@
/* BotServ core functions
*
* (C) 2003-2025 Anope Team
* Contact us at team@anope.org
*
* Please read COPYING and README for further details.
*
* Based on the original code of Epona by Lara.
* Based on the original code of Services by Andy Church.
*/
// Anope IRC Services <https://www.anope.org/>
//
// Copyright (C) 2003-2026 Anope Contributors
//
// Anope is free software. You can use, modify, and/or distribute it under the
// terms of version 2 of the GNU General Public License. See docs/LICENSE.txt
// for the complete terms of this license and docs/AUTHORS.txt for a list of
// contributors.
//
// Based on the original code of Epona by Lara
// Based on the original code of Services by Andy Church
//
// SPDX-License-Identifier: GPL-2.0-only
#pragma once
/** Flags for badwords
*/
enum BadWordType
#define BOTSERV_BAD_WORDS_EXT "badwords"
#define BOTSERV_BAD_WORDS_TYPE "BadWord"
namespace BotServ
{
/* Always kicks if the word is said */
BW_ANY,
/* User must way the entire word */
BW_SINGLE,
/* The word has to start with the badword */
BW_START,
/* The word has to end with the badword */
BW_END
};
class BadWord;
struct BadWords;
/** Flags for badwords. */
enum BadWordType
{
/* Always kicks if the word is said */
BW_ANY,
/* User must way the entire word */
BW_SINGLE,
/* The word has to start with the badword */
BW_START,
/* The word has to end with the badword */
BW_END
};
}
/* Structure used to contain bad words. */
struct BadWord
class BotServ::BadWord
{
Anope::string chan;
Anope::string word;
BadWordType type;
virtual ~BadWord() = default;
protected:
BadWord() = default;
public:
Anope::string chan;
Anope::string word;
BotServ::BadWordType type;
virtual ~BadWord() = default;
};
struct BadWords
struct BotServ::BadWords
{
virtual ~BadWords() = default;
@@ -46,13 +59,13 @@ struct BadWords
* @param type The type (SINGLE START END)
* @return The badword
*/
virtual BadWord *AddBadWord(const Anope::string &word, BadWordType type) = 0;
virtual BotServ::BadWord *AddBadWord(const Anope::string &word, BotServ::BadWordType type) = 0;
/** Get a badword structure by index
* @param index The index
* @return The badword
*/
virtual BadWord *GetBadWord(unsigned index) const = 0;
virtual BotServ::BadWord *GetBadWord(unsigned index) const = 0;
/** Get how many badwords are on this channel
* @return The number of badwords in the vector
+42 -31
View File
@@ -1,46 +1,57 @@
/* BotServ core functions
*
* (C) 2003-2025 Anope Team
* Contact us at team@anope.org
*
* Please read COPYING and README for further details.
*
* Based on the original code of Epona by Lara.
* Based on the original code of Services by Andy Church.
*/
// Anope IRC Services <https://www.anope.org/>
//
// Copyright (C) 2003-2026 Anope Contributors
//
// Anope is free software. You can use, modify, and/or distribute it under the
// terms of version 2 of the GNU General Public License. See docs/LICENSE.txt
// for the complete terms of this license and docs/AUTHORS.txt for a list of
// contributors.
//
// Based on the original code of Epona by Lara
// Based on the original code of Services by Andy Church
//
// SPDX-License-Identifier: GPL-2.0-only
#pragma once
/* Indices for TTB (Times To Ban) */
enum
{
TTB_BOLDS,
TTB_COLORS,
TTB_REVERSES,
TTB_UNDERLINES,
TTB_BADWORDS,
TTB_CAPS,
TTB_FLOOD,
TTB_REPEAT,
TTB_ITALICS,
TTB_AMSGS,
TTB_SIZE
};
#define BOTSERV_KICKER_DATA_EXT "kickerdata"
struct KickerData
namespace BotServ
{
class KickerData;
/* Indices for TTB (Times To Ban) */
enum
{
TTB_BOLDS,
TTB_COLORS,
TTB_REVERSES,
TTB_UNDERLINES,
TTB_BADWORDS,
TTB_CAPS,
TTB_FLOOD,
TTB_REPEAT,
TTB_ITALICS,
TTB_AMSGS,
TTB_SIZE
};
}
class BotServ::KickerData
{
protected:
KickerData() = default;
public:
bool amsgs, badwords, bolds, caps, colors, flood, italics, repeat, reverses, underlines;
int16_t ttb[TTB_SIZE]; /* Times to ban for each kicker */
int16_t ttb[BotServ::TTB_SIZE]; /* Times to ban for each kicker */
int16_t capsmin, capspercent; /* For CAPS kicker */
int16_t floodlines, floodsecs; /* For FLOOD kicker */
int16_t repeattimes; /* For REPEAT kicker */
bool dontkickops, dontkickvoices;
protected:
KickerData() = default;
public:
virtual ~KickerData() = default;
virtual void Check(ChannelInfo *ci) = 0;
};
+108
View File
@@ -0,0 +1,108 @@
// Anope IRC Services <https://www.anope.org/>
//
// Copyright (C) 2003-2026 Anope Contributors
//
// Anope is free software. You can use, modify, and/or distribute it under the
// terms of version 2 of the GNU General Public License. See docs/LICENSE.txt
// for the complete terms of this license and docs/AUTHORS.txt for a list of
// contributors.
//
// Based on the original code of Epona by Lara
// Based on the original code of Services by Andy Church
//
// SPDX-License-Identifier: GPL-2.0-only
#pragma once
#define CHANSERV_AUTO_KICK_TYPE "AutoKick"
#define CHANSERV_AUTO_KICK_SERVICE "ChanServ::AutoKickService"
namespace ChanServ
{
class AutoKick;
class AutoKickService;
ServiceReference<AutoKickService> akick_service(CHANSERV_AUTO_KICK_SERVICE, CHANSERV_AUTO_KICK_SERVICE);
}
class ChanServ::AutoKickService
: public Service
{
public:
AutoKickService(Module *m)
: Service(m, CHANSERV_AUTO_KICK_SERVICE, CHANSERV_AUTO_KICK_SERVICE)
{
}
/** Add an akick entry to the channel by NickCore
* @param user The user who added the akick
* @param akicknc The nickcore being akicked
* @param reason The reason for the akick
* @param t The time the akick was added, defaults to now
* @param lu The time the akick was last used, defaults to never
*/
virtual AutoKick *AddAKick(ChannelInfo *ci, const Anope::string &user, NickCore *akicknc, const Anope::string &reason, time_t t = Anope::CurTime, time_t lu = 0) = 0;
/** Add an akick entry to the channel by reason
* @param user The user who added the akick
* @param mask The mask of the akick
* @param reason The reason for the akick
* @param t The time the akick was added, defaults to now
* @param lu The time the akick was last used, defaults to never
*/
virtual AutoKick *AddAKick(ChannelInfo *ci, const Anope::string &user, const Anope::string &mask, const Anope::string &reason, time_t t = Anope::CurTime, time_t lu = 0) = 0;
/** Get an entry from the channel akick list
* @param index The index in the akick vector
* @return The akick structure, or NULL if not found
*/
virtual AutoKick *GetAKick(ChannelInfo *ci, unsigned index) = 0;
/** Get the size of the akick vector for this channel
* @return The akick vector size
*/
virtual unsigned GetAKickCount(ChannelInfo *ci) = 0;
/** Erase an entry from the channel akick list
* @param index The index of the akick
*/
virtual void EraseAKick(ChannelInfo *ci, unsigned index) = 0;
virtual void EraseAKick(ChannelInfo *ci, AutoKick *akick) = 0;
/** Clear the whole akick list
*/
virtual void ClearAKick(ChannelInfo *ci) = 0;
};
class ChanServ::AutoKick final
: public Serializable
{
public:
/* Channel this autokick is on */
Serialize::Reference<ChannelInfo> ci;
Anope::string mask;
Serialize::Reference<NickCore> nc;
Anope::string reason;
Anope::string creator;
time_t addtime;
time_t last_used;
AutoKick()
: Serializable(CHANSERV_AUTO_KICK_TYPE)
{
}
~AutoKick()
{
if (!this->ci)
return;
if (ChanServ::akick_service)
ChanServ::akick_service->EraseAKick(this->ci, this);
if (this->nc)
this->nc->RemoveChannelReference(this->ci);
}
};
+37 -17
View File
@@ -1,37 +1,57 @@
/*
*
* (C) 2003-2025 Anope Team
* Contact us at team@anope.org
*
* Please read COPYING and README for further details.
*/
// Anope IRC Services <https://www.anope.org/>
//
// Copyright (C) 2003-2026 Anope Contributors
//
// Anope is free software. You can use, modify, and/or distribute it under the
// terms of version 2 of the GNU General Public License. See docs/LICENSE.txt
// for the complete terms of this license and docs/AUTHORS.txt for a list of
// contributors.
//
// Based on the original code of Epona by Lara
// Based on the original code of Services by Andy Church
//
// SPDX-License-Identifier: GPL-2.0-only
#pragma once
struct EntryMsg
#define CHANSERV_ENTRY_MESSAGE_EXT "entrymsg"
#define CHANSERV_ENTRY_MESSAGE_TYPE "EntryMsg"
namespace ChanServ
{
class EntryMessage;
class EntryMessageList;
}
class ChanServ::EntryMessage
{
protected:
EntryMessage() = default;
public:
Anope::string chan;
Anope::string creator;
Anope::string message;
time_t when;
time_t when = 0;
virtual ~EntryMsg() = default;
protected:
EntryMsg() = default;
virtual ~EntryMessage() = default;
};
struct EntryMessageList
: Serialize::Checker<std::vector<EntryMsg *> >
class ChanServ::EntryMessageList
: public Serialize::Checker<std::vector<ChanServ::EntryMessage *>>
{
protected:
EntryMessageList() : Serialize::Checker<std::vector<EntryMsg *> >("EntryMsg") { }
EntryMessageList()
: Serialize::Checker<std::vector<ChanServ::EntryMessage *>>(CHANSERV_ENTRY_MESSAGE_TYPE)
{
}
public:
virtual ~EntryMessageList()
{
for (unsigned i = (*this)->size(); i > 0; --i)
for (auto i = (*this)->size(); i > 0; --i)
delete (*this)->at(i - 1);
}
virtual EntryMsg *Create() = 0;
virtual ChanServ::EntryMessage *Create() = 0;
};
+32 -19
View File
@@ -1,18 +1,34 @@
/* ChanServ core functions
*
* (C) 2003-2025 Anope Team
* Contact us at team@anope.org
*
* Please read COPYING and README for further details.
*
* Based on the original code of Epona by Lara.
* Based on the original code of Services by Andy Church.
*/
// Anope IRC Services <https://www.anope.org/>
//
// Copyright (C) 2003-2026 Anope Contributors
//
// Anope is free software. You can use, modify, and/or distribute it under the
// terms of version 2 of the GNU General Public License. See docs/LICENSE.txt
// for the complete terms of this license and docs/AUTHORS.txt for a list of
// contributors.
//
// Based on the original code of Epona by Lara
// Based on the original code of Services by Andy Church
//
// SPDX-License-Identifier: GPL-2.0-only
#pragma once
struct LogSetting
#define CHANSERV_LOG_SETTING_EXT "logsettings"
#define CHANSERV_LOG_SETTING_TYPE "LogSetting"
namespace ChanServ
{
class LogSetting;
class LogSettings;
}
class ChanServ::LogSetting
{
protected:
LogSetting() = default;
public:
Anope::string chan;
/* Our service name of the command */
Anope::string service_name;
@@ -25,21 +41,18 @@ struct LogSetting
time_t created;
virtual ~LogSetting() = default;
protected:
LogSetting() = default;
};
struct LogSettings
: Serialize::Checker<std::vector<LogSetting *> >
class ChanServ::LogSettings
: public Serialize::Checker<std::vector<ChanServ::LogSetting *>>
{
typedef std::vector<LogSetting *>::iterator iterator;
protected:
LogSettings() : Serialize::Checker<std::vector<LogSetting *> >("LogSetting")
LogSettings()
: Serialize::Checker<std::vector<ChanServ::LogSetting *>>(CHANSERV_LOG_SETTING_TYPE)
{
}
public:
virtual ~LogSettings() = default;
virtual LogSetting *Create() = 0;
virtual ChanServ::LogSetting *Create() = 0;
};
+34 -16
View File
@@ -1,18 +1,36 @@
/* ChanServ core functions
*
* (C) 2003-2025 Anope Team
* Contact us at team@anope.org
*
* Please read COPYING and README for further details.
*
* Based on the original code of Epona by Lara.
* Based on the original code of Services by Andy Church.
*/
// Anope IRC Services <https://www.anope.org/>
//
// Copyright (C) 2003-2026 Anope Contributors
//
// Anope is free software. You can use, modify, and/or distribute it under the
// terms of version 2 of the GNU General Public License. See docs/LICENSE.txt
// for the complete terms of this license and docs/AUTHORS.txt for a list of
// contributors.
//
// Based on the original code of Epona by Lara
// Based on the original code of Services by Andy Church
//
// SPDX-License-Identifier: GPL-2.0-only
#pragma once
struct ModeLock
#define CHANSERV_MODE_LOCK_EXT "modelocks"
#define CHANSERV_MODE_LOCK_TYPE "ModeLock"
namespace ChanServ
{
class ModeLock;
class ModeLocks;
using ModeLockList = std::vector<ModeLock *>;
}
class ChanServ::ModeLock
{
protected:
ModeLock() = default;
public:
Anope::string ci;
bool set;
Anope::string name;
@@ -21,14 +39,14 @@ struct ModeLock
time_t created;
virtual ~ModeLock() = default;
protected:
ModeLock() = default;
};
struct ModeLocks
class ChanServ::ModeLocks
{
typedef std::vector<ModeLock *> ModeList;
protected:
ModeLocks() = default;
public:
virtual ~ModeLocks() = default;
/** Check if a mode is mlocked
@@ -66,7 +84,7 @@ struct ModeLocks
/** Get all of the mlocks for this channel
* @return The mlocks
*/
virtual const ModeList &GetMLock() const = 0;
virtual const ChanServ::ModeLockList &GetMLock() const = 0;
/** Get a list of mode locks on a channel
* @param name The mode name to get a list of
+26 -10
View File
@@ -1,18 +1,34 @@
/*
*
* (C) 2011-2025 Anope Team
* Contact us at team@anope.org
*
* Please read COPYING and README for further details.
*/
// Anope IRC Services <https://www.anope.org/>
//
// Copyright (C) 2003-2026 Anope Contributors
//
// Anope is free software. You can use, modify, and/or distribute it under the
// terms of version 2 of the GNU General Public License. See docs/LICENSE.txt
// for the complete terms of this license and docs/AUTHORS.txt for a list of
// contributors.
//
// Based on the original code of Epona by Lara
// Based on the original code of Services by Andy Church
//
// SPDX-License-Identifier: GPL-2.0-only
#pragma once
class ChanServService
: public Service
#define CHANSERV_SERVICE "ChanServ::Service"
namespace ChanServ
{
class Service;
ServiceReference<Service> service(CHANSERV_SERVICE, CHANSERV_SERVICE);
}
class ChanServ::Service
: public ::Service
{
public:
ChanServService(Module *m) : Service(m, "ChanServService", "ChanServ")
Service(Module *m)
: ::Service(m, CHANSERV_SERVICE, CHANSERV_SERVICE)
{
}
+15 -11
View File
@@ -1,13 +1,16 @@
/*
*
* (C) 2003-2025 Anope Team
* Contact us at team@anope.org
*
* Please read COPYING and README for further details.
*
* Based on the original code of Epona by Lara.
* Based on the original code of Services by Andy Church.
*/
// Anope IRC Services <https://www.anope.org/>
//
// Copyright (C) 2003-2026 Anope Contributors
//
// Anope is free software. You can use, modify, and/or distribute it under the
// terms of version 2 of the GNU General Public License. See docs/LICENSE.txt
// for the complete terms of this license and docs/AUTHORS.txt for a list of
// contributors.
//
// Based on the original code of Epona by Lara
// Based on the original code of Services by Andy Church
//
// SPDX-License-Identifier: GPL-2.0-only
#pragma once
@@ -191,12 +194,13 @@ namespace DNS
/** Used to time out the query, xalls OnError and lets the TimerManager
* delete this request.
*/
void Tick() override
bool Tick() override
{
Log(LOG_DEBUG_2) << "Resolver: timeout for query " << this->name;
Query rr(*this);
rr.error = ERROR_TIMEDOUT;
this->OnError(&rr);
return false;
}
};
+13 -10
View File
@@ -1,13 +1,16 @@
/*
*
* (C) 2003-2025 Anope Team
* Contact us at team@anope.org
*
* Please read COPYING and README for further details.
*
* Based on the original code of Epona by Lara.
* Based on the original code of Services by Andy Church.
*/
// Anope IRC Services <https://www.anope.org/>
//
// Copyright (C) 2003-2026 Anope Contributors
//
// Anope is free software. You can use, modify, and/or distribute it under the
// terms of version 2 of the GNU General Public License. See docs/LICENSE.txt
// for the complete terms of this license and docs/AUTHORS.txt for a list of
// contributors.
//
// Based on the original code of Epona by Lara
// Based on the original code of Services by Andy Church
//
// SPDX-License-Identifier: GPL-2.0-only
#pragma once
+28 -13
View File
@@ -1,22 +1,37 @@
/*
*
* (C) 2011-2025 Anope Team
* Contact us at team@anope.org
*
* Please read COPYING and README for further details.
*/
// Anope IRC Services <https://www.anope.org/>
//
// Copyright (C) 2003-2026 Anope Contributors
//
// Anope is free software. You can use, modify, and/or distribute it under the
// terms of version 2 of the GNU General Public License. See docs/LICENSE.txt
// for the complete terms of this license and docs/AUTHORS.txt for a list of
// contributors.
//
// Based on the original code of Epona by Lara
// Based on the original code of Services by Andy Church
//
// SPDX-License-Identifier: GPL-2.0-only
#pragma once
#define GLOBAL_NO_MESSAGE _("You do not have any messages queued and did not specify a message to send.")
#define GLOBAL_QUEUE_CONFLICT _("You can not send a single message while you have messages queued.")
class GlobalService
: public Service
#define GLOBAL_SERVICE "Global::Service"
namespace Global
{
class Service;
ServiceReference<Global::Service> service(GLOBAL_SERVICE, GLOBAL_SERVICE);
}
class Global::Service
: public ::Service
{
public:
GlobalService(Module *m)
: Service(m, "GlobalService", "Global")
Service(Module *m)
: ::Service(m, GLOBAL_SERVICE, GLOBAL_SERVICE)
{
}
@@ -31,7 +46,7 @@ public:
/** Retrieves the size of the messages queue for the specified user.
* @param nc The account to count queued messages for.
*/
inline size_t CountQueue(NickCore* nc) const
inline size_t CountQueue(NickCore *nc) const
{
auto *q = GetQueue(nc);
return q ? q->size() : 0;
@@ -40,7 +55,7 @@ public:
/** Retrieves the messages queue for the specified user.
* @param nc The account to retrieve queued messages for.
*/
virtual const std::vector<Anope::string> *GetQueue(NickCore* nc) const = 0;
virtual const std::vector<Anope::string> *GetQueue(NickCore *nc) const = 0;
/** Queues a message to be sent later.
* @param nc The account to queue the message for.
+21 -8
View File
@@ -1,14 +1,27 @@
/*
*
* (C) 2003-2025 Anope Team
* Contact us at team@anope.org
*
* Please read COPYING and README for further details.
*/
// Anope IRC Services <https://www.anope.org/>
//
// Copyright (C) 2003-2026 Anope Contributors
//
// Anope is free software. You can use, modify, and/or distribute it under the
// terms of version 2 of the GNU General Public License. See docs/LICENSE.txt
// for the complete terms of this license and docs/AUTHORS.txt for a list of
// contributors.
//
// Based on the original code of Epona by Lara
// Based on the original code of Services by Andy Church
//
// SPDX-License-Identifier: GPL-2.0-only
#pragma once
class HostRequest
#define HOSTSERV_HOST_REQUEST_EXT "hostrequest"
namespace HostServ
{
class HostRequest;
}
class HostServ::HostRequest
{
protected:
HostRequest() = default;
+14 -8
View File
@@ -1,10 +1,16 @@
/*
*
* (C) 2012-2025 Anope Team
* Contact us at team@anope.org
*
* Please read COPYING and README for further details.
*/
// Anope IRC Services <https://www.anope.org/>
//
// Copyright (C) 2003-2026 Anope Contributors
//
// Anope is free software. You can use, modify, and/or distribute it under the
// terms of version 2 of the GNU General Public License. See docs/LICENSE.txt
// for the complete terms of this license and docs/AUTHORS.txt for a list of
// contributors.
//
// Based on the original code of Epona by Lara
// Based on the original code of Services by Andy Church
//
// SPDX-License-Identifier: GPL-2.0-only
#pragma once
@@ -146,7 +152,7 @@ public:
{
}
virtual const Anope::string GetIP()
virtual Anope::string GetIP() const
{
return this->clientaddr.addr();
}
+13 -7
View File
@@ -1,10 +1,16 @@
/*
*
* (C) 2003-2025 Anope Team
* Contact us at team@anope.org
*
* Please read COPYING and README for further details.
*/
// Anope IRC Services <https://www.anope.org/>
//
// Copyright (C) 2003-2026 Anope Contributors
//
// Anope is free software. You can use, modify, and/or distribute it under the
// terms of version 2 of the GNU General Public License. See docs/LICENSE.txt
// for the complete terms of this license and docs/AUTHORS.txt for a list of
// contributors.
//
// Based on the original code of Epona by Lara
// Based on the original code of Services by Andy Church
//
// SPDX-License-Identifier: GPL-2.0-only
#pragma once
+23 -7
View File
@@ -1,10 +1,16 @@
/*
*
* (C) 2011-2025 Anope Team
* Contact us at team@anope.org
*
* Please read COPYING and README for further details.
*/
// Anope IRC Services <https://www.anope.org/>
//
// Copyright (C) 2003-2026 Anope Contributors
//
// Anope is free software. You can use, modify, and/or distribute it under the
// terms of version 2 of the GNU General Public License. See docs/LICENSE.txt
// for the complete terms of this license and docs/AUTHORS.txt for a list of
// contributors.
//
// Based on the original code of Epona by Lara
// Based on the original code of Services by Andy Church
//
// SPDX-License-Identifier: GPL-2.0-only
#pragma once
@@ -167,4 +173,14 @@ public:
* @param attributes The attributes to modify
*/
virtual void Modify(LDAPInterface *i, const Anope::string &base, LDAPMods &attributes) = 0;
/** Escapes a LDAP string for use in a DN.
* @param str The string to escape.
*/
virtual Anope::string EscapeDN(const Anope::string &str) const = 0;
/** Escapes a LDAP string for use in a search filter.
* @param str The string to escape.
*/
virtual Anope::string EscapeSF(const Anope::string &str) const = 0;
};
+29 -12
View File
@@ -1,17 +1,26 @@
/*
*
* (C) 2011-2025 Anope Team
* Contact us at team@anope.org
*
* Please read COPYING and README for further details.
*/
// Anope IRC Services <https://www.anope.org/>
//
// Copyright (C) 2003-2026 Anope Contributors
//
// Anope is free software. You can use, modify, and/or distribute it under the
// terms of version 2 of the GNU General Public License. See docs/LICENSE.txt
// for the complete terms of this license and docs/AUTHORS.txt for a list of
// contributors.
//
// Based on the original code of Epona by Lara
// Based on the original code of Services by Andy Church
//
// SPDX-License-Identifier: GPL-2.0-only
#pragma once
class MemoServService
: public Service
#define MEMOSERV_SERVICE "MemoServ::Service"
namespace MemoServ
{
public:
class Service;
/** Possible results when sending a memo. */
enum MemoResult
{
MEMO_SUCCESS,
@@ -20,7 +29,15 @@ public:
MEMO_TARGET_FULL
};
MemoServService(Module *m) : Service(m, "MemoServService", "MemoServ")
ServiceReference<Service> service(MEMOSERV_SERVICE, MEMOSERV_SERVICE);
}
class MemoServ::Service
: public ::Service
{
public:
Service(Module *m)
: ::Service(m, MEMOSERV_SERVICE, MEMOSERV_SERVICE)
{
}
@@ -30,7 +47,7 @@ public:
* @param message Memo text
* @param force true to force the memo, restrictions/delays etc are not checked
*/
virtual MemoResult Send(const Anope::string &source, const Anope::string &target, const Anope::string &message, bool force = false) = 0;
virtual MemoServ::MemoResult Send(const Anope::string &source, const Anope::string &target, const Anope::string &message, bool force = false) = 0;
/** Check for new memos and notify the user if there are any
* @param u The user
+55 -18
View File
@@ -1,22 +1,56 @@
/* NickServ core functions
*
* (C) 2003-2025 Anope Team
* Contact us at team@anope.org
*
* Please read COPYING and README for further details.
*
* Based on the original code of Epona by Lara.
* Based on the original code of Services by Andy Church.
*/
// Anope IRC Services <https://www.anope.org/>
//
// Copyright (C) 2003-2026 Anope Contributors
//
// Anope is free software. You can use, modify, and/or distribute it under the
// terms of version 2 of the GNU General Public License. See docs/LICENSE.txt
// for the complete terms of this license and docs/AUTHORS.txt for a list of
// contributors.
//
// Based on the original code of Epona by Lara
// Based on the original code of Services by Andy Church
//
// SPDX-License-Identifier: GPL-2.0-only
#pragma once
struct NSCertList
#define NICKSERV_CERT_EXT "certificates"
#define NICKSERV_CERT_SERVICE "NickServ::CertService"
namespace NickServ
{
struct Cert;
class CertList;
class CertService;
ServiceReference<CertService> cert_service(NICKSERV_CERT_SERVICE, NICKSERV_CERT_SERVICE);
}
struct NickServ::Cert
{
/** The account this cert is for. */
Serialize::Reference<NickCore> account;
/** The time at which this certificate was created. */
time_t created = 0;
/** The user who created this certificate. */
Anope::string creator;
/** If non-empty then a description of the certificate. */
Anope::string description;
/** The TLS fingerprint for the certificate. */
Anope::string fingerprint;
};
class NickServ::CertList
{
protected:
NSCertList() = default;
CertList() = default;
public:
virtual ~NSCertList() = default;
virtual ~CertList() = default;
/** Add an entry to the nick's certificate list
*
@@ -24,7 +58,7 @@ public:
*
* Adds a new entry into the cert list.
*/
virtual void AddCert(const Anope::string &entry) = 0;
virtual NickServ::Cert *AddCert(const Anope::string &entry) = 0;
/** Get an entry from the nick's cert list by index
*
@@ -33,7 +67,7 @@ public:
*
* Retrieves an entry from the certificate list corresponding to the given index.
*/
virtual Anope::string GetCert(unsigned entry) const = 0;
virtual NickServ::Cert *GetCert(unsigned entry) const = 0;
virtual unsigned GetCertCount() const = 0;
@@ -72,11 +106,14 @@ public:
virtual void Check() = 0;
};
class CertService
: public Service
class NickServ::CertService
: public ::Service
{
public:
CertService(Module *c) : Service(c, "CertService", "certs") { }
CertService(Module *m)
: ::Service(m, NICKSERV_CERT_SERVICE, NICKSERV_CERT_SERVICE)
{
}
virtual NickCore *FindAccountFromCert(const Anope::string &cert) = 0;
virtual void ReplaceCert(const Anope::string &oldcert, const Anope::string &newcert) = 0;
+13 -7
View File
@@ -1,10 +1,16 @@
/*
*
* (C) 2014-2025 Anope Team
* Contact us at team@anope.org
*
* Please read COPYING and README for further details.
*/
// Anope IRC Services <https://www.anope.org/>
//
// Copyright (C) 2003-2026 Anope Contributors
//
// Anope is free software. You can use, modify, and/or distribute it under the
// terms of version 2 of the GNU General Public License. See docs/LICENSE.txt
// for the complete terms of this license and docs/AUTHORS.txt for a list of
// contributors.
//
// Based on the original code of Epona by Lara
// Based on the original code of Services by Andy Church
//
// SPDX-License-Identifier: GPL-2.0-only
#pragma once
+27 -10
View File
@@ -1,18 +1,35 @@
/*
*
* (C) 2011-2025 Anope Team
* Contact us at team@anope.org
*
* Please read COPYING and README for further details.
*/
// Anope IRC Services <https://www.anope.org/>
//
// Copyright (C) 2003-2026 Anope Contributors
//
// Anope is free software. You can use, modify, and/or distribute it under the
// terms of version 2 of the GNU General Public License. See docs/LICENSE.txt
// for the complete terms of this license and docs/AUTHORS.txt for a list of
// contributors.
//
// Based on the original code of Epona by Lara
// Based on the original code of Services by Andy Church
//
// SPDX-License-Identifier: GPL-2.0-only
#pragma once
class NickServService
: public Service
#define NICKSERV_SERVICE "NickServ::Service"
namespace NickServ
{
class Service;
ServiceReference<Service> service(NICKSERV_SERVICE, NICKSERV_SERVICE);
}
class NickServ::Service
: public ::Service
{
public:
NickServService(Module *m) : Service(m, "NickServService", "NickServ")
Service(Module *m)
: ::Service(m, NICKSERV_SERVICE, NICKSERV_SERVICE)
{
}
+51 -29
View File
@@ -1,53 +1,75 @@
/*
*
* (C) 2011-2025 Anope Team
* Contact us at team@anope.org
*
* Please read COPYING and README for further details.
*/
// Anope IRC Services <https://www.anope.org/>
//
// Copyright (C) 2003-2026 Anope Contributors
//
// Anope is free software. You can use, modify, and/or distribute it under the
// terms of version 2 of the GNU General Public License. See docs/LICENSE.txt
// for the complete terms of this license and docs/AUTHORS.txt for a list of
// contributors.
//
// Based on the original code of Epona by Lara
// Based on the original code of Services by Andy Church
//
// SPDX-License-Identifier: GPL-2.0-only
#pragma once
enum ForbidType
{
FT_NICK = 1,
FT_CHAN,
FT_EMAIL,
FT_REGISTER,
FT_SIZE
};
#define OPERSERV_FORBID_DATA_TYPE "ForbidData"
#define OPERSERV_FORBID_SERVICE "OperServ::ForbidService"
struct ForbidData
namespace OperServ
{
class ForbidData;
class ForbidService;
enum ForbidType
{
FT_NICK = 1,
FT_CHAN,
FT_EMAIL,
FT_REGISTER,
FT_PASSWORD,
FT_SIZE
};
ServiceReference<ForbidService> forbid_service(OPERSERV_FORBID_SERVICE, OPERSERV_FORBID_SERVICE);
}
class OperServ::ForbidData
{
protected:
ForbidData() = default;
public:
Anope::string mask;
Anope::string creator;
Anope::string reason;
time_t created = 0;
time_t expires = 0;
ForbidType type;
bool immutable = false;
OperServ::ForbidType type;
virtual ~ForbidData() = default;
protected:
ForbidData() = default;
};
class ForbidService
class OperServ::ForbidService
: public Service
{
public:
ForbidService(Module *m) : Service(m, "ForbidService", "forbid") { }
ForbidService(Module *m)
: Service(m, OPERSERV_FORBID_SERVICE, OPERSERV_FORBID_SERVICE)
{
}
virtual void AddForbid(ForbidData *d) = 0;
virtual void AddForbid(OperServ::ForbidData *d) = 0;
virtual void RemoveForbid(ForbidData *d) = 0;
virtual void RemoveForbid(OperServ::ForbidData *d) = 0;
virtual ForbidData *CreateForbid() = 0;
virtual OperServ::ForbidData *CreateForbid() = 0;
virtual ForbidData *FindForbid(const Anope::string &mask, ForbidType type) = 0;
virtual OperServ::ForbidData *FindForbid(const Anope::string &mask, OperServ::ForbidType type) = 0;
virtual ForbidData *FindForbidExact(const Anope::string &mask, ForbidType type) = 0;
virtual OperServ::ForbidData *FindForbidExact(const Anope::string &mask, OperServ::ForbidType type) = 0;
virtual std::vector<ForbidData *> GetForbids() = 0;
virtual std::vector<OperServ::ForbidData *> GetForbids() = 0;
};
static ServiceReference<ForbidService> forbid_service("ForbidService", "forbid");
+39 -22
View File
@@ -1,46 +1,63 @@
/* OperServ ignore interface
*
* (C) 2003-2025 Anope Team
* Contact us at team@anope.org
*
* Please read COPYING and README for further details.
*
* Based on the original code of Epona by Lara.
* Based on the original code of Services by Andy Church.
*/
// Anope IRC Services <https://www.anope.org/>
//
// Copyright (C) 2003-2026 Anope Contributors
//
// Anope is free software. You can use, modify, and/or distribute it under the
// terms of version 2 of the GNU General Public License. See docs/LICENSE.txt
// for the complete terms of this license and docs/AUTHORS.txt for a list of
// contributors.
//
// Based on the original code of Epona by Lara
// Based on the original code of Services by Andy Church
//
// SPDX-License-Identifier: GPL-2.0-only
#pragma once
struct IgnoreData
#define OPERSERV_IGNORE_DATA_TYPE "IgnoreData"
#define OPERSERV_IGNORE_SERVICE "OperServ::IgnoreService"
namespace OperServ
{
class IgnoreData;
class IgnoreService;
ServiceReference<IgnoreService> ignore_service(OPERSERV_IGNORE_SERVICE, OPERSERV_IGNORE_SERVICE);
}
class OperServ::IgnoreData
{
protected:
IgnoreData() = default;
public:
Anope::string mask;
Anope::string creator;
Anope::string reason;
time_t time = 0; /* When do we stop ignoring them? */
virtual ~IgnoreData() = default;
protected:
IgnoreData() = default;
};
class IgnoreService
class OperServ::IgnoreService
: public Service
{
protected:
IgnoreService(Module *c) : Service(c, "IgnoreService", "ignore") { }
IgnoreService(Module *c)
: Service(c, OPERSERV_IGNORE_SERVICE, OPERSERV_IGNORE_SERVICE)
{
}
public:
virtual void AddIgnore(IgnoreData *) = 0;
virtual void AddIgnore(OperServ::IgnoreData *) = 0;
virtual void DelIgnore(IgnoreData *) = 0;
virtual void DelIgnore(OperServ::IgnoreData *) = 0;
virtual void ClearIgnores() = 0;
virtual IgnoreData *Create() = 0;
virtual OperServ::IgnoreData *Create() = 0;
virtual IgnoreData *Find(const Anope::string &mask) = 0;
virtual OperServ::IgnoreData *Find(const Anope::string &mask) = 0;
virtual std::vector<IgnoreData *> &GetIgnores() = 0;
virtual std::vector<OperServ::IgnoreData *> &GetIgnores() = 0;
};
static ServiceReference<IgnoreService> ignore_service("IgnoreService", "ignore");
+45 -24
View File
@@ -1,44 +1,65 @@
/*
*
* (C) 2011-2025 Anope Team
* Contact us at team@anope.org
*
* Please read COPYING and README for further details.
*/
// Anope IRC Services <https://www.anope.org/>
//
// Copyright (C) 2003-2026 Anope Contributors
//
// Anope is free software. You can use, modify, and/or distribute it under the
// terms of version 2 of the GNU General Public License. See docs/LICENSE.txt
// for the complete terms of this license and docs/AUTHORS.txt for a list of
// contributors.
//
// Based on the original code of Epona by Lara
// Based on the original code of Services by Andy Church
//
// SPDX-License-Identifier: GPL-2.0-only
#pragma once
enum NewsType
{
NEWS_LOGON,
NEWS_RANDOM,
NEWS_OPER
};
#define OPERSERV_NEWS_ITEM_TYPE "NewsItem"
#define OPERSERV_NEWS_SERVICE "OperServ::NewsService"
struct NewsItem
namespace OperServ
{
struct NewsItem;
class NewsService;
enum NewsType
{
NEWS_LOGON,
NEWS_RANDOM,
NEWS_OPER,
};
ServiceReference<NewsService> news_service(OPERSERV_NEWS_SERVICE, OPERSERV_NEWS_SERVICE);
}
struct OperServ::NewsItem
: Serializable
{
NewsType type;
OperServ::NewsType type;
Anope::string text;
Anope::string who;
time_t time;
NewsItem() : Serializable("NewsItem") { }
NewsItem()
: Serializable(OPERSERV_NEWS_ITEM_TYPE)
{
}
};
class NewsService
class OperServ::NewsService
: public Service
{
public:
NewsService(Module *m) : Service(m, "NewsService", "news") { }
NewsService(Module *m)
: Service(m, OPERSERV_NEWS_SERVICE, OPERSERV_NEWS_SERVICE)
{
}
virtual NewsItem *CreateNewsItem() = 0;
virtual OperServ::NewsItem *CreateNewsItem() = 0;
virtual void AddNewsItem(NewsItem *n) = 0;
virtual void AddNewsItem(OperServ::NewsItem *n) = 0;
virtual void DelNewsItem(NewsItem *n) = 0;
virtual void DelNewsItem(OperServ::NewsItem *n) = 0;
virtual std::vector<NewsItem *> &GetNewsList(NewsType t) = 0;
virtual std::vector<OperServ::NewsItem *> &GetNewsList(OperServ::NewsType t) = 0;
};
static ServiceReference<NewsService> news_service("NewsService", "news");
+27 -10
View File
@@ -1,16 +1,33 @@
/*
*
* (C) 2011-2025 Anope Team
* Contact us at team@anope.org
*
* Please read COPYING and README for further details.
*/
// Anope IRC Services <https://www.anope.org/>
//
// Copyright (C) 2003-2026 Anope Contributors
//
// Anope is free software. You can use, modify, and/or distribute it under the
// terms of version 2 of the GNU General Public License. See docs/LICENSE.txt
// for the complete terms of this license and docs/AUTHORS.txt for a list of
// contributors.
//
// Based on the original code of Epona by Lara
// Based on the original code of Services by Andy Church
//
// SPDX-License-Identifier: GPL-2.0-only
#pragma once
struct MyOper final
: Oper
#define OPERSERV_OPER_TYPE "Oper"
namespace OperServ
{
struct Oper;
}
struct OperServ::Oper final
: ::Oper
, Serializable
{
MyOper(const Anope::string &n, OperType *o) : Oper(n, o), Serializable("Oper") { }
Oper(const Anope::string &n, OperType *o)
: ::Oper(n, o)
, Serializable(OPERSERV_OPER_TYPE)
{
}
};
+51 -26
View File
@@ -1,23 +1,47 @@
/*
*
* (C) 2011-2025 Anope Team
* Contact us at team@anope.org
*
* Please read COPYING and README for further details.
*/
// Anope IRC Services <https://www.anope.org/>
//
// Copyright (C) 2003-2026 Anope Contributors
//
// Anope is free software. You can use, modify, and/or distribute it under the
// terms of version 2 of the GNU General Public License. See docs/LICENSE.txt
// for the complete terms of this license and docs/AUTHORS.txt for a list of
// contributors.
//
// Based on the original code of Epona by Lara
// Based on the original code of Services by Andy Church
//
// SPDX-License-Identifier: GPL-2.0-only
#pragma once
struct Session final
#define OPERSERV_SESSION_EXCEPTION_TYPE "Exception"
#define OPERSERV_SESSION_SERVICE "OperServ::SessionService"
namespace OperServ
{
struct Exception;
struct Session;
class SessionService;
using ExceptionVector = std::vector<Exception *>;
using SessionMap = std::unordered_map<cidr, Session *, cidr::hash>;
ServiceReference<SessionService> session_service(OPERSERV_SESSION_SERVICE, OPERSERV_SESSION_SERVICE);
}
struct OperServ::Session final
{
cidr addr; /* A cidr (sockaddrs + len) representing this session */
unsigned count = 1; /* Number of clients with this host */
unsigned hits = 0; /* Number of subsequent kills for a host */
Session(const sockaddrs &ip, int len) : addr(ip, len) { }
Session(const sockaddrs &ip, int len)
: addr(ip, len)
{
}
};
struct Exception final
struct OperServ::Exception final
: Serializable
{
Anope::string mask; /* Hosts to which this exception applies */
@@ -27,33 +51,34 @@ struct Exception final
time_t time; /* When this exception was added */
time_t expires; /* Time when it expires. 0 == no expiry */
Exception() : Serializable("Exception") { }
Exception()
: Serializable(OPERSERV_SESSION_EXCEPTION_TYPE)
{
}
};
class SessionService
class OperServ::SessionService
: public Service
{
public:
typedef std::unordered_map<cidr, Session *, cidr::hash> SessionMap;
typedef std::vector<Exception *> ExceptionVector;
SessionService(Module *m)
: Service(m, OPERSERV_SESSION_SERVICE, OPERSERV_SESSION_SERVICE)
{
}
SessionService(Module *m) : Service(m, "SessionService", "session") { }
virtual OperServ::Exception *CreateException() = 0;
virtual Exception *CreateException() = 0;
virtual void AddException(OperServ::Exception *e) = 0;
virtual void AddException(Exception *e) = 0;
virtual void DelException(OperServ::Exception *e) = 0;
virtual void DelException(Exception *e) = 0;
virtual OperServ::Exception *FindException(User *u) = 0;
virtual Exception *FindException(User *u) = 0;
virtual OperServ::Exception *FindException(const Anope::string &host) = 0;
virtual Exception *FindException(const Anope::string &host) = 0;
virtual OperServ::ExceptionVector &GetExceptions() = 0;
virtual ExceptionVector &GetExceptions() = 0;
virtual OperServ::Session *FindSession(const Anope::string &ip) = 0;
virtual Session *FindSession(const Anope::string &ip) = 0;
virtual SessionMap &GetSessions() = 0;
virtual OperServ::SessionMap &GetSessions() = 0;
};
static ServiceReference<SessionService> session_service("SessionService", "session");
-77
View File
@@ -1,77 +0,0 @@
/*
*
* (C) 2003-2025 Anope Team
* Contact us at team@anope.org
*
* Please read COPYING and README for further details.
*/
#pragma once
namespace Redis
{
struct Reply final
{
enum Type
{
NOT_PARSED,
NOT_OK,
OK,
INT,
BULK,
MULTI_BULK
}
type;
Reply() { Clear(); }
~Reply() { Clear(); }
void Clear()
{
type = NOT_PARSED;
i = 0;
bulk.clear();
multi_bulk_size = 0;
for (const auto *reply : multi_bulk)
delete reply;
multi_bulk.clear();
}
int64_t i;
Anope::string bulk;
int multi_bulk_size;
std::deque<Reply *> multi_bulk;
};
class Interface
{
public:
Module *owner;
Interface(Module *m) : owner(m) { }
virtual ~Interface() = default;
virtual void OnResult(const Reply &r) = 0;
virtual void OnError(const Anope::string &error) { Log(owner) << error; }
};
class Provider
: public Service
{
public:
Provider(Module *c, const Anope::string &n) : Service(c, "Redis::Provider", n) { }
virtual bool IsSocketDead() = 0;
virtual void SendCommand(Interface *i, const std::vector<Anope::string> &cmds) = 0;
virtual void SendCommand(Interface *i, const Anope::string &str) = 0;
virtual bool BlockAndProcess() = 0;
virtual void Subscribe(Interface *i, const Anope::string &pattern) = 0;
virtual void Unsubscribe(const Anope::string &pattern) = 0;
virtual void StartTransaction() = 0;
virtual void CommitTransaction() = 0;
};
}
+14 -8
View File
@@ -1,10 +1,16 @@
/*
*
* (C) 2010-2025 Anope Team
* Contact us at team@anope.org
*
* Please read COPYING and README for further details.
*/
// Anope IRC Services <https://www.anope.org/>
//
// Copyright (C) 2003-2026 Anope Contributors
//
// Anope is free software. You can use, modify, and/or distribute it under the
// terms of version 2 of the GNU General Public License. See docs/LICENSE.txt
// for the complete terms of this license and docs/AUTHORS.txt for a list of
// contributors.
//
// Based on the original code of Epona by Lara
// Based on the original code of Services by Andy Church
//
// SPDX-License-Identifier: GPL-2.0-only
#pragma once
@@ -177,7 +183,7 @@ private:
size_t minparams;
protected:
Event(Module *o, const Anope::string& e, size_t mp = 0)
Event(Module *o, const Anope::string &e, size_t mp = 0)
: Service(o, RPC_EVENT, e)
, minparams(mp)
{
+13 -7
View File
@@ -1,10 +1,16 @@
/*
*
* (C) 2003-2025 Anope Team
* Contact us at team@anope.org
*
* Please read COPYING and README for further details.
*/
// Anope IRC Services <https://www.anope.org/>
//
// Copyright (C) 2003-2026 Anope Contributors
//
// Anope is free software. You can use, modify, and/or distribute it under the
// terms of version 2 of the GNU General Public License. See docs/LICENSE.txt
// for the complete terms of this license and docs/AUTHORS.txt for a list of
// contributors.
//
// Based on the original code of Epona by Lara
// Based on the original code of Services by Andy Church
//
// SPDX-License-Identifier: GPL-2.0-only
#pragma once
+28 -35
View File
@@ -1,10 +1,16 @@
/*
*
* (C) 2003-2025 Anope Team
* Contact us at team@anope.org
*
* Please read COPYING and README for further details.
*/
// Anope IRC Services <https://www.anope.org/>
//
// Copyright (C) 2003-2026 Anope Contributors
//
// Anope is free software. You can use, modify, and/or distribute it under the
// terms of version 2 of the GNU General Public License. See docs/LICENSE.txt
// for the complete terms of this license and docs/AUTHORS.txt for a list of
// contributors.
//
// Based on the original code of Epona by Lara
// Based on the original code of Services by Andy Church
//
// SPDX-License-Identifier: GPL-2.0-only
#pragma once
@@ -17,46 +23,33 @@ namespace SQL
: public Serialize::Data
{
public:
typedef std::map<Anope::string, std::stringstream *> Map;
Map data;
~Data()
{
Clear();
}
std::iostream &operator[](const Anope::string &key) override
{
std::stringstream *&ss = data[key];
if (!ss)
ss = new std::stringstream();
return *ss;
}
Anope::unordered_map<Anope::string> data;
size_t Hash() const override
{
size_t hash = 0;
for (const auto &[_, value] : this->data)
{
if (!value->str().empty())
hash ^= Anope::hash_cs()(value->str());
if (!value.empty())
hash ^= Anope::hash_cs()(value);
}
return hash;
}
std::map<Anope::string, std::iostream *> GetData() const
bool LoadInternal(const Anope::string &key, Anope::string &value) override
{
std::map<Anope::string, std::iostream *> d;
for (const auto &[key, value] : this->data)
d[key] = value;
return d;
auto it = this->data.find(key);
if (it == this->data.end())
return false;
value = it->second;
return true;
}
void Clear()
bool StoreInternal(const Anope::string &key, const Anope::string &value) override
{
for (const auto &[_, value] : this->data)
delete value;
this->data.clear();
this->data[key] = value;
return true;
}
};
@@ -151,7 +144,7 @@ namespace SQL
}
}
const Anope::string Get(size_t index, const Anope::string &col) const
Anope::string Get(size_t index, const Anope::string &col) const
{
const std::map<Anope::string, Anope::string> rows = this->Row(index);
@@ -191,7 +184,7 @@ namespace SQL
virtual std::vector<Query> CreateTable(const Anope::string &table, const Data &data) = 0;
virtual Query BuildInsert(const Anope::string &table, unsigned int id, Data &data) = 0;
virtual Query BuildInsert(const Anope::string &table, Serializable::Id id, Data &data) = 0;
virtual Query GetTables(const Anope::string &prefix) = 0;
+13 -7
View File
@@ -1,10 +1,16 @@
/*
*
* (C) 2010-2025 Anope Team
* Contact us at team@anope.org
*
* Please read COPYING and README for further details.
*/
// Anope IRC Services <https://www.anope.org/>
//
// Copyright (C) 2003-2026 Anope Contributors
//
// Anope is free software. You can use, modify, and/or distribute it under the
// terms of version 2 of the GNU General Public License. See docs/LICENSE.txt
// for the complete terms of this license and docs/AUTHORS.txt for a list of
// contributors.
//
// Based on the original code of Epona by Lara
// Based on the original code of Services by Andy Church
//
// SPDX-License-Identifier: GPL-2.0-only
#pragma once
+13 -10
View File
@@ -1,13 +1,16 @@
/*
*
* (C) 2003-2025 Anope Team
* Contact us at team@anope.org
*
* Please read COPYING and README for further details.
*
* Based on the original code of Epona by Lara.
* Based on the original code of Services by Andy Church.
*/
// Anope IRC Services <https://www.anope.org/>
//
// Copyright (C) 2003-2026 Anope Contributors
//
// Anope is free software. You can use, modify, and/or distribute it under the
// terms of version 2 of the GNU General Public License. See docs/LICENSE.txt
// for the complete terms of this license and docs/AUTHORS.txt for a list of
// contributors.
//
// Based on the original code of Epona by Lara
// Based on the original code of Services by Andy Church
//
// SPDX-License-Identifier: GPL-2.0-only
#pragma once
+13 -10
View File
@@ -1,13 +1,16 @@
/*
*
* (C) 2003-2025 Anope Team
* Contact us at team@anope.org
*
* Please read COPYING and README for further details.
*
* Based on the original code of Epona by Lara.
* Based on the original code of Services by Andy Church.
*/
// Anope IRC Services <https://www.anope.org/>
//
// Copyright (C) 2003-2026 Anope Contributors
//
// Anope is free software. You can use, modify, and/or distribute it under the
// terms of version 2 of the GNU General Public License. See docs/LICENSE.txt
// for the complete terms of this license and docs/AUTHORS.txt for a list of
// contributors.
//
// Based on the original code of Epona by Lara
// Based on the original code of Services by Andy Church
//
// SPDX-License-Identifier: GPL-2.0-only
#pragma once
+14 -7
View File
@@ -1,10 +1,17 @@
/*
*
* (C) 2008-2011 Robin Burchell <w00t@inspircd.org>
* (C) 2008-2025 Anope Team <team@anope.org>
*
* Please read COPYING and README for further details.
*/
// Anope IRC Services <https://www.anope.org/>
//
// Copyright (C) 2003-2026 Anope Contributors
// Copyright (C) 2008-2011 Robin Burchell <w00t@inspircd.org>
//
// Anope is free software. You can use, modify, and/or distribute it under the
// terms of version 2 of the GNU General Public License. See docs/LICENSE.txt
// for the complete terms of this license and docs/AUTHORS.txt for a list of
// contributors.
//
// Based on the original code of Epona by Lara
// Based on the original code of Services by Andy Church
//
// SPDX-License-Identifier: GPL-2.0-only
#pragma once
+23 -16
View File
@@ -1,13 +1,16 @@
/*
*
* (C) 2003-2025 Anope Team
* Contact us at team@anope.org
*
* Please read COPYING and README for further details.
*
* Based on the original code of Epona by Lara.
* Based on the original code of Services by Andy Church.
*/
// Anope IRC Services <https://www.anope.org/>
//
// Copyright (C) 2003-2026 Anope Contributors
//
// Anope is free software. You can use, modify, and/or distribute it under the
// terms of version 2 of the GNU General Public License. See docs/LICENSE.txt
// for the complete terms of this license and docs/AUTHORS.txt for a list of
// contributors.
//
// Based on the original code of Epona by Lara
// Based on the original code of Services by Andy Church
//
// SPDX-License-Identifier: GPL-2.0-only
#pragma once
@@ -77,6 +80,9 @@ public:
/** Can we force servers to remove opers? */
bool CanSVSNOOP = false;
/** Can we send multiple swhois messages? */
bool CanSendMultipleSWhois = false;
/* Can we set vhosts on users? */
bool CanSetVHost = false;
@@ -215,8 +221,8 @@ public:
virtual void SendGlobalNotice(BotInfo *bi, const Server *dest, const Anope::string &msg) = 0;
virtual void SendGlobalPrivmsg(BotInfo *bi, const Server *desc, const Anope::string &msg) = 0;
virtual void SendContextNotice(BotInfo *bi, User *target, Channel *context, const Anope::string &msg);
virtual void SendContextPrivmsg(BotInfo *bi, User *target, Channel *context, const Anope::string &msg);
virtual void SendContextNotice(BotInfo *bi, User *target, Channel *context, const Anope::string &msg, const Anope::map<Anope::string> &tags = {});
virtual void SendContextPrivmsg(BotInfo *bi, User *target, Channel *context, const Anope::string &msg, const Anope::map<Anope::string> &tags = {});
virtual void SendQuit(User *u, const Anope::string &msg = "", const Anope::string &opermsg = "");
virtual void SendPing(const Anope::string &servname, const Anope::string &who);
@@ -273,16 +279,17 @@ public:
virtual void SendSVSHold(const Anope::string &, time_t) { }
virtual void SendSVSHoldDel(const Anope::string &) { }
virtual void SendSWhois(const MessageSource &, const Anope::string &, const Anope::string &) { }
virtual void SendSWhois(const MessageSource &source, User *target, const Anope::string &tag, time_t priority, const Anope::string &message) { };
virtual void SendSWhoisDel(const MessageSource &source, User *target, const Anope::string &tag, const Anope::string &message) { }
/** Introduces a server to the uplink
*/
virtual void SendServer(const Server *) = 0;
virtual void SendSquit(Server *, const Anope::string &message);
virtual void SendNumericInternal(int numeric, const Anope::string &dest, const std::vector<Anope::string> &params);
virtual void SendNumericInternal(unsigned numeric, const Anope::string &dest, const std::vector<Anope::string> &params);
template <typename... Args>
void SendNumeric(int numeric, const Anope::string &dest, Args &&...args)
void SendNumeric(unsigned numeric, const Anope::string &dest, Args &&...args)
{
SendNumericInternal(numeric, dest, { Anope::ToString(args)... });
}
@@ -300,7 +307,7 @@ public:
*/
virtual void SendOper(User *u);
virtual void SendClearModes(const MessageSource &user, Channel *c, User* u, const Anope::string &mode) { }
virtual void SendClearModes(const MessageSource &user, Channel *c, User *u, const Anope::string &mode) { }
virtual bool IsNickValid(const Anope::string &);
virtual bool IsChannelValid(const Anope::string &);
+13 -74
View File
@@ -1,10 +1,16 @@
/*
*
* (C) 2008-2025 Anope Team
* Contact us at team@anope.org
*
* Please read COPYING and README for further details.
*/
// Anope IRC Services <https://www.anope.org/>
//
// Copyright (C) 2003-2026 Anope Contributors
//
// Anope is free software. You can use, modify, and/or distribute it under the
// terms of version 2 of the GNU General Public License. See docs/LICENSE.txt
// for the complete terms of this license and docs/AUTHORS.txt for a list of
// contributors.
//
// Based on the original code of Epona by Lara
// Based on the original code of Services by Andy Church
//
// SPDX-License-Identifier: GPL-2.0-only
#pragma once
@@ -20,34 +26,6 @@ typedef Anope::unordered_map<ChannelInfo *> registered_channel_map;
extern CoreExport Serialize::Checker<registered_channel_map> RegisteredChannelList;
/* AutoKick data. */
class CoreExport AutoKick final
: public Serializable
{
public:
struct Type final
: public Serialize::Type
{
Type();
void Serialize(Serializable *obj, Serialize::Data &data) const override;
Serializable *Unserialize(Serializable *obj, Serialize::Data &data) const override;
};
/* Channel this autokick is on */
Serialize::Reference<ChannelInfo> ci;
Anope::string mask;
Serialize::Reference<NickCore> nc;
Anope::string reason;
Anope::string creator;
time_t addtime;
time_t last_used;
AutoKick();
~AutoKick();
};
/* It matters that Base is here before Extensible (it is inherited by Serializable)
*/
class CoreExport ChannelInfo final
@@ -69,7 +47,6 @@ private:
Serialize::Reference<NickCore> founder; /* Channel founder */
Serialize::Reference<NickCore> successor; /* Who gets the channel if the founder nick is dropped or expires */
Serialize::Checker<std::vector<ChanAccess *> > access; /* List of authorized users */
Serialize::Checker<std::vector<AutoKick *> > akick; /* List of users to kickban */
Anope::map<int16_t> levels;
public:
@@ -174,44 +151,6 @@ public:
*/
void ClearAccess();
/** Add an akick entry to the channel by NickCore
* @param user The user who added the akick
* @param akicknc The nickcore being akicked
* @param reason The reason for the akick
* @param t The time the akick was added, defaults to now
* @param lu The time the akick was last used, defaults to never
*/
AutoKick *AddAkick(const Anope::string &user, NickCore *akicknc, const Anope::string &reason, time_t t = Anope::CurTime, time_t lu = 0);
/** Add an akick entry to the channel by reason
* @param user The user who added the akick
* @param mask The mask of the akick
* @param reason The reason for the akick
* @param t The time the akick was added, defaults to now
* @param lu The time the akick was last used, defaults to never
*/
AutoKick *AddAkick(const Anope::string &user, const Anope::string &mask, const Anope::string &reason, time_t t = Anope::CurTime, time_t lu = 0);
/** Get an entry from the channel akick list
* @param index The index in the akick vector
* @return The akick structure, or NULL if not found
*/
AutoKick *GetAkick(unsigned index) const;
/** Get the size of the akick vector for this channel
* @return The akick vector size
*/
unsigned GetAkickCount() const;
/** Erase an entry from the channel akick list
* @param index The index of the akick
*/
void EraseAkick(unsigned index);
/** Clear the whole akick list
*/
void ClearAkick();
/** Get the level entries for the channel.
* @return The levels for the channel.
*/
+13 -10
View File
@@ -1,13 +1,16 @@
/*
*
* (C) 2003-2025 Anope Team
* Contact us at team@anope.org
*
* Please read COPYING and README for further details.
*
* Based on the original code of Epona by Lara.
* Based on the original code of Services by Andy Church.
*/
// Anope IRC Services <https://www.anope.org/>
//
// Copyright (C) 2003-2026 Anope Contributors
//
// Anope is free software. You can use, modify, and/or distribute it under the
// terms of version 2 of the GNU General Public License. See docs/LICENSE.txt
// for the complete terms of this license and docs/AUTHORS.txt for a list of
// contributors.
//
// Based on the original code of Epona by Lara
// Based on the original code of Services by Andy Church
//
// SPDX-License-Identifier: GPL-2.0-only
#pragma once
+136 -49
View File
@@ -1,13 +1,16 @@
/*
*
* (C) 2003-2025 Anope Team
* Contact us at team@anope.org
*
* Please read COPYING and README for further details.
*
* Based on the original code of Epona by Lara.
* Based on the original code of Services by Andy Church.
*/
// Anope IRC Services <https://www.anope.org/>
//
// Copyright (C) 2003-2026 Anope Contributors
//
// Anope is free software. You can use, modify, and/or distribute it under the
// terms of version 2 of the GNU General Public License. See docs/LICENSE.txt
// for the complete terms of this license and docs/AUTHORS.txt for a list of
// contributors.
//
// Based on the original code of Epona by Lara
// Based on the original code of Services by Andy Church
//
// SPDX-License-Identifier: GPL-2.0-only
#pragma once
@@ -17,7 +20,6 @@
#include "base.h"
/** Names of serialization types implemented in the core. */
#define AUTOKICK_TYPE "AutoKick"
#define BOTINFO_TYPE "BotInfo"
#define CHANACCESS_TYPE "ChanAccess"
#define CHANNELINFO_TYPE "ChannelInfo"
@@ -38,42 +40,11 @@ namespace Serialize
UINT,
};
class CoreExport Data
{
protected:
std::map<Anope::string, Serialize::DataType> types;
public:
virtual ~Data() = default;
virtual std::iostream &operator[](const Anope::string &key) = 0;
template <typename T>
void Store(const Anope::string &key, const T &value)
{
using Type = std::remove_cv_t<std::remove_reference_t<T>>;
if constexpr (std::is_same_v<Type, bool>)
SetType(key, DataType::BOOL);
else if constexpr (std::is_floating_point_v<Type>)
SetType(key, DataType::FLOAT);
else if constexpr (std::is_integral_v<Type> && std::is_signed_v<Type>)
SetType(key, DataType::INT);
else if constexpr (std::is_integral_v<Type> && std::is_unsigned_v<Type>)
SetType(key, DataType::UINT);
this->operator[](key) << value;
}
virtual size_t Hash() const { throw CoreException("Not supported"); }
Serialize::DataType GetType(const Anope::string &key) const;
void SetType(const Anope::string &key, Serialize::DataType dt);
};
extern void RegisterTypes();
extern void CheckTypes();
extern void CreateTypes();
class Data;
class Type;
template<typename T> class Checker;
template<typename T> class Reference;
@@ -95,6 +66,7 @@ private:
static std::list<Serializable *> *SerializableItems;
friend class Serialize::Type;
/* The type of item this object is */
const Anope::string s_name;
Serialize::Type *s_type;
/* Iterator into serializable_items */
std::list<Serializable *>::iterator s_iter;
@@ -102,6 +74,8 @@ private:
size_t last_commit = 0;
/* The last time this object was committed to the database */
time_t last_commit_time = 0;
/** Whether this object should be committed to the database. */
bool should_commit = true;
protected:
Serializable(const Anope::string &serialize_type);
@@ -109,20 +83,34 @@ protected:
Serializable &operator=(const Serializable &);
template<typename Container,
typename Key = typename Container::key_type,
typename Value = typename Container::mapped_type>
bool InsertUnique(Container &container, const Key &key)
{
auto res = container.emplace(key, static_cast<Value>(this));
if (res.second)
return true;
res.first->second->should_commit = false;
res.first->second = static_cast<Value>(this);
return false;
}
public:
using Id = uint64_t;
virtual ~Serializable();
/* Unique ID (per type, not globally) for this object */
Id id = 0;
/* Only used by redis, to ignore updates */
unsigned short redis_ignore = 0;
Id object_id = 0;
/** Marks the object as potentially being updated "soon".
*/
void QueueUpdate();
/** Determines whether the object should be committed to the database. */
bool ShouldCommit() const { return this->should_commit; }
bool IsCached(Serialize::Data &);
void UpdateCache(Serialize::Data &);
@@ -133,10 +121,103 @@ public:
* @return The serializable object type
*/
Serialize::Type *GetSerializableType() const { return this->s_type; }
const auto &GetSerializableName() const { return this->s_name; }
static const std::list<Serializable *> &GetItems();
};
class CoreExport Serialize::Data
{
protected:
/** The specified data types of known fields. */
std::map<Anope::string, Serialize::DataType> types;
Data() = default;
/** Internal method for loading data from the database.
* @param key The field to get the value of.
* @param value The location to store the retrieved value.
*/
virtual bool LoadInternal(const Anope::string &key, Anope::string &value) = 0;
/** Internal method for storing data in the database.
* @param key The field to set the value of.
* @param value The value of the field.
*/
virtual bool StoreInternal(const Anope::string &key, const Anope::string &value) = 0;
/** Sets the data type of the specified field. This is called automatically from \ref Store.
* @param key The field to specify the data type for.
* @param dt The data type of the field.
*/
void SetType(const Anope::string &key, Serialize::DataType dt);
public:
virtual ~Data() = default;
/** Retrieves the data type for the specified field. If the field does not have a data type
* specified then it will default to TEXT.
* @param key The field to retrieve the data type for.
*/
Serialize::DataType GetType(const Anope::string &key) const;
/** Retrieves a unique hash for the data set. */
virtual size_t Hash() const { throw CoreException("Not supported"); }
/** Loads the value of a specific field.
* @param key The field to get the value of.
* @param def The default value if none is set.
*/
template <typename T = Anope::string>
T Load(const Anope::string &key, T def = T())
{
T out;
if (!TryLoad(key, out))
out = def;
return out;
}
/** Stores the value of a specific field, automatically setting its type.
* @param key The field to set the value of.
* @param value The value of the field.
*/
template <typename T>
void Store(const Anope::string &key, const T &value)
{
using Type = std::remove_cv_t<std::remove_reference_t<T>>;
if constexpr (std::is_same_v<Type, bool>)
SetType(key, DataType::BOOL);
else if constexpr (std::is_floating_point_v<Type>)
SetType(key, DataType::FLOAT);
else if constexpr (std::is_integral_v<Type> && std::is_signed_v<Type>)
SetType(key, DataType::INT);
else if constexpr (std::is_integral_v<Type> && std::is_unsigned_v<Type>)
SetType(key, DataType::UINT);
StoreInternal(key, Anope::ToString(value));
}
/** Tries to load the value of a specific field.
* @param key The field to get the value of.
* @param out The location to store the retrieved value.
*/
template <typename T = Anope::string>
bool TryLoad(const Anope::string &key, T &out)
{
Anope::string out_str;
if (!LoadInternal(key, out_str))
return false;
auto out_opt = Anope::TryConvert<T>(out_str);
if (!out_opt)
return false;
out = out_opt.value();
return true;
}
};
/* A serializable type. There should be a single instance of a subclass of this
* for each subclass of Serializable as this is what is used to serialize and
* deserialize data from the database.
@@ -145,8 +226,11 @@ class CoreExport Serialize::Type
: public Base
{
private:
/** Whether modules have been informed about the creation of this type yet. */
bool created = false;
/** The name of this type in the database (e.g. NickAlias). */
Anope::string name;
const Anope::string name;
/** The module which owns this type, or nullptr if it belongs to the core.
* Some database backends use this to put third-party module data into their
@@ -181,6 +265,9 @@ public:
/** Destroys a serializable type. */
~Type();
/** Informs modules about the creation of this type. */
void Create();
/** Checks for and applies any pending object updates for this type. */
void Check();
+17 -14
View File
@@ -1,13 +1,16 @@
/*
*
* (C) 2003-2025 Anope Team
* Contact us at team@anope.org
*
* Please read COPYING and README for further details.
*
* Based on the original code of Epona by Lara.
* Based on the original code of Services by Andy Church.
*/
// Anope IRC Services <https://www.anope.org/>
//
// Copyright (C) 2003-2026 Anope Contributors
//
// Anope is free software. You can use, modify, and/or distribute it under the
// terms of version 2 of the GNU General Public License. See docs/LICENSE.txt
// for the complete terms of this license and docs/AUTHORS.txt for a list of
// contributors.
//
// Based on the original code of Epona by Lara
// Based on the original code of Services by Andy Church
//
// SPDX-License-Identifier: GPL-2.0-only
#pragma once
@@ -54,11 +57,11 @@ private:
/* Uplink for this server */
Server *uplink;
/* Server is syncing */
bool syncing;
bool syncing = true;
/* The server is juped */
bool juped;
/* The server is about to quit */
bool quitting;
bool quitting = false;
/* Reason this server was quit */
Anope::string quit_reason;
@@ -66,12 +69,12 @@ public:
/** Constructor
* @param uplink The uplink this server is from, is only NULL when creating Me
* @param name The server name
* @param hops Hops from services server
* @param description Server rdescription
* @param sid Server sid/numeric
* @param hops Hops from services server
* @param jupe If the server is juped
*/
Server(Server *uplink, const Anope::string &name, unsigned hops, const Anope::string &description, const Anope::string &sid = "", bool jupe = false);
Server(Server *uplink, const Anope::string &name, const Anope::string &description, const Anope::string &sid = "", unsigned hops = 0, bool jupe = false);
private:
/** Destructor
+30 -17
View File
@@ -1,13 +1,16 @@
/*
*
* (C) 2003-2025 Anope Team
* Contact us at team@anope.org
*
* Please read COPYING and README for further details.
*
* Based on the original code of Epona by Lara.
* Based on the original code of Services by Andy Church.
*/
// Anope IRC Services <https://www.anope.org/>
//
// Copyright (C) 2003-2026 Anope Contributors
//
// Anope is free software. You can use, modify, and/or distribute it under the
// terms of version 2 of the GNU General Public License. See docs/LICENSE.txt
// for the complete terms of this license and docs/AUTHORS.txt for a list of
// contributors.
//
// Based on the original code of Epona by Lara
// Based on the original code of Services by Andy Church
//
// SPDX-License-Identifier: GPL-2.0-only
#pragma once
@@ -135,20 +138,30 @@ class ServiceReference
Anope::string name;
public:
ServiceReference() = default;
ServiceReference(const Anope::string &t, const Anope::string &n) : type(t), name(n)
ServiceReference(const Anope::string &t, const Anope::string &n = "")
: type(t)
, name(n)
{
}
const Anope::string &GetServiceName() const { return name; }
/** Retrieves the name of the service (e.g. mysql/main). */
const auto &GetServiceName() const { return name; }
const Anope::string &GetServiceType() const { return type; }
/** Retrieves the type of the service (e.g. SQL::Provider). */
const auto &GetServiceType() const { return type; }
inline void operator=(const Anope::string &n)
/** Invalidates the reference and changes the name of the referenced service. */
void SetServiceName(const Anope::string &newname)
{
this->name = n;
this->invalid = true;
this->name = newname;
}
/** Invalidates the reference and changes the type of the referenced service. */
void SetServiceType(const Anope::string &newtype)
{
this->invalid = true;
this->type = newtype;
}
operator bool() override
+14 -13
View File
@@ -1,13 +1,16 @@
/*
*
* (C) 2003-2025 Anope Team
* Contact us at team@anope.org
*
* Please read COPYING and README for further details.
*
* Based on the original code of Epona by Lara.
* Based on the original code of Services by Andy Church.
*/
// Anope IRC Services <https://www.anope.org/>
//
// Copyright (C) 2003-2026 Anope Contributors
//
// Anope is free software. You can use, modify, and/or distribute it under the
// terms of version 2 of the GNU General Public License. See docs/LICENSE.txt
// for the complete terms of this license and docs/AUTHORS.txt for a list of
// contributors.
//
// Based on the original code of Epona by Lara
// Based on the original code of Services by Andy Church
//
// SPDX-License-Identifier: GPL-2.0-only
#pragma once
@@ -24,7 +27,7 @@
#include <exception>
#include <fstream>
#include <functional>
#include <iostream>
#include <istream>
#include <list>
#include <map>
#include <set>
@@ -38,8 +41,6 @@
#include "defs.h"
#include "sysconf.h"
#define BUFSIZE 1024
#define _(x) x
#define N_(x, y) x, y
+13 -10
View File
@@ -1,13 +1,16 @@
/*
*
* (C) 2003-2025 Anope Team
* Contact us at team@anope.org
*
* Please read COPYING and README for further details.
*
* Based on the original code of Epona by Lara.
* Based on the original code of Services by Andy Church.
*/
// Anope IRC Services <https://www.anope.org/>
//
// Copyright (C) 2003-2026 Anope Contributors
//
// Anope is free software. You can use, modify, and/or distribute it under the
// terms of version 2 of the GNU General Public License. See docs/LICENSE.txt
// for the complete terms of this license and docs/AUTHORS.txt for a list of
// contributors.
//
// Based on the original code of Epona by Lara
// Based on the original code of Services by Andy Church
//
// SPDX-License-Identifier: GPL-2.0-only
#pragma once
+13 -12
View File
@@ -1,13 +1,16 @@
/*
*
* (C) 2003-2025 Anope Team
* Contact us at team@anope.org
*
* Please read COPYING and README for further details.
*
* Based on the original code of Epona by Lara.
* Based on the original code of Services by Andy Church.
*/
// Anope IRC Services <https://www.anope.org/>
//
// Copyright (C) 2003-2026 Anope Contributors
//
// Anope is free software. You can use, modify, and/or distribute it under the
// terms of version 2 of the GNU General Public License. See docs/LICENSE.txt
// for the complete terms of this license and docs/AUTHORS.txt for a list of
// contributors.
//
// Based on the original code of Epona by Lara
// Based on the original code of Services by Andy Church
//
// SPDX-License-Identifier: GPL-2.0-only
#pragma once
@@ -25,8 +28,6 @@
# include <afunix.h>
#endif
#define NET_BUFSIZE 65535
/** A sockaddr union used to combine IPv4 and IPv6 sockaddrs
*/
union CoreExport sockaddrs
+13 -10
View File
@@ -1,13 +1,16 @@
/*
*
* (C) 2003-2025 Anope Team
* Contact us at team@anope.org
*
* Please read COPYING and README for further details.
*
* Based on the original code of Epona by Lara.
* Based on the original code of Services by Andy Church.
*/
// Anope IRC Services <https://www.anope.org/>
//
// Copyright (C) 2003-2026 Anope Contributors
//
// Anope is free software. You can use, modify, and/or distribute it under the
// terms of version 2 of the GNU General Public License. See docs/LICENSE.txt
// for the complete terms of this license and docs/AUTHORS.txt for a list of
// contributors.
//
// Based on the original code of Epona by Lara
// Based on the original code of Services by Andy Church
//
// SPDX-License-Identifier: GPL-2.0-only
#pragma once
+29 -10
View File
@@ -1,13 +1,16 @@
/*
*
* (C) 2003-2025 Anope Team
* Contact us at team@anope.org
*
* Please read COPYING and README for further details.
*
* Based on the original code of Epona by Lara.
* Based on the original code of Services by Andy Church.
*/
// Anope IRC Services <https://www.anope.org/>
//
// Copyright (C) 2003-2026 Anope Contributors
//
// Anope is free software. You can use, modify, and/or distribute it under the
// terms of version 2 of the GNU General Public License. See docs/LICENSE.txt
// for the complete terms of this license and docs/AUTHORS.txt for a list of
// contributors.
//
// Based on the original code of Epona by Lara
// Based on the original code of Services by Andy Church
//
// SPDX-License-Identifier: GPL-2.0-only
#pragma once
@@ -98,6 +101,22 @@ namespace Anope
extern CoreExport Anope::string Template(const Anope::string &str, const Anope::map<Anope::string> &vars);
}
class CoreExport ExampleWrapper final
{
private:
struct Example final
{
Anope::string example;
Anope::string description;
Anope::string privilege;
};
std::vector<Example> entries;
public:
ExampleWrapper &AddEntry(const Anope::string &example, const Anope::string &desc, const Anope::string &priv = "");
void SendTo(CommandSource &source);
};
class CoreExport HelpWrapper final
{
private:
+13 -10
View File
@@ -1,13 +1,16 @@
/*
*
* (C) 2003-2025 Anope Team
* Contact us at team@anope.org
*
* Please read COPYING and README for further details.
*
* Based on the original code of Epona by Lara.
* Based on the original code of Services by Andy Church.
*/
// Anope IRC Services <https://www.anope.org/>
//
// Copyright (C) 2003-2026 Anope Contributors
//
// Anope is free software. You can use, modify, and/or distribute it under the
// terms of version 2 of the GNU General Public License. See docs/LICENSE.txt
// for the complete terms of this license and docs/AUTHORS.txt for a list of
// contributors.
//
// Based on the original code of Epona by Lara
// Based on the original code of Services by Andy Church
//
// SPDX-License-Identifier: GPL-2.0-only
#pragma once

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