35 const Anope::string &setting = params.size() > 1 ? params[1] :
"";
47 source.
Reply(
_(
"Services are now in \002read-only\002 mode."));
53 source.
Reply(
_(
"Services are now in \002read-write\002 mode."));
56 source.
Reply(
_(
"Setting for READONLY must be \002ON\002 or \002OFF\002."));
63 const Anope::string &setting = params.size() > 1 ? params[1] :
"";
79 bool super_admin =
Config->GetModule(this->
owner)->Get<
bool>(
"superadmin");
81 source.
Reply(
_(
"Super admin can not be set because it is not enabled in the configuration."));
85 source.
Reply(
_(
"You are now a super admin."));
91 source.
Reply(
_(
"You are no longer a super admin."));
95 source.
Reply(
_(
"Setting for super admin must be \002ON\002 or \002OFF\002."));
102 const Anope::string &setting = params.size() > 1 ? params[1] :
"";
114 source.
Reply(
_(
"Services are now in \002debug\002 mode."));
116 else if (setting.
equals_ci(
"OFF") || setting ==
"0")
120 source.
Reply(
_(
"Services are now in \002non-debug\002 mode."));
128 source.
Reply(
_(
"Services are now in \002debug\002 mode (level %d)."), Anope::Debug);
133 source.
Reply(
_(
"Setting for DEBUG must be \002ON\002, \002OFF\002, or a positive number."));
141 const Anope::string &setting = params.size() > 1 ? params[1] :
"";
153 source.
Reply(
_(
"Services are now in \002no expire\002 mode."));
159 source.
Reply(
_(
"Services are now in \002expire\002 mode."));
162 source.
Reply(
_(
"Setting for NOEXPIRE must be \002ON\002 or \002OFF\002."));
169 this->
SetDesc(
_(
"Set various global Services options"));
170 this->
SetSyntax(
_(
"\037option\037 \037setting\037"));
178 return this->
DoList(source);
195 if (subcommand.empty())
199 source.Reply(
_(
"Sets various global Services options. Option names\n" 200 "currently defined are:\n" 201 " READONLY Set read-only or read-write mode\n" 202 " DEBUG Activate or deactivate debug mode\n" 203 " NOEXPIRE Activate or deactivate no expire mode\n" 204 " SUPERADMIN Activate or deactivate super admin mode\n" 205 " LIST List the options"));
207 else if (subcommand.equals_ci(
"LIST"))
208 source.Reply(
_(
"Syntax: \002LIST\002\n" 210 "Display the various %s settings."), source.service->nick.c_str());
211 else if (subcommand.equals_ci(
"READONLY"))
212 source.Reply(
_(
"Syntax: \002READONLY {ON | OFF}\002\n" 214 "Sets read-only mode on or off. In read-only mode, normal\n" 215 "users will not be allowed to modify any Services data,\n" 216 "including channel and nickname access lists, etc. IRCops\n" 217 "with sufficient Services privileges will be able to modify\n" 218 "Services' AKILL, SQLINE, SNLINE and ignore lists, drop,\n" 219 "suspend or forbid nicknames and channels, and manage news,\n" 220 "oper info and DNS, but any such changes will not be saved\n" 221 "unless read-only mode is deactivated before Services are\n" 222 "terminated or restarted.\n" 224 "This option is equivalent to the command-line option\n" 225 "\002--readonly\002."));
226 else if (subcommand.equals_ci(
"DEBUG"))
227 source.Reply(
_(
"Syntax: \002DEBUG {ON | OFF}\002\n" 229 "Sets debug mode on or off.\n" 231 "This option is equivalent to the command-line option\n" 232 "\002--debug\002."));
233 else if (subcommand.equals_ci(
"NOEXPIRE"))
234 source.Reply(
_(
"Syntax: \002NOEXPIRE {ON | OFF}\002\n" 236 "Sets no expire mode on or off. In no expire mode, nicks,\n" 237 "channels, akills and exceptions won't expire until the\n" 240 "This option is equivalent to the command-line option\n" 241 "\002--noexpire\002."));
242 else if (subcommand.equals_ci(
"SUPERADMIN"))
243 source.Reply(
_(
"Syntax: \002SUPERADMIN {ON | OFF}\002\n" 245 "Setting this will grant you extra privileges such as the\n" 246 "ability to be \"founder\" on all channel's etc...\n" 248 "This option is \002not\002 persistent, and should only be used when\n" 249 "needed, and set back to OFF when no longer needed."));
CommandOSSet commandosset
void SetDesc(const Anope::string &d)
void DoSetReadOnly(CommandSource &source, const std::vector< Anope::string > ¶ms)
void DoSetSuperAdmin(CommandSource &source, const std::vector< Anope::string > ¶ms)
CommandOSSet(Module *creator)
virtual void OnSyntaxError(CommandSource &source, const Anope::string &subcommand)
void Reply(const char *message,...)
void Execute(CommandSource &source, const std::vector< Anope::string > ¶ms) anope_override
void DoList(CommandSource &source)
const char * c_str() const
void SetSyntax(const Anope::string &s)
bool equals_ci(const char *_str) const
OSSet(const Anope::string &modname, const Anope::string &creator)
void SendSyntax(CommandSource &)
bool OnHelp(CommandSource &source, const Anope::string &subcommand) anope_override
void DoSetNoExpire(CommandSource &source, const std::vector< Anope::string > ¶ms)
void DoSetDebug(CommandSource &source, const std::vector< Anope::string > ¶ms)