Peter Powell
193eac6490
Fix various cases of broken indentation.
2019-07-26 10:22:42 +01:00
Peter Powell
abdc47a615
Add a constant for the maximum length of a mode parameter.
2019-07-23 15:17:01 +01:00
Peter Powell
9433e34b21
Show the mode syntax in ERR_INVALIDMODEPARAM.
2019-06-12 21:52:58 +01:00
Peter Powell
b5bc17fba3
Send the 001-004 numerics and MOTD/LUSERS from core_info.
...
Co-authored-by: Attila Molnar <attilamolnar@hush.com>
2018-08-22 21:25:55 +01:00
Peter Powell
58a0a7e014
Implement IRCv3 message tag support.
...
Co-authored-by: Attila Molnar <attilamolnar@hush.com>
2018-08-13 21:51:11 +01:00
Peter Powell
e2a820cce2
Add an accessor for the last mode change list to ModeParser.
...
GetLastParse will be going away soon.
2018-08-13 16:52:37 +01:00
Peter Powell
98372c3cf2
Extract RFC modes from the core to core_channel and core_user.
2017-12-10 12:38:45 +00: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
b76ff64dae
Enable using m_customprefix to alter core prefix modes.
...
This replaces the devoice module which has now been removed. If you
want users to be able to devoice themselves then you can load the
customprefix module add the following config tag:
<customprefix name="voice" depriv="yes">
If you wish to keep identical behaviour rather than allowing users
to use "MODE #YourChannel -v TheirNick" then you can load the alias
module and add the following config tag:
<alias text="DEVOICE" format="#*" replace="MODE $2 -v $nick">
2017-11-06 10:55:56 +00:00
Peter Powell
8281315255
Move depriv from m_customprefix into PrefixMode.
2017-11-06 10:55:56 +00:00
Peter Powell
257bf752fc
Add support for setting the unset rank in ModeHandler.
2017-11-06 10:55:56 +00:00
Peter Powell
12c67fb0e5
Fix RPL_SERVERVERSION treating the modes as a single parameter.
2017-10-04 14:10:19 +01:00
Peter Powell
60d92db9a1
Add ModeParser::IsModeChar to standardise mode validation.
2017-09-18 14:09:01 +01:00
Peter Powell
a62ae50007
Fix a bunch of Doxygen warnings.
2017-08-26 09:58:15 +01: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
03c5ffbdc3
Make ModeHandler::GetUserParameter() const, accept const User
2016-12-30 18:53:04 +01:00
Attila Molnar
f899ea2786
Add const versions of ModeHandler::IsPrefixMode(), IsListModeBase() and IsParameterMode()
2016-08-30 16:01:47 +02:00
Attila Molnar
5a5dcfa4f9
Mark ModeHandler::GetModeChar() and ModeWatcher::GetModeType() as const
2016-08-29 14:50:59 +02:00
Attila Molnar
19f0c09aa7
Convert ModeHandler::GetNumParams() to NeedsParam() that returns a bool
2016-08-29 14:50:08 +02:00
Attila Molnar
299f262a4f
Fix some whitespace issues
2015-12-28 16:59:03 +01:00
Attila Molnar
6fc00fa629
Implement ModeHandler::RegisterService()
2015-11-23 12:51:00 +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
56af4909b8
Add typedef ModeParser::ModeWatcherMap, remove ModeWatchIter
2014-12-15 17:14:09 +01:00
Attila Molnar
3eda212c2a
Migrate code from ModeParser into cmd_mode (core_user)
...
- Process() that takes a std::vector<std::string>
- DisplayCurrentModes()
- DisplayListModes()
2014-09-04 13:30:01 +02:00
Attila Molnar
e3fc46af3e
Split ModeParser::DisplayListMode() into two parts
...
ShowListModeList() sends the list of one listmode to a user, DisplayListMode() calls it for each mode letter
2014-09-04 13:08:22 +02:00
Attila Molnar
117db983d2
Remove unused parameter passed to ModeParser::DisplayCurrentModes()
2014-09-04 13:05:13 +02:00
Attila Molnar
679411e500
Let callers customize the begin/end positions for ModeParser::ModeParamsToChangeList()
...
This helps spanningtree when it deals with a vector of parameters where the modes begin at different positions
2014-09-04 12:27:04 +02:00
Attila Molnar
5bea41d726
Use Modes::ChangeList in ModeHandler::RemoveMode()
2014-09-03 15:35:13 +02:00
Attila Molnar
f55703b2fb
Add a ModeParser::Process() overload that can process an entire Modes::ChangeList
...
This is a wrapper that calls ProcessSingle() repeatedly until the entire changelist is processed
2014-09-03 15:11:27 +02:00
Attila Molnar
c6c43eaf60
Make it possible to resume processing a partially processed Modes::ChangeList
...
Return number of processed mode changes from ModeParser::ProcessSingle() and add a begin index parameter
2014-09-03 15:05:56 +02:00
Attila Molnar
05022b58f2
Split out ModeParser::ModeParamsToChangeList()
2014-09-03 15:03:38 +02:00
Attila Molnar
3d958279c6
Split out ModeParser::ProcessSingle() from Process()
...
This applies up to one MODE line's worth of mode changes from a Modes::ChangeList
2014-09-03 14:47:13 +02:00
Attila Molnar
fb82075a2e
Add mode process flag MODE_CHECKACCESS
2014-09-03 14:37:42 +02:00
Attila Molnar
8003e37f81
Remove ModeHandler::m_paramtype and GetTranslateType()
2014-09-03 14:32:02 +02:00
Attila Molnar
3427e32cc1
Remove ModeParser::LastParseTranslate and GetLastParseTranslate()
2014-09-03 14:31:00 +02:00
Attila Molnar
626005fe12
Remove ModeParser::LastParseParams and GetLastParseParams()
2014-09-03 14:30:04 +02:00
Attila Molnar
e7e315fc9d
m_spanningtree Send MODE/FMODE from the OnMode hook
...
If the MODE_LOCALONLY flag is set the mode change is not propagated
2014-09-03 14:26:40 +02:00
Attila Molnar
f3e803f5b9
Populate a Modes::ChangeList object in ModeParser::Process()
2014-09-03 14:09:03 +02:00
Attila Molnar
39bd7db538
Add Modes::Change and Modes::ChangeList
2014-09-03 14:06:45 +02:00
Attila Molnar
01a6b5d21c
Change mode_sequence to be a const ref in ModeParser::Process()
...
Also change the signature of DisplayListModes() to accept a const ref
2014-09-02 16:32:00 +02:00
Attila Molnar
51da1d3b59
Pass prefix rank and prefix char to PrefixMode constructor
2014-08-06 13:35:40 +02:00
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