|
|||
|
|||
|
#include <mode.h>
Inheritance diagram for ModeWatcher:


Public Member Functions | |
| ModeWatcher (InspIRCd *Instance, char modeletter, ModeType type) | |
| The constructor initializes the mode and the mode type. | |
| virtual | ~ModeWatcher () |
| The default destructor does nothing. | |
| char | GetModeChar () |
| Get the mode character being watched. | |
| ModeType | GetModeType () |
| Get the mode type being watched. | |
| virtual bool | BeforeMode (User *source, User *dest, Channel *channel, std::string ¶meter, bool adding, ModeType type, bool servermode=false) |
| Before the mode character is processed by its handler, this method will be called. | |
| virtual void | AfterMode (User *source, User *dest, Channel *channel, const std::string ¶meter, bool adding, ModeType type, bool servermode=false) |
| After the mode character has been processed by the ModeHandler, this method will be called. | |
Protected Attributes | |
| InspIRCd * | ServerInstance |
| Creator/owner pointer. | |
| char | mode |
| The mode letter this class is watching. | |
| ModeType | m_type |
| The mode type being watched (user or channel). | |
To use ModeWatcher, derive a class from it, and attach it to the mode using Server::AddModeWatcher and Server::DelModeWatcher. A ModeWatcher will be called both before and after the mode change.
Definition at line 340 of file mode.h.
|
||||||||||||||||
|
The constructor initializes the mode and the mode type.
|
|
|
The default destructor does nothing.
|
|
||||||||||||||||||||||||||||||||
|
After the mode character has been processed by the ModeHandler, this method will be called.
|
|
||||||||||||||||||||||||||||||||
|
Before the mode character is processed by its handler, this method will be called.
Reimplemented in BanRedirect, and InvisibleDeOper. |
|
|
Get the mode character being watched.
Definition at line 228 of file mode.cpp. References mode. Referenced by ModeParser::AddModeWatcher(), and ModeParser::DelModeWatcher(). |
|
|
Get the mode type being watched.
Definition at line 233 of file mode.cpp. References m_type. Referenced by ModeParser::AddModeWatcher(), and ModeParser::DelModeWatcher(). |
|
|
The mode type being watched (user or channel).
Definition at line 354 of file mode.h. Referenced by GetModeType(). |
|
|
The mode letter this class is watching.
Definition at line 350 of file mode.h. Referenced by GetModeChar(). |
|
|
Creator/owner pointer.
Definition at line 346 of file mode.h. Referenced by InvisibleDeOper::BeforeMode(), and BanRedirect::BeforeMode(). |