diff options
author | brain <brain@e03df62e-2008-0410-955e-edbf42e46eb7> | 2006-09-03 00:58:09 +0000 |
---|---|---|
committer | brain <brain@e03df62e-2008-0410-955e-edbf42e46eb7> | 2006-09-03 00:58:09 +0000 |
commit | 13aeb82ad2462d3eb2952365fd944c8837d55ea8 (patch) | |
tree | eacc77f40fb81fef2a57c496f4c6c991b788bd66 /include/command_parse.h | |
parent | 1c4abcfda1c8673b96d2ba11e379e9b7457f749f (diff) |
Proper error checking on loading cmd_*.so files
git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@5122 e03df62e-2008-0410-955e-edbf42e46eb7
Diffstat (limited to 'include/command_parse.h')
-rw-r--r-- | include/command_parse.h | 20 |
1 files changed, 19 insertions, 1 deletions
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. |