Inherits Module.

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 ¶m) 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 > ¶ms) 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< SessionService > | session_service |
| ServiceReference< XLineManager > | akills |
| CommandOSDefcon | commandosdefcon |
Definition at line 246 of file os_defcon.cpp.
| OSDefcon::OSDefcon | ( | const Anope::string & | modname, | |
| const Anope::string & | creator | |||
| ) | [inline] |
Definition at line 332 of file os_defcon.cpp.
References ModuleManager::Attach(), CoreException::GetReason(), I_OnChannelCreate, OnReload(), and Module::SetAuthor().
| void OSDefcon::OnChannelCreate | ( | Channel * | c | ) | [inline, virtual] |
Called when a new channel is created
| 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
| 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
| 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 |
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
| 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 |
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.
| source | The source of the command | |
| command | The command the user is executing | |
| params | The parameters the user is sending |
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] |
Called when Services' configuration has been loaded.
Reimplemented from Module.
Definition at line 350 of file os_defcon.cpp.
References DefconConfig::Add(), DefconConfig::akillexpire, DefconConfig::akillreason, DefconConfig::chanmodes, DefconConfig::Check(), DefconConfig::defaultlevel, DEFCON_AKILL_NEW_CLIENTS, DEFCON_FORCE_CHAN_MODES, DEFCON_NO_MLOCK_CHANGE, DEFCON_NO_NEW_CHANNELS, DEFCON_NO_NEW_CLIENTS, DEFCON_NO_NEW_MEMOS, DEFCON_NO_NEW_NICKS, DEFCON_OPER_ONLY, DEFCON_REDUCE_SESSION, DEFCON_SILENT_OPER_ONLY, DefconConfig::defcons, Anope::DoTime(), Anope::string::empty(), Anope::string::equals_ci(), sepstream::GetToken(), DefconConfig::globalondefcon, DefconConfig::message, DefconConfig::offmessage, ParseModeString(), ConfigReader::ReadFlag(), ConfigReader::ReadInteger(), ConfigReader::ReadValue(), DefconConfig::sessionlimit, and DefconConfig::timeout.
Referenced by OSDefcon().
| void OSDefcon::OnUserConnect | ( | User * | u, | |
| bool & | exempt | |||
| ) | [inline, virtual] |
Called when a new user connects to the network.
| u | The connecting user. | |
| exempt | set to true/is true if the user should be excepted from bans etc |
Reimplemented from Module.
Definition at line 486 of file os_defcon.cpp.
References DefconConfig::akillexpire, DefconConfig::akillreason, akills, XLine::by, Anope::string::c_str(), DefconConfig::Check(), Config, Session::count, Anope::CurTime, DEFCON_AKILL_NEW_CLIENTS, DEFCON_NO_NEW_CLIENTS, DEFCON_REDUCE_SESSION, Anope::string::empty(), XLineManager::GenerateUID(), Session::hits, IRCD, ServerConfig::MaxSessionKill, User::nick, ServerConfig::OperServ, OperServ, IRCDProto::SendMessage(), session_service, ServerConfig::SessionAutoKillExpiry, DefconConfig::sessionlimit, ServerConfig::SessionLimitDetailsLoc, and ServerConfig::SessionLimitExceeded.
| void OSDefcon::ParseModeString | ( | ) | [inline, private] |
Definition at line 252 of file os_defcon.cpp.
References anope_dynamic_static_cast(), ChannelMode::CanSet(), DefconConfig::chanmodes, DefconConfig::DefConModesOff, DefconConfig::DefConModesOn, ModeManager::FindChannelModeByChar(), ModeManager::FindChannelModeByName(), sepstream::GetToken(), ChannelModeParam::IsValid(), Anope::string::length(), MODE_LIST, MODE_PARAM, MODE_STATUS, Mode::name, DefconConfig::SetDefConParam(), Mode::type, and DefconConfig::UnsetDefConParam().
Referenced by OnChannelModeAdd(), and OnReload().
ServiceReference<XLineManager> OSDefcon::akills [private] |
Definition at line 249 of file os_defcon.cpp.
Referenced by OnUserConnect().
CommandOSDefcon OSDefcon::commandosdefcon [private] |
Definition at line 250 of file os_defcon.cpp.
Definition at line 248 of file os_defcon.cpp.
Referenced by OnUserConnect().
1.7.1