253 Commits

Author SHA1 Message Date
Sadie Powell
98e4ddfb21 Use C++11 inline initialisation for class members. 2020-02-06 11:25:42 +00: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
473df5542f Add an oper only parameter to Simple{Channel,User}ModeHandler. 2020-01-05 15:22:40 +00:00
Sadie Powell
ada6646b65 Merge branch 'insp3' into master. 2019-07-27 19:12:29 +01:00
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
Sadie Powell
cd8b456f97 Merge branch 'insp3' into master. 2019-07-16 16:48:18 +01:00
Peter Powell
9433e34b21 Show the mode syntax in ERR_INVALIDMODEPARAM. 2019-06-12 21:52:58 +01:00
Sadie Powell
7ba7290bf0 ModeParser: remove fakederef. 2019-02-07 12:14:37 +00:00
Sadie Powell
c78ecdf579 Replace the override macro with the override keyword. 2019-01-25 02:52:11 +00:00
Sadie Powell
fb17bba197 Replace the TR1NS macro with the std namespace. 2019-01-25 02:49:03 +00: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