X-Git-Url: https://git.netwichtig.de/gitweb/?a=blobdiff_plain;f=include%2Fcommand_parse.h;h=814cdb27aa9879e606b3039638c586bf2aed8bc7;hb=106043620278abc0755377544cfe012c84de4abc;hp=7ee0e8a079ba4a79f9744f933b273c5798b4b896;hpb=f4472dd6dcdfbb5d4a2a50ddc615644c3b2c8145;p=user%2Fhenk%2Fcode%2Finspircd.git diff --git a/include/command_parse.h b/include/command_parse.h index 7ee0e8a07..814cdb27a 100644 --- a/include/command_parse.h +++ b/include/command_parse.h @@ -23,13 +23,9 @@ typedef std::map SharedObjectList; * call command handlers by name, and chop up comma seperated * parameters into multiple calls. */ -class CoreExport CommandParser : public classbase +class CoreExport CommandParser { private: - /** The creator of this class - */ - InspIRCd* ServerInstance; - /** Parameter buffer */ std::vector para; @@ -47,10 +43,6 @@ class CoreExport CommandParser : public classbase */ bool ProcessCommand(User *user, std::string &cmd); - /** Removes a command if the sources match. Used as a helper for - * safe hash_map delete while iter in RemoveCommands(const char* source). - */ - void RemoveCommand(nspace::hash_map::iterator safei, Module* source); public: @@ -61,7 +53,7 @@ class CoreExport CommandParser : public classbase /** Default constructor. * @param Instance The creator of this class */ - CommandParser(InspIRCd* Instance); + CommandParser(); /** Calls the handler for a given command. * @param commandname The command to find. This should be in uppercase. @@ -149,16 +141,15 @@ class CoreExport CommandParser : public classbase */ void DoLines(User* current, bool one_only = false); - /** Remove all commands relating to module 'source'. - * @param source A module which has introduced new commands - */ - void RemoveCommands(Module* source); - /** Add a new command to the commands hash * @param f The new Command to add to the list * @return True if the command was added */ - bool CreateCommand(Command *f); + bool AddCommand(Command *f); + + /** Removes a command. + */ + void RemoveCommand(Command* x); /** Translate nicknames in a string into UIDs, based on the TranslationType given. * @param to The translation type to use for the process.