summaryrefslogtreecommitdiff
path: root/src/hashcomp.cpp
Commit message (Collapse)AuthorAgeFilesLines
* New helper class irc::stringjoiner - it pwns you.Gravatar brain2006-10-031-0/+27
| | | | git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@5403 e03df62e-2008-0410-955e-edbf42e46eb7
* Seems to work nowGravatar brain2006-10-021-2/+3
| | | | git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@5400 e03df62e-2008-0410-955e-edbf42e46eb7
* Add more features to modestacker so that we can stack +, -, and ↵Gravatar brain2006-10-021-1/+17
| | | | | | parameterless modes git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@5391 e03df62e-2008-0410-955e-edbf42e46eb7
* More efficient modestackerGravatar brain2006-10-021-5/+5
| | | | git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@5390 e03df62e-2008-0410-955e-edbf42e46eb7
* modestacker class, stacks modes and returns a string list of up to MAXMODES ↵Gravatar brain2006-10-021-0/+28
| | | | | | modes git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@5389 e03df62e-2008-0410-955e-edbf42e46eb7
* Change type to size_t so that 64 bit platforms dont whine about data loss ↵Gravatar brain2006-09-191-1/+1
| | | | | | when casting git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@5303 e03df62e-2008-0410-955e-edbf42e46eb7
* Adapt to use std::string::const_iteratorGravatar brain2006-09-191-2/+2
| | | | git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@5302 e03df62e-2008-0410-955e-edbf42e46eb7
* Use ++x not x++, to more closely match what stl doesGravatar brain2006-09-191-1/+1
| | | | git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@5299 e03df62e-2008-0410-955e-edbf42e46eb7
* ULTRA FAST HASH FUNCTION :pGravatar brain2006-09-191-10/+10
| | | | | | | | I went and looked how hash_fun.h in STL did it, to save a string copy :p (it's deceptively simple too) git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@5298 e03df62e-2008-0410-955e-edbf42e46eb7
* Turn irc::commasepstream into a base class, irc::sepstream, inherit two ↵Gravatar brain2006-09-171-5/+5
| | | | | | classes from it: irc::commasepstream and irc::spacesepstream, to be used for the most common token seperators "," and " " git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@5266 e03df62e-2008-0410-955e-edbf42e46eb7
* Move Spacify() into irc:: namespace as multiple modules use it nowGravatar brain2006-09-101-0/+11
| | | | git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@5200 e03df62e-2008-0410-955e-edbf42e46eb7
* I'll give you ##TOAST, :pGravatar brain2006-09-091-1/+6
| | | | git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@5189 e03df62e-2008-0410-955e-edbf42e46eb7
* We now have a test module that can dump someones certificate information: ↵Gravatar brain2006-09-031-0/+18
| | | | | | /sslinfo <nick> git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@5125 e03df62e-2008-0410-955e-edbf42e46eb7
* Wahhhhhhhhhhhh bwahahaha. Mass commit to tidy up tons of messy include listsGravatar brain2006-08-301-4/+0
| | | | git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@5080 e03df62e-2008-0410-955e-edbf42e46eb7
* Move trailing space stripping to only strip from non-last-item values (dont ask)Gravatar brain2006-08-281-5/+6
| | | | git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@5049 e03df62e-2008-0410-955e-edbf42e46eb7
* Move lowermap[] into a pre-initialised const array in hashcomp.h,Gravatar brain2006-08-181-20/+1
| | | | | | | get rid of InspIRCd::MakeLowertab() git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@4951 e03df62e-2008-0410-955e-edbf42e46eb7
* Just to mess with om's head, remove helperfuncs.h from everywhereGravatar brain2006-08-111-1/+1
| | | | git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@4900 e03df62e-2008-0410-955e-edbf42e46eb7
* Move whowas into InspIRCdGravatar brain2006-08-111-11/+25
| | | | | | | Tidy up lowermap extern (for now, we cant do much but have this as extern) git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@4876 e03df62e-2008-0410-955e-edbf42e46eb7
* Make it more readableGravatar brain2006-08-101-2/+2
| | | | git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@4853 e03df62e-2008-0410-955e-edbf42e46eb7
* Much faster hash<string> for case-insensitive hashing, combined copy and ↵Gravatar brain2006-08-101-3/+8
| | | | | | lowercase operation git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@4852 e03df62e-2008-0410-955e-edbf42e46eb7
* Move strlower into nspace namespace where hash<std::string> livesGravatar brain2006-08-101-0/+18
| | | | git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@4850 e03df62e-2008-0410-955e-edbf42e46eb7
* Move the socket functions like insp_ntoa into their own namespace. They ↵Gravatar brain2006-08-101-0/+1
| | | | | | arent really sensible to put into a class, but namespacing them out discourages developers from directly using them without explicitly saing 'using irc::sockets::BindPorts' or whatever first. Some functions such as insp_ntoa are already 'exposed' by headers that use them so 'using irc::sockets::inet_ntoa' isnt required. git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@4828 e03df62e-2008-0410-955e-edbf42e46eb7
* Remove trailing spaces from input in irc::ircsepstreamGravatar brain2006-08-061-0/+5
| | | | git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@4759 e03df62e-2008-0410-955e-edbf42e46eb7
* The IPV6 stuff compiles now, with compile-correct ipv6 code. I dont know if ↵Gravatar brain2006-08-011-0/+7
| | | | | | this works yet. git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@4611 e03df62e-2008-0410-955e-edbf42e46eb7
* Move to entirely using insp_sockaddr and insp_inaddr for socket stuff, first ↵Gravatar brain2006-08-011-3/+3
| | | | | | step on the road to ipv6 support git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@4609 e03df62e-2008-0410-955e-edbf42e46eb7
* Created new class irc::commasepstream.Gravatar brain2006-07-161-0/+28
| | | | | | | | Will read comma seperated lists and works identically to irc::tokenstream It's re-entrant so we can run two of them together for JOIN git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@4412 e03df62e-2008-0410-955e-edbf42e46eb7
* const the std::string reference in tokenstream's constructorGravatar om2006-07-161-2/+1
| | | | git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@4400 e03df62e-2008-0410-955e-edbf42e46eb7
* Improved this a lotGravatar brain2006-07-161-29/+3
| | | | git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@4398 e03df62e-2008-0410-955e-edbf42e46eb7
* This should be faster, we read it like a stream now with GetToken until ↵Gravatar brain2006-07-161-15/+40
| | | | | | | | | GetToken returns "". The optimizations done by gcc means theres only one std::string constructor call per token, which is mmm yum. git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@4397 e03df62e-2008-0410-955e-edbf42e46eb7
* irc::tokenstream is a token parser which using std::string and std::vector ↵Gravatar brain2006-07-161-0/+44
| | | | | | | | | | | | | | | | builds a list of tokens using irc parsing rules. e.g.: :arse PRIVMSG #chan :foo bar baz becomes a[0] = ":arse", a[1] = "PRIVMSG", a[2] = "#chan", a[3] = "foo bar baz". *** SOMEONE *** needs to optimize this or at least verify its neatness (without making it total craq and unreadable). Feel free to mess with my code. Any optimizations you make, run them against the COMMENTED OUT TEST SUITE at the top of main() in src/inspircd.cpp and ensure ALL output is the same with no crashes. (note: if you comment out and build with the test suite, all inspircd will do is output test data and exit!) git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@4396 e03df62e-2008-0410-955e-edbf42e46eb7
* Removed GCC2 checks as we havent supported gcc2 for yearsGravatar brain2006-07-151-8/+0
| | | | git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@4394 e03df62e-2008-0410-955e-edbf42e46eb7
* Holy christ that was a LOT OF SPACES. TABS, USE THEM, LOVE THEM, APPRECIATE ↵Gravatar w00t2006-04-061-8/+8
| | | | | | THEM - we now have no stupid spaces. This was mostly a mass find/replace, so some indentation may be stuffed. Minor issue, though. git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@3838 e03df62e-2008-0410-955e-edbf42e46eb7
* Tidyup: (unsigned) cast to more explicit (unsigned char)Gravatar brain2006-03-211-6/+6
| | | | git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@3746 e03df62e-2008-0410-955e-edbf42e46eb7
* Changed to unsigned char to get rid of warningsGravatar brain2006-03-091-2/+2
| | | | git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@3598 e03df62e-2008-0410-955e-edbf42e46eb7
* lowertab -> lowermapGravatar brain2006-03-091-2/+2
| | | | git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@3597 e03df62e-2008-0410-955e-edbf42e46eb7
* Improved strhashcomp with no allocationsGravatar brain2006-03-091-8/+11
| | | | git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@3596 e03df62e-2008-0410-955e-edbf42e46eb7
* AIEEE fucking overloaded operatorsGravatar brain2006-02-191-1/+1
| | | | git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@3263 e03df62e-2008-0410-955e-edbf42e46eb7
* More tweaksGravatar brain2006-02-191-2/+2
| | | | git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@3262 e03df62e-2008-0410-955e-edbf42e46eb7
* TweaksGravatar brain2006-02-191-4/+4
| | | | git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@3261 e03df62e-2008-0410-955e-edbf42e46eb7
* Added + and == operators between std::string and irc::string.Gravatar brain2006-02-191-0/+20
| | | | | | | Its too late at night to wrestle with the = operator, this can wait for another time. git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@3260 e03df62e-2008-0410-955e-edbf42e46eb7
* Add operators >> and << for irc::string and i/ostreams. m_cban utilises thisGravatar om2006-02-031-0/+14
| | | | git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@3066 e03df62e-2008-0410-955e-edbf42e46eb7
* Improved inaddr_hashcompGravatar brain2006-02-031-7/+1
| | | | git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@3040 e03df62e-2008-0410-955e-edbf42e46eb7
* Updated copyrights in headers etc using perl inplace editGravatar brain2006-01-151-1/+1
| | | | git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@2795 e03df62e-2008-0410-955e-edbf42e46eb7
* Started on -Wall - safe compileGravatar brain2005-05-301-7/+7
| | | | git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@1570 e03df62e-2008-0410-955e-edbf42e46eb7
* Fixed lengthsGravatar brain2005-05-291-0/+1
| | | | git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@1547 e03df62e-2008-0410-955e-edbf42e46eb7
* Fixed fd_Setsize in cygwinGravatar brain2005-05-281-1/+1
| | | | git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@1541 e03df62e-2008-0410-955e-edbf42e46eb7
* Changed to use __single_client_alloc, faster on most systems in a single threadGravatar brain2005-05-151-0/+2
| | | | | | | Specified namespace std in *all* files git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@1404 e03df62e-2008-0410-955e-edbf42e46eb7
* Updated to keep lowermap const within hashcomp.cppGravatar brain2005-05-151-1/+1
| | | | | | | Updated docs git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@1401 e03df62e-2008-0410-955e-edbf42e46eb7
* Updated strhashcomp to use irc::string internally rather than a combination ↵Gravatar brain2005-05-151-6/+3
| | | | | | of strlower and strcasecmp git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@1400 e03df62e-2008-0410-955e-edbf42e46eb7
* Moved StrHashComp and InAddr_HashComp into the irc:: namespaceGravatar brain2005-05-151-2/+2
| | | | git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@1398 e03df62e-2008-0410-955e-edbf42e46eb7