summaryrefslogtreecommitdiff
path: root/include/command_parse.h
AgeCommit message (Collapse)Author
2009-03-15Update all wiki links to point to the new wiki. This was done automatically ↵psychon
with the following command, only .Makefile.inc got some indent fixups by hand. for file in $(find -type f -and -not -path '*/.svn/*' -and -not -name '*.so') ; do sed -e 's#http://www.inspircd.org/wiki#http://wiki.inspircd.org#' -e 's#http://wiki.inspircd.org/index.php/#http://wiki.inspircd.org/#' -i $file ; done git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@11223 e03df62e-2008-0410-955e-edbf42e46eb7
2009-03-07Include explicit parameter list in ProtocolInterface::SendModedanieldg
Also leave the strings split into deque, there's no need to pack it into a string just to unpack it during the translate. git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@11181 e03df62e-2008-0410-955e-edbf42e46eb7
2009-03-06Construct explicit parameter type list for MODE parametersdanieldg
Previously, we used TR_SPACENICKLIST on the parameters. This worked only because usually, if anything in the list parsed as a nick, then it was a nick. However, some modes like +k and +g allow free-form text, which could also resolve as a nick. Add extra parameters to allow modes to specify their TranslateType, defaulting to TR_TEXT. This fixes bug #757, found by Taros git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@11180 e03df62e-2008-0410-955e-edbf42e46eb7
2009-02-14Nuke trailing spacespeavey
git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@11105 e03df62e-2008-0410-955e-edbf42e46eb7
2009-01-02Update copyrights for 2009.w00t
git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@10932 e03df62e-2008-0410-955e-edbf42e46eb7
2008-12-15Fix naming convention to be consistant. (cmd_ -> Command)w00t
git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@10891 e03df62e-2008-0410-955e-edbf42e46eb7
2008-11-02This was never supposed to be invoked on /rehash, only startup.. so move it ↵w00t
to startup only. Also remove (redundant) user arg. git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@10792 e03df62e-2008-0410-955e-edbf42e46eb7
2008-06-21Change the value of number of secs in a year to be 31557600 for Duration() ↵brain
with 'y' value. This is 365.25 days slightly more accurate than 365 days. git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@9930 e03df62e-2008-0410-955e-edbf42e46eb7
2008-06-06m_abbreviation completed. :)brain
git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@9845 e03df62e-2008-0410-955e-edbf42e46eb7
2008-05-04Fix unused HandleServer to use new system too, and update comments to match apibrain
git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@9609 e03df62e-2008-0410-955e-edbf42e46eb7
2008-05-04Conversion of command handler params from "const char* const* parameters, ↵brain
int pcnt" to "const std::vector<std::string>& parameters". All of core is converted, but cant test it till the modules are converted. IMPORTANT: The mode parser public calls have had to be tweaked a bit to also use the string vector. Note that this makes a LOT of our core a bit messy and paves the way to convert a lot of stuff from the mess of .c_str() calls to using std::string params directly. git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@9608 e03df62e-2008-0410-955e-edbf42e46eb7
2008-04-20Fix RemoveCommands to remove all commands (this function had some really odd ↵brain
removal logic?) git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@9554 e03df62e-2008-0410-955e-edbf42e46eb7
2008-02-20Wheee, mass commit! this adds const stafety, throwing a compile error if ↵brain
anyone does: "parameters[n] = blahvar;" in a command handler etc. where they REALLY SHOULD NOT fuck with the value and should copy the pointer. git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@8971 e03df62e-2008-0410-955e-edbf42e46eb7
2008-02-13Slight API tweak. Change Command to take char * instead of char in it's ↵w00t
constructor, this avoids confusion/generates a compile error if someone mixes up flags with number of params, instead of working but not working as expected in a weird manner. git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@8918 e03df62e-2008-0410-955e-edbf42e46eb7
2008-02-03Clear up header insanityw00t
git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@8808 e03df62e-2008-0410-955e-edbf42e46eb7
2008-02-02Move some stuff to usermanager, remove a little header insanity, remove ↵w00t
trace because it's still less useful than a chocolate fireman. git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@8790 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-11-04Remove some unnecessary headers from places, commit working BanCacheManager ↵w00t
skeleton. Work in progress, ignore it for now. Doesn't do anything, either. git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@8487 e03df62e-2008-0410-955e-edbf42e46eb7
2007-10-21*untested* command buffering/penaltybrain
git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@8250 e03df62e-2008-0410-955e-edbf42e46eb7
2007-10-15In the grand tradition of huge fucking commits:w00t
- chanrec -> Channel - userrec -> User Enjoy. git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@8204 e03df62e-2008-0410-955e-edbf42e46eb7
2007-10-15class command_t -> class Command. Whey :Dw00t
git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@8203 e03df62e-2008-0410-955e-edbf42e46eb7
2007-10-14Make error messages on failure to load command more usefulbrain
git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@8194 e03df62e-2008-0410-955e-edbf42e46eb7
2007-08-27Add documentation commentsbrain
git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@7894 e03df62e-2008-0410-955e-edbf42e46eb7
2007-08-27More translation stuffbrain
git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@7888 e03df62e-2008-0410-955e-edbf42e46eb7
2007-08-11Allow rehash to attempt to load missing (and new) lib/cmd_*.so files, to ↵brain
allow users to fix an emergency situation you can create by trying to reload a corrupt .so without needing a restart git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@7712 e03df62e-2008-0410-955e-edbf42e46eb7
2007-08-11Provide error output on failure to load a core command; to console on ↵brain
startup, and to user on /reload git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@7708 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-06-17Commentsbrain
git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@7373 e03df62e-2008-0410-955e-edbf42e46eb7
2007-06-05Add comment to what the table here is forbrain
git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@7238 e03df62e-2008-0410-955e-edbf42e46eb7
2007-06-05Refactored InspIRCd::Duration(). The leetcode now lives!brain
git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@7237 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
2006-12-17Make RemoveCommand private.peavey
git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@6030 e03df62e-2008-0410-955e-edbf42e46eb7
2006-12-17Invented safe delete-while-itering for hash_map.peavey
git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@6029 e03df62e-2008-0410-955e-edbf42e46eb7
2006-12-15And now, just to force you to recompile the *whole* ircd.. updated headers ↵w00t
on the headers. :p git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@5998 e03df62e-2008-0410-955e-edbf42e46eb7
2006-11-03Revert special's sqloper change, nice try but only half a biscuit.brain
With the old fix, it would echo out all the oper failure notices first then try again, annoying all the opers. The new version uses a CommandParser method i added, to again use OnPreCommand, halt the /oper command, but after doing the sql lookup call the original handler of the OPER command with the original user and pass, so the original handler handles the definitive failure message. DAMNIT STOP COMMITTING git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@5636 e03df62e-2008-0410-955e-edbf42e46eb7
2006-09-13If inspircd crashes in std::string destructor in ↵brain
CommandParser::ProcessCommand, take away all std::string's to make the bug manifest elsewhere, so maybe we can spot it git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@5232 e03df62e-2008-0410-955e-edbf42e46eb7
2006-09-06Finish off the fix for bug #136 (a biggie for such a simple thing)brain
git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@5151 e03df62e-2008-0410-955e-edbf42e46eb7
2006-09-06Command result codes. This isnt finished yet, still got to do most of the ↵brain
modules, and alter CallCommandHandler git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@5149 e03df62e-2008-0410-955e-edbf42e46eb7
2006-09-03Proper error checking on loading cmd_*.so filesbrain
git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@5122 e03df62e-2008-0410-955e-edbf42e46eb7
2006-09-03Add /RELOAD and move cmd_mode into its own command.brain
/RELOAD is the only thing you cant reload (ahem) git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@5119 e03df62e-2008-0410-955e-edbf42e46eb7
2006-09-03Auto loading of commands as shared objects via dlsym (very lightweight ↵brain
interface, just expects a command_t* pointer) git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@5118 e03df62e-2008-0410-955e-edbf42e46eb7
2006-08-30Remove a ton of <typeinfo>, <iostream>, <sstream> etc that we usually never usebrain
git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@5081 e03df62e-2008-0410-955e-edbf42e46eb7
2006-08-12Document command_parse.h and CommandParser classbrain
git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@4903 e03df62e-2008-0410-955e-edbf42e46eb7
2006-08-10So much stuff changed in this one, i forgot most of it.brain
Oh yeah, main thing is ModeHandler and ModeWatcher classes now take an InspIRCd* to their constructor git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@4858 e03df62e-2008-0410-955e-edbf42e46eb7
2006-07-16Created new class irc::commasepstream.brain
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
2006-07-16mass tidyup, change A LOT of stuff to const char** which was char** (such as ↵brain
parameters to commands in handlers) which makes the new lineparser work neater with no casts. This also removes tons of casts from other locations (all in all, ive added 2 casts and removed almost a hundred) git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@4403 e03df62e-2008-0410-955e-edbf42e46eb7
2006-07-16MAJOR tidy of line parser, some parts rewritten and major chunks removedbrain
git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@4402 e03df62e-2008-0410-955e-edbf42e46eb7
2006-07-10Inherit just about everything from classbasebrain
git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@4299 e03df62e-2008-0410-955e-edbf42e46eb7
2006-03-11Missed some stuffbrain
git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@3664 e03df62e-2008-0410-955e-edbf42e46eb7