]> git.netwichtig.de Git - user/henk/code/inspircd.git/blobdiff - include/inspircd.h
m_spanningtree Remove unneeded #includes
[user/henk/code/inspircd.git] / include / inspircd.h
index 2e1cfbd21307270da775b569151136795c1e715b..0ec2c74659f3a25621f865ecef5bc8af64a5418a 100644 (file)
@@ -23,8 +23,7 @@
  */
 
 
-#ifndef INSPIRCD_H
-#define INSPIRCD_H
+#pragma once
 
 #define _FILE_OFFSET_BITS 64
 #ifndef _LARGEFILE_SOURCE
@@ -81,8 +80,7 @@
 #include <bitset>
 #include <set>
 #include <time.h>
-#include "inspircd_config.h"
-#include "inspircd_version.h"
+#include "config.h"
 #include "typedefs.h"
 #include "consolecolors.h"
 
@@ -268,6 +266,27 @@ class serverstats
        }
 };
 
+/** This class manages the generation and transmission of ISUPPORT. */
+class CoreExport ISupportManager
+{
+private:
+       /** The generated lines which are sent to clients. */
+       std::vector<std::string> Lines;
+
+public:
+       /** (Re)build the ISUPPORT vector. */
+       void Build();
+
+       /** Returns the std::vector of ISUPPORT lines. */
+       const std::vector<std::string>& GetLines()
+       {
+               return this->Lines;
+       }
+
+       /** Send the 005 numerics (ISUPPORT) to a user. */
+       void SendTo(LocalUser* user);
+};
+
 DEFINE_HANDLER2(IsNickHandler, bool, const std::string&, size_t);
 DEFINE_HANDLER2(GenRandomHandler, void, char*, size_t);
 DEFINE_HANDLER1(IsIdentHandler, bool, const std::string&);
@@ -372,10 +391,6 @@ class CoreExport InspIRCd
         */
        User* FindUUID(const char *uid);
 
-       /** Build the ISUPPORT string by triggering all modules On005Numeric events
-        */
-       void BuildISupport();
-
        /** Time this ircd was booted
         */
        time_t startup_time;
@@ -473,6 +488,9 @@ class CoreExport InspIRCd
         */
        LocalStringExt OperQuit;
 
+       /** Manages the generation and transmission of ISUPPORT. */
+       ISupportManager ISupport;
+
        /** Get the current time
         * Because this only calls time() once every time around the mainloop,
         * it is much faster than calling time() directly.
@@ -797,10 +815,6 @@ class CoreExport InspIRCd
         */
        void SendWhoisLine(User* user, User* dest, int numeric, const char* format, ...) CUSTOM_PRINTF(5, 6);
 
-       /** Handle /WHOIS
-        */
-       void DoWhois(User* user, User* dest,unsigned long signon, unsigned long idle, const char* nick);
-
        /** Called to check whether a channel restriction mode applies to a user
         * @param User that is attempting some action
         * @param Channel that the action is being performed on
@@ -822,11 +836,6 @@ class CoreExport InspIRCd
         */
        void Cleanup();
 
-       /** Resets the cached max bans value on all channels.
-        * Called by rehash.
-        */
-       void ResetMaxBans();
-
        /** Return a time_t as a human-readable string.
         */
        std::string TimeString(time_t curtime);
@@ -838,10 +847,6 @@ class CoreExport InspIRCd
         */
        int Run();
 
-       /** Adds an extban char to the 005 token.
-        */
-       void AddExtBanChar(char c);
-
        char* GetReadBuffer()
        {
                return this->ReadBuffer;
@@ -871,6 +876,3 @@ class CommandModule : public Module
                return Version(cmd.name, VF_VENDOR|VF_CORE);
        }
 };
-
-#endif
-