Anope IRC Services  Version 2.0
Public Types | Public Member Functions
ModeLocks Struct Referenceabstract

#include <cs_mode.h>

Inheritance diagram for ModeLocks:
Inheritance graph
[legend]

Public Types

typedef std::vector< ModeLock * > ModeList
 

Public Member Functions

virtual ~ModeLocks ()
 
virtual bool HasMLock (ChannelMode *mode, const Anope::string &param, bool status) const =0
 
virtual bool SetMLock (ChannelMode *mode, bool status, const Anope::string &param="", Anope::string setter="", time_t created=Anope::CurTime)=0
 
virtual bool RemoveMLock (ChannelMode *mode, bool status, const Anope::string &param="")=0
 
virtual void RemoveMLock (ModeLock *mlock)=0
 
virtual void ClearMLock ()=0
 
virtual const ModeListGetMLock () const =0
 
virtual std::list< ModeLock * > GetModeLockList (const Anope::string &name)=0
 
virtual const ModeLockGetMLock (const Anope::string &mname, const Anope::string &param="")=0
 
virtual Anope::string GetMLockAsString (bool complete) const =0
 
virtual void Check ()=0
 

Detailed Description

Definition at line 26 of file cs_mode.h.

Member Typedef Documentation

typedef std::vector<ModeLock *> ModeLocks::ModeList

Definition at line 28 of file cs_mode.h.

Constructor & Destructor Documentation

virtual ModeLocks::~ModeLocks ( )
inlinevirtual

Definition at line 30 of file cs_mode.h.

Member Function Documentation

virtual void ModeLocks::Check ( )
pure virtual

Implemented in ModeLocksImpl.

Referenced by CSMode::OnChanRegistered().

virtual void ModeLocks::ClearMLock ( )
pure virtual

Clear all mlocks on the channel

Implemented in ModeLocksImpl.

virtual const ModeList& ModeLocks::GetMLock ( ) const
pure virtual

Get all of the mlocks for this channel

Returns
The mlocks

Implemented in ModeLocksImpl.

Referenced by CommandCSMode::DoLock(), CommandCSList::Execute(), CSTopic::OnChanInfo(), and CSMode::OnCheckModes().

virtual const ModeLock* ModeLocks::GetMLock ( const Anope::string mname,
const Anope::string param = "" 
)
pure virtual

Get details for a specific mlock

Parameters
mnameThe mode name
Anoptional param to match with
Returns
The MLock, if any

Implemented in ModeLocksImpl.

virtual Anope::string ModeLocks::GetMLockAsString ( bool  complete) const
pure virtual
virtual std::list<ModeLock *> ModeLocks::GetModeLockList ( const Anope::string name)
pure virtual

Get a list of mode locks on a channel

Parameters
nameThe mode name to get a list of
Returns
a list of mlocks for the given mode

Implemented in ModeLocksImpl.

virtual bool ModeLocks::HasMLock ( ChannelMode mode,
const Anope::string param,
bool  status 
) const
pure virtual

Check if a mode is mlocked

Parameters
modeThe mode
Anoptional param
statusTrue to check mlock on, false for mlock off
Returns
true on success, false on fail

Implemented in ModeLocksImpl.

virtual bool ModeLocks::RemoveMLock ( ChannelMode mode,
bool  status,
const Anope::string param = "" 
)
pure virtual

Remove a mlock

Parameters
modeThe mode
statusTrue for mlock on, false for mlock off
paramThe param of the mode, required if it is a list or status mode
Returns
true on success, false on failure

Implemented in ModeLocksImpl.

Referenced by CommandCSMode::DoLock(), CommandCSSetPersist::Execute(), and ModeLockImpl::~ModeLockImpl().

virtual void ModeLocks::RemoveMLock ( ModeLock mlock)
pure virtual

Implemented in ModeLocksImpl.

virtual bool ModeLocks::SetMLock ( ChannelMode mode,
bool  status,
const Anope::string param = "",
Anope::string  setter = "",
time_t  created = Anope::CurTime 
)
pure virtual

Set a mlock

Parameters
modeThe mode
statusTrue for mlock on, false for mlock off
paramAn optional param arg for + mlocked modes
setterWho is setting the mlock
createdWhen the mlock was created
Returns
true on success, false on failure (module blocking)

Implemented in ModeLocksImpl.

Referenced by CommandCSMode::DoLock(), CommandCSSetPersist::Execute(), CSMode::OnChanRegistered(), and process_mlock().


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