InspIRCd  3.0
Public Member Functions | List of all members
ModeUserServerNoticeMask Class Reference

#include <builtinmodes.h>

Inheritance diagram for ModeUserServerNoticeMask:
ModeHandler ServiceProvider classbase

Public Member Functions

ModeAction OnModeChange (User *source, User *dest, Channel *channel, std::string &parameter, bool adding) CXX11_OVERRIDE
void OnParameterMissing (User *user, User *dest, Channel *channel) CXX11_OVERRIDE
std::string GetUserParameter (const User *user) const CXX11_OVERRIDE
- Public Member Functions inherited from ModeHandler
 ModeHandler (Module *me, const std::string &name, char modeletter, ParamSpec params, ModeType type, Class mclass=MC_OTHER)
virtual CullResult cull () CXX11_OVERRIDE
void RegisterService () CXX11_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 ModResult AccessCheck (User *source, Channel *channel, std::string &parameter, bool adding)
virtual void DisplayList (User *user, Channel *channel)
virtual void DisplayEmptyList (User *user, Channel *channel)
virtual bool ResolveModeConflict (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 () const
- Public Member Functions inherited from ServiceProvider
 ServiceProvider (Module *Creator, const std::string &Name, ServiceType Type)
void DisableAutoRegister ()

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 Attributes inherited from ModeHandler
ParamSpec parameters_taken
char mode
bool oper
bool list
ModeType m_type
const Class type_id
int levelrequired

Detailed Description

User mode +s

Member Function Documentation

◆ GetUserParameter()

std::string ModeUserServerNoticeMask::GetUserParameter ( const User user) const

Create a displayable mode string of the snomasks set on a given user

userThe user whose notice masks to format
The notice mask character sequence

Reimplemented from ModeHandler.

◆ OnModeChange()

ModeAction ModeUserServerNoticeMask::OnModeChange ( User source,
User dest,
Channel channel,
std::string &  parameter,
bool  adding 

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.
parameterThe parameter for your mode, if you indicated that your mode requires a parameter when being set or unset. Note that if you alter this value, the new value becomes the one displayed and send out to the network, also, if you set this to an empty string but you specified your mode REQUIRES a parameter, this is equivalent to returning MODEACTION_DENY and will prevent the mode from being displayed.
addingThis value is true when the mode is being set, or false when it is being unset.
MODEACTION_ALLOW to allow the mode, or MODEACTION_DENY to prevent the mode, also see the description of 'parameter'.

Reimplemented from ModeHandler.

◆ OnParameterMissing()

void ModeUserServerNoticeMask::OnParameterMissing ( User user,
User dest,
Channel channel 

In the event that the mode should be given a parameter, and no parameter was provided, this method is called. This allows you to give special information to the user, or handle this any way you like.

userThe user issuing the mode change
destFor user mode changes, the target of the mode. For channel mode changes, NULL.
channelFor channel mode changes, the target of the mode. For user mode changes, NULL.

Reimplemented from ModeHandler.

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