Attila Molnar
53f7229869
Change allocation of InspIRCd::Modes to be physically part of the object containing it using fakederef
2014-06-24 12:10:59 +02:00
Attila Molnar
5a64433015
Throw an exception if ModeParser::AddMode() fails
2014-02-23 12:24:14 +01:00
Attila Molnar
7affd6453d
Add ModeParser::GetModes(), returns all user/chanmodes
2014-02-22 14:00:04 +01:00
Attila Molnar
1b6dda7ad5
Assign an id to user modes, parameter chanmodes and simple chanmodes
2014-02-21 14:42:16 +01:00
Attila Molnar
5303501b93
Add a ModeParser::FindMode() overload that takes a mode name and a mode type
2014-02-20 13:34:27 +01:00
Attila Molnar
f66d05dbda
Create a name -> ModeHandler* map
2014-02-20 13:20:21 +01:00
Attila Molnar
7bcb703bca
Replace ModeMasks with a two-dimensional array
2014-02-18 13:47:10 +01:00
Attila Molnar
8f901b33a8
Change the parameter type of ModeHandler::GiveModeList() from ModeMasks to ModeType
2014-02-18 13:41:01 +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
88baaf9e68
Add ModeHandler::IsParameterMode() and MC_PARAM
2014-02-15 13:51:35 +01:00
Attila Molnar
98ef89c392
Remove some dead code
2014-01-31 14:27:32 +01:00
Peter Powell
3b38de5b6e
Fix PrefixMode not being exported which caused runtime link errors.
2013-11-09 16:29:50 +00:00
attilamolnar
7ba2507681
Keep lists of mode handlers by type
2013-09-12 14:44:17 +02:00
attilamolnar
52e4d9c96c
Add ModeHandler::IsListModeBase() and MC_LIST
2013-09-12 14:44:17 +02:00
attilamolnar
16398df07d
Move prefix mode specific fields and getters into PrefixMode
...
Add ModeHandler::IsPrefixMode()
2013-09-11 12:10:07 +02:00
attilamolnar
34fa5627de
Create a base class for prefix modes
...
Move Channel::SetPrefix() into Membership
2013-09-11 12:10:07 +02:00
attilamolnar
537ad4740a
Add a type id field to ModeHandler
2013-09-11 12:10:07 +02:00
attilamolnar
3624c137a6
Introduce ModeProcessFlags, can be passed to ModeParser::Process() to indicate local only mode changes and mode merges
...
Change ProtocolInterface::SendMode() to take source and destination parameters, and call it from the mode parser whenever the mode change is global
This deprecates the ambiguous InspIRCd::SendMode() and InspIRCd::SendGlobalMode() interface (the latter sent mode changes originating from local users twice, etc.)
2013-06-13 18:15:34 +02:00
attilamolnar
b57c0342ca
Store prefix rank in a ModeHandler field, change ModeHandler::GetPrefixRank() to be non-virtual
2013-06-06 03:10:10 +02:00
attilamolnar
b01dc3cb86
Move a few trivial functions into headers
2013-06-02 00:28:55 +02:00
attilamolnar
d16a455400
Watch mode names with ModeWatchers instead of mode letters
2013-06-01 23:41:42 +02:00
attilamolnar
ca838821e7
Remove useless ModeType parameter from ModeWatcher::BeforeMode() and AfterMode()
2013-06-01 23:41:42 +02:00
attilamolnar
3406c7234a
Simplify user mode removal via ModeHandler::RemoveMode()
...
The function does not need to be virtual because the core can remove any user mode using the default logic
The optional modestack parameter was always NULL, so remove it
2013-05-27 01:07:30 +02:00
attilamolnar
9bb24d3f45
Deduplicate RemoveMode() implementations
...
The default (core) implementation can now remove prefix modes
The modestacker parameter is now mandatory
2013-05-27 01:07:29 +02:00
attilamolnar
1911857e3a
Cache mode list that is sent in the 004 numeric
...
Deduplicate UserModeList(), ChannelModeList() and ParaModeList() code
2013-05-24 18:22:25 +02:00
attilamolnar
b8c1db4e90
Remove dead ModeParser code
2013-05-24 18:20:58 +02: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
0ce252f05c
Add builtin modes using AddService()
2013-04-08 23:13:24 +02:00
Peter Powell
808a0a0957
Fix Doxygen syntax errors.
2012-07-05 21:00:35 +01:00
Robby-
46a3904619
Replace copyright headers with headers granting specific authors copyright
2012-04-19 20:58:29 +02:00
Justin Crawford
df5f76832e
Fixes for bug #12
2012-04-14 18:03:25 -07:00
brain
cd712c40e1
...because every now and again, i have to do a massive commit.
...
git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@12248 e03df62e-2008-0410-955e-edbf42e46eb7
2010-01-11 03:07:32 +00:00
danieldg
3cd1a24a51
Remove mode counter, not reliable and only used for umode +i
...
git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@12246 e03df62e-2008-0410-955e-edbf42e46eb7
2010-01-09 17:48:40 +00: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
8ab1381e8d
Add ParamChannelModeHandler
...
git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@12134 e03df62e-2008-0410-955e-edbf42e46eb7
2009-11-15 18:26:44 +00:00
danieldg
d3747f2943
Add ModeHandler* versions of channel mode access
...
git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@12133 e03df62e-2008-0410-955e-edbf42e46eb7
2009-11-15 18:26:35 +00:00
danieldg
80df092fa3
Remove AllowHalfop item from server config
...
git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@11996 e03df62e-2008-0410-955e-edbf42e46eb7
2009-11-03 17:12:25 +00:00
danieldg
b868bb52c5
Get rid of ModePair
...
git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@11963 e03df62e-2008-0410-955e-edbf42e46eb7
2009-10-24 03:29:58 +00:00
danieldg
fa5abf73fe
Get rid of more unneeded parent classes
...
git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@11930 e03df62e-2008-0410-955e-edbf42e46eb7
2009-10-20 04:40:18 +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
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
8a13e4ebf7
Add ModeHandler::cull() for auto-deletion, fixes call of virtual method on partially-destructed object
...
git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@11883 e03df62e-2008-0410-955e-edbf42e46eb7
2009-10-17 02:43:14 +00:00
danieldg
37fd031da0
Remove Command and ModeHandler objects in their destructors; fixes possible pointer leak if a module was not careful when triggering exceptions in its constructor
...
git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@11872 e03df62e-2008-0410-955e-edbf42e46eb7
2009-10-13 21:34:29 +00:00
danieldg
c4d6ce8c5e
Add names for all modes (part 1 of named channel mode list)
...
git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@11809 e03df62e-2008-0410-955e-edbf42e46eb7
2009-10-08 23:34:01 +00:00
danieldg
9336468f5b
Run DelMode and DelModeWatcher in RemoveModule
...
git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@11799 e03df62e-2008-0410-955e-edbf42e46eb7
2009-10-05 15:43:28 +00:00
danieldg
ee913368d7
Change IS_FAKE and CheckTimeStamp to IS_SERVER and ResolveModeConflict to clarify their use
...
git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@11765 e03df62e-2008-0410-955e-edbf42e46eb7
2009-09-26 16:40:58 +00:00
danieldg
6d03943426
Remove InspIRCd* parameters and fields
...
git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@11763 e03df62e-2008-0410-955e-edbf42e46eb7
2009-09-26 14:13:13 +00:00
danieldg
6eae25cd36
Fix access checks on chanprotect preventing use of SAMODE
...
git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@11717 e03df62e-2008-0410-955e-edbf42e46eb7
2009-09-13 20:33:56 +00:00
danieldg
d9e3bb8d43
Remove redundant ServerInstance* fields
...
It has been impossible to have more than one InspIRCd* object in the
same address space for some time now, and this feature was never used.
This formalizes class InspIRCd as a singleton object.
git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@11703 e03df62e-2008-0410-955e-edbf42e46eb7
2009-09-13 20:31:54 +00:00