summaryrefslogtreecommitdiff
path: root/src/users.cpp
AgeCommit message (Collapse)Author
2007-01-07DNS caching stuff (almost done)brain
git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@6252 e03df62e-2008-0410-955e-edbf42e46eb7
2007-01-07DNS Stuff - this wont work right yet, it will soon (tm)brain
git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@6250 e03df62e-2008-0410-955e-edbf42e46eb7
2007-01-07Move all /WHOWAS related out of core and into cmd_whowas.peavey
git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@6249 e03df62e-2008-0410-955e-edbf42e46eb7
2007-01-07Add TTL stuff to dns system (pass it to inherited objects)brain
git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@6247 e03df62e-2008-0410-955e-edbf42e46eb7
2007-01-03Fix lusers breakage introduced by latest set of optimizationsbrain
git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@6219 e03df62e-2008-0410-955e-edbf42e46eb7
2007-01-03SirOlli gets credit for this fix, because he was the only one willing to ↵brain
work with us till we cracked it :p git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@6218 e03df62e-2008-0410-955e-edbf42e46eb7
2007-01-02Fix for crash in desync of whowas lists on rehash. Also less mem leakage on ↵peavey
adding to whowas. git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@6217 e03df62e-2008-0410-955e-edbf42e46eb7
2006-12-31Cache invalidation in the wrong place, fixes FHOST remote host change bugbrain
git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@6187 e03df62e-2008-0410-955e-edbf42e46eb7
2006-12-30Fix broken cloaking introduced by last commit (we need to invalidate the ↵brain
cache after setting the new string, not before) git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@6181 e03df62e-2008-0410-955e-edbf42e46eb7
2006-12-30Cached GetFullRealHost etc.brain
git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@6179 e03df62e-2008-0410-955e-edbf42e46eb7
2006-12-30Tweaks to instantiate less stuff when writing to a bunch of usersbrain
git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@6172 e03df62e-2008-0410-955e-edbf42e46eb7
2006-12-30Tons of optimization of WriteChannel, WriteChannelWithServ, WriteCommon etc, ↵brain
dont call userrec::GetFullHost or snprintf for every item, call it just once. Turns O(n) calls for every write into O(~1) calls per write. Remove some debug from the socketengines which makes debugging hard on large channels (write availability message) git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@6171 e03df62e-2008-0410-955e-edbf42e46eb7
2006-12-30Add unregistered user counter, this may also fix the (minor) m_conn_lusers ↵brain
shows current connection as unregged git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@6170 e03df62e-2008-0410-955e-edbf42e46eb7
2006-12-24Fix a bug in whowas that could desync list.peavey
git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@6091 e03df62e-2008-0410-955e-edbf42e46eb7
2006-12-24Fix loop when quitting multiple users (this is probably whats eating cpu)brain
git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@6084 e03df62e-2008-0410-955e-edbf42e46eb7
2006-12-23Hash rehashing changebrain
git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@6080 e03df62e-2008-0410-955e-edbf42e46eb7
2006-12-22Remove useless debugbrain
git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@6062 e03df62e-2008-0410-955e-edbf42e46eb7
2006-12-22Refactor connect allow/deny linesbrain
git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@6061 e03df62e-2008-0410-955e-edbf42e46eb7
2006-12-21Proper fix for CS server crash, forgot to delete chanrec* from users ↵peavey
chanlist on PurgeEmptyChannels() git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@6052 e03df62e-2008-0410-955e-edbf42e46eb7
2006-12-21Crude hotfix to what's been crashing chatspikepeavey
git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@6051 e03df62e-2008-0410-955e-edbf42e46eb7
2006-12-19When we handle a READ event on a user, return immediately.brain
This is because the read event may remove the user, in which case the !empty and quituser check below will address invalid data! git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@6049 e03df62e-2008-0410-955e-edbf42e46eb7
2006-12-16Add stuff so that the core catches CoreException properlybrain
git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@6017 e03df62e-2008-0410-955e-edbf42e46eb7
2006-12-15Jesus, look who's the commit whore today. More header updates, and removal ↵w00t
of namespacing. git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@5996 e03df62e-2008-0410-955e-edbf42e46eb7
2006-12-15Try harder to make sure the ERROR string gets sent when closing a connectionbrain
git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@5994 e03df62e-2008-0410-955e-edbf42e46eb7
2006-12-15Cleaning up irrelevent stuff in channels.cppbrain
git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@5993 e03df62e-2008-0410-955e-edbf42e46eb7
2006-12-14Remove misc debugbrain
git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@5991 e03df62e-2008-0410-955e-edbf42e46eb7
2006-12-14Fix silly bug of the day.brain
User was only getting a userrec::chans entry added if they had any privelages on the channel. If they werent opped, voiced, or halfopped on join, no entry in the hash. Silly brain now added a: user->chans[Ptr] = 0; :p git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@5990 e03df62e-2008-0410-955e-edbf42e46eb7
2006-12-14Change how users are quit if they get a write error during the things they do.brain
Instead of QuitUser inside FlushWriteBuffer() (potentially *UNSAFE*), go back to using SetWriteError(), but to ensure we dont get a cascade of bad write events from the socket engine, QuitUser the user before returning in userrec::HandleEvent, after we can gaurantee ALL other reading or writing is done. git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@5987 e03df62e-2008-0410-955e-edbf42e46eb7
2006-12-14Refactor userrec::chans.brain
Old way: A vector of ucrec, MAXCHANS in size by default populated by NULLS, so you have to scan the vector to find an empty slot when joining a user, parting a user etc New way: std::map<chanrec*, char> (the char holds their basic core permissions on the channel [voice, halfop, op]) This increases speed a ton, and removes some wtf-age. git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@5986 e03df62e-2008-0410-955e-edbf42e46eb7
2006-12-14Refactoring:brain
1) Chain together a resize and an append, to improve the buffer read efficiency 2) eliminate a const char* pointer by doing it purely with string, saving a data copy 3) use iterators rather than ints and vector::size() for spooling motd and rules files to users 4) change a usage of !length() to empty() to make it more readable git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@5985 e03df62e-2008-0410-955e-edbf42e46eb7
2006-12-13Improve the way 005 ISUPPORT is sent to users when they connect, cache it in ↵brain
a much more sane format which is much simpler to spool to them git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@5978 e03df62e-2008-0410-955e-edbf42e46eb7
2006-12-12Improve how we handle ELINEs on connect, turn O(2n) into O(n) (thats the ↵brain
best we can do with g/k/z/q checks for now :( ) git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@5968 e03df62e-2008-0410-955e-edbf42e46eb7
2006-12-12New clone counting mechanism (this isnt tested yet)brain
git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@5967 e03df62e-2008-0410-955e-edbf42e46eb7
2006-12-10Correctly handle write eventsbrain
git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@5920 e03df62e-2008-0410-955e-edbf42e46eb7
2006-12-10Fix bug found on barafranca, where quitting the user causes a cascade of ↵brain
error state notifications without actually quitting the user until much later, wasting cpu time git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@5919 e03df62e-2008-0410-955e-edbf42e46eb7
2006-12-03Make this look less insane :Pw00t
git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@5835 e03df62e-2008-0410-955e-edbf42e46eb7
2006-11-16Fix /whois on users with lots, and lots of channels (see /whois idleserv). ↵w00t
Was broken by the indroduction of OnWhoisLine stuff. git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@5755 e03df62e-2008-0410-955e-edbf42e46eb7
2006-11-14Tons of tweaks to the config stuff for the corebrain
git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@5744 e03df62e-2008-0410-955e-edbf42e46eb7
2006-11-13use --iter instead of iter-- in prunewhowaspeavey
git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@5738 e03df62e-2008-0410-955e-edbf42e46eb7
2006-11-13fix for bug #173, unsafe delete while iteratingpeavey
git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@5737 e03df62e-2008-0410-955e-edbf42e46eb7
2006-11-13Fix PruneWhoWas to actually work right on rehash. Add debug output to ↵peavey
whowas. More code comments to whowas. git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@5734 e03df62e-2008-0410-955e-edbf42e46eb7
2006-11-13add <whowas> config option to control whowas behaviour. *may break*peavey
git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@5731 e03df62e-2008-0410-955e-edbf42e46eb7
2006-11-12Fix off-by-one error in userrec::ChangeDisplayedHost, some hosts were truncatedom
git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@5709 e03df62e-2008-0410-955e-edbf42e46eb7
2006-11-06Apply patch for bug #165 (compile warning for users.cpp) by peaveydkspecial
git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@5660 e03df62e-2008-0410-955e-edbf42e46eb7
2006-11-06Fix IPv4 resolution, spank satmd if you were affected by thisw00t
git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@5659 e03df62e-2008-0410-955e-edbf42e46eb7
2006-11-05Added time syncing! This is fairly simple - servers exchange timestamps and ↵special
use the lowest - but should get rid of the annoying bounces for those of us who can't depend on ntpd. git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@5649 e03df62e-2008-0410-955e-edbf42e46eb7
2006-11-04Merge peaveys patch, tracker #162brain
git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@5642 e03df62e-2008-0410-955e-edbf42e46eb7
2006-11-03Fix compile error, and spank Brainw00t
git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@5634 e03df62e-2008-0410-955e-edbf42e46eb7
2006-11-02When we get an event on a userrec of EVENT_ERROR, and errornum is 0, send ↵brain
the error message "EOF from client" rather than using strerror and getting: Quit (Unknown error: 0) git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@5633 e03df62e-2008-0410-955e-edbf42e46eb7
2006-11-02Please in the future everyone: DO NOT submit patches via nopaste. Nopaste is ↵brain
not designed for this, and mangles your patch so we cant apply it. gzip it instead! git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@5632 e03df62e-2008-0410-955e-edbf42e46eb7