summaryrefslogtreecommitdiff
path: root/src/wildcard.cpp
AgeCommit message (Collapse)Author
2008-09-20Roll back core matcher to the 1.1 design, which doesnt fail various unit testsbrain
git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@10564 e03df62e-2008-0410-955e-edbf42e46eb7
2008-08-28Rename lowermap to rfc_case_insensitive_map, add case_sensitive_map.. adjust ↵w00t
files to not pass lowermap directly. git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@10337 e03df62e-2008-0410-955e-edbf42e46eb7
2008-08-26formatting..peavey
git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@10303 e03df62e-2008-0410-955e-edbf42e46eb7
2008-08-26Iteration 5 of wildcard matching. Fixes broken matching for certain ↵peavey
conditions reported by MacGyver. git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@10302 e03df62e-2008-0410-955e-edbf42e46eb7
2008-08-22Actually, we did manage to make a faster match than znc, when casemapping is ↵w00t
taken into account. Hooray. git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@10222 e03df62e-2008-0410-955e-edbf42e46eb7
2008-08-22There is no breakage here *jedi mind trick*w00t
git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@10219 e03df62e-2008-0410-955e-edbf42e46eb7
2008-08-22Match with the right args at least..w00t
git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@10218 e03df62e-2008-0410-955e-edbf42e46eb7
2008-08-22Match conversion stuff.w00t
git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@10216 e03df62e-2008-0410-955e-edbf42e46eb7
2008-08-21match() is no longer a function+no header, now a static method of InspIRCd ↵w00t
class, blah blah blah. Also rip out the 1.2 matcher, as it was slow, and replace it with one adapted from znc, which happens to be a tiny bit faster than 1.1's (and the fastest I've seen so far that works properly) git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@10212 e03df62e-2008-0410-955e-edbf42e46eb7
2008-08-17Fix missing bounds checks in wildcard.cpp causing crash in bug #590 and relatedbrain
Add test cases for wildcards to pick this up in future regression testing plus a bunch of other edge cases git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@10147 e03df62e-2008-0410-955e-edbf42e46eb7
2008-07-29Remove last vestige of libircdfoo, by changing tag into a single ↵w00t
identifier marking object as requiring compilation into a .o (minor commit) git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@10076 e03df62e-2008-0410-955e-edbf42e46eb7
2008-05-12Fix wildcard matching in win32, seems that incrementing an iterator ↵brain
dereferences it internally on win32, so iter++ when iter == container.end() drops an assert. YES, an assert. No fucking throw, making it a fucking pain to debug (no bt on assert, program exits) git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@9706 e03df62e-2008-0410-955e-edbf42e46eb7
2008-05-09Add test suites for edge cases and in the process, spot a crash in the new ↵brain
code and fix it (empty mask in the match() functions makes it bomb) git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@9682 e03df62e-2008-0410-955e-edbf42e46eb7
2008-05-09Convert CIDR matching and wildcard matching to operate on std::stringsbrain
git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@9681 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
2007-10-23Oops: Fix one version of overrided match() always being case sensitive..w00t
git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@8310 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-27Remove more unnecessary header trafficw00t
git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@7887 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-05-21Same tweak, againbrain
git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@7095 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-01-14g++ is picky about default params with overloadingbrain
git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@6324 e03df62e-2008-0410-955e-edbf42e46eb7
2007-01-14Add alias:matchcase config setting (per-alias, determines wether to match ↵brain
case on format string) and ability for case sensitive match() git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@6319 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-11-19Fix all the _FORTIFY_SOURCE warnings except "punned pointer".brain
We CANNOT fix this, as it is the recommended (and only) way to dlsym a symbol from a .so file. git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@5770 e03df62e-2008-0410-955e-edbf42e46eb7
2006-08-30Wahhhhhhhhhhhh bwahahaha. Mass commit to tidy up tons of messy include listsbrain
git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@5080 e03df62e-2008-0410-955e-edbf42e46eb7
2006-08-18Move lowermap[] into a pre-initialised const array in hashcomp.h,brain
get rid of InspIRCd::MakeLowertab() git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@4951 e03df62e-2008-0410-955e-edbf42e46eb7
2006-08-11Just to mess with om's head, remove helperfuncs.h from everywherebrain
git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@4900 e03df62e-2008-0410-955e-edbf42e46eb7
2006-08-11Move whowas into InspIRCdbrain
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
2006-08-10Move the socket functions like insp_ntoa into their own namespace. They ↵brain
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
2006-08-06Allow nick!ident@ and ident@ portions in a CIDR mask if given, use match() ↵brain
without CIDR against that portion. This allows for CIDR operhosts while still matching idents (AND CIDR CHANNEL BANS) git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@4739 e03df62e-2008-0410-955e-edbf42e46eb7
2006-08-06Support CIDR, CIDR zline, /oper and CIDR <connect> tags. NOTE: With CIDR ↵brain
oper, ident field is not supported (yet) git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@4732 e03df62e-2008-0410-955e-edbf42e46eb7
2006-07-31Remove match/wildcmp wrapper which just casts from const char* to char*, do ↵brain
the cast within wildcmp and rename wildcmp to match. Remove other casts by casting directly to unsigned char* first time around git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@4607 e03df62e-2008-0410-955e-edbf42e46eb7
2006-02-11Our optimizations missed a possibility :pbrain
git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@3166 e03df62e-2008-0410-955e-edbf42e46eb7
2006-02-05Fixed two unneccessary strlcpy's in the wildcard matching that just were ↵brain
there to lowercase it... we can do this inplace git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@3100 e03df62e-2008-0410-955e-edbf42e46eb7
2006-01-15Updated copyrights in headers etc using perl inplace editbrain
git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@2795 e03df62e-2008-0410-955e-edbf42e46eb7
2005-05-15Changed to use __single_client_alloc, faster on most systems in a single threadbrain
Specified namespace std in *all* files git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@1404 e03df62e-2008-0410-955e-edbf42e46eb7
2005-05-15Moved a ton of functions into helperfuncs.h to speed up recompilesbrain
git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@1383 e03df62e-2008-0410-955e-edbf42e46eb7
2005-04-27Added faster wildcard checking routinesbrain
git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@1213 e03df62e-2008-0410-955e-edbf42e46eb7
2005-04-27Optimized stuffbrain
git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@1212 e03df62e-2008-0410-955e-edbf42e46eb7
2005-04-11Added getrlimit/setrlimit to set process limits to allow a core dumpbrain
Removed some logging from wildcard.cpp git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@1040 e03df62e-2008-0410-955e-edbf42e46eb7
2005-04-09Fixed matchingbrain
git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@1022 e03df62e-2008-0410-955e-edbf42e46eb7
2005-03-25Added implementation of strlcpy and strlcat for systems that dont have itbrain
git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@905 e03df62e-2008-0410-955e-edbf42e46eb7
2004-09-11Security audit based on RATS outputbrain
git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@855 e03df62e-2008-0410-955e-edbf42e46eb7
2004-05-16Updated header commentsbrain
git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@816 e03df62e-2008-0410-955e-edbf42e46eb7
2004-04-24Added a bunch of xline stuff and added qline spport for /nick and svsnickbrain
git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@713 e03df62e-2008-0410-955e-edbf42e46eb7
2003-07-22STL namespace fixesrandomdan
git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@176 e03df62e-2008-0410-955e-edbf42e46eb7
2003-01-23Initial revisionbrain
git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@132 e03df62e-2008-0410-955e-edbf42e46eb7