12 Commits

Author SHA1 Message Date
Attila Molnar
66221de4b6 cmode_k Fix oversight in substr() conversion
While at it, introduce a named constant for maximum key length
2015-01-14 12:07:20 +01:00
Attila Molnar
005b03c9f3 Migrate ModeChannelOp and ModeChannelVoice constructors to builtinmodes.h, remove cmode_{o,v}
The default value for levelrequired is HALFOP_VALUE, meaning the ModeChannelVoice class is not required but it will be useful in case the default changes
2014-08-06 13:38:34 +02:00
Attila Molnar
0066029333 Remove a bunch of useless classes representing simple core modes 2014-08-06 13:27:16 +02:00
Attila Molnar
7b7e82bec5 Move the wallops mode from the core into core_wallops 2014-03-09 17:08:55 +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
attilamolnar
34fa5627de Create a base class for prefix modes
Move Channel::SetPrefix() into Membership
2013-09-11 12:10:07 +02:00
attilamolnar
1a775c11c2 umode_s Rewrite ProcessNoticeMasks() and remove a few related useless functions 2013-07-24 18:10:34 +02:00
attilamolnar
882084defc Move SetNoticeMask(), FormatNoticeMasks() and ProcessNoticeMasks() from the User class to the snomask modehandler 2013-07-19 19:40:03 +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
ebe5b201aa Migrate u_listmode.h into the core, change +b to use it 2013-04-08 23:13:24 +02:00
attilamolnar
1bf6cf727d Unite include/modes/*.h into include/builtinmodes.h 2013-04-08 23:13:24 +02:00