summaryrefslogtreecommitdiff
path: root/src/modules/m_chanhistory.cpp
AgeCommit message (Collapse)Author
2018-12-21Only parse valid durations, don't treat invalid multipliers as seconds (#1538)linuxdaemon
2018-12-12Fix conversion issues by replacing ConvToInt with ConvToNum<T>.Peter Powell
The former was a thin wrapper around atol and brought with it all of the weird parsing logic of atol which is almost never what is actually wanted. It also almost never returned the numeric type which is actually wanted which can cause weird issues when casting.
2018-11-24Move IsValidDuration into the core.Peter Powell
2018-10-01Fix the chanhistory module being inconsistent across servers.Peter Powell
Closes #331.
2018-08-13Add support for the IRCv3 batch specification.Peter Powell
Co-authored-by: Attila Molnar <attilamolnar@hush.com>
2018-08-13Add support for the IRCv3 server-time specification.Peter Powell
Co-authored-by: Attila Molnar <attilamolnar@hush.com>
2018-08-13Implement IRCv3 message tag support.Peter Powell
Co-authored-by: Attila Molnar <attilamolnar@hush.com>
2018-04-16Add ConfigTag::getUInt for reading unsigned config values.Peter Powell
2018-01-29Add ERR_INVALIDMODEPARAM for responding to invalid mode params.Peter Powell
Currently on invalid modes we do a combination of different things: 1. Send a custom mode-specific numeric (which often collides with other modes). 2. Send a server notice. 3. Do absolutely nothing. This new numeric is a generic way of handling invalid parameters when setting a mode that avoids all of the mistakes of the previous behaviour.
2018-01-06Rework message handling.Peter Powell
- Move all message-related types to their own header to make moving them to a cross-module events easier. - Rename OnUserMessage to OnUserPostMessage. - Rename OnText to OnUserMessage. - Replace the dest, target_type, and status parameters with the MessageTarget class. - Replace the text, exempt_list, and msgtype parameters with the MessageDetails struct. - Add echooriginal and originaltext to the MessageDetails struct to allow spam filtering to not be broken by cap echo-message.
2018-01-03Fix m_chanhistory sending the history notice directly to the user.Peter Powell
Closes #1452.
2017-12-31Increase the config default for <chanhistory:maxlines> to 50.Peter Powell
2017-12-16Only show a duration in m_chanhistory's notice if one is set.Peter Powell
Closes #1235.
2017-11-21Add the override keyword in places that it is missing.Peter Powell
GCCs warnings for this are much better than Clangs.
2017-11-17Fix a ton of -Wsign-conversion warnings.Peter Powell
2015-01-10Reduce std::string::substr() usageAttila Molnar
substr() returns a new string while erase() and assign() modify the existing one
2014-02-15Add ParamModeBase and ParamMode, change all parameter modes to inherit from ↵Attila Molnar
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
2013-09-08Automatically register ServiceProviders created by modulesattilamolnar
2013-08-30Replace OnRehash() with ReadConfig() that is called on boot, on module load ↵attilamolnar
and on rehash This eliminates the need for calling OnRehash() in init()
2013-08-24Option to select if chanhistory is on for botsDaniel Vassdal
2013-08-04Automatically attach modules to eventsattilamolnar
2013-07-04Remove $Core and $Mod* comments apart from $ModDep.Peter Powell
2013-07-01Replace hardcoded mode letters passed to IsModeSet() and GetModeParameter() ↵attilamolnar
with ModeHandlers, part 1
2013-06-13Call Channel::SetModeParam() from the mode parser when needed instead of ↵attilamolnar
requiring mode handlers to do it
2013-05-20Remove OnUserPreNotice and OnUserNotice hooks, add MessageType argument to ↵attilamolnar
OnUserMessage and OnUserPreMessage All modules (except m_nonotice) that perform filtering on messages have common logic for handling PRIVMSGs and NOTICEs and most of them run the exact same code in both cases
2013-05-15Tidy up keywords on module methods.Peter Powell
- Remove virtual keyword from a ton of methods which don't need it. - Add override keyword to a ton of methods which do need it.
2013-05-15Replace some C-isms with C++-isms.Peter Powell
* 'const char*' to 'const std::string&'. * snprintf to std::string concatenation. * Replace duplicated OneOfMatches with InspIRCd::MatchMask.
2013-05-14Add method for writing server notices.Peter Powell
This allows us to send a server notice to a user without worrying about whether they are registered or not. If a user receives a server notice and they are not registered then the nickname field will contain an asterisk instead of their nick name.
2013-04-03Convert InspIRCd::Duration() to be staticattilamolnar
2013-01-27m_chanhistory Fix durations containing 'S' being rejectedattilamolnar
2012-12-02Register a few extensions that weren't registeredattilamolnar
2012-12-02Dynamically determine the size of the eventlist[] passed to Attach()attilamolnar
m_sqlauth was attached to I_OnUserDisconnect but didn't provide a handler for it, remove
2012-07-12m_chanhistory Read the boolean config entry with getBool()attilamolnar
2012-07-12m_halfop, m_chanhistory Remove redundant ModeParser::DelMode() calls, the ↵attilamolnar
modes are deleted automatically on unload
2012-06-17m_chanhistory Keep history when changing parametersattilamolnar
2012-06-17m_chanhistory Don't allow durations that contain an invalid char or too longattilamolnar
2012-06-17m_chanhistory Add config setting to show/hide the informational notice ↵attilamolnar
before playing back history, don't playback to remote users
2012-04-19Replace copyright headers with headers granting specific authors copyrightRobby-
2010-08-28Prevent setting mode -H if already unset, bug #74Daniel De Graaf
2010-02-17Add <chanhistory:maxlines> to specify the maximum allowed size of channel ↵danieldg
history git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@12488 e03df62e-2008-0410-955e-edbf42e46eb7
2010-02-15Deny identical mode +H changedanieldg
git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@12466 e03df62e-2008-0410-955e-edbf42e46eb7
2010-02-09Move chanhistory to PostJoin hookdanieldg
While irssi is currently able to show the lines sent prior to join, it is better for this module to work on all clients without modification. git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@12407 e03df62e-2008-0410-955e-edbf42e46eb7
2010-01-15Remove VF_COMMON from mode-provider modules (no longer needed due to better ↵danieldg
CAPAB checking) git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@12263 e03df62e-2008-0410-955e-edbf42e46eb7
2010-01-11...because every now and again, i have to do a massive commit.brain
git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@12248 e03df62e-2008-0410-955e-edbf42e46eb7
2009-10-18Change to Duration for second paramdanieldg
git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@11898 e03df62e-2008-0410-955e-edbf42e46eb7
2009-10-17Fix channel mode +H to allow maximum length and add explanatory message prefixdanieldg
git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@11897 e03df62e-2008-0410-955e-edbf42e46eb7
2009-10-17Add m_chanhistory, mode +H <lines> to replay some lines of history on ↵danieldg
channel join git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@11895 e03df62e-2008-0410-955e-edbf42e46eb7