|
|||
|
|||
|


Public Member Functions | |
| ModuleChanProtect (InspIRCd *Me) | |
| virtual void | OnUserKick (User *source, User *user, Channel *chan, const std::string &reason, bool &silent) |
| Called whenever a user is kicked. | |
| virtual void | OnUserPart (User *user, Channel *channel, std::string &partreason, bool &silent) |
| Called when a user parts a channel. | |
| void | LoadSettings () |
| virtual int | OnUserPreJoin (User *user, Channel *chan, const char *cname, std::string &privs, const std::string &keygiven) |
| Called whenever a user is about to join a channel, before any processing is done. | |
| virtual void | OnPostJoin (User *user, Channel *channel) |
| Called after a user joins a channel Identical to OnUserJoin, but called immediately afterwards, when any linking module has seen the join. | |
| virtual int | OnAccessCheck (User *source, User *dest, Channel *channel, int access_type) |
| Called before an action which requires a channel privilage check. | |
| virtual | ~ModuleChanProtect () |
| virtual Version | GetVersion () |
| Returns the version number of a Module. | |
Private Attributes | |
| bool | FirstInGetsFounder |
| char | QPrefix |
| char | APrefix |
| bool | DeprivSelf |
| bool | DeprivOthers |
| bool | booting |
| ChanProtect * | cp |
| ChanFounder * | cf |
Definition at line 288 of file m_chanprotect.cpp.
|
|
Definition at line 302 of file m_chanprotect.cpp. References ModeParser::AddMode(), APrefix, ModuleManager::Attach(), booting, cf, cp, DeprivOthers, DeprivSelf, I_OnAccessCheck, I_OnPostJoin, I_OnUserKick, I_OnUserPart, I_OnUserPreJoin, LoadSettings(), InspIRCd::Modes, InspIRCd::Modules, QPrefix, and Module::ServerInstance. |
|
|
Definition at line 478 of file m_chanprotect.cpp. References cf, cp, 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 486 of file m_chanprotect.cpp. References API_VERSION, VF_COMMON, and VF_VENDOR. |
|
|
Definition at line 339 of file m_chanprotect.cpp. References APrefix, cf, Conf, cp, DeprivOthers, DeprivSelf, ModeParser::FindPrefix(), FirstInGetsFounder, InspIRCd::Modes, QPrefix, ConfigReader::ReadFlag(), ConfigReader::ReadValue(), and Module::ServerInstance. Referenced by ModuleChanProtect(). |
|
||||||||||||||||||||
|
Called before an action which requires a channel privilage check.
This function is called before many functions which check a users status on a channel, for example before opping a user, deopping a user, kicking a user, etc. There are several values for access_type which indicate for what reason access is being checked. These are:
Reimplemented from Module. Definition at line 389 of file m_chanprotect.cpp. References AC_DEHALFOP, AC_DEOP, AC_DEVOICE, AC_KICK, ACR_ALLOW, ACR_DEFAULT, ACR_DENY, DeprivOthers, DeprivSelf, Extensible::GetExt(), Channel::name, User::nick, User::server, Module::ServerInstance, InspIRCd::ULine(), and User::WriteNumeric(). |
|
||||||||||||
|
Called after a user joins a channel Identical to OnUserJoin, but called immediately afterwards, when any linking module has seen the join.
Reimplemented from Module. Definition at line 375 of file m_chanprotect.cpp. References FirstInGetsFounder, Channel::GetUserCounter(), Channel::name, User::nick, and User::WriteServ(). |
|
||||||||||||||||||||||||
|
Called whenever a user is kicked. If this method is called, the kick is already underway and cannot be prevented, so to prevent a kick, please use Module::OnUserPreKick instead of this method.
Reimplemented from Module. Definition at line 325 of file m_chanprotect.cpp. References Channel::name, and Extensible::Shrink(). |
|
||||||||||||||||||||
|
Called when a user parts a channel. The details of the leaving user are available to you in the parameter User *user, and the details of the channel they have left is available in the variable Channel *channel
Reimplemented from Module. Definition at line 332 of file m_chanprotect.cpp. References Channel::name, and Extensible::Shrink(). |
|
||||||||||||||||||||||||
|
Called whenever a user is about to join a channel, before any processing is done. 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. This is useful for modules which may want to mimic +b, +k, +l etc. Returning -1 from this function forces the join to be allowed, bypassing restrictions such as banlists, invite, keys etc. IMPORTANT NOTE! If the user joins a NEW channel which does not exist yet, OnUserPreJoin will be called BEFORE the channel record is created. This will cause Channel* chan to be NULL. There is very little you can do in form of processing on the actual channel record at this point, however the channel NAME will still be passed in char* cname, so that you could for example implement a channel blacklist or whitelist, etc.
Reimplemented from Module. Definition at line 364 of file m_chanprotect.cpp. References FirstInGetsFounder, and QPrefix. |
|
|
Definition at line 293 of file m_chanprotect.cpp. Referenced by LoadSettings(), and ModuleChanProtect(). |
|
|
Definition at line 296 of file m_chanprotect.cpp. Referenced by ModuleChanProtect(). |
|
|
Definition at line 298 of file m_chanprotect.cpp. Referenced by LoadSettings(), ModuleChanProtect(), and ~ModuleChanProtect(). |
|
|
Definition at line 297 of file m_chanprotect.cpp. Referenced by LoadSettings(), ModuleChanProtect(), and ~ModuleChanProtect(). |
|
|
Definition at line 295 of file m_chanprotect.cpp. Referenced by LoadSettings(), ModuleChanProtect(), and OnAccessCheck(). |
|
|
Definition at line 294 of file m_chanprotect.cpp. Referenced by LoadSettings(), ModuleChanProtect(), and OnAccessCheck(). |
|
|
Definition at line 291 of file m_chanprotect.cpp. Referenced by LoadSettings(), OnPostJoin(), and OnUserPreJoin(). |
|
|
Definition at line 292 of file m_chanprotect.cpp. Referenced by LoadSettings(), ModuleChanProtect(), and OnUserPreJoin(). |