20 Commits

Author SHA1 Message Date
Peter Powell
3b39a88fdf Fix a minor Doxygen warning. 2019-01-24 17:15:13 +00:00
Peter Powell
36da0833c5 Add the <maxlist> tag and switch ListModeBase to always use it.
The old method of doing this was:

1. Extremely inconsistently used. Some list modes used <banlist>
   and some used their own config tag.
2. Not documented in the slightest. There was a small reference to
   <maxbans> for the ban mode but nothing else.
3. In some cases conflicting with other config tags. The chanfilter
   module defined a <chanfilter> tag for general config whilst also
   using it for the max list settings.

The new <maxlist> tag avoids these issues entirely.
2018-12-19 09:02:09 +00:00
B00mX0r
1155320da0 Fix an invalid mode parameters numeric upon attempting to view a list mode 2018-04-08 19:09:56 +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
21f2f56e98 Raise the default listmode limit to 100 from 64.
64 is a rather restrictive limit especially considering how fast
channels can accumulate bans. In fact, #InspIRCd hit the ban limit
in just over a year.

Having a low limit might have made sense when memory was expensive
but the average IRC server should be able to handle this fine now.
2017-09-14 15:42:34 +01:00
Peter Powell
60658d0bdb Replace the deprecated MAXBANS token with MAXLIST. 2017-07-24 14:44:36 +01:00
Peter Powell
d2b5c7d1fc Add DEFAULT_LIST_SIZE for the default list mode size. 2017-07-24 14:44:11 +01:00
Attila Molnar
711e33b9f8 Change listmode storage type to vector 2014-12-16 16:42:35 +01:00
Attila Molnar
5bea41d726 Use Modes::ChangeList in ModeHandler::RemoveMode() 2014-09-03 15:35:13 +02:00
Attila Molnar
3e2cfaf8c0 Change ListModeBase::DoRehash() to not be virtual 2014-08-06 13:22:40 +02:00
attilamolnar
58d7827bb1 Send ListModeBase modes implicitly on channel sync
Remove Module::ProtoSendMode() and ListModeBase::DoSyncChannel()
2013-09-12 14:44:17 +02:00
attilamolnar
992674362c Automatically register ServiceProviders created by modules 2013-09-08 17:11:08 +02:00
Peter Powell
146d72fddb Fix Doxygen comments. 2013-06-21 03:52:56 +01: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
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
99461ac66d Fix ListModeBase on Windows 2013-04-09 21:41:18 +02:00
attilamolnar
98beba078b ListModeBase: Cache max items per channel 2013-04-08 23:13:25 +02:00
attilamolnar
9de86c34d4 ListModeBase: Minor changes to original u_listmode code
- Add constructors to ListItem, ListLimit
- Rename fields in ListItem
- Store time as time_t instead of string
- Store limits in a vector instead of a list
- Don't deallocate the list when it becomes empty
2013-04-08 23:13:25 +02:00
attilamolnar
ebe5b201aa Migrate u_listmode.h into the core, change +b to use it 2013-04-08 23:13:24 +02:00