InspIRCd  2.0
 All Classes Namespaces Functions Variables Typedefs Enumerations
Public Member Functions | Public Attributes | List of all members
SnomaskManager Class Reference

#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]
 

Detailed Description

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.

Constructor & Destructor Documentation

SnomaskManager::SnomaskManager ( )

Create a new SnomaskManager

Member Function Documentation

void SnomaskManager::EnableSnomask ( char  letter,
const std::string &  description 
)

Enable a snomask.

Parameters
letterThe 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.
descriptionThe 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 std::string &  text 
)

Write to all users with a given snomask (sent globally)

Parameters
letterThe snomask letter to write to
textThe text to send to the users
void SnomaskManager::WriteGlobalSno ( char  letter,
const char *  text,
  ... 
)

Write to all users with a given snomask (sent globally)

Parameters
letterThe snomask letter to write to
textA 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)

Parameters
letterThe snomask letter to write to
textThe 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)

Parameters
letterThe snomask letter to write to
textA format string containing text to send
...Format arguments

The documentation for this class was generated from the following files: