*/
void ProcessCommand(userrec *user, std::string &cmd);
- /** Insert the default RFC1459 commands into the command hash.
- */
- void SetupCommandTable();
-
/** 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 command was added
*/
bool CreateCommand(command_t *f, void* so_handle = NULL);
+
+ /** Insert the default RFC1459 commands into the command hash.
+ * Ignore any already loaded commands.
+ * @param user User to spool errors to, or if NULL, when an error occurs spool the errors to
+ * stdout then exit with EXIT_STATUS_HANDLER.
+ */
+ void SetupCommandTable(userrec* user);
+
+ /** Translate nicknames in a string into UIDs, based on the TranslationType given.
+ * @param to The translation type to use for the process.
+ * @param source The input string
+ * @param dest The output string, it is safe to pass source and dest as the same variable only for translation type TR_TEXT.
+ * @return returns the number of substitutions made. Will always be 0 or 1 for TR_TEXT and 0..n for other types.
+ */
+ int TranslateUIDs(TranslateType to, const std::string &source, std::string &dest);
};
/** Command handler class for the RELOAD command.