|
|||
|
|||
|


Public Member Functions | |
| ModuleChanFilter (InspIRCd *Me) | |
| virtual void | OnChannelDelete (Channel *chan) |
| Called whenever a channel is deleted, either by QUIT, KICK or PART. | |
| virtual void | OnRehash (User *user, const std::string ¶meter) |
| Called on rehash. | |
| virtual int | ProcessMessages (User *user, Channel *chan, std::string &text) |
| virtual int | OnUserPreMessage (User *user, void *dest, int target_type, std::string &text, char status, CUList &exempt_list) |
| Called whenever a user is about to PRIVMSG A user or a channel, before any processing is done. | |
| virtual void | OnCleanup (int target_type, void *item) |
| Called before your module is unloaded to clean up Extensibles. | |
| virtual int | OnUserPreNotice (User *user, void *dest, int target_type, std::string &text, char status, CUList &exempt_list) |
| Called whenever a user is about to NOTICE A user or a channel, before any processing is done. | |
| virtual void | OnSyncChannel (Channel *chan, Module *proto, void *opaque) |
| Allows modules to synchronize data which relates to channels during a netburst. | |
| virtual Version | GetVersion () |
| Returns the version number of a Module. | |
| virtual | ~ModuleChanFilter () |
Private Attributes | |
| ChanFilter * | cf |
Definition at line 58 of file m_chanfilter.cpp.
|
|
Definition at line 65 of file m_chanfilter.cpp. References ModeParser::AddMode(), ModuleManager::Attach(), cf, ListModeBase::DoImplements(), I_OnChannelDelete, I_OnCleanup, I_OnRehash, I_OnSyncChannel, I_OnUserPreMessage, I_OnUserPreNotice, InspIRCd::Modes, InspIRCd::Modules, and Module::ServerInstance. |
|
|
Definition at line 139 of file m_chanfilter.cpp. References cf, 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 134 of file m_chanfilter.cpp. References API_VERSION, VF_COMMON, and VF_VENDOR. |
|
|
Called whenever a channel is deleted, either by QUIT, KICK or PART.
Reimplemented from Module. Definition at line 77 of file m_chanfilter.cpp. References cf, and ListModeBase::DoChannelDelete(). |
|
||||||||||||
|
Called before your module is unloaded to clean up Extensibles. This method is called once for every user and channel on the network, so that when your module unloads it may clear up any remaining data in the form of Extensibles added using Extensible::Extend(). If the target_type variable is TYPE_USER, then void* item refers to a User*, otherwise it refers to a Channel*.
Reimplemented from Module. Definition at line 119 of file m_chanfilter.cpp. References cf, and ListModeBase::DoCleanup(). |
|
||||||||||||
|
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 82 of file m_chanfilter.cpp. References cf, and ListModeBase::DoRehash(). |
|
||||||||||||||||
|
Allows modules to synchronize data which relates to channels during a netburst. When this function is called, it will be called from the module which implements the linking protocol. This currently is m_spanningtree.so. A pointer to this module is given in Module* proto, so that you may call its methods such as ProtoSendMode (see below). This function will be called for every user visible on your side of the burst, allowing you to for example set modes, etc. Do not use this call to synchronize data which you have stored using class Extensible -- There is a specialist function OnSyncUserMetaData and OnSyncChannelMetaData for this! For a good example of how to use this function, please see src/modules/m_chanprotect.cpp
Reimplemented from Module. Definition at line 129 of file m_chanfilter.cpp. References cf, and ListModeBase::DoSyncChannel(). |
|
||||||||||||||||||||||||||||
|
Called whenever a user is about to PRIVMSG A user or a channel, before any processing is done. Returning any nonzero value 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 filter or redirect messages. target_type can be one of TYPE_USER or TYPE_CHANNEL. If the target_type value is a user, you must cast dest to a User* otherwise you must cast it to a Channel*, this is the details of where the message is destined to be sent.
Reimplemented from Module. Definition at line 110 of file m_chanfilter.cpp. References ProcessMessages(), and TYPE_CHANNEL. Referenced by OnUserPreNotice(). |
|
||||||||||||||||||||||||||||
|
Called whenever a user is about to NOTICE A user or a channel, before any processing is done. Returning any nonzero value 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 filter or redirect messages. target_type can be one of TYPE_USER or TYPE_CHANNEL. If the target_type value is a user, you must cast dest to a User* otherwise you must cast it to a Channel*, this is the details of where the message is destined to be sent. You may alter the message text as you wish before relinquishing control to the next module in the chain, and if no other modules block the text this altered form of the text will be sent out to the user and possibly to other servers.
Reimplemented from Module. Definition at line 124 of file m_chanfilter.cpp. References OnUserPreMessage(). |
|
||||||||||||||||
|
Definition at line 87 of file m_chanfilter.cpp. References cf, CHANOPS_EXEMPT, Extensible::GetExt(), ListModeBase::GetInfoKey(), Channel::GetStatus(), IS_LOCAL, InspIRCd::Match(), Channel::name, User::nick, Module::ServerInstance, STATUS_OP, and User::WriteNumeric(). Referenced by OnUserPreMessage(). |
|
|
Definition at line 61 of file m_chanfilter.cpp. Referenced by ModuleChanFilter(), OnChannelDelete(), OnCleanup(), OnRehash(), OnSyncChannel(), ProcessMessages(), and ~ModuleChanFilter(). |