InspIRCd  4.0
Public Member Functions | List of all members
SimpleChannelMode Class Reference

#include <mode.h>

Inheritance diagram for SimpleChannelMode:
ModeHandler ServiceProvider Cullable insp::uncopiable

Public Member Functions

 SimpleChannelMode (Module *Creator, const std::string &Name, char modeletter, bool operonly=false)
ModeAction OnModeChange (User *source, User *dest, Channel *channel, Modes::Change &change) override
- Public Member Functions inherited from ModeHandler
 ModeHandler (Module *me, const std::string &name, char modeletter, ParamSpec params, ModeType type, Class mclass=MC_OTHER)
Cullable::Result Cull () override
void RegisterService () override
bool IsListMode () const
PrefixModeIsPrefixMode ()
const PrefixModeIsPrefixMode () const
ListModeBaseIsListModeBase ()
const ListModeBaseIsListModeBase () const
ParamModeBaseIsParameterMode ()
const ParamModeBaseIsParameterMode () const
ModeType GetModeType () const
bool NeedsOper () const
bool NeedsParam (bool adding) const
char GetModeChar () const
Id GetId () const
virtual std::string GetUserParameter (const User *user) const
virtual ModResult AccessCheck (User *source, Channel *channel, Modes::Change &change)
virtual void DisplayList (User *user, Channel *channel)
virtual void OnParameterMissing (User *user, User *dest, Channel *channel)
virtual void OnParameterInvalid (User *user, Channel *targetchannel, User *targetuser, const std::string &parameter)
virtual void DisplayEmptyList (User *user, Channel *channel)
virtual bool ResolveModeConflict (const std::string &their_param, const std::string &our_param, Channel *channel)
void RemoveMode (User *user)
virtual void RemoveMode (Channel *channel, Modes::ChangeList &changelist)
unsigned int GetLevelRequired (bool adding) const
const std::string & GetSyntax () const
- Public Member Functions inherited from ServiceProvider
 ServiceProvider (Module *Creator, const std::string &Name, ServiceType Type)
const char * GetTypeString () const
void DisableAutoRegister ()
- Public Member Functions inherited from Cullable
virtual ~Cullable ()

Additional Inherited Members

- Public Types inherited from ModeHandler
typedef size_t Id
- Public Attributes inherited from ServiceProvider
ModuleRef creator
const std::string name
const ServiceType service
- Protected Member Functions inherited from Cullable
 Cullable ()
- Protected Attributes inherited from ModeHandler
ParamSpec parameters_taken
char mode
bool oper = false
bool list = false
ModeType m_type
const Class type_id
unsigned int ranktoset = HALFOP_VALUE
unsigned int ranktounset = HALFOP_VALUE
std::string syntax

Detailed Description

A prebuilt mode handler which handles a simple channel mode, e.g. no parameters, usable by any user, with no extra behaviour to the mode beyond the basic setting and unsetting of the mode, not allowing the mode to be set if it is already set and not allowing it to be unset if it is already unset. An example of a simple channel mode is channel mode +s.

Member Function Documentation

◆ OnModeChange()

ModeAction SimpleChannelMode::OnModeChange ( User source,
User dest,
Channel channel,
Modes::Change change 

Called when a mode change for your mode occurs.

sourceContains the user setting the mode.
destFor usermodes, contains the destination user the mode is being set on. For channelmodes, this is an undefined value.
channelFor channel modes, contains the destination channel the modes are being set on. For usermodes, this is an undefined value.
changeInformation regarding the mode change.
MODEACTION_ALLOW to allow the mode, or MODEACTION_DENY to prevent the mode, also see the description of 'parameter'.

Reimplemented from ModeHandler.

The documentation for this class was generated from the following files: