- void Read(bool bail, userrec* user);
-
- /** Read a file into a file_cache object
- */
- bool ReadFile(file_cache &F, const char* fname);
-
- /** Load 'filename' into 'target', with the new config parser everything is parsed into
- * tag/key/value at load-time rather than at read-value time.
- */
- bool LoadConf(ConfigDataHash &target, const char* filename, std::ostringstream &errorstream);
- bool LoadConf(ConfigDataHash &target, const std::string &filename, std::ostringstream &errorstream);
-
- /* Both these return true if the value existed or false otherwise */
-
- /* Writes 'length' chars into 'result' as a string */
- bool ConfValue(ConfigDataHash &target, const char* tag, const char* var, int index, char* result, int length);
- bool ConfValue(ConfigDataHash &target, const std::string &tag, const std::string &var, int index, std::string &result);
-
- /* Tries to convert the value to an integer and write it to 'result' */
- bool ConfValueInteger(ConfigDataHash &target, const char* tag, const char* var, int index, int &result);
- bool ConfValueInteger(ConfigDataHash &target, const std::string &tag, const std::string &var, int index, int &result);
-
- /* Returns true if the value exists and has a true value, false otherwise */
- bool ConfValueBool(ConfigDataHash &target, const char* tag, const char* var, int index);
- bool ConfValueBool(ConfigDataHash &target, const std::string &tag, const std::string &var, int index);
-
- /* Returns the number of occurences of tag in the config file */
- int ConfValueEnum(ConfigDataHash &target, const char* tag);
- int ConfValueEnum(ConfigDataHash &target, const std::string &tag);
-
- /* Returns the numbers of vars inside the index'th 'tag in the config file */
- int ConfVarEnum(ConfigDataHash &target, const char* tag, int index);
- int ConfVarEnum(ConfigDataHash &target, const std::string &tag, int index);
-
- Module* GetIOHook(int port);
- bool AddIOHook(int port, Module* iomod);
- bool DelIOHook(int port);
-
- static std::string GetFullProgDir(char** argv, int argc);
- static bool DirValid(const char* dirandfile);
- static char* CleanFilename(char* name);
+ void Read();
+
+ /** Apply configuration changes from the old configuration.
+ */
+ void Apply(ServerConfig* old, const std::string &useruid);
+ void ApplyModules(User* user);
+
+ void Fill();
+
+ /** Returns true if the given string starts with a windows drive letter
+ */
+ static bool StartsWithWindowsDriveLetter(const std::string& path);
+
+ bool ApplyDisabledCommands(const std::string& data);
+
+ /** Clean a filename, stripping the directories (and drives) from string.
+ * @param name Directory to tidy
+ * @return The cleaned filename
+ */
+ static const char* CleanFilename(const char* name);
+
+ /** Check if a file exists.
+ * @param file The full path to a file
+ * @return True if the file exists and is readable.
+ */