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

#include <builtinmodes.h>

Inheritance diagram for ModeChannelLimit:
ParamMode< ModeChannelLimit, LocalIntExt > ParamModeBase ModeHandler ServiceProvider classbase

Public Member Functions

bool ResolveModeConflict (std::string &their_param, const std::string &our_param, Channel *channel)
 
void SerializeParam (Channel *chan, intptr_t n, std::string &out)
 
ModeAction OnSet (User *source, Channel *channel, std::string &parameter)
 
- Public Member Functions inherited from ParamMode< ModeChannelLimit, LocalIntExt >
 ParamMode (Module *Creator, const std::string &Name, char modeletter, ParamSpec ps=PARAM_SETONLY)
 
void OnUnsetInternal (User *source, Channel *chan) CXX11_OVERRIDE
 
void GetParameter (Channel *chan, std::string &out) CXX11_OVERRIDE
 
- Public Member Functions inherited from ParamModeBase
 ParamModeBase (Module *Creator, const std::string &Name, char modeletter, ParamSpec ps)
 
ModeAction OnModeChange (User *source, User *dest, Channel *channel, std::string &param, bool adding) CXX11_OVERRIDE
 
void OnUnset (User *source, Channel *chan)
 
- 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 std::string GetUserParameter (const User *user) const
 
virtual ModResult AccessCheck (User *source, Channel *channel, std::string &parameter, bool adding)
 
virtual void DisplayList (User *user, Channel *channel)
 
virtual void OnParameterMissing (User *user, User *dest, Channel *channel)
 
virtual void DisplayEmptyList (User *user, 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
enum  Class { MC_PREFIX, MC_LIST, MC_PARAM, MC_OTHER }
 
typedef size_t Id
 
- Public Attributes inherited from ParamMode< ModeChannelLimit, LocalIntExt >
LocalIntExt ext
 
- 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

Channel mode +l

Member Function Documentation

◆ ResolveModeConflict()

bool ModeChannelLimit::ResolveModeConflict ( std::string &  their_param,
const std::string &  our_param,
Channel channel 
)
virtual

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).

Parameters
their_paramTheir parameter if the mode has a parameter
our_paramOur parameter if the mode has a parameter
channelThe channel we are checking against
Returns
True if the other side wins the merge, false if we win the merge for this mode.

Reimplemented from ModeHandler.


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