summaryrefslogtreecommitdiff
path: root/src/modules/m_kicknorejoin.cpp
AgeCommit message (Collapse)Author
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-11-12Use WriteNumeric() everywhere we send numerics and include the user's nick ↵Adam
automatically
2013-09-08Automatically register ServiceProviders created by modulesattilamolnar
2013-08-04Automatically attach modules to eventsattilamolnar
2013-07-04Remove $Core and $Mod* comments apart from $ModDep.Peter Powell
2013-06-13Call Channel::SetModeParam() from the mode parser when needed instead of ↵attilamolnar
requiring mode handlers to do it
2013-06-06Merge insp20attilamolnar
2013-05-16Remove unused variables, avoid copies where possible, check empty() instead ↵attilamolnar
of size() == 0 Most of these were detected by cppcheck
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-04-28Merge insp20attilamolnar
2013-04-16m_kicknorejoin Store and compare uuids instead pointersattilamolnar
Fixes the off chance scenario where we disallow a join because a previously kicked user has quit and the User who is trying to join happens to be allocated at the exact same memory location
2013-04-16m_kicknorejoin Limit time to 30m by defaultattilamolnar
In the current implementation we only expire entries when someone joins, without a limit it was possible to make us practically never remove entries and consume (a tiny amount of) memory for each entry until the mode was removed/parameter was changed The default limit of 30m is chosen to not surprise people when they upgrade. If you need to prevent rejoins for more than a minute then you should set a (timed)ban instead Config option is available to change the limit (2.0 only)
2013-04-16m_kicknorejoin Minor improvementsattilamolnar
- Ignore remote users - Remove expired items in one pass
2013-04-13OnUserPreJoin is a local-only hook, change User* parameter to LocalUser*attilamolnar
2013-04-01Whitespace and empty destructor removal, minor coding style changesattilamolnar
2013-04-01Change channel name parameter of Module::OnUserPreJoin() and ↵attilamolnar
Channel::JoinUser() to std::string from char*
2012-12-02Register all commands, modes and extensions using AddService()attilamolnar
AddService() throws an exception if an item cannot be registered, modules no longer need to worry about AddMode() etc. failing
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-12-02Attach to events and register services in init()attilamolnar
2012-09-30Fix more undefined behavior caused by referencing the returned buffer by ↵attilamolnar
std::string::c_str() when the object is temporary See 83c7cc45daf6fb1f8c36f15297a4657e45a34e88
2012-04-19Replace copyright headers with headers granting specific authors copyrightRobby-
2010-02-07Fix crash on kick when +J is set, +misc cleanupdanieldg
git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@12396 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-11-15Add ParamChannelModeHandlerdanieldg
git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@12134 e03df62e-2008-0410-955e-edbf42e46eb7
2009-10-24Get rid of ModePairdanieldg
git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@11963 e03df62e-2008-0410-955e-edbf42e46eb7
2009-10-14Move static map of extensions into ServerInstance, add const-correctnessdanieldg
git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@11873 e03df62e-2008-0410-955e-edbf42e46eb7
2009-10-08Add names for all modes (part 1 of named channel mode list)danieldg
git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@11809 e03df62e-2008-0410-955e-edbf42e46eb7
2009-10-05Run DelMode and DelModeWatcher in RemoveModuledanieldg
git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@11799 e03df62e-2008-0410-955e-edbf42e46eb7
2009-09-26Remove InspIRCd* parameters and fieldsdanieldg
git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@11763 e03df62e-2008-0410-955e-edbf42e46eb7
2009-09-13Simplify ModeHandler constructordanieldg
git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@11701 e03df62e-2008-0410-955e-edbf42e46eb7
2009-09-13Module API changes to use Membership* where sensibledanieldg
git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@11699 e03df62e-2008-0410-955e-edbf42e46eb7
2009-09-13Change Extensible to use strongly typed entriesdanieldg
git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@11696 e03df62e-2008-0410-955e-edbf42e46eb7
2009-09-02ModResult conversion: Change return type of all module functionsdanieldg
git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@11634 e03df62e-2008-0410-955e-edbf42e46eb7
2009-09-02Remove "servermode" parameter, replace with IS_FAKE() which is more reliabledanieldg
git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@11633 e03df62e-2008-0410-955e-edbf42e46eb7
2009-09-02Add Module* creator to Command and ModeHandlerdanieldg
git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@11631 e03df62e-2008-0410-955e-edbf42e46eb7
2009-09-02Use CheckTimeStamp to merge modes on netburstdanieldg
git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@11596 e03df62e-2008-0410-955e-edbf42e46eb7
2009-09-02Change allocation of commands/modesdanieldg
API change: Commands passed to AddCommand are no longer deleted automatically This removes lots of needless heap allocation and fixes a few memory leaks by allocating commands and modes as part of the Module rather than creating them separately in the module constructor. git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@11592 e03df62e-2008-0410-955e-edbf42e46eb7
2009-04-29Overloading SetMode seems to cause the compiler to interpret "" as a bool ↵danieldg
and not a string. Fixes bug #849 git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@11335 e03df62e-2008-0410-955e-edbf42e46eb7
2009-04-17Fix SetModeParam to use std::string and handle edge cases.danieldg
Previously, changing the vaule of a mode could require 3 calls to SetMode and SetModeParam. This also fixes memory leaks caused by the strdup() not always being paired with a free(). git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@11307 e03df62e-2008-0410-955e-edbf42e46eb7
2009-03-15Update all wiki links to point to the new wiki. This was done automatically ↵psychon
with the following command, only .Makefile.inc got some indent fixups by hand. for file in $(find -type f -and -not -path '*/.svn/*' -and -not -name '*.so') ; do sed -e 's#http://www.inspircd.org/wiki#http://wiki.inspircd.org#' -e 's#http://wiki.inspircd.org/index.php/#http://wiki.inspircd.org/#' -i $file ; done git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@11223 e03df62e-2008-0410-955e-edbf42e46eb7
2009-01-02Update copyrights for 2009.w00t
git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@10932 e03df62e-2008-0410-955e-edbf42e46eb7
2008-11-01Second attempt at time() -> SI->Time(), now problems with the original were ↵w00t
fixed. (SI::TIME was not initialised). Thanks Namegduf! (Please test, all, valdebug etc, report odd behaviour/warnings!) git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@10783 e03df62e-2008-0410-955e-edbf42e46eb7
2008-10-23Revert earlier time() -> SI->Time() diff for now, this causes problems with ↵w00t
dns.cpp in mysterious ways.. seemingly a bad pointer there somehow..? git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@10695 e03df62e-2008-0410-955e-edbf42e46eb7
2008-10-23Patch from Namegduf converting all instances (where possible) of time() -> ↵w00t
ServerInstance->Time(). Thanks! git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@10691 e03df62e-2008-0410-955e-edbf42e46eb7
2008-08-25Change module versions to use a string instead of fixed digits, and use ↵w00t
propset ID to auto-set versions, so we don't have (essentially unused) module versions. git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@10291 e03df62e-2008-0410-955e-edbf42e46eb7
2008-07-14Lots, lots more numerics.h conversionw00t
git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@10014 e03df62e-2008-0410-955e-edbf42e46eb7
2008-06-11fixed some indentation and spacing in modulespippijn
git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@9888 e03df62e-2008-0410-955e-edbf42e46eb7
2008-05-31and another rev bites the dust..thanks dzbricker
git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@9824 e03df62e-2008-0410-955e-edbf42e46eb7
2008-05-31fix. thanks jackmcbarn and special.bricker
git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@9823 e03df62e-2008-0410-955e-edbf42e46eb7