Anope IRC Services  Version 2.0
Public Member Functions | Data Fields
ChannelMode Class Reference

#include <modes.h>

Inheritance diagram for ChannelMode:
Inheritance graph
Collaboration diagram for ChannelMode:
Collaboration graph

Public Member Functions

 ChannelMode (const Anope::string &name, char mc)
bool CanSet (User *u) const anope_override
virtual ChannelModeWrap (Anope::string &param)
ChannelModeUnwrap (Anope::string &param)
virtual ChannelModeUnwrap (ChannelMode *, Anope::string &param)
- Public Member Functions inherited from Mode
 Mode (const Anope::string &mname, ModeClass mclass, char mc, ModeType type)
virtual ~Mode ()
- Public Member Functions inherited from Base
 Base ()
virtual ~Base ()
void AddReference (ReferenceBase *r)
void DelReference (ReferenceBase *r)

Data Fields

std::vector< ChannelMode * > listeners
- Data Fields inherited from Mode
Anope::string name
ModeClass mclass
char mchar
ModeType type

Detailed Description

This class is a channel mode, all channel modes use this/inherit from this

Definition at line 96 of file modes.h.

Constructor & Destructor Documentation

◆ ChannelMode()

ChannelMode::ChannelMode ( const Anope::string name,
char  mc 


nameThe mode name
mcThe mode char

Definition at line 140 of file modes.cpp.

Referenced by ProtoCharybdis::AddModes(), and ProtoBahamut::AddModes().

Member Function Documentation

◆ CanSet()

bool ChannelMode::CanSet ( User u) const

Can a user set this mode, used for mlock

uThe user

Reimplemented from Mode.

Reimplemented in ChannelModeUnrealSSL, ChannelModeNoone, ChannelModeOperOnly, and ChannelModeLargeBan.

Definition at line 144 of file modes.cpp.


Referenced by ChannelModeNoone::ChannelModeNoone(), ChannelModeOperOnly::ChannelModeOperOnly(), CommandCSMode::DoLock(), and CommandCSMode::DoSet().

◆ Unwrap() [1/2]

ChannelMode * ChannelMode::Unwrap ( Anope::string param)

'unwrap' this mode to our internal representation

Definition at line 156 of file modes.cpp.

References listeners.

Referenced by Channel::RemoveModeInternal(), and Channel::SetModeInternal().

◆ Unwrap() [2/2]

ChannelMode * ChannelMode::Unwrap ( ChannelMode ,
Anope::string param 

called when a mode is being unwrapped, and is asking us if we can unwrap it

Reimplemented in UnrealExtBan, ChannelModeVirtual< ChannelModeList >, and InspIRCdExtBan.

Definition at line 168 of file modes.cpp.

◆ Wrap()

ChannelMode * ChannelMode::Wrap ( Anope::string param)

'wrap' this channel mode and param to the underlying mode and param

Reimplemented in UnrealExtBan, ChannelModeVirtual< ChannelModeList >, and InspIRCdExtBan.

Definition at line 151 of file modes.cpp.

Referenced by Channel::RemoveMode(), and Channel::SetMode().

Field Documentation

◆ listeners

std::vector<ChannelMode *> ChannelMode::listeners

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