summaryrefslogtreecommitdiff
path: root/src/users.cpp
AgeCommit message (Collapse)Author
2008-04-02Automatic detection and allocation of max fds. No longer needs recompile to ↵brain
change, just adjust it in your kernel or whatever and restart insp. Please note that select and iocp socket engines do not support detection and are always set to FD_SETSIZE and 10240 descriptors respectively. git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@9263 e03df62e-2008-0410-955e-edbf42e46eb7
2008-03-31fix a few warnings by casting since thats the only way to be sure non native ↵peavey
C types matches their format tokens. git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@9239 e03df62e-2008-0410-955e-edbf42e46eb7
2008-03-31Fix two format warnings, dont you DARE tell me size_t varies in size too.brain
git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@9235 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-23Clean up user/chan modes on deoper, fix memsets off-by-1, delete[] properly ↵aquanight
in destructor git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@9182 e03df62e-2008-0410-955e-edbf42e46eb7
2008-03-23These memsets cant rely on sizeof() any more, afaik. The sizeof() would give ↵brain
4 or 8, size of the pointer :) git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@9181 e03df62e-2008-0410-955e-edbf42e46eb7
2008-03-23Whoops, take out some foolish memsets (well theyre foolish now :p)brain
git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@9180 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-22Wheeee for HUGE commits. Convert all numerics to WriteNumeric so that ↵brain
OnNumeric can capture them. git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@9175 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-26Fix for bug #466 reported by Johnbrain
git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@9042 e03df62e-2008-0410-955e-edbf42e46eb7
2008-02-26Fix for feature request in bug #465 by Johnbrain
git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@9041 e03df62e-2008-0410-955e-edbf42e46eb7
2008-02-22Convert remaining InspIRCd::Log() calls to new logging systemaquanight
git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@9001 e03df62e-2008-0410-955e-edbf42e46eb7
2008-02-22Nuke TIMESYNC from orbit \o/w00t
git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@8998 e03df62e-2008-0410-955e-edbf42e46eb7
2008-02-21The issue from stable does not exist here, because we initialize ↵brain
userrec::quietquit to false in QuitUser (we didnt in stable) however it makes sense to also init this in the ctor git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@8974 e03df62e-2008-0410-955e-edbf42e46eb7
2008-02-17Seperate USERIO into USERINPUT and USEROUTPUTbrain
git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@8949 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-12Backport r8910: oper quit message would be blankw00t
git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@8911 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-09Add a printf-type override for LogManager::Log(). We need to find a way to ↵w00t
see if a log call would have any interest, to avoid unnecessary printf() here though. Convert a bunch of stuff to using new logging (added targets: USERS, USERIO) git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@8860 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-05This makes more sensebrain
git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@8837 e03df62e-2008-0410-955e-edbf42e46eb7
2008-02-04Brain, look at this pleasew00t
git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@8817 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-02-02Move some stuff to usermanager, remove a little header insanity, remove ↵w00t
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
2008-01-17Fix.. snomask O is already taken (ffs) so use A insteadw00t
git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@8729 e03df62e-2008-0410-955e-edbf42e46eb7
2008-01-17Remove InspIRCd::WriteOpers in favour of snomask Ow00t
git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@8728 e03df62e-2008-0410-955e-edbf42e46eb7
2008-01-16Add a warning about quitting a user twice, and fix a minor brainfartw00t
git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@8718 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-13Undo my constructor playing, I'm pretty sure it will break stuff. This will ↵w00t
require thinkings. git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@8707 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-11-04BanCache: Add a negative hit for an IP address upon FullConnect.w00t
git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@8540 e03df62e-2008-0410-955e-edbf42e46eb7
2007-11-04Integrate K/Gline into the bancache system by making some modifications to ↵w00t
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
2007-11-04Honking huge commit. Removal of DELETE() template that never worked right anywaybrain
git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@8527 e03df62e-2008-0410-955e-edbf42e46eb7
2007-11-04Avoid code duplication, just call XLine::Apply() rather than retyping all ↵brain
that moronbanner stuff each time git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@8494 e03df62e-2008-0410-955e-edbf42e46eb7
2007-11-04BanCache positive hits should be overridden by E:, thanks Brainw00t
git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@8493 e03df62e-2008-0410-955e-edbf42e46eb7
2007-11-04Hook BanCache up to work on Z:Lines. BanCache is checked first, for positive ↵w00t
hits, users are quit instantly. For negative hits, no checking is done (though we don't have any negative hits just yet). If no hit, zlines are checked -- if user is matched by a Z:, positive bancache entry is inserted. git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@8492 e03df62e-2008-0410-955e-edbf42e46eb7
2007-11-02Tidy up, and make the identifer for a line type be std::string not charbrain
git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@8459 e03df62e-2008-0410-955e-edbf42e46eb7
2007-11-02xline gutting, once more. There is no longer an active_lines vector, and no ↵brain
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
2007-10-28Fix this to pass a Userw00t
git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@8405 e03df62e-2008-0410-955e-edbf42e46eb7
2007-10-25If the connect:limit is 0, dont deny connections for going over itbrain
git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@8360 e03df62e-2008-0410-955e-edbf42e46eb7