*/
-#ifndef INSPIRCD_H
-#define INSPIRCD_H
+#pragma once
#define _FILE_OFFSET_BITS 64
#ifndef _LARGEFILE_SOURCE
#include <bitset>
#include <set>
#include <time.h>
-#include "inspircd_config.h"
-#include "inspircd_version.h"
+#include "config.h"
#include "typedefs.h"
#include "consolecolors.h"
}
};
+/** 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&);
*/
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;
*/
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.
*/
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
*/
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);
*/
int Run();
- /** Adds an extban char to the 005 token.
- */
- void AddExtBanChar(char c);
-
char* GetReadBuffer()
{
return this->ReadBuffer;
return Version(cmd.name, VF_VENDOR|VF_CORE);
}
};
-
-#endif
-