InspIRCd
2.0
|
#include <snomasks.h>
Public Member Functions | |
SnomaskManager () | |
void | EnableSnomask (char letter, const std::string &description) |
void | WriteToSnoMask (char letter, const std::string &text) |
void | WriteToSnoMask (char letter, const char *text,...) CUSTOM_PRINTF(3 |
void void | WriteGlobalSno (char letter, const std::string &text) |
void | WriteGlobalSno (char letter, const char *text,...) CUSTOM_PRINTF(3 |
void void | FlushSnotices () |
Public Attributes | |
Snomask | masks [26] |
Snomask manager handles routing of SNOMASK (usermode +s) messages to opers. Modules and the core can enable and disable snomask characters. If they do, then sending snomasks using these characters becomes possible.
SnomaskManager::SnomaskManager | ( | ) |
Create a new SnomaskManager
void SnomaskManager::EnableSnomask | ( | char | letter, |
const std::string & | description | ||
) |
Enable a snomask.
letter | The snomask letter to enable. Once enabled, server notices may be routed to users with this letter in their list, and users may add this letter to their list. |
description | The descriptive text sent along with any server notices, at the start of the notice, e.g. "GLOBOPS". |
void SnomaskManager::FlushSnotices | ( | ) |
Called once per 5 seconds from the mainloop, this flushes any cached snotices. The way the caching works is as follows: Calls to WriteToSnoMask write to a cache, if the call is the same as it was for the previous call, then a count is incremented. If it is different, the previous message it just sent normally via NOTICE (with count if > 1) and the new message is cached. This acts as a sender in case the number of notices is not particularly significant, in order to keep notices going out.
void SnomaskManager::WriteGlobalSno | ( | char | letter, |
const char * | text, | ||
... | |||
) |
Write to all users with a given snomask (sent globally)
letter | The snomask letter to write to |
text | A format string containing text to send |
... | Format arguments |
void SnomaskManager::WriteGlobalSno | ( | char | letter, |
const std::string & | text | ||
) |
Write to all users with a given snomask (sent globally)
letter | The snomask letter to write to |
text | The text to send to the users |
void SnomaskManager::WriteToSnoMask | ( | char | letter, |
const char * | text, | ||
... | |||
) |
Write to all users with a given snomask (local server only)
letter | The snomask letter to write to |
text | A format string containing text to send |
... | Format arguments |
void SnomaskManager::WriteToSnoMask | ( | char | letter, |
const std::string & | text | ||
) |
Write to all users with a given snomask (local server only)
letter | The snomask letter to write to |
text | The text to send to the users |