summaryrefslogtreecommitdiff
path: root/include/command_parse.h
AgeCommit message (Collapse)Author
2009-10-13Remove Command and ModeHandler objects in their destructors; fixes possible ↵danieldg
pointer leak if a module was not careful when triggering exceptions in its constructor git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@11872 e03df62e-2008-0410-955e-edbf42e46eb7
2009-09-26Remove InspIRCd* parameters and fieldsdanieldg
git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@11763 e03df62e-2008-0410-955e-edbf42e46eb7
2009-09-03Change cmd_*.so to use the Module object APIdanieldg
Create Module* objects for each command, and load them like modules. This unifies the external API for modules. Library directory is now deprecated: all modules are located in a single module directory. Header files for each command are no longer needed; remove. This also fixes two potential segfaults in m_spanningtree. git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@11668 e03df62e-2008-0410-955e-edbf42e46eb7
2009-09-02Add Module* creator to Command and ModeHandlerdanieldg
git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@11631 e03df62e-2008-0410-955e-edbf42e46eb7
2009-09-02Valgrind cleanup: Add RemoveRFCCommands() to dlclose() and delete the core ↵danieldg
commands git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@11613 e03df62e-2008-0410-955e-edbf42e46eb7
2009-09-02Include explicit routing information in Command, will replace CMD_LOCALONLY ↵danieldg
return value git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@11601 e03df62e-2008-0410-955e-edbf42e46eb7
2009-09-02Replace std::deque with std::vector in spanningtree and related modulesdanieldg
git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@11593 e03df62e-2008-0410-955e-edbf42e46eb7
2009-04-23rollback r11326, we're going to make vc9 the officially supported windows ↵peavey
build methods since the few of us doing win dev can't keep up maintaining the others. git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@11327 e03df62e-2008-0410-955e-edbf42e46eb7
2009-04-23Heres the beef so farbrain
git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@11326 e03df62e-2008-0410-955e-edbf42e46eb7
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