|
|||
|
|||
|
#include <cmode_k.h>
Inheritance diagram for ModeChannelKey:


Public Member Functions | |
| ModeChannelKey (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. | |
| 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. | |
| bool | CheckTimeStamp (time_t theirs, time_t ours, const std::string &their_param, const std::string &our_param, Channel *channel) |
| If your mode needs special action during a server sync to determine which side wins when comparing timestamps, override this function and use it to return true or false. | |
| void | RemoveMode (Channel *channel, irc::modestacker *stack=NULL) |
| 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. | |
Definition at line 20 of file cmode_k.h.
|
|
Definition at line 20 of file cmode_k.cpp. |
|
||||||||||||||||||||||||
|
If your mode needs special action during a server sync to determine which side wins when comparing timestamps, override this function and use it to return true or false. The default implementation just returns true if theirs < ours. This will only be called for non-listmodes with parameters, when adding the mode and where theirs == ours (therefore the default implementation will always return false).
Reimplemented from ModeHandler. Definition at line 61 of file cmode_k.cpp. |
|
||||||||||||||||||||
|
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 24 of file cmode_k.cpp. References CM_KEY, Channel::GetModeParameter(), and Channel::modes. |
|
||||||||||||||||||||||||||||
|
Called when a mode change for your mode occurs.
Reimplemented from ModeHandler. Definition at line 67 of file cmode_k.cpp. References Channel::GetModeParameter(), IS_LOCAL, Channel::IsModeSet(), MODEACTION_ALLOW, MODEACTION_DENY, Channel::SetMode(), and Channel::SetModeParam(). |
|
||||||||||||
|
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 57 of file cmode_k.cpp. |
|
||||||||||||
|
+k needs a parameter when being removed, so we have a special-case RemoveMode here for it Reimplemented from ModeHandler. Definition at line 37 of file cmode_k.cpp. References InspIRCd::FakeClient, Channel::GetModeParameter(), Channel::IsModeSet(), Channel::name, irc::modestacker::Push(), InspIRCd::SendMode(), and ModeHandler::ServerInstance. |