summaryrefslogtreecommitdiff
path: root/src/xline.cpp
AgeCommit message (Collapse)Author
2020-02-18Generalise XLine stats numerics using RPL_STATS from aircd.Sadie Powell
2020-01-11Update copyright headers.InspIRCd Robot
2019-05-17Only skip applying more X-lines to a user if they have been killed.Peter Powell
This fixes an issue with the previous commit where if a user had a non-killing X-line applied to them (e.g. Q-line) they would not have any further X-lines applied to them. Thanks to @linuxdaemon for pointing this out.
2019-05-16Fix applying pending xlines to online users.Peter Powell
2019-03-10Fix BanCache entries existing after X-line expiry.Matt Schatz
When DefaultApply() adds a hit to the BanCache it uses the X-line duration to set a duration on the entry. This can result in an entry lasting longer than the X-line itself. Fix this by setting the entry duration to the time left on the X-line.
2019-02-22Improve the handling of config X-lines and filters. (#1583)Matt Schatz
2019-02-18X-line expiries: use the new DurationString() function.Matt Schatz
2019-01-24Add the reason to xline removal notices. (#1545)Matt Schatz
Show the reason in manual xline removal SNOTICEs, just like expiry SNOTICEs do. This modifies XLineManager::DelLine() to require another string reference passed to it. Requested by @Robby-.
2019-01-09Improve X-line text consistency.Matt Schatz
- Change any "-Line", ":Line", or "*line" to "-line" throughout the X-line code, comments, and documentation. - Add periods to the end of some notices. - Correct a typo in the Q-line code comments. - Update the filter module documentation (shun addition). Co-authored-by: Robby <robby@chatbelgie.be>
2018-12-13Store durations as unsigned long not long in XLine and m_filter.Peter Powell
2018-10-14Show reasons in xline expiry messages.Robby
2018-09-23Don't sync xlines defined in the config and expire them on rehash.Peter Powell
Closes #1427.
2018-04-22Merge tag 'v2.0.26' into master.Peter Powell
2018-04-08Move OnStats from the core to a cross-module event.Peter Powell
Some core code still exists in the XLine system but this will be replaced when the XLine system is replaced later.
2018-04-06Fix ELine::Matches returning false on existing matchgenius3000
When checking for an E-Line match, we want to actually check for a current match even if we previously matched and are set exempt. This fixes situations where you have an E-Lined CGI:IRC address, a G-Lined IP range for some area/host/etc and a smaller E-Lined IP range for known good clients. Currently when CGI:IRC changes the IP, E-Lines are rechecked but because the user is already exempt (from the CGI:IRC E-Line), they are set no longer exempt and match a G-Line, when they should match an E-Line. This exact change has been done before in commit 'c8b344e' and shortly reverted in 'c490a90' to fix issue #989 (CGI:IRC users remaining exempt when the CGI:IRC address is E-Lined but they are not). The actual cause to this issue was likely that the user's hostname was not changed from the CGI:IRC hostname/IP prior to rechecking E-Lines. This is being fixed in a separate commit.
2017-11-21Add the override keyword in places that it is missing.Peter Powell
GCCs warnings for this are much better than Clangs.
2017-10-28Hide User#host and User#dhost and use accessors to modify them.Peter Powell
This removes the need to invalidate the cache after changing a user's hostname.
2017-10-12Merge the latest changes from insp20 into master.Peter Powell
2017-09-11Fix killing elined clients on [gkz]line in some cases.Peter Powell
2016-08-22Replace irc::string in XLineLookup with irc::insensitive_swo mapAttila Molnar
2016-02-25Introduce Stats::Context, pass it to the OnStats hook and switch all code to itAttila Molnar
2016-02-25Convert WriteNumeric() calls to pass the parameters of the numeric as method ↵Attila Molnar
parameters
2015-04-16Revert c8b344ea748d62d9f37cacd4dd785f15b186725c to fix regressionAttila Molnar
Fixes issue #989 reported by @B00mX0r
2015-01-24Use ERR_YOUREBANNEDCREEP instead of NOTICE when a user is banned.Peter Powell
This is specified in RFC 1459 so we should probably use it.
2015-01-17Fix elines not matching elined users when rechecking elined statusAttila Molnar
2014-11-01Add stdalgo::erase() and use it to simplify codeAttila Molnar
2014-07-19Access local user list via new UserManager::GetLocalUsers() and make ↵Attila Molnar
local_users private
2014-07-19Move and rename typedef LocalUserList to UserManager::LocalListAttila Molnar
2014-07-03Remove now needless User::ForceNickChange()Attila Molnar
Change call sites to call ChangeNick()
2014-06-13Change allocation of InspIRCd::BanCache to be physically part of the object ↵Attila Molnar
containing it
2014-06-13Pull in bancache.h from inspircd.hAttila Molnar
2014-01-25Omit the server name internally when building a /STATS reply and prepend it ↵Attila Molnar
later
2014-01-24Convert LocalUserList to an intrusively linked listAttila Molnar
2014-01-05Improve UserManager::QuitUser() and related codeAttila Molnar
- Make operreason optional; NULL means same as quitreason - Remove User::quietquit, it is now handled internally in spanningtree - Send snotice about quitting remote users from spanningtree
2013-08-10Rename <options:moronbanner> to <options:xlinemessage>.Peter Powell
This name is more descriptive of what is actually is used for.
2013-08-04Change the syntax of FOREACH macros to be less dumb.Adam
2013-05-21Convert XLine::Displayable to return a std::string.Peter Powell
2013-05-18Change the signature of User::ForceNickChange() to accept const std::string& ↵attilamolnar
instead of const char*
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-12Add LOG_ prefix to the log level enum values.Peter Powell
2013-04-10BanCache: Don't repeat ourselves, one BanCacheManager::AddHit() and one ↵attilamolnar
BanCacheHit constructor is enough
2013-04-09XLine: Provide a default implementation for DisplayExpiry()attilamolnar
2013-04-01Move member variables from User to LocalUserattilamolnar
- idle_lastmsg - dns_done - quitting_sendq - exempt - lastping
2012-12-05Fix expired xlines being treated as live ones in XLineManager::AddLine()attilamolnar
This fixes ADDLINEs not being propagated and /gline etc. failing for already existing but expired xlines Special thanks to @JDowny (TinMan) for his detailed report and cooperation that made this fix possible Fixes #306 reported by @TurkDesk Fixes #379 reported by @JDowny
2012-11-29Add a typedef for LocalUserListattilamolnar
2012-11-28Change empty string assignments to .clear() or remove them entirelyattilamolnar
Part 2 of ba5c0db795824c3fc1ad48ce332d7bdc440cb77f
2012-10-12Remove superfluous std::string()sattilamolnar
2012-08-25Remove unnecessary cleanup in XLineManager destructorattilamolnar
2012-08-25Remove unnecessary string copy in XLineManager::InvokeStatsattilamolnar