summaryrefslogtreecommitdiff
path: root/include/users.h
AgeCommit message (Collapse)Author
2008-10-18Working privs implementation, and example usage in NOTICE for mass messaging.w00t
git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@10662 e03df62e-2008-0410-955e-edbf42e46eb7
2008-10-18Migrate oper commands to an std::set, add a set for privs also. Change the ↵w00t
API a bit. git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@10661 e03df62e-2008-0410-955e-edbf42e46eb7
2008-10-18Add skeleton of HasPrivPermission.w00t
git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@10660 e03df62e-2008-0410-955e-edbf42e46eb7
2008-10-17Remove the duplicate checking/disabled setting of <connect> craq, there is a ↵w00t
(better) way to do this, which is to hunt for a new connect class on all users once /rehash happens. git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@10654 e03df62e-2008-0410-955e-edbf42e46eb7
2008-09-29Replace the IP (in addition to hostname) for CGIIRC clients; fixes glines ↵special
and zlines on IPs affecting cgiirc users. Thanks to Saz|Laptop git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@10607 e03df62e-2008-0410-955e-edbf42e46eb7
2008-09-13Changed Allowed Modes to bitsets.aquanight
git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@10541 e03df62e-2008-0410-955e-edbf42e46eb7
2008-09-10Clear out the string used for the temporarily stored hostname during DNS ↵special
resolution. Should save at least strlen(host) per user git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@10496 e03df62e-2008-0410-955e-edbf42e46eb7
2008-09-10Fixed comments for cached host fields in User; 3/4 of these were completely ↵special
incorrect. git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@10494 e03df62e-2008-0410-955e-edbf42e46eb7
2008-09-07Merge class connection in with class user (nothing else inherits it anyway, ↵w00t
and all the fields in here were only really useful to users anyway) git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@10460 e03df62e-2008-0410-955e-edbf42e46eb7
2008-09-07Merge the second interface for socket hooking into one, so it's all done by ↵w00t
Add/Del/GetIOHook now. git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@10457 e03df62e-2008-0410-955e-edbf42e46eb7
2008-08-31Move all the parameters around AGAIN. See docs shortlybrain
git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@10364 e03df62e-2008-0410-955e-edbf42e46eb7
2008-08-31Save 4 bytes (assuming sizeof(ptr) == 2) per user record, storing unneeded ↵w00t
pointers (self managed class) that nothing was ever done with. git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@10359 e03df62e-2008-0410-955e-edbf42e46eb7
2008-07-29After discussions and thought, move umode +n to +s. This increases ↵w00t
cross-ircd compat (both charybdis and unreal use +s for snomasks, others might in the future). This also decreases complexity for new users, and removes the redundancy. This means that just +s +cC for example will be required to view connects. (files to be renamed in next commit to not confuse svn). git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@10074 e03df62e-2008-0410-955e-edbf42e46eb7
2008-07-21Remove duplicated member, kept in classes.. Possible now we have a pointer. ↵w00t
this saves (another) 4 bytes per user. git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@10064 e03df62e-2008-0410-955e-edbf42e46eb7
2008-07-19Change modes in channels and users to use std::bitset instead of an array. ↵w00t
This saves 56 bytes per channel, and 112 bytes per channel, with no loss in speed or ease of use in code. :). Thanks (VERY) much to Special for telling me about this. git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@10043 e03df62e-2008-0410-955e-edbf42e46eb7
2008-07-19Fix compile. Also remove write error stuff, as that was used prior to the ↵w00t
goodness of global culllist. This makes getting user's quit messages to them (on excess recvq etc) much easier. git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@10042 e03df62e-2008-0410-955e-edbf42e46eb7
2008-07-19Use a switch (cleaner, probably more efficient) for user status here, also, ↵w00t
we can remove another member (::timeout) that is only actually used before registration by doing a bit of addition. git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@10041 e03df62e-2008-0410-955e-edbf42e46eb7
2008-07-19Remove totally unused member, saving sizeof(unsigned int) per user recordw00t
git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@10040 e03df62e-2008-0410-955e-edbf42e46eb7
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