summaryrefslogtreecommitdiff
path: root/src/hashcomp.cpp
AgeCommit message (Collapse)Author
2008-01-10Header update: 2007 -> 2008w00t
git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@8694 e03df62e-2008-0410-955e-edbf42e46eb7
2007-10-22Remove the need for a bunch of the hard coded arrays/hashes by scanning the ↵brain
src/ dir for tag comments, like in modules git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@8307 e03df62e-2008-0410-955e-edbf42e46eb7
2007-08-23Add some stuff to change how we process a token sepeperated streambrain
git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@7800 e03df62e-2008-0410-955e-edbf42e46eb7
2007-08-23Fix for irc::sepstream for when there are multiple seperators in a row, do ↵brain
not drop the rest of the line, strip the seperators git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@7798 e03df62e-2008-0410-955e-edbf42e46eb7
2007-07-16OOPS! We try again, since I'm smoking craq. LF is 0x0a NOT CR.peavey
git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@7456 e03df62e-2008-0410-955e-edbf42e46eb7
2007-07-16'svn propset -R svn:eol-style CR *' Set to UNIX-style always. Binaries are ↵peavey
auto skipped by svn. git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@7454 e03df62e-2008-0410-955e-edbf42e46eb7
2007-07-02We know this worked... i think.brain
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
2007-07-02std::string does not need a null terminator..special
git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@7419 e03df62e-2008-0410-955e-edbf42e46eb7
2007-06-14Fixed fencepostbrain
git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@7316 e03df62e-2008-0410-955e-edbf42e46eb7
2007-06-13Fixes for tokenization oddness with metadata, and weird behaviour of ↵brain
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
2007-06-09Change some = "" to clear() and some == "" to .empty()brain
git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@7263 e03df62e-2008-0410-955e-edbf42e46eb7
2007-05-19Visual studio's ability to translate tabs to four spaces as default ↵brain
frustrates and peplexes tabnazi cat. git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@7047 e03df62e-2008-0410-955e-edbf42e46eb7
2007-05-19Windows support. Tested and working to compile on freebsd and linux. Next ↵w00t
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
2007-04-18Add trim() to hashcomp to trail leading and traling spaces from std::stringspeavey
git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@6809 e03df62e-2008-0410-955e-edbf42e46eb7
2007-04-02This needs some general QA-ing. Add support to new parser (introduced in ↵brain
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
2007-03-10Fix the operator== for irc::string -> std::string to be const&, the lack of ↵brain
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
2007-02-25Fixes and optimizationsbrain
git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@6612 e03df62e-2008-0410-955e-edbf42e46eb7
2007-02-25Add max line length value to modestacker, so that it can clamp the max ↵brain
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
2007-02-22Added sepstream::GetRemaining()special
git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@6608 e03df62e-2008-0410-955e-edbf42e46eb7
2007-02-07Ident fixes,brain
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
2007-01-20Fixed (rewrote) m_http_client's URL parsing, it is now more flexible and.. ↵special
actually works. git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@6416 e03df62e-2008-0410-955e-edbf42e46eb7
2006-12-16Make irc::spacify take 'const char*' instead of 'char*'peavey
git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@6005 e03df62e-2008-0410-955e-edbf42e46eb7
2006-12-15Still more massive commit fun. Headers in include/ still to be done, else ↵w00t
that's it. git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@5997 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-13Change m_watch to use hash_map rather than map, because of the large number ↵brain
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
2006-12-11irc::string assign(std::string&)brain
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
2006-12-11Fix case insensitive compare (operator ==) between irc::string and ↵peavey
std::string and vice versa git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@5925 e03df62e-2008-0410-955e-edbf42e46eb7
2006-12-02I don't know if anything actually uses this, but irc::hex is now *much* more ↵special
efficient git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@5829 e03df62e-2008-0410-955e-edbf42e46eb7
2006-11-18Fix a major whoopsie in that class i just added. It must be derived using ↵brain
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
2006-11-18Reduce size of max number of bytes in a bitfield from a 4 or 8 byte field to ↵brain
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
2006-11-17Remove some debug, add some comments, throw exception in Get() when passed ↵brain
an invalid irc::bitfield git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@5759 e03df62e-2008-0410-955e-edbf42e46eb7
2006-11-17Fix this so it works, passes test case. Provide a method to query for a bit ↵brain
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
2006-11-17Add irc::dynamicbitmask class. Feel free to take a look and offer ↵brain
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
2006-11-11Allow checking of overlapped ports. A bit of sensible thought prevents this ↵brain
from being O(n^2) git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@5694 e03df62e-2008-0410-955e-edbf42e46eb7
2006-11-11dont use local vars and lose statebrain
git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@5692 e03df62e-2008-0410-955e-edbf42e46eb7
2006-11-11Handle out of range port numbers without stopping parsing the whole setbrain
git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@5691 e03df62e-2008-0410-955e-edbf42e46eb7
2006-11-11Add irc::portparser, a class to parse port ranges in the form ↵brain
"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
2006-10-26Tweak hash generation to make it fasterbrain
git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@5545 e03df62e-2008-0410-955e-edbf42e46eb7
2006-10-22More stringently fit the RFC1459 BNF diagramsbrain
git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@5528 e03df62e-2008-0410-955e-edbf42e46eb7
2006-10-03New helper class irc::stringjoiner - it pwns you.brain
git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@5403 e03df62e-2008-0410-955e-edbf42e46eb7
2006-10-02Seems to work nowbrain
git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@5400 e03df62e-2008-0410-955e-edbf42e46eb7
2006-10-02Add more features to modestacker so that we can stack +, -, and ↵brain
parameterless modes git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@5391 e03df62e-2008-0410-955e-edbf42e46eb7
2006-10-02More efficient modestackerbrain
git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@5390 e03df62e-2008-0410-955e-edbf42e46eb7
2006-10-02modestacker class, stacks modes and returns a string list of up to MAXMODES ↵brain
modes git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@5389 e03df62e-2008-0410-955e-edbf42e46eb7
2006-09-19Change type to size_t so that 64 bit platforms dont whine about data loss ↵brain
when casting git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@5303 e03df62e-2008-0410-955e-edbf42e46eb7
2006-09-19Adapt to use std::string::const_iteratorbrain
git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@5302 e03df62e-2008-0410-955e-edbf42e46eb7
2006-09-19Use ++x not x++, to more closely match what stl doesbrain
git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@5299 e03df62e-2008-0410-955e-edbf42e46eb7
2006-09-19ULTRA FAST HASH FUNCTION :pbrain
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
2006-09-17Turn irc::commasepstream into a base class, irc::sepstream, inherit two ↵brain
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
2006-09-10Move Spacify() into irc:: namespace as multiple modules use it nowbrain
git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@5200 e03df62e-2008-0410-955e-edbf42e46eb7