From 13aeb82ad2462d3eb2952365fd944c8837d55ea8 Mon Sep 17 00:00:00 2001 From: brain Date: Sun, 3 Sep 2006 00:58:09 +0000 Subject: Proper error checking on loading cmd_*.so files git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@5122 e03df62e-2008-0410-955e-edbf42e46eb7 --- include/command_parse.h | 20 +++++++++++++++++++- 1 file changed, 19 insertions(+), 1 deletion(-) (limited to 'include/command_parse.h') diff --git a/include/command_parse.h b/include/command_parse.h index a9c1e26c8..a0d27be17 100644 --- a/include/command_parse.h +++ b/include/command_parse.h @@ -55,10 +55,20 @@ class CommandParser : public classbase */ void SetupCommandTable(); - void FindSym(void** v, void* h); + /** Finds the init_command symbol in a .so file + * @param v A function pointer to be initialized + * @param h A valid shared object handle + * @return True if the symbol could be found + */ + bool FindSym(void** v, void* h); + /** A list of core-implemented modes and their shared object handles + */ SharedObjectList RFCCommands; + /** Load a command from a shared object on disk. + * @param name The shared object to load (without path) + */ void LoadCommand(const char* name); public: @@ -66,6 +76,14 @@ class CommandParser : public classbase */ command_table cmdlist; + /** Reload a core command. + * This will only reload commands implemented by the core, + * to reload a modular command, you must reload that module. + * @param cmd The command to reload. This will cause the shared + * object which implements this command to be closed, and then reloaded. + * @return True if the command was reloaded, false if it could not be found + * or another error occured + */ bool ReloadCommand(const char* cmd); /** Default constructor. -- cgit v1.2.3