43 Commits

Author SHA1 Message Date
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
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
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
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
danieldg
e50d016aa2 Cull channels, warn when Extensible objects are not culled as they must be
git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@11901 e03df62e-2008-0410-955e-edbf42e46eb7
2009-10-18 02:57:46 +00:00
danieldg
bd5c443a6a Some windows compile fixes
git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@11891 e03df62e-2008-0410-955e-edbf42e46eb7
2009-10-17 20:21:18 +00:00
danieldg
9db7af579c Make classbase and refcountbase uncopyable; expand comments on their indended uses
git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@11888 e03df62e-2008-0410-955e-edbf42e46eb7
2009-10-17 18:52:39 +00:00
danieldg
e80a1296a0 Move static map of extensions into ServerInstance, add const-correctness
git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@11873 e03df62e-2008-0410-955e-edbf42e46eb7
2009-10-14 18:39:38 +00:00
danieldg
ec1df83c87 CoreExport changes, clean up DoHostCycle when users are exempted
git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@11856 e03df62e-2008-0410-955e-edbf42e46eb7
2009-10-12 18:13:01 +00:00
peavey
e4a590c792 Less CoreExport.. Too much of a good thing..
git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@11847 e03df62e-2008-0410-955e-edbf42e46eb7
2009-10-11 23:25:31 +00:00
peavey
228c2b2e58 More CoreExport.
git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@11843 e03df62e-2008-0410-955e-edbf42e46eb7
2009-10-11 21:49:18 +00:00
danieldg
d5e36aa2b2 Fix warnings from BSD build and work around the failures of BSD make
git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@11771 e03df62e-2008-0410-955e-edbf42e46eb7
2009-09-28 00:55:42 +00:00
danieldg
01c23b31f7 Remove Extensible items from user, channel, and Membership on module unload
git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@11730 e03df62e-2008-0410-955e-edbf42e46eb7
2009-09-15 21:25:30 +00:00
danieldg
0ed3ef9dee Add SerializeFormat for easier metadata formatting
git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@11704 e03df62e-2008-0410-955e-edbf42e46eb7
2009-09-13 20:32:03 +00:00
danieldg
6d57bbe05c Change Extensible to use strongly typed entries
git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@11696 e03df62e-2008-0410-955e-edbf42e46eb7
2009-09-13 20:30:25 +00:00