61 Commits

Author SHA1 Message Date
Sadie Powell
3ae299f298 Rename Extensible::doUnhookExtensions to UnhookExtensions. 2021-01-30 19:16:49 +00:00
Sadie Powell
ef4e61cd24 Pascalize ExtensionItem::{get,set,unset}_raw. 2020-07-20 11:58:28 +01:00
Sadie Powell
b755d2a778 Merge branch 'insp3' into master. 2020-05-05 22:03:14 +01:00
InspIRCd Robot
44489ddf7e Update copyright headers. 2020-04-24 10:23:47 +01:00
InspIRCd Robot
4f9abe96a4 Fixes by misspell-fixer 2020-04-21 00:52:12 -06:00
Sadie Powell
e1ed9b275f Merge branch 'insp3' into master. 2020-04-09 18:06:50 +01:00
Sadie Powell
9ebda853f5 Fix various documentation and formatting issues. 2020-03-30 17:24:12 +01:00
Sadie Powell
1de6f5b4a9 Merge branch 'insp3' into master. 2020-01-17 12:36:09 +00:00
InspIRCd Robot
aa692dc103 Update copyright headers. 2020-01-11 22:14:43 +00:00
Sadie Powell
7b68936321 Merge branch 'insp3' into master. 2019-11-13 15:24:45 +00:00
Peter Powell
d0f802e30c Implement serialisation of users.
This allows for various things which will be coming in the future.

e.g. Transferring users to another server on upgrade.
2019-10-14 11:03:03 +01:00
Sadie Powell
eeb6dcec60 Replace LocalIntExt with IntExtItem. 2019-08-13 19:08:17 +01:00
Sadie Powell
07ed06ebe5 Rewrite and merge LocalStringExt, StringExtItem. 2019-08-13 18:12:59 +01:00
Sadie Powell
21664767f0 Move the Module parameter of ExtensionItem et al to the start.
This matches what other ServiceProvider types do.
2019-08-13 17:36:19 +01:00
Sadie Powell
b39bd5f49c Rename ExtensionItem::free to ExtensionItem::Delete. 2019-08-13 16:59:04 +01:00
Sadie Powell
aca4503481 Merge branch 'insp3' into master. 2019-08-13 15:43:26 +01:00
Peter Powell
0827c5c742 Free StringExtItem and SimpleExtItem values correctly. 2019-08-13 15:02:25 +01:00
Peter Powell
703ba72071 Convert LocalExtItem to a typedef and deprecate it. 2019-08-13 15:02:25 +01:00
Sadie Powell
23448e2255 Remove remnants of the old ExtensionItem serialisation system.
Also rm LocalExtItem whilst we are at it as it is now obsolete.
2019-08-09 04:07:44 +01:00
Sadie Powell
7c7de81b6d Merge branch 'insp3' into master. 2019-08-09 04:07:33 +01:00
Peter Powell
714284aa30 Convert all core ExtensionItem code away from {un,}serialize. 2019-08-07 19:37:27 +01:00
Peter Powell
85182d727c Add {To,From}{Human,Internal,Network} to ExtensionItem.
Also, deprecate the old SerializeFormat/serialize/unserialise API.
2019-08-07 16:38:15 +01:00
Peter Powell
704f0fca5f Document ExtensionItem better. 2019-08-07 13:32:28 +01:00
Sadie Powell
c78ecdf579 Replace the override macro with the override keyword. 2019-01-25 02:52:11 +00:00
Peter Powell
f8a9b6ba4a Pass the Extensible container to ExtensionItem::free(). 2018-08-12 13:29:09 +01:00
Peter Powell
91e0af0fc4 Add the override keyword in places that it is missing.
GCCs warnings for this are much better than Clangs.
2017-11-21 15:51:45 +00:00
Peter Powell
d1df2bce56 Add CXX11_OVERRIDE to overridden members that lack it.
This fixes a ton of warnings when building on compilers that
default to C++11 or newer.
2017-07-12 14:41:52 +01:00
Attila Molnar
fc8ad300cd Include stdint.h from inspircd.h 2016-02-25 15:02:01 +01:00
Attila Molnar
299f262a4f Fix some whitespace issues 2015-12-28 16:59:03 +01:00
Attila Molnar
860f5cbf1e Merge branch 'master+serviceinit' 2015-12-02 13:30:24 +01:00
Attila Molnar
f330428223 Add LocalIntExt and LocalStringExt::unserialize() for non-FORMAT_NETWORK 2015-11-26 13:53:01 +01:00
Attila Molnar
b4f82cff9b Add ExtensionManager::GetExts() 2015-11-26 13:40:44 +01:00
Attila Molnar
dd5e75f99e Add typedef ExtensionManager::ExtMap 2015-11-26 13:39:56 +01:00
Attila Molnar
f3667d995e Implement ExtensionItem::RegisterService() 2015-11-23 12:52:03 +01:00
Attila Molnar
4fc2f7199e Specify which Extensible subclass an ExtensionItem is valid for 2015-01-18 10:40:33 +01:00
Attila Molnar
7010a92426 Change type of some associative containers to their flat versions, including Extensible storage 2014-12-15 17:48:52 +01:00
Attila Molnar
6d9b2bfee0 Make it possible to customize how SimpleExtItem should delete items 2014-03-24 16:39:20 +01:00
Attila Molnar
0556720b55 Add ParamModeBase and ParamMode, change all parameter modes to inherit from ParamMode
- Type of the extension used to store data is a template parameter
- The extension is automatically unset when the mode is unset
- Handlers inheriting from ParamMode have to provide OnSet() and SerializeParam(); may optionally provide OnUnset()
- Transparently handle the case when OnSet() modifies the mode parameter
- Remove Channel::custom_mode_params map; ask the mode handlers to serialize their parameters instead
2014-02-15 14:38:24 +01:00
Attila Molnar
6fb7507c58 Replace DummyExtItem with a flag in Extensible 2014-02-10 13:56:14 +01:00
Attila Molnar
5a366d8945 Unset all extensions and the topic when lowering TS on a channel 2014-01-06 13:29:10 +01:00
Peter Powell
11cafc12d5 Tidy up source files:
- Use #pragma once instead of include guards.
- Move header files in src/modules to include/modules.
- Fixed various spacing issues.
2013-04-12 17:03:05 +01:00
attilamolnar
eea9343393 Throw an exception when attempting to register an extension with a name that already exists
Previously this silently failed
2012-12-02 19:43:20 +01:00
attilamolnar
d2d88b6371 #include <stdint.h>, add header guard to extensible.h
Fixes #102 reported by @kshade
2012-07-06 20:25:21 +02:00
Robby-
46a3904619 Replace copyright headers with headers granting specific authors copyright 2012-04-19 20:58:29 +02:00
danieldg
54fb0cd5aa Use ServiceProvider for inter-module dependencies
This will stop dependency chains from preventing module reloads when
it is not actually needed; however, it removes some failsafes that will
need to be reimplemented in order to avoid unmapped vtables.

This deprecates Request as an inter-module signaling mechanism, although
SQL still uses it.

git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@12140 e03df62e-2008-0410-955e-edbf42e46eb7
2009-11-16 17:59:06 +00:00
danieldg
fb3964d5c0 Add Inspircd::AddServices
git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@12135 e03df62e-2008-0410-955e-edbf42e46eb7
2009-11-15 18:26:53 +00:00
danieldg
fa2cdd0bb8 Force heap allocation of refcountbase, create usecountbase for non-allocation reference counting
git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@11978 e03df62e-2008-0410-955e-edbf42e46eb7
2009-10-25 20:03:55 +00:00
danieldg
6b2ea83367 Move forward declarations to typedefs.h
git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@11967 e03df62e-2008-0410-955e-edbf42e46eb7
2009-10-24 20:03:53 +00:00
danieldg
be10eab6ce Maintain refcount of Module objects to complain about leaked pointers
git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@11925 e03df62e-2008-0410-955e-edbf42e46eb7
2009-10-19 20:12:22 +00:00
danieldg
aa7cc18468 Fix implementation of reference to const, use reference counting for ExtensibleItem
git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@11924 e03df62e-2008-0410-955e-edbf42e46eb7
2009-10-19 20:12:12 +00:00