-
- Module* GetIOHook(int port);
- bool AddIOHook(int port, Module* iomod);
- bool DelIOHook(int port);
- Module* GetIOHook(InspSocket* is);
- bool AddIOHook(Module* iomod, InspSocket* is);
- bool DelIOHook(InspSocket* is);
-
- static std::string GetFullProgDir();
+
+ void ValidateHostname(const char* p, const std::string &tag, const std::string &val);
+
+ void ValidateIP(const char* p, const std::string &tag, const std::string &val, bool wild);
+
+ void ValidateNoSpaces(const char* p, const std::string &tag, const std::string &val);
+
+ /** Get a pointer to the module which has hooked the given BufferedSocket class.
+ * @parameter port Port number
+ * @return Returns a pointer to the hooking module, or NULL
+ */
+ Module* GetIOHook(BufferedSocket* is);
+
+ /** Hook a module to an BufferedSocket class, so that it can receive notifications
+ * of low-level socket activity.
+ * @param iomod The module to hook to the socket
+ * @param is The BufferedSocket to attach to
+ * @return True if the hook was successful.
+ */
+ bool AddIOHook(Module* iomod, BufferedSocket* is);
+
+ /** Delete a module hook from an BufferedSocket.
+ * @param is The BufferedSocket to detatch from.
+ * @return True if the unhook was successful
+ */
+ bool DelIOHook(BufferedSocket* is);
+
+ /** Returns the fully qualified path to the inspircd directory
+ * @return The full program directory
+ */
+ std::string GetFullProgDir();
+
+ /** Returns true if a directory is valid (within the modules directory).
+ * @param dirandfile The directory and filename to check
+ * @return True if the directory is valid
+ */