Inherits Command.

Public Member Functions | |
| CommandCSMode (Module *creator) | |
| void | Execute (CommandSource &source, const std::vector< Anope::string > ¶ms) anope_override |
| bool | OnHelp (CommandSource &source, const Anope::string &subcommand) anope_override |
Private Member Functions | |
| bool | CanSet (CommandSource &source, ChannelInfo *ci, ChannelMode *cm, bool self) |
| void | DoLock (CommandSource &source, ChannelInfo *ci, const std::vector< Anope::string > ¶ms) |
| void | DoSet (CommandSource &source, ChannelInfo *ci, const std::vector< Anope::string > ¶ms) |
| void | DoClear (CommandSource &source, ChannelInfo *ci, const std::vector< Anope::string > ¶ms) |
Definition at line 16 of file cs_mode.cpp.
| CommandCSMode::CommandCSMode | ( | Module * | creator | ) | [inline] |
Definition at line 426 of file cs_mode.cpp.
References _, Command::SetDesc(), and Command::SetSyntax().
| bool CommandCSMode::CanSet | ( | CommandSource & | source, | |
| ChannelInfo * | ci, | |||
| ChannelMode * | cm, | |||
| bool | self | |||
| ) | [inline, private] |
Definition at line 18 of file cs_mode.cpp.
References CommandSource::AccessFor(), anope_dynamic_static_cast(), Anope::string::empty(), ModeManager::FindChannelModeByName(), ChannelModeStatus::level, MODE_STATUS, and Mode::type.
Referenced by DoSet().
| void CommandCSMode::DoClear | ( | CommandSource & | source, | |
| ChannelInfo * | ci, | |||
| const std::vector< Anope::string > & | params | |||
| ) | [inline, private] |
Definition at line 392 of file cs_mode.cpp.
References _, DoSet(), Anope::string::empty(), Anope::string::equals_ci(), ModeManager::FindChannelModeByName(), Anope::string::length(), Mode::mchar, CommandSource::Reply(), Command::SendSyntax(), stringify(), and Anope::string::upper().
Referenced by Execute().
| void CommandCSMode::DoLock | ( | CommandSource & | source, | |
| ChannelInfo * | ci, | |||
| const std::vector< Anope::string > & | params | |||
| ) | [inline, private] |
Definition at line 44 of file cs_mode.cpp.
References _, CommandSource::AccessFor(), ListFormatter::AddColumn(), ListFormatter::AddEntry(), ChannelInfo::c, Anope::string::c_str(), ChannelMode::CanSet(), Channel::CheckModes(), Anope::string::clear(), ModeLock::created, Anope::string::empty(), Anope::string::equals_ci(), ModeManager::FindChannelModeByChar(), ModeManager::FindChannelModeByName(), ChannelInfo::GetMLock(), ChannelInfo::GetMLockAsString(), CommandSource::GetNick(), sepstream::GetToken(), CommandSource::GetUser(), AccessGroup::HasPriv(), Anope::string::length(), LOG_COMMAND, LOG_OVERRIDE, Mode::mchar, MODE_LIST, MODE_PARAM, MODE_REGULAR, MODE_STATUS, ChannelInfo::name, ModeLock::name, CommandSource::nc, Command::OnSyntaxError(), ModeLock::param, Anope::printf(), ListFormatter::Process(), ChannelInfo::RemoveMLock(), CommandSource::Reply(), ModeLock::set, ChannelInfo::SetMLock(), ModeLock::setter, Anope::strftime(), and Mode::type.
Referenced by Execute().
| void CommandCSMode::DoSet | ( | CommandSource & | source, | |
| ChannelInfo * | ci, | |||
| const std::vector< Anope::string > & | params | |||
| ) | [inline, private] |
Definition at line 228 of file cs_mode.cpp.
References _, ACCESS_DENIED, ChannelInfo::AccessFor(), CommandSource::AccessFor(), ChannelInfo::c, Anope::string::c_str(), CanSet(), ChannelMode::CanSet(), ModeManager::ChannelModes, User::Find(), ModeManager::FindChannelModeByChar(), User::GetMask(), Channel::GetModeList(), CommandSource::GetNick(), User::GetUID(), CommandSource::GetUser(), CommandSource::HasPriv(), AccessGroup::HasPriv(), User::IsProtected(), LOG_COMMAND, LOG_OVERRIDE, Anope::Match(), Mode::mchar, MODE_LIST, MODE_PARAM, MODE_REGULAR, MODE_STATUS, Mode::name, User::nick, NICK_X_NOT_IN_USE, Anope::string::npos, Channel::RemoveMode(), CommandSource::Reply(), Channel::SetMode(), Mode::type, ChanUserContainer::user, and Channel::users.
| void CommandCSMode::Execute | ( | CommandSource & | source, | |
| const std::vector< Anope::string > & | params | |||
| ) | [inline, virtual] |
Execute this command.
| source | The source | |
| params | Command parameters |
Implements Command.
Definition at line 434 of file cs_mode.cpp.
References ACCESS_DENIED, ChannelInfo::c, CHAN_X_NOT_IN_USE, DoClear(), DoLock(), DoSet(), Anope::string::equals_ci(), ChannelInfo::Find(), and Command::OnSyntaxError().
| bool CommandCSMode::OnHelp | ( | CommandSource & | source, | |
| const Anope::string & | subcommand | |||
| ) | [inline, virtual] |
Requested when the user is requesting help on this command. Help on this command should be sent to the user.
| source | The source | |
| subcommand | The subcommand the user is requesting help on, or an empty string. (e.g. /ns help set foo bar lol gives a subcommand of "FOO BAR LOL") |
Reimplemented from Command.
Definition at line 462 of file cs_mode.cpp.
References _, and Command::SendSyntax().
1.7.1