mirror of
https://github.com/anope/anope.git
synced 2026-07-10 14:23:14 +02:00
Moved the language strings which are only used once
out of the core and into the modules that use them.
This commit is contained in:
+37
-10
@@ -77,17 +77,22 @@ class CommandNSAList : public Command
|
||||
}
|
||||
|
||||
if (!na)
|
||||
source.Reply(NICK_X_NOT_REGISTERED, nick.c_str());
|
||||
source.Reply(LanguageString::NICK_X_NOT_REGISTERED, nick.c_str());
|
||||
else if (na->HasFlag(NS_FORBIDDEN))
|
||||
source.Reply(NICK_X_FORBIDDEN, na->nick.c_str());
|
||||
source.Reply(LanguageString::NICK_X_FORBIDDEN, na->nick.c_str());
|
||||
else if (min_level <= ACCESS_INVALID || min_level > ACCESS_FOUNDER)
|
||||
source.Reply(CHAN_ACCESS_LEVEL_RANGE, ACCESS_INVALID + 1, ACCESS_FOUNDER - 1);
|
||||
source.Reply(LanguageString::CHAN_ACCESS_LEVEL_RANGE, ACCESS_INVALID + 1, ACCESS_FOUNDER - 1);
|
||||
else
|
||||
{
|
||||
int chan_count = 0;
|
||||
int match_count = 0;
|
||||
|
||||
source.Reply(is_servadmin ? NICK_ALIST_HEADER_X : NICK_ALIST_HEADER, na->nick.c_str());
|
||||
if (is_servadmin)
|
||||
source.Reply(_("Channels that \002%s\002 has access on:\n"
|
||||
" Num Channel Level Description"), na->nick.c_str());
|
||||
else
|
||||
source.Reply(_("Channels that you have access on:\n"
|
||||
" Num Channel Level Description"));
|
||||
|
||||
for (registered_channel_map::const_iterator it = RegisteredChannelList.begin(), it_end = RegisteredChannelList.end(); it != it_end; ++it)
|
||||
{
|
||||
@@ -107,14 +112,14 @@ class CommandNSAList : public Command
|
||||
{
|
||||
Anope::string xop = get_xop_level(access->level);
|
||||
|
||||
source.Reply(NICK_ALIST_XOP_FORMAT, match_count, ci->HasFlag(CI_NO_EXPIRE) ? '!' : ' ', ci->name.c_str(), xop.c_str(), !ci->desc.empty() ? ci->desc.c_str() : "");
|
||||
source.Reply(_(" %3d %c%-20s %-8s %s"), match_count, ci->HasFlag(CI_NO_EXPIRE) ? '!' : ' ', ci->name.c_str(), xop.c_str(), !ci->desc.empty() ? ci->desc.c_str() : "");
|
||||
}
|
||||
else
|
||||
source.Reply(NICK_ALIST_ACCESS_FORMAT, match_count, ci->HasFlag(CI_NO_EXPIRE) ? '!' : ' ', ci->name.c_str(), access->level, !ci->desc.empty() ? ci->desc.c_str() : "");
|
||||
source.Reply(_(" %3d %c%-20s %-8d %s"), match_count, ci->HasFlag(CI_NO_EXPIRE) ? '!' : ' ', ci->name.c_str(), access->level, !ci->desc.empty() ? ci->desc.c_str() : "");
|
||||
}
|
||||
}
|
||||
|
||||
source.Reply(NICK_ALIST_FOOTER, match_count, chan_count);
|
||||
source.Reply(_("End of list - %d/%d channels shown."), match_count, chan_count);
|
||||
}
|
||||
return MOD_CONT;
|
||||
}
|
||||
@@ -123,16 +128,38 @@ class CommandNSAList : public Command
|
||||
{
|
||||
User *u = source.u;
|
||||
if (u->Account() && u->Account()->IsServicesOper())
|
||||
source.Reply(NICK_SERVADMIN_HELP_ALIST);
|
||||
source.Reply(_("Syntax: \002ALIST [\037nickname\037] [\037level\037]\002\n"
|
||||
" \n"
|
||||
"With no parameters, lists channels you have access on. With\n"
|
||||
"one parameter, lists channels that \002nickname\002 has access \n"
|
||||
"on. With two parameters lists channels that \002nickname\002 has \n"
|
||||
"\002level\002 access or greater on.\n"
|
||||
"This use limited to \002Services Operators\002."));
|
||||
else
|
||||
source.Reply(NICK_HELP_ALIST);
|
||||
source.Reply(_("Syntax: \002ALIST [\037level\037]\002\n"
|
||||
" \n"
|
||||
"Lists all channels you have access on. Optionally, you can specify\n"
|
||||
"a level in XOP or ACCESS format. The resulting list will only\n"
|
||||
"include channels where you have the given level of access.\n"
|
||||
"Examples:\n"
|
||||
" \002ALIST Founder\002\n"
|
||||
" Lists all channels where you have Founder\n"
|
||||
" access.\n"
|
||||
" \002ALIST AOP\002\n"
|
||||
" Lists all channels where you have AOP\n"
|
||||
" access or greater.\n"
|
||||
" \002ALIST 10\002\n"
|
||||
" Lists all channels where you have level 10\n"
|
||||
" access or greater.\n"
|
||||
"Channels that have the \037NOEXPIRE\037 option set will be\n"
|
||||
"prefixed by an exclamation mark."));
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
void OnServHelp(CommandSource &source)
|
||||
{
|
||||
source.Reply(NICK_HELP_CMD_ALIST);
|
||||
source.Reply(_(" ALIST List channels you have access on"));
|
||||
}
|
||||
};
|
||||
|
||||
|
||||
Reference in New Issue
Block a user