summaryrefslogtreecommitdiff
path: root/include/users.h
AgeCommit message (Collapse)Author
2008-07-12Fix for #564w00t
git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@9961 e03df62e-2008-0410-955e-edbf42e46eb7
2008-07-12Add User::GetCIDRMask(int range), will be used for CIDR throttling, etc. ↵w00t
Also probably opens up the way for /gline nickname to place CIDR bans instead of regular bans, which could be helpful. Much thanks to Om for his help. git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@9959 e03df62e-2008-0410-955e-edbf42e46eb7
2008-07-02Back out the incomplete linebuffering stuff that shouldn't have been committed..w00t
git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@9948 e03df62e-2008-0410-955e-edbf42e46eb7
2008-07-02Forward port r9946: make SVSHOLD silent to avoid useless irritation to opersw00t
git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@9947 e03df62e-2008-0410-955e-edbf42e46eb7
2008-05-20A few minor fixes, some copy constructor stuff, misnamed channelmanager ↵brain
constructor, add files to vc8 project, configreader tidyups git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@9780 e03df62e-2008-0410-955e-edbf42e46eb7
2008-05-19More correctly state the lookup arrays as unsigned char, not charbrain
git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@9771 e03df62e-2008-0410-955e-edbf42e46eb7
2008-05-18Make User:: nick/ident/dhost/fullname and some other things std::string ↵aquanight
instead of char*/char[] (MODULES DO NOT COMPILE) git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@9748 e03df62e-2008-0410-955e-edbf42e46eb7
2008-05-07Masterful rewrite of User::AddBuffer to remove a string copy (and make more ↵w00t
efficient) thanks to some nifty string manipulations. This should provide benefit on highly loaded nodes. This has *not* been thoroughly tested considering it's criticality, but I have spent the past ~4 hours writing and testing it, and it seems ok. git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@9661 e03df62e-2008-0410-955e-edbf42e46eb7
2008-04-12Fixes for bug #515, update existing in-use connect tags on the fly in rehashbrain
git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@9471 e03df62e-2008-0410-955e-edbf42e46eb7
2008-04-12Trunk fix for bug #505 reported by nenolodbrain
git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@9468 e03df62e-2008-0410-955e-edbf42e46eb7
2008-04-11Patch from Brain fixing broken stuffw00t
git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@9456 e03df62e-2008-0410-955e-edbf42e46eb7
2008-04-11Much faster way of checking if the user is 4in6, avoid strncmp in ↵brain
User::GetIPString(), do it in User::SetSockAddr() git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@9455 e03df62e-2008-0410-955e-edbf42e46eb7
2008-04-09Move QuitUser into UserManager class, and unstaticize it. This prepares for ↵w00t
some benchmarking lulz on object pooling I plan to do today, as well as making more sense now we *have* a manager class git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@9442 e03df62e-2008-0410-955e-edbf42e46eb7
2008-03-30AWAY notification for WATCH. Numerics are now sent out when a user goes away ↵w00t
(or returns from AWAY), as well as in WATCH L (if the user is online and away). git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@9227 e03df62e-2008-0410-955e-edbf42e46eb7
2008-03-30Commit -Wformat=2 -Wmissing-format-attributes, printf-like functions in ↵aquanight
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
2008-03-24Add stuff so that modules can hook users by altering a pointer in the User ↵brain
class. Note that ssl modules still bind by port, but the idea of doing this change is so we can remove that logic next git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@9187 e03df62e-2008-0410-955e-edbf42e46eb7
2008-03-23This should save 128 bytes per user for non-opers. Well worth it imho for a ↵brain
reasonably large amount of unused ram. git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@9179 e03df62e-2008-0410-955e-edbf42e46eb7
2008-03-23Add ability to control what opertypes can set what operonly user/chan modes. ↵aquanight
This works the same way as commands, in that modes allowed by classes are added together, and * allows all. git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@9176 e03df62e-2008-0410-955e-edbf42e46eb7
2008-03-22Add WriteNumeric() to User and OnNumeric module event. Note that modules do ↵brain
not change the numeric text on the fly, as this involves needless allocations for numerics that arent being changed, so instead they block the original numeric and send out their own when needed. git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@9174 e03df62e-2008-0410-955e-edbf42e46eb7
2008-02-13Commit patch from danieldg that makes a ton of stuff const-safe for latest ↵brain
warn-happy trigger-happy gcc4 (thanks) git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@8922 e03df62e-2008-0410-955e-edbf42e46eb7
2008-02-11Add -Wshadow to cflags, and fix a bunch of warnings that come with it. Add a ↵w00t
note to webirc that needs looking at. git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@8892 e03df62e-2008-0410-955e-edbf42e46eb7
2008-02-08Support for /invite <user> <channel> <timeout> - if the user doesn't partake ↵aquanight
in <timeout> time, the invite expires git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@8854 e03df62e-2008-0410-955e-edbf42e46eb7
2008-02-03Clear up header insanityw00t
git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@8808 e03df62e-2008-0410-955e-edbf42e46eb7
2008-02-02Cache User::GetIPString()w00t
git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@8795 e03df62e-2008-0410-955e-edbf42e46eb7
2008-01-27Change API OnOperCompare to OnPassCompare, password hashing is now available ↵aquanight
for <connect:allow>, <power die= restart=>, <title> (m_customtitle.so), <vhost> (m_vhost.so), this works the same was as for <oper>: load m_password_hash.so (after all hasher modules, of course), and add hash="md5/sha256/whatever" to the relevant tag. Also fix m_callerid.cpp crashing on unload. git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@8755 e03df62e-2008-0410-955e-edbf42e46eb7
2008-01-16Remove an O(log n) in favour of an O(1) operation, and tidy up culllist some ↵w00t
more git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@8717 e03df62e-2008-0410-955e-edbf42e46eb7
2008-01-16Two stage commit: don't set user->muted except in QuitUser (duplicate ↵w00t
setting), also, change muted to drop all socket operations instead of just not reading the user's buffer if muted is set (no point wasting time - they're going away). Also revert culllist back to once per mainloop iteration now it is much cheaper than previously. git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@8716 e03df62e-2008-0410-955e-edbf42e46eb7
2008-01-16Re-add support for silent quits (note: we also remove an O(n) doing it this way)w00t
git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@8715 e03df62e-2008-0410-955e-edbf42e46eb7
2008-01-16Hacked-up culllist: stores user pointers rather than CullItem, as creating ↵w00t
them seems to be very expensive and wasteful. Doesn't support silent quits (yet), and User::QuitUser seems to trigger *many* times per user before they are removed (socketengine getting write events to closed socket perhaps). It's still much quicker than the old way (NO perceptible lag AT ALL :)) git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@8714 e03df62e-2008-0410-955e-edbf42e46eb7
2008-01-13Move User::AddClient to UserManager::AddClient. WARNING: I assure you this ↵w00t
is currently WRONG as I was playing with moving a few bits to the constructor. git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@8706 e03df62e-2008-0410-955e-edbf42e46eb7
2008-01-13First UserManager overhaul: Move clone counts out of InspIRCd & User.w00t
git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@8705 e03df62e-2008-0410-955e-edbf42e46eb7
2008-01-10Header update: 2007 -> 2008w00t
git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@8694 e03df62e-2008-0410-955e-edbf42e46eb7
2008-01-02Add param 'opername' to event OnPostOper. This will help make a (slightly ↵w00t
nicer) version of dz's patch to allow modes in <oper> git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@8615 e03df62e-2008-0410-955e-edbf42e46eb7
2007-11-11Implement roadmap item: "userrec::HasPermission -> map of maps, for (even ↵brain
faster) access" This is not a map of maps, but a single level map per oper, in non-opers this member is NULL. Please note that this is not yet tested. git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@8564 e03df62e-2008-0410-955e-edbf42e46eb7
2007-10-28Update User::exempt all the time we change an E:Line. Brain, can you check ↵w00t
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
2007-10-24Implement <connect:limit> - limits how many clients can sit inside a ↵w00t
<connect> tag. Brain, we have a problem here in that if we User::QuitUser() a user with a NULL MyClass member (connect class), then things break (like sendq et al). What should we do with this, create a generic catchall class or something just in case? (to replicate, set up a single connect class with a low limit, and connect too many clients. Crash is the result) git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@8357 e03df62e-2008-0410-955e-edbf42e46eb7
2007-10-24Disable all connect classes, reenable them as we find them in the config. ↵w00t
This stops users using a connect class removed from the conf (or will in a second) git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@8355 e03df62e-2008-0410-955e-edbf42e46eb7
2007-10-24Pedantic safetybrain
git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@8350 e03df62e-2008-0410-955e-edbf42e46eb7
2007-10-24Some constructors dont initialize the refcount, namely, the one thats ↵brain
usually called :P git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@8346 e03df62e-2008-0410-955e-edbf42e46eb7
2007-10-24Try this w00t, compiles, test running nowbrain
git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@8343 e03df62e-2008-0410-955e-edbf42e46eb7
2007-10-23Move some stuff from using userrec cached stuff to using stuff in the ↵w00t
connect classes git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@8339 e03df62e-2008-0410-955e-edbf42e46eb7
2007-10-23Some more class stuff, blah. Now possible to move a user to a different ↵w00t
class via User::SetClass(), which cmd_oper uses. GetClass() is now just a wrapper around User::MyClass. User::CheckClass() does not support any parameters anymore, nor does User::GetClass().. I think I have this all right ;p git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@8337 e03df62e-2008-0410-955e-edbf42e46eb7
2007-10-23Some initial work towards tying <connect> classes to user accounts. This ↵w00t
will (in the longer term) allow for things like limits on how many users can fit in a <connect> for 1.2 git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@8336 e03df62e-2008-0410-955e-edbf42e46eb7
2007-10-23-pedantic tidyups, lets see if it finds anything worthy of a fixbrain
git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@8313 e03df62e-2008-0410-955e-edbf42e46eb7
2007-10-21Add User::IncreasePenalty() and User::DecreasePenalty()w00t
git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@8264 e03df62e-2008-0410-955e-edbf42e46eb7
2007-10-21*untested* command buffering/penaltybrain
git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@8250 e03df62e-2008-0410-955e-edbf42e46eb7
2007-10-21In class User:brain
/** If this bool is set then penalty rules do not apply to this user */ bool ExemptFromPenalty; git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@8247 e03df62e-2008-0410-955e-edbf42e46eb7
2007-10-21Add User::UnderPenaltybrain
/** If this bool is set for a user, then the user is under penalty, in short they * are waiting for some held commands to be executed. If this is the case, then * any commands they have in their sendq are executed on a timer tick rather than in * their event handler. */ git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@8244 e03df62e-2008-0410-955e-edbf42e46eb7
2007-10-16Remove second overridden (fully duplicated :/) copy of GetIPString which ↵w00t
copies into a user specified buffer. It's not used anywhere, and is duplication ;( git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@8218 e03df62e-2008-0410-955e-edbf42e46eb7
2007-10-15In the grand tradition of huge fucking commits:w00t
- chanrec -> Channel - userrec -> User Enjoy. git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@8204 e03df62e-2008-0410-955e-edbf42e46eb7