|
|||
|
|||
|


Public Member Functions | |
| ModuleOverride (InspIRCd *Me) | |
| virtual void | OnRehash (User *user, const std::string ¶meter) |
| Called on rehash. | |
| virtual void | OnPostCommand (const std::string &command, const std::vector< std::string > ¶meters, User *user, CmdResult result, const std::string &original_line) |
| Called after any command has been executed. | |
| virtual void | On005Numeric (std::string &output) |
| Called when a 005 numeric is about to be output. | |
| virtual bool | CanOverride (User *source, const char *token) |
| virtual int | OnLocalTopicChange (User *source, Channel *channel, const std::string &topic) |
| Called whenever a topic is changed by a local user. | |
| virtual int | OnUserPreKick (User *source, User *user, Channel *chan, const std::string &reason) |
| Called whenever a user is about to be kicked. | |
| virtual int | OnAccessCheck (User *source, User *dest, Channel *channel, int access_type) |
| Called before an action which requires a channel privilage check. | |
| 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 | ~ModuleOverride () |
| virtual Version | GetVersion () |
| Returns the version number of a Module. | |
Private Attributes | |
| override_t | overrides |
| bool | RequireKey |
| bool | NoisyOverride |
| bool | OverriddenMode |
| int | OverOps |
| int | OverDeops |
| int | OverVoices |
| int | OverDevoices |
| int | OverHalfops |
| int | OverDehalfops |
Definition at line 20 of file m_override.cpp.
|
|
Definition at line 30 of file m_override.cpp. References ModuleManager::Attach(), SnomaskManager::EnableSnomask(), I_On005Numeric, I_OnAccessCheck, I_OnLocalTopicChange, I_OnPostCommand, I_OnRehash, I_OnUserPreJoin, I_OnUserPreKick, InspIRCd::Modules, OnRehash(), OverDehalfops, OverDeops, OverDevoices, OverHalfops, OverOps, OverriddenMode, OverVoices, Module::ServerInstance, and InspIRCd::SNO. |
|
|
Definition at line 316 of file m_override.cpp. References SnomaskManager::DisableSnomask(), Module::ServerInstance, and InspIRCd::SNO. |
|
||||||||||||
|
Definition at line 91 of file m_override.cpp. References User::oper, and overrides. Referenced by OnAccessCheck(), OnLocalTopicChange(), OnUserPreJoin(), and OnUserPreKick(). |
|
|
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 321 of file m_override.cpp. References API_VERSION, and VF_VENDOR. |
|
|
Called when a 005 numeric is about to be output. The module should modify the 005 numeric if needed to indicate its features.
Reimplemented from Module. Definition at line 86 of file m_override.cpp. |
|
||||||||||||||||||||
|
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 138 of file m_override.cpp. References AC_DEHALFOP, AC_DEOP, AC_DEVOICE, AC_HALFOP, AC_OP, AC_VOICE, ACR_ALLOW, ACR_DEFAULT, CanOverride(), Channel::GetStatus(), Channel::HasUser(), IS_OPER, OverDehalfops, OverDeops, OverDevoices, OverHalfops, OverOps, OverriddenMode, OverVoices, STATUS_HOP, and STATUS_OP. |
|
||||||||||||||||
|
Called whenever a topic is changed by a local user. Return 1 to deny the topic change, 0 to check details on the change, -1 to let it through with no checks
Reimplemented from Module. Definition at line 107 of file m_override.cpp. References CanOverride(), Channel::GetStatus(), Channel::HasUser(), IS_OPER, Channel::IsModeSet(), Channel::name, Module::ServerInstance, InspIRCd::SNO, STATUS_HOP, and SnomaskManager::WriteToSnoMask(). |
|
||||||||||||||||||||||||
|
Called after any command has been executed. This event occurs for all registered commands, wether they are registered in the core, or another module, but it will not occur for invalid commands (e.g. ones which do not exist within the command table). The result code returned by the command handler is provided.
Reimplemented from Module. Definition at line 64 of file m_override.cpp. References CMD_SUCCESS, ConvToStr(), ModeParser::GetLastParse(), InspIRCd::Modes, User::nick, OverDehalfops, OverDeops, OverDevoices, OverHalfops, OverOps, OverriddenMode, OverVoices, Module::ServerInstance, InspIRCd::SNO, and SnomaskManager::WriteToSnoMask(). |
|
||||||||||||
|
Called on rehash. This method is called prior to a /REHASH or when a SIGHUP is received from the operating system. You should use it to reload any files so that your module keeps in step with the rest of the application. If a parameter is given, the core has done nothing. The module receiving the event can decide if this parameter has any relevence to it.
Reimplemented from Module. Definition at line 42 of file m_override.cpp. References Conf, NoisyOverride, overrides, ConfigReader::ReadFlag(), ConfigReader::ReadValue(), RequireKey, and Module::ServerInstance. Referenced by ModuleOverride(). |
|
||||||||||||||||||||||||
|
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 242 of file m_override.cpp. References CanOverride(), CM_INVITEONLY, CM_KEY, CM_LIMIT, InspIRCd::Config, IS_LOCAL, IS_OPER, User::IsInvited(), User::nick, NoisyOverride, RequireKey, Module::ServerInstance, ServerConfig::ServerName, InspIRCd::SNO, User::WriteServ(), and SnomaskManager::WriteToSnoMask(). |
|
||||||||||||||||||||
|
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 123 of file m_override.cpp. References CanOverride(), Channel::GetStatus(), IS_OPER, Channel::name, Module::ServerInstance, InspIRCd::SNO, STATUS_VOICE, and SnomaskManager::WriteToSnoMask(). |
|
|
Definition at line 24 of file m_override.cpp. Referenced by OnRehash(), and OnUserPreJoin(). |
|
|
Definition at line 26 of file m_override.cpp. Referenced by ModuleOverride(), OnAccessCheck(), and OnPostCommand(). |
|
|
Definition at line 26 of file m_override.cpp. Referenced by ModuleOverride(), OnAccessCheck(), and OnPostCommand(). |
|
|
Definition at line 26 of file m_override.cpp. Referenced by ModuleOverride(), OnAccessCheck(), and OnPostCommand(). |
|
|
Definition at line 26 of file m_override.cpp. Referenced by ModuleOverride(), OnAccessCheck(), and OnPostCommand(). |
|
|
Definition at line 26 of file m_override.cpp. Referenced by ModuleOverride(), OnAccessCheck(), and OnPostCommand(). |
|
|
Definition at line 25 of file m_override.cpp. Referenced by ModuleOverride(), OnAccessCheck(), and OnPostCommand(). |
|
|
Definition at line 22 of file m_override.cpp. Referenced by CanOverride(), and OnRehash(). |
|
|
Definition at line 26 of file m_override.cpp. Referenced by ModuleOverride(), OnAccessCheck(), and OnPostCommand(). |
|
|
Definition at line 23 of file m_override.cpp. Referenced by OnRehash(), and OnUserPreJoin(). |