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

Compare commits

...

3540 Commits

Author SHA1 Message Date
Sadie Powell a03e765172 Fix a crash when FindFromService can not find a command.
Closes #583.
2026-06-12 19:23:39 +01:00
Sadie Powell 17cd10ef21 Fix a crashed caused by invalidation of an iterator in os_mode.
Closes #582.
2026-06-12 10:47:58 +01:00
Sadie Powell ca8fcbe119 Allow protocol modules to apply tags to sent messages.
This is useful because for some IRCv3 specifications we need to
apply tags to all messages and its annoying to have to do this
inline when sending each message.
2026-06-10 09:14:09 +01:00
Sadie Powell b9d0762f2b Add a function for building an ISO 8601 timestamp. 2026-06-10 09:14:09 +01:00
Sadie Powell 4878b1787e Only send tags on InspIRCd when we are done syncing. 2026-06-09 23:29:35 +01:00
Sadie Powell 0163d92b1d Fix showing tags in the protocoldebug output for sent messages. 2026-06-09 23:23:18 +01:00
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
Sadie Powell da799bd6f1 Release 2.1.18. 2025-10-01 11:07:16 +01:00
Sadie Powell 4dada51e08 Sort options in the information formatter output. 2025-09-29 13:00:17 +01:00
Sadie Powell 1275fd01a7 Fix a missing command description in hs_request. 2025-09-28 14:58:35 +01:00
Sadie Powell 5b8018eb80 Update the change logs. 2025-09-27 20:33:21 +01:00
Sadie Powell b2026fe739 Fix various stupid mistakes in nickserv/confirm/register. 2025-09-27 18:12:34 +01:00
Sadie Powell 3390d82ebe Log the fingerprint used to authenticate in ns_cert. 2025-09-26 11:22:20 +01:00
Sadie Powell 4762e306f9 Default to code registration confirmation. 2025-09-23 18:23:12 +01:00
Sadie Powell fd759f7bd3 Fix a minor comment typo in Anope::Template. 2025-09-23 18:18:52 +01:00
Sadie Powell 003ddde09d Improve the services.host define documentation. 2025-09-23 18:18:52 +01:00
Sadie Powell c021d7134e Tweak the badwords documentation to document ALL. 2025-09-23 18:18:52 +01:00
Sadie Powell a792088a62 Add the monospace layout.
This works best in clients like The Lounge which use a variable-width
font but support monospace formatting.
2025-09-20 14:56:51 +01:00
Sadie Powell 03e2ebe2d2 Make LineWrapper UTF-8 aware. 2025-09-20 00:01:26 +01:00
Sadie Powell 0238f0a9e3 Move setting the display nickname to ns_group. 2025-09-19 21:30:52 +01:00
Sadie Powell c2dfb9a447 Use rounded durations in more places. 2025-09-19 20:38:53 +01:00
Sadie Powell bd8435a061 Add the reason to the regular version of operserv/session. 2025-09-19 20:38:53 +01:00
Sadie Powell 2cd67c9f36 Add a registration date column to nickserv/glist. 2025-09-19 20:38:53 +01:00
Sadie Powell 45ab094d63 Fix the case of the new SET LAYOUT command. 2025-09-19 19:25:57 +01:00
Sadie Powell 54389f474b Implement support for flexible table layouts. 2025-09-19 18:50:27 +01:00
Sadie Powell ac2b38b1b6 Fix a minor layout issue in cs_log. 2025-09-19 16:06:39 +01:00
Sadie Powell df551bee03 Fix the documentation of the ns_set_protect module. 2025-09-19 12:55:58 +01:00
Sadie Powell 59bb9d3d06 Rework the InfoFormatter/ListFormatter APIs and move to textproc. 2025-09-19 12:31:15 +01:00
Sadie Powell 3b2d798e76 Allow unprivileged users to use !help by default. 2025-09-19 11:41:02 +01:00
Sadie Powell ff6d6bdb3c Remove some now unused code. 2025-09-14 13:43:18 +01:00
Sadie Powell 411b3ce65a Update the en_US translation. 2025-09-12 15:44:42 +01:00
Sadie Powell ad19603818 Show the account id as part of the account field. 2025-09-12 15:44:24 +01:00
Sadie Powell 535ff9b839 Stop showing the last real name in the nick information output.
This isn't really used anymore and a lot of clients just set it to
a static string so it doesn't make sense to show it.
2025-09-12 15:33:00 +01:00
Sadie Powell 51916a50d2 Remove extraneous whitespace from the example configs. 2025-09-12 15:07:37 +01:00
Sadie Powell 42e58952cc Alias the old GETPASS command to RESETPASS. 2025-09-12 15:05:09 +01:00
Sadie Powell ba9f4e93c2 Redo how information tables are built to be multibyte aware. 2025-09-12 14:34:39 +01:00
Sadie Powell 679a313ae2 Add the utf8length method to Anope::string. 2025-09-12 14:21:39 +01:00
Sadie Powell 390975e6c4 Remove some duplicate code from ns_set. 2025-09-11 16:01:58 +01:00
Sadie Powell d631885495 Split autoop and neverop out into their own module. 2025-09-11 16:01:58 +01:00
Sadie Powell 8e337c6592 Fix printing the MySQL version when building against MariaDB. 2025-09-11 16:01:58 +01:00
Sadie Powell 9d89d8233d Modernize the ns_sasl_plain module slightly. 2025-09-10 12:30:45 +01:00
Sadie Powell 6f27418381 Fail an EXTERNAL auth attempt if the user has no client cert. 2025-09-08 15:13:57 +01:00
Sadie Powell 1932081c27 Modularise the supported SASL mechanisms. 2025-09-07 15:10:19 +01:00
Sadie Powell f73159159f Fix the name of the DNS record config option for the previous commit. 2025-09-06 17:48:46 +01:00
Sadie Powell eccb338cdd Add support for self-service vhost validation via DNS. 2025-09-06 17:46:01 +01:00
Sadie Powell 4021c0bb68 Fix looking up TXT records using the dns module. 2025-09-06 17:02:02 +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
Sadie Powell 7dfb40cb58 Update yyjson (for real this time). 2025-09-03 11:18:02 +01:00
dependabot[bot] 0fbd3095c4 Bump actions/checkout from 4 to 5
Bumps [actions/checkout](https://github.com/actions/checkout) from 4 to 5.
- [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/v4...v5)

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

Signed-off-by: dependabot[bot] <support@github.com>
2025-09-02 10:50:15 +01:00
Sadie Powell 6d426ec386 Update yyjson. 2025-08-26 18:06:48 +01:00
Sadie Powell 1b33a51695 Update the Turkish translation.
Co-Authored-By: CaPa CuL <capacul@gmail.com>
2025-08-26 13:04:16 +01:00
Sadie Powell 168a1173ed Error out when db_json can't find the backup directory. 2025-08-25 20:01:02 +01:00
Sadie Powell 59c777d4ff Fix the pid check on systems with reliable pid ordering (e.g. Docker). 2025-08-25 18:40:19 +01:00
Sadie Powell 43f88524e2 Vendor utfcpp, use to fix alignment for non-ascii syntax messages. 2025-08-24 23:18:06 +01:00
Sadie Powell 04de41ad7f Fix some code which was supposed to be part of the previous commit. 2025-08-21 10:45:39 +01:00
Sadie Powell dd13846cad Allow a different badpasslimit for partially connected users.
Closes #455.
2025-08-21 10:12:13 +01:00
Sadie Powell 6864bc6171 Fix building on Windows. 2025-08-08 16:15:51 +01:00
Sadie Powell 003cb55409 Skip deprecated modules when checking for a database/encryption backend. 2025-08-08 14:12:56 +01:00
Sadie Powell d15b8ee949 Remove some dead code from enc_sha256. 2025-08-08 13:14:14 +01:00
Sadie Powell 70de2b7de2 Move B64{Decode,Encode} to textproc and redesign their interface. 2025-08-08 12:27:28 +01:00
Sadie Powell e5c5689985 Move Anope::Distance to textproc. 2025-08-08 12:09:42 +01:00
Sadie Powell 928d4260dc Allow db_flatfile to be loadable first to import databases. 2025-08-07 10:03:34 +01:00
Sadie Powell 5e8561a7f1 Add support for TXT and SRV records in the dns module. 2025-08-06 15:38:13 +01:00
Sadie Powell 4dd3075ddf Merge branch '2.0' into 2.1. 2025-08-05 17:26:29 +01:00
Sadie Powell dbef7a7c64 Don't try to write to a buffered socket if there's no data.
This can cause the SSL modules to act weirdly because the TLS
library will return 0 bytes written (correctly) which is then
interpreted as an error.
2025-08-05 13:10:16 +01:00
Sadie Powell cd0f00a819 Improve the error diagnostics when the link fails. 2025-08-03 13:15:14 +01:00
Sadie Powell b2d40d4189 Improve how Anope formats C strings. 2025-08-02 18:17:01 +01:00
Sadie Powell e6e812c43c Move NormalizeBuffer to textproc and rename more descriptively. 2025-08-02 17:09:24 +01:00
Sadie Powell 2dbd41d244 Move some methods to textproc. 2025-08-02 17:00:31 +01:00
Sadie Powell 02aeb254ee Add an option to disable the encryption and database module checks. 2025-08-01 13:57:47 +01:00
Sadie Powell 1245b43ade Require that users have a non-deprecated database module loaded. 2025-08-01 13:28:29 +01:00
Sadie Powell 5a3f9f3f87 Warn when a user loads a deprecated module. 2025-08-01 13:08:22 +01:00
Sadie Powell 2c6f4d7c27 Make db_flatfile import-only. 2025-08-01 12:41:27 +01:00
Sadie Powell 64f8449bf4 Banish db_old and enc_old to the shadow realm. 2025-08-01 12:41:27 +01:00
Sadie Powell 0e1f6b403b Bump for 2.1.18-git. 2025-08-01 12:22:21 +01:00
Sadie Powell 206192abdc Release 2.1.17. 2025-08-01 12:21:00 +01:00
Sadie Powell 32d3ddc0e4 Fix the grammar of two messages. 2025-07-30 15:30:44 +01:00
Sadie Powell 4410e5ccce Update the change logs. 2025-07-27 19:23:02 +01:00
Sadie Powell d5f2232140 Fix importing some older databases. 2025-07-27 15:42:32 +01:00
Sadie Powell 6d754b7d73 Add the intended target of the mode to CanSet. 2025-07-25 21:07:26 +01:00
Sadie Powell 4d2870fa45 Make it more clear that db_flatfile is deprecated. 2025-07-25 13:38:13 +01:00
Sadie Powell 5948c2ea53 Simplify the Windows module copying logic.
As far as I can tell from reading the Windows documentation there
is no reason to overcomplicate this so much.
2025-07-25 13:21:15 +01:00
Sadie Powell ace7d99797 Tweak the default ns_set_misc examples slightly.
- Discord is proprietary software so we shouldn't be encouraging
  its use. ;-)

- Time zone is going to be replaced by a future feature that allows
  users to get timestamps in their local time so I'm removing it
  now to prevent future conflict.

- Location is a good example of how this should be used for extra
  fields.
2025-07-25 12:53:47 +01:00
Sadie Powell 52595b90fa Rewrite nickserv/resend with some functionality improvements.
- Allow server operators to resend a confirmation email. Closes #518.
- Allow use of the command whilst unauthenticated.
2025-07-25 12:28:14 +01:00
Sadie Powell b39f002d1b Remove some unused files. 2025-07-21 19:14:34 +01:00
Sadie Powell 5df95d9f86 Remove a variant message which is only used in one place. 2025-07-12 16:33:14 +01:00
Sadie Powell a56d9a4096 Only show the last quit message if the user is not online. 2025-07-12 15:28:57 +01:00
Sadie Powell ce7bb15c18 Use IsIdentValid for validating usernames in hs_request. 2025-07-12 14:41:09 +01:00
Sadie Powell 6873630f2e Improve the "please identify" messages. 2025-07-08 16:24:16 +01:00
Sadie Powell 44a4d62654 Show the last real mask to services operators with nickserv/list. 2025-07-07 11:51:10 +01:00
Sadie Powell 97389cd105 Rename some fields to be more accurately named. 2025-07-07 11:51:10 +01:00
Sadie Powell 80c0adf7c8 Make a message consistent with others. 2025-07-02 14:08:04 +01:00
Sadie Powell 6a539277b9 Bump for 2.1.17-git. 2025-07-01 10:58:05 +01:00
Sadie Powell 9930fa01ac Release 2.1.16. 2025-07-01 10:56:40 +01:00
Sadie Powell 40929a0490 Update the change logs. 2025-07-01 10:13:36 +01:00
Sadie Powell 783be31f64 Update author list. 2025-07-01 09:48:19 +01:00
Sadie Powell 0f5f2aef2e Bump the minimum OpenSSL version to 1.1.1.
Close #517.
2025-07-01 00:00:55 +01:00
Sadie Powell 6cc997c4e9 When unsetting a temporary ban delete the unset timer.
This prevents Anope from unsetting a later-added ban,

Resolves MantisBT bug 1709.
2025-06-25 19:16:15 +01:00
Sadie Powell eda6d8cc0f Fix storing the setter of a list mode. 2025-06-25 19:10:49 +01:00
Sadie Powell 3440b38a21 Merge branch '2.0' into 2.1. 2025-06-25 17:50:01 +01:00
Sadie Powell fca421aa2a Fix resetpass confirming accounts when not using email confirmation.
Fixes MantisBT bug 1734.
2025-06-25 17:36:16 +01:00
Sadie Powell 035905d321 Fix example messages using .site which is a real TLD now. 2025-06-25 15:39:35 +01:00
Sadie Powell d1cd57d98e Resynchronise the en_US language file. 2025-06-25 15:34:01 +01:00
Sadie Powell 48daeeac1d Merge branch '2.0' into 2.1. 2025-06-25 15:33:36 +01:00
Sadie Powell 9bcf46f8ea Fix using service's instead of services' where appropriate. 2025-06-25 15:29:16 +01:00
Sadie Powell 0b6c7ce5d6 Update some messages for the language used by modern BIND versions. 2025-06-25 15:28:54 +01:00
Sadie Powell a0d21b207b Fix reading the purge time in cs_seen. 2025-06-25 14:08:44 +01:00
Sadie Powell 3cc5b5143f Remove the old 1.8-style seen system. 2025-06-25 14:06:59 +01:00
Sadie Powell da738126a4 Merge branch '2.0' into 2.1. 2025-06-25 12:07:36 +01:00
Sadie Powell 0bb1bc5c67 Backport various minor config changes from 2.1. 2025-06-25 12:00:33 +01:00
Sadie Powell 72010cd1a9 Fix messages that say IRC Operator when they mean Services Operator. 2025-06-24 13:58:47 +01:00
Sadie Powell c48b3af3d4 Remove an obsolete workaround from Config. 2025-06-24 09:29:33 +01:00
Sadie Powell 85c129701b Clarify how to migrate db_flatfile databases to db_json. 2025-06-23 23:39:20 +01:00
Sadie Powell a9e5a79e91 Remove some unused strings in os_news. 2025-06-22 15:45:21 +01:00
Sadie Powell adc1343d6c Serialize item types as strings instead of integers.
Using the type cast to an integer here was undefined behaviour.
2025-06-22 15:45:21 +01:00
Sadie Powell 8aa1102c7a Default to db_json. 2025-06-22 15:45:21 +01:00
TehPeGaSuS 1a89d32926 Document NS_STATS and CS_STATS. 2025-06-21 17:09:26 +01:00
Sadie Powell ad06853edf Fix suggesting unloaded commands in the "did you mean" message. 2025-06-21 09:56:02 +01:00
Sadie Powell 66ae20e0f2 Tweak a message to make it easier for ESL speakers to understand. 2025-06-21 09:48:01 +01:00
Sadie Powell 2850e3c65c Implement serializer hashing in db_json. 2025-06-21 00:31:02 +01:00
Sadie Powell 80b8856254 Consistently use "account" instead of "nick group". 2025-06-20 20:30:21 +01:00
Sadie Powell 21c8164539 When assigning a new display nick use the oldest not the first. 2025-06-20 20:27:39 +01:00
Sadie Powell a4abd27ffd Fix the grammar of a message in ns_confirm. 2025-06-20 19:43:02 +01:00
Sadie Powell b912b403f0 Fix a comment in CommandInfo. 2025-06-20 19:43:02 +01:00
Sadie Powell 59e9d47667 Update another message to use pluralisation. 2025-06-18 20:53:11 +01:00
Sadie Powell 1108e54250 We don't need to reserialize aliases now we use account identifiers. 2025-06-17 14:50:36 +01:00
Sadie Powell 8b37cdb5d5 Make the access description more useful when importing from Atheme. 2025-06-17 14:50:36 +01:00
Sadie Powell c5bff3a099 Fix various issues with language strings. 2025-06-16 12:30:42 +01:00
Sadie Powell 61b0c82884 Rework how confirmation works and make it modular. 2025-06-16 10:00:41 +01:00
Sadie Powell c4c159d197 Fix showing the MORE_INFO message. 2025-06-15 11:49:26 +01:00
Sadie Powell 04a32be1e1 Add support for code authentication via IRC.
This breaks spambots which try to register but that can't handle
reading the response from services.
2025-06-15 11:22:03 +01:00
Sadie Powell fe4b8ee669 When a command is missing in GetQueryCommand just return (MISSING). 2025-06-15 11:20:34 +01:00
Sadie Powell 34b451f36c The require_privilege option should default to yes not no. 2025-06-11 09:28:46 +01:00
Sadie Powell 16aff210fd Allow configuring fantasy commands to not require the FANTASY priv. 2025-06-10 16:05:11 +01:00
Sadie Powell 5702fb9145 Add a PREPEND subcommand to chanserv/topic. 2025-06-10 12:06:02 +01:00
Sadie Powell 783ba3fd74 Undocument DISCOURAGED; we do not use this anymore. 2025-06-08 16:21:08 +01:00
Sadie Powell f1ddd7cd02 Promote NickServ from OPTIONAL to RECOMMENDED.
Not sure why this wasn't already.
2025-06-08 16:09:43 +01:00
Sadie Powell c424c4d24d Document cs_statusupdate in the same way as other modules. 2025-06-08 12:22:45 +01:00
Sadie Powell 2d88383d9e Group some more chanserv commands. 2025-06-08 12:18:10 +01:00
Sadie Powell c73a6c621f Make the set_misc help format consistent with other set commands. 2025-06-07 13:27:30 +01:00
Sadie Powell 96a503b4d9 Fix a memory leak in the db_json module.
This reworks the module to store Data instead of a yyjson document
which does not free until yyjson_doc_free even if an array is cleared
(which annoyingly was only documented using a single comment in the
yyjson docs).
2025-06-05 22:01:45 +01:00
Sadie Powell 0632abd111 Banish irc2sql to the shadow realm. 2025-06-05 18:22:13 +01:00
TehPeGaSuS 1043e2189c Remove a reference to a config option that doesn't exist.
There's no `memoreceipt` anywhere, as far as I could check.
2025-06-01 15:29:35 +01:00
Sadie Powell 85f0d56c39 Bump for 2.1.16-git. 2025-06-01 10:14:44 +01:00
Sadie Powell cebc3f757b Release 2.1.15. 2025-06-01 10:13:49 +01:00
Sadie Powell 447a59d6f5 Update author list. 2025-06-01 10:06:05 +01:00
Sadie Powell 75aa633d87 Update yyjson. 2025-06-01 10:05:49 +01:00
Sadie Powell 7833a96dde Update the change logs. 2025-06-01 10:04:36 +01:00
Sadie Powell d326f869a3 Add the rpc_user module. 2025-06-01 09:50:29 +01:00
Sadie Powell b724617a8d Revert "Optimise the maths for the jsonrpc oversize integer workaround".
This reverts commit 937404e311.
2025-05-30 18:09:37 +01:00
Sadie Powell 76f0c78ece Remove some unused Windows code. 2025-05-30 14:43:54 +01:00
Sadie Powell 13491bd960 Add {nickserv}:enforcerreal and cache enforcer config on reload. 2025-05-29 17:36:28 +01:00
Sadie Powell bade5ea109 Tweak some help messages for consistency. 2025-05-29 16:46:55 +01:00
Sadie Powell 682a6a6ad4 Fix unsetting vhosts when cloaking isn't available on InspIRCd. 2025-05-29 15:46:31 +01:00
Sadie Powell 50030e07fa Make CTCP support more modular. 2025-05-27 15:30:09 +01:00
Sadie Powell 7b2f0f5790 Fix some trivial wrong types when getting config values. 2025-05-27 13:21:55 +01:00
Sadie Powell 23e72fc934 Convert Anope::Debug to an unsigned value. 2025-05-24 16:54:49 +01:00
Sadie Powell e182519e4d Fix using the wrong command name in the help module. 2025-05-24 15:20:47 +01:00
Sadie Powell 4317b5557e Redocument sendmailpath. 2025-05-23 23:18:12 +01:00
Sadie Powell f97448f48a Modernize some bits of Command. 2025-05-22 10:49:38 +01:00
Sadie Powell cb334fbae1 Remove the pidfile before restarting.
Fixes being unable to restart now we only allow one instance.
2025-05-17 20:04:41 +01:00
Sadie Powell d3bb930a5e Fix some inconsistencies with account lookups. 2025-05-17 19:35:03 +01:00
Sadie Powell 0fc1eb3133 Rename one last use of time_registered. 2025-05-17 15:05:13 +01:00
Sadie Powell 0ac9d70d63 Update the change logs. 2025-05-16 17:07:03 +01:00
Sadie Powell a3d61e3d18 Rename id to uniqueid to avoid shadowing. 2025-05-16 15:23:09 +01:00
Sadie Powell cac10aaa41 Always store a unique identifier in the database. 2025-05-16 15:18:24 +01:00
Sadie Powell be5a0e8108 Serialize using mutable objects not immutable ones. 2025-05-16 15:18:00 +01:00
Sadie Powell 3da8244de5 Log any startup error to the terminal. 2025-05-16 15:15:42 +01:00
Sadie Powell 8722daa6e7 Only allow one instance of Anope at once. 2025-05-16 15:15:30 +01:00
Sadie Powell a0e98acea8 Fix the codelength default. 2025-05-15 01:42:13 +01:00
Sadie Powell c5a2f40666 Move the ssl extensible into the METADATA handler on InspIRCd. 2025-05-14 21:02:48 +01:00
Sadie Powell 1daafff79d Merge various email modules into one module.
In the future this will become the basis of the email contact
module and will encapsulate everything relating to email but for
now its mostly kept as-is.
2025-05-12 14:00:47 +01:00
Sadie Powell 3dd20975aa Also require services operators to confirm their email addresses.
Closes #468.
2025-05-11 22:59:20 +01:00
Sadie Powell 368d8e8b1c Remove first_commit which snuck into an earlier commit. 2025-05-11 18:24:57 +01:00
Sadie Powell 7c5d2c09fa Be more specific in the generator field in db_json. 2025-05-11 17:16:35 +01:00
Sadie Powell 41e702d853 Prefix the special db_json columns with an @. 2025-05-11 16:52:46 +01:00
Sadie Powell 19f83eaa34 Fix loading databases in db_json. 2025-05-11 16:45:44 +01:00
Sadie Powell b1212f9e89 Enable db_json by default. 2025-05-11 15:09:39 +01:00
Sadie Powell 3e9f516d55 Consistently use yes/no instead of true/false in the configs. 2025-05-11 12:49:25 +01:00
Sadie Powell 744b8bc4dc Redocument db_sql(_live) in the example configs. 2025-05-11 12:44:45 +01:00
Sadie Powell e9a0a214b0 Refactor Anope::strftime. 2025-05-10 14:40:12 +01:00
Sadie Powell 46c5570b1d Use UTC in timestamps shown to users. 2025-05-10 14:40:12 +01:00
Sadie Powell 151795a1df Remove an outdated comment in the memoserv example config. 2025-05-10 14:40:12 +01:00
Sadie Powell 50f17ea8e1 Consistently use realname instead of gecos. 2025-05-10 14:40:12 +01:00
Sadie Powell 2609ff44c6 Add defaults for service:{user,host,gecos}. 2025-05-10 14:40:12 +01:00
Sadie Powell ca30bb2370 Fix some remaining uses of vHost in the configs. 2025-05-10 13:32:45 +01:00
Sadie Powell f36b311f84 Add a note to irc2sql about using rpc_data instead. 2025-05-10 11:50:40 +01:00
Sadie Powell fec85376e7 Remove some duplicate chanstats settings. 2025-05-10 11:29:23 +01:00
Sadie Powell 0bf14650fa Always use the same stats object when deserialising stats.
Closes #509.
2025-05-10 10:23:11 +01:00
Sadie Powell 49f93b7670 Use more appropriate types for MaxUserCount and OperCount. 2025-05-10 00:59:20 +01:00
Sadie Powell ce0982cc4a There's no need to count the servers in os_stats. 2025-05-10 00:54:39 +01:00
Sadie Powell b4150841ec Try to ensure we only have use Stats instance.
This probably only happens when a user has a broken database but
its best to be more robust.
2025-05-10 00:54:39 +01:00
Sadie Powell eec428b0c7 Build buffers a bit smarter in cs_access/cs_xop/help. 2025-05-09 22:36:50 +01:00
Sadie Powell b706a6259e Add an accessor to Serialize::Reference and deduplicate code. 2025-05-09 22:25:10 +01:00
Sadie Powell 2cf8f003ce Allow using an account identifier in the anope.account RPC method. 2025-05-09 22:02:06 +01:00
Sadie Powell 07f57b1108 Be more explicit about what versions compatibility code is for. 2025-05-09 21:43:35 +01:00
Sadie Powell 5d648f9f1c Revert "Force the MySQL module to use UTC for connections".
This results in a deadlock. We have other ways for dealing with
this problem anyway.

Closes #506.
2025-05-09 15:35:02 +01:00
Sadie Powell 46e6b0adde Fix some forward declarations in the httpd header. 2025-05-09 15:35:02 +01:00
Sadie Powell 977780d8ef Store user away state and add it to the anope.user RPC event. 2025-05-09 14:47:31 +01:00
Sadie Powell 459f3d07c9 Add TLS usage to the anope.user RPC event. 2025-05-09 14:17:55 +01:00
Sadie Powell b76b407b33 Move HTTP types to the HTTP namespace. 2025-05-09 12:36:42 +01:00
Sadie Powell 8b089ab1a7 Stringify all parameters in the example RPC clients. 2025-05-09 11:33:20 +01:00
Sadie Powell fbec4d04a5 Merge branch '2.0' into 2.1. 2025-05-08 16:55:59 +01:00
Sadie Powell 34582a40ef Change Command::Run to return true on success. 2025-05-08 16:53:10 +01:00
Sadie Powell 4b15ca0232 Bump for 2.0.19-git. 2025-05-08 15:03:03 +01:00
Sadie Powell 997302f861 Release 2.0.18. 2025-05-08 15:01:58 +01:00
Sadie Powell b3b6e9f862 Update the change log. 2025-05-08 14:59:37 +01:00
Sadie Powell d23bfb0113 Fix being able to group guest nicknames.
This does not affect 2.1 because grouped nicknames work differently
on that branch.

Reported by @ValwareIRC.
2025-05-08 14:51:56 +01:00
Val Lorentz 0b7b4aa42d Fix French translation of "last used" 2025-05-06 10:18:58 +01:00
Sadie Powell fab8589e1e Remove rpc_main. 2025-05-05 21:18:27 +01:00
Sadie Powell 937404e311 Optimise the maths for the jsonrpc oversize integer workaround. 2025-05-05 21:11:51 +01:00
Sadie Powell c5ad774ce5 Add a workaround for JavaScript truncating integers in RPC. 2025-05-05 16:53:03 +01:00
Sadie Powell 1321f4f071 Add an example Ruby JSON-RPC client. 2025-05-05 13:25:40 +01:00
Sadie Powell 4319b6428f Fix various documentation errors in the JavaScript JSON-RPC client. 2025-05-05 13:24:23 +01:00
Sadie Powell e1f6d0ca16 Document the existence of the example JSON-RPC client. 2025-05-04 14:45:00 +01:00
Sadie Powell bb9074cbd5 Fix HTTP headers to be case insensitive as required by the spec. 2025-05-04 14:39:51 +01:00
Sadie Powell 72f5e3580f Also allow hashed RPC tokens in the config file. 2025-05-04 14:39:20 +01:00
Sadie Powell 4b854d3935 Add support for bearer tokens for authorising with RPC. 2025-05-04 14:14:19 +01:00
Sadie Powell 0b2b00b37d Send list mode changes with BMASK or EBMASK on Solanum. 2025-05-04 11:28:49 +01:00
Sadie Powell 196a3c32c2 Request EBMASK on Solanum.
TODO: also send this.
2025-05-04 03:18:23 +01:00
Sadie Powell 8955c53088 Zero-initialize a variable in BuildModeChange. 2025-05-04 02:56:59 +01:00
Sadie Powell 88c71fba64 Request SJSBY from UnrealIRCd.
We don't send this yet because its not ergonomic to do so with
the current API. Bleh.
2025-05-04 02:07:15 +01:00
Sadie Powell 21f61981ca Enable hidenetsplitquit by default. 2025-05-04 00:18:09 +01:00
Sadie Powell 5752c07a56 Fix a missing override keyword. 2025-05-03 21:40:21 +01:00
Sadie Powell 010beb52b1 Store the setter and ts for all modes and try to restore them.
This is mostly for preserving channel list mode info.
2025-05-03 21:28:56 +01:00
Sadie Powell c955941413 Remove the unused template overload of SendMode. 2025-05-03 19:01:35 +01:00
Sadie Powell 2e2515b9f0 Always use SVSLOGIN on UnrealIRCd. 2025-05-03 19:00:58 +01:00
Sadie Powell f0b26c9b44 Drop support for Bahamut as it has no non-DALnet users.
Closes #438.
2025-05-03 18:41:59 +01:00
Sadie Powell f953f7f006 Bump the minimum version of ircd-hybrid to 8.2.34.
This is 5 years old and allows us to remove the SVSACCOUNT hack.
2025-05-03 18:10:24 +01:00
Sadie Powell 84baf15620 Don't send join numerics to our own clients. 2025-05-03 17:16:05 +01:00
Sadie Powell 89f61ac91b Remove the inconsistently used [auto memo] prefix from some memos. 2025-05-02 12:25:15 +01:00
Sadie Powell b091184c60 Remove an obsolete comment about Windows. 2025-05-02 11:38:17 +01:00
Sadie Powell 6b1a491694 Add a note to LANGUAGE about control characters in messages. 2025-05-02 11:37:23 +01:00
Sadie Powell 66d3293ae6 Remove double spacing after a full stop in help messages.
This hasn't been considered a best practice since the age of the
typewriter.

https://english.stackexchange.com/questions/2544/how-many-spaces-should-come-after-a-period-full-stop
2025-05-02 11:10:35 +01:00
Sadie Powell a4691f9d4d Fix some typos in the change log. 2025-05-02 11:01:38 +01:00
Sadie Powell 51c7a15c45 Bump for 2.1.15-git. 2025-05-02 09:52:40 +01:00
Sadie Powell b51c6453ae Release 2.1.14. 2025-05-02 09:52:40 +01:00
Sadie Powell 8a44b9c0ea Update the change logs. 2025-05-02 09:52:40 +01:00
Sadie Powell 0dd5430c94 Deduplicate code in cs_access. 2025-04-27 20:58:35 +01:00
Sadie Powell 046fa5c848 Show the reason why a config file failed to open. 2025-04-27 14:16:10 +01:00
Sadie Powell 551f3504c8 Fix broken handling of colour codes in LineWrapper.
Closes #504.
2025-04-27 13:01:29 +01:00
Sadie Powell c11638db98 Allow disabling the timestamp in os_news messages. 2025-04-25 13:08:26 +01:00
Sadie Powell 9ca69a7b49 Fix a typo in ns_alist. 2025-04-24 15:01:54 +01:00
Sadie Powell 459c7947ce Fix skipping lone $ values within config values. 2025-04-24 12:48:48 +01:00
Sadie Powell fad0a4a0e8 Add support for hashing operator passwords in the config.
Closes #327.
2025-04-24 12:46:58 +01:00
Sadie Powell 1630ccedb1 Remove some double lookups in User::BadPassword. 2025-04-24 11:59:21 +01:00
Sadie Powell 36d69b1e5c Update the change logs. 2025-04-23 17:34:33 +01:00
Sadie Powell 627b89ec7b Fix a minor regression in serialising channel data. 2025-04-23 17:33:01 +01:00
Sadie Powell 9373677610 Respect NEVEROP in chanserv/set/{founder,successor}. 2025-04-23 03:21:08 +01:00
Sadie Powell bbb65ddc33 When deleting a single list item show the deleted item not a count.
Closes #487.
2025-04-23 01:57:02 +01:00
Sadie Powell 508bbe11e6 Show all privileges in nickserv/alist.
Closes #502.
2025-04-23 00:33:48 +01:00
Sadie Powell 095ed3c8c8 Allow users to unmark themselves as a channel successor.
Closes #501.
2025-04-22 22:53:40 +01:00
Sadie Powell f3743cd37d Remove hardcoded command names from most messages. 2025-04-22 18:56:26 +01:00
Sadie Powell 0c155e0c05 Replace hard linebreaks in RPC and webcpanel messages. 2025-04-22 18:16:31 +01:00
Sadie Powell f362959834 Fix splitting in the middle of some command names. 2025-04-22 18:16:31 +01:00
Sadie Powell f5a85c69d2 Remove time from the name of some variables where its obvious. 2025-04-19 22:53:49 +01:00
Sadie Powell c8b3819767 Add the anope.account and anope.listAccounts RPC events. 2025-04-19 22:31:49 +01:00
Sadie Powell e6a1982922 Fix various typos in the rpc_data docs. 2025-04-19 21:49:33 +01:00
Sadie Powell 40a1dc9536 Document the rpc_data result better. 2025-04-19 17:22:06 +01:00
Sadie Powell 70bf013ef0 Allow syntax messages to take a predicate. 2025-04-19 16:54:26 +01:00
Sadie Powell 18dfa62626 Add expanded data to the rpc_data list events. 2025-04-19 15:16:07 +01:00
Sadie Powell d815906393 Get rid of the internal block wrapper.
This only existed for compatibility with old 2.0 modules and 2.1
has already broken compatibility with them.
2025-04-19 12:49:06 +01:00
Sadie Powell 452e62c050 Add support for local password comparison in sql_authentication. 2025-04-19 12:38:32 +01:00
Sadie Powell 151f9c2bcc Backport the Windows CI runner to 2.0.
[skip ubuntu ci]
2025-04-18 18:24:29 +01:00
Sadie Powell 4916e1dbfc Use windows-2025 for the Windows CI.
[skip alpine ci]
[skip ubuntu ci]
2025-04-18 12:53:47 +01:00
Sadie Powell fa7ed12aad Use a duration string when telling people to wait before emailing. 2025-04-16 03:00:52 +01:00
Sadie Powell 94c20f3084 Use duration strings when reporting the expiry period. 2025-04-16 02:52:31 +01:00
Sadie Powell 597d4a1aee Update the change logs. 2025-04-16 02:45:53 +01:00
Sadie Powell 1e95d0f536 Fix some text strings that should be marked as translatable. 2025-04-16 02:19:17 +01:00
Sadie Powell ad0b4d1aa0 Rename TextSplitter to LineWrapper. 2025-04-16 01:53:50 +01:00
Sadie Powell 74e9a9d2fe Automatically wrap the help output. 2025-04-16 01:50:59 +01:00
Sadie Powell d2aee394ea Fix a compiler warning on Clang. 2025-04-16 00:14:46 +01:00
Sadie Powell 3e696fae0f Reduce the maximum line length from 120 to 100.
This should fit on user screens a bit better.
2025-04-16 00:07:33 +01:00
Sadie Powell ce362854a3 Update as many messages as possible for automatic line wrapping. 2025-04-16 00:04:30 +01:00
Sadie Powell a883b616a1 Automatically line wrap messages sent by services. 2025-04-15 19:30:59 +01:00
Sadie Powell b421ba258e Show the protection time in the INFO output. 2025-04-15 19:26:32 +01:00
Sadie Powell 3691887297 Add / to the default vhost chars. 2025-04-15 18:18:15 +01:00
Sadie Powell 75e2501500 Allow unbanning virtual modes, add the !unmute fantasy command. 2025-04-15 15:59:51 +01:00
Sadie Powell 1c6db37681 Fix a typo in cs_unban. 2025-04-15 15:29:59 +01:00
Sadie Powell 5c2fc1cedd Allow clearing other list modes using ClearBans. 2025-04-15 15:00:25 +01:00
Sadie Powell d891f2bcbd Sync the GitHub templates with the ones InspIRCd uses. 2025-04-15 13:51:51 +01:00
Sadie Powell 5eb13f4420 Use Anope::Template in db_json. 2025-04-15 13:04:09 +01:00
Sadie Powell bd9d3b0f7d Add support for monthly backups to db_json. 2025-04-15 13:00:34 +01:00
Sadie Powell cbb41241d4 Merge branch '2.0' into 2.1. 2025-04-15 11:42:49 +01:00
Sadie Powell b9acaa6d51 Ask people to file PRs on GitHub as well as emailing team@. 2025-04-15 10:05:51 +01:00
Sadie Powell 9d18fdf0f6 Update the change logs. 2025-04-14 11:56:40 +01:00
Sadie Powell d04a312d0d Add Anope::Templace and switch all template strings to use it. 2025-04-14 11:31:19 +01:00
Sadie Powell 099f0ce43a Purge the seen database after 90 days. 2025-04-14 01:51:40 +01:00
Sadie Powell 07bd1bbec9 Switch enc_sha2 default from sha256 to sha512. 2025-04-14 01:01:24 +01:00
Sadie Powell aa0a687a58 Fix a typo in the example config. 2025-04-14 01:00:17 +01:00
Sadie Powell b89cc47642 Resort the Implementation list. 2025-04-13 16:05:06 +01:00
Sadie Powell d87fa4d781 Add a matcher for the InspIRCd oper name extban. 2025-04-13 13:15:05 +01:00
Sadie Powell 9351debd73 Expand GetQueryCommand to take a command name. 2025-04-10 13:34:25 +01:00
Sadie Powell 40d558ef21 Make the length of confirmation codes configurable. 2025-04-07 12:27:45 +01:00
Sadie Powell e1224ac486 Ignore the SLOG message on UnrealIRCd. 2025-04-05 07:13:08 +01:00
Sadie Powell ddd33e65b4 Add a log message for when we receive a weirdly targeted message. 2025-04-05 07:11:54 +01:00
Sadie Powell e4f88d44cd Deduplicate checks in ns_cert. 2025-04-05 06:53:40 +01:00
Sadie Powell 063b4a9918 Merge branch '2.0' into 2.1. 2025-04-02 23:01:04 +01:00
Sadie Powell c6065ff0f3 Update the change log. 2025-04-02 23:00:12 +01:00
Sadie Powell a5aae4f41d Fix building in a post-CMP0082 world. 2025-04-02 23:00:12 +01:00
Sadie Powell d019da673d Replace NormalizeBuffer implementation with the one from InspIRCd.
This is more robust and will handle more formatting code types.
2025-04-02 17:04:47 +01:00
Sadie Powell 4d7adbf2b7 Fix an unnecessary substr in irc2sql. 2025-04-02 16:37:49 +01:00
Sadie Powell 404bf77ef5 Add a message handler for messages that can be safely ignored. 2025-04-02 13:17:38 +01:00
Sadie Powell 69393a5f14 Fix building in a post-CMP0082 world. 2025-04-02 13:12:19 +01:00
Sadie Powell 97c63822fc Bump the minimum CMake version to 3.20.
This should hopefully prevent us from being burned by CMake
dropping old version compatibility for a long time.
2025-04-02 10:11:21 +01:00
Sadie Powell 698dd78ef8 Merge branch '2.0' into 2.1. 2025-04-02 10:09:58 +01:00
Sadie Powell 0b36ddfaf3 Fix building on old versions of RHEL. 2025-04-02 09:58:49 +01:00
Sadie Powell 947ddc9e1b Fix building on CMake 4.
This is a partial backport from 2.1.
2025-04-02 09:53:10 +01:00
Sadie Powell 59d516d5b0 Refactor and document the rest of the SASL header. 2025-04-01 16:57:28 +01:00
Sadie Powell 2ecb667d1c Bump the minimum CMake version in the docs. 2025-04-01 16:29:11 +01:00
Sadie Powell c21f6ac597 Bump for 2.1.14-git. 2025-04-01 11:06:38 +01:00
Sadie Powell 390d0482fc Release 2.1.13. 2025-04-01 11:04:29 +01:00
Sadie Powell 65bb0a374b Move SASL::IdentifyRequest to ns_sasl.
This is only useful for plain authentication and doesn't need to
be in the header.
2025-03-31 16:58:22 +01:00
Sadie Powell ea4877dc16 Update the changelogs. 2025-03-30 13:06:48 +01:00
Sadie Powell 4024598bd8 Execute SQL updates atomically.
If the Serialize call alters any tables they would have previously
been missed here.
2025-03-30 13:01:13 +01:00
Sadie Powell a154532e98 Use insert_or_assign when creating ChannelInfo instances. 2025-03-30 12:42:18 +01:00
Sadie Powell 665b0fdef8 Refuse to import data that already exists in db_atheme. 2025-03-30 12:17:23 +01:00
Sadie Powell 0802d9d3ff Reference accounts in the database by their id not their nick. 2025-03-30 11:57:47 +01:00
Sadie Powell 8d3b8c08b3 Add NickAlias::FindId. 2025-03-30 11:04:46 +01:00
Sadie Powell f3e5ccf353 Initialize ChannelInfo in the Modern C++ way. 2025-03-26 11:23:05 +00:00
Sadie Powell b5213d5a81 Initialize Channel in the Modern C++ way. 2025-03-26 11:08:02 +00:00
Sadie Powell dc09408f1a Add a typedef for the serializable id. 2025-03-26 10:22:42 +00:00
Sadie Powell 49d86527ef Initialize the db_flatfile LoadData stream reference from the ctor. 2025-03-26 09:32:29 +00:00
Sadie Powell 65183c3c49 Update the change logs. 2025-03-26 09:18:56 +00:00
Sadie Powell c60477384c Add the db_json module. 2025-03-26 09:08:55 +00:00
Sadie Powell 25c3fd51b7 Fix a missing format argument in ns_maxemail. 2025-03-22 21:45:29 +00:00
Sadie Powell a40eaeb2a3 Use a plural form translation for the ns_maxemail error. 2025-03-22 21:04:25 +00:00
Sadie Powell e14a650cb9 Read the ns_maxemail limit as unsigned instead of int. 2025-03-22 21:02:52 +00:00
Sadie Powell 6401e328bb Merge branch '2.0' into 2.1. 2025-03-22 20:52:25 +00:00
Sadie Powell 43dc6f7509 Fix ns_maxemail miscounting email addresses in some cases. 2025-03-22 20:19:50 +00:00
Sadie Powell 8f0ee6f383 Update more messages to use gettext plural forms. 2025-03-22 08:58:24 +00:00
Sadie Powell 1adbce61cb Fix a semicolon that was missing from the previous commit. 2025-03-22 08:43:38 +00:00
Sadie Powell fe60c9a085 Fix an unclear message in gl_queue. 2025-03-22 08:36:57 +00:00
Sadie Powell 39bb5825ad Deduplicate requirename code in os_shutdown. 2025-03-22 08:33:21 +00:00
Sadie Powell 602ff60e21 Document the migration path for removed config options.
Also resort the config changelog so it is listed alphabetically.
2025-03-22 08:17:28 +00:00
Sadie Powell 8d0399e356 Document the default value for new config options in the changelog. 2025-03-22 08:04:55 +00:00
Sadie Powell a4d0213bcb Update the changelogs. 2025-03-22 07:59:54 +00:00
Sadie Powell ecbf53ba6c Allow customising the length at which lines are wrapped after.
Closes #485.
2025-03-22 07:33:02 +00:00
Sadie Powell 6d72fd67d8 Improve logging about the protocol module on startup. 2025-03-19 13:37:11 +00:00
Sadie Powell 0a11bc7693 Merge branch '2.0' into 2.1. 2025-03-19 13:08:14 +00:00
Sadie Powell e86fa67e38 Use a set instead of a vector for storing memo ignores. 2025-03-19 10:12:02 +00:00
Sadie Powell 1fc2642034 Make it clear that an ignore list is for memos in ms_ignore.
Closes #484.
2025-03-19 09:55:32 +00:00
Sadie Powell 1641f6415a RPC::service is not necessary anymore. 2025-03-17 19:06:14 +00:00
Sadie Powell bb1f93f150 Switch RPC event registration to use the service system. 2025-03-17 12:58:22 +00:00
Sadie Powell 85fbc500d8 Simplify the requirename logic. 2025-03-17 11:23:19 +00:00
Sadie Powell 99bcc6d3b7 Improve the error reporting in os_shutdown. 2025-03-16 20:21:34 +00:00
Sadie Powell 5fd2145821 Update author list. 2025-03-16 12:16:02 +00:00
Sadie Powell 4700d48b35 Import a slightly modified version of mkauthors from InspIRCd. 2025-03-16 12:16:02 +00:00
Sadie Powell 019b2aafef Update the mailmap. 2025-03-16 12:16:01 +00:00
Sadie Powell 3744649320 Move the RPC service interface to the RPC header. 2025-03-15 23:49:58 +00:00
Sadie Powell 30593321f4 Fix getting the IP of a user in CommandSource. 2025-03-15 21:08:49 +00:00
Sadie Powell 3b35199a53 Add NickCore::FindId for finding an account by its id. 2025-03-15 21:08:26 +00:00
Sadie Powell 5ac5e1068e Use custom-cloak when setting the SASL hostname too. 2025-03-15 00:17:18 +00:00
Sadie Powell 0ebc43f0dc Refactor the InspIRCd METADATA handler to actually be readable. 2025-03-14 23:21:42 +00:00
Sadie Powell 5ff86ea2c5 Implement support for the new way of setting vhosts on InspIRCd. 2025-03-14 19:45:43 +00:00
Sadie Powell 1bdc9c0a64 Fix {nickserv}:defaults still documenting the old nick protection. 2025-03-14 12:13:13 +00:00
Sadie Powell d0d46408bc Improve JSON-RPC error messages. 2025-03-14 11:49:01 +00:00
Sadie Powell fdc33b0f6d Warn if enc_bcrypt is the first module and maxpasslen is >72. 2025-03-14 11:09:35 +00:00
Sadie Powell 6a43370e13 Deduplicate response building code in the jsonrpc module. 2025-03-13 16:01:16 +00:00
Sadie Powell 1fcd045aff Fix the jsonrpc not having a root element one is not specified. 2025-03-13 15:49:33 +00:00
Sadie Powell b4d068b01a Fix the messageUser function in the JavaScript library. 2025-03-13 15:27:07 +00:00
Sadie Powell 23d548336a Document the required RPC modules in the JavaScript library. 2025-03-13 15:24:48 +00:00
Sadie Powell 82371dc279 Update the changelogs. 2025-03-13 15:17:08 +00:00
Sadie Powell fd6770373f Add the rpc_message module, remove the notice RPC event. 2025-03-13 15:12:47 +00:00
Sadie Powell 645f969d70 Fix sending global messages with the default sender. 2025-03-13 15:12:47 +00:00
Sadie Powell 3187233783 Fix setting keepbackups to 0 in db_flatfile. 2025-03-13 13:37:54 +00:00
Sadie Powell 8b932dc459 Fix a crash in the ns_sasl module.
Closes #481.
2025-03-13 12:52:50 +00:00
Sadie Powell a357ba38fb Fix deleting old db_flatfile database backups. 2025-03-13 12:14:17 +00:00
Sadie Powell 9f8525e3b2 Refactor the TIME handler. 2025-03-13 10:47:18 +00:00
Sadie Powell ace82596d8 Fix a warning on Clang. 2025-03-13 10:43:37 +00:00
Sadie Powell 09e10d2a02 Add an ALLTIME handler on InspIRCd. 2025-03-13 10:39:14 +00:00
Sadie Powell 9ec3f6abd6 Refactor and redocument Serialize::Type. 2025-03-12 16:52:46 +00:00
Sadie Powell e7b18609f6 Add defines for the core serialisation type names. 2025-03-12 15:53:52 +00:00
Sadie Powell cdcf0e2f9a Move serialization from Serializable to a Serialize::Type child. 2025-03-12 15:53:52 +00:00
Sadie Powell 718f2e922a Const correct Serialize::Type::GetName(). 2025-03-12 01:00:02 +00:00
Sadie Powell 2b2b6f75a1 Fix the id data type in db_flatfile. 2025-03-12 00:55:21 +00:00
Sadie Powell 883367c1d2 Fix importing some data from 1.8. 2025-03-12 00:33:41 +00:00
Sadie Powell 2276c62ff0 Move serialization data type logic from sql.h to the core. 2025-03-12 00:16:15 +00:00
Sadie Powell fb0ee27df0 Save the databases on SIGUSR1. 2025-03-12 00:16:15 +00:00
Sadie Powell b14befc77c Fix an outdated comment. 2025-03-10 13:10:13 +00:00
Sadie Powell 64fd5a862a Add an XML-RPC method to rpc_system for debugging RPC responses. 2025-03-10 13:03:29 +00:00
Sadie Powell 0ff170c671 Add a config option for disabling the i8 XML-RPC extension. 2025-03-10 12:48:13 +00:00
Sadie Powell ea0d5c4d70 Add a config option for disabling the nil XML-RPC extension. 2025-03-10 12:48:13 +00:00
Sadie Powell b96dbfc9ba Fix a memory leak in the xmlrpc module. 2025-03-10 11:07:29 +00:00
Sadie Powell e221c7642a Update the changelogs. 2025-03-09 20:14:03 +00:00
Sadie Powell b8c28419da Add a missing override keyword. 2025-03-09 19:49:28 +00:00
Sadie Powell 1c4f9042e7 Simplify some weird logic in bs_bot. 2025-03-09 19:31:58 +00:00
Sadie Powell a3f483ad87 Fix a forward declaration on Clang. 2025-03-09 18:58:49 +00:00
Sadie Powell 6e90a8ea55 Don't tell users that services is shutting down when its restarting. 2025-03-09 18:56:27 +00:00
Sadie Powell 6d7fe69cdf Add support for oper-only quit messages.
This currently only works on InspIRCd but I believe that other
servers also support this.
2025-03-09 18:51:03 +00:00
Sadie Powell 314ef60900 Fix a compiler warning on Clang. 2025-03-09 14:36:57 +00:00
Sadie Powell 1e8ac58bb4 Sync the chanserv defaults between the code and config. 2025-03-09 14:33:29 +00:00
Sadie Powell badcf31499 Make config variables a lot more useful.
- Config variables now no longer conflict with regular values.

- Config variables can now be read from the environment.
  (e.g. ${env.USER}).

- Config variables can now be used as partial values
  (e.g. support@${network.domain})
2025-03-09 14:20:34 +00:00
Sadie Powell c98602bf19 Fix various webcpanel bugs relating to nickname protection. 2025-03-08 14:45:26 +00:00
Sadie Powell 50bec959e5 Turn on channel persistence by default. 2025-03-08 14:25:08 +00:00
Sadie Powell 62bfa33464 Rework how nickname protection works.
- Rename the command and module from kill to protect (this command
  hasn't actually killed users in a long time).
- Replace QUICK/IMMED with a duration option.
2025-03-08 14:07:15 +00:00
Sadie Powell b4ab7dadb9 Use a C++11 lambda instead of a channel sorting method. 2025-03-08 12:41:22 +00:00
Sadie Powell df0cd3ef3e Move some headers around. 2025-03-08 12:22:07 +00:00
Sadie Powell 9e37a643f1 Fix some minor issues with db_atheme error messages. 2025-03-07 12:34:19 +00:00
Sadie Powell b30bfb5d2b Import misc channel and user metadata in db_atheme. 2025-03-07 12:31:42 +00:00
Sadie Powell cccdf0431b Don't warn when importing an external auth account from Atheme.
This happens when Atheme was using LDAP to authenticate users. We
will replace the temporary password at a later date if Anope is set
up to use LDAP too.
2025-03-06 23:31:56 +00:00
Sadie Powell 0005ebbbc3 Import logon and oper news from Atheme. 2025-03-06 23:05:38 +00:00
Sadie Powell 161841925d Force the MySQL module to use UTC for connections.
This prevents conversion issues when the MySQL server is in a
different timezone to the services server.
2025-03-06 20:51:13 +00:00
Sadie Powell e099180d8f Fix a REPRODUCIBLE_BUILD check after the previous commit. 2025-03-06 11:29:47 +00:00
Sadie Powell 2091dc68bc Move REPRODUCIBLE_BUILD to sysconf. 2025-03-06 01:24:39 +00:00
Sadie Powell 9926ac5a05 Fix reading the config of some modules. 2025-03-05 16:25:17 +00:00
Sadie Powell 14342f6375 Fix the on start library version logging to include the module. 2025-03-05 16:03:23 +00:00
Sadie Powell a0a9d433dc Blacklist an old UnrealIRCd contrib module that breaks Anope. 2025-03-04 17:15:07 +00:00
Sadie Powell c88fac1a20 Document {ns_sasl}:agent. 2025-03-04 00:50:20 +00:00
Sadie Powell 64d26f7c61 Remove GetAgent and SendMechs from the SASL interface.
These are only used by ns_sasl.
2025-03-04 00:43:06 +00:00
Sadie Powell 34896cefe9 Misc cleanup of ns_sasl and sasl.h. 2025-03-03 23:57:12 +00:00
Sadie Powell c0c7046a6d Check if users really want to use 2.1 in Config. 2025-03-03 23:29:53 +00:00
Sadie Powell 937ea7dab4 SASL::ProtocolInterface should not be exported. 2025-03-03 22:53:16 +00:00
Sadie Powell bfd2b0fa8e Merge branch '2.0' into 2.1. 2025-03-03 22:48:23 +00:00
Sadie Powell 7f2c281121 Fix a compiler warning on newer versions of MSVC. 2025-03-03 22:46:12 +00:00
Sadie Powell 224caf32c7 Rename sasl to ns_sasl, move to nickserv.example.conf. 2025-03-03 22:02:48 +00:00
Sadie Powell 5828cdba45 Move SASL protocol messages to the SASL header. 2025-03-03 21:45:59 +00:00
Sadie Powell 4526fbed96 Add a helper method for getting a description of an uplink. 2025-03-02 15:42:25 +00:00
Sadie Powell f9911dde52 Return references instead of pointers from the config system.
We used to return NULL from these methods but now we return an empty
block so this can never actually be null now.
2025-03-02 15:27:47 +00:00
Sadie Powell a5e5eb5eb0 Return EmptyBlock instead of NULL from GetModule. 2025-03-02 14:43:57 +00:00
Sadie Powell 82aecd6c7e Bump for 2.1.13-git. 2025-02-28 16:11:40 +00:00
Sadie Powell 3cef83c8c5 Release 2.1.12. 2025-02-28 16:10:09 +00:00
Sadie Powell 0781f8a82a Update the changelogs. 2025-02-28 09:58:23 +00:00
Sadie Powell fb03d745c5 Add a JavaScript library for accessing the JSON-RPC API. 2025-02-26 17:18:03 +00:00
Sadie Powell 752f5e269e Deduplicate RPC parameter count checks. 2025-02-25 23:13:54 +00:00
Sadie Powell bb3e124bdb Deduplicate some SASL logic. 2025-02-25 20:45:34 +00:00
Sadie Powell 07610ad2d9 Improve the rpc_system module config. 2025-02-25 20:06:44 +00:00
Sadie Powell e500258ce4 Add the rpc_data module.
- Add rewritten and namespaced versions of the channel, oper, user
  events.

- Add the following new events:
  * anope.listChannels
  * anope.listOpers
  * anope.listServers
  * anope.listUsers
  * anope.server
2025-02-25 19:59:23 +00:00
Sadie Powell 801a748e25 Add the system.listMethods RPC method.
Still to implement:

- system.getCapabilities
- system.methodHelp
- system.methodSignature
2025-02-24 03:59:52 +00:00
Sadie Powell a111b40560 Allow use of a non-map type as the root RPC element. 2025-02-24 03:41:06 +00:00
Sadie Powell 2ccd182d2e Add support for RPC arrays, simplify the RPC objects. 2025-02-24 03:07:22 +00:00
Sadie Powell ee08b3e880 Rename RPC::Block to RPC::Map. 2025-02-23 17:50:05 +00:00
Sadie Powell a4bfd52b7e If a user is already connected on SASL fail just call BadPassword. 2025-02-23 17:50:05 +00:00
Sadie Powell 34a539ba78 Fix detecting whether translations are disabled in ns_set_language. 2025-02-23 11:44:52 +00:00
Sadie Powell 096c996900 Fix resetting the SASL password limit. 2025-02-23 11:44:52 +00:00
Robby ab0a67c35c Update the dutch language file. 2025-02-23 04:22:45 +01:00
Robby b448a20f40 Update the dutch language file. 2025-02-23 04:22:33 +01:00
Sadie Powell d5f4b06972 Improve SASL log messages for post-connection authentication. 2025-02-20 21:35:17 +00:00
Sadie Powell ff8aca1db4 Apply bad password logic to SASL too. 2025-02-20 21:20:00 +00:00
Sadie Powell 8da52bf121 Clean up some session code in the SASL module. 2025-02-20 21:19:31 +00:00
Sadie Powell 0c193f8149 Store the source address in the identify request. 2025-02-20 19:49:01 +00:00
Sadie Powell fa0f78b937 Add error constants for the custom error range. 2025-02-20 15:08:37 +00:00
Sadie Powell 96839ae1b8 Move RPC types to the RPC namespace. 2025-02-20 14:57:55 +00:00
Sadie Powell 5420f48580 Use an enum for standard RPC error codes. 2025-02-20 14:57:22 +00:00
Sadie Powell 5967bf4176 Log the version of xmlrpc-c on module load. 2025-02-20 13:31:51 +00:00
Sadie Powell bf68d1c0e0 Merge branch '2.0' into 2.1. 2025-02-20 13:07:14 +00:00
Sadie Powell 227caba783 Fix sql_live on recent MariaDB. 2025-02-20 13:05:22 +00:00
Sadie Powell b498f4f4d9 Add support for more RPC data types. 2025-02-20 12:53:15 +00:00
Sadie Powell 8330cd119a Fix sending RPC responses after the previous commit. 2025-02-18 21:27:46 +00:00
Sadie Powell 3c55fbe650 Rework how the RPC interface stores its events. 2025-02-18 17:01:33 +00:00
Sadie Powell 98320d130f Rewrite the xmlrpc module using libxmlrpc-c. 2025-02-18 16:15:58 +00:00
Sadie Powell 37f21a2e1e Fix building the LDAP module on Windows. 2025-02-18 12:00:22 +00:00
Sadie Powell 9f82a960e4 Log the version of third-party libraries on load. 2025-02-18 11:48:43 +00:00
Sadie Powell 3bba87b655 Make the password optional in operserv/login. 2025-02-16 12:12:38 +00:00
Sadie Powell 515dc96d6c Merge branch '2.0' into 2.1. 2025-02-14 21:55:06 +00:00
Sadie Powell b51dff0b1a Update the CI for the upcoming Ubuntu 20.04 removal. 2025-02-14 21:51:47 +00:00
Sadie Powell 69bc149f7f Reduce indentation in rpc_main. 2025-02-14 21:47:33 +00:00
Sadie Powell 3c340f550a Update the XMLRPC example to use JSON-RPC instead. 2025-02-14 21:13:10 +00:00
Sadie Powell 420f83bbbf Use RPC error responses correctly. 2025-02-14 20:54:06 +00:00
Sadie Powell 84b0859e8d Fix the naming convention of the RPC methods. 2025-02-14 19:47:33 +00:00
Sadie Powell ddce28c055 Merge branch '2.0' into 2.1. 2025-02-14 18:15:56 +00:00
Sadie Powell fbb8442252 Reset the stats properly.
Closes #465.
2025-02-14 18:15:51 +00:00
Sadie Powell 8110fddfe5 Document the sql_live performance limitations. 2025-02-14 18:09:34 +00:00
Sadie Powell 947eabed6c Keep going in cs_mode if a target doesn't exist. 2025-02-14 15:06:04 +00:00
Sadie Powell 94ccd03790 Allow changing the status modes of multiple people at once.
Closes #473.
2025-02-14 15:00:12 +00:00
Sadie Powell 84dbb5c9a3 Tidy up the change logs. 2025-02-13 04:55:15 +00:00
Sadie Powell 4b2b47fc95 Remove some debugging code from the JSON-RPC module. 2025-02-13 04:26:42 +00:00
Sadie Powell 9e621cca11 Add the new JSON-RPC module to compliment the XMLRPC one. 2025-02-13 04:19:39 +00:00
Sadie Powell 1e82b4075e Make the RPC API sanitize automatically. 2025-02-13 01:54:57 +00:00
Sadie Powell f8c1b8f4f9 Rework the RPC modules in preparation for the new JSON-RPC module. 2025-02-13 01:45:20 +00:00
Sadie Powell eaa00c7c9e Vendor yyjson. 2025-02-13 01:45:13 +00:00
Sadie Powell 2d48d9ef0d Disable operserv/quit by default.
This is dangerous and almost never what is actually wanted.
2025-02-12 15:40:13 +00:00
Sadie Powell 3e986b215e Add extra protections to avoid rebooting the wrong network. 2025-02-12 15:39:41 +00:00
Sadie Powell 8486962fef Merge branch '2.0' into 2.1. 2025-02-11 13:52:53 +00:00
Sadie Powell 1f7aa241bb Prioritise operserv/ignore above other modules.
Closes #471.
2025-02-11 13:48:11 +00:00
Sadie Powell e3abae44a7 Make email confirmation a bit smarter. 2025-02-11 11:57:34 +00:00
Sadie Powell a8be208da1 Add some options to botserv/botlist to make admining easier. 2025-02-07 01:14:12 +00:00
Sadie Powell abbb602463 Fix SASL on UnrealIRCd. 2025-02-06 19:01:10 +00:00
Sadie Powell 86805a6b3b Add the bot real name to the botlist info.
This is actually shown by modern clients so its useful info.
2025-02-05 19:56:55 +00:00
Sadie Powell 5d9344b677 Fix the pluralisation of a message in bs_info. 2025-02-05 19:38:36 +00:00
Sadie Powell 8d3755af5b Use fallback certs when doing SASL authentication. 2025-02-05 13:45:15 +00:00
Sadie Powell 115c9eb5a0 Merge the SASL data and ext parameters.
There might be more than this so its better to just store it in a
1+ parameter vector.
2025-02-05 13:45:15 +00:00
Sadie Powell ee18083bb7 Make it easier to fail and delete SASL sessions. 2025-02-05 12:49:29 +00:00
Sadie Powell 3af8f35d3a Import more data from Atheme. 2025-02-05 00:46:52 +00:00
Sadie Powell da2f2fd852 Fix a typo in the enc_sha2 docs. 2025-01-30 13:38:49 +00:00
Sadie Powell d460b267e3 Reject passwords bigger than Bcrypt can handle. 2025-01-25 17:54:49 +00:00
Sadie Powell a8eda0676d Backport logging the reason sending email failed to the 2.0 branch.
Closes #463.
2025-01-23 19:23:32 +00:00
Sadie Powell 9bab54af79 Qualify a use of auto. 2025-01-17 23:54:53 +00:00
Sadie Powell 0a82366a6b Merge branch '2.0' into 2.1. 2025-01-14 13:41:19 +00:00
Sadie Powell f0bc9536e6 Merge branch '2.0' into 2.1. 2025-01-14 13:35:55 +00:00
Sadie Powell da7f47c1c7 Update the copyright headers for 2025. 2025-01-14 13:30:07 +00:00
Sadie Powell 9d165f13e7 Allow skipping user modes in keepmodes. 2025-01-13 15:35:13 +00:00
Sadie Powell 3582bc0f58 Move keepmodes to its own module. 2025-01-13 15:10:31 +00:00
Sadie Powell 97589e5c62 Enable activate_on_set by default. 2025-01-13 14:38:15 +00:00
Sadie Powell 098074ba8b Add an option to re-cloak opers on logout.
Closes: #421
2025-01-13 14:36:55 +00:00
Sadie Powell c680cb6c58 Fix the build error introduced in the previous commit.
TODO: learn to spell `git add` correctly.
2025-01-10 14:42:16 +00:00
Sadie Powell a603f39b4b Warn users of the old InspIRCd protocol that support is deprecated.
We will drop this later in the year when that branch goes EOL.
2025-01-10 13:59:49 +00:00
Sadie Powell 78b548628c Add example code for how to validate SHA2 passwords in PHP. 2024-12-15 13:23:31 +00:00
Sadie Powell d0e24a50b8 Add Service::GetServices. 2024-12-13 10:57:19 +00:00
Sadie Powell 69b94fe041 Switch Service::GetServiceKeys to use a range-for loop. 2024-12-13 10:57:03 +00:00
Sadie Powell 6ba0224f7b Use a more useful setting example in os_config. 2024-12-12 17:11:41 +00:00
Sadie Powell a92f09153a Bump for 2.0.18-git. 2024-12-08 12:18:55 +00:00
Sadie Powell 73714420d1 Release 2.0.17. 2024-12-08 12:15:26 +00:00
Sadie Powell ea96f2ad40 Update the change log. 2024-12-08 12:13:28 +00:00
Sadie Powell b6f5b50086 Bump for 2.1.12-git. 2024-12-01 10:06:34 +00:00
Sadie Powell 3ae4a022eb Release 2.1.11. 2024-12-01 10:04:21 +00:00
Sadie Powell ea8a692191 Add support for numerics associated with cs_set_misc entries.
This is mainly to allow the URL entry to use RPL_CHANNELURL.
2024-11-29 20:39:22 +00:00
Sadie Powell 026d6c461d Update the change logs. 2024-11-29 17:24:13 +00:00
Sadie Powell 3cbac4bcea Update Send and Recv to use ssize_t instead of int. 2024-11-25 16:14:17 +00:00
Sadie Powell e42b4c21b7 Use the Module * overload of GetModule() in the nickserv module. 2024-11-25 14:43:23 +00:00
Sadie Powell 2464913200 Simplify the duration string logic in Anope::Expires.
This is just duplicating Anope::Duration there's no need to reimplement
a worse version of that here.
2024-11-25 03:02:24 +00:00
Sadie Powell ebea728957 Fix pluralising languages which use the same plural for 0 as 1. 2024-11-25 01:20:03 +00:00
Sadie Powell 233a5bf4cd Add a missing override keyword. 2024-11-25 00:20:25 +00:00
Sadie Powell 7019b27e59 Rework how guest nicks work.
- Use the config setting as a string template instead of as a prefix.
- Allow users of IRCds that have UIDs to use that as the guest nick.
- Fall back to a UID before killing if a guest nick can not be found.
2024-11-25 00:08:30 +00:00
Sadie Powell 70227dc882 Take a constant pointer in GetModule. 2024-11-24 22:36:53 +00:00
Sadie Powell 6178ea644a Fix some minor issues with the Turkish translation. 2024-11-24 01:30:57 +00:00
Sadie Powell df7f0730dd Fix the signon time of services pseudoclients on InspIRCd. 2024-11-23 20:24:08 +00:00
Sadie Powell 331168379f Don't escape messages in the pot file.
This can't be applied to the po files so there's no point doing it.
2024-11-23 15:46:39 +00:00
Val Lorentz 5220963be1 Update the French translation. 2024-11-23 10:59:55 +00:00
Sadie Powell 436dab3eb8 Convert some more strings to plural forms. 2024-11-22 15:32:39 +00:00
Sadie Powell c3055e1cfa Add a plural form overload of SendMessage. 2024-11-22 15:22:23 +00:00
Sadie Powell a27be92e4b Skip removed columns when migrating the database schema. 2024-11-22 14:09:26 +00:00
Sadie Powell faf0ad5f35 Improve language selection.
- Allow selecting languages using an abbreviated language code
  (e.g. en for en_US.UTF-8).
- Preprocess the language list on load as it never changes. This
  allows us to stop special casing the English language.
2024-11-22 13:06:58 +00:00
Sadie Powell e9202916b2 Emplace services when registering them with the core. 2024-11-19 19:55:34 +00:00
Sadie Powell 2cb20ded78 Remove some code that should have been removed in the merge. 2024-11-19 19:55:34 +00:00
Sadie Powell 687bcaa83f Add a plural form overload of CommandSource::Reply. 2024-11-19 17:10:29 +00:00
Sadie Powell 1fb8a624f9 Make an untranslated string translatable. 2024-11-19 17:00:19 +00:00
Sadie Powell b4b51d4828 Merge branch '2.0' into 2.1. 2024-11-19 00:40:24 +00:00
Sadie Powell 7083c424c2 Only process sockets after loading the db when using db_sql{_live}.
This avoids slow startups for the 95% of users who are using the
db_flatfile database backend.
2024-11-19 00:39:00 +00:00
Sadie Powell c55d8450a4 Move the set option to its own module.
This is the first step of rewriting nickname protection.
2024-11-18 12:40:24 +00:00
Sadie Powell 7a20f26b84 Only auto-add timers if they actually have a tick time. 2024-11-18 00:48:50 +00:00
Sadie Powell de16238e01 Process all socket events before connecting to the uplink.
This ensures that the SQL import actually succeeds before we do
something that might terminate the process.
2024-11-16 12:49:45 +00:00
Sadie Powell 240f8b9e50 Halt the column migration if any of the queries fail. 2024-11-16 12:13:17 +00:00
Sadie Powell 656ca80dd0 Migrate old SQL schemas to the current layout. 2024-11-16 03:45:03 +00:00
Sadie Powell d40cbdb8cf Merge branch '2.0' into 2.1. 2024-11-15 15:57:57 +00:00
Sadie Powell a668c8b520 Clarify how to import databases from flatfile to SQL.
Closes #456.
2024-11-15 15:57:41 +00:00
Sadie Powell bc44195a3d Make the account id map also use a checker. 2024-11-15 15:12:50 +00:00
Sadie Powell a7cbe2a139 Add default values to the MySQL tables and use when a column is null. 2024-11-14 13:00:03 +00:00
Sadie Powell 8408bf95c7 Fix an inverted condition. 2024-11-13 12:10:38 +00:00
Sadie Powell 309c342b86 Use the remaining wait time in the registration delay message.
Closes #452.
2024-11-13 11:56:50 +00:00
Sadie Powell 4de59d61d8 Use durations instead of seconds in waiting messages. 2024-11-13 11:56:11 +00:00
Sadie Powell 0dc65cc162 Clean up Anope::Duration and switch to use plural form translation. 2024-11-13 02:57:15 +00:00
Sadie Powell 2e6c90d502 Add support for plural form translation.
Closes #340.
2024-11-13 02:48:13 +00:00
Sadie Powell 127ea3e68a Process all socket events before connecting to the uplink.
This ensures that the SQL import actually succeeds before we do
something that might terminate the process.
2024-11-12 17:24:14 +00:00
Sadie Powell ba11b5eab0 Update the Turkish translation.
Co-authored-by: CaPa CuL <capacul@gmail.com>
2024-11-11 21:59:57 +00:00
Sadie Powell df1c6176b3 Merge branch '2.0' into 2.1. 2024-11-11 17:13:01 +00:00
Sadie Powell 96ccfe4cbe Fix using User::Account where User::IsIdentified should be used.
The former causes a dereference which cause a database update. This
is not good for performance with db_sql_live on bigger networks.
2024-11-11 16:46:56 +00:00
Sadie Powell 8634594cd1 Merge branch '2.0' into 2.1. 2024-11-11 15:45:05 +00:00
Sadie Powell ee160842b3 Fix serialising boolean extension items. 2024-11-11 15:24:40 +00:00
Sadie Powell 613452acba Remove an unnecessary function from db_sql_live. 2024-11-11 10:56:53 +00:00
Sadie Powell 9411dac991 Add a helper function to db_sql(_live) for getting a table name. 2024-11-11 10:44:20 +00:00
TehPeGaSuS aa32f7c926 More updates to the pt_PT translation. 2024-11-08 23:08:41 +00:00
Sadie Powell 517810b208 Make the grammar of the SET privilege description less weird. 2024-11-08 14:25:05 +00:00
Sadie Powell b7f7a91dfb Make the en_US translation file more suitable as a template. 2024-11-08 14:00:15 +00:00
Sadie Powell b6e4c7302e Remove the integer width from chanstats and irc2sql columns.
These are ignored by MySQL so specifying them is meaningless.
2024-11-08 13:21:06 +00:00
Sadie Powell b7590e20c1 Merge branch '2.0' into 2.1. 2024-11-08 13:10:16 +00:00
Sadie Powell 4952a9c852 Migrate from Markdown to YAML issue templates. 2024-11-08 12:07:19 +00:00
Sadie Powell 59647baff9 Avoid unnecessary string copies when calling IsFile. 2024-11-08 00:26:51 +00:00
Sadie Powell 1393518555 Fix some compiler warnings from not checking chdir. 2024-11-07 19:34:46 +00:00
Sadie Powell 51827b94ad Simplify account identifier generation. 2024-11-07 19:33:01 +00:00
Sadie Powell 98c840eb02 Expand the size of some chanstats columns.
Closes #444.
2024-11-07 12:31:47 +00:00
Sadie Powell 24cbb84009 Bump for 2.1.11-git. 2024-11-01 10:00:11 +00:00
Sadie Powell f3c94e5d23 Release 2.1.10. 2024-11-01 09:48:52 +00:00
Sadie Powell f2ab092742 Merge branch '2.0' into 2.1. 2024-10-27 16:14:09 +00:00
Sadie Powell 7d5ca5c90b Switch the city version of geoipupdate to a non-corrupt database.
Closes #439.
2024-10-27 16:13:51 +00:00
Sadie Powell 8ee85efd70 Fix parsing mode changes from users on UnrealIRCd. 2024-10-25 14:50:04 +01:00
Sadie Powell 0cab675825 Fix a typo in the change log. 2024-10-22 16:53:21 +01:00
Sadie Powell f1751dcb21 Replace usestrictprivmsg with something actually useful.
Every IRC server we support (other than Bahamut which is probably
on the chopping bock) uses UIDs so this setting does nothing.

Instead, allow configuring a server-side alias for each service
and use that when servicealias is enabled.
2024-10-22 16:29:22 +01:00
Sadie Powell 8b02613549 Fix some stuff that was missed in commit b94c3740b9. 2024-10-22 14:59:18 +01:00
Sadie Powell c9625ccf3f Update the change logs. 2024-10-22 14:41:52 +01:00
Sadie Powell 435ce51196 Move nickserv/set/message to a new module, kill options:useprivmsg. 2024-10-22 14:27:30 +01:00
TehPeGaSuS 57ac7cb4db Update the cron file name.
name
2024-10-20 23:53:23 +01:00
Sadie Powell 8cb2b801e9 Use the target nick as the default desc for mask access entries. 2024-10-19 17:40:24 +01:00
Sadie Powell 66b45534a8 Deduplicate the access code in cs_statusupdate. 2024-10-19 12:17:33 +01:00
Sadie Powell 499077826c Replace the Facebook ns_set_misc example with a non-URL alternative.
This makes it more clear you can use this for more than just an
URL to an external service.
2024-10-18 18:54:22 +01:00
Sadie Powell bc4d34ebd8 Merge branch '2.0' into 2.1 2024-10-18 11:50:54 +01:00
Sadie Powell f40719787f Fix a change that was missing from the previous commit. 2024-10-18 11:45:19 +01:00
Sadie Powell 934a13c21f Merge branch '2.0' into 2.1. 2024-10-18 11:41:53 +01:00
Sadie Powell e5602f956d Fix marking channels as persistent on InspIRCd and UnrealIRCd. 2024-10-18 11:26:03 +01:00
Sadie Powell de11a19e03 Updated the supported versions in the README. 2024-10-17 16:00:43 +01:00
Sadie Powell b437468b84 Add support for name-only extbans on InspIRCd. 2024-10-16 13:06:47 +01:00
Sadie Powell 0a99571c0f Merge branch '2.0' into 2.1. 2024-10-13 17:17:34 +01:00
Sadie Powell e704fa6266 Update the IRC server to point to Teranova. 2024-10-13 17:15:26 +01:00
Sadie Powell f908514095 Zero errno before calling popen. 2024-10-12 17:54:36 +01:00
Sadie Powell bafcba023c Switch geoipupdate.sh to use a mirror as the original data is gone. 2024-10-12 12:01:00 +01:00
Sadie Powell 9a44b74186 Let the user know about their cert being auto-added to their account. 2024-10-11 18:55:22 +01:00
Sadie Powell 883935c3e0 Merge branch '2.0' into 2.1. 2024-10-11 16:55:36 +01:00
Sadie Powell 6d34054b78 Change the mode lock before removing/adding the PERM mode.
This fixes being unable to unset mlock on the first attempt.
2024-10-11 15:45:02 +01:00
Sadie Powell 3da9b6df0d Fix matching stacked extbans. 2024-10-04 19:04:31 +01:00
Sadie Powell 0ab0e4737c Remove some unnecessary debug logging. 2024-10-04 15:08:44 +01:00
Sadie Powell cdf356ed33 Fix validating named extbans on UnrealIRCd. 2024-10-04 14:57:09 +01:00
Sadie Powell 7d268bb4ca Implement NEXTBANS support on UnrealIRCd.
Closes #431.
2024-10-04 13:25:44 +01:00
Sadie Powell 184350ff4a Fix extracting the mode parameters from MODE on UnrealIRCd. 2024-10-04 13:25:10 +01:00
Sadie Powell 4cdbf560e1 Fix matching extended bans in services.
Extended bans are stored without their prefix. Therefore, we should
not try to strip their prefix before matching.

Closes #288.

Co-authored-by: k4be <k4be@pirc.pl>
2024-10-04 13:01:29 +01:00
Sadie Powell cbccc79d37 Fix parsing extbans on InspIRCd v4. 2024-10-04 11:40:40 +01:00
Sadie Powell 9b188a6c04 Respect EXTBANFORMAT on InspIRCd v4. 2024-10-04 11:20:19 +01:00
Sadie Powell 2f74513246 Change User::SetModesInternal to take a split mode change. 2024-10-02 23:54:36 +01:00
Sadie Powell 94dbb19593 Remove the formatting overload of User::SetModesInternal. 2024-10-02 11:15:42 +01:00
Sadie Powell 8232759a92 Change Channel::SetModesInternal to take a split mode change. 2024-10-02 11:12:24 +01:00
Sadie Powell b006966d25 Bump for 2.1.10-git. 2024-10-01 11:47:23 +01:00
Sadie Powell 6037f63ae5 Release 2.1.9. 2024-10-01 11:46:13 +01:00
Sadie Powell 5cdb65ca52 Update the change log. 2024-10-01 11:42:25 +01:00
Sadie Powell f9e4ca4d06 Raise the default nickname expiry time to one year. 2024-10-01 11:31:50 +01:00
Sadie Powell 66c9be8627 Respect nonicknameownership on InspIRCd v4. 2024-09-26 19:38:44 +01:00
Sadie Powell 546f65c38e Fix some messages not being marked as translatable. 2024-09-26 13:26:02 +01:00
Sadie Powell 9fcb022d5e Allow sending an oper account on InspIRCd. 2024-09-26 12:51:54 +01:00
Sadie Powell 5a0c6b1f18 Fix setting +o on opers on login. 2024-09-26 12:51:54 +01:00
Sadie Powell ade8db023e Bump minimum UnrealIRCd version to 6.0. 2024-09-24 19:56:13 +01:00
Sadie Powell 2ae733bcd1 Merge branch '2.0' into 2.1. 2024-09-17 12:32:33 +01:00
Sadie Powell cc37e6d69a Remove config option for options:warningtimeout.
This hasn't done anything since the early 1.9 releases I'm not sure
why it hasn't been removed already.
2024-09-17 12:27:13 +01:00
Sadie Powell 101c68f786 Fix the Argon2 module not having test vectors. 2024-09-04 23:50:01 +01:00
Sadie Powell ec0cd9e7f9 Bump for 2.1.9-git. 2024-09-01 09:50:24 +01:00
Sadie Powell ab0b851d28 Release 2.1.8. 2024-09-01 09:46:17 +01:00
Sadie Powell 4e3720b810 Merge branch '2.0' into 2.1. 2024-09-01 09:43:38 +01:00
TehPeGaSuS 4b48fc98d3 Fix the documentation of mail:usemail.
`nickserv:registration` only has as options: none, admin, mail.

I assume that `mail` is the word that should replace `yes`
2024-09-01 09:41:32 +01:00
Sadie Powell 82993c8d1e Update the changelogs. 2024-08-30 14:49:43 +01:00
Sadie Powell d352718a39 Fix parsing named extbans on InspIRCd. 2024-08-30 14:49:39 +01:00
Sadie Powell d44632e57d Use CMake's -B option instead of cding to the build directory. 2024-08-30 14:48:31 +01:00
Sadie Powell 80451011dd Remove pointless semicolons in the config for the webcpanel module. 2024-08-29 13:40:39 +01:00
Sadie Powell b4e673b2f4 Refactor ns_getemail slightly. 2024-08-29 13:21:18 +01:00
Sadie Powell 58a78e9aa5 Allow server admins to require that a display nick drops last.
Closes #348.
2024-08-29 13:14:39 +01:00
Sadie Powell 6da4a148fa Fix translating mail:memo_message. 2024-08-24 12:27:05 +01:00
Sadie Powell a3edb09eda Use CanClearBans/SendClearBans when enforcing smartjoin. 2024-08-22 00:29:30 +01:00
Sadie Powell 27beb8f877 Improve the CTCP version output. 2024-08-21 15:38:35 +01:00
Sadie Powell 136680f917 Fix the grammar of some info messages. 2024-08-18 03:17:33 +01:00
Sadie Powell 378ae21ac7 Add account identifier to nickserv/info output. 2024-08-18 01:19:39 +01:00
Sadie Powell e35a86661d Remove support for MinGW.
All of our builds are fully native on Windows so there's no need
for this anymore.
2024-08-15 12:14:06 +01:00
Sadie Powell 528b5938ec Automatically determine SQL column type from the field.
Also add more column types to ensure we are storing data in the
best format in the database.
2024-08-14 05:47:55 +01:00
Sadie Powell 03bee17063 Remove the unused KeySet method in Serialize::Data. 2024-08-14 00:10:12 +01:00
Sadie Powell fe18050c49 Fix parsing SVSMODE and SVS2MODE messages on UnrealIRCd.
At some point UnrealIRCd made an undocumented change to the protocol
where the last parameter on a server-source message would not be a
timestamp. This behaviour is preserved for MODE.
2024-08-09 20:39:46 +01:00
Wilson Birney aa0496f69b Add <cstring> include to services.h to fix build on some musl systems.
Co-authored-by: blackbeard420 <blackbeard@blackbeard420.me>
2024-08-06 11:00:47 +01:00
Sadie Powell 4ee22ab05e Merge branch '2.0' into 2.1. 2024-07-28 22:50:30 +01:00
Sadie Powell 63ad540e55 Add a note to LANGUAGE about rebuilding from scratch. 2024-07-20 19:25:58 +01:00
Sadie Powell a1165eea94 Fix the type of the InspIRCd IJOIN chants when converting. 2024-07-20 19:25:58 +01:00
Sadie Powell bfca74f6b3 Bump for 2.0.17-git. 2024-07-19 13:24:41 +01:00
Sadie Powell 3acf74483c Release 2.0.16. 2024-07-19 12:49:56 +01:00
Sadie Powell a3ec8329f4 Document the previous commit. 2024-07-19 12:48:44 +01:00
Sadie Powell 7d0184ca34 Merge branch '2.0' into 2.1. 2024-07-19 01:43:41 +01:00
Sadie Powell 31bc597c81 Send the vhost/vident before the account name on InspIRCd.
This fixes IRCd-side account cloaks causing CHGHOST spam.
2024-07-19 01:11:32 +01:00
Sadie Powell e0b687f289 Merge branch '2.0' into 2.1. 2024-07-14 16:42:26 +01:00
Sadie Powell 2de0dddb1c Fix joining channels with keys on InspIRCd v3. 2024-07-14 16:39:37 +01:00
Sadie Powell ff65b68dfa Fix the name of the key parameter in SendSVSJoin. 2024-07-14 15:21:00 +01:00
Sadie Powell 94456a6063 Fix sending global messages to remotely linked servers. 2024-07-14 11:44:22 +01:00
Sadie Powell 41ea346551 Update the change log. 2024-07-11 01:13:59 +01:00
Sadie Powell 439ad3e736 Make it clear that inspircd3 also works with InspIRCd 4. 2024-07-11 01:13:59 +01:00
Sadie Powell 347d82f59b Qualify a use of auto in db_atheme. 2024-07-08 00:53:47 +01:00
Sadie Powell fe68f40634 Remove some obsolete echo compatibility wrappers. 2024-07-08 00:53:47 +01:00
ItsOnlyBinary 08b1344056 Add UNIX socket support to mysql module.
Ref: #419
2024-07-04 13:13:56 +01:00
Sadie Powell ff67a80a71 Bump for 2.1.8-git. 2024-07-01 10:08:16 +01:00
Sadie Powell 230e85798d Release 2.1.7. 2024-07-01 10:06:17 +01:00
Sadie Powell 9604690e9d Update the change logs. 2024-06-29 16:25:17 +01:00
Sadie Powell 01e0cf4868 Add support for sending tag messages. 2024-06-24 14:46:41 +01:00
Sadie Powell 693eeed762 Rework how CTCP messages are sent and received. 2024-06-24 14:29:55 +01:00
Sadie Powell 6e5713d64a Remove the formatting overloads of SendNotice/SendPrivmsg. 2024-06-24 13:30:17 +01:00
Sadie Powell 249ad3dfea Update the Turkish translation.
Co-authored-by: CaPa CuL <capacul@gmail.com>
2024-06-23 18:36:00 +01:00
Sadie Powell b94c3740b9 Make the language around fantasy commands less weird. 2024-06-23 14:36:03 +01:00
Sadie Powell 59ec42f0e6 Rename suspend in cs_expire to suspendexpire to match ns_expire. 2024-06-23 13:55:25 +01:00
Sadie Powell 8a65f116b6 Merge branch '2.0' into 2.1. 2024-06-23 13:52:46 +01:00
Sadie Powell 8105607257 Fix the default config for channel suspensions. 2024-06-23 13:51:53 +01:00
Sadie Powell 601da1141e Fix the default config for channel suspensions. 2024-06-23 13:50:50 +01:00
Sadie Powell 8c0edef714 Split nickserv/{sa,}set/language out to its own module. 2024-06-22 17:46:42 +01:00
Sadie Powell c3efd9426d Update the change log. 2024-06-20 17:16:16 +01:00
Sadie Powell a386439f86 Misc improvements to db_atheme. 2024-06-20 17:16:16 +01:00
Sadie Powell 016a5b3903 Fix importing Atheme mode locks. 2024-06-20 17:16:16 +01:00
Sadie Powell 60aeb2a71a Silently ignore some Atheme metadata that we know we can't import. 2024-06-19 22:45:43 +01:00
Sadie Powell 54ea63df66 Avoid creating extra service references in db_atheme. 2024-06-19 22:44:31 +01:00
Sadie Powell 01fc3ea22e Fix importing Atheme opers. 2024-06-19 22:44:31 +01:00
Sadie Powell 3388736fab Use auto in more places in db_atheme. 2024-06-19 22:44:31 +01:00
Sadie Powell 0065a0f405 Only import clones from Atheme if we recognise the database version. 2024-06-19 22:44:16 +01:00
Sadie Powell 490f832dc0 Fix importing Atheme session limits. 2024-06-19 21:12:28 +01:00
Sadie Powell a44acb6de5 Fix importing Atheme forbid reasons. 2024-06-19 20:31:55 +01:00
Sadie Powell 13e5ddf807 Fix importing Atheme akick reasons. 2024-06-19 20:22:57 +01:00
Sadie Powell e42c728ab8 Log the channel that a mode lock was unable to be imported for. 2024-06-19 19:41:16 +01:00
Sadie Powell 4eec5c5435 Save the databases directly after importing. 2024-06-19 19:30:24 +01:00
Sadie Powell 2667d9e90c Update the databases more regularly. 2024-06-19 11:28:21 +01:00
Sadie Powell f2b66278aa Fix a string that should be marked as translatable in ns_info. 2024-06-12 17:53:15 +01:00
Sadie Powell 5b7d952626 Remove the broken Catalan, Hungarian, and Russian translations. 2024-06-12 17:50:00 +01:00
Sadie Powell 24375d53e6 Add support for looking up account information from a nick.
Closes #407.
2024-06-12 17:46:07 +01:00
Sadie Powell 88ac47e217 The sender can be null in OnBotUnAssign. 2024-06-10 12:51:56 +01:00
Sadie Powell 8a1bffba9b Fix a crash in ns_cert. 2024-06-10 11:16:05 +01:00
TehPeGaSuS 01eef7a392 Rename example.chk to cron.example.sh. 2024-06-07 23:23:44 +01:00
Sadie Powell 67b76fadca Fix a memory leak in os_akill and os_sxline. 2024-06-07 22:39:08 +01:00
Sadie Powell 7861712437 Add nullability attributes to the module events. 2024-06-07 22:15:58 +01:00
Sadie Powell ccc088d946 Log a user out fully when their nick gets suspended.
Closes #409.
2024-06-04 22:41:32 +01:00
Sadie Powell 4468fe77fa Fix an inverted if in the global odule. 2024-06-03 20:02:03 +01:00
Sadie Powell e71a9e2894 Avoid NickAlias lookups by storing a pointer in the NickCore. 2024-06-03 16:04:53 +01:00
Sadie Powell f80bdf06ba Fix a null pointer dereference in the sasl module. 2024-06-03 14:39:08 +01:00
Sadie Powell 2d6033c73f Bump for 2.1.7-git. 2024-06-01 09:44:43 +01:00
Sadie Powell 756dc49813 Release 2.1.6. 2024-06-01 09:43:36 +01:00
Sadie Powell aa92559aa0 Document the previous commit. 2024-06-01 09:43:20 +01:00
Sadie Powell eb12a89b8e Fix creating the runtime directory on Windows. 2024-05-28 01:07:27 +01:00
Sadie Powell d4a34308e5 Update the change logs. 2024-05-23 16:02:54 +01:00
Sadie Powell aab3a8e5b6 Clarify that one non-deprecated protocol module must be loaded. 2024-05-23 15:40:56 +01:00
Sadie Powell c72e12d0a6 Fix setting the history mode on UnrealIRCd.
Closes #406.
2024-05-22 15:08:13 +01:00
Sadie Powell bce0d629fd Fix another iterator invalidation issue. 2024-05-22 14:30:18 +01:00
Sadie Powell 7d0dacc86c Change --modulesdir to be singular like the other config options. 2024-05-22 10:30:03 +01:00
Sadie Powell 729aa4ab4a Fix parsing the flood mode on UnrealIRCd. 2024-05-18 18:36:17 +01:00
Sadie Powell 18e9e12261 Fix an iterator invalidation issue in cs_set and ns_set. 2024-05-18 16:35:35 +01:00
TehPeGaSuS 9d68b29c9e Initial Portuguese retranslation. 2024-05-17 17:24:24 +01:00
Sadie Powell a4792412ba Merge branch '2.0' into 2.1. 2024-05-16 18:00:13 +01:00
Sadie Powell 8bb83f6b1a Explicitly specify ROW_FORMAT=DYNAMIC when creating tables.
Resolves the issues some people were having with extremely wide rows.
2024-05-16 17:29:25 +01:00
Sadie Powell da99a53dfa Don't specify a width for DT_INT columns.
This isn't actually used by MySQL for the column width.
2024-05-16 17:28:15 +01:00
Sadie Powell a9e9ac32a0 Store boolean extension items as DT_INT. 2024-05-16 17:28:15 +01:00
Sadie Powell 05e6df23a2 Mark boolean columns as DT_INT in bs_kick. 2024-05-16 16:50:41 +01:00
Sadie Powell 3f9fc23270 Remove some unnecessary advice. 2024-05-16 16:44:38 +01:00
Sadie Powell cb21c7c1fa Fix some untranslated strings in the Turkish translation. 2024-05-11 18:35:17 +01:00
Sadie Powell 4008e64f26 Store when the account name was registered in the NickCore. 2024-05-11 17:40:38 +01:00
Sadie Powell 1cf5918574 Merge branch '2.0' into 2.1. 2024-05-11 14:24:37 +01:00
Sadie Powell afe87bf693 Ensure we are connected to MySQL before trying to escape data. 2024-05-11 11:36:29 +01:00
Sadie Powell ff1c5adb8b Always use server-side topic and mode locks where available. 2024-05-10 19:03:50 +01:00
Sadie Powell c36030c826 Remove CanSVSLogout and implement logout support on Plexus. 2024-05-09 18:54:40 +01:00
Sadie Powell 33a02b1223 Require a reason when throwing an exception. 2024-05-09 18:37:16 +01:00
Sadie Powell 68f4556609 Store an IP in CommandSource for IRC messages too. 2024-05-06 17:08:37 +01:00
Sadie Powell 23db58a303 Change badpasslimit from int to unsigned int. 2024-05-06 16:42:13 +01:00
Sadie Powell ee69dc3105 Fix parsing backup client certificate fingerprints on InspIRCd. 2024-05-01 21:21:19 +01:00
Sadie Powell e9243c3fde Add the ReplaceCert method to CertService. 2024-05-01 21:20:31 +01:00
Sadie Powell 4cfee23303 Simplify InspIRCd user metadata handler slightly. 2024-05-01 20:20:47 +01:00
Sadie Powell be3822523b Automatically add client certificates to the cert list on register. 2024-05-01 17:23:10 +01:00
dependabot[bot] 111f81aa95 Bump microsoft/setup-msbuild from 1.3 to 2
Bumps [microsoft/setup-msbuild](https://github.com/microsoft/setup-msbuild) from 1.3 to 2.
- [Release notes](https://github.com/microsoft/setup-msbuild/releases)
- [Changelog](https://github.com/microsoft/setup-msbuild/blob/main/building-release.md)
- [Commits](https://github.com/microsoft/setup-msbuild/compare/v1.3...v2)

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

Signed-off-by: dependabot[bot] <support@github.com>
2024-05-01 17:20:06 +01:00
Sadie Powell f12e1ad222 Bump for 2.1.6-git. 2024-05-01 14:37:06 +01:00
Sadie Powell 72318a6bf0 Release 2.1.5. 2024-05-01 14:16:09 +01:00
Sadie Powell 2f77cb38e2 Update the changelogs. 2024-05-01 14:15:17 +01:00
Sadie Powell 84ca4c0d27 Update the inspircd module for recent 1206 protocol changes. 2024-05-01 14:03:11 +01:00
Sadie Powell 1f9a197b18 Merge branch '2.0' into 2.1. 2024-04-29 08:36:23 +01:00
Sadie Powell 0c5bf51378 Skip serializing data without a type in db_flatfile. 2024-04-29 08:16:45 +01:00
Sadie Powell 1647968c50 Fix message truncation in global/global and global/server. 2024-04-28 08:52:16 +01:00
Sadie Powell 5473311bd7 Only enable os_noop on IRCDs that actually have a SendSVSNOOP impl. 2024-04-15 21:08:40 +01:00
Sadie Powell f3ebb67469 Make SendChannel abstract. 2024-04-15 21:00:10 +01:00
Sadie Powell 0d149ce195 Install a systemd service file on Linux. 2024-04-15 20:29:57 +01:00
Sadie Powell d68ba1b570 Implement support for BIGLINES on UnrealIRCd. 2024-04-15 20:05:43 +01:00
Sadie Powell 1877833e73 Bump Bahamut support to require 2.0 or newer. 2024-04-15 18:29:36 +01:00
Sadie Powell 63c3710785 Fix some missing translations in the tr_TR translation. 2024-04-15 15:32:19 +01:00
Sadie Powell 0043d137e5 Update the Turkish translation for the changes in 2.1.4.
Co-authored-by: CaPa CuL <capacul@gmail.com>
2024-04-15 15:26:55 +01:00
Sadie Powell 3e5d3c5bdc Avoid packaging unnecessary .lib files on Windows.
[skip alpine ci]
[skip ubuntu ci]
2024-04-15 12:41:56 +01:00
Sadie Powell 62deedfa75 Automatically upload the Windows package on release.
[skip alpine ci]
[skip ubuntu ci]
2024-04-15 11:57:40 +01:00
Sadie Powell 44af4eac6b Update the Windows CI to the latest Conan. 2024-04-15 11:11:40 +01:00
Sadie Powell 5fdc637327 Expand relative paths when installing. 2024-04-14 12:23:19 +01:00
Sadie Powell 7c93007aa6 Avoid duplicate entries in ReplaceCert. 2024-04-14 12:23:19 +01:00
Robert Scheck e8fee93a7e Fix a typo in the example configs. 2024-04-14 09:21:50 +01:00
Sadie Powell 260539e987 Add more documentation for overriding confirmation codes. 2024-04-07 15:52:24 +01:00
Sadie Powell 4603cd467b Add an operator privilege to allow overriding drop codes.
Closes #392
2024-04-05 14:14:10 +01:00
Sadie Powell 00549bc9b2 Merge branch '2.0' into 2.1. 2024-04-04 19:59:19 +01:00
Sadie Powell e0a6f7456b Fix extracting timestamps from UnrealIRCd MODE messages.
Oversight from commit 04e1a4f5c8.
2024-04-04 19:48:34 +01:00
Sadie Powell 5a54b37aeb Remove the g prefix from git hashes. 2024-04-04 14:16:21 +01:00
Sadie Powell 2e43665266 Log the services directory when chdiring to it. 2024-04-04 14:02:57 +01:00
Sadie Powell 8b4cd65e2a Fix erroring out when sendmailpath is empty.
This has a default now.
2024-04-02 16:52:41 +01:00
Sadie Powell c08aaa86d1 Sync the build system directory names with the core. 2024-04-02 16:52:41 +01:00
Sadie Powell 87a8af0ad7 Use the paths from the build system instead of hardcoding them. 2024-04-02 16:45:49 +01:00
Sadie Powell 4691dfa3f0 Bump for 2.1.5-git. 2024-04-01 11:26:07 +01:00
Sadie Powell 507eefc820 Release 2.1.4. 2024-04-01 11:24:48 +01:00
Sadie Powell 72af764861 Fix some typos in the changelog. 2024-03-31 15:21:18 +01:00
Sadie Powell 1b631e96bd Add a default value for sendmailpath. 2024-03-31 15:17:03 +01:00
Sadie Powell 3b4a4da52d Update the changelogs. 2024-03-29 14:24:17 +00:00
Sadie Powell 2e59aac025 Fix the default value of accessmax in cs_access. 2024-03-29 14:21:51 +00:00
Sadie Powell 3de6da80c6 Alias ACCESS to ALIST now the former is unused. 2024-03-27 23:32:16 +00:00
Sadie Powell 2829c83118 Add more nick options to webcpanel's nickserv/info page. 2024-03-26 14:27:52 +00:00
Sadie Powell f58012ea0e Remove some leftover references to nickserv/access. 2024-03-26 13:40:53 +00:00
Sadie Powell f8605ec188 Allow specifying the webcpanel template directory directly.
There's no need to hardcode a base path here.
2024-03-26 12:59:03 +00:00
Sadie Powell 5a12beff15 Fix some spelling issues in the webcpanel that were missed earlier. 2024-03-26 12:33:59 +00:00
Sadie Powell 6b1f8de885 Use consistent headers and footers on all webcpanel templates. 2024-03-26 11:52:04 +00:00
Sadie Powell 33be5de66e Flatten the webcpanel hierarchy slightly. 2024-03-26 11:22:43 +00:00
Sadie Powell 4399eeaa58 Add the --nopid option to disable writing a pidfile.
This is useful for init scripts that don't fork.
2024-03-20 21:34:28 +00:00
Sadie Powell 38cfb0603a Fix deleting pidfiles. 2024-03-20 21:34:18 +00:00
Sadie Powell 1a3844e74e Fix the Windows build. 2024-03-19 15:58:41 +00:00
Sadie Powell bfed2e1bf5 Use paths relative to data/conf in the config file.
This was done in some places already but not consistently.

Closes #349.
2024-03-19 15:51:55 +00:00
Sadie Powell e488f294a1 Put the webcpanel directory in the data directory not a subdir. 2024-03-19 15:19:15 +00:00
Sadie Powell fde3438ef2 Allow using absolute paths in more places. 2024-03-19 15:11:40 +00:00
Sadie Powell 1575dea5b9 Redocument deprecated encryption modules. 2024-03-19 12:40:01 +00:00
Sadie Powell a1972ba9b6 Prevent using enc_posix as a primary encryption module. 2024-03-19 11:54:39 +00:00
Sadie Powell 5a72d8783e Add verify-only support for POSIX crypt() hashes from Atheme. 2024-03-18 22:17:14 +00:00
Sadie Powell e6770bc2fd Fix an off by one error in enc_sha2. 2024-03-18 22:04:57 +00:00
Sadie Powell 413fed474e Fix unnecessary uses of std::string. 2024-03-18 12:47:43 +00:00
Sadie Powell 60083834f8 Improve sending email.
- Use consistent line endings as expected by the email spec.
- Don't require admins to escape . at the start of lines.
- Log the reason why sending email fails.
2024-03-18 12:34:34 +00:00
Sadie Powell 9ac4da0489 Fix not storing the start time after calling UpdateTime. 2024-03-18 11:45:33 +00:00
Sadie Powell cb3848b7db Use clock_gettime if it is available. 2024-03-18 11:27:10 +00:00
Sadie Powell d41764bfd6 Fix sending emails to nicks ending with a backslash. 2024-03-15 18:52:12 +00:00
Sadie Powell 753119c4a1 Use consistent casing when referring to vhosts and vidents. 2024-03-15 12:42:13 +00:00
Sadie Powell d996c3aa8f Fix a format-extra-args warning on some versions on GCC. 2024-03-15 12:22:22 +00:00
dependabot[bot] ac6e8c617d Bump actions/checkout from 3 to 4
Bumps [actions/checkout](https://github.com/actions/checkout) from 3 to 4.
- [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/v3...v4)

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

Signed-off-by: dependabot[bot] <support@github.com>
2024-03-15 12:19:07 +00:00
Sadie Powell 3b09f4aa54 Merge branch '2.0' into 2.1. 2024-03-15 12:17:49 +00:00
Sadie Powell 10f4724b6b Dependabot requires that the target-branch is a string. 2024-03-15 12:17:15 +00:00
Sadie Powell ad86535024 Consistently use READ_ONLY_MODE everywhere. 2024-03-15 12:09:58 +00:00
Sadie Powell 628f4d2a7e Merge branch '2.0' into 2.1. 2024-03-15 11:58:09 +00:00
Sadie Powell 8d5be77c93 Send dependabot pull requests to the 2.1 branch. 2024-03-15 11:56:56 +00:00
Sadie Powell 13a556df89 Initialize timer members with constructor initialization. 2024-03-14 23:19:32 +00:00
Sadie Powell 4e9d183523 Restore some functionality that was removed in an earlier commit. 2024-03-14 23:10:53 +00:00
Sadie Powell 074dfb63a7 Fix a warning when building with Clang. 2024-03-14 21:37:18 +00:00
Sadie Powell beaf09de7b Rework sending global notices.
Admins can now queue multiple messages and send them when they are
ready. This is fully compatible with the previous global behaviour.

Admins can now also send messages to individual servers. This is
useful for informing users of maintenance due to downtime.
2024-03-14 21:35:17 +00:00
Sadie Powell c8d8978cd0 Require that at least one encryption module is loaded. 2024-03-12 21:57:38 +00:00
Sadie Powell 11edba04fe Add command handlers for encap commands on InspIRCd. 2024-03-12 21:57:06 +00:00
Sadie Powell 22ba54b00d Show the full command in CONFIRM_DROP. 2024-03-12 19:24:31 +00:00
Sadie Powell 6fd7ca39e2 Fix the reason when kicking users from suspended channels.
Closes #372.
2024-03-12 17:00:42 +00:00
Sadie Powell b8cd00b412 Merge branch '2.0' into 2.1. 2024-03-12 16:50:30 +00:00
Sadie Powell f4bd43e898 Add a workaround for users matching expired sqlines.
I'll fix this properly in 2.1 because I don't want to make big
changes to 2.0.

Closes #384.
2024-03-12 16:47:57 +00:00
Sadie Powell 7d7664444a Fix expiring forbids. 2024-03-12 16:26:33 +00:00
Sadie Powell 1a8bbd6004 Respect --noexpire in cs_suspend and ns_suspend. 2024-03-12 14:43:12 +00:00
Sadie Powell e725c880a9 Fix expiring channel suspensions.
Closes #386.
2024-03-12 14:12:37 +00:00
Sadie Powell f5abcd1c4c Fix expiring nick suspensions.
Closes #376.
2024-03-12 14:02:16 +00:00
Sadie Powell 1986aa6581 Fix duplicate messages when synconset/syncongroup is set.
Closes #366.
2024-03-12 13:26:25 +00:00
Sadie Powell b52e1b2b02 Implement support for challenge authentication on InspIRCd. 2024-03-12 13:19:20 +00:00
Sadie Powell 54719fbfc6 Allow protocol modules to declare that they have no line/mode limit.
InspIRCd allows us to send infinite length lines and mode changes
and will restack before sending to users.
2024-03-12 12:39:33 +00:00
Sadie Powell 06add0e5fc Simplify limit extraction code. 2024-03-12 12:24:02 +00:00
Sadie Powell 63d682314b Merge branch '2.0' into 2.1. 2024-03-12 11:53:14 +00:00
Sadie Powell 1a6060ac5b Fix sending SVSTOPIC when topiclock is loaded on InspIRCd. 2024-03-12 11:46:41 +00:00
Sadie Powell a302f8f1be Refactor sending vhosts in the InspIRCd protocol module. 2024-03-12 11:43:21 +00:00
Sadie Powell 04e1a4f5c8 Add a protocol module function for extracting timestamps. 2024-03-12 11:02:08 +00:00
Sadie Powell 1538909ac0 Add ProtocolException and use it to send fatal errors. 2024-03-12 00:17:49 +00:00
Sadie Powell a15f165a1d Fix an inverted condition in enc_bcrypt. 2024-03-12 00:17:49 +00:00
Sadie Powell 77435dd0d9 Merge branch '2.0' into 2.1. 2024-03-11 22:43:29 +00:00
Sadie Powell 6f57907416 Fix the TIME message on InspIRCd. 2024-03-11 22:38:15 +00:00
Sadie Powell 7c1cfd2849 Fix comparing passwords in enc_sha256. 2024-03-11 21:07:39 +00:00
Sadie Powell 259b10b83a Fix some InspIRCd 1206 protocol compatibility issues. 2024-03-11 20:27:30 +00:00
Sadie Powell 02355546ff Reject registrations and password changes if password encryption fails. 2024-03-11 19:39:47 +00:00
Sadie Powell 6ad3430ac4 Clean up some dead code in ns_register. 2024-03-11 19:30:57 +00:00
Sadie Powell 29e7674e56 Replace convertTo/stringify with non-throwing alternatives.
Having these throw is terrible for ergonomics and there are loads
of places where the exception was either silently ignored or not
handled at all. Having a function which returns an optional and
another that returns a default works a lot better imo.
2024-03-11 19:17:29 +00:00
Bram Matthys b09632d1c3 Fix OS SQLINE expiry with UnrealIRCd 2024-03-11 18:30:55 +00:00
Sadie Powell e2df7d4d01 Ensure that verify-only encryption modules can never encrypt passwords.
If another module was loaded first and then later unloaded it was
possible for a deprecated module to encrypt passwords.
2024-03-10 20:46:03 +00:00
Sadie Powell 9a984a8148 Implement verify-only support for raw SHA-2 passwords. 2024-03-10 20:46:03 +00:00
Sadie Powell fb9c8950ed Refactor the enc_bcrypt module and expose an encryption provider. 2024-03-10 20:46:03 +00:00
Sadie Powell a849a81ac3 Refactor the enc_old module. 2024-03-10 20:28:00 +00:00
Sadie Powell f919bb0748 Add self-tests to the encryption providers. 2024-03-10 20:20:24 +00:00
Sadie Powell 3b85a8071f Add some missing documentation comments. 2024-03-10 15:58:58 +00:00
Sadie Powell 9a8cac060d Add support for encrypting passwords with the Argon2 algorithm.
Closes #369.
2024-03-10 15:09:38 +00:00
Sadie Powell 0353338436 Replace the custom SHA-2 implementation in enc_sha256. 2024-03-10 12:27:49 +00:00
Sadie Powell defb8348a7 Move the HMAC function to the encryption header.
This will be useful for doing challenge authentication on InspIRCd.
2024-03-09 22:51:23 +00:00
Sadie Powell 1b86665d81 Add a stats category for password encryption algorithms. 2024-03-09 22:22:56 +00:00
Sadie Powell 2f52fa723c Redocument the encryption module config. 2024-03-09 22:22:56 +00:00
Sadie Powell 6e0f0b8896 Add the enc_sha2 module which hashes passwords with HMAC-SHA-2.
Using HMAC instead of changing the IV is a lot safer.
2024-03-09 22:22:56 +00:00
Sadie Powell 2c5b2c649e Convert enc_md5 to use a vendored MD5 library. 2024-03-09 22:22:56 +00:00
Sadie Powell a6bc4cab9d Misc improvements to the encryption API. 2024-03-09 22:22:56 +00:00
Sadie Powell ef37daf44a Clean up the services.h includes. 2024-03-09 22:22:56 +00:00
Sadie Powell 39d288f99f Rename hash_map to unordered_map to match the underlying container. 2024-03-09 22:22:56 +00:00
Sadie Powell 9ead3f15c3 Save the last email time for accounts. 2024-03-09 22:22:55 +00:00
Sadie Powell 272104af95 Modernize the initialisation of NickAlias and NickCore. 2024-03-09 22:22:55 +00:00
Bram Matthys 51e95d72e3 Enable message-tags support for UnrealIRCd 2024-03-09 14:53:38 +00:00
Sadie Powell 12486f6cee Tweak the config default limits slightly. 2024-03-09 11:43:38 +00:00
Sadie Powell 891375baca Use a separate CAPAB handler on InspIRCd to avoid pollution. 2024-03-08 19:05:12 +00:00
Sadie Powell 41a295202e Only enable InspIRCd parser logging when using --protocoldebug. 2024-03-08 18:17:17 +00:00
Sadie Powell 722c5b7d61 Implement support for the InspIRCd 1206 protocol. 2024-03-08 17:12:44 +00:00
Sadie Powell 52216b56a1 Merge branch '2.0' into 2.1. 2024-03-08 17:05:49 +00:00
Sadie Powell cd614831de Fix feature detection on InspIRCd. 2024-03-08 16:49:55 +00:00
Sadie Powell 1d0a836a2e Improve protocol debug messages. 2024-03-08 12:24:44 +00:00
Sadie Powell 46b7064834 Keep the InspIRCd protocol version around for later use. 2024-03-08 11:07:30 +00:00
Sadie Powell bb8df01e25 Move some modules which can be built by default out of extra. 2024-03-07 23:18:08 +00:00
Sadie Powell 16700b0e30 Remove a guarantee that may not necessarily be correct. 2024-03-07 23:09:25 +00:00
Sadie Powell 4e04a11995 Consistently use email instead of e-mail. 2024-03-07 22:52:41 +00:00
Sadie Powell 76e5480be9 Update the changelogs. 2024-03-07 22:52:41 +00:00
Sadie Powell 464e6b8010 Use the C++11 random number generator instead of rand().
This is safer, faster, and doesn't require seeding.
2024-03-07 22:52:41 +00:00
Sadie Powell 3272c1bbc6 Require new accounts to have email addresses. 2024-03-07 22:25:32 +00:00
Sadie Powell 307ffea951 Update the English translation for the previous commit.
y
2024-03-07 21:19:47 +00:00
Sadie Powell bb94f286f5 Also use drop confirmation codes for nicknames. 2024-03-07 21:18:06 +00:00
Sadie Powell 86e3556438 Fix some misc bugs in the InspIRCd protocol module.
Closes #373.
2024-03-07 20:55:22 +00:00
Sadie Powell 12214bee72 Add the initial version of the Atheme database importer. 2024-03-07 18:50:36 +00:00
Sadie Powell 08a35231ef Merge branch '2.0' into 2.1. 2024-03-04 12:10:22 +00:00
Sadie Powell 9649dc78a1 When using ldap/sql auth prevent displays expiring before their group.
This prevents zombie accounts from being left around that can't be
authenticated to.

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

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

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

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

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

I also made role names gender-neutral using contraction (eg. "fondateur"
-> "fondateurice"), and adapted specifiers accordingly.
2024-01-06 23:22:10 +00:00
Sadie Powell 688ecf1c1d Fix an oversight in the mysql module. 2024-01-06 23:19:18 +00:00
Sadie Powell c0453cfec1 Fix a sign conversion issue in the mysql module. 2024-01-06 13:39:03 +00:00
Sadie Powell a9ab0c72a6 Use auto in places where the type is unambiguous. 2024-01-06 13:23:37 +00:00
Robert Scheck de918ef9cf Add missing whitespace in multi-line comment 2024-01-06 12:41:31 +00:00
Sadie Powell 0ee9874112 Update translations for the recent services case fix. 2024-01-05 21:44:08 +00:00
Val Lorentz 388858aee6 Fix inconsistent capitalization of 'services'. 2024-01-05 21:34:26 +00:00
Sadie Powell f22703df59 Fix a translation string and enable translations on CI. 2024-01-05 21:28:54 +00:00
Val Lorentz 4715b76dbe fr_FR: msgmerge + update fuzzy strings. 2024-01-05 21:21:43 +00:00
Sadie Powell 50bd385ccf Add an alias for chanserv/status for the name used by Atheme.
Closes #336.
2024-01-05 21:21:17 +00:00
Sadie Powell e738da9b11 Merge branch '2.0' into 2.1. 2024-01-05 19:52:56 +00:00
Val Lorentz 6e6e053384 fr_FR: Update fuzzy strings 2024-01-05 19:49:56 +00:00
Valentin Lorentz 5edf19d230 fr_FR: Fix trailing spaces 2024-01-05 19:00:19 +00:00
Sadie Powell 4573e1925d Use normal exit codes when exiting the process. 2024-01-05 12:00:28 +00:00
Sadie Powell a40f8e0b9d Update the copyright headers for 2024. 2024-01-04 22:25:48 +00:00
Sadie Powell 9db49ec790 Bump for 2.1.2-git. 2024-01-04 17:55:44 +00:00
Sadie Powell e8cd2909a5 Release 2.1.1. 2024-01-04 17:54:06 +00:00
Sadie Powell e7a57aa754 Update the changelog. 2024-01-04 17:53:05 +00:00
Sadie Powell 1c30f69bd0 Fix a typo in GetCommandLineArgument. 2024-01-04 17:52:30 +00:00
Sadie Powell eb2aaf22ed Fix a copy/paste error in the default channel settings. 2024-01-01 17:32:37 +00:00
k4be 36c43683e5 Remove unused strings from pl_PL 2023-12-27 15:06:30 +00:00
k4be 0b63a4244d Update pl_PL translation for 2.1 2023-12-27 15:06:30 +00:00
Sadie Powell 4a62259695 Move privilege descriptions to the example configs. 2023-12-22 15:58:28 +00:00
Sadie Powell 87e3d5a045 Remove an extraneous space in cs_xop. 2023-12-21 01:27:34 +00:00
Dragone2 2b8384bb39 Updates Italian translations for Anope 2.1 2023-12-21 00:47:47 +00:00
Sadie Powell 6d981960da Merge branch '2.0' into 2.1. 2023-12-20 00:07:51 +00:00
Sadie Powell aca9d30064 Tweak the issue templates slightly. 2023-12-19 21:21:39 +00:00
Sadie Powell b84b1d8166 Misc grammar fixes. 2023-12-17 19:32:45 +00:00
Sadie Powell 6acbd326f3 Add the regex_stdlib regular expression engine.
Unlike other regular expression engines this is available on all
systems.
2023-12-17 15:00:26 +00:00
Sadie Powell cb533b63ac Merge branch '2.0' into 2.1. 2023-12-17 14:33:44 +00:00
Sadie Powell 6538641e87 Remove some unnecessary spaces that break editor indentation. 2023-12-17 13:59:49 +00:00
Sadie Powell eb0e5c89b2 Remove the m_regex_pcre module.
Users should migrate to m_regex_pcre2 instead.
2023-12-17 13:46:34 +00:00
Mingjie Shen 8e2fa4acdb messages: fix incorrect format specifier
Calling a printf-like function with the wrong type of arguments causes
unpredictable behavior.

Signed-off-by: Mingjie Shen <shen497@purdue.edu>
2023-12-08 17:16:53 +00:00
Sadie Powell 84c2f8d3fc Skip checking for chgrp/chmod on Windows. 2023-12-07 15:59:19 +00:00
Dragone2 8d99b3e2d7 Clean-ups old strings 2023-12-05 16:52:02 +00:00
Dragone2 b3ec2a5463 Adds new Italian translations 2023-12-05 16:52:02 +00:00
Sadie Powell 4c67f4393f Update the en_US translation. 2023-12-04 18:49:57 +00:00
Sadie Powell 4e9a2df827 Add the UNBANME privilege to allow users to unban themselves.
This is separate from the existing UNBAN privilege which applies
to all users.

Closes #331.
2023-11-30 14:38:20 +00:00
Sadie Powell 2d2d1972e9 Fix some modules that weren't converted to the new socket ctor.
Closes #330.
2023-11-26 13:26:38 +00:00
PeGaSuS cc9e2c1260 Fix missing end of comment 2023-11-24 21:04:05 +00:00
Sadie Powell 2b21264fb0 Bump for 2.1.1-git. 2023-11-24 13:37:11 +00:00
Sadie Powell 3f61b52db3 Release 2.1.0. 2023-11-24 13:33:10 +00:00
Sadie Powell f5fa4ff0e9 Remove the 1.9 and 2.0 changes from the change log. 2023-11-24 13:29:15 +00:00
Sadie Powell 251551c8c3 Update the change logs. 2023-11-24 13:29:11 +00:00
Sadie Powell e2d546ad46 Add a note about how to send emails on Windows. 2023-11-24 13:24:42 +00:00
Sadie Powell 949176c3e0 Merge branch '2.0' into 2.1. 2023-11-24 13:04:00 +00:00
Sadie Powell 3371941be5 Allow users to opt-out of being added to channel access lists. 2023-11-23 15:10:03 +00:00
Sadie Powell 70d72b62df Avoid needing to cast CurrentUplink by changing it to a size_t. 2023-11-16 21:49:48 +00:00
Sadie Powell c3e95d8e2e Fix chanserv/suspend info not being visible to regular users.
Closes #325.
2023-11-16 19:54:23 +00:00
Sadie Powell 46209895e3 Merge branch '2.0' into 2.1. 2023-11-16 19:34:37 +00:00
Sadie Powell ba163027bd Make the SASL PLAIN implementation more robust.
- Reject auth attempts that try to authenticate using an alternate
  authorization identity.

- Reject auth attempts that contain extraneous null bytes in the
  string as required by the SASL PLAIN RFC.

- General code quality cleanup.
2023-11-16 18:14:15 +00:00
Sadie Powell b28180d680 Implement support for the ANONYMOUS SASL mechanism. 2023-11-14 15:02:04 +00:00
Sadie Powell 0f1f0c5a22 Deduplicate account sending code in the inspircd module. 2023-11-14 13:53:45 +00:00
Sadie Powell 6e16e71fda Remove the two day X-line cap. 2023-11-03 11:01:01 +00:00
Sadie Powell 1eba69d035 Fix a missing override keyword. 2023-10-24 18:10:32 +01:00
Sadie Powell eb409fc6eb When changing the nick of a user on inspircd3 send the expected ts.
This should prevent users being renicked if they changed their nick
between services sending the renick and the IRCd receiving it.
2023-10-24 18:00:34 +01:00
Sadie Powell 97fa6d84bc Fix confirming an unconfirmed operator's account. 2023-10-22 23:31:48 +01:00
Sadie Powell 02940e4ea8 Fix a misleading temporary variable in ns_register. 2023-10-20 18:10:29 +01:00
Sadie Powell 38d5b93e4a Add support for server-initiated logins and logouts on UnrealIRCd. 2023-10-19 23:22:31 +01:00
Sadie Powell 78398a4481 Add support for server-initiated logouts on InspIRCd. 2023-10-19 22:52:05 +01:00
Sadie Powell 69a0f3bec2 Fix removing entries by an alias in chanserv/access and chanserv/xop. 2023-10-12 19:09:44 +01:00
Sadie Powell 0f32d2e553 Use a more human readable datetime format. 2023-10-12 14:41:07 +01:00
Sadie Powell 8e1c7e1e44 Merge branch '2.0' into 2.1. 2023-10-11 15:51:52 +01:00
Sadie Powell a3241065c5 Start migrating to range-based for loops. 2023-10-11 15:51:52 +01:00
Dragone2 6119586920 Small fixes and improvements to Italian translation. 2023-10-04 17:14:39 +01:00
dependabot[bot] 32cf99fdb5 Bump actions/checkout from 3 to 4
Bumps [actions/checkout](https://github.com/actions/checkout) from 3 to 4.
- [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/v3...v4)

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

Signed-off-by: dependabot[bot] <support@github.com>
2023-10-01 17:20:09 +01:00
Sadie Powell dc371aad6d Re-add the GHOST and REGAIN commands for compatibility.
These are hidden so they won't be shown in the help.
2023-09-26 12:39:30 +01:00
Sadie Powell ca2209aaed Show the SQL service name in the db_sql error message.
This should help users diagnose issues easier.
2023-09-05 00:21:31 +01:00
Sadie Powell 0a3ddef315 Replace Twitter with Mastodon in the ns_set_misc example config.
Closes #320.
2023-08-31 07:19:00 +01:00
Sadie Powell adf820c08a Merge branch 2.0 into 2.1. 2023-08-06 13:36:27 +01:00
Sadie Powell 0715db7182 Mark as 2.0.15-git. 2023-08-06 13:00:09 +01:00
Sadie Powell 8bf14ad5ea Release 2.0.14. 2023-08-06 12:58:38 +01:00
Sadie Powell c9f21f4ef6 Update the changelogs. 2023-08-06 12:57:26 +01:00
Sadie Powell 1b2eb9b9c8 Fix the pull request template to be more relevant to Anope. 2023-07-30 12:41:21 +01:00
Sadie Powell 1343be58d7 Add some templates for people filing issues on GitHub. 2023-07-30 12:15:20 +01:00
Sadie Powell 377ba87d52 Remove broken support for MinGW.
This apparently doesn't work and is pointless given we have native
Windows builds now anyway.
2023-07-29 10:01:18 +01:00
Sadie Powell 97f6aadd5b Fix paging the Config header on some util-linux revisions.
We use an environment variable here as passing -e directly may
result in an error on older `more` releases.
2023-07-28 23:56:09 +01:00
Sadie Powell 2dafc85af4 Remove references to the ilm which never got updated from 1.8. 2023-07-16 18:25:21 +01:00
Sadie Powell 7f8a0c9d33 Allow Anope to look up multiple DNS results.
For fixing bug 1756.
2023-07-11 16:11:57 +01:00
Sadie Powell cc23f6dc01 Fix sending log messages from a renamed pseudoclient.
If a command is named e.g. nickserv/wibble it previously tried to
look up the nickserv service and if this service didn't exist then
it would fall back to sending from the first available service. This
caused problems if the NickServ service had been renamed to something
else.

Reported by @AndrioCelos on IRC.
2023-07-11 15:13:17 +01:00
Sadie Powell aa619f1eeb Merge branch '2.0' into 2.1. 2023-07-11 12:28:54 +01:00
Sadie Powell b7458c5da1 Allow access list entries to have a description.
This is useful when adding glob matches to the access list as a
reminder of who they actually match.

Resolves https://bugs.anope.org/view.php?id=1613
2023-07-11 12:19:47 +01:00
PeGaSuS e717ac0a89 Clarify that operserv/sqline can also match channel names. 2023-07-09 23:44:02 +01:00
Sadie Powell 34ab54522e Fix not serialising dontkickops/dontkickvoices properly. 2023-07-09 23:09:11 +01:00
Sadie Powell 47bbc9b3fb Enable CanSQLineChannel in unreal4.
Ref: https://www.unrealircd.org/docs/Server_protocol:SQLINE_command
2023-07-09 22:32:43 +01:00
Sadie Powell 68b51c7481 Fix not getting memo notifications when using SASL. 2023-07-09 22:32:43 +01:00
Sadie Powell 37b60f8d9d Update links to the bugtracker. 2023-07-09 20:06:32 +01:00
Sadie Powell 14204353ac Allow customising the email content type.
This will allow people to send emails using HTML or non UTF-8 text.
2023-07-09 14:39:51 +01:00
Sadie Powell 098f19c005 Fix a crash when a module tries to get another module's config. 2023-07-06 10:53:25 +01:00
PeGaSuS 4e1f5cce80 Tell users that they must identify to their account before using CONFIRM.
This only happens when a nickname is registered via webcpanel and said nickname is online.
2023-07-05 17:09:47 +01:00
Sadie Powell 4a6f4bc92f Pull in the upstream changes from InspIRCd's vendoring tool. 2023-06-20 01:06:35 +01:00
Sadie Powell da2ac3e8a2 Fix detection of the nopartmsg module in the InspIRCd proto modules. 2023-06-20 01:00:37 +01:00
Sadie Powell 7c7158cf24 Terminate lines with CR+LF instead of just LF when sending an email.
From https://www.rfc-editor.org/rfc/rfc5321#section-2.3.1:

> Lines consist of zero or more data characters terminated by the
> sequence ASCII character "CR" (hex value 0D) followed immediately by
> ASCII character "LF" (hex value 0A).
2023-06-06 16:48:47 +01:00
Sadie Powell 1c30205af5 Also build the Windows dependencies in the CI. 2023-06-03 22:02:49 +01:00
Sadie Powell 9d0a6ddc67 Merge branch '2.0' into 2.1. 2023-06-03 21:51:07 +01:00
Adam fbf3b34474 add gettext to conan deps 2023-06-02 23:01:27 -04:00
Adam ce42810265 m_ldap: use Wldap on windows 2023-06-02 21:31:12 -04:00
Adam 07babdbd77 use Conan for extra's dependencies on Windows
conan install src\win32\conanfile.txt --build=missing
cmake -B build .
cmake --build build --config Release --target PACKAGE
2023-06-02 19:08:55 -04:00
Sadie Powell fe3926f572 Mark as 2.0.14-git. 2023-06-01 23:12:08 +01:00
Sadie Powell 03eead042c Release 2.0.13. 2023-06-01 23:12:07 +01:00
Sadie Powell b1fff640dd Update the changelogs. 2023-05-30 16:07:54 +01:00
Dragone2 f251ca6373 Small fixes to the Italian translation. 2023-05-29 21:33:59 +01:00
Adam 24a2c51003 CMakeLists.txt: remove -fno-delete-null-pointer-checks 2023-05-28 21:26:03 -04:00
Adam 66f37139cb regchannels: remove dependency on no-delete-null-pointer-checks 2023-05-28 21:26:03 -04:00
Adam 0646547c9e config: remove dependency on no-delete-null-pointer-checks 2023-05-28 21:25:59 -04:00
Sadie Powell 41206b991e Fix not being able to log into oper accounts when DNS fails. 2023-05-11 13:05:39 +01:00
Sadie Powell b7abfe5eca Avoid returning null when a config tag does not exist.
This invokes undefined behaviour on modern compilers.
2023-05-04 19:21:02 +01:00
Hendrik Jäger 23e7f5bd33 update: german translation 2023-04-21 22:30:18 +01:00
Dragone2 df9dfeae95 Update the Italian translation.
Ref: #309
2023-04-04 16:59:59 +01:00
Sadie Powell 29db25dac7 Fix missing override keywords. 2023-03-13 13:52:56 +00:00
Sadie Powell d210cd2695 Modernize finding system tools and remove checks for unused tools. 2023-03-13 13:52:56 +00:00
Sadie Powell fc8e6ee338 Document the protocol module changes from a while ago. 2023-03-13 01:44:37 +00:00
henk84 e68a41a91e Make language/update.sh safer, faster, cleaner.
Ref: #308

Co-authored-by: Hendrik Jäger <gitcommit@henk.geekmail.org>
2023-03-06 12:01:46 +00:00
henk84 26f846e112 Document how to update a translation.
Ref: #307

Co-authored-by: Hendrik Jäger <gitcommit@henk.geekmail.org>
2023-02-26 23:09:30 +00:00
henk84 f1fbe9e629 Update some german translations.
Ref: #306

Co-authored-by: Hendrik Jäger <gitcommit@henk.geekmail.org>
2023-02-26 23:05:28 +00:00
Sadie Powell ebe3fd7e57 Merge branch '2.0' into 2.1. 2023-02-19 11:21:58 +00:00
Sadie Powell 1c9b34190e Update the en_US translation. 2023-02-19 11:14:37 +00:00
Sadie Powell a5d4aa5821 Remove line numbers from the translation files.
The translations are updated so infrequently that these always
change a bunch and it makes reading the diffs really hard.
2023-02-19 11:12:37 +00:00
Hendrik Jäger 9b583961b0 Update german translation 2023-02-18 21:48:53 +00:00
Bram Matthys fef0cc1c29 unreal4: set vhost/vident during SASL 2023-02-09 16:05:50 +00:00
Sadie Powell f0ad0b4f0a Raise the default session limit from 3 to 5. 2023-02-06 17:12:35 +00:00
Sadie Powell dc1d9c837b Fix crashing when encountering an unterminated commented block. 2023-02-06 17:10:29 +00:00
Sadie Powell 885462d98e Merge branch '2.0' into 2.1. 2022-12-31 22:11:19 +00:00
Sadie Powell 33a337dfc0 Update the copyright headers for 2023. 2022-12-31 22:08:50 +00:00
Sadie Powell b64dc09bd2 Fix marking services pseudoclients as an oper on InspIRCd.
The bot user needs to be marked as introduced in order to send an
oper type.
2022-12-31 21:55:05 +00:00
Sadie Powell 6395107be6 Fix getting the port on non-UNIX socket listeners. 2022-12-27 10:21:40 +00:00
Sadie Powell 24b881c427 Update MODULE_INIT for modern MSVC+ versions. 2022-12-23 15:09:12 +00:00
Sadie Powell 28be881886 Backport anopesmtp removal from the master branch. 2022-12-23 14:21:34 +00:00
Sadie Powell 5bc560a743 Remove some unnecessary dependencies on the Linux CI. 2022-12-23 14:10:33 +00:00
Sadie Powell fee60c8e06 The fantasy:name field is allowed to contain spaces. 2022-12-18 10:36:59 +00:00
Sadie Powell 3f867c1e11 Show the invalid config value in the rejection message. 2022-12-18 10:35:11 +00:00
Sadie Powell b235da2e9c Merge branch '2.0' into 2.1. 2022-12-17 16:18:09 +00:00
Sadie Powell 3f3062a077 Use <filesystem> instead of opendir/readdir/closedir. 2022-12-17 16:03:28 +00:00
dependabot[bot] 2f46739931 Bump actions/checkout from 2 to 3
Bumps [actions/checkout](https://github.com/actions/checkout) from 2 to 3.
- [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/v2...v3)

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

Signed-off-by: dependabot[bot] <support@github.com>
2022-12-17 15:59:28 +00:00
Sadie Powell 6eec018c34 Allow Dependabot to keep our GitHub CI up to date. 2022-12-17 15:57:37 +00:00
Sadie Powell 8a8fb7725b Use the native versions of inet_ntop/inet_pton on Windows. 2022-12-17 12:40:58 +00:00
Sadie Powell f6e5e6a2b4 Add sockaddrs::str to stringify a sockaddrs properly.
Also clean up the socket code slightly.
2022-12-17 12:39:48 +00:00
Sadie Powell dfdcd3021a Add support for linking over UNIX sockets. 2022-12-17 11:50:38 +00:00
Sadie Powell 5fa3d8f929 Use emplace() instead of insert(std::make_pair()). 2022-12-09 16:50:29 +00:00
Sadie Powell e78db21180 Mark as 2.0.13-git. 2022-12-09 08:33:02 +00:00
Sadie Powell d4d2a4b4ce Release 2.0.12. 2022-12-09 08:30:43 +00:00
Sadie Powell e33b8d5f43 Update the changelogs. 2022-12-09 08:28:57 +00:00
PeGaSuS c2b154e1b1 Document cs_no_expire (#301). 2022-12-08 07:16:04 +00:00
Sadie Powell 1a2da82106 Merge branch '2.0' into 2.1. 2022-12-07 15:59:46 +00:00
Sadie Powell 4a2861ba3d Add a module that provides regex/pcre using PCRE2. 2022-12-07 15:43:39 +00:00
Sadie Powell 9d92de1157 Import InspIRCd's vendoring tool and use it to vendor crypt_blowfish. 2022-10-22 20:08:30 +01:00
miwob 211bd80061 Update ircd-hybrid protocol module
* Add METADATA command handler which currently only allows to modify a client's certificate fingerprint
* Minor reformatting and style inconsistency fixes
2022-09-29 13:05:05 +01:00
Austin Ellis 32679a107a Add the ability to confirm accounts via webcpanel after logging in. 2022-09-22 17:38:07 +01:00
Sadie Powell 1664689eb7 Merge branch '2.0' into 2.1. 2022-09-15 18:46:51 +01:00
miwob bc101d10de Update hybrid protocol module to improve compatibility with the latest ircd-hybrid release.
* Remove support for deprecated channel mode `u`
* Add support for channel mode `N`
* Fixed the `UID` message handler requiring the correct amount of arguments
* Fixed the `SID` message handler requiring the correct amount of arguments
* Fixed the `SJOIN` message handler requiring the correct amount of arguments
* Minor documentation updates and style corrections
* Remove pointless return statement in the `JOIN` message handler
* Add support for the owner and admin channel prefix modes
* Add support for `MLOCK`
* Fixed SendChannel() so modes are prefixed with a `+`
* Change SendJoin() to actually use the mode stacker
* Add support for channel mode `Q`
* Add support for channel mode `Z`
* Add support for user mode `B` and `Z`
* Actually user mode `g` is not oper only. For some reason this mode got set to oper only in anope/anope@1e625b6
* Work properly with extended bans, e.g. don't normalize masks starting with a `$`
2022-09-15 14:13:24 +01:00
Sadie Powell 901a456132 Fix allowing spaces in some config fields that shouldn't contain them. 2022-09-12 17:56:45 +01:00
Sadie Powell 0c61915e31 Bahamut now has support for halfops. 2022-09-12 17:56:45 +01:00
Dragone2 d5e85c7f25 Fixe a typo in the Italian translation.
Ref: #298
2022-08-10 19:40:42 +01:00
Michael Stapelberg a5425e3bf3 database: write to temporary file and rename.
This decreases the likelihood of ending up with a zero-byte (or missing)
anope.db.

Co-authored-by: Michael Stapelberg <michael@robustirc.net>
2022-07-27 17:40:49 +01:00
Sadie Powell b96519d85c Build the installer package on Windows CI. 2022-05-01 10:28:18 +01:00
Sadie Powell ac98ed615b Merge branch '2.0' into 2.1. 2022-04-22 10:34:04 +01:00
Sadie Powell 2062eb23f0 Release 2.0.11. 2022-04-22 10:17:19 +01:00
Sadie Powell af4d7d21ba Update the changelogs. 2022-04-21 17:48:54 +01:00
Sadie Powell c2ba553483 Remove unnecessary ProcessModes call in unreal4.
This was made obsolete by the previous commit.
2022-04-11 15:34:37 +01:00
Sadie Powell f2bcf449cd Use windows-2019 for Windows builds. 2022-03-01 05:21:28 +00:00
Sadie Powell 09c587bed0 Remove TR1 compatibility layer.
This isn't necessary now we use C++17.
2022-03-01 05:09:29 +00:00
Sadie Powell a8724b5f03 Use noexcept instead of an empty exception specifier. 2022-03-01 05:06:19 +00:00
PeGaSuS 8dd1fb8ac2 Fix unsetting vhosts on unreal4 (#289). 2022-02-13 14:30:09 +00:00
Sadie Powell b7e85f5161 Default synconset and syncongroup to on. 2022-02-05 23:11:39 +00:00
Sadie Powell 773ed39d5d Merge branch '2.0' into 2.1. 2022-02-05 23:10:42 +00:00
Sadie Powell b5fe380011 Include the required modules in the example InspIRCd config. 2022-01-29 13:33:19 +00:00
Sadie Powell af7bf785f9 Fix a grammar error in nickserv.example.conf. 2022-01-29 13:31:04 +00:00
Sadie Powell 15d51ff033 Document the sysconf header file. 2022-01-13 13:46:29 +00:00
Sadie Powell 83bf5ba255 Remove checks for obsolete Windows SDK versions.
We can't build against these anyway now as they're too old.
2022-01-13 03:22:12 +00:00
Sadie Powell 2881ba112b Clean up the predefined variables on Windows.
- Use _MSC_VER for detecting MSVC instead of a custom define.
- Remove MINGW as you can use __MINGW32__ to detect this.
- Stop defining _WIN32 as this will always be defined on Windows.
2022-01-13 02:35:23 +00:00
Sadie Powell 1ee81580c6 Add support for Windows CI. 2022-01-13 01:59:13 +00:00
Sadie Powell 4f421db5a9 Fix checking whether localisation is enabled. 2022-01-13 01:59:13 +00:00
Sadie Powell 091c0eea28 Rip out check_functions().
This isn't actually used anywhere and just slows down the build.
2022-01-13 01:42:46 +00:00
Sadie Powell eaaabd8de0 Rip out calculate_depends().
This code is incredibly error prone and it just duplicates behaviour
that CMake already implements with depend.make files.
2022-01-13 01:42:38 +00:00
Sadie Powell 40ce51a1a9 Include cstring instead of string.h in services.h 2022-01-13 01:13:46 +00:00
Sadie Powell 23ac008cc1 Remove NO_CLIENT_LONG_LONG from the mysql module.
This is not necessary now we use C++17.
2022-01-13 01:12:05 +00:00
Sadie Powell 6486956401 Fix some methods that should have been marked as CoreExport. 2022-01-13 00:34:51 +00:00
Sadie Powell 33b42ce86e Use the default CMake modules for finding gettext instead of our own. 2022-01-12 23:05:25 +00:00
Sadie Powell a631028660 Merge branch '2.0' into 2.1. 2022-01-12 22:08:35 +00:00
Sadie Powell 04257b9d6a Replace ICQ in the ns_set_misc examples with something not dead. 2022-01-10 16:45:25 +00:00
Sadie Powell acb6c55529 Add all extra modules to the gitignore to avoid adding their symlinks. 2022-01-10 16:20:56 +00:00
Sadie Powell 0e6f8488d3 Avoid duplicate checks in irc2sql. 2022-01-10 16:20:56 +00:00
Filippo Cortigiani 56687c27cb Fix ns_resetpass not returning a response for XMLRPC (#243)
Co-authored-by: filippo nicola cortigiani <simos@H7-25.fritz.box>
2022-01-10 16:12:33 +00:00
k4bek4be 9b0c7929d9 Multiple updates for unreal4 protocol (#285)
* Parse PROTOCTL PREFIX and PROTOCTL USERMODES
* Add several previously unhandled modes
* Fix incorrect SJOIN prefix handling
* Enable message tags sending from ircd
* Add timedban matcher
* Add operclass matcher
* Store all client and channel moddata.
* Call unreal's internal unban on /cs unban
* Check for ~a:0 ban
* Add country ban matcher
* Use +B umode for services bots
2022-01-10 15:50:17 +00:00
k4bek4be d895a3aa01 Use utf-8 encoding for outgoing email (#286) 2022-01-09 19:01:45 +00:00
k4be d4632e5286 Add a "Network Service" (RPL_WHOISOPERATOR) line to WHOIS replies 2022-01-09 18:39:09 +00:00
Michael Wobst c38106211c Adjust IsIdentValid test to comply with upcoming ircd-hybrid release (#272).
hybrid.cpp: adjust IsIdentValid test to comply with upcoming ircd-hybrid where
user names may only consist of [A-Za-z0-9._-] and may not begin with '.', '-',
or '_'.

As a side effect this fixes an issue where currently it is possible to introduce
bots whose user name starts with (non-alnum) characters considered invalid for
ircd-hybrid leading to a services shutdown due to a nick introduction/kill loop.
2022-01-09 15:25:09 +00:00
Sadie Powell b8bcad048e Update the copyright headers for 2022. 2022-01-06 23:15:44 +00:00
Sadie Powell 4e5fc9797c Speed up CI by building with Ninja instead of Make. 2022-01-04 18:48:22 +00:00
Sadie Powell 9befb13ea4 Remove various entries from sysconf which are never actually used. 2022-01-04 15:05:33 +00:00
Sadie Powell 8eb6a4da71 Update more IRCServices references to reflect the current project.
- If referring to the specific piece of software use "Anope".
- If referring to services in general use "services".
2022-01-04 14:11:07 +00:00
Sadie Powell ec7dfb3675 Use C++11 header names instead of their deprecated equivalents. 2022-01-04 12:36:35 +00:00
Sadie Powell 106750db77 Replace all uses of push_back with emplace_back. 2022-01-04 12:28:55 +00:00
Sadie Powell 7d1047490e Consistently use #pragma once across all header files.
This replaces a mixture of no include guards, ANOPE_FOO_H, and FOO_H.
2022-01-04 12:10:32 +00:00
Sadie Powell c9f93eeaed Merge branch '2.0' into 2.1. 2022-01-04 00:39:34 +00:00
Sadie Powell db6b2225b1 Use GNU visibility attributes when on non-Windows.
This reduces binary sizes by several megabytes on my system.
2022-01-04 00:39:05 +00:00
Sadie Powell c6c9d9591c Remove some obsolete header and function checks. 2022-01-04 00:39:05 +00:00
Sadie Powell c1f6a79c72 Export a compilation database for debug builds. 2022-01-04 00:39:05 +00:00
Sadie Powell eb81f22a5b Modernize CXXFLAGS on Unix and enable -Werror on CI.
Also clear up warnings that this exposed.
2022-01-04 00:39:05 +00:00
Sadie Powell a31a7f5a6c Use C++11 default initializers and destructors where possible. 2022-01-04 00:17:19 +00:00
Sadie Powell 7531e90499 Use C++11 style class/struct initialisation. 2022-01-04 00:17:13 +00:00
k4be a93a7c87b6 Update pl_PL translation 2022-01-03 19:53:08 +00:00
Sadie Powell ba2c82e2f5 Fix some minor issues discovered whilst working on 2.1. 2022-01-03 19:37:33 +00:00
Sadie Powell dfcc025a19 Remove MARK_DEPRECATED as there's an attribute for this now. 2022-01-03 19:02:44 +00:00
Sadie Powell a5f7aac295 Replace anope_{final,override} with their C++11 equivalent. 2022-01-03 19:02:44 +00:00
Sadie Powell d76d747196 Require C++17 to build Anope. 2022-01-03 19:02:44 +00:00
Sadie Powell aee1e53cb3 Remove support for precompiled headers.
This might have been useful two decades ago but on recent hardware
this just makes builds take longer than without them.
2022-01-03 16:27:15 +00:00
Sadie Powell fd1ca96e2c Merge branch '2.0' into 2.1. 2022-01-03 15:50:22 +00:00
Sadie Powell 2c18601d8f Fix linking against libraries by their alternate name. 2021-12-28 21:18:22 +00:00
Sadie Powell a1a1b3ad01 Add a build time check that OpenLDAP is reentrant. 2021-12-28 19:20:23 +00:00
Robert Scheck 7a28d81b44 Reflect OpenLDAP 2.5 upstream change from libldap_r to libldap
Starting with OpenLDAP 2.5 upstream decided to merge the non-threaded
libldap_r library into the threaded libldap library. And starting with
OpenLDAP 2.6 common Linux distributions such as Fedora do not ship the
compatibility symbolic link anymore (which leads to a build failure),
thus the linking tests for libldap_r and uses alternatively libldap.

See also:
 - https://lists.openldap.org/hyperkitty/list/openldap-announce@openldap.org/thread/BH3VDPG6IYYF5L5U6LZGHHKMJY5HFA3L/
 - https://bugzilla.redhat.com/show_bug.cgi?id=2032707
2021-12-28 19:20:03 +00:00
Sadie Powell 69dbcba069 Allow specifying multiple dependency libraries like foo|bar. 2021-12-28 18:53:24 +00:00
Hendrik Jäger 66bf55fb7f Fix missing spaces in de_DE 2021-12-23 22:10:27 +00:00
Sadie Powell 002186c016 Document log files having their creation date appended. 2021-12-23 22:08:36 +00:00
Sadie Powell 6a7488edc1 Remove double escaping in CMake regex matching.
This is not needed now we use regex matching directly instead of
via the CMake 2.4 function wrapper.

Fixes building extra modules.
2021-12-14 11:11:22 +00:00
Sadie Powell 4af8dfa549 Update the min version of CMake mentioned in the Config script. 2021-12-14 10:10:03 +00:00
Sadie Powell 4efc2c219b Send mode changes from ChanServ if the channel is not registered.
Avoids calling WhoSends() on a null pointer.
2021-12-03 07:11:37 +00:00
Sadie Powell 84ec0903ee Fix checking if this is null in regchannel.
I can't see any places this might be called on a null pointer.
2021-12-02 10:23:05 +00:00
Sadie Powell 754c82d047 Remove undefined behaviour around checking if this is null. 2021-11-30 11:04:19 +00:00
Sadie Powell 17fa704278 CMake warnings CMP0003 and CMP0007 are not necessary. 2021-11-30 10:11:17 +00:00
Sadie Powell b9ccd4bb0b Fix cmake deprecation warning CMP0026. 2021-11-30 10:03:10 +00:00
Sadie Powell 595bc09ec1 Merge branch '2.0' into 2.1. 2021-11-30 09:50:33 +00:00
Sadie Powell 64f65b035e Fix some message params being sent as <middle> instead of <trailing>. 2021-11-20 19:54:56 +00:00
Sadie Powell b6f1c86f65 Use example.com instead of localhost.net in the example configs. 2021-11-14 20:45:17 +00:00
Sadie Powell a736b54ef1 Use the server name as the enforcer hostname if not otherwise set. 2021-11-14 20:45:01 +00:00
Austin Ellis 8b8bc97194 Fix the grammar of the globaloncycledown message (#279).
The previous default example (which is in use on many Anope networks) refers to Services in 2nd person, then 1st person - in the same sentence.
2021-11-14 00:42:09 +00:00
Sadie Powell 27cff11e31 Increase the default channel expiry to 30 days. 2021-10-17 19:46:29 +01:00
Sadie Powell b7da27ad3a Increase the default nickname expiry to 90 days. 2021-10-17 19:44:05 +01:00
Sadie Powell aa0adcf99b Show the protocol module name when connecting to the uplink. 2021-10-06 20:58:57 +01:00
Sadie Powell 079fb1b66f Mark as 2.0.11-git. 2021-08-29 20:02:49 +01:00
Sadie Powell 1cab1d32c2 Send the oper mode for services pseudoclients on InspIRCd. 2021-08-29 18:37:12 +01:00
Sadie Powell e5075d2dc2 Merge branch '2.0' into 2.1 2021-08-28 19:53:17 +01:00
Matthew Beeching 98fdce2e1d Update Jobe's email address in the readme. 2021-08-25 20:33:11 +01:00
Adam d8d1c1d18c cmake: update NSIS template for NSIS 3
Newer cmake versions require NSIS 3, which already defines a RemoveSection macro causing cpack to fail
2021-08-09 17:17:25 -04:00
Sadie Powell 48ec53242e Release 2.0.10. 2021-08-09 15:54:25 +01:00
Sadie Powell e7e8447fa3 Deduplicate code for checking if a user is securely connected. 2021-08-01 19:23:48 +01:00
Sadie Powell 561b205c4a Merge branch '2.0' into 2.1. 2021-08-01 18:53:24 +01:00
Adam 91321bdf68 webcpanel: fix command source ip to use extforward ip 2021-07-24 12:09:12 -04:00
Sadie Powell 33590aa59b Overwritten has two t's in it. 2021-06-17 18:41:23 +01:00
Josh Soref fd88b756fc Fix various spelling issues (#274).
Signed-off-by: Josh Soref <jsoref@users.noreply.github.com>.
2021-06-17 15:02:30 +01:00
Sadie Powell 8d1bc95faf Use the InspIRCd-sent maxlist size instead of networkinfo:modelistsize. 2021-06-04 02:19:54 +01:00
Sadie Powell e67c2d5632 Add support for per-mode list limits. 2021-06-04 02:12:09 +01:00
Sadie Powell 376053e0ac Allow protocol modules to declare that the IRCd supports tags.
This is not being used currently but will be soon.
2021-06-01 00:21:41 +01:00
Sadie Powell cadc6f48e6 Remove nickserv:strictpasswords as it is now obsolete. 2021-05-31 21:44:10 +01:00
Sadie Powell b6665d5eb9 Add the nickserv:minpasslen option. 2021-05-31 21:16:06 +01:00
Sadie Powell 95955ae069 Rename nickserv:passlen to nickserv:maxpasslen. 2021-05-31 21:00:43 +01:00
Sadie Powell df4313f5bb Merge branch '2.0' into 2.1. 2021-05-31 20:57:48 +01:00
Sadie Powell 3728a0bda1 Fix some misleading indentation in ns_register. 2021-05-31 20:53:29 +01:00
Sadie Powell d2da73cf68 Add the -devel switch to Config.
This makes the script use defaults that make development easier.
2021-05-26 04:13:42 +01:00
Sadie Powell 100b24074d Improve the message for NICK_IDENTIFY_REQUIRED. 2021-05-23 19:51:40 +01:00
Sadie Powell a040f17787 Use InnoDB instead of the deprecated MyISAM engine.
Ref: https://www.percona.com/blog/2016/10/11/mysql-8-0-end-myisam/
2021-04-27 23:21:07 +01:00
Sadie Powell 6274bd0b34 Use utf8mb4 instead of utf8 in chanstats and irc2sql.
The utf8 charset, confusingly, is an alias for utf8mb3 which is not
a real UTF-8 encoding as it can only store three byte characters.

The real UTF-8 charset is utf8mb4.
2021-04-27 23:18:04 +01:00
Sadie Powell 095a25d473 Add the anope_override keyword to methods that lack it. 2021-04-27 21:41:19 +01:00
Sadie Powell 53cd3f47b5 Use elseif in CMake where possible. 2021-04-27 19:20:39 +01:00
Sadie Powell c21f6eb5a3 Rip out compatibility code for now-unsupported CMake versions. 2021-04-27 19:20:36 +01:00
Sadie Powell e2aeab970b Remove the repeated conditions in cmake endif/else statements. 2021-04-27 17:49:21 +01:00
Sadie Powell ef4fd869ae Bump minimum CMake version to 3.8.
This is the minimum version that supports CMAKE_CXX_STANDARD=17.
2021-04-27 17:48:28 +01:00
Sadie Powell dfc8bd4aa2 Switch SendSVSLogin to take a NickAlias. 2021-04-27 17:31:14 +01:00
Sadie Powell fd774bd52a Remove unnecessary space. 2021-04-21 14:09:07 +01:00
Sadie Powell 16fac79b78 The last parameter of Solanum ECHO is a <trailing>. 2021-04-21 14:06:49 +01:00
Sadie Powell 622a8ea7e9 Implement support for the Solanum ECHO server capability.
https://github.com/solanum-ircd/solanum/commit/4cac091255d972b0131ffbf0cd278f984bd892d4
2021-04-21 14:05:35 +01:00
Sadie Powell c00ecc5e02 Process writes to the uplink socket before quitting in all cases.
This allows any error that might have been sent to the IRCd to
actually be sent.
2021-04-16 22:46:11 +01:00
Sadie Powell cdd9b6f11b Default to the inspircd3 protocol module instead of inspircd20. 2021-04-16 22:18:56 +01:00
Sadie Powell faee68e85f Don't enforce casemapping when using the 1202 InspIRCd protocol.
This allows older servers which use a module that provides custom
casemapping (e.g. the ascii module) to link.
2021-04-16 22:17:47 +01:00
Sadie Powell 683f42eeef Use UTC in anopesmtp to fix a C++98 compat warning. 2021-04-08 13:47:13 +01:00
Sadie Powell f83558f10b Log when freopen and chown fail. 2021-04-08 13:47:13 +01:00
Sadie Powell 0a518f4bbd Fix the syntax of Solanum identified messages. 2021-03-30 13:56:20 +01:00
PeGaSuS 9483da3239 Added Account to show the main nick of a grouped nick(s).
#270
2021-02-19 01:42:13 +00:00
Matt Schatz c67911bfcc bots: Fix dtor channel iterator being invalidated.
The call to UnAssign() erases the channel from the set which
invalidates the iterator in this loop. Handle this in the same
manner as the NickCore dtor.
2021-02-19 01:37:08 +00:00
Sadie Powell 3f6e694e50 Send the appropriate messages for Solanum's IDENTIFIED feature. 2021-02-19 01:08:08 +00:00
Sadie Powell c2646d67bb Replace the Charybdis protocol module with Solanum (its successor). 2021-02-19 00:33:27 +00:00
Sadie Powell c68b81eac8 Merge branch '2.0' into 2.1. 2021-02-18 23:59:28 +00:00
Adam 4d271e0210 cs_access: require accounts to be confirmed for level 0 access 2021-01-31 12:05:25 -05:00
Robby c5a4e8337c Update copyright to 2021.
This was done with:
find docs/ include/ language/ modules/ src/ *.* Config -exec sed -i 's/-20.. Anope Team/-2021 Anope Team/i' {} \;
2021-01-07 03:31:08 +01:00
PeGaSuS 7e08e7cb6c Set killprotect as a default option in nickserv.example.conf. 2021-01-07 03:24:17 +01:00
Michael Hazell 4031dc7321 inspircd3: Enable support for channel SQLines (#268) 2021-01-01 19:03:23 +00:00
Robby d1e4943800 Add kill_immed as an available option to nickserv.example.conf. 2020-11-20 17:00:00 +01:00
Sadie Powell 74f18d7b1d Only grant an account an identifier when the identifier is needed. 2020-11-19 14:12:18 +00:00
Sadie Powell 3856538e48 Bump for 2.0.10-git. 2020-10-22 12:10:08 +01:00
Sadie Powell 236affa2a4 Release 2.0.9. 2020-10-22 12:08:50 +01:00
Sadie Powell f8d8104d82 Update the changelog. 2020-10-22 12:07:56 +01:00
Sadie Powell a3c7f716bd Fix the query used by IRC2SQL for updating server information. 2020-10-21 16:26:08 +01:00
Sadie Powell b2b53a1e01 Fix account identifiers conflicting with SQL row identifiers. 2020-10-21 12:20:26 +01:00
Sadie Powell 95f4e29edd Unset the account id before the account name on InspIRCd.
This avoids the id being shown on the logout event.
2020-10-12 17:47:41 +01:00
Sadie Powell cdf147f351 Fix not sending an account id to InspIRCd on SASL.
Also, send the account id first so it shows on the ACCOUNT message.
2020-10-12 17:30:05 +01:00
Sadie Powell 8b2c1548ab Merge tag '2.0.8' into 2.1. 2020-10-07 14:42:33 +01:00
Sadie Powell 2cf507ed66 Bump for 2.0.9-git. 2020-10-07 13:15:31 +01:00
Sadie Powell 46e1395e62 Release 2.0.8. 2020-10-07 13:15:31 +01:00
Sadie Powell 6117299ecd Update the changelog. 2020-10-07 13:15:31 +01:00
Sadie Powell f8777097d1 Fix last case check for le64toh. 2020-10-07 13:15:31 +01:00
TheMythPT a79046e025 Update nickserv.example.conf
This breaks the `killprotect' functionality, because a user is expected to turn into guest after the specified amount of time.
Also new users that register their nicknames will wonder why they can't join a +R channel but they didn't change their nick to Guest*
2020-10-06 15:20:56 +01:00
Sadie Powell d0e8392445 Fix the global/global command showing the wrong origin nick. 2020-10-06 15:13:14 +01:00
Sadie Powell af8056d2dd Simplify the definition of _le64toh in the siphash implementation. 2020-10-06 14:52:55 +01:00
Sadie Powell 4ba871c631 Remove use of the deprecated register keyword.
Fixes a build error on C++17 compilers.
2020-10-02 16:53:13 +01:00
miwob da08dd6d0e Minor spelling fix in operserv.example.conf. it's vs its 2020-10-02 16:52:38 +01:00
miwob 1ac3b38fa8 Update/modernize ircd-hybrid protocol module to stay link compatible with next ircd-hybrid release 2020-10-02 14:53:08 +01:00
Sadie Powell c29b72fcdc Add C++98 and C++14 build matrixes to the Linux CI. 2020-10-02 14:27:04 +01:00
Sadie Powell a3673a5a2d Update the changelogs. 2020-10-01 10:26:20 +01:00
Sadie Powell 5dd5fa4644 Rename unreal4 to unrealircd and inspircd3 to inspircd. 2020-09-28 15:33:16 +01:00
Sadie Powell 9d6dd4af11 Remove the non-tagged version of IRCDMessage::Run. 2020-09-28 15:28:27 +01:00
Sadie Powell f430522b41 Rename things from services to anope. 2020-09-28 15:28:27 +01:00
Sadie Powell 907aa60380 All modern platforms support stdint so remove pstdint. 2020-09-28 15:28:26 +01:00
Sadie Powell c7e26c5f67 Remove nickserv/getpass and Anope::Decrypt.
There is no point having these now plain text passwords are deprecated.
2020-09-28 15:28:26 +01:00
Sadie Powell 8e0e1806a4 Require a secure password hashing algorithm for new accounts.
Insecure algorithms can still be used for existing accounts.
2020-09-28 15:28:26 +01:00
Sadie Powell 7f39fb14f2 Remove operserv/oline and CanSVSO/SendSVSO in IRCDProto.
Now UnrealIRCd 3.2.x support has been removed nothing uses this.
2020-09-28 15:28:26 +01:00
Sadie Powell fb86705d3f Drop support for InspIRCd 1.2, InspIRCd 2.0, and UnrealIRCd 3.2.
None of these are supported by upstream anymore.
2020-09-28 15:28:26 +01:00
Sadie Powell f4fa5b3733 Bump for 2.1.0-git. 2020-09-28 15:28:26 +01:00
Sam James (sam_c) 9701cbcd08 Fix musl build (gettext internals)
__USE_GNU_GETTEXT is exposed by musl because they provide
a GNU gettext-compatible interface. This doesn't mean they
provide all the internals that glibc does.

Check for __GLIBC__ if using internal _nl_msg_cat_cntr.

Signed-off-by: Sam James (sam_c) <sam@cmpct.info>
2020-09-28 13:11:24 +01:00
Sadie Powell 1af02bf2a9 Switch from Travis CI to GitHub Actions.
Closes #153.
2020-09-28 12:47:52 +01:00
Michael bf725aa8dc HostServ: Remove vhost when a nick is dropped 2020-09-28 12:15:48 +01:00
Sadie Powell 52914216f0 Clarify that unreal4 also works for UnrealIRCd 5. 2020-09-14 16:49:25 +01:00
Sadie Powell 8180dd414e Implement support for immutable account identifiers. 2020-09-10 15:15:34 +01:00
miwob ff28985384 Fix -Wclass-memaccess warning:
/anope/src/misc.cpp: In function ‘Anope::string Anope::Resolve(const Anope::string&, int)’:
/anope/src/misc.cpp:742:60: warning: ‘void* memcpy(void*, const void*, size_t)’ copying an object of non-trivial type ‘union sockaddrs’ from an array of ‘struct sockaddr’ [-Wclass-memaccess]
   memcpy(&addr, addrresult->ai_addr, addrresult->ai_addrlen);
                                                            ^
In file included from /anope/include/users.h:21,
                 from /anope/include/bots.h:12,
                 from /anope/include/regchannel.h:18,
                 from /anope/include/config.h:16,
                 from /anope/src/misc.cpp:16:
/anope/include/sockets.h:27:18: note: ‘union sockaddrs’ declared here
 union CoreExport sockaddrs
                  ^~~~~~~~~
2020-09-10 13:22:42 +01:00
miwob 584a209b28 ircd-hybrid protocol module: add support for channel mode 'K' (no knock) 2020-08-01 13:39:35 +01:00
Matt Schatz c327d1aeef Improve wording of the resetpass:confirm log message. 2020-04-06 09:49:46 +01:00
Matt Schatz 0d0763f72f Fix the handling of topic messages with InspIRCd v3. 2020-03-26 08:24:39 +00:00
Robby 4d101569f8 Update the mailmap. 2020-01-24 11:13:26 +01:00
Robby 8866612160 Update my mailmap entries. 2020-01-24 10:05:39 +01:00
Robby d69b14e54c Fix a typo in the mailmap. 2020-01-24 09:50:29 +01:00
Sadie Powell 505eed9eef InspIRCd: send an oper type of "service" instead of "services".
This fixes a grammar issue with RPL_WHOISOPERATOR where users would
see "ChanServ is a services on NetworkName".
2020-01-21 18:27:29 +00:00
Sadie Powell b188a1c0cd Update my name and email address. 2020-01-20 20:48:22 +00:00
Robby 2c1f8260fd ms_info: Fix a typo in the INFO output when a nickname has been given.
Update the dutch language file.
2020-01-07 04:37:19 +01:00
Robby d319fc6eb5 m_chanstats: Make ChanServ's HELP SET CHANSTATS translatable too. (#253)
Also refresh the language files while at it.
2020-01-07 02:45:30 +01:00
Dragone2 83eea99317 Update for Italian translation (#253). 2020-01-06 16:37:16 +01:00
Dragone2 55a23c7253 Update for Italian translation (#250). 2020-01-04 16:54:44 +01:00
Robby c8699c6726 Update copyright to 2020.
This was done with:
find docs/ include/ language/ modules/ src/ *.* Config -exec sed -i 's/-20.. Anope Team/-2020 Anope Team/i' {} \;
2020-01-04 15:51:20 +01:00
Matt Schatz 95c8478ec5 Fix the handling of kick messages with InspIRCd v3. 2020-01-04 12:40:20 +01:00
Peter Powell cba1313a40 Revert "Fix the length limit for InspIRCd v3 S2S messages."
This is causing build errors for some people and i'm unsure why.

This reverts commit a4ab6876c3.
2019-12-15 12:40:31 +00:00
Peter Powell 96ea61d8b8 Add the <limits> include to the inspircd3 module. 2019-12-15 01:50:31 +00:00
Peter Powell 523f89f45f Enable C++11 features on non-GCC C++11 compilers. 2019-12-14 19:16:44 +00:00
Peter Powell 6617d29b52 Fix a bunch of broken indentation. 2019-12-14 18:38:13 +00:00
Peter Powell a4ab6876c3 Fix the length limit for InspIRCd v3 S2S messages. 2019-12-14 18:06:53 +00:00
Peter Powell ff0109d6ba inspircd3: Refer to modules using without a prefix/suffix. 2019-12-14 17:53:42 +00:00
Matt Schatz 059c78aee3 Fix retrieval of TopicLock status in IRCDMessageMetadata. 2019-11-27 18:21:01 +00:00
Matt Schatz f75c5011e2 Update IRCDMessageMetadata for channel metadata.
- InspIRCd 3 now includes the channel TS in any channel metadata.
This pushes the type and value by one.
- Update the messages sent from this function accordingly.
- Fix retrieval of TopicLock status.
2019-11-27 18:21:01 +00:00
Peter Powell 2832c736dd Fix parsing InspIRCd v3 IJOIN messages.
Thanks to @H7-25 and @genius3000 for reporting this.
2019-11-17 10:23:06 +00:00
Matt Schatz f34ba4b1f0 Add the SSL ExtensibleItem for Users.
Copied this directly from inspircd12.cpp, which
inspircd20.cpp inherited from.
2019-11-12 13:06:32 +00:00
Adam 91dde90ad2 Merge pull request #246 from genius3000/2.0+unconfimed_info
Fix NickServ INFO and GLIST showing an incorrect unconfirmed expiry.
2019-11-11 21:20:55 -05:00
Matt Schatz 661b320d23 Look up unconfirmedexpire from the correct module.
- NickServ INFO and GLIST were looking in the wrong module.
2019-11-11 19:15:54 -07:00
Adam ae7706ae55 Bump for 2.0.8-git 2019-11-02 20:59:02 -04:00
Adam 1dee851207 Release 2.0.7 2019-11-02 20:44:48 -04:00
Adam 9c91d386e4 docs: update Changes 2019-11-02 20:43:18 -04:00
Adam 3e4d87051b inspircd3: remove CoreExport from IRCDMessageKick 2019-11-02 20:24:21 -04:00
Robby 26975fc011 Rename a few instances of 'services' to 'stats' in stats.standalone.example.conf and irc2sql.example.conf. 2019-11-03 00:50:37 +01:00
Adam c15dc49994 ns_recover: add privilege for admins to recover other users 2019-10-14 13:13:08 -04:00
Peter Powell 14ee76a0ad Fix various typos. 2019-09-23 14:48:49 +01:00
Peter Powell 4465c67790 Update the supported InspIRCd versions in the README. 2019-09-23 13:23:02 +01:00
Peter Powell 20e0fa33fc Sort message handlers alphabetically. 2019-09-23 13:23:02 +01:00
Peter Powell 7e76daf39f Add the InspIRCd v3 module to the example configs. 2019-09-23 13:23:02 +01:00
Peter Powell 2ee63f0f68 Handle/send 1205-style PING/PONG messages. 2019-09-23 13:23:02 +01:00
Peter Powell c35029fa2f Parse 1205-style mode lists for CAPAB CHANMODES/USERMODES. 2019-09-23 13:23:02 +01:00
Peter Powell bae8987ec1 Add a handler for the IJOIN command. 2019-09-23 13:23:02 +01:00
Peter Powell 470d4d1a97 Update for the 1205 channel METADATA syntax. 2019-09-23 13:23:02 +01:00
Peter Powell 78bac905c2 Update for the 1205 FJOIN syntax. 2019-09-23 13:23:02 +01:00
Peter Powell d88d8e940e Update for the 1205 KICK syntax. 2019-09-23 13:23:02 +01:00
Peter Powell b2c3775b58 Update for the 1205 INVITE syntax. 2019-09-23 13:23:02 +01:00
Peter Powell b311248bed Update for the 1205 SERVER syntax. 2019-09-23 13:23:02 +01:00
Peter Powell f7f45b4e2b Update for the 1205 FTOPIC syntax. 2019-09-23 13:23:02 +01:00
Peter Powell 3cad3514f1 Remove the TOPIC command handler.
This legacy compat command was removed in the 1205 protocol.
2019-09-23 13:23:02 +01:00
Peter Powell 1020ca47bd Remove the JOIN command handler.
This legacy compat command was removed in the 1205 protocol.
2019-09-23 13:23:02 +01:00
Peter Powell 48dbb70ecc Use the SINFO command instead of the old VERSION command. 2019-09-23 13:23:02 +01:00
Peter Powell ae16206f0c Use NUM instead of PUSH for sending numerics to clients. 2019-09-23 13:23:02 +01:00
Peter Powell 7045f206af Require the 1205 (3.0+) server protocol. 2019-09-23 13:23:02 +01:00
Peter Powell 67bd3e44c0 Remove the dependency on the inspircd12 module. 2019-09-23 13:23:02 +01:00
Peter Powell 264981fb1b Mark inspircd3 as being the InspIRCd 3 module. 2019-09-23 13:23:02 +01:00
Peter Powell 47d471c53d Make a copy of the InspIRCd v2 module for v3. 2019-09-23 13:23:02 +01:00
Peter Powell e43bc49ba7 Update the core message parser to allow parsing IRCv3 message tags. 2019-09-23 13:20:07 +01:00
Robby d9de4ddd82 Insert a new line between the subject and message body when sending mail.
Required for RFC 2822 compliancy.

Reported by jrmu via IRC.
2019-08-24 07:37:35 +02:00
Adam 8f7f4b1593 Merge pull request #244 from clem16/2.0
Fixed stupid simple typos.
2019-08-18 20:37:00 -04:00
Clem Morton fc64c0c6dd Fixed stupid simple typos.
Fixed stupid simple type, changed "bot not both" to "but not both"
2019-08-18 16:46:50 -06:00
Robby 03d065e952 Add hide_status as an available option to nickserv.example.conf.
Also improve the hide_* descriptions slightly.
2019-08-04 23:32:52 +02:00
Peter Powell 77a52eec7c Fix the version binary colliding with the C++20 <version> header. 2019-07-05 12:17:37 +01:00
Robby 523a586176 Fix globops logging if there is no predefined sender. 2019-05-10 05:50:18 +02:00
Robby af32a14fc1 Config files: Fix some typos, bring stats.standalone.example.conf up to par with example.conf, etc. 2019-04-05 03:11:39 +02:00
Romain Rivière 5c8548040a Log channel memo deletions 2019-03-30 22:17:00 -04:00
Adam 6a42c1a4f3 Merge pull request #240 from SaberUK/2.0+bot
Mark pseudoclients as bots on InspIRCd if the bot mode exists.
2019-03-30 22:10:44 -04:00
Peter Powell 0defcda8d0 Reset the default modes on CAPAB START. 2019-03-30 20:09:34 +00:00
Peter Powell f6ee88c42a Mark pseudoclients as bots on InspIRCd if the bot mode exists. 2019-03-30 12:11:31 +00:00
Robby 34f65e3266 Update enc_bcrypt with upstream crypt_blowfish 1.3 changes.
Also reverted the URLs in the header to the original ones provided by upstream.
2019-03-14 16:53:52 +01:00
Robby 02ac3a403c Fix the ChanServ SET SUCCESSOR syntax to show that a nickname is optional. 2019-03-06 03:34:25 +01:00
Adam e1e840a87d Merge pull request #239 from SaberUK/2.0+set
Fix missing braces in cs_set.
2019-03-05 08:10:04 -05:00
Peter Powell eb66f9eda0 Fix missing braces in cs_set. 2019-03-05 11:29:45 +00:00
Robby a4c37a373a Update the dutch language file. 2019-02-28 04:44:37 +01:00
Robby bca9b4ce83 Regenerate the language files. 2019-02-28 03:05:07 +01:00
Robby a2446b8d4b Merge pull request #224 from genius3000/2.0+deoper_superadmin
Ensure SuperAdmin isn't left on when de-opering
2019-02-14 04:41:27 +01:00
Robby e567cfda36 Improve the help text for ChanServ SET SUCCESSOR. 2019-02-14 02:41:57 +01:00
Adam 961a9bc506 Merge pull request #221 from SaberUK/2.0+uplink
Make it more clear where the uplink config goes.
2019-02-09 17:37:41 -05:00
Bram Matthys da6e2730c2 Allow post-handshake SASL in UnrealIRCd 4.2.2 and up.
This updates the unreal4 protocol module to work with both pseudo-id's
and real UID's. Something that will also be necessary once UnrealIRCd
gets rid of pseudo-id's altogether.
2019-02-09 17:10:23 -05:00
Robby 2b8072bf80 Remove a few more unnecessary fuzzies in the language files. 2019-01-24 18:04:23 +01:00
Robby 49cea76841 Remove an unnecessary fuzzy in the french language file. 2019-01-24 17:30:17 +01:00
Robby e1c8aa0dbc Update the language files.
- Regenerated the language files.
- Made some corrections to the french language file.
2019-01-24 15:36:50 +01:00
Adam 2546e865e2 Merge pull request #233 from genius3000/2.0+typofix
Fix typo in CS enforce help reply.
2019-01-21 19:14:10 -05:00
Matt Schatz d6af21e0d9 cs_enforce: fix typo in help. 2019-01-20 21:25:07 -07:00
Dragone2 18522f7fc8 Fixed some misspellings in Italian Translation 2019-01-03 21:46:52 -05:00
Adam 4c167bed69 Merge pull request #223 from SimosNap/webcpanel
Fixed NickServ set access from webcpanel
2019-01-03 21:34:00 -05:00
devel 32a21679fb Fixed NickServ set access from webcpanel 2019-01-03 21:33:02 -05:00
Adam a5eaf6fc49 Merge pull request #225 from genius3000/2.0+away_msg
Handle S2S AWAY messages with a timestamp
2019-01-03 21:30:44 -05:00
k4bek4be 9d7245bded Polish translation reworked and completed. 2019-01-03 21:20:34 -05:00
Adam 02fb4b67cf Merge pull request #228 from SaberUK/2.0+casemap
Send the casemap as part of CAPAB CAPABILITIES on InspIRCd.
2019-01-03 21:10:31 -05:00
linuxdaemon cf44418e10 Allow multiple IP addresses in extforward_ip separated by spaces 2019-01-03 21:07:01 -05:00
Robby 6fbb7cffe9 Update copyright to 2019.
This was done with:
find docs/ include/ language/ modules/ src/ *.* Config -exec sed -i 's/-20.. Anope Team/-2019 Anope Team/i' {} \;
2019-01-01 17:43:35 +01:00
Robby b279863acb Update most URLs to use HTTPS if available, and fix some dead ones too. 2018-11-10 15:15:05 +01:00
BoGu5 9e7dadb967 docs/FAQ: Fixed 1.9 to 2.0 in 2.0 branch 2018-11-10 13:07:35 +01:00
Robby 9069bf4e2f Merge branch 'TheMythPT-patch-2' into 2.0
Update chanstats.example.conf

Missing permissions that otherwise allow any registered user to turn on/off chanstats option to any other user
2018-10-28 16:42:17 +01:00
Vitor e85b0a5f68 Update chanstats.example.conf
Missing permissions that otherwise allow any registered user to turn on/off chanstats option to any other user
2018-10-28 16:35:47 +01:00
Peter Powell 195eff9c04 Send the casemap as part of CAPAB CAPABILITIES on InspIRCd.
This is technically part of the 1205 protocol but it is entirely
backwards compatible so older versions will not be negatively
affected by this.
2018-10-27 19:11:38 +01:00
Robby 42aa330db3 ns_set: Log email address change requests when confirmemailchanges = yes 2018-09-11 01:21:19 +02:00
Matt Schatz 1e9d959857 Handle S2S AWAY messages with a timestamp
InspIRCd 2.0 sends a timestamp in its S2S AWAY message since
https://github.com/inspircd/inspircd/commit/b1002b7df55f1aec5bfce48ecd07d6d326174c95
Syntax of `AWAY <timestamp> :<away msg>`
Catch this message and remove the timestamp parameter before
sending it to the core AWAY handler.
2018-07-20 09:39:47 -06:00
Matt Schatz 38721993f1 Ensure SuperAdmin isn't left on when de-opering 2018-07-14 17:38:37 -06:00
Peter Powell 1b782235c4 Make it more clear where the uplink config goes. 2018-06-19 11:15:13 +01:00
Adam 368300d319 Merge pull request #222 from bonnedav/patch-2
Unreal4 does not allow SWHOIS to come from a user source.
2018-06-12 12:36:19 -04:00
Adam 94e10d52fb anopesmtp: fix previous commit 2018-06-12 10:46:55 -04:00
Adam d25c8c169e Merge pull request #203 from MrGadget1024/patch-1
Fix mail sending for reliability.
2018-06-12 10:39:17 -04:00
Vitor 67b7fed9ed example.conf: update example link block for Unreal 4 2018-06-12 10:36:39 -04:00
Dragone2 e32a8dbbe5 Update Italian translation 2018-06-12 10:29:34 -04:00
Dragone2 281edf8475 cs_seen: fix for translations being ignored
These strings: " but %s mysteriously dematerialized.", ". %s is still online." and ", but %s mysteriously dematerialized." weren't translated by the method Anope::printf().
2018-06-12 10:22:20 -04:00
Adam ce7c266651 Merge pull request #214 from genius3000/2.0+fix_insp20_proto
Fix for bug 1712
2018-06-12 10:16:45 -04:00
Adam c1166e3618 Merge pull request #216 from SaberUK/2.0+oline
Disable the os_oline module by default.
2018-06-12 10:08:16 -04:00
Adam 8294c94b95 Merge pull request #217 from genius3000/2.0+ns_set_message
Show NickServ SET MESSAGE in help when 'useprivmsg' is enabled
2018-06-12 10:07:55 -04:00
Adam 6f09b703dd Merge pull request #218 from miwob/modernize
Update ircd-hybrid protocol module to support latest version of ircd-…
2018-06-12 10:01:27 -04:00
miwob 466e5be741 Update ircd-hybrid protocol module to support latest version of ircd-hybrid better 2018-06-12 08:40:57 -04:00
Adam 32076c099c Merge pull request #219 from genius3000/2.0+set_help_hide
Check for 'hide' flag in commands in (bs,cs,ns)_set HELP
2018-06-12 08:39:24 -04:00
Adam 216b96aa57 Merge pull request #220 from genius3000/2.0+ns_ungroup_log
Log NickServ ungroup
2018-06-12 08:16:35 -04:00
bonnedav 6d592e2a0f Unreal4 does not allow SWHOIS to come from a user source. 2018-06-12 00:00:00 -06:00
Matt Schatz feb5a4d935 Log NickServ ungroup 2018-05-08 16:24:02 -06:00
Robby e03ae0cd85 Update copyright to 2018.
This was done with:
find docs/ include/ language/ modules/ src/ *.* Config -exec sed -i 's/-20.. Anope Team/-2018 Anope Team/i' {} \;
2018-04-25 19:22:13 +02:00
Robby 901fc3e40f Document that negating is possible for commands and privs in opertype blocks. 2018-04-25 18:59:09 +02:00
Robby 5683f45925 Clarify available tokens for the email templates. 2018-04-25 16:32:12 +02:00
Robby bafc17472e Add 'n' email token for use in the emailchange template, this token gets replaced with the display nickname. 2018-04-25 16:15:16 +02:00
genius3000 7638c7a884 Check for 'hide' flag in commands in (bs,cs,ns)_set HELP
This code is duplicated from help.cpp to (bs,cs,ns)_set.cpp for listing
the available SET commands. The check for the 'hide' flag was missed
and this incorrectly listed commands that were configured as hidden.
2018-04-02 04:02:23 -06:00
Adam d25722ddd0 m_httpd: make http headers case insensitive 2018-03-26 20:21:06 -04:00
genius3000 750d1009ec Show NickServ SET MESSAGE in help when 'useprivmsg' is enabled 2018-03-10 15:22:02 -07:00
Peter Powell b8e7960ff6 Disable the os_oline module by default.
This only works on UnrealIRCd 3.2 (which has been EOL for over a
year now) and regularly confuses users who think that "your IRCd
does not support OMODE" is an error they need to fix.
2018-03-03 14:26:33 +00:00
genius3000 ff878bbda8 Allow empty values in InspIRCd 2.0 mode strings within CAPABILITIES
Skipping over empty values in the commasepstream can put the mode adding
logic out of order (eg. ignoring the first two tokens when they are the
needed tokens). Most modes are already added by being explicitly checked
for, but the "unknown" or "extra" modes are added here.
2018-02-13 20:35:37 -07:00
Adam 1baf774647 ns_group: send login on successful group too 2018-02-10 08:36:12 -05:00
Adam 772410d974 Merge pull request #211 from Dragone2/patch-5
Update for Italian translation
2018-02-02 22:48:00 -05:00
Adam 7ceb4426c7 m_dns: fix notify socket always being ipv6 2018-02-02 22:39:46 -05:00
Dragone2 10c7a9ff94 Update for Italian translation
Update for the old Italian translation of Anope, with new translated strings, correction of grammatical errors and other minor changes.
2018-02-03 00:19:21 +01:00
Adam b3c4b28a67 Merge pull request #197 from genius3000/2.0+fix_insp_rlines
2.0: Fix sending incorrect RLines to InspIRCd
2018-01-12 12:09:50 -05:00
nekoswag 0da4150283 Update chanserv.example.conf (#206) 2017-12-30 15:32:22 -05:00
Chris Langsenkamp 5920f1b59c Fix mail sending for reliability.
After sending the "\r\n.\r\n" after the mail payload, smtp_send_email was not waiting for the mail server to complete post-processing and respond with "250", but was sending "QUIT\r\n" immediately and dropping the connection.  Mail server may kill the transaction if it can't send the "250" (socket closed).  The changes proposed completes the mail transaction by reading for the 250 and in smtp_disconnect steps through a proper quit sequence by waiting for the 221 server response.

I discovered this by including the --debug option in services.conf sendmailpath, which invoked logging in smtp_send and that slowed it down enough for the mail server to return the 250 and complete the transaction.
2017-12-11 12:41:31 -05:00
Adam 68fcb1af93 Bump for 2.0.7-git 2017-12-11 11:47:06 -05:00
Adam 0574de2d22 Anope 2.0.6 Release 2017-12-11 11:46:10 -05:00
Adam c9c53dbe61 Add README.md, for github 2017-11-19 17:28:05 -05:00
Adam a084245822 README: remove some outdated links 2017-11-19 17:28:05 -05:00
Robby 77e3f062da Update the dutch language file. 2017-11-17 23:56:15 +01:00
genius3000 0e14adcb0f Fix sending incorrect RLines to InspIRCd
Currently a Regex AKILL is sent with a malformed mask to InspIRCd as an RLine.
InspIRCd expects a mask of 'n!u@h\sr', so we need to remove the enclosing
slashes (/.../), change the '#' separator to '\s', and change any literal
spaces to '\s' and then it creates a proper RLine.
2017-10-14 08:36:35 -06:00
Adam 8bb3067e42 Update Changes and Changes.conf 2017-10-12 19:58:02 -04:00
Adam 0c469abe4a Call OnDelChan prior to unsetting extensibles
cs_set uses this to set -P on permanent channels if they are persistent.

Also move similar event in nickcore/nickalias destruction
2017-10-12 19:37:06 -04:00
Adam d63e32a579 No longer try to create persistent channels on the fly
Change initial channel creation to on post init so it will be part of
the burst.
2017-10-12 19:30:48 -04:00
Adam f13c450b93 Add post init event 2017-10-12 19:28:34 -04:00
Adam e95c07291a unreal4: send sjoin with empty users in SendChannel 2017-10-12 19:28:12 -04:00
Adam 2963fc0a1d unreal4: send modes in sjoin 2017-10-12 19:27:51 -04:00
Adam 5d309d46e1 plexus: fix overriding SendSVSLogin 2017-10-10 21:19:23 -04:00
Adam 2e7fcd3098 Merge pull request #199 from syzop/2.0+unrealsaslmechs
Advertise SASL mechanisms to UnrealIRCd servers.
2017-10-09 11:29:55 -04:00
Adam 884759aed4 Merge pull request #200 from syzop/2.0+saslbydefault
Load sasl module by default.
2017-10-09 11:23:09 -04:00
Bram Matthys 2ec65023a6 Load sasl module by default. 2017-10-09 10:31:21 +02:00
Bram Matthys 0093f3fa44 Advertise SASL mechanisms to UnrealIRCd servers. 2017-10-09 10:22:50 +02:00
Adam 2ad76278dd Use full path to file for conf.cpp file could not be opened error message 2017-08-05 18:31:57 -04:00
Tim Gunter 23e59d9f2c Allow calls to XMLRPC to impersonate supplied user, if online 2017-07-28 09:08:40 -04:00
Adam 3cb9e0b97c m_xmlrpc: fix incorrect string find usage 2017-07-24 20:30:34 -04:00
Adam 0b7b6d9d6d ns_group: don't require a user to group 2017-07-24 10:04:07 -04:00
Adam 56e6efbe8f Default require_oper to true. Fixes os_oper unserializer because it doesn't set it. 2017-07-02 18:03:36 -04:00
Adam feed624cdc webcpanel: rate limit login attempts 2017-06-05 18:44:48 -04:00
Adam 1a6f42b994 webcpanel: escape values in template_fileserver
Remove other escapes to prevent double escape.

Not all replaced values were escaped, such as replies from commands.
2017-06-05 10:11:22 -04:00
Adam 04f49225c9 httputils: escape ampersand too 2017-06-05 10:10:58 -04:00
Adam b18d1a69b6 Merge pull request #174 from Techman-/2.0+inspsasl
InspIRCd: Send CHGIDENT/CHGHOST on SVSLOGIN
2017-05-27 12:29:12 -04:00
Adam 0ace685597 Merge pull request #188 from key2peace/2.0
IPv6 support for m_dnsbl and sockaddrs::reverse()
2017-05-27 09:58:34 -04:00
Alexander Maassen bfcfd0b727 Moved m_dns's reverse ip method to sockaddrs::reverse().
Updated m_dnsbl to support ipv6.
2017-05-27 09:56:18 -04:00
Adam 087f1cb359 m_dnsbl: fix exempts, allow cidrs, default exempt 127.0.0.0/8 2017-05-17 08:51:57 -04:00
Adam 010d20198e m_regex_posix: use REG_ICASE 2017-03-30 19:10:31 -04:00
Adam 953e804231 example.conf: disable regexengine directive by default 2017-03-30 17:02:36 -04:00
Adam c656fe0694 regchannel: fix compile warning from previous commit 2017-03-27 22:25:49 -04:00
Adam fb3ec7a897 cs_akick: don't show channel doesn't exist message in enforce from adding akicks 2017-03-27 21:41:35 -04:00
Adam 274658f955 Fix autokick destructor to properly remove channel references from accounts 2017-03-27 21:14:32 -04:00
Adam 7621306f4b example.conf: update to reflect deprecated status of older encryption modules 2017-03-26 18:34:03 -04:00
Adam b804867105 Remove weird warning in nickserv help which for some reason assumes admins' abuse policies 2017-03-23 20:05:09 -04:00
Adam f8f1550c31 Merge pull request #187 from miwob/new-mode
Add channel mode 'u', and 'L' to hybrid protocol module; Remove usele…
2017-03-19 18:56:06 -04:00
Adam 0fcc66711b m_sasl: pass module to logger 2017-03-19 18:55:32 -04:00
Adam 8d9574e306 readme: change minimum supported hybrid version to 8.2 2017-03-19 18:55:19 -04:00
miwob 6cb17c734c Add channel mode 'u', and 'L' to hybrid protocol module; Remove useless CAPABs that are mandatory for some years now. 2017-03-19 12:02:22 +01:00
Adam 3545e8e383 Fix ns_keep_modes default option in nickserv.conf 2017-03-18 15:30:17 -04:00
Adam 3c18e02b0b logger.cpp: fix variable shadow warning 2017-03-16 21:37:34 -04:00
Adam b831cd8a36 Include ip for web clients in command log messages for source 2017-03-16 20:23:57 -04:00
Adam 516ab164f6 redis: check for socket errors when loading database on startup 2017-03-16 20:13:56 -04:00
Adam b2d028533d cs_xop: fix showing alternative access methods in help 2017-03-15 21:44:05 -04:00
Adam a88d9cb1f0 modes.cpp: correct usage of format string passed to SendMode 2017-03-08 19:58:25 -05:00
Adam b57ef5d2c7 db_redis: don't crash if destroying an object with no type 2017-03-08 16:23:30 -05:00
Adam 1a96390826 unreal4: set +xt on chghost as unreal does 2017-03-01 17:44:05 -05:00
Adam 60339edf40 cs_set: don't lower ts from own clients joining 2017-02-21 14:44:33 -05:00
Adam 6990c692d6 Unwrap list modes too in cs_mode, and fix clear on virtual modes to show an error 2017-02-21 12:36:59 -05:00
Adam 98e62b4032 Fix logging in cs_mode set 2017-02-21 12:35:51 -05:00
Adam a1d7d42d6a Unwrap mode changes in RemoveMode before checking if it is set, fixes os_mode not being able to remove extbans etc 2017-02-21 12:35:20 -05:00
Adam 3f7c0829ef os_forbid: match forbids exact on add/del 2017-02-21 09:59:10 -05:00
Adam 46d8af781d Verify configured servername and uplink password are valid 2017-02-21 08:19:03 -05:00
Adam 67b7c8bd7d os_logsearch: fix quick match 2017-02-12 16:46:13 -05:00
Adam 21486e2c81 Merge pull request #185 from fallen/2.0
Update French language file
2017-02-06 14:20:40 -05:00
Adam 29ac40b584 ns_set_misc/cs_set_misc: send syntax help too 2017-02-06 14:06:55 -05:00
Adam dde444ed0e protocol/inspircd12: set +x on /hs off 2017-02-06 13:15:01 -05:00
Adam 9b6c209c80 bs_badwords: allow opers with botserv/administration to list/clear badwords too 2017-02-04 20:21:40 -05:00
Yann Sionneau 3c7d67c8cd Update French language file
- translate "nick" to "pseudo"
- remove "XOP" arg from set secureops
2017-02-04 23:47:05 +01:00
Adam c730291762 logger: some log events rely on empty sources 2017-01-23 08:03:51 -05:00
Adam c593661f40 Anope 2.0.6-git 2017-01-22 17:04:20 -05:00
Adam a9bf251886 Anope 2.0.5 Release 2017-01-22 16:09:36 -05:00
Adam beac29b1d0 m_sasl: don't allow logging into unconfirmed accounts 2017-01-22 16:00:06 -05:00
Adam 35d6437d45 Remove old language strings from lang files 2017-01-20 09:45:25 -05:00
Robby 76ce8ece1a Cleanup some excess whitespaces and tabs, and fix a few typos along the way. 2017-01-17 05:03:25 +01:00
Adam 464093d36e Regenerate language files 2017-01-16 18:59:30 -05:00
Adam 71bb3fefcc Update Changes 2017-01-16 18:58:30 -05:00
Adam 1f6f9f5dbb Revert "Remove efnetrbl from example dnsbl configuration" 2017-01-16 18:45:08 -05:00
Adam 34bf21f7d1 Correct a couple expiry time checks from DoTime() 2017-01-16 18:42:29 -05:00
Adam 847dfd9523 Merge pull request #182 from genius3000/2.0+protocol_match_name
protocol/inspircd: Match servername as well on ENCAP
2017-01-16 18:33:09 -05:00
Adam a96e40e249 Merge pull request #183 from SaberUK/2.0+cmake
Don't give misleading instructions when running CMake fails.
2017-01-16 18:32:34 -05:00
Robby 8656b65e39 Update copyright to 2017.
This was done with:
find docs/ include/ language/ modules/ src/ *.* Config -exec sed -i 's/-20.. Anope Team/-2017 Anope Team/i' {} \;

Added missing copyright headers to files that didn't have it yet.
2017-01-16 03:13:25 +01:00
Robby 39422beaef Update the dutch language file. 2017-01-14 02:57:44 +01:00
Peter Powell 6d29538346 Don't give misleading instructions when running CMake fails. 2017-01-13 22:02:00 +00:00
Adam bdf4650ff8 m_dnsbl: widen allowed reply range to 127.0.0.0/8 2017-01-12 13:26:29 -05:00
Adam 074bde5ccc db_sql: run table creation queries during import synchronously too 2017-01-11 20:44:55 -05:00
Adam a4f7d847ab unreal4: use SENDUMODE instead of GLOBOPS 2017-01-11 20:42:20 -05:00
Adam 5beb338247 Remove efnetrbl from example dnsbl configuration 2017-01-08 15:48:54 -05:00
Adam 7b1154de69 ns_register: notify users of unconfirmed accounts on register when there is no user too 2017-01-08 13:08:04 -05:00
Adam 46aeb8b70b os_list: show number of channels listed, too 2017-01-07 18:09:14 -05:00
Adam fe6271dffb ngircd: move metadata non-exietent user log message to debug 2017-01-07 18:04:07 -05:00
Adam 7cede5bb60 os_list: also allow patterns in nick!user@host#realname form 2017-01-07 18:03:53 -05:00
Adam 2b7f0084b7 Move log messages for status mode change for unknown user to debug 2016-12-22 20:59:04 -05:00
Adam ec7ce09ef4 Make User::Mask behave more like 1.8 2016-12-22 20:52:43 -05:00
Adam 574c8dfbc7 Fix previous commit, deleting sessions removes it from the map which invalidates the reference 2016-12-21 10:35:57 -05:00
Adam 4381031994 m_sasl: log hostname/ip, if provided 2016-12-19 19:03:10 -05:00
Adam b3010c3c6b logger: log source nick if there is no user or account 2016-12-15 08:24:40 -05:00
Adam d092f5e7c8 Fix detecting if chghost/chgident is loaded on inspircd and don't send them unless they are 2016-12-11 09:43:22 -05:00
Adam 358f46b8ae Fix setting kill quick in webcpanel 2016-12-11 09:34:37 -05:00
Adam e5125c2c84 Allow nonconfirmed opers to confirm accounts 2016-12-11 09:24:52 -05:00
Adam 65db59b3ec Remove unnecessary functions from ngircd that duplicate the default behavior, fix a few typos in comments 2016-12-10 23:28:50 -05:00
Adam 95cd7a6aee inspircd12: fix mode handler to handle opers changing other users umodes correctly 2016-12-01 19:10:46 -05:00
Adam 12515fd2c1 cs_access: fix typo 2016-12-01 19:08:39 -05:00
Adam 437a6dbb29 os_logsearch: optimize non wildcard searches, allow regex 2016-11-22 19:44:25 -05:00
Adam d96ca9b824 os_logsearch: add a hard max limit and make the limiter smarter 2016-11-22 19:35:11 -05:00
genius3000 aefde6e44d protocol/inspircd: Match servername as well on ENCAP 2016-11-22 02:26:41 -07:00
Adam 23a0628fba db_old: convert languages to UTF-8 encoded version 2016-11-11 13:30:22 -05:00
Adam ef9c69f99d Don't apply secureops to users with chanserv/administration privilege, not protected 2016-11-05 12:06:26 -04:00
Adam 8be331618c ns_group: allow userless execution 2016-11-05 11:07:02 -04:00
Adam a5fdf7c546 irc2sql: fix changing status modes to update ison modes 2016-11-05 10:36:28 -04:00
Adam dba19d839a cs_access: fix negative access to apply to the -1/0 special casing 2016-11-05 10:35:47 -04:00
Adam 7453c71c00 irc2sql: fix crash on shutdown with no sql 2016-11-05 10:34:25 -04:00
Adam f09ea316dd irc2sql: update max topic len to 512 2016-11-05 10:34:09 -04:00
Adam ac0f3c5ccf m_mysql: null empty columns instead of setting to '' 2016-11-04 22:56:15 -04:00
Adam 76ea111980 irc2sql: fix a couple SQL errors 2016-11-04 22:07:00 -04:00
Adam 9f9183afc4 help: always use command name from config, which may be a different case 2016-11-03 23:23:57 -04:00
Adam ef32505633 dns: set error to REFUSED when there are no answers 2016-11-03 23:15:07 -04:00
Adam 304494322f Don't apply secureops to protected users 2016-11-03 23:08:49 -04:00
Adam 9e510cd0d9 Fix userless /ns set email, #1689 2016-11-03 23:04:22 -04:00
Adam 0f49d1051a Don't try to include files with empty paths 2016-11-03 22:58:50 -04:00
Adam 4b97a9b13f Fix crash loading enc_old prior to the proto mods 2016-11-03 22:54:35 -04:00
Adam 07f72a3122 os_list: fix regex matching 2016-10-25 14:35:36 -04:00
Adam f4543edfe2 plexus: add noop and sasl support 2016-10-16 18:52:40 -04:00
Adam 095751363d db_sql: don't update objects pending creation as it duplicates it 2016-10-16 18:51:58 -04:00
Adam 1b67b97e93 ns_maxemail: equals_ci for comparing emails 2016-10-06 14:59:22 -04:00
Adam d4bf0957d1 inspircd20: specifially add channel modes official-join and operprefix as status modes, sometimes they are sent in CAPAB without a status prefix which causes them to be added as parameter modes 2016-10-04 21:45:45 -04:00
Adam 99acdcf168 cs_mode: check chanserv privilege too for status modes on set 2016-10-04 21:28:43 -04:00
Adam e95950ee26 cs_mode: make override logging of mode set more reliable 2016-10-04 21:13:43 -04:00
Adam fc0171fb40 memoserv: always use display for memo source 2016-09-30 21:03:35 -04:00
Adam 1c82697ccb Revert "Always use display for memo source"
This reverts commit d8a945b1a6.
2016-09-30 20:52:38 -04:00
AlphaTech f3bb46a9f5 MemoServ - Read All 2016-09-25 17:27:30 -04:00
Michael Hazell 3b62c8f3e2 InspIRCd: Send CHGIDENT/CHGHOST on SVSLOGIN 2016-09-25 14:50:03 -04:00
Adam 4d054aa2b2 Merge pull request #173 from genius3000/2.0-remove-expiretimeout-cs_seen
Thanks
2016-09-25 14:38:16 -04:00
Adam 3a8ff5d456 Merge pull request #177 from attilamolnar/2.0+sqliteleak
m_sqlite: Fix possible memory leak when opening a database fails
2016-09-25 14:37:01 -04:00
Adam 0b783b66a4 Merge pull request #178 from Techman-/2.0+resv
Thanks
2016-09-25 14:36:46 -04:00
Adam 0c7050c506 Merge pull request #175 from genius3000/2.0-email-date_header
Added a Date field to the Header
2016-09-25 14:35:43 -04:00
Adam d02b3c1c45 Merge pull request #176 from Alef-Burzmali/2.0+update-fr2
Thanks
2016-09-25 14:33:49 -04:00
Adam d8a945b1a6 Always use display for memo source 2016-09-14 17:24:06 -04:00
Adam b50fbec705 cs_seen: allow unregistered users to use 2016-09-13 12:36:48 -04:00
Adam d488efdcfe ms_cancel: cleanup, consider accounts by equiality instead of sender name to account name 2016-09-06 14:46:19 -04:00
Adam 13c5eec00a m_ssl_openssl: allow certificate chain files to be used 2016-09-05 10:41:52 -04:00
Michael Hazell 39eb9f8cfc ratbox: fix RESVs
Also, enable channel support because it wasn't specified already and point charybdis to these methods instead.
2016-09-04 04:05:11 -04:00
Thomas Fargeix 83c2f8e970 Update French language file. 2016-08-19 21:33:57 +02:00
genius3000 e23cf0c221 Added a Date field to the Header 2016-08-17 10:22:44 -06:00
Attila Molnar de174149f7 m_sqlite: Fix possible memory leak when opening a database fails 2016-08-17 14:09:05 +02:00
genius3000 663e79e4d3 Remove 'expiretimeout' from chanserv.example.conf
As seen within this commit: https://github.com/anope/anope/commit/22658d63bdb1e52a66f4514af45fa55ca5891345
'expiretimeout' is no longer set within cs_seen and I can't see it used elsewhere to be needed in the config.
2016-08-08 23:39:19 -06:00
Adam 2a5e7827bd Merge pull request #172 from bonnedav/patch-1
Thanks
2016-08-08 09:34:14 -04:00
bonnedav 9c0b843665 Remove unused commands from oper config. 2016-08-08 02:41:42 -06:00
Adam 8fdfa6e094 Fix #1684 more, can have non-user sources for encap sasl 2016-07-25 22:27:30 -04:00
Adam dad4be050b cs_xop: remove unused code 2016-07-25 19:35:19 -04:00
Adam 937b0e7185 db_old: fix warnings 2016-07-25 19:34:59 -04:00
Adam db4f38bcf5 Bump for 2.0.5-git 2016-07-23 17:37:05 -04:00
Adam c2e09fdaea Anope 2.0.4 Release 2016-07-23 16:26:14 -04:00
Adam 01768bc73e Update Changes.conf 2016-07-23 16:25:37 -04:00
Adam c18eedec18 ns_set: clear last modes before unserializing them 2016-07-23 16:20:54 -04:00
Adam 0e0615c6fe Note Windows installer fixes in changelog 2016-07-23 16:17:33 -04:00
Adam 5bd3fde79b cs_set: clear last modes before unserializing them 2016-07-23 16:17:21 -04:00
Adam 647f8cd4e6 Add/fix various checks on source user existing in the protocol modules 2016-07-23 15:47:33 -04:00
Adam b2e25db159 Merge pull request #171 from Techman-/2.0+charybdis-resv-fixes
charybdis.cpp: Properly support RESVs
2016-07-23 15:38:26 -04:00
Adam 9f9371531d Fix making directories from the Windows installer 2016-07-23 15:22:54 -04:00
Michael Hazell b578ed2544 charybdis.cpp: Properly support RESVs
Properly support RESV and UNRESV in Charybdis, and improve RESV setting for pseudoclients when bursting.
2016-07-21 23:27:20 -04:00
Adam 0a7f167060 m_dns: accept unpacking the root domain, and don't consider exceptions from nameserver/additional record unpacking as fatal to query parsing 2016-07-19 21:17:58 -04:00
Adam d427772bd3 os_defcon: find module by name, it might not be loaded yet 2016-07-10 20:51:03 -04:00
Robby b2d670298b Update the dutch language file. 2016-07-07 16:07:24 +02:00
Adam 6b646fa1f8 Update Changes 2016-07-03 13:57:11 -04:00
Adam 72269c44e5 Merge pull request #170 from Zoddo/charybdis/join0
Thanks
2016-07-03 13:47:49 -04:00
Adam 3b2366e4ba Merge pull request #169 from SaberUK/2.0+which
Use "cmake --version" instead of "which cmake" to detect CMake.
2016-07-03 13:46:41 -04:00
Adam 257a8a9a24 ns_maxemail: optionally remove gmail aliases 2016-07-03 13:42:18 -04:00
Adam 7a1d2e11dd chankill: don't add duplicate akills 2016-07-03 13:31:12 -04:00
Adam 8dc687b657 #1682: store aftype with masks and include cidrs in GetNUHMask 2016-07-03 13:29:27 -04:00
Adam 18fc113984 #1681 update last realname always on signon 2016-07-03 13:06:06 -04:00
Adam 20c1a5d638 #1680: fix Anope::Duration with one year durations 2016-07-03 12:42:16 -04:00
Adam 8000ae0c0f #1677 apply sqlines even if the ircd doesn't on non opers 2016-07-03 12:36:34 -04:00
Adam 284d95bfe2 #1675: fix saset display to update the account name on the correct clients 2016-07-03 12:27:01 -04:00
Adam c7d5ee4bec Fix /ns confirm to set +r/accounts when appropriate 2016-07-03 12:17:44 -04:00
Adam 4c4cc0ded7 Fix xmlrpc notice call to return something to prevent m_xmlrpc from thinking it is a http 404 2016-07-03 12:08:21 -04:00
Adam 83f89bfece Clarify botserv repeat kicker message and allow setting repeat times to 1 2016-06-25 13:04:32 -04:00
Adam 7cf4245359 Enable -fno-delete-null-pointer-checks on GCC 6 2016-06-22 20:20:28 -04:00
Zoddo 9284441491 Handle /join 0 for ratbox & charybdis 2016-06-02 12:23:26 +02:00
Peter Powell 7592a6981b Use "cmake --version" instead of "which cmake" to detect CMake. 2016-05-21 17:54:33 +01:00
Adam 56b158ea43 Fix handling nick introduction collisions on unreal4 2016-05-20 21:18:34 -04:00
Adam 0143dafe51 Merge pull request #165 from sketchni/patch-1
Add the notice method to XMLRPC.
2016-04-22 10:17:41 -05:00
Adam a2dbcc620e Merge pull request #166 from jmdh/2.0-reproducible
Optionally strip variable build date from compiled program
2016-04-22 10:17:11 -05:00
Adam 9b5fdea8f2 Fix randomnews to work when there are more than newscount random news 2016-04-22 11:15:42 -04:00
Dominic Hargreaves fab07d6b75 Optionally strip variable build date from compiled program
To aid build reproducibility, don't include the build date/time if
-DREPRODUCIBLE_BUILD is defined.

Based on the patch provided by Alexis Bienvenüe in the Debian report.

Bug-Debian: https://bugs.debian.org/820152
Patch-Name: reproducible_datetime.diff
2016-04-21 23:08:12 +01:00
Sketch 1d198da436 Add the notice method to XMLRPC. 2016-04-20 15:41:23 +01:00
Adam 8b6e17fe7e Change access check in cs_updown to not allow actions on users with equal access 2016-04-16 18:14:23 -04:00
Adam 86484b6c2b Merge pull request #164 from SaberUK/2.0+extras
Remove references to cmake-bin which was removed ages ago.
2016-04-16 16:59:21 -05:00
Adam c14ae99d32 Merge pull request #163 from Zoddo/fix_sasl_reauth
Send new account name to the IRCd on SASL reauth
2016-04-16 16:59:00 -05:00
Adam cb0cda2f8d Missed channel deletion in ~ChannelInfo 2016-04-16 18:00:47 -04:00
Peter Powell 2af363755a Remove references to cmake-bin which was removed ages ago. 2016-04-16 13:05:44 +01:00
Zoddo 753b8dc989 Send new account name to the IRCd on SASL reauth 2016-04-15 10:49:30 +02:00
Adam d2ea1e7917 Merge pull request #160 from Zoddo/charybdis/fix_euid
Fix host on charybdis if there is no vhost
2016-04-14 19:18:14 -05:00
Adam a8f66578b1 Merge pull request #161 from Zoddo/charybdis/vhost_svslogin
Send vident/vhost in SVSLOGIN with SASL
2016-04-14 19:17:39 -05:00
Adam ca39aeb554 Merge pull request #162 from SaberUK/2.0+sasl
Remove support for DH-AES and DH-BLOWFISH.
2016-04-14 19:16:56 -05:00
Adam a941f9bde0 Remove memos from memoinfo more reliably 2016-04-14 20:15:53 -04:00
Peter Powell f4f6787c9c Remove support for DH-AES and DH-BLOWFISH.
These SASL mechanisms are considered insecure and should not be
used anymore.
2016-04-13 20:26:50 +01:00
Zoddo 82816cb206 Send vident/vhost in SVSLOGIN with SASL
Only charybdis seems to support that for the moment.
2016-04-10 18:24:25 +02:00
Zoddo 58f0c8c612 Fix host on charybdis if there is no vhost 2016-04-10 17:53:53 +02:00
Adam 21e1913c0f Fix subtle typo in command initializer list 2016-04-05 16:01:16 -04:00
Adam 79e7c3f98a Also defer channel deletion when processing sjoins 2016-03-19 16:21:40 -04:00
Adam 72127e1b00 Merge pull request #159 from Diftraku/2.0
proto/charybdis: Add support for MECHLIST
2016-03-17 17:15:56 -05:00
Toni Kaija ed47588087 proto/charybdis: Add support for MECHLIST 2016-03-17 15:13:11 +02:00
Adam 448967cefc Merge pull request #156 from SaberUK/2.0+sasl-mechlist
Implement support for SASL 3.2 mechanism lists.
2016-03-15 17:41:48 -05:00
Adam 979027138b Merge pull request #155 from SaberUK/2.0+sasl-reauth
Fix logging into accounts with SASL on servers that support reauth.
2016-03-15 17:40:26 -05:00
Robby 176e0e4f37 Update the dutch language file. 2016-03-09 22:42:45 +01:00
Adam b431d4dccf cs_clone: don't clone registered time 2016-03-08 19:49:30 -05:00
Adam 1b12b80b48 language: incrementing _nl_msg_cat_cntr is still required on some systems apparently (freebsd 10?). I don't know why. 2016-03-08 19:47:06 -05:00
Peter Powell 52fdc45597 Implement support for SASL 3.2 mechanism lists. 2016-02-28 16:36:43 +00:00
Peter Powell 91762524e2 Fix logging into accounts with SASL on servers that support reauth. 2016-02-28 13:22:19 +00:00
Adam 413b38b1c1 Fail sasl external auth immediately if cert is empty 2016-02-13 18:25:04 -05:00
Adam ecdccd6ad6 And use account here, user might be null 2016-02-13 18:19:47 -05:00
Adam e0fd118b3e Fix access path changes in ns_alist from earlier 2016-02-13 18:11:03 -05:00
Adam c10d7bdada Update chanserv secure help to reflect more accurately what it does 2016-02-13 14:41:23 -05:00
Adam 4e2ca31cf5 Rewrite access path system to be simplier and use recursion
Show where access is "from" in chanserv/status
2016-02-13 14:16:29 -05:00
Adam addd2a1987 Correct umode +I change in Changelog, is for unreal 2016-02-11 08:36:12 -05:00
Adam 4071487f80 Merge pull request #154 from SaberUK/2.0+inspfix
Fix a low risk privilege escalation exploit on InspIRCd with m_autoop.
2016-02-11 07:03:55 -06:00
Peter Powell 9c17c2d818 Fix a privilege escalation exploit on InspIRCd with m_autoop. 2016-02-10 08:56:23 +00:00
Adam dd9fcca45d Anope 2.0.4-git 2016-01-30 18:50:28 -05:00
Adam d9c0a13caf Anope 2.0.3 Release 2016-01-30 17:27:31 -05:00
Robby 5daa84c7f9 Update the dutch language file. 2016-01-30 23:26:32 +01:00
Adam b12669487f Allow /ms read to get a comma separated list of memo numbers as help describes. Show message if no memos could be displayed. 2016-01-30 16:54:20 -05:00
Robby 0e9a1e87d0 The default xop access for PROTECTME should really be SOP, not AOP. 2016-01-29 19:42:10 +01:00
Robby f118960a25 Update copyright to 2016. This was done with:
find include/ src/ lang/ docs/ modules/ *.* Config -exec sed -i 's/-20.. Anope Team/-2014 Anope Team/i' {} \;

Added missing copyright headers to files that didn't have it yet.
Fixed some whitespace and blank lines along the way.
2016-01-28 20:24:49 +01:00
Adam 5d6a71b6d2 Regenerate language files 2016-01-28 08:15:38 -05:00
Adam 23fab4ad06 Revert "Regenerate language files"
This reverts commit e955db6e85.
2016-01-28 08:15:24 -05:00
Adam 825dc5be46 Revert "Updated and fixed the Greek language."
This reverts commit f451c6cbac.
2016-01-28 08:14:58 -05:00
Robby b6fb6410c0 Update the dutch language file. 2016-01-27 19:14:12 +01:00
Robby 45dfea5ad9 Document m_xmlrpc_main opers 2016-01-27 18:04:55 +01:00
Adam d0a5316c67 Remove default session exception expiry time 2016-01-25 11:51:31 -05:00
Adam 382ab84938 Merge pull request #150 from westor7/patch-1
Updated and fixed the Greek language.
2016-01-25 10:31:47 -06:00
westor f451c6cbac Updated and fixed the Greek language.
Updated and fixed all the non-fuzzy languages items, previously all of them was incorrect.
Added new credits.
2016-01-24 17:20:00 +02:00
Adam 9645f53dc8 Update m_ssl_gnutls Windows library version to libgnutls-30 2016-01-23 22:25:19 -05:00
Adam 41802c28c6 Fix m_sql_oper to compile from the cleanup of the other day 2016-01-23 20:45:10 -05:00
Adam 97a13081e9 Fix typo in changes 2016-01-23 20:44:50 -05:00
Adam 38fcf15d62 Put maxlogins logic a few other important places 2016-01-23 10:53:32 -05:00
Adam 75dd784538 Fix hybrid to compile 2016-01-23 10:53:22 -05:00
Adam e955db6e85 Regenerate language files 2016-01-23 10:37:23 -05:00
Adam a434651e75 Update Changelogs 2016-01-23 10:36:04 -05:00
Adam 7d674726c2 Merge pull request #145 from miwob/style+copyright
Style+copyright
2016-01-23 09:19:08 -06:00
Adam be50211ae6 Merge pull request #149 from miwob/SendSQLine
Update SendSQLine() in hybrid's protocol module to use non-capsulatet…
2016-01-23 09:18:41 -06:00
Adam faa8f57bb2 Merge pull request #148 from SaberUK/2.0+18mod
Error out if any 1.8 modules are in the the module directory.
2016-01-23 09:18:32 -06:00
Adam 8cf21191fb Merge pull request #147 from miwob/temporary_xline
Update SendSGLine() in hybrid's protocol module to add support for te…
2016-01-23 09:18:12 -06:00
Adam ae847bcaf0 Merge pull request #144 from miwob/chankill_example
example.conf: announce operserv/chankill as well
2016-01-23 09:17:56 -06:00
Adam c4bbef0af8 Merge pull request #143 from staticfox/grammar
hs_group: Fix grammar
2016-01-23 09:17:44 -06:00
Adam 7953274a88 Re-lookup access in webcpanel after deleting access as the old group might be invalid 2016-01-23 10:15:01 -05:00
Adam d8eb3d4937 Apply regex sqlines on connect too 2016-01-23 08:58:08 -05:00
Adam f91f375b70 Show akill/xline ids in view 2016-01-22 10:29:44 -05:00
Adam eac25d016a Include memo mail information in ms_info 2016-01-22 10:13:05 -05:00
miwob 2356a1caab Update SendSQLine() in hybrid's protocol module to use non-capsulatet RESV message 2016-01-20 19:18:52 +01:00
Adam 164b349ef9 Fix various inconsistencies/crashes related to having multiple opers configured for the same user through combinations of os_oper/config/m_sql_oper 2016-01-19 16:25:02 -05:00
Peter Powell 2e370f6ed5 Error out if any 1.8 modules are in the the module directory. 2016-01-19 21:07:34 +00:00
miwob 9d30e1d63f Update SendSGLine() in hybrid's protocol module to add support for temporary x-lines 2016-01-19 20:07:45 +01:00
Adam 4771af1cb8 Couple user find by nick fixes 2016-01-19 08:30:35 -05:00
Adam 9c9df2ad1f Document ns_no_expire nick default 2016-01-19 08:30:06 -05:00
miwob 7f418a58da hybrid.cpp: clean up style to match with other code; update copyright header 2016-01-13 16:23:22 +01:00
miwob 510045858f example.conf: announce operserv/chankill as well 2016-01-12 20:00:08 +01:00
Matt Ullman d270910ace hs_group: Fix grammar 2016-01-12 09:31:58 -05:00
Adam 10aeba2da2 Merge pull request #142 from Zoddo/unreal4/uid
[Unreal4] Use UID/SID instead of nick/servername when possible
2016-01-03 11:36:03 -06:00
Zoddo 4e675c50e5 [Unreal4] Use UID/SID instead of nick/servername when possible 2016-01-03 16:31:45 +01:00
Adam 0a37576270 Actually there is no account here 2016-01-02 17:19:08 -05:00
Adam 8f6f2a2c47 Add sasl log category for auth log messages 2016-01-02 17:15:26 -05:00
Adam 36a465473e Add IRCDMESSAGE_SOFT_LIMIT to MD handler 2016-01-02 16:38:25 -05:00
Adam 23a0ecd0c4 unreal4: add md handler, certfp support 2015-12-30 16:11:41 -05:00
Adam 601af1b0eb Unreal 4 changes 2015-12-30 12:42:12 -05:00
Adam fb2aae1b17 Copy unreal -> unreal4 2015-12-30 12:42:03 -05:00
Adam ac984af11a Move CanAdd() check to after mask sanitization as it will remove other entries that are considered "covered by" the new mask 2015-12-29 14:04:45 -05:00
Adam d6cbd64621 Remove run-cc leftover 2015-12-29 14:04:04 -05:00
Adam e6bdc5dddd Merge pull request #141 from miwob/2.0+cmode_T_nonotice
Add support for channel mode +T to the ircd-hybrid protocol module
2015-12-29 12:57:09 -06:00
Adam ba805e30b8 Include gecos in GetNUHMask 2015-12-29 13:53:44 -05:00
Adam 6e48b1d56f Fix saset language reply 2015-12-28 17:45:44 -05:00
Michael Wobst cd6401f628 Add support for channel mode +T to the ircd-hybrid protocol module 2015-12-26 13:29:18 +01:00
Adam a25f94456d Fix race with recovering and svsnicing nicknames. Wait for first svsnick to go through before issuing the second. Fixes users sometimes svsnick colliding when recovering nicknames. 2015-12-19 13:38:47 -05:00
Adam b5228282e1 Merge commit '593ec34' into 2.0 2015-12-13 19:59:29 -05:00
Matt Ullman 593ec34ff7 os_akill: Sanity check AKILLing before modifing the akill list 2015-12-13 19:58:40 -05:00
Adam 7ce0eb219b Fixup ecdd046c80 to compile 2015-12-13 19:52:50 -05:00
miwob 99282e65a6 hybrid.cpp:SendClientIntroduction(): use a valid IP address format. In the future ircd-hybrid will reject UID messages with invalid IP addresses 2015-12-13 19:48:22 -05:00
Adam d07e60b3da Merge pull request #136 from miwob/add+CanSQLineChannel
hybrid.cpp: add missing CanSQLineChannel = true; to the protocol options
2015-12-13 18:46:14 -06:00
Adam 3da2cdb496 Only special case level -1 to everyone and not everything <0 2015-12-13 19:43:21 -05:00
Adam ecdd046c80 Add some replacement tokens for akick reason and welcome notice 2015-12-13 19:37:24 -05:00
Adam 98b35dfab2 Document m_xmlrpc_main notice 2015-12-13 19:28:31 -05:00
Adam 56abaf8498 Add notice method to m_xmlrpc_main 2015-12-13 19:27:15 -05:00
Adam 5394f5433a Fix SendNumericInternal on inspircd sending to the user's uid if dest is a uid 2015-12-13 19:21:53 -05:00
Adam c414433fae Allow wildcard searching emails 2015-12-13 19:19:00 -05:00
Adam 16d08e57df Fall back to account vhost in hs on/off 2015-12-13 19:14:44 -05:00
Adam 252a65af7e Update LOG dir in anoperc 2015-12-08 14:06:08 -05:00
Adam d40edcae69 null xline manager when removing so removexline doesn't get called 2015-11-05 20:50:10 -05:00
Adam 4c1cc0e05d Cleanup after xlines if directly removed 2015-11-04 20:51:02 -05:00
Adam 80c332bc41 Fix logonnews to prioritize the newest entries if it can't show them all 2015-11-04 20:05:01 -05:00
miwob 5a25a3807b hybrid.cpp: add missing CanSQLineChannel = true; to the protocol options 2015-10-24 12:45:19 +02:00
Robby 27a2645ed3 Fix chanserv botmodes. 2015-09-25 02:40:28 +02:00
Adam 830361e97d Check privilege name is valid in SetLevel 2015-09-24 17:22:44 -04:00
Adam 93a92bb73b Clear regex xlines on unload, which happens on shutdown, even though they are perm modules 2015-09-23 14:55:28 -04:00
Robby b9dc44ae9a Update the dutch language file. 2015-09-18 06:04:42 +02:00
Robby f52bbe22af Update my email address. 2015-09-18 05:38:44 +02:00
Robby 96d7797134 Bold code 2 -> 002. 2015-09-18 05:25:20 +02:00
Robby 9810da9829 Fix some sentences to be more correct. 2015-09-18 04:53:49 +02:00
Adam 5692abb316 Don't prevent channel destruction because persist is set. Perm mode/a bot should be assigned anyway which will prevent it. Fixes deleting bots out of perm channels causing desyncs 2015-09-17 20:35:46 -04:00
Adam 2e65bd4012 Channel::DeleteUser delets the container 2015-09-17 12:31:02 -04:00
Adam 1ac4a1d9a5 Defer channel deletion until after i/o. There are some edge cases with events kicking users mid-event that can delete them. 2015-09-17 10:07:30 -04:00
Adam 8d13a355cd Remove associated oper blocks in os_oper when accounts are deleted 2015-09-14 13:43:14 -04:00
Adam 8c4eec2b6e Update topic lock help to reflect how it works 2015-09-14 12:39:59 -04:00
Adam 776207ba67 Don't allow suspended users to login to webcpanel 2015-09-14 12:35:26 -04:00
Adam 2f5e880e57 Don't update channel last used time from ns alist access check 2015-09-14 12:24:13 -04:00
Adam 94f781726e Don't assign bots when persist is set if we aren't synced sinec we might not know of all modes 2015-09-11 14:54:48 -04:00
Adam 054c227df0 Merge pull request #120 from Alef-Burzmali/2.0+nobackupok
Fix db_flatfile to read the "nobackokay" setting
2015-09-06 16:12:22 -04:00
Adam 907e192aab Merge pull request #126 from SaberUK/2.0+typos
Fix a ton of typos.
2015-09-06 16:11:50 -04:00
Adam d6d0c883b0 Merge pull request #128 from SaberUK/2.0+destdir
Fix support for passing relative install paths to CMake.
2015-09-06 16:09:29 -04:00
Adam 7f4327e8ba Merge pull request #129 from AlphaT3ch/placeholder
Placeholder left in French Translation
2015-09-06 16:08:17 -04:00
Adam 132932ffaf Merge pull request #134 from retsofaj/2.0
Have CMake first check for libraries in any additional locations
2015-09-06 16:03:58 -04:00
Adam c007b829f7 Don't unset modes which have no privilege associated with them 2015-09-06 16:01:43 -04:00
Robby 3b647b0740 When toggling NOEXPIRE for a nickname, show the actual nickname in addition to the account name. 2015-09-02 20:36:24 +02:00
Adam 7a21648683 Only remove collide timers if the account matches on id 2015-08-20 15:04:03 -04:00
Jason Foster 389c1dbd92 Have CMake check for libraries first in any additional locations and second in the standard locations.
This allows (e.g.) using the Homebrew-installed OpenSSL instead of the system version.
2015-08-12 20:26:02 -04:00
Adam d95189a4d8 Fix webcpanel/memoserv/memos with a nonexistent channel 2015-07-31 18:26:49 -04:00
Adam e65a22ae9d Fix use after free from unloading modules which are the last one holding onto an IdentifyRequest 2015-07-31 17:07:30 -04:00
Adam 4e8cc4f786 Make secureops help less weird 2015-07-30 19:47:00 -04:00
Adam dfc18db1dd Remove unused variables from m_ldap 2015-07-23 08:25:28 -04:00
Adam 63dbd7fbf0 Set LDAP_OPT_PROTOCOL_VERSION 3 etc on reconnect, too 2015-07-23 08:23:48 -04:00
AlphaTech c1cdefe1a7 Placeholder left in French Translation 2015-07-16 15:21:13 -04:00
Peter Powell cd9a2af65d Fix support for passing relative install paths to CMake. 2015-07-15 00:28:59 +01:00
Adam 7fe0543bc6 Also UnsetExtensibles on botinfo 2015-07-14 18:52:23 -04:00
Peter Powell 2a6ad3d9fc Refuse to configure with old compilers that can't build Anope. 2015-07-13 19:26:02 -04:00
Adam 38cbff4156 Fix cmake for 2.4 once again 2015-07-13 19:25:37 -04:00
Adam a86162f287 Fix incorrect iteration when destructing modelockimpls 2015-07-13 18:02:44 -04:00
Adam ceddb8370c Unset extensibles on larger objects when they destruct
Some complex extensibles require the full object to still be alive in
their destructors to keep proper bookkeeping
2015-07-13 17:59:14 -04:00
Thomas Fargeix 040b06ad56 Fix db_flatfile to read "nobackupokay" 2015-07-11 10:27:27 +02:00
Peter Powell 1666b1a8d8 Fix a ton of typos. 2015-07-08 11:06:02 +01:00
Adam 4362f53cc3 Fix unused variable warning in cs_clone 2015-07-01 20:16:59 -04:00
Dominic Hargreaves cc616a7146 Allow PROGRAM_NAME to be set during configuration 2015-07-01 20:10:15 -04:00
Dominic Hargreaves 0f01c04b02 Allow disabling installation of extra tools (with DISABLE_TOOLS) 2015-07-01 20:09:46 -04:00
Dominic Hargreaves 4cbdf9a73b Support DESTDIR
If DESTDIR is set it should be prepended to CMAKE_INSTALL_PREFIX. See
<http://www.cmake.org/cmake/help/v3.2/variable/CMAKE_INSTALL_PREFIX.html>
2015-07-01 20:08:51 -04:00
Adam fce257dc43 Merge pull request #121 from SaberUK/2.0+cmake-improvements
Various improvements to the build system.
2015-07-01 20:00:59 -04:00
Adam ad7601b0cc Merge pull request #119 from Jyzee/irc2sql-away
irc2sql: handle away messages.
2015-07-01 19:51:29 -04:00
Adam 5be9de5d12 Merge pull request #123 from Alef-Burzmali/2.0+cs-levels
Allow opers with chanserv/access/list to view the levels list
2015-07-01 19:50:26 -04:00
Adam 02ed9a9725 #1649 don't update keepmodes during inhbait 2015-06-29 19:35:57 -04:00
Adam 074f163750 #1643 Umode +I is oper only on Unreal 2015-06-29 13:57:32 -04:00
Adam de023bab0a Don't allow registering service nicks 2015-06-29 13:47:50 -04:00
Adam 510a746f8d Add ns_identify:maxlogins to limit the max number of concurrent logins per account 2015-06-29 09:37:09 -04:00
Adam 8eb46772e6 Don't allow loading hostserv mods if there can be no hostserv 2015-06-29 08:58:31 -04:00
Adam d563aa0da8 Check name validity after unpackname() to check for bad names in questins and ptr/cname rdata 2015-06-29 08:48:08 -04:00
Adam 3e3312db25 Don't allow adding or changing bots to collide with users 2015-06-29 08:42:29 -04:00
Adam bb5c4906cc Also clear vhost on hs_off so the proto mods don't have to 2015-06-21 10:42:49 -04:00
Adam 444976e64f Update host on hs off too
Protocol modules which don't trigger this by causing a mode change
currently desync
2015-06-20 17:33:13 -04:00
Thomas Fargeix 57b614ae59 Allow opers with chanserv/access/list to view the levels list 2015-06-14 19:33:45 +02:00
Peter Powell 2f9eabdb72 Remove support for run-cc.
This tool is not useful anymore. It just slows the build down.
2015-05-17 21:27:09 +01:00
Jyzee a458f7c840 irc2sql: handle away messages. 2015-04-30 19:29:44 +02:00
Adam 65bf84cfb5 When introducing opered clients on inspircd send a fake opertype 2015-04-28 15:23:31 -04:00
Adam 5efaa5b206 Merge pull request #117 from aFreshMelon/fix-xmlrpc-php
Fix xmlrpc php
2015-04-04 09:50:57 -04:00
Sebastian 41f4c7dab6 A variety of small improvements to xmlrpc.php
Pretty simple stuff.

* Better method names
* Better DocBlocks
* Lowercase variables
2015-04-04 09:43:51 +02:00
Peter Powell 0f1936f63d Fix matching the Apple Clang variant on CMake 3.0+ 2015-04-04 03:28:46 +01:00
Peter Powell 5baa6247a9 Don't overwrite CMAKE_INSTALL_PREFIX if it has already been set. 2015-04-02 01:43:05 +01:00
Peter Powell 82f5d1d61d Remove an old Autotools limitation.
This is not needed anymore as support for Autotools was removed.
2015-04-02 01:38:31 +01:00
Sebastian dd8dd3b4a0 Make xmlrpc.php comply with PSR-2 coding standard 2015-04-01 23:28:41 +02:00
Sebastian a718223585 Remove workaround that is no longer needed
This workaround was required previously but breaks the code with the corrections to the XML-RPC response.
2015-04-01 23:27:44 +02:00
Robby- abc4851287 Update the dutch language file. 2015-03-23 02:39:18 +01:00
Adam 3d1255dbe9 Anope 2.0.3-git 2015-03-22 21:22:49 -04:00
Adam a762391446 Anope 2.0.2 Release 2015-03-22 15:34:50 -04:00
Adam c070a00114 Fix m_ldap_oper to build 2015-03-22 15:34:49 -04:00
Adam e7c3090a70 Fix new version stuff with empty version extra 2015-03-22 14:38:29 -04:00
Adam 5dd6326eff Merge pull request #115 from aFreshMelon/aFreshMelon-patch-1
XML-RPC responses also don't have a methodName tag
2015-03-22 13:56:07 -04:00
Adam 535ad6fd70 Merge pull request #112 from attilamolnar/2.0+inspircdmlock
InspIRCd 2.0: Ensure ircd-side mlock and topic lock state is always what we think it should be
2015-03-22 13:56:01 -04:00
Robby- 5df4ac9a98 Make the signed kick/ban message format configurable. 2015-03-22 13:44:08 -04:00
Adam 4c54a3939f Change git version name back to what it was, which the core uses 2015-03-22 10:26:53 -04:00
Adam 3d09748d1c Fix typo in Changes 2015-03-22 10:26:26 -04:00
Sebastian Barfurth 36a4be7623 XML-RPC responses also don't have a methodName tag
Following http://xmlrpc.scripting.com/spec.html
2015-03-18 19:06:08 +01:00
Adam 5fc72660e4 Merge pull request #113 from attilamolnar/2.0+openssl
m_ssl_openssl: SSL context option changes
2015-03-12 17:53:52 -04:00
Adam 303e652a35 Only apply keepmodes on channel sync
Not sure why this was this way originally, it interfears with the
chanserv +r check to determine how new the channel is because it
restores +r. This seems to still work okay, though.
2015-03-12 17:52:38 -04:00
Adam e5447a8024 Update Changes.conf and Changes 2015-03-12 17:52:38 -04:00
Attila Molnar 1bee18fcf4 m_ssl_openssl: Allow disabling SSLv3 via the config 2015-03-12 19:35:07 +01:00
Attila Molnar a57e41304f m_ssl_openssl: Set sane default context options 2015-03-12 19:35:07 +01:00
Adam e0e8147ee0 Merge pull request #114 from anope/revert-99-extemp_protected
Revert "Added kickcheck override for users with protected privs"
2015-03-12 13:30:12 -04:00
Adam 41a24afa4f Revert "Added kickcheck override for users with protected privs" 2015-03-12 13:29:50 -04:00
Adam 4266d17e8c Update cmake version parsing code to deal with recent build version changes
Update Config.cs to no longer hardcode VS generators, it seems no longer necessary.
Fix new version system, cannot return C++ types from extern C functions
2015-03-12 11:20:18 -04:00
Adam 8d3fa47ab2 Merge pull request #99 from H7-25/extemp_protected
Added kickcheck override for users with protected privs
2015-03-12 08:15:59 -04:00
Adam 64781817ac Merge pull request #105 from miwob/master+use-uid-for-svsnick
- Change SendForceNickChange() to use UIDs
2015-03-12 08:15:49 -04:00
Adam 69c18f131f Merge pull request #106 from miwob/master+SendClientIntroduction
- Update SendClientIntroduction() to use * for account names instead of ...
2015-03-12 08:15:44 -04:00
Adam e030771cbc Merge pull request #107 from miwob/master+misc-hybrid-changes
- Misc updates to the hybrid protocol modules:
2015-03-12 08:15:38 -04:00
Adam 03f05d3948 Merge pull request #111 from aFreshMelon/fix-xmlrpc-response
Correct wrong XML response tag
2015-03-12 08:15:31 -04:00
Adam 32c4908c8c Document that m_ldap_authentication:disable_register_reason blocks grouping 2015-03-12 08:01:27 -04:00
Adam c5ff7c6868 Show passlen in PASSWORD_TOO_LONG 2015-03-12 08:00:12 -04:00
Attila Molnar 89257d9bce InspIRCd 2.0: Re-set server-side topiclock when an incoming METADATA topiclock from a bursting server changes it 2015-03-11 23:46:00 +01:00
Attila Molnar e47aacad0e InspIRCd 2.0: Re-set server-side mlock when an incoming METADATA mlock from a bursting server changes it 2015-03-11 23:46:00 +01:00
Attila Molnar 72ade225a7 InspIRCd 2.0: Pass use_server_side_topiclock and use_server_side_mlock references to METADATA handler 2015-03-11 23:46:00 +01:00
Attila Molnar a52af0d260 InspIRCd 2.0: Add METADATA handler, pass everything to inspircd12/metadata 2015-03-11 23:46:00 +01:00
Adam 92920f5a1c Only matches sqlines against channels if they begin with a # 2015-03-11 14:49:03 -04:00
Peter Tseng bf727285bc SendConfirmMail: Replace %E with new email
The old mailer message said the user is changing email "to %e", which is
changing TO the OLD email. But instead, the user is actually changing
the email to the new email.

We could change %e to be the new email, but maybe some users of Anope
have already configured their messages to assume %e is the old email. So
instead, add a new %E that is replaced with the new email.
2015-03-11 14:44:38 -04:00
Adam 310e95a92e Allow cs clone to clone levels too 2015-03-11 14:36:56 -04:00
Adam 78bff86dab Make cs_clone behave closer to how the help describes it 2015-03-11 14:24:42 -04:00
Adam 3f093d708f Normalize masks given to cs_kick, use entry to match them against users 2015-03-11 12:13:08 -04:00
Adam c3cc5804c3 Normalize masks given to cs_ban, use entry to match them against users 2015-03-11 11:26:12 -04:00
Adam dc58239c8a Remove cloak prior to applying vhost in insp20 fhost handler 2015-03-11 10:48:25 -04:00
Adam b67963353f Hide set desc because set description exists 2015-03-11 09:30:02 -04:00
Adam a899c04ec2 Strip color codes when looking up fantasy commands. 2015-03-11 09:16:32 -04:00
Adam fb17bc85ea Redesign m_ldap to no longer rely on undefined behavior
Accessing the same LDAP* from multiple threads at once is always
undefined, even if one thread is just polling ldap_result.

Instead keep one thread per connection and issue blocking queries on the
thread.
2015-03-11 08:48:08 -04:00
Sebastian Barfurth 474cd7a99b Correct wrong XML response tag 2015-03-07 19:05:41 +01:00
Adam 7de4b86b7f Move GIT_VERSION define to build.h, otherwise version.h is bumped per commit which forces a rebuild 2015-02-23 20:43:22 -05:00
miwob 76337bc04a - Misc updates to the hybrid protocol modules:
- best supported version is 8.2.x
  - fixed UID message handler to cope with account names being '*'
  - minium required TS version is TS6 now
2015-02-15 21:47:55 +01:00
miwob abe232601b - Update SendClientIntroduction() to use * for account names instead of 0 2015-02-15 21:33:22 +01:00
miwob 6ada3ec871 - Change SendForceNickChange() to use UIDs 2015-02-15 21:27:01 +01:00
H7-25 61a8dd57f7 Added kickcheck override for users with protected privs 2015-02-11 08:11:25 +01:00
Adam 94427b234c Merge pull request #102 from miwob/master+protocol-missing-modes
- Added some missing user modes to the ircd-hybrid protocol module
2015-02-10 19:18:46 -05:00
Adam fb3c819bee Merge pull request #103 from miwob/master+hybrid-misc-changes
Misc changes to the ircd-hybrid protocol module:
2015-02-10 19:18:40 -05:00
Adam f0c23e80a2 Merge pull request #104 from miwob/master+anope.de_DE.po-minor-update
- Minor update to anope.de_DE.po; removed double space + proper translat...
2015-02-10 19:18:30 -05:00
miwob 1e86c46000 - Minor update to anope.de_DE.po; removed double space + proper translation 2015-02-10 22:48:22 +01:00
miwob 2f49065500 Misc changes to the ircd-hybrid protocol module:
- Increase MaxModes to 6
  - SendLogout(): send "+d *" instead of "+d 0"
  - Update copyright year
  - Removed user mode +z from supported modes
2015-02-08 12:29:16 +01:00
miwob 41ae2dbefb - Added some missing user modes to the ircd-hybrid protocol module 2015-02-07 19:08:55 +01:00
Adam f44280a9c9 Merge pull request #101 from miwob/master+hybrid-protocol-no-globops-override
- Removed SendGlobopsInternal() override as it's basically a duplicate o...
2015-02-06 17:21:33 -05:00
Adam d147db9023 Merge pull request #100 from miwob/master+hybrid-protocol-cmode-ctcp
- Update ircd-hybrid protocol module to support channel mode 'C' (no CTC...
2015-02-06 17:21:30 -05:00
miwob f484a68dee - Removed SendGlobopsInternal() override as it's basically a duplicate of SendGlobopsInternal() in protocol.c 2015-02-06 20:28:30 +01:00
miwob 8550e22167 - Update ircd-hybrid protocol module to support channel mode 'C' (no CTCPs) 2015-02-06 19:39:31 +01:00
Adam 9834518b28 Fix os_mode to handle channels going away due to mode changes, and maybe cs_mode 2015-02-05 20:16:43 -05:00
Adam 64ca357b13 Make module version system work 2015-02-03 19:38:23 -05:00
Adam dc5039e994 Properly unescape xmlrpc 2015-02-03 18:42:35 -05:00
Adam 845ca576b4 More properly track topic change sources and allow users with access to change topics through topiclock 2015-01-28 22:57:15 -05:00
Adam 2264a206d2 Check virtual mode bases better 2015-01-26 15:10:18 -05:00
Adam d324e91520 Fix negatively locking param modes in default mlock 2015-01-26 13:16:25 -05:00
Adam 9ac1b4ba01 Merge pull request #98 from flotwig/patch-1
cs_entrymsg to use SET permission, not isFounder
2015-01-11 19:38:35 -05:00
Zach Bloomquist 7e0cb6d8ef cs_entrymsg to use SET permission, not isFounder
Correcting syntax error

(i don't actually know c++)
2015-01-11 19:29:33 -05:00
Adam 3055b7272b Fix m_xmlrpc server configuration option 2015-01-10 15:37:49 -05:00
Adam 969cd5dd6c Always use source name when logging server kicks 2015-01-10 15:29:19 -05:00
Adam 1f02278a1c Log user away messages 2015-01-10 15:24:48 -05:00
Adam 32007f81cf Add networkinfo:nick_chars option to allow configuring additional characters allowed in nicknames 2015-01-10 15:19:40 -05:00
Adam 609f87d39f Include botserv/* in default Services Administrator opertype to behave like 1.8 2015-01-10 15:19:40 -05:00
Adam e88925e587 Merge pull request #94 from webczat/2.0
Fix issue 1627.
2014-12-28 20:30:36 -05:00
Adam c46ec39e50 Only disable CMP0026 if it exists 2014-12-28 20:01:11 -05:00
Adam 9b2202dfee Merge pull request #93 from alexbarton/ngircd-fix-servertoken
ngIRCd protocol module: fix servertoken
2014-12-28 18:12:38 -05:00
Adam 03f6e26550 Merge pull request #95 from webczat/2.0x
fix chanserv.cpp using Get for bool extensible items
2014-12-28 18:11:37 -05:00
Adam c554e85063 Merge pull request #96 from webczat/termfork
Anope will now fork even when not started from a tty, like init scripts.
2014-12-28 18:10:40 -05:00
Adam 2892c9580f Replace spaces in opertypes with underscores in stats o 2014-12-28 18:09:37 -05:00
Adam 3c0994a89e Fix crash when non-users register channels 2014-12-28 18:08:58 -05:00
Adam e800afcfac Fix adding regmoderated mode twice in plexus 2014-12-28 18:08:39 -05:00
Adam 2ad697898f Disable CMP0026 warnings on cmake 3 2014-12-19 18:55:50 -05:00
Michał Zegan e4068249dd Anope will now fork even when not started from a tty, like init scrpits.
It is useful for init systems or startup scripts, because it allows easily waiting until services connect to the uplink, without them forking it wouldn't be possible to tell if they finished initialization or not unless they would communicate directly with init systems like systemd.
2014-12-12 19:53:30 +01:00
Michał Zegan d45cb5451e Fix issue 1627.
It required that the FHost message was rewritten for the insp20 protocol module instead of relying on inspircd12's version.
The insp20 version internally removes +x mode on host change.
2014-12-12 03:56:38 +01:00
Michał Zegan d9c9f2a407 Changed calls to Get() for bool extensible items to HasExt in the chanserv module, remove duplication of code. 2014-12-12 03:48:00 +01:00
Adam 7213413f8b Remove os exception move 2014-12-11 19:33:06 -05:00
Adam 516211c88a Add SAVE support to inspircd20 2014-12-07 19:32:21 -05:00
Robby- d576137f28 Update the dutch language file. 2014-12-07 17:42:00 +01:00
Adam e1f5e030bc Change webpanel access add to just add via the commands, split Command::Run into two so I can do this as I need to run named commands for it 2014-12-05 20:24:27 -05:00
Adam afffeb0a1d Update Kill() calls to pass source pointer instead of name 2014-12-05 17:27:08 -05:00
Adam 4fc71bb22f Link m_ldap against ldap_r not ldap 2014-12-02 15:49:14 -05:00
Alexander Barton d4732faf41 Correctly assign nicks to their respective host servers
Use the "server token" parameter of NICK commands to find the host server and
correctly assign the nick name to this server.

This allows Anope to correctly free all nick names again when (remote) servers
leave the network, which fixes arbitrary "KILL attacks" when such nick names
reconnect later on.

Initial debugging and patch by DukePyrolator, thanks a lot!
2014-11-30 21:50:11 +01:00
Alexander Barton 95684187b6 Fix server token assignment of servers in the network
1. the directly linked server, our upstream, always has token "1", and
2. for remote servers in the network, the token and description filds
   were interchanged during registration,

therefore up to now no server could be found by Server::Find() using its
assigned server token.
2014-11-30 21:49:34 +01:00
Adam 4f33b17f96 Move automatically identified for log message to users 2014-11-25 09:00:15 -05:00
Adam 0cdab86978 Set require_oper in /os oper 2014-11-24 22:10:12 -05:00
Adam 4f76bee273 Fix sid generator generating invalid sids after sid 999 2014-11-24 22:00:30 -05:00
Adam 8557a4161a Allow 0 ttb in flood kicker 2014-11-15 08:50:37 -05:00
Adam c9008cdafa Fix access dup check to account for accounts 2014-11-15 02:13:10 -05:00
Adam 8a7793da0c Fix bahamut mode handler 2014-11-08 04:31:56 -05:00
Adam 64b332730e Fix not removing zones from server->zones 2014-11-08 04:30:27 -05:00
Adam 36837330ae Fix typo in botserv.example.conf 2014-11-06 05:40:51 -05:00
Adam 8b64e46ef1 Show access denied if /os kick can't kick the target 2014-11-04 23:54:16 -05:00
Adam c4460784c2 Allow mlock to be enforced when unsetting defcon modes 2014-11-04 01:36:27 -05:00
Adam 408ec02406 Move chan register event prior to applying final mode changes, so cs_mode can set mlock on register. #1620 2014-11-04 00:09:00 -05:00
Adam 67fc8c3416 enc_bcrypt is no longer extra because it doesn't depend on external dependencies anymore 2014-11-03 23:50:40 -05:00
Adam fb2fd9e9d3 Fix log message when enabling botserv kickers 2014-11-03 23:45:22 -05:00
Adam 527e04275f Merge pull request #91 from Alef-Burzmali/2.0+fix-addakiller
Keep the akiller's name when updating the reason.
2014-11-03 23:43:50 -05:00
Adam c895bd2e59 Merge pull request #92 from Alef-Burzmali/2.0+update-fr
Update the French translation
2014-11-03 23:37:08 -05:00
Thomas Fargeix 94b2d1ac12 Update French language file. 2014-10-29 00:08:21 +01:00
Thomas Fargeix a76e074f6d Update the French install instructions. 2014-10-28 22:59:26 +01:00
Thomas Fargeix 2f004c2aab Keep the akiller's name when updating the reason.
The name of the oper issuing an akill or a sxline could be removed by updating the reason,
even though addkiller was enabled.
2014-10-24 23:49:02 +02:00
Adam b940077553 Validate credentials sent via sasl more 2014-10-16 21:38:46 -04:00
Adam c8ded08b43 Show extended strftime output for suspend info 2014-10-14 21:17:47 -04:00
Adam 62a01dcc87 Set access masks to the case of the nick they match, if any 2014-10-14 21:09:41 -04:00
Adam 0cd3bfa24f Fix module event prioritization which was broken with the newer
auto-attach event stuff.

Also remove logically dead code from os_defcon, and make os_defcon akill
similar masks to os_session when enforcing session akills.

Fixes #1618 which relies on os_session to be prioritized before
os_defcon.
2014-10-14 18:58:55 -04:00
Adam e46bcff324 Move nick register event to make it easier for modules to determine if a newly registered nick is confirmed or not. Add confirm event. 2014-10-12 19:25:39 -04:00
Adam 67719e8db1 Add exempts and optionally allow authenticated users past m_dnsbl 2014-10-12 15:03:51 -04:00
Adam 48be41cf7b Squit uplink when I receive an squit for myself 2014-10-12 14:34:15 -04:00
Adam 5ceee5df38 Hide dumb user notice if we are quitting 2014-10-12 14:32:17 -04:00
Thomas Fargeix 1c12976958 Add an operserv/oper/modify privilege.
The operserv/oper command privilege allows to add operators
with fewer or the same privileges as ourself.
This new privilege allows to have operators who can use operserv/oper
to see the list of operators and their privileges, but cannot add new
operators.
2014-10-12 10:54:11 -04:00
Thomas Fargeix 96583892c6 Add a chanserv/access/list privilege
Replace the existing chanserv/access/list command access,
only used in cs_xop, by a privilege with the same name.

It which allows read-only access to cs_access, cs_flags, cs_xop
and cs_akick, while the already-existing chanserv/access/modify
privilege allows to modify them.
2014-10-12 10:52:48 -04:00
Robby- 0991d4e199 operserv.example.conf: Add missing permission definition to os_defcon's command. Fixes bug #1617. 2014-10-09 23:35:38 +02:00
Adam 58233fb8bc Log when memos are sent 2014-10-06 14:06:36 -04:00
Adam be928b5bbc Clean up collide timers on identify, otherwise you can login and logout before the timer tick which will still enforce the collide 2014-10-06 14:06:36 -04:00
Adam 31bc1d6b82 Don't add duplicate akills in os_session 2014-10-06 14:06:36 -04:00
Adam 829ef1b7bd Clear pending collided state on release, fixes colliding users using recover into enforcers 2014-10-06 14:06:36 -04:00
Adam b068874f40 Add a confirmation reply to ns recover on an unidentified user with svsnick 2014-10-06 14:06:36 -04:00
Adam 18b3c572f4 ngircd doesn't allow sourceless messages 2014-10-06 14:06:36 -04:00
Adam af034928cb Remove auto cmake downloader Config stuff, which randomally doesn't work on some systems for no reason 2014-10-06 14:06:36 -04:00
Adam 8d40a750cc Update INSTALL to reflect cmake requirement 2014-10-06 14:06:36 -04:00
DukePyrolator 6a3f7c01b1 changed the engine of the chanstats table from InnoDB back to MyISAM to avoid increasing the auto_increment counter on each INSERT IGNORE. For existing tables please manually run 'ALTER TABLE anope_chanstats ENGINE=MyISAM'. 2014-09-14 11:36:05 +02:00
DukePyrolator 4c2bf72cb6 fixed typo in the last commit 2014-09-14 11:12:54 +02:00
DukePyrolator 8e7b742ec7 added missing support for operonly and silentoperonly in os_defcon 2014-09-14 11:11:22 +02:00
DukePyrolator 19b47c7bae fixed a possible crashbug in the german language file 2014-09-13 13:06:56 +02:00
Adam 3bdc81348a Fix unserializing badwords to not add dupes when unserializing an existing bw object 2014-09-01 13:11:21 -04:00
Adam bf8f62c32d Change Channel::GetModeList to return a copy of the mode list, not a
pair of lower/upper bound iterators.

Sometimes when iterating the list, like in cs_mode, we can modify the
contents of it, which combined with mlock always agressively trying to
readd modes to it can do bad things.
2014-08-24 16:39:04 -04:00
Robby- d417241a5b cs_set: Fix logging for SET SUCCESSOR to correctly log overrides. 2014-08-11 20:16:42 +02:00
Adam e5cb2018e5 List opertypes in /os oper info 2014-08-03 19:15:08 -04:00
Adam df6095fed2 Make botserv fantasy override its own privilege 2014-08-03 19:10:15 -04:00
Adam 8210e82a5e Fix some botserv help entries from showing when they shouldn't 2014-08-03 19:08:12 -04:00
Adam d6d72cd803 Add cs_mode:max config option 2014-08-03 18:57:00 -04:00
Adam 063d9bf5f6 Allow "modify" in flags to be optional 2014-08-03 18:33:56 -04:00
Adam 830e8617e6 Allow "set" in topic set to be optional 2014-08-03 18:28:54 -04:00
Adam cf89e10a4c Add ms_ignore:max config option 2014-08-03 18:22:03 -04:00
Adam 6842ad36f7 Do not allow unconfirmed users to send memos or request vhosts 2014-08-03 18:05:41 -04:00
Adam 24f17de4aa Fix stats u on Windows 2014-08-03 18:03:07 -04:00
Adam bbb04d4662 Fuzzy italian signkick help 2014-08-01 16:12:41 -04:00
Robby- 20052247c3 Regenerate anope.en_US.po 2014-07-27 08:05:54 +02:00
Robby- 8b61a529a2 Update the dutch language file. 2014-07-27 07:48:50 +02:00
Robby- 1137c50095 Fix a few help messages. 2014-07-27 07:34:02 +02:00
Adam 52d422d020 Merge pull request #81 from miwob/master+invite_ts
hybrid.cpp: add our own SendInvite() which sends the channel's timestamp...
2014-07-26 13:41:47 -04:00
Adam 43c460e593 Merge pull request #85 from attilamolnar/2.0+help
Correct the help text of options:useprivmsg ("defmsg" -> "msg")
2014-07-26 13:40:58 -04:00
Adam 17ba13bc95 Use ts version of services stamp when the account is unconfirmed on Unreal as 3.2.10.4 has changed thie behavior 2014-07-26 13:28:43 -04:00
Adam 60229b15d2 When object unserialization fails (due to not having dependency objects) bump the ts to try again later. 2014-07-26 13:24:52 -04:00
Adam 3c88f3b8cf Check modetimes in CheckModes before enabling bouncy modes 2014-07-15 17:02:14 -04:00
Adam 93cb5d06db Fix channelcount with clone 2014-07-11 01:02:02 -04:00
Adam 7a64d95f7c Fix Log() calls in m_ldap_oper 2014-07-11 00:22:32 -04:00
Attila Molnar ff66e15f38 Correct the help text of options:useprivmsg ("defmsg" -> "msg") 2014-07-04 04:39:12 +02:00
Adam 07902c03fd Check that the list of items isn't NULL when destructing types 2014-06-28 23:15:59 -04:00
Adam d9949320c7 Don't try to setuid down until after we signal the parent to exit, unless we're not forking. Also don't issue the run as root warning if we're going to setuid later. 2014-06-28 23:15:59 -04:00
Robby- b0ec178e85 Merge pull request #84 from Zantox/2.0
Minor cs_unban Lang Update @Robby-
Updated HostServ Command English Language
Updated ChanServ Command English Language
Updated BotServ Command English Language
2014-06-26 22:17:51 +02:00
Zantox f753a925ad Minor cs_unban Lang Update @Robby- 2014-06-26 22:14:10 +02:00
Zantox 74dbfe0699 Updated HostServ Command English Language 2014-06-25 02:16:09 -04:00
Zantox 3bea089793 Updated ChanServ Command English Language 2014-06-25 02:09:43 -04:00
Adam ff93355af8 Hold a reference to the type in Serialize::Checker in the event it goes away, and invalidate the type pointer of objects when the type goes away 2014-06-23 15:44:06 -04:00
Zantox 8fecad3039 Updated BotServ Command English Language 2014-06-23 07:47:26 -04:00
miwob 37bd2c238e hybrid.cpp: add our own SendInvite() which sends the channel's timestamp along the INVITE command. INVITE with channel TS will be mandatory in some future release of ircd-hybrid 2014-06-19 16:27:05 +02:00
Adam 9a947fa435 Correct some language strings 2014-06-17 08:37:19 -04:00
Adam 4f7868b125 Log more when unable to backup databases in db_flatfile 2014-06-15 04:50:26 -04:00
Adam 8066378471 Fix WindowsGetLanguage() 2014-06-10 22:00:26 -04:00
Adam ab27b792b0 Track SVSKILL on unreal 2014-06-09 17:18:21 -04:00
Adam f1c3bdd55e Correct wording of log message when ldap services are created 2014-06-09 17:16:55 -04:00
Adam 08edb15bea Fix help log output example 2014-06-09 16:44:15 -04:00
Adam 56c6ef4449 Fix information leak in cs_updown 2014-06-09 16:36:49 -04:00
Adam 6526d2d8b3 Fix Windows release build with gettext 2014-06-01 13:53:32 -04:00
Adam 76ab5c2c38 Update WIN32.txt reflecting new Windows stuff 2014-05-31 23:54:50 -04:00
Adam 54e98f017c Always log when the uplink socket errors, and give possibly helpful advise 2014-05-31 21:17:46 -04:00
Adam bb7706d0f7 Anope 2.0.2-git 2014-05-31 19:09:23 -04:00
Adam 16e0b72d2d Update FindGettext.cmake for new Windows stuff and fix language.cpp
compile
2014-05-31 18:30:50 -04:00
Adam b578e32531 Anope 2.0.1 Release 2014-05-30 20:57:32 -04:00
Adam 4d8e3b847d Fix f627a3bacd, really make BotInfo::Part fire events like the normal user part message does 2014-05-30 20:57:23 -04:00
Adam eaade23f9b Update language files 2014-05-30 18:14:55 -04:00
Adam f20bac996d Fix Windows build and update library names to the newer ones.
Also fix crash on Windows when unloading a module because it threw an
exception.
2014-05-30 18:14:55 -04:00
Adam 93bfd4cbe1 Updates Changes and Changes.conf 2014-05-30 16:16:54 -04:00
Adam 6620f9e9bd Don't allow setting -y on inspircd, secureops etc will try to enforce this 2014-05-30 15:16:03 -04:00
Adam dc64cfc940 Remove version.log 2014-05-30 15:16:03 -04:00
Adam f8829783d2 Queue the grouped nicks to update when NickCore::SetDisplay is called, since they serialize the display field 2014-05-30 15:16:03 -04:00
Adam d6e600f74b Fix access check in ns_group 2014-05-30 15:16:03 -04:00
Adam 5f7113bc0e Merge pull request #80 from attilamolnar/2.0+exampleconf
Fix the name of the SSL modules in comments in modules.conf.example
2014-05-30 15:15:43 -04:00
Robby- dc4daa25a7 example.chk: Use a more reliable way to detect if services are running. 2014-05-30 18:27:15 +02:00
Robby- 0cadaedfbe Update the dutch language file. 2014-05-30 18:24:42 +02:00
Attila Molnar 11ad788dfd Fix the name of the SSL modules in comments in modules.conf.example 2014-05-30 18:12:26 +02:00
Adam 38a60d9142 Merge pull request #78 from H7-25/it_IT
Updated italian lnguage file
2014-05-28 13:48:19 -04:00
Adam e8ad509aa5 Fix dlerror() on Windows and do not abort if err is not set 2014-05-27 12:55:03 -04:00
Adam 37b3ed8ef3 Do not normalize extban masks 2014-05-27 12:55:03 -04:00
Adam a6af422184 Set timer owner for nickserv timers 2014-05-27 12:55:03 -04:00
Adam 53acb73193 Fix default db name in db_flatfifle in a couple places 2014-05-27 12:55:03 -04:00
H7-25 57f6d4f49c Updated italian language 2014-05-22 21:24:38 +02:00
Adam d0467adea2 Merge pull request #79 from Jyzee/langFR-Patch
Make command group descriptions translatable.
2014-05-22 13:21:46 -04:00
Jyzee 16924f68c0 Update french language file. 2014-05-22 19:05:25 +02:00
Jyzee d280c48e6b Regenerate french language file. 2014-05-22 19:04:26 +02:00
Jyzee f0c0daa644 Make command group descriptions translatable. 2014-05-22 19:00:56 +02:00
Adam 7a2d027e1d Fix deflanguage from 4034b3054a, this shouldn't have been removed 2014-05-21 10:47:50 -04:00
Adam f627a3bacd Core prep for p10 stuff 2014-05-21 08:50:40 -04:00
Adam 5a1257b7f0 Fix extra space in log messages with logtype channel and no source 2014-05-21 08:40:54 -04:00
Adam 866f3f32ab Speed up akill xline checks
Cache xline nick, user, host, etc instead of rebuilding it everytime its
requested. Store users ip in sockaddr form and not string form to
prevent having to rebuild sockaddrs when checking xlines.

Also do not try to convert empty config values in Config::Get as this
can be rather common if a non string configuration value is not set, and
the cost of the ConvertException is great.
2014-05-20 21:16:00 -04:00
Adam 20ce170024 Show account names in log messages 2014-05-20 12:19:26 -04:00
Adam 4034b3054a Add English language file which users can edit to modify language strings 2014-05-20 11:41:05 -04:00
Adam e581158645 Fix two compile warnings in access.cpp on newer compiles 2014-05-20 10:00:34 -04:00
Adam 01021131ca Also search channel descriptions and topics in /cs list 2014-05-20 09:52:26 -04:00
Adam 13ea98a02e Fix server usercounter not being incremented when servers are bursting 2014-05-19 22:46:28 -04:00
Adam db56a61f86 Fixup previous commit when serializing access entries 2014-05-19 22:45:45 -04:00
Adam df321a118e Fix access lists showing the wrong mask if the display nick for a group
expires but the group still exists. This can cause access entries for
nicks to not be deleted whenever the nicks are deleted.
2014-05-14 19:10:23 -04:00
Adam 1931fcf0e5 Fix webpanel mode list to only show real list modes 2014-05-13 22:59:41 -04:00
Adam 63b02b8c97 Sanitize nuh masks more to prevent the other side from rewriting them, which screws with our internal tracking of them 2014-05-13 22:57:53 -04:00
Adam 1c8a77ab9f Accept an optional reason for svspart 2014-05-13 19:52:05 -04:00
Adam 0c7d53f81e Don't show both online from's if they have the same mask in ns_info 2014-05-13 18:38:14 -04:00
Adam bcc3ae5742 Merge pull request #76 from miwob/master
Update ircd-hybrid protocol module
2014-05-13 17:50:07 -04:00
Adam 4e67e0897a Merge pull request #77 from Cronus89/patch-2
Update Paramater length for os_dns to fix DNS SET
2014-05-13 17:47:33 -04:00
Michael Wobst 76a9538441 Fix compile warning in base64.cpp:B64Encode
/home/ircd/anope/src/base64.cpp: In function ‘void Anope::B64Encode(const Anope::string&, Anope::string&)’:
/home/ircd/anope/src/base64.cpp:85: warning: ‘input’ is used uninitialized in this function
2014-05-13 18:28:53 +02:00
Cronus89 91c7862579 Update Paramater length for os_dns to fix DNS SET 2014-05-13 11:12:00 -05:00
Michael Wobst 6b6bc81999 Update ircd-hybrid protocol module 2014-05-13 18:00:10 +02:00
Adam 1f2c385bb9 Add config options to ns_suspend and cs_suspend to configure which information is shown to non opers 2014-05-01 21:03:32 -04:00
Adam d79dd0b7d7 Pass password to nick register event so modules like m_ldap_authentication can create the respective account using the decrypted password which might not always be available 2014-05-01 18:38:17 -04:00
Adam 8b2e8137f6 Merge pull request #75 from attilamolnar/2.0+inspircd-globops
InspIRCd 2.0: Recognize GLOBOPS in CAPAB CAPABILITIES
2014-05-01 18:19:23 -04:00
Adam 732466d8f4 Merge pull request #74 from attilamolnar/2.0+fix-os-stats
Fix undefined symbol error when loading os_stats, caused by 82008d50
2014-05-01 18:19:01 -04:00
Attila Molnar 3049916ade Fix undefined symbol error when loading os_stats, caused by 82008d507c 2014-04-30 01:15:10 +02:00
Attila Molnar 0afd666f22 InspIRCd 2.0: Recognize GLOBOPS in CAPAB CAPABILITIES 2014-04-29 22:55:10 +02:00
Adam 8021a53ac4 Fix misc help output to not be case sensitive 2014-04-26 18:30:54 -04:00
Adam 0663f5e412 Fire the on user quit event when bots are deleted too 2014-04-26 17:45:16 -04:00
Adam 2ee496b8ac Change the "does not expire" string in ns_group to NO_EXPIRE which is translatable 2014-04-26 17:30:58 -04:00
Adam 3abb18721b Accept non server sources for SQUIT 2014-04-26 17:21:33 -04:00
Adam 4eb0a3bdb7 Fix ModeManager::RebuildStatusModes, not all modes are in GetChannelModes() at the time this is called 2014-04-26 15:24:19 -04:00
Adam 6a03eb69eb Add "virtual mode" support
This allows fully tracking extbans and other modes set by a different
underlying mode, such as InspIRCd's namedmodes

Add two configuration options to cs_ban to configure which mode is set
and whether or not to kick banned users.

Add default "mute" fantasy command to botserv.example.conf
2014-04-25 16:51:06 -04:00
Adam 4fa2a00bd5 Close timed out proxyscan sockets better 2014-04-25 16:47:10 -04:00
Adam 82008d507c Fix Stas::Unserialize to return the instance 2014-04-25 16:46:37 -04:00
Adam 2ab4f175a8 Don't allow users to join channels they are already in 2014-04-25 16:20:23 -04:00
Adam c9473bcc67 Fix botserv/kick/bolds desc 2014-04-24 17:10:06 -04:00
Adam 75ed5a9b59 Fix os_stats counters not saving with db_sql_live. Bleh. 2014-04-24 01:50:50 -04:00
Adam f010ab7dbf Resend ircd login name on /ns set display 2014-04-24 01:40:56 -04:00
Adam 00b2cc9ce6 Require at least user@host format for akills. Fix XLine::GetHost() not returning anything if an xline only has a host 2014-04-24 01:38:45 -04:00
Adam d52cc7bcbc Bug #1587 - fix bot change not properly reintroducing clients 2014-04-24 01:25:25 -04:00
Adam 63838fa77d Merge pull request #72 from attilamolnar/2.0+svsnickfix
Fix SVSNICK target being a nick even when UIDs are available
2014-04-20 02:03:03 -04:00
Attila Molnar e36f8143e3 Fix SVSNICK target being a nick even when UIDs are available 2014-04-19 14:35:50 +02:00
Adam 72b26043b2 Remove unused event.
Mark some oper only usermodes as oper only.
Fix reading SID in TS6_SID_Retrieve
2014-04-18 02:21:06 -04:00
Adam f369157906 Use OnChanRegistered instead of OnCreateChan to set default mlocks.
Because OnCreateChan is called from ChannelInfo's constructor, during
DB loading it could cause mode locks to be unserialized without having
all channels loaded, which breaks things.
2014-04-17 16:58:04 -04:00
Adam ba46b8e4ab Merge pull request #70 from Jyzee/langFR-Patch
Update French language file.
2014-04-09 02:26:24 -04:00
Jyzee 254901aace Update French language file. 2014-04-09 07:49:14 +02:00
Adam c1c45a5db9 Do not clear all extension items tied to objects when unserializing.
Instead, pass the old object to the unserialization functions and let
them incrementally update the object.
2014-04-07 15:28:07 -04:00
Adam a65e95837f Document that memo_mail can be in nickserv defaults. These should move to memoserv.conf one day. 2014-04-06 23:13:46 -04:00
Adam 43219d3906 Do not apply module changes on rehash until after the new config has been applied. Fix renaming opertypes on reload. 2014-04-06 23:01:10 -04:00
Adam 1f8dec4c24 Fix /os mode to not require a mode when setting param modes which taken no argument when setting 2014-04-06 18:09:36 -04:00
Adam fb5c5e3442 Set minus no arg on +l in all proto mods
Set oper modes/vhost on oper too, evan after iding
Add umode +q to plexus
2014-04-02 22:37:35 -04:00
Adam e357c39774 Add travis config 2014-04-01 23:34:02 -04:00
Adam 10732baec2 Fix compile error in cs_set_misc with C++11 enabled 2014-03-31 22:41:02 -04:00
Zantox 068c6989de Small Grammar Fix 2014-03-31 20:19:03 -04:00
Adam 317d55f3f1 Fix ns_set password to read the correct parameter.
Even though 1 is past the "end" of the vector, because vectors never
shrink and due to how the command parser works, it is always less than
the capacity, and almost always contains what is in params[0] (though
this is of course implementation dependant), which is why this was not
identified sooner, as it executes cleanly under valgrind on every machine I can find.
2014-03-31 20:11:36 -04:00
Adam 1397fda786 Bump to Anope 2.0.1-git 2014-03-31 20:10:51 -04:00
Adam 4ccc478830 Anope 2.0.0 Release 2014-03-23 08:58:02 -04:00
Adam 100ecbb9be Update version.log 2014-03-23 08:57:19 -04:00
Adam cdf636e696 Regen langauge files 2014-03-23 08:57:08 -04:00
Robby- 45878bf182 SASL: Also disallow suspended nicks to login using EXTERNAL mechanism. Improve the log message for failed logins. 2014-03-22 21:14:02 +01:00
Adam f1bec3999d Do not allow SASL login to suspended nicks 2014-03-22 07:21:22 -04:00
Adam a259244297 Make bouncymodes harder to trigger by only bumping server modcount when something changes 2014-03-20 10:53:27 -04:00
Adam c1da009de3 Show a better log message when disconnecting from the uplink 2014-03-19 02:40:48 -04:00
Robby- 4f412bc213 cs_set_misc: Add missing override capability for services operators, and logging. 2014-03-19 03:05:54 +01:00
Robby- 1882916dc4 Update the dutch language file. 2014-03-17 01:15:28 +01:00
Robby- f436ce9912 m_ssl_gnutls: Fix deprecation warnings when using newer GnuTLS versions. 2014-03-17 00:58:51 +01:00
Adam ef9729fb02 Mark all channels as syncing when we connect to our uplink. They will
finish syncing later when the uplink syncs. Normally the channel state
is fully synced here anyway, except if we do not know the modes the
uplink has yet.

Also fix a related issue with resetting chanels and bouncing modes on
our clients, if this is done prior to knowing which modes exist it would
silently fail.
2014-03-14 22:13:04 -04:00
Adam 296a75f2a9 Do not allow users to add certs that other users are using. Only allow adding certfps if the user is using it. 2014-03-13 20:07:50 -04:00
Adam bce7237d9f Set LDAP_OPT_NETWORK_TIMEOUT to 0 in m_ldap to prevent the asynchronous
library cals from blocking...

Fix multiple possible null pointer derefs if modules pass null
interfaces (none currently do, but it is allowed)

Fix memory leak from results when services are destructed

Timeout queries that never come back.
2014-03-11 09:45:34 -04:00
Robby- 85834e19dc Update the dutch language file.
ns_maxemail: Bold code 2 -> 002.
2014-03-10 22:30:41 +01:00
Adam ca6b3723a9 Merge pull request #64 from ShutterQuick/2.0+hsgroupsync
2.0+hsgroupsync
2014-03-10 07:32:24 -04:00
Adam 23b1086072 Merge pull request #63 from alexbarton/ngircd-fix-KILL
ngircd protocol module: really kill users
2014-03-10 07:31:34 -04:00
Adam 860deb14ce Do not send unregistered notice to users who are logged in, even if their nick isn't registered 2014-03-10 07:26:09 -04:00
Adam 62885fa462 Set nickserv's modesonid on login too 2014-03-10 05:04:25 -04:00
Adam 3fef01e35b Fix compile error in m_sasl_dh-aes and m_sasl_dh-blowfish on unusually old g++ versions 2014-03-10 04:56:17 -04:00
Adam b0597e35ec Do not allow nickserv/ungroup to bypass ns_maxemail, and allow opers to bypass ns_maxemail 2014-03-10 04:31:08 -04:00
Adam 8d1ad6fbe5 Make nickserv/glist show the correct expire time for unconfirmed nicks 2014-03-09 22:59:16 -04:00
Adam 750569201a Add missing space to session exception expiration message 2014-03-09 22:56:25 -04:00
Adam 1a1a781b72 Remove mail:restrict as it is no longer useful. Changes nickserv/resetpass default to allow normal users to use it. 2014-03-09 10:07:13 -04:00
DukePyrolator 4b5ce8a972 irc2sql: removed the currentusers field from the chan table, keeping it updated on each join/part eats too many ressources 2014-03-09 04:55:35 +01:00
Daniel Vassdal 98cfdd26c4 ns_group: Don't require a nick param when logged in 2014-03-06 04:55:30 -08:00
Daniel Vassdal 051a42b547 hs_group: Allow automatic HS GROUP-ing on NS GROUP, and allow vhosts to be per account rather than nick. 2014-03-06 04:55:30 -08:00
Adam 220e278213 Open database files using std::ios_base::binary in db_flatfile, which Windows can require 2014-03-05 20:23:44 -05:00
Alexander Barton 547fe0da1a ngircd protocol module: really kill users
ngIRCd doesn't send a QUIT for each user KILL'ed, so kill them immediately.
2014-03-05 10:26:54 +01:00
Adam 09bec79b47 Fix 2 crashes from removing the permanent channel mode from channels which do not exist 2014-03-04 04:15:32 -05:00
Adam 55a5affcb8 Do not allow guest nicks to exceed nicklen, and use a default enforcer ident/host if none is provided 2014-03-04 04:15:32 -05:00
Robby- a8b4297023 Update the dutch language file. 2014-03-03 19:20:56 +01:00
Adam 5969362425 When unserializing channels with persist, set their ts=now. If we are supposed to lower it later we will then. 2014-03-01 22:41:45 -05:00
Adam 3ceae33b16 Convert limit and key mlocks in db_old 2014-03-01 21:56:26 -05:00
Adam 5de4c1fc97 Set +x on plexus when vhosts are activated, fix desync from /hs off 2014-03-01 21:40:47 -05:00
Adam fd109048dd Make db_old load entrymsg 2014-03-01 21:20:32 -05:00
Adam a0747516ce Export interface for cs_entrymsg 2014-03-01 21:20:18 -05:00
Adam 605e1f2a03 Make chanserv/invite show who invited you 2014-03-01 21:12:27 -05:00
Adam dc23c58869 Fix botserv help to show the correct fantasy characters 2014-03-01 21:11:58 -05:00
Adam b7e646ec83 Allow opers with chanserv/administration to use fantasy, even if they don't have the access for it 2014-03-01 20:02:17 -05:00
Adam 4d54358745 When unserializating channels and persist is set, only assign chanserv if the perm channel mode doesnt exist 2014-03-01 19:59:40 -05:00
Adam ed0882ec04 Do not enforce mlock when enforcing mlock 2014-03-01 18:39:10 -05:00
Adam 526c4e4659 Check modes after applying mlocks in db_old 2014-03-01 18:38:14 -05:00
Adam b70f72bf2b Do not allow changing the email of unconfirmed accounts 2014-03-01 04:31:52 -05:00
Adam 2ad4c1906e Fix incorrect comment in modules.example.conf 2014-03-01 04:27:45 -05:00
Adam 049760cc7e Allow svsjoin/svspart on yourself 2014-02-28 00:30:35 -05:00
Adam e2ecec31b5 Hybrid does not let us add resvs as a server, but the core expects to be able to qline bot nicks before introducing the bots as a way to prevent collisions, so try harder to find a valid bot to send resvs on startup 2014-02-27 23:21:50 -05:00
Adam fee016bb84 Handle nick collisions somewhat instead of blindly overwriting the nicks
in memory, which does weird things.

For fun different ircds implement this differently (Unreal compares
timestamps, TS6 compares timestamps and user username/host), and whether
or not we get a kill for our user also varies, so just kill everyone.

This can't really happen anyway with properly set qlines, only if
services haven't yet set the qlines, or possibly in a bot add/nick
user introduce race, or with enforcers, which not many ircds require.
2014-02-27 22:42:54 -05:00
Adam d24fb03917 Allow registration=mail forceemail=false to work, and simply give fully registered accounts to people who do not provide an email to nickserv/register 2014-02-27 04:49:28 -05:00
Adam 5adc8bfefc Do not take modes from users in channels with secureops off if we are always lowering channels timestamps to their creations 2014-02-27 04:48:48 -05:00
Adam abcf0cde5a Remove unreachable code in config.cpp, this error is caught earlier 2014-02-26 19:32:25 -05:00
Adam 8f3bd314ed Fix not detecting eols in the config reader when the end of the line is the end of a multiline comment 2014-02-26 19:26:50 -05:00
Adam e2d456d4ce Do not setuid/gid down until after modules are loaded 2014-02-26 19:24:32 -05:00
Adam 96202ae545 Log successful SASL auths 2014-02-24 22:23:12 -05:00
H7-25 2b0229d4e2 Update the italian language file 2014-02-25 03:22:55 +01:00
Adam beaa3196b3 Update Spanish translation, from Isaac Fontal <i_fontal@hotmail.com> 2014-02-24 16:14:40 -05:00
Adam b6d771a114 Anope 2.0.0-rc4 Release 2014-02-24 00:31:07 -05:00
Adam d3ed756bd0 Update version.log (why do we keep this around?) 2014-02-24 00:30:57 -05:00
Adam f8308841a6 Package dlls in src/win32 on Windows 2014-02-24 00:30:47 -05:00
Adam 1dfdf36fc3 Fix m_ssl_gnutls to send its cert. Most of this is from Attila. 2014-02-24 00:06:38 -05:00
Adam 4ac3ade126 Use a more reliable way to detect if services are running in anoperc 2014-02-23 23:08:35 -05:00
Robby- 212abeb986 webcpanel: Update copyright year.
ns_cert: Bold code 2 -> 002.
2014-02-23 23:42:43 +01:00
Robby- 7d4427c313 Regenerated language files. 2014-02-23 05:24:06 +01:00
Adam e836be489e Store a cert->account map and use it for SASL EXTERNAL and certfp auth 2014-02-22 17:46:00 -05:00
Adam 1db5c555d6 Merge pull request #58 from attilamolnar/2.0+gnutlsdep
[WIP] Make m_ssl_gnutls work with at least GnuTLS v2.8
2014-02-22 13:46:36 -05:00
Attila Molnar bb1b015103 Make m_ssl_gnutls work with at least GnuTLS v2.8 2014-02-22 16:59:10 +01:00
Robby- e42684ac39 Update italian translation, from Simos. 2014-02-22 16:40:56 +01:00
H7-25 d7de7eee60 Italian language completed translation, first release 2014-02-22 15:58:36 +01:00
Robby- 0a390ad392 Regenerated language files, and updated dutch language file. 2014-02-22 15:56:34 +01:00
Adam aa6b12c5eb Fix Windows build 2014-02-21 21:54:01 -05:00
Adam e2bd08fbff Add some missing serial updates in os_dns 2014-02-21 20:50:23 -05:00
Adam 2047934060 Regenerate Italian language file 2014-02-21 19:57:31 -05:00
Adam e07dcbff08 Update italian translation, from Simos 2014-02-21 19:57:31 -05:00
Adam e3a8a45a61 Merge pull request #56 from ShutterQuick/2.0+noxcrypt
enc_bcrypt.cpp: Get rid of the libxcrypt dependency by including code fr...
2014-02-21 19:49:29 -05:00
Lee Holmes f1ad7fd582 fix comment, activate not active 2014-02-21 20:41:41 +00:00
lethality 43f2645b32 update help info 2014-02-20 20:07:38 +00:00
Daniel Vassdal b6935e706c enc_bcrypt.cpp: Get rid of the libxcrypt dependency by including code from libxcrypt, and move enc_bcrypt out of extras 2014-02-20 11:42:20 -08:00
lethality a3c845894d Updated services crontab location 2014-02-20 17:11:11 +00:00
lethality 5933a5e9b1 Merge remote branch 'upstream/2.0' into 2.0 2014-02-18 22:24:24 +00:00
Adam 109d8f431f Do not import forbids with wildcards in their names, how 1.8 treats wildcaded forbids depends on the IRCd 2014-02-18 13:04:16 -05:00
Adam 1edb7e776b Merge pull request #54 from attilamolnar/2.0+webcpanelfix
Don't create zero length DataBlocks in BinarySocket::Write()
2014-02-18 12:59:37 -05:00
Adam 928e2e1b7c Fix loading noexpire channels in db_old 2014-02-18 12:57:31 -05:00
Adam 5a140e4898 Merge pull request #55 from attilamolnar/2.0+alphabet
Alphabetically order modules in modules.example.conf
2014-02-18 12:54:22 -05:00
Attila Molnar f64393941e Alphabetically order modules in modules.example.conf ('r' < 's' and 'w' < 'x') 2014-02-18 13:00:46 +01:00
Adam 0db81ca46a Merge pull request #52 from attilamolnar/2.0+gnutls
Add support for SSL connections powered by GnuTLS
2014-02-17 22:21:08 -05:00
Adam 7f7144de1f Merge pull request #53 from attilamolnar/2.0+reuseaddrfix
Fix setsockopt() with SO_REUSEADDR not working due to wrong argument type
2014-02-17 22:20:38 -05:00
Attila Molnar 3883716883 Turn BinarySocket::Write() into a no-op when called with l == 0 2014-02-18 03:28:02 +01:00
Attila Molnar 5beea4eb7e Fix TemplateFileServer writing empty messages resulting in zero length DataBlocks being created and later passed to SocketIO::Send()
Found while testing m_ssl_gnutls, fix suggested by @Adam-
2014-02-18 03:27:12 +01:00
Attila Molnar 2d0fdb74d1 Fix setsockopt() with SO_REUSEADDR not working due to wrong argument type 2014-02-18 02:31:01 +01:00
Adam 80588fba81 Fix os_ignore to work correctly with SQL 2014-02-17 19:43:19 -05:00
Adam ef7dc94f88 Move most of the implementation details out of os_forbid.h, fixes crashing if a module adding a forbid is unloaded without removing the forbid 2014-02-17 19:39:25 -05:00
Adam 7b4eec9748 Remove docs/IRCD, it is very outdated and no longer correct at all 2014-02-17 13:53:45 -05:00
Adam baff417652 Move encryption.h to include/modules 2014-02-17 13:53:04 -05:00
Adam 7074944810 Fix not applying ipv[46]_cidr to connecting clients in os_session, #1573 2014-02-17 13:39:49 -05:00
Attila Molnar 1c39d25cca Add m_ssl_gnutls 2014-02-17 01:12:01 +01:00
lethality f1c5c27f3f Merge branch '2.0', remote branch 'upstream/2.0' into 2.0 2014-02-16 23:49:57 +00:00
Attila Molnar 9c0134ee2c Rename m_ssl to m_ssl_openssl and update docs 2014-02-17 00:41:36 +01:00
Adam 959fee5937 Fix Windows build 2014-02-16 18:28:39 -05:00
Adam 3854a5570f Merge pull request #51 from ShutterQuick/2.0+oldforbid
db_old.cpp: Correctly import forbidden nicks and chans
2014-02-16 16:07:36 -05:00
Daniel Vassdal ab1e0ebfb3 db_old.cpp: Correctly import forbidden nicks and chans 2014-02-16 12:56:27 -08:00
Adam cffe864900 Merge pull request #50 from ShutterQuick/bcrypt
Add enc_bcrypt
2014-02-16 14:10:25 -05:00
Daniel Vassdal bc1575318b modules.example.conf: Update examples for bcrypt - also clearify that m_sasl_dh* requires openssl 2014-02-16 11:07:37 -08:00
Daniel Vassdal a71d0f6757 enc_bcrypt: Add module 2014-02-16 11:07:36 -08:00
Adam 50d7bf710e Merge pull request #48 from ShutterQuick/2.0+nnghsasl
Add SASL mechanisms DH-AES and DH-BLOWFISH
2014-02-14 19:15:43 -05:00
Daniel Vassdal d44bcef31b modules.example.conf: Add info about m_sasl_dh-aes and m_sasl_dh-blowfish 2014-02-14 16:06:24 -08:00
Daniel Vassdal c0ce71e55a m_sasl_dh-blowfish: Add module 2014-02-14 15:12:25 -08:00
Daniel Vassdal 0eeb0caf08 m_sasl_dh-aes: Add module 2014-02-14 15:12:25 -08:00
Daniel Vassdal b13bded620 sasl.h, m_sasl.cpp: Move IdentifyRequest to the header 2014-02-14 15:03:42 -08:00
Daniel Vassdal 1b1180fda6 base64.cpp: B64Decode(): Don't crash on "=" 2014-02-14 13:42:21 -08:00
Daniel Vassdal a4ecfa5bc0 Anope::string: Add .data() 2014-02-14 13:05:01 -08:00
Daniel Vassdal 3c8009b495 sasl.h, m_sasl.cpp: Add RemoveSession(), DeleteSessions(), and have active sessions closed when a Mechanism is unloaded 2014-02-14 13:05:01 -08:00
Adam ca85df2d74 Don't convert XOP access entries to levels in db_old 2014-02-14 11:10:20 -05:00
Adam 5dfa6598c2 Do not sync channels in Channel::Reset if they are in the middle of syncing, and checkmodes in Channel::Sync. Fixes channel modes sometimes not being set if always_lower_ts is on 2014-02-14 11:09:53 -05:00
Adam f428d61045 Use better command access checking in webpanel for operserv/akill 2014-02-13 19:42:02 -05:00
Adam fc50edf046 Disable m_sasl by default 2014-02-12 14:49:22 -05:00
Adam 269c2786e9 Add SASL EXTERNAL support. Thanks to ShutterQuick for fixing and testing. 2014-02-12 14:39:41 -05:00
Adam 96fc940af7 Only trim newlines and carriage returns in BufferedSocket::GetLine 2014-02-11 19:25:44 -05:00
Adam 8c8e6d464a Make initial registration notices with mail less repetitive 2014-02-11 18:08:09 -05:00
Adam 22976b8a7c Fix flags +* or -* sometimes incorrectly reporting opers as overriding when they are not 2014-02-11 17:33:28 -05:00
Robby- 4dff710361 ns_suspend: Show the setter of the suspension and the reason when manually unsuspending. 2014-02-11 03:57:15 +01:00
Robby- fe80d2cded os_modinfo: Add ability to list only extra modules. 2014-02-11 02:26:00 +01:00
Adam 16dac87841 Regenerate anope.it_IT.po 2014-02-10 10:03:38 -05:00
H7-25 30c59562e0 Update Italian language translation 2014-02-10 09:57:24 -05:00
Adam 6d61a84286 Add an opertype priv "protected" to not allow services to kick a user.
Also classify ulines as protected
2014-02-09 18:51:52 -05:00
Adam f6b8596c7b Log memoserv/sendall 2014-02-09 10:59:36 -05:00
Adam da6760f606 Properly convert suspended nicks and channels in db_old 2014-02-07 13:28:07 -05:00
Adam ad962ad759 Allow other modules to suspend nicknames and channels without having to subclass suspendinfo 2014-02-07 13:12:57 -05:00
Adam 5327becf41 Allow other modules to be able to view and modify cs and ns set_misc data 2014-02-07 13:02:20 -05:00
Adam f43c99c5cc Merge pull request #46 from ShutterQuick/patch-1
Update cs_updown.cpp
2014-02-07 12:12:52 -05:00
ShutterQuick c0a491cb06 Update cs_updown.cpp
cs_updown: Make CS DOWN remove all modes, not just one
2014-02-07 18:04:16 +01:00
Adam 66cc965fd7 Ignore nonblocking errnors on socket operations 2014-02-05 15:26:03 -05:00
Adam 2440514a7b Document a little more accurrately the privilege stuff and document why the access lists behave as they do 2014-02-05 08:46:56 -05:00
Adam fad1da81a3 Process mode changes in ns_ajoin before joining users, fixes not being able to ajoin users to +R channels on Unreal 2014-02-05 08:46:56 -05:00
Adam bb0e2a9a07 Make it easier to use fantasy without botserv, and document it 2014-02-05 08:46:51 -05:00
Adam 4f8c4f8fef Actually just allow mode clear to take any mode name 2014-02-03 10:05:13 -05:00
Adam 25957111b2 Fix typo in mode clear, exempts -> excepts 2014-02-03 08:41:27 -05:00
Adam 9a8895359a Apply the last commit to cs_list 2014-02-02 03:21:02 -05:00
Adam 53f8db0198 Merge pull request #44 from ShutterQuick/2.0+listfix
ns_list: Fix typo (NS_SUSPENDED -> SUSPENDED)
2014-02-01 11:42:08 -08:00
Daniel Vassdal f94cb7fb11 ns_list: Fix typo (NS_SUSPENDED -> SUSPENDED) 2014-02-01 11:24:52 -08:00
Adam c30fb13a0c Merge pull request #43 from ShutterQuick/2.0+ajoinfix
2.0+ajoinfix
2014-02-01 11:12:39 -08:00
Daniel Vassdal 7926238fd2 Improve IsChannelValid() 2014-02-01 10:55:12 -08:00
Daniel Vassdal 211a944210 ns_ajoin: Treat ',' as a separator. 2014-02-01 10:35:10 -08:00
Daniel Vassdal cff61617e1 commasepstream: Add a allowempty param 2014-02-01 10:31:17 -08:00
Adam 4455d4346c Merge pull request #42 from ShutterQuick/2.0+saslfix
Have SASL login in on the account name instead of nick alias
2014-01-31 02:43:26 -08:00
Daniel Vassdal 405b41ec87 protocol/(inspircd12/unreal/charybdis): Have SASL login in on the account name instead of nick alias 2014-01-31 01:41:27 -08:00
Adam bacb276181 Use TBURST on hybrid to set topics 2014-01-28 14:45:21 -05:00
Adam 4c1f6b48d8 Merge pull request #40 from attilamolnar/2.0+csclonefix
Fix cs_clone allowing users to clone a channel to itself
2014-01-26 16:08:23 -08:00
Attila Molnar 53a78c2688 Fix cs_clone allowing users to clone a channel to itself 2014-01-26 20:06:36 +01:00
Robby- e61a283c02 Update language files. 2014-01-26 16:33:28 +01:00
Adam c3302194eb Anope 2.0.0-rc3 Release 2014-01-26 01:18:38 -05:00
Adam cd184596a2 Only have extras rerun config if it was successfully run before. Config can create the build directory even if cmake isn't found. 2014-01-26 01:17:58 -05:00
Adam f28b1142f5 Correct error message in gl_global to reference the right module 2014-01-26 01:15:19 -05:00
Adam 87230c17b7 Fix extra space in the unknown command error message 2014-01-26 01:14:58 -05:00
Adam a29b7897f0 Use the SQLine reason in the kick reason for sqlined channels 2014-01-26 01:14:28 -05:00
Adam e965bc3049 Revert "Rename db_old hash plain -> none which is what 1.8 calls it"
This reverts commit 9a9ca41750.
2014-01-26 01:03:43 -05:00
Adam 01780c9e7a Fix setname handler on unreal 2014-01-25 17:58:20 -05:00
Adam 4d3363f83f Anope 2.0.0-rc2 Release 2014-01-21 21:55:59 -05:00
Adam 75e27b6a47 Update version.log 2014-01-21 21:55:59 -05:00
Adam fbaca3f7a1 Update language files 2014-01-21 21:55:56 -05:00
Adam 81b01bb55b Fix missing colon in stats and top, fix smileys and actions count. Patch by bush. 2014-01-21 21:10:06 -05:00
Adam 1027ec667a Made the chanstats confs try and look similar to every other configuration file 2014-01-21 17:33:57 -05:00
Adam 4d9273efa4 Unbreak account stuff from commit ccae59430a. 2014-01-21 17:20:15 -05:00
Robby- 67c13b41ee Update and fix some more typos in the dutch language file. 2014-01-21 00:29:59 +01:00
Robby- 10386a39f0 Make the server connected (uplink) message more sane. 2014-01-21 00:28:40 +01:00
Adam dc19ea3993 Alias charybdis/uid -> ratbox/uid because grawity is weird 2014-01-20 02:19:06 -05:00
Adam 2261fa3fe7 Fix example config for bs_autoassign 2014-01-20 00:05:53 -05:00
Adam fab9f0fecc Change config readers bool logic to accept unrecognized values as yes 2014-01-19 19:03:19 -05:00
DukePyrolator df8d85d80a m_chanstats: fixed the config options NSDefChanstats and CSDefChanstats 2014-01-19 08:11:19 +01:00
DukePyrolator 4b192addd2 m_chanstats: do not count negative words if you have more smileys in a line than words 2014-01-17 06:49:49 +01:00
Adam d27594f8a6 Fix webcpanels chanserv/modes page 2014-01-15 16:59:32 -05:00
Adam 43aaaeab7e Mark m_sql_log, m_rewrite, and m_dnsbl as extra so they show up in modlist with no parameters, as they are "unusual" 2014-01-14 03:50:08 -05:00
Adam ccae59430a Call User::Login after sending the login event, in case a module wants to act on the fact that the ircd sees the user as logged in 2014-01-14 03:49:22 -05:00
Harakiri 974adb7ce1 Update French language file 2014-01-12 17:44:14 -05:00
Adam f3531e7564 Fix not initializing module in the main log constructor 2014-01-10 01:41:03 -05:00
Adam 15a27c69ba Move oper count and vhost stuff to set/remove mode internal 2014-01-09 17:01:18 -05:00
Adam 0b0db75ba5 Fix repeat kicker message to show the correct number of times a user can say the same thing before being kicked 2014-01-09 16:45:07 -05:00
Adam b90a9a339a Fix empty ttb in bs kick repeat on 2014-01-09 16:09:38 -05:00
Adam 64f9aed761 Hook to OnUserLogin instead of OnNickIdentify in ns_ajoin 2014-01-09 15:46:04 -05:00
Adam 56f2cbeb62 Remove help access levels from help output because it no longer exists 2014-01-09 15:44:58 -05:00
Adam 9a9ca41750 Rename db_old hash plain -> none which is what 1.8 calls it 2014-01-09 15:42:31 -05:00
Adam e19661e1de Make DNSBL log message use the module type and give it a category too 2014-01-09 15:41:49 -05:00
Adam 09879c5c15 Fix compile with -std=c++11 2014-01-06 13:59:14 -05:00
Adam 12f55e4711 Hide +s channels from /cs list output to non opers 2014-01-06 12:54:29 -05:00
Adam 43c56541d5 Add a small note about the extras script in docs/INSTALL 2014-01-06 00:19:19 -05:00
Adam d3078850d2 Merge pull request #39 from DanielOaks/cs-status-channelname
Add the channel name to reply of cs-status, useful for applications
2014-01-05 15:39:09 -08:00
Daniel Oaks d4f7db122d Add the channel name to reply of cs-status, useful for applications 2014-01-06 09:37:08 +10:00
Adam 201ad9c191 Always run uid/sid generation loop at least once to not reuse older ids immediately 2014-01-04 17:54:04 -05:00
Adam 45c0bf8f32 Fix recovering enforcers not properly quitting them 2014-01-04 17:45:58 -05:00
Adam d64855b35b Allow m_sql_authentication to disable email changing similar to m_ldap_authentication 2014-01-04 13:44:47 -05:00
Adam 4617fdbf3d Make /cs status use the chanserv/auspex privilege instead of chanserv/access/modify, as it only views channel access 2014-01-04 13:41:08 -05:00
Adam ac204745c8 Also make m_sql_authentication block nick grouping if it is disabling registration 2014-01-04 12:24:04 -05:00
Adam e1ce6174ce Move modules/stats under extras because it depends on m_mysql, update its config a bit to look similar to all of the other config files 2014-01-03 19:54:14 -05:00
Adam 2781b6946d Add an explicit privilege for os_config's modify 2014-01-02 11:44:18 -05:00
Adam 1e502c8450 Update os_config 2014-01-02 11:41:49 -05:00
Adam 004c4cbe5f Move modules out of extras that dont have external dependencies 2014-01-02 11:03:33 -05:00
Adam 072202c181 Have db_old load news.db too 2014-01-02 10:56:57 -05:00
Adam 595dad4ec1 Update copyright to 2014. This was done with:
find include/ src/ lang/ docs/ modules/ *.* Config -exec sed -i 's/-20.. Anope Team/-2014 Anope Team/i' {} \;
2014-01-01 20:48:38 -05:00
Adam a374e245fd Make inspircds module class names not conflict because it confuses OSX 2014-01-01 16:21:38 -05:00
Adam 6e6543d3ed I don't think this OnBotKick to hold channels is necessary anymore as Sync should cover everything now, and this causes weird things when the last user in a channel kicks themselves out using the bot. Also handle users rejoining a channel while its held better. 2013-12-31 16:12:21 -05:00
Adam 6124af68cc Show the command name and not service name in the access denied log messages 2013-12-31 15:31:56 -05:00
Adam f21b40bfb4 Set last_realname in m_ldap_authentication when new nicks are registered 2013-12-30 10:50:15 -05:00
Adam 567700b5a6 Also have m_ldap_authentication disable nick grouping if registration is disabled 2013-12-30 10:42:07 -05:00
Adam 3b80da9cbd Fix loading kicker ttb data 2013-12-30 10:34:57 -05:00
Robby- c519119197 Don't expire ignores when NoExpire is enabled. 2013-12-29 05:27:36 +01:00
Robby- 780bc7ca14 Do not translate command parameters that do not have translatable strings in them, or are not meant to be translated in the first place. 2013-12-28 23:28:30 +01:00
Adam 3d12752655 Fix naming collision between modes +g and +G on inspircd, rename the common badwords censor mode to censor 2013-12-28 09:39:16 -05:00
Adam 9c0ceed36a Readd channel description to ns alist output 2013-12-27 17:24:52 -05:00
Adam 187973c16a Allow inverting opertype privs and commands, to make them behave like the log settings 2013-12-27 17:20:47 -05:00
Adam 072631aa38 Fix forbid add message to show the correct type 2013-12-27 17:15:07 -05:00
Adam b638b653d2 Fix crash when channels are registered that do not exist by non users 2013-12-27 17:12:01 -05:00
Adam 0fb2b60cff Fix xmlrpc dochannel example 2013-12-26 21:06:26 -05:00
Adam 16f3f0cbc0 Don't leak ldap results 2013-12-26 21:06:07 -05:00
Adam b28db7bc55 Fix crash with badwords of type 'end' and possibly when messages contain only control codes. Also fix matching single words at the beginning of lines. 2013-12-26 17:33:06 -05:00
Adam 9bf9cfcf5e If using db_flatfile:fork, don't allow multiple saves to happen at one time on shutdown/restart wait for any pending saves to finish 2013-12-26 16:08:56 -05:00
Adam 0c9750a22b Default the founder privilege to level 10000 as I had originally intended. Document set fonder usage in cs_levels help. 2013-12-26 15:19:48 -05:00
DukePyrolator 69c5aeca57 updated the extras script to find the cmake binary installed by ./Config 2013-12-26 19:44:41 +01:00
DukePyrolator 59c3c1326b m_chanstats: 1) fixed the SASET message 2) decreased the size of some VARCHAR fields, this hopefully fixes the 'key too long' error on some systems. 2013-12-26 18:46:20 +01:00
Adam 5829d7da39 Add a config option for whether or not to reset the TS of persistent channels to their registration date 2013-12-26 12:06:39 -05:00
Adam 2f29c1388c Fix not setting the persist flag on newly registered channels when the permanent channel mode is set prior to registering or during registration 2013-12-26 11:39:35 -05:00
Adam fc0e8264c0 Fix dropping channels in the webpanel 2013-12-26 08:02:19 -05:00
Adam 19eccf0cae Fix setting english language in db_old, document how not setting defaultlanguage really works 2013-12-25 15:16:04 -05:00
Adam dbf5106c09 Fix sqline on hybrid 2013-12-25 14:29:41 -05:00
Adam 3029a2db1a Don't epxire forbids when noexpire mode is on 2013-12-24 20:58:06 -05:00
Adam 53df61b4c2 Make webcpanel's nickserv alist behave more like /ns alist 2013-12-24 20:48:09 -05:00
Adam 7d27689d05 Set a description for the resend command 2013-12-24 20:20:47 -05:00
Adam 421e194c5a If last usermask and last realhost are the same, don't show both because duh 2013-12-24 18:19:44 -05:00
Adam c442bc18af Do not allow /cs clone access to add duplicate masks to the access list or allow growing the list pass accessmax. Fix reading botservs case sensitive config option. Give a better error message when trying to clone badwords if there is no botserv. 2013-12-22 08:37:49 -05:00
Adam 1c02961b60 Anope 2.0.0-rc1 Release 2013-12-20 22:57:58 -05:00
Adam 268d529078 Update version.log 2013-12-20 22:57:56 -05:00
Adam 4bc4b98ac7 Regenerate language files 2013-12-20 22:56:38 -05:00
Adam e8b42607e6 Update Changes and Changes.conf 2013-12-20 22:56:34 -05:00
Adam e792865a04 Fix reading unconfirmed expire config value when register type is set to mail 2013-12-20 20:24:40 -05:00
Adam 2b5a1d8c8f Fix deleting multiple access entries when one of them matches your access group 2013-12-20 19:48:20 -05:00
Adam 7cf21342f4 Merge pull request #33 from Robby-/1.9-nllangupdate
Update the dutch language file for new and modified strings, and fix some more typos while we're at it.
2013-12-20 12:18:44 -08:00
Adam ba8a646a33 Add missing syntax to botserv kicker help 2013-12-20 14:57:06 -05:00
Robby- fa50252c77 Update the dutch language file for new and modified strings, and fix some more typos while we're at it. 2013-12-20 20:15:30 +01:00
Adam 46bb2de866 Document hs reject's reason 2013-12-20 02:28:35 -05:00
DukePyrolator c2e9b8080b Revert "m_chanstats: changed the default value of some fields to NULL instead of ''"
This reverts commit 6ff83c3407.
2013-12-20 07:34:49 +01:00
Adam c0cd76a0a5 Don't leak opers and opertypes on /os reload, fix not updating opertypes on non conf opers on rehash 2013-12-19 21:34:21 -05:00
Adam ab6cd3b26c Fix a few commands not being able to find non conf opers 2013-12-19 20:35:09 -05:00
Adam 275f2fd374 Fix db_old assigning empty greets to users who did not have a greet. Fix debug log message in extensible.cpp 2013-12-19 08:24:21 -05:00
Adam c4d4107412 Channel::Sync can delete the channel, so safely iterate them when syncing from a server burst 2013-12-19 07:32:46 -05:00
DukePyrolator ae5da11389 irc2sql: fixed not storing ssl information on inspircd 2013-12-19 07:16:17 +01:00
Adam e6544a06f4 Update last_modes when keepmodes is set on or off 2013-12-17 11:02:06 -05:00
Adam 1ab7d53649 Set pending mode changes immediately when an object is removed from the mode stacker. And fix mlock creator from cs set persist on. 2013-12-17 10:58:02 -05:00
Adam d709c819d2 Default build type to release 2013-12-16 12:50:49 -05:00
DukePyrolator 2ad4a8667f irc2sql: fixed small typo 2013-12-15 16:52:08 +01:00
DukePyrolator 6ff83c3407 m_chanstats: changed the default value of some fields to NULL instead of '' 2013-12-15 16:24:22 +01:00
DukePyrolator adbc5a0e65 irc2sql: improved handling of netsplits 2013-12-14 09:56:51 +01:00
Adam f9a4a0fbef Log all admin commands by default. I was trying to give an example of log settings, but people seem to leave the default and then get confused when it only logs operserv commands 2013-12-13 18:41:01 -05:00
Adam a282a5c9c4 Fix 96af354ad5 to not burst topics if they are not set 2013-12-10 20:17:29 -05:00
Adam 3ddfa2fc1d Explain how to setup the locales on Ubuntu 2013-12-10 20:15:34 -05:00
Adam 50f430fb23 Document which modules are extra and how to enable them 2013-12-09 21:18:01 -05:00
DukePyrolator 1b4d62e2bc irc2sql: fixed incorrect usercount for channels and servers after netsplit, fixed not displaying the channelmodes 2013-12-09 05:57:36 +01:00
Adam 43f608ff2b Merge pull request #32 from Harak/1.9
Updated french installation instructions.
2013-12-03 23:58:57 -08:00
Harak f0313a45cb Updated french installation instructions. 2013-12-03 22:09:06 +01:00
Adam 96af354ad5 Send channel topics on initial burst, sync chanels after db load, and try to after unserializing persist on 2013-12-02 02:01:39 -05:00
Adam b5966cf99e Fix crash from loading exceptions with db_old and then unloading db_old 2013-12-01 21:16:50 -05:00
Adam faab2c6793 Fix 5e4d52ad47 more 2013-12-01 18:58:20 -05:00
DukePyrolator c6f85b9312 made the chanstats fantasy modules work again. 2013-12-01 12:09:34 +01:00
Adam 5e4d52ad47 Fix 1542937d64 2013-12-01 05:00:28 -05:00
Adam 6628e714c7 Require email address to be passed to resetpass 2013-11-30 02:18:20 -05:00
Adam 0f9e931fa6 Revert "Fix session user logoff hook"
This reverts commit 3b8f1cd59f.
2013-11-24 22:00:01 -05:00
Adam 1f6385c095 Merge pull request #29 from Robby-/1.9-nllangupdate
Update the dutch language file for new and modified strings, and fix some typos while we're at it.
2013-11-24 14:11:52 -08:00
Robby- be044c9d6e Update the dutch language file for new and modified strings, and fix some typos while we're at it. 2013-11-24 22:04:27 +01:00
Adam 90aa576fb3 Fix/clean/clarify some stuff found by coverity scan 2013-11-23 22:12:33 -05:00
DukePyrolator 77e5744341 fixed webcpanel not html escaping displayed memos, bug reported by Mietzie 2013-11-22 01:22:24 +01:00
Adam e1264a5913 Re-find dependant protocol modules on unload, they can be reloaded from under us while we are running 2013-11-21 18:06:38 -05:00
Adam 18f423226c This actually can't happen, but this is what was meant 2013-11-21 17:38:54 -05:00
Adam c967a4ce88 Shrink nick and channel default flags in db_old, otherwise converted nicks/channels always end up with the defaults enabled, even if they explicitly have them set off. Fix setting nickserv defaults to none. 2013-11-21 17:31:18 -05:00
Adam 1542937d64 Hybrid has no quit on kill, so internally kill users when killed 2013-11-21 11:34:42 -05:00
Adam 3b8f1cd59f Fix session user logoff hook 2013-11-21 11:20:10 -05:00
Adam fbbdedf17e OnJoinChannel can modify the ts for a channel, so update keep_their_modes in the sjoin handler before processing a user. Otherwise we can desync and think users have a channel status when they really don't. 2013-11-20 18:10:26 -05:00
Adam b75faefea4 Don't claim to support SAVE on charybdis... 2013-11-19 10:06:22 -05:00
Adam 676db0ba6f Actually we can use this ssl ext type which apparently does exist 2013-11-18 18:36:37 -05:00
Adam b2802d0beb Give a reason why we cant clear nonssl users on ircds with no ssl usermode 2013-11-18 17:18:00 -05:00
Adam 826ae9b6c0 Make /ms check better able to tell if youve recently sent a memo to someone 2013-11-18 17:18:00 -05:00
Adam 2c3e8a76c9 Check override permission in cs_flags for modifying existing entries too 2013-11-18 17:18:00 -05:00
Adam 0bb23f3f4d Merge pull request #27 from Cronus89/patch-1
Update placeholder text for hostmask
2013-11-18 07:53:45 -08:00
Adam b36498149d Merge pull request #28 from Robby-/1.9+cslevels
cs_access: Fixed disabling channel levels. Also, correctly log /cs levels commands.
2013-11-18 07:53:36 -08:00
Adam f6cf978d0c Show the correct setting name in /ns help set message 2013-11-18 10:52:28 -05:00
Adam aeebaed4b2 Default adding to 1 in mlock add/del, always reply with something even if the input is invalid 2013-11-18 10:49:54 -05:00
Robby- faabff0261 cs_access: Fixed disabling channel levels. Also, correctly log /cs levels commands as an override or a normal command at the time it is executed, so, right before levels actually get modified. 2013-11-18 07:17:40 +01:00
Adam cba811bc6b Default nogroupchange to on, update comment to make sense 2013-11-17 23:35:57 -05:00
Cronus89 dcae3d7bda Fix placeholder for akill.html 2013-11-17 19:37:19 -06:00
Adam fc69b68891 Don't default /cs list or /ns list to require oper privs 2013-11-16 16:38:10 -05:00
Adam 15e527fa70 Add missing .founder checks to cs_flags 2013-11-16 15:14:15 -05:00
Adam 3ccf26fda4 Delete notify/client sockets when m_dns is unloaded 2013-11-16 14:55:03 -05:00
Adam c0b0ee1b39 Make /cs up set modes you have the priv for, but not the auto priv, because Robby says so 2013-11-16 13:33:20 -05:00
Adam b353e1db79 Also check command names in cs_log when seeing if a newly added entry already exists. Also force command names lowercase when looking them up. 2013-11-16 12:05:20 -05:00
Adam 3edce88698 Fix default level names for access change/list in db_old 2013-11-16 10:39:25 -05:00
Adam 9e1fb11f93 Tell people why they cant disable the founder level instead of claiming it doesn't exist 2013-11-16 10:22:18 -05:00
Adam 316c280a57 Add help for /cs set keepmodes 2013-11-16 10:20:35 -05:00
Adam cc2a999b4e Allow founders to change flags even if they don't have any matching access entries on the channel 2013-11-16 10:04:26 -05:00
Adam 51a9f64adb Use the source's sync state and not mine when processing sjoins to determine whether or not to sync the channel on creation, instead sync it when the server syncs. 2013-11-16 09:38:13 -05:00
Adam 332fd23927 Add general:hideregisteredcommands to hide commands that require you to be identified to use. This changes the behavior of hideprivilegedcommands to only hide commands users don't have the oper privileges to execute. 2013-11-15 15:10:23 -05:00
Adam 1aca2922af Allow mlocking +r on ratbox/whatever else 2013-11-15 14:24:33 -05:00
Adam b65fd34a39 Set the default db name to anope.db 2013-11-12 20:12:56 -05:00
Adam c9f4c2db1f try/catch cs_access AccessUnserialize just incase, don't crash if ns_ajoin is loaded before the protocol module 2013-11-12 19:19:21 -05:00
Adam d1248d1249 Merge pull request #25 from Robby-/1.9-nsidfaillogacctnames
ns_identify: When logging failures, also show the account name, and that it exists or not.
2013-11-09 05:40:58 -08:00
Adam afc5c91a09 Do not grant auto privileges to founders if they match other access
entries. This allows channel founders to disable auto +qo without
having to globally disable autoop or the levels.
2013-11-09 05:51:38 -05:00
Adam aa6c3f3474 Show (none) on flags list if a user is on the access list but has no flags 2013-11-09 05:47:14 -05:00
Adam 2a35151d12 Remove db_plain 2013-11-09 05:41:10 -05:00
Adam fa7cee9759 Don't allow users to remove non-flags access entries that are >= them with /cs flags, also spotted by TGS 2013-11-08 17:47:13 -05:00
Jens Voß 431b2e6768 Merge pull request #26 from Cronus89/patch-1
CREATE EVENT chanstats_event_cleanup_weekly failed due to calculating im...
2013-11-04 21:44:08 -08:00
Adam 853e926920 Merge pull request #23 from Phr33d0m/1.9
Some fixes here and there
2013-11-04 15:05:10 -08:00
Denis M. (Phr33d0m) 8267407a78 Add a couple of usability and aesthetic changes, fix the half-broken chanlist functionality, add a couple of missing ESCAPED_CHANNEL vars
Add missing ESCAPED_CHANNEL
Changed EMAIL_TYPE to FORCE_EMAIL. Now makes more sense
Make it more obvious when the 'email' field is optional
Add a 'Retry' button to go back to the registration page
Fixed broken chanlist functionality. Before even if the user clicked on the channels nothing happened, now it goes straight to the 'set' page (at least something happens)
Small fix, disable the 'Save' button if user has no SET powers
Add another missing ESCAPED_CHANNEL
Add a more clear definition of what hostmasks are allowed in that field, either user@host or nick\!user@host
Fix wrongly placed var
Changed some aesthetics
2013-11-04 23:59:55 +01:00
Cronus89 a831e5d306 CREATE EVENT chanstats_event_cleanup_weekly failed due to calculating improper start of week. 2013-11-03 21:41:01 -06:00
Robby- b901dfee84 ns_identify: When logging failures, also show the account name, and that it exists or not. 2013-11-04 02:59:16 +01:00
Adam 6e8d2bf09d Attempt #3 2013-11-01 05:19:48 -04:00
Adam 70e9b20274 Fix release build, not too sure why this is, compiler seems to infer this as a copy of ChanAccess 2013-11-01 05:12:30 -04:00
Adam 4ee9021adb Compare access entries created with the levels access system by access level and not by privilege set, as two entries can have the same privset but different levels, but still represent two different levels of access. This prevented users from adding other users at a lower access level when that level had the same privset as them. Spotted by TSG. 2013-11-01 04:58:38 -04:00
Adam c8db362bca Cleanup some access(group) comparison logic in access.cpp 2013-11-01 04:56:17 -04:00
Adam c710625cd3 Use Config::GetClient for looking up services for command{} blocks which lessens the insanity of renaming services 2013-11-01 02:07:35 -04:00
Adam ac2f8bf64d People often seem to get tripped up by this, so document more clearly 2013-11-01 02:04:21 -04:00
Adam 04e7fa493a Don't take modes in SetCorrectModes if the user has the ME privilege 2013-11-01 02:04:21 -04:00
Adam f7692ec77f Merge pull request #24 from Robby-/1.9+fixes
1.9+fixes
2013-10-28 01:37:47 -07:00
Robby- 4a1d32c5fd Fix logging when identifying with an SSL certificate fingerprint. 2013-10-28 09:30:56 +01:00
Robby- 498da95205 Stop requesting identification when changing nicks to a registered nick, and the current client certificate fingerprint matches one on the nickname's list. 2013-10-28 09:30:20 +01:00
Robby- 710d4848bd Fix kill and killquick default expiry times.
ns_access and ns_cert: Fix accessmax defaults, also state in the config that 0 is not a valid value.
2013-10-28 09:25:17 +01:00
Robby- bd3bed2118 Fix some typos and touch up the configs a little. 2013-10-28 09:13:53 +01:00
Adam fe31b0a666 Fix m_httpd not passing non post data to other modules correctly & close connections immediately when we are done flushing data 2013-10-27 20:33:37 -04:00
DukePyrolator 1f97d6d879 fixed a small error that causes irc2sql to not compile 2013-10-27 18:10:15 +01:00
DukePyrolator 4bd5649105 fixed make install not installing the new example config files 2013-10-27 04:53:57 +01:00
DukePyrolator b5af310f8a added the irc2sql gateway module 2013-10-26 18:42:58 +02:00
DukePyrolator 2cfc97053f moved some config options from example.conf to nickserv.example.conf 2013-10-26 18:33:07 +02:00
DukePyrolator 6cde65a57f new event OnSetDisplayedHost 2013-10-26 18:33:07 +02:00
Adam 7cb35eeedf Make nickserv's confirmemailchanges option work 2013-10-22 03:44:06 -04:00
Adam f0318fdbe8 Fix some typos of language 2013-10-19 03:43:04 -04:00
Adam 93a83da771 Fix os_dns not using remove_split_servers and fix remove_split_servers=true readd_connected_servers=false causing delinked servers to remaing in pooled+not active state 2013-10-19 03:42:12 -04:00
Adam 0ff1bb9d5b Bump for 1.9.10-git 2013-10-14 01:19:42 -04:00
Adam c0dea5ef30 Anope 1.9.9 Release 2013-10-12 15:28:49 -04:00
Adam fd4ac7f6fc Update version.log 2013-10-12 15:28:49 -04:00
Adam e635f547d6 Update language files 2013-10-12 15:28:48 -04:00
Adam 7167cff703 Update changes and changes.conf sort of 2013-10-12 15:05:42 -04:00
DukePyrolator b844154857 fixed a typo in the last commit, reported by Robby 2013-10-10 18:12:48 +02:00
DukePyrolator 5e56dfdb1a replaced the country name in the Language header in the language files by four letter codes 2013-10-10 07:51:35 +02:00
Adam e1d460e211 Call OnBotPrivmsg after checking if the message is a ctcp, not before. fix typo in opersrev.example.conf 2013-10-09 16:27:16 -04:00
DukePyrolator 9ea6fb25b9 set the Language header in the language files so msgfmt doesnt complain 2013-10-09 22:10:08 +02:00
DukePyrolator 7755668679 updated docs/EVENTS 2013-10-06 22:07:01 +02:00
Adam 569efbb66b Fix Windows build 2013-10-05 13:29:34 -04:00
Robby- 696801430b anope.nl_NL.po: Translate newly added string, and fix some spelling/grammar. 2013-10-05 13:22:56 -04:00
Adam 1b08ba8f41 Always show expire time for nicks in /ns info to opers, even if the user is online
Make Anope::strftime show "now" if the time is now
Fix typo in nickalias.cpp for the type of the last_seen field, spotted by grawity
2013-10-05 13:21:28 -04:00
Adam 277f735505 Hide expires in /cs info if the channel is actively in use as it confuses people 2013-10-05 01:07:51 -04:00
Robby- f63a2bdfb4 Big update of the Dutch language file.
cs_ban: Merge the syntaxes into one.
2013-10-05 00:49:12 -04:00
Robby- feb412bdb1 cs_mode: Fix override in /cs mode set. 2013-10-05 00:33:03 -04:00
Robby- ab856683c7 os_news: Add some logging. 2013-10-05 00:33:03 -04:00
Robby- 97d7c21193 Fix logging for log type 'other'.
os_ignore: Log expired ignores to the normal log level.
cs_drop: Allow Services Operators to actually drop channels in Read-Only mode.
os_akill, os_sxline, cs_akick: Log deletions by number.
2013-10-05 00:33:03 -04:00
Adam e5b8435769 Fix not setting -r when channels are deleted 2013-10-05 00:33:03 -04:00
Adam e589080827 Fix /ns alist showing a header/column header if the user has no access 2013-10-05 00:33:03 -04:00
Adam 257b10ee91 Hide privileged commands in ns help set and cs help set if configured 2013-10-05 00:33:03 -04:00
Adam 353ee5cc93 Fix xline uid generation when the one chosen already exists 2013-10-05 00:33:03 -04:00
Adam b094132c9d Log akill deleteions by number 2013-10-05 00:33:03 -04:00
Robby- 82006b868f cs_entrymsg: Check for the correct override privilege.
Make some more commands check if Read-Only mode is active.
cs_flags: Show a meaningful message when a user is not found on the access list.
os_set: Add missing capabilities to the readonly help output.
OperServ: Add logging to certain commands.
NickServ: Undo logging for listings.
2013-10-05 00:33:03 -04:00
Robby- ba5a3f5f00 Don't explicitly reference services nicks.
os_forbid: If NickServ is available, have it send the forbid reason instead of OperServ.
2013-10-05 00:33:02 -04:00
Adam 7b6c08b53a Exempt ulines/myself from bounce mode check 2013-09-29 17:22:25 -04:00
Robby- 47b692f9ae os_session: Add some empty lines to the session help command to improve readability. 2013-09-29 15:42:22 -04:00
Robby- ed06609ae1 NickServ: Change a few log wordings and add missing log calls to some commands.
ns_suspend and cs_suspend: Fix log wording, and correct syntax to show the reason is optional.
2013-09-29 15:42:22 -04:00
Robby- 32a57150ec ns_access: Allow LIST by Services Operators on suspended nicks. Change wording.
ns_ajoin: Fix the number of command parameters. Check for nick suspension. Do not allow just any Services Operator to access other users' AJOIN, require nickserv/ajoin. Change wording.
ns_cert: Add ability for Services Operators to modify other users' certificate lists.
2013-09-29 15:42:22 -04:00
Robby- 2a5e8f1890 cs_akick: Make the default autokick reason translatable.
os_forbid: It is required to specify a reason.
2013-09-29 15:42:22 -04:00
Robby- a04c320b4b cs_set: Fix showing expiry time in INFO output.
cs_sync: Check for the correct override privilege.
2013-09-29 15:42:22 -04:00
Robby- 4221a507cc Fix NickServ default nick expiry time. 2013-09-29 15:42:22 -04:00
Adam 44dd8d07d9 Add chanserv:always_lower_ts config option to always lower registered
channels timestamps to the creation time which fixes some race
conditions regarding users joining empty registered channels and doing
things prior to the -o from services coming through.

Without always_lower_ts attempt to bounce mode changes from bad users,
which will work okay in most cases.
2013-09-29 15:41:32 -04:00
Adam f7aa69b596 Correct expiretmeout and updatetimeout descriptions in example.conf, it is no longer triggerd by /os update 2013-09-29 13:04:12 -04:00
DukePyrolator d5ecc39104 display modechars instead of modenames in cpanel channelmodes 2013-09-29 04:23:33 +02:00
Adam 84a02d2709 Remove "Nick" reference from the /os ignore del message, as it can only contain hostmasks 2013-09-27 20:11:51 -04:00
Adam 4b059beb24 Replace this silly random code generation code with something more sane looking 2013-09-27 20:07:07 -04:00
Adam b319fb089c Fix compile warnings and errors found by clang 2013-09-27 19:11:02 -04:00
Adam 17196887ad Allow modifying mlock on nonexistant (but registered) channels 2013-09-27 19:11:02 -04:00
Adam 02d67f682a Allow /os forbid list <type> 2013-09-27 19:11:02 -04:00
Adam b306108740 Fix /os ignore del on nicks 2013-09-27 19:11:02 -04:00
Robby- 12a0311aaa Add missing columns to os_forbid. Make most lists with dates use the shorter output format. 2013-09-27 19:11:02 -04:00
Adam cf653fc084 Fix ms del all not actually deleting some memos
Fix numbering of memos in ms list
2013-09-27 19:11:02 -04:00
Adam 5cc7fc0387 Fix ms list crash 2013-09-27 19:11:02 -04:00
Robby- 832bc35135 Fix a few more modules to look in the right places for certain settings. 2013-09-27 19:11:02 -04:00
Robby- 06c5914820 Fix akillids to work again. os_session: Add missing num to del syntax and add missing expiry column. 2013-09-27 19:11:02 -04:00
Robby- bf67b9ee5c Make column titles in listings translatable.
Make some more strings translatable, and remove some that don't need translation at all.

Make expirytimes and units translatable.

Make predefined messages in listings also translatable.

Make the remaining command descriptions translatable.

Make some ns/cs info strings equal to dedupe in translation file. Add missing no-autoop setting to cs info output. Make some strings translatable.
2013-09-27 19:11:02 -04:00
Adam 829c169063 Translate strftime correctly 2013-09-27 19:11:02 -04:00
Adam 4948120b69 Translate SendSyntax() and spacify it properly 2013-09-27 19:11:02 -04:00
Adam 994471f5a7 Align info formatters with translated keys? 2013-09-27 19:11:02 -04:00
Adam 80c02740d0 Translate listformatter properly 2013-09-27 19:11:02 -04:00
Adam df3c0b7b52 Fix various commands to properly report a given expiry time is invalid 2013-09-27 19:11:02 -04:00
Robby- 45702992ac ns_cert, ns_set: Make strings equal for one translation instance 2013-09-27 19:11:02 -04:00
Robby- 9756f96b85 example.conf: nickserv:emailregistration -> nickserv:registration 2013-09-27 19:11:02 -04:00
Robby- 6ac0364f74 Fix os_stats to display SQLINEs and SNLINEs on non-supporting IRCds 2013-09-27 19:11:02 -04:00
Robby- 4f820a7d41 Fix typos, remove dead language defines.
os_set: Add missing debug text in help output.
2013-09-27 19:11:02 -04:00
Adam 5f7127dd92 Don't send regex qlines and nlines to the IRCd 2013-09-27 19:11:01 -04:00
Adam dcb3ff7d34 Dont send BURST twice on inspircd
Drop matching nicks on forbid.
2013-09-27 19:10:49 -04:00
Adam 1107b92699 Drop matching channels on forbid, and enforce nick forbids even on IRCds
with no qlines
2013-09-27 18:02:26 -04:00
Adam 3b0b1bc80e Don't send SQLines unless the IRCd supports it 2013-09-27 18:02:26 -04:00
Adam b60b23fd48 Only allow using os_oper add and del if you have the privileges for what
you are giving or taking.
2013-09-27 17:21:46 -04:00
Robby- 5aac6377c2 Correctly detect override in cs_ban on masks 2013-09-27 17:21:31 -04:00
Adam 20856fb59c Remove +r etc when channels are deleted 2013-09-27 17:21:20 -04:00
Robby- 7545763cd4 Added missing override capabilities and log calls to some ChanServ commands 2013-09-27 17:21:20 -04:00
Adam 1818b19eba Fix cs_mode lock reply if nothing is done
Fix not clearing forbids when os_forbid is unloaded
Apply nick and chan forbids when added
Fix loading forbids until after the service is constructed
2013-09-27 16:33:56 -04:00
Adam abc7e4b423 Fix os_news to not load items until the news service is constructed
Fix session exceptions not expirigin
2013-09-27 16:33:03 -04:00
Adam e5ece18ee7 Readonlyize many commands 2013-09-20 21:09:35 -04:00
Adam 8641b995c4 Merge the two memo del events into one. Since they had the same name it was confusing the event system 2013-09-20 15:21:32 -04:00
Adam b880240d72 Make os_session akill ip ranges and not individual user's ips 2013-09-19 13:35:52 -04:00
Adam 5ce90ba7d1 Fix not updating last_seen on expire nick for nicks with secure off. Don't show Expires in /ns info if the nick is online currently as it confuses people 2013-09-19 12:38:28 -04:00
Adam 98bae827e1 Require confirmation in /cs drop by requesting the channel name twice 2013-09-16 15:54:09 -04:00
Adam e3c05efe5e Remove static variables from functions in modules which causes them to be marked as gnu unique objects, which breaks dlclose()/dlopen() on g++ 4.5+ 2013-09-16 06:47:42 -04:00
Adam 8cbaf7e990 Update Spanish translation, from Isaac Fontal <i_fontal@hotmail.com> 2013-09-12 07:20:26 -04:00
Adam 339f41aebc Fix allowing duplicate entries on the snline list
Have proto mods recognize cidr ranges as zlineable IPs
Remove operserv/global from global.conf because its dumb
Fix example config ~botserv/set example to work as expected
2013-09-08 21:53:06 -04:00
Adam 55e4ef9d3a Fix logging /os set list. Enforce snlines on ircds that can't have snlines set by just killing the user. Fix double call to OnMatch() when a user matches an xline 2013-09-08 06:02:35 -04:00
Adam f63e4ceebe Alpabetize channels in /ns alist and on webcpanels chanserv page 2013-09-08 04:55:03 -04:00
Adam b005089f2f Dont allow multiple list modes with the same param on the mode list at once 2013-09-03 19:58:40 -04:00
Adam 1b42e26642 Cap mode stacker max line length 2013-09-03 19:40:03 -04:00
Adam 4691351167 Cleanup previous commit
Fix log messages from commands send through webpanel
Don't show OperServ section to non opers
2013-09-03 18:51:18 -04:00
DukePyrolator 404debf789 updated the chanserv section in webcpanel 2013-09-03 04:37:09 +02:00
DukePyrolator 752a5ca1b7 add vhost support for hybrid 2013-08-31 08:46:56 +02:00
Adam e1a1cf0e6f Dont crash on HasPriv() on an empty access group 2013-08-29 23:22:48 -04:00
Adam 3fabc2f831 Fix ns_ajoin on unregisterd +i channels 2013-08-29 23:13:29 -04:00
Adam 59ea36c831 Move Serialize::Types to construct after the corresponding extensible items they require when unserializing 2013-08-27 03:18:43 -04:00
Adam fac880664c Make chanserv:require not default to r 2013-08-27 02:56:54 -04:00
Adam 7f890ce98d Log parameters given to /cs mode set. Add logging to /os ignore. 2013-08-26 02:05:41 -04:00
Adam 50e1a3e96c Fix status mlocks. Fix reply from lock add. 2013-08-26 02:00:25 -04:00
Adam 6b79349e6c Fix User::IsIdentified with check_nick, do not remove +r on bursting clients until after server sync 2013-08-25 23:26:45 -04:00
Adam 678f54903d Fix not resetting channel status modes on our clients when a channel ts lowers 2013-08-25 22:57:26 -04:00
Adam 714a4a3004 Remove unnecesary mlock code in cs_mode, change mode set events to never bounce modes set by bots or servers, as it was possible to get modules to fight with each other 2013-08-25 21:33:52 -04:00
Adam 34826f71c7 Merge pull request #22 from fgsch/misc
Better ngIRCd support
2013-08-25 01:49:42 -07:00
Adam 847cceaba3 Create persistent channels on startup, which used to work and got lost somewhere
Fix some oddities with using persistent channels with no botserv
Send list modes to uplink when bursting
Fix issues with persist + keepmodes
Fix /os modes clear all not clearing all status modes
Fix operwall on ratbox/plexus
Dont apply mlock in SetCorrectModes since that just recursively calls itself unncessarially
Change command logging to show the command name and not the service name
2013-08-25 04:48:43 -04:00
Adam 09046e3c99 Show what kind of nick protection is enabled in /ns info 2013-08-25 04:48:43 -04:00
Adam 00a19529c3 Add logging to several operserv commands 2013-08-25 04:48:43 -04:00
Adam 446b3a910d Save unconfirmed status and passcodes in the database.
Fix db_sql_live to not reinsert all records if there are extra columns.
Plexus has no chmode +r
2013-08-25 04:48:43 -04:00
Federico G. Schwindt 76f5d4b316 Sort parameters and correct comments 2013-08-25 04:54:35 +01:00
Federico G. Schwindt 9b59925144 For ngIRCd, on nick change set mode -R 2013-08-25 04:54:32 +01:00
Federico G. Schwindt 243d781e99 Add login support for ngIRCd
This is implemented via the accountname METADATA command
2013-08-24 17:56:46 +01:00
Jens Voß 8be5f53f1f Merge pull request #21 from Phr33d0m/1.9
Use CDN for the rest of the .js files
2013-08-23 09:59:28 -07:00
Denis M. (Phr33d0m) cd49bb40c2 Use CDN for the rest of the .js files 2013-08-23 11:57:32 +02:00
Adam ef3d115bae Merge branch '1.9' of github.com:anope/anope into 1.9 2013-08-23 04:42:24 -04:00
Adam 9f1178ec58 Remove SSL cert verification because we dont use it 2013-08-23 04:36:02 -04:00
Adam 3bc2db561b Fix reading post data in m_httpd 2013-08-23 04:13:08 -04:00
Adam fad603e7a4 Merge pull request #20 from Phr33d0m/1.9
Redesign body of the pages.
2013-08-23 00:03:58 -07:00
n0kS Phr33d0m 5f006bf139 Fixed an incorrect layout, a couple of typos and a wrong form action 2013-08-23 08:42:45 +02:00
n0kS Phr33d0m aaa12cc018 Use a local copy of the background image 2013-08-23 08:11:24 +02:00
n0kS Phr33d0m 2238db8338 Make the navbar brand a different font to distinguish it from the rest of the navbar links. 2013-08-23 08:06:47 +02:00
Adam 4d1492d444 Remove webpanel:ssl configuration option because its dumb 2013-08-23 01:14:00 -04:00
n0kS Phr33d0m 5c4414e4a5 Removed innecessary logo width, the img-responsive will take care of that. 2013-08-23 07:05:57 +02:00
n0kS Phr33d0m 6f9b77e336 Don't use an external svg logo anymore, but a local png one. 2013-08-23 07:04:09 +02:00
Adam 154fa25e8f Fix m_httpd handling fragmented http requests 2013-08-23 00:57:36 -04:00
n0kS Phr33d0m 9793062007 Merge branch '1.9' of github.com:anope/anope into 1.9 2013-08-23 06:43:57 +02:00
n0kS Phr33d0m f86dc247e5 Redesign body of the pages. Now they have a distiguished panel heading and panel body. Also added background colour to currently selected section. 2013-08-23 06:39:23 +02:00
Adam 2b1f75a313 Fix m_httpd enabling ssl if m_ssl is loaded after it 2013-08-22 22:45:20 -04:00
Adam 5ac0c9a327 Fix previous commit 2013-08-22 17:33:16 -04:00
Adam e8763d5b3c Always set +o on users who have access for it, even if higher modes have a prefix 2013-08-22 01:48:17 -04:00
Adam ce7a32a994 Do not have cs_access try to represent non levels access entries as levels access entries. Sometimes it cant accurately be done and it confuses people. 2013-08-22 01:13:28 -04:00
Adam 0c1cc08e28 Update readme more 2013-08-21 23:22:27 -04:00
Adam e12e4e6956 Update readme 2013-08-21 23:20:05 -04:00
Adam 52535cf6fb Merge pull request #19 from Phr33d0m/1.9
A completely rewritten Control Panel
2013-08-21 20:17:20 -07:00
n0kS Phr33d0m 121d0a6e5b Fix a typo and remove unnecessary 'effects' 2013-08-22 03:27:29 +02:00
n0kS Phr33d0m 34535814e4 A completely rewritten Control Panel using some bootstrapping, jquery and lots of CSS 2013-08-22 02:37:43 +02:00
n0kS Phr33d0m 8bcc6840ce Nuking the old design with fire 2013-08-22 02:36:01 +02:00
n0kS Phr33d0m 08d113332c Fix incorrect GET method as we are submitting POST data 2013-08-22 02:32:04 +02:00
Adam 765943062e Always require the registered channel mode is set. Comment out default config requiring "r" as some ircds use it for registered users only 2013-08-21 01:35:57 -04:00
Adam 17cca42d48 Make maxaliases=0 really mean no limit 2013-08-21 01:27:14 -04:00
Adam 760fdc4049 Fix not setting vhost on nickserv update 2013-08-18 14:42:59 -04:00
Adam ead4aa7ed9 Fix 318 raw being sent for uids on ts6 ircds 2013-08-17 14:05:01 -04:00
Adam 65911dd1be Replace some get calls on <bool> extenisble types with hasext 2013-08-14 19:50:08 -04:00
Adam 4abfdcbb9c Do not default mlock +r, it is unnecessray and only clutters up the mlock list 2013-08-14 18:24:04 -04:00
Adam de5c8c0d38 Fix some issues with suspend 2013-08-12 15:45:50 -04:00
Adam 8e011bbb78 Respond to remote whois on inspircd for users on us that aren't service bots 2013-08-12 15:44:28 -04:00
Adam f15a9749f9 Use less strict valid ident checks on hybrid, unreal, and inspircd 2013-08-12 14:36:49 -04:00
Adam f1956b039d Remove channels from accesss lists when they expire/drop 2013-08-11 17:14:39 -04:00
Adam 53d5b7c29e Fix chanserv opersonly setting 2013-08-11 16:04:10 -04:00
Adam 812cb04fde Add DNS Notify support 2013-08-11 15:48:46 -04:00
Adam 1314d5b4f1 Fix cs_kee_pmodes default 2013-08-11 15:38:09 -04:00
Adam 490601de3a Fix chghost on charybdis 2013-08-11 12:25:58 -04:00
Adam c7aab50bff Support DNS ANY query type 2013-08-10 23:28:58 -04:00
Adam c507c78d5a Do not have ratbox or plexus pull modes from hybrid, it is entirely too confusing. Also fix cs_mode config 2013-08-10 17:59:31 -04:00
Adam 58c05687bf Add "simple seen" mode to cs_seen 2013-08-10 17:43:13 -04:00
Adam f8cdcc65c6 Merge pull request #18 from fgsch/1.9
Add certificate fingerprint support for ngIRCd
2013-08-10 14:26:27 -07:00
Adam 10a918f9e1 Default some listmax config settings to 50 2013-08-10 12:33:27 -04:00
Adam e4d1769a8b Add os_info 2013-08-10 12:29:12 -04:00
Adam 7cd80a2131 Fix logging LOG_NORMAL logs in m_sqllog. Fix/add more compat extensible items to ChannelInfo::Unserialize 2013-08-08 03:03:57 +00:00
Federico G. Schwindt 9d6f88de39 Add certificate fingerprint support for ngIRCd 2013-08-07 23:44:58 +01:00
Adam b93d650b1f Revert "Shrink to fit module event vectors when modules are removed from them"
Sometimes the events call the function the event is in, which causes a resize
while the original function is iterating.

This reverts commit 7f1b5552dc.
2013-08-07 21:19:49 +00:00
Adam c480695369 Fix db_sql to not remove objects when shutting down, as some modules that unload before it when shutting down remove their items then 2013-08-07 19:40:05 +00:00
Adam 7f1b5552dc Shrink to fit module event vectors when modules are removed from them 2013-08-07 17:27:18 +00:00
Adam 4865a8cfff Add m_sql_log 2013-08-07 16:44:35 +00:00
Adam 1efd289488 Fix inspircd jupe mess again, it wasn't working when juping servers that didn't already exist 2013-08-07 15:03:11 +00:00
Adam 83e4b183ea Add keepmodes setting 2013-08-01 14:07:56 +00:00
Adam 1e625b6837 Use MessageSource as the source for many IRCDProto funcs
Keep track of what user modes are oper only/server only/etc
2013-08-01 13:39:35 +00:00
Adam 402c624e45 Move chanstats stuff to stats/ 2013-07-29 12:02:40 +00:00
Adam fde83f6564 Rethink jupe/squit thing somewhat. Workaround for the inspircd rsquit/squit mess 2013-07-26 21:40:16 -04:00
Adam f0f43cf426 Fix build on late versions of cmake 2.4 2013-07-26 12:57:36 -04:00
Adam 3dc64bac4d Fix issues with 'Me' related to previous commit 2013-07-26 08:45:44 -04:00
Adam 2450a64bf4 Interally quit servers when juped 2013-07-26 07:38:42 -04:00
Adam b48293a632 Merge pull request #17 from fgsch/1.9
Fix levels on the ngircd module
2013-07-23 10:04:44 -07:00
Federico G. Schwindt e908dc0dc7 Make ChannelModeStatus level mandatory
Levels are used in Channel::SetCorrectModes() when removing modes.
2013-07-23 18:03:32 +01:00
Federico G. Schwindt 378c9203df Squashed commit of the following from Federico G. Schwindt <fgsch@lodoss.net>:
Date:   Mon Jul 22 22:40:07 2013 +0100

    Correct pasto

    Use proper name for included file.

Date:   Mon Jul 22 22:30:23 2013 +0100

    Indent defaults

Date:   Mon Jul 22 22:28:50 2013 +0100

    Correct option name

    signkicklevel is really signkick_level.

Date:   Mon Jul 22 22:25:24 2013 +0100

    Ensure some of the options are persisted

    Correct type for memo_signon, memo_receive, memo_mail and memo_hardmax so
    they're serialized.

Date:   Mon Jul 22 22:23:36 2013 +0100

    Add missing newline

plus additional suggestions from fgs
2013-07-22 23:45:08 -04:00
Adam 779f3788c9 More validation stuff from fgs 2013-07-21 18:29:35 -04:00
Adam 604da89813 More basic config validation, and fix crash when no uplinks are configured. spotted by fgs 2013-07-21 03:59:59 -04:00
Adam e11abdc4f0 Fix m_ldap service names from defaulting ldap/ldap/main 2013-07-21 00:37:21 -04:00
Adam 5aac04dffe Move SendLogin() back to User::Identify, it was moved at some point? but doesn't as intended in ::Login 2013-07-21 00:23:24 -04:00
Adam 7480fbda2b Fix removing old connections in m_ldap and m_mysql 2013-07-20 23:36:20 -04:00
Adam 9629ccb374 Fix more compile warnings found on newer g++ versions 2013-07-20 19:46:13 -04:00
Adam cb70d976ba Change cs_xop access check to use command order 2013-07-20 09:19:52 -04:00
Adam 6db0186947 Fix not setting the correct compile flags on modules and fix the resulting warnings 2013-07-20 03:06:20 -04:00
Adam 492eac20a8 Fix restoring topics on uplink sync 2013-07-20 03:06:20 -04:00
Adam c8511a625d Fix unserializaing seeninfos 2013-07-20 03:06:20 -04:00
DukePyrolator f6b915a169 added whois support to the ngircd protocol module, thanks to fgs for sending the patch 2013-07-19 22:28:33 +02:00
DukePyrolator 02c1724d75 some updates to the german langfile, thanks to kaylee for translating 2013-07-19 22:11:40 +02:00
Adam 7e87bb69fc Default xlines to be set by me 2013-07-15 23:59:19 -04:00
Adam aae522d72b Fix ModeManager::GetStatusChar 2013-07-15 23:23:54 -04:00
Adam 0a821640bb Fix deleting seeninfos 2013-07-14 20:37:42 -04:00
Adam 37733dea65 Fix Extensible<bool>::Set with a value (which is redundant due to the bool specailization) 2013-07-14 03:16:23 -04:00
Adam eabb9c0c11 Fix deleting badwords/modes/logs etc 2013-07-08 20:35:04 -04:00
Adam b103d16eb1 Fix loading some older compat flags and showing noexpire on /ns info 2013-07-08 15:48:37 -04:00
DukePyrolator e3b6ae3649 added missing NOTICE support to hybrid. sorry 2013-07-08 07:42:35 +02:00
Adam 0ff48e1538 Move op/deop/etc back to an actual command, its too hard to use cs_log with it as rewrites. Allow cs_log to work with either command names or service names. 2013-07-07 23:13:29 -04:00
Adam 53038d83bf Wipe services's module dir prior to make install 2013-07-07 23:13:16 -04:00
DukePyrolator 2ea594d677 added protocol support for incoming NOTICEs 2013-07-08 05:05:13 +02:00
DukePyrolator e957c7b2d2 m_dnsbl: updated the url to DroneBL in modules.example.conf 2013-07-08 05:04:04 +02:00
Adam 9a4f27e0a3 Only set stuff in ExtensibleUnserialize if there is something to set 2013-07-05 02:19:06 -04:00
Adam fccc4a4fa6 Fix sometimes not unloading all modules on shutdown 2013-07-05 02:09:43 -04:00
Adam 4325073524 Fix ns_set_misc and cs_set_misc 2013-07-05 02:09:27 -04:00
Adam 55199f0a4c Read most of the old common flags for compat 2013-07-04 23:05:30 -04:00
Adam 7edc76f7fb Fix deleting mode locks 2013-07-04 23:05:30 -04:00
Adam 3fbdde5e18 Fix Extensible dtor 2013-07-04 20:04:51 -04:00
Adam 9f8b4ac382 Allow access and flags to take privilege names 2013-07-04 01:21:14 -04:00
Adam 998925c90a Fix rehashing via SIGHUP and m_mysql 2013-07-04 01:19:40 -04:00
Adam 7f971043bc Allow channels on access lists 2013-07-03 22:45:00 -04:00
Adam c2e1a8a3e2 Fix some warnings and errors reported by valgrind 2013-07-03 19:44:13 -04:00
Adam c62b3cb275 Fix a few issues found by Attila (invalid array access in channel set events, os_chankill inf loop) 2013-07-02 01:56:13 -04:00
Adam 1a3d9a016d Change extensible keys to require explicitly having a type defined for it. Completely modularize more features like bs_kick, entrymsg, log, mode, etc. Move fantasy to its own module. Move greet to its own module. 2013-07-01 22:17:52 -04:00
DukePyrolator 518182ac92 m_mysql: handle multiple result sets returned from multiple statements or procedure calls 2013-06-30 05:28:01 +02:00
DukePyrolator 7d0e063300 added the missing accessmax option to the ns_cert configuration block 2013-06-22 17:06:48 +02:00
DukePyrolator 5e36d848d5 pseudoclients now trigger OnJoinChannel and OnPartChannel 2013-06-22 13:41:05 +02:00
DukePyrolator fee461f3d0 added support for CertFP on hybrid 2013-06-22 13:40:19 +02:00
Adam 1773eef143 Don't enforce usestrictprivmsg on TS6 IRCds and cache the value of usestrictprivmsg 2013-06-19 20:53:40 -04:00
KindOne 7704ee7107 Removed inspircd 1.1 reference from conf. Corrected a few spelling issues. 2013-06-19 20:07:15 -04:00
Adam 5ac1e9175d Set vhosts when users id to an account (and not a nick), add account arg to user ctor to ease handling users who connect already identified 2013-06-19 19:03:56 -04:00
DukePyrolator 5695c9e079 fixed a typo in the last commit. sorry. 2013-06-18 08:01:36 +02:00
DukePyrolator f92b0d6ea0 added support for hybrids new umode +S (client is connected via SSL/TLS) 2013-06-18 07:48:07 +02:00
DukePyrolator fc527b464a checking for ssl users when ajoining ssl only channels on inspircd, fixes 1466 2013-06-18 07:35:47 +02:00
Adam a93b315bd3 Fix cidr::match with odd cidr ranges 2013-06-15 23:27:01 -04:00
DukePyrolator 5246424dc0 added an 'extras' script to enable/disable extra modules before compile 2013-06-15 07:11:50 +02:00
Adam 1316147a8c Update Spanish translation, courtesy of Isaac Fontal 2013-06-15 00:09:25 +00:00
Adam 70319ab8be Fix usestrictprivmsg /msg vs / logic 2013-06-13 20:50:59 -04:00
Adam 7dd358972a Fix possible crash in Extensible::ExtensibleUnserialize if a null entry is in it 2013-06-12 02:33:30 +00:00
Adam d463ae3b1e Allow users to change their language to english when the default language is not 2013-06-12 02:30:21 +00:00
lethality ebda113f44 Made the message for unconfirmed nicks relevant to the ns_register registration setting 2013-06-06 17:28:59 +01:00
lethality 6ab6eca0a6 fixed typo, though I doubt it affects anyone/anything 2013-06-05 20:56:16 +01:00
Adam b1ba1ec8ac Made sepstream::GetToken less recursiveish 2013-06-01 21:58:08 -04:00
Adam 9956da18e3 Move OnJoinChannel event to trigger after the user has completely joined and document it more about what you should and shouldnt do in it 2013-06-01 21:56:52 -04:00
Adam b56e71ab14 Move CheckKick event to Channel and make os_forbid use it instead of kicking users in the join event, which does bad things 2013-06-01 14:55:45 -04:00
Adam 6f45d72497 Made m_mysql's Escape() function safe against escaping strings > BUFSIZE 2013-05-31 18:34:21 -04:00
Adam f5c01bf617 Fix /hs waiting 2013-05-31 01:44:32 -04:00
Adam 06bad31b18 Fix Channel::SetCorrectModes to never remove modes <= voice (currently secureops enforces everything, inclurding voice) 2013-05-28 22:17:22 -04:00
Adam 576aaff3da Don't compare system time to a users timestamp to determine when to collide with a user, if the time on services vs the ircd are different it does weird things 2013-05-28 21:07:07 -04:00
Adam c5bc8fab32 Include <iterator> in services.h as now more than one file uses it 2013-05-28 13:51:23 -04:00
Adam f6e2ebe145 Fixup last commit. We have events in log's destructor so we cant log messages from it, and this check in modulemanager is bogus/has a typo 2013-05-28 13:43:45 -04:00
Adam 37b3535543 Initially attach all modules to all events, and detach them as the events are run if they are not implemented per module 2013-05-27 19:36:37 -04:00
Adam c21e8d9204 Fix webcpanel build 2013-05-26 19:34:58 -04:00
Adam 22658d63bd Get rid of the remaining references in the core to specific services. Move more stuff out of the core to the proper modules. 2013-05-26 17:13:11 -04:00
Adam f2dee1e1d6 Update INSTALL and place some example link configurations in example.conf 2013-05-26 15:27:28 -04:00
Michael Wobst 968ef349d6 Update Hybrid protocol module for Hybrid 8.1 2013-05-25 15:47:56 -04:00
Adam d6640ed5ee Give an error message when the configuration file ends with an unterminated block 2013-05-25 14:08:50 -04:00
Adam aabc217a6b Fix /join 0 2013-05-20 23:45:41 -04:00
DukePyrolator d82391e46d made our database backup filenames more readable 2013-05-20 06:42:38 +02:00
Adam 7aa02864d2 Mark service:channels as a "botchannel" and don't try to hold them on sync, as the client should always be in the channel 2013-05-19 01:11:55 -04:00
Adam 2a8202c832 Give botserv bots assigned by persist the same botmodes as normal bots, fix some typos, remove unused variable 2013-05-18 23:45:10 -04:00
Adam be4a39ceb6 Fix desync when empty permanent channels are dropped on ircds that no have permanent channel mode 2013-05-18 15:47:26 -04:00
Adam a3dc75c61c Ignore define{} blocks defining directives to itself 2013-05-18 14:46:42 -04:00
Adam 14dc142a92 Add botserv bot usermode config option 2013-05-18 14:26:18 -04:00
Adam 51b7d53108 Add a config option for the default log bot 2013-05-18 13:08:26 -04:00
Adam 3253455792 Tabify some stuff in config.cpp 2013-05-18 12:25:26 -04:00
Adam 879b310580 Fix Windows build 2013-05-18 00:27:03 -04:00
Adam 5ff3aa7209 Yet another variable shadowing error which only show on newer gcc versions 2013-05-17 23:45:02 -04:00
Adam ca93122a68 You would think my compiler would at least warn me about this. but no. 2013-05-17 23:20:24 -04:00
Adam 2428264315 Add Redis database support 2013-05-17 23:04:18 -04:00
Adam cc4a14b0ba Removed some hard coded command names in help output 2013-05-17 22:53:55 -04:00
DukePyrolator 934b584374 do not validate nicks from ulined servers. this also fixes bug #1521 2013-05-15 03:23:20 +02:00
DukePyrolator 4237d49d41 improved handling of mlocks and topiclocks on inspircd 2013-05-12 11:09:34 +02:00
Charles Kingsley 1c36de5ab1 Fix config to default prepend_channel true for fantasy 2013-05-11 17:13:01 +01:00
Charles Kingsley da948be089 Update botserv.example.conf for xop fantasy commands 2013-05-11 17:06:16 +01:00
Adam 9384a4f088 Fix ChannelMode::CanSet 2013-05-10 16:17:24 -04:00
Charles Kingsley 4d62c673fa Fix typo in example.conf - thx rodr1go 2013-05-10 20:18:48 +01:00
Adam 7426b3b04a Readd check for users.size() == 1 before holding channels 2013-05-08 20:53:28 -04:00
Adam 735e234c2c Fixed some issues and desyncs with creating empty permanent channels on startup & dropping empty channels 2013-05-08 20:26:45 -04:00
Adam 735f0ba6cf Fix crash when we kill users because of a double free 2013-05-08 18:26:23 -04:00
Adam 9ee7c825e1 Check for peace being on before denying a mode change in cs_mode 2013-05-08 18:15:39 -04:00
Adam 912103ec13 Allow using sxlines on ircds that do not support them, since we always enforce them anyway 2013-05-08 11:31:20 -04:00
Adam f843e7bd90 Fix suspend info output in info and improved it 2013-05-08 11:13:48 -04:00
Adam d7e2ab688b Add activate_on_set option for hostserv 2013-05-08 10:40:46 -04:00
Adam 5e7085130e Fix reading multi line quotes from the conf with blank lines or lines with only whitespace 2013-05-08 10:12:31 -04:00
Adam 9b07e163c0 Make sockaddrs/cidr not throw on invalid ips to give us an easier/cheaper way to test for a valid IP 2013-05-08 09:50:43 -04:00
Adam 6859decfb8 Fix setting some default flags, reading fantasy blocks, and minusers setting being off by 1 2013-05-07 00:24:37 -04:00
Adam e23baf4297 Allow /os exception to contain CIDR masks 2013-05-07 00:06:02 -04:00
Adam c7f77b3b66 Fix a few issues with the poll socketengine 2013-05-06 23:48:18 -04:00
Adam 6578829fa6 Use I_OnUserQuit for os_session because I_OnPreUserLogoff gets called too late, after the users server can be gone. Fix a couple other small things 2013-05-06 22:18:38 -04:00
Adam ef06226521 Update the rest of modules.example.conf, default inspircd status modes to a sane rank incase they are prefixless, and 50 other things 2013-05-06 07:40:43 -04:00
Adam 4c669b947f Merge pull request #14 from attilamolnar/1.9+inspmodes
InspIRCd: Recognize a few more channel modes that weren't recognized
2013-05-05 22:49:29 -07:00
Adam 3fbb493d57 Fix extras build 2013-05-06 01:38:27 -04:00
DukePyrolator 223aa65cfa removed an unused variable 2013-05-06 07:28:23 +02:00
Adam fe54dfb37f Don't forget to CloseHandle threads on win32, spotted by Attila 2013-05-05 23:47:45 -04:00
Adam 3f5f84c92c The const char* specialization of this no longer works 2013-05-05 21:18:47 -04:00
Adam 5b3f81ea78 That doesn't work either, just don't use references.
find ./ -name '*.cpp' -exec sed -i 's/Get<const Anope::string\&>/Get<const Anope::string>/g' {} \;
2013-05-05 21:05:43 -04:00
Adam 3e8752fe66 The default arguments are references to temporaries which fall out of scope once the function returns, so we can't use them. gcc is just nice. cronus sucks. also validate a few more config options 2013-05-05 20:38:57 -04:00
Adam 57c2b65f08 Move module header files to include/modules to fix naming conflicts with system headers 2013-05-05 03:30:08 -04:00
Adam a118946e65 Fix Windows 2013-05-05 03:04:01 -04:00
Adam ee2dcf11b8 Cache timeoutcheck and fix a typo in example.conf 2013-05-05 02:49:32 -04:00
Adam e91de41278 Add an option to sepstream to allow it to return empty tokens if multiple separators are found in a row 2013-05-05 02:00:33 -04:00
Adam 10b5b00db4 Dont check for noquit/quitstorm, check and be sure all users are gone regardless 2013-05-05 01:58:45 -04:00
Adam 2044b4d3ad Cleanup of dns stuff based on stuff found making inspircd's module 2013-05-05 01:57:24 -04:00
Adam 1d0bb9b26b Rework the config file reader to be much more flexible and move many configuration directives to the actual modules they are used in. 2013-05-05 01:55:04 -04:00
Adam 781defb707 Move extras header files out of extras so when users copy modules out they dont need the headers too 2013-04-16 01:58:29 -05:00
Adam 16c124d34e Rewrote modules/CMakeLists.txt and do not build the 'extras' modules, if users want them built they should copy or symlink them out of extras 2013-04-15 01:00:45 -05:00
Adam f08dbced60 Allow assigning service bots via /invite 2013-04-14 17:39:01 -05:00
Adam baabc91ead Fix a few of the earlier changes to os_forbid 2013-04-13 16:36:39 -05:00
Adam 81483ae5e7 Fix build on Solaris 2013-04-13 06:05:17 +00:00
Adam 003140bf60 Fix Windows build 2013-04-12 16:20:51 -05:00
Adam b405484fb9 Fix OSX buld and a warning in modulemanager.cpp 2013-04-12 17:19:29 -04:00
Adam 9a45626379 Hack around calculate_depends not able to find libintl.h, since we deal with that later 2013-04-12 15:45:52 -05:00
Adam 10d10d057e Update Win32 build instructions slightly 2013-04-12 15:44:54 -05:00
Adam aa2844a3fc Fix not attaching cs_xop to I_OnReload 2013-04-12 02:48:24 -05:00
Adam 42c640a9b5 /ns drop help was pretty much a complete lie, so fixed it. Also require a nick param to /ns drop 2013-04-12 01:32:53 -05:00
Adam 066fc5801b Fix m_ssl 2013-04-12 01:14:56 -05:00
Adam 416eaa1e66 Explain how privileges associate themselves with modes 2013-04-11 15:58:59 -05:00
Adam ac19a5c24b Fix memoserv/rsend reply 2013-04-11 15:35:39 -05:00
Adam 6f9dd282d2 Use SetCorrectModes to set the inital modes on a founder once they register a channel 2013-04-11 15:28:53 -05:00
Adam c56d72ba84 Remove more OPDEOP references 2013-04-11 02:28:36 -05:00
Adam db4ed1cfaf Merge chanserv saset and set back into one command since it no longer needs to be separated... replace chanserv/set privilege with chanserv/administration. Dont tell users to use 'help' for more help if there is no help. 2013-04-11 00:51:08 -05:00
Adam cb64d806c1 Remove the need for having to set syntax to "" for commands with no syntax 2013-04-11 00:20:24 -05:00
Adam 4f9b7874d6 Pass new config and the new config reader to the OnReload event, aswell as call it on module load on modules that hook to it 2013-04-11 00:08:28 -05:00
Adam 207c46c871 Move some of the modules in extras/ that arent really extra out of extras. Mark our modules as VENDOR and allow modules to have multple types. 2013-04-10 22:26:40 -05:00
Adam 957cb2bf93 Use the mode names inspircd gives us to add modes if we don't recognize it 2013-04-09 16:27:25 -05:00
Adam b244c74479 Allow privilege descs to be read from the config to override the defaults 2013-04-09 14:51:39 -05:00
Adam b76b2e11c8 Made privilege names case insensitive 2013-04-09 14:48:24 -05:00
Adam b35665bb54 Rename OPDEOP and OPDEOPME privileges to be similar to the other status privileges 2013-04-09 14:33:54 -05:00
Adam c3eb5b885d And my bots initially start with no server.. 2013-04-09 04:23:29 -05:00
Adam 6faf4e3823 'Me' can not exist when channels are created 2013-04-09 04:13:49 -05:00
Adam 325b018ed0 Add a default method for user's SendModeInternal 2013-04-09 00:00:52 -05:00
Adam 0a3d27a91f Made XOP privileges configurable 2013-04-08 23:37:42 -05:00
Adam bcd85ca682 Fix OperType::GetCommands 2013-04-08 01:05:25 -05:00
Adam ac40c53fe4 Fix /ns set display 2013-04-08 01:02:45 -05:00
Adam 2eae82da5c Check the channel secure option isn't set in ChannelInfo::AccessFor too 2013-04-08 01:01:27 -05:00
Adam 72493b7305 Fix secureops 2013-04-08 00:42:07 -05:00
Adam 1a37e1c048 Made auto* chanserv privileges not hard coded.
Made cs_statusupdate not remove status on users if they still match other entries.
Move privilege descriptions out of the config
2013-04-08 00:19:07 -05:00
Adam fb7fef7a84 Optimizations of much of the more commonly used code 2013-04-07 23:46:44 -05:00
Adam 36602224b8 Remove the runtime module directory on non-windows because we no longer overwrite modules on install without deleting them first 2013-04-06 19:34:35 -05:00
Adam ccecfdf445 Made the missing dependencies message from cmake more descriptive for modules 2013-04-06 19:03:07 -05:00
Adam 32d1184c00 Use the return from BufferedSocket::ProcessRead() and don't just assume its true 2013-04-06 17:08:25 -05:00
Adam 6a46a08a85 This worked before but is a little weird 2013-04-06 16:58:04 -05:00
Adam 7a2e6aa5c2 Add more logging to bs_set, cs_set, and ns_set 2013-04-06 16:43:56 -05:00
attilamolnar 34b5f9ce6e InspIRCd: Recognize a few more channel modes that weren't recognized 2013-04-06 23:10:26 +02:00
Adam f77eb0a282 Let non founders still /cs ban by wildcard mask, but limit the number of people it will kick 2013-04-06 15:59:38 -05:00
Adam 302a409136 Unset +P from perm channels when expiring 2013-04-06 15:44:03 -05:00
Adam 0b3b9fe128 Fix toggling topiclock when the channel setting is changed 2013-04-06 15:26:52 -05:00
Adam f71c7865fc Fix generic mode support 2013-04-06 15:06:39 -05:00
Adam 4ecf20b3f5 Fix ns_lists command group 2013-04-05 16:59:27 -05:00
Adam a5b8788014 Made the securefounder checks in cs_set more consistent 2013-04-05 16:27:12 -05:00
Adam 3cc7950c4b Fix not constructing the /bs set greet command 2013-04-05 15:45:03 -05:00
Adam 854bc4db0c Move around some of Init() to fork() before initing the socket engine, as some engines cant survive a fork() 2013-04-04 22:12:48 -05:00
Adam dbc77279bf Fix applying some sxlines to users on add 2013-04-04 18:52:35 -05:00
Adam c4ef566a65 Fix /hs reject syntax 2013-04-04 18:45:45 -05:00
Adam 66376335ab Fix defcon taking action on new clients 2013-04-04 15:14:17 -05:00
DukePyrolator 823bc01f66 mentioned the charybdis protocol support in the readme and example config 2013-04-02 07:02:38 +02:00
DukePyrolator 947ad6f73a fixed using language files for third party modules 2013-04-01 10:26:19 +02:00
DukePyrolator 06c8a1ef50 Revert "added include/version.h to .gitignore"
This reverts commit b3fd861b3e.
2013-04-01 09:46:55 +02:00
DukePyrolator b3fd861b3e added include/version.h to .gitignore 2013-04-01 09:42:59 +02:00
Adam 62262f4b0d Fix typo in Mode message handler 2013-03-31 00:43:11 -05:00
Adam 6e0dc0e210 Add networkinfo:modelistsize config option to set the max size of b/e/I lists 2013-03-31 00:43:11 -05:00
Adam 7e7556f064 Merge usefulness of Timer and CallBack classes into Timer, and fix it to really work 2013-03-30 23:39:43 -05:00
Adam 111d6a9178 Fix loading ttb from databases 2013-03-30 22:40:20 -05:00
Adam d23817604c Add /bs set banexpire command to configure if/when botserv bans expire 2013-03-30 22:08:51 -05:00
Adam 4694c7afb4 Split up bs_kick subcommands into real subcommands 2013-03-30 19:08:07 -05:00
Adam a52293336f This reference to see if nickcores go away during command execution is no longer necessary 2013-03-29 23:51:45 -05:00
Adam f24e17f8b4 Fix /bs set private 2013-03-29 23:50:51 -05:00
Adam 2b208de02f Fix detecting module langauge files 2013-03-29 23:50:51 -05:00
DukePyrolator 4eb5d153c0 uuups, we already have the year 2013 2013-03-30 05:42:17 +01:00
DukePyrolator 0451dd3d0d added charybdis protocol support 2013-03-30 05:21:54 +01:00
Adam c3e4f1bf7e Fix build from earlier merge 2013-03-22 18:41:23 -05:00
Adam f122f104c4 Merge remote branch 'attila/1.9+timermanager' into 1.9 2013-03-22 11:52:42 -05:00
Adam deedb3bdd7 Dont call SetCloakedHost in users constructor, just set chost, because SetCloakedHost logs a message like the user just changed their host 2013-03-22 11:46:30 -05:00
Adam d27aa03500 Merge branch '1.9' of github.com:anope/anope into 1.9 2013-03-21 23:40:16 -05:00
Adam dcffa5da6f Properly cleanup after entrymsglists and ajoinlists when destructed 2013-03-21 23:39:39 -05:00
Adam 221e79f50d Check for null pointers in HasMLock/SetMLock/RemoveMLock, cs_register can pass it some sometimes/possibly other places 2013-03-21 23:33:40 -05:00
attilamolnar d5a453b663 Improve TimerManager
Instead of adding timers into a vector and sorting them every time a timer is added, use a multimap
2013-03-20 19:42:50 +01:00
Adam a2d69fa431 Merge pull request #13 from attilamolnar/1.9+inspversionfix
InspIRCd: Don't reply to VERSION
2013-03-20 09:45:40 -07:00
Adam 6a0e4418f4 Check that channels still exist before nulling their ci pointer in channelinfos destructor
Change the persist setting on a channel to mean only that it is being
enforced ircd-side
2013-03-20 11:39:16 -05:00
attilamolnar 68eeac67c9 InspIRCd: Don't reply to VERSION
InspIRCd sends all known version strings at burst and remembers the version strings sent to it. When a client does a /version <server> the cached version string is sent.
2013-03-19 19:16:13 +01:00
Adam 731912f01e Add db_sql:import config option so we can know for sure whether or not we want a database import 2013-03-18 12:16:51 -05:00
Adam 51963915ba Remove remaining disable_ns_register references in example config 2013-03-16 21:53:03 -05:00
Adam 810685cb73 Have db_flatfile store object ids if they are set, even though it doesn't use them, so that if other database modules that use them are loaded they can keep track of objects properly 2013-03-16 20:08:39 -05:00
Adam 1a0e6b0be3 Allow autokicking real names, extbans, and channels 2013-03-15 12:27:08 -05:00
Adam 81c89bb708 Fix missing dependencies message to include the source folder, there is no specific source file on modules with multiple source files 2013-03-15 07:43:17 -05:00
Adam 01620e849a Update nickserv defult names for kill/killquick, hide email, usermask, and quit 2013-03-14 20:51:28 -05:00
Adam 4c74020a69 Add group and hide setings to fantasy{} blocks 2013-03-14 09:03:48 -05:00
Adam b95b8f0aae Fix setting BSDefFlags from the config 2013-03-14 09:03:48 -05:00
Adam 1ff7a7c1f1 Refactor mask/entry code, allow full matching (against users real host/ip) if their displayed host is their real real host. Also match against cloaked host even if full matching is not being done 2013-03-13 14:40:49 -05:00
Adam 1d16629a6d Allow opers to override chanserv kick/ban, botserv say/act, and akick's peace setting 2013-03-13 09:45:15 -05:00
Adam 72aa27ede5 Allow m_ldap_authentication to block email changes if emails are controlled by ldap, don't tell users they must change their email during initial user registration 2013-03-13 09:02:31 -05:00
Adam 05223dbe6d Identify requests hold command sources and users can disconnect between the request being dispatched and when it returns, so don't assume the source user pointer is always valid 2013-03-10 03:23:00 -05:00
DukePyrolator 06d43baf93 update the users password after a successful ldap authentication 2013-03-03 10:58:39 +01:00
DukePyrolator 5f74662100 improved the operserv mode command 2013-03-03 10:57:53 +01:00
Adam 2c68312d72 Bump for Anope 1.9.9-git 2013-03-03 02:04:33 -05:00
Adam ce094f4d01 Anope 1.9.8 Release 2013-03-02 23:42:01 -05:00
Adam 178056096f Regenerate language files 2013-03-02 23:42:00 -05:00
Adam a32c897bf9 Update Changes and Changes.conf 2013-03-02 23:42:00 -05:00
Adam 367b662c83 Fix compile warning in webcpanel/memos 2013-03-02 23:42:00 -05:00
Adam 75999e05b9 Fix Anope::Duration showing years failing 2013-03-02 23:42:00 -05:00
Adam 45c02f8e4e Fix build with -std=c++11 2013-03-02 23:42:00 -05:00
Adam ae4421b8a2 Unset founder/successors when channels are deleted 2013-03-02 23:42:00 -05:00
Adam 2d309da0f6 Fix /ns drop nick showing "your nick" and not the nick you specified if the nick isn't registered 2013-03-02 18:52:15 -05:00
Adam b9bbb3747b Fixed logic fail in /ns resend 2013-03-02 18:46:56 -05:00
Adam 0b05eaa020 Only shrink extensible items that are metadata in ExtensibleUnserialize 2013-03-01 01:40:14 -05:00
Adam 91ad9d22ca Fix Windows build 2013-03-01 00:57:24 -05:00
Adam 6aa9ad938a Don't have cs_seen update data for users on syncing servers 2013-03-01 00:56:47 -05:00
Adam 6808498ead Fix entrymsg's creation time being reset from restarts 2013-02-28 23:09:03 -05:00
Adam 8561941e22 Don't enforce session limit on clients with no IP on Unreal, fix typo in /cs down syntax, fix os_session messages to reference ip 2013-02-25 00:26:49 -05:00
Adam 5d4db2b854 Allow /cs up and /cs down to take an optional nick arg 2013-02-24 20:15:49 -05:00
Adam 501503b7a5 On startup check all object types 2013-02-24 20:14:15 -05:00
DukePyrolator a980e32581 fixed wrong parameter count in cs_updown 2013-02-24 21:07:10 +01:00
DukePyrolator da2fea338a fixed some stupid typos in the german language file 2013-02-24 09:48:20 +01:00
DukePyrolator 7cb70f5fa1 some updates to the german langfile 2013-02-24 08:14:13 +01:00
Adam d04db3d38b Add SVSNICK and SVSHOLD to hybrid 2013-02-23 17:41:52 -05:00
DukePyrolator 35c260877f Revert "do not send RESV from operserv when its not introduced"
This reverts commit 2336b4723c.
2013-02-23 11:20:31 +01:00
Adam 8cf7ec9cfe Add missing SVSHold funcs to plexus protocol module 2013-02-23 04:32:41 -05:00
Adam c67087d750 Fix akick list/view not showing masks sometimes 2013-02-23 04:32:41 -05:00
DukePyrolator 2336b4723c do not send RESV from operserv when its not introduced 2013-02-23 09:54:03 +01:00
Adam da61734860 Made FindService less dumb and able to do aliases to aliases 2013-02-22 04:42:08 -05:00
Adam a911354f24 Fix "leave" channel log level 2013-02-22 00:39:13 -05:00
Adam ae902443db Merge branch '1.9' of github.com:anope/anope into 1.9 2013-02-22 00:30:22 -05:00
Adam 5547c3ed24 This OnServerSync event hook in inspircd20 can go away (it does nothing currently) 2013-02-22 00:29:00 -05:00
Charles Kingsley e844cdf4f6 Update COPYING 2013-02-21 07:38:42 +00:00
Adam 2fa5cfa508 Add Matthew to webpanel credits, fix alignment of akill list 2013-02-20 18:00:46 -05:00
Adam 59792173e7 Merge pull request #12 from MatthewM/webcpanel
Web Panel Modifications
2013-02-20 14:58:59 -08:00
Adam ed68482b4e Add /cs mode clear command that behaves like the old /cs clear modes/bans/etc 2013-02-20 15:51:40 -05:00
Adam 32592987c8 Allow /os mode clear [all] to unset modes, similar to old clearmodes 2013-02-19 04:07:53 -05:00
Adam a1f92638e3 Merge branch '1.9' of github.com:anope/anope into 1.9 2013-02-19 01:28:27 -05:00
Adam 7d50818ee1 Fix some OpenBSD build issues, and bugs #1485 #1486 #1487 2013-02-19 00:48:21 -05:00
DukePyrolator d0e1f3b66a fixed a typo in the last SASL commit 2013-02-19 05:21:01 +01:00
Adam cb91f991a3 Made the mode bouncing detector harder to hit and ignore syncing channels 2013-02-18 22:10:57 -05:00
Jens Voß a49d7b12cb Merge pull request #11 from grawity/mailmap
Add mailmap for Git
2013-02-17 05:31:04 -08:00
Mantas Mikulėnas eda7b55bac Add mailmap for Git
...to clean up `git shortlog -nes` (and `git log` in future git
versions).
2013-02-17 15:19:11 +02:00
DukePyrolator bcf99d5998 SASL sends AUTHFAIL on unsupported mechanisms, fixes bug #1482 2013-02-17 12:26:51 +01:00
Adam 3ab6706993 InsIRCd only sends QUIT on KILL for users 1 hop from us, so always internally kill users that we kill. Bug #1481 2013-02-16 03:59:28 -05:00
Adam c40e9c3996 Fix missing CheckInit check in db_sql_live 2013-02-16 00:31:42 -05:00
Adam 7be23b7e37 Fix setting modes on botserv bots in channels that have other bots in them on startup 2013-02-15 23:18:34 -05:00
Adam d9c18a6072 Store hashes of the last commit instead of the last commit 2013-02-15 19:01:46 -05:00
Adam 73099b82e8 Fixed unserializing servers in dns zones 2013-02-15 18:32:06 -05:00
Adam fc1d7ea89b Switch Destroy methods to delete 2013-02-14 20:58:01 -05:00
Adam 391f2822c8 This Serialize::Destroy method isn't actually needed anymore. Fixes weirdness from a few Serializable items we had on the stack. Added a comment about why operator< in Reference fails. 2013-02-14 20:57:40 -05:00
Adam f0875c5d85 Iterators suck 2013-02-14 20:11:52 -05:00
Adam f6ef706909 Magiobiwan is silly 2013-02-14 01:24:29 -05:00
Adam 7656c25e38 Made chanserv/unban with no parameters unban you in every channel you have access in 2013-02-14 01:20:18 -05:00
Adam 5cf1edeb6e Fix CommandCSMode::CanSet letting everyone set voice 2013-02-14 01:20:18 -05:00
Adam 9e544a6443 Store what channels have references to accounts in NickCore to prevent having to iterate over all channels and then all access entries when nicks expire or from nickserv/alist 2013-02-14 01:20:18 -05:00
Adam 225b7c38c1 Make NickCore::aliases a vector 2013-02-14 01:20:18 -05:00
Adam 994866461c Update obj ts when constructed in db_sql 2013-02-14 01:20:18 -05:00
Adam fc4b884d0e Sort output in ns_list and cs_list 2013-02-10 12:31:37 -05:00
Adam 9b3ecfe777 Fixed sepstream::GetToken logic fail 2013-02-09 22:48:05 -05:00
Adam 20794981b3 (re?)add mlock set as a simple way to clear all mlocks and add new ones at once 2013-02-09 00:24:15 -05:00
Adam 01413dd3cc Use channel mode +r to determine if a channel has either been newly created or
created while we were offline (eg, during the inital burst to the
uplink). Fixes not knowing whether or not channels ops in non-secureop
non-persistent channels obtained op while we were offline by creating
the channel or legitimately by being set op by another channel op.
2013-02-07 21:49:49 -05:00
Adam 9d1fe6102c Made DNSServer::Find case insensitive 2013-02-07 21:49:49 -05:00
Adam 2472a41561 Merge pull request #9 from Robby-/1.9-ns_set_misc
Fixed ns_set_misc not showing help for its SASET commands
2013-02-05 08:04:45 -08:00
Robby- 65fbdcfa87 Fixed ns_set_misc not showing help for its SASET commands.
Added descriptions and SASETs for the remaining commented ns_set_misc examples, without a description they won't show up in HELP if someone actually enabled those.
2013-02-05 16:31:14 +01:00
Adam 25cec015e8 Made access del by nick and other functions from 326f1a really delete objects 2013-02-05 09:45:48 -05:00
Adam 62e3c8c4f8 Merge pull request #7 from artemiiav/patch-2
Fix validating nickserv:registration when it is set to disable.
2013-02-02 10:53:05 -08:00
Adam 8902c1f038 Merge pull request #8 from Robby-/1.9
Some more typo and help text fixes, missing privileges, settings corrections, and cs_enforce changes
2013-02-02 10:51:08 -08:00
Robby- 6c43bcc3e0 cs_enforce: Make the logging also show the channel it was used on, added 2 missing log calls, can now handle overrides by services operators. 2013-02-02 07:32:32 +01:00
Robby- 15b37c1e38 Some more typo and help text fixes, proper formatting of control codes, missing privileges, and settings corrections. 2013-02-02 07:30:53 +01:00
MatthewM 29fcdc5f40 Updated jquery API to v1.9.0 2013-01-31 21:24:48 -05:00
artemiiav 1075bb1dbc Update src/config.cpp 2013-01-31 22:33:14 +03:00
Jens Voß dccb0ee313 Merge pull request #5 from Robby-/1.9
Config file updates: text changes, ...
2013-01-30 22:50:11 -08:00
Robby- aea86906f4 Some configuration file updates: Removed now non-existing settings. Redid some existing settings to look more consistent/uniform. Added some missing commands/permissions.
Merged operserv/modlist permission into operserv/modinfo.
Fixed ChanServ INFO privilege to actually work for /BotServ INFO too for those users who have it, instead of only for founders.
Fixed some typos aswell as removed whitespaces along the way.
2013-01-31 06:19:14 +01:00
Adam a62698a14a Remove sendpass from the configs and the config reader since it no longer exists 2013-01-30 17:44:07 -05:00
Adam 47af43c281 Made Anope::Duration also show years 2013-01-30 11:24:57 -05:00
Adam ae2c82adbc Don't expire session exceptions if in noexpire mode 2013-01-30 10:39:52 -05:00
Adam 594b1a136d Evidently Persistant is not a word 2013-01-30 10:39:52 -05:00
DukePyrolator ae46cc7f73 fixed an infinite loop in ns_recover, caused by a very small typo. 2013-01-30 09:18:56 +01:00
Adam 6b2aad734e Fixed SQL::Data::IsEqual to really only return if the two are completely equal. Fixes oddities with caching objects that are actually updated. 2013-01-27 13:55:42 -05:00
Adam 98ccbe2b06 Old botserv flags need BS_ prepended to them 2013-01-27 10:50:55 -05:00
Adam 5ae100fea2 Add nickserv/alist priv, merge botserv/botlist and botserev/assign/private to botserv/administration 2013-01-27 05:00:00 -05:00
Adam 0052dd29a7 Fix db_flatfile not clearing databases on save if there are no objects left of that type (it will leave the old database with old objects currently) 2013-01-27 01:59:38 -05:00
Adam 50a42d2cbf Fix os_session to work with sql properly 2013-01-26 22:17:25 -05:00
Adam 49cb6a07a2 Fixed db_sql etc being confused on empty vs not set metadata 2013-01-26 20:52:49 -05:00
Adam ed7c4dc2e1 Made Anope::DoTime default to seconds to fix os_akill etc defaulting expiries to days 2013-01-25 04:05:38 -05:00
Adam c376fb0a2b I forgot to add this change to a634c7be65 2013-01-25 03:31:35 -05:00
Adam 76d9e58ae5 mysql_insert_id doesn't return an id if one isnt generated, so
check that it really returns a value before using it.
Also fix memos to cleanup after themselves when deleted.
2013-01-25 03:09:51 -05:00
Adam 3769cc1a35 Fix memo signon and memo receive default flag names 2013-01-24 08:53:35 -05:00
CuleX 74ace7d4b9 Channel::HasUserStatus: Don't just return false if cms is NULL. 2013-01-24 00:34:41 -05:00
Adam 647245a71f Add missing KeySet() func to SQL::Data 2013-01-23 22:16:01 -05:00
Adam a634c7be65 Fix some compile errors 2013-01-22 21:20:05 -05:00
Adam f656e3195f Add hidenetsplitquit config option to not show splits in /ns info's last quit field 2013-01-22 19:47:16 -05:00
lethality 8811545472 Fixed few minor typos 2013-01-22 17:32:23 +00:00
Adam cad3850f3d Move channel mode set and unset events to be after the action has been done internally to allow easially canceling it 2013-01-22 01:23:55 -05:00
Adam 7de058ba35 Fix crash trying to unset the permanent channel mode during channel syncs of empty channels 2013-01-22 00:24:58 -05:00
Adam ddaa001daf Merge usefulness of Flags and Extensible classes into Extensible, made most flags we have juse strings instead of defines/enums 2013-01-21 22:31:16 -05:00
Adam 51c049e1a7 Really fix Channel::GetModes 2013-01-21 18:03:31 -05:00
Adam 93472f84bd Revert "Fix Channel::GetModes, we can never have a negative mode set on a channel so this check is unnecessary"
This reverts commit 678d27fdb7.
2013-01-21 17:59:22 -05:00
Adam 678d27fdb7 Fix Channel::GetModes, we can never have a negative mode set on a channel so this check is unnecessary 2013-01-21 17:55:27 -05:00
Adam 369ca89c2e Allow channels that have users in them that are not the access list to expire while in use. 2013-01-21 06:46:28 -05:00
Adam 421db75528 Fix not logging debug info to the logfile when debug mode is enabled 2013-01-21 06:38:13 -05:00
Adam 846b56c724 Fix defcon timeout timer 2013-01-21 02:31:28 -05:00
DukePyrolator e62d2fe56e removed old cs_modes fantasy{} command blocks 2013-01-21 07:15:16 +01:00
DukePyrolator bb3abab784 removed loading of ns_set_chanstats and cs_set_chanstats from the chanstats.example.conf, this functionality is now part of ns_set/cs_set 2013-01-20 15:03:15 +01:00
Adam da6543d17b Allow grouping commands to make help output easier to comprehend 2013-01-13 22:07:27 -05:00
Adam 29a018088e Add svsjoin and svspart commands 2013-01-13 22:07:27 -05:00
Adam 7e7fc757d5 Allow ns_set_misc/cs_set_misc to have configurable help descriptions 2013-01-13 22:07:27 -05:00
Adam d3a6bdc68b Allow the config parser to skip over gettext's _() to allow translating config values 2013-01-13 22:07:27 -05:00
DukePyrolator 402e42fd15 check if the database exists before we try to backup it 2013-01-12 09:01:44 +01:00
Adam 5007b72b28 Update copyright to 2013. This was done with:
find include/ src/ lang/ docs/ modules/ *.* Config -exec sed -i 's/-2012 Anope Team/-2013 Anope Team/i' {} \;
2013-01-09 04:20:55 -05:00
Adam 9931ec2994 Use m_rewrite to rewrite op, deop, halfop, ... etc 2013-01-08 20:25:01 -05:00
Adam 5f3dfc2960 Track +g on inspircd, fix saving/loading mode locks for generic modes 2013-01-07 21:30:07 -05:00
Adam dc9e81a6fc Fix deleting access by number 2013-01-06 18:38:04 -05:00
Adam ed719c80e7 Buggy compilers are buggy 2013-01-06 16:13:35 -05:00
Adam 77dc2e4746 And really check for them using ssl... 2013-01-06 01:46:53 -05:00
Adam c5f4c8d174 Fixed enforce ssl to not ban users if the channel is ssl only 2013-01-06 01:19:25 -05:00
Adam 6ba49642d0 Fix fmode handling on inspircd20 2013-01-06 00:48:50 -05:00
Adam 9a2ef9dc00 Add sslonly, bans, and limit to /cs enforce 2013-01-05 22:42:07 -05:00
Adam 6ccf0a3428 Fixed os_dns not readding connected servers if configured 2013-01-03 13:39:50 -05:00
Adam 23e303aaa2 Move enforcer checks on nick and logout to nickserv.cpp 2013-01-03 13:20:10 -05:00
Adam 098157dca8 Don't delete users immediately when quit or killed, instead wait until message processing is done 2013-01-03 12:34:01 -05:00
Adam 827469600e Move nickserv validate stuff to an event in nickserv.cpp 2013-01-02 13:59:33 -05:00
Adam bf718e8698 Evidently not specifying NOT NULL is not enough to allow null timestamps 2012-12-30 10:30:29 -05:00
Adam 326f1a9c8b Cleanup after mode locks, badwords, akick, access, if destructed 2012-12-29 20:29:41 -05:00
Adam 793c438286 Remove clearuser references from configs 2012-12-29 11:09:54 -05:00
Adam 6b1f323bb5 Move some of CheckKick to the respective modules 2012-12-28 15:59:33 -05:00
Adam 761849083d Dumb iterators 2012-12-28 13:00:36 -05:00
Adam ae6ddf295a fixup part of 379b2c, dont use iterators after theyre erased 2012-12-28 11:17:01 -05:00
Adam b591e8cdc8 Use the same object for chanusercontainer and userchancontainer 2012-12-28 10:43:30 -05:00
Adam 379b2ccf92 The timestamp column in SQL should actually be null sometimes, and fixed some valgrind errors with db_sql_live 2012-12-28 10:43:30 -05:00
Adam 3fb4cf56b6 Merge pull request #4 from alexbarton/ngircd-fix-NJOIN
ngircd protocol module: Fix NJOIN, actually join users to the channel
2012-12-27 13:25:33 -08:00
Alexander Barton fdc62daa8b ngircd protocol module: Fix NJOIN, actually join users to the channel
Bug introduced by commit d33a0f75: "Pretty large coding style cleanup,
in source doc cleanup, and allow protocol mods to depend on each other":
Since then, the NJOIN command has been "ignored", no users were added
to channels at all while linking ...
2012-12-27 22:15:33 +01:00
Adam 05094b0da5 When processing many modes don't enforce mlock until all are set 2012-12-27 15:03:38 -05:00
Adam 4ab8a70b21 Add an expiry option to /cs ban 2012-12-27 11:06:00 -05:00
Adam c88a3fffd5 Remove clearusers. There is still kick * for this. 2012-12-27 09:50:44 -05:00
Adam 7b1ae9602d Put appendtopic and topiclock into /cs topic 2012-12-27 09:43:19 -05:00
Adam c7a22dff87 Add register type to os_forbid to prevent users from registering nicks or channels 2012-12-26 19:42:37 -05:00
Naram Qashat 45ee7c12d0 Clean up the logic in adding extra library directories, adding to LDFLAGS isn't needed. 2012-12-25 17:10:43 -05:00
Adam 392b591d09 Allow modules loaded after startup to magically reobtain their database objects. Fix os_dns for sql(live) 2012-12-25 15:52:58 -05:00
Adam 556a4375e2 Cleanup after os_dns on unload 2012-12-25 12:40:09 -05:00
Adam eab583310d Don't check userlimit when servers first connect, servers wont have any users at that point anyway 2012-12-25 12:36:58 -05:00
Naram Qashat 077ae27369 Fix linking libraries so their rpath is set correctly and isn't stripped on install. 2012-12-25 02:20:00 -05:00
Adam d4e1c958e2 packet->answers isnt always empty initially, like with axfrs 2012-12-25 01:09:03 -05:00
Adam 33ae442aa1 We can svsjoin on plexus 2012-12-24 18:15:38 -05:00
Adam 1285c7f0ca Allow os_dns to manage multiple zones 2012-12-23 15:30:08 -05:00
MatthewM 8c72892de1 Made the overlay resize and the alert box reposition when the window is resized 2012-12-23 14:56:02 -05:00
Adam dc751bd2f1 Combine all of the set modules now that having them split apart is almost completely pointless 2012-12-22 14:49:48 -05:00
Adam 0cde0aee34 Fixed memo mail messages, and allow %N to be in them. Bug #1462 2012-12-22 09:10:32 -05:00
MatthewM 503bda5b28 Move the var to set the time out into the same javascript tag that is used for the modal as it's related 2012-12-20 23:48:20 -05:00
MatthewM a4d5c40d63 Added the overlay to the vHost request function 2012-12-20 16:22:58 -05:00
MatthewM 8e219bdd77 Moved the javascript to header.html from memos.html to make it easier to intergrate the overlay feedback and do tweaks 2012-12-20 16:12:16 -05:00
MatthewM 5acc93dd34 Made the table cells for the memo table have no spacing and color the read and unread memos different colors 2012-12-20 01:19:04 -05:00
Adam 276247b463 Add a command flag to require that a user is executing the command 2012-12-19 16:03:53 -05:00
MatthewM d277f49423 Minor style tweaks to make the links look more like a button 2012-12-19 13:17:44 -05:00
Adam 67bd2c6b2d Add version flags for debug, git, and Windows 2012-12-19 09:21:25 -05:00
Adam 784683a68d Having these references to bots bugged out older compilers, so simplify this by just moving pointers to the core 2012-12-19 08:48:23 -05:00
Adam 3b2094301d Fixed typo in b6407afa06 2012-12-18 10:35:11 -05:00
MatthewM 6572754c10 Cleaned up the overlay layout, added some minor visual and js fixes 2012-12-18 10:34:33 -05:00
MatthewM f157ea3fdb Added a click reply function to the MemoServ memos page that autofills the senders name 2012-12-18 10:04:26 -05:00
MatthewM ddd7fe6f05 Bug that was experinced seems to be somewhat related to Windows 8 and maybe an extension on chrome. Reverting to previous commit 2012-12-17 22:03:21 -05:00
MatthewM 47a351acb2 Fixed a minor bug that overlapped the nav links and the content from .content in Chrome on Windows 2012-12-17 19:26:07 -05:00
MatthewM ff9f670871 Give the overlay window a rounded edge to make it look a bit nicer and fade the main content a little less 2012-12-17 18:28:15 -05:00
MatthewM f33f7d98c4 Added a modal window interface to MemoServs page that will automaticly fade out after a give time (currently 5s) 2012-12-17 14:32:28 -05:00
Adam c49f03f985 Allow escaping brackets in webpanel templates and redirect users to the homepage when their session is not found 2012-12-15 23:51:25 -05:00
MatthewM 6b5f583ff3 Merge Adams commit to allow escaping of brackets 2012-12-15 21:46:14 -05:00
Adam 8e3ab0d10b Made all langauges default to the UTF-8 charset 2012-12-15 21:35:38 -05:00
MatthewM a049092526 Merge branch '1.9' into webcpanel 2012-12-15 21:05:05 -05:00
Adam b6407afa06 Fix chghost/chgident/etc on inspircd20 2012-12-15 05:13:09 -05:00
Adam fbd3cda320 Merge pull request #2 from czaks/conv-languages-to-utf-8/1.9
Convert locales to utf-8 charset
2012-12-15 01:15:03 -08:00
Marcin Łabanowski 05341828b5 Convert the language files to utf-8 encoding.
The files have been converted using the following script:

for i in *.po; do
  cat $i | grep charset | cut -d= -f2 | cut -d\\ -f1 > charset
  echo Converting $i from `cat charset` to UTF-8
  iconv -f `cat charset` -t UTF-8 < $i | sed "s/`cat charset`/UTF-8/g" > $i~
  mv -f $i~ $i
  rm -f charset
done
2012-12-15 09:39:12 +01:00
Marcin Łabanowski 280ba89b26 Fix the language files to state the correct charset. 2012-12-15 09:28:19 +01:00
Adam fe7fcc2dc3 Check for NOJOIN being < 0 but restricted on in db_old 2012-12-15 02:44:53 -05:00
Adam dcd34d3728 Move DNS handling to a module 2012-12-15 01:33:31 -05:00
MatthewM dced01fc24 Added a large scroll box for the chanserv main page 2012-12-15 01:14:52 -05:00
Adam cdec0a3f96 Fixed some html errors in the last commit 2012-12-14 16:47:45 -05:00
MatthewM 1075f3b457 Allow opers to drop channels
Added chanserv drop to web panel
Allow long lists of akills to scroll
2012-12-14 16:44:14 -05:00
Adam c1077faa28 Optimize much of the database code and serialize code. 2012-12-13 06:12:56 -05:00
Adam 76ba147c22 Unregister operserv_akill page on unload in cpanel 2012-12-12 02:28:19 -05:00
Adam 1c1a216df1 Only allow non-user sources to register nonexistant channels 2012-12-12 01:33:58 -05:00
Adam 04f96a54b8 Some small improvements to last few commits, and fixed some problems with the template engine 2012-12-12 01:30:50 -05:00
Adam 5f72d1fda5 Squashed commit of the following:
commit 317ead6b39
Author: MatthewM <mcm@they-got.us>
Date:   Tue Dec 11 02:14:06 2012 -0500

    Added the HostServ link to the navigation bar

commit 6b15d7fc5e
Author: MatthewM <mcm@they-got.us>
Date:   Tue Dec 11 01:58:18 2012 -0500

    Correct some slight over sights that was missed eariler

commit b356a46789
Author: MatthewM <mcm@they-got.us>
Date:   Mon Dec 10 23:44:51 2012 -0500

    Started work on adding HostServ to the web panel
2012-12-12 01:04:08 -05:00
Adam dfff54425b Fixed webpanel fail on nondebug builds 2012-12-12 00:49:16 -05:00
DukePyrolator 0edd26467e IsNickValid() now accepts '[' and ']' in the nickname 2012-12-11 05:27:56 +01:00
DukePyrolator e71c890cf5 added a missing permission for operserv/global to the Services Administrator block in example.conf 2012-12-09 14:32:16 +01:00
DukePyrolator eada35df36 fixed a problem with the webcpanel logout when using apache + mod_proxy 2012-12-09 14:21:42 +01:00
DukePyrolator 8d4a08ccc1 fixed a log message showing the wrong IP 2012-12-09 14:19:30 +01:00
Naram Qashat 9dec093676 Modified the Config scripts to ask the user explicitly for additional include and library directories. 2012-12-07 03:02:15 -05:00
DukePyrolator f711dd3460 ngircd protocol module: improved vhost support 2012-12-05 06:18:36 +01:00
Adam 7a865b6b28 Only bad-password users when the account theyre trying to identify for actually exists 2012-12-02 04:31:50 -05:00
DukePyrolator faaaae365a enc_sha256: the length of the digest is SHA256_DIGEST_SIZE, not SHA256_BLOCK_SIZE. also removed an unneeded trailing NULL byte. 2012-12-02 09:16:40 +01:00
Adam 705d1efeab Allow services to return more than one NS record 2012-11-30 20:49:59 -05:00
Adam c0f60d56a1 Change /os reload to not unnecessarially rebuild httpd servers. Change m_httpds Log methods to the module version. 2012-11-30 20:44:21 -05:00
Adam a4468dd56e Allow modules to use the encryption modules to encrypt arbitrary things.
Made enc_old depend on enc_md5.
Allow not loading any encryption modules if you want to only use an
external mechanism.
Removed ns_sendpass since it's just a bad idea.
2012-11-30 02:53:03 -05:00
Adam 337f361526 Fix warnings from classes with virtual functions not having virtual destructors 2012-11-29 17:03:53 -05:00
Adam 26a048e5c4 Rewrite/simplify some of m_httpd 2012-11-28 22:54:26 -05:00
Adam ccd41e7efe Use signon for svid on bahamut, not timestamp 2012-11-28 00:42:07 -05:00
Adam a1a5ba0723 Use signon for svid on unreal, not timestamp 2012-11-27 21:43:17 -05:00
Adam 8a6962fc36 Keep track on what ircds we can svsjoin, add an svspart method 2012-11-26 23:09:26 -05:00
Adam f23bad140b Revert a small part of 90930619bc, evidently this was important 2012-11-26 19:50:29 -05:00
Adam 1bfafd9eb6 Fixed rehasing doing weird things to botmodes due to trying to set on nick not uid 2012-11-26 04:30:30 -05:00
Adam 1bdb756b25 Restrict the length of kick reasons in cs_kick, cs_ban, and cs_akick 2012-11-25 22:37:54 -05:00
Adam 80c573eed7 Merge remote branch 'cronus/1.9+unrealtokens' into 1.9 2012-11-25 21:47:10 -05:00
Cronus 78607ea60c Remove UnrealIRCd's TOKENS, they are kinda useless 2012-11-25 20:35:45 -06:00
Adam 0110214abc Fix build the last arg on fantasy commands to chanserv 2012-11-25 20:58:35 -05:00
Adam 54d8695e70 Add commented command{} blocks for how 1.8 worked, don't show saset in the help list to registered users. 2012-11-25 20:36:57 -05:00
Adam a2441fd326 Rename restoreonghost in nickserv.conf 2012-11-25 19:47:09 -05:00
Adam 831a1d15d5 Merge ns_ghost, ns_recover, and ns_release. Fix svskilling users on Unreal. 2012-11-25 19:41:36 -05:00
DukePyrolator 6b5df8e62f added a config block for cs_seen in chanserv.example.conf 2012-11-25 05:44:31 +01:00
Adam 0210cf2b17 Make the actual clients into services too 2012-11-24 21:22:32 -05:00
Adam f0708340ef Fix parsing fjoin on inspircd 2012-11-24 19:10:07 -05:00
Adam a44bf31d27 Helps to name ping right 2012-11-24 17:19:08 -05:00
Adam 002f00d7eb Add IP.Board m_sql_authentication query to modules.example.conf, from Genesis2001 2012-11-24 02:15:19 -05:00
Adam ded89b0d49 Made IRCDProto a Service 2012-11-23 23:10:41 -05:00
Adam 36b1166cf6 Change the return type of ircdmessage to void now that we don't use it, add an ircd message module event, and a few more fixups 2012-11-23 16:56:06 -05:00
Adam 0e7bd9f3ba Fix compile/pch generation 2012-11-22 20:27:42 -05:00
DukePyrolator 7963534940 fixed some compile errors 2012-11-22 21:44:51 +01:00
Adam d33a0f75a5 Pretty large coding style cleanup, in source doc
cleanup, and allow protocol mods to depend on each
other
2012-11-22 00:50:33 -05:00
DukePyrolator 368d469631 added METADATA and vhost support to the ngircd protocol module 2012-11-18 10:34:35 +01:00
DukePyrolator efd3c04f37 fixed a typo in IRCDMessageSetName in the unreal protocol module 2012-11-18 09:50:23 +01:00
Adam 5fe6f0b2ec This should be find, not find_first_of 2012-11-16 00:06:07 -05:00
Adam 5d6fb2427e Fixed some stuff spotted by Cronus, made db_old convert ACCESS_INVALID levels to ACCESS_FOUNDER, fix cs_enforce +R from an earlier commit, fixed ChangeModeInternal TS checking when IRCds don't send TS on mode 2012-11-16 00:03:15 -05:00
Adam ad3d1d381a Never log debug levels >= 2 using a log block 2012-11-10 13:57:06 -05:00
Adam b51f60cc1e Fix user account logout message 2012-11-10 13:57:06 -05:00
DukePyrolator 504232b388 added support for the ngircd SQUERY command 2012-11-10 18:29:35 +01:00
Adam 8f36f65f39 Made access del and xop del behave like access add/xop add by using a users mask if given an unregistered nick 2012-11-09 19:20:17 -05:00
Adam ff3e396e92 Add a config option to disable sasl 2012-11-09 19:13:33 -05:00
Adam 2fe387b4f0 Update bi->lastmsg in cs_log when something is logged via privmsg 2012-11-07 23:23:02 -05:00
Adam 9ec482b7c2 I haven't a clue why this was here but its not even remotely right.. fixes #1448 2012-11-07 22:20:48 -05:00
Adam 53e8cd18dc Duplicate check some of these larger hashmaps on insert, just incase 2012-11-07 21:57:31 -05:00
Adam ac57f41c87 We no longer have to use the rungroup provided at build time, it is specified in the config now 2012-11-07 19:36:59 -05:00
Adam 8b78b6bb10 Fix crash on suspend etc if kicking a user causes the service bot to part when the service bot is next in the userlist (as we have an iterator to it) 2012-11-07 15:41:49 -05:00
Adam 52fa66820c Give suspend the correct permission in botserv.conf, fix pch build 2012-11-07 15:17:58 -05:00
Adam 72eb2ccf50 Sometimes capab is sent as one parameter 2012-11-06 11:02:12 -05:00
Adam 4cfd468863 Made os_noop more useful 2012-11-06 11:02:12 -05:00
Adam 0cf8d73395 Added log messages for all of the other chanserv commands that should be logged 2012-11-06 11:02:12 -05:00
Adam 53b2bdfe5e Use std::tr1::unordered_map for a few of the larger maps 2012-11-06 11:02:12 -05:00
Adam 27ab6a686c Windows fixes 2012-11-06 11:02:12 -05:00
lethality 22c8297a03 Added chanserv/status to fantasy commands 2012-11-06 15:19:56 +00:00
Adam d22e86376b Catch the exception from /os session view invalidip 2012-11-05 15:59:11 -05:00
Adam fb56b3a53f Made m_xmlrpc use m_httpd 2012-11-03 22:04:19 -04:00
DukePyrolator 0c47017046 added support for SVSNICK in the ngircd protocol module 2012-11-03 09:40:01 +01:00
DukePyrolator 792091b23c cs_seen: do not read duplicate SeenInfo entries from the database 2012-11-02 18:35:33 +01:00
Adam b917361de8 Fix pch generation 2012-11-01 16:26:59 -04:00
Adam a0a54fdfe0 Expand options:hideprivilegedcommands to not show commands requiring authentication to unidentified users 2012-11-01 16:15:44 -04:00
Adam d90d5d538b Fixed operserv/umode serv help entry 2012-11-01 14:54:14 -04:00
Adam c2ae76248e Made db_old load exceptions.db 2012-11-01 14:47:23 -04:00
Adam 9aa71af1e5 Accept 1.8s svid ts on plexus too 2012-11-01 14:47:23 -04:00
Adam b64abebd24 Made os_logsearch search oldest logs first so the newest entries are at the bottom of the list 2012-11-01 14:47:23 -04:00
Adam 90930619bc Fixed quite a bit of dumbness with m_ssl. Had to
modify socketengines to allow polling for write &
no read, but is it cleaner now. Made m_httpd able
to listen using SSL.
2012-11-01 14:47:23 -04:00
DukePyrolator 5b1c823019 fixed importing mode locks in db_old 2012-11-01 05:28:57 +01:00
Adam b2b4f21e39 Clarify the path given to Config isnt actually the bin path, but the path Anope is installed to 2012-10-31 23:11:06 -04:00
Adam 22e55165c9 Fixed anopesmtp logging 2012-10-31 22:57:11 -04:00
Adam 35c2256849 Apparently sending this all at once didn't work that great, so wait for the events before sending the joins/modes etc 2012-10-31 17:37:19 -04:00
Adam 3a10fca75f Fix ns_ghost and ns_recover, add nicksev:restoreonghost 2012-10-31 12:37:43 -04:00
Adam a39947cd3c Made os_forbid honor nssecureadmins 2012-10-30 22:07:15 -04:00
Adam 1730bfb2bc Send uids everywhere when setting modes on clients 2012-10-30 21:22:10 -04:00
Adam 26a4a13cdf Made os_mode a bit smarter 2012-10-30 20:40:42 -04:00
Adam 36f357c354 Fixed build errors and warnings with -std=c++11 2012-10-30 17:10:31 -04:00
Adam b07928eea9 Clean up ngircd proto mod slightly, and send sqlines before introducing clients 2012-10-30 15:50:39 -04:00
Adam 1ef7480380 Fix inspircd mode message for channel modes. It never actually uses this, but other pseudoservers may send modes using this and not fmode (it has no timestamp) 2012-10-30 15:21:47 -04:00
Adam e4c2dcc0c7 Made db_old load up most of the old mode locks 2012-10-29 21:51:34 -04:00
Adam 7bdad857e4 Only show mode lock in /cs info if there really is a mode lock 2012-10-29 21:28:43 -04:00
Adam c2a8ad26af Fix formatting fail in cs_status 2012-10-29 17:47:26 -04:00
Adam fedf235c83 Update Config.cs for VS 2012 and fix it failing if the source directory path has spaces in it 2012-10-29 17:07:10 -04:00
Naram Qashat e88d2c2031 Make it so CMake doesn't complain if packing on a system using Visual Studio Express. 2012-10-29 16:40:19 -04:00
Adam 20e4685057 Readd cs_status 2012-10-29 14:54:49 -04:00
Naram Qashat ca55e15d44 Fix building under Mac OS X via Makefiles if not using an Xcode project. This is a hack but CMake currently provides no other way to determine if the detected C++ compiler was identified as Clang. 2012-10-29 14:06:42 -04:00
Adam bb5e4127d7 Made MailThread completely threadsafe, currently theres a race condition with config reload + sending mail at once 2012-10-29 13:51:38 -04:00
Adam 30028a2404 This include is unncessary 2012-10-29 13:46:21 -04:00
Adam 6883309927 Made anopesmtp less hard to debug 2012-10-29 13:46:21 -04:00
DukePyrolator 9c8570ac68 readded ngircd protocol support 2012-10-29 04:17:24 +01:00
Naram Qashat 4dfc0f952f Fix cmake generation due to this if not being updated. 2012-10-27 12:09:07 -04:00
Adam d6e1b92059 Add a module log type 2012-10-27 08:12:04 -04:00
Adam bb5f4555dc Ues timestamp for dns serial not yyyymmddnn.. there are too many problems with this (restarts, >99 zone updates/day, etc) 2012-10-27 05:34:36 -04:00
Adam 32d33ca8e5 Expand single digit serial revisions to match nn 2012-10-27 04:44:10 -04:00
Adam e1dcf24c98 Add nickserv:modesonid config option to set what modes users get on identify 2012-10-26 17:30:41 -04:00
Adam 3b24311db6 Sometimes zone transfers can be really big 2012-10-26 12:57:25 -04:00
Adam 8fd3fc7c13 Add sasl support to unreal, inspircd 2012-10-26 10:46:19 -04:00
Adam 8d27b25bf8 Don't attempt to process any query packets if we aren't explicitly given permission to bind to a port (we do anyway currently for m_dnsbl to get replies) 2012-10-26 00:55:04 -04:00
Adam 727b35536f This code isn't used 2012-10-25 23:44:34 -04:00
Adam bbe667dc74 Fixed two memory leaks in cs_seen 2012-10-25 22:29:10 -04:00
Naram Qashat 3608d42ae9 This version needs a better tag than "-git", so there. 2012-10-25 22:26:59 -04:00
Adam 8f33933dd8 Default xlines to be set by OperServ 2012-10-25 21:31:58 -04:00
Adam e5efe42ecb Fixed showing users from the right server on unreal/bahamut 2012-10-25 04:30:22 -04:00
Adam 10e21bfeda Fix handling clients on unreal that have no ip (it sends a *) 2012-10-25 01:30:41 -04:00
Adam 00256fdba8 Made access provider modules permanent. They don't cleanup their access entries currently and if they did it would delete them. 2012-10-24 23:30:21 -04:00
Adam 3b8fb7bb88 When db_sql_live gets new objects immediately update cache on them to prevent rewriting later if they aren't changed 2012-10-24 22:48:12 -04:00
Adam 1057fa8421 BIND's forward ability did not work as I expected
because it will not forward non recursive queries.
So, added support for SOA, NS, and AXFR requests.
2012-10-24 19:32:26 -04:00
attilamolnar fca9ec085e InspIRCd: Add handler for FIDENT to 2.0 protocol, so we know when someone changes ident on the network 2012-10-24 07:40:16 -04:00
DukePyrolator ef5c6684c7 Merge branch '1.9' of ssh://anope.git.sourceforge.net/gitroot/anope/anope into 1.9 2012-10-24 05:12:47 +02:00
DukePyrolator e0438e3a7e fixed calculating the correct channelcount for an user when loading the db. fixes bug #1450 2012-10-24 05:12:13 +02:00
Adam 04632bd381 Cleanup of last few commits/warning fix 2012-10-22 17:02:01 -04:00
Adam 0b9db15efc Add os_dns, a way to control your DNS zone via services 2012-10-22 00:54:30 -04:00
DukePyrolator d5b2f9cfa7 Base has to destruct before Extensible does because objects that destruct due to Extensible destructing don't have their references to the already destroyed object for Base invalidated. (fixed for NickAlias and NickCore) 2012-10-21 18:29:10 +02:00
Adam 727c3d5b75 Base has to destruct before Extensible does because objects that destruct due to Extensible destructing don't have their references to the already destroyed object for Base invalidated 2012-10-18 20:06:02 -04:00
Adam eddb7684c1 Fixed protoctl parsing on Unreal + fix SendLogout now the usage has changed 2012-10-17 20:22:44 -04:00
Adam 484baba6ad Actually show the correct number of entries on /os logsearch output 2012-10-15 03:54:26 -04:00
DukePyrolator 88f10a2c3c Updated the hybrid protocol module, patch provided by Michael
- Change mode handler to use UIDs within SVSMODE messages
- The IP can be 0 in UID messages depending whether or not a client is spoofed
- Removed SendGlobopsInternal handler. Anope is using GLOBOPS by default
- Set user's services timestamp/account to 0 instead of 1 on /ns logout, otherwise the UID message handler will
2012-10-14 20:13:41 +02:00
Adam ffa1c976f5 Use account name for svid on hybrid 2012-10-14 01:50:14 -04:00
Adam 4fdc157f68 Better clarify signon vs timestamp and allow updating users timestamp to an ircd given value from NICK 2012-10-14 01:05:24 -04:00
Adam 0a950669cb Add a hybrid 8 protocol module courtesy of Michael <michael@wobst.at> 2012-10-13 23:49:15 -04:00
Adam 1232018332 Allow services operators to modify/view other users autojoin lists 2012-10-13 06:21:53 -04:00
Adam 6237613439 And update modules.example.conf 2012-10-13 00:40:44 -04:00
Adam 4424abd15d Add m_sql_oper 2012-10-13 00:37:10 -04:00
Adam 76a0471c29 Simplify the db_sql_live code since this isn't actually necessary. Fixes a problem internally ovwrwriting data on objects that we have modified and are queued because of assigning something to a serialize_obj reference 2012-10-13 00:37:10 -04:00
DukePyrolator e08422a4ea fixed MODE handling in the ratbox protocol module 2012-10-12 22:47:35 +02:00
Adam 757ff06011 Fix m_ldap to reconnect automatically if the ldap server goes away 2012-10-10 23:08:00 -04:00
Adam 06defe014b Merge remote branch 'attila/1.9+topiclockmsg' into 1.9 2012-10-09 19:34:24 -04:00
Adam 63bf134321 Merge remote branch 'attila/1.9+msgfix' into 1.9 2012-10-09 19:34:11 -04:00
Adam 2113494274 Send privmsgs and notices to uids if applicable 2012-10-09 19:33:24 -04:00
attilamolnar 912f068fe4 Fix wrong error message when --dbdir has no argument 2012-10-09 23:31:20 +02:00
Adam 8f5d786f0e Cleanup ok if modules with pending identify requests are unloaded 2012-10-09 05:22:02 -04:00
Adam 1dacc648a0 Made the warnings given by cmake for not having
the dependencies for modules look less scary as
they confuse dumb people currently
2012-10-09 04:13:04 -04:00
Adam 3af786d4c9 Fix fantasy !help & give it its own help header, not ChanServ's 2012-10-08 20:58:47 -04:00
Adam e57b470e83 Made fantasy commands configurable 2012-10-08 04:16:23 -04:00
Adam b8b63ff115 Remove the asynchronous identifing hack and replace it with something better. Fixes m_*_authentication only being able to properly work when people identify normally using nickserv/identify 2012-10-07 22:39:58 -04:00
attilamolnar 959a3f3cca InspIRCd: Log when server-side topiclocking is enabled in the config but the module is not loaded 2012-10-07 11:49:38 +02:00
Adam 0a111c1976 Fix compile from bda3b1fa3a 2012-10-07 02:13:14 -04:00
DukePyrolator 4b68f0447c updated docs/LANGUAGE to point to the right directory where users should put module language files 2012-10-07 08:00:31 +02:00
Adam 31914b200b Merge remote branch 'remotes/attila/1.9+addline' into 1.9 2012-10-07 01:46:44 -04:00
Adam ebb3fca698 Release holds on a nick on identify, if there is one 2012-10-07 01:45:43 -04:00
Adam 7f72b466ac Set sane default last_topic_setter and last_topic_time in the event an empty topic is locked right after registering a channel without previously being set 2012-10-07 01:29:49 -04:00
Adam 4751c735ec Fixed module language file path 2012-10-06 22:54:52 -04:00
attilamolnar bda3b1fa3a InspIRCd: Make functions that send ADDLINE and DELLINE, call them from the rest of the module 2012-10-07 03:15:42 +02:00
Adam 4ec10d798b Fixups and cleanup for the last few commits 2012-10-06 20:11:47 -04:00
attilamolnar 3dd21e4dcd InspIRCd: Add support for server side topic locks using METADATA topiclock 2012-10-07 01:35:14 +02:00
attilamolnar 682d76835e InspIRCd: Add support for sending detecting m_topiclock and sending SVSTOPIC when it is available 2012-10-07 01:33:49 +02:00
attilamolnar 42aa367f16 InspIRCd: Send channel METADATA using a dedicated function 2012-10-07 01:32:31 +02:00
attilamolnar ec8a1bcc82 Add a config option for server side topic locks 2012-10-07 00:59:49 +02:00
attilamolnar 2d9541c4c8 Parse and store the spanningtree protocol version for InspIRCd 2012-10-06 02:18:48 -04:00
attilamolnar e747ba6c26 InspIRCd: Add metadata handler to recognize when a module is loaded or unloaded on the ircd side and adjust our behavior accordingly 2012-10-06 02:06:23 -04:00
attilamolnar 4431a34987 InspIRCd: Allow METADATA handler to differentiate between user, channel and other/server metadata 2012-10-06 02:06:23 -04:00
attilamolnar 14d7de0cf3 InspIRCd: Remove has_svshold, use IRCDProto::CanSVSHold 2012-10-06 02:06:18 -04:00
Adam cd28fdc192 Show the correct reciever nick when use strict privmsg is enabled 2012-10-06 01:01:45 -04:00
Adam 25fe9c7084 Do not process() socket engine on shutdown 2012-10-05 16:23:40 -04:00
lethality 94fc2ba9c9 Merge branch '1.9' of ssh://anope.git.sf.net/gitroot/anope/anope into 1.9 2012-10-05 15:15:50 +01:00
lethality 2f87b8e430 Revert this strangeness I created ;) 2012-10-05 15:14:19 +01:00
Adam eff61c7a97 Add an event for when nick or channel options are set 2012-10-05 05:03:55 -04:00
Adam 7c96227cd3 Use memcpy for Anope::Unhex not strcpy 2012-10-05 01:20:32 -04:00
lethality dcfae6332e Some minor fixes/typos 2012-10-03 21:22:03 +01:00
Adam 69437bb324 Fixed parsing squit (it has a reason) 2012-10-03 05:17:32 -04:00
Adam 7551245f57 Attempt #2 at silly topic ts thing, this is actually must cleaner 2012-10-02 23:30:31 -04:00
Adam 47bc551485 Revert "Fix topiclock on inspircd"
This reverts commit 87478187af.
2012-10-02 22:59:20 -04:00
Adam 87478187af Fix topiclock on inspircd 2012-10-02 22:16:35 -04:00
Adam 7042223f2e Somehow the kick handler got lost in the confusion. Send the topic time with ftopic on inspircd not the current time. Removed some unneeded protocol functions 2012-10-02 21:21:37 -04:00
Adam 93698f0d61 Added operserv/logsearch 2012-10-02 05:18:42 -04:00
Adam f7aa837696 Don't unassociate accounts with users on nick changes 2012-10-02 01:30:35 -04:00
DukePyrolator e1d1d18288 added an operserv/akill page to webcpanel 2012-10-02 05:36:31 +02:00
DukePyrolator 20a6f82753 modified the nickserv alist command to return nc->display instead of the parameter provided by the user 2012-10-02 05:35:44 +02:00
DukePyrolator aec6cac8ca Merge branch '1.9' of ssh://anope.git.sourceforge.net/gitroot/anope/anope into 1.9 2012-10-02 04:14:50 +02:00
DukePyrolator ffca6a762d fixed a small bug in the inspircd protocol modules 2012-10-02 04:11:52 +02:00
Adam 2d2ab4fec4 Fixed handling TOPIC on unreal, dont set topics in Channel::Reset unless we are synced, and fixed ts checking in Channel::SetModesInternal 2012-10-01 21:26:41 -04:00
Adam a434baed91 Allow modules to store data in their own databases. 2012-10-01 18:50:29 -04:00
Adam f14a3dfb8a Fix a few problems found by Cronusa and KindOne 2012-10-01 04:35:36 -04:00
Adam b19a3af4db Add networkinfo:chanlen config directive 2012-10-01 02:29:31 -04:00
Adam 89428a9d10 Cleanup of all of the protocol modules, rewrote message handling system to be a bit more C++ ish 2012-10-01 01:56:57 -04:00
Adam b937d6310d timestamp column is a special case too 2012-09-30 21:36:49 -04:00
Adam ad37bc9639 Bug #1445 - Empty out columns in SQL we have no data for on
insert. This is caused from serialize() only setting a key on
certain conditions and otherwise doing nothing at all.
2012-09-30 20:30:27 -04:00
Adam 56df1abdd8 Place runtime module binaries in data/runtime instead of lib/ incase of a system wide install where lib/ is not writable 2012-09-30 20:30:27 -04:00
Adam 0ea5e57298 Use RTLD_NOW when loading modules to resolve all symbols immediately.
This prevents modules with unresolved symbols from loading instead
of loading and crashing later.
2012-09-30 20:30:27 -04:00
Adam 3838eb1f05 Add webpanel contributors to readme and remove todo since its way out of date and has nothing more in it we want 2012-09-30 20:30:27 -04:00
Adam 9ba7196881 Make CommandSource use references, sometimes we hold them for awhile 2012-09-30 20:30:27 -04:00
DukePyrolator 1e71303ffa fixed nickserv alist 2012-09-30 13:58:17 +02:00
lethality 74117a1e1e added some example sql queries 2012-09-29 23:55:55 +01:00
Naram Qashat 38ad523f91 Fix a few oddball warnings that came up from clang, and also make it so webcpanel.so can be compiled under Mac OS X. 2012-09-24 15:54:49 -04:00
DukePyrolator a71e2fb64e make nickserv glist check if the given nickname is in the group of the user before checking for services oper 2012-09-23 20:57:35 +02:00
Naram Qashat 1b20ec8747 Forgot to delete a line in the last commit. 2012-09-22 04:18:41 -04:00
Naram Qashat d30e53ee2c OK, so the FIND sub-command of string() in CMake was only added with 2.8.5, change this to use the REGEX sub-commands instead. Also while I'm at it, make -pthread only get added when not on Mac OS X, it's auto-included there. 2012-09-22 03:45:51 -04:00
Naram Qashat aa57ad6082 Fix issues with CMake trying to add /System/Library/Frameworks/Kernel.framework/Headers/sys to the include paths. 2012-09-22 02:10:49 -04:00
lethality 097893bfbf Updated example query to include a valid value 2012-09-13 15:29:04 +01:00
Adam 16019c9827 Add m_sql_authentication to allow authenticating users against an external SQL database 2012-09-12 21:10:02 -04:00
Adam f391100586 Fixed gettext on freebsd/any other system that uses LANG not LANGUAGE 2012-09-10 21:39:04 -04:00
Adam c4a1e1bb0c Fixed os_defcon too 2012-09-08 04:51:44 -04:00
Adam 7e3b5bed50 Add chanserv/set/autoop, like nickserv/set/autoop but for channels 2012-09-07 23:44:15 -04:00
Adam c9c477ff9d These saset command stubs can go away 2012-09-07 22:27:28 -04:00
Adam 4eb7db80a6 Fix os_session to really use ips for quits, don't enforce session for spoofed users/other users who have no ip, clean up warnings 2012-09-07 21:22:19 -04:00
Adam 9d6626f70c Made session tracking ip based, not host based, and allow using CIDR to group multiple ips from one subnet to one session 2012-09-07 12:04:25 -04:00
Adam 5c07863ad5 Allow configuring killquick and kill delays 2012-09-07 08:46:28 -04:00
Adam 3060375251 Fixed m_ldap_authentication not returning anything if the search for an account game back empty 2012-09-07 06:52:56 -04:00
Adam 3c63e44d32 Allow ; and } in quoted strings 2012-09-07 05:59:28 -04:00
Adam 02d943bfb0 Not quite sure what I was thinking here 2012-09-05 02:56:59 -04:00
DukePyrolator 4c8fef264e updated example.conf 2012-09-03 11:05:17 +02:00
Adam 082cf8ace8 Windows cares this is escaped + chmod too 2012-09-02 22:56:17 -04:00
Adam 1fd193840d Fix CMake to actually make directories on install ..... 2012-09-02 22:39:05 -04:00
Adam b1f8e910eb Version bump for 1.9.8-git 2012-09-02 09:48:13 -04:00
Adam 81cf9f0c71 Anope 1.9.7 Release 2012-09-02 08:31:43 -04:00
Adam 3264669e03 Update version.log 2012-09-02 08:31:34 -04:00
Adam 271d723bbd Update Changes 2012-09-02 08:31:11 -04:00
Adam a0c4575122 Regenerate language files 2012-09-02 08:31:04 -04:00
Adam 1af64a9bbb Fix Windows 2012-09-02 08:30:54 -04:00
Adam e3d5140dcc Added a web panel module + a default template 2012-09-01 18:54:51 -04:00
Adam f81d0113a2 Actually set xline's manager... 2012-08-28 00:39:50 -04:00
Adam fde42899e7 Fixed db_old loading encrypted passwords from 1.8 2012-08-09 23:28:02 -04:00
Robby f7bf2fa960 Put motd in conf/ not data/ and fixed the default values in the config 2012-08-08 17:09:34 -04:00
Cronus b894a569c9 Update pid and motd file paths 2012-08-08 04:28:33 -04:00
Adam 48022c3ddf Warn about really big integer values in the config 2012-07-18 16:52:14 -04:00
Adam 28aa981464 Actually the core can't handle empty realnames, just ignore them 2012-07-01 23:50:38 -04:00
Adam 2b8a09bf55 Remove some unused code in inspircd20 protocol module & allow /chghost/ident/naming services clients 2012-07-01 22:26:05 -04:00
Adam a12788e8f4 Don't crash on empty setnames on inspircd1.2 2012-07-01 22:26:05 -04:00
Adam 9b5f6d3c45 Remove ExtensibleString everywhere 2012-07-01 22:26:05 -04:00
lethality af24dc6050 Removed old set xop references and cleared up some other stuff. 2012-06-26 16:21:24 +01:00
lethality f27560cc1e Merge branch '1.9' of ssh://anope.git.sf.net/gitroot/anope/anope into 1.9 2012-06-26 02:01:01 +01:00
Adam 4b309b5044 Fixed accidentally recursion in User::SendMessage from last commit 2012-06-25 20:51:08 -04:00
lethality d8a99d619f Merge branch '1.9' of ssh://anope.git.sf.net/gitroot/anope/anope into 1.9 2012-06-22 21:26:33 +01:00
Adam 2dec8e767a Allow userless command sources 2012-06-18 05:04:30 -04:00
lethality ba53c7eb03 Updated MODULES somewhat 2012-06-17 22:23:22 +01:00
Adam 873d4287de Split up bs_set 2012-06-11 15:44:48 -04:00
Adam 3626fb246e Fixed fd leak in win32/pipe.cpp 2012-06-06 15:16:46 -04:00
lethality a661098ef2 Some more fantasy character help output 2012-06-04 05:45:13 +01:00
lethality a4bf5ce609 minor help output changes, including some confusion in fantasy chars 2012-06-04 04:50:35 +01:00
Adam 437944d416 Merge branch '1.9' of anope.git.sf.net:/gitroot/anope/anope into 1.9 2012-06-01 04:43:26 -04:00
DukePyrolator db37b1c634 updated chanstats 2012-06-01 07:37:34 +02:00
Adam 1e49e9b9dc This should actually be LOG_TERMINAL, quitmsg isn't logged to terminal on shutdown 2012-05-26 02:36:02 -04:00
Adam 2cbfbc98e9 Some access level fixes from Robby to more closely match the historic levels, and some code cleanup 2012-05-26 02:15:48 -04:00
Adam 38d5f20deb Added a ./Config option for using precompiled headers 2012-05-24 21:54:15 -04:00
Adam 70fb5900a2 Add support for inspircd2.0+s mlock, improved on Unreal's, and made server side mlock usage configurable 2012-05-23 19:35:56 -04:00
Adam bf7d1a55af Fixed some problems found by Robby 2012-05-23 15:09:41 -04:00
Robby 1f73e27870 Updated help messages for ns_list, cs_list, cs_entrymsg, and cs_info. Also fixed logging for cs_entrymsg. 2012-05-20 04:14:26 -04:00
Adam 699087b2bf Fixed cs_entrymsg loading entries from the database 2012-05-20 03:57:22 -04:00
Adam ccd29085a9 reinterpret_cast off of a virtual base does Bad Things 2012-05-17 03:57:19 -04:00
Adam a883362c14 Fixed not always calling operator bool() in dynamic_reference, which would mess up service references and do weird things 2012-05-17 02:03:22 -04:00
Jeremy ef88385d85 m_ldap_authentication: Removed the dependency on a specific binddn in favour of searching the tree for matching criteria and using the returned DN 2012-05-15 17:19:50 -04:00
Adam 90b0283160 Grab the DN for every LDAP query and send it in the result 2012-05-15 04:27:36 -04:00
Adam 0a8d46b538 Fixed parsing FMODE on inspircd 1.1 2012-05-14 22:30:03 -04:00
Adam a84226edf0 Do not show help for set message if useprivmsg is disabled 2012-05-11 00:50:58 -04:00
Adam 9370b063d0 Fixed crash on access del + valgrind errors 2012-05-10 17:53:53 -04:00
Adam d5ffae0e46 Made ssl cert and keyfiles configurable 2012-05-09 03:37:37 -04:00
lethality f89599726e fixed paste error (failed awesomeness) in last commit. 2012-05-09 03:11:57 +01:00
lethality a81b3aaff1 Fixed saving backups 2012-05-09 01:23:34 +01:00
Adam 820e4edc2b Fixed some 100% cpu bugs with the new SQL stuff, and fixed sqlite+db_sql_live 2012-05-08 18:04:49 -04:00
Robby 25586f3246 Allow services operators to release other user's nicks, and allow services operators to view the access list of other operators 2012-05-08 02:01:44 -04:00
Adam b7149fc940 Merge branch '1.9' of anope.git.sf.net:/gitroot/anope/anope into 1.9 2012-05-06 21:44:11 -04:00
Adam 675b113c3e Split up db/conf/lib/locale install directories, and allow alternate ones to be specified at runtime 2012-05-06 21:43:50 -04:00
DukePyrolator c797987615 Readding missing valid nick check to ns register/group removed in os_forbid commit 2012-05-05 09:35:18 +02:00
Adam eb0e07d564 Use Unreal's MLOCK command if supported 2012-05-04 16:03:02 -04:00
Adam 1b5805eeb0 Set quitmsg on ERROR 2012-04-29 20:39:33 -04:00
Adam 42e652cae7 Pull table schemas from SQL on startup so we can alter the schemas if we need to, fixed sqlite to work again 2012-04-29 19:24:37 -04:00
Adam 62818abbf4 Added options:casemap to chose how case insensitive strings are compared, using ascii, rfc1459, or a locale installed on the system 2012-04-29 15:43:51 -04:00
Adam 4d9a96e8df Fixes to db_sql 2012-04-27 17:06:16 -04:00
Adam e490a5461f Process defines even before includes, fixes defining{} pseudoclient names to something else in their respective configurations 2012-04-27 16:05:49 -04:00
Adam 5068483cb9 Add db_sql:prefix allow prefixing all anope tables similarly, and changed db_sql to update the databases incrementally instead of one big flush 2012-04-27 15:38:50 -04:00
Adam 83ee20fc29 Clarify access denied messages caused by NSSecureAdmins 2012-04-25 19:02:09 -04:00
Adam b08aa4ed92 Check for os_sesion to exist before having defcon try and place session bans 2012-04-25 18:49:53 -04:00
Adam 1081ecdae8 Fixed non-debug build 2012-04-25 14:29:50 -04:00
Adam 2370c16f1e Fixed build from the previous merge 2012-04-24 16:02:07 -04:00
Adam 3d84dc91f6 Merge branch '1.9' of anope.git.sf.net:/gitroot/anope/anope into 1.9 2012-04-23 05:17:02 -04:00
Adam 573e49a7ea Reworked live SQL support yet again 2012-04-23 05:08:26 -04:00
Adam 63c639e108 Fixed hashm checking in db_old and loading 1.9.1 databases 2012-04-23 05:07:06 -04:00
Adam fc00406079 Fixed ./services --version etc not getting printed when stdout is a file/pipe/not a tty 2012-04-22 02:57:17 -04:00
DukePyrolator b752c3a668 fixed a bug in chanstats 2012-04-13 18:33:22 +02:00
DukePyrolator 7372b457cc fixed a compile error in m_sqlite 2012-04-08 19:29:56 +02:00
DukePyrolator deb5196101 Added Chanstats. It uses a new, improved database format and is not compatible with current phpdenora or magirc installations. 2012-04-08 12:43:34 +02:00
DukePyrolator 9e1fda2a44 Modified the SQL API to allow unescaped parameters (useful for passing row names and NULL values) 2012-04-08 12:30:48 +02:00
Adam 9d249ef96f Fixed unpacking questions from dns packets 2012-04-06 14:41:28 -04:00
Viper e03b73e8cd Revert changes made to line endings. 2012-04-06 15:36:49 +02:00
Hal9000 6b473f22bd Revert last commit cause guess what, I screwed things up 2012-04-06 15:12:22 +02:00
Hal9000 05bb80c06c Fixed mail function causing some MTAs to sent blank messages 2012-04-06 14:35:34 +02:00
DukePyrolator e6edc6586e updated the german language file 2012-04-01 20:50:46 +02:00
DukePyrolator cf3124c063 fixed some typos 2012-04-01 20:50:04 +02:00
Adam 12a6a27b52 Merge branch '1.9' of anope.git.sf.net:/gitroot/anope/anope into 1.9 2012-03-27 19:14:55 -04:00
Adam 31a0e673b2 Fixed unpacking multiple names from dns packets when one has multiple compression pointers.
Currently this will just fail at unpacking the later name due to offsets being invalid.
Also cleaned up the existing code and made unpacking error messages more helpful.
2012-03-27 19:01:29 -04:00
DukePyrolator 8d0b4a1bf5 added a missing error message when a module file does not exist. this fixes bug #1401. also moved some debug messages to debug level 2 2012-03-22 07:30:38 +01:00
DukePyrolator 1b0ebcadfa fixed bug #1399 2012-03-21 22:20:18 +01:00
DukePyrolator 0d100ffacc fixed ns_ajoin 2012-03-21 20:25:25 +01:00
Adam 88fd1da803 Fixed typos 2012-03-13 21:07:10 -04:00
Adam a06934777c Actually check if the nicks arent registered, oops 2012-03-13 19:26:11 -04:00
Adam a26f4b9a9a Bug #1389 - readd RNG seed in the config and start DNS query ids off on a random number 2012-03-13 17:45:07 -04:00
Adam 053d6a2247 Add a nickserv:unregistered_notice config option to send a message to unregistered users on connect. Suggested by Cronus. 2012-03-13 17:18:11 -04:00
Adam beae4775cf Bug #1382 - Save maxusercount and maxusertime 2012-03-13 16:58:14 -04:00
Adam cff91a532f Made gch files depend on the header they were generated from 2012-03-11 21:21:47 -04:00
Adam 92ed5d7208 Fixed having multiple uplink blocks work right if the first uplink fails on startup 2012-03-11 16:44:44 -04:00
Adam 7800375510 Bug #1384 - Fixed spacing of connection log message if users have no vhost - patch from cbiedl 2012-03-11 05:20:28 -04:00
Adam ab25815694 Fixed backup databases having their names collide due to not separating month and day, #1383 2012-03-05 20:15:56 -05:00
Adam 8e0104363f Fixed bs_kick syntax error 2012-03-05 14:29:48 -05:00
DukePyrolator b7a6d518b0 fixed the --dir commandline parameter 2012-03-04 10:18:25 +01:00
Adam 4ed844ffd5 Escape all column names when building sql queries 2012-03-02 17:05:59 -05:00
Adam 020467d472 Fixed db_old loading noexpire 2012-02-27 00:16:15 -05:00
Adam 141b87bd14 Changed the OnChanDrop event to be called right before channels are dropped, not after 2012-02-26 23:28:02 -05:00
Adam a5b9e235ae Added chanserv:require config option to set which modes must be on all registered channels. Prevents the core from always enforcing +r on every channel, even if chanserv is not loaded. 2012-02-26 23:23:15 -05:00
Adam a78790eac4 Fixed vhost check on identify 2012-02-26 20:18:22 -05:00
Adam 07226feec4 Track plexus umode and cmode +C and renamed UMODE_NO_CTCP to match up with the names of other modes. 2012-02-26 19:49:02 -05:00
Adam e73013830d Fixed missing #include in init.cpp 2012-02-25 22:45:51 -05:00
Adam 2bc3bd3fcf Do not send kills after sending XLines because it causes us to internally remove the user and then recieve a quit from the user (who is now nonexistant) once the IRCd processes the XLine 2012-02-25 00:06:02 -05:00
Adam 83456f6040 Fixed akill setter and ids showing in akill reasons 2012-02-24 23:25:29 -05:00
Adam 601dc41baf Merge branch '1.9' of anope.git.sf.net:/gitroot/anope/anope into 1.9 2012-02-24 14:54:44 -05:00
Adam 2337b7717d Fixed calculating bots channel count of assigned channels and fixed the order of saving memos (among other things) 2012-02-24 14:53:34 -05:00
lethality fde40dee7a Tell users to use NickServ for registering nicks, not chanserv... 2012-02-24 01:50:21 +00:00
lethality ba32aad4cb Merge branch '1.9' of ssh://anope.git.sf.net/gitroot/anope/anope into 1.9 2012-02-23 02:32:49 +00:00
Adam 24811e5970 Added a configuration option to make all nick registrations require admin verification 2012-02-22 20:55:59 -05:00
lethality f01aab5f9b Merge branch '1.9' of ssh://anope.git.sf.net/gitroot/anope/anope into 1.9 2012-02-23 00:04:36 +00:00
Adam 3850b073dd Added regex support for many commands, such as akill, sqline, snline,
all of the */list commands, etc.

Also extended the ability of akill to match a full nick!user@host and
real name of users.
2012-02-22 18:12:02 -05:00
Adam 81e50dd1f4 Fixed db_old loading memo owners 2012-02-22 16:25:20 -05:00
Adam bd31fbb9f0 Also fixed m_proxyscan to handle users with invalid ips 2012-02-22 14:41:36 -05:00
Adam 000660608e Fixed m_dnsbl handling users with spoofs/other non ips 2012-02-21 20:50:14 -05:00
lethality 826de43724 Fixed some trivial formatting 2012-02-22 00:28:58 +00:00
Adam b84e080463 Made our message sources actual clients/servers, and put in a few more default messages for very standard things (KICK etc) 2012-02-19 20:54:55 -05:00
Adam 0ba58d7d0e Fixed some events 2012-02-18 18:07:34 -05:00
Adam 1536c5cf60 Add users hostmask to access lists not nick when access add is used on a non registered user 2012-02-18 17:21:55 -05:00
Adam f2ce9cd85c Made mode lock del check status of the mode lock before removing it 2012-02-18 15:47:16 -05:00
Adam ee5cd8493e Use C++11's explicit override feature if available 2012-02-18 15:04:26 -05:00
Adam 41e8d27602 Fixed FreeBSD build 2012-02-16 16:02:17 -05:00
Adam e1f5fc6a0c Remove revision numbers as they're only ever set by Config reading git since we've switched off of SVN. Instead just use the hash for the current head when building. Also recheck the hash on every make not just Config. 2012-02-15 00:06:25 -05:00
Adam db59f1a70f Fixed detecting when to set +r and fixed crash on shutdown introduced by the last commit 2012-02-14 19:03:09 -05:00
Adam a9772cde21 Clean up and reorganize our header files 2012-02-14 15:13:27 -05:00
Adam 086790d633 Removed our RNG and just use the systems, it's not very widely used. Also made DNS query ids not random as they don't need to be. 2012-02-13 00:10:45 -05:00
Adam 1bc8e2ab82 Removed operserv:notifications in favor of log blocks, as well as some other notifiications 2012-02-08 18:00:24 -05:00
Adam 089c85b27e Fixed WallBadOS 2012-02-04 17:28:38 -05:00
Adam 01194e3958 Bump for 1.9.7-git 2012-02-04 13:12:11 -05:00
682 changed files with 182830 additions and 168344 deletions
+5 -4
View File
@@ -1,5 +1,5 @@
___
/ _ \ http://www.anope.org
/ _ \ https://www.anope.org/
| /_\ | _ __ _ _ _ _ ___
| _ || '_ \/ _ \/ _ \ / _ \
| | | || | | |_| |_| | __/
@@ -7,12 +7,13 @@
| |
|_| IRC Services
CURVER
This program will help you to compile your Services, and ask you
This program will help you to compile your services, and ask you
questions regarding the compile-time settings of it during the
process. For more options type SOURCE_DIR/Config --help
Anope is a set of Services for IRC networks that allows users to
Anope is a set of services for IRC networks that allows users to
manage their nicks and channels in a secure and efficient way,
and administrators to manage their network with powerful tools.
For all your Anope needs please visit our portal at www.anope.org
For all your Anope needs please visit our portal at
https://www.anope.org/
+44
View File
@@ -0,0 +1,44 @@
---
name: Bug report
description: Report a non-security bug in Anope.
body:
- type: markdown
attributes:
value: |
Thanks for taking the time to fill out this bug report! Please make sure to answer the questions properly and don't just enter the same text into every field as this will make it harder for us to fix your bug.
If you're looking for help with setting up your services please post on [our support forum](https://github.com/orgs/anope/discussions/categories/support) instead.
If you're reporting a crash or other security issue [please read our security policy](https://github.com/anope/anope/security/policy#reporting-a-vulnerability) for how to report security issues privately.
- type: textarea
attributes:
label: Description
validations:
required: true
- type: textarea
attributes:
label: Steps to reproduce the issue
validations:
required: true
- type: textarea
attributes:
label: Describe the results you received
validations:
required: true
- type: textarea
attributes:
label: Describe the results you expected
validations:
required: true
- type: input
attributes:
label: Anope version
description: |-
Either the output of `services --version` (2.0) or `anope --version` (2.1).
validations:
required: true
+20
View File
@@ -0,0 +1,20 @@
---
name: Feature request
description: Request that a new feature is added to Anope.
body:
- type: markdown
attributes:
value: |
Thanks for taking the time to fill out this feature request!
- type: textarea
attributes:
label: Description
validations:
required: true
- type: textarea
attributes:
label: Why this would be useful?
validations:
required: true
+5
View File
@@ -0,0 +1,5 @@
blank_issues_enabled: false
contact_links:
- name: Support forum
url: https://github.com/orgs/anope/discussions/categories/support
about: Please ask support questions here.
+40
View File
@@ -0,0 +1,40 @@
<!--
Please fill in the template below. It will help us process your pull request a lot faster.
-->
## Summary
<!--
Briefly describe what this pull request changes.
-->
## Rationale
<!--
Describe why you have made this change.
-->
## Testing Environment
<!--
Describe the environment in which you have tested this change:
-->
I have tested this pull request on:
**Operating system name and version:** <!-- e.g. Linux 3.11 -->
**Compiler name and version:** <!-- e.g. GCC 4.2.0 -->
## Checks
<!--
Tick the boxes for the checks you have made.
-->
I have ensured that:
- [ ] The code I am submitting is my own work and/or I have permission from the author to share it.
- [ ] Generative AI (Copilot, ChatGPT, etc) was not used to create any part of this pull request.
- [ ] If the pull request contains a security fix I have followed the reporting rules mentioned in [the security policy](https://github.com/anope/anope/security/policy) (delete if not applicable).
- [ ] I have documented any features added by this pull request (delete if not applicable).
- [ ] This pull request does not introduce any incompatible API changes (stable branches only, delete if not applicable).
+19
View File
@@ -0,0 +1,19 @@
# Security Policy
## Supported Versions
Currently the 2.0 (stable) branch is actively receiving security fixes.
The 2.1 (development) branch is still early in development and currently only receives security fixes when they are synced from the 2.0 branch.
Version | Supported
------- | ---------
2.1.x | :warning:
2.0.x | :white_check_mark:
1.8.x | :x:
## Reporting a Vulnerability
Please do not report security vulnerabilities on GitHub. Instead, email the details to team@anope.org or get the attention of a developer in our development IRC channel at irc.teranova.net #anope-devel and PM them the details.
We will triage your issue as soon as possible and try to release a fixed version within a week of receiving your report.
+7
View File
@@ -0,0 +1,7 @@
version: 2
updates:
- package-ecosystem: github-actions
directory: /
schedule:
interval: monthly
target-branch: "2.1"
+69
View File
@@ -0,0 +1,69 @@
name: Alpine CI
on:
pull_request:
push:
schedule:
- cron: 0 0 * * 0
workflow_dispatch:
jobs:
build:
if: "!contains(github.event.head_commit.message, '[skip alpine ci]')"
container: alpine:latest
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v6
- name: Install dependencies
run: |-
echo "http://dl-cdn.alpinelinux.org/alpine/edge/testing" >> /etc/apk/repositories
apk update
apk add \
argon2-dev \
clang \
cmake \
g++ \
gettext \
git \
gnutls-dev \
mariadb-dev \
openldap-dev \
openssl-dev \
pcre2-dev \
samurai \
sqlite-dev \
tre-dev
- name: Enable extras
run: |-
for MODULE in enc_argon2 enc_posix ldap mysql regex_pcre2 regex_posix regex_tre sqlite ssl_gnutls ssl_openssl
do
ln -s $PWD/modules/extra/$MODULE.cpp $PWD/modules
done
- name: Run CMake
env:
CC: ${{ matrix.compiler.cc }}
CXX: ${{ matrix.compiler.cxx }}
CXXFLAGS: -Werror
run: |-
cmake -B "build" \
-D "CMAKE_BUILD_TYPE=Debug" \
-D "INSTDIR=$(readlink -f ../run)" \
-G "Ninja" \
-Wdeprecated \
-Wdev
- name: Build and install
env:
VERBOSE: ${{ runner.debug }}
run: |-
ninja -C "build" ${{ runner.debug == '1' && '-v' || '' }} install
strategy:
fail-fast: false
matrix:
compiler:
- cc: clang
cxx: clang++
- cc: gcc
cxx: g++
+66
View File
@@ -0,0 +1,66 @@
name: Ubuntu CI
on:
pull_request:
push:
schedule:
- cron: 0 0 * * 0
workflow_dispatch:
jobs:
build:
if: "!contains(github.event.head_commit.message, '[skip ubuntu ci]')"
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v6
- name: Install dependencies
run: |-
sudo apt-get update --assume-yes
sudo apt-get install --assume-yes --no-install-recommends \
clang \
g++ \
gettext \
git \
libargon2-dev \
libgnutls28-dev \
libldap2-dev \
libmysqlclient-dev \
libpcre2-dev \
libsqlite3-dev \
libssl-dev \
libtre-dev \
ninja-build
- name: Enable extras
run: |-
for MODULE in enc_argon2 enc_posix ldap mysql regex_pcre2 regex_posix regex_tre sqlite ssl_gnutls ssl_openssl
do
ln -s ${{ github.workspace }}/modules/extra/$MODULE.cpp ${{ github.workspace }}/modules
done
- name: Run CMake
env:
CC: ${{ matrix.compiler.cc }}
CXX: ${{ matrix.compiler.cxx }}
CXXFLAGS: -Werror
run: |-
cmake -B "build" \
-D "CMAKE_BUILD_TYPE=Debug" \
-D "INSTDIR=${{ github.workspace }}/run" \
-G "Ninja" \
-Wdeprecated \
-Wdev
- name: Build and install
env:
VERBOSE: ${{ runner.debug }}
run: |-
ninja -C "build" ${{ runner.debug == '1' && '-v' || '' }} install
strategy:
fail-fast: false
matrix:
compiler:
- cc: clang
cxx: clang++
- cc: gcc
cxx: g++
+96
View File
@@ -0,0 +1,96 @@
name: Windows CI
on:
pull_request:
push:
release:
types:
- published
schedule:
- cron: 0 0 * * 0
workflow_dispatch:
jobs:
build:
if: "!contains(github.event.head_commit.message, '[skip windows ci]')"
runs-on: windows-2025
env:
BUILD_PATH: ${{ github.workspace }}\build
BUILD_TYPE: ${{ github.event_name == 'release' && 'Release' || 'Debug' }}
CONAN_FILE: ${{ github.workspace }}\src\win32\conanfile.txt
CONAN_HOME: ${{ github.workspace }}\build\conan
steps:
- uses: actions/checkout@v6
- name: Setup MSVC
uses: TheMrMilchmann/setup-msvc-dev@v4
with:
arch: x64
- name: Setup NSIS
uses: negrutiu/nsis-install@v3
with:
distro: official
- name: Setup Conan
uses: turtlebrowser/get-conan@v1.2
- name: Create Conan configuration
run: |-
conan profile detect
(Get-Content ${{ env.CONAN_HOME }}\profiles\default).replace('build_type=Release', 'build_type=${{ env.BUILD_TYPE }}') | Set-Content ${{ env.CONAN_HOME }}\profiles\default
(Get-Content ${{ env.CONAN_HOME }}\profiles\default).replace('compiler.cppstd=14', 'compiler.cppstd=17') | Set-Content ${{ env.CONAN_HOME }}\profiles\default
Write-Output 'core.sources:download_urls=["origin", "https://c3i.jfrog.io/artifactory/conan-center-backup-sources/"]' | Out-File -Append ${{ env.CONAN_HOME }}\global.conf
Write-Output 'tools.cmake.cmaketoolchain:generator=Ninja' | Out-File -Append ${{ env.CONAN_HOME }}\global.conf
Write-Output 'user.openssl:windows_use_jom=True' | Out-File -Append ${{ env.CONAN_HOME }}\global.conf
- name: Try to restore libraries from the cache
if: github.event_name != 'release'
uses: actions/cache/restore@v5
id: library-cache
with:
key: Conan VS${{ env.VisualStudioVersion }} ${{ env.BUILD_TYPE }} ${{ hashFiles(env.CONAN_FILE) }}
path: ${{ env.CONAN_HOME }}/p
- name: Install libraries
working-directory: ${{ env.BUILD_PATH }}
run: |-
(Get-Content ${{ env.CONAN_FILE }}).replace('##', '') | Set-Content ${{ env.CONAN_FILE }}
conan install ${{ env.CONAN_FILE }} --build missing --deployer runtime_deploy --deployer-folder extradll --output-folder .
conan cache clean "*"
- name: Save libraries to the cache
if: steps.library-cache.outputs.cache-hit != 'true' && github.event_name != 'release'
uses: actions/cache/save@v5
with:
key: ${{ steps.library-cache.outputs.cache-primary-key }}
path: ${{ env.CONAN_HOME }}\p
- name: Run CMake
working-directory: ${{ env.BUILD_PATH }}
run: |-
cmake -D "CMAKE_BUILD_TYPE=${{ env.BUILD_TYPE }}" `
-D "CMAKE_TOOLCHAIN_FILE=conan_toolchain.cmake" `
-G "Ninja Multi-Config" `
-S "${{ github.workspace }}" `
-Wdeprecated `
-Wdev
- name: Build installer
working-directory: ${{ env.BUILD_PATH }}
run: |-
ninja -f "build-${{ env.BUILD_TYPE }}.ninja" ${{ runner.debug == '1' && '-v' || '' }} package
- name: Upload installer
if: github.event_name == 'release'
working-directory: ${{ env.BUILD_PATH }}
env:
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: |
gh release upload ${{ github.event.release.tag_name }} $(Get-ChildItem anope-*.exe)
- name: Upload artifact
if: github.event_name != 'release'
uses: actions/upload-artifact@v7
with:
name: windows-installer
path: ${{ github.workspace }}\build\\anope-*.exe
+19 -2
View File
@@ -1,3 +1,20 @@
config.cache
include/sysconf.h
build/
config.cache
docs/doxygen
include/sysconf.h
modules/enc_argon2.cpp
modules/enc_posix.cpp
modules/ldap.cpp
modules/mysql.cpp
modules/regex_pcre2.cpp
modules/regex_posix.cpp
modules/regex_tre.cpp
modules/sqlite.cpp
modules/ssl_gnutls.cpp
modules/ssl_openssl.cpp
modules/stats
modules/xmlrpc.cpp
run/
*.diff
*.mo
*.pot
+60
View File
@@ -0,0 +1,60 @@
(svnadmin) <svn@localhost> <svn svn@31f1291d-b8d6-0310-a050-a5561fc1590b@5417fbe8-f217-4b02-8779-1006273d7864>
Adam <adam@anope.org> <adam-@5417fbe8-f217-4b02-8779-1006273d7864>
Adam <adam@anope.org> <adam@adam-laptop.(none)>
Adam <adam@anope.org> <Adam@anope.org>
Adam <adam@anope.org> <Adam@drink-coca-cola.info>
Adam <adam@anope.org> <Adam@sigterm.info>
Adam Kramer <ribosome@anope.org> <ribosome ribosome@31f1291d-b8d6-0310-a050-a5561fc1590b@5417fbe8-f217-4b02-8779-1006273d7864>
Alvaro Toledo <atoledo@keldon.org> <atoledo atoledo@31f1291d-b8d6-0310-a050-a5561fc1590b@5417fbe8-f217-4b02-8779-1006273d7864>
Attila Molnar <attilamolnar@hush.com>
Björn Stiddien <keeper@anope.org> <keeper keeper@31f1291d-b8d6-0310-a050-a5561fc1590b@5417fbe8-f217-4b02-8779-1006273d7864>
Charles Kingsley <chaz@anope.org>
Charles Kingsley <chaz@anope.org> <sjaz@5417fbe8-f217-4b02-8779-1006273d7864>
Cronus <cronus@nite-serv.com>
Daniel Engel <dane@zero.org> <dane dane@31f1291d-b8d6-0310-a050-a5561fc1590b@5417fbe8-f217-4b02-8779-1006273d7864>
David Robson <rob@anope.org> <rob rob@31f1291d-b8d6-0310-a050-a5561fc1590b@5417fbe8-f217-4b02-8779-1006273d7864>
David Robson <rob@anope.org> <robbeh@5417fbe8-f217-4b02-8779-1006273d7864>
Dennis Friis <peavey@inspircd.org> <peavey peavey@inspircd.org@5417fbe8-f217-4b02-8779-1006273d7864>
Fabio Scotoni <cculex@gmail.com>
Filippo Cortigiani <simos@simosnap.org> <devel@devel.crtnet.it>
Filippo Cortigiani <simos@simosnap.org> <simos@H7-25.fritz.box>
Florian Schulze <certus@anope.org> <certus certus@31f1291d-b8d6-0310-a050-a5561fc1590b@5417fbe8-f217-4b02-8779-1006273d7864>
Gabriel Acevedo H. <drstein@anope.org> <drstein drstein@31f1291d-b8d6-0310-a050-a5561fc1590b@5417fbe8-f217-4b02-8779-1006273d7864>
Harakiri <harakiri@overstack.fr>
Hendrik Jäger <gitcommit@henk.geekmail.org> <github@henk.geekmail.org>
Jan Milants <viper@anope.org>
Jan Milants <viper@anope.org> <jantje_85@5417fbe8-f217-4b02-8779-1006273d7864>
Jan Milants <viper@anope.org> <viper viper@31f1291d-b8d6-0310-a050-a5561fc1590b@5417fbe8-f217-4b02-8779-1006273d7864>
Jens Voss <dukepyrolator@anope.org> <anope@s15355730.onlinehome-server.info>
Jens Voss <dukepyrolator@anope.org> <DukePyrolator@5417fbe8-f217-4b02-8779-1006273d7864>
Jens Voss <dukepyrolator@anope.org> <DukePyrolator@anope.org>
Jens Voss <dukepyrolator@anope.org> <jens@pyrobook.(none)>
k4be <k4be@pirc.pl> <34816207+k4bek4be@users.noreply.github.com>
Lee Holmes <lethality@anope.org>
Lee Holmes <lethality@anope.org> <lee@lethality.me.uk>
Mark Summers <mark@goopler.net> <mark mark@31f1291d-b8d6-0310-a050-a5561fc1590b@5417fbe8-f217-4b02-8779-1006273d7864>
Matt Schatz <genius3000@g3k.solutions>
Matt Ullman <matt@airraidsirens.com> <blindsight@gamesurge.net>
Michael Hazell <michaelhazell@hotmail.com> <Techman-@users.noreply.github.com>
Michael Stapelberg <michael@robustirc.net> <stapelberg@users.noreply.github.com>
Michael Wobst <wobst.michael@web.de>
Michael Wobst <wobst.michael@web.de> <michael@static.163.129.251.148.clients.your-server.de>
Michael Wobst <wobst.michael@web.de> <michael@wobst.at>
Naram Qashat <cyberbotx@anope.org> <cyberbotx@5417fbe8-f217-4b02-8779-1006273d7864>
Naram Qashat <cyberbotx@anope.org> <cyberbotx@cyberbotx.com>
Naram Qashat <cyberbotx@anope.org> <Naram Qashat cyberbotx@cyberbotx.com@5417fbe8-f217-4b02-8779-1006273d7864>
PeGaSuS <droider.pc@gmail.com>
PeGaSuS <droider.pc@gmail.com> <25697531+TehPeGaSuS@users.noreply.github.com>
Pieter Bootsma <geniusdex@anope.org> <geniusdex geniusdex@31f1291d-b8d6-0310-a050-a5561fc1590b@5417fbe8-f217-4b02-8779-1006273d7864>
Robby <robby@chatbelgie.be> <robby@anope.org>
Robby <robby@chatbelgie.be> <robby@chat.be>
Robert Scheck <robert@fedoraproject.org> <robert-scheck@users.noreply.github.com>
Robin Burchell <w00t@inspircd.org> <rburchell@5417fbe8-f217-4b02-8779-1006273d7864>
Robin Burchell <w00t@inspircd.org> <Robin Burchell w00t@inspircd.org@5417fbe8-f217-4b02-8779-1006273d7864>
Sadie Powell <sadie@sadiepowell.dev> <petpow@saberuk.com>
Sadie Powell <sadie@sadiepowell.dev> <sadie@witchery.services>
Sebastian Barfurth <github@afreshmelon.com>
Sebastian V. <hal9000@denorastats.org>
Sebastian V. <hal9000@denorastats.org> <pimpmylinux@5417fbe8-f217-4b02-8779-1006273d7864>
Trystan S. Lee <trystan@nomadirc.net> <trystan trystan@31f1291d-b8d6-0310-a050-a5561fc1590b@5417fbe8-f217-4b02-8779-1006273d7864>
Val Lorentz <progval+git@progval.net> <progval+git@progval.net>
+155 -377
View File
@@ -1,400 +1,185 @@
# This usage of CMake requires at least version 2.4 (checks are made to determine what to use when certain versions lack functions)
cmake_minimum_required(VERSION 2.4 FATAL_ERROR)
if(COMMAND cmake_policy)
cmake_policy(SET CMP0003 NEW)
endif(COMMAND cmake_policy)
# This usage of CMake requires at least version 3.20
cmake_minimum_required(VERSION 3.20 FATAL_ERROR)
# If the Source dir and the Binary dir are the same, we are building in-source, which we will disallow due to Autotools being there (but only on non-Windows)
if(${CMAKE_CURRENT_SOURCE_DIR} STREQUAL ${CMAKE_CURRENT_BINARY_DIR} AND NOT WIN32)
message(FATAL_ERROR "You can not use CMake to build Anope from the root of it's source tree! Remove the CMakeCache.txt file from this directory, then create a separate directory (either below this directory or elsewhere), and then re-run CMake from there.")
endif(${CMAKE_CURRENT_SOURCE_DIR} STREQUAL ${CMAKE_CURRENT_BINARY_DIR} AND NOT WIN32)
# 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)
# Detect the version of CMake for the later conditional checks
execute_process(COMMAND ${CMAKE_COMMAND} --version OUTPUT_VARIABLE VERSION OUTPUT_STRIP_TRAILING_WHITESPACE)
string(REGEX REPLACE "cmake version 2\\.(.*)" "\\1" ONLY_VERSION "${VERSION}")
string(REGEX MATCH "-patch .*$" HAS_PATCH "${ONLY_VERSION}")
if(HAS_PATCH)
string(REGEX REPLACE "(.*)-patch .*" "\\1" MINOR_VERSION "${ONLY_VERSION}")
string(REGEX REPLACE ".*-patch (.*)" "\\1" PATCH_VERSION "${ONLY_VERSION}")
else(HAS_PATCH)
string(REGEX MATCH "\\." HAS_DOT "${ONLY_VERSION}")
if(HAS_DOT)
string(REGEX REPLACE "(.*)\\..*" "\\1" MINOR_VERSION "${ONLY_VERSION}")
string(REGEX REPLACE ".*\\.(.*)" "\\1" PATCH_VERSION "${ONLY_VERSION}")
else(HAS_DOT)
string(REGEX REPLACE "(.*)-beta" "\\1" MINOR_VERSION "${ONLY_VERSION}")
if(MINOR_VERSION STREQUAL "4-1\n")
set(PATCH_VERSION 1)
else(MINOR_VERSION STREQUAL "4-1\n")
set(PATCH_VERSION 0)
endif(MINOR_VERSION STREQUAL "4-1\n")
set(MINOR_VERSION 4)
endif(HAS_DOT)
endif(HAS_PATCH)
# Detect is we are using CMake 2.6 or better, these versions include functions that require less work than CMake 2.4 does
if(MINOR_VERSION GREATER 5)
set(CMAKE26_OR_BETTER TRUE)
set(CMAKE248_OR_BETTER TRUE)
set(CMAKE244_OR_BETTER TRUE)
set(CMAKE242_OR_BETTER TRUE)
else(MINOR_VERSION GREATER 5)
set(CMAKE26_OR_BETTER FALSE)
# Also detect if we are using CMake 2.4.8 or better, the FIND sub-command of list() is non-existant in earlier versions
if(PATCH_VERSION GREATER 7)
set(CMAKE248_OR_BETTER TRUE)
set(CMAKE244_OR_BETTER TRUE)
set(CMAKE242_OR_BETTER TRUE)
else(PATCH_VERSION GREATER 7)
set(CMAKE248_OR_BETTER FALSE)
# Also detect if we are using CMake 2.4.4 or better, the CheckCXXCompilerFlag module and SORT sub-command of list() are non-existant in earlier versions
if(PATCH_VERSION GREATER 3)
set(CMAKE244_OR_BETTER TRUE)
set(CMAKE242_OR_BETTER TRUE)
else(PATCH_VERSION GREATER 3)
set(CMAKE244_OR_BETTER FALSE)
# ALSO detect if we are using CMake 2.4.2 or better, the APPEND sub-command of list() is non-existant in earlier versions
if(PATCH_VERSION GREATER 1)
set(CMAKE242_OR_BETTER TRUE)
else(PATCH_VERSION GREATER 1)
set(CMAKE242_OR_BETTER FALSE)
endif(PATCH_VERSION GREATER 1)
endif(PATCH_VERSION GREATER 3)
endif(PATCH_VERSION GREATER 7)
endif(MINOR_VERSION GREATER 5)
# 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)
set(CMAKE_CXX_STANDARD_REQUIRED 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)
# 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 (only when not on MinGW, which uses semicolons already), and if on MinGW, just copy the line
if(NOT MINGW)
string(REGEX REPLACE ":" ";" LIBRARIES ${LINE})
else(NOT MINGW)
set(LIBRARIES "${LINE}")
endif(NOT MINGW)
# 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)
append_to_list(DEFAULT_LIBRARY_DIRS ${LIBRARY})
endif(NOT FIRST_CHAR STREQUAL "=")
endforeach(LIBRARY)
# Remove duplicate entries from the list
if(DEFAULT_LIBRARY_DIRS)
remove_list_duplicates(DEFAULT_LIBRARY_DIRS)
endif(DEFAULT_LIBRARY_DIRS)
# 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(LINE STREQUAL "#include <...> search starts here:")
# 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(LINE STREQUAL "End of search list.")
# 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)
# 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
append_to_list(DEFAULT_INCLUDE_DIRS ${INCLUDE})
endif(IN_SEARCH)
endif(LINE STREQUAL "End of search list.")
endif(LINE STREQUAL "#include <...> search starts here:")
endforeach(LINE)
# Remove duplicate entries from the list
if(DEFAULT_INCLUDE_DIRS)
remove_list_duplicates(DEFAULT_INCLUDE_DIRS)
endif(DEFAULT_INCLUDE_DIRS)
endif(CMAKE_COMPILER_IS_GNUCXX)
# Put modules in their own folder
set_property(GLOBAL PROPERTY USE_FOLDERS ON)
# If we are using Visual Studio, locate the path of the Windows Server 2008 SDK or Windows Server 2003 Platform SDK, depending on which is installed
if(MSVC)
# If the path comes up as "/registry" from any of these, the path wasn't found, otherwise, we'll set WSDK_PATH to the corresponding path
# Look for the 2008 SDK under HKLM first
get_filename_component(WSDK2008_PATH "[HKEY_LOCAL_MACHINE\\SOFTWARE\\Microsoft\\Microsoft SDKs\\Windows;CurrentInstallFolder]" ABSOLUTE CACHE)
if(WSDK2008_PATH STREQUAL "/registry")
# If not found, look for the 2003 SDK under HKLM
get_filename_component(WSDK2003_PATH "[HKEY_LOCAL_MACHINE\\SOFTWARE\\Microsoft\\MicrosoftSDK\\InstalledSDKs\\D2FF9F89-8AA2-4373-8A31-C838BF4DBBE1;Install Dir]" ABSOLUTE CACHE)
if(WSDK2003_PATH STREQUAL "/registry")
# If not found, look for the 2008 SDK under HKCU
get_filename_component(WSDK2008_PATH "[HKEY_CURRENT_USER\\SOFTWARE\\Microsoft\\Microsoft SDKs\\Windows;CurrentInstallFolder]" ABSOLUTE CACHE)
if(WSDK2008_PATH STREQUAL "/registry")
# If not found, look for the 2003 SDK under HKCU
get_filename_component(WSDK2003_PATH "[HKEY_CURRENT_USER\\SOFTWARE\\Microsoft\\MicrosoftSDK\\InstalledSDKs\\D2FF9F89-8AA2-4373-8A31-C838BF4DBBE1;Install Dir]" ABSOLUTE CACHE)
if(WSDK2003_PATH STREQUAL "/regsitry")
# The SDK was never found, set the path to nothing
set(WSDK_PATH "")
else(WSDK2003_PATH STREQUAL "/regsitry")
set(WSDK_PATH "${WSDK2003_PATH}")
endif(WSDK2003_PATH STREQUAL "/regsitry")
else(WSDK2008_PATH STREQUAL "/registry")
set(WSDK_PATH "${WSDK2008_PATH}")
endif(WSDK2008_PATH STREQUAL "/registry")
else(WSDK2003_PATH STREQUAL "/registry")
set(WSDK_PATH "${WSDK2003_PATH}")
endif(WSDK2003_PATH STREQUAL "/registry")
else(WSDK2008_PATH STREQUAL "/registry")
set(WSDK_PATH "${WSDK2008_PATH}")
endif(WSDK2008_PATH STREQUAL "/registry")
endif(MSVC)
# 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(CMAKE_BUILD_TYPE)
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(CMAKE_BUILD_TYPE)
endif(NOT MSVC)
# If running under MinGW, we have to force the resource compiler settings (hopefully this will be fixed in a later version of CMake)
if(MINGW)
set(CMAKE_RC_COMPILER_INIT windres)
enable_language(RC)
set(CMAKE_RC_COMPILE_OBJECT "<CMAKE_RC_COMPILER> <FLAGS> <DEFINES> -o <OBJECT> <SOURCE>")
endif(MINGW)
if(CMAKE_BUILD_TYPE STREQUAL "")
message(STATUS "CMAKE_BUILD_TYPE has not been specified; defaulting to Debug")
set(CMAKE_BUILD_TYPE "Debug")
endif()
# Include the checking functions used later in this CMakeLists.txt
include(CheckFunctionExists)
include(CheckIncludeFile)
include(CheckTypeSize)
include(CheckLibraryExists)
if(CMAKE244_OR_BETTER)
include(CheckCXXCompilerFlag)
else(CMAKE244_OR_BETTER)
include(TestCXXAcceptsFlag)
endif(CMAKE244_OR_BETTER)
include(CheckCXXCompilerFlag)
# If extra directories were specified, tell cmake about them.
if(NOT WIN32)
include(FindPkgConfig)
endif()
# If extra include directories were specified, tell cmake about them.
if(EXTRA_INCLUDE)
include_directories(${EXTRA_INCLUDE})
link_directories(${EXTRA_INCLUDE})
endif(EXTRA_INCLUDE)
endif()
# If extra library directories were specified, tell cmake about them.
if(EXTRA_LIBS)
link_directories(${EXTRA_LIBS})
endif()
# Find gettext
find_package(Gettext)
# Add an optional variable for using run-cc.pl for building, Perl will be checked later regardless of this setting
option(USE_RUN_CC_PL "Use run-cc.pl for building" OFF)
find_package(Intl)
if(Gettext_FOUND AND Intl_FOUND)
set(HAVE_LOCALIZATION ON)
include_directories(${Intl_INCLUDE_DIRS})
link_libraries(${Intl_LIBRARIES})
else()
message(STATUS "Unable to find gettext and/or libintl -- read docs/LANGUAGE for how to enable localization")
set(HAVE_LOCALIZATION OFF)
endif()
# Use the following directories as includes
# Note that it is important the binary include directory comes before the
# source include directory so the precompiled headers work correctly.
include_directories(${Anope_BINARY_DIR}/include ${Anope_SOURCE_DIR}/include ${Anope_BINARY_DIR}/language ${Anope_SOURCE_DIR}/modules/pseudoclients)
include_directories(
${Anope_BINARY_DIR}/include
${Anope_SOURCE_DIR}/include
${Anope_SOURCE_DIR}/vendor
)
# If using Windows, always add the _WIN32 define
if(WIN32)
add_definitions(-D_WIN32)
# And include the windows specific folder for our anope_windows.h
# If using Windows, include the windows specific folder for anope_windows.h
include_directories(${Anope_SOURCE_DIR}/src/win32)
endif(WIN32)
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 /wd4355 /wd4706 /wd4800 /wd4996 /EHs")
add_definitions(-DMSVCPP -D_CRT_SECURE_NO_WARNINGS)
# 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(MSVC)
else()
# Set the compile flags to have all warnings on (including shadowed variables)
set(CXXFLAGS "${CXXFLAGS} -Wall -Wshadow")
# If on a *nix system, also set the compile flags to remove GNU extensions (favor ISO C++) as well as reject non-ISO C++ code, also remove all leading underscores in exported symbols (only on GNU compiler)
if(UNIX)
set(CXXFLAGS "${CXXFLAGS} -ansi -pedantic")
if (CMAKE_CXX_COMPILER_ID STREQUAL "GNU")
set(CXXFLAGS "${CXXFLAGS} -Wno-long-long -fno-leading-underscore")
endif(CMAKE_CXX_COMPILER_ID STREQUAL "GNU")
# If we aren't on a *nix system, we are using MinGW
else(UNIX)
# Also, if we are building under MinGW, add another define for MinGW
if(MINGW)
add_definitions(-DMINGW)
endif(MINGW)
endif(UNIX)
endif(MSVC)
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)
append_to_list(LINK_LIBS ${CMAKE_DL_LIBS})
endif(CMAKE_DL_LIBS)
link_libraries(${CMAKE_DL_LIBS})
endif()
# Under MinGW, the -shared flag isn't properly set in the module-specific linker flags, add it from the C flags for shared libraries
if(MINGW)
set(CMAKE_MODULE_LINKER_FLAGS "${CMAKE_MODULE_LINKER_FLAGS} ${CMAKE_SHARED_LIBRARY_CREATE_C_FLAGS}")
endif(MINGW)
# Find the linker flags required for using threads.
find_package("Threads" REQUIRED)
if(CMAKE_THREAD_LIBS_INIT)
link_libraries(${CMAKE_THREAD_LIBS_INIT})
endif()
# Under Windows, we set the executable name for Anope to be anope
# On Windows, also link Anope to the memory library and Winsock.
if(WIN32)
link_libraries("Ws2_32")
if(MSVC)
link_libraries("win32_memory")
endif()
endif()
if(NOT PROGRAM_NAME)
set(PROGRAM_NAME anope)
# Under *nix, we set the executable name for Anope to be services
else(WIN32)
set(PROGRAM_NAME services)
endif(WIN32)
endif()
# If we are not using Visual Studio, we'll run the following checks
if(NOT MSVC)
# Check if the C++ compiler can accept the -pipe flag, and add it to the compile flags if it works
if(CMAKE244_OR_BETTER)
# If using CMake 2.4.4 or better, we can use check_cxx_compiler_flag
check_cxx_compiler_flag(-pipe HAVE_PIPE_FLAG)
else(CMAKE244_OR_BETTER)
# If using CMake 2.4.3 or older, we will use check_cxx_accepts_flags instead
check_cxx_accepts_flag(-pipe HAVE_PIPE_FLAG)
endif(CMAKE244_OR_BETTER)
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")
endif(HAVE_PIPE_FLAG)
# The following are additional library checks, they are not required for Windows
if(NOT WIN32)
# Check if socket is within the socket library (if the library exists), and add it to the linker flags if needed
check_library_exists(socket socket "" HAVE_SOCKET_LIB)
if(HAVE_SOCKET_LIB)
append_to_list(LINK_LIBS socket)
endif(HAVE_SOCKET_LIB)
# Check if inet_addr is within the nsl library (if the library exists), and add it to the linker flags if needed
check_library_exists(nsl inet_addr "" HAVE_NSL_LIB)
if(HAVE_NSL_LIB)
append_to_list(LINK_LIBS nsl)
endif(HAVE_NSL_LIB)
# Check if pthread_create is within the pthread library (if the library exists), and add it to the linker flags if needed
check_library_exists(pthread pthread_create "" HAVE_PTHREAD)
if(HAVE_PTHREAD)
set(LDFLAGS "${LDFLAGS} -pthread")
else(HAVE_PTHREAD)
message(FATAL_ERROR "The pthread library is required to build Anope")
endif(HAVE_PTHREAD)
endif(NOT WIN32)
endif(NOT MSVC)
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -pipe")
endif()
endif()
# If DEFUMASK wasn't passed to CMake, set a default depending on if RUNGROUP was passed in or not
if(NOT DEFUMASK)
if(RUNGROUP)
set(DEFUMASK "007")
else(RUNGROUP)
else()
set(DEFUMASK "077")
endif(RUNGROUP)
endif(NOT DEFUMASK)
endif()
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(CMAKE_BUILD_TYPE STREQUAL "DEBUG" OR CMAKE_BUILD_TYPE STREQUAL "RELWITHDEBINFO")
endif()
# Check for the existance of the following include files
check_include_file(cstdint HAVE_CSTDINT)
check_include_file(stdint.h HAVE_STDINT_H)
check_include_file(strings.h HAVE_STRINGS_H)
# Check for the existance of the following functions
check_function_exists(setgrent HAVE_SETGRENT)
check_function_exists(strcasecmp HAVE_STRCASECMP)
check_function_exists(stricmp HAVE_STRICMP)
# Check for the existence of the following functions
check_function_exists(clock_gettime HAVE_CLOCK_GETTIME)
check_function_exists(umask HAVE_UMASK)
check_function_exists(epoll_wait HAVE_EPOLL)
check_function_exists(poll HAVE_POLL)
check_function_exists(kqueue HAVE_KQUEUE)
# Check if eventfd works
try_run(EVENTFD_TEST_RUN_RESULT EVENTFD_TEST_COMPILE_RESULT ${CMAKE_CURRENT_BINARY_DIR} ${Anope_SOURCE_DIR}/cmake/eventfd_test.cpp)
set(HAVE_EVENTFD FALSE)
if (EVENTFD_TEST_COMPILE_RESULT AND EVENTFD_TEST_RUN_RESULT EQUAL 1)
set(HAVE_EVENTFD TRUE)
endif(EVENTFD_TEST_COMPILE_RESULT AND EVENTFD_TEST_RUN_RESULT EQUAL 1)
# Strip the leading and trailing spaces from the compile flags
if(CXXFLAGS)
strip_string(${CXXFLAGS} CXXFLAGS)
endif(CXXFLAGS)
# Strip the leading and trailing spaces from the linker flags
if(LDFLAGS)
strip_string(${LDFLAGS} LDFLAGS)
endif(LDFLAGS)
# Search for the following programs
find_program(GREP grep)
find_program(SH sh)
find_program(CHGRP chgrp)
find_program(CHMOD chmod)
find_program(PERL perl)
if(NOT WIN32 AND RUNGROUP)
find_program(CHGRP "chgrp" REQUIRED)
find_program(CHMOD "chmod" REQUIRED)
endif()
# If perl is included on the system and the user wants to use run-cc.pl, change the commands for compiling and linking
if(PERL AND USE_RUN_CC_PL)
set(CMAKE_CXX_COMPILE_OBJECT "${PERL} ${Anope_SOURCE_DIR}/run-cc.pl -q ${CMAKE_CXX_COMPILE_OBJECT}")
set(CMAKE_CXX_LINK_EXECUTABLE "${PERL} ${Anope_SOURCE_DIR}/run-cc.pl -q ${CMAKE_CXX_LINK_EXECUTABLE}")
set(CMAKE_CXX_CREATE_SHARED_MODULE "${PERL} ${Anope_SOURCE_DIR}/run-cc.pl -q ${CMAKE_CXX_CREATE_SHARED_MODULE}")
endif(PERL AND USE_RUN_CC_PL)
# If a INSTDIR was passed in to CMake, use it as the install prefix, otherwise set the default install prefix to the services directory under the user's home directory
# If a INSTDIR was passed in to CMake, use it as the install prefix, otherwise set the default install prefix to the anope directory under the user's home directory
if(INSTDIR)
set(CMAKE_INSTALL_PREFIX "${INSTDIR}")
else(INSTDIR)
set(CMAKE_INSTALL_PREFIX "$ENV{HOME}/services")
endif(INSTDIR)
elseif(NOT CMAKE_INSTALL_PREFIX)
set(CMAKE_INSTALL_PREFIX "$ENV{HOME}/anope-${VERSION_MAJOR}-${VERSION_MINOR}")
endif()
# Set default paths for various directories if not already defined
if(NOT BIN_DIR)
set(BIN_DIR "bin")
endif()
if(NOT DATA_DIR)
set(DATA_DIR "data")
endif()
if(NOT DOC_DIR)
set(DOC_DIR "doc")
endif()
if(NOT CONF_DIR)
set(CONF_DIR "conf")
endif()
if(NOT MODULE_DIR)
set(MODULE_DIR "modules")
endif()
if(NOT LOCALE_DIR)
set(LOCALE_DIR "locale")
endif()
if(NOT LOG_DIR)
set(LOG_DIR "logs")
endif()
# Version number processing
# Find all lines in src/version.sh that start with VERSION_
read_from_file(${Anope_SOURCE_DIR}/src/version.sh "^VERSION_" VERSIONS)
file(STRINGS ${Anope_SOURCE_DIR}/src/version.sh VERSIONS REGEX "^VERSION_")
# Iterate through the strings found
foreach(VERSION_STR ${VERSIONS})
# Get the length of the string
string(LENGTH ${VERSION_STR} VERSION_LEN)
# Subtract 16 from the string's length (8 for VERSION_, 5 more for the type, 2 for the space and leading quote, 1 for the trailing quote)
math(EXPR VERSION_NUM_LEN "${VERSION_LEN} - 16")
# Extract the type from the string
string(SUBSTRING ${VERSION_STR} 8 5 VERSION_TYPE)
# Extract the actual value from the string
string(SUBSTRING ${VERSION_STR} 15 ${VERSION_NUM_LEN} VERSION)
# Set the version type to the value extract from above
set(VERSION_${VERSION_TYPE} ${VERSION})
endforeach(VERSION_STR ${VERSIONS})
string(REGEX REPLACE "^VERSION_([A-Z]+)=\"?([^\"]*)\"?$" "\\1;\\2" VERSION_OUT ${VERSION_STR})
list(LENGTH VERSION_OUT VERSION_LEN)
list(GET VERSION_OUT 0 VERSION_TYPE)
if(${VERSION_LEN} GREATER 1)
list(GET VERSION_OUT 1 VERSION_DATA)
set(VERSION_${VERSION_TYPE} ${VERSION_DATA})
endif()
endforeach()
# Default build version to 0
set(VERSION_BUILD 0)
@@ -402,7 +187,7 @@ set(VERSION_BUILD 0)
# Only change the build number if version.h exists
if(EXISTS "${Anope_SOURCE_DIR}/include/version.h")
# Attempt to read the build number from include/version.h
read_from_file(${Anope_SOURCE_DIR}/include/version.h "^#define VERSION_BUILD" VERSIONS)
file(STRINGS ${Anope_SOURCE_DIR}/src/version.sh VERSIONS REGEX "^#define VERSION_BUILD")
foreach(VERSION_STR ${VERSIONS})
# Get the length of the string
string(LENGTH ${VERSION_STR} VERSION_LEN)
@@ -412,8 +197,8 @@ if(EXISTS "${Anope_SOURCE_DIR}/include/version.h")
string(SUBSTRING ${VERSION_STR} 22 ${VERSION_NUM_LEN} VERSION)
# Set VERSION_BUILD correctly
set(VERSION_BUILD ${VERSION})
endforeach(VERSION_STR ${VERSIONS})
endif(EXISTS "${Anope_SOURCE_DIR}/include/version.h")
endforeach()
endif()
# Set the version variables based on what was found above
set(VERSION_COMMA "${VERSION_MAJOR},${VERSION_MINOR},${VERSION_PATCH},${VERSION_BUILD}")
@@ -426,53 +211,35 @@ set(VERSION_FULL_NOBUILD "${VERSION_DOTTED_NOBUILD}${VERSION_EXTRA}")
if(WIN32)
# Generate the win32.rc file using the above variables
configure_file(${Anope_SOURCE_DIR}/src/win32/win32.rc.cmake ${Anope_BINARY_DIR}/src/win32/win32.rc)
endif(WIN32)
# 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(MSVC)
endif(${Anope_SOURCE_DIR} STREQUAL ${Anope_BINARY_DIR})
# Go into the following directories and run their CMakeLists.txt as well
add_subdirectory(data)
add_subdirectory(docs)
add_subdirectory(language)
add_subdirectory(src)
add_subdirectory(modules)
add_subdirectory(include)
endif()
# Get the filename of the Anope binary, to use later
get_target_property(SERVICES_BINARY ${PROGRAM_NAME} LOCATION)
get_filename_component(SERVICES_BINARY ${SERVICES_BINARY} NAME)
set(SERVICES_BINARY "$<TARGET_FILE:${PROGRAM_NAME}>")
cmake_path(GET SERVICES_BINARY FILENAME SERVICES_BINARY)
# At install time, create the following additional directories
install(CODE "file(MAKE_DIRECTORY \"\${CMAKE_INSTALL_PREFIX}/data/backups\")")
install(CODE "file(MAKE_DIRECTORY \"\${CMAKE_INSTALL_PREFIX}/data/logs\")")
install(CODE "file(MAKE_DIRECTORY \"\${CMAKE_INSTALL_PREFIX}/data/modules/runtime\")")
file(REAL_PATH ${DATA_DIR} ABSOLUTE_DATA_DIR BASE_DIRECTORY ${CMAKE_INSTALL_PREFIX})
file(REAL_PATH ${LOG_DIR} ABSOLUTE_LOG_DIR BASE_DIRECTORY ${CMAKE_INSTALL_PREFIX})
install(CODE "file(MAKE_DIRECTORY \"\$ENV{DESTDIR}${ABSOLUTE_DATA_DIR}/backups\")")
install(CODE "file(MAKE_DIRECTORY \"\$ENV{DESTDIR}${ABSOLUTE_LOG_DIR}\")")
if(WIN32)
install(CODE "file(MAKE_DIRECTORY \"\$ENV{DESTDIR}${ABSOLUTE_DATA_DIR}/runtime\")")
endif()
# On non-Windows platforms, if RUNGROUP is set, change the permissions of the below directories, as well as the group of the data directory
if(NOT WIN32 AND RUNGROUP)
install(CODE "execute_process(COMMAND ${CHMOD} 2775 \"\${CMAKE_INSTALL_PREFIX}/data/backups\")")
install(CODE "execute_process(COMMAND ${CHMOD} 2775 \"\${CMAKE_INSTALL_PREFIX}/data/logs\")")
install(CODE "execute_process(COMMAND ${CHMOD} 2775 \"\${CMAKE_INSTALL_PREFIX}/data/modules/runtime\")")
install(CODE "execute_process(COMMAND ${CHGRP} -R ${RUNGROUP} \"\${CMAKE_INSTALL_PREFIX}\")")
endif(NOT WIN32 AND RUNGROUP)
install(CODE "execute_process(COMMAND ${CHMOD} 2775 \"\$ENV{DESTDIR}${ABSOLUTE_DATA_DIR}/backups\")")
install(CODE "execute_process(COMMAND ${CHMOD} 2775 \"\$ENV{DESTDIR}${ABSOLUTE_LOG_DIR}\")")
install(CODE "execute_process(COMMAND ${CHGRP} -R ${RUNGROUP} \"\$ENV{DESTDIR}\${CMAKE_INSTALL_PREFIX}\")")
endif()
# On Windows platforms, install extra files
if(WIN32)
install(FILES ${Anope_SOURCE_DIR}/src/win32/anope.bat
DESTINATION bin
DESTINATION ${BIN_DIR}
)
endif(WIN32)
endif()
file(REAL_PATH ${MODULE_DIR} ABSOLUTE_MODULE_DIR BASE_DIRECTORY ${CMAKE_INSTALL_PREFIX})
install(CODE "file(REMOVE_RECURSE \"$ENV{DESTDIR}${ABSOLUTE_MODULE_DIR}\")")
# Only process the CPack section if we have CPack
if(EXISTS "${CMAKE_ROOT}/Modules/CPack.cmake")
@@ -483,11 +250,15 @@ 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
if(WIN32)
# By default, do not warn when built on machines using only VS Express:
IF(NOT DEFINED CMAKE_INSTALL_SYSTEM_RUNTIME_LIBS_NO_WARNINGS)
SET(CMAKE_INSTALL_SYSTEM_RUNTIME_LIBS_NO_WARNINGS ON)
ENDIF(NOT DEFINED CMAKE_INSTALL_SYSTEM_RUNTIME_LIBS_NO_WARNINGS)
# Also for Windows, include installing the MSVCRT library
include(InstallRequiredSystemLibraries)
set(CPACK_GENERATOR "NSIS")
@@ -498,19 +269,26 @@ if(EXISTS "${CMAKE_ROOT}/Modules/CPack.cmake")
"bin\\\\anope.bat\\\" \\\"-debug -nofork" "Anope IRC Services (Debug and Window Logging)"
"bin\\\\anope.bat\\\" \\\"-nofork" "Anope IRC Services (Window Logging)"
"bin\\\\anope.bat\\\" \\\"-nothird" "Anope IRC Services (No Third Party Modules)"
"http://www.anope.org/" "Anope Web Site"
"https://www.anope.org/" "Anope Web Site"
)
# The following doesn't work, but a bug report has been filed about it
#set(CPACK_CREATE_DESKTOP_LINK_${SERVICES_BINARY} TRUE)
set(CPACK_NSIS_MUI_ICON "${Anope_SOURCE_DIR}/src\\\\win32\\\\anope-icon.ico")
set(CPACK_NSIS_MUI_UNIICON "${Anope_SOURCE_DIR}/src\\\\win32\\\\anope-icon.ico")
set(CPACK_NSIS_INSTALLED_ICON_NAME "${SERVICES_BINARY}")
set(CPACK_NSIS_URL_INFO_ABOUT "http://www.anope.org/")
set(CPACK_NSIS_URL_INFO_ABOUT "https://www.anope.org/")
set(CPACK_NSIS_COMPRESSOR "/SOLID lzma")
endif(WIN32)
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(EXISTS "${CMAKE_ROOT}/Modules/CPack.cmake")
endif()
# Go into the following directories and run their CMakeLists.txt as well
add_subdirectory(data)
add_subdirectory(docs)
add_subdirectory(language)
add_subdirectory(src)
add_subdirectory(modules)
add_subdirectory(include)
+135 -175
View File
@@ -1,29 +1,21 @@
#!/bin/sh
#
# Configuration script for Services.
# Anope IRC Services <https://www.anope.org/>
#
# Anope (c) 2003-2011 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
echo2 () {
$ECHO2 "$*$ECHO2SUF" # these are defined later
}
exists () { # because some shells don't have test -e
if [ -f $1 -o -d $1 -o -p $1 -o -c $1 -o -b $1 ] ; then
return 0
else
return 1
fi
}
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
@@ -37,96 +29,75 @@ Load_Cache () {
}
Run_Build_System () {
WITH_INST=""
WITH_RUN=""
WITH_PERM=""
RUN_CC_PL=""
GEN_TYPE=""
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 [ "$USE_RUN_CC_PL" = "yes" ] ; then
RUN_CC_PL="-DUSE_RUN_CC_PL:BOOLEAN=ON"
else
RUN_CC_PL="-DUSE_RUN_CC_PL:BOOLEAN=OFF"
if [ "$EXTRA_INCLUDE_DIRS" != "" ] ; then
CMAKE_COMMAND="${CMAKE_COMMAND} -D EXTRA_INCLUDE=$EXTRA_INCLUDE_DIRS"
fi
case `uname -s` in
MINGW*)
GEN_TYPE="-G\"MSYS Makefiles\""
;;
esac
if [ "$SOURCE_DIR" = "." ] ; then
pwdsave=`pwd`
test -d build || mkdir build
cd "build"
REAL_SOURCE_DIR=".."
else
REAL_SOURCE_DIR="$SOURCE_DIR"
if [ "$EXTRA_LIB_DIRS" != "" ] ; then
CMAKE_COMMAND="${CMAKE_COMMAND} -D EXTRA_LIBS=$EXTRA_LIB_DIRS"
fi
echo "cmake $GEN_TYPE $WITH_INST $WITH_RUN $WITH_PERM $BUILD_TYPE $RUN_CC_PL $EXTRA_CONFIG_ARGS $REAL_SOURCE_DIR"
if [ "$EXTRA_CONFIG_ARGS" != "" ] ; then
CMAKE_COMMAND="${CMAKE_COMMAND} $EXTRA_CONFIG_ARGS"
fi
cmake $GEN_TYPE $WITH_INST $WITH_RUN $WITH_PERM $BUILD_TYPE $RUN_CC_PL $EXTRA_CONFIG_ARGS $REAL_SOURCE_DIR
echo $CMAKE_COMMAND
$CMAKE_COMMAND
if [ $? -ne 0 ]; then
echo "You should fix these issues and then run ./Config -quick to rerun CMake."
exit 1
fi
echo ""
if [ "$SOURCE_DIR" = "." ] ; then
echo "Now cd build, then run make to build Anope."
cd "$pwdsave"
else
echo "Now run make to build Anope."
fi
echo "Now run 'make -C ${BUILD_DIR#"$PWD/"} install' to build and install Anope."
}
ECHO2SUF=''
if [ "`echo -n a ; echo -n b`" = "ab" ] ; then
ECHO2='echo -n'
elif [ "`echo 'a\c' ; echo 'b\c'`" = "ab" ] ; then
ECHO2='echo' ; ECHO2SUF='\c'
elif [ "`printf 'a' 2>&1 ; printf 'b' 2>&1`" = "ab" ] ; then
ECHO2='printf "%s"'
else
# oh well...
ECHO2='echo'
fi
export ECHO2 ECHO2SUF
###########################################################################
# Init values
###########################################################################
INSTDIR=$HOME/services
INSTDIR="${HOME}/anope-${VERSION_MAJOR}.${VERSION_MINOR}"
RUNGROUP=
UMASK=
DEBUG="yes"
USE_RUN_CC_PL="no"
DEBUG="no"
EXTRA_INCLUDE_DIRS=
EXTRA_LIB_DIRS=
EXTRA_CONFIG_ARGS=
CAN_QUICK="no"
SOURCE_DIR=`dirname $0`
###########################################################################
# 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]"
@@ -134,11 +105,15 @@ while [ $# -ge 1 ] ; do
echo "-nointro Skip intro (disclaimer, etc)"
echo "-quick Skip questions, go straight to cmake"
exit 0
elif [ $1 = "-nocache" ] ; then
elif [ "$OPTION" = "devel" ] ; then
DEBUG="yes"
DEVEL="yes"
INSTDIR="$SOURCE_DIR/run"
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
@@ -155,83 +130,25 @@ done
# Check for CMake and (optionally) install it
###########################################################################
which cmake > /dev/null
cmake --version 2>&1 > /dev/null
if [ $? -ne 0 ] ; then
clear
if exists "cmake-bin" ; then :
else
echo "Anope requires CMake 2.4 or newer, which can be downloaded at http://cmake.org"
echo "If you have installed CMake already, ensure it is in your PATH environment variable."
if [ `uname` = "Linux" ] ; then
echo ""
echo "Config can attempt to install CMake for you now, which"
echo "will take approximately 50 MB of disk space."
echo "Would you like to install CMake now?"
echo2 "[y] "
read YN
if [ "$YN" = "n" ] ; then
exit 0
fi
echo "Downloading CMake... this may take a minute or two."
wget -q http://anope.org/cmake/linux-i386.php -O cmake-bin.tar.gz
if [ $? -ne 0 ] ; then
rm -f cmake-bin.tar.gz
echo "Unable to download CMake"
exit 0
fi
mkdir -p cmake-bin
tar zxf cmake-bin.tar.gz -C cmake-bin
rm -f cmake-bin.tar.gz
echo "Done!"
else
exit 0
fi
fi
CMAKE_BIN=`find cmake-bin -name cmake`
CMAKE_BIN="`pwd`/`dirname $CMAKE_BIN`"
PATH="$PATH:$CMAKE_BIN"
echo "Anope requires CMake 3.20 or newer, which can be downloaded at https://cmake.org/ or through your system's package manager."
echo "If you have installed CMake already, ensure it is in your PATH environment variable."
exit 0
fi
###########################################################################
if [ ! "$NO_INTRO" ] ; then
case `uname -s` in
MINGW*)
PAGER=less
;;
*)
PAGER=more
clear
;;
esac
. $SOURCE_DIR/src/version.sh
if [ -d .git ] ; then
VERSION=`git describe --tags`
VERSION_BUILD=`echo "$VERSION" | cut -d'-' -f2`
if [ "$SOURCE_DIR" = "." ] ; then
test -d build || mkdir -p build/include
BUILD_DIR="build"
else
BUILD_DIR="."
fi
VERSION_EXTRA=`echo "$VERSION" | cut -d'-' -f3`
# Only do this if we are not on a tag, src/version.sh will be all we need then.
if [ "$VERSION_BUILD" != "$VERSION_EXTRA" ] ; then
echo "#define VERSION_BUILD $VERSION_BUILD" > $BUILD_DIR/include/version.h
echo "#define VERSION_EXTRA \"-$VERSION_EXTRA\"" >> $BUILD_DIR/include/version.h
fi
fi
cat $SOURCE_DIR/.BANNER | sed "s/CURVER/$VERSION/" | sed "s@SOURCE_DIR@$SOURCE_DIR@" | $PAGER
export MORE='-e'
cat $SOURCE_DIR/.BANNER | sed "s/CURVER/$VERSION_MAJOR.$VERSION_MINOR.$VERSION_PATCH$VERSION_EXTRA/" | sed "s@SOURCE_DIR@$SOURCE_DIR@" | more
echo ""
else
echo ""
fi
echo "Beginning Services configuration."
echo "Beginning Anope configuration."
echo ""
###########################################################################
@@ -248,20 +165,47 @@ export ok INPUT
####
TEMP_YN="n"
if [ "$DEVEL" = "yes" ] ; then
TEMP_YN="y"
fi
echo "You are building the 2.1 development branch. This branch is not as well tested"
echo "as the 2.0 stable branch and may have compatibility breaks without notice. Are"
echo "you sure you want to use this version?"
echo -n "[$TEMP_YN] "
read YN
if [ "$YN" ] ; then
if [ "$YN" = "y" ] ; then
DEVEL="yes"
else
DEVEL="no"
fi
fi
echo ""
if [ "$DEVEL" != "yes" ] ; then
echo "If you are building from Git you can run \`git checkout 2.0\` to get the latest"
echo "stable code. Otherwise, you can download the latest 2.0 release tarball from"
echo "https://github.com/anope/anope/releases/latest"
exit 1
fi
####
ok=0
echo "In what directory do you want the binaries to be installed?"
echo "In what directory should Anope be installed?"
while [ $ok -eq 0 ] ; do
echo2 "[$INSTDIR] "
echo -n "[$INSTDIR] "
if read INPUT ; then : ; else echo "" ; exit 1 ; fi
if [ ! "$INPUT" ] ; then
INPUT=$INSTDIR
fi
if [ ! -d "$INPUT" ] ; then
if exists "$INPUT" ; then
if [ -e "$INPUT" ]; then
echo "$INPUT exists, but is not a directory!"
else
echo "$INPUT does not exist. Create it?"
echo2 "[y] "
echo -n "[y] "
read YN
if [ "$YN" != "n" ] ; then
if mkdir -p $INPUT ; then
@@ -269,8 +213,8 @@ while [ $ok -eq 0 ] ; do
fi
fi
fi
elif exists "$INPUT/include/services.h" ; then
echo "You cannot use the Services source directory as a target directory."
elif [ -e "$INPUT/include/services.h" ]; then
echo "You cannot use the Anope source directory as a target directory."
else
ok=1
fi
@@ -282,15 +226,15 @@ echo ""
OLD_RUNGROUP="$RUNGROUP"
if [ "$RUNGROUP" ] ; then
echo "Which group should all Services data files be owned by? (If Services"
echo "Which group should all Anope data files be owned by? (If Anope"
echo "should not force files to be owned by a particular group, type \"none\""
echo "(without the quotes) and press Return.)"
else
echo "Which group should all Services data files be owned by? (If Services"
echo "Which group should all Anope data files be owned by? (If Anope"
echo "should not force files to be owned by a particular group, just press"
echo "Return.)"
fi
echo2 "[$RUNGROUP] "
echo -n "[$RUNGROUP] "
if read INPUT ; then : ; else echo "" ; exit 1 ; fi
if [ "$INPUT" ] ; then
if [ "$INPUT" = "none" ] ; then
@@ -315,7 +259,7 @@ ok=0
echo "What should the default umask for data files be (in octal)?"
echo "(077 = only accessible by owner; 007 = accessible by owner and group)"
while [ $ok -eq 0 ] ; do
echo2 "[$UMASK] "
echo -n "[$UMASK] "
if read INPUT ; then : ; else echo "" ; exit 1 ; fi
if [ ! "$INPUT" ] ; then
INPUT=$UMASK
@@ -339,7 +283,7 @@ if [ "$DEBUG" = "yes" ] ; then
TEMP_YN="y"
fi
echo "Would you like to build a debug version of Anope?"
echo2 "[$TEMP_YN] "
echo -n "[$TEMP_YN] "
read YN
if [ "$YN" ] ; then
if [ "$YN" = "y" ] ; then
@@ -352,38 +296,52 @@ echo ""
####
TEMP_YN="n"
if [ "$USE_RUN_CC_PL" = "yes" ] ; then
TEMP_YN="y"
fi
echo "You can optionally have the build run through run-cc.pl, which will"
echo "cause warnings and errors (if any) to be colored yellow and red,"
echo "respectively. This relies on Perl being installed, so if you say yes"
echo "to this without Perl, the option will be ignored."
echo "NOTE: If you are using MinGW, it is NOT recommended to say yes to"
echo "this, it may fail."
echo "Would you like to utilize run-cc.pl?"
echo2 "[$TEMP_YN] "
read YN
if [ "$YN" ] ; then
if [ "$YN" = "y" ] ; then
USE_RUN_CC_PL="yes"
echo "Are there any extra include directories you wish to use?"
echo "You may only need to do this if CMake is unable to locate"
echo "missing dependencies without hints."
echo "Separate directories with semicolons."
echo "If you need no extra include directories, enter NONE in all caps."
echo -n "[$EXTRA_INCLUDE_DIRS] "
if read INPUT ; then : ; else echo "" ; exit 1 ; fi
if [ "$INPUT" ] ; then
if [ "$INPUT" = "NONE" ] ; then
EXTRA_INCLUDE_DIRS=""
else
USE_RUN_CC_PL="no"
EXTRA_INCLUDE_DIRS=$INPUT
fi
fi
echo ""
####
echo "Are there any extra arguments you wish to pass to cmake?"
echo "You may only need to do this if cmake is unable to locate"
echo "Are there any extra library directories you wish to use?"
echo "You may only need to do this if CMake is unable to locate"
echo "missing dependencies without hints."
echo "You can do this by: -DEXTRA_INCLUDE:STRING=/path/to/files;/path/to/more/files"
echo2 "[$EXTRA_CONFIG_ARGS] "
echo "Separate directories with semicolons."
echo "If you need no extra library directories, enter NONE in all caps."
echo -n "[$EXTRA_LIB_DIRS] "
if read INPUT ; then : ; else echo "" ; exit 1 ; fi
if [ "$INPUT" ] ; then
EXTRA_CONFIG_ARGS=$INPUT
if [ "$INPUT" = "NONE" ] ; then
EXTRA_LIB_DIRS=""
else
EXTRA_LIB_DIRS=$INPUT
fi
fi
echo ""
####
echo "Are there any extra arguments you wish to pass to CMake?"
echo "If you need no extra arguments to CMake, enter NONE in all caps."
echo -n "[$EXTRA_CONFIG_ARGS] "
if read INPUT ; then : ; else echo "" ; exit 1 ; fi
if [ "$INPUT" ] ; then
if [ "$INPUT" = "NONE" ] ; then
EXTRA_CONFIG_ARGS=""
else
EXTRA_CONFIG_ARGS=$INPUT
fi
fi
echo ""
@@ -393,14 +351,16 @@ echo ""
# Store values
################################################################################
echo2 "Saving configuration results in config.cache... "
echo -n "Saving configuration results in config.cache... "
cat <<EOT >$SOURCE_DIR/config.cache
INSTDIR="$INSTDIR"
RUNGROUP="$RUNGROUP"
UMASK=$UMASK
DEBUG="$DEBUG"
USE_RUN_CC_PL="$USE_RUN_CC_PL"
DEVEL="$DEVEL"
EXTRA_INCLUDE_DIRS="$EXTRA_INCLUDE_DIRS"
EXTRA_LIB_DIRS="$EXTRA_LIB_DIRS"
EXTRA_CONFIG_ARGS="$EXTRA_CONFIG_ARGS"
EOT
echo "done."
BIN
View File
Binary file not shown.
+46
View File
@@ -0,0 +1,46 @@
## About
Anope is an open source set of IRC services. It is highly modular, with a vast number of configurable parameters, and is the most used IRC services package. There are also many modules on the [modsite](https://modules.anope.org) to add additional features. It runs on Linux, BSD, and Windows, and supports many modern IRCds, including InspIRCd, UnrealIRCd, and ircd-hybrid. For more details, credits, command line options, and contact information see [docs/README](https://github.com/anope/anope/blob/2.0/docs/README).
* [Website](https://anope.org)
* [GitHub](https://github.com/anope)
* IRC \#anope on irc.teranova.net
## Installation
### Linux/BSD
Download the latest release off of the [releases page](https://github.com/anope/anope/releases).
```
$ ./Config
$ cd build
$ make
$ make install
```
Now change to the directory where you installed Anope to, e.g. `$ cd ~/anope/`
### Windows
Download the latest release off of the [releases page](https://github.com/anope/anope/releases) and run the installer.
## Configuration
Copy conf/anope.example.conf to conf/anope.conf
```
$ cp conf/anope.example.conf conf/anope.conf
```
Edit anope.conf, configuring the uplink, serverinfo, and protocol module configurations. Example link blocks for popular IRCds are included in the the example.conf documentation. The [Anope wiki](https://wiki.anope.org) is also a good source of information. Our support channel is located at #anope on [irc.teranova.net](ircs://irc.teranova.net/anope).
Note that the example configuration file includes other example configuration files. If you want to modify the other example configuration files, copy them (e.g. `modules.example.conf` to `modules.conf`) and modify the `include` directive in `anope.conf` to include the new file.
## Running
Run `$ ./bin/anope` to start Anope. If asked to provide logs for support, use the `--support` flag, e.g.: `$ ./bin/anope --support`
## Installing extra modules
Extra modules, which are usually modules which require extra libraries to use, such as m\_mysql, can be enabled with the `./extras` command from the source directory. Then re-run `Config`, `make` and `make install` again. Third party modules can be installed by placing them into the `modules/third` directory.
-540
View File
@@ -1,540 +0,0 @@
###############################################################################
# strip_string(<input string> <output string>)
#
# A macro to handle stripping the leading and trailing spaces from a string,
# uses string(STRIP) if using CMake 2.6.x or better, otherwise uses
# string(REGEX REPLACE).
###############################################################################
macro(strip_string INPUT_STRING OUTPUT_STRING)
if(CMAKE26_OR_BETTER)
# For CMake 2.6.x or better, we can just use the STRIP sub-command of string()
string(STRIP ${INPUT_STRING} ${OUTPUT_STRING})
else(CMAKE26_OR_BETTER)
# For CMake 2.4.x, we will have to use the REGEX REPLACE sub-command of string() instead
# First check if the input string is empty or not
if (${INPUT_STRING} STREQUAL "")
set(${OUTPUT_STRING} "")
else(${INPUT_STRING} STREQUAL "")
# Determine if the string is entirely empty or not
string(REGEX MATCH "^[ \t]*$" EMPTY_STRING "${INPUT_STRING}")
if(EMPTY_STRING)
set(${OUTPUT_STRING} "")
else(EMPTY_STRING)
# We detect if there is any leading whitespace and remove any if there is
string(SUBSTRING "${INPUT_STRING}" 0 1 FIRST_CHAR)
if(FIRST_CHAR STREQUAL " " OR FIRST_CHAR STREQUAL "\t")
string(REGEX REPLACE "^[ \t]+" "" TEMP_STRING "${INPUT_STRING}")
else(FIRST_CHAR STREQUAL " " OR FIRST_CHAR STREQUAL "\t")
set(TEMP_STRING "${INPUT_STRING}")
endif(FIRST_CHAR STREQUAL " " OR FIRST_CHAR STREQUAL "\t")
# Next we detect if there is any trailing whitespace and remove any if there is
string(LENGTH "${TEMP_STRING}" STRING_LEN)
math(EXPR STRING_LEN "${STRING_LEN} - 1")
string(SUBSTRING "${TEMP_STRING}" ${STRING_LEN} 1 LAST_CHAR)
if(LAST_CHAR STREQUAL " " OR LAST_CHAR STREQUAL "\t")
string(REGEX REPLACE "[ \t]+$" "" ${OUTPUT_STRING} "${TEMP_STRING}")
else(LAST_CHAR STREQUAL " " OR LAST_CHAR STREQUAL "\t")
set(${OUTPUT_STRING} "${TEMP_STRING}")
endif(LAST_CHAR STREQUAL " " OR LAST_CHAR STREQUAL "\t")
endif(EMPTY_STRING)
endif(${INPUT_STRING} STREQUAL "")
endif(CMAKE26_OR_BETTER)
endmacro(strip_string)
###############################################################################
# append_to_list(<list> <args>...)
#
# A macro to handle appending to lists, uses list(APPEND) if using CMake 2.4.2
# or better, otherwise uses set() instead.
###############################################################################
macro(append_to_list LIST)
if(CMAKE242_OR_BETTER)
# For CMake 2.4.2 or better, we can just use the APPEND sub-command of list()
list(APPEND ${LIST} ${ARGN})
else(CMAKE242_OR_BETTER)
# For CMake 2.4.x before 2.4.2, we have to do this manually use set() instead
set(${LIST} ${${LIST}} ${ARGN})
endif(CMAKE242_OR_BETTER)
endmacro(append_to_list)
###############################################################################
# find_in_list(<list> <value> <output variable>)
#
# A macro to handle searching within a list, will store the result in the
# given <output variable>, uses list(FIND) if using CMake 2.6.x or better
# (or CMake 2.4.8 or better), otherwise it iterates through the list to find
# the item.
###############################################################################
macro(find_in_list LIST ITEM_TO_FIND FOUND)
if(CMAKE248_OR_BETTER)
# For CMake 2.4.8 or better, we can use the FIND sub-command of list()
list(FIND ${LIST} ${ITEM_TO_FIND} ITEM_FOUND)
else(CMAKE248_OR_BETTER)
# For CMake 2.4.x before 2.4.8, we have to do this ourselves (NOTE: This is very slow due to a lack of break() as well)
# Firstly we set the position to -1 indicating nothing found, we also use a temporary position
set(ITEM_FOUND -1)
set(POS 0)
# Iterate through the list
foreach(ITEM ${${LIST}})
# If the item we are looking at is the item we are trying to find, set that we've found the item
if(${ITEM} STREQUAL ${ITEM_TO_FIND})
set(ITEM_FOUND ${POS})
endif(${ITEM} STREQUAL ${ITEM_TO_FIND})
# Increase the position value by 1
math(EXPR POS "${POS} + 1")
endforeach(ITEM)
endif(CMAKE248_OR_BETTER)
# Set the given FOUND variable to the result
set(${FOUND} ${ITEM_FOUND})
endmacro(find_in_list)
###############################################################################
# remove_list_duplicates(<list>)
#
# A macro to handle removing duplicates from a list, uses
# list(REMOVE_DUPLICATES) if using CMake 2.6.x or better, otherwise it uses
# a slower method of creating a temporary list and only adding to it when
# a duplicate item hasn't been found.
###############################################################################
macro(remove_list_duplicates LIST)
if(CMAKE26_OR_BETTER)
# For CMake 2.6.x or better, this can be done automatically
list(REMOVE_DUPLICATES ${LIST})
else(CMAKE26_OR_BETTER)
# For CMake 2.4.x, we have to do this ourselves, firstly we'll clear a temporary list
set(NEW_LIST)
# Iterate through the old list
foreach(ITEM ${${LIST}})
# Check if the item is in the new list
find_in_list(NEW_LIST ${ITEM} FOUND_ITEM)
if(FOUND_ITEM EQUAL -1)
# If the item was not found, append it to the list
append_to_list(NEW_LIST ${ITEM})
endif(FOUND_ITEM EQUAL -1)
endforeach(ITEM)
# Replace the old list with the new list
set(${LIST} ${NEW_LIST})
endif(CMAKE26_OR_BETTER)
endmacro(remove_list_duplicates)
###############################################################################
# remove_item_from_list(<list> <value>)
#
# A macro to handle removing a value from a list, uses list(REMOVE_ITEM) in
# both cases, but can remove the value itself using CMake 2.4.2 or better,
# while older versions use a slower method of iterating the list to find the
# index of the value to remove.
###############################################################################
macro(remove_item_from_list LIST VALUE)
if(CMAKE242_OR_BETTER)
# For CMake 2.4.2 or better, this can be done automatically
list(REMOVE_ITEM ${LIST} ${VALUE})
else(CMAKE242_OR_BETTER)
# For CMake 2.4.x before 2.4.2, we have to do this ourselves, firstly we set the index and a variable to indicate if the item was found
set(INDEX 0)
set(FOUND FALSE)
# Iterate through the old list
foreach(ITEM ${${LIST}})
# If the item hasn't been found yet, but the current item is the same, remove it
if(NOT FOUND)
if(ITEM STREQUAL ${VALUE})
set(FOUND TRUE)
list(REMOVE_ITEM ${LIST} ${INDEX})
endif(ITEM STREQUAL ${VALUE})
endif(NOT FOUND)
# Increase the index value by 1
math(EXPR INDEX "${INDEX} + 1")
endforeach(ITEM)
endif(CMAKE242_OR_BETTER)
endmacro(remove_item_from_list)
###############################################################################
# sort_list(<list>)
#
# A macro to handle sorting a list, uses list(SORT) if using CMake 2.4.4 or
# better, otherwise it uses a slower method of creating a temporary list and
# adding elements in alphabetical order.
###############################################################################
macro(sort_list LIST)
if(CMAKE244_OR_BETTER)
# For CMake 2.4.4 or better, this can be done automatically
list(SORT ${LIST})
else(CMAKE244_OR_BETTER)
# For CMake 2.4.x before 2.4.4, we have to do this ourselves, firstly we'll create a teporary list
set(NEW_LIST)
# Iterate through the old list
foreach(ITEM ${${LIST}})
# Temporary index position for the new list, as well as temporary value to store if the item was ever found
set(INDEX 0)
set(FOUND FALSE)
# Iterate through the new list
foreach(NEW_ITEM ${NEW_LIST})
# Compare the items, only if nothing was found before
if(NOT FOUND)
if(NEW_ITEM STRGREATER "${ITEM}")
set(FOUND TRUE)
list(INSERT NEW_LIST ${INDEX} ${ITEM})
endif(NEW_ITEM STRGREATER "${ITEM}")
endif(NOT FOUND)
# Increase the index value by 1
math(EXPR INDEX "${INDEX} + 1")
endforeach(NEW_ITEM)
# If the item was never found, just append it to the end
if(NOT FOUND)
append_to_list(NEW_LIST ${ITEM})
endif(NOT FOUND)
endforeach(ITEM)
# Replace the old list with the new list
set(${LIST} ${NEW_LIST})
endif(CMAKE244_OR_BETTER)
endmacro(sort_list)
###############################################################################
# read_from_file(<filename> <regex> <output variable>)
#
# A macro to handle reading specific lines from a file, uses file(STRINGS) if
# using CMake 2.6.x or better, otherwise we read in the entire file and
# perform a string(REGEX MATCH) on each line of the file instead. This
# macro can also be used to read in all the lines of a file if REGEX is set
# to "".
###############################################################################
macro(read_from_file FILE REGEX STRINGS)
if(CMAKE26_OR_BETTER)
# For CMake 2.6.x or better, we can just use the STRINGS sub-command to get the lines that match the given regular expression (if one is given, otherwise get all lines)
if(REGEX STREQUAL "")
file(STRINGS ${FILE} RESULT)
else(REGEX STREQUAL "")
file(STRINGS ${FILE} RESULT REGEX ${REGEX})
endif(REGEX STREQUAL "")
else(CMAKE26_OR_BETTER)
# For CMake 2.4.x, we need to do this manually, firstly we read the file in
execute_process(COMMAND ${CMAKE_COMMAND} -DFILE:STRING=${FILE} -P ${Anope_SOURCE_DIR}/ReadFile.cmake ERROR_VARIABLE ALL_STRINGS)
# Next we replace all newlines with semicolons
string(REGEX REPLACE "\n" ";" ALL_STRINGS ${ALL_STRINGS})
if(REGEX STREQUAL "")
# For no regular expression, just set the result to all the lines
set(RESULT ${ALL_STRINGS})
else(REGEX STREQUAL "")
# Clear the result list
set(RESULT)
# Iterate through all the lines of the file
foreach(STRING ${ALL_STRINGS})
# Check for a match against the given regular expression
string(REGEX MATCH ${REGEX} STRING_MATCH ${STRING})
# If we had a match, append the match to the list
if(STRING_MATCH)
append_to_list(RESULT ${STRING})
endif(STRING_MATCH)
endforeach(STRING)
endif(REGEX STREQUAL "")
endif(CMAKE26_OR_BETTER)
# Set the given STRINGS variable to the result
set(${STRINGS} ${RESULT})
endmacro(read_from_file)
###############################################################################
# extract_include_filename(<line> <output variable> [<optional output variable of quote type>])
#
# This macro will take a #include line and extract the filename.
###############################################################################
macro(extract_include_filename INCLUDE FILENAME)
# Strip the leading and trailing spaces from the include line
strip_string(${INCLUDE} INCLUDE_STRIPPED)
# Make sure to only do the following if there is a string
if(INCLUDE_STRIPPED STREQUAL "")
set(FILE "")
else(INCLUDE_STRIPPED STREQUAL "")
# Extract the filename including the quotes or angle brackets
string(REGEX REPLACE "^.*([\"<].*[\">]).*$" "\\1" FILE "${INCLUDE_STRIPPED}")
# If an optional 3rd argument is given, we'll store if the quote style was quoted or angle bracketed
if(${ARGC} GREATER 2)
string(SUBSTRING ${FILE} 0 1 QUOTE)
if(QUOTE STREQUAL "<")
set(${ARGV2} "angle brackets")
else(QUOTE STREQUAL "<")
set(${ARGV2} "quotes")
endif(QUOTE STREQUAL "<")
endif(${ARGC} GREATER 2)
# Now remove the quotes or angle brackets
string(REGEX REPLACE "^[\"<](.*)[\">]$" "\\1" FILE "${FILE}")
endif(INCLUDE_STRIPPED STREQUAL "")
# Set the filename to the the given variable
set(${FILENAME} "${FILE}")
endmacro(extract_include_filename)
###############################################################################
# find_includes(<source filename> <output variable>)
#
# This macro will search through a file for #include lines, regardless of
# whitespace, but only returns the lines that are valid for the current
# platform CMake is running on.
###############################################################################
macro(find_includes SRC INCLUDES)
# Read all lines from the file that start with #, regardless of whitespace before the #
read_from_file(${SRC} "^[ \t]*#.*$" LINES)
# Set that any #include lines found are valid, and create temporary variables for the last found #ifdef/#ifndef
set(VALID_LINE TRUE)
set(LAST_DEF)
set(LAST_CHECK)
# Create an empty include list
set(INCLUDES_LIST)
# Iterate through all the # lines
foreach(LINE ${LINES})
# Search for #ifdef, #ifndef, #else, #endif, and #include
string(REGEX MATCH "^[ \t]*#[ \t]*ifdef[ \t]*.*$" FOUND_IFDEF ${LINE})
string(REGEX MATCH "^[ \t]*#[ \t]*ifndef[ \t]*.*$" FOUND_IFNDEF ${LINE})
string(REGEX MATCH "^[ \t]*#[ \t]*else.*$" FOUND_ELSE ${LINE})
string(REGEX MATCH "^[ \t]*#[ \t]*endif.*$" FOUND_ENDIF ${LINE})
string(REGEX MATCH "^[ \t]*#[ \t]*include[ \t]*[\"<].*[\">][\ t]*.*$" FOUND_INCLUDE ${LINE})
# If we found a #ifdef on the line, extract the data after the #ifdef and set if the lines after it are valid based on the variables in CMake
if(FOUND_IFDEF)
# Extract the define
string(REGEX REPLACE "^[ \t]*#[ \t]*ifdef[ \t]*(.*)$" "\\1" DEFINE ${LINE})
# Replace _WIN32 with WIN32, so we can check if the WIN32 variable of CMake is set instead of _WIN32
if(DEFINE STREQUAL "_WIN32")
set(DEFINE WIN32)
endif(DEFINE STREQUAL "_WIN32")
# Set the last define to this one, and set the last check to true, so when #else is encountered, we can do an opposing check
set(LAST_DEF ${DEFINE})
set(LAST_CHECK TRUE)
# If the define is true (it either exists or is a non-false result), the lines following will be checked, otherwise they will be skipped
if(${DEFINE})
set(VALID_LINE TRUE)
else(${DEFINE})
set(VALID_LINE FALSE)
endif(${DEFINE})
else(FOUND_IFDEF)
# If we found a #ifndef on the line, the same thing as #ifdef is done, except with the checks in the opposite direction
if(FOUND_IFNDEF)
# Extract the define
string(REGEX REPLACE "^[ \t]*#[ \t]*ifndef[ \t]*(.*)$" "\\1" DEFINE ${LINE})
# Replace _WIN32 with WIN32, so we can check if the WIN32 variable of CMake is set instead of _WIN32
if(DEFINE STREQUAL "_WIN32")
set(DEFINE WIN32)
endif(DEFINE STREQUAL "_WIN32")
# Set the last define to this one, and set the last check to false, so when #else is encountered, we can do an opposing check
set(LAST_DEF ${DEFINE})
set(LAST_CHECK FALSE)
# If the define is not true (it either doesn't exists or is a false result), the lines following will be checked, otherwise they will be skipped
if(${DEFINE})
set(VALID_LINE FALSE)
else(${DEFINE})
set(VALUE_LINE TRUE)
endif(${DEFINE})
else(FOUND_IFNDEF)
# If we found a #else on the line, we check the last define in the opposite direction
if(FOUND_ELSE)
# When LAST_CHECK is true, we were inside a #ifdef, now act as if we are entering a #ifndef section by doing an opposing check
if(LAST_CHECK)
if(${LAST_DEF})
set(VALID_LINE FALSE)
else(${LAST_DEF})
set(VALID_LINE TRUE)
endif(${LAST_DEF})
# When LAST_CHECK is false, we were inside a #ifndef, now act as if we are entering a #ifdef section by doing an opposing check
else(LAST_CHECK)
if(${LAST_DEF})
set(VALID_LINE TRUE)
else(${LAST_DEF})
set(VALID_LINE FALSE)
endif(${LAST_DEF})
endif(LAST_CHECK)
else(FOUND_ELSE)
# If we found a #endif on the line, we'll assume everything following the line is valid until we meet another one of the above lines
if(FOUND_ENDIF)
set(VALID_LINE TRUE)
else(FOUND_ENDIF)
# If we found a #include on the line, add the entire line to the list of includes unless the line isn't valid
if(FOUND_INCLUDE)
if(VALID_LINE)
append_to_list(INCLUDES_LIST "${LINE}")
endif(VALID_LINE)
endif(FOUND_INCLUDE)
endif(FOUND_ENDIF)
endif(FOUND_ELSE)
endif(FOUND_IFNDEF)
endif(FOUND_IFDEF)
endforeach(LINE)
set(${INCLUDES} ${INCLUDES_LIST})
endmacro(find_includes)
###############################################################################
# calculate_depends(<source filename> <output variable set to TRUE on fail> [<optional output variable for includes>])
#
# This macro is used in most of the src (sub)directories to calculate the
# header file dependencies for the given source file.
###############################################################################
macro(calculate_depends SRC SKIP)
# Temporarily set that we didn't get a 3nd argument before we actually check if we did get one or not
set(CHECK_ANGLE_INCLUDES FALSE)
# Check for a third argument
if(${ARGC} GREATER 2)
set(CHECK_ANGLE_INCLUDES TRUE)
endif(${ARGC} GREATER 2)
# Find all the lines in the given source file that have any form of #include on them, regardless of whitespace, but only if they are valid for the platform we are on
find_includes(${SRC} INCLUDES)
# Reset the list of headers to empty
set(HEADERS)
# Reset skip
set(${SKIP} FALSE)
# Iterate through the strings containing #include (if any)
foreach(INCLUDE ${INCLUDES})
# Extract the filename from the #include line
extract_include_filename(${INCLUDE} FILENAME QUOTE_TYPE)
if(QUOTE_TYPE STREQUAL "angle brackets")
# The following checks will only be done if there was a request for angle includes to be checked
if(CHECK_ANGLE_INCLUDES)
# Find the path of the include file
if(DEFAULT_INCLUDE_DIRS OR WSDK_PATH OR DEFINED $ENV{VCINSTALLDIR})
find_path(FOUND_${FILENAME}_INCLUDE NAMES ${FILENAME} PATHS ${DEFAULT_INCLUDE_DIRS} ${WSDK_PATH}/include $ENV{VCINSTALLDIR}/include ${EXTRA_INCLUDE})
else(DEFAULT_INCLUDE_DIRS OR WSDK_PATH OR DEFINED $ENV{VCINSTALLDIR})
find_path(FOUND_${FILENAME}_INCLUDE NAMES ${FILENAME} ${EXTRA_INCLUDE})
endif(DEFAULT_INCLUDE_DIRS OR WSDK_PATH OR DEFINED $ENV{VCINSTALLDIR})
# If the include file was found, add it's path to the list of include paths, but only if it doesn't already exist and isn't in the defaults for the compiler
if(FOUND_${FILENAME}_INCLUDE)
find_in_list(DEFAULT_INCLUDE_DIRS "${FOUND_${FILENAME}_INCLUDE}" FOUND_IN_DEFAULTS)
if(FOUND_IN_DEFAULTS EQUAL -1)
find_in_list(${ARGV2} "${FOUND_${FILENAME}_INCLUDE}" FOUND_IN_INCLUDES)
if(FOUND_IN_INCLUDES EQUAL -1)
append_to_list(${ARGV2} "${FOUND_${FILENAME}_INCLUDE}")
endif(FOUND_IN_INCLUDES EQUAL -1)
endif(FOUND_IN_DEFAULTS EQUAL -1)
else(FOUND_${FILENAME}_INCLUDE)
set(${SKIP} TRUE)
message("${SRC} needs header file ${FILENAME} but we were unable to locate that header file! Check that the header file is within the search path of your OS.")
endif(FOUND_${FILENAME}_INCLUDE)
endif(CHECK_ANGLE_INCLUDES)
endif(QUOTE_TYPE STREQUAL "angle brackets")
endforeach(INCLUDE)
endmacro(calculate_depends)
###############################################################################
# calculate_libraries(<source filename> <output variable set to TRUE on fail> <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 SKIP 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)
# Default to not skipping this file
set(${SKIP} FALSE)
# Check to see if there are any lines matching: /* RequiredLibraries: [something] */
read_from_file(${SRC} "/\\\\*[ \t]*RequiredLibraries:[ \t]*.*[ \t]*\\\\*/" REQUIRED_LIBRARIES)
# Iterate through those lines
foreach(REQUIRED_LIBRARY ${REQUIRED_LIBRARIES})
# Strip off the /* RequiredLibraries: and */ from the line
string(REGEX REPLACE "/\\*[ \t]*RequiredLibraries:[ \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})
# Locate the library to see if it exists
if(DEFAULT_LIBRARY_DIRS OR WSDK_PATH OR DEFINED $ENV{VCINSTALLDIR})
find_library(FOUND_${LIBRARY}_LIBRARY NAMES ${LIBRARY} PATHS ${DEFAULT_LIBRARY_DIRS} ${WSDK_PATH}/lib $ENV{VCINSTALLDIR}/lib ${EXTRA_INCLUDE})
else(DEFAULT_LIBRARY_DIRS OR WSDK_PATH OR DEFINED $ENV{VCINSTALLDIR})
find_library(FOUND_${LIBRARY}_LIBRARY NAMES ${LIBRARY} ${EXTRA_INCLUDE})
endif(DEFAULT_LIBRARY_DIRS OR WSDK_PATH OR DEFINED $ENV{VCINSTALLDIR})
# If the library was found, we will add it to the linker flags
if(FOUND_${LIBRARY}_LIBRARY)
# Get the path only of the library, to add it to linker flags
get_filename_component(LIBRARY_PATH ${FOUND_${LIBRARY}_LIBRARY} PATH)
if(MSVC)
# For Visual Studio, instead of editing the linker flags, we'll add the library to a separate list of extra dependencies
append_to_list(EXTRA_DEPENDENCIES "${FOUND_${LIBRARY}_LIBRARY}")
else(MSVC)
# For all others, add the library paths and libraries
append_to_list(LIBRARY_PATHS "${LIBRARY_PATH}")
append_to_list(LIBRARIES "${LIBRARY}")
endif(MSVC)
else(FOUND_${LIBRARY}_LIBRARY)
# Skip this file
set(${SKIP} TRUE)
# In the case of the library not being found, we fatally error so CMake stops trying to generate
message("${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(FOUND_${LIBRARY}_LIBRARY)
endforeach(LIBRARY)
endforeach(REQUIRED_LIBRARY)
if(NOT ${SKIP})
# Remove duplicates from the library paths
if(LIBRARY_PATHS)
remove_list_duplicates(LIBRARY_PATHS)
endif(LIBRARY_PATHS)
# Remove diplicates from the libraries
if(LIBRARIES)
remove_list_duplicates(LIBRARIES)
endif(LIBRARIES)
# Iterate through library paths and add them to the linker flags
foreach(LIBRARY_PATH ${LIBRARY_PATHS})
find_in_list(DEFAULT_LIBRARY_DIRS "${LIBRARY_PATH}" FOUND_IN_DEFAULTS)
if(FOUND_IN_DEFAULTS EQUAL -1)
set(THIS_LDFLAGS "${THIS_LDFLAGS} -L${LIBRARY_PATH}")
endif(FOUND_IN_DEFAULTS EQUAL -1)
endforeach(LIBRARY_PATH)
# Iterate through libraries and add them to the linker flags
foreach(LIBRARY ${LIBRARIES})
append_to_list(EXTRA_DEPENDENCIES "${LIBRARY}")
endforeach(LIBRARY)
set(${SRC_LDFLAGS} "${THIS_LDFLAGS}")
set(${EXTRA_DEPENDS} "${EXTRA_DEPENDENCIES}")
endif(NOT ${SKIP})
endmacro(calculate_libraries)
###############################################################################
# check_functions(<source filename> <output variable set to TRUE on success>)
#
# This macro is used in most of the module (sub)directories to calculate the
# fcuntion dependencies for the given source file.
###############################################################################
macro(check_functions SRC SUCCESS)
# Default to true
set(${SUCCESS} TRUE)
# Check to see if there are any lines matching: /* RequiredFunctions: [something] */
read_from_file(${SRC} "/\\\\*[ \t]*RequiredFunctions:[ \t]*.*[ \t]*\\\\*/" REQUIRED_FUNCTIONS)
# Iterate through those lines
foreach(REQUIRED_FUNCTION ${REQUIRED_FUNCTIONS})
# Strip off the /* RequiredFunctions: and */ from the line
string(REGEX REPLACE "/\\*[ \t]*RequiredFunctions:[ \t]*([^ \t]*)[ \t]*\\*/" "\\1" REQUIRED_FUNCTION ${REQUIRED_FUNCTION})
# Replace all commas with semicolons
string(REGEX REPLACE "," ";" REQUIRED_FUNCTION ${REQUIRED_FUNCTION})
# Iterate through the functions given
foreach(FUNCTION ${REQUIRED_FUNCTION})
# Check if the function exists
check_function_exists(${REQUIRED_FUNCTION} HAVE_${REQUIRED_FUNCTION})
# If we don't have the function warn the user and set SUCCESS to FALSE
if(NOT HAVE_${REQUIRED_FUNCTION})
message("${SRC} needs function ${REQUIRED_FUNCTION} but we were unable to locate that function!")
set(${SUCCESS} FALSE)
endif(NOT HAVE_${REQUIRED_FUNCTION})
endforeach(FUNCTION)
endforeach(REQUIRED_FUNCTION)
endmacro(check_functions)
###############################################################################
# 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 orignal 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(${ARGC} GREATER 1)
# 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(DEFINED ENV{CPACK_IGNORED_FILES})
set(ENV{CPACK_IGNORED_FILES} "${REAL_ITEM}")
endif(DEFINED ENV{CPACK_IGNORED_FILES})
endmacro(add_to_cpack_ignored_files)
-33
View File
@@ -1,33 +0,0 @@
# Find the header files, libs, and executables for gettext
if(NOT WIN32)
find_path(GETTEXT_INCLUDE libintl.h /usr/include /usr/local/include ${EXTRA_INCLUDE})
find_library(GETTEXT_LIBRARY intl PATHS /usr/lib /usr/lib64 ${EXTRA_INCLUDE})
find_program(GETTEXT_MSGFMT msgfmt PATHS /usr/bin/ /usr/local/bin ${EXTRA_INCLUDE})
if(GETTEXT_INCLUDE AND GETTEXT_MSGFMT)
set(GETTEXT_FOUND TRUE)
endif(GETTEXT_INCLUDE AND GETTEXT_MSGFMT)
else(NOT WIN32)
find_path(GETTEXT_INCLUDE libintl.h ${DEFAULT_INCLUDE_DIRS} ${WSDK_PATH}/include $ENV{VCINSTALLDIR}/include gettext/include ${EXTRA_INCLUDE})
find_library(GETTEXT_LIBRARY libintl PATHS ${DEFAULT_LIBRARY_DIRS} ${WSDK_PATH}/lib $ENV{VCINSTALLDIR}/lib gettext/lib ${EXTRA_INCLUDE})
find_library(ICONV_LIBRARY libiconv PATHS ${DEFAULT_LIBRARY_DIRS} ${WSDK_PATH}/lib $ENV{VCINSTALLDIR}/lib gettext/lib ${EXTRA_INCLUDE})
find_library(MINGWEX_LIBRARY libmingwex PATHS ${DEFAULT_LIBRARY_DIRS} ${WSDK_PATH}/lib $ENV{VCINSTALLDIR}/lib gettext/lib ${EXTRA_INCLUDE})
find_library(GCC_LIBRARY libgcc PATHS ${DEFAULT_LIBRARY_DIRS} ${WSDK_PATH}/lib $ENV{VCINSTALLDIR}/lib gettext/lib ${EXTRA_INCLUDE})
find_program(GETTEXT_MSGFMT msgfmt PATHS ${DEFAULT_INCLUDE_DIRS} ${WSDK_PATH}/bin $ENV{VCINSTALLDIR}/bin gettext/bin ${EXTRA_INCLUDE})
if(GETTEXT_INCLUDE AND GETTEXT_MSGFMT AND ICONV_LIBRARY AND MINGWEX_LIBRARY AND GCC_LIBRARY)
set(GETTEXT_FOUND TRUE)
endif(GETTEXT_INCLUDE AND GETTEXT_MSGFMT AND ICONV_LIBRARY AND MINGWEX_LIBRARY AND GCC_LIBRARY)
endif(NOT WIN32)
# If we found everything we need set variables correctly for lang/CMakeLists.txt to use
if(GETTEXT_FOUND)
include_directories("${GETTEXT_INCLUDE}")
set(GETTEXT_MSGFMT_EXECUTABLE ${GETTEXT_MSGFMT})
if(WIN32)
set(GETTEXT_LIBRARIES libiconv libintl libmingwex libgcc)
else(WIN32)
if(GETTEXT_LIBRARY)
set(GETTEXT_LIBRARIES ${GETTEXT_LIBRARY})
endif(GETTEXT_LIBRARY)
endif(WIN32)
endif(GETTEXT_FOUND)
-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 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 sutff
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
###########################################
# 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 ConditionalAddToRegisty
Pop $0
Pop $1
StrCmp "$0" "" ConditionalAddToRegisty_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'"
ConditionalAddToRegisty_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\docs\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 ConditionalAddToRegisty
Push "DisplayVersion"
Push "@CPACK_PACKAGE_VERSION@"
Call ConditionalAddToRegisty
Push "Publisher"
Push "@CPACK_PACKAGE_VENDOR@"
Call ConditionalAddToRegisty
Push "UninstallString"
Push "$INSTDIR\Uninstall.exe"
Call ConditionalAddToRegisty
Push "NoRepair"
Push "1"
Call ConditionalAddToRegisty
!ifdef CPACK_NSIS_ADD_REMOVE
;Create add/remove functionality
Push "ModifyPath"
Push "$INSTDIR\AddRemove.exe"
Call ConditionalAddToRegisty
!else
Push "NoModify"
Push "1"
Call ConditionalAddToRegisty
!endif
; Optional registration
Push "DisplayIcon"
Push "$INSTDIR\@CPACK_NSIS_INSTALLED_ICON_NAME@"
Call ConditionalAddToRegisty
Push "HelpLink"
Push "@CPACK_NSIS_HELP_LINK@"
Call ConditionalAddToRegisty
Push "URLInfoAbout"
Push "@CPACK_NSIS_URL_INFO_ABOUT@"
Call ConditionalAddToRegisty
Push "Contact"
Push "@CPACK_NSIS_CONTACT@"
Call ConditionalAddToRegisty
!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 ConditionalAddToRegisty
Push "DoNotAddToPath"
Push "$DO_NOT_ADD_TO_PATH"
Call ConditionalAddToRegisty
Push "AddToPathAllUsers"
Push "$ADD_TO_PATH_ALL_USERS"
Call ConditionalAddToRegisty
Push "AddToPathCurrentUser"
Push "$ADD_TO_PATH_CURRENT_USER"
Call ConditionalAddToRegisty
Push "InstallToDesktop"
Push "$INSTALL_DESKTOP"
Call ConditionalAddToRegisty
@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"
!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 diretories
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 untinstall 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 diretories
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
-5
View File
@@ -1,5 +0,0 @@
# This file is external to the read_from_file macro in Anope.cmake in order to
# get around a possible memory leak in older versions of CMake.
file(READ "${FILE}" RESULT)
message("${RESULT}")
-8
View File
@@ -1,8 +0,0 @@
#include <sys/eventfd.h>
int main()
{
int i = eventfd(0, EFD_NONBLOCK);
return i >= 0 ? 1 : 0;
}
+3 -3
View File
@@ -1,6 +1,6 @@
# Only install example.chk and example.conf from this directory
# Only install cron.example.sh and anope.example.conf from this directory
# NOTE: I would've had this just find all files in the directory, but that would include files not needed (like this file)
set(DATA example.chk botserv.example.conf example.conf hostserv.example.conf modules.example.conf operserv.example.conf chanserv.example.conf global.example.conf memoserv.example.conf nickserv.example.conf)
set(DATA cron.example.sh anope.example.conf botserv.example.conf hostserv.example.conf modules.example.conf operserv.example.conf chanserv.example.conf global.example.conf memoserv.example.conf nickserv.example.conf chanstats.example.conf)
install(FILES ${DATA}
DESTINATION data
DESTINATION ${CONF_DIR}
)
File diff suppressed because it is too large Load Diff
+231 -63
View File
@@ -3,12 +3,23 @@
*/
/*
* First, create the service.
* First, create the service. If you do not want to have a 'BotServ', but do want the ability to have
* ChanServ assigned to channels for the use of fantasy commands, you may delete the below 'service' block.
*
* Note that deleting a 'service' block for a pseudoclient that is already online will not remove the
* client, the client becomes no different from a normal service bot, so you will have to use botserv/bot
* to manually delete the client.
*
* You may then want to map some of the below commands to other services, like placing botserv/bot on
* OperServ so you can delete the below client, and mapping assign and unassign to ChanServ so users are
* able to control whether or not ChanServ is in the channel. You may also want to map botserv/set/nobot
* to OperServ so you can restrict who can assign the other core service clients.
*/
service
{
/*
* The name of the BotServ client
* The name of the BotServ client.
* If you change this value, you probably want to change the client directive in the configuration for the botserv module too.
*/
nick = "BotServ"
@@ -20,12 +31,12 @@ service
/*
* The hostname of the BotServ client.
*/
host = "services.host"
host = "${services.host}"
/*
* The realname of the BotServ client.
*/
gecos = "Bot Service"
real = "Bot Service"
/*
* The modes this client should use.
@@ -34,8 +45,8 @@ service
* These modes are very IRCd specific. If left commented, sane defaults
* are used based on what protocol module you have loaded.
*
* Note that setting this option incorrectly could potentially BREAK some if
* not all usefulness of the client. We will not support you if this client is
* Note that setting this option incorrectly could potentially BREAK some, if
* not all, usefulness of the client. We will not support you if this client is
* unable to do certain things if this option is enabled.
*/
#modes = "+o"
@@ -45,9 +56,20 @@ service
* of log channels this is not very useful, as the service will just idle in the
* specified channels, and will not accept any types of commands.
*
* Prefixes may be given to the channels in the form of mode character or prefix symbol.
* Prefixes may be given to the channels in the form of mode characters or prefix symbols.
*/
#channels = "@#services,#mychan"
/*
* The server alias that can be used to securely message this service. If
* your IRC server does not have an alias for this service you can set this
* to an empty string to tell users to use /msg instead.
*
* This setting is ignored when options:servicealias is disabled.
*
* Defaults to the nick of the service if not set.
*/
#alias = "BS"
}
/*
@@ -55,17 +77,16 @@ service
*
* Provides essential functionality for BotServ.
*/
module { name = "botserv" }
/*
* Configuration for BotServ provided by bs_main.
*/
botserv
module
{
name = "botserv"
/*
* The name of the client that should be BotServ.
*
* This directive is optional.
*/
name = "BotServ"
client = "BotServ"
/*
* The default bot options for newly registered channels. Note that changing these options
@@ -81,7 +102,7 @@ botserv
*
* This directive is optional, if left blank, there will be no defaults.
*/
defaults="greet fantasy"
defaults = "greet fantasy"
/*
* The minimum number of users there must be in a channel before the bot joins it. The best
@@ -90,19 +111,6 @@ botserv
*/
minusers = 1
/*
* The maximum number of entries a single bad words list can have. Setting it too high can
* reduce performance slightly.
*/
badwordsmax = 32
/*
* The amount of time that data for a user is valid in BotServ. If the data exceeds this time,
* it is reset or deleted depending on the case. Do not set it too high, otherwise your
* resources will be slightly affected.
*/
keepdata = 10m
/*
* The bots are currently not affected by any modes or bans when they try to join a channel.
* But some people may want to make it act like a real bot, that is, for example, remove all
@@ -115,26 +123,17 @@ botserv
#smartjoin = yes
/*
* If set, the bots will use a kick reason that does not state the word when it is kicking.
* This is especially useful if you have young people on your network.
* Modes to set on service bots when they join channels, comment this out for no modes
*
* This directive is optional.
*/
gentlebadwordreason = yes
botmodes = "ao"
/*
* If set, BotServ will use case sensitive checking for badwords.
*
* This directive is optional.
* User modes to set on service bots. Read the comment about the service:modes directive
* on why this can be a bad idea to set.
*/
#casesensitive = yes
/*
* Defines the prefixs 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 "!".
*/
#fantasycharacter = "!."
#botumodes = "i"
}
/*
@@ -148,28 +147,33 @@ botserv
* Sane defaults are provided below that do not need to be edited unless you wish to change the default behavior.
*/
/* Give it a help command */
command { service = "BotServ"; name = "HELP"; command = "generic/help"; }
/* Give it a help command. */
command { service = "BotServ"; name = "HELP"; command = "generic/help" }
/*
* bs_assign
*
* Provides the commands botserv/assign and botserv/unassign.
* Provides the commands:
* botserv/assign - Used to assign BotServ bots to channels
* botserv/unassign - Used to unassign BotServ bots
* botserv/set/nobot - Used to prohibit channels from being assigned BotServ bots.
*
* Used for assigning and unassigning bots to channels.
*/
module { name = "bs_assign" }
command { service = "BotServ"; name = "ASSIGN"; command = "botserv/assign"; }
command { service = "BotServ"; name = "UNASSIGN"; command = "botserv/unassign"; }
command { service = "BotServ"; name = "ASSIGN"; command = "botserv/assign" }
command { service = "BotServ"; name = "UNASSIGN"; command = "botserv/unassign" }
command { service = "BotServ"; name = "SET NOBOT"; command = "botserv/set/nobot"; permission = "botserv/set/nobot" }
/*
* bs_autoassign
*
* Allows service bots to be automatically assigned to channels upon registration.
*/
#module { name = "bs_autoassign" }
bs_autoassign
#module
{
name = "bs_autoassign"
/*
* Automatically assign ChanServ to channels upon registration.
*/
@@ -183,8 +187,23 @@ bs_autoassign
*
* Used for controlling the channel badword list.
*/
module { name = "bs_badwords" }
command { service = "BotServ"; name = "BADWORDS"; command = "botserv/badwords"; }
module
{
name = "bs_badwords"
/*
* The maximum number of entries a single bad words list can have.
*/
badwordsmax = 50
/*
* If set, BotServ will use case sensitive checking for badwords.
*
* This directive is optional.
*/
#casesensitive = yes
}
command { service = "BotServ"; name = "BADWORDS"; command = "botserv/badwords" }
/*
* bs_bot
@@ -194,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"; }
command { service = "BotServ"; name = "BOT"; command = "botserv/bot"; permission = "botserv/bot" }
/*
* bs_botlist
@@ -204,7 +223,7 @@ command { service = "BotServ"; name = "BOT"; command = "botserv/bot"; }
* 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
@@ -214,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
@@ -225,25 +244,174 @@ 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
*
* Provides the command botserv/kick.
* Provides the commands:
* botserv/kick - Dummy help wrapper for the KICK command.
* botserv/kick/amsg - Configures BotServ's AMSG kicker.
* botserv/kick/badwords - Configures BotServ's badwords kicker.
* botserv/kick/bolds - Configures BotServ's bold text kicker.
* botserv/kick/caps - Configures BotServ's capital letters kicker.
* botserv/kick/colors - Configures BotServ's color kicker.
* botserv/kick/flood - Configures BotServ's flood kicker.
* botserv/kick/italics - Configures BotServ's italics kicker.
* botserv/kick/repeat - Configures BotServ's repeat kicker.
* botserv/kick/reverses - Configures BotServ's reverse kicker.
* botserv/kick/underlines - Configures BotServ's underline kicker.
* botserv/set/dontkickops - Used for preventing BotServ from kicking channel operators.
* botserv/set/dontkickvoices - Used for preventing BotServ from kicking voices.
*
* Used for configuring what bots should kick for.
*/
module { name = "bs_kick" }
command { service = "BotServ"; name = "KICK"; command = "botserv/kick"; }
module
{
name = "bs_kick"
/*
* The amount of time that data for a user is valid in BotServ. If the data exceeds this time,
* it is reset or deleted depending on the case. Do not set it too high, otherwise your
* resources will be slightly affected.
*/
keepdata = 10m
/*
* If set, the bots will use a kick reason that does not state the word when it is kicking.
* This is especially useful if you have young people on your network.
*
* This directive is optional.
*/
gentlebadwordreason = yes
}
command { service = "BotServ"; name = "KICK"; command = "botserv/kick" }
command { service = "BotServ"; name = "KICK AMSG"; command = "botserv/kick/amsg" }
command { service = "BotServ"; name = "KICK BADWORDS"; command = "botserv/kick/badwords" }
command { service = "BotServ"; name = "KICK BOLDS"; command = "botserv/kick/bolds" }
command { service = "BotServ"; name = "KICK CAPS"; command = "botserv/kick/caps" }
command { service = "BotServ"; name = "KICK COLORS"; command = "botserv/kick/colors" }
command { service = "BotServ"; name = "KICK FLOOD"; command = "botserv/kick/flood" }
command { service = "BotServ"; name = "KICK ITALICS"; command = "botserv/kick/italics" }
command { service = "BotServ"; name = "KICK REPEAT"; command = "botserv/kick/repeat" }
command { service = "BotServ"; name = "KICK REVERSES"; command = "botserv/kick/reverses" }
command { service = "BotServ"; name = "KICK UNDERLINES"; command = "botserv/kick/underlines" }
command { service = "BotServ"; name = "SET DONTKICKOPS"; command = "botserv/set/dontkickops" }
command { service = "BotServ"; name = "SET DONTKICKVOICES"; command = "botserv/set/dontkickvoices" }
/*
* bs_set
*
* Provides the command botserv/set.
*
* Used for setting options such as kickers and fantasy replies.
* Provides the commands:
* botserv/set/private - Used to prohibit specific BotServ bots from being assigned to channels.
*/
module { name = "bs_set" }
command { service = "BotServ"; name = "SET"; command = "botserv/set"; }
command { service = "BotServ"; name = "SET"; command = "botserv/set" }
command { service = "BotServ"; name = "SET BANEXPIRE"; command = "botserv/set/banexpire" }
command { service = "BotServ"; name = "SET PRIVATE"; command = "botserv/set/private"; permission = "botserv/set/private" }
/*
* greet
*
* Provides the commands:
* botserv/set/greet - Used for enabling or disabling BotServ's greet messages in a channel.
* nickserv/set/greet, nickserv/saset/greet - Used for changing a users greet message, which is displayed when they enter channels.
*/
module { name = "greet" }
command { service = "BotServ"; name = "SET GREET"; command = "botserv/set/greet" }
command { service = "NickServ"; name = "SET GREET"; command = "nickserv/set/greet" }
command { service = "NickServ"; name = "SASET GREET"; command = "nickserv/saset/greet"; permission = "nickserv/saset/greet" }
/*
* GREET privilege.
*
* Used by 'greet'.
*
* Users with this privilege have their greet shown when they join channels.
*/
privilege
{
name = "GREET"
desc = _("Greet message displayed on join")
rank = 40
level = 5
flag = "g"
xop = "AOP"
}
/*
* fantasy
*
* Allows fantasy commands (e.g. !kick) to be used in channels.
*
* Provides the commands:
* botserv/set/fantasy - Used for enabling or disabling BotServ's fantasy commands.
*/
module
{
name = "fantasy"
/*
* Defines the prefixes for fantasy commands in channels. One of these will
* have to be prepended to all fantasy commands. For example, If you choose
* "! ?" as your prefix fantasy commands will be "!kick", "?op", etc.
*
* This directive is optional, it defaults to "!" if not set.
*/
#prefix = "! ?"
}
command { service = "BotServ"; name = "SET FANTASY"; command = "botserv/set/fantasy" }
/*
* Fantasy commands
*
* Fantasy commands can be executed in channels that have a BotServ bot assigned
* by prefixing the command with one of the fantasy characters configured in the
* {botserv}:prefix directive.
*
* Sane defaults are provided below that do not need to be edited unless you
* wish to change the default behavior.
*/
fantasy { name = "ACCESS"; command = "chanserv/access" }
fantasy { name = "AKICK"; command = "chanserv/akick" }
fantasy { name = "AOP"; command = "chanserv/xop" }
fantasy { name = "BAN"; command = "chanserv/ban" }
fantasy { name = "CLONE"; command = "chanserv/clone" }
fantasy { name = "DEHALFOP"; command = "chanserv/modes" }
fantasy { name = "DEOP"; command = "chanserv/modes" }
fantasy { name = "DEOWNER"; command = "chanserv/modes" }
fantasy { name = "DEPROTECT"; command = "chanserv/modes" }
fantasy { name = "DEVOICE"; command = "chanserv/modes" }
fantasy { name = "DOWN"; command = "chanserv/down" }
fantasy { name = "ENFORCE"; command = "chanserv/enforce" }
fantasy { name = "ENTRYMSG"; command = "chanserv/entrymsg" }
fantasy { name = "FLAGS"; command = "chanserv/flags" }
fantasy { name = "HALFOP"; command = "chanserv/modes" }
fantasy { name = "HELP"; command = "generic/help"; prepend_channel = no; require_privilege = no }
fantasy { name = "HOP"; command = "chanserv/xop" }
fantasy { name = "INFO"; command = "chanserv/info"; prepend_channel = no }
fantasy { name = "INVITE"; command = "chanserv/invite" }
fantasy { name = "K"; command = "chanserv/kick" }
fantasy { name = "KB"; command = "chanserv/ban" }
fantasy { name = "KICK"; command = "chanserv/kick" }
fantasy { name = "LEVELS"; command = "chanserv/levels" }
fantasy { name = "LIST"; command = "chanserv/list"; prepend_channel = no }
fantasy { name = "LOG"; command = "chanserv/log" }
fantasy { name = "MODE"; command = "chanserv/mode" }
fantasy { name = "MUTE"; command = "chanserv/ban"; kick = no; mode = "QUIET" }
fantasy { name = "OP"; command = "chanserv/modes" }
fantasy { name = "OWNER"; command = "chanserv/modes" }
fantasy { name = "PROTECT"; command = "chanserv/modes" }
fantasy { name = "QOP"; command = "chanserv/xop" }
fantasy { name = "SEEN"; command = "chanserv/seen"; prepend_channel = no }
fantasy { name = "SOP"; command = "chanserv/xop" }
fantasy { name = "STATUS"; command = "chanserv/status" }
fantasy { name = "SUSPEND"; command = "chanserv/suspend"; permission = "chanserv/suspend" }
fantasy { name = "SYNC"; command = "chanserv/sync" }
fantasy { name = "TOPIC"; command = "chanserv/topic" }
fantasy { name = "UNBAN"; command = "chanserv/unban" }
fantasy { name = "UNMUTE"; command = "chanserv/unban"; mode = "QUIET" }
fantasy { name = "UNSUSPEND"; command = "chanserv/unsuspend"; permission = "chanserv/suspend" }
fantasy { name = "UP"; command = "chanserv/up" }
fantasy { name = "VOICE"; command = "chanserv/modes" }
fantasy { name = "VOP"; command = "chanserv/xop" }
+532 -440
View File
File diff suppressed because it is too large Load Diff
+49
View File
@@ -0,0 +1,49 @@
/*
* Example configuration file for Chanstats.
*
* You can enable Chanstats by default by adding CS_STATS to {chanserv}:defaults
* and NS_STATS to {nickserv}:defaults.
*
* Make sure BotServ, ChanServ and NickServ are running.
*/
module
{
name = "chanstats"
/*
* The name of this engine.
* This must match with the name of an SQL engine block.
*/
engine = "mysql/main"
/*
* An optional prefix to prepended to the name of each created table.
* Do not use the same prefix for other programs.
*/
#prefix = "chanstats21_"
smileyshappy = ":) :-) ;) ;-) :D :-D :P :-P"
smileyssad = ":( :-( ;( ;-("
smileysother = ":/ :-/"
}
command { service = "ChanServ"; name = "SET CHANSTATS"; command = "chanserv/set/chanstats" }
command { service = "NickServ"; name = "SET CHANSTATS"; command = "nickserv/set/chanstats" }
command { service = "NickServ"; name = "SASET CHANSTATS"; command = "nickserv/saset/chanstats"; permission = "nickserv/saset/chanstats" }
module { name = "cs_fantasy_stats" }
command { service = "ChanServ"; name = "STATS"; command = "chanserv/stats" }
command { service = "ChanServ"; name = "GSTATS"; command = "chanserv/gstats" }
fantasy { name = "STATS"; command = "chanserv/stats" }
fantasy { name = "GSTATS"; command = "chanserv/gstats" }
module { name = "cs_fantasy_top" }
command { service = "ChanServ"; name = "TOP"; command = "chanserv/top" }
command { service = "ChanServ"; name = "TOP10"; command = "chanserv/top10" }
command { service = "ChanServ"; name = "GTOP"; command = "chanserv/gtop" }
command { service = "ChanServ"; name = "GTOP10"; command = "chanserv/gtop10" }
fantasy { name = "TOP"; command = "chanserv/top" }
fantasy { name = "TOP10"; command = "chanserv/top10" }
fantasy { name = "GTOP"; command = "chanserv/gtop" }
fantasy { name = "GTOP10"; command = "chanserv/gtop10" }
+6 -5
View File
@@ -9,16 +9,16 @@
###############################################################
# Anope binary directory
ANOPATH=/home/ircd/services/bin
ANOPATH=/home/ircd/anope/bin
# Anope data directory
ANODATA=/home/ircd/services/data
ANODATA=/home/ircd/anope/data
# Name of the pid file
ANOPIDF=services.pid
ANOPIDF=anope.pid
# Name of the executable
ANOPROG=services
ANOPROG=anope
# Parameters to pass to the executable
ANOARGS=""
@@ -37,7 +37,8 @@ cd $ANOPATH
if [ -f "$ANODATA/$ANOPIDF" ]
then
ANOPID=`cat "$ANODATA/$ANOPIDF"`
if [ `ps auwx | grep $ANOPROG | grep $ANOPID | grep -v -c grep` = 1 ]
kill -0 $ANOPID 2>/dev/null
if [ $? -eq 0 ]
then
exit
fi
-1182
View File
File diff suppressed because it is too large Load Diff
+59 -31
View File
@@ -8,7 +8,8 @@
service
{
/*
* The name of the Global client
* The name of the Global client.
* If you change this value, you probably want to change the client directive in the configuration for the global module too.
*/
nick = "Global"
@@ -20,12 +21,12 @@ service
/*
* The hostname of the Global client.
*/
host = "services.host"
host = "${services.host}"
/*
* The realname of the Global client.
*/
gecos = "Global Noticer"
real = "Global Noticer"
/*
* The modes this client should use.
@@ -34,8 +35,8 @@ service
* These modes are very IRCd specific. If left commented, sane defaults
* are used based on what protocol module you have loaded.
*
* Note that setting this option incorrectly could potentially BREAK some if
* not all usefulness of the client. We will not support you if this client is
* Note that setting this option incorrectly could potentially BREAK some, if
* not all, usefulness of the client. We will not support you if this client is
* unable to do certain things if this option is enabled.
*/
#modes = "+o"
@@ -45,9 +46,20 @@ service
* of log channels this is not very useful, as the service will just idle in the
* specified channels, and will not accept any types of commands.
*
* Prefixes may be given to the channels in the form of mode character or prefix symbol.
* Prefixes may be given to the channels in the form of mode characters or prefix symbols.
*/
#channels = "@#services,#mychan"
/*
* The server alias that can be used to securely message this service. If
* your IRC server does not have an alias for this service you can set this
* to an empty string to tell users to use /msg instead.
*
* This setting is ignored when options:servicealias is disabled.
*
* Defaults to the nick of the service if not set.
*/
#alias = "GL"
}
/*
@@ -55,41 +67,33 @@ service
*
* Provides essential functionality for Global.
*/
module { name = "global" }
/*
* Configuration for Global provided by gl_main.
*/
global
module
{
name = "global"
/*
* The name of the client that should be Global.
*/
name = "Global"
client = "Global"
/*
* If set, Services will send global messages on starting up and shutting
* down/restarting.
* This is the global message that will be sent when Anope is being
* shutdown/restarted.
*
* This directive is optional.
*/
#globaloncycle = yes
#globaloncycledown = "Services are restarting, they will be back shortly - please be good while they're gone"
/*
* This is the global message that will be sent when Services are being
* shutdown/restarted. This directive is only required if you enable
* globaloncycle above.
* This is the global message that will be sent when Anope (re)joins the
* network.
*
* This directive is optional.
*/
globaloncycledown = "Services are restarting, they will be back shortly - please be good while we're gone"
#globaloncycleup = "Services are now back online - have a nice day"
/*
* This is the global message that will be sent when Services (re)join the
* network. This directive is only required if you enable globaloncycle above.
*/
globaloncycleup = "Services are now back online - have a nice day"
/*
* If set, Services will hide the IRC operator's nick in a global
* If set, Anope will hide the Services Operator's nick in a global
* message/notice.
*
* This directive is optional.
@@ -108,8 +112,8 @@ global
* Sane defaults are provided below that do not need to be edited unless you wish to change the default behavior.
*/
/* Give it a help command */
command { service = "Global"; name = "HELP"; command = "generic/help"; }
/* Give it a help command. */
command { service = "Global"; name = "HELP"; command = "generic/help" }
/*
* gl_global
@@ -119,6 +123,30 @@ command { service = "Global"; name = "HELP"; command = "generic/help"; }
* Used for sending a message to every online user.
*/
module { name = "gl_global" }
command { service = "OperServ"; name = "GLOBAL"; command = "global/global"; permission = "operserv/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
*
* Provides the command global/queue.
*
* Used for queuing messages to send to every online user.
*/
module
{
name = "gl_queue"
/* The maximum number of messages in a message queue. Defaults to 10. */
maxqueue = 10
}
command { service = "Global"; name = "QUEUE"; command = "global/queue"; permission = "global/queue" }
/*
* gl_server
*
* Provides the command global/server.
*
* Used for sending a message to every online user on a server.
*/
module { name = "gl_server" }
command { service = "Global"; name = "SERVER"; command = "global/server"; permission = "global/server" }
+104 -62
View File
@@ -8,7 +8,8 @@
service
{
/*
* The name of the HostServ client
* The name of the HostServ client.
* If you change this value, you probably want to change the client directive in the configuration for the hostserv module too.
*/
nick = "HostServ"
@@ -20,12 +21,12 @@ service
/*
* The hostname of the HostServ client.
*/
host = "services.host"
host = "${services.host}"
/*
* The realname of the HostServ client.
*/
gecos = "vHost Service"
real = "Hostname Service"
/*
* The modes this client should use.
@@ -34,8 +35,8 @@ service
* These modes are very IRCd specific. If left commented, sane defaults
* are used based on what protocol module you have loaded.
*
* Note that setting this option incorrectly could potentially BREAK some if
* not all usefulness of the client. We will not support you if this client is
* Note that setting this option incorrectly could potentially BREAK some, if
* not all, usefulness of the client. We will not support you if this client is
* unable to do certain things if this option is enabled.
*/
#modes = "+o"
@@ -45,9 +46,20 @@ service
* of log channels this is not very useful, as the service will just idle in the
* specified channels, and will not accept any types of commands.
*
* Prefixes may be given to the channels in the form of mode character or prefix symbol.
* Prefixes may be given to the channels in the form of mode characters or prefix symbols.
*/
#channels = "@#services,#mychan"
/*
* The server alias that can be used to securely message this service. If
* your IRC server does not have an alias for this service you can set this
* to an empty string to tell users to use /msg instead.
*
* This setting is ignored when options:servicealias is disabled.
*
* Defaults to the nick of the service if not set.
*/
#alias = "HS"
}
/*
@@ -55,45 +67,24 @@ service
*
* Provides essential functionality for HostServ.
*/
module { name = "hostserv" }
/*
* Configuration for HostServ provided by hs_main.
*/
hostserv
module
{
name = "hostserv"
/*
* The name of the client that should be HostServ.
*/
name = "HostServ"
client = "HostServ"
/*
* The characters allowed in a vhost. Changing this is not recommended unless
* you know for sure your IRCd supports whatever characters you are wanting to use.
* Telling services to set a vhost containing characters your IRCd disallows could
* potentially break the IRCd and/or Services. Note these are 1 byte characters, so
* UTF-8 characters will not work.
*
* It is recommended you DON'T change this.
* If enabled, vhosts are activated on users immediately when they are set.
*/
vhost_chars = "abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789.-"
activate_on_set = yes
/*
* If set, allows vhosts to not contain dots (.).
* Newer IRCds generally do not have a problem with this, but the same warning as
* vhost_chars applies.
*
* It is recommended you DON'T change this.
* If enabled, vhosts are activated on users immediately when they log out of an operator account.
*/
allow_undotted_vhosts = false
/*
* The characters that are not allowed to be at the very beginning or very ending
* of a vhost. The same warning as vhost_chars applies.
*
* It is recommended you DON'T change this.
*/
disallow_start_or_end = ".-"
activate_on_deoper = yes
}
/*
@@ -107,94 +98,145 @@ hostserv
* Sane defaults are provided below that do not need to be edited unless you wish to change the default behavior.
*/
/* Give it a help command */
command { service = "HostServ"; name = "HELP"; command = "generic/help"; }
/* Give it a help command. */
command { service = "HostServ"; name = "HELP"; command = "generic/help" }
/*
* hs_del
*
* Provides the commands hostserv/del and hostserv/delall.
*
* Used for removing users vHosts.
* 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
*
* Provides the command hostserv/group.
*
* Used for grouping one vHost to many nicks.
* Used for syncing one vhost to many nicks.
*/
module { name = "hs_group" }
command { service = "HostServ"; name = "GROUP"; command = "hostserv/group"; }
module
{
name = "hs_group"
/*
* Upon nickserv/group, this option syncs the nick's main vhost to the grouped nick.
*/
syncongroup = yes
/*
* This makes vhosts act as if they are per account.
*/
synconset = yes
}
command { service = "HostServ"; name = "GROUP"; command = "hostserv/group" }
/*
* hs_list
*
* Provides the command hostserv/list.
*
* Used for listing actively set vHosts.
* 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
*
* Provides the command hostserv/off.
*
* Used for turning off your vHost.
* 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
*
* Provides the command hostserv/on.
*
* Used for turning on your vHost.
* 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
*
* Provides the commands hostserv/request, hostserv/active, hostserv/reject, and hostserv/waiting.
* Provides the commands:
* hostserv/request - Requests a vhost.
* hostserv/activate - Approves a requested vhost.
* hostserv/reject - Rejects a requested vhost.
* hostserv/waiting - Lists pending vhost requests.
* hostserv/validate - Allows self-service approval of vhosts using DNS
* validation (requires the dns module).
*
* Used to manage vhosts requested by users.
*/
module { name = "hs_request" }
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"; }
hs_request
module
{
name = "hs_request"
/*
* If set, Services will send a memo to the user requesting a vHost when it's been
* If set, Anope will send a memo to the user requesting a vhost when it's been
* approved or rejected.
*/
#memouser = yes
/*
* If set, Services will send a memo to all Services staff when a new vHost is requested.
* If set, Anope will send a memo to all services staff when a new vhost is requested.
*/
#memooper = yes
/*
* If DNS validation is enabled, how long should users have to wait between
* attempts at DNS validation. Defaults to 5 minutes.
*/
#validationcooldown = 5m
/*
* If DNS validation is enabled, the TXT record to look for when determining
* if the requester controls the domain. Defaults to anope-dns-validation.
*/
#validationrecord = "anope-dns-validation"
}
command { service = "HostServ"; name = "REQUEST"; command = "hostserv/request" }
command { service = "HostServ"; name = "ACTIVATE"; command = "hostserv/activate"; permission = "hostserv/set" }
command { service = "HostServ"; name = "REJECT"; command = "hostserv/reject"; permission = "hostserv/set" }
command { service = "HostServ"; name = "WAITING"; command = "hostserv/waiting"; permission = "hostserv/set" }
#command { service = "HostServ"; name = "VALIDATE"; command = "hostserv/validate" }
/*
* hs_set
*
* Provides the commands hostserv/set and hostserv/setall.
*
* Used for setting users vhosts.
* 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" }
+61 -47
View File
@@ -8,7 +8,8 @@
service
{
/*
* The name of the MemoServ client
* The name of the MemoServ client.
* If you change this value, you probably want to change the client directive in the configuration for the memoserv module too.
*/
nick = "MemoServ"
@@ -20,12 +21,12 @@ service
/*
* The hostname of the MemoServ client.
*/
host = "services.host"
host = "${services.host}"
/*
* The realname of the MemoServ client.
*/
gecos = "Memo Service"
real = "Memo Service"
/*
* The modes this client should use.
@@ -34,8 +35,8 @@ service
* These modes are very IRCd specific. If left commented, sane defaults
* are used based on what protocol module you have loaded.
*
* Note that setting this option incorrectly could potentially BREAK some if
* not all usefulness of the client. We will not support you if this client is
* Note that setting this option incorrectly could potentially BREAK some, if
* not all, usefulness of the client. We will not support you if this client is
* unable to do certain things if this option is enabled.
*/
#modes = "+o"
@@ -45,9 +46,20 @@ service
* of log channels this is not very useful, as the service will just idle in the
* specified channels, and will not accept any types of commands.
*
* Prefixes may be given to the channels in the form of mode character or prefix symbol.
* Prefixes may be given to the channels in the form of mode characters or prefix symbols.
*/
#channels = "@#services,#mychan"
/*
* The server alias that can be used to securely message this service. If
* your IRC server does not have an alias for this service you can set this
* to an empty string to tell users to use /msg instead.
*
* This setting is ignored when options:servicealias is disabled.
*
* Defaults to the nick of the service if not set.
*/
#alias = "MS"
}
/*
@@ -55,18 +67,14 @@ service
*
* Provides essential functionality for MemoServ.
*/
module { name = "memoserv" }
/*
* Configuration for MemoServ provided by ms_main.
*/
memoserv
module
{
name = "memoserv"
/*
* The name of the client that should be MemoServ. Clients are configured
* with the service blocks.
*/
name = "MemoServ"
client = "MemoServ"
/*
* The maximum number of memos a user is allowed to keep by default. Normal users may set the
@@ -81,22 +89,11 @@ memoserv
/*
* The delay between consecutive uses of the MemoServ SEND command. This can help prevent spam
* as well as denial-of-service attacks from sending large numbers of memos and filling up disk
* space (and memory). The default 3-second wait means a maximum average of 150 bytes of memo
* per second per user under the current IRC protocol.
* space (and memory).
*
* This directive is optional, but recommended.
*/
senddelay = 3s
/*
* Allow the use of memo receipts for the following groups:
*
* 1 - Opers Only
* 2 - Everybody
*
* This directive is optional.
*/
#memoreceipt = 1
senddelay = 30s
}
/*
@@ -110,8 +107,8 @@ memoserv
* Sane defaults are provided below that do not need to be edited unless you wish to change the default behavior.
*/
/* Give it a help command */
command { service = "MemoServ"; name = "HELP"; command = "generic/help"; }
/* Give it a help command. */
command { service = "MemoServ"; name = "HELP"; command = "generic/help" }
/*
* ms_cancel
@@ -121,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
@@ -131,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
@@ -141,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
@@ -150,8 +147,18 @@ command { service = "MemoServ"; name = "DEL"; command = "memoserv/del"; }
*
* Used to ignore memos from specific users.
*/
module { name = "ms_ignore" }
command { service = "MemoServ"; name = "IGNORE"; command = "memoserv/ignore"; }
module
{
name = "ms_ignore"
/*
* The maximum number of entries that may be on a memo ignore list.
*
* This directive is optional.
*/
max = 50
}
command { service = "MemoServ"; name = "IGNORE"; command = "memoserv/ignore" }
/*
* ms_info
@@ -161,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
@@ -171,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
@@ -181,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
@@ -189,31 +196,39 @@ command { service = "MemoServ"; name = "READ"; command = "memoserv/read"; }
* Provides the command memoserv/rsend.
*
* Used to send a memo requiring a receipt be sent back once it is read.
*
* Requires configuring memoserv:memoreceipt.
*/
#module { name = "ms_rsend" }
#command { service = "MemoServ"; name = "RSEND"; command = "memoserv/rsend"; }
#module
{
name = "ms_rsend"
/*
* Only allow Services Operators to use ms_rsend.
*
* This directive is optional.
*/
operonly = no
}
#command { service = "MemoServ"; name = "RSEND"; command = "memoserv/rsend" }
/*
* ms_send
*
* Provides the command memoserv/send
* Provides the command memoserv/send.
*
* 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
*
* Provides the command memoserv/sendall
* Provides the command memoserv/sendall.
*
* Used to send a mass memo to every registered user.
*/
module { name = "ms_sendall" }
command { service = "MemoServ"; name = "SENDALL"; command = "memoserv/sendall"; permission = "memoserv/sendall"; }
command { service = "MemoServ"; name = "SENDALL"; command = "memoserv/sendall"; permission = "memoserv/sendall" }
/*
* ms_set
@@ -223,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
@@ -233,5 +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" }
+728 -175
View File
File diff suppressed because it is too large Load Diff
+572 -358
View File
File diff suppressed because it is too large Load Diff
+339 -203
View File
@@ -8,7 +8,8 @@
service
{
/*
* The name of the OperServ client
* The name of the OperServ client.
* If you change this value, you probably want to change the client directive in the configuration for the operserv module too.
*/
nick = "OperServ"
@@ -20,12 +21,12 @@ service
/*
* The hostname of the OperServ client.
*/
host = "services.host"
host = "${services.host}"
/*
* The realname of the OperServ client.
*/
gecos = "Operator Service"
real = "Operator Service"
/*
* The modes this client should use.
@@ -34,8 +35,8 @@ service
* These modes are very IRCd specific. If left commented, sane defaults
* are used based on what protocol module you have loaded.
*
* Note that setting this option incorrectly could potentially BREAK some if
* not all usefulness of the client. We will not support you if this client is
* Note that setting this option incorrectly could potentially BREAK some, if
* not all, usefulness of the client. We will not support you if this client is
* unable to do certain things if this option is enabled.
*/
#modes = "+o"
@@ -45,9 +46,20 @@ service
* of log channels this is not very useful, as the service will just idle in the
* specified channels, and will not accept any types of commands.
*
* Prefixes may be given to the channels in the form of mode character or prefix symbol.
* Prefixes may be given to the channels in the form of mode characters or prefix symbols.
*/
#channels = "@#services,#mychan"
/*
* The server alias that can be used to securely message this service. If
* your IRC server does not have an alias for this service you can set this
* to an empty string to tell users to use /msg instead.
*
* This setting is ignored when options:servicealias is disabled.
*
* Defaults to the nick of the service if not set.
*/
#alias = "OS"
}
/*
@@ -55,25 +67,14 @@ service
*
* Provides essential functionality for OperServ.
*/
module { name = "operserv" }
/*
* Configuration for OperServ provided by os_main.
*/
operserv
module
{
name = "operserv"
/*
* The name of the client that should be OperServ.
*/
name = "OperServ"
/*
* If set, Services Admins will be able to use SUPERADMIN [ON|OFF] which will temporarily grant
* them extra privileges such as being a founder on ALL channels.
*
* This directive is optional.
*/
#superadmin = yes
client = "OperServ"
/*
* These define the default expiration times for, respectively, AKILLs, CHANKILLs, SNLINEs,
@@ -83,10 +84,9 @@ operserv
chankillexpiry = 30d
snlineexpiry = 30d
sqlineexpiry = 30d
szlineexpiry = 30d
/*
* If set, this option will make Services send an AKILL command immediately after it has been
* If set, this option will make Anope send an AKILL command immediately after it has been
* added with AKILL ADD. This eliminates the need for killing the user after the AKILL has
* been added.
*
@@ -95,111 +95,23 @@ operserv
akillonadd = yes
/*
* If set, this option will make Services send an (SVS)KILL command immediately after SNLINE ADD.
* If set, this option will make Anope send an (SVS)KILL command immediately after SNLINE ADD.
* This eliminates the need for killing the user after the SNLINE has been added.
*
*This directive is optional.
* This directive is optional.
*/
#killonsnline = yes
killonsnline = yes
/*
* If set, this option will make Services send an (SVS)KILL command immediately after SQLINE ADD.
* If set, this option will make Anope send an (SVS)KILL command immediately after SQLINE ADD.
* This eliminates the need for killing the user after the SQLINE has been added.
*
* This directive is optional.
*/
#killonsqline = yes
killonsqline = yes
/*
* Defines what actions should trigger notifications. The list must be separated by spaces.
*
* The notifications are:
* - oper: A user has become an IRC operator
* - bados: A non-IRCop attempts to use OperServ
* - akillexpire: An AKILL has expired
* - snlineexpire: An SNLINE has expired
* - sqlineexpire: An SQLINE has expired
* - exceptionexpire: A session exception has expired
*
* This directive is optional, if left blank, there will be no notifications.
*/
notifications = "oper"
/*
* Enables session limiting. Session limiting prevents users from connecting more than a certain
* number of times from the same host at the same time - thus preventing most types of cloning.
* Once a host reaches it's session limit, all clients attempting to connect from that host will
* be killed. Exceptions to the default session limit can be defined via the exception list. It
* should be noted that session limiting, along with a large exception list, can degrade Services'
* performance.
*
* See the online help for more information about session limiting.
*
* This directive is optional.
*/
limitsessions = yes
/*
* Default session limit per host. Once a host reaches it's session limit, all clients attempting
* to connect from that host will be killed. A value of zero means an unlimited session limit.
*
* This directive is optional.
* If not given and session limiting is enabled, it will default to no limit.
*/
defaultsessionlimit = 3
/*
* The maximum session limit that may be set for a host in an exception.
*
* This directive is only required if session limiting is enabled.
*/
maxsessionlimit = 100
/*
* Sets the default expiry time for session exceptions.
*
* This directive is only required if session limiting is enabled.
*/
exceptionexpiry = 1d
/*
* The message that will be NOTICE'd to a user just before they are removed from the network because
* their host's session limit has been exceeded. It may be used to give a slightly more descriptive
* reason for the impending kill as opposed to simply "Session limit exceeded".
*
* This directive is optional, if not set, nothing will be sent.
*/
sessionlimitexceeded = "The session limit for your host %s has been exceeded."
/*
* Same as above, but should be used to provide a website address where users can find out more
* about session limits and how to go about applying for an exception.
*
* Note: This directive has been intentionally commented out in an effort to remind you to change
* the URL it contains. It is recommended that you supply an address/URL where people can get help
* regarding session limits.
*
* This directive is optional, if not set, nothing will be sent.
*/
#sessionlimitdetailsloc = "Please visit http://your.website.url/ for more information about session limits."
/*
* If set and is not 0, this directive tells Services to add an AKILL the number of subsequent kills
* for the same host exceeds this value, preventing the network from experiencing KILL floods.
*
* This directive is optional.
*/
maxsessionkill = 15
/*
* Sets the expiry time for AKILLs set for hosts exceeding the maxsessionkill directive limit.
*
* This directive is optional, if not set, defaults to 30 minutes.
*/
sessionautokillexpiry = 30m
/*
* Adds the nickname of the IRC Operator issuing an AKILL to the kill reason.
* Adds the nickname of the Services Operator issuing an AKILL to the kill reason.
*
* This directive is optional.
*/
@@ -212,8 +124,7 @@ operserv
akillids = yes
/*
* If set, only IRC Operators will be permitted to use OperServ, regardless of module-based command
* access restrictions.
* If set, only IRC Operators will be permitted to use OperServ, regardless of command access restrictions.
*
* This directive is optional, but recommended.
*/
@@ -231,8 +142,8 @@ operserv
* Sane defaults are provided below that do not need to be edited unless you wish to change the default behavior.
*/
/* Give it a help command */
command { service = "OperServ"; name = "HELP"; command = "generic/help"; }
/* Give it a help command. */
command { service = "OperServ"; name = "HELP"; command = "generic/help" }
/*
* os_akill
@@ -242,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
@@ -252,22 +163,22 @@ 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
*
* Provides the command operserv/defcon.
*
* Allows you to set services in defcon mode, which can be used to restrict services access
* Allows you to set services in DefCon mode, which can be used to restrict services access
* during bot attacks.
*/
#module { name = "os_defcon" }
#command { service = "OperServ"; name = "DEFCON"; command = "operserv/defcon"; }
defcon
#module
{
name = "os_defcon"
/*
* Default DefCon level (1-5) to use when starting Services up. Level 5 constitutes normal operation
* Default DefCon level (1-5) to use when starting Anope up. Level 5 constitutes normal operation
* while level 1 constitutes the most restrictive operation. If this setting is left out or set to
* 0, DefCon will be disabled and the rest of this block will be ignored.
*/
@@ -284,8 +195,8 @@ defcon
* - forcechanmodes: Forces all channels to have the modes given in the later chanmodes directive
* - reducedsessions: Reduces the session limit to the value given in the later sessionlimit directive
* - nonewclients: KILL any new clients trying to connect
* - operonly: Services will ignore all non-IRCops
* - silentoperonly: Services will silently ignore all non-IRCops
* - operonly: Ignore all non-IRCops
* - silentoperonly: Silently ignore all non-IRCops
* - akillnewclients: AKILL any new clients trying to connect
* - nonewmemos: No new memos will be sent to block MemoServ attacks
*/
@@ -309,10 +220,10 @@ defcon
* The channel modes to set on all channels when the DefCon channel mode system is in use.
*
* Note 1: Choose these modes carefully, because when DefCon switches to a level which does NOT have
* the mode setting selected, Services will set the reverse on all channels, e.g. if this setting
* the mode setting selected, Anope will set the reverse on all channels, e.g. if this setting
* is +RN when DefCon is used, all channels will be set to +RN, when DefCon is removed, all
* channels will be set to -RN. You don't want to set this to +k for example, because when DefCon
* is removed all channels with -k.
* is removed, all channels are set -k, removing the key from previously keyed channels.
*
* Note 2: MLOCKed modes will not be lost.
*/
@@ -327,14 +238,14 @@ defcon
#timeout = 15m
/*
* If set, Services will send a global message on DefCon level changes.
* If set, Anope will send a global message on DefCon level changes.
*
* This directive is optional.
*/
#globalondefcon = yes
/*
* If set, Services will send the global message defined in the message directive on DefCon level
* If set, Anope will send the global message defined in the message directive on DefCon level
* changes.
*
* This directive is optional.
@@ -346,7 +257,7 @@ defcon
*
* This directive is required only when globalondefconmore is set.
*/
#message = "Put your message to send your users here. Dont forget to uncomment globalondefconmore"
#message = "Put your message to send your users here. Don't forget to uncomment globalondefconmore"
/*
* Defines the message that will be sent when DefCon is returned to level 5. This directive is optional,
@@ -358,19 +269,70 @@ defcon
* Defines the reason to use when clients are KILLed or AKILLed from the network while the proper
* DefCon operation is in effect.
*/
#akillreason = "This network is currently not accepting connections, please try again later"
#akillreason = "This network is currently not accepting connections, please try again later."
}
#command { service = "OperServ"; name = "DEFCON"; command = "operserv/defcon"; permission = "operserv/defcon" }
/*
* os_list
* os_dns
*
* Provides the commands operserv/chanlist and operserv/userlist.
* Provides the command operserv/dns.
*
* Used to list and search the channels and users currently on the network.
* This module requires that dns is loaded.
*
* This module allows controlling a DNS zone. This is useful for
* controlling what servers users are placed on for load balancing,
* and to automatically remove split servers.
*
* To use this module you must set a nameserver record for services
* so that DNS queries go to services.
*
* Alternatively, you may use a secondary DNS server to hide services' IP,
* provide query caching, and provide better fault tolerance.
*
* To do this using BIND, configure similar to:
*
* options { max-refresh-time 60 };
* zone "irc.example.com" IN {
* type secondary;
* primaries { 127.0.0.1 port 5353 };
* };
*
* Where 127.0.0.1:5353 is the IP and port services are listening on.
* We recommend you externally firewall both UDP and TCP to the port
* Anope is listening on.
*
* Finally set a NS record for irc.example.com. to BIND or services.
*/
module { name = "os_list" }
command { service = "OperServ"; name = "CHANLIST"; command = "operserv/chanlist"; }
command { service = "OperServ"; name = "USERLIST"; command = "operserv/userlist"; }
#module
{
name = "os_dns"
/* TTL for records. This should be very low if your records change often. */
ttl = 1m
/* If a server drops this many users the server is automatically removed from the DNS zone.
* This directive is optional.
*/
user_drop_mark = 50
/* The time used for user_drop_mark. */
user_drop_time = 1m
/* When a server is removed from the zone for dropping users, it is readded after this time.
* This directive is optional.
*/
user_drop_readd_time = 5m
/* If set, when a server splits, it is automatically removed from the zone. */
remove_split_servers = yes
/* If set, when a server connects to the network, it will be automatically added to
* the zone if it is a known server.
*/
readd_connected_servers = no
}
#command { service = "OperServ"; name = "DNS"; command = "operserv/dns"; permission = "operserv/dns" }
/*
* os_config
@@ -380,7 +342,7 @@ command { service = "OperServ"; name = "USERLIST"; command = "operserv/userlist"
* 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
@@ -389,18 +351,55 @@ 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
*
* Provides the command operserv/ignore.
*
* Used to make Services ignore users.
* 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
*
* Provides the command operserv/info.
*
* Used to add oper only notes to users and channels.
*/
module { name = "os_info" }
command { service = "OperServ"; name = "INFO"; command = "operserv/info"; permission = "operserv/info" }
/*
* os_jupe
@@ -410,7 +409,7 @@ command { service = "OperServ"; name = "IGNORE"; command = "operserv/ignore"; pe
* 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
@@ -420,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
@@ -430,7 +429,18 @@ 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
*
* Provides the commands operserv/chanlist and operserv/userlist.
*
* Used to list and search the channels and users currently on the network.
*/
module { name = "os_list" }
command { service = "OperServ"; name = "CHANLIST"; command = "operserv/chanlist"; permission = "operserv/chanlist" }
command { service = "OperServ"; name = "USERLIST"; command = "operserv/userlist"; permission = "operserv/userlist" }
/*
* os_login
@@ -440,8 +450,26 @@ command { service = "OperServ"; name = "KILL"; command = "operserv/kill"; permis
* 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
*
* Provides the command operserv/logsearch.
*
* Used to search services log files.
*/
module
{
name = "os_logsearch"
/* The log file name to search. There should be a log{} block configured to log
* to a file of this name.
*/
logname = "services.log"
}
command { service = "OperServ"; name = "LOGSEARCH"; command = "operserv/logsearch"; permission = "operserv/logsearch" }
/*
* os_mode
@@ -451,8 +479,8 @@ command { service = "OperServ"; name = "LOGOUT"; command = "operserv/logout"; }
* Used to change user and channel modes.
*/
module { name = "os_mode" }
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 = "UMODE"; command = "operserv/umode"; permission = "operserv/umode" }
command { service = "OperServ"; name = "MODE"; command = "operserv/mode"; permission = "operserv/mode" }
/*
* os_modinfo
@@ -462,8 +490,8 @@ command { service = "OperServ"; name = "UMODE"; command = "operserv/umode"; perm
* Used to show information about loaded modules.
*/
module { name = "os_modinfo" }
command { service = "OperServ"; name = "MODINFO"; command = "operserv/modinfo"; }
command { service = "OperServ"; name = "MODLIST"; command = "operserv/modlist"; permission = "operserv/modlist"; }
command { service = "OperServ"; name = "MODINFO"; command = "operserv/modinfo"; permission = "operserv/modinfo" }
command { service = "OperServ"; name = "MODLIST"; command = "operserv/modlist"; permission = "operserv/modinfo" }
/*
* os_module
@@ -473,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
@@ -484,10 +512,34 @@ command { service = "OperServ"; name = "MODUNLOAD"; command = "operserv/modunloa
*
* Used to configure news notices shown to users when they connect, and opers when they oper.
*/
module { name = "os_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"; }
module
{
name = "os_news"
/*
* The service bot names to use to send news to users on connection
* and to opers when they oper.
*/
announcer = "Global"
oper_announcer = "OperServ"
/*
* The number of LOGON/OPER news items to display when a user logs on.
*
* This directive is optional, if not set it will default to 3.
*/
#newscount = 3
/*
* Whether to show the datetime at which the news entry was added.
*
* This directive is optional, if not set it will default to yes.
*/
#showdate = yes
}
command { service = "OperServ"; name = "LOGONNEWS"; command = "operserv/logonnews"; permission = "operserv/news" }
command { service = "OperServ"; name = "OPERNEWS"; command = "operserv/opernews"; permission = "operserv/news" }
command { service = "OperServ"; name = "RANDOMNEWS"; command = "operserv/randomnews"; permission = "operserv/news" }
/*
* os_noop
@@ -496,50 +548,112 @@ 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"; }
/*
* os_oline
*
* Provides the command operserv/oline.
*
* Used to set oper flags on users, and is specific to UnrealIRCd.
* See /helpop ?svso on your IRCd for more information.
*/
module { name = "os_oline" }
command { service = "OperServ"; name = "OLINE"; command = "operserv/oline"; permission = "operserv/oline"; }
#module { name = "os_noop" }
command { service = "OperServ"; name = "NOOP"; command = "operserv/noop"; permission = "operserv/noop" }
/*
* os_oper
*
*
* Provides the command operserv/oper.
*
* Used to configure opers and show information about opertypes.
*/
module { name = "os_oper" }
command { service = "OperServ"; name = "OPER"; command = "operserv/oper"; permission = "operserv/oper"; }
command { service = "OperServ"; name = "OPER"; command = "operserv/oper"; permission = "operserv/oper" }
/*
* os_reload
*
* Provides the command operserv/relad.
* Provides the command operserv/reload.
*
* Used to reload the services.conf configuration file.
* 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
*
* Provides the commands operserv/exception and operserv/session.
*
* This module enables session limiting. Session limiting prevents users from connecting more than a certain
* number of times from the same IP at the same time - thus preventing most types of cloning.
* Once a host reaches its session limit, all clients attempting to connect from that host will
* be killed. Exceptions to the default session limit can be defined via the exception list.
*
* Used to manage the session limit exception list, and view currently active sessions.
*/
module { name = "os_session" }
command { service = "OperServ"; name = "EXCEPTION"; command = "operserv/exception"; permission = "operserv/exception"; }
command { service = "OperServ"; name = "SESSION"; command = "operserv/session"; permission = "operserv/session"; }
module
{
name = "os_session"
/*
* Default session limit per host. Once a host reaches its session limit, all clients attempting
* to connect from that host will be killed.
*
* This directive is required if os_session is loaded.
*/
defaultsessionlimit = 5
/*
* The maximum session limit that may be set for a host in an exception.
*
* This directive is required if os_session is loaded.
*/
maxsessionlimit = 100
/*
* Sets the default expiry time for session exceptions.
*/
#exceptionexpiry = 1d
/*
* The message that will be NOTICE'd to a user just before they are removed from the network because
* their host's session limit has been exceeded. It may be used to give a slightly more descriptive
* reason for the impending kill as opposed to simply "Session limit exceeded".
*
* This directive is optional, if not set, nothing will be sent.
*/
sessionlimitexceeded = "The session limit for your IP {ip} has been exceeded."
/*
* Same as above, but should be used to provide a website address where users can find out more
* about session limits and how to go about applying for an exception.
*
* Note: This directive has been intentionally commented out in an effort to remind you to change
* the URL it contains. It is recommended that you supply an address/URL where people can get help
* regarding session limits.
*
* This directive is optional, if not set, nothing will be sent.
*/
#sessionlimitdetailsloc = "Please visit https://your.website.url/ for more information about session limits."
/*
* If set and is not 0, this directive tells Anope to add an AKILL if the number of subsequent kills
* for the same host exceeds this value, preventing the network from experiencing KILL floods.
*
* This directive is optional.
*/
maxsessionkill = 15
/*
* Sets the expiry time for AKILLs set for hosts exceeding the maxsessionkill directive limit.
*
* This directive is optional, if not set, defaults to 30 minutes.
*/
sessionautokillexpiry = 30m
/*
* Sets the CIDR value used to determine which IP addresses represent the same person.
* By default this would limit 3 connections per IPv4 IP and 3 connections per IPv6 IP.
* If you are receiving IPv6 clone attacks it may be useful to set session_ipv6_cidr to
* 64 or 48.
*/
session_ipv4_cidr = 32
session_ipv6_cidr = 128
}
command { service = "OperServ"; name = "EXCEPTION"; command = "operserv/exception"; permission = "operserv/exception" }
command { service = "OperServ"; name = "SESSION"; command = "operserv/session"; permission = "operserv/session" }
/*
* os_set
@@ -548,8 +662,19 @@ command { service = "OperServ"; name = "SESSION"; command = "operserv/session";
*
* Used to set various settings such as superadmin, debug mode, etc.
*/
module { name = "os_set" }
command { service = "OperServ"; name = "SET"; command = "operserv/set"; permission = "operserv/set"; }
module
{
name = "os_set"
/*
* If set, Services Admins will be able to use SUPERADMIN [ON|OFF] which will temporarily grant
* them extra privileges such as being a founder on ALL channels.
*
* This directive is optional.
*/
#superadmin = yes
}
command { service = "OperServ"; name = "SET"; command = "operserv/set"; permission = "operserv/set" }
/*
* os_shutdown
@@ -558,10 +683,20 @@ command { service = "OperServ"; name = "SET"; command = "operserv/set"; permissi
*
* Used to quit, restart, or shutdown services.
*/
module { name = "os_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"; }
module
{
name = "os_shutdown"
/*
* If enabled then server operators will be required to provide the network
* name to confirm that they are quitting, restarting, or shutting down the
* right server.
*/
requirename = yes
}
#command { service = "OperServ"; name = "QUIT"; command = "operserv/quit"; permission = "operserv/quit" }
command { service = "OperServ"; name = "RESTART"; command = "operserv/restart"; permission = "operserv/restart" }
command { service = "OperServ"; name = "SHUTDOWN"; command = "operserv/shutdown"; permission = "operserv/shutdown" }
/*
* os_stats
@@ -571,36 +706,37 @@ 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_svsnick
*
* Provides the operserv/svsnick command.
* os_svs
*
* Used to force change user's nicks.
* Provides the commands operserv/svsnick, operserv/svsjoin, and operserv/svspart.
*
* Used to force users to change nicks, join and part channels.
*/
module { name = "os_svsnick" }
command { service = "OperServ"; name = "SVSNICK"; command = "operserv/svsnick"; permission = "operserv/svsnick"; }
module { name = "os_svs" }
command { service = "OperServ"; name = "SVSNICK"; command = "operserv/svsnick"; permission = "operserv/svs" }
command { service = "OperServ"; name = "SVSJOIN"; command = "operserv/svsjoin"; permission = "operserv/svs" }
command { service = "OperServ"; name = "SVSPART"; command = "operserv/svspart"; permission = "operserv/svs" }
/*
* os_sxline
*
* Provides the operserv/snline and operserv/sqline commands.
*
* Used to ban different things such as realnames, nicknames, and IPs.
* 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
*
* Provides the opersev/update command.
* Provides the operserv/update command.
*
* Use to immediately update the databases.
*/
module { name = "os_update" }
command { service = "OperServ"; name = "UPDATE"; command = "operserv/update"; permission = "operserv/update"; }
command { service = "OperServ"; name = "UPDATE"; command = "operserv/update"; permission = "operserv/update" }
-3699
View File
File diff suppressed because it is too large Load Diff
-1
View File
@@ -1 +0,0 @@
git log --pretty=format:"Revision %h - %cD - %s" > version.log
-1
View File
@@ -1 +0,0 @@
astyle --style=java --indent=tab --brackets=break-closing --indent-switches --indent-cases --brackets=break
+94
View File
@@ -0,0 +1,94 @@
Since the first commit in March 2004 90 people have submitted patches, commits,
and other useful contributions to Anope. These people, ordered by the number of
contributions they have made, are:
* Adam <adam@anope.org>
* Sadie Powell <sadie@sadiepowell.dev>
* Robin Burchell <w00t@inspircd.org>
* Naram Qashat <cyberbotx@anope.org>
* Pieter Bootsma <geniusdex@anope.org>
* Jens Voss <dukepyrolator@anope.org>
* David Robson <rob@anope.org>
* Florian Schulze <certus@anope.org>
* Daniel Engel <dane@zero.org>
* Trystan S. Lee <trystan@nomadirc.net>
* Robby <robby@chatbelgie.be>
* Charles Kingsley <chaz@anope.org>
* Lee Holmes <lethality@anope.org>
* Gabriel Acevedo H. <drstein@anope.org>
* Jan Milants <viper@anope.org>
* Adam Kramer <ribosome@anope.org>
* Attila Molnar <attilamolnar@hush.com>
* Michael Wobst <wobst.michael@web.de>
* PeGaSuS <droider.pc@gmail.com>
* Matt Schatz <genius3000@g3k.solutions>
* Mark Summers <mark@goopler.net>
* Daniel Vassdal <shutter@canternet.org>
* MatthewM <mcm@they-got.us>
* Sebastian V. <hal9000@denorastats.org>
* Alvaro Toledo <atoledo@keldon.org>
* Björn Stiddien <keeper@anope.org>
* n0kS Phr33d0m <god@politeia.in>
* Hendrik Jäger <gitcommit@henk.geekmail.org>
* k4be <k4be@pirc.pl>
* Thomas Fargeix <t.fargeix@gmail.com>
* CaPa CuL <capacul@gmail.com>
* Val Lorentz <progval+git@progval.net>
* Bram Matthys <syzop@vulnscan.org>
* Federico G. Schwindt <fgsch@lodoss.net>
* Alexander Barton <alex@barton.de>
* Cronus <cronus@nite-serv.com>
* Dragone2 <dragone2@risposteinformatiche.it>
* H7-25 <simos@simosnap.org>
* Jyzee <jyzee.git@gmail.com>
* Sebastian Barfurth <github@afreshmelon.com>
* Zantox <jyoerger10@msn.com>
* Zoddo <zoddo.ino@gmail.com>
* Dominic Hargreaves <dom@earth.li>
* Michael Hazell <michaelhazell@hotmail.com>
* Robert Scheck <robert@fedoraproject.org>
* Dennis Friis <peavey@inspircd.org>
* Filippo Cortigiani <simos@simosnap.org>
* KidProtect
* Michał Zegan <webczat_200@poczta.onet.pl>
* AlphaTech <alphat3ch@icloud.com>
* Austin Ellis <siniStar@IRC4Fun.net>
* bonnedav <theD_2011@hotmail.com>
* Denis M. (Phr33d0m) <god@politeia.in>
* Harakiri <harakiri@overstack.fr>
* Marcin Łabanowski <marcin@6irc.net>
* Matt Ullman <matt@airraidsirens.com>
* Michael Stapelberg <michael@robustirc.net>
* Alexander Maassen <outsider@twingoversum.scarynet.org>
* artemiiav <artemiiav@gmail.com>
* blackbeard420 <blackbeard@blackbeard420.me>
* BoGu5 <bogus@onzin.org>
* Chris Langsenkamp <chris@langsenkamp.com>
* Clem Morton
* crazycatdevs
* Daniel Oaks <danneh@danneh.net>
* Fabio Scotoni <cculex@gmail.com>
* ItsOnlyBinary
* Jason Foster <retsofaj@gmail.com>
* Jeremy <jeremy@ssnet.ca>
* Josh Soref
* KindOne <ineedalifetoday@live.com>
* linuxdaemon
* Mantas Mikulėnas <grawity@gmail.com>
* Matthew Beeching <jobe@mdbnet.co.uk>
* Michael <michaelhazell@hotmail.com>
* Mingjie Shen <shen497@purdue.edu>
* nekoswag
* Peter Tseng <pht24@cornell.edu>
* Romain Rivière <lecoyote@lecoyote.org>
* Sam James (sam_c) <sam@cmpct.info>
* ShutterQuick <shutter@canternet.org>
* Sketch <denverfreeburn@outlook.com>
* Tim Gunter <tim@vanillaforums.com>
* Toni Kaija <diftraku@gmail.com>
* Victor Coss <gtaxl@gtaxl.net>
* VisioN <vision@myirc.us>
* westor <westor7@gmail.com>
* Wilson Birney <wpb@360scada.com>
* Yann Sionneau <yann@sionneau.net>
* Zach Bloomquist <zrbq@live.com>
-1
View File
@@ -1 +0,0 @@
For all bug reports / updates please see http://bugs.anope.org
-111
View File
@@ -1,111 +0,0 @@
C++-style Casting
=================
In C, you can cast in one of two ways:
(type)var
type(var)
The problem with C-style casting is that it allows a programmer to get away
with too much, and is also not designed to handle C++ classes.
C++ has 4 types of casting in addition to allowing C-style casting. They are:
static_cast
const_cast
dynamic_cast
reinterpret_cast
The syntax is usually *_cast<type>(var).
static_cast
-----------
From my expierence, this cast is closest to C-style casting for non-pointer
types as well as between some (but not all) pointer types. This type of cast,
like C-style casting, is performed at compile-time. static_cast can also do
a downcast of a derived class to a base class, but only if the base class is
not a virtual base class. Sometimes the result of this cast can become
undefined. static_cast is a bit more strict that C-style casting, though. It
disallows certain class conversions that would've been allowed with a C-style
cast. static_cast also doesn't allow you to cast to an incomplete type. In
these cases, I would try either dynamic_cast or reinterpret_cast.
const_cast
----------
This cast is mainly to add or remove const-ness or volatile-ness from a
variable. This is safer than using a C-style cast to change the const-ness
of a variable. In most cases if you try to use one of the other casts and it
complains about const-ness, you will want to either use this cast instead or
wrap the other cast around this cast. An example:
const int *a;
static_cast<void *>(a); <-- This will fail.
To remedy the above, you would might try this:
const int *a;
const_cast<void *>(a); <-- But this will still fail.
The real solution is this:
const int *a;
static_cast<void *>(const_cast<int *>(a));
It is not recommended to use const_cast on the this variable within a member
function of a class that is declared const. Instead you should use the mutable
keyword on the variable in the class's definition.
dynamic_cast
------------
This cast can only be used on pointers or references to classes. It can cast a
derived class to a base class, a derived class to another derived class
(provided that both are children of the same base class), or a base class to a
derived class. You can also use this to cast a class to void *. This cast is
done at run-time as opposed to the other casts, and relies on C++'s RTTI to be
enabled. It is meant to be used on polymorphic classes, so use static_cast on
non-polymorphic classes.
derived-to-base conversions are actually done statically, so you use either
dynamic_cast or static_cast on them, regardless of if the classes are
polymorphic or not.
derived-to-derived or base-to-derived conversions, however, rely on run-time
type information, and this cast is used on those classes that are polymorphic.
This is safer than C-style casting in that an invalid pointer conversion will
return a NULL pointer, and an invalid reference conversion will throw a
Bad_cast exception.
Note that in Anope we prefer if Anope::debug_cast is used.
This uses dynamic_cast (and checks for a NULL pointer return) on debug builds
and static_cast on release builds, to speed up the program beacuse of dynamic_cast's
reliance on RTTI.
reinterpret_cast
----------------
This cast I would use only as a last resort if static_cast isn't allowed on a
conversion. It allows for conversions between two unrelated types, such as
going from char * to int *. It can also be used to convert a pointer to an
integral type and vica versa. The sites I've read mention how the result is
non-portable, which I assume means the resulting object code is non-portable,
so since the code is compiled on many systems anyways, I don't see this as
being a huge issue. It is recommended to only use this if necessary, though.
Links
=====
The following links are web sites I've used to get this information, and might
describe some of the above a bit better than I have. :P
http://www.acm.org/crossroads/xrds3-1/ovp3-1.html
http://www.cplusplus.com/doc/tutorial/typecasting.html
http://www.codeguru.com/forum/showthread.php?t=312456
http://www.cs.umd.edu/class/sum2003/cmsc311/Notes/BitOp/cast.html
http://msdn.microsoft.com/en-us/library/5f6c9f8h(VS.80).aspx
http://en.wikibooks.org/wiki/C%2B%2B_Programming/Type_Casting
http://www.informit.com/guides/content.aspx?g=cplusplus&seqNum=134
-- CyberBotX, Nov 23, 2008
+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.
+3 -7
View File
@@ -3,13 +3,9 @@ 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(IN_SOURCE)
set(DOCS Changes Changes.conf DEFCON FAQ INSTALL LANGUAGE MODULES NEWS ${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 docs
DESTINATION ${DOC_DIR}
)
set_directory_properties(PROPERTIES ADDITIONAL_MAKE_CLEAN_FILES "${CMAKE_CURRENT_BINARY_DIR}/README.txt")
endif(WIN32)
endif()
-239
View File
@@ -1,239 +0,0 @@
Orginally pulled from: http://www.inspircd.org/wiki/Coding_Guidelines
---
InspIRCd Coding Guidelines
The following are a set of guidelines for writing patches to InspIRCd, or for
creating modules for distribution with the official package. These guidelines
were written a time after InspIRCd development started, and so not all code
yet follows these. This will be rectified with time.
1. Comments
* Multi Line
Multiple line comments should follow the C-style comment, for example:
/*
* This is a multiple line comment, huzzah..
*/
* Single Line
Single line comments should also be in the C style, for example:
/* This is a boring one-line comment */
* Doxygen commenting
If you wish your comment to show in doxygen, the comment should be directly
above the item you are documenting (a class, function, enum, etc) and the
first line should be "/**". For example:
/** This is a doxygen multiline comment.
* Description of thingymebob here.
*/
The first line after the "**" is used as the short description of the item
(up to the full stop) and everything afterwards as the detailed description.
2. Indentation
Tabs. Tabs. ONLY TABS. Use a single tab for each level of indentation,
for example:
int main()
{
<tab>if (condition)
<tab>{
<tab><tab>code
<tab>}
}
3. Separation
Always put a space in between a keyword like if/while and the condition,
for example:
if (foo == bar)
NOT
if(foo == bar)
4. Braces
Always put braces opening and closing blocks on separate lines, see the
identation example. For example, place braces like this:
if (apples == "green")
{
cout << "Apples are green" << endl;
}
and not:
if (apples == "green") {
cout << "Apples are green" << endl;
}
The one exception to this is if you are declaring a class method which is
only one line long, in that case the following is acceptable in most cases:
class foo : public bar
{
foo() { }
getrandomfoo() { return rand(); }
};
5. Templates
Where possible, use templates rather than #defines. Avoid use of RTTI.
6. Structs
Structs should be declared in the following fashion:
struct BodyPartBasket
{
int arms;
int legs;
int scrotalsacs;
};
and not like this:
typedef struct
{
int arms;
int legs;
int scrotalsacs;
} BodyPartBasket;
The second way is not required in C++ to be able to do this:
BodyPartBasket mybasket;
Plus, placing the name at the bottom of the declaration makes readability
more difficult (as you have to scroll down to the bottom of the struct to
find its name). (where possible, call them classes rather than structs.)
7. Variable naming
Class and struct names should be in camel case with a leading capital letter,
for example "MyBagOfBones" and not "my_bag_of_bones" or "mybagofbones".
Variable names can be in either camel case with a leading capital letter or
alternatively all lower case, so long as the same naming convention is
adhered to throughout the class. No classes or variables should be named in
capitals unless this makes sense for the name (for example "class DNS").
Constants and enum values should always be completely in CAPITALS and
underscores may be used, for example:
enum DecayState
{
DECAYED_MOULDY = 0,
DECAYED_SMELLY = 1,
DECAYED_MAGGOTS = 2
};
All value names in an enum should be started with the same text which should
be related in some way to the enum's use. For example "DNS_CNAME, DNS_A,
DNS_AAAA".
8. Use of references
Wherever possible, when dealing with any complex class, pass a const reference
rather than a copy of the class. For example:
MyThingy::MyThingy(const std::string &thingyvalue)
{
}
Of course, if you intended to change the string you can just omit the 'const'.
9. Use of char pointers
Whenever you use char pointers (char*, char**) try to use const equivalents.
This is much safer and avoids ugly and dangerous casts. For example:
MyThingy::Thingify(const char* const* wotsits)
{
}
If it is possible without performance loss, consider avoiding char pointers
altogether and using std::string instead.
10. Use of STL
For more information on use of STL in InspIRCd, please see the separate
STL FAQ.
11. Making copies of data
Never ever make a copy of a piece of data unless it is absolutely necessary.
For example, don't use strlcpy() to make a copy of the const char* string
returned by std::string::c_str(), if the change can be done to the std::string
itself. The same goes for unnecessary variable assignments, especially those
which assign large classes.
12. namespace std
Avoid the following:
using namespace std;
It might take a bit more typing, but things work better if you don't set
(then later assume) the namespace -- specify it explicitly when you want to
use it.
13. Linefeeds
Unix linefeeds only please. We do not like to see our screens covered in ^M.
14. Portability
Always make sure your code is portable to all supported operating systems,
remember of course that as of 1.1.8 this includes windows. Don't write code
that only works on windows, or only works on Linux. Test your code on all
platforms or ask for help from other developers who have the platforms you
want to test on.
* new() and delete(), malloc() and free()
Apart from the fact that using malloc() and free() is bad practice in C++
code, you must never use malloc() or free() in InspIRCd, within its modules
or within the core. This is because if you use malloc() or free() in windows,
the memory is claimed from the program's local heap.
In windows, each shared object (module, dll) has its own heap, which is
protected from other dlls and executables. To get around this issue and
allow more posix-like memory access from other dlls in the program (other
modules), InspIRCd overrides the operators new and delete to ensure that
memory allocated by them comes from the windows global heap. If you use
malloc() and free() for this, the ircd will segfault when another module
tries to access the memory you have allocated!
* strdup()
As with malloc(), above, strdup() should be avoided. Where strdup() is
absolutely necessary, use strnewdup() which is our strdup() implementation
that calls operator new instead of using malloc().
char arrays allocated by strnewdup() should be deleted with operator delete[].
* CoreExport and DllImport
Prefix all types you want to import or export to other modules with CoreExport
and DllImport macros. These do nothing in POSIX operating systems, however
in windows these are expanded to the instructions __declspec(dllimport) and
__declspec(dllexport) respectively depending on where they are used and how.
15. External Dependencies
If a module is compiled as standard, or the code is part of the core, you must
not use any dependencies that are not available as standard on all supported
operating systems beyond libstdc++, libc, and whatever else is currently
required to build the core. Modules which use nonstandard dependencies belong
in the modules/extra directory.
16. Profiling and Performance
It is one thing to assume that code performs bad, it is another thing to prove
that it actually is. A lot of experienced programmers talk about 'premature
optimisation', and here is what it means: if you have a piece of code called
once on startup that takes 10 seconds instead of one second to run, and a
piece of code that takes 0.05 seconds to run when it should take 0.01, and
it is called once per second, the second piece of code is the priority.
In other words, make sure that what you think is slow, and a performance
problem in Insp actually is.
To do this, use the callgrind tool from Valgrind (valgrind --tool=cachegrind
bin/inspircd -nofork -debug), and kcachegrind (or similar) to view the output
files.
-185
View File
@@ -1,185 +0,0 @@
Anope Version 1.9.6
--------------------
A Added ability to configure emails sent by services
A Added chanserv/up and chanserv/down
A Added m_proxyscan
A Added more configurability for what vhosts are valid
A Added chanserv/log
A Added ability to configure ChanServ privileges
A Added a new database format
A Added SQLite support
A Added more verbose messages on startup
A Added ability for chanserv/suspend and nickserv/suspend to take an expiry time
A Added no nickname ownership config option
A Added m_rewrite
A Added akill IDs
F Fixed crash in clearusers
F Fixed crash in /os oper info
F Fixed eventfd Config check to work properly on OpenVZ
Anope Version 1.9.5
--------------------
A Extended LDAP support
A Added os_oper, os_kill, os_forbid, m_statusupdate, cs_sync, and bs_autoassign
A Added a new configuration file format
A Added a new commands system
A Added a new access system, and cs_flags
F Fixed not logging debug logs to file
F Fixed the mail delay time
F Fixed sending account data for unconfirmed nicks
F Fixed poll() engine build on FreeBSD
F Fixed really large HELP replies being truncated
F Fixed sometimes appending !*@* to valid hosts on access lists
F Fixed m_ssl sometimes failing connecting for no reason
F Fixed crash in cs_entrymsg
F Fixed setting -P on channels with only a botserv bot in it
F Fixed modemanager complaining about prefixless modes on InspIRCd
Anope Version 1.9.4
--------------------
A Automatically set channel founder to the user with the highest access if there is no successor
A /chanserv clone command to copy settings from one channel to another.
A /chanserv mode command
A Ability for users to delete their own access in channels
A Added support for Plexus 3
A Readded in support for /cs op/deop/etc to op/deop you in all channels
A Added LDAP support
A Added live SQL support
A Added support for learning tracking/storing/locking all modes at runtime
A Added m_alias
A Added support for XMLRPC queries
A Added /botserv set msg
A Added /operserv config
A Added /ns cert
A Added /operserv login
F Changed the GHOST command to not allow ghosting unidentified users if the RECOVER command exists
F Some failed logic in /operserv exception that prevents proper exceptions from being added
F Fixed the anope_os_sxlines MySQL table and code to work after restarting
Anope Version 1.9.3
--------------------
A Added italics BotServ kicks support
A Tell users when their nicks expire in /ns glist and /ns info
A Added SSL support
A Prevent negaitve mode changes, kicks, bans, and autokicks from affecting people with the 'god' user mode (On UnrealIRCd, usermode +q)
A Added nickserv/auxpex permission
A Added nickserv ungroup command
A Renamed the SGLINE to be SNLINE
A Added /chanserv saset command
A Added threads for mail sending
A Added m_dnsbl and an asynchronous DNS system
A Added a new language system that uses gettext
A Added m_mysql which uses threads to execute queries
A Added many subcommand modules for some commands, eg ns_set_autoop, ns_set_email, etc
A Added a new logging system that is a bit more flexible
A Added cs_set_misc and ns_set_misc to add miscellaneous set commands
A Added os_modreload, which allows reloading some modules not normally unloable, like the protocol module
A Added FOUNDER access level
A Made OperServ, Global, MemoServ, and ChanServ optional
F Shutting down if a config reload fails
F Autoid to live through restarts on Unreal
F Storing vhosts in MySQL
F Not flushing the anope_extra table before rewriting databaes
F Anoperc start/stop to send the globaloncycle global, and fixed anoperc rehash to really rehash
F Fixed a potential crash if HostServ or BotServ was disbled
Anope Version 1.9.2
--------------------
A K alias to chanserv kick command
A KB alias to chanserv ban command
A The ability to register empty nonregistered channels
A Flatfile plaintext databases and removed old binary ones
A Added in live updating SQL and the ability to execute commands through SQL (see docs/MYSQL)
A Added support for many more modes into Anope and the ability to have generic support for modes unknown to Anope
A Added a mode stacker to combine many mode changes into fewer
A Added in the CS SET PERSIST command which can be used to keep service bots in channels even when the channel is empty
A Added AUTOOWNER OWNER and OWNERME into CS LEVELS
A Added ns_resetpass module to the core
A CS ACCESS VIEW which shows who added the access and last time used
A Last used time to CS AKICK VIEW
A Added a sha_256 encryption module
A Added the ability to load multiple encryption modules, and the ability to seamlessly convert your database between diferent encryptions
A Added configuration options to allow Anope to reconnect if it disconnects from the uplink instead of dieing
A Added support for linking with IPv6
F Unban command to accept an optional nick arg
F Some typos in services.conf
F Crash when users change their host that are identified to a group, but not a nick
F Host length checking in HS SET(ALL) and HS REQUEST
F Only show if a user is online in NS INFO if they are really identiifed for the group of the nick they are on
F Crash when using BSSmartJoin
F Converting access entries to access from xop when a users access is below voice
F A bad pointer passed to the OnDelEvent which could cause some 3rd party modules to crash
F CS FORBID allows to you forbid unregistered channels
F The -nothird command line option to work
F ms_rsend to really work
F SQUITing juped servers on InspIRCd1.2+
Anope Version 1.9.1
--------------------
F Don't enforce akick/forbidden/etc.-restrictions on clients on ulined servers.
F Remove modules_unload_all fini + hack that goes with it.
F Signal handling cleanup.
A Seamless fantasy support on all ChanServ commands, instead of requiring bs_fantasy_*.
F Allow fantasy to be disabled on some commands (e.g. FORBID).
F Some commands (e.g. !help) need to strip the pre-provided channelname from them.
D HelpServ removed
F Command parser cleanup: mod_current_buffer removed and replaced with proper parser. Commands now indicate how they want the buffer split.
F Make NS ENFORCE/RELEASE stuff more sane, redo timers.
A Opertypes (similar to InspIRCd's opertypes)
Provided by Ankit <ankit@nevitus.com> - 2009
F Segfault on shutdown
Provided by Adam <adam@anope.org> - 2009
F NickServ registration is sometimes denied.
F Applied patch from Adam to fix some potential screwups
F More fixes to bs_bot from Adam, plus an extra fix within DoAdd not covered in Adam's patch.
F Fix bs_bot to use the correct parameters, patch from Adam.
F Fix for bug #1004, based from second half of patch from Adam.
F Partial patch by Adam, commenting fix for #1006 for future reference.
F Forward-port r1946: Patch by Adam fixing #1006 (originally caused by #922): modes set by ChanServ are reversed. Thanks!
Provided by DukePyrolator <dukepyrolator@gmx.de> - 2009
F Patch converting all match calls to new method, thanks!
F Add 'w' and 'y' support to dotime(), also prevent an overflow.
F Allow NS STATUS from unregistered users, thanks DP!
F Wild pointers do not a happy Anope make. Thanks DP :)
F Allow NS REGISTER to unregistered nicks, silly oversight. Thanks DP! :)
F Fix call order, thanks to DP
F Pass the right array to do_umode(), fixes mode tracking on Unreal. Thanks to DukePyrolator (yet again :P)
F Fix bs_set help, thanks to DukePyrolator! :)
F Fix two segfaults, noted by DukePyrolator. Thanks!
F Fix part one of #1010, reported by DukePyrolator. (Language settings are not respected in message sending.) Thanks!
F Memory leak on +beI modes.
Provided by Liber <Liber@jasonirc.net> - 2009
F Support operoverride and such things (stop reversing changes from nonopped people where unnecessary)
Anope Version 1.9.0
--------------------
F Modified compile to use g++
F Improve protocol modules support (classes, virtual methods, etc)
F Move core services to use BotInfo
F Move BotInfo and related methods into a class
F Move modules into a class
F Fixed ns resending of passcode issue
F Modules now delete themselves
F additional field where users' masked host can be stored so both masked IP and vhost are available instead of just one.
F No struct Uid, ugly, and, unnecessary that we store UID in BotInfo.
F Prevent deletion of core services via /bs bot
F Module subsystem cleanup ('modules' branch)
F Move modules to use classes somewhat (AnopeInit, AnopeFini)
F Change MODULE_INIT to return a pointer
F Remove duplicate module creation.. have loadModule return a pointer rather than creating one
F Remove buffered loading/unloading, this makes os_modunload perm, but who cares
F Remove 'delayed' loading, this is necessary because of before/after connected to ircd (ircd is before, rest after), I'm sure this can be done better.
A Remove old config, replace with insp-inspired (albeit bind format) config (CBX)
F Clean up protocol modules a bit
A InspIRCd 1.2 support
F Remove old (prior to 1.8.0) db compat
F Establish a proper base for services pseudoclients
F Add ss_main StatServ Hal9000 to play with :)
F Burn automake with fire (CBX)
Provided by mooncup <mooncup@anonnet.org> - 2009
F Automatically reapply vhost on hs off for unreal.
-122
View File
@@ -1,122 +0,0 @@
Anope Version 1.9.6
-------------------
service:channels added to join services to channels
mail block modified to allow configuring of email messages
oper:host and oper:vhost added
oper:require_oper added
options:nonicknameownership added
operserv:akillids added
nickserv/access oper privilege added
Anope Version 1.9.5
-------------------
Don't even try it, get a new config and start over.
Anope Version 1.9.4
-------------------
** ADDED CONFIGURATION DIRECTIVES **
memoserv:modules added ms_ignore
chanserv:modules added cs_clone and cs_mode
nickserv:suspendexpire and nickserv:forbidexpire added
chanserv:suspendexpire and chanserv:forbidexpire added
module added cs_entrymsg
nickserv:modules added ns_ajoin, ns_cert
options:nomlock added
log:target added globops
nickserv:confirmemailchanges added
operserv:modules added os_config, os_login
** MODIFIED CONFIGURATION DIRECTIVES **
operserv:notifications removed osglobal, osmode, oskick, osakill, ossnline, ossqline, osszline, osnoop, osjupe, getpass, setpass, forbid, drop
renamed nickserv:preregexpire to nickserv:unconfirmedexpire
** DELETED CONFIGURATION DIRECTIVES **
opertype:commands removed operserv/umode
operserv:modules removed os_umode
Anope Version 1.9.3
------------------
** ADDED CONFIGURATION DIRECTIVES **
nickserv/auspex privilege added
SSL module added for SSL support
opertype:inherits added to allow opertypes to inherit commands and privs from other opertypes
Various nickserv/saset/* and chanserv/saset/* opertype command privileges added
nickserv:modules added many new ns_set_command modules
chanserv:modules added many new cs_set_command modules
opertype:commands added nickserv/saset/* and chanserv/saset/*
options:socketengine added to choose what socket engine to use
module:cs_set_misc and module:ns_set_misc added to replace the old set url/icq/email modules
options:hideprivilegedcommands added to hide privileged commands from normal users
log block added to customize logging
dns block added to configure dns settings
m_dnsbl added
mysql configuration block added
** MODIFIED CONFIGURATION DIRECTIVES **
opertype:commands changed operserv/sgline to opserv/snline
operserv:modules changed os_sgline to os_snline
operserv:modules added os_modreload
operserv:sglineexpiry changed to operserv:snlineexpiry
operserv:killonsgline changed to operserv:killonsnline
operserv:notifications ossgline changed ossnline
memoserv was made optional
moved operserv:global configuration into its own global block
chanserv was made optional
** DELETED CONFIGURATION DIRECTIVES **
serverinfo:helpchannel removed because it has been readded in m_helpchan
networkinfo:logchannel, logbot, logusers, logmaxusers, logchannel, and options:keeplogs removed because of the log block
dumpcore because it really didn't do anything
Anope Version 1.9.2
--------------------
** ADDED CONFIGURATION DIRECTIVES **
options:enablelogchannel added to auto turn on the logchannel on startup
options:mlock added to configure the default mlock modes on new channels
options:database added for the database modules
options:botmodes added to configure modes BotServ bots should use
options:userlen added to configure maxiumum ident length
options:hostlen added to configure maximum hostname length
options:database added to configure what database modules to use
options:passlen added to specify the maximum length of passwords
uplink:ipv6 added to enable IPv6 connectivity
options:maxretries added to specify the number of reconnect attempts allowed
options:retrywait added to specify how long to wait between reconnect attempts
opertype command chanserv/aop/list removed as it was unnecessary, use chanserv/access/list instead
** MODIFIED CONFIGURATION DIRECTIVES **
options:encryption added enc_sha256
chanserv:modules added cs_unban
nickserv:modules added ns_resetpass
** DELETED CONFIGURATION DIRECTIVES **
nickserv:database deleted because of new database system
nickserv:prenickdatabase deleted because of new database system
chanserv:database deleted because of the new database system
botserv:database deleted because of the new database system
hostserv:database deleted because of the new database system
operserv:database deleted because of the new database system
operserv:newsdatabase deleted because of the new database system
operserv:exceptiondatabase deleted because of the new database system
hs_request:database deleted because of the new database system
os_ignore:database deleted because of the new database system
serverinfo:localport deleted
Anope Version 1.9.1
-------------------
** ADDED CONFIGURATION DIRECTIVES **
Opertypes have been added, through the opertype blocks.
Services Operators are now specified in the oper blocks.
** MODIFIED CONFIGURATION DIRECTIVES **
botserv:modules no longer contains bs_fantasy* modules, fantasy is now seamless.
operserv:modules has replaced os_logonnews, os_opernews, and os_randomnews with os_news.
operserv:modules no longer contains os_admin and os_oper modules, removed in favor of oper blocks.
operserv:notifications no longer contains osraw due to removal of OS RAW.
** DELETED CONFIGURATION DIRECTIVES **
Nick tracking has been removed as an option.
Restricting of NS GETPASS and CS GETPASS removed in favor of opertypes.
Host Setters were removed in favor of opertypes.
HelpServ has been removed entirely.
operserv:disableraw removed due to removal of OS RAW.
+20 -21
View File
@@ -1,4 +1,4 @@
Anope DefCon
Anope DefCon
------------
1) Introduction
@@ -10,8 +10,8 @@ Anope DefCon
1) Introduction
Anope 1.6 onwards supports a unique protection mechanism based on the
military "Defense Readiness Condition" (DefCon) system. It is based on
Anope supports a unique protection mechanism based on the
military "Defense Readiness Condition" (DefCon) system. It is based on
5 levels of defense readiness defined as:
DEFCON5 Normal peacetime readiness
@@ -23,9 +23,9 @@ Anope DefCon
These are configurable levels that mandates what actions Anope should
take in case of emergency and change in readiness status.
It is used to prevent abuse to both Services, and the ircd on which they
It is used to prevent abuse to both Anope, and the IRCd on which they
are running. Also to protect the users, primarily in the event of Clones
and/or FloodBOT attacks.
and/or FloodBOT attacks.
2) Installation
@@ -44,26 +44,26 @@ Anope DefCon
Pre-defined DefCon actions:
No new channel registrations
No New Nick Registrations
No new channel registrations
No New Nick Registrations
No Mode Lock changes
Force Chan Mode
Use Reduced Session Limit
KILL any new clients trying to connect
Services will ignore everyone but opers
Services will silently ignore everyone but opers
AKILL all new clients trying to connect
Force Chan Mode
Use Reduced Session Limit
KILL any new clients trying to connect
Ignore everyone but opers
Silently ignore everyone but opers
AKILL all new clients trying to connect
No new memos sent to block MemoServ attacks
Information regarding how to enable this for specific defcon levels can
be found in operserv.conf
4) Usage
Anope starts up in DEFCON5 (normal readiness). To change the Defcon level
in action use:
/msg OperServ DEFCON 1|2|3|4|5
Anope starts up in DEFCON5 (normal readiness). To change the Defcon level
in action use:
/msg OperServ DEFCON 1|2|3|4|5
5) Usage Example
@@ -89,6 +89,5 @@ Anope DefCon
6) Support
You might get DefCon support by posting on our online forum, or maybe on
our #anope channel at /server irc.anope.org.
You might get DefCon support by posting on our online forum, or maybe on
our #anope channel at /server irc.teranova.net.
+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 =
-42
View File
@@ -1,42 +0,0 @@
Anope Internal Events
---------------------
1) Intro
2) Using Events
1) Introduction to Internal Events
Internal Events are setup to give module developers more information
about what the core is doing at different times. This information can
be as complex as data we are feeding to the uplink, to simple triggered
events such as the databases being saved.
Additionally there is a module included with the core
which can provide some clue as to how to use the code in your modules.
The rest of this document assumes that you are used to writing modules.
2) Using Events
Anope is told about modules wanting to hook to events by the function
ModuleManager::Attach(EventName, Module*);, eg:
ModuleManager::Attach(I_OnJoinChannel, this);
You can also specifcy an array of events:
Implementation i[] = { I_OnJoinChannel, I_OnPartChannel };
ModuleManager::Attach(i, this, 2);
Where 2 is the number of events in the list
You must then overload these functions in your main modules class.
The full list of functions and parameters are in modules.h. In this
case, you would be overloading OnJoinChannel() and OnPartChannel() like so:
void OnJoinChannel(User *u, Channel *c) { }
void OnPartChannel(User *u, Channel *c) { }
Some of these events can be used to prevent or allow things to happen that
would normally not be allowed or denied. You can also use ModuleManager
(not explained here) to set control which order the modules are queried
(when multiple modules hook to the same event).
+5 -5
View File
@@ -1,10 +1,10 @@
Frequently Asked Questions (FAQ) concerning Anope
------------------------------------------------
The information in the 1.9 FAQ is subject to change at any
-------------------------------------------------
The information in the 2.0 FAQ is subject to change at any
moment due to new developments. Please visit our website
for the most up to date information.
An updated version of the FAQ can be found here:
http://wiki.anope.org/index.php/FAQ
https://wiki.anope.org/index.php/2.0/FAQ
+33 -104
View File
@@ -19,159 +19,88 @@ Note: You should also read the README and FAQ files!
The very first thing you need to do is to get the Anope package (if not
already done). You can find it at:
http://www.anope.org/
https://www.anope.org/
Anope can be built one of two ways. The recommended way is to use CMake.
You can check if CMake is already installed on your system using the
command:
Anope requires cmake to build. You can check if CMake is already
installed on your system using the command:
cmake --version
If it's installed, you will get a line that says something similar to
"cmake version 2.6-patch 1". If the version is less than 2.4 or you get
"cmake version 3.28.3". If the version is less than 3.20.0 or you get
an error saying the command was not found, you will not be able to use
CMake unless you install it yourself into your home directory. CMake
can be downloaded from:
http://www.cmake.org/cmake/resources/software.html
If you are unable to install CMake yourself (either due to lack of space
or restrictions by your hosting provider), you still have the alternative
to use the provided configure script. This option is not recommended and
will eventually be phased out, but is provided for compatibility for those
lacking CMake.
https://cmake.org/download/
Next, unpack the package in your home directory, and go into the created
directory.
If there are any extra modules you want to enable, such as mysql, run
the 'extras' script to enable them. If you do not know you can come back
later and enable them.
Now type ./Config to start the configuration script. It will ask you a
few questions, and figure out how to compile Anope on your system. If
you are unsure about the answer to a question, use the default value.
The question to using configure or cmake depends on your decision from
above. If you have CMake and wish to use it, answer with cmake, otherwise
answer with configure.
You can now type make to compile Anope. If there are errors in the
Makefile, *try to use gmake* instead. If it still doesn't work, you (or
the system administrator if it's a shell) must install GNU make. You may
find it at ftp://prep.ai.mit.edu/pub/gnu/.
Now type make install (or gmake install; see above). This will install
Now cd build and type make and make install. This will install
all the needed files in the paths you specified with the configure
script, and setup file permissions. You should ensure that the data
directory is not accessible by other users, as malicious users may
cause trouble on your network if passwords are not encrypted, or read
the memos of any user.
If you see errors during this process, please mail us with the *complete*
error output, and don't forget to mention your OS, compiler and C++ library
versions.
Now go into the data directory (by default, ~/services/data). Copy the example
configuration file (example.conf) to services.conf, and open the latter
Now go into the conf directory (by default, ~/anope/conf). Copy the example
configuration file (anope.example.conf) to anope.conf, and open the latter
with your favorite text editor. It contains all the configuration
directives Anope will use at startup. Read the instructions contained in
the file carefully. Using the default values is NOT a good idea, and will
most likely not work!
If you need help, you should subscribe to the Anope mailing list and mail
there to get help from other users. See the README file for more
information.
If you need help, you should visit https://forum.anope.org/ or #anope on
irc.teranova.net. Provide *complete* error output, along with other relevant
information eg. OS, compiler and C++ library versions.
See the README file for more information.
2) Upgrading Anope
If you got a .diff file and want to patch the old Anope sources with it,
do the following:
* Copy the .diff file into the root Anope sources directory.
* Type patch -p1 <file.diff
Note that upgrading anope with a patchfile isn't recommended. You should
download a new, clean source package, as this will give the best results.
To upgrade Anope, just follow the installation instructions described in
section 1. There are however a few specific guidelines:
* IMPORTANT: Back up your old databases!
* If you are upgrading to a new major release, ALWAYS restart a
fresh configuration file from example.conf.
fresh configuration file from anope.example.conf.
3) Setting up the IRCd
Services acts as an IRC server with pseudo-clients on it. To link them to
your network, you'll need to add some lines in the ircd.conf of their hub
server (as stated in the RemoteServer configuration directive).
Anope acts as an IRC server with pseudo-clients on it. To link them to
your network, you'll need to configure your IRCd to allow services to link.
For samples below we'll take services.localhost.net as the name of the
Services (as stated in the ServerName configuration directive). Note that
this samples are made to be as generic as possible, but there might be
small variations, depending on your IRCd. For IRCd-specific help with
configuration, read near the end of this section.
The configuration varies depending on the IRCd, but you will probably need
a link block (also called connect block, or C line), a U line (also called
a shared block), and be sure that the IRCd is listening on the given port
in the link block.
First, the C/N lines, that allow Services to link. They also need a
Y:line to work correctly.
Y:27:180:0:0:4000000
C:127.0.0.1:mypass:services.localhost.net::30
N:127.0.0.1:mypass:services.localhost.net::30
"mypass" is the same password you mentioned in the RemoteServer
configuration directive. 127.0.0.1 is the IP from which Services connect
from (linking in localhost is the most efficient way to run Services).
Then, you have to set-up an U:line, that will allow Services to change
channel modes, topics, and much more without being opped in the channel.
U:services.localhost.net:*:*
NOTE: if you have more than one server in your network, this line MUST
be added on ALL servers, or things won't work correctly.
Finally, you'll need to add an H:line, to make the OperServ JUPE command
work correctly.
H:*::Services.LocalHost.Net
Example link configurations can be found in anope.example.conf for some of the
popular IRCds.
Don't forget to /rehash your IRCd to apply changes.
A new trend in ircd configuration is popping all over the place, good
examples are the latest Hybrid, Unreal and Bahamut, which use a more
"readable" form of configuration. For those, use something like:
link services.localhost.net
{
username *;
hostname localhost;
bind-ip *;
port 6667;
hub *;
password-connect "mypass";
password-receive "mypass";
class servers;
};
Note that this block-style configuration files differ heavily, depending
on the IRCd. Consult the interactive link maker (link is below) for more
details on the exact configuration used by your IRCd.
If you're unable to get a link with your IRCd after reading this section,
you might try the interactive link maker, which is located at:
http://anope.org/ilm.php
4) Starting Anope
Go into the directory where binaries were installed (by default, this is
~/services/bin). Type ./services to launch Anope.
~/anope/bin). Type ./anope to launch Anope.
If there are syntax errors in the configuration file they will be
displayed on the screen. Correct them until there are no errors anymore.
A successful startup won't generate any message.
Give Services at least one minute to link to your network, as certain
Give Anope at least one minute to link to your network, as certain
IRCds on some OSes may be really slow for the link process. If nothing
happens after about a minute, it is probably a configuration problem. Try
to launch Anope with ./services -debug -nofork to see any errors that it
to launch Anope with ./anope -debug -nofork to see any errors that it
encounters, and try to correct them.
If you need help to solve errors, feel free to subscribe to the Anope
@@ -182,17 +111,17 @@ Note: You should also read the README and FAQ files!
A crontab entry will allow you to check periodically whether Anope is
still running, and restart it if not.
First rename the example.chk script that is in Anope path (by default,
this is ~/services/data) to services.chk and edit it. You'll need to
modify the CONFIGURATION part of the file. Then ensure that the file is
marked as executable by typing chmod +x services.chk, and try to launch the
First rename the cron.example.sh script that is in Anope path (by default,
this is ~/anope/conf) to cron.sh and edit it. You'll need to
modify the CONFIGURATION part of the file. Then ensure that the file is
marked as executable by typing chmod +x cron.sh, and try to launch the
script to see if it works (Anope must not be running when you do this ;))
When this is done, you'll have to add the crontab entry. Type crontab -e.
This will open the default text editor with the crontab file. Enter the
following (with correct path):
*/5 * * * * /home/ircd/services/data/services.chk >/dev/null 2>&1
*/5 * * * * /home/ircd/anope/conf/cron.sh >/dev/null 2>&1
The */5 at the beginning means "check every 5 minutes". You may replace
the 5 with other another number if you want (but less than 60). Consult
+107 -172
View File
@@ -1,209 +1,144 @@
Installation et instructions d'anope
------------------------------------
Instructions d'installation d'Anope
-----------------------------------
1) Instalation d'anope
2) Mise à jour d'anope
3) Configuration de l'ircd
4) Mise en route de anope
5) Mise en place d'un fichier crontab
1) Installation d'Anope
2) Mettre à jour Anope
3) Configuration de l'IRCd
4) Mettre en route Anope
5) Mettre en place un crontab
Note: Vous devrez également lire les fichiers README et FAQ !
Note : Vous devrez également lire les fichiers README et FAQ !
1) Installation de anope
1) Installation d'Anope
Note importante: il n'est pas recommandé d'utiliser (et même d'installer)
Anope en tant que root.
Utilisez un utilisateur non privilégié,
NOTE IMPORTANTE : il est déconseillé d'utiliser (et même d'installer)
Anope en tant que root. Utilisez un utilisateur non
privilégié. Celui que vous utilisez pour l'IRCd ou
un utilisateur dédié suffira.
La première chose que vous devez faire est d'obtenir le package Anope
(si ce n'est déjà fait). Vous pouvez le trouver ici :
La première chose que vous devez faire est d'obtenir le package Anope (si ce n'est déjà fait).
https://www.anope.org/
Vous pouvez le trouver ici http://www.anope.org/
Anope nécessite cmake pour être compilé. Vous pouvez vérifier si CMake
est déjà installé sur votre système avec la commande :
cmake --version
Si CMake est installé, vous aurez une ligne qui dit quelque chose comme
"cmake version 3.28.3". Si la version est inférieure à 3.20.0 ou si vous
obtenez une erreur disant que la commande n'a pas été trouvée, vous ne
pourrez pas utiliser CMake à moins de l'installer vous-même dans votre
répertoire home. CMake peut être téléchargé ici :
Anope peut être installer de deux façons.
https://cmake.org/download/
1. La méthode recommandée est d'utiliser CMake.
Vous pouvez vérifier si CMake est déjà installé sur votre système en utilisant la
Ensuite, décompressez le package dans votre répertoire home, et allez
dans le répértoire qui vient d'être créé.
commande: cmake --version ( sur votre vps ou dedier etre loggué en root )
Si il y a des modules facultatifs que vous voulez activer comme mysql,
exécuter le script 'extras' pour les activer. Si vous ne savez pas, vous
pouvez les activer plus tard.
Maintenant, tapez ./Config pour lancer le script de configuration. Il
va vous poser quelques questions, et déterminer comment compiler Anope
sur votre système. Si vous ne savez pas comment répondre à une question,
utilisez la valeur par défaut.
Si c'est installé, vous aurez une ligne qui dit quelque chose qui ressemble à
Allez dans le dossier build (cd build) et tapez make et make install.
Ceci va installer tous les fichiers nécessaires dans les dossiers que
vous avez indiqués avec le script Config et régler les permissions des
fichiers. Vous devez vous assurer que le répertoire data n'est pas
accessible par les autres utilisateurs, car des utilisateurs
malveillants pourraient causer des problèmes sur votre réseau, si les
mots de passe ne sont pas chiffrés, ou lire les mémos de tous les
utilisateurs.
«version 2.6 cmake-patch 1".
Allez maintenant dans le répertoire conf (par défaut, ~/anope/conf).
Copiez l'exemple de fichier de configuration (anope.example.conf) en
anope.conf et ouvrez ce dernier avec votre éditeur de texte favori.
Il contient toutes les directives de configuration qu'Anope va utiliser
en démarrant. Lisez attentivement les instructions contenues dans le
fichier. L'utilisation des valeurs par défaut n'est pas toujours
recommandée, et Anope ne fonctionnera probablement pas !
Si la version est inférieure à 2,4 ou si vous obtenez une erreur disant que la commande n'a pas été trouvé,
vous ne serez pas en mesure d'utiliser CMake,
Si vous avez besoin d'aide, vous pouvez aller sur le site
https://forum.anope.org/ ou le canal #anope sur irc.teranova.net.
Fournissez *l'essemble* des erreurs qui apparaîssent, en plus de
toutes informations utiles, comme les versions de votre OS, du
compilateur utilisé et de la librairie C++. Lisez le fichier README
pour plus d'informations.
sauf si vous installez vous-même dans votre répertoire home. CMake
vous pouvez le téléchargé ici > http://www.cmake.org/cmake/resources/software.html
2) Mettre à jour Anope
Pour mettre à jour Anope, suivez simplement les instructions
d'installation décrites dans la section 1. Prenez garde cependant :
Si vous n'arrivez pas à installer (soit en raison du manque d'espace
ou de restrictions par votre fournisseur d'hébergement),
vous pouvez encore utiliser le script de configuration fournis.
Cette option n'est pas recommandée et finira par être retiré, mais il est fourni pour la compatibilité de ces
manque de CMake.
* IMPORTANT : Sauvegardez vos anciennes bases de données !
* Si vous mettez à jour vers une nouvelle version majeure,
recommencez *toujours* toute votre configuration à partir du
fichier anope.example.conf.
3) Configuration de l'IRCd
Anope agit comme un serveur IRC avec des pseudo-clients.
Pour les relier à votre réseau, vous aurez besoin de configurer votre
IRCd pour permettre aux services de se connecter.
Ensuite, décompressez le package dans votre répertoire home, et allez dans le répértoire
qui viens d'être crée.
La configuration dépend de l'IRCd utilisé, mais vous aurez probablement
besoin d'un bloc link (aussi appelé connect block, ou C:line) et un
U:line (aussi appelé shared block). Assurez-vous que l'IRCd écoute
sur le port donné dans le bloc link.
Maintenant, tapez ./Config pour lancer le script de configuration. Il va vous poser
quelques questions, et compiler Anope sur votre système.
Des exemples de configurations de bloc link peuvent être trouvés dans
le fichier anope.example.conf pour certains des IRCd les plus populaires.
Si vous ne savez pas repondre à une question, utilisez la valeur par défaut.
Souvenez-vous de /rehash votre IRCd pour appliquer les changements.
4) Mettre en route Anope
Vous pouvez maintenant taper make pour compiler Anope. S'il ya des erreurs dans la
Makefile, * essayez d'utiliser * gmake au lieu. Si cela ne fonctionne toujours pas, vous (ou
votre fournisseur ) doit installer GNU make. Vous pouvez
le Trouvez sur ftp://prep.ai.mit.edu/pub/gnu/.
Allez dans le répertoire où les fichiers binaires ont été installés
(par défaut, ~/anope/bin). Tapez ./anope pour lancer Anope.
Maintenant, tapez make install (ou gmake install; voir ci-dessus). Cela permet d'installer
tous les fichiers nécessaires dans les chemins que vous avez spécifié dans la configuration
script, et les permissions du fichier de configuration. Vous devez vous assurer que les données
répertoire ne sont pas accessible par d'autres utilisateurs, que des utilisateurs malveillants peuvent
causer des problèmes sur votre réseau, si les mots de passe ne sont pas cryptés, ou de lire
les mémos de tout utilisateur.
S'il y a des erreurs de syntaxe dans le fichier de configuration, elles
seront affichées à l'écran. Corrigez-les jusqu'à ce qu'il n'y en ait
plus. Un démarrage réussi ne générera pas de message.
Si vous voyez des erreurs lors de ce processus, s'il vous plaît nous envoyer un mail avec le * complet *
sortie d'erreur, et n'oubliez pas de mentionner votre OS, compilateur et bibliothèque C + +
versions.
Donnez aux services au moins une minute pour se connecter à votre
réseau, car certains IRCds sur certains systèmes peuvent être très
lents pour le processus de liaison. Si rien ne se passe après environ
une minute, il y a probablement un problème de configuration. Essayez
de lancer Anope en mode debug avec ./anope -debug -nofork pour voir
toutes les erreurs rencontrées et essayez de les corriger.
Maintenant, allez dans le répertoire de données (par défaut, cd ~/services/data). ouvrer exemple.conf
avec votre éditeur de texte favori. Il contient toute la configuration
directives. Anope va l'utiliser au démarrage. Lisez attentivement les instructions contenues dans
le fichier. l'utilisation des valeurs par defauld n'est pas recomment et anope ne risque pas de fonctionner
Si vous avez besoin d'aide, vous devez vous abonner à la mailing list et par courrier Anope
pour se faire aider par d'autres utilisateurs. Voir le fichier README pour plus de
informations.
2) Mise à jour Anope
Si vous avez un fichier .Diff et que vous voulez patcher les ancienne sources Anope avec,
effectuer les opérations suivantes:
* Copiez le fichier .Diff dans le répertoire racine des sources Anope.
* Type de patch-p1 <file.diff
Notez que la mise à jour anope avec un fichier patch n'est pas recommandé.
Vous devez télécharger une nouvelle source propre, car cela vous donnera les meilleurs résultats..
Pour mettre à jour Anope, suivez simplement les instructions d'installation décrites dans
l'article 1. Il y a cependant quelques règles spécifiques:
* IMPORTANT: Sauvegardez vos anciennes bases de données!
* Si vous mettez à jour vers une nouvelle version majeure, toujours redémarrer avec un
fichier de configuration neuve example.conf.
3) Mise en place du IRCd
Ce Services agit comme un serveur IRC avec des pseudo-clients sur elle. Pour les relier à
votre réseau, vous aurez besoin d'ajouter quelques lignes dans le ircd.conf de leur plate-forme
serveur (comme indiqué dans la directive de configuration RemoteServer).
Pour les échantillons ci-dessous, nous allons prendre services.localhost.net que le nom de la
Services (comme indiqué dans la directive de configuration ServerName). Notez que
présente des échantillons sont faites pour être aussi générique que possible, mais il pourrait y avoir
de petites variations, en fonction de votre IRCd. Pour IRCd aide spécifique aux
de configuration, lire près de la fin de cette section.
Tout d'abord, les lignes C / N, qui permettent aux services de crée un lien. Ils ont également besoin d'un
Y: ligne fonctionne correctement.
Y: 27:180:0:0:4000000
C: 127.0.0.1: mypass: services.localhost.net: 30
N: 127.0.0.1: mypass: services.localhost.net: 30
"mot de pass" est le même mot de passe que vous avez mentionné dans le RemoteServer
directive de configuration. 127.0.0.1 est l'adresse IP à partir de laquelle les services se connecterons
à partir de (reliant en localhost est le moyen le plus efficace pour exécuter les services).
Ensuite, vous avez à mettre en place un U:ligne, qui permettra aux services de changer
modes de canal, de sujets, et bien plus encore, sans être op sur le canal.
U: services.localhost.net: *: *
REMARQUE: si vous avez plus d'un serveur dans votre réseau, cette ligne doit
être ajouté sur tous les autres serveurs, où cela ne risque pas de fonctionner correctement.
Enfin, vous aurez besoin d'ajouter un H:ligne, pour permttre la commande OperServ JUPE
de fonctionner correctement.
H:*::Services.LocalHost.Net
Ne pas oublier de /rehash votre IRCd pour appliquer les modifications.
Une nouvelle tendance dans la configuration ircd hybride, Unreal et Bahamut, qui utilisent une approche plus
«Lisibles» sous forme de configuration. Pour ceux, utiliser quelque chose comme:
link services.localhost.net
{
username *;
hostname localhost;
bind-ip *;
port 6667;
hub *;
password-connect "mypass";
password-receive "mypass";
class servers;
};
Notez que ce bloc de fichiers de configuration de style est diffèrent
sur le IRCd. Consultez le fabricant de lien interactif (le lien est ci-dessous) pour plus
détails sur la configuration exacte utilisée par votre IRCd.
Si vous êtes incapable d'obtenir un lien avec votre IRCd après la lecture de cet article,
vous pouvez essayer le fabricant lien interactif, qui est situé au:
http://anope.org/ilm.php
4) A partir Anope
Allez dans le répertoire où les fichiers binaires ont été installés (par défaut, ce n'est
~/ Services/ bin). Tapez. /Services à lancer Anope.
S'il ya des erreurs de syntaxe dans le fichier de configuration, ils seront
affiche sur l'écran. Corrigez-les jusqu'à ce qu'il n'y à plus d'erreur.
Un démarrage réussi ne générera pas de message.
Donner aux services au moins une minute pour se connecté à votre réseau, comme certains
IRCds sur certains OS peut être très lent pour le processus de liaison. Si rien n'arrive après environ une minute,
il y a probablement un problème de configuration. Essayez
de lancer Anope en mode debug ./services-debug-nofork pour voir toutes les erreurs qu'il
rencontres, et d'essayer de les corriger.
Si vous avez besoin d'aide pour résoudre des erreurs, n'hésitez pas à vous abonner à la Anope
liste de diffusion et de poser là. Voir le fichier README pour plus de détails.
Si vous avez besoin d'aide pour résoudre des erreurs, n'hésitez pas à
vous abonner à la liste de diffusion Anope et d'y poser vos question.
Voir le fichier README pour plus de détails.
5) Mettre en place un crontab
Une entrée crontab vous permettra de vérifier périodiquement que Anope est
toujours en cours, et redémarrez-le s'il n'est pas.
Une entrée crontab vous permettra de vérifier périodiquement si Anope
est toujours en cours d'exécution et de le redémarrer s'il n'est pas.
D'abord renommer le script example.chk qui est dans le chemin de Anope (par défaut,
cela est ~/services/data) pour services.chk et le modifier. Vous aurez besoin de
modifier la partie configuration du fichier. Assurez-vous ensuite que le fichier est
marqué comme exécutable en tapant chmod + x services.chk, et essayer de lancer le
script pour voir si cela fonctionne (Anope ne doit pas être en marche lorsque vous faites cela ;))
D'abord renommez le script cron.example.sh qui est dans les dossiers
d'Anope (par défaut, ~/anope/conf) en cron.sh et modifiez-le.
Vous aurez besoin de modifier la partie CONFIGURATION du fichier.
Assurez-vous ensuite que le fichier est marqué comme exécutable en
tapant chmod +x cron.sh et essayez de lancer le script pour voir
si cela fonctionne (Anope ne doit pas être en marche lorsque vous
testez cela ;))
Lorsque cela est fait, vous devrez ajouter l'entrée crontab. Type de crontab-e.
Cela va ouvrir l'éditeur de texte par défaut avec le fichier crontab. Entrez le chemin
suivant (avec le chemin correct):
Lorsque c'est fait, vous devrez ajouter l'entrée crontab. Entrez
crontab -e. Cela va ouvrir l'éditeur de texte par défaut avec le
fichier crontab. Entrez la ligne suivante (avec le chemin correct) :
* / 5 * * * * /home/ircd/services/data/services.chk> /dev/nul 2> & 1
*/5 * * * * /home/ircd/anope/conf/cron.sh > /dev/null 2>&1
Le * / 5 au commencement signifie "vérifier toutes les 5 minutes". Vous pouvez remplacer
le 5 avec un autre numéro si vous voulez (mais moins de 60). Consulter
pages de manuel de votre système pour plus de détails sur la syntaxe de la crontab
fichier. Intéressant pages de manuel sont crontab (5), crontab (1) et cron (8).
Le */5 au début signifie "vérifier toutes les 5 minutes". Vous pouvez
remplacer le 5 par un autre numéro si vous voulez (mais moins de 60).
Consultez les pages de manuel de votre système pour plus de détails sur
la syntaxe du fichier crontab. Les pages de manuel intéressantes sont
crontab(5), crontab(1) et cron(8).
Sauvegarder et quitter, et il est installé.
Sauvegardez, quittez, et c'est installé !
-202
View File
@@ -1,202 +0,0 @@
How To Add IRCd Support
-----------------------
1) Files to Edit
2) The Code
3) The IRCDVar struct
4) Modes
5) Functions / Events
6) CAPAB/PROTOCTL
7) IRCDProto Class
1) Files to Edit
When preparing to add supprt to Anope for your IRCd, you need to edit
the following files
A) Make a copy of the .cpp file of the IRCd that matches the IRCd that
you are attempting to add support for best.
B) Add your IRCd into the supported IRCds in example.conf
2) The Code
Here is where the code of the .cpp file comes in. Be prepared to spend at
least an hour, if not longer, going over the code and getting it right;
Especially if you are setting up an ircd that is completely different
than the one you used as a base. This section covers the majority of the
code that is in use.
The first bit of code you will face is the IRCDVar structure, This is one
of two structs which holds your IRCd information; This allows you to quickly
setup your specific ircd.
IRCDVar myIrcd[] = { };
This struct contains your basic IRCd functions. Your base source file has
the list of all available variables; note that you should not swap any
around, or you will break stuff. Here is a brief description of the usage
of each.
1) Name: This member tells Anope about the IRCD's name. It may contain
text about it's name and version. This is used to identify the
build on startup.
2) Pseudo Client Mode: This is the user mode set by Anope on all BotServ
bots. Normally you want this to be a some form of
service or bot flag; you can use + for no mode at
all.
3) Max Channelmode Symbols: This is the total number of possible channel
modes that can appear before a nick. Do
remember to count each possible mode, so +ov
is 2.
4) SVSNICK: Can the ircd use SVSNICK to change some ones nick? Otherwise,
KILL is used. Use 1 for yes, 0 for no.
5) VHOST: Can a user's host be changed on the fly? Enabling this allow
HostServ online. Use 1 for yes, 0 for no.
6) SNLINE: Does the IRCd support realname (geocs) bans? Use 1 for yes,
0 for no.
7) SQLINE: Does the IRCd support nick bans? Use 1 for yes, 0 for no.
8) SZLINE: Does the IRCd support SZLINES? Use 1 for yes, 0 for no.
10) Join to Message: Services must join a channel to send any message to
that channel (cannot override +n). Use 1 for yes,
0 for no.
11) SQline Channels: The IRCd's supports banning channel names via
SQLINES. Use 1 for yes, 0 for no.
12) Quit On Kill: When we (SVS)KILL a user, does the IRCd send back a
QUIT message for that user? Use 1 for yes, 0 for no.
13) SVSMODE UNBAN: We can use SVSMODE to unban hosts from a channel. Use
1 for yes, 0 for no.
14) Reverse: We can do a reverse check when unbanning. For use with
DreamForge based IRCd's. Use 1 for yes, 0 for no.
15) vIdent: Support for including a user's ident in their vHost. Use
1 for yes, 0 for no.
16) SVSHOLD: Support for temporarily 'holding' a nick, instead of using
a nick enforcer client. Use 1 for yes, 0 for no.
17) TS on MODE: We need to send a timestamp when modes are being changed.
Use 1 for yes, 0 for no.
18) Umode: We can use OperServ to change a user's mode. Use 1 for yes,
0 for no.
19) OMODE: We can use OperServ to give some user a temporary O:LINE.
Use 1 for yes, 0 for no.
20) No Knock Requires +i: Does the No Knock channel mode require invite
only channels? Use 1 for yes, 0 for no.
21) SVSMODE UCMODE: Can we clear user channel modes with SVSMODE? Use
1 for yes, 0 for no.
22) SGline Enforce: Does the IRCd enforce SNLINES for us or do we need to
do so? Use 1 for yes, 0 for no.
23) TS6: Does the IRCd support TS6? Use 1 for yes, 0 for no.
24) Global TLD Prefix: Prefix used to send global messages, should probably
be "$"
25) Max Modes: The max number of mode changes we can send in one line
3) Modes
Anope is told about modes in the protocol module.
For the most part, the syntax for adding channel and user modes are:
ModeManager::AddUserMode(new UserMode(UMODE_NETADMIN, "UMODE_NETADMIN", 'N'));
Where 'N' is the char for the mode, and UMODE_NETADMIN shows what the
mode does. Or:
ModeManager::AddChannelMode(new ChannelMode(CMODE_BLOCKCOLOR, "CMODE_BLOCKCOLOR", 'c'));
Where 'c' is the char for the mode and CMODE_BLOCKCOLOR shows what
the mode does
A full list of valid mode names for the second param can be found
in services.h in the enum for ChannelModeName and UserModeName
If necessary, you can add additional modes to this list.
Adding simple modes with parameters is similar, instead adding a
'new ChannelMode', use 'new ChannelModeParam', set the third optional
arg of ChannelModeParam to false if the param should NOT be sent when unsetting
it. Eg:
ModeManager::AddChannelMode(new ChannelModeParam(CMODE_JOINFLOOD, "CMODE_JOINFLOOD", 'j', true));
Anope will internally track the params, and they can be retrieved through
Channel::GetParam();
If you want to make param validity checking for a mode, you must create a new
class which inherits from ChannelModeParam and overload the IsValid function.
Modes CMODE_OPERONLY, CMODE_ADMINONLY, and CMODE_REGISTERED already exist
internally as classes, to overload the CanSet function to disable non opers
from mlocking (or in CMODE_REGISTERED's case, anyone) from setting them.
This should be added like:
ModeManager::AddChannelMode(new ChannelModeOper('O'));
4) Functions and Events
A brief word about functions and events. All events are captured by creating a Message struct
with the name of the message and the callback function:
Message my_message("MESSAGE", do_my_messsage);
Each message should have a message handler if its important enough to be
processed by services. All event functions should be formed like this:
bool do_my_message(const Anope::string &source, const std::vector<Anope::string> &params)
{
return true;
}
They will receive the source; this can be empty at times depending on the
event. Next, params holds the arguments for the event. Events are likely to
pass to various upper level event handlers; see the previous ircd source for
how they handle these events.
5) CAPAB/PROTOCTL
Most IRCDs send a CAPAB or PROTOCTL line so that they can work out what
the other end of the connection is capable of doing. The protocol module should
handle all of these without the cores knowledge with the exception of the following:
--------------------------------------------------------------------------
Define | Description
----------------|---------------------------------------------------------
CAPAB_NOQUIT | NOQUIT protocol support
CAPAB_TSMODE | Chanmodes are timestamped
CAPAB_UNCONNECT | UNCONNECT protocol support
CAPAB_QS | Quitstorm - same as NOQUIT
You can override the default OnCapab method in IRCdMessage if required.
6) IRCDProto Class
The IRCDProto class is set up like:
class MyIRCdProto : public IRCDProto { } ircdproto;
And told to Anope through the
pmodule_ircd_proto(&ircd_proto);
function.
This is used for sending out specific messages from Anope to your IRCd.
A list of all of the valid function names to overload and their args
are in services.h. If the protocol module you are editing is similar enough
to the IRCd you are adding support for, many of these probably won't need to
be changed.
+32 -15
View File
@@ -1,46 +1,63 @@
Anope Mutli Language Support
Anope Multi Language Support
----------------------------
1) Building Anope with gettext support
2) Adding a new language
3) Using languages with modules
4) Updating a language file
1) Building Anope with gettext support
To build Anope with gettext support, gettext and its development libraries must be installed on the system.
Anope does not require locales to be installed or enabled on the system, but does require the locales-all
package on Debian and Debian based systems.
Building Anope on Windows with gettext support is explained in docs/WIN32.txt
On Debian-based systems install the locales-all package.
On RHEL-based systems run `yum list glibc-langpack-*` and install the languages you want to enable.
If you have already built Anope you will need to delete the build directory and rebuild from scratch.
Building Anope on Windows with gettext support is explained in docs/WIN32.md
2) Adding a new language
Anope uses gettext (http://www.gnu.org/software/gettext/) to translate messages for users. To add a new language
Anope uses gettext (https://www.gnu.org/software/gettext/) to translate messages for users. To add a new language
install gettext and run `msginit -l language -o anope.language.po -i anope.pot`. For example if I was translating to
Spanish I could run `msginit -l es_ES -o anope.es_ES.po -i anope.pot`. Open the newly generating .po file and start
translating. Once you are done simply rerun ./Config; make && make install and add the language to your services.conf.
Note that on Windows it is not quite this simple, windows.cpp must be edited and Anope recompiled and restarted.
translating. Once you are done simply rerun ./Config; make && make install and add the language to your anope.conf.
Poedit (http://www.poedit.net/) is a popular po file editor, and we recommend using it or another editor designed to edit
Poedit (https://poedit.net/) is a popular po file editor, and we recommend using it or another editor designed to edit
po files (especially on Windows).
If you have finished a language file translation and you want others to use it, please send it to team@anope.org
(don't forget to mention clearly your (nick)name, your e-mail and the language name). You'll of course get full credit for it.
There are several control characters within the messages. These are mostly IRC formatting codes (https://modern.ircdocs.horse/formatting)
but 0x1B is special to Anope and is used to prevent the automatic linewrapper from breaking messages in the middle of
text that should not be split (e.g. commands). Your editor may not show these so be careful you don't delete them!
NOTE: There is no guarantee we will use your work so please do not be offended if we say no thanks.
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 langages with modules
3) Using languages with modules
Module authors can easially add the ability to have their modules translated by adding _() around the strings they
Module authors can easily add the ability to have their modules translated by adding _() around the strings they
want translated (messages to the user, etc).
If you want to translate a module someone has made, first generate a .pot file if there isn't one already using
`xgettext -s -d modulename -o modulename.pot --from-code=utf-8 modulename.cpp`.
`xgettext -s -d modulename -o modulename.pot --from-code=utf-8 --keyword --keyword=_ modulename.cpp`.
The .pot file is a template of all of the language strings extracted from the source file.
Next, run msginit on the .pot file with
`msginit -l language -o modulename.language.po -i modulename.pot`.
Translate the new .po file and rerun ./Config; make && make install.
All .po and .pot files should be placed in modules/language/third. Additionally an update script is provided there
All .po and .pot files should be placed in modules/third/language. Additionally an update script is provided there
that will create .pot files and merge any changes to it with existing .po files.
4) Updating a language file
Poedit (https://poedit.net/) is a popular po file editor, and we recommend using it or another editor designed to edit
po files (especially on Windows).
Before editing the relevant file in languages/, run `update.sh` in the languages/ folder, i.e. `cd` to it and run
./update.sh
This will update the language file to contain all strings that need a translation.
Then commit only the changed .po files in git.
+22 -23
View File
@@ -1,12 +1,12 @@
GNU GENERAL PUBLIC LICENSE
Version 2, June 1991
GNU GENERAL PUBLIC LICENSE
Version 2, June 1991
Copyright (C) 1989, 1991 Free Software Foundation, Inc.
675 Mass Ave, Cambridge, MA 02139, USA
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
Preamble
The licenses for most software are designed to take away your
freedom to share and change it. By contrast, the GNU General Public
@@ -15,7 +15,7 @@ software--to make sure the software is free for all its users. This
General Public License applies to most of the Free Software
Foundation's software and to any other program whose authors commit to
using it. (Some other Free Software Foundation software is covered by
the GNU Library General Public License instead.) You can apply it to
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
@@ -55,8 +55,8 @@ patent must be licensed for everyone's free use or not licensed at all.
The precise terms and conditions for copying, distribution and
modification follow.
GNU GENERAL PUBLIC LICENSE
GNU GENERAL PUBLIC LICENSE
TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION
0. This License applies to any program or other work which contains
@@ -110,7 +110,7 @@ above, provided that you also meet all of these conditions:
License. (Exception: if the Program itself is interactive but
does not normally print such an announcement, your work based on
the Program is not required to print an announcement.)
These requirements apply to the modified work as a whole. If
identifiable sections of that work are not derived from the Program,
and can be reasonably considered independent and separate works in
@@ -168,7 +168,7 @@ access to copy from a designated place, then offering equivalent
access to copy the source code from the same place counts as
distribution of the source code, even though third parties are not
compelled to copy the source along with the object code.
4. You may not copy, modify, sublicense, or distribute the Program
except as expressly provided under this License. Any attempt
otherwise to copy, modify, sublicense or distribute the Program is
@@ -225,7 +225,7 @@ impose that choice.
This section is intended to make thoroughly clear what is believed to
be a consequence of the rest of this License.
8. If the distribution and/or use of the Program is restricted in
certain countries either by patents or by copyrighted interfaces, the
original copyright holder who places the Program under this License
@@ -255,7 +255,7 @@ make exceptions for this. Our decision will be guided by the two goals
of preserving the free status of all derivatives of our free software and
of promoting the sharing and reuse of software generally.
NO WARRANTY
NO WARRANTY
11. BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY
FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN
@@ -277,9 +277,9 @@ YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER
PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE
POSSIBILITY OF SUCH DAMAGES.
END OF TERMS AND CONDITIONS
Appendix: How to Apply These Terms to Your New Programs
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
@@ -291,7 +291,7 @@ convey the exclusion of warranty; and each file should have at least
the "copyright" line and a pointer to where the full notice is found.
<one line to give the program's name and a brief idea of what it does.>
Copyright (C) 19yy <name of author>
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
@@ -303,16 +303,15 @@ the "copyright" line and a pointer to where the full notice is found.
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software
Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
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) 19yy name of author
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.
@@ -329,11 +328,11 @@ necessary. Here is a sample; alter the names:
Yoyodyne, Inc., hereby disclaims all copyright interest in the program
`Gnomovision' (which makes passes at compilers) written by James Hacker.
<signature of Ty Coon>, 1 April 1989
Ty Coon, President of Vice
<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 Library General
library. If this is what you want to do, use the GNU Lesser General
Public License instead of this License.
+48 -44
View File
@@ -12,7 +12,7 @@ Anope Modules
1) Introduction
Anope 1.6 onwards supports external modules. External modules are pieces
Anope supports external modules. External modules are pieces
of code that can be attached to a running Anope process dynamically. These
modules can serve several purposes, and perform all kind of operations to
enhance your network.
@@ -22,16 +22,16 @@ Anope Modules
1. If modules are supported by your system, they will be configured
automatically when you run ./Config. The modules will be installed
to the modules directory in your data path (by default this will
be ~/services/modules).
be ~/anope/data/modules).
Note: you might need to run "make distclean" prior to running ./Config
2. Compile Anope as usual using ./Config. The "make" process will now
compile module support into Anope, and compile the default sample
modules, and any other module located in the modules folder or any
of its sub-directories, eg. modules/extra.
2. Compile Anope as usual. The (g)make process will now compile module
support into Anope, and compile the default sample modules, and/or
any other module located on the modules folder ("src/modules/").
3. Install Anope as usual. The install process will place the compiled
modules in their runtime location, making them available for loading.
3. Install Anope as usual. The "make install" process will place the
compiled modules in their runtime location, making them available
for loading.
4. Start or restart services to make use of the new Anope executable.
Note that you do not need to restart to load new or changed modules,
@@ -42,59 +42,64 @@ Anope Modules
All module manipulation commands are done through OperServ. These are:
MODLOAD Load a module
MODUNLOAD Un-Load a module
MODRELOAD Reload a module
MODUNLOAD Unload a module
MODLIST List loaded modules
MODINFO Info about a loaded module
These commands available to Service Roots only.
Access to the above commands require the operserv/modload and modlist
permissions. Refer to operserv.example.conf.
You can also load (and pre-load) Modules automatically by loading them
on startup. To do so, edit your services.conf file and change the values
of "ModuleAutoload" and "ModuleDelayedAutoload" to include the modules
you want to load every time Anope starts.
on startup. To do so, edit any one of the configuration files (you may
want to use modules.conf for third-party/extra modules, or a config
file relevant to the *Serv your module operates on, eg. hostserv.conf),
and use the following method to load a module on startup or reload:
module { name="hs_modname" }
4) Usage Example
/msg OperServ modload hs_moo
*** Global -- from OperServ: dengel loaded module hs_moo
-OperServ- Module hs_moo loaded
/msg OperServ modload ns_identify
-OperServ- Module ns_identify loaded
/msg OperServ modinfo hs_moo
-OperServ- Module: hs_moo Version: 1.1 Author: Anope loaded: Mar 21 10:54:37 2004 CLT
-OperServ- Providing command: /msg HostServ moo
/msg OperServ modinfo ns_identify
-OperServ- Module: ns_identify Version: 1.9.7 Author: Anope loaded: Jun 17 18:43:08 2012 BST (2 minutes ago)
-OperServ- Providing service: nickserv/identify
-OperServ- Command ID on NickServ is linked to nickserv/identify
-OperServ- Command IDENTIFY on NickServ is linked to nickserv/identify
/msg HostServ moo
-HostServ- MOO! - This command was loaded via a module!
/msg OperServ modreload ns_identify
-OperServ- Module ns_identify reloaded
/msg OperServ modunload hs_moo
*** Global -- from OperServ: dengel unloaded module hs_moo
-OperServ- Module hs_moo unloaded
/msg OperServ modunload ns_identify
-OperServ- Module ns_identify unloaded
/msg HostServ moo
-HostServ- Unknown command moo. "/msg HostServ HELP" for help.
/msg NickServ IDENTIFY
-NickServ- Unknown command identify. "/msg NickServ HELP" for help.
NOTE: Doing the above, with the command still existing in a config file,
will result in a log message, similar to the following:
<@NickServ> Command IDENTIFY exists on me, but its service nickserv/identify was not found!
* Note that the name of the module file is "hs_moo.c", yet we load
and reference the module as "hs_moo" only. By naming convention
* Note that the name of the module source file is "ns_identify.cpp", yet we
load and reference the module as "ns_identify" only. By naming convention
modules have an abbreviated service name they attach to (hs_ for
HostServ, cs_ for ChanServ, etc) followed by a descriptive keyword.
5) More Modules
Anope ships with three sample modules that only illustrates some of the
implemented module capabilities. They don't really do much or anything
useful.
You can download more useful modules from http://modules.anope.org/. Just
grab the module file (usually with a .c extension). Place the module
file in your modules (src/modules) folder; the same folder that contains
both hs_moo.c and catserv.c module files.
You can download more useful modules from https://modules.anope.org/. Just
grab the module file (usually with a .cpp extension). Place the module
file in your modules (anope-1.9.x/modules/third) folder; although any of
the other folders within the modules directory will work.
The new modules need to be compiled and installed before you can make
use of them:
1. Make sure you're in the main source directory. (usually anope-1.X.XX/)
2. Run `make modules` to compile any new or changed modules.
3. Run `make install` to install the modules.
2. Run ./Config to find and configure modules, then `cd build`.
3. Run `make` to compile Anope, and any modules.
4. Run `make install` to copy the compiled binaries to the ~/anope/
directory.
You can now use /msg OperServ MODLOAD to load the new modules.
@@ -106,19 +111,18 @@ Anope Modules
Use modules at your own risk, and make sure you get them from a
reputable source. You might get module support by contacting the module
author, posting on our online forum, or maybe on our #anope channel
at /server irc.anope.org.
at /server irc.teranova.net.
7) Information for Developers
There are a number of useful documents on the Anope Wiki. The Anope Wiki
can be reached at:
* http://wiki.anope.org/
* https://wiki.anope.org/
8) Modules Repository
You can find modules at http://modules.anope.org
You can find modules at https://modules.anope.org/
These modules are 3rd party and as such are not supported by the Anope Team.
Contact the Module Author directly with problems, not the Anope Team.
-7
View File
@@ -1,7 +0,0 @@
Highlighted News in Anope 1.9
=============================
* Added in live updating SQL and the ability to execute commands through SQL
* Re-designed configuration file
* Code refresh / rewrite into C++
+32 -28
View File
@@ -1,16 +1,14 @@
Anope -- a set of IRC services for IRC networks
-----------------------------------------------
Anope is 2003-2012 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>.
This program is free but copyrighted software; see the file COPYING for
details.
Information about Anope may be found at http://www.anope.org/
Information about Epona may be found at http://www.epona.org/
Information about Services may be found at http://www.ircservices.esper.net/
Information about Anope may be found at https://www.anope.org/
Table of Contents
-----------------
@@ -19,7 +17,7 @@ Table of Contents
3) Installation
4) Command Line Options
5) Messages Translation
6) Contact and Mailing List
6) Contact
1) Credits
@@ -94,7 +92,7 @@ Table of Contents
* Lee Holmes <lethality@anope.org>
* Lucas Nussbaum <lucas@lucas-nussbaum.net>
* Mark Summers <mark@goopler.net>
* Matthew Beeching <jobe@invictachat.net>
* Matthew Beeching <jobe@mdbnet.co.uk>
* Naram Qashat <cyberbotx@anope.org>
* Phil Lavin <phil@anope.org>
* Pieter Bootsma <geniusdex@anope.org>
@@ -107,18 +105,22 @@ Table of Contents
Anope Translations:
* GeniusDex <geniusdex@anope.org> (nl.l)
* Kein <kein-of@yandex.ru> (ru.l)
* Maik Funke <Han@mefalcon.org> (de.l)
* Gabriel Acevedo H. <drstein@anope.org> (es.l)
* Janos Kapitany <sarkanyka@cjbchat.hu> (hun.l)
* Szymon S'wierkosz <szymek@adres.pl> (pl.l)
* Christopher N. <saka@epiknet.org> (fr.l)
* Yusuf Kurekci <ysfm.20@gmail.com> (tr.l)
* Robby <robby@chatbelgie.be> (nl_NL)
* Kein <kein-of@yandex.ru> (ru_RU)
* Maik Funke <Han@mefalcon.org> (de_DE)
* Isaac Fontal <i_fontal@hotmail.com> (es_ES)
* Janos Kapitany <sarkanyka@cjbchat.hu> (hu_HU)
* Szymon S'wierkosz <szymek@adres.pl> (pl_PL)
* Christopher N. <saka@epiknet.org> (fr_FR)
* Yusuf Kurekci <ysfm.20@gmail.com> (tr_TR)
Anope Web panel:
* Denis M. (Phr33d0m) <god@politeia.in>
2) Presentation
Anope is a set of Services for IRC networks that allows users to manage
Anope is a set of services for IRC networks that allows users to manage
their nicks and channels in a secure and efficient way, and administrators
to manage their network with powerful tools.
@@ -158,17 +160,19 @@ Table of Contents
they log on, to set modes and to kick users from any channel, to
send notices quickly to the entire network, and much more!
* HostServ, a neat service that allows users to show custom vHosts
* HostServ, a neat service that allows users to show custom vhosts
(virtual hosts) instead of their real IP address; this only works
on daemons supporting ip cloaking, such as UnrealIRCd.
Anope currently works with:
* Bahamut 1.4.27 or later (including 1.8)
* InspIRCd 1.1, 1.2, or 2.0
* Ratbox 2.0.6 or later
* UnrealIRCd 3.2 or later
* InspIRCd 4 or later
* ircd-hybrid 8.2.34 or later
* ircd-ratbox 3 or later
* ngIRCd 19.2 or later
* Plexus 3 or later
* Solanum (all versions)
* UnrealIRCd 6 or later
Anope could also work with some of the daemons derived by the ones listed
above, but there's no support for them if they work or don't work.
@@ -195,10 +199,10 @@ Table of Contents
--version Display the version of Anope
--nothird Do not load the non-core modules specified
--protocoldebug Debug each incoming message after protocol parsing
--support Used for support, same as -debug -nofork -nothird
--support Used for support, same as --debug --nofork --nothird
Upon starting, Anope will parse its command-line parameters then
(assuming the -nofork option is not given) detach itself and run in the
(assuming the --nofork option is not given) detach itself and run in the
background. If Anope encounters a problem reading the database files or
cannot connect to its uplink server, it will terminate immediately;
otherwise, it will run until the connection is terminated (or a QUIT,
@@ -220,7 +224,7 @@ Table of Contents
the log file; if you send a bug report, PLEASE include an excerpt from
the log file WITH DEBUGGING ACTIVE; we cannot emphasize enough how
important this is to tracking down problems. (You can also enable
debugging while Services is running using OperServ's SET DEBUG command.)
debugging while Anope is running using OperServ's SET DEBUG command.)
If you repeat use --debug=<level>, the debugging level will be increased,
which provides more detailed information but may also slow Anope down
considerably and make the log file grow dramatically faster. In general,
@@ -235,19 +239,19 @@ Table of Contents
6) Contact
For announcements and discussions about Anope, please visit our
Portal and Forums at http://www.anope.org/ -- make sure you register
Portal and Forums at https://www.anope.org/ -- make sure you register
yourself to get full benefits.
If you read the documentation carefully, and didn't find the answer to
your question, feel free to post on the website forums or join our irc
channel (irc.anope.org #anope). Once you join our Support channel be as
channel (irc.teranova.net #anope). Once you join our Support channel be as
precise as possible when asking a question, because we have no extraordinary
powers and can't guess things if they aren't provided.
powers and can't guess things if they aren't provided.
The more precise you are the sooner you'll be likely to get an answer.
If you think you found a bug, add it to the bug tracking system
(http://bugs.anope.org) and - again - be as precise as possible. Also say
whether the bug happens always or under what circumstances, and anything
(https://github.com/anope/anope/issues) and - again - be as precise as possible.
Also say whether the bug happens always or under what circumstances, and anything
that could be useful to track your bug down. If you wrote a patch, send
it over. :)
+270
View File
@@ -0,0 +1,270 @@
// SPDX-License-Identifier: CC0-1.0
"use strict";
/** Implements methods for accessing an Anope JSON-RPC server. */
class AnopeRPC {
/**
* Initializes a new AnopeRPC instance with the specified RPC host.
*
* @param {string} host The RPC host base URL.
* @param {string} token The bearer token for authorizing with the RPC interface.
*/
constructor(host, token = "") {
this.host = host;
this.token = token;
}
/**
* Executes an arbitrary RPC query.
*
* @param {string} method The name of the method to execute.
* @param {...*} params The parameters pass to the method.
* @returns {*} The result of the RPC query.
*/
async run(method, ...params) {
const body = JSON.stringify({
"jsonrpc": "2.0",
"method": method,
"params": params.map((p) => p.toString()),
"id": Math.random().toString(36).slice(2)
});
const headers = new Headers();
if (this.token) {
headers.append("Authorization", `Bearer ${btoa(this.token)}`);
}
const response = await fetch(this.host, {
method: 'POST',
headers: headers,
body: body
});
if (!response.ok) {
throw new Error(`HTTP returned ${response.status}`)
}
const json = await response.json();
if ("error" in json) {
throw new Error(`JSON-RPC returned ${json.error.code}: ${json.error.message}`)
}
if ("result" in json) {
return json.result;
}
return null;
}
/**
* Retrieves a list of accounts.
*
* Requires the rpc_data module to be loaded.
*
* @param {string} detail The level of detail to request.
* @returns {(array|object)} A list of accounts.
*/
listAccounts(detail = "name") {
return this.run("anope.listAccounts", detail);
}
/**
* Retrieves information about the specified account.
*
* Requires the rpc_data module to be loaded.
*
* @param {string} name The name of the account.
* @returns {object} An object containing information about the account.
*/
account(name) {
return this.run("anope.account", name);
}
/**
* Retrieves a list of channels.
*
* Requires the rpc_data module to be loaded.
*
* @param {string} detail The level of detail to request.
* @returns {(array|object)} A list of channels.
*/
listChannels(detail = "name") {
return this.run("anope.listChannels", detail);
}
/**
* Retrieves information about the specified channel.
*
* Requires the rpc_data module to be loaded.
*
* @param {string} name The name of the channel.
* @returns {object} An object containing information about the channel.
*/
channel(name) {
return this.run("anope.channel", name);
}
/**
* Retrieves a list of services operators.
*
* Requires the rpc_data module to be loaded.
*
* @param {string} detail The level of detail to request.
* @returns {(array|object)} A list of services operators.
*/
listOpers(detail = "name") {
return this.run("anope.listOpers", detail);
}
/**
* Retrieves information about the specified services operator.
*
* Requires the rpc_data module to be loaded.
*
* @param {string} name The name of the services operator.
* @returns {object} An object containing information about the services operator.
*/
oper(name) {
return this.run("anope.oper", name);
}
/**
* Retrieves a list of servers.
*
* Requires the rpc_data module to be loaded.
*
* @param {string} detail The level of detail to request.
* @returns {(array|object)} A list of servers.
*/
listServers(detail = "name") {
return this.run("anope.listServers", detail);
}
/**
* Retrieves information about the specified server.
*
* Requires the rpc_data module to be loaded.
*
* @param {string} name The name of the server.
* @returns {object} An object containing information about the server.
*/
server(name) {
return this.run("anope.server", name);
}
/**
* Retrieves a list of users.
*
* Requires the rpc_data module to be loaded.
*
* @param {string} detail The level of detail to request.
* @returns {(array|object)} A list of users.
*/
listUsers(detail = "name") {
return this.run("anope.listUsers", detail);
}
/**
* Retrieves information about the specified user.
*
* Requires the rpc_data module to be loaded.
*
* @param {string} nick The nick of the user.
* @returns {object} An object containing information about the user.
*/
user(nick) {
return this.run("anope.user", nick);
}
/**
* Sends a message to every user on the network.
*
* Requires the rpc_message module to be loaded.
*
* @param {...*} messages One or more messages to send.
*/
messageNetwork(...messages) {
return this.run("anope.messageNetwork", ...messages);
}
/**
* Sends a message to every user on the specified server.
*
* Requires the rpc_message module to be loaded.
*
* @param {string} name The name of the server.
* @param {...*} messages One or more messages to send.
*/
messageServer(server, ...messages) {
return this.run("anope.messageServer", server, ...messages);
}
/**
* Sends a message to the specified user.
*
* Requires the rpc_message module to be loaded.
*
* @param {string} source The source pseudoclient to send the message from.
* @param {string} target The target user to send the message to.
* @param {...*} messages One or more messages to send.
*/
messageUser(source, target, ...messages) {
return this.run("anope.messageUser", source, target, ...messages);
}
/**
* Checks whether the specified credentials are valid.
*
* Requires the rpc_user module to be loaded.
*
* @param {string} account A nickname belonging to the account to check.
* @param {string} password The password for the specified account.
* @returns {object} An object containing basic information about the account.
*/
checkCredentials(account, password) {
return this.run("anope.checkCredentials", account, password);
}
/**
* Identifies an IRC user to the specified account.
*
* Requires the rpc_user module to be loaded.
*
* @param {string} account Either an account identifier or nickname belonging to the account to
* identify to.
* @param {string} password The nickname of the IRC user to identify to the account.
*/
identify(account, user) {
return this.run("anope.identify", account, user);
}
/**
* Lists all commands that exist on the network.
*
* Requires the rpc_user module to be loaded.
*
* @param {...*} services The nicknames of the services to list commands for.
* @returns {object} An object containing information about the available commands.
*/
listCommands(...services) {
return this.run("anope.listCommands", ...services);
}
/**
* Lists all commands that exist on the network.
*
* Requires the rpc_user module to be loaded.
*
* @param {string} account If non-empty then the account to execute the command as.
* @param {string} service The service which the command exists on.
* @param {...*} command The the command to execute and any parameters to pass to it.
* @returns {object} An object containing information about the available commands.
*/
command(account, service, ...command) {
return this.run("anope.command", account, service, ...command);
}
}
/*
const arpc = new AnopeRPC("http://127.0.0.1:8080/jsonrpc");
arpc.listServers("full").then(servers => {
console.log(servers);
}).catch (error => {
console.log(error);
});
*/
+242
View File
@@ -0,0 +1,242 @@
# SPDX-License-Identifier: CC0-1.0
require "base64"
require "json"
require "net/http"
# Implements methods for accessing an Anope JSON-RPC server.
class AnopeRPC
# The RPC host base URL.
attr_accessor :host
# The bearer token for authorizing with the RPC interface.
attr_accessor :token
# Initializes a new AnopeRPC instance with the specified RPC host.
#
# @param host [String] The RPC host base URL.
# @param token [String] The bearer token for authorizing with the RPC interface.
def initialize(host, token = nil)
@host = URI(host)
@token = token
end
# Executes an arbitrary RPC query.
#
# @param method [String] The name of the method to execute.
# @param params [Object] The parameters pass to the method.
# @return [Object] The result of the RPC query.
private def run(method, *params)
body = {
jsonrpc: "2.0",
method: method,
params: params.map(&:to_s),
id: rand(36**16).to_s(36)
}.to_json
headers = {}
headers["Authorization"] = "Bearer #{Base64.strict_encode64(@token)}" if @token
response = Net::HTTP.post(@host, body, headers)
raise "HTTP returned #{response.status}" unless response.is_a?(Net::HTTPSuccess)
json = JSON.parse(response.body, symbolize_names: true)
raise "JSON-RPC returned #{json[:error][:code]}: #{json[:error][:message]}" if json.key?(:error)
json.dig(:result)
end
# Retrieves a list of accounts.
#
# Requires the rpc_data module to be loaded.
#
# @param detail [Symbol] detail The level of detail to request.
# @return [Array] If the detail level is set to :name then an array of account names.
# @return [Hash] If the detail level is set to :full then a hash of information about the
# accounts.
def list_accounts(detail = :name)
self.run("anope.listAccounts", detail)
end
# Retrieves information about the specified account.
#
# Requires the rpc_data module to be loaded.
#
# @param name [String] The name of the account.
# @return [Hash] A hash containing information about the account.
def account(name)
self.run("anope.account", name)
end
# Retrieves a list of channels.
#
# Requires the rpc_data module to be loaded.
#
# @param detail [Symbol] detail The level of detail to request.
# @return [Array] If the detail level is set to :name then an array of channel names.
# @return [Hash] If the detail level is set to :full then a hash of information about the
# channels.
def list_channels(detail = :name)
self.run("anope.listChannels", detail)
end
# Retrieves information about the specified channel.
#
# Requires the rpc_data module to be loaded.
#
# @param name [String] The name of the channel.
# @return [Hash] A hash containing information about the channel.
def channel(name)
self.run("anope.channel", name)
end
# Retrieves a list of services operators.
#
# Requires the rpc_data module to be loaded.
#
# @param detail [Symbol] detail The level of detail to request.
# @return [Array] If the detail level is set to :name then an array of services operator names.
# @return [Hash] If the detail level is set to :full then a hash of information about the
# services operators.
def list_opers(detail = :name)
self.run("anope.listOpers", detail)
end
# Retrieves information about the specified services operator.
#
# Requires the rpc_data module to be loaded.
#
# @param name [String] The name of the services operator.
# @return [Hash] A hash containing information about the services operator.
def oper(name)
self.run("anope.oper", name)
end
# Retrieves a list of servers.
#
# Requires the rpc_data module to be loaded.
#
# @param detail [Symbol] detail The level of detail to request.
# @return [Array] If the detail level is set to :name then an array of server names.
# @return [Hash] If the detail level is set to :full then a hash of information about the
# servers.
def list_servers(detail = :name)
self.run("anope.listServers", detail)
end
# Retrieves information about the specified server.
#
# Requires the rpc_data module to be loaded.
#
# @param name [String] The name of the server.
# @return [Hash] A hash containing information about the server.
def server(name)
self.run("anope.server", name)
end
# Retrieves a list of users.
#
# Requires the rpc_data module to be loaded.
#
# @param detail [Symbol] detail The level of detail to request.
# @return [Array] If the detail level is set to :name then an array of user nicknames.
# @return [Hash] If the detail level is set to :full then a hash of information about the
# users.
def list_users(detail = :name)
self.run("anope.listUsers", detail)
end
# Retrieves information about the specified user.
#
# Requires the rpc_data module to be loaded.
#
# @param name [String] The name of the user.
# @return [Hash] A hash containing information about the user.
def user(name)
self.run("anope.user", name)
end
# Sends a message to every user on the network.
#
# Requires the rpc_message module to be loaded.
#
# @param messages [Array<String>] One or more messages to send.
def message_network(*messages)
self.run("anope.messageNetwork", *messages)
end
# Sends a message to every user on the specified server.
#
# Requires the rpc_message module to be loaded.
#
# @param name [String] The name of the server.
# @param messages [Array<String>] One or more messages to send.
def message_server(server, *messages)
self.run("anope.messageServer", server, *messages)
end
# Sends a message to the specified user.
#
# Requires the rpc_message module to be loaded.
#
# @param source [String] The source pseudoclient to send the message from.
# @param target [String] The target user to send the message to.
# @param messages [Array<String>] One or more messages to send.
def message_user(source, target, *messages)
self.run("anope.messageUser", source, target, *messages)
end
# Checks whether the specified credentials are valid.
#
# Requires the rpc_user module to be loaded.
#
# @param account [String] A nickname belonging to the account to check.
# @param password [String] The password for the specified account.
# @return [Hash] A hash containing basic information about the account.
def check_credentials(account, password)
self.run("anope.checkCredentials", account, password)
end
# Identifies an IRC user to the specified account.
#
# Requires the rpc_user module to be loaded.
#
# @param account [String] Either an account identifier or nickname belonging to the account to
# identify to.
# @param password [String] The nickname of the IRC user to identify to the account.
def identify(account, user)
self.run("anope.identify", account, user)
end
# Lists all commands that exist on the network.
#
# Requires the rpc_user module to be loaded.
#
# @param services [Array<String>] The nicknames of the services to list commands for.
# @return [Hash] A hash containing information about the available commands.
def list_commands(*services)
self.run("anope.listCommands", *services)
end
# Lists all commands that exist on the network.
#
# Requires the rpc_user module to be loaded.
#
# @param account [String] If non-empty then the account to execute the command as.
# @param service [String] The service which the command exists on.
# @param command [Array<String>] The the command to execute and any parameters to pass to it.
# @return [Hash] A hash containing information about the available commands.
def command(account, service, *command)
self.run("anope.command", account, service, *command)
end
end
=begin
arpc = AnopeRPC.new("http://127.0.0.1:8080/jsonrpc")
begin
pp arpc.list_servers(:full)
rescue StandardError => err
STDERR.puts err
end
=end
+463
View File
@@ -0,0 +1,463 @@
# Anope `rpc_data` RPC interface
## `anope.listAccounts`
Lists all accounts that exist on the network.
### Parameters
Index | Description
----- | -----------
0 | If specified then the level of detail to retrieve. Can be set to "full" to retrieve all information or "name" to just retrieve the account names. Defaults to "name".
### Errors
Code | Description
------ | -----------
-32099 | The specified detail level does not exist.
### Result
If the detail level is not specified or is "name" then an array of account names.
If the detail level is "full" then a mapping of account names to information about the account. See `anope.account` for more information on the data structure.
#### Example
```json
["account1", "account2", "account3"]
```
## `anope.account`
Retrieves information about the specified account.
### Parameters
Index | Description
----- | -----------
0 | Either a nickname belonging to the account or an account identifier.
### Errors
Code | Description
------ | -----------
-32099 | The specified account does not exist.
### Result
Returns a map containing information about the account.
Key | Type | Description
--- | ---- | -----------
display | string | The display nickname of the account.
email | string or null | The email address associated with the account or null if one has not been specified.
extensions | map | A key-value map of the extensions set on this account by modules.
language | string or null | The language associated with the account or null if the account uses the default language.
lastmail | int | The time at which an email was last sent for this account.
nicks | map | Information about nicknames that belong to the account keyed by the nickname.
nicks.\*.extensions | map | A key-value map of the extensions set on this nickname by modules.
nicks.\*.lastseen | int | The time at which this nickname was last used.
nicks.\*.registered | int | The time at which this nickname was registered.
nicks.\*.vhost | map or null | The vhost associated with the account or null if the user has no vhost.
nicks.\*.vhost.created | int | The time at which the vhost was created.
nicks.\*.vhost.creator | string | The nickname of the creator of the vhost.
nicks.\*.vhost.host | string | The host segment of the vhost.
nicks.\*.vhost.ident | string or null | The ident segment of the vhost or null if there is not one.
nicks.\*.vhost.mask | string | The user@host or host mask of the vhost.
opertype | map or null | The oper type associated with the account or null if they are not a services operator.
opertype.commands | array[string] | The commands that the services operator type can use.
opertype.name | string | The name of the services operator type.
opertype.privileges | array[string] | The privileges that the services operator type has.
registered | int | The time at which the account was registered.
uniqueid | uint | The unique immutable identifier of the account.
users | array[string] | The IRC users who are currently logged in to this account.
#### Example
```json
{
"display": "foo",
"email": "example@example.com",
"extensions": {
"AUTOOP": true,
"HIDE_EMAIL": true,
"HIDE_MASK": true,
"MEMO_RECEIVE": true,
"MEMO_SIGNON": true,
"NS_PRIVATE": true,
"PROTECT": true,
"PROTECT_AFTER": 69
},
"language": null,
"lastmail": 1745071858,
"nicks": {
"foo": {
"extensions": {
"NS_NO_EXPIRE": true
},
"lastseen": 1745074153,
"registered": 1745071857,
"vhost": null
},
"bar": {
"extensions": {},
"lastseen": 1745072602,
"registered": 1745071857,
"vhost": {
"created": 1745072653,
"creator": "foo",
"host": "bar.baz",
"ident": "foo",
"mask": "foo@bar.baz"
}
}
},
"opertype": {
"commands": ["hostserv/*", "operserv/session"],
"name": "Helper",
"privileges": ["chanserv/no-register-limit"]
},
"registered": 1745071857,
"uniqueid": 11085415958920757000,
"users": [
"foo"
]
}
```
## `anope.listChannels`
Lists all channels that exist on the network.
### Parameters
Index | Description
----- | -----------
0 | If specified then the level of detail to retrieve. Can be set to "full" to retrieve all information or "name" to just retrieve the channel names. Defaults to "name".
### Errors
Code | Description
------ | -----------
-32099 | The specified detail level does not exist.
### Result
If the detail level is not specified or is "name" then an array of channel names.
If the detail level is "full" then a mapping of channel names to information about the channel. See `anope.channel` for more information on the data structure.
#### Example
```json
["#chan1", "#chan2", "#chan3"]
```
## `anope.channel`
Retrieves information about the specified channel.
### Parameters
Index | Description
----- | -----------
0 | The name of the channel.
### Errors
Code | Description
------ | -----------
-32099 | The specified channel does not exist.
### Result
Returns a map containing information about the channel.
Key | Type | Description
--- | ---- | -----------
created | int | The UNIX time at which the channel was originally created.
listmodes | map | List modes which are set on the channel keyed by the mode character.
modes | array[string] | Flag and parameter modes which are set on the channel.
name | string | The name of the channel.
registered | boolean | Whether the channel is registered.
topic | map or null | The channel topic or null if no topic is set.
topic.setat | int | The time at which the topic was set.
topic.setby | string | The nick or nuh of the user who set the topic.
topic.value | string | The text of the topic.
users | array[string] | The users that are current in the channel prefixed by their status mode prefixes.
#### Example
```json
{
"created": 1740402691,
"listmodes": {
"b": ["foo!bar@baz", "account:bax"],
},
"modes": ["+knrt", "secret"],
"name": "#chan1",
"registered": true,
"topic": {
"setat": 1740404706,
"setby": "nick1",
"value": "Example channel topic"
},
"users": ["@nick1", "nick2"]
}
```
## `anope.listOpers`
Lists all services operators that exist on the network.
### Parameters
Index | Description
----- | -----------
0 | If specified then the level of detail to retrieve. Can be set to "full" to retrieve all information or "name" to just retrieve the services operator nicknames. Defaults to "name".
### Errors
Code | Description
------ | -----------
-32099 | The specified detail level does not exist.
### Result
If the detail level is not specified or is "name" then an array of services operator names.
If the detail level is "full" then a mapping of services operator names to information about the services operator. See `anope.oper` for more information on the data structure.
#### Example
```json
["nick1", "nick2", "nick3"]
```
## `anope.oper`
Retrieves information about the specified services operator.
### Parameters
Index | Description
----- | -----------
0 | The name of the services operator.
### Errors
Code | Description
------ | -----------
-32099 | The specified services operator does not exist.
### Result
Returns a map containing information about the services operator.
Key | Type | Description
--- | ---- | -----------
fingerprints | array[string] or null | The client certificate fingerprints that a user must be using to log in as this services operator or null if there are no client certificate restrictions.
hosts | array[string] or null | The user@ip and user@ip masks that a user must be connecting from to log in as this services operator or null if there are no host restrictions.
name | string | The name of the services operator.
operonly | boolean | Whether a user has to be a server operator to log in as this services operator.
opertype | map | The oper type associated with the services operator.
opertype.commands | array[string] | The commands that the services operator type can use.
opertype.name | string | The name of the services operator type.
opertype.privileges | array[string] | The privileges that the services operator type has.
password | boolean | Whether a user has to specify a password to log in as the services operator.
vhost | string or null | The vhost of the services operator or null if there is no vhost.
#### Example
```json
{
"fingerprints": null,
"hosts": ["*@*.example.com"],
"name": "stest",
"operonly": true,
"opertype": {
"commands": ["hostserv/*", "operserv/session"],
"name": "Helper",
"privileges": ["chanserv/no-register-limit"]
},
"password": false,
"vhost": null
}
```
## `anope.listServers`
Lists all servers that exist on the network.
### Parameters
Index | Description
----- | -----------
0 | If specified then the level of detail to retrieve. Can be set to "full" to retrieve all information or "name" to just retrieve the server names. Defaults to "name".
### Errors
Code | Description
------ | -----------
-32099 | The specified detail level does not exist.
### Result
If the detail level is not specified or is "name" then an array of server names.
If the detail level is "full" then a mapping of server names to information about the server. See `anope.server` for more information on the data structure.
#### Example
```json
["irc1.example.com", "irc2.example.com", "services.example.com"]
```
## `anope.server`
Retrieves information about the specified server.
### Parameters
Index | Description
----- | -----------
0 | The name of the server.
### Errors
Code | Description
------ | -----------
-32099 | The specified server does not exist.
### Result
Returns a map containing information about the server.
Key | Type | Description
--- | ---- | -----------
description | string | The description of the server.
downlinks | array[string] | The servers which are behind this server
juped | boolean | Whether the server has been juped.
name | string | The name of the server.
sid | string or null | The unique immutable identifier of the server or null if the IRCd does not use SIDs.
synced | boolean | Whether the server has finished syncing.
ulined | boolean | Whether the server is U-lined.
uplink | string or null | The server in front of this server or null if it is the services server.
#### Example
```json
{
"description": "Anope IRC Services",
"downlinks": ["irc.example.com"],
"juped": false,
"name": "services.example.com",
"sid": "00B",
"synced": true,
"ulined": true,
"uplink": null
}
```
## `anope.listUsers`
Lists all users that exist on the network.
### Parameters
Index | Description
----- | -----------
0 | If specified then the level of detail to retrieve. Can be set to "full" to retrieve all information or "name" to just retrieve the user nicknames. Defaults to "name".
### Errors
Code | Description
------ | -----------
-32099 | The specified detail level does not exist.
### Result
If the detail level is not specified or is "name" then an array of user nicknames.
If the detail level is "full" then a mapping of user nicknames to information about the user. See `anope.user` for more information on the data structure.
#### Example
```json
["nick1", "nick2", "nick3"]
```
## `anope.user`
Retrieves information about the specified user.
### Parameters
Index | Description
----- | -----------
0 | The nickname of the user.
### Errors
Code | Description
------ | -----------
-32099 | The specified user does not exist.
### Result
Returns a map containing information about the user.
Key | Type | Description
--- | ---- | -----------
account | map or null | The user's account or null if they are not logged in to an account.
account.display | string | The display nickname of the account.
account.opertype | string or null | The account's oper type or null if the account is not a services operator.
account.uniqueid | uint | The unique immutable identifier of the account.
address | string | The IP address the user is connecting from.
away | map or null | The user's away state or null if they are not away.
away.message | string | The away message specified by the user.
away.time | int | The UNIX time at which the user went away.
channels | array[string] | The channels that the user is in prefixed by their status mode prefixes.
chost | string or null | The cloaked hostname of the user or null if they have no cloak.
fingerprint | string or null | The fingerprint of the user's client certificate or null if they are not using one.
host | string | The real hostname of the user.
ident | string | The username (ident) of the user.
modes | array[string] | Flag and parameter modes which are set on the user.
nick | string | The nickname of the user.
nickchanged | int | The time at which the user last changed their nickname.
real | string | The real name of the user.
server | string | The server that the user is connected to.
signon | int | The time at which the user connected to the network.
tls | bool | Whether the user is connected using TLS (SSL).
uid | string or null | The unique immutable identifier of the user or null if the IRCd does not use UIDs.
vhost | string or null | The virtual host of the user or null if they have no vhost.
vident | string or null | The virtual ident (username) of the user or null if they have no vident.
#### Example
```json
{
"account": {
"display": "nick1",
"opertype": "Services Root",
"uniqueid": "17183514657819486040"
},
"address": "127.0.0.1",
"away": null,
"channels": ["@#chan1", "#chan2"],
"chost": "localhost",
"fingerprint": null,
"host": "localhost",
"id": "9TSAAAAAA",
"ident": "user1",
"modes": ["+r"],
"nick": "nick1",
"nickchanged": 1740408318,
"real": "An IRC User",
"server": "irc.example.com",
"signon": 1740408296,
"tls": true,
"vhost": "staff.example.com",
"vident": null,
}
```
+67
View File
@@ -0,0 +1,67 @@
# Anope `rpc_message` RPC interface
## `anope.messageNetwork`
Sends a message to all users on the network.
### Parameters
Index | Description
----- | -----------
0+ | One or more messages to send.
### Errors
Code | Description
------ | -----------
-32099 | The global service is not available.
### Result
This procedure returns no result.
## `anope.messageServer`
Sends a message to all users on the specified server.
### Parameters
Index | Description
----- | -----------
0 | The name of the server to message users on.
1+ | One or more messages to send.
### Errors
Code | Description
------ | -----------
-32099 | The global service is not available.
-32098 | The specified server does not exist.
### Result
This procedure returns no result.
## `anope.messageUser`
Sends a message to the specified user.
### Parameters
Index | Description
----- | -----------
0 | The source pseudoclient to send the message from.
1 | The target user to send the message to.
2+ | One or more messages to send.
### Errors
Code | Description
------ | -----------
-32099 | The specified source does not exist.
-32098 | The specified target does not exist.
### Result
This procedure returns no result.
+175
View File
@@ -0,0 +1,175 @@
# Anope `rpc_user` RPC interface
## `anope.checkCredentials`
Checks whether the specified credentials are valid.
### Parameters
Index | Description
----- | -----------
0 | A nickname belonging to the account to check.
1 | The password for the specified account.
### Errors
Code | Description
------ | -----------
-32099 | The specified account does not exist.
-32098 | The specified password is not correct.
-32097 | The specified account is suspended.
### Result
Returns a map containing basic information about the account. More information about the account can be found by calling [the `anope.account` event using the value from the `uniqueid` field (requires the rpc_data module)](./rpc_user.md).
Key | Type | Description
--- | ---- | -----------
account | string | The display nickname of the account.
confirmed | boolean | Whether the account has been confirmed.
uniqueid | uint | The unique immutable identifier of the account.
#### Example
```json
{
"account": "foo",
"confirmed": true,
"uniqueid": 11085415958920757000,
}
```
## `anope.identify`
Identifies an IRC user to the specified account.
### Parameters
Index | Description
----- | -----------
0 | Either an account identifier or nickname belonging to the account to identify to.
1 | The nickname of the IRC user to identify to the account.
### Errors
Code | Description
------ | -----------
-32099 | The specified account does not exist.
-32098 | The specified IRC user does not exist.
### Result
This procedure returns no result.
## `anope.listCommands`
Lists all commands that exist on the network.
### Parameters
Index | Description
----- | -----------
0...n | The nicknames of the services to list commands for. If none are specified then all commands are returned.
### Errors
Code | Description
------ | -----------
-32098 | The specified service does not exist.
### Result
Returns a map containing information about the available commands.
Key | Type | Description
--- | ---- | -----------
\* | map | A key-value map of services to the commands that exist on them.
\*.\* | string | A key-value map of commands to information about the commands.
\*.\*.group | string or null | The group that the command belongs to or null if the command is not grouped.
\*.\*.hidden | boolean | Whether the command is visible in the help output.
\*.\*.maxparams | uint or null | The maximum number of parameters that the command accepts or null if there is no limit.
\*.\*.minparams | uint | The minimum number of parameters that the command accepts.
\*.\*.permission | string or null | The services operator permission required to execute the command or null if no permissions are required.
\*.\*.requiresaccount | boolean | Whether a caller must be logged into an account to execute the command.
\*.\*.requiresuser | boolean | Whether an IRC user is required to execute the command.
#### Example
```json
{
"Global": {
"GLOBAL": {
"group": null,
"hidden": false,
"maxparams": 1,
"minparams": 0,
"permission": "global/global",
"requiresaccount": true,
"requiresuser": false
},
"HELP": {
"group": null,
"hidden": false,
"maxparams": null,
"minparams": 0,
"permission": null,
"requireaccount": false,
"requireuser": false
},
"QUEUE": {
"group": null,
"hidden": false,
"maxparams": 2,
"minparams": 1,
"permission": "global/queue",
"requireaccount": true,
"requireuser": false
},
"SERVER": {
"group": null,
"hidden": false,
"maxparams": 2,
"minparams": 1,
"permission": "global/server",
"requireaccount": true,
"requireuser": false
}
}
}
```
## `anope.commands`
Executes the specified command.
### Parameters
Index | Description
----- | -----------
0 | If non-empty then the account to execute the command as.
1 | The service which the command exists on.
2...n | The the command to execute and any parameters to pass to it.
### Errors
Code | Description
------ | -----------
-32099 | The specified account does not exist.
-32098 | The specified service does not exist.
-32097 | The specified command does not exist.
### Result
Returns an array of messages returned by the command.
#### Example
```json
[
"Global commands:",
" GLOBAL Send a message to all users",
" HELP Displays this list and give information about commands",
" QUEUE Manages your pending message queue.",
" SERVER Send a message to all users on a server"
]
```
-25
View File
@@ -1,25 +0,0 @@
Legend:
x = done
? = unsure
+ = in progress
Future
------
[ ] NS IDENTIFY changes
[?] Last failed identify? Maybe more useful for sopers only, so users don't get unnecessarily worried
[?] Last successful login time/ip? perhaps both of these should be a new nick setting
[ ] NS SUSPEND: show suspender and reason, probably to sopers only (see CS SUSPEND)
[ ] Allow channel founders to change the fantasy trigger for their channel.
[+] CIDR Akills, session exceptions, etc
[?] Language charset stuff, including collation (1.9.1? phoenix?)
[?] a way for a module to queue itself (or even another module) for unloading
[+] Useful/common "third party" modules to core distro
[x] NS AJOIN
[x] CS ENTRYMSG
[?] Don't allow soper accounts to expire
[?] Reason for CS SET RESTRICTED
[ ] Unique IDs on each AKILL/blah so that networks may use them as ticket IDs
[ ] HS ACTIVATE -ALL (rob sez this all needs reviewing)
[ ] No nickname ownership?
[ ] More commands need to be split up such as /bs bot, /ms set, /bs kick, /bs set, /os set? etc.
[ ] Customize email messages
-27
View File
@@ -1,27 +0,0 @@
Anope Bundled Tools
-------------------
1) Anope SMTP Client
Provided with Anope is a simple SMTP client which can be used instead of
programs like SendMail in some cases.
The SMTP client can be used instead of sendmail for use with Anope's mail
options. To use the SMTP client instead of sendmail, find the line in your
services configuration file (services.conf) that defines sendmailpath. On
that line, change the path to your services installation directory, then
followed by "bin/anopesmtp" and the IP address of a valid SMTP server. It
should look like this:
sendmailpath = "/home/anope/services/bin/anopesmtp 127.0.0.1"
If the SMTP client doesn't send mail, or if there's an other problem with
it, you can compile it in debug mode. To do this, open anopesmtp.cpp, and look
for "smtp_debug" near the top. Change this from 0 to 1 and recompile
the code. This should generate a log file of what happened when it tried
to connect to the SMTP server.
Credits:
Originally written by Dominick Meglio <codemastr@unrealircd.com>
Ported to *nix by Trystan Scott Lee <trystan@nomadirc.net>
+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`.
-172
View File
@@ -1,172 +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:
http://sourceforge.net/project/showfiles.php?group_id=94081
* CMake:
http://www.cmake.org/cmake/resources/software.html
(NOTE: When installing, tell CMake to add itself to the PATH.)
If you have Visual C++ 10 (2010) skip ahead to step 2, else you
need to download the following free component from Microsoft. Once
downloaded, install these packages.
* Microsoft Visual C++ 2010 Express Edition:
http://www.microsoft.com/express/vc/
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 m_mysql and
m_ssl. If these libraries are installed in nonstandard locations, cmake
will probably not find them and should be told where they are by passing
additional search paths to the last question in Config, such as:
-DEXTRA_INCLUDES:STRING=c:/openssl/include;c:/openssl/lib
Which would have cmake search both C:\openssl\include and
C:\openssl\lib.
Building Anope with gettext requires libintl, libiconv, libgcc and
libmingex. We have precompiled these libraries for you that you may
use if you want. They are avaiable at http://anope.org/downloads/anope-extra.zip
The OpenSSL, MySQL, and OpenLDAP header files and libraries are also included in
this package. Once downloaded and extracted, you should run install.bat
then give Config the path to the new 'installed' directory.
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/example.conf" to be "data/services.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 services.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>
-26
View File
@@ -1,26 +0,0 @@
Starting with Anope 1.9.4 XMLRPC using PHP's xmlrpc_encode_request and xmlrpc_decode functions is supported.
This allows external applications, such as websites, to execute remote procedure calls to Anope in real time.
Currently there are 5 supported XMLRPC calls, provided by m_xmlrpc_main:
checkAuthetication - Takes two parameters, an account name and a password. Checks if the account name is valid and the password
is correct for the account name, useful for making login pages on websites.
command - Takes three parameters, a service name (BotServ, ChanServ, NickServ), a user name (whether online or not), and the command
to execute. This will execute a the given command to Anope using the given service name. If the user given is online, the
command reply will go to them, if not it is returned by XMLRPC.
stats - Takes no parameters, returns miscellaneous stats that can be found in the /operserv stats command.
channel - Takes one parameter, a channel name, and returns real time information regarding that channel, such as users, modes
(ban lists and such), topic etc.
user - Takes one parameter, a user name, and returns real time information regarding that user.
XMLRPC was designed to be used with db_mysql, and will not return any information that can be pulled from the SQL
database, such as accounts and registered channel information. It is instead used for pulling realtime data such
as users and channels currently onlive. For examples on how to use these calls in PHP, see xmlrpc.php in docs/XMLRPC.
Also note that the parameter named "id" is reserved for query ID. If you pass a query to Anope containing a value for id. it will
be stored by Anope and the same id will be passed back in the result.
-101
View File
@@ -1,101 +0,0 @@
<?php
/* XMLRPC Functions
*
* (C) 2003-2012 Anope Team
* Contact us at team@anope.org
*
*/
class AnopeXMLRPC
{
private $Host, $Bind, $Port;
private $Socket;
function __construct($Host, $Port, $Bind = NULL)
{
$this->Host = $Host;
$this->Port = $Port;
$this->Bind = $Bind;
$this->Socket = socket_create(AF_INET, SOCK_STREAM, SOL_TCP);
if ($Bind && socket_bind($this->Socket, $this->Bind) == false)
$his->Socket = false;
if (socket_connect($this->Socket, $this->Host, $this->Port) == false)
$this->Socket = false;
}
function __destruct()
{
@socket_close($this->Socket);
}
/** Run an XMLRPC command. Name should be a query name and params an array of parameters, eg:
* $this->RunXMLRPC("checkAuthentication", array("adam", "qwerty"));
* If successful returns back an array of useful information.
*
* Note that $params["id"] is reserved for query ID, you may set it to something if you wish.
* If you do, the same ID will be passed back with the reply from Anope.
*/
function RunXMLRPC($name, $params)
{
$xmlquery = xmlrpc_encode_request($name, $params);
socket_write($this->Socket, $xmlquery);
$inbuf = socket_read($this->Socket, 4096);
$inbuf = substr($inbuf, strpos($inbuf, "\r\n\r\n") + 4);
$response = xmlrpc_decode($inbuf);
if (isset($response[0]))
return $response[0];
return NULL;
}
/** Do Command on Service as User, eg:
* $anope->DoCommand("ChanServ", "Adam", "REGISTER #adam");
* Returns an array of information regarding the command execution, if
* If 'online' is set to yes, then the reply to the command was sent to the user on IRC.
* If 'online' is set to no, then the reply to the command is in the array member 'return'
*/
function DoCommand($Service, $User, $Command)
{
return $this->RunXMLRPC("command", array($Service, $User, $Command));
}
/** Check an account/nick name and password to see if they are valid
* Returns the account display name if valid
*/
function CheckAuthentication($Account, $Pass)
{
$ret = $this->RunXMLRPC("checkAuthentication", array($Account, $Pass));
if ($ret && $ret["result"] == "Success")
return $ret["account"];
return NULL;
}
/* Returns an array of misc stats regarding Anope
*/
function DoStats()
{
return $this->RunXMLRPC("stats", NULL);
}
/* Look up data for a channel
* Returns an array containing channel information, or an array of size one
* (just containing the name) if the channel does not exist
*/
function DoChannel($Channel)
{
return $this->RunXMLRPC("channel", NULL);
}
/* Like DoChannel(), but different.
*/
function DoUser($User)
{
return $this->RunXMLRPC("user", array($User));
}
}
?>
+326
View File
@@ -0,0 +1,326 @@
Anope Version 2.1.18
--------------------
Added a check that a non-deprecated database module is loaded.
Added support for flexible and monospace layouts to make text easier to read on clients that use a variable-width font.
Added support for logging about deprecated modules on boot.
Added support for per-IRCd hints when a link fails.
Added support for self-service validation of vhosts using DNS TXT records.
Added support for separate bad password limits for pre-connection SASL authentication.
Added support for SRV and TXT records to the dns module.
Added the --nodb option to disable database and encrytption module checks.
Added the nickname registration date to the nickserv/glist output.
Changed db_flatfile to be import-only (migrate to db_json).
Changed the default registration confirmation type to code validation.
Changed the fantasy !help command to not require the FANTASY privilege by default.
Changed various length measurement code to be UTF-8 aware.
Disabled the nickname registration delay by default.
Fixed reporting the MySQL version that the mysql module was built against.
Improved the layout of the nickserv/info command.
Modularised the ns_sasl module to make it easier to pick SASL mechanisms.
Moved duration rounding logic from Anope::Expires to Anope::Duration.
Removed support for importing old databases from 1.8.
Removed support for verifying "old MD5" passwords from 1.7.
Reworked how memory is allocated when formatting messages.
Anope Version 2.1.17
--------------------
Allowed opers to resend passwords for users in nickserv/resend.
Fixed HostServ using a different valid username character set to the protocol module.
Fixed losing the channel and nickname registration time when upgrading from an earlier 2.1 release.
Improved the messages sent when a user is forced off a protected nickname.
Simplified copying modules to the runtime directory on Windows.
Anope Version 2.1.16
--------------------
Added support for on-IRC code confirmation.
Added the ability for fantasy commands to be executable without the FANTASY privilege.
Added the ability to prepend to topics as well as appending to them.
Changed various fields to serialize to the database as a string not an integer.
Disabled db_flatfile by default in preparation for becoming import-only.
Fixed a memory leak in the db_json module.
Fixed building on OpenSSL 1.1.1 (for now).
Fixed removed and later re-added temporary bans being removed automatically.
Fixed sometimes sending malformed LMODE messages on InspIRCd.
Fixed the "did you mean" message suggesting unloaded commands.
Fixed various issues with the example config files.
Marked db_json as the recommended database module.
Moved the BAN, UNBAN, and KICK commands to the chanserv/management group.
Removed support for the 1.8-style seen command.
Reworked confirmation to allow confirmation of multiple account actions.
When dropping a display nickname the new display will now be the oldest in the group.
Anope Version 2.1.15
--------------------
Added a workaround to the jsonrpc module for JavaScript truncating big integers.
Added an example Ruby library for accessing the RPC interface.
Added away state and tls usage to the anope.user RPC event.
Added support for looking up accounts by identifier in the anope.account RPC event.
Added support for storing the setter and set time and setter of list modes and restoring them on InspIRCd and Solanum.
Added support for token authentication to the RPC modules.
Added the anope.checkCredentials, anope.identify, anope.listCommands, and anope.command RPC events to the new rpc_user module.
Bumped the minimum supported version of ircd-hybrid to 8.2.34.
Deprecated irc2sql in favour of rpc_data.
Dropped support for Bahamut as it has no known users.
Fixed creating duplicate Stats rows on some servers.
Fixed loading databases in db_json.
Fixed restoring cloaked hosts on InspIRCd when the cloak module is not loaded.
Fixed some variable shadowing that potentially caused issues with the SQL database backends.
Fixed sometimes writing accounts to the database without a unique identifier.
Fixed various documentation issues with the example JavaScript JSON-RPC client.
Improved CTCP handling and added support for more CTCP types.
Anope Version 2.1.14
--------------------
Added a detail specifier to the anope.list{Channels,Opers,Servers,Users} RPC methods.
Added a matcher for the InspIRCd oper extban.
Added support for hashed operator passwords.
Added support for hiding the date news was added in os_news.
Added support for local password comparison to the sql_authentication module.
Added support for monthly backups to db_json.
Added support for unbanning virtual modes using cs_unban.
Added the !unmute fantasy command.
Added the anope.account and anope.listAccounts RPC methods to the rpc_data module.
Added the protection time to the INFO output.
Allowed unprivileged channel successors to remove themselves from succession.
Bumped the minimum required CMake version to 3.20.
Changed deletion callbacks to specify the mask that was deleted if only one was.
Changed nickserv/alist to show all permissions not just the highest ranked one.
Fixed NEVEROP not being respected in chanserv/set/founder and chanserv/set/successor.
Fixed stripping IRC formatting codes from messages.
Messages are now automatically line wrapped to options:linelength.
Redocumented the ns_sasl module.
Removed hardcoded command names from several messages.
Updated the Windows CI to Windows Server 2025 and Visual Studio 2022.
Anope Version 2.1.13
--------------------
Added a Config check to ensure users actually want to use the development branch.
Added a flag to the version string when Anope is compiled in reproducible mode.
Added a warning on rehash when the max password is longer than the maximum bcrypt password length.
Added an ALLTIME handler on InspIRCd.
Added an opt-out for extended XML-RPC types.
Added RPC messages for sending global messages.
Added support for importing cs_set_misc and ns_set_misc data from Atheme.
Added support for importing news from Atheme.
Added support for oper-only quit messages.
Added support for the experimental "services cloak" system from the InspIRCd development branch.
Added support for using defines from the environment.
Added support for using defines within the value of a variable.
Blacklisted an old version of an UnrealIRCd module that is known to send malformed S2S messages.
Changed RPC events to be registered as core services.
Changed the database to refer to accounts by their account identifier instead of their display nick.
Changed the syntax of defines from "foo" to "${foo}".
Deduplicated JSON generation code in the jsonrpc module.
Fixed a warning when importing an Atheme account that uses external authentication.
Fixed counting email addresses in ns_maxemail.
Fixed db_atheme creating duplicate accounts, bots, and nicks when importing over an existing database.
Fixed deleting old database backups after Anope has been restarted.
Fixed importing user metadata from Anope 1.8.
Fixed including a port in uplink messages when connecting to a UNIX socket endpoint.
Fixed memo ignores being erroneously case sensitive.
Fixed modules with third-party dependencies writing generic log messages instead of module log messages.
Fixed not performing SQL database updates in some rare circumstances.
Fixed sending global messages with the default sender.
Imported mkauthors from InspIRCd and used it to generate docs/AUTHORS.txt
Moved around a bunch of module headers.
Moved database serialization from the serializable to the serializable type.
Moved the SASL protocol interface to its own service.
Refactored handling S2S metadata on InspIRCd.
Updated more messages to use gettext plural forms.
Anope Version 2.1.12
--------------------
Added an example JavaScript library for accessing the RPC interface.
Added an option to require specifying the server name when running destructive network commands like restart or shutdown.
Added support for importing X-line identifiers from Atheme.
Added support for JSON-RPC to the RPC interface.
Added support for killing SASL users that fail to log in repeatedly.
Added support for more RPC response types to the RPC interface.
Added support for multiple targets in chanserv/modes.
Added support for SSL client certificate fallback fingerprints on InspIRCd.
Added the anope. prefix to the channel and user RPC events and moved them to the rpc_data module.
Added the anope.listChannels, anope.listServers, anope.listUsers, and anope.server RPC events to the new rpc_data module.
Added the OPERONLY, UNUSED and VANITY filters to botserv/botlist.
Added the system.listMethods RPC event to the new rpc_system module.
Deprecated support for InspIRCd v3 (scheduled to be removed in around a year).
Fixed enc_bcrypt silently truncating passwords longer than 71 characters.
Fixed ns_set_language being able to be loaded when Anope was built without language support.
Fixed sql_authentication not being able to use the IP address of a RPC, SASL, or web user in SQL queries.
Made modules that use third-party libraries log the version in use on load.
Redesigned the RPC interface to add support for emitting multiple data types.
Replaced the opers RPC event with rpc.listOpers and rpc.oper events in the new rpc_data module.
Updated the Dutch translation.
Anope Version 2.1.11
--------------------
Added support for database migrations to the mysql module.
Added support for renicking users to their UID when enforcing nickname protection.
Added support for sending channel URLs to joining users.
Allowed selecting languages using a shorter version of their name.
Changed various messages to use human-readable durations instead of seconds.
Improved the creation of expiry and duration messages.
Improved the translation system with support for plural forms.
Reworked how guest nicknames are generated.
Simplified how account identifiers are allocated.
Anope Version 2.1.10
--------------------
Added support for NEXTBANS on UnrealIRCd.
Changed hostmask access entries added by nick to use that nick as the default description.
Changed modes to be handled internally in their split form.
Changed ns_cert to notify a user that their certificate is being automatically added to their account.
Fixed matching users against extended bans.
Fixed parsing name-only extended bans on InspIRCd.
Fixed respecting the preferred extended ban format on InspIRCd.
Fixed the name of the cron script in the docs.
Updated the list of supported IRCds.
Updated the location of the Anope IRC channels
Anope Version 2.1.9
-------------------
Bumped the minimum supported version of UnrealIRCd to 6.
Fixed granting IRC operator status to services operators.
Fixed making users an IRC operator on InspIRCd.
Fixed nonicknameownership on InspIRCd v4.
Fixed some messages not being translatable.
Fixed the Argon2 module not having test vectors.
Increased the default nickname expiry period to one year.
Anope Version 2.1.8
-------------------
Added account identifiers to the nickserv/info output.
Added support for bool, float, and uint SQL columns.
Added the ability to automatically determine SQL column types based on the native type.
Added UNIX socket support to mysql module.
Changed smartjoin to use SendClearBans where available.
Dropped support for MinGW in favour of native builds.
Fixed parsing named extbans on InspIRCd.
Fixed parsing SVSMODE and SVS2MODE from UnrealIRCd.
Fixed sending global messages to remotely linked servers.
Removed the services server name from the CTCP version response.
Anope Version 2.1.7
-------------------
Added importing of akick reasons, forbid reasons, opers and session exceptions to db_atheme.
Added support for sending tag messages.
Added the ability to look up account information of an authenticated user.
Fixed a crash in ns_cert when an IRC user is not present during a nick registration.
Fixed a null pointer dereference in the global module.
Fixed a rare memory leak in os_akill and os_sxline.
Improved the performance of some code that looks up the primary nick from an account.
Removed the broken Catalan, Hungarian, and Russian translations.
Reworked the protocol interface for sending messages.
Updated the Turkish translation.
Anope Version 2.1.6
-------------------
Added opportunistic upgrading of TLS fingerprints to more secure algorithms on InspIRCd.
Added support for logging out partially connected users on Plexus.
Added the account registration time to nickserv/info.
Changed ns_cert to automatically add a TLS fingerprint to new accounts if available.
Clarified that a non-deprecated encryption module must be loaded.
Fixed creating the runtime directory on Windows.
Fixed mistakenly allowing badpasslimit to be set to a negative value.
Fixed parsing backup TLS fingerprints on InspIRCd.
Fixed parsing the flood mode on UnrealIRCd.
Fixed parsing the history mode on UnrealIRCd.
Fixed various iterator invalidation issues.
Partially rewrote the Portuguese translation.
Removed some incorrect strings from the Turkish translation.
Renamed the --modulesdir option to --moduledir to match the name of other path options.
Anope Version 2.1.5
-------------------
Added an example systemd unit file.
Added support for BIGLINES on UnrealIRCd.
Bumped the minimum supported version of Bahamut to 2.0.
Fixed truncating messages in global/global and global/server.
Improved building Anope for use as a system package.
Updated the Turkish translation.
Anope Version 2.1.4
-------------------
Added a check for a non-deprecated encryption module on start.
Added a way for protocol modules to report an error to the uplink.
Added more account settings to the webcpanel.
Added self-test functionality for all encryption modules.
Added support for challenge authentication on InspIRCd.
Added support for importing databases from Atheme.
Added support for sending client tags on UnrealIRCd.
Added support for the InspIRCd 1206 (v4) protocol.
Added the --nopid option to disable writing a pid file.
Added the enc_argon2 module to encrypt passwords with Argon2.
Added the enc_sha2 module to encrypt passwords with HMAC-SHA-2.
Added the global/queue command for queueing multi-line messages.
Added the global/server command for sending messages to an individual server.
Added the PASSWORD category to operserv/stats to view password encryption methods.
Added the verify-only enc_posix module to validate passwords from Atheme that were encrypted with Argon2.
Changed nickserv/drop to use confirmation codes to confirm a nickname drop.
Changed various paths to be relative to the data and config directories.
Converted some IRCDProto member functions to variables.
Converted the enc_md5, enc_none, enc_old, enc_sha1, and enc_sha256 modules to be verify-only.
Deduplicated page headers and footers in the webcpanel templates.
Deprecated the enc_sha256 module.
Fixed inconsistent spelling/casing of email, vhost, and vident.
Fixed various bugs in the inspircd module.
Improved portability of email sending.
Improved protocol debug messages.
Improved the performance and reliability of internal conversion logic.
Improved the randomness of randomly generated numbers.
Refactored the enc_bcrypt module and exposed it as an encryption context.
Removed several duplicate translation strings.
Replaced the custom MD5 implementation in enc_md5 with a vendored one.
Replaced the custom SHA256 implementation in enc_sha256 with a vendored one.
The ldap_authentication, ldap_oper, sql_authentication, sql_log, and sql_oper modules are now always enabled.
Anope Version 2.1.3
-------------------
Added alternate command suggestions when a user runs an invalid command.
Added support for the IRCv3 +draft/channel-context tag.
Added support for the IRCv3 +draft/reply tag.
Allow using more than one fingerprint in an oper block.
Changed chanserv/drop to use confirmation codes to confirm a channel drop.
Cleaned up more of the codebase to use Modern C++17.
Enabled using more field limits sent by the IRC server instead of requiring the user to configure them.
Fixed NickServ lying about the minimum password length.
Fixed a crash when sending emails.
Fixed bs_kick not using the correct kick message for automatic kicks.
Increased the security of randomly generated confirmation codes.
Removed the ns_access module and associated cs_secure and ns_secure options.
Removed the ns_status module.
Reworked how messages are sent in protocol modules to allow sending message tags.
Anope Version 2.1.2
-------------------
Bumped the minimum OpenSSL version to 1.1.0.
Bumped the minimum GnuTLS version to 3.0.0.
Disabled SSLv3 support in the m_ssl_openssl module.
Modernized mutex and thread code to use Modern C++.
Normalised the program exit codes.
Updated the Dutch translation.
Updated the French translation.
Anope Version 2.1.1
-------------------
Added the UNBANME privilege to allow users to unban themselves.
Fixed building on Windows systems without chgrp/chmod.
Fixed creating sockets in the m_dns, m_httpd, m_proxyscan, and m_redis modules.
Fixed reading the values of command line arguments.
Moved core privilege descriptions to the example configs.
Updated the Italian translation.
Updated the Polish translation.
Anope Version 2.1.0
-------------------
Added support for access list entry descriptions.
Added support for linking over a UNIX socket.
Added support for server-initiated logins and logouts on UnrealIRCd.
Added support for server-initiated logouts on InspIRCd.
Added support for the ANONYMOUS SASL mechanism.
Allowed users to opt-out of being added to channel access lists.
Cleaned up the codebase to use Modern C++17.
Modernized the build system to use a modern version of CMake.
Removed support for using insecure encryption methods as the primary method.
Removed the Windows-only anopesmtp tool.
Removed the two day X-line cap.
Updated all references to IRCServices to refer to Anope instead.
+204
View File
@@ -0,0 +1,204 @@
Anope Version 2.1.18
--------------------
Added the hostserv/validate command.
Added the nickserv/saset/layout command.
Added the nickserv/set/layout command.
Added the ns_sasl_anonymous module.
Added the ns_sasl_external module.
Added the ns_sasl_plain module.
Added the ns_set_layout module.
Added the ns_set_op module.
Added {hs_request}:validationcooldown (defaults to 5 minutes).
Added {hs_request}:validationrecord (defaults to "anope-dns-validation").
Added {ns_sasl}:badpasslimit (defaults to options:badpasslimit).
Added {ns_sasl}:badpasstimeout (defaults to options:badpasstimeout).
Moved nickserv/set/autoop and nickserv/saset/autoop to the ns_set_op module.
Moved nickserv/set/display and nickserv/saset/display to the ns_set_group module.
Moved nickserv/set/neverop and nickserv/saset/neverop to the ns_set_op module.
Removed the db_old module.
Removed the enc_old module.
Removed {db_flatfile}:fork (module is now import-only).
Removed {db_flatfile}:keepbackups (module is now import-only).
Removed {db_flatfile}:nobackupokay (module is now import-only).
Anope Version 2.1.17
--------------------
Added the nickserv/resend oper privilege.
Anope Version 2.1.16
--------------------
Added fantasy:require_privilege (defaults to yes).
Added the nickserv/confirm/email command.
Added the nickserv/confirm/email oper privilege.
Added the nickserv/confirm/register command.
Added the ns_confirm module.
Added {ns_email}:changeexpire (defaults to 1 day).
Added {ns_resetpass}:resetexpire (defaults to 1 day).
Removed the irc2sql module (migrate to JSON-RPC instead).
Removed {ns_seen}:simple (1.8-style seen has been removed).
Renamed the nickserv/confirm oper privilege to nickserv/confirm/register.
Anope Version 2.1.15
--------------------
Added the ns_email module.
Added the rpc_user module.
Added {jsonrpc}:integer_bits (defaults to 64).
Added {jsonrpc}:token.
Added {nickserv}:enforcerreal (defaults to "Services Enforcer").
Added {xmlrpc}:token.
Moved nickserv/set/email and nickserv/saset/email to the ns_email module.
Removed the bahamut module.
Removed the ns_getemail module (load ns_email instead).
Removed the ns_maxemail module (load ns_email instead).
Removed the rpc_main module (migrate to the other RPC modules).
Removed {chanstats}:cs_def_chanstats (add CS_STATS to {chanserv}:defaults instead).
Removed {chanstats}:ns_def_chanstats (add NS_STATS to {nickserv}:defaults instead).
Renamed service:gecos to service:real.
Anope Version 2.1.14
--------------------
Added oper:password_hash.
Added options:codelength (defaults to 15).
Added {os_news}:showdate (defaults to yes).
Added {sql_authentication}:password_field (defaults to "password").
Added {sql_authentication}:password_hash.
Changed the default value for options:linelength to "100".
Changed the default value for {enc_sha2}:algorithm to "sha512".
Changed the default value for {ns_seen}:purgetime to "90d".
Changed the syntax for template variables in mail:emailchange_message, mail:emailchange_subject, mail:memo_message, mail:memo_subject, mail:registration_message, mail:registration_subject, mail:reset_message, mail:reset_subject, {chanserv}:signkickformat, {dnsbl}:blacklist:reason, {ldap_authentication}:search_filter, {ldap_oper}:binddn, {ldap_oper}:filter, {nickserv}:unregistered_notice, {os_session}:sessionlimitexceeded, {proxyscan}:proxyscan:reason.
Anope Version 2.1.13
--------------------
Added options:linelength (defaults to 120).
Added the db_json module.
Added the rpc_message module.
Added {nickserv}:defaultprotect (defaults to 1m).
Added {nickserv}:maxprotect (defaults to 10m).
Added {nickserv}:minprotect (defaults to 10s)
Added {xmlrpc}:enable_i8 (defaults to yes).
Added {xmlrpc}:enable_nil (defaults to yes).
Changed the syntax for using defines (all existing defines will need to be updated).
Removed {nickserv}:kill (replaced by custom protection timer durations).
Removed {nickserv}:killquick (replaced by custom protection timer durations).
Removed {ns_set_kill}:allowkillimmed (replaced by custom protection timer durations).
Renamed the nickserv/saset/kill command to nickserv/saset/protect.
Renamed the nickserv/saset/kill oper privilege to nickserv/saset/protect.
Renamed the nickserv/set/kill command to nickserv/set/protect.
Renamed the ns_set_kill module to ns_set_protect.
Renamed the sasl module to ns_sasl and moved it to nickserv.example.conf.
Anope Version 2.1.12
--------------------
Added the jsonrpc module.
Added the rpc_data module.
Added the rpc_system module.
Added {hostserv}:activate_on_deoper (defaults to yes).
Added {os_shutdown}:requirename (defaults to yes).
Moved nickserv/set/keepmodes and nickserv/saset/keepmodes to the ns_set_keepmodes module.
Moved the xmlrpc module to extra.
Renamed the xmlrpc_main module to rpc_main.
Anope Version 2.1.11
--------------------
Moved nickserv/set/kill and nickserv/saset/kill to the ns_set_kill module.
Moved {ns_set}:allowkillimmed to {ns_set_kill}:allowkillimmed.
Replaced {nickserv}:guestnickprefix with {nickserv}:guestnick (defaults to Guest####).
Anope Version 2.1.10
--------------------
Added options:servicealias (defaults to no)
Moved nickserv/set/message and nickserv/saset/message to the ns_set_message module.
Removed options:useprivmsg (replaced by loading the ns_set_message module to enable).
Removed options:usestrictprivmsg (feature unusable on modern servers, consider migrating to options:servicealias instead).
Anope Version 2.1.9
-------------------
No significant changes.
Anope Version 2.1.8
-------------------
Added the nickserv/drop/display oper privilege.
Added {nickserv}:preservedisplay (defaults to no).
Anope Version 2.1.7
-------------------
Moved nickserv/set/language and nickserv/saset/language to the ns_set_language module.
Renamed the FANTASIA channel privilege to FANTASY.
Renamed {cs_suspend}:expire to {cs_suspend}:suspendexpire.
Anope Version 2.1.6
-------------------
Added {ns_cert}:automatic (defaults to yes).
Removed {hybrid,inspircd,solanum,unrealircd}:use_server_side_mlock (now always enabled).
Removed {inspircd}:use_server_side_topiclock (now always enabled).
Anope Version 2.1.5
-------------------
Added the nickserv/drop/override and chanserv/drop/override oper privileges.
Anope Version 2.1.4
-------------------
Added the db_atheme module.
Added the enc_argon2 module.
Added the enc_posix module.
Added the enc_sha2 module.
Added the gl_queue module.
Added the gl_server module.
Added the global/queue oper privilege.
Added the global/server oper privilege.
Changed serverinfo:motd to be relative to the config directory.
Changed serverinfo:pid to be relative to the data directory.
Changed the default value of mail:sendmailpath to "/usr/sbin/sendmail -it".
Changed the default value of {chanserv}:accessmax to 1000.
Changed the default value of {chanserv}:inhabit to 1 minute.
Changed the default value of {cs_mode}:max to 50.
Changed the default value of {ms_ignore}:max to 50.
Removed options:seed (not needed with modern random number generation).
Replaced {webcpanel}:template with {webcpanel}:template_dir (defaults to webcpanel/templates/default).
Anope Version 2.1.3
-------------------
Added options:didyoumeandifference (defaults to 4).
Added support for multiple SSL fingerprints in oper:certfp.
Added the chanserv/cert oper privilege for modifying other user's certificate lists.
Changed networkinfo:chanlen to default to 32 if not set.
Changed networkinfo:hostlen to default to 64 if not set.
Changed networkinfo:modelistsize to default to 100 if not set.
Changed networkinfo:nicklen to default to 31 if not set.
Changed networkinfo:userlen to default to 10 if not set.
Increased the default maximum password length to 50 characters.
Increased the default minimum password length to 10 characters.
Removed the cs_secure option in {chanserv}:defaults (now always enabled as support for nick access lists has been removed).
Removed the nickserv/saset/secure command (support for nick access lists has been removed).
Removed the nickserv/saset/secure oper privilege (support for nick access lists has been removed).
Removed the nickserv/set/secure command (support for nick access lists has been removed).
Removed the nickserv/status command (obsolete with modern IRCv3 extensions and the removal of nick access lists).
Removed the ns_access module (support for nick access lists has been removed).
Removed the ns_secure option in {nickserv}:defaults (now always enabled as support for nick access lists has been removed).
Anope Version 2.1.2
-------------------
Added {ssl_openssl}:tlsv10 for configuring whether TLSv1.0 is usable (defaults to no).
Added {ssl_openssl}:tlsv11 for configuring whether TLSv1.1 is usable (defaults to yes).
Added {ssl_openssl}:tlsv12 for configuring whether TLSv1.2 is usable (defaults to yes).
Removed the m_ prefix from the names of the chanstats, dns, dnsbl, helpchan, httpd, ldap, ldap_oper, mysql, proxyscan, redis, regex_pcre2, regex_posix, regex_stdlib, regex_tre, rewrite, sasl, sql_log, sql_oper, sqlite, ssl_gnutls, ssl_openssl, xmlrpc, and xmlrpc_main modules.
Removed {ssl_openssl}:sslv3 (now always disabled).
Anope Version 2.1.1
-------------------
Added the m_regex_stdlib module.
Removed the m_regex_pcre module (use m_regex_pcre2 instead).
Anope Version 2.1.0
-------------------
Added {nickserv}:minpasslen for configuring the minimum password length (defaults to 8).
Removed {nickserv}:strictpasswords (obsolete now {nickserv}:minpasslen exists).
Removed the inspircd12 and inspircd20 modules (use inspircd instead).
Removed the ns_getpass module (no supported encryption modules).
Removed the os_oline module (no supported IRCds).
Removed the unreal module (use unrealircd instead).
Renamed {nickserv}:passlen to {nickserv}:maxpasslen.
Renamed the charybdis module to solanum.
Renamed the inspircd3 module to inspircd.
Renamed the unreal4 module to unrealircd.
Replaced uplink:ipv6 with uplink:protocol (defaults to ipv4).
Executable
+168
View File
@@ -0,0 +1,168 @@
#!/usr/bin/env perl
#
# Script taken from InspIRCd, https://www.inspircd.org/
#
# This program is distributed in the hope that it will be useful, but WITHOUT
# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
# FOR A PARTICULAR PURPOSE. See the GNU General Public License for more
# details.
#
# You should have received a copy of the GNU General Public License
# along with this program. If not, see <https://www.gnu.org/licenses/>.
#
BEGIN { require 5.8.0; }
use strict;
use warnings FATAL => qw(all);
use File::Copy ();
use Cwd;
sub list_extras ();
sub enable_extras (@);
sub disable_extras (@);
# Routine to list out the extra/ modules that have been enabled.
# Note: when getting any filenames out and comparing, it's important to lc it if the
# file system is not case-sensitive (== Epoc, MacOS, OS/2 (incl DOS/DJGPP), VMS, Win32
# (incl NetWare, Symbian)). Cygwin may or may not be case-sensitive, depending on
# configuration, however, File::Spec does not currently tell us (it assumes Unix behavior).
sub list_extras () {
use File::Spec;
# @_ not used
my $srcdir = File::Spec->catdir("modules");
my $abs_srcdir = File::Spec->rel2abs($srcdir);
local $_;
my $dd;
opendir $dd, File::Spec->catdir($abs_srcdir, "extra") or die (File::Spec->catdir($abs_srcdir, "extra") . ": $!\n");
my @extras = map { File::Spec->case_tolerant() ? lc($_) : $_ } (readdir($dd));
closedir $dd;
undef $dd;
opendir $dd, $abs_srcdir or die "$abs_srcdir: $!\n";
my @sources = map { File::Spec->case_tolerant() ? lc($_) : $_ } (readdir($dd));
closedir $dd;
undef $dd;
my $maxlen = (sort { $b <=> $a } (map {length($_)} (@extras)))[0];
my %extras = ();
EXTRA: for my $extra (@extras) {
next if (File::Spec->curdir() eq $extra || File::Spec->updir() eq $extra);
my $abs_extra = File::Spec->catfile($abs_srcdir, "extra", $extra);
my $abs_source = File::Spec->catfile($abs_srcdir, $extra);
next unless ($extra =~ m/\.(cpp|h)$/ || (-d $abs_extra)); # C++ Source/Header, or directory
if (-l $abs_source) {
# Symlink, is it in the right place?
my $targ = readlink($abs_source);
my $abs_targ = File::Spec->rel2abs($targ, $abs_srcdir);
if ($abs_targ eq $abs_extra) {
$extras{$extra} = "\e[32;1menabled\e[0m";
} else {
$extras{$extra} = sprintf("\e[31;1mwrong symlink target (%s)\e[0m", $abs_targ);
}
} elsif (-e $abs_source) {
my ($devext, $inoext) = stat($abs_extra);
my ($devsrc, $inosrc, undef, $lnksrc) = stat($abs_source);
if ($lnksrc > 1) {
if ($devsrc == $devext && $inosrc == $inoext) {
$extras{$extra} = "\e[32;1menabled\e[0m";
} else {
$extras{$extra} = sprintf("\e[31;1mwrong hardlink target (%d:%d)\e[0m", $devsrc, $inosrc);
}
} else {
open my $extfd, "<", $abs_extra;
open my $srcfd, "<", $abs_source;
local $/ = undef;
if (scalar(<$extfd>) eq scalar(<$srcfd>)) {
$extras{$extra} = "\e[32;1menabled\e[0m";
} else {
$extras{$extra} = sprintf("\e[31;1mout of synch (re-copy)\e[0m");
}
}
} else {
$extras{$extra} = "\e[33;1mdisabled\e[0m";
}
}
for my $extra (sort {$a cmp $b} keys(%extras)) {
my $text = $extras{$extra};
if ($text =~ m/needed by/ && $text !~ m/enabled/) {
printf "\e[31;1;5m%-*s = %s%s\e[0m\n", $maxlen, $extra, $text, ($text =~ m/needed by/ ? ")" : "");
} else {
printf "%-*s = %s%s\n", $maxlen, $extra, $text, ($text =~ m/needed by/ ? "\e[0m)" : "");
}
}
return keys(%extras) if wantarray; # Can be used by manage_extras.
}
sub enable_extras (@) {
my (@extras) = @_;
for my $extra (@extras) {
my $extrapath = "modules/extra/$extra";
if (!-e $extrapath) {
print STDERR "Cannot enable \e[32;1m$extra\e[0m : No such file or directory in modules/extra\n";
next;
}
my $source = "modules/$extra";
if (-e $source) {
print STDERR "Cannot enable \e[32;1m$extra\e[0m : destination in modules exists (might already be enabled?)\n";
next;
}
print "Enabling $extra ... \n";
symlink "extra/$extra", $source or print STDERR "$source: Cannot link to 'extra/$extra': $!\n";
}
}
sub disable_extras (@)
{
opendir my $dd, "modules/extra/";
my @files = readdir($dd);
closedir $dd;
my (@extras) = @_;
EXTRA: for my $extra (@extras) {
my $extrapath = "modules/extra/$extra";
my $source = "modules/$extra";
if (!-e $extrapath) {
print STDERR "Cannot disable \e[32;1m$extra\e[0m : Is not an extra\n";
next;
}
if ((! -l $source) || readlink($source) ne "extra/$extra") {
print STDERR "Cannot disable \e[32;1m$extra\e[0m : Source is not a link or doesn't refer to the right file. Remove manually if this is in error.\n";
next;
}
# Now remove.
print "Disabling $extra ... \n";
unlink "modules/$extra" or print STDERR "Cannot disable \e[32;1m$extra\e[0m : $!\n";
}
}
my $clearscreen = `clear`;
print $clearscreen;
while (1)
{
list_extras; # print the module list
print "\nPlease enter the name of the module or type 'q' to quit.: ";
my $input = <STDIN>;
chop($input); # remove the trailing \n from the user input
if ($input eq "q") {
if (-e "build/CMakeFiles") {
system("cmake", "build/.");
print "\nNow cd build, then run make to build Anope.\n\n";
} else {
print "\nBuild directory not found. You should run ./Config now.\n\n"
}
exit 0;
}
print $clearscreen;
if ($input eq "") {
next;
}
if (-e "modules/$input") {
disable_extras($input)
} else {
enable_extras($input)
}
}
+13 -43
View File
@@ -1,48 +1,18 @@
# 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 version executable to modify version.h, setting it's linker flags as well
add_executable(version version.cpp)
set_target_properties(version PROPERTIES LINKER_LANGUAGE CXX LINK_FLAGS "${LDFLAGS}")
get_target_property(version_BINARY version LOCATION)
# Generate sysconf.h from the earlier configuration
configure_file(
"${CMAKE_CURRENT_SOURCE_DIR}/sysconf.h.cmake"
"${CMAKE_CURRENT_BINARY_DIR}/sysconf.h"
)
# Generate version-bin executable to modify version.h, setting it's linker flags as well
add_executable(version-bin version.cpp)
set(version_BINARY "$<TARGET_FILE:version-bin>")
# Modify version.h from the above executable, with dependencies to version.cpp
# and all of the source files in the main build
add_custom_command(OUTPUT ${CMAKE_CURRENT_BINARY_DIR}/version_build
COMMAND ${version_BINARY} ${Anope_SOURCE_DIR}/src/version.sh ${CMAKE_CURRENT_BINARY_DIR}/version.h
DEPENDS version ${SRC_SRCS}
add_custom_command(OUTPUT ${CMAKE_CURRENT_BINARY_DIR}/version.h ${CMAKE_CURRENT_BINARY_DIR}/build.h
COMMAND version-bin ${Anope_SOURCE_DIR} ${CMAKE_CURRENT_BINARY_DIR}/version.h ${CMAKE_CURRENT_BINARY_DIR}/build.h
DEPENDS version-bin ${SRC_SRCS}
)
# Add version 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)
endif(NOT WIN32)
set(PCH_SOURCES_GCH "")
if(CMAKE_COMPILER_IS_GNUCXX)
string(REPLACE " " ";" PCH_CXXFLAGS ${CXXFLAGS})
file(GLOB INCLUDE_SRCS RELATIVE ${CMAKE_CURRENT_SOURCE_DIR} "*.h")
remove_item_from_list(INCLUDE_SRCS "version.h")
set(PCH_SOURCES "module.h;modules.h;services.h")
foreach(PCH_SOURCE ${PCH_SOURCES})
set(PCH_EXTRAFLAGS "")
if(DEBUG_BUILD)
set(PCH_EXTRAFLAGS "-g")
endif(DEBUG_BUILD)
if(PCH_SOURCE STREQUAL "module.h")
set(PCH_EXTRAFLAGS ${PCH_EXTRAFLAGS} -fPIC)
endif(PCH_SOURCE STREQUAL "module.h")
if(GETTEXT_INCLUDE)
set(PCH_GETTEXT_INCLUDE "-I${GETTEXT_INCLUDE}")
endif(GETTEXT_INCLUDE)
set(PCH_SOURCES_GCH "${PCH_SOURCES_GCH};${CMAKE_CURRENT_BINARY_DIR}/${PCH_SOURCE}.gch")
add_custom_command(OUTPUT ${CMAKE_CURRENT_BINARY_DIR}/${PCH_SOURCE}.gch
COMMAND ${CMAKE_CXX_COMPILER} ARGS ${PCH_CXXFLAGS} ${PCH_EXTRAFLAGS} ${PCH_GETTEXT_INCLUDE} -I${CMAKE_CURRENT_BINARY_DIR} ${CMAKE_CURRENT_SOURCE_DIR}/${PCH_SOURCE} -o ${CMAKE_CURRENT_BINARY_DIR}/${PCH_SOURCE}.gch
DEPENDS ${INCLUDE_SRCS} VERBATIM
)
endforeach(PCH_SOURCE ${PCH_SOURCES})
endif(CMAKE_COMPILER_IS_GNUCXX)
# Add a custom target to the above file
add_custom_target(headers DEPENDS version ${CMAKE_CURRENT_BINARY_DIR}/version_build ${PCH_SOURCES_GCH})
add_custom_target(headers DEPENDS ${CMAKE_CURRENT_BINARY_DIR}/version.h ${CMAKE_CURRENT_BINARY_DIR}/build.h)
+135 -33
View File
@@ -1,5 +1,23 @@
#ifndef ACCESS_H
#define ACCESS_H
// Anope IRC Services <https://www.anope.org/>
//
// Copyright (C) 2003-2026 Anope Contributors
//
// Anope is free software. You can use, modify, and/or distribute it under the
// terms of version 2 of the GNU General Public License. See docs/LICENSE.txt
// for the complete terms of this license and docs/AUTHORS.txt for a list of
// contributors.
//
// Based on the original code of Epona by Lara
// Based on the original code of Services by Andy Church
//
// SPDX-License-Identifier: GPL-2.0-only
#pragma once
#include "services.h"
#include "anope.h"
#include "serialize.h"
#include "service.h"
enum
{
@@ -7,20 +25,26 @@ enum
ACCESS_FOUNDER = 10001
};
struct CoreExport Privilege
/* A privilege, probably configured using a privilege{} block. Most
* commands require specific privileges to be executed. The AccessProvider
* backing each ChanAccess determines whether that ChanAccess has a given
* privilege.
*/
struct CoreExport Privilege final
{
Anope::string name;
Anope::string desc;
/* Rank relative to other privileges */
int rank;
Privilege(const Anope::string &n, const Anope::string &d, int r);
Privilege(const Anope::string &name, const Anope::string &desc, int rank);
bool operator==(const Privilege &other) const;
};
class CoreExport PrivilegeManager
class CoreExport PrivilegeManager final
{
static std::vector<Privilege> privs;
public:
static std::vector<Privilege> Privileges;
public:
static void AddPrivilege(Privilege p);
static void RemovePrivilege(Privilege &p);
static Privilege *FindPrivilege(const Anope::string &name);
@@ -28,58 +52,136 @@ class CoreExport PrivilegeManager
static void ClearPrivileges();
};
class ChanAccess;
class CoreExport AccessProvider : public Service
/* A provider of access. Only used for creating ChanAccesses, as
* they contain pure virtual functions.
*/
class CoreExport AccessProvider
: public Service
{
public:
AccessProvider(Module *o, const Anope::string &n);
public:
AccessProvider(Module *owner, const Anope::string &name);
virtual ~AccessProvider();
/** Creates a new ChanAccess entry using this provider.
* @return The new entry
*/
virtual ChanAccess *Create() = 0;
virtual void GetAccess(CommandSource& source, const Privilege *p, Anope::map<Anope::string> &access) = 0;
static void SendAccess(CommandSource &source, const Anope::string &pname);
private:
static std::list<AccessProvider *> Providers;
public:
static const std::list<AccessProvider *>& GetProviders();
};
class CoreExport ChanAccess : public Serializable
/* Represents one entry of an access list on a channel. */
class CoreExport ChanAccess
: public Serializable
{
public:
AccessProvider *provider;
ChannelInfo *ci;
public:
struct Type final
: public Serialize::Type
{
Type();
void Serialize(Serializable *obj, Serialize::Data &data) const override;
Serializable *Unserialize(Serializable *obj, Serialize::Data &data) const override;
};
private:
Anope::string mask;
/* account this access entry is for, if any */
Serialize::Reference<NickCore> nc;
public:
typedef std::vector<ChanAccess *> Path;
/* The provider that created this access entry */
AccessProvider *provider;
/* Channel this access entry is on */
Serialize::Reference<ChannelInfo> ci;
Anope::string creator;
Anope::string description;
time_t last_seen;
time_t created;
ChanAccess(AccessProvider *p);
virtual ~ChanAccess();
Anope::string serialize_name() const;
serialized_data serialize();
static void unserialize(serialized_data &);
void SetMask(const Anope::string &mask, ChannelInfo *ci);
const Anope::string &Mask() const;
NickCore *GetAccount() const;
virtual bool Matches(User *u, NickCore *nc);
static const unsigned int MAX_DEPTH = 4;
/** Check if this access entry matches the given user or account
* @param u The user
* @param nc The account
* @param next Next channel to check if any
*/
virtual bool Matches(const User *u, const NickCore *nc, ChannelInfo *&next) const;
/** Check if this access entry has the given privilege.
* @param name The privilege name
*/
virtual bool HasPriv(const Anope::string &name) const = 0;
virtual Anope::string Serialize() = 0;
virtual void Unserialize(const Anope::string &data) = 0;
bool operator>(const ChanAccess &other) const;
bool operator<(const ChanAccess &other) const;
/** Serialize the access given by this access entry into a human
* readable form. chanserv/access will return a number, chanserv/xop
* will be AOP, SOP, etc.
*/
virtual Anope::string AccessSerialize() const = 0;
/** Unserialize this access entry from the given data. This data
* will be fetched from AccessSerialize.
*/
virtual void AccessUnserialize(const Anope::string &data) = 0;
/* Comparison operators to other Access entries */
virtual bool operator>(const ChanAccess &other) const;
virtual bool operator<(const ChanAccess &other) const;
bool operator>=(const ChanAccess &other) const;
bool operator<=(const ChanAccess &other) const;
};
class CoreExport AccessGroup : public std::vector<ChanAccess *>
/* A group of access entries. This is used commonly, for example with ChannelInfo::AccessFor,
* to show what access a user has on a channel because users can match multiple access entries.
*/
class CoreExport AccessGroup final
{
public:
ChannelInfo *ci;
NickCore *nc;
bool SuperAdmin, Founder;
public:
/* access entries + paths */
std::vector<ChanAccess::Path> paths;
/* Channel these access entries are on */
const ChannelInfo *ci;
/* Account these entries affect, if any */
const NickCore *nc;
/* super_admin always gets all privs. founder is a special case where ci->founder == nc */
bool super_admin, founder;
AccessGroup();
/** Check if this access group has a certain privilege. Eg, it
* will check every ChanAccess entry of this group for any that
* has the given privilege.
* @param priv The privilege
* @return true if any entry has the given privilege
*/
bool HasPriv(const Anope::string &priv) const;
ChanAccess *Highest() const;
/** Get the "highest" access entry from this group of entries.
* The highest entry is determined by the entry that has the privilege
* with the highest rank (see Privilege::rank).
* @return The "highest" entry
*/
const ChanAccess *Highest() const;
/* Comparison operators to other AccessGroups */
bool operator>(const AccessGroup &other) const;
bool operator<(const AccessGroup &other) const;
bool operator>=(const AccessGroup &other) const;
bool operator<=(const AccessGroup &other) const;
inline bool empty() const { return paths.empty(); }
};
#endif
+227 -274
View File
@@ -1,318 +1,271 @@
#ifndef ACCOUNT_H
#define ACCOUNT_H
// Anope IRC Services <https://www.anope.org/>
//
// Copyright (C) 2003-2026 Anope Contributors
//
// Anope is free software. You can use, modify, and/or distribute it under the
// terms of version 2 of the GNU General Public License. See docs/LICENSE.txt
// for the complete terms of this license and docs/AUTHORS.txt for a list of
// contributors.
//
// Based on the original code of Epona by Lara
// Based on the original code of Services by Andy Church
//
// SPDX-License-Identifier: GPL-2.0-only
#pragma once
#include "extensible.h"
#include "serialize.h"
#include "anope.h"
#include "memo.h"
#include "base.h"
class NickAlias;
class NickCore;
typedef Anope::unordered_map<NickAlias *> nickalias_map;
typedef Anope::unordered_map<NickCore *> nickcore_map;
typedef std::unordered_map<uint64_t, NickCore *> nickcoreid_map;
typedef Anope::insensitive_map<NickAlias *> nickalias_map;
typedef Anope::insensitive_map<NickCore *> nickcore_map;
extern CoreExport Serialize::Checker<nickalias_map> NickAliasList;
extern CoreExport Serialize::Checker<nickcore_map> NickCoreList;
extern CoreExport Serialize::Checker<nickcoreid_map> NickCoreIdList;
extern CoreExport nickalias_map NickAliasList;
extern CoreExport nickcore_map NickCoreList;
/* NickServ nickname structures. */
/** Flags set on NickAliases
/* A registered nickname.
* It matters that Base is here before Extensible (it is inherited by Serializable)
*/
enum NickNameFlag
class CoreExport NickAlias final
: public Serializable
, public Extensible
{
NS_BEGIN,
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;
};
/* Nick never expires */
NS_NO_EXPIRE,
/* This nick is being held after a kill by an enforcer client
* or is being SVSHeld. Used by ns_release to determin if something
* should be allowed to be released
*/
NS_HELD,
/* We are taking over this nick, either by SVSNICK or KILL.
* We are waiting for the confirmation of either of these actions to
* proceed. This is checked in NickAlias::OnCancel
*/
NS_COLLIDED,
private:
Anope::string vhost_ident, vhost_host, vhost_creator;
time_t vhost_created = 0;
NS_END
};
public:
Anope::string nick;
Anope::string last_quit;
/* Last cloaked user@host this nick was seen using. */
Anope::string last_userhost;
/* Last real user@host this nick was seen using. */
Anope::string last_userhost_real;
time_t registered = Anope::CurTime;
time_t last_seen = Anope::CurTime;
const Anope::string NickNameFlagStrings[] = {
"BEGIN", "NO_EXPIRE", "HELD", "COLLIDED", ""
};
/* Account this nick is tied to. Multiple nicks can be tied to a single account. */
Serialize::Reference<NickCore> nc;
/** Flags set on NickCores
*/
enum NickCoreFlag
{
NI_BEGIN,
/* Kill others who take this nick */
NI_KILLPROTECT,
/* Dont recognize unless IDENTIFIED */
NI_SECURE,
/* Use PRIVMSG instead of NOTICE */
NI_MSG,
/* Don't allow user to change memo limit */
NI_MEMO_HARDMAX,
/* Notify of memos at signon and un-away */
NI_MEMO_SIGNON,
/* Notify of new memos when sent */
NI_MEMO_RECEIVE,
/* Don't show in LIST to non-servadmins */
NI_PRIVATE,
/* Don't show email in INFO */
NI_HIDE_EMAIL,
/* Don't show last seen address in INFO */
NI_HIDE_MASK,
/* Don't show last quit message in INFO */
NI_HIDE_QUIT,
/* Kill in 20 seconds instead of in 60 */
NI_KILL_QUICK,
/* Kill immediatly */
NI_KILL_IMMED,
/* User gets email on memo */
NI_MEMO_MAIL,
/* Don't show services access status */
NI_HIDE_STATUS,
/* Nickname is suspended */
NI_SUSPENDED,
/* Autoop nickname in channels */
NI_AUTOOP,
/* This nickcore is forbidden, which means the nickalias for it is aswell */
NI_FORBIDDEN,
/* If set means the nick core does not have their email addrses confirmed.
*/
NI_UNCONFIRMED,
NI_END
};
const Anope::string NickCoreFlagStrings[] = {
"BEGIN", "KILLPROTECT", "SECURE", "MSG", "MEMO_HARDMAX", "MEMO_SIGNON", "MEMO_RECEIVE",
"PRIVATE", "HIDE_EMAIL", "HIDE_MASK", "HIDE_QUIT", "KILL_QUICK", "KILL_IMMED",
"MEMO_MAIL", "HIDE_STATUS", "SUSPENDED", "AUTOOP", "FORBIDDEN", "UNCONFIRMED", ""
};
class CoreExport NickAlias : public Extensible, public Flags<NickNameFlag, NS_END>, public Serializable
{
public:
/** Default constructor
/** Constructor
* @param nickname The nick
* @param nickcore The nickcofe for this nick
* @param nickcore The nickcore for this nick
*/
NickAlias(const Anope::string &nickname, NickCore *nickcore);
/** Default destructor
*/
~NickAlias();
Anope::string nick; /* Nickname */
Anope::string last_quit; /* Last quit message */
Anope::string last_realname; /* Last realname */
Anope::string last_usermask; /* Last usermask */
Anope::string last_realhost; /* Last uncloaked usermask, requires nickserv/auspex to see */
time_t time_registered; /* When the nick was registered */
time_t last_seen; /* When it was seen online for the last time */
NickCore *nc; /* I'm an alias of this */
HostInfo hostinfo;
Anope::string serialize_name() const;
serialized_data serialize();
static void unserialize(serialized_data &);
/** Release a nick
* See the comment in users.cpp
/** Set a vhost for the user
* @param ident The ident
* @param host The host
* @param creator Who created the vhost
* @param time When the vhost was created
*/
void Release();
void SetVHost(const Anope::string &ident, const Anope::string &host, const Anope::string &creator, time_t created = Anope::CurTime);
/** This function is called when a user on this nick either disconnects or changes nick.
* Note that the user isnt necessarially identified to this nick
* See the comment in users.cpp
* @param u The user
/** Remove a users vhost
**/
void RemoveVHost();
/** Check if the user has a vhost
* @return true or false
*/
void OnCancel(User *u);
bool HasVHost() const;
/** Retrieve the vhost ident
* @return the ident
*/
const Anope::string &GetVHostIdent() const;
/** Retrieve the vhost host
* @return the host
*/
const Anope::string &GetVHostHost() const;
/** Retrieve the vhost mask
* @param the mask
*/
Anope::string GetVHostMask() const;
/** Retrieve the vhost creator
* @return the creator
*/
const Anope::string &GetVHostCreator() const;
/** Retrieve when the vhost was created
* @return the time it was created
*/
time_t GetVHostCreated() const;
/** Update the last seen time for the nickname.
* @param u The user who is using the nickname.
*/
void UpdateSeen(User *u);
/** Finds a registered nick
* @param nick The nick to lookup
* @return the nick, if found
*/
static NickAlias *Find(const Anope::string &nick);
static NickAlias *FindId(uint64_t uid);
};
class CoreExport NickCore : public Extensible, public Flags<NickCoreFlag, NI_END>, public Serializable
/* A registered account. Each account must have a NickAlias with the same nick as the
* account's display.
* It matters that Base is here before Extensible (it is inherited by Serializable)
*/
class CoreExport NickCore final
: public Serializable
, public Extensible
{
public:
/** Default constructor
* @param display The display nick
*/
NickCore(const Anope::string &nickdisplay);
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;
};
/** Default destructor
*/
~NickCore();
std::list<User *> Users;
Anope::string display; /* How the nick is displayed */
Anope::string pass; /* Password of the nicks */
Anope::string email; /* E-mail associated to the nick */
Anope::string greet; /* Greet associated to the nick */
Anope::string language; /* Language name */
std::vector<Anope::string> access; /* Access list, vector of strings */
std::vector<Anope::string> cert; /* ssl certificate list, vector of strings */
private:
/* Channels which reference this core in some way (this is on their access list, akick list, is founder, successor, etc) */
Serialize::Checker<std::map<ChannelInfo *, int> > chanaccess;
/* Unique identifier for the account. */
uint64_t uniqueid;
public:
/* Name of the account. Find(display)->nc == this. */
Anope::string display;
/* User password in form of hashm:data */
Anope::string pass;
Anope::string email;
/* Locale name of the language of the user. Empty means default language */
Anope::string language;
/* Last time an email was sent to this user */
time_t lastmail = 0;
/* The time this account was registered */
time_t registered = Anope::CurTime;
MemoInfo memos;
std::map<Anope::string, ModeData> last_modes;
Oper *o;
/* Nicknames registered that are grouped to this account.
* for n in aliases, n->nc == this.
*/
Serialize::Checker<std::vector<NickAlias *> > aliases;
/* Set if this user is a services operator. o->ot must exist. */
Oper *o = nullptr;
/* Unsaved data */
uint16_t channelcount; /* Number of channels currently registered */
time_t lastmail; /* Last time this nick record got a mail */
std::list<NickAlias *> aliases; /* List of aliases */
Anope::string serialize_name() const;
serialized_data serialize();
static void unserialize(serialized_data &);
/** The display nick for this account. */
Serialize::Reference<NickAlias> na;
/* Number of channels registered by this account */
uint16_t channelcount = 0;
/* Users online now logged into this account */
std::list<User *> users;
/** Constructor
* @param display The display nick
* @param id The account id
*/
NickCore(const Anope::string &nickdisplay, uint64_t nickid = 0);
~NickCore();
/** Changes the display for this account
* @param na The new display, must be grouped to this account.
*/
void SetDisplay(NickAlias *na);
/** Checks whether this account is a services oper or not.
* @return True if this account is a services oper, false otherwise.
*/
virtual bool IsServicesOper() const;
bool IsServicesOper() const;
/** Add an entry to the nick's access list
*
* @param entry The nick!ident@host entry to add to the access list
*
* Adds a new entry into the access list.
/** Retrieves the account id for this user */
uint64_t GetId();
/** Finds an account
* @param nick The account name to find
* @return The account, if it exists
*/
void AddAccess(const Anope::string &entry);
/** Get an entry from the nick's access list by index
*
* @param entry Index in the access list vector to retrieve
* @return The access list entry of the given index if within bounds, an empty string if the vector is empty or the index is out of bounds
*
* Retrieves an entry from the access list corresponding to the given index.
*/
Anope::string GetAccess(unsigned entry) const;
/** Find an entry in the nick's access list
*
* @param entry The nick!ident@host entry to search for
* @return True if the entry is found in the access list, false otherwise
*
* Search for an entry within the access list.
*/
bool FindAccess(const Anope::string &entry);
/** Erase an entry from the nick's access list
*
* @param entry The nick!ident@host entry to remove
*
* Removes the specified access list entry from the access list.
*/
void EraseAccess(const Anope::string &entry);
/** Clears the entire nick's access list
*
* Deletes all the memory allocated in the access list vector and then clears the vector.
*/
void ClearAccess();
/** Add an entry to the nick's certificate list
*
* @param entry The fingerprint to add to the cert list
*
* Adds a new entry into the cert list.
*/
void AddCert(const Anope::string &entry);
/** Get an entry from the nick's cert list by index
*
* @param entry Index in the certificaate list vector to retrieve
* @return The fingerprint entry of the given index if within bounds, an empty string if the vector is empty or the index is out of bounds
*
* Retrieves an entry from the certificate list corresponding to the given index.
*/
Anope::string GetCert(unsigned entry) const;
/** Find an entry in the nick's cert list
*
* @param entry The fingerprint to search for
* @return True if the fingerprint is found in the cert list, false otherwise
*
* Search for an fingerprint within the cert list.
*/
bool FindCert(const Anope::string &entry);
/** Erase a fingerprint from the nick's certificate list
*
* @param entry The fingerprint to remove
*
* Removes the specified fingerprint from the cert list.
*/
void EraseCert(const Anope::string &entry);
/** Clears the entire nick's cert list
*
* Deletes all the memory allocated in the certificate list vector and then clears the vector.
*/
void ClearCert();
static NickCore *Find(const Anope::string &nick);
static NickCore *FindId(uint64_t uid);
void AddChannelReference(ChannelInfo *ci);
void RemoveChannelReference(ChannelInfo *ci);
void GetChannelReferences(std::deque<ChannelInfo *> &queue);
};
/** Timer for colliding nicks to force people off of nicknames
/* A request to check if an account/password is valid. These can exist for
* extended periods due to the time some authentication modules take.
*/
class CoreExport NickServCollide : public Timer
class CoreExport IdentifyRequest
{
dynamic_reference<User> u;
Anope::string nick;
/* Owner of this request, used to cleanup requests if a module is unloaded
* while a request us pending */
Module *owner;
Anope::string account;
Anope::string password;
Anope::string address;
public:
/** Default constructor
* @param nick The nick we're colliding
* @param delay How long to delay before kicking the user off the nick
*/
NickServCollide(User *user, time_t delay);
std::set<Module *> holds;
bool dispatched = false;
bool success = false;
/** Default destructor
*/
virtual ~NickServCollide();
static std::set<IdentifyRequest *> Requests;
/** Called when the delay is up
* @param t The current time
protected:
IdentifyRequest(Module *o, const Anope::string &acc, const Anope::string &pass, const Anope::string &ip);
virtual ~IdentifyRequest();
public:
/* One of these is called when the request goes through */
virtual void OnSuccess(NickAlias *na) = 0;
virtual void OnFail() = 0;
Module *GetOwner() const { return owner; }
const Anope::string &GetAccount() const { return account; }
const Anope::string &GetPassword() const { return password; }
const Anope::string &GetAddress() const { return address; }
/* Holds this request. When a request is held it must be Released later
* for the request to complete. Multiple modules may hold a request at any time,
* but the request is not complete until every module has released it. If you do not
* require holding this (eg, your password check is done in this thread and immediately)
* then you don't need to hold the request before calling `Success()`.
* @param m The module holding this request
*/
void Tick(time_t t);
void Hold(Module *m);
/** Releases a held request
* @param m The module releasing the hold
*/
void Release(Module *m);
/** Called by modules when this IdentifyRequest has succeeded.
* If this request is behind held it must still be Released after calling this.
* @param m The module confirming authentication
*/
void Success(Module *m, NickAlias *na);
/** Used to either finalize this request or marks
* it as dispatched and begins waiting for the module(s)
* that have holds to finish.
*/
void Dispatch();
static void ModuleUnload(Module *m);
};
/** Timers for removing HELD status from nicks.
*/
class NickServHeld : public Timer
{
dynamic_reference<NickAlias> na;
Anope::string nick;
public:
NickServHeld(NickAlias *n, long t);
~NickServHeld();
void Tick(time_t);
};
/** Timers for releasing nicks to be available for use
*/
class CoreExport NickServRelease : public User, public Timer
{
Anope::string nick;
public:
/** Default constructor
* @param na The nick
* @param delay The delay before the nick is released
*/
NickServRelease(NickAlias *na, time_t delay);
/** Default destructor
*/
virtual ~NickServRelease();
/** Called when the delay is up
* @param t The current time
*/
void Tick(time_t t);
};
#endif // ACCOUNT_H
+387 -217
View File
@@ -1,42 +1,42 @@
/*
* (C) 2003-2012 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
#ifndef ANOPE_H
#define ANOPE_H
#pragma once
#include <signal.h>
#include <string>
#include <vector>
#include <set>
#include "hashcomp.h"
class Message;
#define UTF_CPP_CPLUSPLUS 201703L
#include "utfcpp/unchecked.h"
namespace Anope
{
template<typename T> class map : public std::map<string, T> { };
template<typename T> class insensitive_map : public std::map<string, T, ci::less> { };
/**
* A wrapper string class around all the other string classes, this class will
* allow us to only require one type of string everywhere that can be converted
* at any time to a specific type of string.
*/
class string
class CoreExport string final
{
private:
private:
/**
* The actual string is stored in an std::string as it can be converted to
* ci::string, irc::string, or a C-style string at any time.
* ci::string, or a C-style string at any time.
*/
std::string _string;
public:
public:
/**
* Extras.
*/
@@ -45,6 +45,7 @@ namespace Anope
typedef std::string::reverse_iterator reverse_iterator;
typedef std::string::const_reverse_iterator const_reverse_iterator;
typedef std::string::size_type size_type;
typedef std::string::value_type value_type;
static const size_type npos = static_cast<size_type>(-1);
/**
@@ -54,11 +55,13 @@ namespace Anope
string(char chr) : _string() { _string = chr; }
string(size_type n, char chr) : _string(n, chr) { }
string(const char *_str) : _string(_str) { }
string(const char *_str, size_type n) : _string(_str, n) { }
string(const std::string &_str) : _string(_str) { }
string(const ci::string &_str) : _string(_str.c_str()) { }
string(const irc::string &_str) : _string(_str.c_str()) { }
string(const string &_str, size_type pos = 0, size_type n = npos) : _string(_str._string, pos, n) { }
string(const std::string_view &_sv) : _string(_sv.begin(), _sv.end()) { }
string(const string &_str, size_type pos, size_type n = npos) : _string(_str._string, pos, n) { }
template <class InputIterator> string(InputIterator first, InputIterator last) : _string(first, last) { }
string(const string &) = default;
/**
* Assignment operators, so any type of string can be assigned to this class.
@@ -66,8 +69,6 @@ namespace Anope
inline string &operator=(char chr) { this->_string = chr; return *this; }
inline string &operator=(const char *_str) { this->_string = _str; return *this; }
inline string &operator=(const std::string &_str) { this->_string = _str; return *this; }
inline string &operator=(const ci::string &_str) { this->_string = _str.c_str(); return *this; }
inline string &operator=(const irc::string &_str) { this->_string = _str.c_str(); return *this; }
inline string &operator=(const string &_str) { if (this != &_str) this->_string = _str._string; return *this; }
/**
@@ -75,35 +76,21 @@ namespace Anope
*/
inline bool operator==(const char *_str) const { return this->_string == _str; }
inline bool operator==(const std::string &_str) const { return this->_string == _str; }
inline bool operator==(const ci::string &_str) const { return ci::string(this->_string.c_str()) == _str; }
inline bool operator==(const irc::string &_str) const { return irc::string(this->_string.c_str()) == _str; }
inline bool operator==(const string &_str) const { return this->_string == _str._string; }
inline bool equals_cs(const char *_str) const { return this->_string == _str; }
inline bool equals_cs(const std::string &_str) const { return this->_string == _str; }
inline bool equals_cs(const ci::string &_str) const { return this->_string == _str.c_str(); }
inline bool equals_cs(const irc::string &_str) const { return this->_string == _str.c_str(); }
inline bool equals_cs(const string &_str) const { return this->_string == _str._string; }
inline bool equals_ci(const char *_str) const { return ci::string(this->_string.c_str()) == _str; }
inline bool equals_ci(const std::string &_str) const { return ci::string(this->_string.c_str()) == _str.c_str(); }
inline bool equals_ci(const ci::string &_str) const { return _str == this->_string.c_str(); }
inline bool equals_ci(const irc::string &_str) const { return ci::string(this->_string.c_str()) == _str.c_str(); }
inline bool equals_ci(const string &_str) const { return ci::string(this->_string.c_str()) == _str._string.c_str(); }
inline bool equals_irc(const char *_str) const { return irc::string(this->_string.c_str()) == _str; }
inline bool equals_irc(const std::string &_str) const { return irc::string(this->_string.c_str()) == _str.c_str(); }
inline bool equals_irc(const ci::string &_str) const { return irc::string(this->_string.c_str()) == _str.c_str(); }
inline bool equals_irc(const irc::string &_str) const { return _str == this->_string.c_str(); }
inline bool equals_irc(const string &_str) const { return irc::string(this->_string.c_str()) == _str._string.c_str(); }
/**
* Inequality operators, exact opposites of the above.
*/
inline bool operator!=(const char *_str) const { return !operator==(_str); }
inline bool operator!=(const std::string &_str) const { return !operator==(_str); }
inline bool operator!=(const ci::string &_str) const { return !operator==(_str); }
inline bool operator!=(const irc::string &_str) const { return !operator==(_str); }
inline bool operator!=(const string &_str) const { return !operator==(_str); }
/**
@@ -112,8 +99,6 @@ namespace Anope
inline string &operator+=(char chr) { this->_string += chr; return *this; }
inline string &operator+=(const char *_str) { this->_string += _str; return *this; }
inline string &operator+=(const std::string &_str) { this->_string += _str; return *this; }
inline string &operator+=(const ci::string &_str) { this->_string += _str.c_str(); return *this; }
inline string &operator+=(const irc::string &_str) { this->_string += _str.c_str(); return *this; }
inline string &operator+=(const string &_str) { if (this != &_str) this->_string += _str._string; return *this; }
/**
@@ -122,15 +107,11 @@ namespace Anope
inline const string operator+(char chr) const { return string(*this) += chr; }
inline const string operator+(const char *_str) const { return string(*this) += _str; }
inline const string operator+(const std::string &_str) const { return string(*this) += _str; }
inline const string operator+(const ci::string &_str) const { return string(*this) += _str; }
inline const string operator+(const irc::string &_str) const { return string(*this) += _str; }
inline const string operator+(const string &_str) const { return string(*this) += _str; }
friend const string operator+(char chr, const string &str);
friend const string operator+(const char *_str, const string &str);
friend const string operator+(const std::string &_str, const string &str);
friend const string operator+(const ci::string &_str, const string &str);
friend const string operator+(const irc::string &_str, const string &str);
/**
* Less-than operator.
@@ -141,10 +122,10 @@ namespace Anope
* The following functions return the various types of strings.
*/
inline const char *c_str() const { return this->_string.c_str(); }
inline const char *data() const { return this->_string.data(); }
inline std::string &str() { return this->_string; }
inline const std::string &str() const { return this->_string; }
inline ci::string ci_str() const { return ci::string(this->_string.c_str()); }
inline irc::string irc_str() const { return irc::string(this->_string.c_str()); }
/**
* Returns if the string is empty or not.
@@ -155,6 +136,7 @@ namespace Anope
* Returns the string's length.
*/
inline size_type length() const { return this->_string.length(); }
inline size_type utf8length() const { return utf8::unchecked::distance(str().begin(), str().end()); }
/**
* Returns the size of the currently allocated storage space in the string object.
@@ -167,6 +149,9 @@ namespace Anope
*/
inline void push_back(char c) { return this->_string.push_back(c); }
inline string &append(const string &s) { this->_string.append(s.str()); return *this; }
inline string &append(const char *s, size_t n) { this->_string.append(s, n); return *this; }
/**
* Resizes the string content to n characters.
*/
@@ -182,12 +167,26 @@ namespace Anope
/**
* Trim leading and trailing white spaces from the string.
*/
inline void trim()
inline string &ltrim(const Anope::string &what = " \t\r\n")
{
while (!this->_string.empty() && isspace(this->_string[0]))
while (!this->_string.empty() && what.find(this->_string[0]) != Anope::string::npos)
this->_string.erase(this->_string.begin());
while (!this->_string.empty() && isspace(this->_string[this->_string.length() - 1]))
return *this;
}
inline string &rtrim(const Anope::string &what = " \t\r\n")
{
while (!this->_string.empty() && what.find(this->_string[this->_string.length() - 1]) != Anope::string::npos)
this->_string.erase(this->_string.length() - 1);
return *this;
}
inline string &trim(const Anope::string &what = " \t\r\n")
{
this->ltrim(what);
this->rtrim(what);
return *this;
}
/**
@@ -220,12 +219,24 @@ namespace Anope
inline size_type find_last_not_of(const string &_str, size_type pos = npos) const { return this->_string.find_last_not_of(_str._string, pos); }
inline size_type find_last_not_of_ci(const string &_str, size_type pos = npos) const { return ci::string(this->_string.c_str()).find_last_not_of(ci::string(_str._string.c_str()), pos); }
inline int compare(size_t pos, size_t len, const string &str) const { return ci::string(this->_string.c_str()).compare(pos, len, ci::string(str.c_str())); }
inline int compare(size_t pos, size_t len, const string &str, size_t subpos, size_type sublen = npos) const { return ci::string(this->_string.c_str()).compare(pos, len, ci::string(str.c_str()), subpos, sublen); }
inline int compare(size_t pos, size_t len, const char *s, size_type n = npos) const { return ci::string(this->_string.c_str()).compare(pos, len, s, n); }
/**
* Determine if string consists of only numbers.
*/
inline bool is_number_only() const { return this->find_first_not_of("0123456789.-") == npos; }
inline bool is_pos_number_only() const { return this->find_first_not_of("0123456789.") == npos; }
/**
* In IRC messages we use a substitute (ASCII 0x1B) instead of a space
* (ASCII 0x20) so it doesn't get line wrapped when put into a message.
* The line wrapper will convert this to a space before it is sent to
* clients.
*/
inline Anope::string nobreak() const { return this->replace_all_cs("\x20", "\x1B"); }
/**
* Replace parts of the string.
*/
@@ -235,7 +246,7 @@ namespace Anope
inline string replace(iterator first, iterator last, const string &_str) { return string(this->_string.replace(first, last, _str._string)); }
inline string replace(iterator first, iterator last, size_type n, char chr) { return string(this->_string.replace(first, last, n, chr)); }
template <class InputIterator> inline string replace(iterator first, iterator last, InputIterator f, InputIterator l) { return string(this->_string.replace(first, last, f, l)); }
inline string replace_all_cs(const string &_orig, const string &_repl)
inline string replace_all_cs(const string &_orig, const string &_repl) const
{
Anope::string new_string = *this;
size_type pos = new_string.find(_orig), orig_length = _orig.length(), repl_length = _repl.length();
@@ -246,7 +257,7 @@ namespace Anope
}
return new_string;
}
inline string replace_all_ci(const string &_orig, const string &_repl)
inline string replace_all_ci(const string &_orig, const string &_repl) const
{
Anope::string new_string = *this;
size_type pos = new_string.find_ci(_orig), orig_length = _orig.length(), repl_length = _repl.length();
@@ -261,22 +272,22 @@ namespace Anope
/**
* Get the string in lowercase.
*/
inline string lower()
inline string lower() const
{
Anope::string new_string = *this;
for (size_type i = 0; i < new_string.length(); ++i)
new_string[i] = static_cast<char>(tolower(new_string[i]));
for (auto &chr : new_string)
chr = Anope::tolower(chr);
return new_string;
}
/**
* Get the string in uppercase.
*/
inline string upper()
inline string upper() const
{
Anope::string new_string = *this;
for (size_type i = 0; i < new_string.length(); ++i)
new_string[i] = static_cast<char>(toupper(new_string[i]));
for (auto &chr : new_string)
chr = Anope::toupper(chr);
return new_string;
}
@@ -307,59 +318,144 @@ namespace Anope
* Stream insertion operator, must be friend because they cannot be inside the class.
*/
friend std::ostream &operator<<(std::ostream &os, const string &_str);
};
/** Hash an Anope::string for unorderd_map, passed as the third template arg to unordered_map
*/
struct hash
{
/* VS 2008 specific code */
enum { bucket_size = 4, min_buckets = 8 };
bool operator()(const string &s1, const string &s2) const;
/* End of 2008 specific code */
/** Hash an Anope::string for unordered_map
* @param s The string
* @return A hash value for the string
*/
bool operator()(const string &s) const;
friend std::istream &operator>>(std::istream &is, string &_str);
};
inline std::ostream &operator<<(std::ostream &os, const string &_str) { return os << _str._string; }
/* This is not standard to make operator>> behave like operator<< in that it will allow extracting a whole line, not just one word */
inline std::istream &operator>>(std::istream &is, string &_str) { return std::getline(is, _str._string); }
inline const string operator+(char chr, const string &str) { string tmp(chr); tmp += str; return tmp; }
inline const string operator+(const char *_str, const string &str) { string tmp(_str); tmp += str; return tmp; }
inline const string operator+(const std::string &_str, const string &str) { string tmp(_str); tmp += str; return tmp; }
inline const string operator+(const ci::string &_str, const string &str) { string tmp(_str); tmp += str; return tmp; }
inline const string operator+(const irc::string &_str, const string &str) { string tmp(_str); tmp += str; return tmp; }
struct hash_ci final
{
inline size_t operator()(const string &s) const
{
return std::hash<std::string>()(s.lower().str());
}
};
struct hash_cs final
{
inline size_t operator()(const string &s) const
{
return std::hash<std::string>()(s.str());
}
};
struct compare final
{
inline bool operator()(const string &s1, const string &s2) const
{
return s1.equals_ci(s2);
}
};
template<typename T>
using map = std::map<string, T, ci::less>;
template<typename T>
using multimap = std::multimap<string, T, ci::less>;
template<typename T>
using unordered_map = std::unordered_map<string, T, hash_ci, compare>;
#if !REPRODUCIBLE_BUILD
static const char *const compiled = __TIME__ " " __DATE__;
#endif
/** The time Anope started.
*/
extern CoreExport time_t StartTime;
/** The value to return from main()
*/
extern int ReturnValue;
extern sig_atomic_t Signal;
extern CoreExport bool Quitting;
extern CoreExport bool Restarting;
extern CoreExport Anope::string QuitReason;
/** The current system time, which is pretty close to being accurate.
* Use this unless you need very specific time checks
*/
extern CoreExport time_t CurTime;
extern CoreExport long long CurTimeNs;
/** The debug level we are running at.
*/
extern CoreExport unsigned Debug;
/** Other command line options.
*/
extern CoreExport bool ReadOnly, NoFork, NoThird, NoDB, NoPID, NoExpire, ProtocolDebug;
/** The root of the Anope installation. Usually ~/anope
*/
extern CoreExport Anope::string ServicesDir;
/** Anope binary name (eg anope)
*/
extern CoreExport Anope::string ServicesBin;
/** Various directory paths. These can be set at runtime by command line args
*/
extern CoreExport Anope::string ConfigDir;
extern CoreExport Anope::string DataDir;
extern CoreExport Anope::string ModuleDir;
extern CoreExport Anope::string LocaleDir;
extern CoreExport Anope::string LogDir;
/** The uplink we are currently connected to
*/
extern CoreExport size_t CurrentUplink;
/** Various methods to determine the Anope version running
*/
extern CoreExport string Version();
extern CoreExport string VersionShort();
extern CoreExport string VersionBuildString();
extern CoreExport int VersionMajor();
extern CoreExport int VersionMinor();
extern CoreExport int VersionPatch();
extern CoreExport int VersionBuild();
extern CoreExport unsigned VersionMajor();
extern CoreExport unsigned VersionMinor();
extern CoreExport unsigned VersionPatch();
/** Determines if we are still attached to the terminal, and can print
* messages to the user via stderr/stdout.
* @return true if still attached
*/
extern bool AtTerm();
/** Used to "fork" the process and go into the background during initial startup
* while we are AtTerm(). The actual fork is not done here, but earlier, and this
* simply notifies the parent via kill() to exit().
*/
extern void Fork();
/** Does something with the signal in Anope::Signal
*/
extern void HandleSignal();
/** One of the first functions called, does general initialization such as reading
* command line args, loading the configuration, doing the initial fork() if necessary,
* initializing language support, loading modules, and loading databases.
* @throws CoreException if something bad went wrong
*/
extern bool Init(int ac, char **av);
/** Calls the save database event
*/
extern CoreExport void SaveDatabases();
/** Check whether two strings match.
* @param str The string to check against the pattern (e.g. foobar)
* @param mask The pattern to check (e.g. foo*bar)
* @param case_sensitive Whether or not the match is case sensitive, default false.
* @param use_regex Whether or not to try regex. case_sensitive is not used in regex.
*/
extern CoreExport bool Match(const Anope::string &str, const Anope::string &mask, bool case_sensitive = false);
/** Find a message in the message table
* @param name The name of the message were looking for
* @return NULL if we cant find it, or a pointer to the Message if we can
*/
extern CoreExport std::vector<Message *> FindMessage(const string &name);
extern CoreExport bool Match(const string &str, const string &mask, bool case_sensitive = false, bool use_regex = false);
/** Converts a string to hex
* @param the data to be converted
@@ -372,29 +468,14 @@ namespace Anope
* @param src The data to be converted
* @param dest The destination string
*/
extern CoreExport void Unhex(const Anope::string &src, Anope::string &dest);
extern CoreExport void Unhex(const Anope::string &src, char *dest);
/** Base 64 encode a string
* @param src The string to encode
* @param target Where the encoded string is placed
*/
extern CoreExport void B64Encode(const Anope::string &src, Anope::string &target);
/** Base 64 decode a string
* @param src The base64 encoded string
* @param target The plain text result
*/
extern CoreExport void B64Decode(const Anope::string &src, Anope::string &target);
extern CoreExport void Unhex(const string &src, string &dest);
extern CoreExport void Unhex(const string &src, char *dest, size_t sz);
/** Returns a sequence of data formatted as the format argument specifies.
** After the format parameter, the function expects at least as many
** additional arguments as specified in format.
* @param fmt Format of the Message
* @param ... any number of parameters
* @return a Anope::string
/** Encrypts what is in 'src' to 'dest'
* @param src The source string to encrypt
* @param dest The destination where the encrypted string is placed
*/
extern CoreExport string printf(const char *fmt, ...);
extern CoreExport bool Encrypt(const Anope::string &src, Anope::string &dest);
/** Return the last error code
* @return The error code
@@ -404,162 +485,251 @@ namespace Anope
/** Return the last error, uses errno/GetLastError() to determine this
* @return An error message
*/
extern CoreExport const Anope::string LastError();
extern CoreExport string LastError();
/** Determines if a path is a file
*/
extern CoreExport bool IsFile(const Anope::string &file);
/** Converts a string into seconds
* @param s The string, eg 3d
* @return The time represented by the string, eg 259,200
*/
extern CoreExport time_t DoTime(const Anope::string &s);
/** Retrieves a human readable string representing the time in seconds
* @param seconds The time on seconds, eg 60
* @param nc The account to use language settings for to translate this string, if applicable
* @param round Whether to round the duration to produce a shorter output.
* @return A human readable string, eg "1 minute"
*/
extern CoreExport Anope::string Duration(time_t seconds, const NickCore *nc = nullptr, bool round = false);
/** Generates a human readable string of type "expires in ..."
* @param expires time in seconds
* @param nc The account to use language settings for to translate this string, if applicable
* @return A human readable string, eg "expires in 5 days"
*/
extern CoreExport Anope::string Expires(time_t seconds, const NickCore *nc = NULL);
/** Converts a time in seconds (epoch) to a human readable format.
* @param t The time
* @param nc The account to use language settings for to translate this string, if applicable
* @param short_output If true, the output is just a date (eg, "Apr 12 20:18:22 2009 MSD"), else it includes the date and how long ago/from now that date is, (eg "Apr 12 20:18:22 2009 MSD (1313 days, 9 hours, 32 minutes ago)"
*/
extern CoreExport Anope::string strftime(time_t t, const NickCore *nc = NULL, bool short_output = false);
/** Parses a raw message from the uplink and calls its command handler.
* @param message Raw message from the uplink
*/
extern void Process(const Anope::string &message);
/** Calls the command handler for an already parsed message.
* @param source Source of the message.
* @param command Command name.
* @param params Any extra parameters.
* @param tags IRCv3 message tags.
*/
extern CoreExport void ProcessInternal(MessageSource &src, const Anope::string &command, const std::vector<Anope::string> &params, const Anope::map<Anope::string> & tags);
/** Does a blocking dns query and returns the first IP.
* @param host host to look up
* @param type inet addr type
* @return the IP if it was found, else the host
*/
extern Anope::string Resolve(const Anope::string &host, int type);
/** Does a blocking dns query and returns all IPs.
* @param host host to look up
* @param type inet addr type
* @return A list of all IPs that the host resolves to
*/
extern std::vector<Anope::string> ResolveMultiple(const Anope::string &host, int type);
/** Generate a string of random letters and numbers
* @param len The length of the string returned
*/
extern CoreExport Anope::string Random(size_t len);
/** Generate a random number. */
extern CoreExport int RandomNumber();
/** Update the current time. */
extern CoreExport void UpdateTime();
}
/** sepstream allows for splitting token seperated lists.
/** sepstream allows for splitting token separated lists.
* Each successive call to sepstream::GetToken() returns
* the next token, until none remain, at which point the method returns
* an empty string.
*/
class CoreExport sepstream
{
private:
private:
/** Original string.
*/
Anope::string tokens;
/** Last position of a seperator token
*/
Anope::string::iterator last_starting_position;
/** Current string position
*/
Anope::string::iterator n;
/** Seperator value
/** Separator value
*/
char sep;
public:
/** Current string position
*/
size_t pos = 0;
/** If set then GetToken() can return an empty string
*/
bool allow_empty;
public:
/** Create a sepstream and fill it with the provided data
*/
sepstream(const Anope::string &source, char seperator);
virtual ~sepstream() { }
sepstream(const Anope::string &source, char separator, bool allowempty = false);
/** Retrieves the underlying string. */
const auto &GetString() const { return tokens; }
/** Fetch the next token from the stream
* @param token The next token from the stream is placed here
* @return True if tokens still remain, false if there are none left
*/
virtual bool GetToken(Anope::string &token);
bool GetToken(Anope::string &token);
/** Gets token number 'num' from the stream
* @param token The token is placed here
* @param num The token number to fetch
* @return True if the token was able to be fetched
*/
bool GetToken(Anope::string &token, int num);
/** Gets every token from this stream
* @param token Tokens are pushed back here
*/
template<typename T> void GetTokens(T &token)
{
token.clear();
Anope::string t;
while (this->GetToken(t))
token.push_back(t);
}
/** Gets token number 'num' from the stream and all remaining tokens.
* @param token The token is placed here
* @param num The token number to fetch
* @return True if the token was able to be fetched
*/
bool GetTokenRemainder(Anope::string &token, int num);
/** Determines the number of tokens in this stream.
* @return The number of tokens in this stream
*/
int NumTokens();
/** Fetch the entire remaining stream, without tokenizing
* @return The remaining part of the stream
*/
virtual const Anope::string GetRemaining();
Anope::string GetRemaining();
/** Returns true if the end of the stream has been reached
* @return True if the end of the stream has been reached, otherwise false
*/
virtual bool StreamEnd();
bool StreamEnd();
};
/** A derived form of sepstream, which seperates on commas
/** A derived form of sepstream, which separates on commas
*/
class commasepstream : public sepstream
class commasepstream final
: public sepstream
{
public:
/** Initialize with comma seperator
public:
/** Initialize with comma separator
*/
commasepstream(const Anope::string &source) : sepstream(source, ',') { }
commasepstream(const Anope::string &source, bool allowempty = false) : sepstream(source, ',', allowempty) { }
};
/** A derived form of sepstream, which seperates on spaces
/** A derived form of sepstream, which separates on spaces
*/
class spacesepstream : public sepstream
class spacesepstream final
: public sepstream
{
public:
/** Initialize with space seperator
public:
/** Initialize with space separator
*/
spacesepstream(const Anope::string &source) : sepstream(source, ' ') { }
};
/** The base class that most classes in Anope inherit from
/** This class can be used on its own to represent an exception, or derived to represent a module-specific exception.
* When a module whishes to abort, e.g. within a constructor, it should throw an exception using ModuleException or
* a class derived from ModuleException. If a module throws an exception during its constructor, the module will not
* be loaded. If this happens, the error message returned by ModuleException::GetReason will be displayed to the user
* attempting to load the module, or dumped to the console if the ircd is currently loading for the first time.
*/
class dynamic_reference_base;
class CoreExport Base
class CoreExport CoreException
: public std::exception
{
/* References to this base class */
std::set<dynamic_reference_base *> References;
public:
Base();
virtual ~Base();
void AddReference(dynamic_reference_base *r);
void DelReference(dynamic_reference_base *r);
};
class dynamic_reference_base
{
protected:
bool invalid;
public:
dynamic_reference_base() : invalid(false) { }
virtual ~dynamic_reference_base() { }
inline void Invalidate() { this->invalid = true; }
};
template<typename T>
class dynamic_reference : public dynamic_reference_base
{
protected:
T *ref;
public:
dynamic_reference(T *obj) : ref(obj)
protected:
/** Holds the error message to be displayed
*/
Anope::string err;
/** Source of the exception
*/
Anope::string source;
public:
/** This constructor can be used to specify an error message before throwing.
*/
CoreException(const Anope::string &message) : err(message), source("The core") { }
/** This constructor can be used to specify an error message before throwing,
* and to specify the source of the exception.
*/
CoreException(const Anope::string &message, const Anope::string &src) : err(message), source(src) { }
/** This destructor solves world hunger, cancels the world debt, and causes the world to end.
* Actually no, it does nothing. Never mind.
* @throws Nothing!
*/
virtual ~CoreException() noexcept = default;
/** Returns the reason for the exception.
* The module should probably put something informative here as the user will see this upon failure.
*/
virtual const Anope::string &GetReason() const
{
if (ref)
ref->AddReference(this);
return err;
}
dynamic_reference(const dynamic_reference<T> &obj) : ref(obj.ref)
virtual const Anope::string &GetSource() const
{
if (ref)
ref->AddReference(this);
}
virtual ~dynamic_reference()
{
if (this->invalid)
{
this->invalid = false;
this->ref = NULL;
}
else if (this->operator bool())
ref->DelReference(this);
}
virtual operator bool()
{
if (this->invalid)
{
this->invalid = false;
this->ref = NULL;
}
return this->ref != NULL;
}
virtual inline operator T*()
{
if (this->operator bool())
return this->ref;
return NULL;
}
virtual inline T *operator->()
{
if (this->operator bool())
return this->ref;
return NULL;
}
virtual inline void operator=(T *newref)
{
if (this->invalid)
{
this->invalid = false;
this->ref = NULL;
}
else if (this->operator bool())
this->ref->DelReference(this);
this->ref = newref;
if (this->operator bool())
this->ref->AddReference(this);
return source;
}
};
#endif // ANOPE_H
class CoreExport ModuleException
: public CoreException
{
public:
/** This constructor can be used to specify an error message before throwing.
*/
ModuleException(const Anope::string &message) : CoreException(message, "A Module") { }
/** This destructor solves world hunger, cancels the world debt, and causes the world to end.
* Actually no, it does nothing. Never mind.
* @throws Nothing!
*/
virtual ~ModuleException() noexcept = default;
};
/** Casts to be used instead of dynamic_cast, this uses dynamic_cast
* for debug builds and static_cast on release builds
* to speed up the program because dynamic_cast relies on RTTI.
*/
#ifdef DEBUG_BUILD
# include <typeinfo>
template<typename T, typename O> inline T anope_dynamic_static_cast(O ptr)
{
T ret = dynamic_cast<T>(ptr);
if (ptr != NULL && ret == NULL)
throw CoreException(Anope::string("anope_dynamic_static_cast<") + typeid(T).name() + ">(" + typeid(O).name() + ") fail");
return ret;
}
#else
template<typename T, typename O> inline T anope_dynamic_static_cast(O ptr)
{
return static_cast<T>(ptr);
}
#endif
#include "convert.h"
+145
View File
@@ -0,0 +1,145 @@
// Anope IRC Services <https://www.anope.org/>
//
// Copyright (C) 2003-2026 Anope Contributors
// Copyright (C) 2008-2011 Adam <Adam@anope.org>
//
// Anope is free software. You can use, modify, and/or distribute it under the
// terms of version 2 of the GNU General Public License. See docs/LICENSE.txt
// for the complete terms of this license and docs/AUTHORS.txt for a list of
// contributors.
//
// Based on the original code of Epona by Lara
// Based on the original code of Services by Andy Church
//
// SPDX-License-Identifier: GPL-2.0-only
#pragma once
#include "services.h"
/** The base class that most classes in Anope inherit from
*/
class CoreExport Base
{
/* References to this base class */
std::set<ReferenceBase *> *references = nullptr;
public:
virtual ~Base();
/** Adds a reference to this object. Eg, when a Reference
* is created referring to this object this is called. It is used to
* cleanup references when this object is destructed.
*/
void AddReference(ReferenceBase *r);
void DelReference(ReferenceBase *r);
};
class ReferenceBase
{
protected:
bool invalid = false;
public:
ReferenceBase() = default;
ReferenceBase(const ReferenceBase &other) : invalid(other.invalid) { }
virtual ~ReferenceBase() = default;
inline void Invalidate() { this->invalid = true; }
};
/** Used to hold pointers to objects that may be deleted. A Reference will
* no longer be valid once the object it refers is destructed.
*/
template<typename T>
class Reference
: public ReferenceBase
{
protected:
T *ref = nullptr;
public:
Reference() = default;
Reference(T *obj) : ref(obj)
{
if (ref)
ref->AddReference(this);
}
Reference(const Reference<T> &other) : ReferenceBase(other), ref(other.ref)
{
if (operator bool())
ref->AddReference(this);
}
virtual ~Reference()
{
if (operator bool())
ref->DelReference(this);
}
inline Reference<T>& operator=(const Reference<T> &other)
{
if (this != &other)
{
if (*this)
this->ref->DelReference(this);
this->ref = other.ref;
this->invalid = other.invalid;
if (*this)
this->ref->AddReference(this);
}
return *this;
}
/* We explicitly call operator bool here in several places to prevent other
* operators, such operator T*, from being called instead, which will mess
* with any class inheriting from this that overloads this operator.
*/
virtual operator bool()
{
if (!this->invalid)
return this->ref != NULL;
return false;
}
inline operator T*()
{
if (operator bool())
return this->ref;
return NULL;
}
inline T *operator->()
{
if (operator bool())
return this->ref;
return NULL;
}
inline T *operator*()
{
if (operator bool())
return this->ref;
return NULL;
}
/** Note that we can't have an operator< that returns this->ref < other.ref
* because this function is used to sort objects in containers (such as set
* or map), and if the references themselves can change if the object they
* refer to is invalidated or changed, then this screws with the order that
* the objects would be in the container without properly adjusting the
* container, resulting in weird stuff.
*
* As such, we don't allow storing references in containers that require
* operator<, because they would not be able to compare what the references
* actually referred to.
*/
inline bool operator==(const Reference<T> &other)
{
if (!this->invalid)
return this->ref == other;
return false;
}
};
+84 -49
View File
@@ -1,48 +1,69 @@
/*
* Copyright (C) 2008-2011 Robin Burchell <w00t@inspircd.org>
* Copyright (C) 2008-2012 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
#ifndef BOTS_H
#define BOTS_H
class BotInfo;
extern CoreExport Anope::insensitive_map<BotInfo *> BotListByNick;
extern CoreExport Anope::map<BotInfo *> BotListByUID;
typedef Anope::insensitive_map<BotInfo *> botinfo_map;
#pragma once
/** Flags settable on a bot
*/
enum BotFlag
#include "users.h"
#include "anope.h"
#include "serialize.h"
#include "commands.h"
typedef Anope::map<BotInfo *> botinfo_map;
extern CoreExport Serialize::Checker<botinfo_map> BotListByNick, BotListByUID;
/* A service bot (NickServ, ChanServ, a BotServ bot, etc). */
class CoreExport BotInfo final
: public User
, public Serializable
{
BI_BEGIN,
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;
};
/* This bot is a core bot. NickServ, ChanServ, etc */
BI_CORE,
/* This bot can only be assigned by IRCops */
BI_PRIVATE,
/* This bot is defined in the config */
BI_CONF,
BI_END
};
static const Anope::string BotFlagString[] = { "BEGIN", "CORE", "PRIVATE", "CONF", "" };
class CoreExport BotInfo : public User, public Flags<BotFlag, BI_END>, public Serializable
{
public:
uint32_t chancount;
time_t created; /* Birth date ;) */
time_t lastmsg; /* Last time we said something */
typedef Anope::insensitive_map<CommandInfo> command_map;
command_map commands; /* Commands, actual name to service name */
Anope::string botmodes; /* Modes the bot should have as configured in service:modes */
std::vector<Anope::string> botchannels; /* Channels the bot should be in as configured in service:channels */
bool introduced; /* Whether or not this bot is introduced */
private:
/* Channels this bot is assigned to */
Serialize::Checker<std::set<ChannelInfo *> > channels;
public:
time_t created;
/* Last time this bot said something (via privmsg) */
time_t lastmsg;
/* Map of actual command names -> service name/permission required */
CommandInfo::map commands;
/** CTCP responses this bot can send. */
Anope::map<std::function<void(BotInfo *, User *, const Anope::string &)>> ctcps;
/* The server-side alias used to message this bot. */
Anope::string alias;
/* Modes the bot should have as configured in service:modes */
Anope::string botmodes;
/* Channels the bot should be in as configured in service:channels */
std::vector<Anope::string> botchannels;
/* Whether or not this bot is introduced to the network */
bool introduced;
/* Bot can only be assigned by irc ops */
bool oper_only;
/* Bot is defined in the configuration file */
bool conf;
/** Create a new bot.
* @param nick The nickname to assign to the bot.
@@ -57,21 +78,21 @@ class CoreExport BotInfo : public User, public Flags<BotFlag, BI_END>, public Se
*/
virtual ~BotInfo();
Anope::string serialize_name() const;
serialized_data serialize();
static void unserialize(serialized_data &);
void Serialize(Serialize::Data &data) const;
static Serializable *Unserialize(Serializable *obj, Serialize::Data &);
void GenerateUID();
void OnKill();
/** Change the nickname for the bot.
* @param newnick The nick to change to
*/
void SetNewNick(const Anope::string &newnick);
/** Rejoins all channels that this bot is assigned to.
* Used on /kill, rename, etc.
/** Return the channels this bot is assigned to
*/
void RejoinAll();
const std::set<ChannelInfo *> &GetChannels() const;
/** Assign this bot to a given channel, removing the existing assigned bot if one exists.
* @param u The user assigning the bot, or NULL
@@ -85,6 +106,10 @@ class CoreExport BotInfo : public User, public Flags<BotFlag, BI_END>, public Se
*/
void UnAssign(User *u, ChannelInfo *ci);
/** Get the number of channels this bot is assigned to
*/
unsigned GetChannelCount() const;
/** Join this bot to a channel
* @param c The channel
* @param status The status the bot should have on the channel
@@ -106,21 +131,31 @@ class CoreExport BotInfo : public User, public Flags<BotFlag, BI_END>, public Se
/** Called when a user messages this bot
* @param u The user
* @param message The users' message
* @params tags Message tags
*/
virtual void OnMessage(User *u, const Anope::string &message);
void OnMessage(User *u, const Anope::string &message, const Anope::map<Anope::string> &tags);
/** Link a command name to a command in services
* @param cname The command name
* @param sname The service name
* @param permission Permission required to execute the command, if any
* @return The commandinfo for the newly created command
*/
void SetCommand(const Anope::string &cname, const Anope::string &sname, const Anope::string &permission = "");
CommandInfo &SetCommand(const Anope::string &cname, const Anope::string &sname, const Anope::string &permission = "");
/** Get command info for a command
* @param cname The command name
* @return A struct containing service name and permission
*/
CommandInfo *GetCommand(const Anope::string &cname);
};
#endif // BOTS_H
/** Get the command that users can use to send a message to this bot. */
Anope::string GetQueryCommand(const Anope::string &command = "", const Anope::string &extra = "") const;
/** Find a bot by nick
* @param nick The nick
* @param nick_only True to only look by nick, and not by UID
* @return The bot, if it exists
*/
static BotInfo *Find(const Anope::string &nick, bool nick_only = false);
};
+194 -101
View File
@@ -1,77 +1,103 @@
/* Channel support
*
* (C) 2008-2012 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
#ifndef CHANNELS_H
#define CHANNELS_H
#pragma once
#include "anope.h"
#include "extensible.h"
#include "modes.h"
#include "serialize.h"
typedef Anope::unordered_map<Channel *> channel_map;
typedef Anope::insensitive_map<Channel *> channel_map;
extern CoreExport channel_map ChannelList;
struct UserContainer : public Extensible
/* A user's membership to a channel, there is one of these per user per channel. */
struct Membership final
: public Extensible
{
User *user;
ChannelStatus *Status;
Channel *chan;
/* Status the user has in the channel */
ChannelStatus status;
UserContainer(User *u) : user(u) { }
virtual ~UserContainer() { }
Membership(User *u, Channel *c)
: user(u)
, chan(c)
{
}
};
typedef std::list<UserContainer *> CUserList;
enum ChannelFlag
class CoreExport Channel final
: public Base
, public Extensible
{
/* ChanServ is currently holding the channel */
CH_INHABIT,
/* Channel still exists when emptied */
CH_PERSIST,
/* If set the channel is syncing users (channel was just created) and it should not be deleted */
CH_SYNCING
};
static std::vector<Channel *> deleting;
const Anope::string ChannelFlagString[] = { "CH_INABIT", "CH_PERSIST", "CH_SYNCING", "" };
class CoreExport Channel : public Extensible, public Flags<ChannelFlag, 3>
{
public:
typedef std::multimap<ChannelModeName, Anope::string> ModeList;
private:
public:
typedef std::multimap<Anope::string, ModeData> ModeList;
private:
/** A map of channel modes with their parameters set on this channel
*/
ModeList modes;
public:
/** Default constructor
public:
/* Channel name */
Anope::string name;
/* Set if this channel is registered. ci->c == this. Contains information relevant to the registered channel */
Serialize::Reference<ChannelInfo> ci;
/* When the channel was created */
time_t created;
/* If the channel has just been created in a netjoin */
bool syncing = false;
/* Is configured in the conf as a channel bots should be in */
bool botchannel = false;
/* Users in the channel */
typedef std::map<User *, Membership *> ChanUserList;
ChanUserList users;
/* Current topic of the channel */
Anope::string topic;
/* Who set the topic */
Anope::string topic_setter;
/* The timestamp associated with the topic. Not necessarily anywhere close to Anope::CurTime.
* This is the time the topic was *originally set*. When we restore the topic we want to change the TS back
* to this, but we can only do this on certain IRCds.
*/
time_t topic_ts = 0;
/* The actual time the topic was set, probably close to Anope::CurTime */
time_t topic_time = 0;
time_t server_modetime = 0; /* Time of last server MODE */
time_t chanserv_modetime = 0; /* Time of last check_modes() */
int16_t server_modecount = 0; /* Number of server MODEs this second */
int16_t chanserv_modecount = 0; /* Number of check_mode()'s this sec */
bool bouncy_modes = false; /* Did we fail to set modes here? */
private:
/** Constructor
* @param name The channel name
* @param ts The time the channel was created
*/
Channel(const Anope::string &nname, time_t ts = Anope::CurTime);
/** Default destructor
public:
/** Destructor
*/
~Channel();
Anope::string name; /* Channel name */
ChannelInfo *ci; /* Corresponding ChannelInfo */
time_t creation_time; /* When channel was created */
/* List of users in the channel */
CUserList users;
Anope::string topic; /* Current topic of the channel */
Anope::string topic_setter; /* Who set the topic */
time_t topic_time; /* When the topic was set*/
time_t server_modetime; /* Time of last server MODE */
time_t chanserv_modetime; /* Time of last check_modes() */
int16_t server_modecount; /* Number of server MODEs this second */
int16_t chanserv_modecount; /* Number of check_mode()'s this sec */
int16_t bouncy_modes; /* Did we fail to set modes here? */
/** Call if we need to unset all modes and clear all user status (internally).
* Only useful if we get a SJOIN with a TS older than what we have here
*/
@@ -81,10 +107,20 @@ class CoreExport Channel : public Extensible, public Flags<ChannelFlag, 3>
*/
void Sync();
/** Check if a channels modes are correct.
*/
void CheckModes();
/** Check if this channel should be deleted
*/
bool CheckDelete();
/** Join a user internally to the channel
* @param u The user
* @param status The status to give the user, if any
* @return The membership for the user
*/
void JoinUser(User *u);
Membership *JoinUser(User *u, const ChannelStatus *status);
/** Remove a user internally from the channel
* @param u The user
@@ -93,135 +129,151 @@ class CoreExport Channel : public Extensible, public Flags<ChannelFlag, 3>
/** 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
*/
UserContainer *FindUser(User *u);
Membership *FindUser(User *u) const;
/** Check if a user has a status on a channel
* @param u The user
* @param cms The status mode, or NULL to represent no status
* @return true or false
*/
bool HasUserStatus(User *u, ChannelModeStatus *cms) const;
bool HasUserStatus(User *u, ChannelModeStatus *cms);
/** Check if a user has a status on a channel
* Use the overloaded function for ChannelModeStatus* to check for no status
* @param u The user
* @param Name The Mode name, eg CMODE_OP, CMODE_VOICE
* @param name The mode name, eg CMODE_OP, CMODE_VOICE
* @return true or false
*/
bool HasUserStatus(User *u, ChannelModeName Name) const;
bool HasUserStatus(User *u, const Anope::string &name);
/** See if a channel has a mode
* @param Name The mode name
* @param name The mode name
* @return The number of modes set
* @param param The optional mode param
* @param param The optional mode param
*/
size_t HasMode(ChannelModeName Name, const Anope::string &param = "");
/** Get a list of modes on a channel
* @param Name A mode name to get the list of
* @return a pair of iterators for the beginning and end of the list
*/
std::pair<ModeList::iterator, ModeList::iterator> GetModeList(ChannelModeName Name);
size_t HasMode(const Anope::string &name, const Anope::string &param = "");
/** Set a mode internally on a channel, this is not sent out to the IRCd
* @param setter The setter
* @param cm The mode
* @param param The param
* @param EnforceMLock true if mlocks should be enforced, false to override mlock
* @param data Data about the mode.
* @param enforce_mlock true if mlocks should be enforced, false to override mlock
*/
void SetModeInternal(ChannelMode *cm, const Anope::string &param = "", bool EnforceMLock = true);
void SetModeInternal(MessageSource &source, ChannelMode *cm, const ModeData &data = {}, bool enforce_mlock = true);
/** Remove a mode internally on a channel, this is not sent out to the IRCd
* @param setter The Setter
* @param cm The mode
* @param param The param
* @param EnforceMLock true if mlocks should be enforced, false to override mlock
* @param enforce_mlock true if mlocks should be enforced, false to override mlock
*/
void RemoveModeInternal(ChannelMode *cm, const Anope::string &param = "", bool EnforceMLock = true);
void RemoveModeInternal(MessageSource &source, ChannelMode *cm, const Anope::string &param = "", bool enforce_mlock = true);
/** Set a mode on a channel
* @param bi The client setting the modes
* @param cm The mode
* @param param Optional param arg for the mode
* @param EnforceMLock true if mlocks should be enforced, false to override mlock
* @param data Data about the mode
* @param enforce_mlock true if mlocks should be enforced, false to override mlock
*/
void SetMode(BotInfo *bi, ChannelMode *cm, const Anope::string &param = "", bool EnforceMLock = true);
void SetMode(BotInfo *bi, ChannelMode *cm, const ModeData &data = {}, bool enforce_mlock = true);
/**
* Set a mode on a channel
* @param bi The client setting the modes
* @param Name The mode name
* @param param Optional param arg for the mode
* @param EnforceMLock true if mlocks should be enforced, false to override mlock
* @param name The mode name
* @param data Data about the mode
* @param enforce_mlock true if mlocks should be enforced, false to override mlock
*/
void SetMode(BotInfo *bi, ChannelModeName Name, const Anope::string &param = "", bool EnforceMLock = true);
void SetMode(BotInfo *bi, const Anope::string &name, const ModeData &data = {}, bool enforce_mlock = true);
/** Remove a mode from a channel
* @param bi The client setting the modes
* @param cm The mode
* @param param Optional param arg for the mode
* @param EnforceMLock true if mlocks should be enforced, false to override mlock
* @param enforce_mlock true if mlocks should be enforced, false to override mlock
*/
void RemoveMode(BotInfo *bi, ChannelMode *cm, const Anope::string &param = "", bool EnforceMLock = true);
void RemoveMode(BotInfo *bi, ChannelMode *cm, const Anope::string &param = "", bool enforce_mlock = true);
/**
* Remove a mode from a channel
* @param bi The client setting the modes
* @param Name The mode name
* @param name The mode name
* @param param Optional param arg for the mode
* @param EnforceMLock true if mlocks should be enforced, false to override mlock
* @param enforce_mlock true if mlocks should be enforced, false to override mlock
*/
void RemoveMode(BotInfo *bi, ChannelModeName Name, const Anope::string &param = "", bool EnforceMLock = true);
void RemoveMode(BotInfo *bi, const Anope::string &name, const Anope::string &param = "", bool enforce_mlock = true);
/** Get a param from the channel
* @param Name The mode
* @param Target a string to put the param into
* @return true on success
/** Get a modes parameter for the channel
* @param name The mode
* @param target a string to put the param into
* @return true if the parameter was fetched, false if on error (mode not set) etc.
*/
bool GetParam(ChannelModeName Name, Anope::string &Target) const;
bool GetParam(const Anope::string &name, Anope::string &target) const;
/** Set a string of modes on the channel
* @param bi The client setting the modes
* @param EnforceMLock Should mlock be enforced on this mode change
* @param enforce_mlock Should mlock be enforced on this mode change
* @param cmodes The modes to set
*/
void SetModes(BotInfo *bi, bool EnforceMLock, const char *cmodes, ...);
void SetModes(BotInfo *bi, bool enforce_mlock, const char *cmodes, ...) ATTR_FORMAT(4, 5);
void SetModes(BotInfo *bi, bool enforce_mlock, const Anope::string &cmodes);
/** Set a string of modes internally on a channel
* @param setter the setter (if it is a user)
* @param source The setter
* @param mode the modes
* @param EnforceMLock true to enforce mlock
* @param enforce_mlock true to enforce mlock
*/
void SetModesInternal(User *setter, const Anope::string &mode, bool EnforceMLock = true);
void SetModesInternal(MessageSource &source, const Anope::string &modes, const std::vector<Anope::string> &params, time_t ts = 0, bool enforce_mlock = true);
/** Does the given user match the given list? (CMODE_BAN, CMODE_EXCEPT, etc, a list mode)
* @param u The user
* @param list The mode of the list to check (eg CMODE_BAN)
* @return true if the user matches the list
*/
bool MatchesList(User *u, const Anope::string &list);
/** Kick a user from a channel internally
* @param source The sender of the kick
* @param nick The nick being kicked
* @param reason The reason for the kick
*/
void KickInternal(const Anope::string &source, const Anope::string &nick, const Anope::string &reason);
void KickInternal(const MessageSource &source, const Anope::string &nick, const Anope::string &reason);
/** Kick a user from the channel
* @param bi The sender, can be NULL for the service bot for this channel
* @param u The user being kicked
* @param reason The reason for the kick
* @return true if the kick was scucessful, false if a module blocked the kick
* @return true if the kick was successful, false if a module blocked the kick
*/
bool Kick(BotInfo *bi, User *u, const char *reason = NULL, ...);
bool Kick(BotInfo *bi, User *u, const char *reason = NULL, ...) ATTR_FORMAT(4, 5);
bool Kick(BotInfo *bi, User *u, const Anope::string &reason);
/** Get all modes set on this channel, excluding status modes.
* @return a map of modes and their optional parameters.
*/
const ModeList &GetModes() const;
/** Get a list of modes on a channel
* @param name A mode name to get the list of
* @return a vector of the list mode entries
*/
std::vector<Anope::string> GetModeList(const Anope::string &name);
/** Get a string of the modes set on this channel
* @param complete Include mode parameters
* @param plus If set to false (with complete), mode parameters will not be given for modes requring no parameters to be unset
* @param plus If set to false (with complete), mode parameters will not be given for modes requiring no parameters to be unset
* @return A mode string
*/
Anope::string GetModes(bool complete, bool plus);
/** Update the topic of the channel internally, and reset it if topiclock etc says to
* @param user THe user setting the new topic
* @param user The user setting the new topic
* @param newtopic The new topic
* @param ts The time the new topic is being set
*/
void ChangeTopicInternal(const Anope::string &user, const Anope::string &newtopic, time_t ts = Anope::CurTime);
void ChangeTopicInternal(User *u, const Anope::string &user, const Anope::string &newtopic, time_t ts = Anope::CurTime);
/** Update the topic of the channel, and reset it if topiclock etc says to
* @param user The user setting the topic
@@ -229,6 +281,47 @@ class CoreExport Channel : public Extensible, public Flags<ChannelFlag, 3>
* @param ts The time when the new topic is being set
*/
void ChangeTopic(const Anope::string &user, const Anope::string &newtopic, time_t ts = Anope::CurTime);
};
#endif // CHANNELS_H
/** Set the correct modes, or remove the ones granted without permission,
* for the specified user.
* @param user The user to give/remove modes to/from
* @param give_modes if true modes may be given to the user
*/
void SetCorrectModes(User *u, bool give_modes);
/** Unbans a user from this channel.
* @param u The user to unban
* @param mode The mode to unban
* @param full Whether or not to match using the user's real host and IP
* @return whether or not a ban was removed
*/
bool Unban(User *u, const Anope::string &mode, bool full = false);
/** Check whether a user is permitted to be on this channel
* @param u The user
* @return true if they are allowed, false if they aren't and were kicked
*/
bool CheckKick(User *user);
/** Find which bot should send mode/topic/etc changes for this channel
* @return The bot
*/
BotInfo *WhoSends() const;
/** Finds a channel
* @param name The channel to find
* @return The channel, if found
*/
static Channel *Find(const Anope::string &name);
/** Finds or creates a channel
* @param name The channel name
* @param created Set to true if the channel was just created
* @param ts The time the channel was created
*/
static Channel *FindOrCreate(const Anope::string &name, bool &created, time_t ts = Anope::CurTime);
void QueueForDeletion();
static void DeleteChannels();
};
+127 -53
View File
@@ -1,77 +1,128 @@
/* Declarations for command data.
*
* (C) 2003-2012 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
#ifndef COMMAND_H
#define COMMAND_H
#pragma once
#include "services.h"
#include "service.h"
#include "anope.h"
#include "channels.h"
#include "textproc.h"
class Module;
class BotInfo;
class Command;
enum CommandFlag
struct CommandGroup final
{
CFLAG_ALLOW_UNREGISTERED,
CFLAG_STRIP_CHANNEL
Anope::string name, description;
};
const Anope::string CommandFlagStrings[] = {
"CFLAG_ALLOW_UNREGISTERED",
"CFLAG_STRIP_CHANNEL",
""
};
struct CommandInfo
/* Used in BotInfo::commands */
struct CommandInfo final
{
typedef Anope::map<CommandInfo> map;
/* Service name of the command */
Anope::string name;
/* Permission required to execute the command */
Anope::string permission;
/* Group this command is in */
Anope::string group;
/* Whether to hide this command in help and suggestions */
bool hide = false;
/* Whether to prepend the channel name (only used with fantasy) */
bool prepend_channel = false;
/* Whether to require the FANTASY privilege (only used with fantasy) */
bool require_privilege = true;
};
/* Where the replies from commands go to. User inherits from this and is the normal
* source of a CommandReply
*/
struct CoreExport CommandReply
{
virtual ~CommandReply() = default;
virtual void SendMessage(BotInfo *source, const Anope::string &msg) = 0;
virtual void SendMessage(CommandSource &source, const Anope::string &msg);
};
/* The source for a command */
struct CoreExport CommandSource
class CoreExport CommandSource final
{
/* User executing the command */
User *u;
/* The nick executing the command */
Anope::string nick;
/* User executing the command, may be NULL */
Reference<User> u;
public:
/* The account executing the command */
Reference<NickCore> nc;
/* for web clients */
Anope::string ip;
/* Where the reply should go */
CommandReply *reply;
/* Channel the command was executed on (fantasy) */
Channel *c;
Reference<Channel> c = nullptr;
/* The service this command is on */
BotInfo *owner;
/* The service the reply should come from, *not* necessarily the service the command is on */
BotInfo *service;
Reference<BotInfo> service;
/* The actual name of the command being executed */
Anope::string command;
/* The permission of the command being executed */
Anope::string permission;
/* The unique identifier of the executing message. */
Anope::string msgid;
void Reply(const char *message, ...);
CommandSource(const Anope::string &n, User *user, NickCore *core, CommandReply *reply, BotInfo *bi, const Anope::string &m = "");
const Anope::string &GetNick() const;
User *GetUser();
NickCore *GetAccount();
AccessGroup AccessFor(ChannelInfo *ci);
bool IsFounder(ChannelInfo *ci);
void Reply(const char *message, ...) ATTR_FORMAT(2, 3);
void Reply(int count, const char *singular, const char *plural, ...) ATTR_FORMAT(4, 5);
void Reply(const Anope::string &message);
const char *Translate(const char *message);
const char *Translate(const Anope::string &message);
const char *Translate(int count, const char *single, const char *plural);
const char *Translate(int count, const Anope::string &single, const Anope::string &plural);
bool HasCommand(const Anope::string &cmd);
bool HasPriv(const Anope::string &cmd);
bool IsServicesOper();
bool IsOper();
};
/** Every services command is a class, inheriting from Command.
*/
class CoreExport Command : public Service, public Flags<CommandFlag>
class CoreExport Command
: public Service
{
Anope::string desc;
std::vector<Anope::string> syntax;
std::vector<std::pair<Anope::string, std::function<bool(CommandSource&)>>> syntax;
/* Allow unregistered users to use this command */
bool allow_unregistered = false;
/* Command requires that a user is executing it */
bool require_user = false;
public:
/* Maximum paramaters accepted by this command */
size_t MaxParams;
public:
/* Maximum parameters accepted by this command */
size_t max_params;
/* Minimum parameters required to use this command */
size_t MinParams;
size_t min_params;
/* Module which owns us */
Module *module;
protected:
/** Create a new command.
* @param owner The owner of the command
* @param sname The command name
@@ -81,20 +132,28 @@ class CoreExport Command : public Service, public Flags<CommandFlag>
*/
Command(Module *owner, const Anope::string &sname, size_t min_params, size_t max_params = 0);
virtual ~Command();
public:
virtual ~Command() = default;
protected:
protected:
void SetDesc(const Anope::string &d);
void ClearSyntax();
void SetSyntax(const Anope::string &s);
void SendSyntax(CommandSource &);
void SendSyntax(CommandSource &, const Anope::string &syntax);
public:
/** Get the command description
void SetSyntax(const Anope::string &s, const std::function<bool(CommandSource&)> &p = nullptr);
virtual void SendSyntax(CommandSource &);
void AllowUnregistered(bool b);
void RequireUser(bool b);
public:
inline bool AllowUnregistered() const { return this->allow_unregistered; }
inline bool RequireUser() const { return this->require_user; }
/** Get the command description
* @param source The source wanting the command description
* @return The commands description
*/
const Anope::string &GetDesc() const;
virtual Anope::string GetDesc(CommandSource &source) const;
/** Execute this command.
* @param source The source
@@ -102,10 +161,10 @@ class CoreExport Command : public Service, public Flags<CommandFlag>
*/
virtual void Execute(CommandSource &source, const std::vector<Anope::string> &params) = 0;
/** Called when HELP is requsted for the client this command is on.
/** Called when help is requested for the client this command is on.
* @param source The source
*/
virtual void OnServHelp(CommandSource &source);
virtual void OnServHelp(CommandSource &source, HelpWrapper &help);
/** Requested when the user is requesting help on this command. Help on this command should be sent to the user.
* @param source The source
@@ -119,6 +178,21 @@ class CoreExport Command : public Service, public Flags<CommandFlag>
* @param subcommand The subcommand the user tried to use
*/
virtual void OnSyntaxError(CommandSource &source, const Anope::string &subcommand);
};
#endif // COMMANDS_H
/** Runs a command
* @param source The source of the command
* @param message The full message to run, the command is at the beginning of the message
*/
static bool Run(CommandSource &source, const Anope::string &message);
bool Run(CommandSource &source, const Anope::string &, const CommandInfo &, std::vector<Anope::string> &params);
/** Looks up a command name from the service name.
* Note that if the same command exists multiple places this will return the first one encountered
* @param command_service The command service to lookup, eg, nickserv/register
* @param bot If found, is set to the bot the command is on, eg NickServ
* @param name If found, is set to the command name, eg REGISTER
* @return true if the given command service exists
*/
static bool FindFromService(const Anope::string &command_service, BotInfo *&bi, Anope::string &name);
};
+150 -750
View File
@@ -1,657 +1,157 @@
#ifndef CONFIG_H
#define CONFIG_H
// 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
#include <string>
#include <fstream>
#include <sstream>
#include <vector>
#include <map>
#include <deque>
#pragma once
#include "anope.h"
#include "account.h"
#include "regchannel.h"
#include "users.h"
#include "opertype.h"
#include "miscutils.h"
/** A configuration key and value pair
*/
typedef std::pair<Anope::string, Anope::string> KeyVal;
/** A list of related configuration keys and values
*/
typedef std::vector<KeyVal> KeyValList;
/** An entire config file, built up of KeyValLists
*/
typedef std::multimap<Anope::string, KeyValList> ConfigDataHash;
// Required forward definitions
class ServerConfig;
/** Types of data in the core config
*/
enum ConfigDataType
namespace Configuration
{
DT_NOTHING, // No data
DT_INTEGER, // Integer
DT_UINTEGER, // Unsigned Integer
DT_LUINTEGER, // Long Unsigned Integer
DT_STRING, // Anope::string
DT_BOOLEAN, // Boolean
DT_HOSTNAME, // Hostname syntax
DT_NOSPACES, // No spaces
DT_IPADDRESS, // IP address (v4, v6)
DT_TIME, // Time value
DT_NORELOAD = 32, // Item can't be reloaded after startup
DT_ALLOW_WILD = 64, // Allow wildcards/CIDR in DT_IPADDRESS
DT_ALLOW_NEWLINE = 128, // New line characters allowed in DT_STRING
DT_ALLOW_EMPTY = 256 // Allow empty value
};
/** Holds a config value, either string, integer or boolean.
* Callback functions receive one or more of these, either on
* their own as a reference, or in a reference to a deque of them.
* The callback function can then alter the values of the ValueItem
* classes to validate the settings.
*/
class CoreExport ValueItem
{
private:
/** Actual data */
Anope::string v;
public:
/** Initialize with nothing */
ValueItem();
/** Initialize with an int */
ValueItem(int);
/** Initialize with a bool */
ValueItem(bool);
/** Initialize with an Anope::string */
ValueItem(const Anope::string &);
/** Initialize with a long */
ValueItem(long);
/** Change value to an Anope::string */
void Set(const Anope::string &);
/** Change value to an int */
void Set(int);
/** Get value as an int */
int GetInteger() const;
/** Get value as a string */
const char *GetString() const;
/** Get value as an Anope::string */
inline const Anope::string &GetValue() const { return v; }
/** Get value as a bool */
bool GetBool() const;
};
/** The base class of the container 'ValueContainer'
* used internally by the core to hold core values.
*/
class ValueContainerBase
{
public:
/** Constructor */
ValueContainerBase() { }
/** Destructor */
virtual ~ValueContainerBase() { }
};
/** ValueContainer is used to contain pointers to different
* core values such as the server name, maximum number of
* clients etc.
* It is specialized to hold a data type, then pointed at
* a value in the ServerConfig class. When the value has been
* read and validated, the Set method is called to write the
* value safely in a type-safe manner.
*/
template<typename T> class ValueContainer : public ValueContainerBase
{
private:
/** Contained item */
T val;
public:
/** Initialize with nothing */
ValueContainer() : ValueContainerBase(), val(NULL) { }
/** Initialize with a value of type T */
ValueContainer(T Val) : ValueContainerBase(), val(Val) { }
/** Initialize with a copy */
ValueContainer(const ValueContainer &Val) : ValueContainerBase(), val(Val.val) { }
ValueContainer &operator=(const ValueContainer &Val)
class CoreExport Block
{
val = Val.val;
return *this;
}
/** Change value to type T of size s */
void Set(const T newval, size_t s)
friend class Configuration::Conf;
public:
typedef Anope::map<Anope::string> ItemMap;
typedef Anope::multimap<Block> BlockMap;
typedef Anope::iterator_range<BlockMap::const_iterator> BlockList;
private:
Anope::string name;
ItemMap items;
BlockMap blocks;
unsigned linenum;
/* Represents a missing tag. */
static Block EmptyBlock;
public:
Block(const Anope::string &);
const Anope::string &GetName() const;
size_t CountBlock(const Anope::string &name) const;
BlockList GetBlocks(const Anope::string &name) const;
const Block &GetBlock(const Anope::string &name, size_t num = 0) const;
Block *GetMutableBlock(const Anope::string &name, size_t num = 0);
template<typename T> T Get(const Anope::string &tag, const Anope::string &def = "") const
{
return Anope::TryConvert<T>(this->Get<const Anope::string>(tag, def)).value_or(T());
}
bool Set(const Anope::string &tag, const Anope::string &value);
const ItemMap &GetItems() const;
};
template<> CoreExport const Anope::string Block::Get(const Anope::string &tag, const Anope::string &def) const;
template<> CoreExport time_t Block::Get(const Anope::string &tag, const Anope::string &def) const;
template<> CoreExport bool Block::Get(const Anope::string &tag, const Anope::string &def) const;
/** Represents a configuration file
*/
class File final
{
memcpy(val, newval, s);
}
};
Anope::string name;
bool executable;
FILE *fp = nullptr;
public:
File(const Anope::string &, bool);
~File();
const Anope::string &GetName() const;
Anope::string GetPath() const;
/** This a specific version of ValueContainer to handle Anope::string specially
*/
template<> class ValueContainer<Anope::string *> : public ValueContainerBase
{
private:
/** Contained item */
Anope::string *val;
public:
/** Initialize with nothing */
ValueContainer() : ValueContainerBase(), val(NULL) { }
/** Initialize with an std::string */
ValueContainer(Anope::string *Val) : ValueContainerBase(), val(Val) { }
/** Initialize with a copy */
ValueContainer(const ValueContainer &Val) : ValueContainerBase(), val(Val.val) { }
ValueContainer &operator=(const ValueContainer &Val)
bool IsOpen() const;
bool Open();
void Close();
bool End() const;
Anope::string Read();
};
struct Uplink;
class CoreExport Conf final
: public Block
{
val = Val.val;
return *this;
}
private:
/** Replaces defined variables within a string. */
Anope::string ReplaceVars(const Anope::string &str, const File &file, unsigned linenumber);
/** Change value to given Anope::string */
void Set(const Anope::string &newval)
public:
/* options:readtimeout */
time_t ReadTimeout;
/* If we should default to privmsging clients */
bool DefPrivmsg;
/* Default language */
Anope::string DefLanguage;
/* options:timeoutcheck */
time_t TimeoutCheck;
/* options:servicealias */
bool ServiceAlias;
/* networkinfo:nickchars */
Anope::string NickChars;
/* List of uplink servers to try and connect to */
std::vector<Uplink> Uplinks;
/* A vector of our logfile options */
std::vector<LogInfo> LogInfos;
/* Array of ulined servers */
std::vector<Anope::string> Ulines;
/* List of available opertypes */
std::vector<OperType *> MyOperTypes;
/* List of pairs of opers and their opertype from the config */
std::vector<Oper *> Opers;
/* Map of fantasy commands */
CommandInfo::map Fantasy;
/* Command groups */
std::vector<CommandGroup> CommandGroups;
/* List of modules to autoload */
std::vector<Anope::string> ModulesAutoLoad;
/* module configuration blocks */
std::map<Anope::string, Block *> modules;
Anope::map<Anope::string> bots;
Conf();
~Conf();
void LoadConf(File &file);
void Post(Conf *old);
Block &GetModule(const Module *);
Block &GetModule(const Anope::string &name);
BotInfo *GetClient(const Anope::string &name);
const Block &GetCommand(CommandSource &);
};
struct Uplink final
{
*val = newval;
}
/** Change value to given char pointer */
void Set(const char *newval)
{
*val = newval;
}
};
Anope::string host;
unsigned port;
Anope::string password;
int protocol;
/** A specialization of ValueContainer to hold a pointer to a bool
*/
typedef ValueContainer<bool *> ValueContainerBool;
/** A specialization of ValueContainer to hold a pointer to
* an unsigned int
*/
typedef ValueContainer<unsigned *> ValueContainerUInt;
/** A specialization of ValueContainer to hold a pointer to
* a long unsigned int
*/
typedef ValueContainer<long unsigned *> ValueContainerLUInt;
/** A specialization of ValueContainer to hold a pointer to
* an int
*/
typedef ValueContainer<int *> ValueContainerInt;
/** A specialization of ValueContainer to hold a pointer to
* a time_t
*/
typedef ValueContainer<time_t *> ValueContainerTime;
/** A specialization of ValueContainer to hold a pointer to
* an Anope::string
*/
typedef ValueContainer<Anope::string *> ValueContainerString;
/** A set of ValueItems used by multi-value validator functions
*/
typedef std::deque<ValueItem> ValueList;
/** A callback for validating a single value
*/
typedef bool (*Validator)(ServerConfig *, const Anope::string &, const Anope::string &, ValueItem &);
/** A callback for validating multiple value entries
*/
typedef bool (*MultiValidator)(ServerConfig *, const Anope::string &, const Anope::string *, ValueList &, int *);
/** A callback indicating the end of a group of entries
*/
typedef bool (*MultiNotify)(ServerConfig *, const Anope::string &);
bool ValidateNotEmpty(ServerConfig *, const Anope::string &tag, const Anope::string &value, ValueItem &data);
bool ValidateNotZero(ServerConfig *, const Anope::string &tag, const Anope::string &value, ValueItem &data);
bool ValidateEmailReg(ServerConfig *config, const Anope::string &tag, const Anope::string &value, ValueItem &data);
bool ValidatePort(ServerConfig *, const Anope::string &tag, const Anope::string &value, ValueItem &data);
bool ValidateGuestPrefix(ServerConfig *conf, const Anope::string &tag, const Anope::string &value, ValueItem &data);
bool ValidateBantype(ServerConfig *, const Anope::string &, const Anope::string &, ValueItem &data);
bool ValidateChanServ(ServerConfig *config, const Anope::string &tag, const Anope::string &value, ValueItem &data);
bool ValidateMemoServ(ServerConfig *config, const Anope::string &tag, const Anope::string &value, ValueItem &data);
bool ValidateBotServ(ServerConfig *config, const Anope::string &tag, const Anope::string &value, ValueItem &data);
bool ValidateHostServ(ServerConfig *config, const Anope::string &tag, const Anope::string &value, ValueItem &data);
bool ValidateLimitSessions(ServerConfig *config, const Anope::string &tag, const Anope::string &value, ValueItem &data);
bool ValidateOperServ(ServerConfig *config, const Anope::string &tag, const Anope::string &value, ValueItem &data);
bool ValidateGlobal(ServerConfig *config, const Anope::string &tag, const Anope::string &value, ValueItem &data);
bool ValidateNickLen(ServerConfig *, const Anope::string &, const Anope::string &, ValueItem &data);
bool ValidateMail(ServerConfig *config, const Anope::string &tag, const Anope::string &value, ValueItem &data);
bool ValidateGlobalOnCycle(ServerConfig *config, const Anope::string &tag, const Anope::string &value, ValueItem &data);
/** Represents a configuration file
*/
class ConfigurationFile
{
Anope::string name;
bool executable;
FILE *fp;
public:
ConfigurationFile(const Anope::string &, bool);
~ConfigurationFile();
const Anope::string &GetName() const;
bool IsOpen() const;
bool Open();
void Close();
bool End() const;
Anope::string Read();
};
/** Holds all of the core configuration items
*/
class CoreExport ConfigItems
{
public:
/** Holds a core configuration item and its callbacks
*/
struct Item
{
/** Tag name */
Anope::string tag;
/** Value name */
Anope::string value;
/** Default, if not defined */
Anope::string default_value;
/** Value containers */
ValueContainerBase *val;
/** Data types */
int datatype;
/** Validation function */
Validator validation_function;
} *Values;
/** Holds a core configuration item and its callbacks
* where there may be more than one item
*/
struct MultiItem
{
/** Tag name */
Anope::string tag;
/** One or more items within tag */
Anope::string items[17];
/** One or more defaults for items within tags */
Anope::string items_default[17];
/** One or more data types */
int datatype[17];
/** Initialization function */
MultiNotify init_function;
/** Validation function */
MultiValidator validation_function;
/** Completion function */
MultiNotify finish_function;
} *MultiValues;
ConfigItems(ServerConfig *conf);
~ConfigItems();
};
/** This class holds the bulk of the runtime configuration for Anope.
* It allows for reading new config values, accessing configuration files,
* and storage of the configuration data needed to run Anope.
*/
class CoreExport ServerConfig
{
private:
/** Check that there is only one of each configuration item
*/
bool CheckOnce(const Anope::string &);
public:
/** This holds all the information in the config file,
* it's indexed by tag name to a vector of key/values.
*/
ConfigDataHash config_data;
/** Construct a new ServerConfig
*/
ServerConfig();
/** Read the entire configuration into memory
* and initialize this class. All other methods
* should be used only by the core.
*/
void Read();
/** Load the configuration file into 'this'. With the new config parser everything is parsed into
* tag/key/value at load-time rather than at read-value time.
*/
void LoadConf(ConfigurationFile &file);
// Both these return true if the value existed or false otherwise
/** Writes 'length' chars into 'result' as a string
*/
bool ConfValue(ConfigDataHash &, const Anope::string &, const Anope::string &, int, Anope::string &, bool = false);
/** Writes 'length' chars into 'result' as a string
*/
bool ConfValue(ConfigDataHash &, const Anope::string &, const Anope::string &, const Anope::string &, int, Anope::string &, bool = false);
/** Tries to convert the value to an integer and write it to 'result'
*/
bool ConfValueInteger(ConfigDataHash &, const Anope::string &, const Anope::string &, int, int &);
/** Tries to convert the value to an integer and write it to 'result'
*/
bool ConfValueInteger(ConfigDataHash &, const Anope::string &, const Anope::string &, const Anope::string &, int, int &);
/** Returns true if the value exists and has a true value, false otherwise
*/
bool ConfValueBool(ConfigDataHash &, const Anope::string &, const Anope::string &, int);
/** Returns true if the value exists and has a true value, false otherwise
*/
bool ConfValueBool(ConfigDataHash &, const Anope::string &, const Anope::string &, const Anope::string &, int);
/** Returns the number of occurences of tag in the config file
*/
int ConfValueEnum(const ConfigDataHash &, const Anope::string &);
/** Returns the numbers of vars inside the index'th 'tag in the config file
*/
int ConfVarEnum(ConfigDataHash &, const Anope::string &, int);
void ValidateHostname(const Anope::string &, const Anope::string &, const Anope::string &) const;
void ValidateIP(const Anope::string &p, const Anope::string &, const Anope::string &, bool) const;
void ValidateNoSpaces(const Anope::string &, const Anope::string &, const Anope::string &) const;
/** Below here is a list of variables which contain the config files values
*/
/* Host to bind to */
Anope::string LocalHost;
/* List of uplink servers to try and connect to */
std::vector<Uplink *> Uplinks;
/* Our server name */
Anope::string ServerName;
/* Our servers description */
Anope::string ServerDesc;
/* Name of the network were on */
Anope::string NetworkName;
/* The max legnth of nicks */
unsigned NickLen;
/* Max length of idents */
unsigned UserLen;
/* Max lenght of hostnames */
unsigned HostLen;
/* Max length of passwords */
unsigned PassLen;
/* Filename for the PID file */
Anope::string PIDFilename;
/* MOTD filename */
Anope::string MOTDFilename;
Anope::string BotServ;
Anope::string ChanServ;
Anope::string Global;
Anope::string HostServ;
Anope::string NickServ;
Anope::string OperServ;
Anope::string MemoServ;
/* True if its ok to not be able to save backs */
bool NoBackupOkay;
/* Do password checking when new people register */
bool StrictPasswords;
/* How many times you're allowed to give a bad password before being killed */
unsigned BadPassLimit;
/* How long before bad passwords are forgotten */
time_t BadPassTimeout;
/* Delay between automatic database updates */
time_t UpdateTimeout;
/* Delay between checks for expired nicks and channels */
time_t ExpireTimeout;
/* How long to wait for something from the uplink, this is passed to select() */
time_t ReadTimeout;
/* How often to send program errors */
time_t WarningTimeout;
/* How long to process things such as timers to see if there is anything to calll */
time_t TimeoutCheck;
/* Number of days backups are kept */
int KeepBackups;
/* Forbidding requires a reason */
bool ForceForbidReason;
/* Services should use privmsgs instead of notices */
bool UsePrivmsg;
/* Services only respond to full PRIVMSG client@services.server.name messages */
bool UseStrictPrivMsg;
/* This is not a configurable option.
* Config::Config will set it depending on the value of UseStrictPrivMsg */
Anope::string UseStrictPrivMsgString;
/* Number of seconds between consecutive uses of the REGISTER command
* Not to be confused with NSRegDelay */
unsigned NickRegDelay;
/* Max number if news items allowed in the list */
unsigned NewsCount;
/* Default mlock modes */
Anope::string MLock;
/* Unmlockable modes */
Anope::string NoMLock;
/* Default botmodes on channels, defaults to ao */
Anope::string BotModes;
/* THe actual modes */
ChannelStatus BotModeList;
/* How long to wait between connection attempts */
int RetryWait;
/* If services should hide unprivileged commands */
bool HidePrivilegedCommands;
/* If set, nicks cant be owned/everything is entirely account based */
bool NoNicknameOwnership;
/* A vector of our logfile options */
std::vector<LogInfo *> LogInfos;
/* Services can use email */
bool UseMail;
/* Path to the sendmail executable */
Anope::string SendMailPath;
/* Address to send from */
Anope::string SendFrom;
/* Only opers can have services send mail */
bool RestrictMail;
/* Delay between sending mail */
time_t MailDelay;
/* Don't quote the To: address */
bool DontQuoteAddresses;
/* Mail messages to send */
Anope::string MailRegistrationSubject, MailRegistrationMessage;
Anope::string MailResetSubject, MailResetMessage;
Anope::string MailSendpassSubject, MailSendpassMessage;
Anope::string MailEmailchangeSubject, MailEmailchangeMessage;
Anope::string MailMemoSubject, MailMemoMessage;
/* Nameserver to use for resolving hostnames */
Anope::string NameServer;
/* TIme before a DNS query is considered dead */
time_t DNSTimeout;
/* Prefix of guest nicks when a user gets forced off of a nick */
Anope::string NSGuestNickPrefix;
/* Allow users to set kill immed on */
bool NSAllowKillImmed;
/* Don't allow nicks to use /ns group to regroup nicks */
bool NSNoGroupChange;
/* Default flags for newly registered nicks */
Flags<NickCoreFlag, NI_END> NSDefFlags;
/* All languages Anope is aware about */
Anope::string Languages;
/* Default language used by services */
Anope::string NSDefLanguage;
/* Users must be connected this long before they can register
* Not to be confused with NickRegDelay */
time_t NSRegDelay;
/* Time before the registering mail will be resent */
time_t NSResendDelay;
/* How long before nicks expire */
time_t NSExpire;
/* How long before suspended nicks expire */
time_t NSSuspendExpire;
/* Time before unconfirmed nicks expire */
time_t NSUnconfirmedExpire;
/* Force email when registering */
bool NSForceEmail;
/* Force users to validate new email addresses */
bool NSConfirmEmailChanges;
/* Max number of nicks in a group */
unsigned NSMaxAliases;
/* Max number of allowed strings on the access list */
unsigned NSAccessMax;
/* Enforcer client user name */
Anope::string NSEnforcerUser;
/* Enforcer client hostname */
Anope::string NSEnforcerHost;
/* How long before recovered nicks are released */
time_t NSReleaseTimeout;
/* Max number of entries that can be returned from the list command */
unsigned NSListMax;
/* Only allow usermode +a etc on real services admins */
bool NSSecureAdmins;
/* Services opers must be /operd on the ircd aswell */
bool NSStrictPrivileges;
/* Use email to verify new users registering */
bool NSEmailReg;
/* Core NickServ modules */
Anope::string NickCoreModules;
/* Set the proper channel modes on users when they identify */
bool NSModeOnID;
/* Add the users hostnask their access list when they register */
bool NSAddAccessOnReg;
/* Maximum number of channels on AJoin */
unsigned AJoinMax;
/* Core ChanServ modules */
Anope::string ChanCoreModules;
/* Default flags for newly registered channels */
Flags<ChannelInfoFlag, CI_END> CSDefFlags;
/* Max number of channels a user can own */
unsigned CSMaxReg;
/* Time before a channel expires */
time_t CSExpire;
/* How long before suspended channels expire */
time_t CSSuspendExpire;
/* How long before forbidden channels expire */
time_t CSForbidExpire;
/* Default ban type to use for channels */
int CSDefBantype;
/* Max number of entries allowed on channel access lists */
unsigned CSAccessMax;
/* Max number of entries allowed on autokick lists */
unsigned CSAutokickMax;
/* Default autokick reason */
Anope::string CSAutokickReason;
/* Time ChanServ should stay in the channel to hold it to keep users from getting in */
time_t CSInhabit;
/* Max number of entries allowed to be returned from the LIST command */
unsigned CSListMax;
/* true to make ChanServ oper only */
bool CSOpersOnly;
/* Max number of memos allowed */
unsigned MSMaxMemos;
/* Time you must wait between sending memos */
time_t MSSendDelay;
/* Notify all of the aliases of the core the memo was sent to */
bool MSNotifyAll;
/* Who can use memos reciepts */
unsigned MSMemoReceipt;
/* Valid chars allowed in vhosts */
Anope::string VhostChars;
/* Allow undotted vhosts? */
bool VhostUndotted;
/* Chars disallowed at the beginning or end of vhosts */
Anope::string VhostDisallowBE;
/* Core BotServ modules */
Anope::string BotCoreModules;
/* Default BotServ flags */
Flags<BotServFlag> BSDefFlags;
/* How long before botserv forgets a user. This is used for flood kickers etc */
time_t BSKeepData;
/* Min number of users to have in the channel before the service bot joins */
unsigned BSMinUsers;
/* Max number of words allowed on the badwordslist */
unsigned BSBadWordsMax;
/* BotServ bot only joins if it would normally allowed to, abides by bans etc */
bool BSSmartJoin;
/* Dont tell users what badword they used */
bool BSGentleBWReason;
/* Case sensitive badwords matching */
bool BSCaseSensitive;
/* Char to use for the fantasy char, eg ! */
Anope::string BSFantasyCharacter;
/* Only show /stats o to opers */
bool HideStatsO;
/* Send out a global when services shut down or restart */
bool GlobalOnCycle;
/* Don't include the opers name in globals */
bool AnonymousGlobal;
/* Dont allow users to register nicks with oper names in them */
bool RestrictOperNicks;
/* Message to send when shutting down */
Anope::string GlobalOnCycleMessage;
/* Message to send when starting up */
Anope::string GlobalOnCycleUP;
/* Super admin is allowed */
bool SuperAdmin;
/* Default expiry time for akills */
time_t AutokillExpiry;
/* Default expiry time for chan kills */
time_t ChankillExpiry;
/* Default expiry time for SNLine Expire */
time_t SNLineExpiry;
/* Default expiry time for SQLines */
time_t SQLineExpiry;
/* Actually akill the user when the akill is added */
bool AkillOnAdd;
/* Kill users on SNLine */
bool KillonSNline;
/* Kill users on SQline */
bool KillonSQline;
/* Send a WALLOPS/GLOBOPS when a user opers */
bool WallOper;
/* Send a WALLOPS/GLOBOPS when a nonoper tries to use OperServ */
bool WallBadOS;
/* Send a WALLOPS/GLOBOPS when an akill expires */
bool WallAkillExpire;
/* Send a WALLOPS/GLOBOPS when SNLines expire */
bool WallSNLineExpire;
/* Send a WALLOPS/GLOBOPS when SQLines expire */
bool WallSQLineExpire;
/* Send a WALLOPS/GLOBOPS when exceptions expire */
bool WallExceptionExpire;
/* Add the akillers nick to the akill reason */
bool AddAkiller;
/* Add akill ids to akill reason */
bool AkillIds;
/* Limit sessions */
bool LimitSessions;
/* The default session limit */
unsigned DefSessionLimit;
/* How long before exceptions expire */
time_t ExceptionExpiry;
/* How many times to kill before adding an KILL */
unsigned MaxSessionKill;
/* Max limit that can be used for exceptions */
unsigned MaxSessionLimit;
/* How long session akills should last */
time_t SessionAutoKillExpiry;
/* Reason to use for session kills */
Anope::string SessionLimitExceeded;
/* Optional second reason */
Anope::string SessionLimitDetailsLoc;
/* OperServ requires you to be an operator */
bool OSOpersOnly;
/* List of modules to autoload */
std::list<Anope::string> ModulesAutoLoad;
/* User keys to use for generating random hashes for pass codes etc */
unsigned long UserKey1;
unsigned long UserKey2;
unsigned long UserKey3;
/* Numeric */
Anope::string Numeric;
/* Array of ulined servers */
std::list<Anope::string> Ulines;
/* List of available opertypes */
std::list<OperType *> MyOperTypes;
/* List of pairs of opers and their opertype from the config */
std::vector<Oper *> Opers;
};
Uplink(const Anope::string &_host, int _port, const Anope::string &_password, int _protocol) : host(_host), port(_port), password(_password), protocol(_protocol) { }
inline bool operator==(const Uplink &other) const { return host == other.host && port == other.port && password == other.password && protocol == other.protocol; }
inline bool operator!=(const Uplink &other) const { return !(*this == other); }
Anope::string str() const;
};
}
/** This class can be used on its own to represent an exception, or derived to represent a module-specific exception.
* When a module whishes to abort, e.g. within a constructor, it should throw an exception using ModuleException or
@@ -659,10 +159,11 @@ class CoreExport ServerConfig
* be loaded. If this happens, the error message returned by ModuleException::GetReason will be displayed to the user
* attempting to load the module, or dumped to the console if the ircd is currently loading for the first time.
*/
class ConfigException : public CoreException
class CoreExport ConfigException final
: public CoreException
{
public:
/** Default constructor, just uses the error mesage 'Config threw an exception'.
public:
/** Default constructor, just uses the error message 'Config threw an exception'.
*/
ConfigException() : CoreException("Config threw an exception", "Config Parser") { }
/** This constructor can be used to specify an error message before throwing.
@@ -672,109 +173,8 @@ class ConfigException : public CoreException
* Actually no, it does nothing. Never mind.
* @throws Nothing!
*/
virtual ~ConfigException() throw() { }
virtual ~ConfigException() noexcept = default;
};
#define CONF_NO_ERROR 0x000000
#define CONF_NOT_A_NUMBER 0x000010
#define CONF_INT_NEGATIVE 0x000080
#define CONF_VALUE_NOT_FOUND 0x000100
#define CONF_FILE_NOT_FOUND 0x000200
/** Allows reading of values from configuration files
* This class allows a module to read from either the main configuration file (inspircd.conf) or from
* a module-specified configuration file. It may either be instantiated with one parameter or none.
* Constructing the class using one parameter allows you to specify a path to your own configuration
* file, otherwise, inspircd.conf is read.
*/
class CoreExport ConfigReader
{
protected:
/** True if an error occured reading the config file
*/
bool readerror;
/** Error code
*/
long error;
public:
/** Default constructor.
* This constructor initialises the ConfigReader class to read the configuration file(s).
*/
ConfigReader();
/** Overloaded constructor.
* This constructor initialises the ConfigReader class to read a user-specified config file
*/
ConfigReader(const Anope::string &);
/** Default destructor.
* This method destroys the ConfigReader class.
*/
~ConfigReader();
/** Retrieves a value from the config file.
* This method retrieves a value from the config file. Where multiple copies of the tag
* exist in the config file, index indicates which of the values to retrieve.
*/
Anope::string ReadValue(const Anope::string &, const Anope::string &, int, bool = false);
/** Retrieves a value from the config file.
* This method retrieves a value from the config file. Where multiple copies of the tag
* exist in the config file, index indicates which of the values to retrieve. If the
* tag is not found the default value is returned instead.
*/
Anope::string ReadValue(const Anope::string &, const Anope::string &, const Anope::string &, int, bool = false);
/** Retrieves a boolean value from the config file.
* This method retrieves a boolean value from the config file. Where multiple copies of the tag
* exist in the config file, index indicates which of the values to retrieve. The values "1", "yes"
* and "true" in the config file count as true to ReadFlag, and any other value counts as false.
*/
bool ReadFlag(const Anope::string &, const Anope::string &, int);
/** Retrieves a boolean value from the config file.
* This method retrieves a boolean value from the config file. Where multiple copies of the tag
* exist in the config file, index indicates which of the values to retrieve. The values "1", "yes"
* and "true" in the config file count as true to ReadFlag, and any other value counts as false.
* If the tag is not found, the default value is used instead.
*/
bool ReadFlag(const Anope::string &, const Anope::string &, const Anope::string &, int);
/** Retrieves an integer value from the config file.
* This method retrieves an integer value from the config file. Where multiple copies of the tag
* exist in the config file, index indicates which of the values to retrieve. Any invalid integer
* values in the tag will cause the objects error value to be set, and any call to GetError() will
* return CONF_INVALID_NUMBER to be returned. need_positive is set if the number must be non-negative.
* If a negative number is placed into a tag which is specified positive, 0 will be returned and GetError()
* will return CONF_INT_NEGATIVE. Note that need_positive is not suitable to get an unsigned int - you
* should cast the result to achieve that effect.
*/
int ReadInteger(const Anope::string &, const Anope::string &, int, bool);
/** Retrieves an integer value from the config file.
* This method retrieves an integer value from the config file. Where multiple copies of the tag
* exist in the config file, index indicates which of the values to retrieve. Any invalid integer
* values in the tag will cause the objects error value to be set, and any call to GetError() will
* return CONF_INVALID_NUMBER to be returned. needs_unsigned is set if the number must be unsigned.
* If a signed number is placed into a tag which is specified unsigned, 0 will be returned and GetError()
* will return CONF_NOT_UNSIGNED. If the tag is not found, the default value is used instead.
*/
int ReadInteger(const Anope::string &, const Anope::string &, const Anope::string &, int, bool);
/** Returns the last error to occur.
* Valid errors can be found by looking in modules.h. Any nonzero value indicates an error condition.
* A call to GetError() resets the error flag back to 0.
*/
long GetError();
/** Counts the number of times a given tag appears in the config file.
* This method counts the number of times a tag appears in a config file, for use where
* there are several tags of the same kind, e.g. with opers and connect types. It can be
* used with the index value of ConfigReader::ReadValue to loop through all copies of a
* multiple instance tag.
*/
int Enumerate(const Anope::string &) const;
/** Returns true if a config file is valid.
* This method is partially implemented and will only return false if the config
* file does not exist or could not be opened.
*/
bool Verify();
/** Returns the number of items within a tag.
* For example if the tag was &lt;test tag="blah" data="foo"&gt; then this
* function would return 2. Spaces and newlines both qualify as valid seperators
* between values.
*/
int EnumerateValues(const Anope::string &, int);
};
#endif // CONFIG_H
extern Configuration::File ServicesConf;
extern CoreExport Configuration::Conf *Config;
+135
View File
@@ -0,0 +1,135 @@
// Anope IRC Services <https://www.anope.org/>
//
// Copyright (C) 2003-2026 Anope Contributors
//
// Anope is free software. You can use, modify, and/or distribute it under the
// terms of version 2 of the GNU General Public License. See docs/LICENSE.txt
// for the complete terms of this license and docs/AUTHORS.txt for a list of
// contributors.
//
// Based on the original code of Epona by Lara
// Based on the original code of Services by Andy Church
//
// SPDX-License-Identifier: GPL-2.0-only
#pragma once
#include <optional>
namespace Anope
{
/** Attempts to convert a string to any type.
* @param in The value to convert.
* @param leftover If non-nullptr then the location to store leftover data.
*/
template<typename T>
inline std::optional<T> TryConvert(const Anope::string &in, Anope::string *leftover = nullptr)
{
std::istringstream tmp(in.str());
T out;
if (!(tmp >> out))
return std::nullopt;
if (leftover)
{
leftover->clear();
std::getline(tmp, leftover->str());
}
else
{
char extra;
if (tmp >> extra)
return std::nullopt;
}
return out;
}
/** Converts a string to any type.
* @param in The value to convert.
* @param def The default to use if the conversion failed.
* @param leftover If non-nullptr then the location to store leftover data.
*/
template<typename T>
inline T Convert(const Anope::string &in, T def, Anope::string *leftover = nullptr)
{
return TryConvert<T>(in, leftover).value_or(def);
}
/** Attempts to convert any type to a string.
* @param in The value to convert.
*/
template <class T>
inline std::optional<Anope::string> TryString(const T &in)
{
std::ostringstream tmp;
if (!(tmp << in))
return std::nullopt;
return tmp.str();
}
/** No-op function that returns the string that was passed to it.
* @param in The string to return.
*/
inline const string &ToString(const string &in)
{
return in;
}
/** Converts a std::string to a string.
* @param in The value to convert.
*/
inline string ToString(const std::string &in)
{
return in;
}
/** Converts a char array to a string.
* @param in The value to convert.
*/
inline string ToString(const char *in)
{
return string(in);
}
/** Converts a char to a string.
* @param in The value to convert.
*/
inline string ToString(char in)
{
return string(1, static_cast<string::value_type>(in));
}
/** Converts an unsigned char to a string.
* @param in The value to convert.
*/
inline string ToString(unsigned char in)
{
return string(1, static_cast<string::value_type>(in));
}
/** Converts a bool to a string.
* @param in The value to convert.
*/
inline string ToString(bool in)
{
return (in ? "1" : "0");
}
/** Converts a type that std::to_string is implemented for to a string.
* @param in The value to convert.
*/
template<typename Stringable>
inline std::enable_if_t<std::is_arithmetic_v<Stringable>, string> ToString(const Stringable &in)
{
return std::to_string(in);
}
/** Converts any type to a string.
* @param in The value to convert.
*/
template <class T>
inline std::enable_if_t<!std::is_arithmetic_v<T>, string> ToString(const T &in)
{
return TryString(in).value_or(Anope::string());
}
}
+58
View File
@@ -0,0 +1,58 @@
// 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 BotInfo;
namespace BotServ { class BadWord; }
class ChanAccess;
class Channel;
class ChannelInfo;
class ChannelStatus;
namespace ChanServ { class AutoKick; class ModeLock; }
class ClientSocket;
class Command;
class CommandSource;
namespace Configuration { class Conf; }
class ConnectionSocket;
namespace DNS { struct Query; }
class Entry;
class IdentifyRequest;
class InfoFormatter;
class IRCDProto;
class ListenSocket;
class Log;
struct Membership;
class Memo;
struct MemoInfo;
class MessageSource;
struct ModeData;
class Module;
class NickAlias;
class NickCore;
namespace NickServ { struct Cert; }
struct Oper;
namespace OperServ { struct Exception; }
class OperType;
class ReferenceBase;
class Regex;
namespace SASL { struct Message; }
class Serializable;
class Server;
class Socket;
class Thread;
class User;
class XLine;
class XLineManager;
-188
View File
@@ -1,188 +0,0 @@
#ifndef DNS_H
#define DNS_H
/** Valid query types
*/
enum QueryType
{
/* Nothing */
DNS_QUERY_NONE,
/* A simple A lookup */
DNS_QUERY_A = 1,
/* A CNAME lookup */
DNS_QUERY_CNAME = 5,
/* Reverse DNS lookup */
DNS_QUERY_PTR = 12,
/* IPv6 AAAA lookup */
DNS_QUERY_AAAA = 28
};
/** Flags that can be AND'd into DNSPacket::flags to receive certain values
*/
enum
{
DNS_QUERYFLAGS_QR = 0x8000,
DNS_QUERYFLAGS_OPCODE = 0x7800,
DNS_QUERYFLAGS_AA = 0x400,
DBS_QUERYFLAGS_TC = 0x200,
DNS_QUERYFLAGS_RD = 0x100,
DNS_QUERYFLAGS_RA = 0x80,
DNS_QUERYFLAGS_Z = 0x70,
DNS_QUERYFLAGS_RCODE = 0xF
};
enum DNSError
{
DNS_ERROR_NONE,
DNS_ERROR_UNKNOWN,
DNS_ERROR_UNLOADED,
DNS_ERROR_TIMEOUT,
DNS_ERROR_NOT_AN_ANSWER,
DNS_ERROR_NONSTANDARD_QUERY,
DNS_ERROR_FORMAT_ERROR,
DNS_ERROR_SERVER_FAILURE,
DNS_ERROR_DOMAIN_NOT_FOUND,
DNS_ERROR_NOT_IMPLEMENTED,
DNS_ERROR_REFUSED,
DNS_ERROR_NO_RECORDS,
DNS_ERROR_INVALIDTYPE
};
class Module;
struct DNSQuery;
class DNSPacket;
struct CoreExport Question
{
Anope::string name;
QueryType type;
unsigned short qclass;
Question();
Question(const Anope::string &, QueryType, unsigned short = 1);
};
struct CoreExport ResourceRecord : public Question
{
unsigned int ttl;
Anope::string rdata;
time_t created;
ResourceRecord(const Anope::string &, QueryType, unsigned short = 1);
ResourceRecord(const Question &);
};
struct CoreExport DNSQuery
{
std::vector<Question> questions;
std::vector<ResourceRecord> answers, authorities, additional;
DNSError error;
DNSQuery();
DNSQuery(const Question &q);
DNSQuery(const DNSPacket &p);
};
/** The request
*/
class CoreExport DNSRequest : public Timer, public Question
{
/* Use result cache if available */
bool use_cache;
public:
/* Request id */
unsigned short id;
/* Creator of this request */
Module *creator;
DNSRequest(const Anope::string &addr, QueryType qt, bool cache = false, Module *c = NULL);
virtual ~DNSRequest();
void Process();
virtual void OnLookupComplete(const DNSQuery *r) = 0;
virtual void OnError(const DNSQuery *r);
void Tick(time_t);
};
/** A full packet sent or recieved to/from the nameserver, may contain multiple queries
*/
class DNSPacket : public DNSQuery
{
static const int DNS_POINTER = 0xC0;
static const int DNS_LABEL = 0x3F;
void PackName(unsigned char *output, unsigned short output_size, unsigned short &pos, const Anope::string &name);
Anope::string UnpackName(const unsigned char *input, unsigned short input_size, unsigned short &pos);
Question UnpackQuestion(const unsigned char *input, unsigned short input_size, unsigned short &pos);
ResourceRecord UnpackResourceRecord(const unsigned char *input, unsigned short input_size, unsigned short &poss);
public:
static const int HEADER_LENGTH = 12;
/* Our 16-bit id for this header */
unsigned short id;
/* Flags on the query */
unsigned short flags;
DNSPacket();
void Fill(const unsigned char *input, const unsigned short len);
unsigned short Pack(unsigned char *output, unsigned short output_size);
};
/** DNS manager, manages all requests
*/
class CoreExport DNSManager : public Timer, public Socket
{
typedef std::multimap<Anope::string, ResourceRecord, ci::less> cache_map;
cache_map cache;
sockaddrs addrs;
public:
std::deque<DNSPacket *> packets;
std::map<short, DNSRequest *> requests;
static const int DNSPort = 53;
DNSManager(const Anope::string &nameserver, int port);
~DNSManager();
bool ProcessRead();
bool ProcessWrite();
/** Add a record to the dns cache
* @param r The record
*/
void AddCache(DNSQuery &r);
/** Check the DNS cache to see if request can be handled by a cached result
* @return true if a cached result was found.
*/
bool CheckCache(DNSRequest *request);
/** Tick this timer, used to clear the DNS cache.
*/
void Tick(time_t now);
/** Cleanup all pending DNS queries for a module
* @param mod The module
*/
void Cleanup(Module *mod);
/** Does a BLOCKING DNS query and returns the first IP.
* Only use this if you know what you are doing. Unless you specifically
* need a blocking query use the DNSRequest system
*/
static DNSQuery BlockingQuery(const Anope::string &mask, QueryType qt);
};
extern DNSManager *DNSEngine;
#endif // DNS_H
+240 -97
View File
@@ -1,127 +1,270 @@
/*
* Copyright (C) 2008-2012 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
//
// 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
#ifndef EXTENSIBLE_H
#define EXTENSIBLE_H
#pragma once
#include "anope.h"
#include "hashcomp.h"
#include "serialize.h"
#include "service.h"
#include "logger.h"
class CoreExport ExtensibleItem
class Extensible;
class CoreExport ExtensibleBase
: public Service
{
public:
ExtensibleItem();
virtual ~ExtensibleItem();
virtual void OnDelete();
protected:
std::map<Extensible *, void *> items;
ExtensibleBase(Module *m, const Anope::string &n);
~ExtensibleBase();
public:
virtual void Unset(Extensible *obj) = 0;
/* called when an object we are keep track of is serializing */
virtual void ExtensibleSerialize(const Extensible *, const Serializable *, Serialize::Data &) const { }
virtual void ExtensibleUnserialize(Extensible *, Serializable *, Serialize::Data &) { }
};
class ExtensibleString : public Anope::string, public ExtensibleItem
class CoreExport Extensible
{
public:
ExtensibleString(const Anope::string &s) : Anope::string(s), ExtensibleItem() { }
public:
std::set<ExtensibleBase *> extension_items;
virtual ~Extensible();
void UnsetExtensibles();
template<typename T> T *GetExt(const Anope::string &name) const;
bool HasExt(const Anope::string &name) const;
template<typename T> T *Extend(const Anope::string &name, const T &what);
template<typename T> T *Extend(const Anope::string &name);
template<typename T> T *Require(const Anope::string &name);
template<typename T> void Shrink(const Anope::string &name);
static void ExtensibleSerialize(const Extensible *, const Serializable *, Serialize::Data &data);
static void ExtensibleUnserialize(Extensible *, Serializable *, Serialize::Data &data);
};
class CoreExport Extensible : public Base
template<typename T>
class BaseExtensibleItem
: public ExtensibleBase
{
private:
typedef Anope::map<ExtensibleItem *> extensible_map;
extensible_map extension_items;
protected:
virtual T *Create(Extensible *) = 0;
public:
/** Default constructor, does nothing
*/
Extensible() { }
public:
BaseExtensibleItem(Module *m, const Anope::string &n) : ExtensibleBase(m, n) { }
/** Default destructor, deletes all of the extensible items in this object
* then clears the map
*/
virtual ~Extensible()
~BaseExtensibleItem()
{
for (extensible_map::iterator it = extension_items.begin(), it_end = extension_items.end(); it != it_end; ++it)
if (it->second)
it->second->OnDelete();
extension_items.clear();
}
/** Extend an Extensible class.
*
* @param key The key parameter is an arbitary string which identifies the extension data
* @param p This parameter is a pointer to an ExtensibleItem or ExtensibleItemBase derived class
*
* You must provide a key to store the data as via the parameter 'key'.
* The data will be inserted into the map. If the data already exists, you may not insert it
* twice, Extensible::Extend will return false in this case.
*
* @return Returns true on success, false if otherwise
*/
void Extend(const Anope::string &key, ExtensibleItem *p)
{
this->Shrink(key);
this->extension_items[key] = p;
}
/** Shrink an Extensible class.
*
* @param key The key parameter is an arbitary string which identifies the extension data
*
* You must provide a key name. The given key name will be removed from the classes data. If
* you provide a nonexistent key (case is important) then the function will return false.
* @return Returns true on success.
*/
bool Shrink(const Anope::string &key)
{
extensible_map::iterator it = this->extension_items.find(key);
if (it != this->extension_items.end())
while (!items.empty())
{
if (it->second != NULL)
it->second->OnDelete();
/* map::size_type map::erase( const key_type& key );
* returns the number of elements removed, std::map
* is single-associative so this should only be 0 or 1
*/
return this->extension_items.erase(key) > 0;
}
std::map<Extensible *, void *>::iterator it = items.begin();
Extensible *obj = it->first;
T *value = static_cast<T *>(it->second);
return false;
obj->extension_items.erase(this);
items.erase(it);
delete value;
}
}
/** Get an extension item.
*
* @param key The key parameter is an arbitary string which identifies the extension data
* @return The item found
*/
template<typename T> T GetExt(const Anope::string &key)
T *Set(Extensible *obj, const T &value)
{
extensible_map::iterator it = this->extension_items.find(key);
if (it != this->extension_items.end())
return debug_cast<T>(it->second);
T *t = Set(obj);
if (t)
*t = value;
return t;
}
T *Set(Extensible *obj)
{
T *t = Create(obj);
Unset(obj);
items[obj] = t;
obj->extension_items.insert(this);
return t;
}
void Unset(Extensible *obj) override
{
T *value = Get(obj);
items.erase(obj);
obj->extension_items.erase(this);
delete value;
}
T *Get(const Extensible *obj) const
{
std::map<Extensible *, void *>::const_iterator it = items.find(const_cast<Extensible *>(obj));
if (it != items.end())
return static_cast<T *>(it->second);
return NULL;
}
/** Check if an extension item exists.
*
* @param key The key parameter is an arbitary string which identifies the extension data
* @return True if the item was found.
*/
bool HasExt(const Anope::string &key)
bool HasExt(const Extensible *obj) const
{
return this->extension_items.count(key) > 0;
return items.find(const_cast<Extensible *>(obj)) != items.end();
}
/** Get a list of all extension items names.
* @param list A deque of strings to receive the list
* @return This function writes a list of all extension items stored
* in this object by name into the given deque and returns void.
*/
void GetExtList(std::deque<Anope::string> &list)
T *Require(Extensible *obj)
{
for (extensible_map::iterator it = extension_items.begin(), it_end = extension_items.end(); it != it_end; ++it)
list.push_back(it->first);
T *t = Get(obj);
if (t)
return t;
return Set(obj);
}
};
#endif // EXTENSIBLE_H
template<typename T>
class ExtensibleItem
: public BaseExtensibleItem<T>
{
protected:
T *Create(Extensible *obj) override
{
return new T(obj);
}
public:
ExtensibleItem(Module *m, const Anope::string &n) : BaseExtensibleItem<T>(m, n) { }
};
template<typename T>
class PrimitiveExtensibleItem
: public BaseExtensibleItem<T>
{
protected:
T *Create(Extensible *obj) override
{
return new T();
}
public:
PrimitiveExtensibleItem(Module *m, const Anope::string &n) : BaseExtensibleItem<T>(m, n) { }
};
template<>
class PrimitiveExtensibleItem<bool> : public BaseExtensibleItem<bool>
{
protected:
bool *Create(Extensible *) override
{
return NULL;
}
public:
PrimitiveExtensibleItem(Module *m, const Anope::string &n) : BaseExtensibleItem<bool>(m, n) { }
};
template<typename T>
class SerializableExtensibleItem
: public PrimitiveExtensibleItem<T>
{
public:
SerializableExtensibleItem(Module *m, const Anope::string &n) : PrimitiveExtensibleItem<T>(m, n) { }
void ExtensibleSerialize(const Extensible *e, const Serializable *s, Serialize::Data &data) const override
{
T *t = this->Get(e);
data.Store(this->name, *t);
}
void ExtensibleUnserialize(Extensible *e, Serializable *s, Serialize::Data &data) override
{
T t;
if (data.TryLoad(this->name, t))
this->Set(e, t);
else
this->Unset(e);
}
};
template<>
class SerializableExtensibleItem<bool> : public PrimitiveExtensibleItem<bool>
{
public:
SerializableExtensibleItem(Module *m, const Anope::string &n) : PrimitiveExtensibleItem<bool>(m, n) { }
void ExtensibleSerialize(const Extensible *e, const Serializable *s, Serialize::Data &data) const override
{
data.Store(this->name, this->HasExt(e));
}
void ExtensibleUnserialize(Extensible *e, Serializable *s, Serialize::Data &data) override
{
if (data.Load<bool>(this->name))
this->Set(e);
else
this->Unset(e);
}
};
template<typename T>
struct ExtensibleRef final
: ServiceReference<BaseExtensibleItem<T> >
{
ExtensibleRef(const Anope::string &n) : ServiceReference<BaseExtensibleItem<T> >("Extensible", n) { }
};
template<typename T>
T *Extensible::GetExt(const Anope::string &name) const
{
ExtensibleRef<T> ref(name);
if (ref)
return ref->Get(this);
Log(LOG_DEBUG) << "GetExt for nonexistent type " << name << " on " << static_cast<const void *>(this);
return NULL;
}
template<typename T>
T *Extensible::Extend(const Anope::string &name, const T &what)
{
T *t = Extend<T>(name);
if (t)
*t = what;
return t;
}
template<typename T>
T *Extensible::Extend(const Anope::string &name)
{
ExtensibleRef<T> ref(name);
if (ref)
return ref->Set(this);
Log(LOG_DEBUG) << "Extend for nonexistent type " << name << " on " << static_cast<void *>(this);
return NULL;
}
template<typename T>
T *Extensible::Require(const Anope::string &name)
{
if (HasExt(name))
return GetExt<T>(name);
else
return Extend<T>(name);
}
template<typename T>
void Extensible::Shrink(const Anope::string &name)
{
ExtensibleRef<T> ref(name);
if (ref)
ref->Unset(this);
else
Log(LOG_DEBUG) << "Shrink for nonexistent type " << name << " on " << static_cast<void *>(this);
}
-241
View File
@@ -1,241 +0,0 @@
/* Prototypes and external variable declarations.
*
* (C) 2003-2012 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.
*/
#ifndef EXTERN_H
#define EXTERN_H
#define E extern CoreExport
#define EI extern DllExport
#include "hashcomp.h"
/* IRC Variables */
E IRCDVar *ircd;
E IRCDProto *ircdproto;
E IRCdMessage *ircdmessage;
/**** actions.c ****/
E bool bad_password(User *u);
E void common_unban(ChannelInfo *ci, User *u, bool full = false);
/**** botserv.c ****/
E BotInfo *findbot(const Anope::string &nick);
E void bot_raw_ban(User *requester, ChannelInfo *ci, const Anope::string &nick, const Anope::string &reason);
E void bot_raw_kick(User *requester, ChannelInfo *ci, const Anope::string &nick, const Anope::string &reason);
/**** channels.c ****/
E Channel *findchan(const Anope::string &chan);
E User *nc_on_chan(Channel *c, const NickCore *nc);
E void do_cmode(const Anope::string &source, const Anope::string &channel, const Anope::string &modes, const Anope::string &ts);
E void do_join(const Anope::string &source, const Anope::string &channels, const Anope::string &ts);
E void do_kick(const Anope::string &source, const Anope::string &channel, const Anope::string &users, const Anope::string &reason);
E void do_part(const Anope::string &source, const Anope::string &channels, const Anope::string &reason);
E void chan_set_correct_modes(User *user, Channel *c, int give_modes);
/**** chanserv.c ****/
E void check_modes(Channel *c);
E ChannelInfo *cs_findchan(const Anope::string &chan);
E bool IsFounder(User *user, ChannelInfo *ci);
E void update_cs_lastseen(User *user, ChannelInfo *ci);
E int get_idealban(ChannelInfo *ci, User *u, Anope::string &ret);
/**** config.c ****/
E ConfigurationFile services_conf;
E ServerConfig *Config;
/**** encrypt.c ****/
E void enc_encrypt(const Anope::string &src, Anope::string &dest);
E bool enc_decrypt(const Anope::string &src, Anope::string &dest);
/**** hostserv.c ****/
/**** init.c ****/
E void introduce_user(const Anope::string &user);
E bool GetCommandLineArgument(const Anope::string &name, char shortname = 0);
E bool GetCommandLineArgument(const Anope::string &name, char shortname, Anope::string &param);
E bool AtTerm();
E void Fork();
E void Init(int ac, char **av);
/**** ircd.c ****/
E void pmodule_ircd_proto(IRCDProto *);
E void pmodule_ircd_var(IRCDVar *ircdvar);
E void pmodule_ircd_message(IRCdMessage *message);
/**** language.cpp ****/
E std::vector<Anope::string> languages;
E std::vector<Anope::string> domains;
E void InitLanguages();
E const char *translate(const char *string);
E const char *translate(User *u, const char *string);
E const char *translate(NickCore *nc, const char *string);
E const char *anope_gettext(const char *lang, const char *string);
/**** main.c ****/
E Anope::string services_dir;
E Anope::string services_bin;
E int debug;
E bool readonly;
E bool nofork;
E bool nothird;
E bool noexpire;
E bool protocoldebug;
E bool quitting;
E int return_code;
E bool restarting;
E Anope::string quitmsg;
E time_t start_time;
class UplinkSocket : public ConnectionSocket, public BufferedSocket
{
public:
UplinkSocket();
~UplinkSocket();
bool Read(const Anope::string &);
void OnConnect();
void OnError(const Anope::string &);
class CoreExport Message
{
Anope::string source;
std::stringstream buffer;
public:
Message();
Message(const Anope::string &);
~Message();
template<typename T> Message &operator<<(const T &val)
{
this->buffer << val;
return *this;
}
};
};
E UplinkSocket *UplinkSock;
E int CurrentUplink;
E void save_databases();
E void sighandler(int signum);
/**** messages.cpp ****/
E void init_core_messages();
E bool OnStats(const Anope::string &source, const std::vector<Anope::string> &);
E bool OnTime(const Anope::string &source, const std::vector<Anope::string> &);
E bool OnVersion(const Anope::string &source, const std::vector<Anope::string> &);
E bool On436(const Anope::string &, const std::vector<Anope::string> &);
E bool OnAway(const Anope::string &, const std::vector<Anope::string> &);
E bool OnJoin(const Anope::string &, const std::vector<Anope::string> &);
E bool OnKick(const Anope::string &, const std::vector<Anope::string> &);
E bool OnKill(const Anope::string &, const std::vector<Anope::string> &);
E bool OnMode(const Anope::string &, const std::vector<Anope::string> &);
E bool OnNick(const Anope::string &, const std::vector<Anope::string> &);
E bool OnUID(const Anope::string &, const std::vector<Anope::string> &);
E bool OnPart(const Anope::string &, const std::vector<Anope::string> &);
E bool OnPing(const Anope::string &, const std::vector<Anope::string> &);
E bool OnPrivmsg(const Anope::string &, const std::vector<Anope::string> &);
E bool OnQuit(const Anope::string &, const std::vector<Anope::string> &);
E bool OnServer(const Anope::string &, const std::vector<Anope::string> &);
E bool OnSQuit(const Anope::string &, const std::vector<Anope::string> &);
E bool OnTopic(const Anope::string &, const std::vector<Anope::string> &);
E bool OnWhois(const Anope::string &, const std::vector<Anope::string> &);
E bool OnCapab(const Anope::string &, const std::vector<Anope::string> &);
E bool OnSJoin(const Anope::string &, const std::vector<Anope::string> &);
E bool OnError(const Anope::string &, const std::vector<Anope::string> &);
/**** misc.c ****/
E bool IsFile(const Anope::string &filename);
E time_t dotime(const Anope::string &s);
E Anope::string duration(const time_t &seconds, NickCore *nc = NULL);
E Anope::string expire_left(NickCore *nc, time_t expires);
E Anope::string do_strftime(const time_t &t, NickCore *nc = NULL, bool short_output = false);
E bool IsValidIdent(const Anope::string &ident);
E bool IsValidHost(const Anope::string &host);
E Anope::string myStrGetToken(const Anope::string &str, char dilim, int token_number);
E Anope::string myStrGetTokenRemainder(const Anope::string &str, char dilim, int token_number);
E int myNumToken(const Anope::string &str, char dilim);
E bool nickIsServices(const Anope::string &nick, bool bot);
E void add_entropy_userkeys();
E void rand_init();
E unsigned char getrandom8();
E uint16_t getrandom16();
E uint32_t getrandom32();
E std::list<Anope::string> BuildStringList(const Anope::string &, char = ' ');
E std::vector<Anope::string> BuildStringVector(const Anope::string &, char = ' ');
E bool str_is_wildcard(const Anope::string &str);
E bool str_is_pure_wildcard(const Anope::string &str);
E Anope::string normalizeBuffer(const Anope::string &);
/**** modes.cpp ****/
/* Number of generic modes we support */
E unsigned GenericChannelModes, GenericUserModes;
E std::multimap<ChannelModeName, ModeLock> def_mode_locks;
E void SetDefaultMLock(ServerConfig *config);
/**** nickserv.c ****/
E void change_core_display(NickCore *nc);
E void change_core_display(NickCore *nc, const Anope::string &newdisplay);
E NickAlias *findnick(const Anope::string &nick);
E NickCore *findcore(const Anope::string &nick);
E bool is_on_access(const User *u, const NickCore *nc);
/**** process.c ****/
E void process(const Anope::string &buf);
/**** sockets.cpp ****/
E int32_t TotalRead;
E int32_t TotalWritten;
E SocketIO normalSocketIO;
/**** users.c ****/
E int32_t opcnt;
E uint32_t maxusercnt, usercnt;
E time_t maxusertime;
E User *finduser(const Anope::string &nick);
E User *do_nick(const Anope::string &source, const Anope::string &nick, const Anope::string &username, const Anope::string &host, const Anope::string &server, const Anope::string &realname, time_t ts, const Anope::string &ip, const Anope::string &vhost, const Anope::string &uid, const Anope::string &modes);
E void do_umode(const Anope::string &user, const Anope::string &modes);
E void do_kill(User *user, const Anope::string &reason);
E bool matches_list(Channel *c, User *user, ChannelModeName mode);
E Anope::string create_mask(User *u);
#endif /* EXTERN_H */
+69 -250
View File
@@ -1,157 +1,85 @@
/*
* Copyright (C) 2002-2011 InspIRCd Development Team
* Copyright (C) 2009-2012 Anope Team <team@anope.org>
*
* Please read COPYING and README for further details.
*
* These classes have been copied from InspIRCd and modified
* for use in Anope.
*
*
*/
// 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
#ifndef HASHCOMP_H
#define HASHCOMP_H
#ifdef _WIN32
# ifdef MODULE_COMPILE
# define CoreExport __declspec(dllimport)
# define DllExport __declspec(dllexport)
# else
# define CoreExport __declspec(dllexport)
# define DllExport __declspec(dllimport)
# endif
#else
# define CoreExport
# define DllExport
#endif
#pragma once
#include <string>
#include <locale>
#include <unordered_map>
#include "services.h"
namespace Anope
{
class string;
}
/*******************************************************
* This file contains classes and templates that deal
* with the comparison and hashing of 'irc strings'.
* An 'irc string' is a string which compares in a
* case insensitive manner, and as per RFC 1459 will
* treat [ identical to {, ] identical to }, and \
* as identical to |.
*
* Our hashing functions are designed to accept
* std::string and compare/hash them as type irc::string
* by converting them internally. This makes them
* backwards compatible with other code which is not
* aware of irc::string.
*******************************************************/
/* Casemap in use by Anope. ci::string's comparison functions use this (and thus Anope::string) */
extern std::locale casemap;
/** A mapping of uppercase to lowercase, including scandinavian
* 'oddities' as specified by RFC1459, e.g. { -> [, and | -> \
*/
unsigned const char rfc_case_insensitive_map[256] = {
0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, /* 0-19 */
20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, /* 20-39 */
40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, /* 40-59 */
60, 61, 62, 63, 64, 97, 98, 99, 100, 101, 102, 103, 104, 105, 106, 107, 108, 109, 110, 111, /* 60-79 */
112, 113, 114, 115, 116, 117, 118, 119, 120, 121, 122, 123, 124, 125, 94, 95, 96, 97, 98, 99, /* 80-99 */
100, 101, 102, 103, 104, 105, 106, 107, 108, 109, 110, 111, 112, 113, 114, 115, 116, 117, 118, 119, /* 100-119 */
120, 121, 122, 123, 124, 125, 126, 127, 128, 129, 130, 131, 132, 133, 134, 135, 136, 137, 138, 139, /* 120-139 */
140, 141, 142, 143, 144, 145, 146, 147, 148, 149, 150, 151, 152, 153, 154, 155, 156, 157, 158, 159, /* 140-159 */
160, 161, 162, 163, 164, 165, 166, 167, 168, 169, 170, 171, 172, 173, 174, 175, 176, 177, 178, 179, /* 160-179 */
180, 181, 182, 183, 184, 185, 186, 187, 188, 189, 190, 191, 192, 193, 194, 195, 196, 197, 198, 199, /* 180-199 */
200, 201, 202, 203, 204, 205, 206, 207, 208, 209, 210, 211, 212, 213, 214, 215, 216, 217, 218, 219, /* 200-219 */
220, 221, 222, 223, 224, 225, 226, 227, 228, 229, 230, 231, 232, 233, 234, 235, 236, 237, 238, 239, /* 220-239 */
240, 241, 242, 243, 244, 245, 246, 247, 248, 249, 250, 251, 252, 253, 254, 255 /* 240-255 */
};
extern CoreExport void CaseMapRebuild();
extern CoreExport unsigned char tolower(unsigned char);
extern CoreExport unsigned char toupper(unsigned char);
/** Case insensitive map, ASCII rules.
* That is;
* [ != {, but A == a.
*/
unsigned const char ascii_case_insensitive_map[256] = {
0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, /* 0-19 */
20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, /* 20-39 */
40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, /* 40-59 */
60, 61, 62, 63, 64, 97, 98, 99, 100, 101, 102, 103, 104, 105, 106, 107, 108, 109, 110, 111, /* 60-79 */
112, 113, 114, 115, 116, 117, 118, 119, 120, 121, 122, 91, 92, 93, 94, 95, 96, 97, 98, 99, /* 80-99 */
100, 101, 102, 103, 104, 105, 106, 107, 108, 109, 110, 111, 112, 113, 114, 115, 116, 117, 118, 119, /* 100-119 */
120, 121, 122, 123, 124, 125, 126, 127, 128, 129, 130, 131, 132, 133, 134, 135, 136, 137, 138, 139, /* 120-139 */
140, 141, 142, 143, 144, 145, 146, 147, 148, 149, 150, 151, 152, 153, 154, 155, 156, 157, 158, 159, /* 140-159 */
160, 161, 162, 163, 164, 165, 166, 167, 168, 169, 170, 171, 172, 173, 174, 175, 176, 177, 178, 179, /* 160-179 */
180, 181, 182, 183, 184, 185, 186, 187, 188, 189, 190, 191, 192, 193, 194, 195, 196, 197, 198, 199, /* 180-199 */
200, 201, 202, 203, 204, 205, 206, 207, 208, 209, 210, 211, 212, 213, 214, 215, 216, 217, 218, 219, /* 200-219 */
220, 221, 222, 223, 224, 225, 226, 227, 228, 229, 230, 231, 232, 233, 234, 235, 236, 237, 238, 239, /* 220-239 */
240, 241, 242, 243, 244, 245, 246, 247, 248, 249, 250, 251, 252, 253, 254, 255 /* 240-255 */
};
/** The irc namespace contains a number of helper classes.
*/
namespace irc
{
/** The irc_char_traits class is used for RFC-style comparison of strings.
* This class is used to implement irc::string, a case-insensitive, RFC-
* comparing string class.
*/
struct irc_char_traits : std::char_traits<char>
/* ASCII case insensitive ctype. */
template<typename char_type>
class ascii_ctype
: public std::ctype<char_type>
{
/** Check if two chars match.
* @param c1st First character
* @param c2nd Second character
* @return true if the characters are equal
*/
static bool eq(char c1st, char c2nd);
public:
char_type do_toupper(char_type c) const override
{
if (c >= 'a' && c <= 'z')
return c - 32;
else
return c;
}
/** Check if two chars do NOT match.
* @param c1st First character
* @param c2nd Second character
* @return true if the characters are unequal
*/
static bool ne(char c1st, char c2nd);
/** Check if one char is less than another.
* @param c1st First character
* @param c2nd Second character
* @return true if c1st is less than c2nd
*/
static bool lt(char c1st, char c2nd);
/** Compare two strings of size n.
* @param str1 First string
* @param str2 Second string
* @param n Length to compare to
* @return similar to strcmp, zero for equal, less than zero for str1
* being less and greater than zero for str1 being greater than str2.
*/
static int compare(const char *str1, const char *str2, size_t n);
/** Find a char within a string up to position n.
* @param s1 String to find in
* @param n Position to search up to
* @param c Character to search for
* @return Pointer to the first occurance of c in s1
*/
static const char *find(const char *s1, int n, char c);
char_type do_tolower(char_type c) const override
{
if (c >= 'A' && c <= 'Z')
return c + 32;
else
return c;
}
};
/** This typedef declares irc::string based upon irc_char_traits.
*/
typedef std::basic_string<char, irc_char_traits, std::allocator<char> > string;
struct CoreExport less
/* rfc1459 case insensitive ctype, { = [, } = ], and | = \ */
template<typename char_type>
class rfc1459_ctype final
: public ascii_ctype<char_type>
{
/** Compare two Anope::strings as irc::strings and find which one is less
* @param s1 The first string
* @param s2 The second string
* @return true if s1 < s2, else false
*/
bool operator()(const Anope::string &s1, const Anope::string &s2) const;
public:
char_type do_toupper(char_type c) const override
{
if (c == '{' || c == '}' || c == '|')
return c - 32;
else
return ascii_ctype<char_type>::do_toupper(c);
}
char_type do_tolower(char_type c) const override
{
if (c == '[' || c == ']' || c == '\\')
return c + 32;
else
return ascii_ctype<char_type>::do_tolower(c);
}
};
}
/** The ci namespace contains a number of helper classes.
/** The ci namespace contains a number of helper classes relevant to case insensitive strings.
*/
namespace ci
{
@@ -159,7 +87,8 @@ namespace ci
* This class is used to implement ci::string, a case-insensitive, ASCII-
* comparing string class.
*/
struct CoreExport ci_char_traits : std::char_traits<char>
struct CoreExport ci_char_traits final
: std::char_traits<char>
{
/** Check if two chars match.
* @param c1st First character
@@ -195,7 +124,7 @@ namespace ci
* @param s1 String to find in
* @param n Position to search up to
* @param c Character to search for
* @return Pointer to the first occurance of c in s1
* @return Pointer to the first occurrence of c in s1
*/
static const char *find(const char *s1, int n, char c);
};
@@ -204,7 +133,7 @@ namespace ci
*/
typedef std::basic_string<char, ci_char_traits, std::allocator<char> > string;
struct CoreExport less
struct CoreExport less final
{
/** Compare two Anope::strings as ci::strings and find which one is less
* @param s1 The first string
@@ -215,26 +144,6 @@ namespace ci
};
}
/* Define operators for + and == with irc::string to std::string for easy assignment
* and comparison
*
* Operator +
*/
inline std::string operator+(std::string &leftval, irc::string &rightval)
{
return leftval + std::string(rightval.c_str());
}
/* Define operators for + and == with irc::string to std::string for easy assignment
* and comparison
*
* Operator +
*/
inline irc::string operator+(irc::string &leftval, std::string &rightval)
{
return leftval + irc::string(rightval.c_str());
}
/* Define operators for + and == with ci::string to std::string for easy assignment
* and comparison
*
@@ -255,46 +164,6 @@ inline ci::string operator+(ci::string &leftval, std::string &rightval)
return leftval + ci::string(rightval.c_str());
}
/* Define operators for + and == with irc::string to ci::string for easy assignment
* and comparison
*
* Operator +
*/
inline irc::string operator+(irc::string &leftval, ci::string &rightval)
{
return leftval + irc::string(rightval.c_str());
}
/* Define operators for + and == with irc::string to ci::string for easy assignment
* and comparison
*
* Operator +
*/
inline ci::string operator+(ci::string &leftval, irc::string &rightval)
{
return leftval + ci::string(rightval.c_str());
}
/* Define operators for + and == with irc::string to std::string for easy assignment
* and comparison
*
* Operator ==
*/
inline bool operator==(const std::string &leftval, const irc::string &rightval)
{
return leftval.c_str() == rightval;
}
/* Define operators for + and == with irc::string to std::string for easy assignment
* and comparison
*
* Operator ==
*/
inline bool operator==(const irc::string &leftval, const std::string &rightval)
{
return leftval == rightval.c_str();
}
/* Define operators for + and == with ci::string to std::string for easy assignment
* and comparison
*
@@ -315,40 +184,6 @@ inline bool operator==(const ci::string &leftval, const std::string &rightval)
return leftval == rightval.c_str();
}
/* Define operators for + and == with irc::string to ci::string for easy assignment
* and comparison
*
* Operator ==
*/
inline bool operator==(const ci::string &leftval, const irc::string &rightval)
{
return leftval.c_str() == rightval;
}
/* Define operators for + and == with irc::string to ci::string for easy assignment
* and comparison
*
* Operator ==
*/
inline bool operator==(const irc::string &leftval, const ci::string &rightval)
{
return leftval == rightval.c_str();
}
/* Define operators != for irc::string to std::string for easy comparison
*/
inline bool operator!=(const irc::string &leftval, const std::string &rightval)
{
return !(leftval == rightval.c_str());
}
/* Define operators != for std::string to irc::string for easy comparison
*/
inline bool operator!=(const std::string &leftval, const irc::string &rightval)
{
return !(leftval.c_str() == rightval);
}
/* Define operators != for ci::string to std::string for easy comparison
*/
inline bool operator!=(const ci::string &leftval, const std::string &rightval)
@@ -356,25 +191,9 @@ inline bool operator!=(const ci::string &leftval, const std::string &rightval)
return !(leftval == rightval.c_str());
}
/* Define operators != for ci::string to irc::string for easy comparison
/* Define operators != for std::string to ci::string for easy comparison
*/
inline bool operator!=(const std::string &leftval, const ci::string &rightval)
{
return !(leftval.c_str() == rightval);
}
/* Define operators != for irc::string to ci::string for easy comparison
*/
inline bool operator!=(const irc::string &leftval, const ci::string &rightval)
{
return !(leftval == rightval.c_str());
}
/* Define operators != for irc::string to ci::string for easy comparison
*/
inline bool operator!=(const ci::string &leftval, const irc::string &rightval)
{
return !(leftval.c_str() == rightval);
}
#endif // HASHCOMP_H
+178 -83
View File
@@ -1,85 +1,180 @@
/* Commonly used language strings
*
* (C) 2008-2012 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
#define MORE_INFO _("\002%s%s HELP %s\002 for more information.")
#define BAD_USERHOST_MASK _("Mask must be in the form \037user\037@\037host\037.")
#define BAD_EXPIRY_TIME _("Invalid expiry time.")
#define USERHOST_MASK_TOO_WIDE _("%s coverage is too wide; Please use a more specific mask.")
#define READ_ONLY_MODE _("Services are 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 be at least\n" \
"five characters long, should not be something easily guessed\n" \
"(e.g. your real name or your nick), and cannot contain the space or tab characters.")
#define PASSWORD_TOO_LONG _("Your password is too long. Please try again with a shorter password.")
#define NICK_NOT_REGISTERED _("Your nick isn't registered.")
#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 _("Password authentication required for that command.")
#define MAIL_X_INVALID _("\002%s\002 is not a valid e-mail address.")
#define NO_REASON _("No reason")
#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 UNKNOWN_OPTION _("Unknown option \002%s\002.\n" \
"Type %s%s HELP %s for more information.")
#define NICK_IS_REGISTERED _("This nick is owned by someone else. Please choose another.\n" \
"(If this is your nick, type \002%s%s IDENTIFY \037password\037\002.)")
#define NICK_IS_SECURE _("This nickname is registered and protected. If it is your\n" \
"nick, type \002%s%s IDENTIFY \037password\037\002. Otherwise,\n" \
"please choose a different nick.")
#define FORCENICKCHANGE_NOW _("This nickname has been registered; you may not use it.")
#define NICK_CANNOT_BE_REGISTERED _("Nickname \002%s\002 may not be registered.")
#define NICK_ALREADY_REGISTERED _("Nickname \002%s\002 is already registered!")
#define NICK_SET_SYNTAX _("SET \037option\037 \037parameters\037")
#define NICK_SET_DISABLED _("Sorry, nickname option setting is temporarily disabled.")
#define NICK_SET_UNKNOWN_OPTION _("Unknown SET option \002%s%s\002.")
#define NICK_SET_DISPLAY_CHANGED _("The new display is now \002%s\002.")
#define NICK_LIST_SYNTAX _("LIST \037pattern\037")
#define NICK_RECOVERED _("User claiming your nick has been killed.\n" \
"\002%s%s RELEASE %s\002 to get it back before %s timeout.")
#define NICK_REQUESTED _("This nick has already been requested, please check your e-mail address for the pass code")
#define NICK_CONFIRM_INVALID _("Invalid passcode has been entered, please check the e-mail again, and retry")
#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_SET_DISABLED _("Sorry, channel option setting is temporarily disabled.")
#define CHAN_SETTING_CHANGED _("%s for %s set to %s.")
#define CHAN_SETTING_UNSET _("%s for %s unset.")
#define CHAN_SET_MLOCK_DEPRECATED _("MLOCK is deprecated. Use \002%s%s HELP MODE\002 instead.")
#define CHAN_ACCESS_LEVEL_RANGE _("Access level must be between %d and %d inclusive.")
#define CHAN_INFO_HEADER _("Information for channel \002%s\002:")
#define CHAN_EXCEPTED _("\002%s\002 matches an except on %s and cannot be banned until the except have been removed.")
#define MEMO_NEW_X_MEMO_ARRIVED _("There is a new memo on channel %s.\n" \
"Type \002%s%s READ %s %d\002 to read it.")
#define MEMO_NEW_MEMO_ARRIVED _("You have a new memo from %s.\n" \
"Type \002%s%s READ %d\002 to read it.")
#define MEMO_HAVE_NO_MEMOS _("You have no memos.")
#define MEMO_X_HAS_NO_MEMOS _("%s has no memos.")
#define MEMO_SEND_SYNTAX _("SEND {\037nick\037 | \037channel\037} \037memo-text\037")
#define MEMO_SEND_DISABLED _("Sorry, memo sending is temporarily disabled.")
#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 BOT_ASSIGN_READONLY _("Sorry, bot assignment is temporarily disabled.")
#define HOST_SET_ERROR _("A vhost must be in the format of a valid hostmask.")
#define HOST_SET_IDENT_ERROR _("A vhost ident must be in the format of a valid ident")
#define HOST_SET_TOOLONG _("Error! The vhost is too long, please use a host shorter than %d characters.")
#define HOST_SET_IDENTTOOLONG _("Error! The Ident is too long, please use an ident shorter than %d characters.")
#define HOST_NOT_ASSIGNED _("Please contact an Operator to get a vhost assigned to this nick.")
#define HOST_NO_VIDENT _("Your IRCD does not support vIdent's, if this is incorrect, please report this as a possible bug")
#pragma once
#include "anope.h"
namespace Language
{
/* Languages we support as configured in anope.conf. They are
* added to this list if we detect a language exists in the correct
* location for each language.
*/
extern CoreExport std::vector<Anope::string> Languages;
/* Domains to search when looking for translations other than the
* default "anope domain. This is used by modules who add their own
* language files (and thus domains) to Anope. If a module is loaded
* and we detect a language file exists for at least one of the supported
* languages for the module, then we add the module's domain (its name)
* here.
*
* When strings are translated they are checked against all domains.
*/
extern std::vector<Anope::string> Domains;
/** Initialize the language system. Finds valid language files and
* populates the Languages list.
*/
extern void InitLanguages();
/** Sets the locale to the specified language.
* @param lang The language to translate to.
*/
extern CoreExport void SetLocale(const char *lang);
/** Sets the locale back to the default. */
extern CoreExport void ResetLocale();
/** Translates a string to the default language.
* @param string A string to translate
* @return The translated string if found, else the original string.
*/
extern CoreExport const char *Translate(const char *string);
/** Translates a string to the language of the given user.
* @param u The user to translate the string for
* @param string A string to translate
* @return The translated string if found, else the original string.
*/
extern CoreExport const char *Translate(User *u, const char *string);
/** Translates a string to the language of the given account.
* @param nc The account to translate the string for
* @param string A string to translate
* @return The translated string if count, else the original string
*/
extern CoreExport const char *Translate(const NickCore *nc, const char *string);
/** Translates a string to the given language.
* @param lang The language to translate to
* @param string The string to translate
* @return The translated string if found, else the original string.
*/
extern CoreExport const char *Translate(const char *lang, const char *string);
/** Translates a plural string to the default language.
* @param count The number of items the string is counting.
* @param singular The string to translate if there is one of \p count
* @param plural The string to translate if there is multiple of \p count
* @return The translated string if found, else the original string.
*/
extern CoreExport const char *Translate(int count, const char *singular, const char *plural);
/** Translates a plural string to the language of the given user.
* @param u The user to translate the string for
* @param count The number of items the string is counting.
* @param singular The string to translate if there is one of \p count
* @param plural The string to translate if there is multiple of \p count
* @return The translated string if found, else the original string.
*/
extern CoreExport const char *Translate(User *u, int count, const char *singular, const char *plural);
/** Translates a plural string to the language of the given account.
* @param nc The account to translate the string for
* @param count The number of items the string is counting.
* @param singular The string to translate if there is one of \p count
* @param plural The string to translate if there is multiple of \p count
* @return The translated string if count, else the original string
*/
extern CoreExport const char *Translate(const NickCore *nc, int count, const char *singular, const char *plural);
/** Translates a plural string to the given language.
* @param lang The language to translate to
* @param count The number of items the string is counting.
* @param singular The string to translate if there is one of \p count
* @param plural The string to translate if there is multiple of \p count
* @return The translated string if found, else the original string.
*/
extern CoreExport const char *Translate(const char *lang, int count, const char *singular, const char *plural);
} // namespace Language
/* Commonly used language strings */
#define ACCESS_DENIED _("Access denied.")
#define BAD_EXPIRY_TIME _("Invalid expiry time.")
#define BAD_USERHOST_MASK _("Mask must be in the form \037user\037@\037host\037.")
#define CONFIRM_DROP _("Please confirm that you want to drop \002%s\002 with \002%s\033%s\033%s\002")
#define CONFIRM_REGISTER_ADMIN _("All new accounts must be confirmed by an administrator. Please wait for your registration to be confirmed.")
#define CONFIRM_REGISTER_CODE _("All new accounts must be confirmed. To confirm your account, type \002%s\002.")
#define CONFIRM_REGISTER_MAIL _("All new accounts must be confirmed. To confirm your account, follow the instructions that were emailed to you.")
#define LIST_INCORRECT_RANGE _("Incorrect range specified. The correct syntax is \002#\037from\037-\037to\037\002.")
#define MAIL_X_INVALID _("\002%s\002 is not a valid email address.")
#define MORE_INFO _("Type \002%s\002 for more information.")
#define NO_EXPIRE _("does not expire")
#define PASSWORD_INCORRECT _("Password incorrect.")
#define READ_ONLY_MODE _("Services are temporarily in read-only mode.")
#define TIME_NEVER _("Never")
#define TIME_NOW _("Now")
#define TIME_UNKNOWN _("Unknown")
#define TRY_AGAIN_LATER _("The \002%s\002 command is temporarily unavailable. Please try again later.")
#define USERHOST_MASK_TOO_WIDE _("%s coverage is too wide; Please use a more specific mask.")
#define BOT_DOES_NOT_EXIST _("Bot \002%s\002 does not exist.")
#define BOT_NOT_ASSIGNED _("You must assign a bot to the channel before using this command.")
#define BOT_NOT_ON_CHANNEL _("Bot is not on channel \002%s\002.")
#define CHAN_ACCESS_LIMIT N_("You can only have %u access entry on a channel.", "You can only have %u access entries on a channel.")
#define CHAN_ACCESS_LIMIT_DEEP N_("You can only have %u access entry on a channel, including access entries from other channels.", "You can only have %u access entries on a channel, including access entries from other channels.")
#define CHAN_ACCESS_LEVEL_RANGE _("Access level must be between %d and %d inclusive.")
#define CHAN_ACCESS_MALFORMED _("You cannot add a malformed mask to an access list. Did you mean to add %s instead?")
#define CHAN_ACCESS_FOREIGN N_("%u access entry from other access systems not shown; use \002%s\033ALL\002 to view all access entries.", "%u access entries from other access systems not shown; use \002%s\033ALL\002 to view all access entries.")
#define CHAN_EXCEPTED _("\002%s\002 matches an except on %s and cannot be banned until the except has been removed.")
#define CHAN_INFO_HEADER _("Information about channel \002%s\002:")
#define CHAN_LIMIT_EXCEEDED _("You have already exceeded your limit of \002%d\002 channels.")
#define CHAN_LIMIT_REACHED _("You have already reached your limit of \002%d\002 channels.")
#define CHAN_NOT_ALLOWED_TO_JOIN _("You are not permitted to be on this channel.")
#define CHAN_SETTING_CHANGED _("%s for %s set to %s.")
#define CHAN_SETTING_INVALID _("%s syntax is invalid.")
#define CHAN_SETTING_UNSET _("%s for %s unset.")
#define CHAN_SYMBOL_REQUIRED _("Please use the symbol of \002#\002 when attempting to register.")
#define CHAN_X_INVALID _("Channel %s is not a valid channel.")
#define CHAN_X_NOT_IN_USE _("Channel \002%s\002 doesn't exist.")
#define CHAN_X_NOT_REGISTERED _("Channel \002%s\002 isn't registered.")
#define CHAN_X_SUSPENDED _("Channel %s is currently suspended.")
#define HOST_NO_VIDENT _("Your IRCd does not support vidents. If this is incorrect please report this as a possible bug.")
#define HOST_NOT_ASSIGNED _("Please contact an Operator to get a vhost assigned to this nick.")
#define HOST_SET_VHOST_ERROR _("A vhost must be in the format of a valid hostname.")
#define HOST_SET_VHOST_TOO_LONG _("Error! The vhost is too long, please use a hostname shorter than %zu characters.")
#define HOST_SET_VIDENT_ERROR _("A vident must be in the format of a valid ident.")
#define HOST_SET_VIDENT_TOO_LONG _("Error! The vident is too long, please use an ident shorter than %zu characters.")
#define MEMO_HAVE_NO_MEMOS _("You have no memos.")
#define MEMO_HAVE_NO_NEW_MEMOS _("You have no new memos.")
#define MEMO_NEW_MEMO_ARRIVED _("You have a new memo from %s. Type \002%s\033%zu\002 to read it.")
#define MEMO_NEW_X_MEMO_ARRIVED _("There is a new memo on channel %s. Type \002%s\033%s\033%zu\002 to read it.")
#define MEMO_X_HAS_NO_MEMOS _("%s has no memos.")
#define MEMO_X_HAS_NO_NEW_MEMOS _("%s has no new memos.")
#define NICK_ALREADY_REGISTERED _("Nickname \002%s\002 is already registered!")
#define NICK_CANNOT_BE_REGISTERED _("Nickname \002%s\002 may not be registered.")
#define NICK_IDENTIFY_REQUIRED _("You must be logged into an account to use that command.")
#define NICK_SET_DISPLAY_CHANGED _("The new display is now \002%s\002.")
#define NICK_X_NOT_IN_USE _("Nick \002%s\002 isn't currently in use.")
#define NICK_X_NOT_ON_CHAN _("\002%s\002 is not currently on channel %s.")
#define NICK_X_NOT_REGISTERED _("Nick \002%s\002 isn't registered.")
#define NICK_X_SUSPENDED _("Nick %s is currently suspended.")
+62
View File
@@ -0,0 +1,62 @@
// Anope IRC Services <https://www.anope.org/>
//
// Copyright (C) 2003-2026 Anope Contributors
//
// Anope is free software. You can use, modify, and/or distribute it under the
// terms of version 2 of the GNU General Public License. See docs/LICENSE.txt
// for the complete terms of this license and docs/AUTHORS.txt for a list of
// contributors.
//
// Based on the original code of Epona by Lara
// Based on the original code of Services by Andy Church
//
// SPDX-License-Identifier: GPL-2.0-only
#pragma once
#include "services.h"
#include "anope.h"
/** A class to process numbered lists (passed to most DEL/LIST/VIEW commands).
* The function HandleNumber is called for every number in the list. Note that
* if descending is true it gets called in descending order. This is so deleting
* the index passed to the function from an array will not cause the other indexes
* passed to the function to be incorrect. This keeps us from having to have an
* 'in use' flag on everything.
*/
class CoreExport NumberList
{
private:
bool is_valid = true;
std::set<unsigned> numbers;
bool desc;
public:
/** Processes a numbered list
* @param list The list
* @param descending True to make HandleNumber get called with numbers in descending order
*/
NumberList(const Anope::string &list, bool descending);
/** Destructor, does nothing
*/
virtual ~NumberList() = default;
/** Should be called after the constructors are done running. This calls the callbacks.
*/
void Process();
/** Called with a number from the list
* @param number The number
*/
virtual void HandleNumber(unsigned number);
/** Called when there is an error with the numbered list
* Return false to immediately stop processing the list and return
* This is all done before we start calling HandleNumber, so no numbers will have been processed yet
* @param list The list
* @return false to stop processing
*/
virtual bool InvalidRange(const Anope::string &list);
};
+80 -41
View File
@@ -1,14 +1,36 @@
#ifndef LOGGER_H
#define LOGGER_H
// Anope IRC Services <https://www.anope.org/>
//
// Copyright (C) 2003-2026 Anope Contributors
//
// Anope is free software. You can use, modify, and/or distribute it under the
// terms of version 2 of the GNU General Public License. See docs/LICENSE.txt
// for the complete terms of this license and docs/AUTHORS.txt for a list of
// contributors.
//
// Based on the original code of Epona by Lara
// Based on the original code of Services by Andy Church
//
// SPDX-License-Identifier: GPL-2.0-only
#pragma once
#include "anope.h"
#include "defs.h"
enum LogType
{
/* Used whenever an administrator uses an administrative command */
LOG_ADMIN,
/* Used whenever an administrator overrides something, such as adding
* access to a channel where they don't have permission to.
*/
LOG_OVERRIDE,
/* Any other command usage */
LOG_COMMAND,
LOG_SERVER,
LOG_CHANNEL,
LOG_USER,
LOG_MODULE,
LOG_NORMAL,
LOG_TERMINAL,
LOG_RAWIO,
@@ -18,52 +40,68 @@ enum LogType
LOG_DEBUG_4
};
struct LogFile
struct LogFile final
{
Anope::string filename;
public:
std::ofstream stream;
LogFile(const Anope::string &name);
Anope::string GetName() const;
~LogFile();
const Anope::string &GetName() const;
};
class Command;
class CoreExport Log
/* Represents a single log message */
class CoreExport Log final
{
public:
BotInfo *bi;
User *u;
Command *c;
Channel *chan;
ChannelInfo *ci;
Server *s;
LogType Type;
Anope::string Category;
std::list<Anope::string> Sources;
public:
/* Bot that should log this message */
BotInfo *bi = nullptr;
/* For commands, the user executing the command, but might not always exist */
User *u = nullptr;
/* For commands, the account executing the command, but will not always exist */
NickCore *nc = nullptr;
/* For commands, the command being executed */
Command *c = nullptr;
/* For commands, the command source */
CommandSource *source = nullptr;
/* Used for LOG_CHANNEL */
Channel *chan = nullptr;
/* For commands, the channel the command was executed on, will not always exist */
const ChannelInfo *ci = nullptr;
/* For LOG_SERVER */
Server *s = nullptr;
/* For LOG_MODULE */
Module *m = nullptr;
LogType type;
Anope::string category;
std::stringstream buf;
Log(LogType type = LOG_NORMAL, const Anope::string &category = "", BotInfo *bi = NULL);
/* LOG_COMMAND/OVERRIDE/ADMIN */
Log(LogType type, User *u, Command *c, ChannelInfo *ci = NULL);
Log(LogType type, CommandSource &source, Command *c, ChannelInfo *ci = NULL);
/* LOG_CHANNEL */
Log(User *u, Channel *c, const Anope::string &category = "");
/* LOG_USER */
explicit Log(User *u, const Anope::string &category = "");
Log(User *u, const Anope::string &category = "", BotInfo *bi = NULL);
/* LOG_SERVER */
Log(Server *s, const Anope::string &category = "");
Log(Server *s, const Anope::string &category = "", BotInfo *bi = NULL);
Log(BotInfo *b, const Anope::string &category = "");
Log(Module *m, const Anope::string &category = "", BotInfo *bi = NULL);
~Log();
private:
Anope::string FormatSource() const;
Anope::string FormatCommand() const;
public:
Anope::string BuildPrefix() const;
template<typename T> Log &operator<<(T val)
@@ -73,33 +111,34 @@ class CoreExport Log
}
};
class CoreExport LogInfo
/* Configured in the configuration file, actually does the message logging */
class CoreExport LogInfo final
{
public:
std::list<Anope::string> Targets;
std::map<Anope::string, LogFile *> Logfiles;
std::list<Anope::string> Sources;
int LogAge;
std::list<Anope::string> Admin;
std::list<Anope::string> Override;
std::list<Anope::string> Commands;
std::list<Anope::string> Servers;
std::list<Anope::string> Users;
std::list<Anope::string> Channels;
std::list<Anope::string> Normal;
bool RawIO;
bool Debug;
public:
BotInfo *bot = nullptr;
std::vector<Anope::string> targets;
std::vector<LogFile *> logfiles;
int last_day = 0;
std::vector<Anope::string> sources;
int log_age;
std::vector<Anope::string> admin;
std::vector<Anope::string> override;
std::vector<Anope::string> commands;
std::vector<Anope::string> servers;
std::vector<Anope::string> users;
std::vector<Anope::string> channels;
std::vector<Anope::string> normal;
bool raw_io;
bool debug;
LogInfo(int logage, bool rawio, bool debug);
~LogInfo();
void AddType(std::list<Anope::string> &list, const Anope::string &type);
void OpenLogFiles();
bool HasType(LogType ltype, const Anope::string &type) const;
/* Logs the message l if configured to */
void ProcessMessage(const Log *l);
};
#endif // LOGGER_H
+50 -20
View File
@@ -1,28 +1,58 @@
#ifndef MAIL_H
#define MAIL_H
// Anope IRC Services <https://www.anope.org/>
//
// Copyright (C) 2003-2026 Anope Contributors
//
// Anope is free software. You can use, modify, and/or distribute it under the
// terms of version 2 of the GNU General Public License. See docs/LICENSE.txt
// for the complete terms of this license and docs/AUTHORS.txt for a list of
// contributors.
//
// Based on the original code of Epona by Lara
// Based on the original code of Services by Andy Church
//
// SPDX-License-Identifier: GPL-2.0-only
#pragma once
#include "anope.h"
#include "threadengine.h"
#include "serialize.h"
extern CoreExport bool Mail(User *u, NickCore *nc, BotInfo *service, const Anope::string &subject, const Anope::string &message);
extern CoreExport bool Mail(NickCore *nc, const Anope::string &subject, const Anope::string &message);
extern CoreExport bool MailValidate(const Anope::string &email);
class MailThread : public Thread
namespace Mail
{
private:
Anope::string MailTo;
Anope::string Addr;
Anope::string Subject;
Anope::string Message;
bool DontQuoteAddresses;
extern CoreExport bool Send(User *from, NickCore *to, BotInfo *service, const Anope::string &subject, const Anope::string &message);
extern CoreExport bool Send(NickCore *to, const Anope::string &subject, const Anope::string &message);
extern CoreExport bool Validate(const Anope::string &email);
bool Success;
public:
MailThread(const Anope::string &mailto, const Anope::string &addr, const Anope::string &subject, const Anope::string &message);
/* A email message being sent */
class Message final
: public Thread
{
private:
Anope::string error;
Anope::string sendmail_path;
Anope::string send_from;
Anope::string mail_to;
Anope::string addr;
Anope::string subject;
Anope::string message;
Anope::string content_type;
bool dont_quote_addresses;
~MailThread();
public:
/** Construct this message. Once constructed call Thread::Start to launch the mail sending.
* @param sf Config->SendFrom
* @param mailto Name of person being mailed (u->nick, nc->display, etc)
* @param addr Destination address to mail
* @param subject Message subject
* @param message The actual message
*/
Message(const Anope::string &sf, const Anope::string &mailto, const Anope::string &addr, const Anope::string &subject, const Anope::string &message);
void Run();
};
~Message();
#endif // MAIL_H
/* Called from within the thread to actually send the mail */
void Run() override;
};
} // namespace Mail
+61
View File
@@ -0,0 +1,61 @@
// Anope IRC Services <https://www.anope.org/>
//
// Copyright (C) 2003-2026 Anope Contributors
//
// Anope is free software. You can use, modify, and/or distribute it under the
// terms of version 2 of the GNU General Public License. See docs/LICENSE.txt
// for the complete terms of this license and docs/AUTHORS.txt for a list of
// contributors.
//
// Based on the original code of Epona by Lara
// Based on the original code of Services by Andy Church
//
// SPDX-License-Identifier: GPL-2.0-only
#pragma once
#include "anope.h"
#include "serialize.h"
class CoreExport Memo final
: public Serializable
{
public:
struct Type final
: public Serialize::Type
{
Type();
void Serialize(Serializable *obj, Serialize::Data &data) const override;
Serializable *Unserialize(Serializable *obj, Serialize::Data &data) const override;
};
MemoInfo *mi;
bool unread;
bool receipt;
Memo();
~Memo();
Anope::string owner;
/* When it was sent */
time_t time;
Anope::string sender;
Anope::string text;
};
/* Memo info structures. Since both nicknames and channels can have memos,
* we encapsulate memo data in a MemoInfo to make it easier to handle.
*/
struct CoreExport MemoInfo final
{
int16_t memomax = 0;
Serialize::Checker<std::vector<Memo *> > memos;
std::set<Anope::string, ci::less> ignores;
MemoInfo();
Memo *GetMemo(unsigned index) const;
unsigned GetIndex(Memo *m) const;
void Del(unsigned index);
bool HasIgnore(User *u);
static MemoInfo *GetMemoInfo(const Anope::string &targ, bool &is_chan);
};
+206
View File
@@ -0,0 +1,206 @@
// Anope IRC Services <https://www.anope.org/>
//
// Copyright (C) 2003-2026 Anope Contributors
//
// Anope is free software. You can use, modify, and/or distribute it under the
// terms of version 2 of the GNU General Public License. See docs/LICENSE.txt
// for the complete terms of this license and docs/AUTHORS.txt for a list of
// contributors.
//
// Based on the original code of Epona by Lara
// Based on the original code of Services by Andy Church
//
// SPDX-License-Identifier: GPL-2.0-only
#pragma once
#include "protocol.h"
/* Common IRCD messages.
* Protocol modules may chose to include some, none, or all of these handlers
* as they see fit.
*/
namespace Message
{
struct CoreExport Away
: IRCDMessage
{
Away(Module *creator, const Anope::string &mname = "AWAY") : IRCDMessage(creator, mname, 0) { SetFlag(FLAG_REQUIRE_USER); SetFlag(FLAG_SOFT_LIMIT); }
void Run(MessageSource &source, const std::vector<Anope::string> &params, const Anope::map<Anope::string> &tags) override;
};
struct CoreExport Capab
: IRCDMessage
{
Capab(Module *creator, const Anope::string &mname = "CAPAB") : IRCDMessage(creator, mname, 1) { SetFlag(FLAG_SOFT_LIMIT); }
void Run(MessageSource &source, const std::vector<Anope::string> &params, const Anope::map<Anope::string> &tags) override;
};
struct CoreExport Error
: IRCDMessage
{
Error(Module *creator, const Anope::string &mname = "ERROR") : IRCDMessage(creator, mname, 1) { }
void Run(MessageSource &source, const std::vector<Anope::string> &params, const Anope::map<Anope::string> &tags) override;
};
struct CoreExport Ignore final
: IRCDMessage
{
Ignore(Module *creator, const Anope::string &mname);
void Run(MessageSource &source, const std::vector<Anope::string> &params, const Anope::map<Anope::string> &tags) override;
};
struct CoreExport Invite
: IRCDMessage
{
Invite(Module *creator, const Anope::string &mname = "INVITE") : IRCDMessage(creator, mname, 2) { SetFlag(FLAG_REQUIRE_USER); SetFlag(FLAG_SOFT_LIMIT); }
void Run(MessageSource &source, const std::vector<Anope::string> &params, const Anope::map<Anope::string> &tags) override;
};
struct CoreExport Join
: IRCDMessage
{
Join(Module *creator, const Anope::string &mname = "JOIN") : IRCDMessage(creator, mname, 1) { SetFlag(FLAG_REQUIRE_USER); SetFlag(FLAG_SOFT_LIMIT); }
void Run(MessageSource &source, const std::vector<Anope::string> &params, const Anope::map<Anope::string> &tags) override;
typedef std::pair<ChannelStatus, User *> SJoinUser;
/** Handle a SJOIN.
* @param source The source of the SJOIN
* @param chan The channel the users are joining to
* @param ts The TS for the channel
* @param modes The mode letters sent with the SJOIN, if any
* @param modeparams The mode parameters sent with the SJOIN, if any
* @param users The users and their status, if any
*/
static void SJoin(MessageSource &source, const Anope::string &chan, time_t ts, const Anope::string &modes, const std::vector<Anope::string> &modeparams, const std::list<SJoinUser> &users);
};
struct CoreExport Kick
: IRCDMessage
{
Kick(Module *creator, const Anope::string &mname = "KICK") : IRCDMessage(creator, mname, 2) { SetFlag(FLAG_SOFT_LIMIT); }
void Run(MessageSource &source, const std::vector<Anope::string> &params, const Anope::map<Anope::string> &tags) override;
};
struct CoreExport Kill
: IRCDMessage
{
Kill(Module *creator, const Anope::string &mname = "KILL") : IRCDMessage(creator, mname, 2) { }
void Run(MessageSource &source, const std::vector<Anope::string> &params, const Anope::map<Anope::string> &tags) override;
};
struct CoreExport Mode
: IRCDMessage
{
Mode(Module *creator, const Anope::string &mname = "MODE") : IRCDMessage(creator, mname, 2) { SetFlag(FLAG_SOFT_LIMIT); }
void Run(MessageSource &source, const std::vector<Anope::string> &params, const Anope::map<Anope::string> &tags) override;
};
struct CoreExport MOTD
: IRCDMessage
{
MOTD(Module *creator, const Anope::string &mname = "MOTD") : IRCDMessage(creator, mname, 1) { }
void Run(MessageSource &source, const std::vector<Anope::string> &params, const Anope::map<Anope::string> &tags) override;
};
struct CoreExport Notice
: IRCDMessage
{
Notice(Module *creator, const Anope::string &mname = "NOTICE") : IRCDMessage(creator, mname, 2) { SetFlag(FLAG_REQUIRE_USER); }
void Run(MessageSource &source, const std::vector<Anope::string> &params, const Anope::map<Anope::string> &tags) override;
};
struct CoreExport Part
: IRCDMessage
{
Part(Module *creator, const Anope::string &mname = "PART") : IRCDMessage(creator, mname, 1) { SetFlag(FLAG_REQUIRE_USER); SetFlag(FLAG_SOFT_LIMIT); }
void Run(MessageSource &source, const std::vector<Anope::string> &params, const Anope::map<Anope::string> &tags) override;
};
struct CoreExport Ping
: IRCDMessage
{
Ping(Module *creator, const Anope::string &mname = "PING") : IRCDMessage(creator, mname, 1) { SetFlag(FLAG_SOFT_LIMIT); }
void Run(MessageSource &source, const std::vector<Anope::string> &params, const Anope::map<Anope::string> &tags) override;
};
struct CoreExport Privmsg
: IRCDMessage
{
Privmsg(Module *creator, const Anope::string &mname = "PRIVMSG") : IRCDMessage(creator, mname, 2) { SetFlag(FLAG_REQUIRE_USER); }
void Run(MessageSource &source, const std::vector<Anope::string> &params, const Anope::map<Anope::string> &tags) override;
};
struct CoreExport Quit
: IRCDMessage
{
Quit(Module *creator, const Anope::string &mname = "QUIT") : IRCDMessage(creator, mname, 1) { SetFlag(FLAG_REQUIRE_USER); }
void Run(MessageSource &source, const std::vector<Anope::string> &params, const Anope::map<Anope::string> &tags) override;
};
struct CoreExport SQuit
: IRCDMessage
{
SQuit(Module *creator, const Anope::string &mname = "SQUIT") : IRCDMessage(creator, mname, 2) { }
void Run(MessageSource &source, const std::vector<Anope::string> &params, const Anope::map<Anope::string> &tags) override;
};
struct CoreExport Stats
: IRCDMessage
{
Stats(Module *creator, const Anope::string &mname = "STATS") : IRCDMessage(creator, mname, 1) { SetFlag(FLAG_REQUIRE_USER); SetFlag(FLAG_SOFT_LIMIT); }
void Run(MessageSource &source, const std::vector<Anope::string> &params, const Anope::map<Anope::string> &tags) override;
};
struct CoreExport Time
: IRCDMessage
{
Time(Module *creator, const Anope::string &mname = "TIME") : IRCDMessage(creator, mname, 0) { SetFlag(FLAG_SOFT_LIMIT); }
void Run(MessageSource &source, const std::vector<Anope::string> &params, const Anope::map<Anope::string> &tags) override;
};
struct CoreExport Topic
: IRCDMessage
{
Topic(Module *creator, const Anope::string &mname = "TOPIC") : IRCDMessage(creator, mname, 2) { SetFlag(FLAG_REQUIRE_USER); }
void Run(MessageSource &source, const std::vector<Anope::string> &params, const Anope::map<Anope::string> &tags) override;
};
struct CoreExport Version
: IRCDMessage
{
Version(Module *creator, const Anope::string &mname = "VERSION") : IRCDMessage(creator, mname, 0) { SetFlag(FLAG_SOFT_LIMIT); }
void Run(MessageSource &source, const std::vector<Anope::string> &params, const Anope::map<Anope::string> &tags) override;
};
struct CoreExport Whois
: IRCDMessage
{
Whois(Module *creator, const Anope::string &mname = "WHOIS") : IRCDMessage(creator, mname, 1) { SetFlag(FLAG_SOFT_LIMIT); }
void Run(MessageSource &source, const std::vector<Anope::string> &params, const Anope::map<Anope::string> &tags) override;
};
} // namespace Message
+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); }
};
+273 -308
View File
@@ -1,88 +1,22 @@
/* Mode support
*
* Copyright (C) 2008-2011 Adam <Adam@anope.org>
* Copyright (C) 2008-2012 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
#ifndef MODES_H
#define MODES_H
/** All of the valid user mode names
*/
enum UserModeName
{
UMODE_BEGIN,
UMODE_SERV_ADMIN, UMODE_BOT, UMODE_CO_ADMIN, UMODE_FILTER, UMODE_HIDEOPER, UMODE_NETADMIN,
UMODE_REGPRIV, UMODE_PROTECTED, UMODE_NO_CTCP, UMODE_WEBTV, UMODE_WEBIRC, UMODE_WHOIS, UMODE_ADMIN, UMODE_DEAF,
UMODE_GLOBOPS, UMODE_HELPOP, UMODE_INVIS, UMODE_OPER, UMODE_PRIV, UMODE_GOD, UMODE_REGISTERED,
UMODE_SNOMASK, UMODE_VHOST, UMODE_WALLOPS, UMODE_CLOAK, UMODE_SSL, UMODE_SOFTCALLERID, UMODE_CALLERID,
UMODE_COMMONCHANS, UMODE_HIDDEN, UMODE_STRIPCOLOR, UMODE_INVISIBLE_OPER, UMODE_RESTRICTED, UMODE_HIDEIDLE,
UMODE_END
};
const Anope::string UserModeNameStrings[] = {
"UMODE_BEGIN",
"UMODE_SERV_ADMIN", "UMODE_BOT", "UMODE_CO_ADMIN", "UMODE_FILTER", "UMODE_HIDEOPER", "UMODE_NETADMIN",
"UMODE_REGPRIV", "UMODE_PROTECTED", "UMODE_NO_CTCP", "UMODE_WEBTV", "UMODE_WEBIRC", "UMODE_WHOIS", "UMODE_ADMIN", "UMODE_DEAF",
"UMODE_GLOBOPS", "UMODE_HELPOP", "UMODE_INVIS", "UMODE_OPER", "UMODE_PRIV", "UMODE_GOD", "UMODE_REGISTERED",
"UMODE_SNOMASK", "UMODE_VHOST", "UMODE_WALLOPS", "UMODE_CLOAK", "UMODE_SSL", "UMODE_SOFTCALLERID", "UMODE_CALLERID",
"UMODE_COMMONCHANS", "UMODE_HIDDEN", "UMODE_STRIPCOLOR", "UMODE_INVISIBLE_OPER", "UMODE_RESTRICTED", "UMODE_HIDEIDLE",
""
};
/** All of the valid channel mode names
*/
enum ChannelModeName
{
CMODE_BEGIN,
/* Channel modes */
CMODE_BLOCKCOLOR, CMODE_FLOOD, CMODE_INVITE, CMODE_KEY, CMODE_LIMIT, CMODE_MODERATED, CMODE_NOEXTERNAL,
CMODE_PRIVATE, CMODE_REGISTERED, CMODE_SECRET, CMODE_TOPIC, CMODE_AUDITORIUM, CMODE_SSL, CMODE_ADMINONLY,
CMODE_NOCTCP, CMODE_FILTER, CMODE_NOKNOCK, CMODE_REDIRECT, CMODE_REGMODERATED, CMODE_NONICK, CMODE_OPERONLY,
CMODE_NOKICK, CMODE_REGISTEREDONLY, CMODE_STRIPCOLOR, CMODE_NONOTICE, CMODE_NOINVITE, CMODE_ALLINVITE,
CMODE_BLOCKCAPS, CMODE_PERM, CMODE_NICKFLOOD, CMODE_JOINFLOOD, CMODE_DELAYEDJOIN, CMODE_NOREJOIN,
CMODE_BANDWIDTH,
/* b/e/I */
CMODE_BAN, CMODE_EXCEPT,
CMODE_INVITEOVERRIDE,
/* v/h/o/a/q */
CMODE_VOICE, CMODE_HALFOP, CMODE_OP,
CMODE_PROTECT, CMODE_OWNER,
CMODE_END
};
const Anope::string ChannelModeNameStrings[] = {
"CMODE_BEGIN",
/* Channel modes */
"CMODE_BLOCKCOLOR", "CMODE_FLOOD", "CMODE_INVITE", "CMODE_KEY", "CMODE_LIMIT", "CMODE_MODERATED", "CMODE_NOEXTERNAL",
"CMODE_PRIVATE", "CMODE_REGISTERED", "CMODE_SECRET", "CMODE_TOPIC", "CMODE_AUDITORIUM", "CMODE_SSL", "CMODE_ADMINONLY",
"CMODE_NOCTCP", "CMODE_FILTER", "CMODE_NOKNOCK", "CMODE_REDIRECT", "CMODE_REGMODERATED", "CMODE_NONICK", "CMODE_OPERONLY",
"CMODE_NOKICK", "CMODE_REGISTEREDONLY", "CMODE_STRIPCOLOR", "CMODE_NONOTICE", "CMODE_NOINVITE", "CMODE_ALLINVITE",
"CMODE_BLOCKCAPS", "CMODE_PERM", "CMODE_NICKFLOOD", "CMODE_JOINFLOOD", "CMODE_DELAYEDJOIN", "CMODE_NOREJOIN",
"CMODE_BANDWIDTH",
/* b/e/I */
"CMODE_BAN", "CMODE_EXCEPT",
"CMODE_INVITEOVERRIDE",
/* v/h/o/a/q */
"CMODE_VOICE", "CMODE_HALFOP", "CMODE_OP",
"CMODE_PROTECT", "CMODE_OWNER",
""
};
#pragma once
#include "anope.h"
#include "base.h"
/** The different types of modes
*/
@@ -102,125 +36,138 @@ enum ModeType
*/
enum ModeClass
{
/* Channel mode */
MC_CHANNEL,
/* User mode */
MC_USER
};
struct ModeData final
{
Anope::string value;
Anope::string set_by;
time_t set_at;
ModeData(const Anope::string &v = "", const Anope::string &s = "", time_t t = 0)
: value(v)
, set_by(s)
, set_at(t)
{
}
};
/** This class is the basis of all modes in Anope
*/
class CoreExport Mode : public Base
class CoreExport Mode
: public Base
{
public:
/* Class of mode this is */
ModeClass Class;
/* Mode char for this */
char ModeChar;
/* Type of mode this is */
ModeType Type;
public:
/* Mode name */
Anope::string name;
/* Class of mode this is (user/channel) */
ModeClass mclass;
/* Mode char for this, eg 'b' */
char mchar;
/* Type of mode this is, eg MODE_LIST */
ModeType type;
/** Default constructor
* @param mClass The type of mode this is
* @param modeChar The mode char
/** constructor
* @param mname The mode name
* @param mclass The type of mode this is
* @param mc The mode char
* @param type The mode type
*/
Mode(ModeClass mClass, char modeChar, ModeType type);
/** Default destructor
*/
virtual ~Mode();
Mode(const Anope::string &mname, ModeClass mclass, char mc, ModeType type);
virtual ~Mode() = default;
};
/** This class is a user mode, all user modes use this/inherit from this
*/
class CoreExport UserMode : public Mode
class CoreExport UserMode
: public Mode
{
public:
/* Mode name */
UserModeName Name;
/** Default constructor
* @param nName The mode name
* @param modeChar The mode char
public:
/** constructor
* @param name The mode name
* @param mc The mode char
*/
UserMode(UserModeName mName, char modeChar);
UserMode(const Anope::string &name, char mc);
/** Default destructor
/** Can a user set this mode, used for mlock
* @param source The user who is setting the mode.
* @param target The user the mode is being set on.
*/
virtual ~UserMode();
/** Returns the mode name as a string
*/
const Anope::string NameAsString();
virtual bool CanSet(User *source, User *target) const { return true; }
};
class CoreExport UserModeParam : public UserMode
class CoreExport UserModeParam
: public UserMode
{
public:
/** Default constructor
* @param mName The mode name
* @param modeChar The mode char
public:
/** constructor
* @param name The mode name
* @param mc The mode char
*/
UserModeParam(UserModeName mName, char modeChar);
UserModeParam(const Anope::string &name, char mc);
/** Check if the param is valid
* @param value The param
* @return true or false
*/
virtual bool IsValid(const Anope::string &value) const { return true; }
virtual bool IsValid(Anope::string &value) const { return true; }
};
/** This class is a channel mode, all channel modes use this/inherit from this
*/
class CoreExport ChannelMode : public Mode
class CoreExport ChannelMode
: public Mode
{
public:
/* Mode name */
ChannelModeName Name;
public:
/* channel modes that can possibly unwrap this mode */
std::vector<ChannelMode *> listeners;
/** Default constructor
* @param mName The mode name
* @param modeChar The mode char
/** constructor
* @param name The mode name
* @param mc The mode char
*/
ChannelMode(ChannelModeName mName, char modeChar);
/** Default destructor
*/
virtual ~ChannelMode();
ChannelMode(const Anope::string &name, char mc);
/** Can a user set this mode, used for mlock
* NOTE: User CAN be NULL, this is for checking if it can be locked with defcon
* @param u The user, or NULL
* @param u The user who is setting the mode.
* @param c The channel the mode is being set on.
*/
virtual bool CanSet(User *u) const;
virtual bool CanSet(User *u, Channel *c) const;
/** Returns the mode name as a string
virtual void Check() { }
/** 'wrap' this channel mode and param to the underlying mode and param
*/
const Anope::string NameAsString();
virtual ChannelMode *Wrap(Anope::string &param);
/** 'unwrap' this mode to our internal representation
*/
ChannelMode *Unwrap(Anope::string &param);
/** called when a mode is being unwrapped, and is asking us if we can unwrap it
*/
virtual ChannelMode *Unwrap(ChannelMode *, Anope::string &param);
};
/** This is a mode for lists, eg b/e/I. These modes should inherit from this
*/
class CoreExport ChannelModeList : public ChannelMode
class CoreExport ChannelModeList
: public ChannelMode
{
public:
/** Default constructor
* @param mName The mode name
* @param modeChar The mode char
public:
/** constructor
* @param name The mode name
* @param mc The mode char
*/
ChannelModeList(ChannelModeName mName, char modeChar);
/** Default destructor
*/
virtual ~ChannelModeList();
ChannelModeList(const Anope::string &name, char mc);
/** Is the mask valid
* @param mask The mask
* @return true for yes, false for no
*/
virtual bool IsValid(const Anope::string &mask) const { return true; }
virtual bool IsValid(Anope::string &mask) const;
/** Checks if mask affects user
* Should only be used for extbans or other weird ircd-specific things.
@@ -243,177 +190,160 @@ class CoreExport ChannelModeList : public ChannelMode
virtual void OnDel(Channel *chan, const Anope::string &mask) { }
};
/** This is a mode with a paramater, eg +k/l. These modes should use/inherit from this
/** This is a mode with a parameter, eg +k/l. These modes should use/inherit from this
*/
class CoreExport ChannelModeParam : public ChannelMode
class CoreExport ChannelModeParam
: public ChannelMode
{
public:
/** Default constructor
* @param mName The mode name
* @param modeChar The mode char
* @param MinusArg true if this mode sends no arg when unsetting
public:
/** constructor
* @param name The mode name
* @param mc The mode char
* @param minus_no_arg true if this mode sends no arg when unsetting
*/
ChannelModeParam(ChannelModeName mName, char modeChar, bool MinusArg = false);
/** Default destructor
*/
virtual ~ChannelModeParam();
ChannelModeParam(const Anope::string &name, char mc, bool minus_no_arg = false);
/* Should we send an arg when unsetting this mode? */
bool MinusNoArg;
bool minus_no_arg;
/** Is the param valid
* @param value The param
* @return true for yes, false for no
*/
virtual bool IsValid(const Anope::string &value) const { return true; }
virtual bool IsValid(Anope::string &value) const { return true; }
};
/** This is a mode that is a channel status, eg +v/h/o/a/q.
*/
class CoreExport ChannelModeStatus : public ChannelMode
class CoreExport ChannelModeStatus
: public ChannelMode
{
public:
public:
/* The symbol, eg @ % + */
char Symbol;
char symbol;
/* The "level" of the mode, used to compare with other modes.
* Used so we know op > halfop > voice etc.
*/
unsigned short Level;
unsigned level;
/** Default constructor
* @param mName The mode name
* @param modeChar The mode char
* @param mSymbol The symbol for the mode, eg @ %
* @param mLevel A level for the mode, which is usually determined by the PREFIX capab
/** constructor
* @param name The mode name
* @param mc The mode char
* @param msymbol The symbol for the mode, eg @ %
* @param mlevel A level for the mode, which is usually determined by the PREFIX capab
*/
ChannelModeStatus(ChannelModeName mName, char modeChar, char mSymbol, unsigned short mLevel = 0);
ChannelModeStatus(const Anope::string &name, char mc, char msymbol, unsigned mlevel);
};
/** Default destructor
*/
virtual ~ChannelModeStatus();
/** A virtual mode. This mode doesn't natively exist on the IRCd (like extbans),
* but we still have a representation for it.
*/
template<typename T>
class CoreExport ChannelModeVirtual
: public T
{
protected:
Anope::string base;
ChannelMode *basech;
public:
ChannelModeVirtual(const Anope::string &mname, const Anope::string &basename);
~ChannelModeVirtual();
void Check() override;
ChannelMode *Wrap(Anope::string &param) override;
ChannelMode *Unwrap(ChannelMode *cm, Anope::string &param) override = 0;
};
/* The status a user has on a channel (+v, +h, +o) etc */
class CoreExport ChannelStatus final
{
private:
std::set<ChannelMode *> modes;
static bool IsValidMode(ChannelMode *cm);
public:
ChannelStatus() = default;
ChannelStatus(const Anope::string &modes);
void AddMode(char c);
void AddMode(ChannelMode *cm);
void DelMode(ChannelMode *cm);
bool HasMode(ChannelMode *cm) const;
bool Empty() const;
void Clear();
const auto &Modes() const { return modes; }
Anope::string BuildModePrefixList() const;
};
class CoreExport UserModeOperOnly
: public UserMode
{
public:
UserModeOperOnly(const Anope::string &mname, char um) : UserMode(mname, um) { }
bool CanSet(User *source, User *target) const override;
};
class CoreExport UserModeNoone
: public UserMode
{
public:
UserModeNoone(const Anope::string &mname, char um) : UserMode(mname, um) { }
bool CanSet(User *source, User *target) const override;
};
/** Channel mode +k (key)
*/
class CoreExport ChannelModeKey : public ChannelModeParam
class CoreExport ChannelModeKey
: public ChannelModeParam
{
public:
ChannelModeKey(char modeChar) : ChannelModeParam(CMODE_KEY, modeChar) { }
public:
ChannelModeKey(char mc) : ChannelModeParam("KEY", mc) { }
bool IsValid(const Anope::string &value) const;
bool IsValid(Anope::string &value) const override;
};
/** This class is used for channel mode +A (Admin only)
* Only opers can mlock it
/** This class is used for oper only channel modes
*/
class CoreExport ChannelModeAdmin : public ChannelMode
class CoreExport ChannelModeOperOnly
: public ChannelMode
{
public:
ChannelModeAdmin(char modeChar) : ChannelMode(CMODE_ADMINONLY, modeChar) { }
public:
ChannelModeOperOnly(const Anope::string &mname, char mc) : ChannelMode(mname, mc) { }
/* Opers only */
bool CanSet(User *u) const;
bool CanSet(User *u, Channel *c) const override;
};
/** This class is used for channel mode +O (Opers only)
* Only opers can mlock it
/** This class is used for channel modes only servers may set
*/
class CoreExport ChannelModeOper : public ChannelMode
class CoreExport ChannelModeNoone
: public ChannelMode
{
public:
ChannelModeOper(char modeChar) : ChannelMode(CMODE_OPERONLY, modeChar) { }
public:
ChannelModeNoone(const Anope::string &mname, char mc) : ChannelMode(mname, mc) { }
/* Opers only */
bool CanSet(User *u) const;
bool CanSet(User *u, Channel *c) const override;
};
/** This class is used for channel mode +r (registered channel)
* No one may mlock r
*/
class CoreExport ChannelModeRegistered : public ChannelMode
{
public:
ChannelModeRegistered(char modeChar) : ChannelMode(CMODE_REGISTERED, modeChar) { }
/* No one mlocks +r */
bool CanSet(User *u) const;
};
enum StackerType
{
ST_CHANNEL,
ST_USER
};
class StackerInfo
{
public:
/* Modes to be added */
std::list<std::pair<Base *, Anope::string> > AddModes;
/* Modes to be deleted */
std::list<std::pair<Base *, Anope::string> > DelModes;
/* The type of object this stacker info is for */
StackerType Type;
/* Bot this is sent from */
BotInfo *bi;
/** Add a mode to this object
* @param mode The mode
* @param Set true if setting, false if unsetting
* @param Param The param for the mode
*/
void AddMode(Mode *mode, bool Set, const Anope::string &Param);
};
/** This is mode manager
/** This is the mode manager
* It contains functions for adding modes to Anope so Anope can track them
* and do things such as MLOCK.
* This also contains a mode stacker that will combine multiple modes and set
* them on a channel all at once
* them on a channel or user at once
*/
class CoreExport ModeManager
class CoreExport ModeManager final
{
protected:
class ModePipe : public Pipe
{
public:
/** Called when there are modes to be set
*/
void OnNotify();
};
public:
using Change = std::multimap<Mode *, std::pair<bool, ModeData>>;
static ModePipe *mpipe;
/* List of pairs of user/channels and their stacker info */
static std::list<std::pair<Base *, StackerInfo *> > StackerObjects;
/** Get the stacker info for an item, if one doesnt exist it is created
* @param Item The user/channel etc
* @return The stacker info
*/
static StackerInfo *GetInfo(Base *Item);
/** Build a list of mode strings to send to the IRCd from the mode stacker
* @param info The stacker info for a channel or user
* @return a list of strings
*/
static std::list<Anope::string> BuildModeStrings(StackerInfo *info);
/** Really add a mode to the stacker, internal use only
* @param bi The client to set the modes from
* @param Object The object, user/channel
* @param mode The mode
* @param Set Adding or removing?
* @param Param A param, if there is one
* @param Type The type this is, user or channel
*/
static void StackerAddInternal(BotInfo *bi, Base *Object, Mode *mode, bool Set, const Anope::string &Param, StackerType Type);
public:
/* List of all modes Anope knows about */
static std::vector<ChannelMode *> ChannelModes;
static std::vector<UserMode *> UserModes;
/* Number of generic channel and user modes we are tracking */
static unsigned GenericChannelModes;
static unsigned GenericUserModes;
/** Add a user mode to Anope
* @param um A UserMode or UserMode derived class
@@ -427,74 +357,109 @@ class CoreExport ModeManager
*/
static bool AddChannelMode(ChannelMode *cm);
/** Find a channel mode
* @param Mode The mode
* @return The mode class
/** Remove a user mode from Anope
* @param um A UserMode to remove
*/
static ChannelMode *FindChannelModeByChar(char Mode);
static void RemoveUserMode(UserMode *um);
/** Find a user mode
* @param Mode The mode
* @return The mode class
/** Remove a channel mode from Anope
* @param um A ChanneMode to remove
*/
static UserMode *FindUserModeByChar(char Mode);
static void RemoveChannelMode(ChannelMode *cm);
/** Find a channel mode
* @param Mode The modename
* @param mode The mode
* @return The mode class
*/
static ChannelMode *FindChannelModeByName(ChannelModeName Name);
static ChannelMode *FindChannelModeByChar(char mode);
/** Find a user mode
* @param Mode The modename
* @param mode The mode
* @return The mode class
*/
static UserMode *FindUserModeByName(UserModeName Name);
static UserMode *FindUserModeByChar(char mode);
/** Find channel mode by string
* @param name The mode name
* @return The mode
/** Find a channel mode
* @param name The modename
* @return The mode class
*/
static ChannelMode *FindChannelModeByString(const Anope::string &name);
static ChannelMode *FindChannelModeByName(const Anope::string &name);
/** Find user mode by string
* @param name The mode name
* @return The mode
/** Find a user mode
* @param name The modename
* @return The mode class
*/
static UserMode *FindUserModeByString(const Anope::string &name);
static UserMode *FindUserModeByName(const Anope::string &name);
/** Gets the channel mode char for a symbol (eg + returns v)
* @param Value The symbol
* @param symbol The symbol
* @return The char
*/
static char GetStatusChar(char Value);
static char GetStatusChar(char symbol);
static const std::vector<ChannelMode *> &GetChannelModes();
static const std::vector<UserMode *> &GetUserModes();
static const std::vector<ChannelModeStatus *> &GetStatusChannelModesByRank();
static void RebuildStatusModes();
/** Add a mode to the stacker to be set on a channel
* @param bi The client to set the modes from
* @param c The channel
* @param cm The channel mode
* @param Set true for setting, false for removing
* @param Param The param, if there is one
* @param set true for setting, false for removing
* @param data Data about the mode.
*/
static void StackerAdd(BotInfo *bi, Channel *c, ChannelMode *cm, bool Set, const Anope::string &Param = "");
static void StackerAdd(BotInfo *bi, Channel *c, ChannelMode *cm, bool set, const ModeData &data = {});
/** Add a mode to the stacker to be set on a user
* @param bi The client to set the modes from
* @param u The user
* @param um The user mode
* @param Set true for setting, false for removing
* @param param The param, if there is one
* @param set true for setting, false for removing
* @param data Data about the mode.
*/
static void StackerAdd(BotInfo *bi, User *u, UserMode *um, bool Set, const Anope::string &Param = "");
static void StackerAdd(BotInfo *bi, User *u, UserMode *um, bool set, const ModeData &data = {});
/** Process all of the modes in the stacker and send them to the IRCd to be set on channels/users
*/
static void ProcessModes();
/** Delete a user or channel from the stacker
* @param b The user/channel
/** Delete a user, channel, or mode from the stacker
*/
static void StackerDel(Base *b);
static void StackerDel(User *u);
static void StackerDel(Channel *c);
static void StackerDel(Mode *m);
};
#endif // MODES_H
/** Represents a mask set on a channel (b/e/I)
*/
class CoreExport Entry final
{
Anope::string name;
Anope::string mask;
public:
unsigned short cidr_len = 0;
int family = 0;
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 real Whether to allow a real name in the mask.
*/
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 GetCleanMask() const;
/** Check if this entry matches a user
* @param u The user
* @param full True to match against a users real host and IP
* @return true on match
*/
bool Matches(User *u, bool full = false) const;
};
+48 -7
View File
@@ -1,9 +1,50 @@
#ifndef MODULE_H
#define MODULE_H
// 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
#include "services.h"
#include "modules.h"
#include "oper.h"
#pragma once
#include "access.h"
#include "account.h"
#include "anope.h"
#include "base.h"
#include "bots.h"
#include "channels.h"
#include "commands.h"
#endif // MODULE_H
#include "config.h"
#include "extensible.h"
#include "hashcomp.h"
#include "language.h"
#include "lists.h"
#include "logger.h"
#include "mail.h"
#include "memo.h"
#include "messages.h"
#include "modes.h"
#include "modules.h"
#include "opertype.h"
#include "protocol.h"
#include "regexpr.h"
#include "regchannel.h"
#include "serialize.h"
#include "servers.h"
#include "service.h"
#include "services.h"
#include "socketengine.h"
#include "sockets.h"
#include "textproc.h"
#include "threadengine.h"
#include "timers.h"
#include "uplink.h"
#include "users.h"
#include "xline.h"
+660 -506
View File
File diff suppressed because it is too large Load Diff
+85
View File
@@ -0,0 +1,85 @@
// 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 BOTSERV_BAD_WORDS_EXT "badwords"
#define BOTSERV_BAD_WORDS_TYPE "BadWord"
namespace BotServ
{
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. */
class BotServ::BadWord
{
protected:
BadWord() = default;
public:
Anope::string chan;
Anope::string word;
BotServ::BadWordType type;
virtual ~BadWord() = default;
};
struct BotServ::BadWords
{
virtual ~BadWords() = default;
/** Add a badword to the badword list
* @param word The badword
* @param type The type (SINGLE START END)
* @return The badword
*/
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 BotServ::BadWord *GetBadWord(unsigned index) const = 0;
/** Get how many badwords are on this channel
* @return The number of badwords in the vector
*/
virtual unsigned GetBadWordCount() const = 0;
/** Remove a badword
* @param index The index of the badword
*/
virtual void EraseBadWord(unsigned index) = 0;
/** Clear all badwords from the channel
*/
virtual void ClearBadWords() = 0;
virtual void Check() = 0;
};
+57
View File
@@ -0,0 +1,57 @@
// 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 BOTSERV_KICKER_DATA_EXT "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[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;
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);
}
};
+57
View File
@@ -0,0 +1,57 @@
// 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_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 = 0;
virtual ~EntryMessage() = default;
};
class ChanServ::EntryMessageList
: public Serialize::Checker<std::vector<ChanServ::EntryMessage *>>
{
protected:
EntryMessageList()
: Serialize::Checker<std::vector<ChanServ::EntryMessage *>>(CHANSERV_ENTRY_MESSAGE_TYPE)
{
}
public:
virtual ~EntryMessageList()
{
for (auto i = (*this)->size(); i > 0; --i)
delete (*this)->at(i - 1);
}
virtual ChanServ::EntryMessage *Create() = 0;
};

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