|
|||
|
|||
|
#include <cmode_b.h>
Inheritance diagram for ModeChannelBan:


Public Member Functions | |
| ModeChannelBan (InspIRCd *Instance) | |
| ModeAction | OnModeChange (User *source, User *dest, Channel *channel, std::string ¶meter, bool adding, bool servermode) |
| Called when a mode change for your mode occurs. | |
| std::string & | AddBan (User *user, std::string &dest, Channel *chan, int status, bool servermode) |
| std::string & | DelBan (User *user, std::string &dest, Channel *chan, int status) |
| void | DisplayList (User *user, Channel *channel) |
| If your mode is a listmode, then this method will be called for displaying an item list, e.g. | |
| void | DisplayEmptyList (User *user, Channel *channel) |
| If your mode is a listmode, this method will be called to display an empty list (just the end of list numeric). | |
| ModePair | ModeSet (User *source, User *dest, Channel *channel, const std::string ¶meter) |
| When a remote server needs to bounce a set of modes, it will call this method for every mode in the mode string to determine if the mode is set or not. | |
| void | RemoveMode (User *user, irc::modestacker *stack=NULL) |
| When a MODETYPE_USER mode handler is being removed, the server will call this method for every user on the server. | |
| void | RemoveMode (Channel *channel, irc::modestacker *stack=NULL) |
| When a MODETYPE_CHANNEL mode handler is being removed, the server will call this method for every channel on the server. | |
Private Attributes | |
| BanItem | b |
Definition at line 21 of file cmode_b.h.
|
|
Definition at line 28 of file cmode_b.cpp. |
|
||||||||||||||||||||||||
|
Definition at line 95 of file cmode_b.cpp. References b, Channel::bans, ModeParser::CleanMask(), InspIRCd::Config, HostItem::data, DEFAULT, FOREACH_RESULT, Channel::GetMaxBans(), I_OnAddBan, IS_LOCAL, LogManager::Log(), InspIRCd::Logs, MAXBUF, Channel::name, User::nick, ModeHandler::ServerInstance, ServerConfig::ServerName, HostItem::set_by, HostItem::set_time, InspIRCd::Time(), and User::WriteServ(). Referenced by OnModeChange(). |
|
||||||||||||||||||||
|
Definition at line 155 of file cmode_b.cpp. References Channel::bans, ModeParser::CleanMask(), DEFAULT, FOREACH_RESULT, I_OnDelBan, LogManager::Log(), InspIRCd::Logs, and ModeHandler::ServerInstance. Referenced by OnModeChange(). |
|
||||||||||||
|
If your mode is a listmode, this method will be called to display an empty list (just the end of list numeric).
Reimplemented from ModeHandler. Definition at line 90 of file cmode_b.cpp. References Channel::name, User::nick, and User::WriteServ(). |
|
||||||||||||
|
If your mode is a listmode, then this method will be called for displaying an item list, e.g. on MODE channel +modechar without any parameter or other modes in the command.
Reimplemented from ModeHandler. Definition at line 79 of file cmode_b.cpp. References Channel::bans, Channel::name, User::nick, and User::WriteServ(). |
|
||||||||||||||||||||
|
When a remote server needs to bounce a set of modes, it will call this method for every mode in the mode string to determine if the mode is set or not.
Reimplemented from ModeHandler. Definition at line 143 of file cmode_b.cpp. References Channel::bans. |
|
||||||||||||||||||||||||||||
|
Called when a mode change for your mode occurs.
Reimplemented from ModeHandler. Definition at line 32 of file cmode_b.cpp. References AddBan(), DelBan(), Channel::GetStatus(), and MODEACTION_ALLOW. |
|
||||||||||||
|
When a MODETYPE_CHANNEL mode handler is being removed, the server will call this method for every channel on the server. Your mode handler should remove its user mode from the channel by sending the appropriate server modes using InspIRCd::SendMode(). The default implementation of this method can remove simple modes which have no parameters, and can be used when your mode is of this type, otherwise you must implement a more advanced version of it to remove your mode properly from each channel. Note that in the case of listmodes, you should remove the entire list of items.
Reimplemented from ModeHandler. Definition at line 52 of file cmode_b.cpp. References Channel::bans, InspIRCd::FakeClient, Channel::name, irc::modestacker::Push(), InspIRCd::SendMode(), and ModeHandler::ServerInstance. |
|
||||||||||||
|
When a MODETYPE_USER mode handler is being removed, the server will call this method for every user on the server. Your mode handler should remove its user mode from the user by sending the appropriate server modes using InspIRCd::SendMode(). The default implementation of this method can remove simple modes which have no parameters, and can be used when your mode is of this type, otherwise you must implement a more advanced version of it to remove your mode properly from each user.
Reimplemented from ModeHandler. Definition at line 75 of file cmode_b.cpp. |
|
|
Definition at line 24 of file cmode_b.h. Referenced by AddBan(). |