|
|||
|
|||
|


Public Member Functions | |
| ModuleServProtectMode (InspIRCd *Me) | |
| virtual | ~ModuleServProtectMode () |
| virtual Version | GetVersion () |
| Returns the version number of a Module. | |
| virtual void | OnWhois (User *src, User *dst) |
| Called whenever a /WHOIS is performed on a local user. | |
| virtual int | OnRawMode (User *user, Channel *chan, const char mode, const std::string ¶m, bool adding, int pcnt, bool servermode) |
| Called whenever a mode character is processed. | |
| virtual int | OnKill (User *src, User *dst, const std::string &reason) |
| Called when a client is disconnected by KILL. | |
| virtual int | OnUserPreKick (User *src, User *dst, Channel *c, const std::string &reason) |
| Called whenever a user is about to be kicked. | |
| virtual int | OnWhoisLine (User *src, User *dst, int &numeric, std::string &text) |
| Called whenever a line of WHOIS output is sent to a user. | |
Private Attributes | |
| ServProtectMode * | bm |
Definition at line 41 of file m_servprotect.cpp.
|
|
Definition at line 46 of file m_servprotect.cpp. References ModeParser::AddMode(), ModuleManager::Attach(), bm, I_OnKill, I_OnRawMode, I_OnUserPreKick, I_OnWhois, I_OnWhoisLine, InspIRCd::Modes, InspIRCd::Modules, and Module::ServerInstance. |
|
|
Definition at line 58 of file m_servprotect.cpp. References bm, ModeParser::DelMode(), InspIRCd::Modes, and Module::ServerInstance. |
|
|
Returns the version number of a Module. The method should return a Version object with its version information assigned via Version::Version Reimplemented from Module. Definition at line 64 of file m_servprotect.cpp. References API_VERSION, and VF_COMMON. |
|
||||||||||||||||
|
Called when a client is disconnected by KILL. If a client is killed by a server, e.g. a nickname collision or protocol error, source is NULL. Return 1 from this function to prevent the kill, and 0 from this function to allow it as normal. If you prevent the kill no output will be sent to the client, it is down to your module to generate this information. NOTE: It is NOT advisable to stop kills which originate from servers or remote users. If you do so youre risking race conditions, desyncs and worse!
Reimplemented from Module. Definition at line 105 of file m_servprotect.cpp. References InspIRCd::Config, User::IsModeSet(), ServerConfig::Network, User::nick, Module::ServerInstance, InspIRCd::SNO, User::WriteNumeric(), and SnomaskManager::WriteToSnoMask(). |
|
||||||||||||||||||||||||||||||||
|
Called whenever a mode character is processed. Return 1 from this function to block the mode character from being processed entirely.
Reimplemented from Module. Definition at line 77 of file m_servprotect.cpp. References ACR_DENY, InspIRCd::Config, InspIRCd::FindNick(), IS_LOCAL, User::IsModeSet(), InspIRCd::Modes, ModeParser::ModeString(), Channel::name, ServerConfig::Network, User::nick, User::server, Module::ServerInstance, InspIRCd::ULine(), and User::WriteNumeric(). |
|
||||||||||||||||||||
|
Called whenever a user is about to be kicked. Returning a value of 1 from this function stops the process immediately, causing no output to be sent to the user by the core. If you do this you must produce your own numerics, notices etc.
Reimplemented from Module. Definition at line 119 of file m_servprotect.cpp. References User::IsModeSet(), Channel::name, User::nick, and User::WriteNumeric(). |
|
||||||||||||
|
Called whenever a /WHOIS is performed on a local user. The source parameter contains the details of the user who issued the WHOIS command, and the dest parameter contains the information of the user they are whoising.
Reimplemented from Module. Definition at line 69 of file m_servprotect.cpp. References InspIRCd::Config, User::IsModeSet(), ServerConfig::Network, User::nick, InspIRCd::SendWhoisLine(), and Module::ServerInstance. |
|
||||||||||||||||||||
|
Called whenever a line of WHOIS output is sent to a user. You may change the numeric and the text of the output by changing the values numeric and text, but you cannot change the user the numeric is sent to. You may however change the user's User values.
Reimplemented from Module. Definition at line 130 of file m_servprotect.cpp. References User::IsModeSet(). |
|
|
Definition at line 44 of file m_servprotect.cpp. Referenced by ModuleServProtectMode(), and ~ModuleServProtectMode(). |