summaryrefslogtreecommitdiff
path: root/src/hashcomp.cpp
Commit message (Collapse)AuthorAgeFilesLines
* Header update: 2007 -> 2008Gravatar w00t2008-01-101-1/+1
| | | | git-svn-id: http://svn.inspircd.org/repository/branches/1_1_stable@8695 e03df62e-2008-0410-955e-edbf42e46eb7
* Add some stuff to change how we process a token sepeperated streamGravatar brain2007-08-231-15/+13
| | | | git-svn-id: http://svn.inspircd.org/repository/branches/1_1_stable@7801 e03df62e-2008-0410-955e-edbf42e46eb7
* Fix for irc::sepstream for when there are multiple seperators in a row, do ↵Gravatar brain2007-08-231-0/+5
| | | | | | not drop the rest of the line, strip the seperators git-svn-id: http://svn.inspircd.org/repository/branches/1_1_stable@7799 e03df62e-2008-0410-955e-edbf42e46eb7
* OOPS! We try again, since I'm smoking craq. LF is 0x0a NOT CR.Gravatar peavey2007-07-161-1/+619
| | | | git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@7456 e03df62e-2008-0410-955e-edbf42e46eb7
* 'svn propset -R svn:eol-style CR *' Set to UNIX-style always. Binaries are ↵Gravatar peavey2007-07-161-619/+1
| | | | | | auto skipped by svn. git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@7454 e03df62e-2008-0410-955e-edbf42e46eb7
* We know this worked... i think.Gravatar brain2007-07-021-6/+5
| | | | | | | std::string::reserve might not work the same as this. git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@7420 e03df62e-2008-0410-955e-edbf42e46eb7
* std::string does not need a null terminator..Gravatar special2007-07-021-2/+1
| | | | git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@7419 e03df62e-2008-0410-955e-edbf42e46eb7
* Fixed fencepostGravatar brain2007-06-141-1/+1
| | | | git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@7316 e03df62e-2008-0410-955e-edbf42e46eb7
* Fixes for tokenization oddness with metadata, and weird behaviour of ↵Gravatar brain2007-06-131-0/+24
| | | | | | | | | | std::istringstream where the .str() method returns the whole string from the start to end, even AFTER youve read elements from it! Use irc::tokenstream instead and add some overridden methods to it. This is smarter as it reuses code and allows us to format metadata the same way we format irc data. NOTE: If you run any old servers alongside new servers (this revision) you might see spurious colons on the start of reasons for svsholds, cbans and filters. These can safely be ignored) git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@7283 e03df62e-2008-0410-955e-edbf42e46eb7
* Change some = "" to clear() and some == "" to .empty()Gravatar brain2007-06-091-3/+3
| | | | git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@7263 e03df62e-2008-0410-955e-edbf42e46eb7
* Visual studio's ability to translate tabs to four spaces as default ↵Gravatar brain2007-05-191-5/+5
| | | | | | frustrates and peplexes tabnazi cat. git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@7047 e03df62e-2008-0410-955e-edbf42e46eb7
* Windows support. Tested and working to compile on freebsd and linux. Next ↵Gravatar w00t2007-05-191-58/+18
| | | | | | step is to make sure it actually works in windows too. ;p. Add Burlex to contributors. git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@7043 e03df62e-2008-0410-955e-edbf42e46eb7
* Add trim() to hashcomp to trail leading and traling spaces from std::stringsGravatar peavey2007-04-181-0/+11
| | | | git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@6809 e03df62e-2008-0410-955e-edbf42e46eb7
* This needs some general QA-ing. Add support to new parser (introduced in ↵Gravatar brain2007-04-021-4/+7
| | | | | | 1.1) for empty final params (just the colon) git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@6731 e03df62e-2008-0410-955e-edbf42e46eb7
* Fix the operator== for irc::string -> std::string to be const&, the lack of ↵Gravatar brain2007-03-101-2/+2
| | | | | | const was stopping them being used in certain situations, this saves us a bunch of assign() git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@6643 e03df62e-2008-0410-955e-edbf42e46eb7
* Fixes and optimizationsGravatar brain2007-02-251-4/+4
| | | | git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@6612 e03df62e-2008-0410-955e-edbf42e46eb7
* Add max line length value to modestacker, so that it can clamp the max ↵Gravatar brain2007-02-251-2/+20
| | | | | | length of a composed line to a given size. Defaults to 350 which should be safe with fmode and mode with a server name git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@6609 e03df62e-2008-0410-955e-edbf42e46eb7
* Added sepstream::GetRemaining()Gravatar special2007-02-221-0/+5
| | | | git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@6608 e03df62e-2008-0410-955e-edbf42e46eb7
* Ident fixes,Gravatar brain2007-02-071-23/+0
| | | | | | | | removal of some old craq we dont use. cgiirc optimizations and tidyups git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@6541 e03df62e-2008-0410-955e-edbf42e46eb7
* Fixed (rewrote) m_http_client's URL parsing, it is now more flexible and.. ↵Gravatar special2007-01-201-0/+5
| | | | | | actually works. git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@6416 e03df62e-2008-0410-955e-edbf42e46eb7
* Make irc::spacify take 'const char*' instead of 'char*'Gravatar peavey2006-12-161-1/+1
| | | | git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@6005 e03df62e-2008-0410-955e-edbf42e46eb7
* Still more massive commit fun. Headers in include/ still to be done, else ↵Gravatar w00t2006-12-151-1/+0
| | | | | | that's it. git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@5997 e03df62e-2008-0410-955e-edbf42e46eb7
* Jesus, look who's the commit whore today. More header updates, and removal ↵Gravatar w00t2006-12-151-8/+3
| | | | | | of namespacing. git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@5996 e03df62e-2008-0410-955e-edbf42e46eb7
* Change m_watch to use hash_map rather than map, because of the large number ↵Gravatar brain2006-12-131-0/+8
| | | | | | of entries we deal with it will usually be faster git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@5979 e03df62e-2008-0410-955e-edbf42e46eb7
* irc::string assign(std::string&)Gravatar brain2006-12-111-0/+10
| | | | | | | | | | std::string assign(irc::string&) soooo: irc::string foo = assign(my_std_string); :p git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@5956 e03df62e-2008-0410-955e-edbf42e46eb7
* Fix case insensitive compare (operator ==) between irc::string and ↵Gravatar peavey2006-12-111-2/+2
| | | | | | std::string and vice versa git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@5925 e03df62e-2008-0410-955e-edbf42e46eb7
* I don't know if anything actually uses this, but irc::hex is now *much* more ↵Gravatar special2006-12-021-4/+9
| | | | | | efficient git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@5829 e03df62e-2008-0410-955e-edbf42e46eb7
* Fix a major whoopsie in that class i just added. It must be derived using ↵Gravatar brain2006-11-181-6/+4
| | | | | | virtual methods, because each TYPE of bitmask must have its own static allocation of flags. See the (long winded) comments. git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@5762 e03df62e-2008-0410-955e-edbf42e46eb7
* Reduce size of max number of bytes in a bitfield from a 4 or 8 byte field to ↵Gravatar brain2006-11-181-3/+8
| | | | | | | | | a 1 byte field (unsigned char). This still allows storage of 8*255 bits, which is MORE than enough (for the interested, its 2040 bits) git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@5761 e03df62e-2008-0410-955e-edbf42e46eb7
* Remove some debug, add some comments, throw exception in Get() when passed ↵Gravatar brain2006-11-171-3/+15
| | | | | | an invalid irc::bitfield git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@5759 e03df62e-2008-0410-955e-edbf42e46eb7
* Fix this so it works, passes test case. Provide a method to query for a bit ↵Gravatar brain2006-11-171-2/+18
| | | | | | and to return the total size in bytes of the bitset git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@5758 e03df62e-2008-0410-955e-edbf42e46eb7
* Add irc::dynamicbitmask class. Feel free to take a look and offer ↵Gravatar brain2006-11-171-0/+95
| | | | | | suggestions, as far as i can tell its about as efficient as im going to make it. git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@5757 e03df62e-2008-0410-955e-edbf42e46eb7
* Allow checking of overlapped ports. A bit of sensible thought prevents this ↵Gravatar brain2006-11-111-2/+38
| | | | | | from being O(n^2) git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@5694 e03df62e-2008-0410-955e-edbf42e46eb7
* dont use local vars and lose stateGravatar brain2006-11-111-2/+2
| | | | git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@5692 e03df62e-2008-0410-955e-edbf42e46eb7
* Handle out of range port numbers without stopping parsing the whole setGravatar brain2006-11-111-1/+2
| | | | git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@5691 e03df62e-2008-0410-955e-edbf42e46eb7
* Add irc::portparser, a class to parse port ranges in the form ↵Gravatar brain2006-11-111-0/+50
| | | | | | | | | "6660,6661,6662-6669,7000". Needs testing, watch next few commits. git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@5690 e03df62e-2008-0410-955e-edbf42e46eb7
* Tweak hash generation to make it fasterGravatar brain2006-10-261-2/+2
| | | | git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@5545 e03df62e-2008-0410-955e-edbf42e46eb7
* More stringently fit the RFC1459 BNF diagramsGravatar brain2006-10-221-0/+5
| | | | git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@5528 e03df62e-2008-0410-955e-edbf42e46eb7
* 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