Public Member Functions | Private Member Functions | Private Attributes

OSDefcon Class Reference

Inherits Module.

Collaboration diagram for OSDefcon:
Collaboration graph
[legend]

Public Member Functions

 OSDefcon (const Anope::string &modname, const Anope::string &creator)
void OnReload () anope_override
EventReturn OnChannelModeSet (Channel *c, MessageSource &, const Anope::string &mname, const Anope::string &param) anope_override
EventReturn OnChannelModeUnset (Channel *c, MessageSource &, const Anope::string &mname, const Anope::string &) anope_override
EventReturn OnPreCommand (CommandSource &source, Command *command, std::vector< Anope::string > &params) anope_override
void OnUserConnect (User *u, bool &exempt) anope_override
void OnChannelModeAdd (ChannelMode *cm) anope_override
void OnChannelCreate (Channel *c) anope_override

Private Member Functions

void ParseModeString ()

Private Attributes

ServiceReference< SessionServicesession_service
ServiceReference< XLineManagerakills
CommandOSDefcon commandosdefcon

Detailed Description

Definition at line 246 of file os_defcon.cpp.


Constructor & Destructor Documentation

OSDefcon::OSDefcon ( const Anope::string modname,
const Anope::string creator 
) [inline]

Member Function Documentation

void OSDefcon::OnChannelCreate ( Channel c  )  [inline, virtual]

Called when a new channel is created

Parameters:
c The channel

Reimplemented from Module.

Definition at line 555 of file os_defcon.cpp.

References Anope::string::c_str(), DefconConfig::chanmodes, DefconConfig::Check(), DEFCON_FORCE_CHAN_MODES, and OperServ.

void OSDefcon::OnChannelModeAdd ( ChannelMode cm  )  [inline, virtual]

Called when a channel mode is introducted into Anope

Parameters:
cm The mode

Reimplemented from Module.

Definition at line 549 of file os_defcon.cpp.

References DefconConfig::chanmodes, Anope::string::find(), Anope::string::npos, and ParseModeString().

EventReturn OSDefcon::OnChannelModeSet ( Channel c,
MessageSource setter,
const Anope::string mname,
const Anope::string param 
) [inline, virtual]

Called when a mode is set on a channel

Parameters:
c The channel
setter The user or server that is setting the mode
mname The mode name
param The mode param, if there is one
Returns:
EVENT_STOP to make mlock/secureops etc checks not happen

Reimplemented from Module.

Definition at line 414 of file os_defcon.cpp.

References DefconConfig::Check(), DEFCON_FORCE_CHAN_MODES, DefconConfig::DefConModesOff, ModeManager::FindChannelModeByName(), and OperServ.

EventReturn OSDefcon::OnChannelModeUnset ( Channel c,
MessageSource setter,
const Anope::string mname,
const Anope::string param 
) [inline, virtual]

Called when a mode is unset on a channel

Parameters:
c The channel
setter The user or server that is unsetting the mode
mname The mode name
param The mode param, if there is one
Returns:
EVENT_STOP to make mlock/secureops etc checks not happen

Reimplemented from Module.

Definition at line 428 of file os_defcon.cpp.

References DefconConfig::Check(), DEFCON_FORCE_CHAN_MODES, DefconConfig::DefConModesOn, ModeManager::FindChannelModeByName(), DefconConfig::GetDefConParam(), OperServ, and Channel::SetMode().

EventReturn OSDefcon::OnPreCommand ( CommandSource source,
Command command,
std::vector< Anope::string > &  params 
) [inline, virtual]

Called before a command is due to be executed.

Parameters:
source The source of the command
command The command the user is executing
params The parameters the user is sending
Returns:
EVENT_CONTINUE to let other modules decide, EVENT_STOP to halt the command and not process it

Reimplemented from Module.

Definition at line 448 of file os_defcon.cpp.

References _, DefconConfig::Check(), DEFCON_NO_MLOCK_CHANGE, DEFCON_NO_NEW_CHANNELS, DEFCON_NO_NEW_MEMOS, and DEFCON_NO_NEW_NICKS.

void OSDefcon::OnReload (  )  [inline, virtual]
void OSDefcon::OnUserConnect ( User u,
bool &  exempt 
) [inline, virtual]
void OSDefcon::ParseModeString (  )  [inline, private]

Field Documentation

Definition at line 249 of file os_defcon.cpp.

Referenced by OnUserConnect().

Definition at line 250 of file os_defcon.cpp.

Definition at line 248 of file os_defcon.cpp.

Referenced by OnUserConnect().


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