summaryrefslogtreecommitdiff
path: root/include/inspircd.h
diff options
context:
space:
mode:
authorAttila Molnar <attilamolnar@hush.com>2013-04-11 15:11:31 -0700
committerAttila Molnar <attilamolnar@hush.com>2013-04-11 15:11:31 -0700
commit1858feabd342636df0b52780c978979b4e049fc3 (patch)
treec00ab92b6ff6d002e6c40909587b146ba5e45612 /include/inspircd.h
parent295b3e7ba15a228948358bd6f23591a9cb5bf5a8 (diff)
parent5c29c53f651fb0c513a50c9396e08ba340a6d2bf (diff)
Merge pull request #487 from SaberUK/master+better-isupport-api
Convert ISUPPORT to use a map instead of a string.
Diffstat (limited to 'include/inspircd.h')
-rw-r--r--include/inspircd.h32
1 files changed, 24 insertions, 8 deletions
diff --git a/include/inspircd.h b/include/inspircd.h
index df2ad1095..f61d48529 100644
--- a/include/inspircd.h
+++ b/include/inspircd.h
@@ -267,6 +267,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&);
@@ -371,10 +392,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;
@@ -472,6 +489,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.
@@ -828,10 +848,6 @@ class CoreExport InspIRCd
*/
int Run();
- /** Adds an extban char to the 005 token.
- */
- void AddExtBanChar(char c);
-
char* GetReadBuffer()
{
return this->ReadBuffer;