|
|||
|
|||
|
#include <snomasks.h>
Inheritance diagram for SnomaskManager:


Public Member Functions | |
| SnomaskManager (InspIRCd *Instance) | |
| Create a new SnomaskManager. | |
| ~SnomaskManager () | |
| Delete SnomaskManager. | |
| bool | EnableSnomask (char letter, const std::string &description) |
| Enable a snomask. | |
| bool | DisableSnomask (char letter) |
| Disable a snomask. | |
| void | WriteToSnoMask (char letter, const std::string &text) |
| Write to all users with a given snomask. | |
| void | WriteToSnoMask (char letter, const char *text,...) CUSTOM_PRINTF(3 |
| Write to all users with a given snomask. | |
| void void | FlushSnotices () |
| Called once per 5 seconds from the mainloop, this flushes any cached snotices. | |
| bool | IsEnabled (char letter) |
| Check if a snomask is enabled. | |
Private Member Functions | |
| void | SetupDefaults () |
| Set up the default (core available) snomask chars. | |
Private Attributes | |
| InspIRCd * | ServerInstance |
| Creator/owner. | |
| SnoList | SnoMasks |
| Currently active snomask list. | |
Modules and the core can enable and disable snomask characters. If they do, then sending snomasks using these characters becomes possible.
Definition at line 51 of file snomasks.h.
|
|
Create a new SnomaskManager.
Definition at line 20 of file snomasks.cpp. References SetupDefaults(), and SnoMasks. |
|
|
Delete SnomaskManager.
Definition at line 26 of file snomasks.cpp. References SnoMasks. |
|
|
Disable a snomask.
Definition at line 54 of file snomasks.cpp. References SnoMasks. Referenced by ModuleChanCreate::~ModuleChanCreate(), ModuleGlobops::~ModuleGlobops(), ModuleOverride::~ModuleOverride(), and ModuleSeeNicks::~ModuleSeeNicks(). |
|
||||||||||||
|
Enable a snomask.
Definition at line 43 of file snomasks.cpp. References ServerInstance, and SnoMasks. Referenced by ModuleChanCreate::ModuleChanCreate(), ModuleGlobops::ModuleGlobops(), ModuleOverride::ModuleOverride(), ModuleSeeNicks::ModuleSeeNicks(), and SetupDefaults(). |
|
|
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. Definition at line 35 of file snomasks.cpp. References SnoMasks. Referenced by InspIRCd::Run(). |
|
|
Check if a snomask is enabled.
Definition at line 88 of file snomasks.cpp. References SnoMasks. Referenced by User::ProcessNoticeMasks(). |
|
|
Set up the default (core available) snomask chars.
Definition at line 93 of file snomasks.cpp. References EnableSnomask(). Referenced by SnomaskManager(). |
|
||||||||||||||||
|
Write to all users with a given snomask.
Definition at line 76 of file snomasks.cpp. References MAXBUF, and WriteToSnoMask(). |
|
||||||||||||
|
|
Creator/owner.
Definition at line 56 of file snomasks.h. Referenced by EnableSnomask(). |
|
|
Currently active snomask list.
Definition at line 60 of file snomasks.h. Referenced by DisableSnomask(), EnableSnomask(), FlushSnotices(), IsEnabled(), SnomaskManager(), WriteToSnoMask(), and ~SnomaskManager(). |