|
|||
|
|||
|


Public Member Functions | |
| ModuleSilence (InspIRCd *Me) | |
| virtual void | OnRehash (User *user, const std::string ¶meter) |
| Called on rehash. | |
| virtual void | OnUserQuit (User *user, const std::string &reason, const std::string &oper_message) |
| Called when a user quits. | |
| virtual void | On005Numeric (std::string &output) |
| Called when a 005 numeric is about to be output. | |
| virtual void | OnBuildExemptList (MessageType message_type, Channel *chan, User *sender, char status, CUList &exempt_list, const std::string &text) |
| Called whenever the server wants to build the exemption list for a channel, but is not directly doing a PRIVMSG or NOTICE. | |
| virtual int | PreText (User *user, void *dest, int target_type, std::string &text, char status, CUList &exempt_list, int silence_type) |
| 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 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 int | OnUserPreInvite (User *source, User *dest, Channel *channel, time_t timeout) |
| Called whenever a user is about to invite another user into a channel, before any processing is done. | |
| int | MatchPattern (User *dest, User *source, int pattern) |
| virtual | ~ModuleSilence () |
| virtual Version | GetVersion () |
| Returns the version number of a Module. | |
Private Attributes | |
| CommandSilence * | cmdsilence |
| CommandSVSSilence * | cmdsvssilence |
| unsigned int | maxsilence |
Definition at line 267 of file m_silence.cpp.
|
|
Definition at line 274 of file m_silence.cpp. References InspIRCd::AddCommand(), ModuleManager::Attach(), cmdsilence, cmdsvssilence, I_On005Numeric, I_OnBuildExemptList, I_OnRehash, I_OnUserPreInvite, I_OnUserPreMessage, I_OnUserPreNotice, I_OnUserQuit, maxsilence, InspIRCd::Modules, OnRehash(), and Module::ServerInstance. |
|
|
Definition at line 400 of file m_silence.cpp. |
|
|
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 404 of file m_silence.cpp. References API_VERSION, VF_COMMON, and VF_VENDOR. |
|
||||||||||||||||
|
Definition at line 381 of file m_silence.cpp. References Extensible::GetExt(), User::GetFullHost(), InspIRCd::Match(), SILENCE_ALL, and SILENCE_EXCLUDE. Referenced by OnBuildExemptList(), OnUserPreInvite(), and PreText(). |
|
|
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 308 of file m_silence.cpp. References ConvToStr(), and maxsilence. |
|
||||||||||||||||||||||||||||
|
Called whenever the server wants to build the exemption list for a channel, but is not directly doing a PRIVMSG or NOTICE. For example, the spanningtree protocol will call this event when passing a privmsg on (but not processing it directly).
Reimplemented from Module. Definition at line 314 of file m_silence.cpp. References Channel::GetHalfoppedUsers(), Channel::GetOppedUsers(), Channel::GetUsers(), Channel::GetVoicedUsers(), IS_LOCAL, MatchPattern(), MSG_PRIVMSG, SILENCE_CHANNEL, and SILENCE_CNOTICE. Referenced by PreText(). |
|
||||||||||||
|
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 287 of file m_silence.cpp. References Conf, maxsilence, ConfigReader::ReadInteger(), and Module::ServerInstance. Referenced by ModuleSilence(). |
|
||||||||||||||||||||
|
Called whenever a user is about to invite another user into a channel, before any processing is done. Returning 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 filter invites to channels.
Reimplemented from Module. Definition at line 376 of file m_silence.cpp. References MatchPattern(), and SILENCE_INVITE. |
|
||||||||||||||||||||||||||||
|
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 366 of file m_silence.cpp. References PreText(), and SILENCE_PRIVATE. |
|
||||||||||||||||||||||||||||
|
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 371 of file m_silence.cpp. References PreText(), and SILENCE_NOTICE. |
|
||||||||||||||||
|
Called when a user quits. The details of the exiting user are available to you in the parameter User *user This event is only called when the user is fully registered when they quit. To catch raw disconnections, use the OnUserDisconnect method.
Reimplemented from Module. Definition at line 296 of file m_silence.cpp. References Extensible::GetExt(), and Extensible::Shrink(). |
|
||||||||||||||||||||||||||||||||
|
Definition at line 346 of file m_silence.cpp. References IS_LOCAL, MatchPattern(), MSG_NOTICE, MSG_PRIVMSG, OnBuildExemptList(), SILENCE_PRIVATE, TYPE_CHANNEL, and TYPE_USER. Referenced by OnUserPreMessage(), and OnUserPreNotice(). |
|
|
Definition at line 269 of file m_silence.cpp. Referenced by ModuleSilence(). |
|
|
Definition at line 270 of file m_silence.cpp. Referenced by ModuleSilence(). |
|
|
Definition at line 271 of file m_silence.cpp. Referenced by ModuleSilence(), On005Numeric(), and OnRehash(). |