summaryrefslogtreecommitdiff
path: root/src/xline.cpp
Commit message (Collapse)AuthorAgeFilesLines
* Fix bug (partially/accidentally) discovered by Bricker: if an XLine is not ↵Gravatar w00t2008-04-051-1/+4
| | | | | | permanent, bancache should use the expiry time of the xline, not an arbitrary value git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@9356 e03df62e-2008-0410-955e-edbf42e46eb7
* Commit -Wformat=2 -Wmissing-format-attributes, printf-like functions in ↵Gravatar aquanight2008-03-301-5/+5
| | | | | | inspircd now get treated like printf (meaning compile-time check goodness) in GCC git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@9217 e03df62e-2008-0410-955e-edbf42e46eb7
* Convert remaining InspIRCd::Log() calls to new logging systemGravatar aquanight2008-02-221-1/+1
| | | | git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@9001 e03df62e-2008-0410-955e-edbf42e46eb7
* I gots a better fix :pGravatar brain2008-02-171-0/+10
| | | | git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@8951 e03df62e-2008-0410-955e-edbf42e46eb7
* Fix trampling on memory in Z/G/K/ELine.Gravatar w00t2008-02-111-0/+1
| | | | git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@8901 e03df62e-2008-0410-955e-edbf42e46eb7
* Add -Wshadow to cflags, and fix a bunch of warnings that come with it. Add a ↵Gravatar w00t2008-02-111-4/+4
| | | | | | note to webirc that needs looking at. git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@8892 e03df62e-2008-0410-955e-edbf42e46eb7
* Move some stuff to usermanager, remove a little header insanity, remove ↵Gravatar w00t2008-02-021-4/+4
| | | | | | trace because it's still less useful than a chocolate fireman. git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@8790 e03df62e-2008-0410-955e-edbf42e46eb7
* Header update: 2007 -> 2008Gravatar w00t2008-01-101-1/+1
| | | | git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@8694 e03df62e-2008-0410-955e-edbf42e46eb7
* Add OnExpireLine(XLine *) hook, will be used in xline db stuff to avoid ↵Gravatar w00t2008-01-091-11/+13
| | | | | | getting a fucked up vector git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@8676 e03df62e-2008-0410-955e-edbf42e46eb7
* Fix bug in new XLine system (thanks Brain) - I don't know how I didn't spot ↵Gravatar w00t2008-01-091-1/+1
| | | | | | this one :P git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@8672 e03df62e-2008-0410-955e-edbf42e46eb7
* Maybe BanCache works now?Gravatar w00t2008-01-061-2/+2
| | | | git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@8643 e03df62e-2008-0410-955e-edbf42e46eb7
* Add removal of BanCache entries on XLINE add/del, so we avoid out of date ↵Gravatar w00t2008-01-061-0/+4
| | | | | | responses. git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@8641 e03df62e-2008-0410-955e-edbf42e46eb7
* Integrate K/Gline into the bancache system by making some modifications to ↵Gravatar w00t2007-11-041-4/+12
| | | | | | DefaultApply method. This means any type of XLine that uses DefaultApply can hook into the bancache system and add positive hits quickly and easily with no modification, which is neat. git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@8538 e03df62e-2008-0410-955e-edbf42e46eb7
* Force to uuid on applying a qline, rather than disconnectingGravatar brain2007-11-021-2/+2
| | | | git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@8472 e03df62e-2008-0410-955e-edbf42e46eb7
* We cant return NULL if the first hit we get expires in MatchLine, there may ↵Gravatar brain2007-11-021-4/+24
| | | | | | | | | be another *after* it which matches, meaning that user may escape retribution ;) (thanks for pointing that out, aquanight) git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@8471 e03df62e-2008-0410-955e-edbf42e46eb7
* Whoops, new expiry stuff was expiring perm lines! fixed.Gravatar brain2007-11-021-4/+4
| | | | git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@8466 e03df62e-2008-0410-955e-edbf42e46eb7
* Expire lines on burst, and ensure that if an eline expires while we're ↵Gravatar brain2007-11-021-1/+24
| | | | | | checking elines, the iterator is not trashed git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@8465 e03df62e-2008-0410-955e-edbf42e46eb7
* Expire timed glines that are due for expiry on stats request for it, thanks ↵Gravatar brain2007-11-021-9/+17
| | | | | | for the idea danieldg git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@8464 e03df62e-2008-0410-955e-edbf42e46eb7
* Hopefully fix the bursting of xlines to work again (even with unknown types) ↵Gravatar brain2007-11-021-2/+20
| | | | | | and also add facility to enumerate them git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@8461 e03df62e-2008-0410-955e-edbf42e46eb7
* Move lookup_lines to private, theres no need for it to be public any moreGravatar brain2007-11-021-3/+1
| | | | git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@8460 e03df62e-2008-0410-955e-edbf42e46eb7
* Tidy up, and make the identifer for a line type be std::string not charGravatar brain2007-11-021-69/+37
| | | | git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@8459 e03df62e-2008-0410-955e-edbf42e46eb7
* XLines now only checked for expiry on positive hit. saves us a honking big ↵Gravatar brain2007-11-021-37/+40
| | | | | | O(n) loop. git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@8458 e03df62e-2008-0410-955e-edbf42e46eb7
* xline gutting, once more. There is no longer an active_lines vector, and no ↵Gravatar brain2007-11-021-113/+42
| | | | | | | | | requirement for sorting. Expiry will be cheked on a per-line basis for each positive hit on that line, saving on cpu time. git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@8457 e03df62e-2008-0410-955e-edbf42e46eb7
* Update docs on how XLine system will be workingGravatar w00t2007-11-011-23/+9
| | | | git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@8452 e03df62e-2008-0410-955e-edbf42e46eb7
* There, i think all thats now left is matches_*line which we can do with two ↵Gravatar brain2007-10-311-61/+0
| | | | | | | | | overloaded methods Matches(const char type, const std::string &pattern) and Matches(const char type, User* u) git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@8450 e03df62e-2008-0410-955e-edbf42e46eb7
* Fix (?) stats charsGravatar brain2007-10-311-28/+16
| | | | git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@8448 e03df62e-2008-0410-955e-edbf42e46eb7
* This *should* fix expiry. Can someone else (w00t? :p) test for me, and check ↵Gravatar brain2007-10-311-23/+23
| | | | | | im not committing something thats a pointless exercise in futility? :P git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@8447 e03df62e-2008-0410-955e-edbf42e46eb7
* More debug in hereGravatar brain2007-10-311-3/+10
| | | | git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@8446 e03df62e-2008-0410-955e-edbf42e46eb7
* Start to fix broken expiryGravatar brain2007-10-311-2/+11
| | | | git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@8445 e03df62e-2008-0410-955e-edbf42e46eb7
* Fix up to pass User*Gravatar brain2007-10-311-4/+12
| | | | git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@8442 e03df62e-2008-0410-955e-edbf42e46eb7
* Add factories for other typesGravatar brain2007-10-311-0/+12
| | | | git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@8439 e03df62e-2008-0410-955e-edbf42e46eb7
* Add factories for eline and gline as testsGravatar brain2007-10-311-0/+14
| | | | git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@8438 e03df62e-2008-0410-955e-edbf42e46eb7
* Implement: XLineManager::RegisterFactory, UnregisterFactory, GetFactoryGravatar brain2007-10-311-0/+34
| | | | git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@8437 e03df62e-2008-0410-955e-edbf42e46eb7
* More fixes and some optimizationsGravatar brain2007-10-311-11/+13
| | | | git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@8430 e03df62e-2008-0410-955e-edbf42e46eb7
* More stuffGravatar brain2007-10-311-10/+35
| | | | git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@8429 e03df62e-2008-0410-955e-edbf42e46eb7
* Fixified some moreGravatar brain2007-10-311-5/+15
| | | | git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@8428 e03df62e-2008-0410-955e-edbf42e46eb7
* The rest doesnt compile yet, dont bother :pGravatar brain2007-10-311-82/+44
| | | | git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@8427 e03df62e-2008-0410-955e-edbf42e46eb7
* Clean up XLine conf stuff a little bit, move most of it to configreader. ↵Gravatar w00t2007-10-311-74/+21
| | | | | | Also, check elines and call ApplyLines on both rehash and startup. git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@8425 e03df62e-2008-0410-955e-edbf42e46eb7
* A few more timesaving checks.Gravatar brain2007-10-291-0/+15
| | | | | | | | The more astute amongst you will have noticed all the Add?Line functions now look practically identical. This paves the way for us to have one generic one, but before we do this i'd rather have us add an XLine* pointer to it, not a hostmask or something non-generic. git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@8423 e03df62e-2008-0410-955e-edbf42e46eb7
* Add the lookup_lines stuff. Sorry i havent documented this yet, i am tired.Gravatar brain2007-10-291-6/+28
| | | | git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@8422 e03df62e-2008-0410-955e-edbf42e46eb7
* Ok, now each xline will be in two places. The sorted vector and a map, each ↵Gravatar brain2007-10-291-5/+5
| | | | | | | | | line type having its own map stored in a map of maps. (RTFS when its done) This allows for faster checking for simple existence of a line for removal/adding without O(n) lookups git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@8420 e03df62e-2008-0410-955e-edbf42e46eb7
* This commit is untested and breaks a lot of xline stuff. work in progress.Gravatar brain2007-10-291-189/+99
| | | | git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@8418 e03df62e-2008-0410-955e-edbf42e46eb7
* Make ELines cached, and check for ELined status in all the Matches for all ↵Gravatar w00t2007-10-281-25/+34
| | | | | | the linetypes. Brain, SVN up before you overwrite my fixes to bits of this again :P git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@8417 e03df62e-2008-0410-955e-edbf42e46eb7
* Update User::exempt all the time we change an E:Line. Brain, can you check ↵Gravatar w00t2007-10-281-4/+28
| | | | | | I've done this okay, and fix my XXX if you know how? ta. git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@8416 e03df62e-2008-0410-955e-edbf42e46eb7
* YAR!Gravatar brain2007-10-281-82/+3
| | | | git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@8415 e03df62e-2008-0410-955e-edbf42e46eb7
* GrrGravatar brain2007-10-281-5/+5
| | | | git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@8413 e03df62e-2008-0410-955e-edbf42e46eb7
* Add Apply and DefaultApply.Gravatar brain2007-10-281-0/+39
| | | | git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@8412 e03df62e-2008-0410-955e-edbf42e46eb7
* FixifyGravatar w00t2007-10-281-4/+4
| | | | git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@8411 e03df62e-2008-0410-955e-edbf42e46eb7
* Rewrite of XLineManager::ApplyLines to only apply pending lines. This ↵Gravatar w00t2007-10-281-56/+94
| | | | | | ..doesn't seem to compile at the moment for me. Not tested, at all. git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@8410 e03df62e-2008-0410-955e-edbf42e46eb7
* I think this is done. Add overloaded Matches() which takes std::string and ↵Gravatar brain2007-10-281-1/+21
| | | | | | implement it in zline and qline, the rest dont need it git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@8409 e03df62e-2008-0410-955e-edbf42e46eb7