X-Git-Url: https://git.netwichtig.de/gitweb/?a=blobdiff_plain;f=include%2Finspircd.h;h=ccb91070ea50471c54697dbf514006a9a100611c;hb=1f38b9adb576580d8e8638fefc5c7cb157f90a5c;hp=22a0bfaa55ab62f4ca9c8abf79f204e85baaf889;hpb=eeabdde6fbd99bc0ba5739c65421a9c20b503f72;p=user%2Fhenk%2Fcode%2Finspircd.git diff --git a/include/inspircd.h b/include/inspircd.h index 22a0bfaa5..ccb91070e 100644 --- a/include/inspircd.h +++ b/include/inspircd.h @@ -49,6 +49,7 @@ CoreExport extern InspIRCd* ServerInstance; #include "config.h" +#include "dynref.h" #include "consolecolors.h" #include "caller.h" #include "cull_list.h" @@ -265,11 +266,6 @@ class CoreExport InspIRCd */ bool DaemonSeed(); - /** Iterate the list of BufferedSocket objects, removing ones which have timed out - * @param TIME the current time - */ - void DoSocketTimeouts(time_t TIME); - /** The current time, updated in the mainloop */ struct timespec TIME; @@ -279,6 +275,11 @@ class CoreExport InspIRCd */ char ReadBuffer[65535]; + /** Check we aren't running as root, and exit if we are + * with exit code EXIT_STATUS_ROOT. + */ + void CheckRoot(); + public: UIDGenerator UIDGen; @@ -471,11 +472,6 @@ class CoreExport InspIRCd */ Channel* FindChan(const std::string &chan); - /** Check we aren't running as root, and exit if we are - * @return Depending on the configuration, this function may never return - */ - void CheckRoot(); - /** Return true if a channel name is valid * @param chname A channel name to verify * @return True if the name is valid @@ -483,7 +479,7 @@ class CoreExport InspIRCd caller1 IsChannel; /** Return true if str looks like a server ID - * @param string to check against + * @param sid string to check against */ static bool IsSID(const std::string& sid); @@ -512,17 +508,16 @@ class CoreExport InspIRCd /** Causes the server to exit immediately with exit code 0. * The status code is required for signal handlers, and ignored. */ + static void QuickExit(int status); - /** Printf-wrapper. - * @param How you want it formatted - * @param ... + /** Formats the input string with the specified arguments. + * @param formatString The string to format + * @param ... A variable number of format arguments. * @return The formatted string */ static const char* Format(const char* formatString, ...) CUSTOM_PRINTF(1, 2); static const char* Format(va_list &vaList, const char* formatString) CUSTOM_PRINTF(2, 0); - static void QuickExit(int status); - /** Return a count of channels on the network * @return The number of channels */ @@ -545,31 +540,6 @@ class CoreExport InspIRCd */ caller1 IsIdent; - /** Add a command to this server's command parser - * @param f A Command command handler object to add - * @throw ModuleException Will throw ModuleExcption if the command already exists - */ - inline void AddCommand(Command *f) - { - Modules->AddService(*f); - } - - /** Send a modechange. - * The parameters provided are identical to that sent to the - * handler for class cmd_mode. - * @param parameters The mode parameters - * @param user The user to send error messages to - */ - void SendMode(const std::vector& parameters, User *user); - - /** Send a modechange and route it to the network. - * The parameters provided are identical to that sent to the - * handler for class cmd_mode. - * @param parameters The mode parameters - * @param user The user to send error messages to - */ - void SendGlobalMode(const std::vector& parameters, User *user); - /** Match two strings using pattern matching, optionally, with a map * to check case against (may be NULL). If map is null, match will be case insensitive. * @param str The literal string to match against @@ -711,14 +681,6 @@ class CoreExport InspIRCd */ caller3 OnCheckExemption; - /** Restart the server. - * This function will not return. If an error occurs, - * it will throw an instance of CoreException. - * @param reason The restart reason to show to all clients - * @throw CoreException An instance of CoreException indicating the error from execv(). - */ - void Restart(const std::string &reason); - /** Prepare the ircd for restart or shutdown. * This function unloads all modules which can be unloaded, * closes all open sockets, and closes the logfile. @@ -732,9 +694,8 @@ class CoreExport InspIRCd /** Begin execution of the server. * NOTE: this function NEVER returns. Internally, * it will repeatedly loop. - * @return The return value for this function is undefined. */ - int Run(); + void Run(); char* GetReadBuffer() { @@ -763,8 +724,3 @@ class CommandModule : public Module return Version(cmd.name, VF_VENDOR|VF_CORE); } }; - -inline void InspIRCd::SendMode(const std::vector& parameters, User* user) -{ - this->Modes->Process(parameters, user); -}