summaryrefslogtreecommitdiff
path: root/modules
diff options
context:
space:
mode:
authorAdam <Adam@anope.org>2011-02-04 15:30:31 -0500
committerAdam <Adam@anope.org>2011-02-04 15:30:31 -0500
commit08583dc107974252312fb7c87532c9deb68e7f63 (patch)
tree0c42ec7422752cabd8352b49be976b4dc100c56c /modules
parentc362a1e077d5ede9eadbe79483f2a755b5883e9a (diff)
Moved the language strings which are only used once
out of the core and into the modules that use them.
Diffstat (limited to 'modules')
-rw-r--r--modules/CMakeLists.txt7
-rw-r--r--modules/core/bs_act.cpp15
-rw-r--r--modules/core/bs_assign.cpp22
-rw-r--r--modules/core/bs_badwords.cpp75
-rw-r--r--modules/core/bs_bot.cpp94
-rw-r--r--modules/core/bs_botlist.cpp21
-rw-r--r--modules/core/bs_help.cpp13
-rw-r--r--modules/core/bs_info.cpp114
-rw-r--r--modules/core/bs_kick.cpp213
-rw-r--r--modules/core/bs_say.cpp14
-rw-r--r--modules/core/bs_set.cpp149
-rw-r--r--modules/core/bs_unassign.cpp22
-rw-r--r--modules/core/cs_access.cpp212
-rw-r--r--modules/core/cs_akick.cpp108
-rw-r--r--modules/core/cs_ban.cpp23
-rw-r--r--modules/core/cs_clearusers.cpp17
-rw-r--r--modules/core/cs_clone.cpp27
-rw-r--r--modules/core/cs_drop.cpp24
-rw-r--r--modules/core/cs_forbid.cpp21
-rw-r--r--modules/core/cs_getkey.cpp14
-rw-r--r--modules/core/cs_help.cpp17
-rw-r--r--modules/core/cs_info.cpp71
-rw-r--r--modules/core/cs_invite.cpp23
-rw-r--r--modules/core/cs_kick.cpp23
-rw-r--r--modules/core/cs_list.cpp43
-rw-r--r--modules/core/cs_mode.cpp48
-rw-r--r--modules/core/cs_modes.cpp144
-rw-r--r--modules/core/cs_register.cpp41
-rw-r--r--modules/core/cs_saset.cpp22
-rw-r--r--modules/core/cs_saset_noexpire.cpp13
-rw-r--r--modules/core/cs_set.cpp24
-rw-r--r--modules/core/cs_set_bantype.cpp28
-rw-r--r--modules/core/cs_set_description.cpp19
-rw-r--r--modules/core/cs_set_founder.cpp27
-rw-r--r--modules/core/cs_set_keeptopic.cpp24
-rw-r--r--modules/core/cs_set_opnotice.cpp23
-rw-r--r--modules/core/cs_set_peace.cpp23
-rw-r--r--modules/core/cs_set_persist.cpp37
-rw-r--r--modules/core/cs_set_private.cpp22
-rw-r--r--modules/core/cs_set_restricted.cpp22
-rw-r--r--modules/core/cs_set_secure.cpp24
-rw-r--r--modules/core/cs_set_securefounder.cpp26
-rw-r--r--modules/core/cs_set_secureops.cpp22
-rw-r--r--modules/core/cs_set_signkick.cpp30
-rw-r--r--modules/core/cs_set_successor.cpp34
-rw-r--r--modules/core/cs_set_topiclock.cpp23
-rw-r--r--modules/core/cs_set_xop.cpp39
-rw-r--r--modules/core/cs_status.cpp19
-rw-r--r--modules/core/cs_suspend.cpp37
-rw-r--r--modules/core/cs_topic.cpp19
-rw-r--r--modules/core/cs_unban.cpp22
-rw-r--r--modules/core/cs_xop.cpp390
-rw-r--r--modules/core/hs_del.cpp14
-rw-r--r--modules/core/hs_delall.cpp14
-rw-r--r--modules/core/hs_group.cpp14
-rw-r--r--modules/core/hs_help.cpp2
-rw-r--r--modules/core/hs_list.cpp31
-rw-r--r--modules/core/hs_off.cpp11
-rw-r--r--modules/core/hs_on.cpp13
-rw-r--r--modules/core/hs_set.cpp31
-rw-r--r--modules/core/hs_setall.cpp32
-rw-r--r--modules/core/ms_cancel.cpp17
-rw-r--r--modules/core/ms_check.cpp19
-rw-r--r--modules/core/ms_del.cpp39
-rw-r--r--modules/core/ms_help.cpp13
-rw-r--r--modules/core/ms_ignore.cpp27
-rw-r--r--modules/core/ms_info.cpp95
-rw-r--r--modules/core/ms_list.cpp39
-rw-r--r--modules/core/ms_read.cpp33
-rw-r--r--modules/core/ms_rsend.cpp20
-rw-r--r--modules/core/ms_send.cpp11
-rw-r--r--modules/core/ms_sendall.cpp11
-rw-r--r--modules/core/ms_set.cpp121
-rw-r--r--modules/core/ms_staff.cpp11
-rw-r--r--modules/core/ns_access.cpp53
-rw-r--r--modules/core/ns_ajoin.cpp24
-rw-r--r--modules/core/ns_alist.cpp47
-rw-r--r--modules/core/ns_drop.cpp52
-rw-r--r--modules/core/ns_forbid.cpp21
-rw-r--r--modules/core/ns_getemail.cpp14
-rw-r--r--modules/core/ns_getpass.cpp23
-rw-r--r--modules/core/ns_ghost.cpp35
-rw-r--r--modules/core/ns_group.cpp112
-rw-r--r--modules/core/ns_help.cpp24
-rw-r--r--modules/core/ns_identify.cpp36
-rw-r--r--modules/core/ns_info.cpp66
-rw-r--r--modules/core/ns_list.cpp64
-rw-r--r--modules/core/ns_logout.cpp30
-rw-r--r--modules/core/ns_recover.cpp49
-rw-r--r--modules/core/ns_register.cpp124
-rw-r--r--modules/core/ns_release.cpp34
-rw-r--r--modules/core/ns_resetpass.cpp34
-rw-r--r--modules/core/ns_saset.cpp55
-rw-r--r--modules/core/ns_saset_noexpire.cpp13
-rw-r--r--modules/core/ns_sendpass.cpp34
-rw-r--r--modules/core/ns_set.cpp53
-rw-r--r--modules/core/ns_set_autoop.cpp23
-rw-r--r--modules/core/ns_set_email.cpp24
-rw-r--r--modules/core/ns_set_greet.cpp22
-rw-r--r--modules/core/ns_set_hide.cpp50
-rw-r--r--modules/core/ns_set_kill.cpp48
-rw-r--r--modules/core/ns_set_language.cpp38
-rw-r--r--modules/core/ns_set_message.cpp26
-rw-r--r--modules/core/ns_set_private.cpp27
-rw-r--r--modules/core/ns_set_secure.cpp32
-rw-r--r--modules/core/ns_status.cpp33
-rw-r--r--modules/core/ns_suspend.cpp34
-rw-r--r--modules/core/ns_update.cpp9
-rw-r--r--modules/core/os_akill.cpp99
-rw-r--r--modules/core/os_chankill.cpp13
-rw-r--r--modules/core/os_chanlist.cpp23
-rw-r--r--modules/core/os_defcon.cpp51
-rw-r--r--modules/core/os_global.cpp9
-rw-r--r--modules/core/os_help.cpp4
-rw-r--r--modules/core/os_ignore.cpp36
-rw-r--r--modules/core/os_jupe.cpp19
-rw-r--r--modules/core/os_kick.cpp19
-rw-r--r--modules/core/os_mode.cpp14
-rw-r--r--modules/core/os_modinfo.cpp14
-rw-r--r--modules/core/os_modlist.cpp28
-rw-r--r--modules/core/os_modload.cpp15
-rw-r--r--modules/core/os_modreload.cpp20
-rw-r--r--modules/core/os_modunload.cpp19
-rw-r--r--modules/core/os_news.cpp139
-rw-r--r--modules/core/os_noop.cpp21
-rw-r--r--modules/core/os_oline.cpp19
-rw-r--r--modules/core/os_quit.cpp10
-rw-r--r--modules/core/os_reload.cpp10
-rw-r--r--modules/core/os_restart.cpp7
-rw-r--r--modules/core/os_session.cpp123
-rw-r--r--modules/core/os_set.cpp92
-rw-r--r--modules/core/os_shutdown.cpp6
-rw-r--r--modules/core/os_snline.cpp96
-rw-r--r--modules/core/os_sqline.cpp97
-rw-r--r--modules/core/os_staff.cpp16
-rw-r--r--modules/core/os_stats.cpp145
-rw-r--r--modules/core/os_svsnick.cpp22
-rw-r--r--modules/core/os_szline.cpp92
-rw-r--r--modules/core/os_umode.cpp16
-rw-r--r--modules/core/os_update.cpp10
-rw-r--r--modules/core/os_userlist.cpp24
-rw-r--r--modules/extra/cs_appendtopic.cpp4
-rw-r--r--modules/extra/cs_enforce.cpp8
-rw-r--r--modules/extra/cs_entrymsg.cpp50
-rw-r--r--modules/extra/cs_set_misc.cpp8
-rw-r--r--modules/extra/cs_tban.cpp10
-rw-r--r--modules/extra/db_mysql.cpp10
-rw-r--r--modules/extra/db_mysql_live.cpp2
-rw-r--r--modules/extra/hs_request.cpp20
-rw-r--r--modules/extra/language/CMakeLists.txt38
-rw-r--r--modules/extra/language/cs_appendtopic.de_DE.po37
-rw-r--r--modules/extra/language/cs_appendtopic.it_IT.po38
-rw-r--r--modules/extra/language/cs_appendtopic.nl_NL.po37
-rw-r--r--modules/extra/language/cs_appendtopic.pot32
-rw-r--r--modules/extra/language/cs_appendtopic.pt_PT.po35
-rw-r--r--modules/extra/language/cs_appendtopic.ru_RU.po40
-rw-r--r--modules/extra/language/cs_enforce.de_DE.po85
-rw-r--r--modules/extra/language/cs_enforce.it_IT.po85
-rw-r--r--modules/extra/language/cs_enforce.nl_NL.po88
-rw-r--r--modules/extra/language/cs_enforce.pot64
-rw-r--r--modules/extra/language/cs_enforce.pt_PT.po87
-rw-r--r--modules/extra/language/cs_enforce.ru_RU.po89
-rw-r--r--modules/extra/language/cs_entrymsg.pot71
-rw-r--r--modules/extra/language/cs_tban.de_DE.po39
-rw-r--r--modules/extra/language/cs_tban.it_IT.po40
-rw-r--r--modules/extra/language/cs_tban.nl_NL.po40
-rw-r--r--modules/extra/language/cs_tban.pot36
-rw-r--r--modules/extra/language/cs_tban.pt_PT.po39
-rw-r--r--modules/extra/language/cs_tban.ru_RU.po41
-rw-r--r--modules/extra/language/db_mysql.pot34
-rw-r--r--modules/extra/language/hs_request.it_IT.po135
-rw-r--r--modules/extra/language/hs_request.nl_NL.po136
-rw-r--r--modules/extra/language/hs_request.pot126
-rw-r--r--modules/extra/language/hs_request.pt_PT.po134
-rw-r--r--modules/extra/language/hs_request.ru_RU.po137
-rw-r--r--modules/extra/language/ns_maxemail.de_DE.po28
-rw-r--r--modules/extra/language/ns_maxemail.it_IT.po32
-rw-r--r--modules/extra/language/ns_maxemail.nl_NL.po28
-rw-r--r--modules/extra/language/ns_maxemail.pot26
-rw-r--r--modules/extra/language/ns_maxemail.pt_PT.po28
-rw-r--r--modules/extra/language/ns_maxemail.ru_RU.po30
-rwxr-xr-xmodules/extra/language/update.sh14
-rw-r--r--modules/extra/ns_set_misc.cpp8
183 files changed, 5848 insertions, 2114 deletions
diff --git a/modules/CMakeLists.txt b/modules/CMakeLists.txt
index a9a73e775..0ee3806d0 100644
--- a/modules/CMakeLists.txt
+++ b/modules/CMakeLists.txt
@@ -1,3 +1,5 @@
+add_subdirectory("extra/language")
+
# Get a list of ALL files and directories within the current directory
file(GLOB MODULES_FOLDERS RELATIVE ${CMAKE_CURRENT_SOURCE_DIR} "*")
remove_item_from_list(MODULES_FOLDERS "CMakeFiles")
@@ -75,7 +77,7 @@ foreach(MODULE_FOLDER ${MODULES_FOLDERS})
set(WIN32_NO_LIBS)
endif(WIN32)
set_target_properties(${SO} PROPERTIES LINKER_LANGUAGE CXX PREFIX "" SUFFIX "" LINK_FLAGS "${TEMP_LDFLAGS} ${WIN32_NO_LIBS}")
- add_dependencies(${SO} ${PROGRAM_NAME})
+ add_dependencies(${SO} ${PROGRAM_NAME} module_language)
# For Windows only, have the module link to the export library of Anope as well as wsock32 and Ws2_32 libraries (most of the modules probably don't need this, but this is to be on the safe side), also set it's version
if(WIN32)
target_link_libraries(${SO} ${PROGRAM_NAME} wsock32 Ws2_32 ${WIN32_MEMORY} ${TEMP_DEPENDENCIES})
@@ -92,6 +94,7 @@ foreach(MODULE_FOLDER ${MODULES_FOLDERS})
# Get a list of ALL files and directories within this modules directory
file(GLOB SUBMODULE_DIRS RELATIVE ${CMAKE_CURRENT_SOURCE_DIR} "${MODULE_FOLDER}/*")
remove_item_from_list(SUBMODULE_DIRS "CMakeFiles")
+ remove_item_from_list(SUBMODULE_DIRS "extra/language")
foreach(SUBDIR ${SUBMODULE_DIRS})
if(IS_DIRECTORY "${CMAKE_CURRENT_SOURCE_DIR}/${SUBDIR}")
@@ -169,7 +172,7 @@ foreach(MODULE_FOLDER ${MODULES_FOLDERS})
# Generate the module and set it's linker flags, also set it to depend on the main Anope executable to be built beforehand
add_library(${SO} MODULE ${MODULES_SUBDIR_SRCS})
set_target_properties(${SO} PROPERTIES LINKER_LANGUAGE CXX PREFIX "" SUFFIX "" LINK_FLAGS "${SUBDIR_LDFLAGS}")
- add_dependencies(${SO} ${PROGRAM_NAME})
+ add_dependencies(${SO} ${PROGRAM_NAME} module_language)
# For Windows only, have the module link to the export library of Anope as well as wsock32 and Ws2_32 libraries (most of the modules probably don't need this, but this is to be on the safe side), also set it's version
if(WIN32)
target_link_libraries(${SO} ${PROGRAM_NAME} wsock32 Ws2_32 ${WIN32_MEMORY} ${SUBDIR_EXTRA_DEPENDS})
diff --git a/modules/core/bs_act.cpp b/modules/core/bs_act.cpp
index c1710c26b..b29e99fac 100644
--- a/modules/core/bs_act.cpp
+++ b/modules/core/bs_act.cpp
@@ -28,19 +28,19 @@ class CommandBSAct : public Command
if (!check_access(u, ci, CA_SAY))
{
- source.Reply(ACCESS_DENIED);
+ source.Reply(LanguageString::ACCESS_DENIED);
return MOD_CONT;
}
if (!ci->bi)
{
- source.Reply(BOT_NOT_ASSIGNED);
+ source.Reply(LanguageString::BOT_NOT_ASSIGNED);
return MOD_CONT;
}
if (!ci->c || !ci->c->FindUser(ci->bi))
{
- source.Reply(BOT_NOT_ON_CHANNEL, ci->name.c_str());
+ source.Reply(LanguageString::BOT_NOT_ON_CHANNEL, ci->name.c_str());
return MOD_CONT;
}
@@ -59,18 +59,21 @@ class CommandBSAct : public Command
void OnSyntaxError(CommandSource &source, const Anope::string &subcommand)
{
- SyntaxError(source, "ACT", BOT_ACT_SYNTAX);
+ SyntaxError(source, "ACT", _("ACT \037channel\037 \037text\037"));
}
bool OnHelp(CommandSource &source, const Anope::string &subcommand)
{
- source.Reply(BOT_HELP_ACT);
+ source.Reply(_("Syntax: \002ACT \037channel\037 \037text\037\002\n"
+ " \n"
+ "Makes the bot do the equivalent of a \"/me\" command\n"
+ "on the given channel using the given text."));
return true;
}
void OnServHelp(CommandSource &source)
{
- source.Reply(BOT_HELP_CMD_ACT);
+ source.Reply(_(" ACT Makes the bot do the equivalent of a \"/me\" command"));
}
};
diff --git a/modules/core/bs_assign.cpp b/modules/core/bs_assign.cpp
index 38762259d..4a32c4330 100644
--- a/modules/core/bs_assign.cpp
+++ b/modules/core/bs_assign.cpp
@@ -29,32 +29,32 @@ class CommandBSAssign : public Command
if (readonly)
{
- source.Reply(BOT_ASSIGN_READONLY);
+ source.Reply(LanguageString::BOT_ASSIGN_READONLY);
return MOD_CONT;
}
BotInfo *bi = findbot(nick);
if (!bi)
{
- source.Reply(BOT_DOES_NOT_EXIST, nick.c_str());
+ source.Reply(LanguageString::BOT_DOES_NOT_EXIST, nick.c_str());
return MOD_CONT;
}
if (ci->botflags.HasFlag(BS_NOBOT) || (!check_access(u, ci, CA_ASSIGN) && !u->Account()->HasPriv("botserv/administration")))
{
- source.Reply(ACCESS_DENIED);
+ source.Reply(LanguageString::ACCESS_DENIED);
return MOD_CONT;
}
if (bi->HasFlag(BI_PRIVATE) && !u->Account()->HasCommand("botserv/assign/private"))
{
- source.Reply(ACCESS_DENIED);
+ source.Reply(LanguageString::ACCESS_DENIED);
return MOD_CONT;
}
if (ci->bi && nick.equals_ci(ci->bi->nick))
{
- source.Reply(BOT_ASSIGN_ALREADY, ci->bi->nick.c_str(), chan.c_str());
+ source.Reply(_("Bot \002%s\002 is already assigned to channel \002%s\002."), ci->bi->nick.c_str(), chan.c_str());
return MOD_CONT;
}
@@ -62,24 +62,28 @@ class CommandBSAssign : public Command
Log(override ? LOG_OVERRIDE : LOG_COMMAND, u, this, ci) << "for " << bi->nick;
bi->Assign(u, ci);
- source.Reply(BOT_ASSIGN_ASSIGNED, bi->nick.c_str(), ci->name.c_str());
+ source.Reply(_("Bot \002%s\002 has been assigned to %s."), bi->nick.c_str(), ci->name.c_str());
return MOD_CONT;
}
bool OnHelp(CommandSource &source, const Anope::string &subcommand)
{
- source.Reply(BOT_HELP_ASSIGN);
+ source.Reply(_("Syntax: \002ASSIGN \037chan\037 \037nick\037\002\n"
+ " \n"
+ "Assigns a bot pointed out by nick to the channel chan. You\n"
+ "can then configure the bot for the channel so it fits\n"
+ "your needs."));
return true;
}
void OnSyntaxError(CommandSource &source, const Anope::string &subcommand)
{
- SyntaxError(source, "ASSIGN", BOT_ASSIGN_SYNTAX);
+ SyntaxError(source, "ASSIGN", _("ASSIGN \037chan\037 \037nick\037"));
}
void OnServHelp(CommandSource &source)
{
- source.Reply(BOT_HELP_CMD_ASSIGN);
+ source.Reply(_(" ASSIGN Assigns a bot to a channel"));
}
};
diff --git a/modules/core/bs_badwords.cpp b/modules/core/bs_badwords.cpp
index a9b0474c8..5c6dc3efd 100644
--- a/modules/core/bs_badwords.cpp
+++ b/modules/core/bs_badwords.cpp
@@ -25,7 +25,7 @@ class BadwordsListCallback : public NumberList
~BadwordsListCallback()
{
if (!SentHeader)
- source.Reply(BOT_BADWORDS_NO_MATCH, source.ci->name.c_str());
+ source.Reply(_("No matching entries on %s bad words list."), source.ci->name.c_str());
}
void HandleNumber(unsigned Number)
@@ -36,7 +36,8 @@ class BadwordsListCallback : public NumberList
if (!SentHeader)
{
SentHeader = true;
- source.Reply(BOT_BADWORDS_LIST_HEADER, source.ci->name.c_str());
+ source.Reply(_("Bad words list for %s:\n"
+ " Num Word Type"), source.ci->name.c_str());
}
DoList(source, Number - 1, source.ci->GetBadWord(Number - 1));
@@ -44,7 +45,7 @@ class BadwordsListCallback : public NumberList
static void DoList(CommandSource &source, unsigned Number, BadWord *bw)
{
- source.Reply(BOT_BADWORDS_LIST_FORMAT, Number + 1, bw->word.c_str(), bw->type == BW_SINGLE ? "(SINGLE)" : (bw->type == BW_START ? "(START)" : (bw->type == BW_END ? "(END)" : "")));
+ source.Reply(_(" %3d %-30s %s"), Number + 1, bw->word.c_str(), bw->type == BW_SINGLE ? "(SINGLE)" : (bw->type == BW_START ? "(START)" : (bw->type == BW_END ? "(END)" : "")));
}
};
@@ -64,11 +65,11 @@ class BadwordsDelCallback : public NumberList
~BadwordsDelCallback()
{
if (!Deleted)
- source.Reply(BOT_BADWORDS_NO_MATCH, source.ci->name.c_str());
+ source.Reply(_("No matching entries on %s bad words list."), source.ci->name.c_str());
else if (Deleted == 1)
- source.Reply(BOT_BADWORDS_DELETED_ONE, source.ci->name.c_str());
+ source.Reply(_("Deleted 1 entry from %s bad words list."), source.ci->name.c_str());
else
- source.Reply(BOT_BADWORDS_DELETED_SEVERAL, Deleted, source.ci->name.c_str());
+ source.Reply(_("Deleted %d entries from %s bad words list."), Deleted, source.ci->name.c_str());
}
void HandleNumber(unsigned Number)
@@ -92,7 +93,7 @@ class CommandBSBadwords : public Command
Log(override ? LOG_OVERRIDE : LOG_COMMAND, source.u, this, ci) << "LIST";
if (!ci->GetBadWordCount())
- source.Reply(BOT_BADWORDS_LIST_EMPTY, ci->name.c_str());
+ source.Reply(_("%s bad words list is empty."), ci->name.c_str());
else if (!word.empty() && word.find_first_not_of("1234567890,-") == Anope::string::npos)
{
BadwordsListCallback list(source, word);
@@ -112,14 +113,16 @@ class CommandBSBadwords : public Command
if (!SentHeader)
{
SentHeader = true;
- source.Reply(BOT_BADWORDS_LIST_HEADER, ci->name.c_str());
+ source.Reply(_("Bad words list for %s:\n"
+ " Num Word Type"), ci->name.c_str());
+
}
BadwordsListCallback::DoList(source, i, bw);
}
if (!SentHeader)
- source.Reply(BOT_BADWORDS_NO_MATCH, ci->name.c_str());
+ source.Reply(_("No matching entries on %s bad words list."), ci->name.c_str());
}
return MOD_CONT;
@@ -149,7 +152,7 @@ class CommandBSBadwords : public Command
if (ci->GetBadWordCount() >= Config->BSBadWordsMax)
{
- source.Reply(BOT_BADWORDS_REACHED_LIMIT, Config->BSBadWordsMax);
+ source.Reply(_("Sorry, you can only have %d bad words entries on a channel."), Config->BSBadWordsMax);
return MOD_CONT;
}
@@ -159,7 +162,7 @@ class CommandBSBadwords : public Command
if (!bw->word.empty() && ((Config->BSCaseSensitive && realword.equals_cs(bw->word)) || (!Config->BSCaseSensitive && realword.equals_ci(bw->word))))
{
- source.Reply(BOT_BADWORDS_ALREADY_EXISTS, bw->word.c_str(), ci->name.c_str());
+ source.Reply(_("\002%s\002 already exists in %s bad words list."), bw->word.c_str(), ci->name.c_str());
return MOD_CONT;
}
}
@@ -168,7 +171,7 @@ class CommandBSBadwords : public Command
Log(override ? LOG_OVERRIDE : LOG_COMMAND, source.u, this, ci) << "ADD " << realword;
ci->AddBadWord(realword, type);
- source.Reply(BOT_BADWORDS_ADDED, realword.c_str(), ci->name.c_str());
+ source.Reply(_("\002%s\002 added to %s bad words list."), realword.c_str(), ci->name.c_str());
return MOD_CONT;
}
@@ -197,7 +200,7 @@ class CommandBSBadwords : public Command
if (i == end)
{
- source.Reply(BOT_BADWORDS_NOT_FOUND, word.c_str(), ci->name.c_str());
+ source.Reply(_("\002%s\002 not found on %s bad words list."), word.c_str(), ci->name.c_str());
return MOD_CONT;
}
@@ -205,7 +208,7 @@ class CommandBSBadwords : public Command
Log(override ? LOG_OVERRIDE : LOG_COMMAND, source.u, this, ci) << "DEL " << badword->word;
ci->EraseBadWord(i);
- source.Reply(BOT_BADWORDS_DELETED, badword->word.c_str(), ci->name.c_str());
+ source.Reply(_("\002%s\002 deleted from %s bad words list."), badword->word.c_str(), ci->name.c_str());
}
return MOD_CONT;
@@ -218,7 +221,7 @@ class CommandBSBadwords : public Command
Log(override ? LOG_OVERRIDE : LOG_COMMAND, source.u, this, ci) << "CLEAR";
ci->ClearBadWords();
- source.Reply(BOT_BADWORDS_CLEAR);
+ source.Reply(_("Bad words list is now empty."));
return MOD_CONT;
}
public:
@@ -242,13 +245,13 @@ class CommandBSBadwords : public Command
if (!check_access(u, ci, CA_BADWORDS) && (!need_args || !u->Account()->HasPriv("botserv/administration")))
{
- source.Reply(ACCESS_DENIED);
+ source.Reply(LanguageString::ACCESS_DENIED);
return MOD_CONT;
}
if (readonly)
{
- source.Reply(BOT_BADWORDS_DISABLED);
+ source.Reply(_("Sorry, channel bad words list modification is temporarily disabled."));
return MOD_CONT;
}
@@ -268,18 +271,50 @@ class CommandBSBadwords : public Command
bool OnHelp(CommandSource &source, const Anope::string &subcommand)
{
- source.Reply(BOT_HELP_BADWORDS);
+ source.Reply(_("Syntax: \002BADWORDS \037channel\037 ADD \037word\037 [\037SINGLE\037 | \037START\037 | \037END\037]\002\n"
+ " \002BADWORDS \037channel\037 DEL {\037word\037 | \037entry-num\037 | \037list\037}\002\n"
+ " \002BADWORDS \037channel\037 LIST [\037mask\037 | \037list\037]\002\n"
+ " \002BADWORDS \037channel\037 CLEAR\002\n"
+ " \n"
+ "Maintains the \002bad words list\002 for a channel. The bad\n"
+ "words list determines which words are to be kicked\n"
+ "when the bad words kicker is enabled. For more information,\n"
+ "type \002%R%S HELP KICK BADWORDS\002.\n"
+ " \n"
+ "The \002BADWORDS ADD\002 command adds the given word to the\n"
+ "badword list. If SINGLE is specified, a kick will be\n"
+ "done only if a user says the entire word. If START is \n"
+ "specified, a kick will be done if a user says a word\n"
+ "that starts with \037word\037. If END is specified, a kick\n"
+ "will be done if a user says a word that ends with\n"
+ "\037word\037. If you don't specify anything, a kick will\n"
+ "be issued every time \037word\037 is said by a user.\n"
+ " \n"
+ "The \002BADWORDS DEL\002 command removes the given word from the\n"
+ "bad words list. If a list of entry numbers is given, those\n"
+ "entries are deleted. (See the example for LIST below.)\n"
+ " \n"
+ "The \002BADWORDS LIST\002 command displays the bad words list. If\n"
+ "a wildcard mask is given, only those entries matching the\n"
+ "mask are displayed. If a list of entry numbers is given,\n"
+ "only those entries are shown; for example:\n"
+ " \002BADWORDS #channel LIST 2-5,7-9\002\n"
+ " Lists bad words entries numbered 2 through 5 and\n"
+ " 7 through 9.\n"
+ " \n"
+ "The \002BADWORDS CLEAR\002 command clears all entries of the\n"
+ "bad words list."));
return true;
}
void OnSyntaxError(CommandSource &source, const Anope::string &subcommand)
{
- SyntaxError(source, "BADWORDS", BOT_BADWORDS_SYNTAX);
+ SyntaxError(source, "BADWORDS", _("BADWORDS \037channel\037 {ADD|DEL|LIST|CLEAR} [\037word\037 | \037entry-list\037] [SINGLE|START|END]"));
}
void OnServHelp(CommandSource &source)
{
- source.Reply(BOT_HELP_CMD_BADWORDS);
+ source.Reply(_(" BADWORDS Maintains bad words list"));
}
};
diff --git a/modules/core/bs_bot.cpp b/modules/core/bs_bot.cpp
index 47db2c4ed..a2fa32f0b 100644
--- a/modules/core/bs_bot.cpp
+++ b/modules/core/bs_bot.cpp
@@ -26,60 +26,60 @@ class CommandBSBot : public Command
if (findbot(nick))
{
- source.Reply(BOT_BOT_ALREADY_EXISTS, nick.c_str());
+ source.Reply(_("Bot \002%s\002 already exists."), nick.c_str());
return MOD_CONT;
}
if (nick.length() > Config->NickLen)
{
- source.Reply(BOT_BAD_NICK);
+ source.Reply(_("Bot Nicks may only contain valid nick characters."));
return MOD_CONT;
}
if (user.length() > Config->UserLen)
{
- source.Reply(BOT_LONG_IDENT, Config->UserLen);
+ source.Reply(_("Bot Idents may only contain %d characters."), Config->UserLen);
return MOD_CONT;
}
if (host.length() > Config->HostLen)
{
- source.Reply(BOT_LONG_HOST, Config->HostLen);
+ source.Reply(_("Bot Hosts may only contain %d characters."), Config->HostLen);
return MOD_CONT;
}
/* Check the nick is valid re RFC 2812 */
if (isdigit(nick[0]) || nick[0] == '-')
{
- source.Reply(BOT_BAD_NICK);
+ source.Reply(_("Bot Nicks may only contain valid nick characters."));
return MOD_CONT;
}
for (unsigned i = 0, end = nick.length(); i < end && i < Config->NickLen; ++i)
if (!isvalidnick(nick[i]))
{
- source.Reply(BOT_BAD_NICK);
+ source.Reply(_("Bot Nicks may only contain valid nick characters."));
return MOD_CONT;
}
/* check for hardcored ircd forbidden nicks */
if (!ircdproto->IsNickValid(nick))
{
- source.Reply(BOT_BAD_NICK);
+ source.Reply(_("Bot Nicks may only contain valid nick characters."));
return MOD_CONT;
}
/* Check the host is valid re RFC 2812 */
if (!isValidHost(host, 3))
{
- source.Reply(BOT_BAD_HOST);
+ source.Reply(_("Bot Hosts may only contain valid host characters."));
return MOD_CONT;
}
for (unsigned i = 0, end = user.length(); i < end && i < Config->UserLen; ++i)
if (!isalnum(user[i]))
{
- source.Reply(BOT_BAD_IDENT, Config->UserLen);
+ source.Reply(_("Bot Idents may only contain valid characters."), Config->UserLen);
return MOD_CONT;
}
@@ -89,20 +89,20 @@ class CommandBSBot : public Command
*/
if (findnick(nick))
{
- source.Reply(NICK_ALREADY_REGISTERED, nick.c_str());
+ source.Reply(LanguageString::NICK_ALREADY_REGISTERED, nick.c_str());
return MOD_CONT;
}
if (!(bi = new BotInfo(nick, user, host, real)))
{
// XXX this cant happen?
- source.Reply(BOT_BOT_CREATION_FAILED);
+ source.Reply(_("Sorry, bot creation failed."));
return MOD_CONT;
}
Log(LOG_ADMIN, source.u, this) << "ADD " << bi->GetMask() << " " << bi->realname;
- source.Reply(BOT_BOT_ADDED, bi->nick.c_str(), bi->GetIdent().c_str(), bi->host.c_str(), bi->realname.c_str());
+ source.Reply(_("%s!%s@%s (%s) added to the bot list."), bi->nick.c_str(), bi->GetIdent().c_str(), bi->host.c_str(), bi->realname.c_str());
FOREACH_MOD(I_OnBotCreate, OnBotCreate(bi));
return MOD_CONT;
@@ -125,37 +125,37 @@ class CommandBSBot : public Command
if (!(bi = findbot(oldnick)))
{
- source.Reply(BOT_DOES_NOT_EXIST, oldnick.c_str());
+ source.Reply(LanguageString::BOT_DOES_NOT_EXIST, oldnick.c_str());
return MOD_CONT;
}
if (!oldnick.equals_ci(nick) && nickIsServices(oldnick, false))
{
- source.Reply(BOT_DOES_NOT_EXIST, oldnick.c_str());
+ source.Reply(LanguageString::BOT_DOES_NOT_EXIST, oldnick.c_str());
return MOD_CONT;
}
if (nick.length() > Config->NickLen)
{
- source.Reply(BOT_BAD_NICK);
+ source.Reply(_("Bot Nicks may only contain valid nick characters."));
return MOD_CONT;
}
if (!user.empty() && user.length() > Config->UserLen)
{
- source.Reply(BOT_LONG_IDENT, Config->UserLen);
+ source.Reply(_("Bot Idents may only contain %d characters."), Config->UserLen);
return MOD_CONT;
}
if (!host.empty() && host.length() > Config->HostLen)
{
- source.Reply(BOT_LONG_HOST, Config->HostLen);
+ source.Reply(_("Bot Hosts may only contain %d characters."), Config->HostLen);
return MOD_CONT;
}
if (!oldnick.equals_ci(nick) && nickIsServices(nick, false))
{
- source.Reply(BOT_DOES_NOT_EXIST, oldnick.c_str());
+ source.Reply(LanguageString::BOT_DOES_NOT_EXIST, oldnick.c_str());
return MOD_CONT;
}
@@ -166,34 +166,34 @@ class CommandBSBot : public Command
*/
if (nick.equals_cs(bi->nick) && (!user.empty() ? user.equals_cs(bi->GetIdent()) : 1) && (!host.empty() ? host.equals_cs(bi->host) : 1) && (!real.empty() ? real.equals_cs(bi->realname) : 1))
{
- source.Reply(BOT_BOT_ANY_CHANGES);
+ source.Reply(_("Old info is equal to the new one."));
return MOD_CONT;
}
/* Check the nick is valid re RFC 2812 */
if (isdigit(nick[0]) || nick[0] == '-')
{
- source.Reply(BOT_BAD_NICK);
+ source.Reply(_("Bot Nicks may only contain valid nick characters."));
return MOD_CONT;
}
for (unsigned i = 0, end = nick.length(); i < end && i < Config->NickLen; ++i)
if (!isvalidnick(nick[i]))
{
- source.Reply(BOT_BAD_NICK);
+ source.Reply(_("Bot Nicks may only contain valid nick characters."));
return MOD_CONT;
}
/* check for hardcored ircd forbidden nicks */
if (!ircdproto->IsNickValid(nick))
{
- source.Reply(BOT_BAD_NICK);
+ source.Reply(_("Bot Nicks may only contain valid nick characters."));
return MOD_CONT;
}
if (!host.empty() && !isValidHost(host, 3))
{
- source.Reply(BOT_BAD_HOST);
+ source.Reply(_("Bot Hosts may only contain valid host characters."));
return MOD_CONT;
}
@@ -201,13 +201,13 @@ class CommandBSBot : public Command
for (unsigned i = 0, end = user.length(); i < end && i < Config->UserLen; ++i)
if (!isalnum(user[i]))
{
- source.Reply(BOT_BAD_IDENT, Config->UserLen);
+ source.Reply(_("Bot Idents may only contain valid characters."), Config->UserLen);
return MOD_CONT;
}
if (!nick.equals_ci(bi->nick) && findbot(nick))
{
- source.Reply(BOT_BOT_ALREADY_EXISTS, nick.c_str());
+ source.Reply(_("Bot \002%s\002 already exists."), nick.c_str());
return MOD_CONT;
}
@@ -219,7 +219,7 @@ class CommandBSBot : public Command
*/
if (findnick(nick))
{
- source.Reply(NICK_ALREADY_REGISTERED, nick.c_str());
+ source.Reply(LanguageString::NICK_ALREADY_REGISTERED, nick.c_str());
return MOD_CONT;
}
@@ -262,7 +262,7 @@ class CommandBSBot : public Command
bi->RejoinAll();
}
- source.Reply(BOT_BOT_CHANGED, oldnick.c_str(), bi->nick.c_str(), bi->GetIdent().c_str(), bi->host.c_str(), bi->realname.c_str());
+ source.Reply(_("Bot \002%s\002 has been changed to %s!%s@%s (%s)"), oldnick.c_str(), bi->nick.c_str(), bi->GetIdent().c_str(), bi->host.c_str(), bi->realname.c_str());
Log(LOG_ADMIN, source.u, this) << "CHANGE " << oldnick << " to " << bi->GetMask() << " " << bi->realname;
FOREACH_MOD(I_OnBotChange, OnBotChange(bi));
@@ -282,13 +282,13 @@ class CommandBSBot : public Command
if (!(bi = findbot(nick)))
{
- source.Reply(BOT_DOES_NOT_EXIST, nick.c_str());
+ source.Reply(LanguageString::BOT_DOES_NOT_EXIST, nick.c_str());
return MOD_CONT;
}
if (nickIsServices(nick, false))
{
- source.Reply(BOT_DOES_NOT_EXIST, nick.c_str());
+ source.Reply(LanguageString::BOT_DOES_NOT_EXIST, nick.c_str());
return MOD_CONT;
}
@@ -296,7 +296,7 @@ class CommandBSBot : public Command
Log(LOG_ADMIN, source.u, this) << "DEL " << bi->nick;
- source.Reply(BOT_BOT_DELETED, nick.c_str());
+ source.Reply(_("Bot \002%s\002 has been deleted."), nick.c_str());
delete bi;
return MOD_CONT;
}
@@ -313,7 +313,7 @@ class CommandBSBot : public Command
if (readonly)
{
- source.Reply(BOT_BOT_READONLY);
+ source.Reply(_("Sorry, bot modification is temporarily disabled."));
return MOD_CONT;
}
@@ -322,7 +322,7 @@ class CommandBSBot : public Command
// ADD nick user host real - 5
if (!u->Account()->HasCommand("botserv/bot/add"))
{
- source.Reply(ACCESS_DENIED);
+ source.Reply(LanguageString::ACCESS_DENIED);
return MOD_CONT;
}
@@ -345,7 +345,7 @@ class CommandBSBot : public Command
// but only oldn and newn are required
if (!u->Account()->HasCommand("botserv/bot/change"))
{
- source.Reply(ACCESS_DENIED);
+ source.Reply(LanguageString::ACCESS_DENIED);
return MOD_CONT;
}
@@ -362,7 +362,7 @@ class CommandBSBot : public Command
// DEL nick
if (!u->Account()->HasCommand("botserv/bot/del"))
{
- source.Reply(ACCESS_DENIED);
+ source.Reply(LanguageString::ACCESS_DENIED);
return MOD_CONT;
}
@@ -382,18 +382,38 @@ class CommandBSBot : public Command
bool OnHelp(CommandSource &source, const Anope::string &subcommand)
{
- source.Reply(BOT_SERVADMIN_HELP_BOT);
+ source.Reply(_("Syntax: \002BOT ADD \037nick\037 \037user\037 \037host\037 \037real\037\002\n"
+ " \002BOT CHANGE \037oldnick\037 \037newnick\037 [\037user\037 [\037host\037 [\037real\037]]]\002\n"
+ " \002BOT DEL \037nick\037\002\n"
+ " \n"
+ "Allows Services Operators to create, modify, and delete\n"
+ "bots that users will be able to use on their own\n"
+ "channels.\n"
+ " \n"
+ "\002BOT ADD\002 adds a bot with the given nickname, username,\n"
+ "hostname and realname. Since no integrity checks are done \n"
+ "for these settings, be really careful.\n"
+ "\002BOT CHANGE\002 allows to change nickname, username, hostname\n"
+ "or realname of a bot without actually delete it (and all\n"
+ "the data associated with it).\n"
+ "\002BOT DEL\002 removes the given bot from the bot list. \n"
+ " \n"
+ "\002Note\002: you cannot create a bot that has a nick that is\n"
+ "currently registered. If an unregistered user is currently\n"
+ "using the nick, they will be killed."));
return true;
}
void OnSyntaxError(CommandSource &source, const Anope::string &subcommand)
{
- SyntaxError(source, "BOT", BOT_BOT_SYNTAX);
+ SyntaxError(source, "BOT", _("BOT ADD \037nick\037 \037user\037 \037host\037 \037real\037\n"
+ "\002BOT CHANGE \037oldnick\037 \037newnick\037 [\037user\037 [\037host\037 [\037real\037]]]\002\n"
+ "\002BOT DEL \037nick\037\002"));
}
void OnServHelp(CommandSource &source)
{
- source.Reply(BOT_HELP_CMD_BOT);
+ source.Reply(_(" BOT Maintains network bot list"));
}
};
diff --git a/modules/core/bs_botlist.cpp b/modules/core/bs_botlist.cpp
index 37901a4a0..5166e4365 100644
--- a/modules/core/bs_botlist.cpp
+++ b/modules/core/bs_botlist.cpp
@@ -25,12 +25,6 @@ class CommandBSBotList : public Command
User *u = source.u;
unsigned count = 0;
- if (BotListByNick.empty())
- {
- source.Reply(BOT_BOTLIST_EMPTY);
- return MOD_CONT;
- }
-
for (patricia_tree<BotInfo *, ci::ci_char_traits>::iterator it(BotListByNick); it.next();)
{
BotInfo *bi = *it;
@@ -38,7 +32,7 @@ class CommandBSBotList : public Command
if (!bi->HasFlag(BI_PRIVATE))
{
if (!count)
- source.Reply(BOT_BOTLIST_HEADER);
+ source.Reply(_("Bot list:"));
++count;
source.Reply(" %-15s (%s@%s)", bi->nick.c_str(), bi->GetIdent().c_str(), bi->host.c_str());
}
@@ -46,7 +40,7 @@ class CommandBSBotList : public Command
if (u->Account()->HasCommand("botserv/botlist") && count < BotListByNick.size())
{
- source.Reply(BOT_BOTLIST_PRIVATE_HEADER);
+ source.Reply(_("Bots reserved to IRC operators:"));
for (patricia_tree<BotInfo *, ci::ci_char_traits>::iterator it(BotListByNick); it.next();)
{
@@ -61,22 +55,25 @@ class CommandBSBotList : public Command
}
if (!count)
- source.Reply(BOT_BOTLIST_EMPTY);
+ source.Reply(_("There are no bots available at this time.\n"
+ "Ask a Services Operator to create one!"));
else
- source.Reply(BOT_BOTLIST_FOOTER, count);
+ source.Reply(_("%d bots available."), count);
return MOD_CONT;
}
bool OnHelp(CommandSource &source, const Anope::string &subcommand)
{
- source.Reply(BOT_HELP_BOTLIST);
+ source.Reply(_("Syntax: \002BOTLIST\002\n"
+ " \n"
+ "Lists all available bots on this network."));
return true;
}
void OnServHelp(CommandSource &source)
{
- source.Reply(BOT_HELP_CMD_BOTLIST);
+ source.Reply(_(" BOTLIST Lists available bots"));
}
};
diff --git a/modules/core/bs_help.cpp b/modules/core/bs_help.cpp
index 9c2998342..ff669e82a 100644
--- a/modules/core/bs_help.cpp
+++ b/modules/core/bs_help.cpp
@@ -32,11 +32,20 @@ class CommandBSHelp : public Command
{
// Abuse syntax error to display general list help.
User *u = source.u;
- source.Reply(BOT_HELP);
+ source.Reply(_("\002%S\002 allows you to have a bot on your own channel.\n"
+ "It has been created for users that can't host or\n"
+ "configure a bot, or for use on networks that don't\n"
+ "allow user bots. Available commands are listed \n"
+ "below; to use them, type \002%R%S \037command\037\002. For \n"
+ "more information on a specific command, type \002%R\n"
+ "%S HELP \037command\037\002."));
for (CommandMap::const_iterator it = BotServ->Commands.begin(), it_end = BotServ->Commands.end(); it != it_end; ++it)
if (!Config->HidePrivilegedCommands || it->second->permission.empty() || (u->Account() && u->Account()->HasCommand(it->second->permission)))
it->second->OnServHelp(source);
- source.Reply(BOT_HELP_FOOTER, Config->BSMinUsers, Config->s_ChanServ.c_str(), Config->BSFantasyCharacter[0]);
+ source.Reply(_("Bot will join a channel whenever there is at least\n"
+ "\002%d\002 user(s) on it. Additionally, all %s commands\n"
+ "can be used if fantasy is enabled by prefixing the command\n"
+ "name with a %c."), Config->BSMinUsers, Config->s_ChanServ.c_str(), Config->BSFantasyCharacter[0]);
}
};
diff --git a/modules/core/bs_info.cpp b/modules/core/bs_info.cpp
index f9dc499ed..123083f41 100644
--- a/modules/core/bs_info.cpp
+++ b/modules/core/bs_info.cpp
@@ -57,12 +57,12 @@ class CommandBSInfo : public Command
ChannelInfo *ci;
if (bi)
{
- source.Reply(BOT_INFO_BOT_HEADER, bi->nick.c_str());
- source.Reply(BOT_INFO_BOT_MASK, bi->GetIdent().c_str(), bi->host.c_str());
- source.Reply(BOT_INFO_BOT_REALNAME, bi->realname.c_str());
- source.Reply(BOT_INFO_BOT_CREATED, do_strftime(bi->created).c_str());
- source.Reply(BOT_INFO_BOT_OPTIONS, GetString(u, (bi->HasFlag(BI_PRIVATE) ? NICK_INFO_OPT_PRIVATE : NICK_INFO_OPT_NONE)).c_str());
- source.Reply(BOT_INFO_BOT_USAGE, bi->chancount);
+ source.Reply(_("Information for bot \002%s\002:"), bi->nick.c_str());
+ source.Reply(_(" Mask : %s@%s"), bi->GetIdent().c_str(), bi->host.c_str());
+ source.Reply(_(" Real name : %s"), bi->realname.c_str());
+ source.Reply(_(" Created : %s"), do_strftime(bi->created).c_str());
+ source.Reply(_(" Options : %s"), bi->HasFlag(BI_PRIVATE) ? _("Private") : _("None"));
+ source.Reply(_(" Used on : %d channel(s)"), bi->chancount);
if (u->Account()->HasPriv("botserv/administration"))
this->send_bot_channels(source, bi);
@@ -71,167 +71,173 @@ class CommandBSInfo : public Command
{
if (!check_access(u, ci, CA_FOUNDER) && !u->Account()->HasPriv("botserv/administration"))
{
- source.Reply(ACCESS_DENIED);
+ source.Reply(LanguageString::ACCESS_DENIED);
return MOD_CONT;
}
- source.Reply(CHAN_INFO_HEADER, ci->name.c_str());
+ source.Reply(LanguageString::CHAN_INFO_HEADER, ci->name.c_str());
if (ci->bi)
- source.Reply(BOT_INFO_CHAN_BOT, ci->bi->nick.c_str());
+ source.Reply(_(" Bot nick : %s"), ci->bi->nick.c_str());
else
- source.Reply(BOT_INFO_CHAN_BOT_NONE);
+ source.Reply(_(" Bot nick : not assigned yet."));
if (ci->botflags.HasFlag(BS_KICK_BADWORDS))
{
if (ci->ttb[TTB_BADWORDS])
- source.Reply(BOT_INFO_CHAN_KICK_BADWORDS_BAN, GetString(u, BOT_INFO_ACTIVE).c_str(), ci->ttb[TTB_BADWORDS]);
+ source.Reply(_(" Bad words kicker : %s (%d kick(s) to ban)"), GetString(u->Account(), LanguageString::ENABLED).c_str(), ci->ttb[TTB_BADWORDS]);
else
- source.Reply(BOT_INFO_CHAN_KICK_BADWORDS, GetString(u, BOT_INFO_ACTIVE).c_str());
+ source.Reply(_(" Bad words kicker : %s"), GetString(u->Account(), LanguageString::ENABLED).c_str());
}
else
- source.Reply(BOT_INFO_CHAN_KICK_BADWORDS, GetString(u, BOT_INFO_INACTIVE).c_str());
+ source.Reply(_(" Bad words kicker : %s"), GetString(u->Account(), LanguageString::DISABLED).c_str());
if (ci->botflags.HasFlag(BS_KICK_BOLDS))
{
if (ci->ttb[TTB_BOLDS])
- source.Reply(BOT_INFO_CHAN_KICK_BOLDS_BAN, GetString(u, BOT_INFO_ACTIVE).c_str(), ci->ttb[TTB_BOLDS]);
+ source.Reply(_(" Bolds kicker : %s (%d kick(s) to ban)"), GetString(u->Account(), LanguageString::ENABLED).c_str(), ci->ttb[TTB_BOLDS]);
else
- source.Reply(BOT_INFO_CHAN_KICK_BOLDS, GetString(u, BOT_INFO_ACTIVE).c_str());
+ source.Reply(_(" Bolds kicker : %s"), GetString(u->Account(), LanguageString::ENABLED).c_str());
}
else
- source.Reply(BOT_INFO_CHAN_KICK_BOLDS, GetString(u, BOT_INFO_INACTIVE).c_str());
+ source.Reply(_(" Bolds kicker : %s"), GetString(u->Account(), LanguageString::DISABLED).c_str());
if (ci->botflags.HasFlag(BS_KICK_CAPS))
{
if (ci->ttb[TTB_CAPS])
- source.Reply(BOT_INFO_CHAN_KICK_CAPS_BAN, GetString(u, BOT_INFO_ACTIVE).c_str(), ci->ttb[TTB_CAPS], ci->capsmin, ci->capspercent);
+ source.Reply(_(" Caps kicker : %s (%d kick(s) to ban; minimum %d/%d%%)"), GetString(u->Account(), LanguageString::ENABLED).c_str(), ci->ttb[TTB_CAPS], ci->capsmin, ci->capspercent);
else
- source.Reply(BOT_INFO_CHAN_KICK_CAPS_ON, GetString(u, BOT_INFO_ACTIVE).c_str(), ci->capsmin, ci->capspercent);
+ source.Reply(_(" Caps kicker : %s (minimum %d/%d%%)"), GetString(u->Account(), LanguageString::ENABLED).c_str(), ci->capsmin, ci->capspercent);
}
else
- source.Reply(BOT_INFO_CHAN_KICK_CAPS_OFF, GetString(u, BOT_INFO_INACTIVE).c_str());
+ source.Reply(_(" Caps kicker : %s"), GetString(u->Account(), LanguageString::DISABLED).c_str());
if (ci->botflags.HasFlag(BS_KICK_COLORS))
{
if (ci->ttb[TTB_COLORS])
- source.Reply(BOT_INFO_CHAN_KICK_COLORS_BAN, GetString(u, BOT_INFO_ACTIVE).c_str(), ci->ttb[TTB_COLORS]);
+ source.Reply(_(" Colors kicker : %s (%d kick(s) to ban)"), GetString(u->Account(), LanguageString::ENABLED).c_str(), ci->ttb[TTB_COLORS]);
else
- source.Reply(BOT_INFO_CHAN_KICK_COLORS, GetString(u, BOT_INFO_ACTIVE).c_str());
+ source.Reply(_(" Colors kicker : %s"), GetString(u->Account(), LanguageString::ENABLED).c_str());
}
else
- source.Reply(BOT_INFO_CHAN_KICK_COLORS, GetString(u, BOT_INFO_INACTIVE).c_str());
+ source.Reply(_(" Colors kicker : %s"), GetString(u->Account(), LanguageString::DISABLED).c_str());
if (ci->botflags.HasFlag(BS_KICK_FLOOD))
{
if (ci->ttb[TTB_FLOOD])
- source.Reply(BOT_INFO_CHAN_KICK_FLOOD_BAN, GetString(u, BOT_INFO_ACTIVE).c_str(), ci->ttb[TTB_FLOOD], ci->floodlines, ci->floodsecs);
+ source.Reply(_(" Flood kicker : %s (%d kick(s) to ban; %d lines in %ds)"), GetString(u->Account(), LanguageString::ENABLED).c_str(), ci->ttb[TTB_FLOOD], ci->floodlines, ci->floodsecs);
else
- source.Reply(BOT_INFO_CHAN_KICK_FLOOD_ON, GetString(u, BOT_INFO_ACTIVE).c_str(), ci->floodlines, ci->floodsecs);
+ source.Reply(_(" Flood kicker : %s (%d lines in %ds)"), GetString(u->Account(), LanguageString::ENABLED).c_str(), ci->floodlines, ci->floodsecs);
}
else
- source.Reply(BOT_INFO_CHAN_KICK_FLOOD_OFF, GetString(u, BOT_INFO_INACTIVE).c_str());
+ source.Reply(_(" Flood kicker : %s"), GetString(u->Account(), LanguageString::DISABLED).c_str());
if (ci->botflags.HasFlag(BS_KICK_REPEAT))
{
if (ci->ttb[TTB_REPEAT])
- source.Reply(BOT_INFO_CHAN_KICK_REPEAT_BAN, GetString(u, BOT_INFO_ACTIVE).c_str(), ci->ttb[TTB_REPEAT], ci->repeattimes);
+ source.Reply(_(" Repeat kicker : %s (%d kick(s) to ban; %d times)"), GetString(u->Account(), LanguageString::ENABLED).c_str(), ci->ttb[TTB_REPEAT], ci->repeattimes);
else
- source.Reply(BOT_INFO_CHAN_KICK_REPEAT_ON, GetString(u, BOT_INFO_ACTIVE).c_str(), ci->repeattimes);
+ source.Reply(_(" Repeat kicker : %s (%d times)"), GetString(u->Account(), LanguageString::ENABLED).c_str(), ci->repeattimes);
}
else
- source.Reply(BOT_INFO_CHAN_KICK_REPEAT_OFF, GetString(u, BOT_INFO_INACTIVE).c_str());
+ source.Reply(_(" Repeat kicker : %s"), GetString(u->Account(), LanguageString::DISABLED).c_str());
if (ci->botflags.HasFlag(BS_KICK_REVERSES))
{
if (ci->ttb[TTB_REVERSES])
- source.Reply(BOT_INFO_CHAN_KICK_REVERSES_BAN, GetString(u, BOT_INFO_ACTIVE).c_str(), ci->ttb[TTB_REVERSES]);
+ source.Reply(_(" Reverses kicker : %s (%d kick(s) to ban)"), GetString(u->Account(), LanguageString::ENABLED).c_str(), ci->ttb[TTB_REVERSES]);
else
- source.Reply(BOT_INFO_CHAN_KICK_REVERSES, GetString(u, BOT_INFO_ACTIVE).c_str());
+ source.Reply(_(" Reverses kicker : %s"), GetString(u->Account(), LanguageString::ENABLED).c_str());
}
else
- source.Reply(BOT_INFO_CHAN_KICK_REVERSES, GetString(u, BOT_INFO_INACTIVE).c_str());
+ source.Reply(_(" Reverses kicker : %s"), GetString(u->Account(), LanguageString::DISABLED).c_str());
if (ci->botflags.HasFlag(BS_KICK_UNDERLINES))
{
if (ci->ttb[TTB_UNDERLINES])
- source.Reply(BOT_INFO_CHAN_KICK_UNDERLINES_BAN, GetString(u, BOT_INFO_ACTIVE).c_str(), ci->ttb[TTB_UNDERLINES]);
+ source.Reply(_(" Underlines kicker : %s (%d kick(s) to ban)"), GetString(u->Account(), LanguageString::ENABLED).c_str(), ci->ttb[TTB_UNDERLINES]);
else
- source.Reply(BOT_INFO_CHAN_KICK_UNDERLINES, GetString(u, BOT_INFO_ACTIVE).c_str());
+ source.Reply(_(" Underlines kicker : %s"), GetString(u->Account(), LanguageString::ENABLED).c_str());
}
else
- source.Reply(BOT_INFO_CHAN_KICK_UNDERLINES, GetString(u, BOT_INFO_INACTIVE).c_str());
+ source.Reply(_(" Underlines kicker : %s"), GetString(u->Account(), LanguageString::DISABLED).c_str());
if (ci->botflags.HasFlag(BS_KICK_ITALICS))
{
if (ci->ttb[TTB_ITALICS])
- source.Reply(BOT_INFO_CHAN_KICK_ITALICS_BAN, GetString(u, BOT_INFO_ACTIVE).c_str(), ci->ttb[TTB_ITALICS]);
+ source.Reply(_(" Italics kicker : %s (%d kick(s) to ban)"), GetString(u->Account(), LanguageString::ENABLED).c_str(), ci->ttb[TTB_ITALICS]);
else
- source.Reply(BOT_INFO_CHAN_KICK_ITALICS, GetString(u, BOT_INFO_ACTIVE).c_str());
+ source.Reply(_(" Italics kicker : %s"), GetString(u->Account(), LanguageString::ENABLED).c_str());
}
else
- source.Reply(BOT_INFO_CHAN_KICK_ITALICS, GetString(u, BOT_INFO_INACTIVE).c_str());
+ source.Reply(_(" Italics kicker : %s"), GetString(u->Account(), LanguageString::DISABLED).c_str());
if (ci->botflags.HasFlag(BS_KICK_AMSGS))
{
if (ci->ttb[TTB_AMSGS])
- source.Reply(BOT_INFO_CHAN_KICK_AMSGS_BAN, GetString(u, BOT_INFO_ACTIVE).c_str(), ci->ttb[TTB_AMSGS]);
+ source.Reply(_(" AMSG kicker : %s (%d kick(s) to ban)"), GetString(u->Account(), LanguageString::ENABLED).c_str(), ci->ttb[TTB_AMSGS]);
else
- source.Reply(BOT_INFO_CHAN_KICK_AMSGS, GetString(u, BOT_INFO_ACTIVE).c_str());
+ source.Reply(_(" AMSG kicker : %s"), GetString(u->Account(), LanguageString::ENABLED).c_str());
}
else
- source.Reply(BOT_INFO_CHAN_KICK_AMSGS, GetString(u, BOT_INFO_INACTIVE).c_str());
+ source.Reply(_(" AMSG kicker : %s"), GetString(u->Account(), LanguageString::DISABLED).c_str());
if (ci->botflags.HasFlag(BS_MSG_PRIVMSG))
- source.Reply(BOT_INFO_CHAN_MSG, "PRIVMSG");
+ source.Reply(_(" Fantasy reply : %s"), "PRIVMSG");
else if (ci->botflags.HasFlag(BS_MSG_NOTICE))
- source.Reply(BOT_INFO_CHAN_MSG, "NOTICE");
+ source.Reply(_(" Fantasy reply : %s"), "NOTICE");
else if (ci->botflags.HasFlag(BS_MSG_NOTICEOPS))
- source.Reply(BOT_INFO_CHAN_MSG, "NOTICEOPS");
+ source.Reply(_(" Fantasy reply : %s"), "NOTICEOPS");
end = buf;
*end = 0;
if (ci->botflags.HasFlag(BS_DONTKICKOPS))
{
- end += snprintf(end, sizeof(buf) - (end - buf), "%s", GetString(u, BOT_INFO_OPT_DONTKICKOPS).c_str());
+ end += snprintf(end, sizeof(buf) - (end - buf), "%s", GetString(u->Account(), _("Ops protection")).c_str());
need_comma = true;
}
if (ci->botflags.HasFlag(BS_DONTKICKVOICES))
{
- end += snprintf(end, sizeof(buf) - (end - buf), "%s%s", need_comma ? ", " : "", GetString(u, BOT_INFO_OPT_DONTKICKVOICES).c_str());
+ end += snprintf(end, sizeof(buf) - (end - buf), "%s%s", need_comma ? ", " : "", GetString(u->Account(), _("Voices protection")).c_str());
need_comma = true;
}
if (ci->botflags.HasFlag(BS_FANTASY))
{
- end += snprintf(end, sizeof(buf) - (end - buf), "%s%s", need_comma ? ", " : "", GetString(u, BOT_INFO_OPT_FANTASY).c_str());
+ end += snprintf(end, sizeof(buf) - (end - buf), "%s%s", need_comma ? ", " : "", GetString(u->Account(), _("Fantasy")).c_str());
need_comma = true;
}
if (ci->botflags.HasFlag(BS_GREET))
{
- end += snprintf(end, sizeof(buf) - (end - buf), "%s%s", need_comma ? ", " : "", GetString(u, BOT_INFO_OPT_GREET).c_str());
+ end += snprintf(end, sizeof(buf) - (end - buf), "%s%s", need_comma ? ", " : "", GetString(u->Account(), _("Greet")).c_str());
need_comma = true;
}
if (ci->botflags.HasFlag(BS_NOBOT))
{
- end += snprintf(end, sizeof(buf) - (end - buf), "%s%s", need_comma ? ", " : "", GetString(u, BOT_INFO_OPT_NOBOT).c_str());
+ end += snprintf(end, sizeof(buf) - (end - buf), "%s%s", need_comma ? ", " : "", GetString(u->Account(), _("No bot")).c_str());
need_comma = true;
}
if (ci->botflags.HasFlag(BS_SYMBIOSIS))
{
- end += snprintf(end, sizeof(buf) - (end - buf), "%s%s", need_comma ? ", " : "", GetString(u, BOT_INFO_OPT_SYMBIOSIS).c_str());
+ end += snprintf(end, sizeof(buf) - (end - buf), "%s%s", need_comma ? ", " : "", GetString(u->Account(), _("Symbiosis")).c_str());
need_comma = true;
}
- source.Reply(BOT_INFO_CHAN_OPTIONS, *buf ? buf : GetString(u, BOT_INFO_OPT_NONE).c_str());
+ source.Reply(_(" Options : %s"), *buf ? buf : GetString(u->Account(), _("None")).c_str());
}
else
- source.Reply(BOT_INFO_NOT_FOUND, query.c_str());
+ source.Reply(_("\002%s\002 is not a valid bot or registered channel."), query.c_str());
return MOD_CONT;
}
bool OnHelp(CommandSource &source, const Anope::string &subcommand)
{
- source.Reply(BOT_HELP_INFO);
+ source.Reply(_("Syntax: \002INFO {\037chan\037 | \037nick\037}\002\n"
+ " \n"
+ "Allows you to see %S information about a channel or a bot.\n"
+ "If the parameter is a channel, then you'll get information\n"
+ "such as enabled kickers. If the parameter is a nick,\n"
+ "you'll get information about a bot, such as creation\n"
+ "time or number of channels it is on."));
return true;
}
void OnSyntaxError(CommandSource &source, const Anope::string &subcommand)
{
- SyntaxError(source, "INFO", BOT_INFO_SYNTAX);
+ SyntaxError(source, "INFO", _("INFO {\037chan\037 | \037nick\037}"));
}
void OnServHelp(CommandSource &source)
{
- source.Reply(BOT_HELP_CMD_INFO);
+ source.Reply(_(" INFO Allows you to see BotServ information about a channel or a bot"));
}
};
diff --git a/modules/core/bs_kick.cpp b/modules/core/bs_kick.cpp
index eba5de508..67bd2ca05 100644
--- a/modules/core/bs_kick.cpp
+++ b/modules/core/bs_kick.cpp
@@ -32,15 +32,15 @@ class CommandBSKick : public Command
ChannelInfo *ci = source.ci;
if (readonly)
- source.Reply(BOT_KICK_DISABLED);
+ source.Reply(_("Sorry, kicker configuration is temporarily disabled."));
else if (chan.empty() || option.empty() || value.empty())
- SyntaxError(source, "KICK", BOT_KICK_SYNTAX);
+ SyntaxError(source, "KICK", _("KICK \037channel\037 \037option\037 {\037ON|\037} [\037settings\037]"));
else if (!value.equals_ci("ON") && !value.equals_ci("OFF"))
- SyntaxError(source, "KICK", BOT_KICK_SYNTAX);
+ SyntaxError(source, "KICK", _("KICK \037channel\037 \037option\037 {\037ON|\037} [\037settings\037]"));
else if (!check_access(u, ci, CA_SET) && !u->Account()->HasPriv("botserv/administration"))
- source.Reply(ACCESS_DENIED);
+ source.Reply(LanguageString::ACCESS_DENIED);
else if (!ci->bi)
- source.Reply(BOT_NOT_ASSIGNED);
+ source.Reply(LanguageString::BOT_NOT_ASSIGNED);
else
{
bool override = !check_access(u, ci, CA_SET);
@@ -61,7 +61,7 @@ class CommandBSKick : public Command
Log(LOG_DEBUG) << "remainder of ttb " << error << " ttb " << ci->ttb[TTB_BADWORDS];
/* reset the value back to 0 - TSL */
ci->ttb[TTB_BADWORDS] = 0;
- source.Reply(BOT_KICK_BAD_TTB, ttb.c_str());
+ source.Reply(_("\002%s\002 cannot be taken as times to ban."), ttb.c_str());
return MOD_CONT;
}
}
@@ -69,14 +69,17 @@ class CommandBSKick : public Command
ci->ttb[TTB_BADWORDS] = 0;
ci->botflags.SetFlag(BS_KICK_BADWORDS);
if (ci->ttb[TTB_BADWORDS])
- source.Reply(BOT_KICK_BADWORDS_ON_BAN, ci->ttb[TTB_BADWORDS]);
+ source.Reply(_("Bot will now kick \002bad words\002, and will place a ban after \n"
+ "%d kicks for the same user. Use the BADWORDS command\n"
+ "to add or remove a bad word."), ci->ttb[TTB_BADWORDS]);
else
- source.Reply(BOT_KICK_BADWORDS_ON);
+ source.Reply(_("Bot will now kick \002bad words\002. Use the BADWORDS command\n"
+ "to add or remove a bad word."));
}
else
{
ci->botflags.UnsetFlag(BS_KICK_BADWORDS);
- source.Reply(BOT_KICK_BADWORDS_OFF);
+ source.Reply(_("Bot won't kick \002bad words\002 anymore."));
}
}
else if (option.equals_ci("BOLDS"))
@@ -91,7 +94,7 @@ class CommandBSKick : public Command
{
Log(LOG_DEBUG) << "remainder of ttb " << error << " ttb " << ci->ttb[TTB_BOLDS];
ci->ttb[TTB_BOLDS] = 0;
- source.Reply(BOT_KICK_BAD_TTB, ttb.c_str());
+ source.Reply(_("\002%s\002 cannot be taken as times to ban."), ttb.c_str());
return MOD_CONT;
}
}
@@ -99,14 +102,14 @@ class CommandBSKick : public Command
ci->ttb[TTB_BOLDS] = 0;
ci->botflags.SetFlag(BS_KICK_BOLDS);
if (ci->ttb[TTB_BOLDS])
- source.Reply(BOT_KICK_BOLDS_ON_BAN, ci->ttb[TTB_BOLDS]);
+ source.Reply(_("Bot will now kick \002bolds\002, and will place a ban after\n%d kicks to the same user."), ci->ttb[TTB_BOLDS]);
else
- source.Reply(BOT_KICK_BOLDS_ON);
+ source.Reply(_("Bot will now kick \002bolds\002."));
}
else
{
ci->botflags.UnsetFlag(BS_KICK_BOLDS);
- source.Reply(BOT_KICK_BOLDS_OFF);
+ source.Reply(_("Bot won't kick \002bolds\002 anymore."));
}
}
else if (option.equals_ci("CAPS"))
@@ -124,7 +127,7 @@ class CommandBSKick : public Command
{
Log(LOG_DEBUG) << "remainder of ttb " << error << " ttb " << ci->ttb[TTB_CAPS];
ci->ttb[TTB_CAPS] = 0;
- source.Reply(BOT_KICK_BAD_TTB, ttb.c_str());
+ source.Reply(_("\002%s\002 cannot be taken as times to ban."), ttb.c_str());
return MOD_CONT;
}
}
@@ -147,14 +150,17 @@ class CommandBSKick : public Command
ci->botflags.SetFlag(BS_KICK_CAPS);
if (ci->ttb[TTB_CAPS])
- source.Reply(BOT_KICK_CAPS_ON_BAN, ci->capsmin, ci->capspercent, ci->ttb[TTB_CAPS]);
+ source.Reply(_("Bot will now kick \002caps\002 (they must constitute at least\n"
+ "%d characters and %d%% of the entire message), and will \n"
+ "place a ban after %d kicks for the same user."), ci->capsmin, ci->capspercent, ci->ttb[TTB_CAPS]);
else
- source.Reply(BOT_KICK_CAPS_ON, ci->capsmin, ci->capspercent);
+ source.Reply(_("Bot will now kick \002caps\002 (they must constitute at least\n"
+ "%d characters and %d%% of the entire message)."), ci->capsmin, ci->capspercent);
}
else
{
ci->botflags.UnsetFlag(BS_KICK_CAPS);
- source.Reply(BOT_KICK_CAPS_OFF);
+ source.Reply(_("Bot won't kick \002caps\002 anymore."));
}
}
else if (option.equals_ci("COLORS"))
@@ -169,7 +175,7 @@ class CommandBSKick : public Command
{
Log(LOG_DEBUG) << "remainder of ttb " << error << " ttb " << ci->ttb[TTB_COLORS];
ci->ttb[TTB_COLORS] = 0;
- source.Reply(BOT_KICK_BAD_TTB, ttb.c_str());
+ source.Reply(_("\002%s\002 cannot be taken as times to ban."), ttb.c_str());
return MOD_CONT;
}
}
@@ -177,14 +183,14 @@ class CommandBSKick : public Command
ci->ttb[TTB_COLORS] = 0;
ci->botflags.SetFlag(BS_KICK_COLORS);
if (ci->ttb[TTB_COLORS])
- source.Reply(BOT_KICK_COLORS_ON_BAN, ci->ttb[TTB_COLORS]);
+ source.Reply(_("Bot will now kick \002colors\002, and will place a ban after %d\nkicks for the same user."), ci->ttb[TTB_COLORS]);
else
- source.Reply(BOT_KICK_COLORS_ON);
+ source.Reply(_("Bot will now kick \002colors\002."));
}
else
{
ci->botflags.UnsetFlag(BS_KICK_COLORS);
- source.Reply(BOT_KICK_COLORS_OFF);
+ source.Reply(_("Bot won't kick \002colors\002 anymore."));
}
}
else if (option.equals_ci("FLOOD"))
@@ -202,7 +208,7 @@ class CommandBSKick : public Command
{
Log(LOG_DEBUG) << "remainder of ttb " << error << " ttb " << ci->ttb[TTB_FLOOD];
ci->ttb[TTB_FLOOD] = 0;
- source.Reply(BOT_KICK_BAD_TTB, ttb.c_str());
+ source.Reply(_("\002%s\002 cannot be taken as times to ban."), ttb.c_str());
return MOD_CONT;
}
}
@@ -225,14 +231,14 @@ class CommandBSKick : public Command
ci->botflags.SetFlag(BS_KICK_FLOOD);
if (ci->ttb[TTB_FLOOD])
- source.Reply(BOT_KICK_FLOOD_ON_BAN, ci->floodlines, ci->floodsecs, ci->ttb[TTB_FLOOD]);
+ source.Reply(_("Bot will now kick \002flood\002 (%d lines in %d seconds and\nwill place a ban after %d kicks for the same user."), ci->floodlines, ci->floodsecs, ci->ttb[TTB_FLOOD]);
else
- source.Reply(BOT_KICK_FLOOD_ON, ci->floodlines, ci->floodsecs);
+ source.Reply(_("Bot will now kick \002flood\002 (%d lines in %d seconds)."), ci->floodlines, ci->floodsecs);
}
else
{
ci->botflags.UnsetFlag(BS_KICK_FLOOD);
- source.Reply(BOT_KICK_FLOOD_OFF);
+ source.Reply(_("Bot won't kick \002flood\002 anymore."));
}
}
else if (option.equals_ci("REPEAT"))
@@ -249,7 +255,7 @@ class CommandBSKick : public Command
{
Log(LOG_DEBUG) << "remainder of ttb " << error << " ttb " << ci->ttb[TTB_REPEAT];
ci->ttb[TTB_REPEAT] = 0;
- source.Reply(BOT_KICK_BAD_TTB, ttb.c_str());
+ source.Reply(_("\002%s\002 cannot be taken as times to ban."), ttb.c_str());
return MOD_CONT;
}
}
@@ -265,14 +271,17 @@ class CommandBSKick : public Command
ci->botflags.SetFlag(BS_KICK_REPEAT);
if (ci->ttb[TTB_REPEAT])
- source.Reply(BOT_KICK_REPEAT_ON_BAN, ci->repeattimes, ci->ttb[TTB_REPEAT]);
+ source.Reply(_("Bot will now kick \002repeats\002 (users that say %d times\n"
+ "the same thing), and will place a ban after %d \n"
+ "kicks for the same user."), ci->repeattimes, ci->ttb[TTB_REPEAT]);
else
- source.Reply(BOT_KICK_REPEAT_ON, ci->repeattimes);
+ source.Reply(_("Bot will now kick \002repeats\002 (users that say %d times\n"
+ "the same thing)."), ci->repeattimes);
}
else
{
ci->botflags.UnsetFlag(BS_KICK_REPEAT);
- source.Reply(BOT_KICK_REPEAT_OFF);
+ source.Reply(_("Bot won't kick \002repeats\002 anymore."));
}
}
else if (option.equals_ci("REVERSES"))
@@ -287,7 +296,7 @@ class CommandBSKick : public Command
{
Log(LOG_DEBUG) << "remainder of ttb " << error << " ttb " << ci->ttb[TTB_REVERSES];
ci->ttb[TTB_REVERSES] = 0;
- source.Reply(BOT_KICK_BAD_TTB, ttb.c_str());
+ source.Reply(_("\002%s\002 cannot be taken as times to ban."), ttb.c_str());
return MOD_CONT;
}
}
@@ -295,14 +304,14 @@ class CommandBSKick : public Command
ci->ttb[TTB_REVERSES] = 0;
ci->botflags.SetFlag(BS_KICK_REVERSES);
if (ci->ttb[TTB_REVERSES])
- source.Reply(BOT_KICK_REVERSES_ON_BAN, ci->ttb[TTB_REVERSES]);
+ source.Reply(_("Bot will now kick \002reverses\002, and will place a ban after %d\nkicks for the same user."), ci->ttb[TTB_REVERSES]);
else
- source.Reply(BOT_KICK_REVERSES_ON);
+ source.Reply(_("Bot will now kick \002reverses\002."));
}
else
{
ci->botflags.UnsetFlag(BS_KICK_REVERSES);
- source.Reply(BOT_KICK_REVERSES_OFF);
+ source.Reply(_("Bot won't kick \002reverses\002 anymore."));
}
}
else if (option.equals_ci("UNDERLINES"))
@@ -317,7 +326,7 @@ class CommandBSKick : public Command
{
Log(LOG_DEBUG) << "remainder of ttb " << error << " ttb " << ci->ttb[TTB_UNDERLINES];
ci->ttb[TTB_UNDERLINES] = 0;
- source.Reply(BOT_KICK_BAD_TTB, ttb.c_str());
+ source.Reply(_("\002%s\002 cannot be taken as times to ban."), ttb.c_str());
return MOD_CONT;
}
}
@@ -325,14 +334,14 @@ class CommandBSKick : public Command
ci->ttb[TTB_UNDERLINES] = 0;
ci->botflags.SetFlag(BS_KICK_UNDERLINES);
if (ci->ttb[TTB_UNDERLINES])
- source.Reply(BOT_KICK_UNDERLINES_ON_BAN, ci->ttb[TTB_UNDERLINES]);
+ source.Reply(_("Bot will now kick \002underlines\002, and will place a ban after %d\nkicks for the same user."), ci->ttb[TTB_UNDERLINES]);
else
- source.Reply(BOT_KICK_UNDERLINES_ON);
+ source.Reply(_("Bot will now kick \002underlines\002."));
}
else
{
ci->botflags.UnsetFlag(BS_KICK_UNDERLINES);
- source.Reply(BOT_KICK_UNDERLINES_OFF);
+ source.Reply(_("Bot won't kick \002underlines\002 anymore."));
}
}
else if (option.equals_ci("ITALICS"))
@@ -347,7 +356,7 @@ class CommandBSKick : public Command
{
Log(LOG_DEBUG) << "remainder of ttb " << error << " ttb " << ci->ttb[TTB_ITALICS];
ci->ttb[TTB_ITALICS] = 0;
- source.Reply(BOT_KICK_BAD_TTB, ttb.c_str());
+ source.Reply(_("\002%s\002 cannot be taken as times to ban."), ttb.c_str());
return MOD_CONT;
}
}
@@ -355,14 +364,14 @@ class CommandBSKick : public Command
ci->ttb[TTB_ITALICS] = 0;
ci->botflags.SetFlag(BS_KICK_ITALICS);
if (ci->ttb[TTB_ITALICS])
- source.Reply(BOT_KICK_ITALICS_ON_BAN, ci->ttb[TTB_ITALICS]);
+ source.Reply(_("Bot will now kick \002italics\002, and will place a ban after\n%d kicks for the same user."), ci->ttb[TTB_ITALICS]);
else
- source.Reply(BOT_KICK_ITALICS_ON);
+ source.Reply(_("Bot will now kick \002italics\002."));
}
else
{
ci->botflags.UnsetFlag(BS_KICK_ITALICS);
- source.Reply(BOT_KICK_ITALICS_OFF);
+ source.Reply(_("Bot won't kick \002italics\002 anymore."));
}
}
else if (option.equals_ci("AMSGS"))
@@ -377,7 +386,6 @@ class CommandBSKick : public Command
{
Log(LOG_DEBUG) << "remainder of ttb " << error << " ttb " << ci->ttb[TTB_ITALICS];
ci->ttb[TTB_AMSGS] = 0;
- source.Reply(BOT_KICK_AMSGS_ON_BAN, ci->ttb[TTB_AMSGS]);
return MOD_CONT;
}
}
@@ -385,18 +393,18 @@ class CommandBSKick : public Command
ci->ttb[TTB_AMSGS] = 0;
ci->botflags.SetFlag(BS_KICK_AMSGS);
if (ci->ttb[TTB_AMSGS])
- source.Reply(BOT_KICK_AMSGS_ON_BAN, ci->ttb[TTB_AMSGS]);
+ source.Reply(_("Bot will now kick for \002amsgs\002, and will place a ban after %d\nkicks for the same user."), ci->ttb[TTB_AMSGS]);
else
- source.Reply(BOT_KICK_AMSGS_ON);
+ source.Reply(_("Bot will now kick for \002amsgs\002"));
}
else
{
ci->botflags.UnsetFlag(BS_KICK_AMSGS);
- source.Reply(BOT_KICK_AMSGS_OFF);
+ source.Reply(_("Bot won't kick for \002amsgs\002 anymore."));
}
}
else
- source.Reply(BOT_KICK_UNKNOWN, option.c_str());
+ source.Reply(LanguageString::UNKNOWN_OPTION, option.c_str(), this->name.c_str());
}
return MOD_CONT;
}
@@ -404,27 +412,112 @@ class CommandBSKick : public Command
bool OnHelp(CommandSource &source, const Anope::string &subcommand)
{
if (subcommand.empty())
- source.Reply(BOT_HELP_KICK);
+ source.Reply(_("Syntax: \002KICK \037channel\037 \037option\037 \037parameters\037\002\n"
+ " \n"
+ "Configures bot kickers. \037option\037 can be one of:\n"
+ " \n"
+ " AMSGS Sets if the bot kicks for amsgs\n"
+ " BOLDS Sets if the bot kicks bolds\n"
+ " BADWORDS Sets if the bot kicks bad words\n"
+ " CAPS Sets if the bot kicks caps\n"
+ " COLORS Sets if the bot kicks colors\n"
+ " FLOOD Sets if the bot kicks flooding users\n"
+ " REPEAT Sets if the bot kicks users who repeat\n"
+ " themselves\n"
+ " REVERSES Sets if the bot kicks reverses\n"
+ " UNDERLINES Sets if the bot kicks underlines\n"
+ " ITALICS Sets if the bot kicks italics\n"
+ " \n"
+ "Type \002%R%S HELP KICK \037option\037\002 for more information\n"
+ "on a specific option.\n"
+ " \n"
+ "Note: access to this command is controlled by the\n"
+ "level SET."));
else if (subcommand.equals_ci("BADWORDS"))
- source.Reply(BOT_HELP_KICK_BADWORDS);
+ source.Reply(_("Syntax: \002KICK \037#channel\037 BADWORDS {\037ON|OFF\037} [\037ttb\037]\002\n"
+ "Sets the bad words kicker on or off. When enabled, this\n"
+ "option tells the bot to kick users who say certain words\n"
+ "on the channels.\n"
+ "You can define bad words for your channel using the\n"
+ "\002BADWORDS\002 command. Type \002%R%S HELP BADWORDS\002 for\n"
+ "more information.\n"
+ "ttb is the number of times a user can be kicked\n"
+ "before it get banned. Don't give ttb to disable\n"
+ "the ban system once activated."));
else if (subcommand.equals_ci("BOLDS"))
- source.Reply(BOT_HELP_KICK_BOLDS);
+ source.Reply(_("Syntax: \002KICK \037channel\037 BOLDS {\037ON|OFF\037} [\037ttb\037]\002\n"
+ "Sets the bolds kicker on or off. When enabled, this\n"
+ "option tells the bot to kick users who use bolds.\n"
+ "ttb is the number of times a user can be kicked\n"
+ "before it get banned. Don't give ttb to disable\n"
+ "the ban system once activated."));
else if (subcommand.equals_ci("CAPS"))
- source.Reply(BOT_HELP_KICK_CAPS);
+ source.Reply(_("Syntax: \002KICK \037channel\037 CAPS {\037ON|OFF\037} [\037ttb\037 [\037min\037 [\037percent\037]]]\002\n"
+ "Sets the caps kicker on or off. When enabled, this\n"
+ "option tells the bot to kick users who are talking in\n"
+ "CAPS.\n"
+ "The bot kicks only if there are at least \002min\002 caps\n"
+ "and they constitute at least \002percent\002%% of the total \n"
+ "text line (if not given, it defaults to 10 characters\n"
+ "and 25%%).\n"
+ "ttb is the number of times a user can be kicked\n"
+ "before it get banned. Don't give ttb to disable\n"
+ "the ban system once activated."));
else if (subcommand.equals_ci("COLORS"))
- source.Reply(BOT_HELP_KICK_COLORS);
+ source.Reply(_("Syntax: \002KICK \037channel\037 COLORS {\037ON|OFF\037} [\037ttb\037]\002\n"
+ "Sets the colors kicker on or off. When enabled, this\n"
+ "option tells the bot to kick users who use colors.\n"
+ "ttb is the number of times a user can be kicked\n"
+ "before it get banned. Don't give ttb to disable\n"
+ "the ban system once activated."));
else if (subcommand.equals_ci("FLOOD"))
- source.Reply(BOT_HELP_KICK_FLOOD);
+ source.Reply(_("Syntax: \002KICK \037channel\037 FLOOD {\037ON|OFF\037} [\037ttb\037 [\037ln\037 [\037secs\037]]]\002\n"
+ "Sets the flood kicker on or off. When enabled, this\n"
+ "option tells the bot to kick users who are flooding\n"
+ "the channel using at least \002ln\002 lines in \002secs\002 seconds\n"
+ "(if not given, it defaults to 6 lines in 10 seconds).\n"
+ " \n"
+ "ttb is the number of times a user can be kicked\n"
+ "before it get banned. Don't give ttb to disable\n"
+ "the ban system once activated."));
else if (subcommand.equals_ci("REPEAT"))
- source.Reply(BOT_HELP_KICK_REPEAT);
+ source.Reply(_("Syntax: \002KICK \037#channel\037 REPEAT {\037ON|OFF\037} [\037ttb\037 [\037num\037]]\002\n"
+ "Sets the repeat kicker on or off. When enabled, this\n"
+ "option tells the bot to kick users who are repeating\n"
+ "themselves \002num\002 times (if num is not given, it\n"
+ "defaults to 3).\n"
+ "ttb is the number of times a user can be kicked\n"
+ "before it get banned. Don't give ttb to disable\n"
+ "the ban system once activated."));
else if (subcommand.equals_ci("REVERSES"))
- source.Reply(BOT_HELP_KICK_REVERSES);
+ source.Reply(_("Syntax: \002KICK \037channel\037 REVERSES {\037ON|OFF\037} [\037ttb\037]\002\n"
+ "Sets the reverses kicker on or off. When enabled, this\n"
+ "option tells the bot to kick users who use reverses.\n"
+ "ttb is the number of times a user can be kicked\n"
+ "before it get banned. Don't give ttb to disable\n"
+ "the ban system once activated."));
else if (subcommand.equals_ci("UNDERLINES"))
- source.Reply(BOT_HELP_KICK_UNDERLINES);
+ source.Reply(_("Syntax: \002KICK \037channel\037 UNDERLINES {\037ON|OFF\037} [\037ttb\037]\002\n"
+ "Sets the underlines kicker on or off. When enabled, this\n"
+ "option tells the bot to kick users who use underlines.\n"
+ "ttb is the number of times a user can be kicked\n"
+ "before it get banned. Don't give ttb to disable\n"
+ "the ban system once activated."));
else if (subcommand.equals_ci("ITALICS"))
- source.Reply(BOT_HELP_KICK_ITALICS);
+ source.Reply(_("Syntax: \002KICK \037channel\037 ITALICS {\037ON|OFF\037} [\037ttb\037]\002\n"
+ "Sets the italics kicker on or off. When enabled, this\n"
+ "option tells the bot to kick users who use italics.\n"
+ "ttb is the number of times a user can be kicked\n"
+ "before it get banned. Don't give ttb to disable\n"
+ "the ban system once activated."));
else if (subcommand.equals_ci("AMSGS"))
- source.Reply(BOT_HELP_KICK_AMSGS);
+ source.Reply(_("Syntax: \002KICK \037channel\037 AMSGS {\037ON|OFF\037} [\037ttb\037]\002\n"
+ "Sets the amsg kicker on or off. When enabled, the bot will\n"
+ "kick users who send the same message to multiple channels\n"
+ "where BotServ bots are.\n"
+ "Ttb is the number of times a user can be kicked\n"
+ "before it get banned. Don't give ttb to disable\n"
+ "the ban system once activated."));
else
return false;
@@ -433,12 +526,12 @@ class CommandBSKick : public Command
void OnSyntaxError(CommandSource &source, const Anope::string &subcommand)
{
- SyntaxError(source, "KICK", BOT_KICK_SYNTAX);
+ SyntaxError(source, "KICK", _("KICK \037channel\037 \037option\037 {\037ON|\037} [\037settings\037]"));
}
void OnServHelp(CommandSource &source)
{
- source.Reply(BOT_HELP_CMD_KICK);
+ source.Reply(_(" KICK Configures kickers"));
}
};
@@ -474,7 +567,7 @@ class BSKick : public Module
if (c->ci != NULL && c->ci->botflags.HasFlag(BS_KICK_AMSGS))
{
check_ban(c->ci, u, TTB_AMSGS);
- bot_kick(c->ci, u, BOT_REASON_AMSGS);
+ bot_kick(c->ci, u, _("Don't use AMSGs!"));
}
}
diff --git a/modules/core/bs_say.cpp b/modules/core/bs_say.cpp
index 6da763f1a..015ac036e 100644
--- a/modules/core/bs_say.cpp
+++ b/modules/core/bs_say.cpp
@@ -29,19 +29,19 @@ class CommandBSSay : public Command
if (!check_access(u, ci, CA_SAY))
{
- source.Reply(ACCESS_DENIED);
+ source.Reply(LanguageString::ACCESS_DENIED);
return MOD_CONT;
}
if (!ci->bi)
{
- source.Reply(BOT_NOT_ASSIGNED);
+ source.Reply(LanguageString::BOT_NOT_ASSIGNED);
return MOD_CONT;
}
if (!ci->c || !ci->c->FindUser(ci->bi))
{
- source.Reply(BOT_NOT_ON_CHANNEL, ci->name.c_str());
+ source.Reply(LanguageString::BOT_NOT_ON_CHANNEL, ci->name.c_str());
return MOD_CONT;
}
@@ -62,18 +62,20 @@ class CommandBSSay : public Command
bool OnHelp(CommandSource &source, const Anope::string &subcommand)
{
- source.Reply(BOT_HELP_SAY);
+ source.Reply(_("Syntax: \002SAY \037channel\037 \037text\037\002\n"
+ " \n"
+ "Makes the bot say the given text on the given channel."));
return true;
}
void OnSyntaxError(CommandSource &source, const Anope::string &subcommand)
{
- SyntaxError(source, "SAY", BOT_SAY_SYNTAX);
+ SyntaxError(source, "SAY", _("SAY \037channel\037 \037text\037"));
}
void OnServHelp(CommandSource &source)
{
- source.Reply(BOT_HELP_CMD_SAY);
+ source.Reply(_(" SAY Makes the bot say the given text on the given channel"));
}
};
diff --git a/modules/core/bs_set.cpp b/modules/core/bs_set.cpp
index 49acae06b..ce5377878 100644
--- a/modules/core/bs_set.cpp
+++ b/modules/core/bs_set.cpp
@@ -31,35 +31,35 @@ class CommandBSSet : public Command
ChannelInfo *ci;
if (readonly)
- source.Reply(BOT_SET_DISABLED);
+ source.Reply(_("Sorry, bot option setting is temporarily disabled."));
else if (u->Account()->HasCommand("botserv/set/private") && option.equals_ci("PRIVATE"))
{
BotInfo *bi;
if (!(bi = findbot(chan)))
{
- source.Reply(BOT_DOES_NOT_EXIST, chan.c_str());
+ source.Reply(LanguageString::BOT_DOES_NOT_EXIST, chan.c_str());
return MOD_CONT;
}
if (value.equals_ci("ON"))
{
bi->SetFlag(BI_PRIVATE);
- source.Reply(BOT_SET_PRIVATE_ON, bi->nick.c_str());
+ source.Reply(_("Private mode of bot %s is now \002\002."), bi->nick.c_str());
}
else if (value.equals_ci("OFF"))
{
bi->UnsetFlag(BI_PRIVATE);
- source.Reply(BOT_SET_PRIVATE_OFF, bi->nick.c_str());
+ source.Reply(_("Private mode of bot %s is now \002\002."), bi->nick.c_str());
}
else
- SyntaxError(source, "SET PRIVATE", BOT_SET_PRIVATE_SYNTAX);
+ SyntaxError(source, "SET PRIVATE", _("SET \037botname\037 PRIVATE {\037ON|\037}"));
return MOD_CONT;
}
else if (!(ci = cs_findchan(chan)))
- source.Reply(CHAN_X_NOT_REGISTERED, chan.c_str());
+ source.Reply(LanguageString::CHAN_X_NOT_REGISTERED, chan.c_str());
else if (!u->Account()->HasPriv("botserv/administration") && !check_access(u, ci, CA_SET))
- source.Reply(ACCESS_DENIED);
+ source.Reply(LanguageString::ACCESS_DENIED);
else
{
bool override = !check_access(u, ci, CA_SET);
@@ -70,60 +70,60 @@ class CommandBSSet : public Command
if (value.equals_ci("ON"))
{
ci->botflags.SetFlag(BS_DONTKICKOPS);
- source.Reply(BOT_SET_DONTKICKOPS_ON, ci->name.c_str());
+ source.Reply(_("Bot \002won't kick ops\002 on channel %s."), ci->name.c_str());
}
else if (value.equals_ci("OFF"))
{
ci->botflags.UnsetFlag(BS_DONTKICKOPS);
- source.Reply(BOT_SET_DONTKICKOPS_OFF, ci->name.c_str());
+ source.Reply(_("Bot \002will kick ops\002 on channel %s."), ci->name.c_str());
}
else
- SyntaxError(source, "SET DONTKICKOPS", BOT_SET_DONTKICKOPS_SYNTAX);
+ SyntaxError(source, "SET DONTKICKOPS", _("SET \037channel\037 DONTKICKOPS {\037ON|\037}"));
}
else if (option.equals_ci("DONTKICKVOICES"))
{
if (value.equals_ci("ON"))
{
ci->botflags.SetFlag(BS_DONTKICKVOICES);
- source.Reply(BOT_SET_DONTKICKVOICES_ON, ci->name.c_str());
+ source.Reply(_("Bot \002won't kick voices\002 on channel %s."), ci->name.c_str());
}
else if (value.equals_ci("OFF"))
{
ci->botflags.UnsetFlag(BS_DONTKICKVOICES);
- source.Reply(BOT_SET_DONTKICKVOICES_OFF, ci->name.c_str());
+ source.Reply(_("Bot \002will kick voices\002 on channel %s."), ci->name.c_str());
}
else
- SyntaxError(source, "SET DONTKICKVOICES", BOT_SET_DONTKICKVOICES_SYNTAX);
+ SyntaxError(source, "SET DONTKICKVOICES", _("SET \037channel\037 DONTKICKVOICES {\037ON|\037}"));
}
else if (option.equals_ci("FANTASY"))
{
if (value.equals_ci("ON"))
{
ci->botflags.SetFlag(BS_FANTASY);
- source.Reply(BOT_SET_FANTASY_ON, ci->name.c_str());
+ source.Reply(_("Fantasy mode is now \002\002 on channel %s."), ci->name.c_str());
}
else if (value.equals_ci("OFF"))
{
ci->botflags.UnsetFlag(BS_FANTASY);
- source.Reply(BOT_SET_FANTASY_OFF, ci->name.c_str());
+ source.Reply(_("Fantasy mode is now \002\002 on channel %s."), ci->name.c_str());
}
else
- SyntaxError(source, "SET FANTASY", BOT_SET_FANTASY_SYNTAX);
+ SyntaxError(source, "SET FANTASY", _("SET \037channel\037 FANTASY {\037ON|\037}"));
}
else if (option.equals_ci("GREET"))
{
if (value.equals_ci("ON"))
{
ci->botflags.SetFlag(BS_GREET);
- source.Reply(BOT_SET_GREET_ON, ci->name.c_str());
+ source.Reply(_("Greet mode is now \002\002 on channel %s."), ci->name.c_str());
}
else if (value.equals_ci("OFF"))
{
ci->botflags.UnsetFlag(BS_GREET);
- source.Reply(BOT_SET_GREET_OFF, ci->name.c_str());
+ source.Reply(_("Greet mode is now \002\002 on channel %s."), ci->name.c_str());
}
else
- SyntaxError(source, "SET GREET", BOT_SET_GREET_SYNTAX);
+ SyntaxError(source, "SET GREET", _("SET \037channel\037 GREET {\037ON|\037}"));
}
else if (u->Account()->HasCommand("botserv/set/nobot") && option.equals_ci("NOBOT"))
{
@@ -132,30 +132,30 @@ class CommandBSSet : public Command
ci->botflags.SetFlag(BS_NOBOT);
if (ci->bi)
ci->bi->UnAssign(u, ci);
- source.Reply(BOT_SET_NOBOT_ON, ci->name.c_str());
+ source.Reply(_("No Bot mode is now \002\002 on channel %s."), ci->name.c_str());
}
else if (value.equals_ci("OFF"))
{
ci->botflags.UnsetFlag(BS_NOBOT);
- source.Reply(BOT_SET_NOBOT_OFF, ci->name.c_str());
+ source.Reply(_("No Bot mode is now \002\002 on channel %s."), ci->name.c_str());
}
else
- SyntaxError(source, "SET NOBOT", BOT_SET_NOBOT_SYNTAX);
+ SyntaxError(source, "SET NOBOT", _("SET \037botname\037 NOBOT {\037ON|\037}"));
}
else if (option.equals_ci("SYMBIOSIS"))
{
if (value.equals_ci("ON"))
{
ci->botflags.SetFlag(BS_SYMBIOSIS);
- source.Reply(BOT_SET_SYMBIOSIS_ON, ci->name.c_str());
+ source.Reply(_("Symbiosis mode is now \002\002 on channel %s."), ci->name.c_str());
}
else if (value.equals_ci("OFF"))
{
ci->botflags.UnsetFlag(BS_SYMBIOSIS);
- source.Reply(BOT_SET_SYMBIOSIS_OFF, ci->name.c_str());
+ source.Reply(_("Symbiosis mode is now \002\002 on channel %s."), ci->name.c_str());
}
else
- SyntaxError(source, "SET SYMBIOSIS", BOT_SET_SYMBIOSIS_SYNTAX);
+ SyntaxError(source, "SET SYMBIOSIS", _("SET \037channel\037 SYMBIOSIS {\037ON|\037}"));
}
else if (option.equals_ci("MSG"))
{
@@ -164,34 +164,34 @@ class CommandBSSet : public Command
ci->botflags.UnsetFlag(BS_MSG_PRIVMSG);
ci->botflags.UnsetFlag(BS_MSG_NOTICE);
ci->botflags.UnsetFlag(BS_MSG_NOTICEOPS);
- source.Reply(BOT_SET_MSG_OFF, ci->name.c_str());
+ source.Reply(_("Fantasy replies will no longer be sent to %s."), ci->name.c_str());
}
else if (value.equals_ci("PRIVMSG"))
{
ci->botflags.SetFlag(BS_MSG_PRIVMSG);
ci->botflags.UnsetFlag(BS_MSG_NOTICE);
ci->botflags.UnsetFlag(BS_MSG_NOTICEOPS);
- source.Reply(BOT_SET_MSG_PRIVMSG, ci->name.c_str());
+ source.Reply(_("Fantasy replies will be sent via PRIVMSG to %s."), ci->name.c_str());
}
else if (value.equals_ci("NOTICE"))
{
ci->botflags.UnsetFlag(BS_MSG_PRIVMSG);
ci->botflags.SetFlag(BS_MSG_NOTICE);
ci->botflags.UnsetFlag(BS_MSG_NOTICEOPS);
- source.Reply(BOT_SET_MSG_NOTICE, ci->name.c_str());
+ source.Reply(_("Fantasy replies will be sent via NOTICE to %s."), ci->name.c_str());
}
else if (value.equals_ci("NOTICEOPS"))
{
ci->botflags.UnsetFlag(BS_MSG_PRIVMSG);
ci->botflags.UnsetFlag(BS_MSG_NOTICE);
ci->botflags.SetFlag(BS_MSG_NOTICEOPS);
- source.Reply(BOT_SET_MSG_NOTICEOPS, ci->name.c_str());
+ source.Reply(_("Fantasy replies will be sent via NOTICE to channel ops on %s."), ci->name.c_str());
}
else
- SyntaxError(source, "SET MSG", BOT_SET_MSG_SYNTAX);
+ SyntaxError(source, "SET MSG", _("SET \037channel\037 MSG {\037OFF|PRIVMSG|NOTICE|\037}"));
}
else
- source.Reply(BOT_SET_UNKNOWN, option.c_str());
+ source.Reply(LanguageString::UNKNOWN_OPTION, option.c_str(), this->name.c_str());
}
return MOD_CONT;
@@ -201,27 +201,90 @@ class CommandBSSet : public Command
{
if (subcommand.empty())
{
- source.Reply(BOT_HELP_SET);
+ source.Reply(_("Syntax: \002SET \037(channel | bot)\037 \037option\037 \037parameters\037\002\n"
+ " \n"
+ "Configures bot options. \037option\037 can be one of:\n"
+ " \n"
+ " DONTKICKOPS To protect ops against bot kicks\n"
+ " DONTKICKVOICES To protect voices against bot kicks\n"
+ " GREET Enable greet messages\n"
+ " FANTASY Enable fantaisist commands\n"
+ " SYMBIOSIS Allow the bot to act as a real bot\n"
+ " MSG Configure how fantasy commands should be replied to\n"
+ " \n"
+ "Type \002%R%S HELP SET \037option\037\002 for more information\n"
+ "on a specific option.\n"
+ "Note: access to this command is controlled by the\n"
+ "level SET."));
User *u = source.u;
if (u->Account() && u->Account()->IsServicesOper())
- source.Reply(BOT_SERVADMIN_HELP_SET);
+ source.Reply(_("These options are reserved to Services Operators:\n"
+ " \n"
+ " NOBOT Prevent a bot from being assigned to \n"
+ " a channel\n"
+ " PRIVATE Prevent a bot from being assigned by\n"
+ " non IRC operators"));
}
else if (subcommand.equals_ci("DONTKICKOPS"))
- source.Reply(BOT_HELP_SET_DONTKICKOPS);
+ source.Reply(_("Syntax: \002SET \037channel\037 DONTKICKOPS {\037ON|OFF\037}\n"
+ " \n"
+ "Enables or disables \002ops protection\002 mode on a channel.\n"
+ "When it is enabled, ops won't be kicked by the bot\n"
+ "even if they don't match the NOKICK level."));
else if (subcommand.equals_ci("DONTKICKVOICES"))
- source.Reply(BOT_HELP_SET_DONTKICKVOICES);
+ source.Reply(_("Syntax: \002SET \037channel\037 DONTKICKVOICES {\037ON|OFF\037}\n"
+ " \n"
+ "Enables or disables \002voices protection\002 mode on a channel.\n"
+ "When it is enabled, voices won't be kicked by the bot\n"
+ "even if they don't match the NOKICK level."));
else if (subcommand.equals_ci("FANTASY"))
- source.Reply(BOT_HELP_SET_FANTASY);
+ source.Reply(_("Syntax: \002SET \037channel\037 FANTASY {\037ON|OFF\037}\n"
+ "Enables or disables \002fantasy\002 mode on a channel.\n"
+ "When it is enabled, users will be able to use\n"
+ "commands !op, !deop, !voice, !devoice,\n"
+ "!kick, !kb, !unban, !seen on a channel (find how \n"
+ "to use them; try with or without nick for each, \n"
+ "and with a reason for some?).\n"
+ " \n"
+ "Note that users wanting to use fantaisist\n"
+ "commands MUST have enough level for both\n"
+ "the FANTASIA and another level depending\n"
+ "of the command if required (for example, to use \n"
+ "!op, user must have enough access for the OPDEOP\n"
+ "level)."));
else if (subcommand.equals_ci("GREET"))
- source.Reply(BOT_HELP_SET_GREET);
+ source.Reply(_("Syntax: \002SET \037channel\037 GREET {\037ON|OFF\037}\n"
+ " \n"
+ "Enables or disables \002greet\002 mode on a channel.\n"
+ "When it is enabled, the bot will display greet\n"
+ "messages of users joining the channel, provided\n"
+ "they have enough access to the channel."));
else if (subcommand.equals_ci("SYMBIOSIS"))
- source.Reply(BOT_HELP_SET_SYMBIOSIS, Config->s_ChanServ.c_str());
+ source.Reply(_("Syntax: \002SET \037channel\037 SYMBIOSIS {\037ON|OFF\037}\n"
+ " \n"
+ "Enables or disables \002symbiosis\002 mode on a channel.\n"
+ "When it is enabled, the bot will do everything\n"
+ "normally done by %s on channels, such as MODEs,\n"
+ "KICKs, and even the entry message."), Config->s_ChanServ.c_str());
else if (subcommand.equals_ci("NOBOT"))
- source.Reply(BOT_SERVADMIN_HELP_SET_NOBOT);
+ source.Reply(_("Syntax: \002SET \037channel\037 NOBOT {\037ON|OFF\037}\002\n"
+ " \n"
+ "This option makes a channel be unassignable. If a bot \n"
+ "is already assigned to the channel, it is unassigned\n"
+ "automatically when you enable the option."));
else if (subcommand.equals_ci("PRIVATE"))
- source.Reply(BOT_SERVADMIN_HELP_SET_PRIVATE);
+ source.Reply(_("Syntax: \002SET \037bot-nick\037 PRIVATE {\037ON|OFF\037}\002\n"
+ "This option prevents a bot from being assigned to a\n"
+ "channel by users that aren't IRC operators."));
else if (subcommand.equals_ci("MSG"))
- source.Reply(BOT_HELP_SET_MSG);
+ source.Reply(_("Syntax: \002SET \037channel\037 MSG {\037OFF|PRIVMSG|NOTICE|NOTICEOPS\037}\002\n"
+ " \n"
+ "Configures how fantasy commands should be returned to the channel. Off disables\n"
+ "fantasy from replying to the channel. Privmsg, notice, and noticeops message the\n"
+ "channel, notice the channel, and notice the channel ops respectively.\n"
+ " \n"
+ "Note that replies over one line will not use this setting to prevent spam, and will\n"
+ "go directly to the user who executed it."));
else
return false;
@@ -230,12 +293,12 @@ class CommandBSSet : public Command
void OnSyntaxError(CommandSource &source, const Anope::string &subcommand)
{
- SyntaxError(source, "SET", BOT_SET_SYNTAX);
+ SyntaxError(source, "SET", _("SET \037(channel | bot)\037 \037option\037 \037settings\037"));
}
void OnServHelp(CommandSource &source)
{
- source.Reply(BOT_HELP_CMD_SET);
+ source.Reply(_(" SET Configures bot options"));
}
};
diff --git a/modules/core/bs_unassign.cpp b/modules/core/bs_unassign.cpp
index 41479f0a3..40a67d9a9 100644
--- a/modules/core/bs_unassign.cpp
+++ b/modules/core/bs_unassign.cpp
@@ -28,38 +28,44 @@ class CommandBSUnassign : public Command
ChannelInfo *ci = source.ci;
if (readonly)
- source.Reply(BOT_ASSIGN_READONLY);
+ source.Reply(LanguageString::BOT_ASSIGN_READONLY);
else if (!u->Account()->HasPriv("botserv/administration") && !check_access(u, ci, CA_ASSIGN))
- source.Reply(ACCESS_DENIED);
+ source.Reply(LanguageString::ACCESS_DENIED);
else if (!ci->bi)
- source.Reply(BOT_NOT_ASSIGNED);
+ source.Reply(LanguageString::BOT_NOT_ASSIGNED);
else if (ci->HasFlag(CI_PERSIST) && !cm)
- source.Reply(BOT_UNASSIGN_PERSISTANT_CHAN);
+ source.Reply(_("You can not unassign bots while persist is set on the channel."));
else
{
bool override = !check_access(u, ci, CA_ASSIGN);
Log(override ? LOG_OVERRIDE : LOG_COMMAND, u, this, ci) << "for " << ci->bi->nick;
ci->bi->UnAssign(u, ci);
- source.Reply(BOT_UNASSIGN_UNASSIGNED, ci->name.c_str());
+ source.Reply(_("There is no bot assigned to %s anymore."), ci->name.c_str());
}
return MOD_CONT;
}
bool OnHelp(CommandSource &source, const Anope::string &subcommand)
{
- source.Reply(BOT_HELP_UNASSIGN);
+ source.Reply(_("Syntax: \002UNASSIGN \037chan\037\002\n"
+ " \n"
+ "Unassigns a bot from a channel. When you use this command,\n"
+ "the bot won't join the channel anymore. However, bot\n"
+ "configuration for the channel is kept, so you will always\n"
+ "be able to reassign a bot later without have to reconfigure\n"
+ "it entirely."));
return true;
}
void OnSyntaxError(CommandSource &source, const Anope::string &subcommand)
{
- SyntaxError(source, "UNASSIGN", BOT_UNASSIGN_SYNTAX);
+ SyntaxError(source, "UNASSIGN", _("UNASSIGN \037chan\037"));
}
void OnServHelp(CommandSource &source)
{
- source.Reply(BOT_HELP_CMD_UNASSIGN);
+ source.Reply(_(" UNASSIGN Unassigns a bot from a channel"));
}
};
diff --git a/modules/core/cs_access.cpp b/modules/core/cs_access.cpp
index a13d1d488..4eb4974fe 100644
--- a/modules/core/cs_access.cpp
+++ b/modules/core/cs_access.cpp
@@ -26,9 +26,9 @@ class AccessListCallback : public NumberList
~AccessListCallback()
{
if (SentHeader)
- source.Reply(CHAN_ACCESS_LIST_FOOTER, source.ci->name.c_str());
+ source.Reply(_("End of access list."), source.ci->name.c_str());
else
- source.Reply(CHAN_ACCESS_NO_MATCH, source.ci->name.c_str());
+ source.Reply(_("No matching entries on %s access list."), source.ci->name.c_str());
}
virtual void HandleNumber(unsigned Number)
@@ -39,7 +39,7 @@ class AccessListCallback : public NumberList
if (!SentHeader)
{
SentHeader = true;
- source.Reply(CHAN_ACCESS_LIST_HEADER, source.ci->name.c_str());
+ source.Reply(LanguageString::CHAN_ACCESS_LIST_HEADER, source.ci->name.c_str());
}
DoList(source, Number - 1, source.ci->GetAccess(Number - 1));
@@ -50,10 +50,10 @@ class AccessListCallback : public NumberList
if (source.ci->HasFlag(CI_XOP))
{
Anope::string xop = get_xop_level(access->level);
- source.Reply(CHAN_ACCESS_LIST_XOP_FORMAT, Number + 1, xop.c_str(), access->mask.c_str());
+ source.Reply(_(" %3d %s %s"), Number + 1, xop.c_str(), access->mask.c_str());
}
else
- source.Reply(CHAN_ACCESS_LIST_AXS_FORMAT, Number + 1, access->level, access->mask.c_str());
+ source.Reply(_(" %3d %4d %s"), Number + 1, access->level, access->mask.c_str());
}
};
@@ -72,7 +72,7 @@ class AccessViewCallback : public AccessListCallback
if (!SentHeader)
{
SentHeader = true;
- source.Reply(CHAN_ACCESS_LIST_HEADER, source.ci->name.c_str());
+ source.Reply(LanguageString::CHAN_ACCESS_LIST_HEADER, source.ci->name.c_str());
}
DoList(source, Number - 1, source.ci->GetAccess(Number - 1));
@@ -92,10 +92,10 @@ class AccessViewCallback : public AccessListCallback
if (ci->HasFlag(CI_XOP))
{
Anope::string xop = get_xop_level(access->level);
- source.Reply(CHAN_ACCESS_VIEW_XOP_FORMAT, Number + 1, xop.c_str(), access->mask.c_str(), access->creator.c_str(), timebuf.c_str());
+ source.Reply(LanguageString::CHAN_ACCESS_VIEW_XOP_FORMAT, Number + 1, xop.c_str(), access->mask.c_str(), access->creator.c_str(), timebuf.c_str());
}
else
- source.Reply(CHAN_ACCESS_VIEW_AXS_FORMAT, Number + 1, access->level, access->mask.c_str(), access->creator.c_str(), timebuf.c_str());
+ source.Reply(LanguageString::CHAN_ACCESS_VIEW_AXS_FORMAT, Number + 1, access->level, access->mask.c_str(), access->creator.c_str(), timebuf.c_str());
}
};
@@ -117,17 +117,17 @@ class AccessDelCallback : public NumberList
~AccessDelCallback()
{
if (Denied && !Deleted)
- source.Reply(ACCESS_DENIED);
+ source.Reply(LanguageString::ACCESS_DENIED);
else if (!Deleted)
- source.Reply(CHAN_ACCESS_NO_MATCH, source.ci->name.c_str());
+ source.Reply(_("No matching entries on %s access list."), source.ci->name.c_str());
else
{
Log(override ? LOG_OVERRIDE : LOG_COMMAND, source.u, c, source.ci) << "for user" << (Deleted == 1 ? " " : "s ") << Nicks;
if (Deleted == 1)
- source.Reply(CHAN_ACCESS_DELETED_ONE, source.ci->name.c_str());
+ source.Reply(_("Deleted 1 entry from %s access list."), source.ci->name.c_str());
else
- source.Reply(CHAN_ACCESS_DELETED_SEVERAL, Deleted, source.ci->name.c_str());
+ source.Reply(_("Deleted %d entries from %s access list."), Deleted, source.ci->name.c_str());
}
}
@@ -175,18 +175,18 @@ class CommandCSAccess : public Command
int16 u_level = u_access ? u_access->level : 0;
if (level >= u_level && !u->Account()->HasPriv("chanserv/access/modify"))
{
- source.Reply(ACCESS_DENIED);
+ source.Reply(LanguageString::ACCESS_DENIED);
return MOD_CONT;
}
if (!level)
{
- source.Reply(CHAN_ACCESS_LEVEL_NONZERO);
+ source.Reply(_("Access level must be non-zero."));
return MOD_CONT;
}
else if (level <= ACCESS_INVALID || 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);
return MOD_CONT;
}
@@ -197,7 +197,7 @@ class CommandCSAccess : public Command
mask += "!*@*";
else if (na && na->HasFlag(NS_FORBIDDEN))
{
- source.Reply(NICK_X_FORBIDDEN, mask.c_str());
+ source.Reply(LanguageString::NICK_X_FORBIDDEN, mask.c_str());
return MOD_CONT;
}
@@ -207,12 +207,12 @@ class CommandCSAccess : public Command
/* Don't allow lowering from a level >= u_level */
if (access->level >= u_level && !u->Account()->HasPriv("chanserv/access/modify"))
{
- source.Reply(ACCESS_DENIED);
+ source.Reply(LanguageString::ACCESS_DENIED);
return MOD_CONT;
}
if (access->level == level)
{
- source.Reply(CHAN_ACCESS_LEVEL_UNCHANGED, access->mask.c_str(), ci->name.c_str(), level);
+ source.Reply(_("Access level for \002%s\002 on %s unchanged from \002%d\002."), access->mask.c_str(), ci->name.c_str(), level);
return MOD_CONT;
}
access->level = level;
@@ -220,13 +220,13 @@ class CommandCSAccess : public Command
FOREACH_MOD(I_OnAccessChange, OnAccessChange(ci, u, access));
Log(override ? LOG_OVERRIDE : LOG_COMMAND, u, this, ci) << "ADD " << mask << " (level: " << level << ") as level " << u_level;
- source.Reply(CHAN_ACCESS_LEVEL_CHANGED, access->mask.c_str(), ci->name.c_str(), level);
+ source.Reply(_("Access level for \002%s\002 on %s changed to \002%d\002."), access->mask.c_str(), ci->name.c_str(), level);
return MOD_CONT;
}
if (ci->GetAccessCount() >= Config->CSAccessMax)
{
- source.Reply(CHAN_ACCESS_REACHED_LIMIT, Config->CSAccessMax);
+ source.Reply(_("Sorry, you can only have %d access entries on a channel."), Config->CSAccessMax);
return MOD_CONT;
}
@@ -235,7 +235,7 @@ class CommandCSAccess : public Command
FOREACH_MOD(I_OnAccessAdd, OnAccessAdd(ci, u, access));
Log(override ? LOG_OVERRIDE : LOG_COMMAND, u, this, ci) << "ADD " << mask << " (level: " << level << ") as level " << u_level;
- source.Reply(CHAN_ACCESS_ADDED, access->mask.c_str(), ci->name.c_str(), level);
+ source.Reply(_("\002%s\002 added to %s access list at level \002%d\002."), access->mask.c_str(), ci->name.c_str(), level);
return MOD_CONT;
}
@@ -248,7 +248,7 @@ class CommandCSAccess : public Command
const Anope::string &mask = params[2];
if (!ci->GetAccessCount())
- source.Reply(CHAN_ACCESS_LIST_EMPTY, ci->name.c_str());
+ source.Reply(_("%s access list is empty."), ci->name.c_str());
else if (isdigit(mask[0]) && mask.find_first_not_of("1234567890,-") == Anope::string::npos)
{
AccessDelCallback list(source, this, mask);
@@ -260,12 +260,12 @@ class CommandCSAccess : public Command
ChanAccess *u_access = ci->GetAccess(u);
int16 u_level = u_access ? u_access->level : 0;
if (!access)
- source.Reply(CHAN_ACCESS_NOT_FOUND, mask.c_str(), ci->name.c_str());
+ source.Reply(_("\002%s\002 not found on %s access list."), mask.c_str(), ci->name.c_str());
else if (access->nc != u->Account() && check_access(u, ci, CA_NOJOIN) && u_level <= access->level && !u->Account()->HasPriv("chanserv/access/modify"))
- source.Reply(ACCESS_DENIED);
+ source.Reply(LanguageString::ACCESS_DENIED);
else
{
- source.Reply(CHAN_ACCESS_DELETED, access->mask.c_str(), ci->name.c_str());
+ source.Reply(_("\002%s\002 deleted from %s access list."), access->mask.c_str(), ci->name.c_str());
bool override = !check_access(u, ci, CA_ACCESS_CHANGE) && access->nc != u->Account();
Log(override ? LOG_OVERRIDE : LOG_COMMAND, u, this, ci) << "DEL " << access->mask << " from level " << access->level;
@@ -285,7 +285,7 @@ class CommandCSAccess : public Command
const Anope::string &nick = params.size() > 2 ? params[2] : "";
if (!ci->GetAccessCount())
- source.Reply(CHAN_ACCESS_LIST_EMPTY, ci->name.c_str());
+ source.Reply(_("%s access list is empty."), ci->name.c_str());
else if (!nick.empty() && nick.find_first_not_of("1234567890,-") == Anope::string::npos)
{
AccessListCallback list(source, nick);
@@ -305,16 +305,16 @@ class CommandCSAccess : public Command
if (!SentHeader)
{
SentHeader = true;
- source.Reply(CHAN_ACCESS_LIST_HEADER, ci->name.c_str());
+ source.Reply(LanguageString::CHAN_ACCESS_LIST_HEADER, ci->name.c_str());
}
AccessListCallback::DoList(source, i, access);
}
if (SentHeader)
- source.Reply(CHAN_ACCESS_LIST_FOOTER, ci->name.c_str());
+ source.Reply(_("End of access list."), ci->name.c_str());
else
- source.Reply(CHAN_ACCESS_NO_MATCH, ci->name.c_str());
+ source.Reply(_("No matching entries on %s access list."), ci->name.c_str());
}
return MOD_CONT;
@@ -327,7 +327,7 @@ class CommandCSAccess : public Command
const Anope::string &nick = params.size() > 2 ? params[2] : "";
if (!ci->GetAccessCount())
- source.Reply(CHAN_ACCESS_LIST_EMPTY, ci->name.c_str());
+ source.Reply(_("%s access list is empty."), ci->name.c_str());
else if (!nick.empty() && nick.find_first_not_of("1234567890,-") == Anope::string::npos)
{
AccessViewCallback list(source, nick);
@@ -347,16 +347,16 @@ class CommandCSAccess : public Command
if (!SentHeader)
{
SentHeader = true;
- source.Reply(CHAN_ACCESS_LIST_HEADER, ci->name.c_str());
+ source.Reply(LanguageString::CHAN_ACCESS_LIST_HEADER, ci->name.c_str());
}
AccessViewCallback::DoList(source, i, access);
}
if (SentHeader)
- source.Reply(CHAN_ACCESS_LIST_FOOTER, ci->name.c_str());
+ source.Reply(_("End of access list."), ci->name.c_str());
else
- source.Reply(CHAN_ACCESS_NO_MATCH, ci->name.c_str());
+ source.Reply(_("No matching entries on %s access list."), ci->name.c_str());
}
return MOD_CONT;
@@ -368,14 +368,14 @@ class CommandCSAccess : public Command
ChannelInfo *ci = source.ci;
if (!IsFounder(u, ci) && !u->Account()->HasPriv("chanserv/access/modify"))
- source.Reply(ACCESS_DENIED);
+ source.Reply(LanguageString::ACCESS_DENIED);
else
{
ci->ClearAccess();
FOREACH_MOD(I_OnAccessClear, OnAccessClear(ci, u));
- source.Reply(CHAN_ACCESS_CLEAR, ci->name.c_str());
+ source.Reply(_("Channel %s access list has been cleared."), ci->name.c_str());
bool override = !IsFounder(u, ci);
Log(override ? LOG_OVERRIDE : LOG_COMMAND, u, this, ci) << "CLEAR";
@@ -420,17 +420,21 @@ class CommandCSAccess : public Command
if (is_list || is_clear ? 0 : (cmd.equals_ci("DEL") ? (nick.empty() || !s.empty()) : s.empty()))
this->OnSyntaxError(source, cmd);
else if (!has_access)
- source.Reply(ACCESS_DENIED);
+ source.Reply(LanguageString::ACCESS_DENIED);
/* We still allow LIST and CLEAR in xOP mode, but not others */
else if (ci->HasFlag(CI_XOP) && !is_list && !is_clear)
{
if (ModeManager::FindChannelModeByName(CMODE_HALFOP))
- source.Reply(CHAN_ACCESS_XOP_HOP, Config->s_ChanServ.c_str());
+ source.Reply(_("You can't use this command. \n"
+ "Use the AOP, SOP, HOP and VOP commands instead.\n"
+ "Type \002%R%s HELP \037command\037\002 for more information."), Config->s_ChanServ.c_str());
else
- source.Reply(CHAN_ACCESS_XOP, Config->s_ChanServ.c_str());
+ source.Reply(_("You can't use this command. \n"
+ "Use the AOP, SOP and VOP commands instead.\n"
+ "Type \002%R%s HELP \037command\037\002 for more information."), Config->s_ChanServ.c_str());
}
else if (readonly && !is_list)
- source.Reply(CHAN_ACCESS_DISABLED);
+ source.Reply(_("Sorry, channel access list modification is temporarily disabled."));
else if (cmd.equals_ci("ADD"))
this->DoAdd(source, params);
else if (cmd.equals_ci("DEL"))
@@ -449,14 +453,75 @@ class CommandCSAccess : public Command
bool OnHelp(CommandSource &source, const Anope::string &subcommand)
{
- source.Reply(CHAN_HELP_ACCESS);
- source.Reply(CHAN_HELP_ACCESS_LEVELS);
+ source.Reply(_("Syntax: \002ACCESS \037channel\037 ADD \037mask\037 \037level\037\002\n"
+ " \002ACCESS \037channel\037 DEL {\037mask\037 | \037entry-num\037 | \037list\037}\002\n"
+ " \002ACCESS \037channel\037 LIST [\037mask\037 | \037list\037]\002\n"
+ " \002ACCESS \037channel\037 VIEW [\037mask\037 | \037list\037]\002\n"
+ " \002ACCESS \037channel\037 CLEAR\002\n"
+ " \n"
+ "Maintains the \002access list\002 for a channel. The access\n"
+ "list specifies which users are allowed chanop status or\n"
+ "access to %S commands on the channel. Different\n"
+ "user levels allow for access to different subsets of\n"
+ "privileges; \002%R%S HELP ACCESS LEVELS\002 for more\n"
+ "specific information. Any nick not on the access list has\n"
+ "a user level of 0.\n"
+ " \n"
+ "The \002ACCESS ADD\002 command adds the given mask to the\n"
+ "access list with the given user level; if the mask is\n"
+ "already present on the list, its access level is changed to\n"
+ "the level specified in the command. The \037level\037 specified\n"
+ "must be less than that of the user giving the command, and\n"
+ "if the \037mask\037 is already on the access list, the current\n"
+ "access level of that nick must be less than the access level\n"
+ "of the user giving the command. When a user joins the channel\n"
+ "the access they receive is from the highest level entry in the\n"
+ "access list.\n"
+ " \n"
+ "The \002ACCESS DEL\002 command removes the given nick from the\n"
+ "access list. If a list of entry numbers is given, those\n"
+ "entries are deleted. (See the example for LIST below.)\n"
+ "You may remove yourself from an access list, even if you\n"
+ "do not have access to modify that list otherwise.\n"
+ " \n"
+ "The \002ACCESS LIST\002 command displays the access list. If\n"
+ "a wildcard mask is given, only those entries matching the\n"
+ "mask are displayed. If a list of entry numbers is given,\n"
+ "only those entries are shown; for example:\n"
+ " \002ACCESS #channel LIST 2-5,7-9\002\n"
+ " Lists access entries numbered 2 through 5 and\n"
+ " 7 through 9.\n"
+ " \n"
+ "The \002ACCESS VIEW\002 command displays the access list similar\n"
+ "to \002ACCESS LIST\002 but shows the creator and last used time.\n"
+ " \n"
+ "The \002ACCESS CLEAR\002 command clears all entries of the\n"
+ "access list."));
+ source.Reply(_("\002User access levels\002\n"
+ " \n"
+ "By default, the following access levels are defined:\n"
+ " \n"
+ " \002Founder\002 Full access to %S functions; automatic\n"
+ " opping upon entering channel. Note\n"
+ " that only one person may have founder\n"
+ " status (it cannot be given using the\n"
+ " \002ACCESS\002 command).\n"
+ " \002 10\002 Access to AKICK command; automatic opping.\n"
+ " \002 5\002 Automatic opping.\n"
+ " \002 3\002 Automatic voicing.\n"
+ " \002 0\002 No special privileges; can be opped by other\n"
+ " ops (unless \002secure-ops\002 is set).\n"
+ " \002 <0\002 May not be opped.\n"
+ " \n"
+ "These levels may be changed, or new ones added, using the\n"
+ "\002LEVELS\002 command; type \002%R%S HELP LEVELS\002 for\n"
+ "information."));
return true;
}
void OnSyntaxError(CommandSource &source, const Anope::string &subcommand)
{
- SyntaxError(source, "ACCESS", CHAN_ACCESS_SYNTAX);
+ SyntaxError(source, "ACCESS", _("ACCESS \037channel\037 {ADD|DEL|LIST|VIEW|CLEAR} [\037mask\037 [\037level\037] | \037entry-list\037]"));
}
};
@@ -484,7 +549,7 @@ class CommandCSLevels : public Command
if (!error.empty())
this->OnSyntaxError(source, "SET");
else if (level <= ACCESS_INVALID || level > ACCESS_FOUNDER)
- source.Reply(CHAN_LEVELS_RANGE, ACCESS_INVALID + 1, ACCESS_FOUNDER - 1);
+ source.Reply(_("Level must be between %d and %d inclusive."), ACCESS_INVALID + 1, ACCESS_FOUNDER - 1);
else
{
for (int i = 0; levelinfo[i].what >= 0; ++i)
@@ -498,14 +563,14 @@ class CommandCSLevels : public Command
Log(override ? LOG_OVERRIDE : LOG_COMMAND, u, this, ci) << "SET " << levelinfo[i].name << " to " << level;
if (level == ACCESS_FOUNDER)
- source.Reply(CHAN_LEVELS_CHANGED_FOUNDER, levelinfo[i].name.c_str(), ci->name.c_str());
+ source.Reply(_("Level for %s on channel %s changed to founder only."), levelinfo[i].name.c_str(), ci->name.c_str());
else
- source.Reply(CHAN_LEVELS_CHANGED, levelinfo[i].name.c_str(), ci->name.c_str(), level);
+ source.Reply(_("Level for \002%s\002 on channel %s changed to \002%d\002."), levelinfo[i].name.c_str(), ci->name.c_str(), level);
return MOD_CONT;
}
}
- source.Reply(CHAN_LEVELS_UNKNOWN, what.c_str(), Config->s_ChanServ.c_str());
+ source.Reply(_("Setting \002%s\002 not known. Type \002%R%s HELP LEVELS \002 for a list of valid settings."), what.c_str(), Config->s_ChanServ.c_str());
}
return MOD_CONT;
@@ -530,12 +595,12 @@ class CommandCSLevels : public Command
bool override = !check_access(u, ci, CA_FOUNDER);
Log(override ? LOG_OVERRIDE : LOG_COMMAND, u, this, ci) << "DISABLE " << levelinfo[i].name;
- source.Reply(CHAN_LEVELS_DISABLED, levelinfo[i].name.c_str(), ci->name.c_str());
+ source.Reply(_("\002%s\002 disabled on channel %s."), levelinfo[i].name.c_str(), ci->name.c_str());
return MOD_CONT;
}
}
- source.Reply(CHAN_LEVELS_UNKNOWN, what.c_str(), Config->s_ChanServ.c_str());
+ source.Reply(_("Setting \002%s\002 not known. Type \002%R%s HELP LEVELS \002 for a list of valid settings."), what.c_str(), Config->s_ChanServ.c_str());
return MOD_CONT;
}
@@ -544,7 +609,7 @@ class CommandCSLevels : public Command
{
ChannelInfo *ci = source.ci;
- source.Reply(CHAN_LEVELS_LIST_HEADER, ci->name.c_str());
+ source.Reply(_("Access level settings for channel %s:"), ci->name.c_str());
if (!levelinfo_maxwidth)
for (int i = 0; levelinfo[i].what >= 0; ++i)
@@ -562,12 +627,12 @@ class CommandCSLevels : public Command
{
j = levelinfo[i].what;
- source.Reply(CHAN_LEVELS_LIST_DISABLED, levelinfo_maxwidth, levelinfo[i].name.c_str());
+ source.Reply(_(" %-*s (disabled)"), levelinfo_maxwidth, levelinfo[i].name.c_str());
}
else if (j == ACCESS_FOUNDER)
- source.Reply(CHAN_LEVELS_LIST_FOUNDER, levelinfo_maxwidth, levelinfo[i].name.c_str());
+ source.Reply(_(" %-*s (founder only)"), levelinfo_maxwidth, levelinfo[i].name.c_str());
else
- source.Reply(CHAN_LEVELS_LIST_NORMAL, levelinfo_maxwidth, levelinfo[i].name.c_str(), j);
+ source.Reply(_(" %-*s %d"), levelinfo_maxwidth, levelinfo[i].name.c_str(), j);
}
return MOD_CONT;
@@ -584,7 +649,7 @@ class CommandCSLevels : public Command
bool override = !check_access(u, ci, CA_FOUNDER);
Log(override ? LOG_OVERRIDE : LOG_COMMAND, u, this, ci) << "RESET";
- source.Reply(CHAN_LEVELS_RESET, ci->name.c_str());
+ source.Reply(_("Access levels for \002%s\002 reset to defaults."), ci->name.c_str());
return MOD_CONT;
}
@@ -608,9 +673,9 @@ class CommandCSLevels : public Command
if (cmd.equals_ci("SET") ? s.empty() : (cmd.substr(0, 3).equals_ci("DIS") ? (what.empty() || !s.empty()) : !what.empty()))
this->OnSyntaxError(source, cmd);
else if (ci->HasFlag(CI_XOP))
- source.Reply(CHAN_LEVELS_XOP);
+ source.Reply(_("Levels are not available as xOP is enabled on this channel."));
else if (!check_access(u, ci, CA_FOUNDER) && !u->Account()->HasPriv("chanserv/access/modify"))
- source.Reply(ACCESS_DENIED);
+ source.Reply(LanguageString::ACCESS_DENIED);
else if (cmd.equals_ci("SET"))
this->DoSet(source, params);
else if (cmd.equals_ci("DIS") || cmd.equals_ci("DISABLE"))
@@ -630,7 +695,9 @@ class CommandCSLevels : public Command
if (subcommand.equals_ci("DESC"))
{
int i;
- source.Reply(CHAN_HELP_LEVELS_DESC);
+ source.Reply(_("The following feature/function names are understood. Note\n"
+ "that the leves for NOJOIN is the maximum level,\n"
+ "while all others are minimum levels."));
if (!levelinfo_maxwidth)
for (i = 0; levelinfo[i].what >= 0; ++i)
{
@@ -639,22 +706,45 @@ class CommandCSLevels : public Command
levelinfo_maxwidth = len;
}
for (i = 0; levelinfo[i].what >= 0; ++i)
- source.Reply(CHAN_HELP_LEVELS_DESC_FORMAT, levelinfo_maxwidth, levelinfo[i].name.c_str(), GetString(source.u, levelinfo[i].desc).c_str());
+ source.Reply(_(" %-*s %s"), levelinfo_maxwidth, levelinfo[i].name.c_str(), GetString(source.u->Account(), levelinfo[i].desc).c_str());
}
else
- source.Reply(CHAN_HELP_LEVELS);
+ source.Reply(_("Syntax: \002LEVELS \037channel\037 SET \037type\037 \037level\037\002\n"
+ " \002LEVELS \037channel\037 {DIS | DISABLE} \037type\037\002\n"
+ " \002LEVELS \037channel\037 LIST\002\n"
+ " \002LEVELS \037channel\037 RESET\002\n"
+ " \n"
+ "The \002LEVELS\002 command allows fine control over the meaning of\n"
+ "the numeric access levels used for channels. With this\n"
+ "command, you can define the access level required for most\n"
+ "of %S's functions. (The \002SET FOUNDER\002 and this command\n"
+ "are always restricted to the channel founder.)\n"
+ " \n"
+ "\002LEVELS SET\002 allows the access level for a function or group of\n"
+ "functions to be changed. \002LEVELS DISABLE\002 (or \002DIS\002 for short)\n"
+ "disables an automatic feature or disallows access to a\n"
+ "function by anyone, INCLUDING the founder (although, the founder\n"
+ "can always reenable it).\n"
+ " \n"
+ "\002LEVELS LIST\002 shows the current levels for each function or\n"
+ "group of functions. \002LEVELS RESET\002 resets the levels to the\n"
+ "default levels of a newly-created channel (see\n"
+ "\002HELP ACCESS LEVELS\002).\n"
+ " \n"
+ "For a list of the features and functions whose levels can be\n"
+ "set, see \002HELP LEVELS DESC\002."));
return true;
}
void OnSyntaxError(CommandSource &source, const Anope::string &subcommand)
{
- SyntaxError(source, "LEVELS", CHAN_LEVELS_SYNTAX);
+ SyntaxError(source, "LEVELS", _("LEVELS \037channel\037 {SET | DIS[ABLE] | LIST | RESET} [\037item\037 [\037level\037]]"));
}
void OnServHelp(CommandSource &source)
{
- source.Reply(CHAN_HELP_CMD_ACCESS);
- source.Reply(CHAN_HELP_CMD_LEVELS);
+ source.Reply(_(" ACCESS Modify the list of privileged users"));
+ source.Reply(_(" LEVELS Redefine the meanings of access levels"));
}
};
diff --git a/modules/core/cs_akick.cpp b/modules/core/cs_akick.cpp
index 34d3c8369..11b5485ff 100644
--- a/modules/core/cs_akick.cpp
+++ b/modules/core/cs_akick.cpp
@@ -64,7 +64,7 @@ class AkickListCallback : public NumberList
~AkickListCallback()
{
if (!SentHeader)
- source.Reply(CHAN_AKICK_NO_MATCH, source.ci->name.c_str());
+ source.Reply(_("No matching entries on %s autokick list."), source.ci->name.c_str());
}
virtual void HandleNumber(unsigned Number)
@@ -75,7 +75,7 @@ class AkickListCallback : public NumberList
if (!SentHeader)
{
SentHeader = true;
- source.Reply(CHAN_AKICK_LIST_HEADER, source.ci->name.c_str());
+ source.Reply(_("Autokick list for %s:"), source.ci->name.c_str());
}
DoList(source, Number - 1, source.ci->GetAkick(Number - 1));
@@ -83,7 +83,7 @@ class AkickListCallback : public NumberList
static void DoList(CommandSource &source, unsigned index, AutoKick *akick)
{
- source.Reply(CHAN_AKICK_LIST_FORMAT, index + 1, akick->HasFlag(AK_ISNICK) ? akick->nc->display.c_str() : akick->mask.c_str(), !akick->reason.empty() ? akick->reason.c_str() : GetString(source.u, NO_REASON).c_str());
+ source.Reply(_(" %3d %s (%s)"), index + 1, akick->HasFlag(AK_ISNICK) ? akick->nc->display.c_str() : akick->mask.c_str(), !akick->reason.empty() ? akick->reason.c_str() : GetString(source.u->Account(), LanguageString::NO_REASON).c_str());
}
};
@@ -102,7 +102,7 @@ class AkickViewCallback : public AkickListCallback
if (!SentHeader)
{
SentHeader = true;
- source.Reply(CHAN_AKICK_LIST_HEADER, source.ci->name.c_str());
+ source.Reply(_("Autokick list for %s:"), source.ci->name.c_str());
}
DoList(source, Number - 1, source.ci->GetAkick(Number - 1));
@@ -116,12 +116,12 @@ class AkickViewCallback : public AkickListCallback
if (akick->addtime)
timebuf = do_strftime(akick->addtime);
else
- timebuf = GetString(u, UNKNOWN);
+ timebuf = GetString(u->Account(), LanguageString::UNKNOWN);
- source.Reply(CHAN_AKICK_VIEW_FORMAT, index + 1, akick->HasFlag(AK_ISNICK) ? akick->nc->display.c_str() : akick->mask.c_str(), !akick->creator.empty() ? akick->creator.c_str() : GetString(u, UNKNOWN).c_str(), timebuf.c_str(), !akick->reason.empty() ? akick->reason.c_str() : GetString(u, NO_REASON).c_str());
+ source.Reply(LanguageString::CHAN_AKICK_VIEW_FORMAT, index + 1, akick->HasFlag(AK_ISNICK) ? akick->nc->display.c_str() : akick->mask.c_str(), !akick->creator.empty() ? akick->creator.c_str() : GetString(u->Account(), LanguageString::UNKNOWN).c_str(), timebuf.c_str(), !akick->reason.empty() ? akick->reason.c_str() : GetString(u->Account(), LanguageString::NO_REASON).c_str());
if (akick->last_used)
- source.Reply(CHAN_AKICK_LAST_USED, do_strftime(akick->last_used).c_str());
+ source.Reply(_(" Last used %s"), do_strftime(akick->last_used).c_str());
}
};
@@ -143,11 +143,11 @@ class AkickDelCallback : public NumberList
Log(override ? LOG_OVERRIDE : LOG_COMMAND, u, c, ci) << "DEL on " << Deleted << " users";
if (!Deleted)
- source.Reply(CHAN_AKICK_NO_MATCH, ci->name.c_str());
+ source.Reply(_("No matching entries on %s autokick list."), ci->name.c_str());
else if (Deleted == 1)
- source.Reply(CHAN_AKICK_DELETED_ONE, ci->name.c_str());
+ source.Reply(_("Deleted 1 entry from %s autokick list."), ci->name.c_str());
else
- source.Reply(CHAN_AKICK_DELETED_SEVERAL, Deleted, ci->name.c_str());
+ source.Reply(_("Deleted %d entries from %s autokick list."), Deleted, ci->name.c_str());
}
void HandleNumber(unsigned Number)
@@ -184,7 +184,7 @@ class CommandCSAKick : public Command
{
if (na->HasFlag(NS_FORBIDDEN))
{
- source.Reply(NICK_X_FORBIDDEN, mask.c_str());
+ source.Reply(LanguageString::NICK_X_FORBIDDEN, mask.c_str());
return;
}
@@ -194,7 +194,7 @@ class CommandCSAKick : public Command
/* Check excepts BEFORE we get this far */
if (ModeManager::FindChannelModeByName(CMODE_EXCEPT) && is_excepted_mask(ci, mask))
{
- source.Reply(CHAN_EXCEPTED, mask.c_str(), ci->name.c_str());
+ source.Reply(LanguageString::CHAN_EXCEPTED, mask.c_str(), ci->name.c_str());
return;
}
@@ -206,7 +206,7 @@ class CommandCSAKick : public Command
int16 nc_level = nc_access ? nc_access->level : 0, u_level = u_access ? u_access->level : 0;
if (nc == ci->founder || nc_level >= u_level)
{
- source.Reply(ACCESS_DENIED);
+ source.Reply(LanguageString::ACCESS_DENIED);
return;
}
}
@@ -224,7 +224,7 @@ class CommandCSAKick : public Command
if ((check_access(u2, ci, CA_FOUNDER) || u2_level >= u_level) && entry_mask.Matches(u2))
{
- source.Reply(ACCESS_DENIED);
+ source.Reply(LanguageString::ACCESS_DENIED);
return;
}
}
@@ -245,7 +245,7 @@ class CommandCSAKick : public Command
Anope::string buf = na2->nick + "!" + na2->last_usermask;
if (Anope::Match(buf, mask))
{
- source.Reply(ACCESS_DENIED);
+ source.Reply(LanguageString::ACCESS_DENIED);
return;
}
}
@@ -257,14 +257,14 @@ class CommandCSAKick : public Command
akick = ci->GetAkick(j);
if (akick->HasFlag(AK_ISNICK) ? akick->nc == nc : mask.equals_ci(akick->mask))
{
- source.Reply(CHAN_AKICK_ALREADY_EXISTS, akick->HasFlag(AK_ISNICK) ? akick->nc->display.c_str() : akick->mask.c_str(), ci->name.c_str());
+ source.Reply(_("\002%s\002 already exists on %s autokick list."), akick->HasFlag(AK_ISNICK) ? akick->nc->display.c_str() : akick->mask.c_str(), ci->name.c_str());
return;
}
}
if (ci->GetAkickCount() >= Config->CSAutokickMax)
{
- source.Reply(CHAN_AKICK_REACHED_LIMIT, Config->CSAutokickMax);
+ source.Reply(_("Sorry, you can only have %d autokick masks on a channel."), Config->CSAutokickMax);
return;
}
@@ -278,7 +278,7 @@ class CommandCSAKick : public Command
FOREACH_MOD(I_OnAkickAdd, OnAkickAdd(u, ci, akick));
- source.Reply(CHAN_AKICK_ADDED, mask.c_str(), ci->name.c_str());
+ source.Reply(_("\002%s\002 added to %s autokick list."), mask.c_str(), ci->name.c_str());
this->DoEnforce(source);
}
@@ -294,7 +294,7 @@ class CommandCSAKick : public Command
if (!ci->GetAkickCount())
{
- source.Reply(CHAN_AKICK_LIST_EMPTY, ci->name.c_str());
+ source.Reply(_("%s autokick list is empty."), ci->name.c_str());
return;
}
@@ -319,7 +319,7 @@ class CommandCSAKick : public Command
if (i == ci->GetAkickCount())
{
- source.Reply(CHAN_AKICK_NOT_FOUND, mask.c_str(), ci->name.c_str());
+ source.Reply(_("\002%s\002 not found on %s autokick list."), mask.c_str(), ci->name.c_str());
return;
}
@@ -328,7 +328,7 @@ class CommandCSAKick : public Command
ci->EraseAkick(i);
- source.Reply(CHAN_AKICK_DELETED, mask.c_str(), ci->name.c_str());
+ source.Reply(_("\002%s\002 deleted from %s autokick list."), mask.c_str(), ci->name.c_str());
}
}
@@ -344,7 +344,7 @@ class CommandCSAKick : public Command
if (!ci->GetAkickCount())
{
- source.Reply(CHAN_AKICK_LIST_EMPTY, ci->name.c_str());
+ source.Reply(_("%s autokick list is empty."), ci->name.c_str());
return;
}
@@ -372,14 +372,14 @@ class CommandCSAKick : public Command
if (!SentHeader)
{
SentHeader = true;
- source.Reply(CHAN_AKICK_LIST_HEADER, ci->name.c_str());
+ source.Reply(_("Autokick list for %s:"), ci->name.c_str());
}
AkickListCallback::DoList(source, i, akick);
}
if (!SentHeader)
- source.Reply(CHAN_AKICK_NO_MATCH, ci->name.c_str());
+ source.Reply(_("No matching entries on %s autokick list."), ci->name.c_str());
}
}
@@ -395,7 +395,7 @@ class CommandCSAKick : public Command
if (!ci->GetAkickCount())
{
- source.Reply(CHAN_AKICK_LIST_EMPTY, ci->name.c_str());
+ source.Reply(_("%s autokick list is empty."), ci->name.c_str());
return;
}
@@ -423,14 +423,14 @@ class CommandCSAKick : public Command
if (!SentHeader)
{
SentHeader = true;
- source.Reply(CHAN_AKICK_LIST_HEADER, ci->name.c_str());
+ source.Reply(_("Autokick list for %s:"), ci->name.c_str());
}
AkickViewCallback::DoList(source, i, akick);
}
if (!SentHeader)
- source.Reply(CHAN_AKICK_NO_MATCH, ci->name.c_str());
+ source.Reply(_("No matching entries on %s autokick list."), ci->name.c_str());
}
}
@@ -443,7 +443,7 @@ class CommandCSAKick : public Command
if (!c)
{
- source.Reply(CHAN_X_NOT_IN_USE, ci->name.c_str());
+ source.Reply(LanguageString::CHAN_X_NOT_IN_USE, ci->name.c_str());
return;
}
@@ -458,7 +458,7 @@ class CommandCSAKick : public Command
bool override = !check_access(u, ci, CA_AKICK);
Log(override ? LOG_OVERRIDE : LOG_COMMAND, u, this, ci) << "ENFORCE, affects " << count << " users";
- source.Reply(CHAN_AKICK_ENFORCE_DONE, ci->name.c_str(), count);
+ source.Reply(_("AKICK ENFORCE for \002%s\002 complete; \002%d\002 users were affected."), ci->name.c_str(), count);
}
void DoClear(CommandSource &source)
@@ -469,7 +469,7 @@ class CommandCSAKick : public Command
Log(override ? LOG_OVERRIDE : LOG_COMMAND, u, this, ci) << "CLEAR";
ci->ClearAkick();
- source.Reply(CHAN_AKICK_CLEAR, ci->name.c_str());
+ source.Reply(_("Channel %s akick list has been cleared."), ci->name.c_str());
}
public:
@@ -489,9 +489,9 @@ class CommandCSAKick : public Command
if (mask.empty() && (cmd.equals_ci("ADD") || cmd.equals_ci("DEL")))
this->OnSyntaxError(source, cmd);
else if (!check_access(u, ci, CA_AKICK) && !u->Account()->HasPriv("chanserv/access/modify"))
- source.Reply(ACCESS_DENIED);
+ source.Reply(LanguageString::ACCESS_DENIED);
else if (!cmd.equals_ci("LIST") && !cmd.equals_ci("VIEW") && !cmd.equals_ci("ENFORCE") && readonly)
- source.Reply(CHAN_AKICK_DISABLED);
+ source.Reply(_("Sorry, channel autokick list modification is temporarily disabled."));
else if (cmd.equals_ci("ADD"))
this->DoAdd(source, params);
else if (cmd.equals_ci("DEL"))
@@ -512,18 +512,56 @@ class CommandCSAKick : public Command
bool OnHelp(CommandSource &source, const Anope::string &subcommand)
{
- source.Reply(CHAN_HELP_AKICK);
+ source.Reply(_("Syntax: \002AKICK \037channel\037 ADD {\037nick\037 | \037mask\037} [\037reason\037]\002\n"
+ " \002AKICK \037channel\037 DEL {\037nick\037 | \037mask\037 | \037entry-num\037 | \037list\037}\002\n"
+ " \002AKICK \037channel\037 LIST [\037mask\037 | \037entry-num\037 | \037list\037]\002\n"
+ " \002AKICK \037channel\037 VIEW [\037mask\037 | \037entry-num\037 | \037list\037]\002\n"
+ " \002AKICK \037channel\037 ENFORCE\002\n"
+ " \002AKICK \037channel\037 CLEAR\002\n"
+ " \n"
+ "Maintains the \002AutoKick list\002 for a channel. If a user\n"
+ "on the AutoKick list attempts to join the channel,\n"
+ "%S will ban that user from the channel, then kick\n"
+ "the user.\n"
+ " \n"
+ "The \002AKICK ADD\002 command adds the given nick or usermask\n"
+ "to the AutoKick list. If a \037reason\037 is given with\n"
+ "the command, that reason will be used when the user is\n"
+ "kicked; if not, the default reason is \"You have been\n"
+ "banned from the channel\".\n"
+ "When akicking a \037registered nick\037 the nickserv account\n"
+ "will be added to the akick list instead of the mask.\n"
+ "All users within that nickgroup will then be akicked.\n"
+ " \n"
+ "The \002AKICK DEL\002 command removes the given nick or mask\n"
+ "from the AutoKick list. It does not, however, remove any\n"
+ "bans placed by an AutoKick; those must be removed\n"
+ "manually.\n"
+ " \n"
+ "The \002AKICK LIST\002 command displays the AutoKick list, or\n"
+ "optionally only those AutoKick entries which match the\n"
+ "given mask.\n"
+ " \n"
+ "The \002AKICK VIEW\002 command is a more verbose version of\n"
+ "\002AKICK LIST\002 command.\n"
+ " \n"
+ "The \002AKICK ENFORCE\002 command causes %S to enforce the\n"
+ "current AKICK list by removing those users who match an\n"
+ "AKICK mask.\n"
+ " \n"
+ "The \002AKICK CLEAR\002 command clears all entries of the\n"
+ "akick list."));
return true;
}
void OnSyntaxError(CommandSource &source, const Anope::string &subcommand)
{
- SyntaxError(source, "AKICK", CHAN_AKICK_SYNTAX);
+ SyntaxError(source, "AKICK", _("AKICK \037channel\037 {ADD | DEL | LIST | VIEW | ENFORCE | CLEAR} [\037nick-or-usermask\037] [\037reason\037]"));
}
void OnServHelp(CommandSource &source)
{
- source.Reply(CHAN_HELP_CMD_AKICK);
+ source.Reply(_(" AKICK Maintain the AutoKick list"));
}
};
diff --git a/modules/core/cs_ban.cpp b/modules/core/cs_ban.cpp
index 8ff5319fb..9d2291771 100644
--- a/modules/core/cs_ban.cpp
+++ b/modules/core/cs_ban.cpp
@@ -36,21 +36,21 @@ class CommandCSBan : public Command
uint16 u_level = u_access ? u_access->level : 0, u2_level = u2_access ? u2_access->level : 0;
if (!c)
- source.Reply(CHAN_X_NOT_IN_USE, chan.c_str());
+ source.Reply(LanguageString::CHAN_X_NOT_IN_USE, chan.c_str());
else if (!u2)
- source.Reply(NICK_X_NOT_IN_USE, target.c_str());
+ source.Reply(LanguageString::NICK_X_NOT_IN_USE, target.c_str());
else if (!is_same ? !check_access(u, ci, CA_BAN) : !check_access(u, ci, CA_BANME))
- source.Reply(ACCESS_DENIED);
+ source.Reply(LanguageString::ACCESS_DENIED);
else if (!is_same && ci->HasFlag(CI_PEACE) && u2_level >= u_level)
- source.Reply(ACCESS_DENIED);
+ source.Reply(LanguageString::ACCESS_DENIED);
/*
* Dont ban/kick the user on channels where he is excepted
* to prevent services <-> server wars.
*/
else if (matches_list(ci->c, u2, CMODE_EXCEPT))
- source.Reply(CHAN_EXCEPTED, u2->nick.c_str(), ci->name.c_str());
+ source.Reply(LanguageString::CHAN_EXCEPTED, u2->nick.c_str(), ci->name.c_str());
else if (u2->IsProtected())
- source.Reply(ACCESS_DENIED);
+ source.Reply(LanguageString::ACCESS_DENIED);
else
{
Anope::string mask;
@@ -76,18 +76,23 @@ class CommandCSBan : public Command
bool OnHelp(CommandSource &source, const Anope::string &subcommand)
{
- source.Reply(CHAN_HELP_BAN);
+ source.Reply(_("Syntax: \002BAN \037#channel\037 \037nick\037 [\037reason\037]\002\n"
+ " \n"
+ "Bans a selected nick on a channel.\n"
+ " \n"
+ "By default, limited to AOPs or those with level 5 access \n"
+ "and above on the channel."));
return true;
}
void OnSyntaxError(CommandSource &source, const Anope::string &subcommand)
{
- SyntaxError(source, "BAN", CHAN_BAN_SYNTAX);
+ SyntaxError(source, "BAN", _("BAN \037#channel\037 \037nick\037 [\037reason\037]"));
}
void OnServHelp(CommandSource &source)
{
- source.Reply(CHAN_HELP_CMD_BAN);
+ source.Reply(_(" BAN Bans a selected nick on a channel"));
}
};
diff --git a/modules/core/cs_clearusers.cpp b/modules/core/cs_clearusers.cpp
index e171814dd..b4786209c 100644
--- a/modules/core/cs_clearusers.cpp
+++ b/modules/core/cs_clearusers.cpp
@@ -31,9 +31,9 @@ class CommandCSClearUsers : public Command
Anope::string modebuf;
if (!c)
- source.Reply(CHAN_X_NOT_IN_USE, chan.c_str());
+ source.Reply(LanguageString::CHAN_X_NOT_IN_USE, chan.c_str());
else if (!check_access(u, ci, CA_FOUNDER))
- source.Reply(ACCESS_DENIED);
+ source.Reply(LanguageString::ACCESS_DENIED);
Anope::string buf = "CLEARUSERS command from " + u->nick + " (" + u->Account()->display + ")";
@@ -44,25 +44,30 @@ class CommandCSClearUsers : public Command
c->Kick(NULL, uc->user, "%s", buf.c_str());
}
- source.Reply(CHAN_CLEARED_USERS, chan.c_str());
+ source.Reply(_("All users have been kicked from \2%s\2."), chan.c_str());
return MOD_CONT;
}
bool OnHelp(CommandSource &source, const Anope::string &subcommand)
{
- source.Reply(CHAN_HELP_CLEARUSERS);
+ source.Reply(_("Syntax: \002CLEARUSERS \037channel\037\002\n"
+ " \n"
+ "Tells %S to clear (kick) all users certain settings on a channel."
+ " \n"
+ "By default, limited to those with founder access on the\n"
+ "channel."));
return true;
}
void OnSyntaxError(CommandSource &source, const Anope::string &subcommand)
{
- SyntaxError(source, "CLEAR", CHAN_CLEARUSERS_SYNTAX);
+ SyntaxError(source, "CLEAR", _("CLEARUSERS \037channel\037"));
}
void OnServHelp(CommandSource &source)
{
- source.Reply(CHAN_HELP_CMD_CLEARUSERS);
+ source.Reply(_(" CLEARUSERS Tells ChanServ to clear (kick) all users on a channel"));
}
};
diff --git a/modules/core/cs_clone.cpp b/modules/core/cs_clone.cpp
index 7f4d3ca89..9222819fe 100644
--- a/modules/core/cs_clone.cpp
+++ b/modules/core/cs_clone.cpp
@@ -31,24 +31,24 @@ public:
if (!check_access(u, ci, CA_SET))
{
- source.Reply(ACCESS_DENIED);
+ source.Reply(LanguageString::ACCESS_DENIED);
return MOD_CONT;
}
ChannelInfo *target_ci = cs_findchan(target);
if (!target_ci)
{
- source.Reply(CHAN_X_NOT_REGISTERED, target.c_str());
+ source.Reply(LanguageString::CHAN_X_NOT_REGISTERED, target.c_str());
return MOD_CONT;
}
if (!IsFounder(u, ci) || !IsFounder(u, target_ci))
{
- source.Reply(ACCESS_DENIED);
+ source.Reply(LanguageString::ACCESS_DENIED);
return MOD_CONT;
}
if (Config->CSMaxReg && u->Account()->channelcount >= Config->CSMaxReg && !u->Account()->HasPriv("chanserv/no-register-limit"))
{
- source.Reply(u->Account()->channelcount > Config->CSMaxReg ? CHAN_EXCEEDED_CHANNEL_LIMIT : CHAN_REACHED_CHANNEL_LIMIT, Config->CSMaxReg);
+ source.Reply(u->Account()->channelcount > Config->CSMaxReg ? LanguageString::CHAN_EXCEEDED_CHANNEL_LIMIT : LanguageString::CHAN_REACHED_CHANNEL_LIMIT, Config->CSMaxReg);
return MOD_CONT;
}
@@ -100,7 +100,7 @@ public:
FOREACH_MOD(I_OnChanRegistered, OnChanRegistered(target_ci));
- source.Reply(CHAN_CLONED, channel.c_str(), target.c_str());
+ source.Reply(_("All settings from \002%s\002 have been transferred to \002%s\002"), channel.c_str(), target.c_str());
}
else if (what.equals_ci("ACCESS"))
{
@@ -111,7 +111,7 @@ public:
target_ci->AddAccess(access->mask, access->level, access->creator, access->last_seen);
}
- source.Reply(CHAN_CLONED_ACCESS, channel.c_str(), target.c_str());
+ source.Reply(_("All access entries from \002%s\002 have been transferred to \002%s\002"), channel.c_str(), target.c_str());
}
else if (what.equals_ci("AKICK"))
{
@@ -125,7 +125,7 @@ public:
target_ci->AddAkick(akick->creator, akick->mask, akick->reason, akick->addtime, akick->last_used);
}
- source.Reply(CHAN_CLONED_AKICK, channel.c_str(), target.c_str());
+ source.Reply(_("All akick entries from \002%s\002 have been transferred to \002%s\002"), channel.c_str(), target.c_str());
}
else if (what.equals_ci("BADWORDS"))
{
@@ -136,7 +136,7 @@ public:
target_ci->AddBadWord(bw->word, bw->type);
}
- source.Reply(CHAN_CLONED_BADWORDS, channel.c_str(), target.c_str());
+ source.Reply(_("All badword entries from \002%s\002 have been transferred to \002%s\002"), channel.c_str(), target.c_str());
}
else
{
@@ -151,18 +151,23 @@ public:
bool OnHelp(CommandSource &source, const Anope::string &subcommand)
{
- source.Reply(CHAN_HELP_CLONE);
+ source.Reply(_("Syntax: \002CLONE \037channel\037 \037target\037 [all | access | akick | badwords]\002\n"
+ " \n"
+ "Copies all settings, access, akicks, etc from channel to the\n"
+ "target channel. If access, akick, or badwords is specified then only\n"
+ "the respective settings are transferred. You must have founder level\n"
+ "access to \037channel\037 and \037target\037."));
return true;
}
void OnSyntaxError(CommandSource &source, const Anope::string &subcommand)
{
- SyntaxError(source, "CLONE", CHAN_CLONE_SYNTAX);
+ SyntaxError(source, "CLONE", _("CLONE \037channel\037 \037target\037"));
}
void OnServHelp(CommandSource &source)
{
- source.Reply(CHAN_HELP_CMD_CLONE);
+ source.Reply(_(" CLONE Copy all settings from one channel to another"));
}
};
diff --git a/modules/core/cs_drop.cpp b/modules/core/cs_drop.cpp
index b5ab4f981..af01b9726 100644
--- a/modules/core/cs_drop.cpp
+++ b/modules/core/cs_drop.cpp
@@ -31,7 +31,7 @@ class CommandCSDrop : public Command
if (readonly)
{
- source.Reply(CHAN_DROP_DISABLED); // XXX: READ_ONLY_MODE?
+ source.Reply(_("Sorry, channel de-registration is temporarily disabled.")); // XXX: READ_ONLY_MODE?
return MOD_CONT;
}
@@ -39,19 +39,19 @@ class CommandCSDrop : public Command
if (ci->HasFlag(CI_FORBIDDEN) && !u->Account()->HasCommand("chanserv/drop"))
{
- source.Reply(CHAN_X_FORBIDDEN, chan.c_str());
+ source.Reply(LanguageString::CHAN_X_FORBIDDEN, chan.c_str());
return MOD_CONT;
}
if (ci->HasFlag(CI_SUSPENDED) && !u->Account()->HasCommand("chanserv/drop"))
{
- source.Reply(CHAN_X_FORBIDDEN, chan.c_str());
+ source.Reply(LanguageString::CHAN_X_FORBIDDEN, chan.c_str());
return MOD_CONT;
}
if ((ci->HasFlag(CI_SECUREFOUNDER) ? !IsFounder(u, ci) : !check_access(u, ci, CA_FOUNDER)) && !u->Account()->HasCommand("chanserv/drop"))
{
- source.Reply(ACCESS_DENIED);
+ source.Reply(LanguageString::ACCESS_DENIED);
return MOD_CONT;
}
@@ -71,7 +71,7 @@ class CommandCSDrop : public Command
delete ci;
- source.Reply(CHAN_DROPPED, chan.c_str());
+ source.Reply(_("Channel \002%s\002 has been dropped."), chan.c_str());
FOREACH_MOD(I_OnChanDrop, OnChanDrop(chan));
@@ -82,21 +82,27 @@ class CommandCSDrop : public Command
{
User *u = source.u;
if (u->Account() && u->Account()->IsServicesOper())
- source.Reply(CHAN_SERVADMIN_HELP_DROP);
+ source.Reply(_("Syntax: \002DROP \037channel\037\002\n"
+ " \n"
+ "Unregisters the named channel. Only \002Services Operators\002\n"
+ "can drop a channel for which they have not identified."));
else
- source.Reply(CHAN_HELP_DROP);
+ source.Reply(_("Syntax: \002DROP \037channel\037\002\n"
+ " \n"
+ "Unregisters the named channel. Can only be used by\n"
+ "\002channel founder\002."));
return true;
}
void OnSyntaxError(CommandSource &source, const Anope::string &subcommand)
{
- SyntaxError(source, "DROP", CHAN_DROP_SYNTAX);
+ SyntaxError(source, "DROP", _("DROP \037channel\037"));
}
void OnServHelp(CommandSource &source)
{
- source.Reply(CHAN_HELP_CMD_DROP);
+ source.Reply(_(" DROP Cancel the registration of a channel"));
}
};
diff --git a/modules/core/cs_forbid.cpp b/modules/core/cs_forbid.cpp
index b6246c578..3fc054a73 100644
--- a/modules/core/cs_forbid.cpp
+++ b/modules/core/cs_forbid.cpp
@@ -31,19 +31,19 @@ class CommandCSForbid : public Command
if (Config->ForceForbidReason && reason.empty())
{
- SyntaxError(source, "FORBID", CHAN_FORBID_SYNTAX_REASON);
+ SyntaxError(source, "FORBID", _("FORBID \037channel\037 \037reason\037"));
return MOD_CONT;
}
if (chan[0] != '#')
{
- source.Reply(CHAN_SYMBOL_REQUIRED);
+ source.Reply(LanguageString::CHAN_SYMBOL_REQUIRED);
return MOD_CONT;
}
if (readonly)
{
- source.Reply(READ_ONLY_MODE);
+ source.Reply(LanguageString::READ_ONLY_MODE);
return MOD_CONT;
}
@@ -74,7 +74,7 @@ class CommandCSForbid : public Command
if (uc->user->HasMode(UMODE_OPER))
continue;
- c->Kick(ChanServ, uc->user, "%s", !reason.empty() ? reason.c_str() : GetString(uc->user, CHAN_FORBID_REASON).c_str());
+ c->Kick(ChanServ, uc->user, "%s", !reason.empty() ? reason.c_str() : GetString(uc->user->Account(), _("This channel has been forbidden.")).c_str());
}
}
@@ -88,7 +88,7 @@ class CommandCSForbid : public Command
ircdproto->SendGlobops(ChanServ, "\2%s\2 used FORBID on channel \2%s\2", u->nick.c_str(), ci->name.c_str());
Log(LOG_ADMIN, u, this, ci) << (!ci->forbidreason.empty() ? ci->forbidreason : "No reason");
- source.Reply(CHAN_FORBID_SUCCEEDED, chan.c_str());
+ source.Reply(_("Channel \002%s\002 is now forbidden."), chan.c_str());
FOREACH_MOD(I_OnChanForbidden, OnChanForbidden(ci));
@@ -97,18 +97,23 @@ class CommandCSForbid : public Command
bool OnHelp(CommandSource &source, const Anope::string &subcommand)
{
- source.Reply(CHAN_SERVADMIN_HELP_FORBID);
+ source.Reply(_("Syntax: \002FORBID \037channel\037 [\037reason\037]\002\n"
+ " \n"
+ "Disallows anyone from registering or using the given\n"
+ "channel. May be cancelled by dropping the channel.\n"
+ " \n"
+ "Reason may be required on certain networks."));
return true;
}
void OnSyntaxError(CommandSource &source, const Anope::string &subcommand)
{
- SyntaxError(source, "FORBID", CHAN_FORBID_SYNTAX);
+ SyntaxError(source, "FORBID", _("FORBID \037channel\037 [\037reason\037]"));
}
void OnServHelp(CommandSource &source)
{
- source.Reply(CHAN_HELP_CMD_FORBID);
+ source.Reply(_(" FORBID Prevent a channel from being used"));
}
};
diff --git a/modules/core/cs_getkey.cpp b/modules/core/cs_getkey.cpp
index cde4e7bb7..0842d2caf 100644
--- a/modules/core/cs_getkey.cpp
+++ b/modules/core/cs_getkey.cpp
@@ -29,38 +29,40 @@ class CommandCSGetKey : public Command
if (!check_access(u, ci, CA_GETKEY) && !u->Account()->HasCommand("chanserv/getkey"))
{
- source.Reply(ACCESS_DENIED);
+ source.Reply(LanguageString::ACCESS_DENIED);
return MOD_CONT;
}
Anope::string key;
if (!ci->c || !ci->c->GetParam(CMODE_KEY, key))
{
- source.Reply(CHAN_GETKEY_NOKEY, chan.c_str());
+ source.Reply(_("The channel \002%s\002 has no key."), chan.c_str());
return MOD_CONT;
}
bool override = !check_access(u, ci, CA_GETKEY);
Log(override ? LOG_OVERRIDE : LOG_COMMAND, u, this, ci);
- source.Reply(CHAN_GETKEY_KEY, chan.c_str(), key.c_str());
+ source.Reply(_("Key for channel \002%s\002 is \002%s\002."), chan.c_str(), key.c_str());
return MOD_CONT;
}
bool OnHelp(CommandSource &source, const Anope::string &subcommand)
{
- source.Reply(CHAN_HELP_GETKEY);
+ source.Reply(_("Syntax: \002GETKEY \037channel\037\002\n"
+ " \n"
+ "Returns the key of the given channel."));
return true;
}
void OnSyntaxError(CommandSource &source, const Anope::string &subcommand)
{
- SyntaxError(source, "GETKEY", CHAN_GETKEY_SYNTAX);
+ SyntaxError(source, "GETKEY", _("GETKEY \037channel\037"));
}
void OnServHelp(CommandSource &source)
{
- source.Reply(CHAN_HELP_CMD_GETKEY);
+ source.Reply(_(" GETKEY Returns the key of the given channel"));
}
};
diff --git a/modules/core/cs_help.cpp b/modules/core/cs_help.cpp
index d74c7b2d5..b1916bace 100644
--- a/modules/core/cs_help.cpp
+++ b/modules/core/cs_help.cpp
@@ -32,14 +32,25 @@ class CommandCSHelp : public Command
void OnSyntaxError(CommandSource &source, const Anope::string &subcommand)
{
User *u = source.u;
- source.Reply(CHAN_HELP);
+ source.Reply(_("\002%S\002 allows you to register and control various\n"
+ "aspects of channels. %S can often prevent\n"
+ "malicious users from \"taking over\" channels by limiting\n"
+ "who is allowed channel operator privileges. Available\n"
+ "commands are listed below; to use them, type\n"
+ "\002%R%S \037command\037\002. For more information on a\n"
+ "specific command, type \002%R%S HELP \037command\037\002."));
for (CommandMap::const_iterator it = ChanServ->Commands.begin(); it != ChanServ->Commands.end(); ++it)
if (!Config->HidePrivilegedCommands || it->second->permission.empty() || (u->Account() && u->Account()->HasCommand(it->second->permission)))
it->second->OnServHelp(source);
if (Config->CSExpire >= 86400)
- source.Reply(CHAN_HELP_EXPIRES, Config->CSExpire / 86400);
+ source.Reply(_("Note that any channel which is not used for %d days\n"
+ "(i.e. which no user on the channel's access list enters\n"
+ "for that period of time) will be automatically dropped."), Config->CSExpire / 86400);
if (u->Account() && u->Account()->IsServicesOper())
- source.Reply(CHAN_SERVADMIN_HELP);
+ source.Reply(_(" \n"
+ "Services Operators can also drop any channel without needing\n"
+ "to identify via password, and may view the access, AKICK,\n"
+ "and level setting lists for any channel."));
}
};
diff --git a/modules/core/cs_info.cpp b/modules/core/cs_info.cpp
index dade872c0..b7b4ffacd 100644
--- a/modules/core/cs_info.cpp
+++ b/modules/core/cs_info.cpp
@@ -47,9 +47,9 @@ class CommandCSInfo : public Command
if (ci->HasFlag(CI_FORBIDDEN))
{
if (u->HasMode(UMODE_OPER) && !ci->forbidby.empty())
- source.Reply(CHAN_X_FORBIDDEN_OPER, chan.c_str(), ci->forbidby.c_str(), !ci->forbidreason.empty() ? ci->forbidreason.c_str() : GetString(u, NO_REASON).c_str());
+ source.Reply(LanguageString::CHAN_X_FORBIDDEN_OPER, chan.c_str(), ci->forbidby.c_str(), !ci->forbidreason.empty() ? ci->forbidreason.c_str() : GetString(u->Account(), LanguageString::NO_REASON).c_str());
else
- source.Reply(CHAN_X_FORBIDDEN, chan.c_str());
+ source.Reply(LanguageString::CHAN_X_FORBIDDEN, chan.c_str());
return MOD_CONT;
}
@@ -58,55 +58,55 @@ class CommandCSInfo : public Command
if (has_auspex || check_access(u, ci, CA_INFO))
show_all = true;
- source.Reply(CHAN_INFO_HEADER, chan.c_str());
- source.Reply(CHAN_INFO_NO_FOUNDER, ci->founder->display.c_str());
+ source.Reply(LanguageString::CHAN_INFO_HEADER, chan.c_str());
+ source.Reply(_(" Founder: %s"), ci->founder->display.c_str());
if (show_all && ci->successor)
- source.Reply(CHAN_INFO_NO_SUCCESSOR, ci->successor->display.c_str());
+ source.Reply(_(" Successor: %s"), ci->successor->display.c_str());
- source.Reply(CHAN_INFO_DESCRIPTION, ci->desc.c_str());
- source.Reply(CHAN_INFO_TIME_REGGED, do_strftime(ci->time_registered).c_str());
- source.Reply(CHAN_INFO_LAST_USED, do_strftime(ci->last_used).c_str());
+ source.Reply(_(" Description: %s"), ci->desc.c_str());
+ source.Reply(_(" Registered: %s"), do_strftime(ci->time_registered).c_str());
+ source.Reply(_(" Last used: %s"), do_strftime(ci->last_used).c_str());
ModeLock *secret = ci->GetMLock(CMODE_SECRET);
if (!ci->last_topic.empty() && (show_all || ((!secret || secret->set == false) && (!ci->c || !ci->c->HasMode(CMODE_SECRET)))))
{
- source.Reply(CHAN_INFO_LAST_TOPIC, ci->last_topic.c_str());
- source.Reply(CHAN_INFO_TOPIC_SET_BY, ci->last_topic_setter.c_str());
+ source.Reply(_(" Last topic: %s"), ci->last_topic.c_str());
+ source.Reply(_(" Topic set by: %s"), ci->last_topic_setter.c_str());
}
if (show_all)
{
- source.Reply(CHAN_INFO_BANTYPE, ci->bantype);
+ source.Reply(_(" Ban type: %d"), ci->bantype);
Anope::string optbuf;
- CheckOptStr(optbuf, CI_KEEPTOPIC, GetString(u, CHAN_INFO_OPT_KEEPTOPIC), ci, u->Account());
- CheckOptStr(optbuf, CI_OPNOTICE, GetString(u, CHAN_INFO_OPT_OPNOTICE), ci, u->Account());
- CheckOptStr(optbuf, CI_PEACE, GetString(u, CHAN_INFO_OPT_PEACE), ci, u->Account());
- CheckOptStr(optbuf, CI_PRIVATE, GetString(u, NICK_INFO_OPT_PRIVATE), ci, u->Account());
- CheckOptStr(optbuf, CI_RESTRICTED, GetString(u, CHAN_INFO_OPT_RESTRICTED), ci, u->Account());
- CheckOptStr(optbuf, CI_SECURE, GetString(u, CHAN_INFO_OPT_SECURE), ci, u->Account());
- CheckOptStr(optbuf, CI_SECUREFOUNDER, GetString(u, CHAN_INFO_OPT_SECUREFOUNDER), ci, u->Account());
- CheckOptStr(optbuf, CI_SECUREOPS, GetString(u, CHAN_INFO_OPT_SECUREOPS), ci, u->Account());
+ CheckOptStr(optbuf, CI_KEEPTOPIC, GetString(u->Account(), _("Topic Retention")), ci, u->Account());
+ CheckOptStr(optbuf, CI_OPNOTICE, GetString(u->Account(), _("OP Notice")), ci, u->Account());
+ CheckOptStr(optbuf, CI_PEACE, GetString(u->Account(), _("Peace")), ci, u->Account());
+ CheckOptStr(optbuf, CI_PRIVATE, GetString(u->Account(), _("Private")), ci, u->Account());
+ CheckOptStr(optbuf, CI_RESTRICTED, GetString(u->Account(), _("Restricted Access")), ci, u->Account());
+ CheckOptStr(optbuf, CI_SECURE, GetString(u->Account(), _("Secure")), ci, u->Account());
+ CheckOptStr(optbuf, CI_SECUREFOUNDER, GetString(u->Account(), _("Secure Founder")), ci, u->Account());
+ CheckOptStr(optbuf, CI_SECUREOPS, GetString(u->Account(), _("Secure Ops")), ci, u->Account());
if (ci->HasFlag(CI_SIGNKICK))
- CheckOptStr(optbuf, CI_SIGNKICK, GetString(u, CHAN_INFO_OPT_SIGNKICK), ci, u->Account());
+ CheckOptStr(optbuf, CI_SIGNKICK, GetString(u->Account(), _("Signed kicks")), ci, u->Account());
else
- CheckOptStr(optbuf, CI_SIGNKICK_LEVEL, GetString(u, CHAN_INFO_OPT_SIGNKICK), ci, u->Account());
- CheckOptStr(optbuf, CI_TOPICLOCK, GetString(u, CHAN_INFO_OPT_TOPICLOCK), ci, u->Account());
- CheckOptStr(optbuf, CI_XOP, GetString(u, CHAN_INFO_OPT_XOP), ci, u->Account());
- CheckOptStr(optbuf, CI_PERSIST, GetString(u, CHAN_INFO_OPT_PERSIST), ci, u->Account());
+ CheckOptStr(optbuf, CI_SIGNKICK_LEVEL, GetString(u->Account(), _("Signed kicks")), ci, u->Account());
+ CheckOptStr(optbuf, CI_TOPICLOCK, GetString(u->Account(), _("Topic Lock")), ci, u->Account());
+ CheckOptStr(optbuf, CI_XOP, GetString(u->Account(), _("xOP lists system")), ci, u->Account());
+ CheckOptStr(optbuf, CI_PERSIST, GetString(u->Account(), _("Persistant")), ci, u->Account());
- source.Reply(NICK_INFO_OPTIONS, optbuf.empty() ? GetString(u, NICK_INFO_OPT_NONE).c_str() : optbuf.c_str());
- source.Reply(CHAN_INFO_MODE_LOCK, get_mlock_modes(ci, 1).c_str());
+ source.Reply(LanguageString::NICK_INFO_OPTIONS, optbuf.empty() ? _("None") : optbuf.c_str());
+ source.Reply(_(" Mode lock: %s"), get_mlock_modes(ci, 1).c_str());
// XXX: we could just as easily (and tidily) merge this in with the flags display above.
if (ci->HasFlag(CI_NO_EXPIRE))
- source.Reply(CHAN_INFO_NO_EXPIRE);
+ source.Reply(_("This channel will not expire."));
else
- source.Reply(CHAN_INFO_EXPIRE, do_strftime(ci->last_used + Config->CSExpire).c_str());
+ source.Reply(_(" Expires on: %s"), do_strftime(ci->last_used + Config->CSExpire).c_str());
}
if (ci->HasFlag(CI_SUSPENDED))
- source.Reply(CHAN_X_SUSPENDED, ci->forbidby.c_str(), !ci->forbidreason.empty() ? ci->forbidreason.c_str() : GetString(u, NO_REASON).c_str());
+ source.Reply(_(" Suspended: [%s] %s"), ci->forbidby.c_str(), !ci->forbidreason.empty() ? ci->forbidreason.c_str() : GetString(u->Account(), LanguageString::NO_REASON).c_str());
FOREACH_MOD(I_OnChanInfo, OnChanInfo(u, ci, show_all));
@@ -115,19 +115,24 @@ class CommandCSInfo : public Command
bool OnHelp(CommandSource &source, const Anope::string &subcommand)
{
- source.Reply(CHAN_HELP_INFO);
-
+ source.Reply(_("Syntax: \002INFO \037channel\037\002\n"
+ " \n"
+ "Lists information about the named registered channel,\n"
+ "including its founder, time of registration, last time\n"
+ "used, description, and mode lock, if any. If \002ALL\002 is \n"
+ "specified, the entry message and successor will also \n"
+ "be displayed."));
return true;
}
void OnSyntaxError(CommandSource &source, const Anope::string &subcommand)
{
- SyntaxError(source, "INFO", CHAN_INFO_SYNTAX);
+ SyntaxError(source, "INFO", _("INFO \037channel\037"));
}
void OnServHelp(CommandSource &source)
{
- source.Reply(CHAN_HELP_CMD_INFO);
+ source.Reply(_(" INFO Lists information about the named registered channel"));
}
};
diff --git a/modules/core/cs_invite.cpp b/modules/core/cs_invite.cpp
index a7a3a6e40..0f55c1e1e 100644
--- a/modules/core/cs_invite.cpp
+++ b/modules/core/cs_invite.cpp
@@ -30,7 +30,7 @@ class CommandCSInvite : public Command
if (!(c = findchan(chan)))
{
- source.Reply(CHAN_X_NOT_IN_USE, chan.c_str());
+ source.Reply(LanguageString::CHAN_X_NOT_IN_USE, chan.c_str());
return MOD_CONT;
}
@@ -38,7 +38,7 @@ class CommandCSInvite : public Command
if (!check_access(u, ci, CA_INVITE))
{
- source.Reply(ACCESS_DENIED);
+ source.Reply(LanguageString::ACCESS_DENIED);
return MOD_CONT;
}
@@ -49,7 +49,7 @@ class CommandCSInvite : public Command
{
if (!(u2 = finduser(params[1])))
{
- source.Reply(NICK_X_NOT_IN_USE, params[1].c_str());
+ source.Reply(LanguageString::NICK_X_NOT_IN_USE, params[1].c_str());
return MOD_CONT;
}
}
@@ -58,30 +58,35 @@ class CommandCSInvite : public Command
Log(LOG_COMMAND, u, this, ci) << "for " << u2->nick;
if (c->FindUser(u2))
- source.Reply(CHAN_INVITE_ALREADY_IN, c->name.c_str());
+ source.Reply(_("You are already in \002%s\002! "), c->name.c_str());
else
{
ircdproto->SendInvite(whosends(ci), chan, u2->nick);
- source.Reply(CHAN_INVITE_OTHER_SUCCESS, u2->nick.c_str(), c->name.c_str());
- u2->SendMessage(whosends(ci), CHAN_INVITE_SUCCESS, c->name.c_str());
+ source.Reply(_("\002%s\002 has been invited to \002%s\002."), u2->nick.c_str(), c->name.c_str());
+ u2->SendMessage(whosends(ci), _("You have been invited to \002%s\002."), c->name.c_str());
}
return MOD_CONT;
}
bool OnHelp(CommandSource &source, const Anope::string &subcommand)
{
- source.Reply(CHAN_HELP_INVITE);
+ source.Reply(_("Syntax: \002INVITE \037channel\037\002\n"
+ " \n"
+ "Tells %S to invite you into the given channel.\n"
+ " \n"
+ "By default, limited to AOPs or those with level 5 and above\n"
+ "on the channel."));
return true;
}
void OnSyntaxError(CommandSource &source, const Anope::string &subcommand)
{
- SyntaxError(source, "INVITE", CHAN_INVITE_SYNTAX);
+ SyntaxError(source, "INVITE", _("INVITE \037channel\037"));
}
void OnServHelp(CommandSource &source)
{
- source.Reply(CHAN_HELP_CMD_INVITE);
+ source.Reply(_(" INVITE Tells ChanServ to invite you into a channel"));
}
};
diff --git a/modules/core/cs_kick.cpp b/modules/core/cs_kick.cpp
index 1e7b5970d..5f89d6b16 100644
--- a/modules/core/cs_kick.cpp
+++ b/modules/core/cs_kick.cpp
@@ -36,17 +36,17 @@ class CommandCSKick : public Command
uint16 u_level = u_access ? u_access->level : 0, u2_level = u2_access ? u2_access->level : 0;
if (!c)
- source.Reply(CHAN_X_NOT_IN_USE, chan.c_str());
+ source.Reply(LanguageString::CHAN_X_NOT_IN_USE, chan.c_str());
else if (!u2)
- source.Reply(NICK_X_NOT_IN_USE, target.c_str());
+ source.Reply(LanguageString::NICK_X_NOT_IN_USE, target.c_str());
else if (!is_same ? !check_access(u, ci, CA_KICK) : !check_access(u, ci, CA_KICKME))
- source.Reply(ACCESS_DENIED);
+ source.Reply(LanguageString::ACCESS_DENIED);
else if (!is_same && (ci->HasFlag(CI_PEACE)) && u2_level >= u_level)
- source.Reply(ACCESS_DENIED);
+ source.Reply(LanguageString::ACCESS_DENIED);
else if (u2->IsProtected())
- source.Reply(ACCESS_DENIED);
+ source.Reply(LanguageString::ACCESS_DENIED);
else if (!c->FindUser(u2))
- source.Reply(NICK_X_NOT_ON_CHAN, u2->nick.c_str(), c->name.c_str());
+ source.Reply(LanguageString::NICK_X_NOT_ON_CHAN, u2->nick.c_str(), c->name.c_str());
else
{
// XXX
@@ -62,18 +62,23 @@ class CommandCSKick : public Command
bool OnHelp(CommandSource &source, const Anope::string &subcommand)
{
- source.Reply(CHAN_HELP_KICK);
+ source.Reply(_("Syntax: \002KICK \037#channel\037 \037nick\037 [\037reason\037]\002\n"
+ " \n"
+ "Kicks a selected nick on a channel.\n"
+ " \n"
+ "By default, limited to AOPs or those with level 5 access \n"
+ "and above on the channel."));
return true;
}
void OnSyntaxError(CommandSource &source, const Anope::string &subcommand)
{
- SyntaxError(source, "KICK", CHAN_KICK_SYNTAX);
+ SyntaxError(source, "KICK", _("KICK \037#channel\037 \037nick\037 [\037reason\037]"));
}
void OnServHelp(CommandSource &source)
{
- source.Reply(CHAN_HELP_CMD_KICK);
+ source.Reply(_(" KICK Kicks a selected nick from a channel"));
}
};
diff --git a/modules/core/cs_list.cpp b/modules/core/cs_list.cpp
index f5773a901..b95bc3144 100644
--- a/modules/core/cs_list.cpp
+++ b/modules/core/cs_list.cpp
@@ -35,37 +35,27 @@ public:
if (Config->CSListOpersOnly && !u->HasMode(UMODE_OPER))
{
- source.Reply(ACCESS_DENIED);
+ source.Reply(LanguageString::ACCESS_DENIED);
return MOD_STOP;
}
if (pattern[0] == '#')
{
Anope::string tmp = myStrGetToken(pattern.substr(1), '-', 0); /* Read FROM out */
- if (tmp.empty())
+ if (tmp.empty() || !tmp.is_number_only())
{
- source.Reply(LIST_INCORRECT_RANGE);
- source.Reply(CS_LIST_INCORRECT_RANGE);
- return MOD_CONT;
- }
- if (!tmp.is_number_only())
- {
- source.Reply(LIST_INCORRECT_RANGE);
- source.Reply(CS_LIST_INCORRECT_RANGE);
+ source.Reply(LanguageString::LIST_INCORRECT_RANGE);
+ source.Reply(_("To search for channels starting with #, search for the channel\n"
+ "name without the #-sign prepended (\002anope\002 instead of \002#anope\002)."));
return MOD_CONT;
}
from = convertTo<int>(tmp);
tmp = myStrGetTokenRemainder(pattern, '-', 1); /* Read TO out */
- if (tmp.empty())
- {
- source.Reply(LIST_INCORRECT_RANGE);
- source.Reply(CS_LIST_INCORRECT_RANGE);
- return MOD_CONT;
- }
- if (!tmp.is_number_only())
+ if (tmp.empty() || !tmp.is_number_only())
{
- source.Reply(LIST_INCORRECT_RANGE);
- source.Reply(CS_LIST_INCORRECT_RANGE);
+ source.Reply(LanguageString::LIST_INCORRECT_RANGE);
+ source.Reply(_("To search for channels starting with #, search for the channel\n"
+ "name without the #-sign prepended (\002anope\002 instead of \002#anope\002)."));
return MOD_CONT;
}
to = convertTo<int>(tmp);
@@ -91,7 +81,7 @@ public:
Anope::string spattern = "#" + pattern;
- source.Reply(NICK_LIST_HEADER, pattern.c_str());
+ source.Reply(LanguageString::LIST_HEADER, pattern.c_str());
for (registered_channel_map::const_iterator it = RegisteredChannelList.begin(), it_end = RegisteredChannelList.end(); it != it_end; ++it)
{
@@ -127,24 +117,29 @@ public:
}
}
- source.Reply(CHAN_LIST_END, nchans > Config->CSListMax ? Config->CSListMax : nchans, nchans);
+ source.Reply(_("End of list - %d/%d matches shown."), nchans > Config->CSListMax ? Config->CSListMax : nchans, nchans);
return MOD_CONT;
}
bool OnHelp(CommandSource &source, const Anope::string &subcommand)
{
- source.Reply(CHAN_HELP_LIST);
+ source.Reply(_("Syntax: \002LIST \037pattern\037\002\n"
+ " \n"
+ "Lists all registered channels matching the given pattern.\n"
+ "(Channels with the \002PRIVATE\002 option set are not listed.)\n"
+ "Note that a preceding '#' specifies a range, channel names\n"
+ "are to be written without '#'."));
return true;
}
void OnSyntaxError(CommandSource &source, const Anope::string &subcommand)
{
- SyntaxError(source, "LIST", NICK_LIST_SYNTAX);
+ SyntaxError(source, "LIST", LanguageString::NICK_LIST_SYNTAX);
}
void OnServHelp(CommandSource &source)
{
- source.Reply(CHAN_HELP_CMD_LIST);
+ source.Reply(_(" LIST Lists all registered channels matching the given pattern"));
}
};
diff --git a/modules/core/cs_mode.cpp b/modules/core/cs_mode.cpp
index 7a2005688..dce1d4206 100644
--- a/modules/core/cs_mode.cpp
+++ b/modules/core/cs_mode.cpp
@@ -46,18 +46,18 @@ class CommandCSMode : public Command
ChannelMode *cm = ModeManager::FindChannelModeByChar(modes[i]);
if (!cm || !cm->CanSet(u))
{
- source.Reply(CHAN_MODE_LOCK_UNKNOWN, modes[i]);
+ source.Reply(_("Unknown mode character %c ignored."), modes[i]);
break;
}
Anope::string mode_param;
if (((cm->Type == MODE_STATUS || cm->Type == MODE_LIST) && !sep.GetToken(mode_param)) || (cm->Type == MODE_PARAM && adding && !sep.GetToken(mode_param)))
- source.Reply(CHAN_MODE_LOCK_MISSING_PARAM, cm->ModeChar);
+ source.Reply(_("Missing parameter for mode %c."), cm->ModeChar);
else
{
ci->SetMLock(cm, adding, mode_param, u->nick);
if (!mode_param.empty())
mode_param = " " + mode_param;
- source.Reply(CHAN_MODE_LOCKED, adding ? '+' : '-', cm->ModeChar, mode_param.c_str(), ci->name.c_str());
+ source.Reply(_("%c%c%s locked on %s"), adding ? '+' : '-', cm->ModeChar, mode_param.c_str(), ci->name.c_str());
}
}
}
@@ -89,22 +89,22 @@ class CommandCSMode : public Command
ChannelMode *cm = ModeManager::FindChannelModeByChar(modes[i]);
if (!cm || !cm->CanSet(u))
{
- source.Reply(CHAN_MODE_LOCK_UNKNOWN, modes[i]);
+ source.Reply(_("Unknown mode character %c ignored."), modes[i]);
break;
}
Anope::string mode_param;
if (!cm->Type == MODE_REGULAR && !sep.GetToken(mode_param))
- source.Reply(CHAN_MODE_LOCK_MISSING_PARAM, cm->ModeChar);
+ source.Reply(_("Missing parameter for mode %c."), cm->ModeChar);
else
{
if (ci->RemoveMLock(cm, mode_param))
{
if (!mode_param.empty())
mode_param = " " + mode_param;
- source.Reply(CHAN_MODE_UNLOCKED, adding == 1 ? '+' : '-', cm->ModeChar, mode_param.c_str(), ci->name.c_str());
+ source.Reply(_("%c%c%s has been unlocked from %s."), adding == 1 ? '+' : '-', cm->ModeChar, mode_param.c_str(), ci->name.c_str());
}
else
- source.Reply(CHAN_MODE_NOT_LOCKED, cm->ModeChar, ci->name.c_str());
+ source.Reply(_("%c is not locked on %s."), cm->ModeChar, ci->name.c_str());
}
}
}
@@ -114,11 +114,11 @@ class CommandCSMode : public Command
const std::multimap<ChannelModeName, ModeLock> &mlocks = ci->GetMLock();
if (mlocks.empty())
{
- source.Reply(CHAN_MODE_LOCK_NONE, ci->name.c_str());
+ source.Reply(_("Channel %s has no mode locks."), ci->name.c_str());
}
else
{
- source.Reply(CHAN_MODE_LOCK_HEADER, ci->name.c_str());
+ source.Reply(_("Mode locks for %s:"), ci->name.c_str());
for (std::multimap<ChannelModeName, ModeLock>::const_iterator it = mlocks.begin(), it_end = mlocks.end(); it != it_end; ++it)
{
const ModeLock &ml = it->second;
@@ -132,7 +132,7 @@ class CommandCSMode : public Command
Anope::string setter = ml.setter;
if (setter.empty())
setter = ci->founder ? ci->founder->display : "Unknown";
- source.Reply(CHAN_MODE_LIST_FMT, ml.set ? '+' : '-', cm->ModeChar, modeparam.c_str(), setter.c_str(), do_strftime(ml.created).c_str());
+ source.Reply(_("%c%c%s, by %s on %s"), ml.set ? '+' : '-', cm->ModeChar, modeparam.c_str(), setter.c_str(), do_strftime(ml.created).c_str());
}
}
}
@@ -265,9 +265,9 @@ class CommandCSMode : public Command
ChannelInfo *ci = source.ci;
if (!ci || !ci->c)
- source.Reply(CHAN_X_NOT_IN_USE, ci->name.c_str());
+ source.Reply(LanguageString::CHAN_X_NOT_IN_USE, ci->name.c_str());
else if (!check_access(u, ci, CA_MODE) && !u->Account()->HasCommand("chanserv/mode"))
- source.Reply(ACCESS_DENIED);
+ source.Reply(LanguageString::ACCESS_DENIED);
else if (subcommand.equals_ci("LOCK"))
this->DoLock(source, params);
else if (subcommand.equals_ci("SET"))
@@ -280,18 +280,36 @@ class CommandCSMode : public Command
bool OnHelp(CommandSource &source, const Anope::string &subcommand)
{
- source.Reply(CHAN_HELP_MODE);
+ source.Reply(_("Syntax: \002MODE \037channel\037 LOCK {ADD|DEL|LIST} [\037what\037]\002\n"
+ " \002MODE \037channel\037 SET \037modes\037\002\n"
+ " \n"
+ "Mainly controls mode locks and mode access (which is different from channel access)\n"
+ "on a channel.\n"
+ " \n"
+ "The \002MODE LOCK\002 command allows you to add, delete, and view mode locks on a channel.\n"
+ "If a mode is locked on or off, services will not allow that mode to be changed.\n"
+ "Example:\n"
+ " \002MODE #channel LOCK ADD +bmnt *!*@*aol*\002\n"
+ " \n"
+ "The \002MODE SET\002 command allows you to set modes through services. Wildcards * and ? may\n"
+ "be given as parameters for list and status modes.\n"
+ "Example:\n"
+ " \002MODE #channel SET +v *\002\n"
+ " Sets voice status to all users in the channel.\n"
+ " \n"
+ " \002MODE #channel SET -b ~c:*\n"
+ " Clears all extended bans that start with ~c:"));
return true;
}
void OnSyntaxError(CommandSource &source, const Anope::string &subcommand)
{
- SyntaxError(source, "MODE", CHAN_MODE_SYNTAX);
+ SyntaxError(source, "MODE", _("MODE \037channel\037 {LOCK|SET} [\037modes\037 | {ADD|DEL|LIST} [\037what\037]]"));
}
void OnServHelp(CommandSource &source)
{
- source.Reply(CHAN_HELP_CMD_MODE);
+ source.Reply(_(" MODE Control modes and mode locks on a channel"));
}
};
diff --git a/modules/core/cs_modes.cpp b/modules/core/cs_modes.cpp
index 71210bfef..91748b941 100644
--- a/modules/core/cs_modes.cpp
+++ b/modules/core/cs_modes.cpp
@@ -54,19 +54,19 @@ class CommandModeBase : public Command
uint16 u_level = u_access ? u_access->level : 0, u2_level = u2_access ? u2_access->level : 0;
if (!c)
- source.Reply(CHAN_X_NOT_IN_USE, chan.c_str());
+ source.Reply(LanguageString::CHAN_X_NOT_IN_USE, chan.c_str());
else if (!ci)
- source.Reply(CHAN_X_NOT_REGISTERED, chan.c_str());
+ source.Reply(LanguageString::CHAN_X_NOT_REGISTERED, chan.c_str());
else if (!u2)
- source.Reply(NICK_X_NOT_IN_USE, nick.c_str());
+ source.Reply(LanguageString::NICK_X_NOT_IN_USE, nick.c_str());
else if (is_same ? !check_access(u, ci, levelself) : !check_access(u, ci, level))
- source.Reply(ACCESS_DENIED);
+ source.Reply(LanguageString::ACCESS_DENIED);
else if (!set && !is_same && ci->HasFlag(CI_PEACE) && u2_level >= u_level)
- source.Reply(ACCESS_DENIED);
+ source.Reply(LanguageString::ACCESS_DENIED);
else if (!set && u2->IsProtected() && !is_same)
- source.Reply(ACCESS_DENIED);
+ source.Reply(LanguageString::ACCESS_DENIED);
else if (!c->FindUser(u2))
- source.Reply(NICK_X_NOT_ON_CHAN, u2->nick.c_str(), c->name.c_str());
+ source.Reply(LanguageString::NICK_X_NOT_ON_CHAN, u2->nick.c_str(), c->name.c_str());
else
{
if (set)
@@ -101,18 +101,25 @@ class CommandCSOp : public CommandModeBase
bool OnHelp(CommandSource &source, const Anope::string &subcommand)
{
- source.Reply(CHAN_HELP_OP);
+ source.Reply(_("Syntax: \002OP [\037#channel\037] [\037nick\037]\002\n"
+ " \n"
+ "Ops a selected nick on a channel. If nick is not given,\n"
+ "it will op you. If channel is not given, it will op you\n"
+ "on every channel.\n"
+ " \n"
+ "By default, limited to AOPs or those with level 5 access \n"
+ "and above on the channel."));
return true;
}
void OnSyntaxError(CommandSource &source, const Anope::string &subcommand)
{
- SyntaxError(source, "OP", CHAN_OP_SYNTAX);
+ SyntaxError(source, "OP", _("OP [\037#channel\037] [\037nick\037]\002"));
}
void OnServHelp(CommandSource &source)
{
- source.Reply(CHAN_HELP_CMD_OP);
+ source.Reply(_(" OP Gives Op status to a selected nick on a channel"));
}
};
@@ -132,18 +139,25 @@ class CommandCSDeOp : public CommandModeBase
bool OnHelp(CommandSource &source, const Anope::string &subcommand)
{
- source.Reply(CHAN_HELP_DEOP);
+ source.Reply(_("Syntax: \002DEOP [\037#channel\037] [\037nick\037]\002\n"
+ " \n"
+ "Deops a selected nick on a channel. If nick is not given,\n"
+ "it will deop you. If channel is not given, it will deop\n"
+ "you on every channel.\n"
+ " \n"
+ "By default, limited to AOPs or those with level 5 access \n"
+ "and above on the channel."));
return true;
}
void OnSyntaxError(CommandSource &source, const Anope::string &subcommand)
{
- SyntaxError(source, "DEOP", CHAN_DEOP_SYNTAX);
+ SyntaxError(source, "DEOP", _("DEOP [\037#channel\037] [\037nick\037]\002"));
}
void OnServHelp(CommandSource &source)
{
- source.Reply(CHAN_HELP_CMD_DEOP);
+ source.Reply(_(" DEOP Deops a selected nick on a channel"));
}
};
@@ -163,18 +177,26 @@ class CommandCSVoice : public CommandModeBase
bool OnHelp(CommandSource &source, const Anope::string &subcommand)
{
- source.Reply(CHAN_HELP_VOICE);
+ source.Reply(_("Syntax: \002VOICE [\037#channel\037] [\037nick\037]\002\n"
+ " \n"
+ "Voices a selected nick on a channel. If nick is not given,\n"
+ "it will voice you. If channel is not given, it will voice you\n"
+ "on every channel.\n"
+ " \n"
+ "By default, limited to AOPs or those with level 5 access \n"
+ "and above on the channel, or to VOPs or those with level 3 \n"
+ "and above for self voicing."));
return true;
}
void OnSyntaxError(CommandSource &source, const Anope::string &subcommand)
{
- SyntaxError(source, "VOICE", CHAN_VOICE_SYNTAX);
+ SyntaxError(source, "VOICE", _("VOICE [\037#channel\037] [\037nick\037]\002"));
}
void OnServHelp(CommandSource &source)
{
- source.Reply(CHAN_HELP_CMD_VOICE);
+ source.Reply(_(" VOICE Voices a selected nick on a channel"));
}
};
@@ -194,18 +216,26 @@ class CommandCSDeVoice : public CommandModeBase
bool OnHelp(CommandSource &source, const Anope::string &subcommand)
{
- source.Reply(CHAN_HELP_DEVOICE);
+ source.Reply(_("Syntax: \002DEVOICE [\037#channel\037] [\037nick\037]\002\n"
+ " \n"
+ "Devoices a selected nick on a channel. If nick is not given,\n"
+ "it will devoice you. If channel is not given, it will devoice\n"
+ "you on every channel.\n"
+ " \n"
+ "By default, limited to AOPs or those with level 5 access \n"
+ "and above on the channel, or to VOPs or those with level 3 \n"
+ "and above for self devoicing."));
return true;
}
void OnSyntaxError(CommandSource &source, const Anope::string &subcommand)
{
- SyntaxError(source, "DEVOICE", CHAN_DEVOICE_SYNTAX);
+ SyntaxError(source, "DEVOICE", _("DEVOICE [\037#channel\037] [\037nick\037]\002"));
}
void OnServHelp(CommandSource &source)
{
- source.Reply(CHAN_HELP_CMD_DEVOICE);
+ source.Reply(_(" DEVOICE Devoices a selected nick on a channel"));
}
};
@@ -228,18 +258,25 @@ class CommandCSHalfOp : public CommandModeBase
bool OnHelp(CommandSource &source, const Anope::string &subcommand)
{
- source.Reply(CHAN_HELP_HALFOP);
+ source.Reply(_("Syntax: \002HALFOP [\037#channel\037] [\037nick\037]\002\n"
+ " \n"
+ "Halfops a selected nick on a channel. If nick is not given,\n"
+ "it will halfop you. If channel is not given, it will halfop\n"
+ "you on every channel.\n"
+ " \n"
+ "By default, limited to AOPs and those with level 5 access \n"
+ "and above on the channel, or to HOPs or those with level 4 \n"));
return true;
}
void OnSyntaxError(CommandSource &source, const Anope::string &subcommand)
{
- SyntaxError(source, "HALFOP", CHAN_HALFOP_SYNTAX);
+ SyntaxError(source, "HALFOP", _("HALFOP [\037#channel\037] [\037nick\037]\002"));
}
void OnServHelp(CommandSource &source)
{
- source.Reply(CHAN_HELP_CMD_HALFOP);
+ source.Reply(_(" HALFOP Halfops a selected nick on a channel"));
}
};
@@ -262,18 +299,26 @@ class CommandCSDeHalfOp : public CommandModeBase
bool OnHelp(CommandSource &source, const Anope::string &subcommand)
{
- source.Reply(CHAN_HELP_DEHALFOP);
+ source.Reply(_("Syntax: \002DEHALFOP [\037#channel\037] [\037nick\037]\002\n"
+ " \n"
+ "Dehalfops a selected nick on a channel. If nick is not given,\n"
+ "it will dehalfop you. If channel is not given, it will dehalfop\n"
+ "you on every channel.\n"
+ " \n"
+ "By default, limited to AOPs and those with level 5 access \n"
+ "and above on the channel, or to HOPs or those with level 4 \n"
+ "and above for self dehalfopping."));
return true;
}
void OnSyntaxError(CommandSource &source, const Anope::string &subcommand)
{
- SyntaxError(source, "DEHALFOP", CHAN_DEHALFOP_SYNTAX);
+ SyntaxError(source, "DEHALFOP", _("DEHALFOP [\037#channel\037] [\037nick\037]\002"));
}
void OnServHelp(CommandSource &source)
{
- source.Reply(CHAN_HELP_CMD_DEHALFOP);
+ source.Reply(_(" DEHALFOP Dehalfops a selected nick on a channel"));
}
};
@@ -296,18 +341,25 @@ class CommandCSProtect : public CommandModeBase
bool OnHelp(CommandSource &source, const Anope::string &subcommand)
{
- source.Reply(CHAN_HELP_PROTECT);
+ source.Reply(_("Syntax: \002PROTECT [\037#channel\037] [\037nick\037]\002\n"
+ " \n"
+ "Protects a selected nick on a channel. If nick is not given,\n"
+ "it will protect you. If channel is not given, it will protect\n"
+ "you on every channel.\n"
+ " \n"
+ "By default, limited to the founder, or to SOPs or those with \n"
+ "level 10 and above on the channel for self protecting."));
return true;
}
void OnSyntaxError(CommandSource &source, const Anope::string &subcommand)
{
- SyntaxError(source, "PROTECT", CHAN_PROTECT_SYNTAX);
+ SyntaxError(source, "PROTECT", _("PROTECT [\037#channel\037] [\037nick\037]\002"));
}
void OnServHelp(CommandSource &source)
{
- source.Reply(CHAN_HELP_CMD_PROTECT);
+ source.Reply(_(" PROTECT Protects a selected nick on a channel"));
}
};
@@ -330,18 +382,24 @@ class CommandCSDeProtect : public CommandModeBase
bool OnHelp(CommandSource &source, const Anope::string &subcommand)
{
- source.Reply(CHAN_HELP_DEPROTECT);
+ source.Reply(_("Syntax: \002DEPROTECT [\037#channel\037] [\037nick\037]\002\n"
+ " \n"
+ "Deprotects a selected nick on a channel. If nick is not given,\n"
+ "it will deprotect you. If channel is not given, it will deprotect\n"
+ "you on every channel.\n"
+ " \n"
+ "By default, limited to the founder, or to SOPs or those with \n"));
return true;
}
void OnSyntaxError(CommandSource &source, const Anope::string &subcommand)
{
- SyntaxError(source, "DEPROTECT", CHAN_DEPROTECT_SYNTAX);
+ SyntaxError(source, "DEPROTECT", _("DEROTECT [\037#channel\037] [\037nick\037]\002"));
}
void OnServHelp(CommandSource &source)
{
- source.Reply(CHAN_HELP_CMD_DEPROTECT);
+ source.Reply(_(" DEPROTECT Deprotects a selected nick on a channel"));
}
};
@@ -364,18 +422,24 @@ class CommandCSOwner : public CommandModeBase
bool OnHelp(CommandSource &source, const Anope::string &subcommand)
{
- source.Reply(CHAN_HELP_OWNER);
+ source.Reply(_("Syntax: \002OWNER [\037#channel\037] [\037nick\037]\002\n"
+ " \n"
+ "Gives the selected nick owner status on \002channel\002. If nick is not\n"
+ "given, it will give you owner. If channel is not given, it will\n"
+ "give you owner on every channel.\n"
+ " \n"
+ "Limited to those with founder access on the channel."));
return true;
}
void OnSyntaxError(CommandSource &source, const Anope::string &subcommand)
{
- SyntaxError(source, "OWNER", CHAN_OWNER_SYNTAX);
+ SyntaxError(source, "OWNER", _("OWNER [\037#channel\037] [\037nick\037]\002"));
}
void OnServHelp(CommandSource &source)
{
- source.Reply(CHAN_HELP_CMD_OWNER);
+ source.Reply(_(" OWNER Gives you owner status on channel"));
}
};
@@ -398,18 +462,24 @@ class CommandCSDeOwner : public CommandModeBase
bool OnHelp(CommandSource &source, const Anope::string &subcommand)
{
- source.Reply(CHAN_HELP_DEOWNER);
+ source.Reply(_("Syntax: \002DEOWNER [\037#channel\037] [\037nick\037]\002\n"
+ " \n"
+ "Removes owner status from the selected nick on \002channel\002. If nick\n"
+ "is not given, it will deowner you. If channel is not given, it will\n"
+ "deowner you on every channel.\n"
+ " \n"
+ "Limited to those with founder access on the channel."));
return true;
}
void OnSyntaxError(CommandSource &source, const Anope::string &subcommand)
{
- SyntaxError(source, "DEOWNER", CHAN_DEOWNER_SYNTAX);
+ SyntaxError(source, "DEOWNER", _("DEOWNER [\037#channel\037] [\037nick\037]\002"));
}
void OnServHelp(CommandSource &source)
{
- source.Reply(CHAN_HELP_CMD_DEOWNER);
+ source.Reply(_(" DEOWNER Removes your owner status on a channel"));
}
};
diff --git a/modules/core/cs_register.cpp b/modules/core/cs_register.cpp
index 8407986e4..92d1746cb 100644
--- a/modules/core/cs_register.cpp
+++ b/modules/core/cs_register.cpp
@@ -32,22 +32,22 @@ class CommandCSRegister : public Command
if (readonly)
{
- source.Reply(CHAN_REGISTER_DISABLED);
+ source.Reply(_("Sorry, channel registration is temporarily disabled."));
return MOD_CONT;
}
if (chan[0] == '&')
- source.Reply(CHAN_REGISTER_NOT_LOCAL);
+ source.Reply(_("Local channels cannot be registered."));
else if (chan[0] != '#')
- source.Reply(CHAN_SYMBOL_REQUIRED);
+ source.Reply(LanguageString::CHAN_SYMBOL_REQUIRED);
else if (!ircdproto->IsChannelValid(chan))
- source.Reply(CHAN_X_INVALID, chan.c_str());
+ source.Reply(LanguageString::CHAN_X_INVALID, chan.c_str());
else if (ci)
- source.Reply(CHAN_ALREADY_REGISTERED, chan.c_str());
+ source.Reply(_("Channel \002%s\002 is already registered!"), chan.c_str());
else if (c && !c->HasUserStatus(u, CMODE_OP))
- source.Reply(CHAN_MUST_BE_CHANOP);
+ source.Reply(_("You must be a channel operator to register the channel."));
else if (Config->CSMaxReg && u->Account()->channelcount >= Config->CSMaxReg && !u->Account()->HasPriv("chanserv/no-register-limit"))
- source.Reply(u->Account()->channelcount > Config->CSMaxReg ? CHAN_EXCEEDED_CHANNEL_LIMIT : CHAN_REACHED_CHANNEL_LIMIT, Config->CSMaxReg);
+ source.Reply(u->Account()->channelcount > Config->CSMaxReg ? LanguageString::CHAN_EXCEEDED_CHANNEL_LIMIT : LanguageString::CHAN_REACHED_CHANNEL_LIMIT, Config->CSMaxReg);
else
{
ci = new ChannelInfo(chan);
@@ -66,7 +66,7 @@ class CommandCSRegister : public Command
ci->bi = NULL;
++ci->founder->channelcount;
Log(LOG_COMMAND, u, this, ci);
- source.Reply(CHAN_REGISTERED, chan.c_str(), u->nick.c_str());
+ source.Reply(_("Channel \002%s\002 registered under your nickname: %s"), chan.c_str(), u->nick.c_str());
/* Implement new mode lock */
if (c)
@@ -98,18 +98,37 @@ class CommandCSRegister : public Command
bool OnHelp(CommandSource &source, const Anope::string &subcommand)
{
- source.Reply(CHAN_HELP_REGISTER, Config->s_ChanServ.c_str());
+ source.Reply(_("Syntax: \002REGISTER \037channel\037 \037description\037\002\n"
+ " \n"
+ "Registers a channel in the %S database. In order\n"
+ "to use this command, you must first be a channel operator\n"
+ "on the channel you're trying to register.\n"
+ "The description, which \002must\002 be included, is a\n"
+ "general description of the channel's purpose.\n"
+ " \n"
+ "When you register a channel, you are recorded as the\n"
+ "\"founder\" of the channel. The channel founder is allowed\n"
+ "to change all of the channel settings for the channel;\n"
+ "%S will also automatically give the founder\n"
+ "channel-operator privileges when s/he enters the channel.\n"
+ "See the \002ACCESS\002 command (\002%R%S HELP ACCESS\002) for\n"
+ "information on giving a subset of these privileges to\n"
+ "other channel users.\n"
+ " \n"
+ "NOTICE: In order to register a channel, you must have\n"
+ "first registered your nickname. If you haven't,\n"
+ "\002%R%s HELP\002 for information on how to do so."));
return true;
}
void OnSyntaxError(CommandSource &source, const Anope::string &subcommand)
{
- SyntaxError(source, "REGISTER", CHAN_REGISTER_SYNTAX);
+ SyntaxError(source, "REGISTER", _("REGISTER \037channel\037 \037description\037"));
}
void OnServHelp(CommandSource &source)
{
- source.Reply(CHAN_HELP_CMD_REGISTER);
+ source.Reply(_(" REGISTER Register a channel"));
}
};
diff --git a/modules/core/cs_saset.cpp b/modules/core/cs_saset.cpp
index 56329b37d..896f23971 100644
--- a/modules/core/cs_saset.cpp
+++ b/modules/core/cs_saset.cpp
@@ -34,14 +34,14 @@ class CommandCSSASet : public Command
if (readonly)
{
- source.Reply(CHAN_SET_DISABLED);
+ source.Reply(LanguageString::CHAN_SET_DISABLED);
return MOD_CONT;
}
// XXX Remove after 1.9.4 release
if (params[1].equals_ci("MLOCK"))
{
- source.Reply(CHAN_SET_MLOCK_DEPRECATED);
+ source.Reply(LanguageString::CHAN_SET_MLOCK_DEPRECATED);
return MOD_CONT;
}
@@ -58,8 +58,8 @@ class CommandCSSASet : public Command
}
else
{
- source.Reply(NICK_SET_UNKNOWN_OPTION, params[1].c_str());
- source.Reply(MORE_INFO, Config->s_ChanServ.c_str(), "SET");
+ source.Reply(_("Unknown SASET option \002%s\002."), params[1].c_str());
+ source.Reply(LanguageString::MORE_INFO, Config->s_ChanServ.c_str(), "SET");
}
return MOD_CONT;
@@ -69,10 +69,16 @@ class CommandCSSASet : public Command
{
if (subcommand.empty())
{
- source.Reply(CHAN_HELP_SASET_HEAD);
+ source.Reply(_("Syntax: SASET \002channel\002 \037option\037 \037parameters\037\n"
+ " \n"
+ "Allows Services Operators to forcefully change settings\n"
+ "on channels.\n"
+ " \n"
+ "Available options:"));
for (subcommand_map::iterator it = this->subcommands.begin(), it_end = this->subcommands.end(); it != it_end; ++it)
it->second->OnServHelp(source);
- source.Reply(CHAN_HELP_SASET_TAIL);
+ source.Reply(_("Type \002%R%S HELP SASET \037option\037\002 for more information on a\n"
+ "particular option."));
return true;
}
else
@@ -88,12 +94,12 @@ class CommandCSSASet : public Command
void OnSyntaxError(CommandSource &source, const Anope::string &subcommand)
{
- SyntaxError(source, "SASET", CHAN_SASET_SYNTAX);
+ SyntaxError(source, "SASET", LanguageString::CHAN_SASET_SYNTAX);
}
void OnServHelp(CommandSource &source)
{
- source.Reply(CHAN_HELP_CMD_SASET);
+ source.Reply(_(" SASET Forcefully set channel options and information"));
}
bool AddSubcommand(Module *creator, Command *c)
diff --git a/modules/core/cs_saset_noexpire.cpp b/modules/core/cs_saset_noexpire.cpp
index 53f32210a..0c769ad08 100644
--- a/modules/core/cs_saset_noexpire.cpp
+++ b/modules/core/cs_saset_noexpire.cpp
@@ -29,12 +29,12 @@ class CommandCSSASetNoexpire : public Command
if (params[1].equals_ci("ON"))
{
ci->SetFlag(CI_NO_EXPIRE);
- source.Reply(CHAN_SET_NOEXPIRE_ON, ci->name.c_str());
+ source.Reply(_("Channel %s \002will not\002 expire."), ci->name.c_str());
}
else if (params[1].equals_ci("OFF"))
{
ci->UnsetFlag(CI_NO_EXPIRE);
- source.Reply(CHAN_SET_NOEXPIRE_OFF, ci->name.c_str());
+ source.Reply(_("Channel %s \002will\002 expire."), ci->name.c_str());
}
else
this->OnSyntaxError(source, "NOEXPIRE");
@@ -44,18 +44,21 @@ class CommandCSSASetNoexpire : public Command
bool OnHelp(CommandSource &source, const Anope::string &)
{
- source.Reply(CHAN_SERVADMIN_HELP_SET_NOEXPIRE);
+ source.Reply(_("Syntax: \002SET \037channel\037 NOEXPIRE {ON | OFF}\002\n"
+ " \n"
+ "Sets whether the given channel will expire. Setting this\n"
+ "to ON prevents the channel from expiring."));
return true;
}
void OnSyntaxError(CommandSource &source, const Anope::string &)
{
- SyntaxError(source, "SET NOEXPIRE", CHAN_SET_NOEXPIRE_SYNTAX);
+ SyntaxError(source, "SET NOEXPIRE", _("SET \037channel\037 NOEXPIRE {ON | OFF}"));
}
void OnServHelp(CommandSource &source)
{
- source.Reply(CHAN_HELP_CMD_SET_NOEXPIRE);
+ source.Reply(_(" NOEXPIRE Prevent the channel from expiring"));
}
};
diff --git a/modules/core/cs_set.cpp b/modules/core/cs_set.cpp
index a9db50cb2..489314e3c 100644
--- a/modules/core/cs_set.cpp
+++ b/modules/core/cs_set.cpp
@@ -34,19 +34,19 @@ class CommandCSSet : public Command
if (readonly)
{
- source.Reply(CHAN_SET_DISABLED);
+ source.Reply(LanguageString::CHAN_SET_DISABLED);
return MOD_CONT;
}
if (!check_access(u, cs_findchan(params[0]), CA_SET))
{
- source.Reply(ACCESS_DENIED);
+ source.Reply(LanguageString::ACCESS_DENIED);
return MOD_CONT;
}
// XXX Remove after 1.9.4 release
if (params[1].equals_ci("MLOCK"))
{
- source.Reply(CHAN_SET_MLOCK_DEPRECATED, Config->s_ChanServ.c_str());
+ source.Reply(LanguageString::CHAN_SET_MLOCK_DEPRECATED, Config->s_ChanServ.c_str());
return MOD_CONT;
}
@@ -62,8 +62,8 @@ class CommandCSSet : public Command
}
else
{
- source.Reply(NICK_SET_UNKNOWN_OPTION, params[1].c_str());
- source.Reply(MORE_INFO, Config->s_ChanServ.c_str(), "SET");
+ source.Reply(LanguageString::NICK_SET_UNKNOWN_OPTION, params[1].c_str());
+ source.Reply(LanguageString::MORE_INFO, Config->s_ChanServ.c_str(), "SET");
}
return MOD_CONT;
@@ -73,10 +73,16 @@ class CommandCSSet : public Command
{
if (subcommand.empty())
{
- source.Reply(CHAN_HELP_SET_HEAD);
+ source.Reply(_("Syntax: \002SET \037channel\037 \037option\037 \037parameters\037\002\n"
+ " \n"
+ "Allows the channel founder to set various channel options\n"
+ "and other information.\n"
+ " \n"
+ "Available options:"));
for (subcommand_map::iterator it = this->subcommands.begin(), it_end = this->subcommands.end(); it != it_end; ++it)
it->second->OnServHelp(source);
- source.Reply(CHAN_HELP_SET_TAIL);
+ source.Reply(_("Type \002%R%S HELP SET \037option\037\002 for more information on a\n"
+ "particular option."));
return true;
}
else
@@ -92,12 +98,12 @@ class CommandCSSet : public Command
void OnSyntaxError(CommandSource &source, const Anope::string &subcommand)
{
- SyntaxError(source, "SET", CHAN_SET_SYNTAX);
+ SyntaxError(source, "SET", LanguageString::CHAN_SET_SYNTAX);
}
void OnServHelp(CommandSource &source)
{
- source.Reply(CHAN_HELP_CMD_SET);
+ source.Reply(_(" SET Set channel options and information"));
}
bool AddSubcommand(Module *creator, Command *c)
diff --git a/modules/core/cs_set_bantype.cpp b/modules/core/cs_set_bantype.cpp
index 6ba41bf15..a3c6decb5 100644
--- a/modules/core/cs_set_bantype.cpp
+++ b/modules/core/cs_set_bantype.cpp
@@ -31,11 +31,11 @@ class CommandCSSetBanType : public Command
int16 bantype = convertTo<int16>(params[1], end, false);
if (!end.empty() || bantype < 0 || bantype > 3)
- source.Reply(CHAN_SET_BANTYPE_INVALID, params[1].c_str());
+ source.Reply(_("\002%s\002 is not a valid ban type."), params[1].c_str());
else
{
ci->bantype = bantype;
- source.Reply(CHAN_SET_BANTYPE_CHANGED, ci->name.c_str(), ci->bantype);
+ source.Reply(_("Ban type for channel %s is now #%d."), ci->name.c_str(), ci->bantype);
}
return MOD_CONT;
@@ -43,19 +43,29 @@ class CommandCSSetBanType : public Command
bool OnHelp(CommandSource &source, const Anope::string &)
{
- source.Reply(CHAN_HELP_SET_BANTYPE, "SET");
+ source.Reply(_("Syntax: \002%s \037channel\037 BANTYPE \037bantype\037\002\n"
+ " \n"
+ "Sets the ban type that will be used by services whenever\n"
+ "they need to ban someone from your channel.\n"
+ " \n"
+ "bantype is a number between 0 and 3 that means:\n"
+ " \n"
+ "0: ban in the form *!user@host\n"
+ "1: ban in the form *!*user@host\n"
+ "2: ban in the form *!*@host\n"
+ "3: ban in the form *!*user@*.domain"), this->name.c_str());
return true;
}
void OnSyntaxError(CommandSource &source, const Anope::string &)
{
// XXX
- SyntaxError(source, "SET", CHAN_SET_SYNTAX);
+ SyntaxError(source, "SET", LanguageString::CHAN_SET_SYNTAX);
}
void OnServHelp(CommandSource &source)
{
- source.Reply(CHAN_HELP_CMD_SET_BANTYPE);
+ source.Reply(_(" BANTYPE Set how Services make bans on the channel"));
}
};
@@ -66,16 +76,10 @@ class CommandCSSASetBanType : public CommandCSSetBanType
{
}
- bool OnHelp(CommandSource &source, const Anope::string &)
- {
- source.Reply(CHAN_HELP_SET_BANTYPE, "SASET");
- return true;
- }
-
void OnSyntaxError(CommandSource &source, const Anope::string &)
{
// XXX
- SyntaxError(source, "SASET", CHAN_SASET_SYNTAX);
+ SyntaxError(source, "SASET", LanguageString::CHAN_SASET_SYNTAX);
}
};
diff --git a/modules/core/cs_set_description.cpp b/modules/core/cs_set_description.cpp
index a36b1150f..aee4144d9 100644
--- a/modules/core/cs_set_description.cpp
+++ b/modules/core/cs_set_description.cpp
@@ -28,26 +28,29 @@ class CommandCSSetDescription : public Command
ci->desc = params[1];
- source.Reply(CHAN_DESC_CHANGED, ci->name.c_str(), ci->desc.c_str());
+ source.Reply(_("Description of %s changed to \002%s\002."), ci->name.c_str(), ci->desc.c_str());
return MOD_CONT;
}
bool OnHelp(CommandSource &source, const Anope::string &)
{
- source.Reply(CHAN_HELP_SET_DESC, "SET");
+ source.Reply(_("Syntax: \002%s \037channel\037 DESC \037description\037\002\n"
+ " \n"
+ "Sets the description for the channel, which shows up with\n"
+ "the \002LIST\002 and \002INFO\002 commands."), this->name.c_str());
return true;
}
void OnSyntaxError(CommandSource &source, const Anope::string &)
{
// XXX
- SyntaxError(source, "SET", CHAN_SET_SYNTAX);
+ SyntaxError(source, "SET", LanguageString::CHAN_SET_SYNTAX);
}
void OnServHelp(CommandSource &source)
{
- source.Reply(CHAN_HELP_CMD_SET_DESC);
+ source.Reply(_(" DESC Set the channel description"));
}
};
@@ -58,16 +61,10 @@ class CommandCSSASetDescription : public CommandCSSetDescription
{
}
- bool OnHelp(CommandSource &source, const Anope::string &)
- {
- source.Reply(CHAN_HELP_SET_DESC, "SASET");
- return true;
- }
-
void OnSyntaxError(CommandSource &source, const Anope::string &)
{
// XXX
- SyntaxError(source, "SASET", CHAN_SASET_SYNTAX);
+ SyntaxError(source, "SASET", LanguageString::CHAN_SASET_SYNTAX);
}
};
diff --git a/modules/core/cs_set_founder.cpp b/modules/core/cs_set_founder.cpp
index c36f3c841..130117ff4 100644
--- a/modules/core/cs_set_founder.cpp
+++ b/modules/core/cs_set_founder.cpp
@@ -29,7 +29,7 @@ class CommandCSSetFounder : public Command
if (this->permission.empty() && (ci->HasFlag(CI_SECUREFOUNDER) ? !IsFounder(u, ci) : !check_access(u, ci, CA_FOUNDER)))
{
- source.Reply(ACCESS_DENIED);
+ source.Reply(LanguageString::ACCESS_DENIED);
return MOD_CONT;
}
@@ -38,19 +38,19 @@ class CommandCSSetFounder : public Command
if (!na)
{
- source.Reply(NICK_X_NOT_REGISTERED, params[1].c_str());
+ source.Reply(LanguageString::NICK_X_NOT_REGISTERED, params[1].c_str());
return MOD_CONT;
}
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());
return MOD_CONT;
}
nc = na->nc;
if (Config->CSMaxReg && nc->channelcount >= Config->CSMaxReg && !u->Account()->HasPriv("chanserv/no-register-limit"))
{
- source.Reply(CHAN_SET_FOUNDER_TOO_MANY_CHANS, na->nick.c_str());
+ source.Reply(_("\002%s\002 has too many channels registered."), na->nick.c_str());
return MOD_CONT;
}
@@ -64,26 +64,29 @@ class CommandCSSetFounder : public Command
ci->founder = nc;
++nc->channelcount;
- source.Reply(CHAN_FOUNDER_CHANGED, ci->name.c_str(), na->nick.c_str());
+ source.Reply(_("Founder of %s changed to \002%s\002."), ci->name.c_str(), na->nick.c_str());
return MOD_CONT;
}
bool OnHelp(CommandSource &source, const Anope::string &)
{
- source.Reply(CHAN_HELP_SET_FOUNDER, "SET");
+ source.Reply(_("Syntax: \002%s \037channel\037 FOUNDER \037nick\037\002\n"
+ " \n"
+ "Changes the founder of a channel. The new nickname must\n"
+ "be a registered one."), this->name.c_str());
return true;
}
void OnSyntaxError(CommandSource &source, const Anope::string &)
{
// XXX
- SyntaxError(source, "SET", CHAN_SET_SYNTAX);
+ SyntaxError(source, "SET", LanguageString::CHAN_SET_SYNTAX);
}
void OnServHelp(CommandSource &source)
{
- source.Reply(CHAN_HELP_CMD_SET_FOUNDER);
+ source.Reply(_(" FOUNDER Set the founder of a channel"));
}
};
@@ -94,16 +97,10 @@ class CommandCSSASetFounder : public CommandCSSetFounder
{
}
- bool OnHelp(CommandSource &source, const Anope::string &)
- {
- source.Reply(CHAN_HELP_SET_FOUNDER, "SASET");
- return true;
- }
-
void OnSyntaxError(CommandSource &source, const Anope::string &)
{
// XXX
- SyntaxError(source, "SASET", CHAN_SASET_SYNTAX);
+ SyntaxError(source, "SASET", LanguageString::CHAN_SASET_SYNTAX);
}
};
diff --git a/modules/core/cs_set_keeptopic.cpp b/modules/core/cs_set_keeptopic.cpp
index 6ea297010..5a7bbd334 100644
--- a/modules/core/cs_set_keeptopic.cpp
+++ b/modules/core/cs_set_keeptopic.cpp
@@ -29,12 +29,12 @@ class CommandCSSetKeepTopic : public Command
if (params[1].equals_ci("ON"))
{
ci->SetFlag(CI_KEEPTOPIC);
- source.Reply(CHAN_SET_KEEPTOPIC_ON, ci->name.c_str());
+ source.Reply(_("Topic retention option for %s is now \002\002."), ci->name.c_str());
}
else if (params[1].equals_ci("OFF"))
{
ci->UnsetFlag(CI_KEEPTOPIC);
- source.Reply(CHAN_SET_KEEPTOPIC_OFF, ci->name.c_str());
+ source.Reply(_("Topic retention option for %s is now \002\002."), ci->name.c_str());
}
else
this->OnSyntaxError(source, "KEEPTOPIC");
@@ -44,18 +44,24 @@ class CommandCSSetKeepTopic : public Command
bool OnHelp(CommandSource &source, const Anope::string &)
{
- source.Reply(CHAN_HELP_SET_KEEPTOPIC, "SET");
+ source.Reply(_("Syntax: \002%s \037channel\037 KEEPTOPIC {ON | OFF}\002\n"
+ " \n"
+ "Enables or disables the \002topic retention\002 option for a \n"
+ "channel. When \002topic retention\002 is set, the topic for the\n"
+ "channel will be remembered by %S even after the\n"
+ "last user leaves the channel, and will be restored the\n"
+ "next time the channel is created."), this->name.c_str());
return true;
}
void OnSyntaxError(CommandSource &source, const Anope::string &)
{
- SyntaxError(source, "SET KEEPTOPIC", CHAN_SET_KEEPTOPIC_SYNTAX);
+ SyntaxError(source, "SET KEEPTOPIC", _("SET \037channel\037 KEEPTOPIC {ON | OFF}"));
}
void OnServHelp(CommandSource &source)
{
- source.Reply(CHAN_HELP_CMD_SET_KEEPTOPIC);
+ source.Reply(_(" KEEPTOPIC Retain topic when channel is not in use"));
}
};
@@ -66,15 +72,9 @@ class CommandCSSASetKeepTopic : public CommandCSSetKeepTopic
{
}
- bool OnHelp(CommandSource &source, const Anope::string &)
- {
- source.Reply(CHAN_HELP_SET_KEEPTOPIC, "SASET");
- return true;
- }
-
void OnSyntaxError(CommandSource &source, const Anope::string &)
{
- SyntaxError(source, "SET KEEPTOPIC", CHAN_SASET_KEEPTOPIC_SYNTAX);
+ SyntaxError(source, "SET KEEPTOPIC", _("SASET \002channel\002 KEEPTOPIC {ON | OFF}"));
}
};
diff --git a/modules/core/cs_set_opnotice.cpp b/modules/core/cs_set_opnotice.cpp
index 6efe94b83..e55607ca3 100644
--- a/modules/core/cs_set_opnotice.cpp
+++ b/modules/core/cs_set_opnotice.cpp
@@ -29,12 +29,12 @@ class CommandCSSetOpNotice : public Command
if (params[1].equals_ci("ON"))
{
ci->SetFlag(CI_OPNOTICE);
- source.Reply(CHAN_SET_OPNOTICE_ON, ci->name.c_str());
+ source.Reply(_("Op-notice option for %s is now \002\002."), ci->name.c_str());
}
else if (params[1].equals_ci("OFF"))
{
ci->UnsetFlag(CI_OPNOTICE);
- source.Reply(CHAN_SET_OPNOTICE_OFF, ci->name.c_str());
+ source.Reply(_("Op-notice option for %s is now \002\002."), ci->name.c_str());
}
else
this->OnSyntaxError(source, "OPNOTICE");
@@ -44,18 +44,23 @@ class CommandCSSetOpNotice : public Command
bool OnHelp(CommandSource &source, const Anope::string &)
{
- source.Reply(CHAN_HELP_SET_OPNOTICE, "SET");
+ source.Reply(_("Syntax: \002%s \037channel\037 OPNOTICE {ON | OFF}\002\n"
+ " \n"
+ "Enables or disables the \002op-notice\002 option for a channel.\n"
+ "When \002op-notice\002 is set, %S will send a notice to the\n"
+ "channel whenever the \002OP\002 or \002DEOP\002 commands are used for a user\n"
+ "in the channel."), this->name.c_str());
return true;
}
void OnSyntaxError(CommandSource &source, const Anope::string &)
{
- SyntaxError(source, "SET OPNOTICE", CHAN_SET_OPNOTICE_SYNTAX);
+ SyntaxError(source, "SET OPNOTICE", _("SET \037channel\037 OPNOTICE {ON | OFF}"));
}
void OnServHelp(CommandSource &source)
{
- source.Reply(CHAN_HELP_CMD_SET_OPNOTICE);
+ source.Reply(_(" OPNOTICE Send a notice when OP/DEOP commands are used"));
}
};
@@ -66,15 +71,9 @@ class CommandCSSASetOpNotice : public CommandCSSetOpNotice
{
}
- bool OnHelp(CommandSource &source, const Anope::string &)
- {
- source.Reply(CHAN_HELP_SET_OPNOTICE, "SASET");
- return true;
- }
-
void OnSyntaxError(CommandSource &source, const Anope::string &)
{
- SyntaxError(source, "SET OPNOTICE", CHAN_SASET_OPNOTICE_SYNTAX);
+ SyntaxError(source, "SET OPNOTICE", _("SASET \002channel\002 OPNOTICE {ON | OFF}"));
}
};
diff --git a/modules/core/cs_set_peace.cpp b/modules/core/cs_set_peace.cpp
index 067152bbe..5daa648f8 100644
--- a/modules/core/cs_set_peace.cpp
+++ b/modules/core/cs_set_peace.cpp
@@ -29,12 +29,12 @@ class CommandCSSetPeace : public Command
if (params[1].equals_ci("ON"))
{
ci->SetFlag(CI_PEACE);
- source.Reply(CHAN_SET_PEACE_ON, ci->name.c_str());
+ source.Reply(_("Peace option for %s is now \002\002."), ci->name.c_str());
}
else if (params[1].equals_ci("OFF"))
{
ci->UnsetFlag(CI_PEACE);
- source.Reply(CHAN_SET_PEACE_OFF, ci->name.c_str());
+ source.Reply(_("Peace option for %s is now \002\002."), ci->name.c_str());
}
else
this->OnSyntaxError(source, "PEACE");
@@ -44,18 +44,23 @@ class CommandCSSetPeace : public Command
bool OnHelp(CommandSource &source, const Anope::string &)
{
- source.Reply(CHAN_HELP_SET_PEACE, "SET");
+ source.Reply(_("Syntax: \002%s \037channel\037 PEACE {ON | OFF}\002\n"
+ " \n"
+ "Enables or disables the \002peace\002 option for a channel.\n"
+ "When \002peace\002 is set, a user won't be able to kick,\n"
+ "ban or remove a channel status of a user that has\n"
+ "a level superior or equal to his via %S commands."), this->name.c_str());
return true;
}
void OnSyntaxError(CommandSource &source, const Anope::string &)
{
- SyntaxError(source, "SET PEACE", CHAN_SET_PEACE_SYNTAX);
+ SyntaxError(source, "SET PEACE", _("SET \037channel\037 PEACE {ON | OFF}"));
}
void OnServHelp(CommandSource &source)
{
- source.Reply(CHAN_HELP_CMD_SET_PEACE, "SET");
+ source.Reply(_(" PEACE Regulate the use of critical commands"), "SET");
}
};
@@ -66,15 +71,9 @@ class CommandCSSASetPeace : public CommandCSSetPeace
{
}
- bool OnHelp(CommandSource &source, const Anope::string &)
- {
- source.Reply(CHAN_HELP_SET_PEACE, "SASET");
- return true;
- }
-
void OnSyntaxError(CommandSource &source, const Anope::string &)
{
- SyntaxError(source, "SASET PEACE", CHAN_SASET_PEACE_SYNTAX);
+ SyntaxError(source, "SASET PEACE", _("SASET \002channel\002 PEACE {ON | OFF}"));
}
};
diff --git a/modules/core/cs_set_persist.cpp b/modules/core/cs_set_persist.cpp
index d659422fc..0c3ef2b97 100644
--- a/modules/core/cs_set_persist.cpp
+++ b/modules/core/cs_set_persist.cpp
@@ -65,7 +65,7 @@ class CommandCSSetPersist : public Command
}
}
- source.Reply(CHAN_SET_PERSIST_ON, ci->name.c_str());
+ source.Reply(_("Channel \002%s\002 is now persistant."), ci->name.c_str());
}
else if (params[1].equals_ci("OFF"))
{
@@ -92,7 +92,7 @@ class CommandCSSetPersist : public Command
ChanServ->UnAssign(NULL, ci);
}
- source.Reply(CHAN_SET_PERSIST_OFF, ci->name.c_str());
+ source.Reply(_("Channel \002%s\002 is no longer persistant."), ci->name.c_str());
}
else
this->OnSyntaxError(source, "PERSIST");
@@ -102,18 +102,37 @@ class CommandCSSetPersist : public Command
bool OnHelp(CommandSource &source, const Anope::string &)
{
- source.Reply(CHAN_HELP_SET_PERSIST, "SET");
+ source.Reply(_("Syntax: \002%s \037channel\037 PERSIST {ON | OFF}\002\n"
+ "Enables or disables the persistant channel setting.\n"
+ "When persistant is set, the service bot will remain\n"
+ "in the channel when it has emptied of users.\n"
+ " \n"
+ "If your IRCd does not a permanent (persistant) channel\n"
+ "mode you must have a service bot in your channel to\n"
+ "set persist on, and it can not be unassigned while persist\n"
+ "is on.\n"
+ " \n"
+ "If this network does not have BotServ enabled and does\n"
+ "not have a permanent channel mode, ChanServ will\n"
+ "join your channel when you set persist on (and leave when\n"
+ "it has been set off).\n"
+ " \n"
+ "If your IRCd has a permanent (persistant) channel mode\n"
+ "and is is set or unset (for any reason, including MLOCK),\n"
+ "persist is automatically set and unset for the channel aswell.\n"
+ "Additionally, services will set or unset this mode when you\n"
+ "set persist on or off."), this->name.c_str());
return true;
}
void OnSyntaxError(CommandSource &source, const Anope::string &)
{
- SyntaxError(source, "SET PERSIST", CHAN_SET_PERSIST_SYNTAX);
+ SyntaxError(source, "SET PERSIST", _("SET \037channel\037 PERSIST {ON | OFF}"));
}
void OnServHelp(CommandSource &source)
{
- source.Reply(CHAN_HELP_CMD_SET_PERSIST);
+ source.Reply(_(" PERSIST Set the channel as permanent"));
}
};
@@ -124,15 +143,9 @@ class CommandCSSASetPersist : public CommandCSSetPersist
{
}
- bool OnHelp(CommandSource &source, const Anope::string &)
- {
- source.Reply(CHAN_HELP_SET_PERSIST, "SASET");
- return true;
- }
-
void OnSyntaxError(CommandSource &source, const Anope::string &)
{
- SyntaxError(source, "SASET PERSIST", CHAN_SASET_PERSIST_SYNTAX);
+ SyntaxError(source, "SASET PERSIST", _("SASET \002channel\002 PERSIST {ON | OFF}"));
}
};
diff --git a/modules/core/cs_set_private.cpp b/modules/core/cs_set_private.cpp
index 28356db70..162da757d 100644
--- a/modules/core/cs_set_private.cpp
+++ b/modules/core/cs_set_private.cpp
@@ -29,12 +29,12 @@ class CommandCSSetPrivate : public Command
if (params[1].equals_ci("ON"))
{
ci->SetFlag(CI_PRIVATE);
- source.Reply(CHAN_SET_PRIVATE_ON, ci->name.c_str());
+ source.Reply(_("Private option for %s is now \002\002."), ci->name.c_str());
}
else if (params[1].equals_ci("OFF"))
{
ci->UnsetFlag(CI_PRIVATE);
- source.Reply(CHAN_SET_PRIVATE_OFF, ci->name.c_str());
+ source.Reply(_("Private option for %s is now \002\002."), ci->name.c_str());
}
else
this->OnSyntaxError(source, "PRIVATE");
@@ -44,18 +44,22 @@ class CommandCSSetPrivate : public Command
bool OnHelp(CommandSource &source, const Anope::string &)
{
- source.Reply(CHAN_HELP_SET_PRIVATE, "SASET");
+ source.Reply(_("Syntax: \002%s \037channel\037 PRIVATE {ON | OFF}\002\n"
+ " \n"
+ "Enables or disables the \002private\002 option for a channel.\n"
+ "When \002private\002 is set, a \002%R%S LIST\002 will not\n"
+ "include the channel in any lists."), this->name.c_str());
return true;
}
void OnSyntaxError(CommandSource &source, const Anope::string &)
{
- SyntaxError(source, "SET PRIVATE", CHAN_SET_PRIVATE_SYNTAX);
+ SyntaxError(source, "SET PRIVATE", _("SET \037channel\037 PRIVATE {ON | OFF}"));
}
void OnServHelp(CommandSource &source)
{
- source.Reply(CHAN_HELP_CMD_SET_PRIVATE);
+ source.Reply(_(" PRIVATE Hide channel from LIST command"));
}
};
@@ -66,15 +70,9 @@ class CommandCSSASetPrivate : public CommandCSSetPrivate
{
}
- bool OnHelp(CommandSource &source, const Anope::string &)
- {
- source.Reply(CHAN_HELP_SET_PRIVATE, "SASET");
- return true;
- }
-
void OnSyntaxError(CommandSource &source, const Anope::string &)
{
- SyntaxError(source, "SASET PRIVATE", CHAN_SASET_PRIVATE_SYNTAX);
+ SyntaxError(source, "SASET PRIVATE", _("SASET \002channel\002 PRIVATE {ON | OFF}"));
}
};
diff --git a/modules/core/cs_set_restricted.cpp b/modules/core/cs_set_restricted.cpp
index c8ee140b0..646a42241 100644
--- a/modules/core/cs_set_restricted.cpp
+++ b/modules/core/cs_set_restricted.cpp
@@ -30,14 +30,14 @@ class CommandCSSetRestricted : public Command
ci->SetFlag(CI_RESTRICTED);
if (ci->levels[CA_NOJOIN] < 0)
ci->levels[CA_NOJOIN] = 0;
- source.Reply(CHAN_SET_RESTRICTED_ON, ci->name.c_str());
+ source.Reply(_("Restricted access option for %s is now \002\002."), ci->name.c_str());
}
else if (params[1].equals_ci("OFF"))
{
ci->UnsetFlag(CI_RESTRICTED);
if (ci->levels[CA_NOJOIN] >= 0)
ci->levels[CA_NOJOIN] = -2;
- source.Reply(CHAN_SET_RESTRICTED_OFF, ci->name.c_str());
+ source.Reply(_("Restricted access option for %s is now \002\002."), ci->name.c_str());
}
else
this->OnSyntaxError(source, "RESTRICTED");
@@ -47,18 +47,22 @@ class CommandCSSetRestricted : public Command
bool OnHelp(CommandSource &source, const Anope::string &)
{
- source.Reply(CHAN_HELP_SET_RESTRICTED, "SET");
+ source.Reply(_("Syntax: \002%s \037channel\037 RESTRICTED {ON | OFF}\002\n"
+ " \n"
+ "Enables or disables the \002restricted access\002 option for a\n"
+ "channel. When \002restricted access\002 is set, users not on the access list will\n"
+ "instead be kicked and banned from the channel."), this->name.c_str());
return true;
}
void OnSyntaxError(CommandSource &source, const Anope::string &)
{
- SyntaxError(source, "SET RESTRICTED", CHAN_SET_RESTRICTED_SYNTAX);
+ SyntaxError(source, "SET RESTRICTED", _("SET \037channel\037 RESTRICTED {ON | OFF}"));
}
void OnServHelp(CommandSource &source)
{
- source.Reply(CHAN_HELP_CMD_SET_RESTRICTED);
+ source.Reply(_(" RESTRICTED Restrict access to the channel"));
}
};
@@ -69,15 +73,9 @@ class CommandCSSASetRestricted : public CommandCSSetRestricted
{
}
- bool OnHelp(CommandSource &source, const Anope::string &)
- {
- source.Reply(CHAN_HELP_SET_RESTRICTED, "SASET");
- return true;
- }
-
void OnSyntaxError(CommandSource &source, const Anope::string &)
{
- SyntaxError(source, "SASET RESTRICTED", CHAN_SASET_RESTRICTED_SYNTAX);
+ SyntaxError(source, "SASET RESTRICTED", _("SASET \002channel\002 RESTRICTED {ON | OFF}"));
}
};
diff --git a/modules/core/cs_set_secure.cpp b/modules/core/cs_set_secure.cpp
index 118214c29..a84e91958 100644
--- a/modules/core/cs_set_secure.cpp
+++ b/modules/core/cs_set_secure.cpp
@@ -29,12 +29,12 @@ class CommandCSSetSecure : public Command
if (params[1].equals_ci("ON"))
{
ci->SetFlag(CI_SECURE);
- source.Reply(CHAN_SET_SECURE_ON, ci->name.c_str());
+ source.Reply(_("Secure option for %s is now \002\002."), ci->name.c_str());
}
else if (params[1].equals_ci("OFF"))
{
ci->UnsetFlag(CI_SECURE);
- source.Reply(CHAN_SET_SECURE_OFF, ci->name.c_str());
+ source.Reply(_("Secure option for %s is now \002\002."), ci->name.c_str());
}
else
this->OnSyntaxError(source, "SECURE");
@@ -44,18 +44,24 @@ class CommandCSSetSecure : public Command
bool OnHelp(CommandSource &source, const Anope::string &)
{
- source.Reply(CHAN_HELP_SET_SECURE, "SET", Config->s_NickServ.c_str());
+ source.Reply(_("Syntax: \002%s \037channel\037 SECURE {ON | OFF}\002\n"
+ " \n"
+ "Enables or disables %S's security features for a\n"
+ "channel. When \002SECURE\002 is set, only users who have\n"
+ "registered their nicknames with %s and IDENTIFY'd\n"
+ "with their password will be given access to the channel\n"
+ "as controlled by the access list."), this->name.c_str(), Config->s_NickServ.c_str());
return true;
}
void OnSyntaxError(CommandSource &source, const Anope::string &)
{
- SyntaxError(source, "SET SECURE", CHAN_SET_SECURE_SYNTAX);
+ SyntaxError(source, "SET SECURE", _("SET \037channel\037 SECURE {ON | OFF}"));
}
void OnServHelp(CommandSource &source)
{
- source.Reply(CHAN_HELP_CMD_SET_SECURE);
+ source.Reply(_(" SECURE Activate %S security features"));
}
};
@@ -66,15 +72,9 @@ class CommandCSSASetSecure : public CommandCSSetSecure
{
}
- bool OnHelp(CommandSource &source, const Anope::string &)
- {
- source.Reply(CHAN_HELP_SET_SECURE, "SASET", Config->s_NickServ.c_str());
- return true;
- }
-
void OnSyntaxError(CommandSource &source, const Anope::string &)
{
- SyntaxError(source, "SASET SECURE", CHAN_SASET_SECURE_SYNTAX);
+ SyntaxError(source, "SASET SECURE", _("SASET \002channel\002 SECURE {ON | OFF}"));
}
};
diff --git a/modules/core/cs_set_securefounder.cpp b/modules/core/cs_set_securefounder.cpp
index 6e076d450..85c587adf 100644
--- a/modules/core/cs_set_securefounder.cpp
+++ b/modules/core/cs_set_securefounder.cpp
@@ -29,19 +29,19 @@ class CommandCSSetSecureFounder : public Command
if (this->permission.empty() && ci->HasFlag(CI_SECUREFOUNDER) ? !IsFounder(u, ci) : !check_access(u, ci, CA_FOUNDER))
{
- source.Reply(ACCESS_DENIED);
+ source.Reply(LanguageString::ACCESS_DENIED);
return MOD_CONT;
}
if (params[1].equals_ci("ON"))
{
ci->SetFlag(CI_SECUREFOUNDER);
- source.Reply(CHAN_SET_SECUREFOUNDER_ON, ci->name.c_str());
+ source.Reply(_("Secure founder option for %s is now \002\002."), ci->name.c_str());
}
else if (params[1].equals_ci("OFF"))
{
ci->UnsetFlag(CI_SECUREFOUNDER);
- source.Reply(CHAN_SET_SECUREFOUNDER_OFF, ci->name.c_str());
+ source.Reply(_("Secure founder option for %s is now \002\002."), ci->name.c_str());
}
else
this->OnSyntaxError(source, "SECUREFOUNDER");
@@ -51,18 +51,24 @@ class CommandCSSetSecureFounder : public Command
bool OnHelp(CommandSource &source, const Anope::string &)
{
- source.Reply(CHAN_HELP_SET_SECUREFOUNDER, "SET");
+ source.Reply(_("Syntax: \002%s \037channel\037 SECUREFOUNDER {ON | OFF}\002\n"
+ " \n"
+ "Enables or disables the \002secure founder\002 option for a channel.\n"
+ "When \002secure founder\002 is set, only the real founder will be\n"
+ "able to drop the channel, change its password, its founder and its\n"
+ "successor, and not those who have founder level access through\n"
+ "the access/qop command."), this->name.c_str());
return true;
}
void OnSyntaxError(CommandSource &source, const Anope::string &)
{
- SyntaxError(source, "SET SECUREFOUNDER", CHAN_SET_SECUREFOUNDER_SYNTAX);
+ SyntaxError(source, "SET SECUREFOUNDER", _("SET \037channel\037 SECUREFOUNDER {ON | OFF}"));
}
void OnServHelp(CommandSource &source)
{
- source.Reply(CHAN_HELP_CMD_SET_SECUREFOUNDER);
+ source.Reply(_(" SECUREFOUNDER Stricter control of channel founder status"));
}
};
@@ -73,15 +79,9 @@ class CommandCSSASetSecureFounder : public CommandCSSetSecureFounder
{
}
- bool OnHelp(CommandSource &source, const Anope::string &)
- {
- source.Reply(CHAN_HELP_SET_SECUREFOUNDER, "SASET");
- return true;
- }
-
void OnSyntaxError(CommandSource &source, const Anope::string &)
{
- SyntaxError(source, "SASET SECUREFOUNDER", CHAN_SASET_SECUREFOUNDER_SYNTAX);
+ SyntaxError(source, "SASET SECUREFOUNDER", _("SASET \002channel\002 SECUREFOUNDER {ON | OFF}"));
}
};
diff --git a/modules/core/cs_set_secureops.cpp b/modules/core/cs_set_secureops.cpp
index 036e2cd74..d4e8f5e22 100644
--- a/modules/core/cs_set_secureops.cpp
+++ b/modules/core/cs_set_secureops.cpp
@@ -29,12 +29,12 @@ class CommandCSSetSecureOps : public Command
if (params[1].equals_ci("ON"))
{
ci->SetFlag(CI_SECUREOPS);
- source.Reply(CHAN_SET_SECUREOPS_ON, ci->name.c_str());
+ source.Reply(_("Secure ops option for %s is now \002\002."), ci->name.c_str());
}
else if (params[1].equals_ci("OFF"))
{
ci->UnsetFlag(CI_SECUREOPS);
- source.Reply(CHAN_SET_SECUREOPS_OFF, ci->name.c_str());
+ source.Reply(_("Secure ops option for %s is now \002\002."), ci->name.c_str());
}
else
this->OnSyntaxError(source, "SECUREOPS");
@@ -44,18 +44,22 @@ class CommandCSSetSecureOps : public Command
bool OnHelp(CommandSource &source, const Anope::string &)
{
- source.Reply(CHAN_HELP_SET_SECUREOPS, "SET");
+ source.Reply(_("Syntax: \002SET \037%s\037 SECUREOPS {ON | OFF}\002\n"
+ " \n"
+ "Enables or disables the \002secure ops\002 option for a channel.\n"
+ "When \002secure ops\002 is set, users who are not on the userlist\n"
+ "will not be allowed chanop status."), this->name.c_str());
return true;
}
void OnSyntaxError(CommandSource &source, const Anope::string &)
{
- SyntaxError(source, "SET SECUREOPS", CHAN_SET_SECUREOPS_SYNTAX);
+ SyntaxError(source, "SET SECUREOPS", _("SET \037channel\037 SECUREOPS {ON | OFF}"));
}
void OnServHelp(CommandSource &source)
{
- source.Reply(CHAN_HELP_CMD_SET_SECUREOPS);
+ source.Reply(_(" SECUREOPS Stricter control of chanop status"));
}
};
@@ -66,15 +70,9 @@ class CommandCSSASetSecureOps : public CommandCSSetSecureOps
{
}
- bool OnHelp(CommandSource &source, const Anope::string &)
- {
- source.Reply(CHAN_HELP_SET_SECUREOPS, "SASET");
- return true;
- }
-
void OnSyntaxError(CommandSource &source, const Anope::string &)
{
- SyntaxError(source, "SASET SECUREOPS", CHAN_SASET_SECUREOPS_SYNTAX);
+ SyntaxError(source, "SASET SECUREOPS", _("SASET \002channel\002 SECUREOPS {ON | OFF}"));
}
};
diff --git a/modules/core/cs_set_signkick.cpp b/modules/core/cs_set_signkick.cpp
index c6c399587..c89e4b502 100644
--- a/modules/core/cs_set_signkick.cpp
+++ b/modules/core/cs_set_signkick.cpp
@@ -30,19 +30,20 @@ class CommandCSSetSignKick : public Command
{
ci->SetFlag(CI_SIGNKICK);
ci->UnsetFlag(CI_SIGNKICK_LEVEL);
- source.Reply(CHAN_SET_SIGNKICK_ON, ci->name.c_str());
+ source.Reply(_("Signed kick option for %s is now \002\002."), ci->name.c_str());
}
else if (params[1].equals_ci("LEVEL"))
{
ci->SetFlag(CI_SIGNKICK_LEVEL);
ci->UnsetFlag(CI_SIGNKICK);
- source.Reply(CHAN_SET_SIGNKICK_LEVEL, ci->name.c_str());
+ source.Reply(_("Signed kick option for %s is now \002ON\002, but depends of the\n"
+ "level of the user that is using the command."), ci->name.c_str());
}
else if (params[1].equals_ci("OFF"))
{
ci->UnsetFlag(CI_SIGNKICK);
ci->UnsetFlag(CI_SIGNKICK_LEVEL);
- source.Reply(CHAN_SET_SIGNKICK_OFF, ci->name.c_str());
+ source.Reply(_("Signed kick option for %s is now \002\002."), ci->name.c_str());
}
else
this->OnSyntaxError(source, "SIGNKICK");
@@ -52,18 +53,27 @@ class CommandCSSetSignKick : public Command
bool OnHelp(CommandSource &source, const Anope::string &)
{
- source.Reply(CHAN_HELP_SET_SIGNKICK, "SET");
+ source.Reply(_("Syntax: \002SET \037%s\037 SIGNKICK {ON | LEVEL | OFF}\002\n"
+ " \n"
+ "Enables or disables signed kicks for a\n"
+ "channel. When \002SIGNKICK\002 is set, kicks issued with\n"
+ "%S KICK command will have the nick that used the\n"
+ "command in their reason.\n"
+ " \n"
+ "If you use \002LEVEL\002, those who have a level that is superior \n"
+ "or equal to the SIGNKICK level on the channel won't have their \n"
+ "kicks signed. See \002%R%S HELP LEVELS\002 for more information."), this->name.c_str());
return true;
}
void OnSyntaxError(CommandSource &source, const Anope::string &)
{
- SyntaxError(source, "SET SIGNKICK", CHAN_SET_SIGNKICK_SYNTAX);
+ SyntaxError(source, "SET SIGNKICK", _("SET \037channel\037 SIGNKICK {ON | LEVEL | OFF}"));
}
void OnServHelp(CommandSource &source)
{
- source.Reply(CHAN_HELP_CMD_SET_SIGNKICK);
+ source.Reply(_(" SIGNKICK Sign kicks that are done with KICK command"));
}
};
@@ -74,15 +84,9 @@ class CommandCSSASetSignKick : public CommandCSSetSignKick
{
}
- bool OnHelp(CommandSource &source, const Anope::string &)
- {
- source.Reply(CHAN_HELP_SET_SIGNKICK, "SASET");
- return true;
- }
-
void OnSyntaxError(CommandSource &source, const Anope::string &)
{
- SyntaxError(source, "SASET SIGNKICK", CHAN_SASET_SIGNKICK_SYNTAX);
+ SyntaxError(source, "SASET SIGNKICK", _("SASET \002channel\002 SIGNKICK {ON | OFF}"));
}
};
diff --git a/modules/core/cs_set_successor.cpp b/modules/core/cs_set_successor.cpp
index 7b4c48b3d..38a885830 100644
--- a/modules/core/cs_set_successor.cpp
+++ b/modules/core/cs_set_successor.cpp
@@ -29,7 +29,7 @@ class CommandCSSetSuccessor : public Command
if (this->permission.empty() && ci->HasFlag(CI_SECUREFOUNDER) ? !IsFounder(u, ci) : !check_access(u, ci, CA_FOUNDER))
{
- source.Reply(ACCESS_DENIED);
+ source.Reply(LanguageString::ACCESS_DENIED);
return MOD_CONT;
}
@@ -41,17 +41,17 @@ class CommandCSSetSuccessor : public Command
if (!na)
{
- source.Reply(NICK_X_NOT_REGISTERED, params[1].c_str());
+ source.Reply(LanguageString::NICK_X_NOT_REGISTERED, params[1].c_str());
return MOD_CONT;
}
if (na->HasFlag(NS_FORBIDDEN))
{
- source.Reply(NICK_X_FORBIDDEN, na->nick.c_str());
+ source.Reply(LanguageString::NICK_X_FORBIDDEN, na->nick.c_str());
return MOD_CONT;
}
if (na->nc == ci->founder)
{
- source.Reply(CHAN_SUCCESSOR_IS_FOUNDER, na->nick.c_str(), ci->name.c_str());
+ source.Reply(_("%s cannot be the successor on channel %s because he is its founder."), na->nick.c_str(), ci->name.c_str());
return MOD_CONT;
}
nc = na->nc;
@@ -64,28 +64,36 @@ class CommandCSSetSuccessor : public Command
ci->successor = nc;
if (nc)
- source.Reply(CHAN_SUCCESSOR_CHANGED, ci->name.c_str(), nc->display.c_str());
+ source.Reply(_("Successor for %s changed to \002%s\002."), ci->name.c_str(), nc->display.c_str());
else
- source.Reply(CHAN_SUCCESSOR_UNSET, ci->name.c_str());
+ source.Reply(_("Successor for \002%s\002 unset."), ci->name.c_str());
return MOD_CONT;
}
bool OnHelp(CommandSource &source, const Anope::string &)
{
- source.Reply(CHAN_HELP_SET_SUCCESSOR, "SET");
+ source.Reply(_("Syntax: \002%s \037channel\037 SUCCESSOR \037nick\037\002\n"
+ " \n"
+ "Changes the successor of a channel. If the founder's\n"
+ "nickname expires or is dropped while the channel is still\n"
+ "registered, the successor will become the new founder of the\n"
+ "channel. However, if the successor already has too many\n"
+ "channels registered (%d), the channel will be dropped\n"
+ "instead, just as if no successor had been set. The new\n"
+ "nickname must be a registered one."), this->name.c_str());
return true;
}
void OnSyntaxError(CommandSource &source, const Anope::string &)
{
// XXX
- SyntaxError(source, "SET", CHAN_SET_SYNTAX);
+ SyntaxError(source, "SET", LanguageString::CHAN_SET_SYNTAX);
}
void OnServHelp(CommandSource &source)
{
- source.Reply(CHAN_HELP_CMD_SET_SUCCESSOR);
+ source.Reply(_(" SUCCESSOR Set the successor for a channel"));
}
};
@@ -96,16 +104,10 @@ class CommandCSSASetSuccessor : public CommandCSSetSuccessor
{
}
- bool OnHelp(CommandSource &source, const Anope::string &)
- {
- source.Reply(CHAN_HELP_SET_SUCCESSOR, "SASET");
- return true;
- }
-
void OnSyntaxError(CommandSource &source, const Anope::string &)
{
// XXX
- SyntaxError(source, "SASET", CHAN_SASET_SYNTAX);
+ SyntaxError(source, "SASET", LanguageString::CHAN_SASET_SYNTAX);
}
};
diff --git a/modules/core/cs_set_topiclock.cpp b/modules/core/cs_set_topiclock.cpp
index 4d62fd415..cb8faf724 100644
--- a/modules/core/cs_set_topiclock.cpp
+++ b/modules/core/cs_set_topiclock.cpp
@@ -29,12 +29,12 @@ class CommandCSSetTopicLock : public Command
if (params[1].equals_ci("ON"))
{
ci->SetFlag(CI_TOPICLOCK);
- source.Reply(CHAN_SET_TOPICLOCK_ON, ci->name.c_str());
+ source.Reply(_("Topic lock option for %s is now \002\002."), ci->name.c_str());
}
else if (params[1].equals_ci("OFF"))
{
ci->UnsetFlag(CI_TOPICLOCK);
- source.Reply(CHAN_SET_TOPICLOCK_OFF, ci->name.c_str());
+ source.Reply(_("Topic lock option for %s is now \002\002."), ci->name.c_str());
}
else
this->OnSyntaxError(source, "TOPICLOCK");
@@ -44,18 +44,23 @@ class CommandCSSetTopicLock : public Command
bool OnHelp(CommandSource &source, const Anope::string &)
{
- source.Reply(CHAN_HELP_SET_TOPICLOCK, "SET");
+ source.Reply(_("Syntax: \002SET \037%s\037 TOPICLOCK {ON | OFF}\002\n"
+ " \n"
+ "Enables or disables the \002topic lock\002 option for a channel.\n"
+ "When \002topic lock\002 is set, %S will not allow the\n"
+ "channel topic to be changed except via the \002TOPIC\002\n"
+ "command."), this->name.c_str());
return true;
}
void OnSyntaxError(CommandSource &source, const Anope::string &)
{
- SyntaxError(source, "SET", CHAN_SET_TOPICLOCK_SYNTAX);;
+ SyntaxError(source, "SET", _("SET \037channel\037 TOPICLOCK {ON | OFF}"));;
}
void OnServHelp(CommandSource &source)
{
- source.Reply(CHAN_HELP_CMD_SET_TOPICLOCK);
+ source.Reply(_(" TOPICLOCK Topic can only be changed with TOPIC"));
}
};
@@ -66,15 +71,9 @@ class CommandCSSASetTopicLock : public CommandCSSetTopicLock
{
}
- bool OnHelp(CommandSource &source, const Anope::string &)
- {
- source.Reply(CHAN_HELP_SET_TOPICLOCK, "SASET");
- return true;
- }
-
void OnSyntaxError(CommandSource &source, const Anope::string &)
{
- SyntaxError(source, "SASET", CHAN_SASET_TOPICLOCK_SYNTAX);
+ SyntaxError(source, "SASET", _("SASET \002channel\002 TOPICLOCK {ON | OFF}"));
}
};
diff --git a/modules/core/cs_set_xop.cpp b/modules/core/cs_set_xop.cpp
index 27375144e..4829b2e45 100644
--- a/modules/core/cs_set_xop.cpp
+++ b/modules/core/cs_set_xop.cpp
@@ -28,7 +28,7 @@ class CommandCSSetXOP : public Command
if (!FindModule("cs_xop"))
{
- source.Reply(CHAN_XOP_NOT_AVAILABLE, "XOP");
+ source.Reply(_("xOP system is not available."), "XOP");
return MOD_CONT;
}
@@ -67,14 +67,14 @@ class CommandCSSetXOP : public Command
}
Log(LOG_COMMAND, u, this, ci) << "to enable XOP";
- source.Reply(CHAN_SET_XOP_ON, ci->name.c_str());
+ source.Reply(_("xOP lists system for %s is now \002\002."), ci->name.c_str());
}
else if (params[1].equals_ci("OFF"))
{
ci->UnsetFlag(CI_XOP);
Log(LOG_COMMAND, u, this, ci) << "to disable XOP";
- source.Reply(CHAN_SET_XOP_OFF, ci->name.c_str());
+ source.Reply(_("xOP lists system for %s is now \002\002."), ci->name.c_str());
}
else
this->OnSyntaxError(source, "XOP");
@@ -84,18 +84,37 @@ class CommandCSSetXOP : public Command
bool OnHelp(CommandSource &source, const Anope::string &)
{
- source.Reply(CHAN_HELP_SET_XOP, "SET");
+ source.Reply(_("Syntax: \002%s \037channel\037 XOP {ON | OFF}\002\n"
+ " \n"
+ "Enables or disables the xOP lists system for a channel.\n"
+ "When \002XOP\002 is set, you have to use the \002AOP\002/\002SOP\002/\002VOP\002\n"
+ "commands in order to give channel privileges to\n"
+ "users, else you have to use the \002ACCESS\002 command.\n"
+ " \n"
+ "\002Technical Note\002: when you switch from access list to xOP \n"
+ "lists system, your level definitions and user levels will be\n"
+ "changed, so you won't find the same values if you\n"
+ "switch back to access system! \n"
+ " \n"
+ "You should also check that your users are in the good xOP \n"
+ "list after the switch from access to xOP lists, because the \n"
+ "guess is not always perfect... in fact, it is not recommended \n"
+ "to use the xOP lists if you changed level definitions with \n"
+ "the \002LEVELS\002 command.\n"
+ " \n"
+ "Switching from xOP lists system to access list system\n"
+ "causes no problem though."), this->name.c_str());
return true;
}
void OnSyntaxError(CommandSource &source, const Anope::string &)
{
- SyntaxError(source, "SET XOP", CHAN_SET_XOP_SYNTAX);
+ SyntaxError(source, "SET XOP", _("SET \037channel\037 XOP {ON | OFF}"));
}
void OnServHelp(CommandSource &source)
{
- source.Reply(CHAN_HELP_CMD_SET_XOP);
+ source.Reply(_(" XOP Toggle the user privilege system"));
}
};
@@ -106,15 +125,9 @@ class CommandCSSASetXOP : public CommandCSSetXOP
{
}
- bool OnHelp(CommandSource &source, const Anope::string &)
- {
- source.Reply(CHAN_HELP_SET_XOP, "SASET");
- return true;
- }
-
void OnSyntaxError(CommandSource &source, const Anope::string &)
{
- SyntaxError(source, "SASET XOP", CHAN_SASET_XOP_SYNTAX);
+ SyntaxError(source, "SASET XOP", _("SASET \002channel\002 XOP {ON | OFF}"));
}
};
diff --git a/modules/core/cs_status.cpp b/modules/core/cs_status.cpp
index 37a568da2..d1c469022 100644
--- a/modules/core/cs_status.cpp
+++ b/modules/core/cs_status.cpp
@@ -28,26 +28,35 @@ class CommandCSStatus : public Command
User *u2 = finduser(nick);
ChanAccess *u2_access = ci->GetAccess(u2);
if (u2)
- source.Reply(CHAN_STATUS_INFO, ci->name.c_str(), u2->nick.c_str(), u2_access ? u2_access->level : 0);
+ source.Reply(_("STATUS %s %s %d"), ci->name.c_str(), u2->nick.c_str(), u2_access ? u2_access->level : 0);
else /* !u2 */
- source.Reply(CHAN_STATUS_NOTONLINE, nick.c_str());
+ source.Reply(_("STATUS ERROR Nick %s not online"), nick.c_str());
return MOD_CONT;
}
bool OnHelp(CommandSource &source, const Anope::string &subcommand)
{
- source.Reply(CHAN_SERVADMIN_HELP_STATUS);
+ source.Reply(_("Syntax: \002STATUS \037channel\037 \037nickname\037\002\n"
+ " \n"
+ "Returns the current access level of the given nick on the\n"
+ "given channel. The reply is of the form:\n"
+ " \n"
+ " STATUS \037channel\037 \037nickname\037 \037access-level\037\n"
+ " \n"
+ "If an error occurs, the reply will be in the form:\n"
+ " \n"
+ " STATUS ERROR \037error-message\037"));
return true;
}
void OnSyntaxError(CommandSource &source, const Anope::string &subcommand)
{
- SyntaxError(source, "STATUS", CHAN_STATUS_SYNTAX);
+ SyntaxError(source, "STATUS", _("STATUS \037channel\037 \037item\037"));
}
void OnServHelp(CommandSource &source)
{
- source.Reply(CHAN_HELP_CMD_STATUS);
+ source.Reply(_(" STATUS Returns the current access level of a user on a channel"));
}
};
diff --git a/modules/core/cs_suspend.cpp b/modules/core/cs_suspend.cpp
index 0b4fe7b5c..9b4a06272 100644
--- a/modules/core/cs_suspend.cpp
+++ b/modules/core/cs_suspend.cpp
@@ -38,12 +38,12 @@ class CommandCSSuspend : public Command
/* You should not SUSPEND a FORBIDEN channel */
if (ci->HasFlag(CI_FORBIDDEN))
{
- source.Reply(CHAN_MAY_NOT_BE_REGISTERED, ci->name.c_str());
+ source.Reply(_("Channel \002%s\002 may not be registered."), ci->name.c_str());
return MOD_CONT;
}
if (readonly)
- source.Reply(READ_ONLY_MODE);
+ source.Reply(LanguageString::READ_ONLY_MODE);
ci->SetFlag(CI_SUSPENDED);
ci->forbidby = u->nick;
@@ -59,7 +59,7 @@ class CommandCSSuspend : public Command
if (uc->user->HasMode(UMODE_OPER))
continue;
- c->Kick(NULL, uc->user, "%s", !reason.empty() ? reason.c_str() : GetString(uc->user->Account(), CHAN_SUSPEND_REASON).c_str());
+ c->Kick(NULL, uc->user, "%s", !reason.empty() ? reason.c_str() : GetString(uc->user->Account(), _("This channel has been suspended.")).c_str());
}
}
@@ -67,7 +67,7 @@ class CommandCSSuspend : public Command
ircdproto->SendGlobops(ChanServ, "\2%s\2 used SUSPEND on channel \2%s\2", u->nick.c_str(), ci->name.c_str());
Log(LOG_ADMIN, u, this, ci) << (!reason.empty() ? reason : "No reason");
- source.Reply(CHAN_SUSPEND_SUCCEEDED, ci->name.c_str());
+ source.Reply(_("Channel \002%s\002 is now suspended."), ci->name.c_str());
FOREACH_MOD(I_OnChanSuspend, OnChanSuspend(ci));
@@ -76,18 +76,26 @@ class CommandCSSuspend : public Command
bool OnHelp(CommandSource &source, const Anope::string &subcommand)
{
- source.Reply(CHAN_SERVADMIN_HELP_SUSPEND);
+ source.Reply(_("Syntax: \002SUSPEND \037channel\037 [\037reason\037]\002\n"
+ " \n"
+ "Disallows anyone from registering or using the given\n"
+ "channel. May be cancelled by using the UNSUSPEND\n"
+ "command to preserve all previous channel data/settings.\n"
+ " \n"
+ "Reason may be required on certain networks."));
return true;
}
void OnSyntaxError(CommandSource &source, const Anope::string &subcommand)
{
- SyntaxError(source, "SUSPEND", Config->ForceForbidReason ? CHAN_SUSPEND_SYNTAX_REASON : CHAN_SUSPEND_SYNTAX);
+ SyntaxError(source, "SUSPEND", Config->ForceForbidReason ? _("SUSPEND \037channel\037 \037reason\037") : _("SUSPEND \037channel\037 \037freason\037"));
}
void OnServHelp(CommandSource &source)
{
- source.Reply(CHAN_HELP_CMD_SUSPEND);
+ source.Reply(_(" SUSPEND Prevent a channel from being used preserving\n"
+ " channel data and settings"));
+
}
};
@@ -105,12 +113,12 @@ class CommandCSUnSuspend : public Command
ChannelInfo *ci = source.ci;
if (readonly)
- source.Reply(READ_ONLY_MODE);
+ source.Reply(LanguageString::READ_ONLY_MODE);
/* Only UNSUSPEND already suspended channels */
if (!ci->HasFlag(CI_SUSPENDED))
{
- source.Reply(CHAN_UNSUSPEND_FAILED, ci->name.c_str());
+ source.Reply(_("Couldn't release channel \002%s\002!"), ci->name.c_str());
return MOD_CONT;
}
@@ -123,7 +131,7 @@ class CommandCSUnSuspend : public Command
if (Config->WallForbid)
ircdproto->SendGlobops(ChanServ, "\2%s\2 used UNSUSPEND on channel \2%s\2", u->nick.c_str(), ci->name.c_str());
- source.Reply(CHAN_UNSUSPEND_SUCCEEDED, ci->name.c_str());
+ source.Reply(_("Channel \002%s\002 is now released."), ci->name.c_str());
FOREACH_MOD(I_OnChanUnsuspend, OnChanUnsuspend(ci));
@@ -132,18 +140,21 @@ class CommandCSUnSuspend : public Command
bool OnHelp(CommandSource &source, const Anope::string &subcommand)
{
- source.Reply(CHAN_SERVADMIN_HELP_UNSUSPEND);
+ source.Reply(_("Syntax: \002UNSUSPEND \037channel\037\002\n"
+ " \n"
+ "Releases a suspended channel. All data and settings\n"
+ "are preserved from before the suspension."));
return true;
}
void OnSyntaxError(CommandSource &source, const Anope::string &subcommand)
{
- SyntaxError(source, "UNSUSPEND", CHAN_UNSUSPEND_SYNTAX);
+ SyntaxError(source, "UNSUSPEND", _("UNSUSPEND \037channel\037"));
}
void OnServHelp(CommandSource &source)
{
- source.Reply(CHAN_HELP_CMD_UNSUSPEND);
+ source.Reply(_(" UNSUSPEND Releases a suspended channel"));
}
};
diff --git a/modules/core/cs_topic.cpp b/modules/core/cs_topic.cpp
index 46ca69739..20005b07b 100644
--- a/modules/core/cs_topic.cpp
+++ b/modules/core/cs_topic.cpp
@@ -29,9 +29,9 @@ class CommandCSTopic : public Command
Channel *c = ci->c;
if (!c)
- source.Reply(CHAN_X_NOT_IN_USE, ci->name.c_str());
+ source.Reply(LanguageString::CHAN_X_NOT_IN_USE, ci->name.c_str());
else if (!check_access(u, ci, CA_TOPIC) && !u->Account()->HasCommand("chanserv/topic"))
- source.Reply(ACCESS_DENIED);
+ source.Reply(LanguageString::ACCESS_DENIED);
else
{
bool has_topiclock = ci->HasFlag(CI_TOPICLOCK);
@@ -48,18 +48,27 @@ class CommandCSTopic : public Command
bool OnHelp(CommandSource &source, const Anope::string &subcommand)
{
- source.Reply(CHAN_HELP_TOPIC);
+ source.Reply(_("Syntax: \002TOPIC \037channel\037 [\037topic\037]\002\n"
+ " \n"
+ "Causes %S to set the channel topic to the one\n"
+ "specified. If \002topic\002 is not given, then an empty topic\n"
+ "is set. This command is most useful in conjunction\n"
+ "with \002SET TOPICLOCK\002. See \002%R%S HELP SET TOPICLOCK\002\n"
+ "for more information.\n"
+ " \n"
+ "By default, limited to those with founder access on the\n"
+ "channel."));
return true;
}
void OnSyntaxError(CommandSource &source, const Anope::string &subcommand)
{
- SyntaxError(source, "TOPIC", CHAN_TOPIC_SYNTAX);
+ SyntaxError(source, "TOPIC", _("TOPIC \037channel\037 [\037topic\037]"));
}
void OnServHelp(CommandSource &source)
{
- source.Reply(CHAN_HELP_CMD_TOPIC);
+ source.Reply(_(" TOPIC Manipulate the topic of the specified channel"));
}
};
diff --git a/modules/core/cs_unban.cpp b/modules/core/cs_unban.cpp
index 2beb94534..f4156e02a 100644
--- a/modules/core/cs_unban.cpp
+++ b/modules/core/cs_unban.cpp
@@ -28,13 +28,13 @@ class CommandCSUnban : public Command
if (!c)
{
- source.Reply(CHAN_X_NOT_IN_USE, ci->name.c_str());
+ source.Reply(LanguageString::CHAN_X_NOT_IN_USE, ci->name.c_str());
return MOD_CONT;
}
if (!check_access(u, ci, CA_UNBAN))
{
- source.Reply(ACCESS_DENIED);
+ source.Reply(LanguageString::ACCESS_DENIED);
return MOD_CONT;
}
@@ -44,33 +44,39 @@ class CommandCSUnban : public Command
if (!u2)
{
- source.Reply(NICK_X_NOT_IN_USE, params[1].c_str());
+ source.Reply(LanguageString::NICK_X_NOT_IN_USE, params[1].c_str());
return MOD_CONT;
}
common_unban(ci, u2, u == u2);
if (u2 == u)
- source.Reply(CHAN_UNBANNED, c->name.c_str());
+ source.Reply(_("You have been unbanned from \002%s\002."), c->name.c_str());
else
- source.Reply(CHAN_UNBANNED_OTHER, u2->nick.c_str(), c->name.c_str());
+ source.Reply(_("\002%s\002 has been unbanned from \002%s\002."), u2->nick.c_str(), c->name.c_str());
return MOD_CONT;
}
bool OnHelp(CommandSource &source, const Anope::string &subcommand)
{
- source.Reply(CHAN_HELP_UNBAN);
+ source.Reply(_("Syntax: \002UNBAN \037channel\037 [\037nick\037]\002\n"
+ " \n"
+ "Tells %S to remove all bans preventing you or the given\n"
+ "user from entering the given channel. \n"
+ " \n"
+ "By default, limited to AOPs or those with level 5 and above\n"
+ "on the channel."));
return true;
}
void OnSyntaxError(CommandSource &source, const Anope::string &subcommand)
{
- SyntaxError(source, "UNBAN", CHAN_UNBAN_SYNTAX);
+ SyntaxError(source, "UNBAN", _("UNBAN \037channel\037 [\037nick\037]"));
}
void OnServHelp(CommandSource &source)
{
- source.Reply(CHAN_HELP_CMD_UNBAN);
+ source.Reply(_(" UNBAN Remove all bans preventing a user from entering a channel"));
}
};
diff --git a/modules/core/cs_xop.cpp b/modules/core/cs_xop.cpp
index cd4f675ab..9a0e6e16d 100644
--- a/modules/core/cs_xop.cpp
+++ b/modules/core/cs_xop.cpp
@@ -23,94 +23,14 @@ enum
XOP_TYPES
};
-enum
-{
- XOP_DISABLED,
- XOP_ADDED,
- XOP_MOVED,
- XOP_NO_SUCH_ENTRY,
- XOP_NOT_FOUND,
- XOP_NO_MATCH,
- XOP_DELETED,
- XOP_DELETED_ONE,
- XOP_DELETED_SEVERAL,
- XOP_LIST_EMPTY,
- XOP_LIST_HEADER,
- XOP_CLEAR,
- XOP_MESSAGES
-};
-
-LanguageString xop_msgs[XOP_TYPES][XOP_MESSAGES] = {
- {CHAN_AOP_DISABLED,
- CHAN_AOP_ADDED,
- CHAN_AOP_MOVED,
- CHAN_AOP_NO_SUCH_ENTRY,
- CHAN_AOP_NOT_FOUND,
- CHAN_AOP_NO_MATCH,
- CHAN_AOP_DELETED,
- CHAN_AOP_DELETED_ONE,
- CHAN_AOP_DELETED_SEVERAL,
- CHAN_AOP_LIST_EMPTY,
- CHAN_AOP_LIST_HEADER,
- CHAN_AOP_CLEAR},
- {CHAN_SOP_DISABLED,
- CHAN_SOP_ADDED,
- CHAN_SOP_MOVED,
- CHAN_SOP_NO_SUCH_ENTRY,
- CHAN_SOP_NOT_FOUND,
- CHAN_SOP_NO_MATCH,
- CHAN_SOP_DELETED,
- CHAN_SOP_DELETED_ONE,
- CHAN_SOP_DELETED_SEVERAL,
- CHAN_SOP_LIST_EMPTY,
- CHAN_SOP_LIST_HEADER,
- CHAN_SOP_CLEAR},
- {CHAN_VOP_DISABLED,
- CHAN_VOP_ADDED,
- CHAN_VOP_MOVED,
- CHAN_VOP_NO_SUCH_ENTRY,
- CHAN_VOP_NOT_FOUND,
- CHAN_VOP_NO_MATCH,
- CHAN_VOP_DELETED,
- CHAN_VOP_DELETED_ONE,
- CHAN_VOP_DELETED_SEVERAL,
- CHAN_VOP_LIST_EMPTY,
- CHAN_VOP_LIST_HEADER,
- CHAN_VOP_CLEAR},
- {CHAN_HOP_DISABLED,
- CHAN_HOP_ADDED,
- CHAN_HOP_MOVED,
- CHAN_HOP_NO_SUCH_ENTRY,
- CHAN_HOP_NOT_FOUND,
- CHAN_HOP_NO_MATCH,
- CHAN_HOP_DELETED,
- CHAN_HOP_DELETED_ONE,
- CHAN_HOP_DELETED_SEVERAL,
- CHAN_HOP_LIST_EMPTY,
- CHAN_HOP_LIST_HEADER,
- CHAN_HOP_CLEAR},
- {CHAN_QOP_DISABLED,
- CHAN_QOP_ADDED,
- CHAN_QOP_MOVED,
- CHAN_QOP_NO_SUCH_ENTRY,
- CHAN_QOP_NOT_FOUND,
- CHAN_QOP_NO_MATCH,
- CHAN_QOP_DELETED,
- CHAN_QOP_DELETED_ONE,
- CHAN_QOP_DELETED_SEVERAL,
- CHAN_QOP_LIST_EMPTY,
- CHAN_QOP_LIST_HEADER,
- CHAN_QOP_CLEAR}
-};
-
class XOPListCallback : public NumberList
{
CommandSource &source;
int level;
- LanguageString *messages;
+ Command *c;
bool SentHeader;
public:
- XOPListCallback(CommandSource &_source, const Anope::string &numlist, int _level, LanguageString *_messages) : NumberList(numlist, false), source(_source), level(_level), messages(_messages), SentHeader(false)
+ XOPListCallback(CommandSource &_source, const Anope::string &numlist, int _level, Command *_c) : NumberList(numlist, false), source(_source), level(_level), c(_c), SentHeader(false)
{
}
@@ -127,15 +47,15 @@ class XOPListCallback : public NumberList
if (!SentHeader)
{
SentHeader = true;
- source.Reply(messages[XOP_LIST_HEADER], source.ci->name.c_str());
+ source.Reply(_("%s list for %s:\n Num Nick"), this->c->name.c_str(), source.ci->name.c_str());
}
- DoList(source, access, Number - 1, level, messages);
+ DoList(source, access, Number - 1, level);
}
- static void DoList(CommandSource &source, ChanAccess *access, unsigned index, int level, LanguageString *messages)
+ static void DoList(CommandSource &source, ChanAccess *access, unsigned index, int level)
{
- source.Reply(CHAN_XOP_LIST_FORMAT, index, access->mask.c_str());
+ source.Reply(_(" %3d %s"), index, access->mask.c_str());
}
};
@@ -143,27 +63,26 @@ class XOPDelCallback : public NumberList
{
CommandSource &source;
Command *c;
- LanguageString *messages;
unsigned Deleted;
Anope::string Nicks;
bool override;
public:
- XOPDelCallback(CommandSource &_source, Command *_c, LanguageString *_messages, bool _override, const Anope::string &numlist) : NumberList(numlist, true), source(_source), c(_c), messages(_messages), Deleted(0), override(_override)
+ XOPDelCallback(CommandSource &_source, Command *_c, bool _override, const Anope::string &numlist) : NumberList(numlist, true), source(_source), c(_c), Deleted(0), override(_override)
{
}
~XOPDelCallback()
{
if (!Deleted)
- source.Reply(messages[XOP_NO_MATCH], source.ci->name.c_str());
+ source.Reply(_("No matching entries on %s %s list."), source.ci->name.c_str(), this->c->name.c_str());
else
{
Log(override ? LOG_OVERRIDE : LOG_COMMAND, source.u, c, source.ci) << "deleted access of users " << Nicks;
if (Deleted == 1)
- source.Reply(messages[XOP_DELETED_ONE], source.ci->name.c_str());
+ source.Reply(_("Deleted one entry from %s %s list."), source.ci->name.c_str(), this->c->name.c_str());
else
- source.Reply(messages[XOP_DELETED_SEVERAL], Deleted, source.ci->name.c_str());
+ source.Reply(_("Deleted %d entries from %s %s list."), Deleted, source.ci->name.c_str(), this->c->name.c_str());
}
}
@@ -189,7 +108,7 @@ class XOPDelCallback : public NumberList
class XOPBase : public Command
{
private:
- CommandReturn DoAdd(CommandSource &source, const std::vector<Anope::string> &params, int level, LanguageString *messages)
+ CommandReturn DoAdd(CommandSource &source, const std::vector<Anope::string> &params, int level)
{
User *u = source.u;
ChannelInfo *ci = source.ci;
@@ -205,7 +124,7 @@ class XOPBase : public Command
if (readonly)
{
- source.Reply(messages[XOP_DISABLED]);
+ source.Reply(_("Sorry, channel %s list modification is temporarily disabled."), this->name.c_str());
return MOD_CONT;
}
@@ -214,7 +133,7 @@ class XOPBase : public Command
if ((level >= ulev || ulev < ACCESS_AOP) && !u->Account()->HasPriv("chanserv/access/modify"))
{
- source.Reply(ACCESS_DENIED);
+ source.Reply(LanguageString::ACCESS_DENIED);
return MOD_CONT;
}
@@ -223,7 +142,7 @@ class XOPBase : public Command
mask += "!*@*";
else if (na && na->HasFlag(NS_FORBIDDEN))
{
- source.Reply(NICK_X_FORBIDDEN, na->nick.c_str());
+ source.Reply(LanguageString::NICK_X_FORBIDDEN, na->nick.c_str());
return MOD_CONT;
}
@@ -235,7 +154,7 @@ class XOPBase : public Command
**/
if (access->level >= ulev && !u->Account()->HasPriv("chanserv/access/modify"))
{
- source.Reply(ACCESS_DENIED);
+ source.Reply(LanguageString::ACCESS_DENIED);
return MOD_CONT;
}
++change;
@@ -243,7 +162,7 @@ class XOPBase : public Command
if (!change && ci->GetAccessCount() >= Config->CSAccessMax)
{
- source.Reply(CHAN_XOP_REACHED_LIMIT, Config->CSAccessMax);
+ source.Reply(_("Sorry, you can only have %d %s entries on a channel."), Config->CSAccessMax, this->name.c_str());
return MOD_CONT;
}
@@ -262,18 +181,18 @@ class XOPBase : public Command
if (!change)
{
FOREACH_MOD(I_OnAccessAdd, OnAccessAdd(ci, u, access));
- source.Reply(messages[XOP_ADDED], access->mask.c_str(), ci->name.c_str());
+ source.Reply(("\002%s\002 added to %s %s list."), access->mask.c_str(), ci->name.c_str(), this->name.c_str());
}
else
{
FOREACH_MOD(I_OnAccessChange, OnAccessChange(ci, u, access));
- source.Reply(messages[XOP_MOVED], access->mask.c_str(), ci->name.c_str());
+ source.Reply(_("\002%s\002 moved to %s %s list."), access->mask.c_str(), ci->name.c_str(), this->name.c_str());
}
return MOD_CONT;
}
- CommandReturn DoDel(CommandSource &source, const std::vector<Anope::string> &params, int level, LanguageString *messages)
+ CommandReturn DoDel(CommandSource &source, const std::vector<Anope::string> &params, int level)
{
User *u = source.u;
ChannelInfo *ci = source.ci;
@@ -288,13 +207,13 @@ class XOPBase : public Command
if (readonly)
{
- source.Reply(messages[XOP_DISABLED]);
+ source.Reply(_("Sorry, channel %s list modification is temporarily disabled."), this->name.c_str());
return MOD_CONT;
}
if (!ci->GetAccessCount())
{
- source.Reply(messages[XOP_LIST_EMPTY], ci->name.c_str());
+ source.Reply(_("%s %s list is empty."), ci->name.c_str(), this->name.c_str());
return MOD_CONT;
}
@@ -303,7 +222,7 @@ class XOPBase : public Command
if ((!access || access->nc != u->Account()) && (level >= ulev || ulev < ACCESS_AOP) && !u->Account()->HasPriv("chanserv/access/modify"))
{
- source.Reply(ACCESS_DENIED);
+ source.Reply(LanguageString::ACCESS_DENIED);
return MOD_CONT;
}
@@ -313,24 +232,24 @@ class XOPBase : public Command
if (isdigit(mask[0]) && mask.find_first_not_of("1234567890,-") == Anope::string::npos)
{
bool override = level >= ulev || ulev < ACCESS_AOP;
- XOPDelCallback list(source, this, messages, override, mask);
+ XOPDelCallback list(source, this, override, mask);
list.Process();
}
else if (!access || access->level != level)
{
- source.Reply(messages[XOP_NOT_FOUND], mask.c_str(), ci->name.c_str());
+ source.Reply(_("\002%s\002 not found on %s %s list."), mask.c_str(), ci->name.c_str(), this->name.c_str());
return MOD_CONT;
}
else
{
if (access->nc != u->Account() && ulev <= access->level && !u->Account()->HasPriv("chanserv/access/modify"))
- source.Reply(ACCESS_DENIED);
+ source.Reply(LanguageString::ACCESS_DENIED);
else
{
bool override = ulev <= access->level;
Log(override ? LOG_OVERRIDE : LOG_COMMAND, u, this, ci) << "DEL " << access->mask;
- source.Reply(messages[XOP_DELETED], access->mask.c_str(), ci->name.c_str());
+ source.Reply(_("\002%s\002 deleted from %s %s list."), access->mask.c_str(), ci->name.c_str(), this->name.c_str());
FOREACH_MOD(I_OnAccessDel, OnAccessDel(ci, u, access));
@@ -341,7 +260,7 @@ class XOPBase : public Command
return MOD_CONT;
}
- CommandReturn DoList(CommandSource &source, const std::vector<Anope::string> &params, int level, LanguageString *messages)
+ CommandReturn DoList(CommandSource &source, const std::vector<Anope::string> &params, int level)
{
User *u = source.u;
ChannelInfo *ci = source.ci;
@@ -353,7 +272,7 @@ class XOPBase : public Command
if (!ulev && !u->Account()->HasCommand("chanserv/access/list"))
{
- source.Reply(ACCESS_DENIED);
+ source.Reply(LanguageString::ACCESS_DENIED);
return MOD_CONT;
}
@@ -362,13 +281,13 @@ class XOPBase : public Command
if (!ci->GetAccessCount())
{
- source.Reply(messages[XOP_LIST_EMPTY], ci->name.c_str());
+ source.Reply(_("%s %s list is empty."), ci->name.c_str(), this->name.c_str());
return MOD_CONT;
}
if (!nick.empty() && nick.find_first_not_of("1234567890,-") == Anope::string::npos)
{
- XOPListCallback list(source, nick, level, messages);
+ XOPListCallback list(source, nick, level, this);
list.Process();
}
else
@@ -387,39 +306,39 @@ class XOPBase : public Command
if (!SentHeader)
{
SentHeader = true;
- source.Reply(messages[XOP_LIST_HEADER], ci->name.c_str());
+ source.Reply(_("%s list for %s:\n Num Nick"), ci->name.c_str());
}
- XOPListCallback::DoList(source, access, i + 1, level, messages);
+ XOPListCallback::DoList(source, access, i + 1, level);
}
if (!SentHeader)
- source.Reply(messages[XOP_NO_MATCH], ci->name.c_str());
+ source.Reply(_("No matching entries on %s %s list."), ci->name.c_str(), this->name.c_str());
}
return MOD_CONT;
}
- CommandReturn DoClear(CommandSource &source, int level, LanguageString *messages)
+ CommandReturn DoClear(CommandSource &source, int level)
{
User *u = source.u;
ChannelInfo *ci = source.ci;
if (readonly)
{
- source.Reply(messages[XOP_DISABLED]);
+ source.Reply(_("Sorry, channel %s list modification is temporarily disabled."), this->name.c_str());
return MOD_CONT;
}
if (!ci->GetAccessCount())
{
- source.Reply(messages[XOP_LIST_EMPTY], ci->name.c_str());
+ source.Reply(_("%s %s list is empty."), ci->name.c_str(), this->name.c_str());
return MOD_CONT;
}
if (!check_access(u, ci, CA_FOUNDER) && !u->Account()->HasPriv("chanserv/access/modify"))
{
- source.Reply(ACCESS_DENIED);
+ source.Reply(LanguageString::ACCESS_DENIED);
return MOD_CONT;
}
@@ -435,27 +354,29 @@ class XOPBase : public Command
FOREACH_MOD(I_OnAccessClear, OnAccessClear(ci, u));
- source.Reply(messages[XOP_CLEAR], ci->name.c_str());
+ source.Reply(_("Channel %s %s list has been cleared."), ci->name.c_str(), this->name.c_str());
return MOD_CONT;
}
+
protected:
- CommandReturn DoXop(CommandSource &source, const std::vector<Anope::string> &params, int level, LanguageString *messages)
+ CommandReturn DoXop(CommandSource &source, const std::vector<Anope::string> &params, int level)
{
ChannelInfo *ci = source.ci;
const Anope::string &cmd = params[1];
if (!ci->HasFlag(CI_XOP))
- source.Reply(CHAN_XOP_ACCESS, Config->s_ChanServ.c_str());
+ source.Reply(_("You can't use this command. Use the ACCESS command instead.\n"
+ "Type \002%R%s HELP ACCESS\002 for more information."), Config->s_ChanServ.c_str());
else if (cmd.equals_ci("ADD"))
- return this->DoAdd(source, params, level, messages);
+ return this->DoAdd(source, params, level);
else if (cmd.equals_ci("DEL"))
- return this->DoDel(source, params, level, messages);
+ return this->DoDel(source, params, level);
else if (cmd.equals_ci("LIST"))
- return this->DoList(source, params, level, messages);
+ return this->DoList(source, params, level);
else if (cmd.equals_ci("CLEAR"))
- return this->DoClear(source, level, messages);
+ return this->DoClear(source, level);
else
this->OnSyntaxError(source, "");
@@ -488,23 +409,58 @@ class CommandCSQOP : public XOPBase
CommandReturn Execute(CommandSource &source, const std::vector<Anope::string> &params)
{
- return this->DoXop(source, params, ACCESS_QOP, xop_msgs[XOP_QOP]);
+ return this->DoXop(source, params, ACCESS_QOP);
}
bool OnHelp(CommandSource &source, const Anope::string &subcommand)
{
- source.Reply(CHAN_HELP_QOP);
+ source.Reply(_("Syntax: \002QOP \037channel\037 ADD \037mask\037\002\n"
+ " \002QOP \037channel\037 DEL {\037mask\037 | \037entry-num\037 | \037list\037}\002\n"
+ " \002QOP \037channel\037 LIST [\037mask\037 | \037list\037]\002\n"
+ " \002QOP \037channel\037 CLEAR\002\n"
+ " \n"
+ "Maintains the \002QOP\002 (AutoOwner) \002list\002 for a channel. The QOP \n"
+ "list gives users the right to be auto-owner on your channel,\n"
+ "which gives them almost (or potentially, total) access.\n"
+ " \n"
+ "The \002QOP ADD\002 command adds the given nickname to the\n"
+ "QOP list.\n"
+ " \n"
+ "The \002QOP DEL\002 command removes the given nick from the\n"
+ "QOP list. If a list of entry numbers is given, those\n"
+ "entries are deleted. (See the example for LIST below.)\n"
+ " \n"
+ "The \002QOP LIST\002 command displays the QOP list. If\n"
+ "a wildcard mask is given, only those entries matching the\n"
+ "mask are displayed. If a list of entry numbers is given,\n"
+ "only those entries are shown; for example:\n"
+ " \002QOP #channel LIST 2-5,7-9\002\n"
+ " Lists QOP entries numbered 2 through 5 and\n"
+ " 7 through 9.\n"
+ " \n"
+ "The \002QOP CLEAR\002 command clears all entries of the\n"
+ "QOP list.\n"
+ " \n"
+ "The \002QOP\002 commands are limited to\n"
+ "founders (unless SECUREOPS is off). However, any user on the\n"
+ "QOP list may use the \002QOP LIST\002 command.\n"
+ " \n"
+ "This command may have been disabled for your channel, and\n"
+ "in that case you need to use the access list. See \n"
+ "\002%R%S HELP ACCESS\002 for information about the access list,\n"
+ "and \002%R%S HELP SET XOP\002 to know how to toggle between \n"
+ "the access list and xOP list systems."));
return true;
}
void OnSyntaxError(CommandSource &source, const Anope::string &subcommand)
{
- SyntaxError(source, "QOP", CHAN_QOP_SYNTAX);
+ SyntaxError(source, "QOP", _("QOP \037channel\037 {ADD|DEL|LIST|CLEAR} [\037nick\037 | \037entry-list\037]"));
}
void OnServHelp(CommandSource &source)
{
- source.Reply(CHAN_HELP_CMD_QOP);
+ source.Reply(_(" QOP Modify the list of QOP users"));
}
};
@@ -517,23 +473,61 @@ class CommandCSAOP : public XOPBase
CommandReturn Execute(CommandSource &source, const std::vector<Anope::string> &params)
{
- return this->DoXop(source, params, ACCESS_AOP, xop_msgs[XOP_AOP]);
+ return this->DoXop(source, params, ACCESS_AOP);
}
bool OnHelp(CommandSource &source, const Anope::string &subcommand)
{
- source.Reply(CHAN_HELP_AOP);
+ source.Reply(_("Syntax: \002AOP \037channel\037 ADD \037mask\037\002\n"
+ " \002AOP \037channel\037 DEL {\037mask\037 | \037entry-num\037 | \037list\037}\002\n"
+ " \002AOP \037channel\037 LIST [\037mask\037 | \037list\037]\002\n"
+ " \002AOP \037channel\037 CLEAR\002\n"
+ " \n"
+ "Maintains the \002AOP\002 (AutoOP) \002list\002 for a channel. The AOP \n"
+ "list gives users the right to be auto-opped on your channel,\n"
+ "to unban or invite themselves if needed, to have their\n"
+ "greet message showed on join, and so on.\n"
+ " \n"
+ "The \002AOP ADD\002 command adds the given nickname to the\n"
+ "AOP list.\n"
+ " \n"
+ "The \002AOP DEL\002 command removes the given nick from the\n"
+ "AOP list. If a list of entry numbers is given, those\n"
+ "entries are deleted. (See the example for LIST below.)\n"
+ " \n"
+ "The \002AOP LIST\002 command displays the AOP list. If\n"
+ "a wildcard mask is given, only those entries matching the\n"
+ "mask are displayed. If a list of entry numbers is given,\n"
+ "only those entries are shown; for example:\n"
+ " \002AOP #channel LIST 2-5,7-9\002\n"
+ " Lists AOP entries numbered 2 through 5 and\n"
+ " 7 through 9.\n"
+ " \n"
+ "The \002AOP CLEAR\002 command clears all entries of the\n"
+ "AOP list.\n"
+ " \n"
+ "The \002AOP ADD\002 and \002AOP DEL\002 commands are limited to\n"
+ "SOPs or above, while the \002AOP CLEAR\002 command can only\n"
+ "be used by the channel founder. However, any user on the\n"
+ "AOP list may use the \002AOP LIST\002 command.\n"
+ " \n"
+ "This command may have been disabled for your channel, and\n"
+ "in that case you need to use the access list. See \n"
+ "\002%R%S HELP ACCESS\002 for information about the access list,\n"
+ "and \002%R%S HELP SET XOP\002 to know how to toggle between \n"
+ "the access list and xOP list systems."));
+ /* CHAN_HELP_HOP */
return true;
}
void OnSyntaxError(CommandSource &source, const Anope::string &subcommand)
{
- SyntaxError(source, "AOP", CHAN_AOP_SYNTAX);
+ SyntaxError(source, "AOP", _("AOP \037channel\037 {ADD|DEL|LIST|CLEAR} [\037nick\037 | \037entry-list\037]"));
}
void OnServHelp(CommandSource &source)
{
- source.Reply(CHAN_HELP_CMD_AOP);
+ source.Reply(_(" AOP Modify the list of AOP users"));
}
};
@@ -546,23 +540,58 @@ class CommandCSHOP : public XOPBase
CommandReturn Execute(CommandSource &source, const std::vector<Anope::string> &params)
{
- return this->DoXop(source, params, ACCESS_HOP, xop_msgs[XOP_HOP]);
+ return this->DoXop(source, params, ACCESS_HOP);
}
bool OnHelp(CommandSource &source, const Anope::string &subcommand)
{
- source.Reply(CHAN_HELP_HOP);
+ source.Reply(_("Syntax: \002HOP \037channel\037 ADD \037mask\037\002\n"
+ " \002HOP \037channel\037 DEL {\037mask\037 | \037entry-num\037 | \037list\037}\002\n"
+ " \002HOP \037channel\037 LIST [\037mask\037 | \037list\037]\002\n"
+ " \002HOP \037channel\037 CLEAR\002\n"
+ " \n"
+ "Maintains the \002HOP\002 (HalfOP) \002list\002 for a channel. The HOP \n"
+ "list gives users the right to be auto-halfopped on your \n"
+ "channel.\n"
+ " \n"
+ "The \002HOP ADD\002 command adds the given nickname to the\n"
+ "HOP list.\n"
+ " \n"
+ "The \002HOP DEL\002 command removes the given nick from the\n"
+ "HOP list. If a list of entry numbers is given, those\n"
+ "entries are deleted. (See the example for LIST below.)\n"
+ " \n"
+ "The \002HOP LIST\002 command displays the HOP list. If\n"
+ "a wildcard mask is given, only those entries matching the\n"
+ "mask are displayed. If a list of entry numbers is given,\n"
+ "only those entries are shown; for example:\n"
+ " \002HOP #channel LIST 2-5,7-9\002\n"
+ " Lists HOP entries numbered 2 through 5 and\n"
+ " 7 through 9.\n"
+ " \n"
+ "The \002HOP CLEAR\002 command clears all entries of the\n"
+ "HOP list.\n"
+ " \n"
+ "The \002HOP ADD\002, \002HOP DEL\002 and \002HOP LIST\002 commands are \n"
+ "limited to AOPs or above, while the \002HOP CLEAR\002 command \n"
+ "can only be used by the channel founder.\n"
+ " \n"
+ "This command may have been disabled for your channel, and\n"
+ "in that case you need to use the access list. See \n"
+ "\002%R%S HELP ACCESS\002 for information about the access list,\n"
+ "and \002%R%S HELP SET XOP\002 to know how to toggle between \n"
+ "the access list and xOP list systems."));
return true;
}
void OnSyntaxError(CommandSource &source, const Anope::string &subcommand)
{
- SyntaxError(source, "HOP", CHAN_HOP_SYNTAX);
+ SyntaxError(source, "HOP", _("HOP \037channel\037 {ADD|DEL|LIST|CLEAR} [\037nick\037 | \037entry-list\037]"));
}
void OnServHelp(CommandSource &source)
{
- source.Reply(CHAN_HELP_CMD_HOP);
+ source.Reply(_(" HOP Maintains the HOP (HalfOP) list for a channel"));
}
};
@@ -575,23 +604,59 @@ class CommandCSSOP : public XOPBase
CommandReturn Execute(CommandSource &source, const std::vector<Anope::string> &params)
{
- return this->DoXop(source, params, ACCESS_SOP, xop_msgs[XOP_SOP]);
+ return this->DoXop(source, params, ACCESS_SOP);
}
bool OnHelp(CommandSource &source, const Anope::string &subcommand)
{
- source.Reply(CHAN_HELP_SOP);
+ source.Reply(_("Syntax: \002SOP \037channel\037 ADD \037mask\037\002\n"
+ " \002SOP \037channel\037 DEL {\037mask\037 | \037entry-num\037 | \037list\037}\002\n"
+ " \002SOP \037channel\037 LIST [\037mask\037 | \037list\037]\002\n"
+ " \002SOP \037channel\037 CLEAR\002\n"
+ " \n"
+ "Maintains the \002SOP\002 (SuperOP) \002list\002 for a channel. The SOP \n"
+ "list gives users all rights given by the AOP list, and adds\n"
+ "those needed to use the AutoKick and the BadWords lists, \n"
+ "to send and read channel memos, and so on.\n"
+ " \n"
+ "The \002SOP ADD\002 command adds the given nickname to the\n"
+ "SOP list.\n"
+ " \n"
+ "The \002SOP DEL\002 command removes the given nick from the\n"
+ "SOP list. If a list of entry numbers is given, those\n"
+ "entries are deleted. (See the example for LIST below.)\n"
+ " \n"
+ "The \002SOP LIST\002 command displays the SOP list. If\n"
+ "a wildcard mask is given, only those entries matching the\n"
+ "mask are displayed. If a list of entry numbers is given,\n"
+ "only those entries are shown; for example:\n"
+ " \002SOP #channel LIST 2-5,7-9\002\n"
+ " Lists AOP entries numbered 2 through 5 and\n"
+ " 7 through 9.\n"
+ " \n"
+ "The \002SOP CLEAR\002 command clears all entries of the\n"
+ "SOP list.\n"
+ " \n"
+ "The \002SOP ADD\002, \002SOP DEL\002 and \002SOP CLEAR\002 commands are \n"
+ "limited to the channel founder. However, any user on the\n"
+ "AOP list may use the \002SOP LIST\002 command.\n"
+ " \n"
+ "This command may have been disabled for your channel, and\n"
+ "in that case you need to use the access list. See \n"
+ "\002%R%S HELP ACCESS\002 for information about the access list,\n"
+ "and \002%R%S HELP SET XOP\002 to know how to toggle between \n"
+ "the access list and xOP list systems."));
return true;
}
void OnSyntaxError(CommandSource &source, const Anope::string &subcommand)
{
- SyntaxError(source, "SOP", CHAN_SOP_SYNTAX);
+ SyntaxError(source, "SOP", _("SOP \037channel\037 {ADD|DEL|LIST|CLEAR} [\037nick\037 | \037entry-list\037]"));
}
void OnServHelp(CommandSource &source)
{
- source.Reply(CHAN_HELP_CMD_SOP);
+ source.Reply(_(" SOP Modify the list of SOP users"));
}
};
@@ -604,23 +669,58 @@ class CommandCSVOP : public XOPBase
CommandReturn Execute(CommandSource &source, const std::vector<Anope::string> &params)
{
- return this->DoXop(source, params, ACCESS_VOP, xop_msgs[XOP_VOP]);
+ return this->DoXop(source, params, ACCESS_VOP);
}
bool OnHelp(CommandSource &source, const Anope::string &subcommand)
{
- source.Reply(CHAN_HELP_VOP);
+ source.Reply(_("Syntax: \002VOP \037channel\037 ADD \037mask\037\002\n"
+ " \002VOP \037channel\037 DEL {\037mask\037 | \037entry-num\037 | \037list\037}\002\n"
+ " \002VOP \037channel\037 LIST [\037mask\037 | \037list\037]\002\n"
+ " \002VOP \037channel\037 CLEAR\002\n"
+ " \n"
+ "Maintains the \002VOP\002 (VOicePeople) \002list\002 for a channel. \n"
+ "The VOP list allows users to be auto-voiced and to voice \n"
+ "themselves if they aren't.\n"
+ " \n"
+ "The \002VOP ADD\002 command adds the given nickname to the\n"
+ "VOP list.\n"
+ " \n"
+ "The \002VOP DEL\002 command removes the given nick from the\n"
+ "VOP list. If a list of entry numbers is given, those\n"
+ "entries are deleted. (See the example for LIST below.)\n"
+ " \n"
+ "The \002VOP LIST\002 command displays the VOP list. If\n"
+ "a wildcard mask is given, only those entries matching the\n"
+ "mask are displayed. If a list of entry numbers is given,\n"
+ "only those entries are shown; for example:\n"
+ " \002VOP #channel LIST 2-5,7-9\002\n"
+ " Lists VOP entries numbered 2 through 5 and\n"
+ " 7 through 9.\n"
+ " \n"
+ "The \002VOP CLEAR\002 command clears all entries of the\n"
+ "VOP list.\n"
+ " \n"
+ "The \002VOP ADD\002, \002VOP DEL\002 and \002VOP LIST\002 commands are \n"
+ "limited to AOPs or above, while the \002VOP CLEAR\002 command \n"
+ "can only be used by the channel founder.\n"
+ " \n"
+ "This command may have been disabled for your channel, and\n"
+ "in that case you need to use the access list. See \n"
+ "\002%R%S HELP ACCESS\002 for information about the access list,\n"
+ "and \002%R%S HELP SET XOP\002 to know how to toggle between \n"
+ "the access list and xOP list systems."));
return true;
}
void OnSyntaxError(CommandSource &source, const Anope::string &subcommand)
{
- SyntaxError(source, "VOP", CHAN_VOP_SYNTAX);
+ SyntaxError(source, "VOP", _("VOP \037channel\037 {ADD|DEL|LIST|CLEAR} [\037nick\037 | \037entry-list\037]"));
}
void OnServHelp(CommandSource &source)
{
- source.Reply(CHAN_HELP_CMD_VOP);
+ source.Reply(_(" VOP Maintains the VOP (VOicePeople) list for a channel"));
}
};
diff --git a/modules/core/hs_del.cpp b/modules/core/hs_del.cpp
index f119fcaae..627680119 100644
--- a/modules/core/hs_del.cpp
+++ b/modules/core/hs_del.cpp
@@ -29,34 +29,36 @@ class CommandHSDel : public Command
{
if (na->HasFlag(NS_FORBIDDEN))
{
- source.Reply(NICK_X_FORBIDDEN, nick.c_str());
+ source.Reply(LanguageString::NICK_X_FORBIDDEN, nick.c_str());
return MOD_CONT;
}
Log(LOG_ADMIN, u, this) << "for user " << na->nick;
FOREACH_MOD(I_OnDeleteVhost, OnDeleteVhost(na));
na->hostinfo.RemoveVhost();
- source.Reply(HOST_DEL, nick.c_str());
+ source.Reply(_("vhost for \002%s\002 removed."), nick.c_str());
}
else
- source.Reply(HOST_NOREG, nick.c_str());
+ source.Reply(LanguageString::NICK_X_NOT_REGISTERED, nick.c_str());
return MOD_CONT;
}
bool OnHelp(CommandSource &source, const Anope::string &subcommand)
{
- source.Reply(HOST_HELP_DEL);
+ source.Reply(_("Syntax: \002DEL\002 \002<nick>\002\n"
+ "Deletes the vhost assigned to the given nick from the\n"
+ "database."));
return true;
}
void OnSyntaxError(CommandSource &source, const Anope::string &subcommand)
{
- SyntaxError(source, "DEL", HOST_DEL_SYNTAX);
+ SyntaxError(source, "DEL", _("DEL \002<nick>\002."));
}
void OnServHelp(CommandSource &source)
{
- source.Reply(HOST_HELP_CMD_DEL);
+ source.Reply(_(" DEL Delete the vhost of another user"));
}
};
diff --git a/modules/core/hs_delall.cpp b/modules/core/hs_delall.cpp
index 4e88051d0..03455a146 100644
--- a/modules/core/hs_delall.cpp
+++ b/modules/core/hs_delall.cpp
@@ -29,7 +29,7 @@ class CommandHSDelAll : public Command
{
if (na->HasFlag(NS_FORBIDDEN))
{
- source.Reply(NICK_X_FORBIDDEN, nick.c_str());
+ source.Reply(LanguageString::NICK_X_FORBIDDEN, nick.c_str());
return MOD_CONT;
}
FOREACH_MOD(I_OnDeleteVhost, OnDeleteVhost(na));
@@ -40,28 +40,30 @@ class CommandHSDelAll : public Command
na->hostinfo.RemoveVhost();
}
Log(LOG_ADMIN, u, this) << "for all nicks in group " << nc->display;
- source.Reply(HOST_DELALL, nc->display.c_str());
+ source.Reply(_("vhosts for group \002%s\002 have been removed."), nc->display.c_str());
}
else
- source.Reply(HOST_NOREG, nick.c_str());
+ source.Reply(LanguageString::NICK_X_NOT_REGISTERED, nick.c_str());
return MOD_CONT;
}
bool OnHelp(CommandSource &source, const Anope::string &subcommand)
{
- source.Reply(HOST_HELP_DELALL);
+ source.Reply(_("Syntax: \002DELALL\002 \002<nick>\002.\n"
+ "Deletes the vhost for all nicks in the same group as\n"
+ "that of the given nick."));
return true;
}
void OnSyntaxError(CommandSource &source, const Anope::string &subcommand)
{
- SyntaxError(source, "DELALL", HOST_DELALL_SYNTAX);
+ SyntaxError(source, "DELALL", _("DELALL <nick>\002."));
}
void OnServHelp(CommandSource &source)
{
- source.Reply(HOST_HELP_CMD_DELALL);
+ source.Reply(_(" DELALL Delete the vhost for all nicks in a group"));
}
};
diff --git a/modules/core/hs_group.cpp b/modules/core/hs_group.cpp
index 0eec94113..abcb82e72 100644
--- a/modules/core/hs_group.cpp
+++ b/modules/core/hs_group.cpp
@@ -28,25 +28,29 @@ class CommandHSGroup : public Command
{
HostServSyncVhosts(na);
if (!na->hostinfo.GetIdent().empty())
- source.Reply(HOST_IDENT_GROUP, u->Account()->display.c_str(), na->hostinfo.GetIdent().c_str(), na->hostinfo.GetHost().c_str());
+ source.Reply(_("All vhost's in the group \002%s\002 have been set to \002%s\002@\002%s\002"), u->Account()->display.c_str(), na->hostinfo.GetIdent().c_str(), na->hostinfo.GetHost().c_str());
else
- source.Reply(HOST_GROUP, u->Account()->display.c_str(), na->hostinfo.GetHost().c_str());
+ source.Reply(_("All vhost's in the group \002%s\002 have been set to \002%s\002"), u->Account()->display.c_str(), na->hostinfo.GetHost().c_str());
}
else
- source.Reply(HOST_NOT_ASSIGNED);
+ source.Reply(LanguageString::HOST_NOT_ASSIGNED);
return MOD_CONT;
}
bool OnHelp(CommandSource &source, const Anope::string &subcommand)
{
- source.Reply(HOST_HELP_GROUP);
+ source.Reply(_("Syntax: \002GROUP\002\n"
+ " \n"
+ "This command allows users to set the vhost of their\n"
+ "CURRENT nick to be the vhost for all nicks in the same\n"
+ "group."));
return true;
}
void OnServHelp(CommandSource &source)
{
- source.Reply(HOST_HELP_CMD_GROUP);
+ source.Reply(_(" GROUP Syncs the vhost for all nicks in a group"));
}
};
diff --git a/modules/core/hs_help.cpp b/modules/core/hs_help.cpp
index f94ec9d53..35d2b99cb 100644
--- a/modules/core/hs_help.cpp
+++ b/modules/core/hs_help.cpp
@@ -30,7 +30,7 @@ class CommandHSHelp : public Command
void OnSyntaxError(CommandSource &source, const Anope::string &subcommand)
{
User *u = source.u;
- source.Reply(OPER_HELP, Config->s_HostServ.c_str());
+ source.Reply(_("%s commands"), Config->s_HostServ.c_str());
for (CommandMap::const_iterator it = HostServ->Commands.begin(), it_end = HostServ->Commands.end(); it != it_end; ++it)
if (!Config->HidePrivilegedCommands || it->second->permission.empty() || (u->Account() && u->Account()->HasCommand(it->second->permission)))
it->second->OnServHelp(source);
diff --git a/modules/core/hs_list.cpp b/modules/core/hs_list.cpp
index 0f27e51aa..31a201611 100644
--- a/modules/core/hs_list.cpp
+++ b/modules/core/hs_list.cpp
@@ -35,14 +35,14 @@ class CommandHSList : public Command
size_t tmp = key.find('-');
if (tmp == Anope::string::npos || tmp == key.length() || tmp == 1)
{
- source.Reply(LIST_INCORRECT_RANGE);
+ source.Reply(LanguageString::LIST_INCORRECT_RANGE);
return MOD_CONT;
}
for (unsigned i = 1, end = key.length(); i < end; ++i)
{
if (!isdigit(key[i]) && i != tmp)
{
- source.Reply(LIST_INCORRECT_RANGE);
+ source.Reply(LanguageString::LIST_INCORRECT_RANGE);
return MOD_CONT;
}
from = convertTo<int>(key.substr(1, tmp - 1));
@@ -63,9 +63,9 @@ class CommandHSList : public Command
{
++display_counter;
if (!na->hostinfo.GetIdent().empty())
- source.Reply(HOST_IDENT_ENTRY, counter, na->nick.c_str(), na->hostinfo.GetIdent().c_str(), na->hostinfo.GetHost().c_str(), na->hostinfo.GetCreator().c_str(), do_strftime(na->hostinfo.GetTime()).c_str());
+ source.Reply(_("#%d Nick:\002%s\002, vhost:\002%s\002@\002%s\002 (%s - %s)"), counter, na->nick.c_str(), na->hostinfo.GetIdent().c_str(), na->hostinfo.GetHost().c_str(), na->hostinfo.GetCreator().c_str(), do_strftime(na->hostinfo.GetTime()).c_str());
else
- source.Reply(HOST_ENTRY, counter, na->nick.c_str(), na->hostinfo.GetHost().c_str(), na->hostinfo.GetCreator().c_str(), do_strftime(na->hostinfo.GetTime()).c_str());
+ source.Reply(_("#%d Nick:\002%s\002, vhost:\002%s\002 (%s - %s)"), counter, na->nick.c_str(), na->hostinfo.GetHost().c_str(), na->hostinfo.GetCreator().c_str(), do_strftime(na->hostinfo.GetTime()).c_str());
}
}
else
@@ -78,34 +78,43 @@ class CommandHSList : public Command
{
++display_counter;
if (!na->hostinfo.GetIdent().empty())
- source.Reply(HOST_IDENT_ENTRY, counter, na->nick.c_str(), na->hostinfo.GetIdent().c_str(), na->hostinfo.GetHost().c_str(), na->hostinfo.GetCreator().c_str(), do_strftime(na->hostinfo.GetTime()).c_str());
+ source.Reply(_("#%d Nick:\002%s\002, vhost:\002%s\002@\002%s\002 (%s - %s)"), counter, na->nick.c_str(), na->hostinfo.GetIdent().c_str(), na->hostinfo.GetHost().c_str(), na->hostinfo.GetCreator().c_str(), do_strftime(na->hostinfo.GetTime()).c_str());
else
- source.Reply(HOST_ENTRY, counter, na->nick.c_str(), na->hostinfo.GetHost().c_str(), na->hostinfo.GetCreator().c_str(), do_strftime(na->hostinfo.GetTime()).c_str());
+ source.Reply(_("#%d Nick:\002%s\002, vhost:\002%s\002 (%s - %s)"), counter, na->nick.c_str(), na->hostinfo.GetHost().c_str(), na->hostinfo.GetCreator().c_str(), do_strftime(na->hostinfo.GetTime()).c_str());
}
}
++counter;
}
if (!key.empty())
- source.Reply(HOST_LIST_KEY_FOOTER, key.c_str(), display_counter);
+ source.Reply(_("Displayed records matching key \002%s\002 (Count: \002%d\002)"), key.c_str(), display_counter);
else
{
if (from)
- source.Reply(HOST_LIST_RANGE_FOOTER, from, to);
+ source.Reply(_("Displayed records from \002%d\002 to \002%d\002"), from, to);
else
- source.Reply(HOST_LIST_FOOTER, display_counter);
+ source.Reply(_("Displayed all records (Count: \002%d\002)"), display_counter);
}
return MOD_CONT;
}
bool OnHelp(CommandSource &source, const Anope::string &subcommand)
{
- source.Reply(HOST_HELP_LIST);
+ source.Reply(_("Syntax: \002LIST\002 \002[<key>|<#X-Y>]\002\n"
+ "This command lists registered vhosts to the operator\n"
+ "if a Key is specified, only entries whos nick or vhost match\n"
+ "the pattern given in <key> are displayed e.g. Rob* for all\n"
+ "entries beginning with \"Rob\"\n"
+ "If a #X-Y style is used, only entries between the range of X\n"
+ "and Y will be displayed, e.g. #1-3 will display the first 3\n"
+ "nick/vhost entries.\n"
+ "The list uses the value of NSListMax as a hard limit for the\n"
+ "number of items to display to a operator at any 1 time."));
return true;
}
void OnServHelp(CommandSource &source)
{
- source.Reply(HOST_HELP_CMD_LIST);
+ source.Reply(_(" LIST Displays one or more vhost entries."));
}
};
diff --git a/modules/core/hs_off.cpp b/modules/core/hs_off.cpp
index b38164bb0..d61beca1f 100644
--- a/modules/core/hs_off.cpp
+++ b/modules/core/hs_off.cpp
@@ -26,12 +26,12 @@ class CommandHSOff : public Command
NickAlias *na = findnick(u->nick);
if (!na || !na->hostinfo.HasVhost())
- source.Reply(HOST_NOT_ASSIGNED);
+ source.Reply(LanguageString::HOST_NOT_ASSIGNED);
else
{
ircdproto->SendVhostDel(u);
Log(LOG_COMMAND, u, this) << "to disable their vhost";
- source.Reply(HOST_OFF);
+ source.Reply(_("Your vhost was removed and the normal cloaking restored."));
}
return MOD_CONT;
@@ -39,13 +39,16 @@ class CommandHSOff : public Command
bool OnHelp(CommandSource &source, const Anope::string &subcommand)
{
- source.Reply(HOST_HELP_OFF);
+ source.Reply(_("Syntax: \002OFF\002\n"
+ "Deactivates the vhost currently assigned to the nick in use.\n"
+ "When you use this command any user who performs a /whois\n"
+ "on you will see your real IP address."));
return true;
}
void OnServHelp(CommandSource &source)
{
- source.Reply(HOST_HELP_CMD_OFF);
+ source.Reply(_(" OFF Deactivates your assigned vhost"));
}
};
diff --git a/modules/core/hs_on.cpp b/modules/core/hs_on.cpp
index 1834578ad..72bdfa45b 100644
--- a/modules/core/hs_on.cpp
+++ b/modules/core/hs_on.cpp
@@ -27,9 +27,9 @@ class CommandHSOn : public Command
if (na && u->Account() == na->nc && na->hostinfo.HasVhost())
{
if (!na->hostinfo.GetIdent().empty())
- source.Reply(HOST_IDENT_ACTIVATED, na->hostinfo.GetIdent().c_str(), na->hostinfo.GetHost().c_str());
+ source.Reply(_("Your vhost of \002%s\002@\002%s\002 is now activated."), na->hostinfo.GetIdent().c_str(), na->hostinfo.GetHost().c_str());
else
- source.Reply(HOST_ACTIVATED, na->hostinfo.GetHost().c_str());
+ source.Reply(_("Your vhost of \002%s\002 is now activated."), na->hostinfo.GetHost().c_str());
Log(LOG_COMMAND, u, this) << "to enable their vhost of " << (!na->hostinfo.GetIdent().empty() ? na->hostinfo.GetIdent() + "@" : "") << na->hostinfo.GetHost();
ircdproto->SendVhost(u, na->hostinfo.GetIdent(), na->hostinfo.GetHost());
if (ircd->vhost)
@@ -42,20 +42,23 @@ class CommandHSOn : public Command
u->UpdateHost();
}
else
- source.Reply(HOST_NOT_ASSIGNED);
+ source.Reply(LanguageString::HOST_NOT_ASSIGNED);
return MOD_CONT;
}
bool OnHelp(CommandSource &source, const Anope::string &subcommand)
{
- source.Reply(HOST_HELP_ON);
+ source.Reply(_("Syntax: \002ON\002\n"
+ "Activates the vhost currently assigned to the nick in use.\n"
+ "When you use this command any user who performs a /whois\n"
+ "on you will see the vhost instead of your real IP address."));
return true;
}
void OnServHelp(CommandSource &source)
{
- source.Reply(HOST_HELP_CMD_ON);
+ source.Reply(_(" ON Activates your assigned vhost"));
}
};
diff --git a/modules/core/hs_set.cpp b/modules/core/hs_set.cpp
index 0e11ad3e8..f4fcfb58a 100644
--- a/modules/core/hs_set.cpp
+++ b/modules/core/hs_set.cpp
@@ -34,12 +34,12 @@ class CommandHSSet : public Command
rawhostmask = myStrGetTokenRemainder(rawhostmask, '@', 1); /* get the remaining string */
if (rawhostmask.empty())
{
- source.Reply(HOST_SET_SYNTAX, Config->s_HostServ.c_str());
+ source.Reply(_("SET \002<nick>\002 \002<hostmask>\002."), Config->s_HostServ.c_str());
return MOD_CONT;
}
if (vIdent.length() > Config->UserLen)
{
- source.Reply(HOST_SET_IDENTTOOLONG, Config->UserLen);
+ source.Reply(LanguageString::HOST_SET_IDENTTOOLONG, Config->UserLen);
return MOD_CONT;
}
else
@@ -47,13 +47,13 @@ class CommandHSSet : public Command
for (Anope::string::iterator s = vIdent.begin(), s_end = vIdent.end(); s != s_end; ++s)
if (!isvalidchar(*s))
{
- source.Reply(HOST_SET_IDENT_ERROR);
+ source.Reply(LanguageString::HOST_SET_IDENT_ERROR);
return MOD_CONT;
}
}
if (!ircd->vident)
{
- source.Reply(HOST_NO_VIDENT);
+ source.Reply(LanguageString::HOST_NO_VIDENT);
return MOD_CONT;
}
}
@@ -61,13 +61,13 @@ class CommandHSSet : public Command
hostmask = rawhostmask;
else
{
- source.Reply(HOST_SET_TOOLONG, Config->HostLen);
+ source.Reply(LanguageString::HOST_SET_TOOLONG, Config->HostLen);
return MOD_CONT;
}
if (!isValidHost(hostmask, 3))
{
- source.Reply(HOST_SET_ERROR);
+ source.Reply(LanguageString::HOST_SET_ERROR);
return MOD_CONT;
}
@@ -76,7 +76,7 @@ class CommandHSSet : public Command
{
if (na->HasFlag(NS_FORBIDDEN))
{
- source.Reply(NICK_X_FORBIDDEN, nick.c_str());
+ source.Reply(LanguageString::NICK_X_FORBIDDEN, nick.c_str());
return MOD_CONT;
}
@@ -85,29 +85,34 @@ class CommandHSSet : public Command
na->hostinfo.SetVhost(vIdent, hostmask, u->nick);
FOREACH_MOD(I_OnSetVhost, OnSetVhost(na));
if (!vIdent.empty())
- source.Reply(HOST_IDENT_SET, nick.c_str(), vIdent.c_str(), hostmask.c_str());
+ source.Reply(_("vhost for \002%s\002 set to \002%s\002@\002%s\002."), nick.c_str(), vIdent.c_str(), hostmask.c_str());
else
- source.Reply(HOST_SET, nick.c_str(), hostmask.c_str());
+ source.Reply(_("vhost for \002%s\002 set to \002%s\002."), nick.c_str(), hostmask.c_str());
}
else
- source.Reply(HOST_NOREG, nick.c_str());
+ source.Reply(LanguageString::NICK_X_NOT_REGISTERED, nick.c_str());
+
return MOD_CONT;
}
bool OnHelp(CommandSource &source, const Anope::string &subcommand)
{
- source.Reply(HOST_HELP_SET);
+ source.Reply(_("Syntax: \002SET\002 \002<nick>\002 \002<hostmask>\002.\n"
+ "Sets the vhost for the given nick to that of the given\n"
+ "hostmask. If your IRCD supports vIdents, then using\n"
+ "SET <nick> <ident>@<hostmask> set idents for users as \n"
+ "well as vhosts."));
return true;
}
void OnSyntaxError(CommandSource &source, const Anope::string &subcommand)
{
- SyntaxError(source, "SET", HOST_SET_SYNTAX);
+ SyntaxError(source, "SET", _("SET \002<nick>\002 \002<hostmask>\002."));
}
void OnServHelp(CommandSource &source)
{
- source.Reply(HOST_HELP_CMD_SET);
+ source.Reply(_(" SET Set the vhost of another user"));
}
};
diff --git a/modules/core/hs_setall.cpp b/modules/core/hs_setall.cpp
index 3aac924e4..c5c2d777d 100644
--- a/modules/core/hs_setall.cpp
+++ b/modules/core/hs_setall.cpp
@@ -32,12 +32,12 @@ class CommandHSSetAll : public Command
NickAlias *na = findnick(nick);
if (!na)
{
- source.Reply(HOST_NOREG, nick.c_str());
+ source.Reply(LanguageString::NICK_X_NOT_REGISTERED, nick.c_str());
return MOD_CONT;
}
else if (na->HasFlag(NS_FORBIDDEN))
{
- source.Reply(NICK_X_FORBIDDEN, nick.c_str());
+ source.Reply(LanguageString::NICK_X_FORBIDDEN, nick.c_str());
return MOD_CONT;
}
@@ -47,12 +47,12 @@ class CommandHSSetAll : public Command
rawhostmask = myStrGetTokenRemainder(rawhostmask, '@', 1); /* get the remaining string */
if (rawhostmask.empty())
{
- source.Reply(HOST_SETALL_SYNTAX, Config->s_HostServ.c_str());
+ source.Reply(_("vhost for group \002%s\002 set to \002%s\002."), Config->s_HostServ.c_str());
return MOD_CONT;
}
if (vIdent.length() > Config->UserLen)
{
- source.Reply(HOST_SET_IDENTTOOLONG, Config->UserLen);
+ source.Reply(LanguageString::HOST_SET_IDENTTOOLONG, Config->UserLen);
return MOD_CONT;
}
else
@@ -60,13 +60,13 @@ class CommandHSSetAll : public Command
for (Anope::string::iterator s = vIdent.begin(), s_end = vIdent.end(); s != s_end; ++s)
if (!isvalidchar(*s))
{
- source.Reply(HOST_SET_IDENT_ERROR);
+ source.Reply(LanguageString::HOST_SET_IDENT_ERROR);
return MOD_CONT;
}
}
if (!ircd->vident)
{
- source.Reply(HOST_NO_VIDENT);
+ source.Reply(LanguageString::HOST_NO_VIDENT);
return MOD_CONT;
}
}
@@ -76,13 +76,13 @@ class CommandHSSetAll : public Command
hostmask = rawhostmask;
else
{
- source.Reply(HOST_SET_TOOLONG, Config->HostLen);
+ source.Reply(LanguageString::HOST_SET_TOOLONG, Config->HostLen);
return MOD_CONT;
}
if (!isValidHost(hostmask, 3))
{
- source.Reply(HOST_SET_ERROR);
+ source.Reply(LanguageString::HOST_SET_ERROR);
return MOD_CONT;
}
@@ -94,26 +94,32 @@ class CommandHSSetAll : public Command
HostServSyncVhosts(na);
FOREACH_MOD(I_OnSetVhost, OnSetVhost(na));
if (!vIdent.empty())
- source.Reply(HOST_IDENT_SETALL, nick.c_str(), vIdent.c_str(), hostmask.c_str());
+ source.Reply(_("vhost for group \002%s\002 set to \002%s\002@\002%s\002."), nick.c_str(), vIdent.c_str(), hostmask.c_str());
else
- source.Reply(HOST_SETALL, nick.c_str(), hostmask.c_str());
+ source.Reply(_("vhost for group \002%s\002 set to \002%s\002."), nick.c_str(), hostmask.c_str());
return MOD_CONT;
}
bool OnHelp(CommandSource &source, const Anope::string &subcommand)
{
- source.Reply(HOST_HELP_SETALL);
+ source.Reply(_("Syntax: \002SETALL\002 \002<nick>\002 \002<hostmask>\002.\n"
+ "Sets the vhost for all nicks in the same group as that\n"
+ "of the given nick. If your IRCD supports vIdents, then\n"
+ "using SETALL <nick> <ident>@<hostmask> will set idents\n"
+ "for users as well as vhosts.\n"
+ "* NOTE, this will not update the vhost for any nicks\n"
+ "added to the group after this command was used."));
return true;
}
void OnSyntaxError(CommandSource &source, const Anope::string &subcommand)
{
- SyntaxError(source, "SETALL", HOST_SETALL_SYNTAX);
+ SyntaxError(source, "SETALL", _("SETALL \002<nick>\002 \002<hostmask>\002."));
}
void OnServHelp(CommandSource &source)
{
- source.Reply(HOST_HELP_CMD_SETALL);
+ source.Reply(_(" SETALL Set the vhost for all nicks in a group"));
}
};
diff --git a/modules/core/ms_cancel.cpp b/modules/core/ms_cancel.cpp
index fb9e77c26..dc32624a5 100644
--- a/modules/core/ms_cancel.cpp
+++ b/modules/core/ms_cancel.cpp
@@ -34,9 +34,9 @@ class CommandMSCancel : public Command
if (!(mi = getmemoinfo(nname, ischan, isforbid)))
{
if (isforbid)
- source.Reply(ischan ? CHAN_X_FORBIDDEN : NICK_X_FORBIDDEN, nname.c_str());
+ source.Reply(ischan ? LanguageString::CHAN_X_FORBIDDEN : LanguageString::NICK_X_FORBIDDEN, nname.c_str());
else
- source.Reply(ischan ? CHAN_X_NOT_REGISTERED : NICK_X_NOT_REGISTERED, nname.c_str());
+ source.Reply(ischan ? LanguageString::CHAN_X_NOT_REGISTERED : LanguageString::NICK_X_NOT_REGISTERED, nname.c_str());
}
else
{
@@ -45,29 +45,32 @@ class CommandMSCancel : public Command
{
FOREACH_MOD(I_OnMemoDel, OnMemoDel(findnick(nname)->nc, mi, mi->memos[i]));
mi->Del(mi->memos[i]);
- source.Reply(MEMO_CANCELLED, nname.c_str());
+ source.Reply(_("Last memo to \002%s\002 has been cancelled."), nname.c_str());
return MOD_CONT;
}
- source.Reply(MEMO_CANCEL_NONE);
+ source.Reply(_("No memo was cancelable."));
}
return MOD_CONT;
}
bool OnHelp(CommandSource &source, const Anope::string &subcommand)
{
- source.Reply(MEMO_HELP_CANCEL);
+ source.Reply(_("Syntax: \002CANCEL {\037nick\037 | \037channel\037}\002\n"
+ " \n"
+ "Cancels the last memo you sent to the given nick or channel,\n"
+ "provided it has not been read at the time you use the command."));
return true;
}
void OnSyntaxError(CommandSource &source, const Anope::string &subcommand)
{
- SyntaxError(source, "CANCEL", MEMO_CANCEL_SYNTAX);
+ SyntaxError(source, "CANCEL", _("CANCEL {\037nick\037 | \037channel\037}"));
}
void OnServHelp(CommandSource &source)
{
- source.Reply(MEMO_HELP_CMD_CANCEL);
+ source.Reply(_(" CANCEL Cancel last memo you sent"));
}
};
diff --git a/modules/core/ms_check.cpp b/modules/core/ms_check.cpp
index b861a5b01..60e1d7182 100644
--- a/modules/core/ms_check.cpp
+++ b/modules/core/ms_check.cpp
@@ -31,13 +31,13 @@ class CommandMSCheck : public Command
NickAlias *na = findnick(recipient);
if (!na)
{
- source.Reply(NICK_X_NOT_REGISTERED, recipient.c_str());
+ source.Reply(LanguageString::NICK_X_NOT_REGISTERED, recipient.c_str());
return MOD_CONT;
}
if (na->HasFlag(NS_FORBIDDEN))
{
- source.Reply(NICK_X_FORBIDDEN, recipient.c_str());
+ source.Reply(LanguageString::NICK_X_FORBIDDEN, recipient.c_str());
return MOD_CONT;
}
@@ -53,33 +53,36 @@ class CommandMSCheck : public Command
found = true; /* Yes, we've found the memo */
if (mi->memos[i]->HasFlag(MF_UNREAD))
- source.Reply(MEMO_CHECK_NOT_READ, na->nick.c_str(), do_strftime(mi->memos[i]->time).c_str());
+ source.Reply(_("The last memo you sent to %s (sent on %s) has not yet been read."), na->nick.c_str(), do_strftime(mi->memos[i]->time).c_str());
else
- source.Reply(MEMO_CHECK_READ, na->nick.c_str(), do_strftime(mi->memos[i]->time).c_str());
+ source.Reply(_("The last memo you sent to %s (sent on %s) has been read."), na->nick.c_str(), do_strftime(mi->memos[i]->time).c_str());
break;
}
}
if (!found)
- source.Reply(MEMO_CHECK_NO_MEMO, na->nick.c_str());
+ source.Reply(_("Nick %s doesn't have a memo from you."), na->nick.c_str());
return MOD_CONT;
}
bool OnHelp(CommandSource &source, const Anope::string &subcommand)
{
- source.Reply(MEMO_HELP_CHECK);
+ source.Reply(_("Syntax: \002CHECK \037nick\037\002\n"
+ " \n"
+ "Checks whether the _last_ memo you sent to \037nick\037 has been read\n"
+ "or not. Note that this does only work with nicks, not with chans."));
return true;
}
void OnSyntaxError(CommandSource &source, const Anope::string &subcommand)
{
- SyntaxError(source, "CHECK", MEMO_CHECK_SYNTAX);
+ SyntaxError(source, "CHECK", _("CHECK \037nickname\037"));
}
void OnServHelp(CommandSource &source)
{
- source.Reply(MEMO_HELP_CMD_CHECK);
+ source.Reply(_(" CHECK Checks if last memo to a nick was read"));
}
};
diff --git a/modules/core/ms_del.cpp b/modules/core/ms_del.cpp
index 3f778bfbe..668d3c418 100644
--- a/modules/core/ms_del.cpp
+++ b/modules/core/ms_del.cpp
@@ -34,7 +34,7 @@ class MemoDelCallback : public NumberList
FOREACH_MOD(I_OnMemoDel, OnMemoDel(source.u->Account(), mi, mi->memos[Number - 1]));
mi->Del(Number - 1);
- source.Reply(MEMO_DELETED_ONE, Number);
+ source.Reply(_("Memo %d has been deleted."), Number);
}
};
@@ -60,17 +60,17 @@ class CommandMSDel : public Command
if (!(ci = cs_findchan(chan)))
{
- source.Reply(CHAN_X_NOT_REGISTERED, chan.c_str());
+ source.Reply(LanguageString::CHAN_X_NOT_REGISTERED, chan.c_str());
return MOD_CONT;
}
else if (readonly)
{
- source.Reply(READ_ONLY_MODE);
+ source.Reply(LanguageString::READ_ONLY_MODE);
return MOD_CONT;
}
else if (!check_access(u, ci, CA_MEMO))
{
- source.Reply(ACCESS_DENIED);
+ source.Reply(LanguageString::ACCESS_DENIED);
return MOD_CONT;
}
mi = &ci->memos;
@@ -82,9 +82,9 @@ class CommandMSDel : public Command
else if (mi->memos.empty())
{
if (!chan.empty())
- source.Reply(MEMO_X_HAS_NO_MEMOS, chan.c_str());
+ source.Reply(LanguageString::MEMO_X_HAS_NO_MEMOS, chan.c_str());
else
- source.Reply(MEMO_HAVE_NO_MEMOS);
+ source.Reply(LanguageString::MEMO_HAVE_NO_MEMOS);
}
else
{
@@ -101,7 +101,7 @@ class CommandMSDel : public Command
else
FOREACH_MOD(I_OnMemoDel, OnMemoDel(u->Account(), mi, mi->memos[mi->memos.size() - 1]));
mi->Del(mi->memos[mi->memos.size() - 1]);
- source.Reply(MEMO_DELETED_ONE, mi->memos.size() + 1);
+ source.Reply(_("Memo %d has been deleted."), mi->memos.size() + 1);
}
else
{
@@ -114,9 +114,9 @@ class CommandMSDel : public Command
delete mi->memos[i];
mi->memos.clear();
if (!chan.empty())
- source.Reply(MEMO_CHAN_DELETED_ALL, chan.c_str());
+ source.Reply(_("All memos for channel %s have been deleted."), chan.c_str());
else
- source.Reply(MEMO_DELETED_ALL);
+ source.Reply(_("All of your memos have been deleted."));
}
}
return MOD_CONT;
@@ -124,18 +124,33 @@ class CommandMSDel : public Command
bool OnHelp(CommandSource &source, const Anope::string &subcommand)
{
- source.Reply(MEMO_HELP_DEL);
+ source.Reply(_("Syntax: \002DEL [\037channel\037] {\037num\037 | \037list\037 | LAST | ALL}\002\n"
+ " \n"
+ "Deletes the specified memo or memos. You can supply\n"
+ "multiple memo numbers or ranges of numbers instead of a\n"
+ "single number, as in the second example below.\n"
+ " \n"
+ "If \002LAST\002 is given, the last memo will be deleted.\n"
+ "If \002ALL\002 is given, deletes all of your memos.\n"
+ " \n"
+ "Examples:\n"
+ " \n"
+ " \002DEL 1\002\n"
+ " Deletes your first memo.\n"
+ " \n"
+ " \002DEL 2-5,7-9\002\n"
+ " Deletes memos numbered 2 through 5 and 7 through 9."));
return true;
}
void OnSyntaxError(CommandSource &source, const Anope::string &subcommand)
{
- SyntaxError(source, "DEL", MEMO_DEL_SYNTAX);
+ SyntaxError(source, "DEL", _("DEL [\037channel\037] {\037num\037 | \037list\037 | ALL}"));
}
void OnServHelp(CommandSource &source)
{
- source.Reply(MEMO_HELP_CMD_DEL);
+ source.Reply(_(" DEL Delete a memo or memos"));
}
};
diff --git a/modules/core/ms_help.cpp b/modules/core/ms_help.cpp
index d67d012b1..fdcbbaf1e 100644
--- a/modules/core/ms_help.cpp
+++ b/modules/core/ms_help.cpp
@@ -30,11 +30,20 @@ class CommandMSHelp : public Command
void OnSyntaxError(CommandSource &source, const Anope::string &subcommand)
{
User *u = source.u;
- source.Reply(MEMO_HELP_HEADER);
+ source.Reply(_("\002%S\002 is a utility allowing IRC users to send short\n"
+ "messages to other IRC users, whether they are online at\n"
+ "the time or not, or to channels(*). Both the sender's\n"
+ "nickname and the target nickname or channel must be\n"
+ "registered in order to send a memo.\n"
+ "%S's commands include:"));
for (CommandMap::const_iterator it = MemoServ->Commands.begin(), it_end = MemoServ->Commands.end(); it != it_end; ++it)
if (!Config->HidePrivilegedCommands || it->second->permission.empty() || (u->Account() && u->Account()->HasCommand(it->second->permission)))
it->second->OnServHelp(source);
- source.Reply(MEMO_HELP_FOOTER, Config->s_ChanServ.c_str());
+ source.Reply(_("Type \002%R%S HELP \037command\037\002 for help on any of the\n"
+ "above commands.\n"
+ "(*) By default, any user with at least level 10 access on a\n"
+ " channel can read that channel's memos. This can be\n"
+ " changed with the %s \002LEVELS\002 command."), Config->s_ChanServ.c_str());
}
};
diff --git a/modules/core/ms_ignore.cpp b/modules/core/ms_ignore.cpp
index 8ff5b2e18..647219833 100644
--- a/modules/core/ms_ignore.cpp
+++ b/modules/core/ms_ignore.cpp
@@ -40,21 +40,21 @@ class CommandMSIgnore : public Command
if (!mi)
{
if (isforbid)
- source.Reply(ischan ? CHAN_X_FORBIDDEN : NICK_X_FORBIDDEN, channel.c_str());
+ source.Reply(ischan ? LanguageString::CHAN_X_FORBIDDEN : LanguageString::NICK_X_FORBIDDEN, channel.c_str());
else
- source.Reply(ischan ? CHAN_X_NOT_REGISTERED : NICK_X_NOT_REGISTERED, channel.c_str());
+ source.Reply(ischan ? LanguageString::CHAN_X_NOT_REGISTERED : LanguageString::NICK_X_NOT_REGISTERED, channel.c_str());
}
else if (ischan && !check_access(u, cs_findchan(channel), CA_MEMO))
- source.Reply(ACCESS_DENIED);
+ source.Reply(LanguageString::ACCESS_DENIED);
else if (command.equals_ci("ADD") && !param.empty())
{
if (std::find(mi->ignores.begin(), mi->ignores.end(), param.ci_str()) == mi->ignores.end())
{
mi->ignores.push_back(param.ci_str());
- source.Reply(MEMO_IGNORE_ADD, param.c_str());
+ source.Reply(_("\002%s\002 added to your ignore list."), param.c_str());
}
else
- source.Reply(MEMO_IGNORE_ALREADY_IGNORED, param.c_str());
+ source.Reply(_("\002%s\002 is already on your ignore list."), param.c_str());
}
else if (command.equals_ci("DEL") && !param.empty())
{
@@ -63,18 +63,18 @@ class CommandMSIgnore : public Command
if (it != mi->ignores.end())
{
mi->ignores.erase(it);
- source.Reply(MEMO_IGNORE_DEL, param.c_str());
+ source.Reply(_("\002%s\002 removed from your ignore list."), param.c_str());
}
else
- source.Reply(MEMO_IGNORE_NOT_IGNORED, param.c_str());
+ source.Reply(_("\002%s\002 is not on your ignore list."), param.c_str());
}
else if (command.equals_ci("LIST"))
{
if (mi->ignores.empty())
- source.Reply(MEMO_IGNORE_LIST_EMPTY);
+ source.Reply(_("Your memo ignore list is empty."));
else
{
- source.Reply(MEMO_IGNORE_LIST_HEADER);
+ source.Reply(_("Ignore list:"));
for (unsigned i = 0; i < mi->ignores.size(); ++i)
source.Reply(" %s", mi->ignores[i].c_str());
}
@@ -87,18 +87,21 @@ class CommandMSIgnore : public Command
bool OnHelp(CommandSource &source, const Anope::string &subcommand)
{
- source.Reply(MEMO_HELP_IGNORE);
+ source.Reply(_("Syntax: \002IGNORE [\037channek\037] {\002ADD|DEL|LIST\002} [\037entry\037]\n"
+ " \n"
+ "Allows you to ignore users by nick or host from memoing you. If someone on your\n"
+ "memo ignore list tries to memo you, they will not be told that you have them ignored."));
return true;
}
void OnSyntaxError(CommandSource &source, const Anope::string &subcommand)
{
- SyntaxError(source, "IGNORE", MEMO_IGNORE_SYNTAX);
+ SyntaxError(source, "IGNORE", _("IGNORE [\037channel\037] {\002ADD|DEL|\002} [\037entry\037]"));
}
void OnServHelp(CommandSource &source)
{
- source.Reply(MEMO_HELP_CMD_IGNORE);
+ source.Reply(_(" IGNORE Manage your memo ignore list"));
}
};
diff --git a/modules/core/ms_info.cpp b/modules/core/ms_info.cpp
index aa2f8e8a7..1d34073d9 100644
--- a/modules/core/ms_info.cpp
+++ b/modules/core/ms_info.cpp
@@ -35,12 +35,12 @@ class CommandMSInfo : public Command
na = findnick(nname);
if (!na)
{
- source.Reply(NICK_X_NOT_REGISTERED, nname.c_str());
+ source.Reply(LanguageString::NICK_X_NOT_REGISTERED, nname.c_str());
return MOD_CONT;
}
else if (na->HasFlag(NS_FORBIDDEN))
{
- source.Reply(NICK_X_FORBIDDEN, nname.c_str());
+ source.Reply(LanguageString::NICK_X_FORBIDDEN, nname.c_str());
return MOD_CONT;
}
mi = &na->nc->memos;
@@ -50,12 +50,12 @@ class CommandMSInfo : public Command
{
if (!(ci = cs_findchan(nname)))
{
- source.Reply(CHAN_X_NOT_REGISTERED, nname.c_str());
+ source.Reply(LanguageString::CHAN_X_NOT_REGISTERED, nname.c_str());
return MOD_CONT;
}
else if (!check_access(u, ci, CA_MEMO))
{
- source.Reply(ACCESS_DENIED);
+ source.Reply(LanguageString::ACCESS_DENIED);
return MOD_CONT;
}
mi = &ci->memos;
@@ -63,7 +63,7 @@ class CommandMSInfo : public Command
}
else if (!nname.empty()) /* It's not a chan and we aren't services admin */
{
- source.Reply(ACCESS_DENIED);
+ source.Reply(LanguageString::ACCESS_DENIED);
return MOD_CONT;
}
else
@@ -75,13 +75,13 @@ class CommandMSInfo : public Command
if (!nname.empty() && (ci || na->nc != u->Account()))
{
if (mi->memos.empty())
- source.Reply(MEMO_INFO_X_NO_MEMOS, nname.c_str());
+ source.Reply(_("%s currently has no memos."), nname.c_str());
else if (mi->memos.size() == 1)
{
if (mi->memos[0]->HasFlag(MF_UNREAD))
- source.Reply(MEMO_INFO_X_MEMO_UNREAD, nname.c_str());
+ source.Reply(_("%s currently has \0021\002 memo, and it has not yet been read."), nname.c_str());
else
- source.Reply(MEMO_INFO_X_MEMO, nname.c_str());
+ source.Reply(_("%s currently has \0021\002 memo."), nname.c_str());
}
else
{
@@ -90,55 +90,55 @@ class CommandMSInfo : public Command
if (mi->memos[i]->HasFlag(MF_UNREAD))
++count;
if (count == mi->memos.size())
- source.Reply(MEMO_INFO_X_MEMOS_ALL_UNREAD, nname.c_str(), count);
+ source.Reply(_("%s currently has \002%d\002 memos; all of them are unread."), nname.c_str(), count);
else if (!count)
- source.Reply(MEMO_INFO_X_MEMOS, nname.c_str(), mi->memos.size());
+ source.Reply(_("%s currently has \002%d\002 memos."), nname.c_str(), mi->memos.size());
else if (count == 1)
- source.Reply(MEMO_INFO_X_MEMOS_ONE_UNREAD, nname.c_str(), mi->memos.size());
+ source.Reply(_("%s currently has \002%d\002 memos, of which \0021\002 is unread."), nname.c_str(), mi->memos.size());
else
- source.Reply(MEMO_INFO_X_MEMOS_SOME_UNREAD, nname.c_str(), mi->memos.size(), count);
+ source.Reply(_("%s currently has \002%d\002 memos, of which \002%d\002 are unread."), nname.c_str(), mi->memos.size(), count);
}
if (!mi->memomax)
{
if (hardmax)
- source.Reply(MEMO_INFO_X_HARD_LIMIT, nname.c_str(), mi->memomax);
+ source.Reply(_("%s's memo limit is \002%d\002, and may not be changed."), nname.c_str(), mi->memomax);
else
- source.Reply(MEMO_INFO_X_LIMIT, nname.c_str(), mi->memomax);
+ source.Reply(_("%s's memo limit is \002%d\002."), nname.c_str(), mi->memomax);
}
else if (mi->memomax > 0)
{
if (hardmax)
- source.Reply(MEMO_INFO_X_HARD_LIMIT, nname.c_str(), mi->memomax);
+ source.Reply(_("%s's memo limit is \002%d\002, and may not be changed."), nname.c_str(), mi->memomax);
else
- source.Reply(MEMO_INFO_X_LIMIT, nname.c_str(), mi->memomax);
+ source.Reply(_("%s's memo limit is \002%d\002."), nname.c_str(), mi->memomax);
}
else
- source.Reply(MEMO_INFO_X_NO_LIMIT, nname.c_str());
+ source.Reply(_("%s has no memo limit."), nname.c_str());
/* I ripped this code out of ircservices 4.4.5, since I didn't want
to rewrite the whole thing (it pisses me off). */
if (na)
{
if (na->nc->HasFlag(NI_MEMO_RECEIVE) && na->nc->HasFlag(NI_MEMO_SIGNON))
- source.Reply(MEMO_INFO_X_NOTIFY_ON, nname.c_str());
+ source.Reply(_("%s is notified of new memos at logon and when they arrive."), nname.c_str());
else if (na->nc->HasFlag(NI_MEMO_RECEIVE))
- source.Reply(MEMO_INFO_X_NOTIFY_RECEIVE, nname.c_str());
+ source.Reply(_("%s is notified when new memos arrive."), nname.c_str());
else if (na->nc->HasFlag(NI_MEMO_SIGNON))
- source.Reply(MEMO_INFO_X_NOTIFY_SIGNON, nname.c_str());
+ source.Reply(_("%s is notified of news memos at logon."), nname.c_str());
else
- source.Reply(MEMO_INFO_X_NOTIFY_OFF, nname.c_str());
+ source.Reply(_("%s is not notified of new memos."), nname.c_str());
}
}
else /* !nname || (!ci || na->nc == u->Account()) */
{
if (mi->memos.empty())
- source.Reply(MEMO_INFO_NO_MEMOS);
+ source.Reply(_("You currently have no memos."));
else if (mi->memos.size() == 1)
{
if (mi->memos[0]->HasFlag(MF_UNREAD))
- source.Reply(MEMO_INFO_MEMO_UNREAD);
+ source.Reply(_("You currently have \0021\002 memo, and it has not yet been read."));
else
- source.Reply(MEMO_INFO_MEMO);
+ source.Reply(_("You currently have \0021\002 memo."));
}
else
{
@@ -147,41 +147,41 @@ class CommandMSInfo : public Command
if (mi->memos[i]->HasFlag(MF_UNREAD))
++count;
if (count == mi->memos.size())
- source.Reply(MEMO_INFO_MEMOS_ALL_UNREAD, count);
+ source.Reply(_("You currently have \002%d\002 memos; all of them are unread."), count);
else if (!count)
- source.Reply(MEMO_INFO_MEMOS, mi->memos.size());
+ source.Reply(_("You currently have \002%d\002 memos."), mi->memos.size());
else if (count == 1)
- source.Reply(MEMO_INFO_MEMOS_ONE_UNREAD, mi->memos.size());
+ source.Reply(_("You currently have \002%d\002 memos, of which \0021\002 is unread."), mi->memos.size());
else
- source.Reply(MEMO_INFO_MEMOS_SOME_UNREAD, mi->memos.size(), count);
+ source.Reply(_("You currently have \002%d\002 memos, of which \002%d\002 are unread."), mi->memos.size(), count);
}
if (!mi->memomax)
{
if (!u->Account()->IsServicesOper() && hardmax)
- source.Reply(MEMO_INFO_HARD_LIMIT_ZERO);
+ source.Reply(_("Your memo limit is \0020\002; you will not receive any new memos. You cannot change this limit."));
else
- source.Reply(MEMO_INFO_LIMIT_ZERO);
+ source.Reply(_("Your memo limit is \0020\002; you will not receive any new memos."));
}
else if (mi->memomax > 0)
{
if (!u->Account()->IsServicesOper() && hardmax)
- source.Reply(MEMO_INFO_HARD_LIMIT, mi->memomax);
+ source.Reply(_("Your memo limit is \002%d\002, and may not be changed."), mi->memomax);
else
- source.Reply(MEMO_INFO_LIMIT, mi->memomax);
+ source.Reply(_("Your memo limit is \002%d\002."), mi->memomax);
}
else
- source.Reply(MEMO_INFO_NO_LIMIT);
+ source.Reply(_("You have no limit on the number of memos you may keep."));
/* Ripped too. But differently because of a seg fault (loughs) */
if (u->Account()->HasFlag(NI_MEMO_RECEIVE) && u->Account()->HasFlag(NI_MEMO_SIGNON))
- source.Reply(MEMO_INFO_NOTIFY_ON);
+ source.Reply(_("You will be notified of new memos at logon and when they arrive."));
else if (u->Account()->HasFlag(NI_MEMO_RECEIVE))
- source.Reply(MEMO_INFO_NOTIFY_RECEIVE);
+ source.Reply(_("You will be notified when new memos arrive."));
else if (u->Account()->HasFlag(NI_MEMO_SIGNON))
- source.Reply(MEMO_INFO_NOTIFY_SIGNON);
+ source.Reply(_("You will be notified of new memos at logon."));
else
- source.Reply(MEMO_INFO_NOTIFY_OFF);
+ source.Reply(_("You will not be notified of new memos."));
}
return MOD_CONT;
}
@@ -190,16 +190,31 @@ class CommandMSInfo : public Command
{
User *u = source.u;
if (u->Account() && u->Account()->IsServicesOper())
- source.Reply(MEMO_SERVADMIN_HELP_INFO);
+ source.Reply(_("Syntax: \002INFO [\037nick\037 | \037channel\037]\002\n"
+ "Without a parameter, displays information on the number of\n"
+ "memos you have, how many of them are unread, and how many\n"
+ "total memos you can receive.\n"
+ " \n"
+ "With a channel parameter, displays the same information for\n"
+ "the given channel.\n"
+ " \n"
+ "With a nickname parameter, displays the same information\n"
+ "for the given nickname. This use limited to \002Services\n"
+ "admins\002."));
else
- source.Reply(MEMO_HELP_INFO);
+ source.Reply(_("Syntax: \002INFO [\037channel\037]\002\n"
+ " \n"
+ "Displays information on the number of memos you have, how\n"
+ "many of them are unread, and how many total memos you can\n"
+ "receive. With a parameter, displays the same information\n"
+ "for the given channel."));
return true;
}
void OnServHelp(CommandSource &source)
{
- source.Reply(MEMO_HELP_CMD_INFO);
+ source.Reply(_(" INFO Displays information about your memos"));
}
};
diff --git a/modules/core/ms_list.cpp b/modules/core/ms_list.cpp
index 1b797dc2b..d00e9bd27 100644
--- a/modules/core/ms_list.cpp
+++ b/modules/core/ms_list.cpp
@@ -33,11 +33,11 @@ class MemoListCallback : public NumberList
{
SentHeader = true;
if (ci)
- source.Reply(MEMO_LIST_CHAN_MEMOS, ci->name.c_str(), Config->s_MemoServ.c_str(), ci->name.c_str());
+ source.Reply(_("Memos for %s. To read, type: \002%R%s READ %s \037num\037\002"), ci->name.c_str(), Config->s_MemoServ.c_str(), ci->name.c_str());
else
- source.Reply(MEMO_LIST_MEMOS, source.u->nick.c_str(), Config->s_MemoServ.c_str());
+ source.Reply(_("Memos for %s. To read, type: \002%R%s READ \037num\037\002"), source.u->nick.c_str(), Config->s_MemoServ.c_str());
- source.Reply(MEMO_LIST_HEADER);
+ source.Reply(_(" Num Sender Date/Time"));
}
DoList(source, mi, Number - 1);
@@ -46,7 +46,7 @@ class MemoListCallback : public NumberList
static void DoList(CommandSource &source, const MemoInfo *mi, unsigned index)
{
Memo *m = mi->memos[index];
- source.Reply(MEMO_LIST_FORMAT, (m->HasFlag(MF_UNREAD)) ? '*' : ' ', index + 1, m->sender.c_str(), do_strftime(m->time).c_str());
+ source.Reply(_("%c%3d %-16s %s"), (m->HasFlag(MF_UNREAD)) ? '*' : ' ', index + 1, m->sender.c_str(), do_strftime(m->time).c_str());
}
};
@@ -73,12 +73,12 @@ class CommandMSList : public Command
if (!(ci = cs_findchan(chan)))
{
- source.Reply(CHAN_X_NOT_REGISTERED, chan.c_str());
+ source.Reply(LanguageString::CHAN_X_NOT_REGISTERED, chan.c_str());
return MOD_CONT;
}
else if (!check_access(u, ci, CA_MEMO))
{
- source.Reply(ACCESS_DENIED);
+ source.Reply(LanguageString::ACCESS_DENIED);
return MOD_CONT;
}
mi = &ci->memos;
@@ -90,9 +90,9 @@ class CommandMSList : public Command
else if (!mi->memos.size())
{
if (!chan.empty())
- source.Reply(MEMO_X_HAS_NO_MEMOS, chan.c_str());
+ source.Reply(LanguageString::MEMO_X_HAS_NO_MEMOS, chan.c_str());
else
- source.Reply(MEMO_HAVE_NO_MEMOS);
+ source.Reply(LanguageString::MEMO_HAVE_NO_MEMOS);
}
else
{
@@ -111,9 +111,9 @@ class CommandMSList : public Command
if (i == end)
{
if (!chan.empty())
- source.Reply(MEMO_X_HAS_NO_NEW_MEMOS, chan.c_str());
+ source.Reply(LanguageString::MEMO_X_HAS_NO_NEW_MEMOS, chan.c_str());
else
- source.Reply(MEMO_HAVE_NO_NEW_MEMOS);
+ source.Reply(LanguageString::MEMO_HAVE_NO_NEW_MEMOS);
return MOD_CONT;
}
}
@@ -129,10 +129,10 @@ class CommandMSList : public Command
{
SentHeader = true;
if (ci)
- source.Reply(!param.empty() ? MEMO_LIST_CHAN_NEW_MEMOS : MEMO_LIST_CHAN_MEMOS, ci->name.c_str(), Config->s_MemoServ.c_str(), ci->name.c_str());
+ source.Reply(!param.empty() ? _("New memos for %s. To read, type: \002%R%s READ %s \037num\037\002") : _("Memos for %s. To read, type: \002%R%s READ %s \037num\037\002"), ci->name.c_str(), Config->s_MemoServ.c_str(), ci->name.c_str());
else
- source.Reply(!param.empty() ? MEMO_LIST_NEW_MEMOS : MEMO_LIST_MEMOS, u->nick.c_str(), Config->s_MemoServ.c_str());
- source.Reply(MEMO_LIST_HEADER);
+ source.Reply(!param.empty() ? _("New memos for %s. To read, type: \002%R%s READ \037num\037\002") : _("Memos for %s. To read, type: \002%R%s READ \037num\037\002"), u->nick.c_str(), Config->s_MemoServ.c_str());
+ source.Reply(_(" Num Sender Date/Time"));
}
MemoListCallback::DoList(source, mi, i);
@@ -144,18 +144,25 @@ class CommandMSList : public Command
bool OnHelp(CommandSource &source, const Anope::string &subcommand)
{
- source.Reply(MEMO_HELP_LIST);
+ source.Reply(_("Syntax: \002LIST [\037channel\037] [\037list\037 | NEW]\002\n"
+ " \n"
+ "Lists any memos you currently have. With \002NEW\002, lists only\n"
+ "new (unread) memos. Unread memos are marked with a \"*\"\n"
+ "to the left of the memo number. You can also specify a list\n"
+ "of numbers, as in the example below:\n"
+ " \002LIST 2-5,7-9\002\n"
+ " Lists memos numbered 2 through 5 and 7 through 9."));
return true;
}
void OnSyntaxError(CommandSource &source, const Anope::string &subcommand)
{
- SyntaxError(source, "LIST", MEMO_LIST_SYNTAX);
+ SyntaxError(source, "LIST", _("LIST [\037channel\037] [\037list\037 | NEW]"));
}
void OnServCommand(CommandSource &source)
{
- source.Reply(MEMO_HELP_CMD_LIST);
+ source.Reply(_(" LIST List your memos"));
}
};
diff --git a/modules/core/ms_read.cpp b/modules/core/ms_read.cpp
index c381349bb..181b376f1 100644
--- a/modules/core/ms_read.cpp
+++ b/modules/core/ms_read.cpp
@@ -34,10 +34,10 @@ class MemoListCallback : public NumberList
{
Memo *m = mi->memos[index];
if (ci)
- source.Reply(MEMO_CHAN_HEADER, index + 1, m->sender.c_str(), do_strftime(m->time).c_str(), Config->s_MemoServ.c_str(), ci->name.c_str(), index + 1);
+ source.Reply(_("Memo %d from %s (%s). To delete, type: \002%R%s DEL %s %d\002"), index + 1, m->sender.c_str(), do_strftime(m->time).c_str(), Config->s_MemoServ.c_str(), ci->name.c_str(), index + 1);
else
- source.Reply(MEMO_HEADER, index + 1, m->sender.c_str(), do_strftime(m->time).c_str(), Config->s_MemoServ.c_str(), index + 1);
- source.Reply(MEMO_TEXT, m->text.c_str());
+ source.Reply(_("Memo %d from %s (%s). To delete, type: \002%R%s DEL %d\002"), index + 1, m->sender.c_str(), do_strftime(m->time).c_str(), Config->s_MemoServ.c_str(), index + 1);
+ source.Reply("%s", m->text.c_str());
m->UnsetFlag(MF_UNREAD);
/* Check if a receipt notification was requested */
@@ -68,12 +68,12 @@ class CommandMSRead : public Command
if (!(ci = cs_findchan(chan)))
{
- source.Reply(CHAN_X_NOT_REGISTERED, chan.c_str());
+ source.Reply(LanguageString::CHAN_X_NOT_REGISTERED, chan.c_str());
return MOD_CONT;
}
else if (!check_access(u, ci, CA_MEMO))
{
- source.Reply(ACCESS_DENIED);
+ source.Reply(LanguageString::ACCESS_DENIED);
return MOD_CONT;
}
mi = &ci->memos;
@@ -86,9 +86,9 @@ class CommandMSRead : public Command
else if (mi->memos.empty())
{
if (!chan.empty())
- source.Reply(MEMO_X_HAS_NO_MEMOS, chan.c_str());
+ source.Reply(LanguageString::MEMO_X_HAS_NO_MEMOS, chan.c_str());
else
- source.Reply(MEMO_HAVE_NO_MEMOS);
+ source.Reply(LanguageString::MEMO_HAVE_NO_MEMOS);
}
else
{
@@ -106,9 +106,9 @@ class CommandMSRead : public Command
if (!readcount)
{
if (!chan.empty())
- source.Reply(MEMO_X_HAS_NO_NEW_MEMOS, chan.c_str());
+ source.Reply(LanguageString::MEMO_X_HAS_NO_NEW_MEMOS, chan.c_str());
else
- source.Reply(MEMO_HAVE_NO_NEW_MEMOS);
+ source.Reply(LanguageString::MEMO_HAVE_NO_NEW_MEMOS);
}
}
else if (numstr.equals_ci("LAST"))
@@ -127,18 +127,27 @@ class CommandMSRead : public Command
bool OnHelp(CommandSource &source, const Anope::string &subcommand)
{
- source.Reply(MEMO_HELP_READ);
+ source.Reply(_("Syntax: \002READ [\037channel\037] {\037num\037 | \037list\037 | LAST | NEW}\002\n"
+ " \n"
+ "Sends you the text of the memos specified. If LAST is\n"
+ "given, sends you the memo you most recently received. If\n"
+ "NEW is given, sends you all of your new memos. Otherwise,\n"
+ "sends you memo number \037num\037. You can also give a list of\n"
+ "numbers, as in this example:\n"
+ " \n"
+ " \002READ 2-5,7-9\002\n"
+ " Displays memos numbered 2 through 5 and 7 through 9."));
return true;
}
void OnSyntaxError(CommandSource &source, const Anope::string &subcommand)
{
- SyntaxError(source, "READ", MEMO_READ_SYNTAX);
+ SyntaxError(source, "READ", _("READ [\037channel\037] {\037list\037 | LAST | NEW}"));
}
void OnServHelp(CommandSource &source)
{
- source.Reply(MEMO_HELP_CMD_READ);
+ source.Reply(_(" READ Read a memo or memos"));
}
};
diff --git a/modules/core/ms_rsend.cpp b/modules/core/ms_rsend.cpp
index 9f105a1ff..3fec2f8b7 100644
--- a/modules/core/ms_rsend.cpp
+++ b/modules/core/ms_rsend.cpp
@@ -31,7 +31,7 @@ class CommandMSRSend : public Command
/* prevent user from rsend to themselves */
if ((na = findnick(nick)) && na->nc == u->Account())
{
- source.Reply(MEMO_NO_RSEND_SELF);
+ source.Reply(_("You can not request a receipt when sending a memo to yourself."));
return MOD_CONT;
}
@@ -41,7 +41,7 @@ class CommandMSRSend : public Command
if (u->Account()->IsServicesOper())
memo_send(source, nick, text, 3);
else
- source.Reply(ACCESS_DENIED);
+ source.Reply(LanguageString::ACCESS_DENIED);
}
else if (Config->MSMemoReceipt == 2)
/* Everybody can use rsend */
@@ -50,7 +50,7 @@ class CommandMSRSend : public Command
{
/* rsend has been disabled */
Log() << "MSMemoReceipt is set misconfigured to " << Config->MSMemoReceipt;
- source.Reply(MEMO_RSEND_DISABLED);
+ source.Reply(_("Sorry, RSEND has been disabled on this network."));
}
return MOD_CONT;
@@ -58,18 +58,26 @@ class CommandMSRSend : public Command
bool OnHelp(CommandSource &source, const Anope::string &subcommand)
{
- source.Reply(MEMO_HELP_RSEND);
+ source.Reply(_("Syntax: \002RSEND {\037nick\037 | \037channel\037} \037memo-text\037\002\n"
+ " \n"
+ "Sends the named \037nick\037 or \037channel\037 a memo containing\n"
+ "\037memo-text\037. When sending to a nickname, the recipient will\n"
+ "receive a notice that he/she has a new memo. The target\n"
+ "nickname/channel must be registered.\n"
+ "Once the memo is read by its recipient, an automatic notification\n"
+ "memo will be sent to the sender informing him/her that the memo\n"
+ "has been read."));
return true;
}
void OnSyntaxError(CommandSource &source, const Anope::string &subcommand)
{
- SyntaxError(source, "RSEND", MEMO_RSEND_SYNTAX);
+ SyntaxError(source, "RSEND", _("RSEND {\037nick\037 | \037channel\037} \037memo-text\037"));
}
void OnServHelp(CommandSource &source)
{
- source.Reply(MEMO_HELP_CMD_RSEND);
+ source.Reply(_(" RSEND Sends a memo and requests a read receipt"));
}
};
diff --git a/modules/core/ms_send.cpp b/modules/core/ms_send.cpp
index 467f62048..f368138e6 100644
--- a/modules/core/ms_send.cpp
+++ b/modules/core/ms_send.cpp
@@ -30,18 +30,23 @@ class CommandMSSend : public Command
bool OnHelp(CommandSource &source, const Anope::string &subcommand)
{
- source.Reply(MEMO_HELP_SEND);
+ source.Reply(_("Syntax: \002SEND {\037nick\037 | \037channel\037} \037memo-text\037\002\n"
+ " \n"
+ "Sends the named \037nick\037 or \037channel\037 a memo containing\n"
+ "\037memo-text\037. When sending to a nickname, the recipient will\n"
+ "receive a notice that he/she has a new memo. The target\n"
+ "nickname/channel must be registered."));
return true;
}
void OnSyntaxError(CommandSource &source, const Anope::string &subcommand)
{
- SyntaxError(source, "SEND", MEMO_SEND_SYNTAX);
+ SyntaxError(source, "SEND", LanguageString::MEMO_SEND_SYNTAX);
}
void OnServHelp(CommandSource &source)
{
- source.Reply(MEMO_HELP_CMD_SEND);
+ source.Reply(_(" SEND Send a memo to a nick or channel"));
}
};
diff --git a/modules/core/ms_sendall.cpp b/modules/core/ms_sendall.cpp
index 8c31d1013..1d2a703c3 100644
--- a/modules/core/ms_sendall.cpp
+++ b/modules/core/ms_sendall.cpp
@@ -27,7 +27,7 @@ class CommandMSSendAll : public Command
if (readonly)
{
- source.Reply(MEMO_SEND_DISABLED);
+ source.Reply(LanguageString::MEMO_SEND_DISABLED);
return MOD_CONT;
}
@@ -41,24 +41,25 @@ class CommandMSSendAll : public Command
memo_send(source, nc->display, text, 1);
}
- source.Reply(MEMO_MASS_SENT);
+ source.Reply(_("A massmemo has been sent to all registered users."));
return MOD_CONT;
}
bool OnHelp(CommandSource &source, const Anope::string &subcommand)
{
- source.Reply(MEMO_HELP_SENDALL);
+ source.Reply(_("Syntax: \002SENDALL\002 \002memo-text\002\n \n"
+ "Sends all registered users a memo containing \037memo-text\037."));
return true;
}
void OnSyntaxError(CommandSource &source, const Anope::string &subcommand)
{
- SyntaxError(source, "SENDALL", MEMO_SENDALL_SYNTAX);
+ SyntaxError(source, "SENDALL", _("SENDALL \037memo-text\037"));
}
void OnServHelp(CommandSource &source)
{
- source.Reply(MEMO_HELP_CMD_SENDALL);
+ source.Reply(_(" SENDALL Send a memo to all registered users"));
}
};
diff --git a/modules/core/ms_set.cpp b/modules/core/ms_set.cpp
index e297adaf4..f5602b835 100644
--- a/modules/core/ms_set.cpp
+++ b/modules/core/ms_set.cpp
@@ -25,44 +25,44 @@ class CommandMSSet : public Command
{
u->Account()->SetFlag(NI_MEMO_SIGNON);
u->Account()->SetFlag(NI_MEMO_RECEIVE);
- source.Reply(MEMO_SET_NOTIFY_ON, Config->s_MemoServ.c_str());
+ source.Reply(_("%s will now notify you of memos when you log on and when they are sent to you."), Config->s_MemoServ.c_str());
}
else if (param.equals_ci("LOGON"))
{
u->Account()->SetFlag(NI_MEMO_SIGNON);
u->Account()->UnsetFlag(NI_MEMO_RECEIVE);
- source.Reply(MEMO_SET_NOTIFY_LOGON, Config->s_MemoServ.c_str());
+ source.Reply(_("%s will now notify you of memos when you log on or unset /AWAY."), Config->s_MemoServ.c_str());
}
else if (param.equals_ci("NEW"))
{
u->Account()->UnsetFlag(NI_MEMO_SIGNON);
u->Account()->SetFlag(NI_MEMO_RECEIVE);
- source.Reply(MEMO_SET_NOTIFY_NEW, Config->s_MemoServ.c_str());
+ source.Reply(_("%s will now notify you of memos when they are sent to you."), Config->s_MemoServ.c_str());
}
else if (param.equals_ci("MAIL"))
{
if (!u->Account()->email.empty())
{
u->Account()->SetFlag(NI_MEMO_MAIL);
- source.Reply(MEMO_SET_NOTIFY_MAIL);
+ source.Reply(_("You will now be informed about new memos via email."));
}
else
- source.Reply(MEMO_SET_NOTIFY_INVALIDMAIL);
+ source.Reply(_("There's no email address set for your nick."));
}
else if (param.equals_ci("NOMAIL"))
{
u->Account()->UnsetFlag(NI_MEMO_MAIL);
- source.Reply(MEMO_SET_NOTIFY_NOMAIL);
+ source.Reply(_("You will no longer be informed via email."));
}
else if (param.equals_ci("OFF"))
{
u->Account()->UnsetFlag(NI_MEMO_SIGNON);
u->Account()->UnsetFlag(NI_MEMO_RECEIVE);
u->Account()->UnsetFlag(NI_MEMO_MAIL);
- source.Reply(MEMO_SET_NOTIFY_OFF, Config->s_MemoServ.c_str());
+ source.Reply(_("%s will not send you any notification of memos."), Config->s_MemoServ.c_str());
}
else
- SyntaxError(source, "SET NOTIFY", MEMO_SET_NOTIFY_SYNTAX);
+ SyntaxError(source, "SET NOTIFY", _("SET NOTIFY {ON | LOGON | NEW | MAIL | NOMAIL | OFF }"));
return MOD_CONT;
}
@@ -88,12 +88,12 @@ class CommandMSSet : public Command
p3 = params.size() > 4 ? params[4] : "";
if (!(ci = cs_findchan(chan)))
{
- source.Reply(CHAN_X_NOT_REGISTERED, chan.c_str());
+ source.Reply(LanguageString::CHAN_X_NOT_REGISTERED, chan.c_str());
return MOD_CONT;
}
else if (!is_servadmin && !check_access(u, ci, CA_MEMO))
{
- source.Reply(ACCESS_DENIED);
+ source.Reply(LanguageString::ACCESS_DENIED);
return MOD_CONT;
}
mi = &ci->memos;
@@ -105,7 +105,7 @@ class CommandMSSet : public Command
NickAlias *na;
if (!(na = findnick(p1)))
{
- source.Reply(NICK_X_NOT_REGISTERED, p1.c_str());
+ source.Reply(LanguageString::NICK_X_NOT_REGISTERED, p1.c_str());
return MOD_CONT;
}
user = p1;
@@ -114,14 +114,9 @@ class CommandMSSet : public Command
p1 = p2;
p2 = p3;
}
- else if (p1.empty())
+ else if (p1.empty() || (!isdigit(p1[0]) && !p1.equals_ci("NONE")) || (!p2.empty() && !p2.equals_ci("HARD")))
{
- SyntaxError(source, "SET LIMIT", MEMO_SET_LIMIT_SERVADMIN_SYNTAX);
- return MOD_CONT;
- }
- if ((!isdigit(p1[0]) && !p1.equals_ci("NONE")) || (!p2.empty() && !p2.equals_ci("HARD")))
- {
- SyntaxError(source, "SET LIMIT", MEMO_SET_LIMIT_SERVADMIN_SYNTAX);
+ SyntaxError(source, "SET LIMIT", _("SET LIMIT [\037user\037 | \037channel\037] {\037limit\037 | NONE} [HARD]"));
return MOD_CONT;
}
if (!chan.empty())
@@ -141,7 +136,7 @@ class CommandMSSet : public Command
limit = p1.is_pos_number_only() ? convertTo<int32>(p1) : -1;
if (limit < 0 || limit > 32767)
{
- source.Reply(MEMO_SET_LIMIT_OVERFLOW, 32767);
+ source.Reply(_("Memo limit too large; limiting to %d instead."), 32767);
limit = 32767;
}
if (p1.equals_ci("NONE"))
@@ -151,17 +146,17 @@ class CommandMSSet : public Command
{
if (p1.empty() || !p2.empty() || !isdigit(p1[0]))
{
- SyntaxError(source, "SET LIMIT", MEMO_SET_LIMIT_SYNTAX);
+ SyntaxError(source, "SET LIMIT", _("SET LIMIT [\037channel\037] \037limit\037"));
return MOD_CONT;
}
if (!chan.empty() && ci->HasFlag(CI_MEMO_HARDMAX))
{
- source.Reply(MEMO_SET_LIMIT_FORBIDDEN, chan.c_str());
+ source.Reply(_("The memo limit for %s may not be changed."), chan.c_str());
return MOD_CONT;
}
else if (chan.empty() && nc->HasFlag(NI_MEMO_HARDMAX))
{
- source.Reply(MEMO_SET_YOUR_LIMIT_FORBIDDEN);
+ source.Reply(_("You are not permitted to change your memo limit."));
return MOD_CONT;
}
limit = p1.is_pos_number_only() ? convertTo<int32>(p1) : -1;
@@ -170,14 +165,14 @@ class CommandMSSet : public Command
if (limit < 0 || (Config->MSMaxMemos > 0 && static_cast<unsigned>(limit) > Config->MSMaxMemos))
{
if (!chan.empty())
- source.Reply(MEMO_SET_LIMIT_TOO_HIGH, chan.c_str(), Config->MSMaxMemos);
+ source.Reply(_("You cannot set the memo limit for %s higher than %d."), chan.c_str(), Config->MSMaxMemos);
else
- source.Reply(MEMO_SET_YOUR_LIMIT_TOO_HIGH, Config->MSMaxMemos);
+ source.Reply(_("You cannot set your memo limit higher than %d."), Config->MSMaxMemos);
return MOD_CONT;
}
else if (limit > 32767)
{
- source.Reply(MEMO_SET_LIMIT_OVERFLOW, 32767);
+ source.Reply(_("Memo limit too large; limiting to %d instead."), 32767);
limit = 32767;
}
}
@@ -185,23 +180,23 @@ class CommandMSSet : public Command
if (limit > 0)
{
if (chan.empty() && nc == u->Account())
- source.Reply(MEMO_SET_YOUR_LIMIT, limit);
+ source.Reply(_("Your memo limit has been set to \002%d\002."), limit);
else
- source.Reply(MEMO_SET_LIMIT, !chan.empty() ? chan.c_str() : user.c_str(), limit);
+ source.Reply(_("Memo limit for %s set to \002%d\002."), !chan.empty() ? chan.c_str() : user.c_str(), limit);
}
else if (!limit)
{
if (chan.empty() && nc == u->Account())
- source.Reply(MEMO_SET_YOUR_LIMIT_ZERO);
+ source.Reply(_("You will no longer be able to receive memos."));
else
- source.Reply(MEMO_SET_LIMIT_ZERO, !chan.empty() ? chan.c_str() : user.c_str());
+ source.Reply(_("Memo limit for %s set to \0020\002."), !chan.empty() ? chan.c_str() : user.c_str());
}
else
{
if (chan.empty() && nc == u->Account())
- source.Reply(MEMO_UNSET_YOUR_LIMIT);
+ source.Reply(_("Your memo limit has been disabled."));
else
- source.Reply(MEMO_UNSET_LIMIT, !chan.empty() ? chan.c_str() : user.c_str());
+ source.Reply(_("Memo limit \002disabled\002 for %s."), !chan.empty() ? chan.c_str() : user.c_str());
}
return MOD_CONT;
}
@@ -217,15 +212,15 @@ class CommandMSSet : public Command
MemoInfo *mi = &u->Account()->memos;
if (readonly)
- source.Reply(MEMO_SET_DISABLED);
+ source.Reply(_("Sorry, memo option setting is temporarily disabled."));
else if (cmd.equals_ci("NOTIFY"))
return this->DoNotify(source, params, mi);
else if (cmd.equals_ci("LIMIT"))
return this->DoLimit(source, params, mi);
else
{
- source.Reply(NICK_SET_UNKNOWN_OPTION, cmd.c_str());
- source.Reply(MORE_INFO, Config->s_MemoServ.c_str(), "SET");
+ source.Reply(LanguageString::NICK_SET_UNKNOWN_OPTION, cmd.c_str());
+ source.Reply(LanguageString::MORE_INFO, Config->s_MemoServ.c_str(), "SET");
}
return MOD_CONT;
@@ -234,16 +229,62 @@ class CommandMSSet : public Command
bool OnHelp(CommandSource &source, const Anope::string &subcommand)
{
if (subcommand.empty())
- source.Reply(MEMO_HELP_SET);
+ source.Reply(_("Syntax: \002SET \037option\037 \037parameters\037\002\n \n"
+ "Sets various memo options. \037option\037 can be one of:\n"
+ " \n"
+ " NOTIFY Changes when you will be notified about\n"
+ " new memos (only for nicknames)\n"
+ " LIMIT Sets the maximum number of memos you can\n"
+ " receive\n"
+ " \n"
+ "Type \002%R%S HELP SET \037option\037\002 for more information\n"
+ "on a specific option."));
else if (subcommand.equals_ci("NOTIFY"))
- source.Reply(MEMO_HELP_SET_NOTIFY);
+ source.Reply(_("Syntax: \002SET NOTIFY {ON | LOGON | NEW | MAIL | NOMAIL | OFF}\002\n"
+ "Changes when you will be notified about new memos:\n"
+ " \n"
+ " ON You will be notified of memos when you log on,\n"
+ " when you unset /AWAY, and when they are sent\n"
+ " to you.\n"
+ " LOGON You will only be notified of memos when you log\n"
+ " on or when you unset /AWAY.\n"
+ " NEW You will only be notified of memos when they\n"
+ " are sent to you.\n"
+ " MAIL You will be notified of memos by email aswell as\n"
+ " any other settings you have.\n"
+ " NOMAIL You will not be notified of memos by email.\n"
+ " OFF You will not receive any notification of memos.\n"
+ " \n"
+ "\002ON\002 is essentially \002LOGON\002 and \002NEW\002 combined."));
else if (subcommand.equals_ci("LIMIT"))
{
User *u = source.u;
if (u->Account() && u->Account()->IsServicesOper())
- source.Reply(MEMO_SERVADMIN_HELP_SET_LIMIT, Config->MSMaxMemos);
+ source.Reply(_("Syntax: \002SET LIMIT [\037user\037 | \037channel\037] {\037limit\037 | NONE} [HARD]\002\n"
+ " \n"
+ "Sets the maximum number of memos a user or channel is\n"
+ "allowed to have. Setting the limit to 0 prevents the user\n"
+ "from receiving any memos; setting it to \002NONE\002 allows the\n"
+ "user to receive and keep as many memos as they want. If\n"
+ "you do not give a nickname or channel, your own limit is\n"
+ "set.\n"
+ " \n"
+ "Adding \002HARD\002 prevents the user from changing the limit. Not\n"
+ "adding \002HARD\002 has the opposite effect, allowing the user to\n"
+ "change the limit (even if a previous limit was set with\n"
+ "\002HARD\002).\n"
+ "This use of the \002SET LIMIT\002 command is limited to \002Services\002\n"
+ "\002admins\002. Other users may only enter a limit for themselves\n"
+ "or a channel on which they have such privileges, may not\n"
+ "remove their limit, may not set a limit above %d, and may\n"
+ "not set a hard limit."), Config->MSMaxMemos);
else
- source.Reply(MEMO_HELP_SET_LIMIT, Config->MSMaxMemos);
+ source.Reply(_("Syntax: \002SET LIMIT [\037channel\037] \037limit\037\002\n"
+ " \n"
+ "Sets the maximum number of memos you (or the given channel)\n"
+ "are allowed to have. If you set this to 0, no one will be\n"
+ "able to send any memos to you. However, you cannot set\n"
+ "this any higher than %d."), Config->MSMaxMemos);
}
else
return false;
@@ -253,12 +294,12 @@ class CommandMSSet : public Command
void OnSyntaxError(CommandSource &source, const Anope::string &subcommand)
{
- SyntaxError(source, "SET", NICK_SET_SYNTAX);
+ SyntaxError(source, "SET", LanguageString::NICK_SET_SYNTAX);
}
void OnServHelp(CommandSource &source)
{
- source.Reply(MEMO_HELP_CMD_SET);
+ source.Reply(_(" SET Set options related to memos"));
}
};
diff --git a/modules/core/ms_staff.cpp b/modules/core/ms_staff.cpp
index 414694292..a1c232870 100644
--- a/modules/core/ms_staff.cpp
+++ b/modules/core/ms_staff.cpp
@@ -26,7 +26,7 @@ class CommandMSStaff : public Command
if (readonly)
{
- source.Reply(MEMO_SEND_DISABLED);
+ source.Reply(LanguageString::MEMO_SEND_DISABLED);
return MOD_CONT;
}
@@ -43,18 +43,21 @@ class CommandMSStaff : public Command
bool OnHelp(CommandSource &source, const Anope::string &subcommand)
{
- source.Reply(MEMO_HELP_STAFF);
+ source.Reply(_("Syntax: \002STAFF\002 \002memo-text\002\n"
+ " \n"
+ "Sends all services staff a memo containing \037memo-text\037."));
+
return true;
}
void OnSyntaxError(CommandSource &source, const Anope::string &subcommand)
{
- SyntaxError(source, "STAFF", MEMO_STAFF_SYNTAX);
+ SyntaxError(source, "STAFF", _("STAFF \037memo-text\037"));
}
void OnServHelp(CommandSource &source)
{
- source.Reply(MEMO_HELP_CMD_STAFF);
+ source.Reply(_(" STAFF Send a memo to all opers/admins"));
}
};
diff --git a/modules/core/ns_access.cpp b/modules/core/ns_access.cpp
index 1d7ed4491..e7c0c3f90 100644
--- a/modules/core/ns_access.cpp
+++ b/modules/core/ns_access.cpp
@@ -23,17 +23,17 @@ class CommandNSAccess : public Command
if (nc->access.empty())
{
- source.Reply(NICK_ACCESS_LIST_X_EMPTY, nc->display.c_str());
+ source.Reply(_("Access list for \002%s\002 is empty."), nc->display.c_str());
return MOD_CONT;
}
if (nc->HasFlag(NI_SUSPENDED))
{
- source.Reply(NICK_X_SUSPENDED, nc->display.c_str());
+ source.Reply(LanguageString::NICK_X_SUSPENDED, nc->display.c_str());
return MOD_CONT;
}
- source.Reply(NICK_ACCESS_LIST_X, params[1].c_str());
+ source.Reply(_("Access list for \002%s\002:"), params[1].c_str());
for (i = 0, end = nc->access.size(); i < end; ++i)
{
Anope::string access = nc->GetAccess(i);
@@ -56,18 +56,18 @@ class CommandNSAccess : public Command
if (nc->access.size() >= Config->NSAccessMax)
{
- source.Reply(NICK_ACCESS_REACHED_LIMIT, Config->NSAccessMax);
+ source.Reply(_("Sorry, you can only have %d access entries for a nickname."), Config->NSAccessMax);
return MOD_CONT;
}
if (nc->FindAccess(mask))
{
- source.Reply(NICK_ACCESS_ALREADY_PRESENT, mask.c_str());
+ source.Reply(_("Mask \002%s\002 already present on your access list."), mask.c_str());
return MOD_CONT;
}
nc->AddAccess(mask);
- source.Reply(NICK_ACCESS_ADDED, mask.c_str());
+ source.Reply(_("\002%s\002 added to your access list."), mask.c_str());
return MOD_CONT;
}
@@ -82,11 +82,11 @@ class CommandNSAccess : public Command
if (!nc->FindAccess(mask))
{
- source.Reply(NICK_ACCESS_NOT_FOUND, mask.c_str());
+ source.Reply(_("\002%s\002 not found on your access list."), mask.c_str());
return MOD_CONT;
}
- source.Reply(NICK_ACCESS_DELETED, mask.c_str());
+ source.Reply(_("\002%s\002 deleted from your access list."), mask.c_str());
nc->EraseAccess(mask);
return MOD_CONT;
@@ -99,11 +99,11 @@ class CommandNSAccess : public Command
if (nc->access.empty())
{
- source.Reply(NICK_ACCESS_LIST_EMPTY, u->nick.c_str());
+ source.Reply(_("Your access list is empty."), u->nick.c_str());
return MOD_CONT;
}
- source.Reply(NICK_ACCESS_LIST);
+ source.Reply(_("Access list:"));
for (i = 0, end = nc->access.size(); i < end; ++i)
{
Anope::string access = nc->GetAccess(i);
@@ -131,11 +131,11 @@ class CommandNSAccess : public Command
if (!mask.empty() && mask.find('@') == Anope::string::npos)
{
- source.Reply(BAD_USERHOST_MASK);
- source.Reply(MORE_INFO, Config->s_NickServ.c_str(), "ACCESS");
+ source.Reply(LanguageString::BAD_USERHOST_MASK);
+ source.Reply(LanguageString::MORE_INFO, Config->s_NickServ.c_str(), "ACCESS");
}
else if (u->Account()->HasFlag(NI_SUSPENDED))
- source.Reply(NICK_X_SUSPENDED, u->Account()->display.c_str());
+ source.Reply(LanguageString::NICK_X_SUSPENDED, u->Account()->display.c_str());
else if (cmd.equals_ci("ADD"))
return this->DoAdd(source, u->Account(), mask);
else if (cmd.equals_ci("DEL"))
@@ -150,18 +150,39 @@ class CommandNSAccess : public Command
bool OnHelp(CommandSource &source, const Anope::string &subcommand)
{
- source.Reply(NICK_HELP_ACCESS);
+ source.Reply(_("Syntax: \002ACCESS ADD \037mask\037\002\n"
+ " \002ACCESS DEL \037mask\037\002\n"
+ " \002ACCESS LIST\002\n"
+ " \n"
+ "Modifies or displays the access list for your nick. This\n"
+ "is the list of addresses which will be automatically\n"
+ "recognized by %S as allowed to use the nick. If\n"
+ "you want to use the nick from a different address, you\n"
+ "need to send an \002IDENTIFY\002 command to make %S\n"
+ "recognize you.\n"
+ " \n"
+ "Examples:\n"
+ " \n"
+ " \002ACCESS ADD anyone@*.bepeg.com\002\n"
+ " Allows access to user \002anyone\002 from any machine in\n"
+ " the \002bepeg.com\002 domain.\n"
+ " \n"
+ " \002ACCESS DEL anyone@*.bepeg.com\002\n"
+ " Reverses the previous command.\n"
+ " \n"
+ " \002ACCESS LIST\002\n"
+ " Displays the current access list."));
return true;
}
void OnSyntaxError(CommandSource &source, const Anope::string &subcommand)
{
- SyntaxError(source, "ACCESS", NICK_ACCESS_SYNTAX);
+ SyntaxError(source, "ACCESS", _("ACCESS {ADD | DEL | LIST} [\037mask\037]"));
}
void OnServHelp(CommandSource &source)
{
- source.Reply(NICK_HELP_CMD_ACCESS);
+ source.Reply(_(" ACCESS Modify the list of authorized addresses"));
}
};
diff --git a/modules/core/ns_ajoin.cpp b/modules/core/ns_ajoin.cpp
index 29ddfab46..db1d0f960 100644
--- a/modules/core/ns_ajoin.cpp
+++ b/modules/core/ns_ajoin.cpp
@@ -21,10 +21,11 @@ class CommandNSAJoin : public Command
source.u->Account()->GetExtRegular("ns_ajoin_channels", channels);
if (channels.empty())
- source.Reply(NICK_AJOIN_LIST_EMPTY);
+ source.Reply(_("Your auto join list is empty."));
else
{
- source.Reply(NICK_AJOIN_LIST_HEAD);
+ source.Reply(_("Your auto join list:\n"
+ " Num Channel Key"));
for (unsigned i = 0; i < channels.size(); ++i)
source.Reply(" %3d %-12s %s", i + 1, channels[i].first.c_str(), channels[i].second.c_str());
}
@@ -36,13 +37,13 @@ class CommandNSAJoin : public Command
source.u->Account()->GetExtRegular("ns_ajoin_channels", channels);
if (channels.size() >= Config->AJoinMax)
- source.Reply(NICK_AJOIN_LIST_FULL);
+ source.Reply(_("Your auto join list is full."));
else if (ircdproto->IsChannelValid(params[1]) == false)
- source.Reply(CHAN_X_INVALID, params[1].c_str());
+ source.Reply(LanguageString::CHAN_X_INVALID, params[1].c_str());
else
{
channels.push_back(std::make_pair(params[1], params.size() > 2 ? params[2] : ""));
- source.Reply(NICK_AJOIN_ADDED, params[1].c_str());
+ source.Reply(_("Added %s to your auto join list."), params[1].c_str());
source.u->Account()->Extend("ns_ajoin_channels", new ExtensibleItemRegular<std::vector<
std::pair<Anope::string, Anope::string> > >(channels));
}
@@ -59,13 +60,13 @@ class CommandNSAJoin : public Command
break;
if (i == channels.size())
- source.Reply(NICK_AJOIN_NOTFOUND, params[1].c_str());
+ source.Reply(_("%s was not found on your auto join list."), params[1].c_str());
else
{
channels.erase(channels.begin() + i);
source.u->Account()->Extend("ns_ajoin_channels", new ExtensibleItemRegular<std::vector<
std::pair<Anope::string, Anope::string> > >(channels));
- source.Reply(NICK_AJOIN_DELETED, params[1].c_str());
+ source.Reply(_("%s was removed from your auto join list."), params[1].c_str());
}
}
@@ -92,18 +93,21 @@ class CommandNSAJoin : public Command
bool OnHelp(CommandSource &source, const Anope::string &subcommand)
{
- source.Reply(NICK_HELP_AJOIN);
+ source.Reply(_("Syntax: \002AJOIN {ADD | DEL | LIST} [\037channel\037] [\037key\037]\002\n"
+ " \n"
+ "This command manages your auto join list. When you identify\n"
+ "you will automatically join the channels on your auto join list"));
return true;
}
void OnSyntaxError(CommandSource &source, const Anope::string &subcommand)
{
- SyntaxError(source, "AJOIN", NICK_AJOIN_SYNTAX);
+ SyntaxError(source, "AJOIN", _("AJOIN {ADD | DEL | LIST} [\037channel\037] [\037key\037]"));
}
void OnServHelp(CommandSource &source)
{
- source.Reply(NICK_HELP_CMD_AJOIN);
+ source.Reply(_(" AJOIN Manage your auto join list"));
}
};
diff --git a/modules/core/ns_alist.cpp b/modules/core/ns_alist.cpp
index 4521099d0..1777dacb1 100644
--- a/modules/core/ns_alist.cpp
+++ b/modules/core/ns_alist.cpp
@@ -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"));
}
};
diff --git a/modules/core/ns_drop.cpp b/modules/core/ns_drop.cpp
index 899d52b7d..30ec2730a 100644
--- a/modules/core/ns_drop.cpp
+++ b/modules/core/ns_drop.cpp
@@ -28,7 +28,7 @@ class CommandNSDrop : public Command
if (readonly)
{
- source.Reply(NICK_DROP_DISABLED);
+ source.Reply(_("Sorry, nickname de-registration is temporarily disabled."));
return MOD_CONT;
}
@@ -43,7 +43,7 @@ class CommandNSDrop : public Command
Log(LOG_ADMIN, u, this) << "to drop nickname " << nr->nick << " (email: " << nr->email << ")";
delete nr;
- source.Reply(NICK_X_DROPPED, nick.c_str());
+ source.Reply(_("Nickname \002%s\002 has been dropped."), nick.c_str());
}
else if (nr && !nick.empty())
{
@@ -51,23 +51,23 @@ class CommandNSDrop : public Command
if (res)
{
Log(LOG_COMMAND, u, this) << "to drop nick request " << nr->nick;
- source.Reply(NICK_X_DROPPED, nr->nick.c_str());
+ source.Reply(_("Nickname \002%s\002 has been dropped."), nr->nick.c_str());
delete nr;
}
else if (bad_password(u))
return MOD_STOP;
else
- source.Reply(PASSWORD_INCORRECT);
+ source.Reply(LanguageString::PASSWORD_INCORRECT);
}
else
- source.Reply(NICK_NOT_REGISTERED);
+ source.Reply(LanguageString::NICK_NOT_REGISTERED);
return MOD_CONT;
}
if (!u->Account())
{
- source.Reply(NICK_IDENTIFY_REQUIRED, Config->s_NickServ.c_str());
+ source.Reply(LanguageString::NICK_IDENTIFY_REQUIRED, Config->s_NickServ.c_str());
return MOD_CONT;
}
@@ -77,13 +77,13 @@ class CommandNSDrop : public Command
my_nick = na->nick;
if (!is_mine && !u->Account()->HasPriv("nickserv/drop"))
- source.Reply(ACCESS_DENIED);
+ source.Reply(LanguageString::ACCESS_DENIED);
else if (Config->NSSecureAdmins && !is_mine && na->nc->IsServicesOper())
- source.Reply(ACCESS_DENIED);
+ source.Reply(LanguageString::ACCESS_DENIED);
else
{
if (readonly)
- source.Reply(READ_ONLY_MODE);
+ source.Reply(LanguageString::READ_ONLY_MODE);
if (ircd->sqline && na->HasFlag(NS_FORBIDDEN))
{
@@ -100,14 +100,14 @@ class CommandNSDrop : public Command
{
if (Config->WallDrop)
ircdproto->SendGlobops(NickServ, "\2%s\2 used DROP on \2%s\2", u->nick.c_str(), nick.c_str());
- source.Reply(NICK_X_DROPPED, nick.c_str());
+ source.Reply(_("Nickname \002%s\002 has been dropped."), nick.c_str());
}
else
{
if (!nick.empty())
- source.Reply(NICK_X_DROPPED, nick.c_str());
+ source.Reply(_("Nickname \002%s\002 has been dropped."), nick.c_str());
else
- source.Reply(NICK_DROPPED);
+ source.Reply(_("Your nickname has been dropped."));
}
}
@@ -118,16 +118,38 @@ class CommandNSDrop : public Command
{
User *u = source.u;
if (u->Account() && u->Account()->HasPriv("nickserv/drop"))
- source.Reply(NICK_SERVADMIN_HELP_DROP);
+ source.Reply(_("Syntax: \002DROP [\037nickname\037]\002\n"
+ " \n"
+ "Without a parameter, drops your nickname from the\n"
+ "%S database.\n"
+ " \n"
+ "With a parameter, drops the named nick from the database.\n"
+ "You may drop any nick within your group without any \n"
+ "special privileges. Dropping any nick is limited to \n"
+ "\002Services Operators\002."));
else
- source.Reply(NICK_HELP_DROP);
+ source.Reply(_("Syntax: \002DROP [\037nickname\037 | \037password\037]\002\n"
+ " \n"
+ "Drops your nickname from the %S database. A nick\n"
+ "that has been dropped is free for anyone to re-register.\n"
+ " \n"
+ "You may drop a nick within your group by passing it\n"
+ "as the \002nick\002 parameter.\n"
+ " \n"
+ "If you have a nickname registration pending but can not confirm\n"
+ "it for any reason, you can cancel your registration by passing\n"
+ "your password as the \002password\002 parameter.\n"
+ " \n"
+ "In order to use this command, you must first identify\n"
+ "with your password (\002%R%S HELP IDENTIFY\002 for more\n"
+ "information)."));
return true;
}
void OnServHelp(CommandSource &source)
{
- source.Reply(NICK_HELP_CMD_DROP);
+ source.Reply(_(" DROP Cancel the registration of a nickname"));
}
};
diff --git a/modules/core/ns_forbid.cpp b/modules/core/ns_forbid.cpp
index 2095cfb76..d88b9a9e9 100644
--- a/modules/core/ns_forbid.cpp
+++ b/modules/core/ns_forbid.cpp
@@ -34,10 +34,10 @@ class CommandNSForbid : public Command
}
if (readonly)
- source.Reply(READ_ONLY_MODE);
+ source.Reply(LanguageString::READ_ONLY_MODE);
if (!ircdproto->IsNickValid(nick))
{
- source.Reply(NICK_X_FORBIDDEN, nick.c_str());
+ source.Reply(LanguageString::NICK_X_FORBIDDEN, nick.c_str());
return MOD_CONT;
}
@@ -46,7 +46,7 @@ class CommandNSForbid : public Command
{
if (Config->NSSecureAdmins && na->nc->IsServicesOper())
{
- source.Reply(ACCESS_DENIED);
+ source.Reply(LanguageString::ACCESS_DENIED);
return MOD_CONT;
}
delete na;
@@ -63,7 +63,7 @@ class CommandNSForbid : public Command
if (curr)
{
- curr->SendMessage(NickServ, FORCENICKCHANGE_NOW);
+ curr->SendMessage(NickServ, LanguageString::FORCENICKCHANGE_NOW);
curr->Collide(na);
}
@@ -77,7 +77,7 @@ class CommandNSForbid : public Command
ircdproto->SendGlobops(NickServ, "\2%s\2 used FORBID on \2%s\2", u->nick.c_str(), nick.c_str());
Log(LOG_ADMIN, u, this) << "to forbid nick " << nick;
- source.Reply(NICK_FORBID_SUCCEEDED, nick.c_str());
+ source.Reply(_("Nick \002%s\002 is now forbidden."), nick.c_str());
FOREACH_MOD(I_OnNickForbidden, OnNickForbidden(na));
@@ -86,18 +86,23 @@ class CommandNSForbid : public Command
bool OnHelp(CommandSource &source, const Anope::string &subcommand)
{
- source.Reply(NICK_SERVADMIN_HELP_FORBID);
+ source.Reply(_("Syntax: \002FORBID \037nickname\037 [\037reason\037]\002\n"
+ " \n"
+ "Disallows a nickname from being registered or used by\n"
+ "anyone. May be cancelled by dropping the nick.\n"
+ " \n"
+ "On certain networks, reason is required."));
return true;
}
void OnSyntaxError(CommandSource &source, const Anope::string &subcommand)
{
- SyntaxError(source, "FORBID", Config->ForceForbidReason ? NICK_FORBID_SYNTAX_REASON : NICK_FORBID_SYNTAX);
+ SyntaxError(source, "FORBID", Config->ForceForbidReason ? _("FORBID \037nickname\037 \037reason\037") : _("FORBID \037nickname\037 [\037reason\037]"));
}
void OnServHelp(CommandSource &source)
{
- source.Reply(NICK_HELP_CMD_FORBID);
+ source.Reply(_(" FORBID Prevents a nickname from being registered"));
}
};
diff --git a/modules/core/ns_getemail.cpp b/modules/core/ns_getemail.cpp
index 7c3518849..91a5bb2b1 100644
--- a/modules/core/ns_getemail.cpp
+++ b/modules/core/ns_getemail.cpp
@@ -39,13 +39,13 @@ class CommandNSGetEMail : public Command
if (!nc->email.empty() && nc->email.equals_ci(email))
{
++j;
- source.Reply(NICK_GETEMAIL_EMAILS_ARE, nc->display.c_str(), email.c_str());
+ source.Reply(_("Emails Match \002%s\002 to \002%s\002."), nc->display.c_str(), email.c_str());
}
}
if (j <= 0)
{
- source.Reply(NICK_GETEMAIL_NOT_USED, email.c_str());
+ source.Reply(_("No Emails listed for \002%s\002."), email.c_str());
return MOD_CONT;
}
@@ -54,18 +54,22 @@ class CommandNSGetEMail : public Command
bool OnHelp(CommandSource &source, const Anope::string &subcommand)
{
- source.Reply(NICK_SERVADMIN_HELP_GETEMAIL);
+ source.Reply(_("Syntax: \002GETEMAIL \037user@emailhost\037\002\n"
+ "Returns the matching nicks that used given email. \002Note\002 that\n"
+ "you can not use wildcards for either user or emailhost. Whenever\n"
+ "this command is used, a message including the person who issued\n"
+ "the command and the email it was used on will be logged."));
return true;
}
void OnSyntaxError(CommandSource &source, const Anope::string &subcommand)
{
- SyntaxError(source, "GETMAIL", NICK_GETEMAIL_SYNTAX);
+ SyntaxError(source, "GETMAIL", _("GETEMAIL \002user@email-host\002 No WildCards!!"));
}
void OnServHelp(CommandSource &source)
{
- source.Reply(NICK_HELP_CMD_GETEMAIL);
+ source.Reply(_(" GETEMAIL Matches and returns all users that registered using given email"));
}
};
diff --git a/modules/core/ns_getpass.cpp b/modules/core/ns_getpass.cpp
index fc35e8270..7c6c14785 100644
--- a/modules/core/ns_getpass.cpp
+++ b/modules/core/ns_getpass.cpp
@@ -35,15 +35,15 @@ class CommandNSGetPass : public Command
Log(LOG_ADMIN, u, this) << "for " << nr->nick;
if (Config->WallGetpass)
ircdproto->SendGlobops(NickServ, "\2%s\2 used GETPASS on \2%s\2", u->nick.c_str(), nick.c_str());
- source.Reply(NICK_GETPASS_PASSCODE_IS, nick.c_str(), nr->passcode.c_str());
+ source.Reply(_("Passcode for %s is \002%s\002."), nick.c_str(), nr->passcode.c_str());
}
else
- 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 (Config->NSSecureAdmins && na->nc->IsServicesOper())
- source.Reply(ACCESS_DENIED);
+ source.Reply(LanguageString::ACCESS_DENIED);
else
{
if (enc_decrypt(na->nc->pass, tmp_pass) == 1)
@@ -51,28 +51,33 @@ class CommandNSGetPass : public Command
Log(LOG_ADMIN, u, this) << "for " << nick;
if (Config->WallGetpass)
ircdproto->SendGlobops(NickServ, "\2%s\2 used GETPASS on \2%s\2", u->nick.c_str(), nick.c_str());
- source.Reply(NICK_GETPASS_PASSWORD_IS, nick.c_str(), tmp_pass.c_str());
+ source.Reply(_("Password for %s is \002%s\002."), nick.c_str(), tmp_pass.c_str());
}
else
- source.Reply(NICK_GETPASS_UNAVAILABLE);
+ source.Reply(_("GETPASS command unavailable because encryption is in use."));
}
return MOD_CONT;
}
bool OnHelp(CommandSource &source, const Anope::string &subcommand)
{
- source.Reply(NICK_SERVADMIN_HELP_GETPASS);
+ source.Reply(_("Syntax: \002GETPASS \037nickname\037\002\n"
+ " \n"
+ "Returns the password for the given nickname. \002Note\002 that\n"
+ "whenever this command is used, a message including the\n"
+ "person who issued the command and the nickname it was used\n"
+ "on will be logged and sent out as a WALLOPS/GLOBOPS."));
return true;
}
void OnSyntaxError(CommandSource &source, const Anope::string &subcommand)
{
- SyntaxError(source, "GETPASS", NICK_GETPASS_SYNTAX);
+ SyntaxError(source, "GETPASS", _("GETPASS \037nickname\037"));
}
void OnServHelp(CommandSource &source)
{
- source.Reply(NICK_HELP_CMD_GETPASS);
+ source.Reply(_(" GETPASS Retrieve the password for a nickname"));
}
};
diff --git a/modules/core/ns_ghost.cpp b/modules/core/ns_ghost.cpp
index f6ed15bf3..9bffa5b3c 100644
--- a/modules/core/ns_ghost.cpp
+++ b/modules/core/ns_ghost.cpp
@@ -31,31 +31,31 @@ class CommandNSGhost : public Command
NickAlias *na = findnick(nick);
if (!user)
- source.Reply(NICK_X_NOT_IN_USE, nick.c_str());
+ source.Reply(LanguageString::NICK_X_NOT_IN_USE, nick.c_str());
else 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 (na->nc->HasFlag(NI_SUSPENDED))
- source.Reply(NICK_X_SUSPENDED, na->nick.c_str());
+ source.Reply(LanguageString::NICK_X_SUSPENDED, na->nick.c_str());
else if (nick.equals_ci(u->nick))
- source.Reply(NICK_NO_GHOST_SELF);
+ source.Reply(_("You can't ghost yourself!"));
else if ((u->Account() == na->nc || (!na->nc->HasFlag(NI_SECURE) && is_on_access(u, na->nc))) ||
(!pass.empty() && enc_check_password(pass, na->nc->pass) == 1))
{
if (!user->IsIdentified() && FindCommand(NickServ, "RECOVER"))
- source.Reply(NICK_GHOST_UNIDENTIFIED);
+ source.Reply(_("You may not ghost an unidentified user, use RECOVER instead."));
else
{
Log(LOG_COMMAND, u, this) << "for " << nick;
Anope::string buf = "GHOST command used by " + u->nick;
kill_user(Config->s_NickServ, user, buf);
- source.Reply(NICK_GHOST_KILLED, nick.c_str());
+ source.Reply(_("Ghost with your nick has been killed."), nick.c_str());
}
}
else
{
- source.Reply(ACCESS_DENIED);
+ source.Reply(LanguageString::ACCESS_DENIED);
if (!pass.empty())
{
Log(LOG_COMMAND, u, this) << "with an invalid password for " << nick;
@@ -69,18 +69,31 @@ class CommandNSGhost : public Command
bool OnHelp(CommandSource &source, const Anope::string &subcommand)
{
- source.Reply(NICK_HELP_GHOST);
+ source.Reply(_("Syntax: \002GHOST \037nickname\037 [\037password\037]\002\n"
+ ""
+ "itermminates a \"ghost\" IRC session using your nick. A\n"
+ "ghost\" session is one which is not actually connected,\n"
+ "but which the IRC server believes is still online for one\n"
+ "reason or another. Typically, this happens if your\n"
+ "computer crashes or your Internet or modem connection\n"
+ "goes down while you're on IRC.\n"
+ " \n"
+ "In order to use the \002GHOST\002 command for a nick, your\n"
+ "current address as shown in /WHOIS must be on that nick's\n"
+ "access list, you must be identified and in the group of\n"
+ "that nick, or you must supply the correct password for\n"
+ "the nickname."));
return true;
}
void OnSyntaxError(CommandSource &source, const Anope::string &subcommand)
{
- SyntaxError(source, "GHOST", NICK_GHOST_SYNTAX);
+ SyntaxError(source, "GHOST", _("GHOST \037nickname\037 [\037password\037]"));
}
void OnServHelp(CommandSource &source)
{
- source.Reply(NICK_HELP_CMD_GHOST);
+ source.Reply(_(" GHOST Disconnects a \"ghost\" IRC session using your nick"));
}
};
diff --git a/modules/core/ns_group.cpp b/modules/core/ns_group.cpp
index 4180620d8..8fbcfb2fe 100644
--- a/modules/core/ns_group.cpp
+++ b/modules/core/ns_group.cpp
@@ -30,19 +30,19 @@ class CommandNSGroup : public Command
if (Config->NSEmailReg && findrequestnick(u->nick))
{
- source.Reply(NICK_REQUESTED);
+ source.Reply(LanguageString::NICK_REQUESTED);
return MOD_CONT;
}
if (readonly)
{
- source.Reply(NICK_GROUP_DISABLED);
+ source.Reply(_("Sorry, nickname grouping is temporarily disabled."));
return MOD_CONT;
}
if (!ircdproto->IsNickValid(u->nick))
{
- source.Reply(NICK_X_FORBIDDEN, u->nick.c_str());
+ source.Reply(LanguageString::NICK_X_FORBIDDEN, u->nick.c_str());
return MOD_CONT;
}
@@ -50,42 +50,44 @@ class CommandNSGroup : public Command
for (std::list<std::pair<Anope::string, Anope::string> >::iterator it = Config->Opers.begin(), it_end = Config->Opers.end(); it != it_end; ++it)
if (!u->HasMode(UMODE_OPER) && u->nick.find_ci(it->first) != Anope::string::npos)
{
- source.Reply(NICK_CANNOT_BE_REGISTERED, u->nick.c_str());
+ source.Reply(LanguageString::NICK_CANNOT_BE_REGISTERED, u->nick.c_str());
return MOD_CONT;
}
NickAlias *target, *na = findnick(u->nick);
if (!(target = findnick(nick)))
- source.Reply(NICK_X_NOT_REGISTERED, nick.c_str());
+ source.Reply(LanguageString::NICK_X_NOT_REGISTERED, nick.c_str());
else if (Anope::CurTime < u->lastnickreg + Config->NSRegDelay)
- source.Reply(NICK_GROUP_PLEASE_WAIT, (Config->NSRegDelay + u->lastnickreg) - Anope::CurTime);
+ source.Reply(_("Please wait %d seconds before using the GROUP command again."), (Config->NSRegDelay + u->lastnickreg) - Anope::CurTime);
else if (u->Account() && u->Account()->HasFlag(NI_SUSPENDED))
{
Log(NickServ) << NickServ << u->GetMask() << " tried to use GROUP from SUSPENDED nick " << target->nick;
- source.Reply(NICK_X_SUSPENDED, u->nick.c_str());
+ source.Reply(LanguageString::NICK_X_SUSPENDED, u->nick.c_str());
}
else if (target && target->nc->HasFlag(NI_SUSPENDED))
{
Log(LOG_COMMAND, u, this) << "tried to use GROUP for SUSPENDED nick " << target->nick;
- source.Reply(NICK_X_SUSPENDED, target->nick.c_str());
+ source.Reply(LanguageString::NICK_X_SUSPENDED, target->nick.c_str());
}
else if (target->HasFlag(NS_FORBIDDEN))
- source.Reply(NICK_X_FORBIDDEN, nick.c_str());
+ source.Reply(LanguageString::NICK_X_FORBIDDEN, nick.c_str());
else if (na && target->nc == na->nc)
- source.Reply(NICK_GROUP_SAME, target->nick.c_str());
+ source.Reply(_("You are already a member of the group of \002%s\002."), target->nick.c_str());
else if (na && na->nc != u->Account())
- source.Reply(NICK_IDENTIFY_REQUIRED, Config->s_NickServ.c_str());
+ source.Reply(LanguageString::NICK_IDENTIFY_REQUIRED, Config->s_NickServ.c_str());
else if (na && Config->NSNoGroupChange)
- source.Reply(NICK_GROUP_CHANGE_DISABLED, Config->s_NickServ.c_str());
+ source.Reply(_("Your nick is already registered; type \002%R%s DROP\002 first."), Config->s_NickServ.c_str());
else if (Config->NSMaxAliases && (target->nc->aliases.size() >= Config->NSMaxAliases) && !target->nc->IsServicesOper())
- source.Reply(NICK_GROUP_TOO_MANY, target->nick.c_str(), Config->s_NickServ.c_str(), Config->s_NickServ.c_str());
+ source.Reply(_("There are too many nicks in %s's group; list them and drop some.\n"
+ "Type \002%R%s HELP GLIST\002 and \002%R%s HELP DROP\002\n"
+ "for more information."), target->nick.c_str(), Config->s_NickServ.c_str(), Config->s_NickServ.c_str());
else
{
int res = enc_check_password(pass, target->nc->pass);
if (res == -1)
{
Log(LOG_COMMAND, u, this) << "failed group for " << na->nick << " (invalid password)";
- source.Reply(PASSWORD_INCORRECT);
+ source.Reply(LanguageString::PASSWORD_INCORRECT);
if (bad_password(u))
return MOD_STOP;
}
@@ -103,7 +105,7 @@ class CommandNSGroup : public Command
if (nicklen <= prefixlen + 7 && nicklen >= prefixlen + 1 && !u->nick.find_ci(Config->NSGuestNickPrefix) && !u->nick.substr(prefixlen).find_first_not_of("1234567890"))
{
- source.Reply(NICK_CANNOT_BE_REGISTERED, u->nick.c_str());
+ source.Reply(LanguageString::NICK_CANNOT_BE_REGISTERED, u->nick.c_str());
return MOD_CONT;
}
}
@@ -121,7 +123,7 @@ class CommandNSGroup : public Command
u->SetMode(NickServ, UMODE_REGISTERED);
Log(LOG_COMMAND, u, this) << "makes " << u->nick << " join group of " << target->nick << " (" << target->nc->display << ") (email: " << (!target->nc->email.empty() ? target->nc->email : "none") << ")";
- source.Reply(NICK_GROUP_JOINED, target->nick.c_str());
+ source.Reply(_("You are now in the group of \002%s\002."), target->nick.c_str());
u->lastnickreg = Anope::CurTime;
@@ -133,18 +135,47 @@ class CommandNSGroup : public Command
bool OnHelp(CommandSource &source, const Anope::string &subcommand)
{
- source.Reply(NICK_HELP_GROUP);
+ source.Reply(_("Syntax: \002GROUP \037target\037 \037password\037\002\n"
+ " \n"
+ "This command makes your nickname join the \037target\037 nickname's \n"
+ "group. \037password\037 is the password of the target nickname.\n"
+ " \n"
+ "Joining a group will allow you to share your configuration,\n"
+ "memos, and channel privileges with all the nicknames in the\n"
+ "group, and much more!\n"
+ " \n"
+ "A group exists as long as it is useful. This means that even\n"
+ "if a nick of the group is dropped, you won't lose the\n"
+ "shared things described above, as long as there is at\n"
+ "least one nick remaining in the group.\n"
+ " \n"
+ "You can use this command even if you have not registered\n"
+ "your nick yet. If your nick is already registered, you'll\n"
+ "need to identify yourself before using this command. Type\n"
+ "\037%R%S HELP IDENTIFY\037 for more information. This\n"
+ "last may be not possible on your IRC network.\n"
+ " \n"
+ "It is recommended to use this command with a non-registered\n"
+ "nick because it will be registered automatically when \n"
+ "using this command. You may use it with a registered nick (to \n"
+ "change your group) only if your network administrators allowed \n"
+ "it.\n"
+ " \n"
+ "You can only be in one group at a time. Group merging is\n"
+ "not possible.\n"
+ " \n"
+ "\037Note\037: all the nicknames of a group have the same password."));
return true;
}
void OnSyntaxError(CommandSource &source, const Anope::string &subcommand)
{
- SyntaxError(source, "GROUP", NICK_GROUP_SYNTAX);
+ SyntaxError(source, "GROUP", _("\037target\037 \037password\037"));
}
void OnServHelp(CommandSource &source)
{
- source.Reply(NICK_HELP_CMD_GROUP);
+ source.Reply(_(" GROUP Join a group"));
}
};
@@ -162,11 +193,11 @@ class CommandNSUngroup : public Command
NickAlias *na = findnick(!nick.empty() ? nick : u->nick);
if (u->Account()->aliases.size() == 1)
- source.Reply(NICK_UNGROUP_ONE_NICK);
+ source.Reply(_("Your nick is not grouped to anything, you can't ungroup it."));
else if (!na)
- source.Reply(NICK_X_NOT_REGISTERED, !nick.empty() ? nick.c_str() : u->nick.c_str());
+ source.Reply(LanguageString::NICK_X_NOT_REGISTERED, !nick.empty() ? nick.c_str() : u->nick.c_str());
else if (na->nc != u->Account())
- source.Reply(NICK_UNGROUP_NOT_IN_GROUP, na->nick.c_str());
+ source.Reply(_("The nick %s is not in your group."), na->nick.c_str());
else
{
NickCore *oldcore = na->nc;
@@ -188,7 +219,7 @@ class CommandNSUngroup : public Command
na->nc->greet = oldcore->greet;
na->nc->language = oldcore->language;
- source.Reply(NICK_UNGROUP_SUCCESSFUL, na->nick.c_str(), oldcore->display.c_str());
+ source.Reply(_("Nick %s has been ungrouped from %s."), na->nick.c_str(), oldcore->display.c_str());
User *user = finduser(na->nick);
if (user)
@@ -201,13 +232,19 @@ class CommandNSUngroup : public Command
bool OnHelp(CommandSource &source, const Anope::string &subcommand)
{
- source.Reply(NICK_HELP_UNGROUP);
+ source.Reply(_("Syntax: \002UNGROUP \037[nick]\037\002\n"
+ " \n"
+ "This command ungroups your nick, or if given, the specificed nick,\n"
+ "from the group it is in. The ungrouped nick keeps its registration\n"
+ "time, password, email, greet, language, url, and icq. Everything\n"
+ "else is reset. You may not ungroup yourself if there is only one\n"
+ "nick in your group."));
return true;
}
void OnServHelp(CommandSource &source)
{
- source.Reply(NICK_HELP_CMD_UNGROUP);
+ source.Reply(_(" UNGROUP Remove a nick from a group"));
}
};
@@ -226,19 +263,19 @@ class CommandNSGList : public Command
const NickCore *nc = u->Account();
if (!nick.empty() && (!nick.equals_ci(u->nick) && !u->Account()->IsServicesOper()))
- source.Reply(ACCESS_DENIED, Config->s_NickServ.c_str());
+ source.Reply(LanguageString::ACCESS_DENIED, Config->s_NickServ.c_str());
else if (!nick.empty() && (!findnick(nick) || !(nc = findnick(nick)->nc)))
- source.Reply(nick.empty() ? NICK_NOT_REGISTERED : NICK_X_NOT_REGISTERED, nick.c_str());
+ source.Reply(nick.empty() ? LanguageString::NICK_NOT_REGISTERED : LanguageString::NICK_X_NOT_REGISTERED, nick.c_str());
else
{
- source.Reply(!nick.empty() ? NICK_GLIST_HEADER_X : NICK_GLIST_HEADER, nc->display.c_str());
+ source.Reply(!nick.empty() ? _("List of nicknames in the group of \002%s\002:") : _("List of nicknames in your group:"), nc->display.c_str());
for (std::list<NickAlias *>::const_iterator it = nc->aliases.begin(), it_end = nc->aliases.end(); it != it_end; ++it)
{
NickAlias *na2 = *it;
- source.Reply(na2->HasFlag(NS_NO_EXPIRE) ? NICK_GLIST_REPLY_NOEXPIRE : NICK_GLIST_REPLY, na2->nick.c_str(), do_strftime(na2->last_seen + Config->NSExpire).c_str());
+ source.Reply(na2->HasFlag(NS_NO_EXPIRE) ? _(" %s (does not expire)") : _(" %s (expires in %s)"), na2->nick.c_str(), do_strftime(na2->last_seen + Config->NSExpire).c_str());
}
- source.Reply(NICK_GLIST_FOOTER, nc->aliases.size());
+ source.Reply(_("%d nicknames in the group."), nc->aliases.size());
}
return MOD_CONT;
}
@@ -247,16 +284,25 @@ class CommandNSGList : public Command
{
User *u = source.u;
if (u->Account() && u->Account()->IsServicesOper())
- source.Reply(NICK_SERVADMIN_HELP_GLIST);
+ source.Reply(_("Syntax: \002GLIST [\037nickname\037]\002\n"
+ " \n"
+ "Without a parameter, lists all nicknames that are in\n"
+ "your group.\n"
+ " \n"
+ "With a parameter, lists all nicknames that are in the\n"
+ "group of the given nick.\n"
+ "This use limited to \002Services Operators\002."));
else
- source.Reply(NICK_HELP_GLIST);
+ source.Reply(_("Syntax: \002GLIST\002\n"
+ " \n"
+ "Lists all nicks in your group."));
return true;
}
void OnServHelp(CommandSource &source)
{
- source.Reply(NICK_HELP_CMD_GLIST);
+ source.Reply(_(" GLIST Lists all nicknames in your group"));
}
};
diff --git a/modules/core/ns_help.cpp b/modules/core/ns_help.cpp
index cc7f6c3a3..654d2233a 100644
--- a/modules/core/ns_help.cpp
+++ b/modules/core/ns_help.cpp
@@ -30,15 +30,31 @@ class CommandNSHelp : public Command
void OnSyntaxError(CommandSource &source, const Anope::string &subcommand)
{
User *u = source.u;
- source.Reply(NICK_HELP);
+ source.Reply(_("\002%S\002 allows you to \"register\" a nickname and\n"
+ "prevent others from using it. The following\n"
+ "commands allow for registration and maintenance of\n"
+ "nicknames; to use them, type \002%R%S \037command\037\002.\n"
+ "For more information on a specific command, type\n"
+ "\002%R%S HELP \037command\037\002."));
for (CommandMap::const_iterator it = NickServ->Commands.begin(), it_end = NickServ->Commands.end(); it != it_end; ++it)
if (!Config->HidePrivilegedCommands || it->second->permission.empty() || (u->Account() && u->Account()->HasCommand(it->second->permission)))
it->second->OnServHelp(source);
if (u->Account() && u->Account()->IsServicesOper())
- source.Reply(NICK_SERVADMIN_HELP);
+ source.Reply(_(" \n"
+ "Services Operators can also drop any nickname without needing\n"
+ "to identify for the nick, and may view the access list for\n"
+ "any nickname (\002%R%S ACCESS LIST \037nick\037\002)."));
if (Config->NSExpire >= 86400)
- source.Reply(NICK_HELP_EXPIRES, Config->NSExpire / 86400);
- source.Reply(NICK_HELP_FOOTER);
+ source.Reply(_("Nicknames that are not used anymore are subject to \n"
+ "the automatic expiration, i.e. they will be deleted\n"
+ "after %d days if not used."), Config->NSExpire / 86400);
+ source.Reply(_(" \n"
+ "\002NOTICE:\002 This service is intended to provide a way for\n"
+ "IRC users to ensure their identity is not compromised.\n"
+ "It is \002NOT\002 intended to facilitate \"stealing\" of\n"
+ "nicknames or other malicious actions. Abuse of %S\n"
+ "will result in, at minimum, loss of the abused\n"
+ "nickname(s)."));
}
};
diff --git a/modules/core/ns_identify.cpp b/modules/core/ns_identify.cpp
index eb337d93e..625ccd7e2 100644
--- a/modules/core/ns_identify.cpp
+++ b/modules/core/ns_identify.cpp
@@ -33,32 +33,32 @@ class CommandNSIdentify : public Command
{
NickRequest *nr = findrequestnick(nick);
if (nr)
- source.Reply(NICK_IS_PREREG);
+ source.Reply(LanguageString::NICK_IS_PREREG);
else
- source.Reply(NICK_NOT_REGISTERED);
+ source.Reply(LanguageString::NICK_NOT_REGISTERED);
}
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 (na->nc->HasFlag(NI_SUSPENDED))
- source.Reply(NICK_X_SUSPENDED, na->nick.c_str());
+ source.Reply(LanguageString::NICK_X_SUSPENDED, na->nick.c_str());
/* You can now identify for other nicks without logging out first,
* however you can not identify again for the group you're already
* identified as
*/
else if (u->Account() && u->Account() == na->nc)
- source.Reply(NICK_ALREADY_IDENTIFIED);
+ source.Reply(_("You are already identified."));
else
{
int res = enc_check_password(pass, na->nc->pass);
if (!res)
{
Log(LOG_COMMAND, u, this) << "and failed to identify";
- source.Reply(PASSWORD_INCORRECT);
+ source.Reply(LanguageString::PASSWORD_INCORRECT);
if (bad_password(u))
return MOD_STOP;
}
else if (res == -1)
- source.Reply(NICK_IDENTIFY_FAILED);
+ source.Reply(_("Sorry, identification failed."));
else
{
if (u->IsIdentified())
@@ -79,7 +79,7 @@ class CommandNSIdentify : public Command
FOREACH_MOD(I_OnNickIdentify, OnNickIdentify(u));
Log(LOG_COMMAND, u, this) << "and identified for account " << u->Account()->display;
- source.Reply(NICK_IDENTIFY_SUCCEEDED);
+ source.Reply(_("Password accepted - you are now recognized."));
if (ircd->vhost)
do_on_id(u);
if (Config->NSModeOnID)
@@ -87,8 +87,12 @@ class CommandNSIdentify : public Command
if (Config->NSForceEmail && u->Account() && u->Account()->email.empty())
{
- source.Reply(NICK_IDENTIFY_EMAIL_REQUIRED);
- source.Reply(NICK_IDENTIFY_EMAIL_HOWTO);
+ source.Reply(_("You must now supply an e-mail for your nick.\n"
+ "This e-mail will allow you to retrieve your password in\n"
+ "case you forget it."));
+ source.Reply(_("Type \002%R%S SET EMAIL \037e-mail\037\002 in order to set your e-mail.\n"
+ "Your privacy is respected; this e-mail won't be given to\n"
+ "any third-party person."));
}
if (u->IsIdentified())
@@ -100,18 +104,24 @@ class CommandNSIdentify : public Command
bool OnHelp(CommandSource &source, const Anope::string &subcommand)
{
- source.Reply(NICK_HELP_IDENTIFY);
+ source.Reply(_("Syntax: \002IDENTIFY [account] \037password\037\002\n"
+ " \n"
+ "Tells %S that you are really the owner of this\n"
+ "nick. Many commands require you to authenticate yourself\n"
+ "with this command before you use them. The password\n"
+ "should be the same one you sent with the \002REGISTER\002\n"
+ "command."));
return true;
}
void OnSyntaxError(CommandSource &source, const Anope::string &subcommand)
{
- SyntaxError(source, "IDENTIFY", NICK_IDENTIFY_SYNTAX);
+ SyntaxError(source, "IDENTIFY", _("IDENTIFY [account] \037password\037"));
}
void OnServHelp(CommandSource &source)
{
- source.Reply(NICK_HELP_CMD_IDENTIFY);
+ source.Reply(_(" IDENTIFY Identify yourself with your password"));
}
};
diff --git a/modules/core/ns_info.cpp b/modules/core/ns_info.cpp
index ed894d604..63e92391f 100644
--- a/modules/core/ns_info.cpp
+++ b/modules/core/ns_info.cpp
@@ -46,21 +46,21 @@ class CommandNSInfo : public Command
NickRequest *nr = findrequestnick(nick);
if (nr)
{
- source.Reply(NICK_IS_PREREG);
+ source.Reply(LanguageString::NICK_IS_PREREG);
if (has_auspex)
- source.Reply(NICK_INFO_EMAIL, nr->email.c_str());
+ source.Reply(_(" E-mail address: %s"), nr->email.c_str());
}
else if (nickIsServices(nick, true))
- source.Reply(NICK_X_IS_SERVICES, nick.c_str());
+ source.Reply(_("Nick \002%s\002 is part of this Network's Services."), nick.c_str());
else
- 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))
{
if (u->HasMode(UMODE_OPER) && !na->last_usermask.empty())
- source.Reply(NICK_X_FORBIDDEN_OPER, nick.c_str(), na->last_usermask.c_str(), !na->last_realname.empty() ? na->last_realname.c_str() : GetString(u, NO_REASON).c_str());
+ source.Reply(LanguageString::NICK_X_FORBIDDEN_OPER, nick.c_str(), na->last_usermask.c_str(), !na->last_realname.empty() ? na->last_realname.c_str() : GetString(u->Account(), LanguageString::NO_REASON).c_str());
else
- source.Reply(NICK_X_FORBIDDEN, nick.c_str());
+ source.Reply(LanguageString::NICK_X_FORBIDDEN, nick.c_str());
}
else
{
@@ -74,71 +74,71 @@ class CommandNSInfo : public Command
if (has_auspex || (u->Account() && na->nc == u->Account()))
show_hidden = true;
- source.Reply(NICK_INFO_REALNAME, na->nick.c_str(), na->last_realname.c_str());
+ source.Reply(_("%s is %s"), na->nick.c_str(), na->last_realname.c_str());
if (na->nc->IsServicesOper() && (show_hidden || !na->nc->HasFlag(NI_HIDE_STATUS)))
- source.Reply(NICK_INFO_SERVICES_OPERTYPE, na->nick.c_str(), na->nc->ot->GetName().c_str());
+ source.Reply(_("%s is a services operator of type %s."), na->nick.c_str(), na->nc->ot->GetName().c_str());
if (nick_online)
{
if (show_hidden || !na->nc->HasFlag(NI_HIDE_MASK))
- source.Reply(NICK_INFO_ADDRESS_ONLINE, na->last_usermask.c_str());
+ source.Reply(_(" Is online from: %s"), na->last_usermask.c_str());
else
- source.Reply(NICK_INFO_ADDRESS_ONLINE_NOHOST, na->nick.c_str());
+ source.Reply(_("%s is currently online."), na->nick.c_str());
}
else
{
if (show_hidden || !na->nc->HasFlag(NI_HIDE_MASK))
- source.Reply(NICK_INFO_ADDRESS, na->last_usermask.c_str());
+ source.Reply(_("Last seen address: %s"), na->last_usermask.c_str());
}
- source.Reply(NICK_INFO_TIME_REGGED, do_strftime(na->time_registered).c_str());
+ source.Reply(_(" Time registered: %s"), do_strftime(na->time_registered).c_str());
if (!nick_online)
{
- source.Reply(NICK_INFO_LAST_SEEN, do_strftime(na->last_seen).c_str());
+ source.Reply(_(" Last seen time: %s"), do_strftime(na->last_seen).c_str());
}
if (!na->last_quit.empty() && (show_hidden || !na->nc->HasFlag(NI_HIDE_QUIT)))
- source.Reply(NICK_INFO_LAST_QUIT, na->last_quit.c_str());
+ source.Reply(_("Last quit message: %s"), na->last_quit.c_str());
if (!na->nc->email.empty() && (show_hidden || !na->nc->HasFlag(NI_HIDE_EMAIL)))
- source.Reply(NICK_INFO_EMAIL, na->nc->email.c_str());
+ source.Reply(_(" E-mail address: %s"), na->nc->email.c_str());
if (show_hidden)
{
if (!Config->s_HostServ.empty() && ircd->vhost && na->hostinfo.HasVhost())
{
if (ircd->vident && !na->hostinfo.GetIdent().empty())
- source.Reply(NICK_INFO_VHOST2, na->hostinfo.GetIdent().c_str(), na->hostinfo.GetHost().c_str());
+ source.Reply(_(" vhost: %s@%s"), na->hostinfo.GetIdent().c_str(), na->hostinfo.GetHost().c_str());
else
- source.Reply(NICK_INFO_VHOST, na->hostinfo.GetHost().c_str());
+ source.Reply(_(" vhost: %s"), na->hostinfo.GetHost().c_str());
}
if (!na->nc->greet.empty())
- source.Reply(NICK_INFO_GREET, na->nc->greet.c_str());
+ source.Reply(_(" Greet message: %s"), na->nc->greet.c_str());
Anope::string optbuf;
- CheckOptStr(optbuf, NI_KILLPROTECT, GetString(u, NICK_INFO_OPT_KILL).c_str(), na->nc);
- CheckOptStr(optbuf, NI_SECURE, GetString(u, NICK_INFO_OPT_SECURE).c_str(), na->nc);
- CheckOptStr(optbuf, NI_PRIVATE, GetString(u, NICK_INFO_OPT_PRIVATE).c_str(), na->nc);
- CheckOptStr(optbuf, NI_MSG, GetString(u, NICK_INFO_OPT_MSG).c_str(), na->nc);
- CheckOptStr(optbuf, NI_AUTOOP, GetString(u, NICK_INFO_OPT_AUTOOP).c_str(), na->nc);
+ CheckOptStr(optbuf, NI_KILLPROTECT, GetString(u->Account(), _("Protection")).c_str(), na->nc);
+ CheckOptStr(optbuf, NI_SECURE, GetString(u->Account(), _("Security")).c_str(), na->nc);
+ CheckOptStr(optbuf, NI_PRIVATE, GetString(u->Account(), _("Private")).c_str(), na->nc);
+ CheckOptStr(optbuf, NI_MSG, GetString(u->Account(), _("Message mode")).c_str(), na->nc);
+ CheckOptStr(optbuf, NI_AUTOOP, GetString(u->Account(), _("Auto-op")).c_str(), na->nc);
- source.Reply(NICK_INFO_OPTIONS, optbuf.empty() ? GetString(u, NICK_INFO_OPT_NONE).c_str() : optbuf.c_str());
+ source.Reply(LanguageString::NICK_INFO_OPTIONS, optbuf.empty() ? _("None") : optbuf.c_str());
if (na->nc->HasFlag(NI_SUSPENDED))
{
if (!na->last_quit.empty())
- source.Reply(NICK_INFO_SUSPENDED, na->last_quit.c_str());
+ source.Reply(_("This nickname is currently suspended, reason: %s"), na->last_quit.c_str());
else
- source.Reply(NICK_INFO_SUSPENDED_NO_REASON);
+ source.Reply(_("This nickname is currently suspended"));
}
if (na->HasFlag(NS_NO_EXPIRE))
- source.Reply(NICK_INFO_NO_EXPIRE);
+ source.Reply(_("This nickname will not expire."));
else
- source.Reply(NICK_INFO_EXPIRE, do_strftime(na->last_seen + Config->NSExpire).c_str());
+ source.Reply(_("Expires on: %s"), do_strftime(na->last_seen + Config->NSExpire).c_str());
}
FOREACH_MOD(I_OnNickInfo, OnNickInfo(u, na, show_hidden));
@@ -148,19 +148,23 @@ class CommandNSInfo : public Command
bool OnHelp(CommandSource &source, const Anope::string &subcommand)
{
- source.Reply(NICK_HELP_INFO);
+ source.Reply(_("Syntax: \002INFO \037nickname\037\002\n"
+ " \n"
+ "Displays information about the given nickname, such as\n"
+ "the nick's owner, last seen address and time, and nick\n"
+ "options."));
return true;
}
void OnSyntaxError(CommandSource &source, const Anope::string &subcommand)
{
- SyntaxError(source, "INFO", NICK_INFO_SYNTAX);
+ SyntaxError(source, "INFO", _("INFO \037nick\037"));
}
void OnServHelp(CommandSource &source)
{
- source.Reply(NICK_HELP_CMD_INFO);
+ source.Reply(_(" INFO Displays information about a given nickname"));
}
};
diff --git a/modules/core/ns_list.cpp b/modules/core/ns_list.cpp
index 1e77798a3..4c3db50ed 100644
--- a/modules/core/ns_list.cpp
+++ b/modules/core/ns_list.cpp
@@ -51,7 +51,7 @@ class CommandNSList : public Command
if (Config->NSListOpersOnly && !u->HasMode(UMODE_OPER)) /* reverse the help logic */
{
- source.Reply(ACCESS_DENIED);
+ source.Reply(LanguageString::ACCESS_DENIED);
return MOD_STOP;
}
@@ -60,24 +60,24 @@ class CommandNSList : public Command
Anope::string tmp = myStrGetToken(pattern.substr(1), '-', 0); /* Read FROM out */
if (tmp.empty())
{
- source.Reply(LIST_INCORRECT_RANGE);
+ source.Reply(LanguageString::LIST_INCORRECT_RANGE);
return MOD_CONT;
}
if (!tmp.is_number_only())
{
- source.Reply(LIST_INCORRECT_RANGE);
+ source.Reply(LanguageString::LIST_INCORRECT_RANGE);
return MOD_CONT;
}
from = convertTo<int>(tmp);
tmp = myStrGetTokenRemainder(pattern, '-', 1); /* Read TO out */
if (tmp.empty())
{
- source.Reply(LIST_INCORRECT_RANGE);
+ source.Reply(LanguageString::LIST_INCORRECT_RANGE);
return MOD_CONT;
}
if (!tmp.is_number_only())
{
- source.Reply(LIST_INCORRECT_RANGE);
+ source.Reply(LanguageString::LIST_INCORRECT_RANGE);
return MOD_CONT;
}
to = convertTo<int>(tmp);
@@ -105,7 +105,7 @@ class CommandNSList : public Command
mync = u->Account();
- source.Reply(NICK_LIST_HEADER, pattern.c_str());
+ source.Reply(LanguageString::LIST_HEADER, pattern.c_str());
if (!unconfirmed)
{
for (nickalias_map::const_iterator it = NickAliasList.begin(), it_end = NickAliasList.end(); it != it_end; ++it)
@@ -167,7 +167,7 @@ class CommandNSList : public Command
}
}
}
- source.Reply(NICK_LIST_RESULTS, nnicks > Config->NSListMax ? Config->NSListMax : nnicks, nnicks);
+ source.Reply(_("End of list - %d/%d matches shown."), nnicks > Config->NSListMax ? Config->NSListMax : nnicks, nnicks);
return MOD_CONT;
}
@@ -175,9 +175,49 @@ class CommandNSList : public Command
{
User *u = source.u;
if (u->Account() && u->Account()->IsServicesOper())
- source.Reply(NICK_SERVADMIN_HELP_LIST);
+ source.Reply(_("Syntax: \002LIST \037pattern\037 [FORBIDDEN] [SUSPENDED] [NOEXPIRE] [UNCONFIRMED]\002\n"
+ " \n"
+ "Lists all registered nicknames which match the given\n"
+ "pattern, in \037nick!user@host\037 format. Nicks with the \002PRIVATE\002\n"
+ "option set will only be displayed to Services Operators. Nicks\n"
+ "with the \002NOEXPIRE\002 option set will have a \002!\002 appended to\n"
+ "the nickname for Services Operators.\n"
+ " \n"
+ "If the FORBIDDEN, SUSPENDED, NOEXPIRE or UNCONFIRMED options are given, only\n"
+ "nicks which, respectively, are FORBIDDEN, SUSPENDED, UNCONFIRMED or have the\n"
+ "NOEXPIRE flag set will be displayed. If multiple options are\n"
+ "given, all nicks matching at least one option will be displayed.\n"
+ "These options are limited to \037Services Operators\037. \n"
+ "Examples:\n"
+ " \n"
+ " \002LIST *!joeuser@foo.com\002\n"
+ " Lists all registered nicks owned by joeuser@foo.com.\n"
+ " \n"
+ " \002LIST *Bot*!*@*\002\n"
+ " Lists all registered nicks with \002Bot\002 in their\n"
+ " names (case insensitive).\n"
+ " \n"
+ " \002LIST * NOEXPIRE\002\n"
+ " Lists all registered nicks which have been set to\n"));
else
- source.Reply(NICK_HELP_LIST);
+ source.Reply(_("Syntax: \002LIST \037pattern\037\002\n"
+ " \n"
+ "Lists all registered nicknames which match the given\n"
+ "pattern, in \037nick!user@host\037 format. Nicks with the\n"
+ "\002PRIVATE\002 option set will not be displayed.\n"
+ " \n"
+ "Examples:\n"
+ " \n"
+ " \002LIST *!joeuser@foo.com\002\n"
+ " Lists all nicks owned by joeuser@foo.com.\n"
+ " \n"
+ " \002LIST *Bot*!*@*\002\n"
+ " Lists all registered nicks with \002Bot\002 in their\n"
+ " names (case insensitive).\n"
+ " \n"
+ " \002LIST *!*@*.bar.org\002\n"
+ " Lists all nicks owned by users in the \002bar.org\002\n"
+ " domain."));
return true;
}
@@ -186,14 +226,14 @@ class CommandNSList : public Command
{
User *u = source.u;
if (u->Account()->IsServicesOper())
- SyntaxError(source, "LIST", NICK_LIST_SERVADMIN_SYNTAX);
+ SyntaxError(source, "LIST", _("LIST \037pattern\037 [FORBIDDEN] [SUSPENDED] [NOEXPIRE] [UNCONFIRMED]"));
else
- SyntaxError(source, "LIST", NICK_LIST_SYNTAX);
+ SyntaxError(source, "LIST", LanguageString::NICK_LIST_SYNTAX);
}
void OnServHelp(CommandSource &source)
{
- source.Reply(NICK_HELP_CMD_LIST);
+ source.Reply(_(" LIST List all registered nicknames that match a given pattern"));
}
};
diff --git a/modules/core/ns_logout.cpp b/modules/core/ns_logout.cpp
index 446e33b5c..81ccc841d 100644
--- a/modules/core/ns_logout.cpp
+++ b/modules/core/ns_logout.cpp
@@ -31,9 +31,9 @@ class CommandNSLogout : public Command
if (!u->Account()->IsServicesOper() && !nick.empty())
this->OnSyntaxError(source, "");
else if (!(u2 = (!nick.empty() ? finduser(nick) : u)))
- source.Reply(NICK_X_NOT_IN_USE, nick.c_str());
+ source.Reply(LanguageString::NICK_X_NOT_IN_USE, nick.c_str());
else if (!nick.empty() && u2->Account() && !u2->Account()->IsServicesOper())
- source.Reply(NICK_LOGOUT_SERVICESADMIN, nick.c_str());
+ source.Reply(_("You can't logout %s because they are a Services Operator."), nick.c_str());
else
{
if (!nick.empty() && !param.empty() && param.equals_ci("REVALIDATE"))
@@ -44,9 +44,9 @@ class CommandNSLogout : public Command
/* Remove founder status from this user in all channels */
if (!nick.empty())
- source.Reply(NICK_LOGOUT_X_SUCCEEDED, nick.c_str());
+ source.Reply(_("Nick %s has been logged out."), nick.c_str());
else
- source.Reply(NICK_LOGOUT_SUCCEEDED);
+ source.Reply(_("Your nick has been logged out."));
ircdproto->SendAccountLogout(u2, u2->Account());
u2->RemoveMode(NickServ, UMODE_REGISTERED);
@@ -64,21 +64,35 @@ class CommandNSLogout : public Command
{
User *u = source.u;
if (u->Account() && u->Account()->IsServicesOper())
- source.Reply(NICK_SERVADMIN_HELP_LOGOUT);
+ source.Reply(_("Syntax: \002LOGOUT [\037nickname\037 [REVALIDATE]]\002\n"
+ " \n"
+ "Without a parameter, reverses the effect of the \002IDENTIFY\002 \n"
+ "command, i.e. make you not recognized as the real owner of the nick\n"
+ "anymore. Note, however, that you won't be asked to reidentify\n"
+ "yourself.\n"
+ " \n"
+ "With a parameter, does the same for the given nick. If you \n"
+ "specify REVALIDATE as well, Services will ask the given nick\n"
+ "to re-identify. This use limited to \002Services Operators\002."));
else
- source.Reply(NICK_HELP_LOGOUT);
+ source.Reply(_("Syntax: \002LOGOUT\002\n"
+ " \n"
+ "This reverses the effect of the \002IDENTIFY\002 command, i.e.\n"
+ "make you not recognized as the real owner of the nick\n"
+ "anymore. Note, however, that you won't be asked to reidentify\n"
+ "yourself."));
return true;
}
void OnSyntaxError(CommandSource &source, const Anope::string &subcommand)
{
- SyntaxError(source, "LOGOUT", NICK_LOGOUT_SYNTAX);
+ SyntaxError(source, "LOGOUT", _("LOGOUT"));
}
void OnServHelp(CommandSource &source)
{
- source.Reply(NICK_HELP_CMD_LOGOUT);
+ source.Reply(_(" LOGOUT Reverses the effect of the IDENTIFY command"));
}
};
diff --git a/modules/core/ns_recover.cpp b/modules/core/ns_recover.cpp
index b7a2ec7ba..ad32c664c 100644
--- a/modules/core/ns_recover.cpp
+++ b/modules/core/ns_recover.cpp
@@ -31,32 +31,32 @@ class CommandNSRecover : public Command
NickAlias *na;
User *u2;
if (!(u2 = finduser(nick)))
- source.Reply(NICK_X_NOT_IN_USE, nick.c_str());
+ source.Reply(LanguageString::NICK_X_NOT_IN_USE, nick.c_str());
else if (!(na = findnick(u2->nick)))
- 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 (na->nc->HasFlag(NI_SUSPENDED))
- source.Reply(NICK_X_SUSPENDED, na->nick.c_str());
+ source.Reply(LanguageString::NICK_X_SUSPENDED, na->nick.c_str());
else if (nick.equals_ci(u->nick))
- source.Reply(NICK_NO_RECOVER_SELF);
+ source.Reply(_("You can't recover yourself!"));
else if (!pass.empty())
{
int res = enc_check_password(pass, na->nc->pass);
if (res == 1)
{
- u2->SendMessage(NickServ, FORCENICKCHANGE_NOW);
+ u2->SendMessage(NickServ, LanguageString::FORCENICKCHANGE_NOW);
u2->Collide(na);
/* Convert Config->NSReleaseTimeout seconds to string format */
Anope::string relstr = duration(na->nc, Config->NSReleaseTimeout);
- source.Reply(NICK_RECOVERED, Config->s_NickServ.c_str(), nick.c_str(), relstr.c_str());
+ source.Reply(LanguageString::NICK_RECOVERED, Config->s_NickServ.c_str(), nick.c_str(), relstr.c_str());
}
else
{
- source.Reply(ACCESS_DENIED);
+ source.Reply(LanguageString::ACCESS_DENIED);
if (!res)
{
Log(LOG_COMMAND, u, this) << "with invalid password for " << nick;
@@ -69,16 +69,16 @@ class CommandNSRecover : public Command
{
if (u->Account() == na->nc || (!na->nc->HasFlag(NI_SECURE) && is_on_access(u, na->nc)))
{
- u2->SendMessage(NickServ, FORCENICKCHANGE_NOW);
+ u2->SendMessage(NickServ, LanguageString::FORCENICKCHANGE_NOW);
u2->Collide(na);
/* Convert Config->NSReleaseTimeout seconds to string format */
Anope::string relstr = duration(na->nc, Config->NSReleaseTimeout);
- source.Reply(NICK_RECOVERED, Config->s_NickServ.c_str(), nick.c_str(), relstr.c_str());
+ source.Reply(LanguageString::NICK_RECOVERED, Config->s_NickServ.c_str(), nick.c_str(), relstr.c_str());
}
else
- source.Reply(ACCESS_DENIED);
+ source.Reply(LanguageString::ACCESS_DENIED);
}
return MOD_CONT;
}
@@ -88,19 +88,40 @@ class CommandNSRecover : public Command
/* Convert Config->NSReleaseTimeout seconds to string format */
Anope::string relstr = duration(source.u->Account(), Config->NSReleaseTimeout);
- source.Reply(NICK_HELP_RECOVER, relstr.c_str());
+ source.Reply(_("Syntax: \002RECOVER \037nickname\037 [\037password\037]\002\n"
+ " \n"
+ "Allows you to recover your nickname if someone else has\n"
+ "taken it; this does the same thing that %S does\n"
+ "automatically if someone tries to use a kill-protected\n"
+ "nick.\n"
+ " \n"
+ "When you give this command, %S will bring a fake\n"
+ "user online with the same nickname as the user you're\n"
+ "trying to recover your nick from. This causes the IRC\n"
+ "servers to disconnect the other user. This fake user will\n"
+ "remain online for %s to ensure that the other\n"
+ "user does not immediately reconnect; after that time, you\n"
+ "can reclaim your nick. Alternatively, use the \002RELEASE\002\n"
+ "command (\002%R%S HELP RELEASE\002) to get the nick\n"
+ "back sooner.\n"
+ " \n"
+ "In order to use the \002RECOVER\002 command for a nick, your\n"
+ "current address as shown in /WHOIS must be on that nick's\n"
+ "access list, you must be identified and in the group of\n"
+ "that nick, or you must supply the correct password for\n"
+ "the nickname."), relstr.c_str());
return true;
}
void OnSyntaxError(CommandSource &source, const Anope::string &subcommand)
{
- SyntaxError(source, "RECOVER", NICK_RECOVER_SYNTAX);
+ SyntaxError(source, "RECOVER", _("RECOVER \037nickname\037 [\037password\037]"));
}
void OnServHelp(CommandSource &source)
{
- source.Reply(NICK_HELP_CMD_RECOVER);
+ source.Reply(_(" RECOVER Kill another user who has taken your nick"));
}
};
diff --git a/modules/core/ns_register.cpp b/modules/core/ns_register.cpp
index 0a5a5f641..ec885f728 100644
--- a/modules/core/ns_register.cpp
+++ b/modules/core/ns_register.cpp
@@ -52,23 +52,23 @@ class CommandNSConfirm : public Command
u->Login(na->nc);
Log(LOG_COMMAND, u, this) << "to register " << nr->nick << " (email: " << (!nr->email.empty() ? nr->email : "none") << ")";
if (Config->NSAddAccessOnReg)
- source.Reply(NICK_REGISTERED, u->nick.c_str(), na->nc->GetAccess(0).c_str());
+ source.Reply(_("Nickname \002%s\002 registered under your account: %s"), u->nick.c_str(), na->nc->GetAccess(0).c_str());
else
- source.Reply(NICK_REGISTERED_NO_MASK, u->nick.c_str());
+ source.Reply(_("Nickname \002%s\002 registered."), u->nick.c_str());
delete nr;
ircdproto->SendAccountLogin(u, u->Account());
ircdproto->SetAutoIdentificationToken(u);
if (enc_decrypt(na->nc->pass, tmp_pass) == 1)
- source.Reply(NICK_PASSWORD_IS, tmp_pass.c_str());
+ source.Reply(_("Your password is \002%s\002 - remember this for later use."), tmp_pass.c_str());
u->lastnickreg = Anope::CurTime;
}
else
{
Log(LOG_COMMAND, u, this) << "to confirm " << nr->nick << " (email: " << (!nr->email.empty() ? nr->email : "none") << ")";
- source.Reply(NICK_FORCE_REG, nr->nick.c_str());
+ source.Reply(_("Nickname \002%s\002 confirmed"), nr->nick.c_str());
User *user = finduser(nr->nick);
/* Delrequest must be called before validate_user */
delete nr;
@@ -109,21 +109,21 @@ class CommandNSConfirm : public Command
return MOD_CONT;
}
}
- source.Reply(NICK_CONFIRM_NOT_FOUND, Config->s_NickServ.c_str());
+ source.Reply(_("Registration step 1 may have expired, please use \"%R%s register <password> <email>\" first."), Config->s_NickServ.c_str());
return MOD_CONT;
}
if (!nr->passcode.equals_cs(passcode))
{
- source.Reply(NICK_CONFIRM_INVALID);
+ source.Reply(LanguageString::NICK_CONFIRM_INVALID);
return MOD_CONT;
}
}
if (!nr)
{
- source.Reply(NICK_REGISTRATION_FAILED);
+ source.Reply(_("Sorry, registration failed."));
return MOD_CONT;
}
@@ -145,20 +145,31 @@ class CommandNSConfirm : public Command
bool OnHelp(CommandSource &source, const Anope::string &subcommand)
{
User *u = source.u;
- source.Reply(NICK_HELP_CONFIRM);
+ source.Reply(_("Syntax: \002CONFIRM \037passcode\037\002\n"
+ " \n"
+ "This is the second step of nickname registration process.\n"
+ "You must perform this command in order to get your nickname\n"
+ "registered with %S. The passcode (or called auth code also)\n"
+ "is sent to your e-mail address in the first step of the\n"
+ "registration process. For more information about the first\n"
+ "stage of the registration process, type: \002%R%S HELP REGISTER\002\n"
+ " \n"
+ "This is also used after the RESETPASS command has been used to\n"
+ "force identify you to your nick so you may change your password."));
if (u->Account() && u->Account()->HasPriv("nickserv/confirm"))
- source.Reply(NICK_HELP_CONFIRM_OPER);
+ source.Reply(_("Additionally, Services Operators with the \037nickserv/confirm\037 permission can\n"
+ "replace \037passcode\037 with a users nick to force validate them."));
return true;
}
void OnSyntaxError(CommandSource &source, const Anope::string &subcommand)
{
- source.Reply(NICK_CONFIRM_INVALID);
+ source.Reply(LanguageString::NICK_CONFIRM_INVALID);
}
void OnServHelp(CommandSource &source)
{
- source.Reply(NICK_HELP_CMD_CONFIRM);
+ source.Reply(_(" CONFIRM Confirm a nickserv auth code"));
}
};
@@ -192,19 +203,19 @@ class CommandNSRegister : public CommandNSConfirm
if (readonly)
{
- source.Reply(NICK_REGISTRATION_DISABLED);
+ source.Reply(_("Sorry, nickname registration is temporarily disabled."));
return MOD_CONT;
}
if (!u->HasMode(UMODE_OPER) && Config->NickRegDelay && Anope::CurTime - u->my_signon < Config->NickRegDelay)
{
- source.Reply(NICK_REG_DELAY, Config->NickRegDelay);
+ source.Reply(_("You must have been using this nick for at least %d seconds to register."), Config->NickRegDelay);
return MOD_CONT;
}
if ((anr = findrequestnick(u->nick)))
{
- source.Reply(NICK_REQUESTED);
+ source.Reply(LanguageString::NICK_REQUESTED);
return MOD_CONT;
}
@@ -215,13 +226,13 @@ class CommandNSRegister : public CommandNSConfirm
*/
if (nicklen <= prefixlen + 7 && nicklen >= prefixlen + 1 && !u->nick.find_ci(Config->NSGuestNickPrefix) && u->nick.substr(prefixlen).find_first_not_of("1234567890") == Anope::string::npos)
{
- source.Reply(NICK_CANNOT_BE_REGISTERED, u->nick.c_str());
+ source.Reply(LanguageString::NICK_CANNOT_BE_REGISTERED, u->nick.c_str());
return MOD_CONT;
}
if (!ircdproto->IsNickValid(u->nick))
{
- source.Reply(NICK_X_FORBIDDEN, u->nick.c_str());
+ source.Reply(LanguageString::NICK_X_FORBIDDEN, u->nick.c_str());
return MOD_CONT;
}
@@ -232,7 +243,7 @@ class CommandNSRegister : public CommandNSConfirm
if (u->nick.find_ci(nick) != Anope::string::npos && !u->HasMode(UMODE_OPER))
{
- source.Reply(NICK_CANNOT_BE_REGISTERED, u->nick.c_str());
+ source.Reply(LanguageString::NICK_CANNOT_BE_REGISTERED, u->nick.c_str());
return MOD_CONT;
}
}
@@ -240,24 +251,24 @@ class CommandNSRegister : public CommandNSConfirm
if (Config->NSForceEmail && email.empty())
this->OnSyntaxError(source, "");
else if (Anope::CurTime < u->lastnickreg + Config->NSRegDelay)
- source.Reply(NICK_REG_PLEASE_WAIT, (u->lastnickreg + Config->NSRegDelay) - Anope::CurTime);
+ source.Reply(_("Please wait %d seconds before using the REGISTER command again."), (u->lastnickreg + Config->NSRegDelay) - Anope::CurTime);
else if ((na = findnick(u->nick)))
{
/* i.e. there's already such a nick regged */
if (na->HasFlag(NS_FORBIDDEN))
{
Log(NickServ) << u->GetMask() << " tried to register FORBIDden nick " << u->nick;
- source.Reply(NICK_CANNOT_BE_REGISTERED, u->nick.c_str());
+ source.Reply(LanguageString::NICK_CANNOT_BE_REGISTERED, u->nick.c_str());
}
else
- source.Reply(NICK_ALREADY_REGISTERED, u->nick.c_str());
+ source.Reply(LanguageString::NICK_ALREADY_REGISTERED, u->nick.c_str());
}
else if (pass.equals_ci(u->nick) || (Config->StrictPasswords && pass.length() < 5))
- source.Reply(MORE_OBSCURE_PASSWORD);
+ source.Reply(LanguageString::MORE_OBSCURE_PASSWORD);
else if (pass.length() > Config->PassLen)
- source.Reply(PASSWORD_TOO_LONG);
+ source.Reply(LanguageString::PASSWORD_TOO_LONG);
else if (!email.empty() && !MailValidate(email))
- source.Reply(MAIL_X_INVALID, email.c_str());
+ source.Reply(LanguageString::MAIL_X_INVALID, email.c_str());
else
{
for (idx = 0; idx < 9; ++idx)
@@ -273,13 +284,16 @@ class CommandNSRegister : public CommandNSConfirm
{
if (SendRegmail(u, nr))
{
- source.Reply(NICK_ENTER_REG_CODE, email.c_str(), Config->s_NickServ.c_str(), Config->s_NickServ.c_str());
+ source.Reply(_("A passcode has been sent to %s, please type %R%s confirm <passcode> to complete registration.\n"
+ "If you need to cancel your registration, use \"%R%s drop <password>\"."),
+ email.c_str(), Config->s_NickServ.c_str(), Config->s_NickServ.c_str());
+
Log(LOG_COMMAND, u, this) << "send registration verification code to " << nr->email;
}
else
{
Log(LOG_COMMAND, u, this) << "unable to send registration verification mail";
- source.Reply(NICK_REG_UNABLE);
+ source.Reply(_("Nick NOT registered, please try again later."));
delete nr;
return MOD_CONT;
}
@@ -296,21 +310,51 @@ class CommandNSRegister : public CommandNSConfirm
bool OnHelp(CommandSource &source, const Anope::string &subcommand)
{
- source.Reply(NICK_HELP_REGISTER);
+ source.Reply(_("Syntax: \002REGISTER \037password\037 \037[email]\037\002\n"
+ " \n"
+ "Registers your nickname in the %S database. Once\n"
+ "your nick is registered, you can use the \002SET\002 and \002ACCESS\002\n"
+ "commands to configure your nick's settings as you like\n"
+ "them. Make sure you remember the password you use when\n"
+ "registering - you'll need it to make changes to your nick\n"
+ "later. (Note that \002case matters!\002 \037ANOPE\037, \037Anope\037, and \n"
+ "\037anope\037 are all different passwords!)\n"
+ " \n"
+ "Guidelines on choosing passwords:\n"
+ " \n"
+ "Passwords should not be easily guessable. For example,\n"
+ "using your real name as a password is a bad idea. Using\n"
+ "your nickname as a password is a much worse idea ;) and,\n"
+ "in fact, %S will not allow it. Also, short\n"
+ "passwords are vulnerable to trial-and-error searches, so\n"
+ "you should choose a password at least 5 characters long.\n"
+ "Finally, the space character cannot be used in passwords.\n"
+ " \n"
+ "The parameter \037email\037 is optional and will set the email\n"
+ "for your nick immediately. However, it may be required\n"
+ "on certain networks.\n"
+ "Your privacy is respected; this e-mail won't be given to\n"
+ "any third-party person.\n"
+ " \n"
+ "This command also creates a new group for your nickname,\n"
+ "that will allow you to register other nicks later sharing\n"
+ "the same configuration, the same set of memos and the\n"
+ "same channel privileges. For more information on this\n"
+ "feature, type \002%R%S HELP GROUP\002."));
return true;
}
void OnSyntaxError(CommandSource &source, const Anope::string &subcommand)
{
if (Config->NSForceEmail)
- SyntaxError(source, "REGISTER", NICK_REGISTER_SYNTAX_EMAIL);
+ SyntaxError(source, "REGISTER", _("\037password\037 \037email\037"));
else
- SyntaxError(source, "REGISTER", NICK_REGISTER_SYNTAX);
+ SyntaxError(source, "REGISTER", _("\037password\037 [\037email\037]"));
}
void OnServHelp(CommandSource &source)
{
- source.Reply(NICK_HELP_CMD_REGISTER);
+ source.Reply(_(" REGISTER Register a nickname"));
}
};
@@ -332,13 +376,13 @@ class CommandNSResend : public Command
{
if (Anope::CurTime < nr->lastmail + Config->NSResendDelay)
{
- source.Reply(MAIL_LATER);
+ source.Reply(_("Cannot send mail now; please retry a little later."));
return MOD_CONT;
}
if (!SendRegmail(u, nr))
{
nr->lastmail = Anope::CurTime;
- source.Reply(NICK_REG_RESENT, nr->email.c_str());
+ source.Reply(_("Your passcode has been re-sent to %s."), nr->email.c_str());
Log(LOG_COMMAND, u, this) << "resend registration verification code for " << nr->nick;
}
else
@@ -353,13 +397,16 @@ class CommandNSResend : public Command
bool OnHelp(CommandSource &source, const Anope::string &subcommand)
{
- source.Reply(NICK_HELP_RESEND);
+ source.Reply(_("Syntax: \002RESEND\002\n"
+ " \n"
+ "This command will re-send the auth code (also called passcode)\n"
+ "to the e-mail address of the user whom is performing it."));
return true;
}
void OnServHelp(CommandSource &source)
{
- source.Reply(NICK_HELP_CMD_RESEND);
+ source.Reply(_(" RESEND Resend a nickserv auth code"));
}
};
@@ -385,8 +432,15 @@ static bool SendRegmail(User *u, NickRequest *nr)
{
char subject[BUFSIZE], message[BUFSIZE];
- snprintf(subject, sizeof(subject), GetString(NICK_REG_MAIL_SUBJECT).c_str(), nr->nick.c_str());
- snprintf(message, sizeof(message), GetString(NICK_REG_MAIL).c_str(), nr->nick.c_str(), Config->NetworkName.c_str(), Config->s_NickServ.c_str(), nr->passcode.c_str(), Config->NetworkName.c_str());
+ snprintf(subject, sizeof(subject), GetString(NULL, "Nickname Registration (%s)").c_str(), nr->nick.c_str());
+ snprintf(message, sizeof(message), GetString(NULL, "Hi,\n"
+ " \n"
+ "You have requested to register the nickname %s on %s.\n"
+ "Please type \" %R%s confirm %s \" to complete registration.\n"
+ " \n"
+ "If you don't know why this mail was sent to you, please ignore it silently.\n"
+ " \n"
+ "%s administrators.").c_str(), nr->nick.c_str(), Config->NetworkName.c_str(), Config->s_NickServ.c_str(), nr->passcode.c_str(), Config->NetworkName.c_str());
return Mail(u, nr, NickServ, subject, message);
}
diff --git a/modules/core/ns_release.cpp b/modules/core/ns_release.cpp
index ed0b18eb9..67c1b73ea 100644
--- a/modules/core/ns_release.cpp
+++ b/modules/core/ns_release.cpp
@@ -29,24 +29,24 @@ class CommandNSRelease : public Command
NickAlias *na;
if (!(na = findnick(nick)))
- 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 (na->nc->HasFlag(NI_SUSPENDED))
- source.Reply(NICK_X_SUSPENDED, na->nick.c_str());
+ source.Reply(LanguageString::NICK_X_SUSPENDED, na->nick.c_str());
else if (!na->HasFlag(NS_HELD))
- source.Reply(NICK_RELEASE_NOT_HELD, nick.c_str());
+ source.Reply(_("Nick \002%s\002 isn't being held."), nick.c_str());
else if (!pass.empty())
{
int res = enc_check_password(pass, na->nc->pass);
if (res == 1)
{
Log(LOG_COMMAND, u, this) << "released " << na->nick;
- source.Reply(NICK_RELEASED);
+ source.Reply(_("Services' hold on your nick has been released."));
}
else
{
- source.Reply(ACCESS_DENIED);
+ source.Reply(LanguageString::ACCESS_DENIED);
if (!res)
{
Log(LOG_COMMAND, u, this) << "invalid password for " << nick;
@@ -60,10 +60,10 @@ class CommandNSRelease : public Command
if (u->Account() == na->nc || (!na->nc->HasFlag(NI_SECURE) && is_on_access(u, na->nc)))
{
na->Release();
- source.Reply(NICK_RELEASED);
+ source.Reply(_("Services' hold on your nick has been released."));
}
else
- source.Reply(ACCESS_DENIED);
+ source.Reply(LanguageString::ACCESS_DENIED);
}
return MOD_CONT;
}
@@ -74,19 +74,31 @@ class CommandNSRelease : public Command
User *u = source.u;
Anope::string relstr = duration(u->Account(), Config->NSReleaseTimeout);
- source.Reply(NICK_HELP_RELEASE, relstr.c_str());
+ source.Reply(_("Syntax: \002RELEASE \037nickname\037 [\037password\037]\002\n"
+ " \n"
+ "Instructs %S to remove any hold on your nickname\n"
+ "caused by automatic kill protection or use of the \002RECOVER\002\n"
+ "command. This holds lasts for %s;\n"
+ "This command gets rid of them sooner.\n"
+ " \n"
+ "In order to use the \002RELEASE\002 command for a nick, your\n"
+ "current address as shown in /WHOIS must be on that nick's\n"
+ "access list, you must be identified and in the group of\n"
+ "that nick, or you must supply the correct password for\n"
+ "the nickname."));
+
return true;
}
void OnSyntaxError(CommandSource &source, const Anope::string &subcommand)
{
- SyntaxError(source, "RELEASE", NICK_RELEASE_SYNTAX);
+ SyntaxError(source, "RELEASE", _("RELEASE \037nickname\037 [\037password\037]"));
}
void OnServHelp(CommandSource &source)
{
- source.Reply(NICK_HELP_CMD_RELEASE);
+ source.Reply(_(" RELEASE Regain custody of your nick after RECOVER"));
}
};
diff --git a/modules/core/ns_resetpass.cpp b/modules/core/ns_resetpass.cpp
index cf0a6cba1..7b5473122 100644
--- a/modules/core/ns_resetpass.cpp
+++ b/modules/core/ns_resetpass.cpp
@@ -29,17 +29,17 @@ class CommandNSResetPass : public Command
NickAlias *na;
if (Config->RestrictMail && (!u->Account() || !u->Account()->HasCommand("nickserv/resetpass")))
- source.Reply(ACCESS_DENIED);
+ source.Reply(LanguageString::ACCESS_DENIED);
if (!(na = findnick(params[0])))
- source.Reply(NICK_X_NOT_REGISTERED, params[0].c_str());
+ source.Reply(LanguageString::NICK_X_NOT_REGISTERED, params[0].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 (SendResetEmail(u, na))
{
Log(LOG_COMMAND, u, this) << "for " << na->nick << " (group: " << na->nc->display << ")";
- source.Reply(NICK_RESETPASS_COMPLETE, na->nick.c_str());
+ source.Reply(_("Password reset email for \002%s\002 has been sent."), na->nick.c_str());
}
}
@@ -48,18 +48,20 @@ class CommandNSResetPass : public Command
bool OnHelp(CommandSource &source, const Anope::string &subcommand)
{
- source.Reply(NICK_HELP_RESETPASS);
+ source.Reply(_("Syntax: \002RESETPASS \037nickname\037\002\n"
+ "Sends a code key to the nickname with instructions on how to\n"
+ "reset their password."));
return true;
}
void OnSyntaxError(CommandSource &source, const Anope::string &subcommand)
{
- SyntaxError(source, "RESETPASS", NICK_RESETPASS_SYNTAX);
+ SyntaxError(source, "RESETPASS", _("RESETPASS \037nickname\037\002"));
}
void OnServHelp(CommandSource &source)
{
- source.Reply(NICK_HELP_CMD_RESETPASS);
+ source.Reply(_(" RESETPASS Helps you reset lost passwords"));
}
};
@@ -97,7 +99,7 @@ class NSResetPass : public Module
{
na->nc->Shrink("ns_resetpass_code");
na->nc->Shrink("ns_resetpass_time");
- source.Reply(NICK_CONFIRM_EXPIRED);
+ source.Reply(_("Your password reset request has expired."));
return EVENT_STOP;
}
@@ -117,7 +119,7 @@ class NSResetPass : public Module
FOREACH_MOD(I_OnNickIdentify, OnNickIdentify(u));
Log(LOG_COMMAND, u, &commandnsresetpass) << "confirmed RESETPASS to forcefully identify to " << na->nick;
- source.Reply(NICK_CONFIRM_SUCCESS, Config->s_NickServ.c_str());
+ source.Reply(_("You are now identified for your nick. Change your password using \"%R%s SET PASSWORD \002newpassword\002\" now."), Config->s_NickServ.c_str());
if (ircd->vhost)
do_on_id(u);
@@ -128,7 +130,7 @@ class NSResetPass : public Module
else
{
Log(LOG_COMMAND, u, &commandnsresetpass) << "invalid confirm passcode for " << na->nick;
- source.Reply(NICK_CONFIRM_INVALID);
+ source.Reply(LanguageString::NICK_CONFIRM_INVALID);
bad_password(u);
}
@@ -144,7 +146,7 @@ static bool SendResetEmail(User *u, NickAlias *na)
{
char subject[BUFSIZE], message[BUFSIZE];
- snprintf(subject, sizeof(subject), GetString(na->nc, NICK_RESETPASS_SUBJECT).c_str(), na->nick.c_str());
+ snprintf(subject, sizeof(subject), GetString(na->nc, _("Reset password request for %s")).c_str(), na->nick.c_str());
int min = 1, max = 62;
int chars[] = {
@@ -160,7 +162,15 @@ static bool SendResetEmail(User *u, NickAlias *na)
for (idx = 0; idx < 20; ++idx)
passcode += chars[1 + static_cast<int>((static_cast<float>(max - min)) * getrandom16() / 65536.0) + min];
- snprintf(message, sizeof(message), GetString(na->nc, NICK_RESETPASS_MESSAGE).c_str(), na->nick.c_str(), Config->s_NickServ.c_str(), passcode.c_str(), Config->NetworkName.c_str());
+ snprintf(message, sizeof(message), GetString(na->nc,
+ "Hi,\n"
+ " \n"
+ "You have requested to have the password for %s reset.\n"
+ "To reset your password, type \002%R%s CONFIRM %s\002\n"
+ " \n"
+ "If you don't know why this mail was sent to you, please ignore it silently.\n"
+ " \n"
+ "%s administrators.").c_str(), na->nick.c_str(), Config->s_NickServ.c_str(), passcode.c_str(), Config->NetworkName.c_str());
na->nc->Shrink("ns_resetpass_code");
na->nc->Shrink("ns_resetpass_time");
diff --git a/modules/core/ns_saset.cpp b/modules/core/ns_saset.cpp
index 4cadaeba4..66c4b6ef7 100644
--- a/modules/core/ns_saset.cpp
+++ b/modules/core/ns_saset.cpp
@@ -36,17 +36,17 @@ class CommandNSSASet : public Command
if (readonly)
{
- source.Reply(NICK_SET_DISABLED);
+ source.Reply(LanguageString::NICK_SET_DISABLED);
return MOD_CONT;
}
NickAlias *na = findnick(nick);
if (!na)
- source.Reply(NICK_SASET_BAD_NICK, 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 (na->nc->HasFlag(NI_SUSPENDED))
- source.Reply(NICK_X_SUSPENDED, na->nick.c_str());
+ source.Reply(LanguageString::NICK_X_SUSPENDED, na->nick.c_str());
else
{
Command *c = this->FindCommand(params[1]);
@@ -64,7 +64,7 @@ class CommandNSSASet : public Command
mod_run_cmd(NickServ, u, c, params[1], cmdparams, false);
}
else
- source.Reply(NICK_SASET_UNKNOWN_OPTION, cmd.c_str());
+ source.Reply(_("Unknown SASET option \002%s\002."), cmd.c_str());
}
return MOD_CONT;
@@ -74,10 +74,14 @@ class CommandNSSASet : public Command
{
if (subcommand.empty())
{
- source.Reply(NICK_HELP_SASET_HEAD);
+ source.Reply(_("Syntax: \002SASET \037nickname\037 \037option\037 \037parameters\037\002.\n"
+ " \n"
+ "Sets various nickname options. \037option\037 can be one of:"));
for (subcommand_map::iterator it = this->subcommands.begin(), it_end = this->subcommands.end(); it != it_end; ++it)
it->second->OnServHelp(source);
- source.Reply(NICK_HELP_SASET_TAIL);
+ source.Reply(_("Type \002%R%S HELP SASET \037option\037\002 for more information\n"
+ "on a specific option. The options will be set on the given\n"
+ "\037nickname\037."));
return true;
}
else
@@ -93,12 +97,12 @@ class CommandNSSASet : public Command
void OnSyntaxError(CommandSource &source, const Anope::string &subcommand)
{
- SyntaxError(source, "SASET", NICK_SASET_SYNTAX);
+ SyntaxError(source, "SASET", LanguageString::NICK_SASET_SYNTAX);
}
void OnServHelp(CommandSource &source)
{
- source.Reply(NICK_HELP_CMD_SASET);
+ source.Reply(_(" SASET Set SET-options on another nickname"));
}
bool AddSubcommand(Module *creator, Command *c)
@@ -141,30 +145,33 @@ class CommandNSSASetDisplay : public Command
NickAlias *na = findnick(params[1]);
if (!na || na->nc != nc)
{
- source.Reply(NICK_SASET_DISPLAY_INVALID, nc->display.c_str());
+ source.Reply(LanguageString::NICK_SASET_DISPLAY_INVALID, nc->display.c_str());
return MOD_CONT;
}
change_core_display(nc, params[1]);
- source.Reply(NICK_SET_DISPLAY_CHANGED, nc->display.c_str());
+ source.Reply(LanguageString::NICK_SET_DISPLAY_CHANGED, nc->display.c_str());
return MOD_CONT;
}
bool OnHelp(CommandSource &source, const Anope::string &)
{
- source.Reply(NICK_HELP_SASET_DISPLAY);
+ source.Reply(_("Syntax: \002SASET \037nickname\037 DISPLAY \037new-display\037\002\n"
+ " \n"
+ "Changes the display used to refer to the nickname group in \n"
+ "Services. The new display MUST be a nick of the group."));
return true;
}
void OnSyntaxError(CommandSource &source, const Anope::string &)
{
// XXX
- SyntaxError(source, "SASET", NICK_SASET_SYNTAX);
+ SyntaxError(source, "SASET", LanguageString::NICK_SASET_SYNTAX);
}
void OnServHelp(CommandSource &source)
{
- source.Reply(NICK_HELP_CMD_SASET_DISPLAY);
+ source.Reply(_(" DISPLAY Set the display of the group in Services"));
}
};
@@ -187,32 +194,32 @@ class CommandNSSASetPassword : public Command
if (Config->NSSecureAdmins && u->Account() != nc && nc->IsServicesOper())
{
- source.Reply(ACCESS_DENIED);
+ source.Reply(LanguageString::ACCESS_DENIED);
return MOD_CONT;
}
else if (nc->display.equals_ci(params[1]) || (Config->StrictPasswords && len < 5))
{
- source.Reply(MORE_OBSCURE_PASSWORD);
+ source.Reply(LanguageString::MORE_OBSCURE_PASSWORD);
return MOD_CONT;
}
else if (len > Config->PassLen)
{
- source.Reply(PASSWORD_TOO_LONG);
+ source.Reply(LanguageString::PASSWORD_TOO_LONG);
return MOD_CONT;
}
if (enc_encrypt(params[1], nc->pass))
{
Log(NickServ) << "Failed to encrypt password for " << nc->display << " (saset)";
- source.Reply(NICK_SASET_PASSWORD_FAILED, nc->display.c_str());
+ source.Reply(LanguageString::NICK_SASET_PASSWORD_FAILED, nc->display.c_str());
return MOD_CONT;
}
Anope::string tmp_pass;
if (enc_decrypt(nc->pass, tmp_pass) == 1)
- source.Reply(NICK_SASET_PASSWORD_CHANGED_TO, nc->display.c_str(), tmp_pass.c_str());
+ source.Reply(LanguageString::NICK_SASET_PASSWORD_CHANGED_TO, nc->display.c_str(), tmp_pass.c_str());
else
- source.Reply(NICK_SASET_PASSWORD_CHANGED, nc->display.c_str());
+ source.Reply(LanguageString::NICK_SASET_PASSWORD_CHANGED, nc->display.c_str());
if (Config->WallSetpass)
ircdproto->SendGlobops(NickServ, "\2%s\2 used SASET PASSWORD on \2%s\2", u->nick.c_str(), nc->display.c_str());
@@ -222,18 +229,20 @@ class CommandNSSASetPassword : public Command
bool OnHelp(CommandSource &source, const Anope::string &)
{
- source.Reply(NICK_HELP_SASET_PASSWORD);
+ source.Reply(_("Syntax: \002SASET \037nickname\037 PASSWORD \037new-password\037\002\n"
+ " \n"
+ "Changes the password used to identify as the nick's owner."));
return true;
}
void OnSyntaxError(CommandSource &source, const Anope::string &)
{
- SyntaxError(source, "SASET", NICK_SASET_SYNTAX);
+ SyntaxError(source, "SASET", LanguageString::NICK_SASET_SYNTAX);
}
void OnServHelp(CommandSource &source)
{
- source.Reply(NICK_HELP_CMD_SASET_PASSWORD);
+ source.Reply(_(" PASSWORD Set the nickname password"));
}
};
diff --git a/modules/core/ns_saset_noexpire.cpp b/modules/core/ns_saset_noexpire.cpp
index 296195785..bc7103aae 100644
--- a/modules/core/ns_saset_noexpire.cpp
+++ b/modules/core/ns_saset_noexpire.cpp
@@ -31,12 +31,12 @@ class CommandNSSASetNoexpire : public Command
if (param.equals_ci("ON"))
{
na->SetFlag(NS_NO_EXPIRE);
- source.Reply(NICK_SASET_NOEXPIRE_ON, na->nick.c_str());
+ source.Reply(_("Nick %s \002will not\002 expire."), na->nick.c_str());
}
else if (param.equals_ci("OFF"))
{
na->UnsetFlag(NS_NO_EXPIRE);
- source.Reply(NICK_SASET_NOEXPIRE_OFF, na->nick.c_str());
+ source.Reply(_("Nick %s \002will\002 expire."), na->nick.c_str());
}
else
this->OnSyntaxError(source, "NOEXPIRE");
@@ -46,18 +46,21 @@ class CommandNSSASetNoexpire : public Command
bool OnHelp(CommandSource &source, const Anope::string &)
{
- source.Reply(NICK_HELP_SASET_NOEXPIRE);
+ source.Reply(_("Syntax: \002SASET \037nickname\037 NOEXPIRE {ON | OFF}\002\n"
+ " \n"
+ "Sets whether the given nickname will expire. Setting this\n"
+ "to \002ON\002 prevents the nickname from expiring."));
return true;
}
void OnSyntaxError(CommandSource &source, const Anope::string &)
{
- SyntaxError(source, "SASET NOEXPIRE", NICK_SASET_NOEXPIRE_SYNTAX);
+ SyntaxError(source, "SASET NOEXPIRE", _("SASET \037nickname\037 NOEXPIRE {ON | OFF}"));
}
void OnServHelp(CommandSource &source)
{
- source.Reply(NICK_HELP_CMD_SASET_NOEXPIRE);
+ source.Reply(_(" NOEXPIRE Prevent the nickname from expiring"));
}
};
diff --git a/modules/core/ns_sendpass.cpp b/modules/core/ns_sendpass.cpp
index 09729f81c..d232f8f16 100644
--- a/modules/core/ns_sendpass.cpp
+++ b/modules/core/ns_sendpass.cpp
@@ -30,11 +30,11 @@ class CommandNSSendPass : public Command
NickAlias *na;
if (Config->RestrictMail && (!u->Account() || !u->Account()->HasCommand("nickserv/sendpass")))
- source.Reply(ACCESS_DENIED);
+ source.Reply(LanguageString::ACCESS_DENIED);
else if (!(na = findnick(nick)))
- 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
{
Anope::string tmp_pass;
@@ -43,11 +43,11 @@ class CommandNSSendPass : public Command
if (SendPassMail(u, na, tmp_pass))
{
Log(Config->RestrictMail ? LOG_ADMIN : LOG_COMMAND, u, this) << "for " << na->nick;
- source.Reply(NICK_SENDPASS_OK, nick.c_str());
+ source.Reply(_("Password of \002%s\002 has been sent."), nick.c_str());
}
}
else
- source.Reply(NICK_SENDPASS_UNAVAILABLE);
+ source.Reply(_("SENDPASS command unavailable because encryption is in use."));
}
return MOD_CONT;
@@ -55,18 +55,24 @@ class CommandNSSendPass : public Command
bool OnHelp(CommandSource &source, const Anope::string &subcommand)
{
- source.Reply(NICK_HELP_SENDPASS);
+ source.Reply(_("Syntax: \002SENDPASS \037nickname\037\002\n"
+ " \n"
+ "Send the password of the given nickname to the e-mail address\n"
+ "set in the nickname record. This command is really useful\n"
+ "to deal with lost passwords.\n"
+ " \n"
+ "May be limited to \002IRC operators\002 on certain networks."));
return true;
}
void OnSyntaxError(CommandSource &source, const Anope::string &subcommand)
{
- SyntaxError(source, "SENDPASS", NICK_SENDPASS_SYNTAX);
+ SyntaxError(source, "SENDPASS", _("SENDPASS \037nickname\037"));
}
void OnServHelp(CommandSource &source)
{
- source.Reply(NICK_HELP_CMD_SENDPASS);
+ source.Reply(_(" SENDPASS Forgot your password? Try this"));
}
};
@@ -95,8 +101,16 @@ static bool SendPassMail(User *u, NickAlias *na, const Anope::string &pass)
{
char subject[BUFSIZE], message[BUFSIZE];
- snprintf(subject, sizeof(subject), GetString(na->nc, NICK_SENDPASS_SUBJECT).c_str(), na->nick.c_str());
- snprintf(message, sizeof(message), GetString(na->nc, NICK_SENDPASS).c_str(), na->nick.c_str(), pass.c_str(), Config->NetworkName.c_str());
+ snprintf(subject, sizeof(subject), GetString(na->nc, "Nickname password (%s)").c_str(), na->nick.c_str());
+ snprintf(message, sizeof(message), GetString(na->nc,
+ "Hi,\n"
+ " \n"
+ "You have requested to receive the password of nickname %s by e-mail.\n"
+ "The password is %s. For security purposes, you should change it as soon as you receive this mail.\n"
+ " \n"
+ "If you don't know why this mail was sent to you, please ignore it silently.\n"
+ " \n"
+ "%s administrators.").c_str(), na->nick.c_str(), pass.c_str(), Config->NetworkName.c_str());
return Mail(u, na->nc, NickServ, subject, message);
}
diff --git a/modules/core/ns_set.cpp b/modules/core/ns_set.cpp
index 482f43d1e..703bec9df 100644
--- a/modules/core/ns_set.cpp
+++ b/modules/core/ns_set.cpp
@@ -34,13 +34,13 @@ class CommandNSSet : public Command
if (readonly)
{
- source.Reply(NICK_SET_DISABLED);
+ source.Reply(LanguageString::NICK_SET_DISABLED);
return MOD_CONT;
}
if (u->Account()->HasFlag(NI_SUSPENDED))
{
- source.Reply(NICK_X_SUSPENDED, u->Account()->display.c_str());
+ source.Reply(LanguageString::NICK_X_SUSPENDED, u->Account()->display.c_str());
return MOD_CONT;
}
@@ -59,7 +59,7 @@ class CommandNSSet : public Command
mod_run_cmd(NickServ, u, c, params[0], cmdparams, false);
}
else
- source.Reply(NICK_SET_UNKNOWN_OPTION, params[0].c_str());
+ source.Reply(LanguageString::NICK_SET_UNKNOWN_OPTION, params[0].c_str());
return MOD_CONT;
}
@@ -68,10 +68,17 @@ class CommandNSSet : public Command
{
if (subcommand.empty())
{
- source.Reply(NICK_HELP_SET_HEAD);
+ source.Reply(_("Syntax: \002SET \037option\037 \037parameters\037\002\n"
+ " \n"
+ "Sets various nickname options. \037option\037 can be one of:"));
for (subcommand_map::iterator it = this->subcommands.begin(), it_end = this->subcommands.end(); it != it_end; ++it)
it->second->OnServHelp(source);
- source.Reply(NICK_HELP_SET_TAIL);
+ source.Reply(_("In order to use this command, you must first identify\n"
+ "with your password (\002%R%S HELP IDENTIFY\002 for more\n"
+ "information).\n"
+ " \n"
+ "Type \002%R%S HELP SET \037option\037\002 for more information\n"
+ "on a specific option."));
return true;
}
else
@@ -87,12 +94,12 @@ class CommandNSSet : public Command
void OnSyntaxError(CommandSource &source, const Anope::string &subcommand)
{
- SyntaxError(source, "SET", NICK_SET_SYNTAX);
+ SyntaxError(source, "SET", LanguageString::NICK_SET_SYNTAX);
}
void OnServHelp(CommandSource &source)
{
- source.Reply(NICK_HELP_CMD_SET);
+ source.Reply(_(" SET Set options, including kill protection"));
}
bool AddSubcommand(Module *creator, Command *c)
@@ -132,30 +139,33 @@ class CommandNSSetDisplay : public Command
if (!na || na->nc != u->Account())
{
- source.Reply(NICK_SASET_DISPLAY_INVALID, u->Account()->display.c_str());
+ source.Reply(LanguageString::NICK_SASET_DISPLAY_INVALID, u->Account()->display.c_str());
return MOD_CONT;
}
change_core_display(u->Account(), params[1]);
- source.Reply(NICK_SET_DISPLAY_CHANGED, u->Account()->display.c_str());
+ source.Reply(LanguageString::NICK_SET_DISPLAY_CHANGED, u->Account()->display.c_str());
return MOD_CONT;
}
bool OnHelp(CommandSource &source, const Anope::string &)
{
- source.Reply(NICK_HELP_SET_DISPLAY);
+ source.Reply(_("Syntax: \002SET DISPLAY \037new-display\037\002\n"
+ " \n"
+ "Changes the display used to refer to your nickname group in \n"
+ "Services. The new display MUST be a nick of your group."));
return true;
}
void OnSyntaxError(CommandSource &source, const Anope::string &)
{
// XXX
- SyntaxError(source, "SET", NICK_SET_SYNTAX);
+ SyntaxError(source, "SET", LanguageString::NICK_SET_SYNTAX);
}
void OnServHelp(CommandSource &source)
{
- source.Reply(NICK_HELP_CMD_SET_DISPLAY);
+ source.Reply(_(" DISPLAY Set the display of your group in Services"));
}
};
@@ -175,46 +185,49 @@ class CommandNSSetPassword : public Command
if (u->Account()->display.equals_ci(param) || (Config->StrictPasswords && len < 5))
{
- source.Reply(MORE_OBSCURE_PASSWORD);
+ source.Reply(LanguageString::MORE_OBSCURE_PASSWORD);
return MOD_CONT;
}
else if (len > Config->PassLen)
{
- source.Reply(PASSWORD_TOO_LONG);
+ source.Reply(LanguageString::PASSWORD_TOO_LONG);
return MOD_CONT;
}
if (enc_encrypt(param, u->Account()->pass) < 0)
{
Log(NickServ) << "Failed to encrypt password for " << u->Account()->display << " (set)";
- source.Reply(NICK_SASET_PASSWORD_FAILED);
+ source.Reply(LanguageString::NICK_SASET_PASSWORD_FAILED);
return MOD_CONT;
}
Anope::string tmp_pass;
if (enc_decrypt(u->Account()->pass, tmp_pass) == 1)
- source.Reply(NICK_SASET_PASSWORD_CHANGED_TO, u->Account()->display.c_str(), tmp_pass.c_str());
+ source.Reply(LanguageString::NICK_SASET_PASSWORD_CHANGED_TO, u->Account()->display.c_str(), tmp_pass.c_str());
else
- source.Reply(NICK_SASET_PASSWORD_CHANGED, u->Account()->display.c_str());
+ source.Reply(LanguageString::NICK_SASET_PASSWORD_CHANGED, u->Account()->display.c_str());
return MOD_CONT;
}
bool OnHelp(CommandSource &source, const Anope::string &)
{
- source.Reply(NICK_HELP_SET_PASSWORD);
+ source.Reply(_("Syntax: \002SET PASSWORD \037new-password\037\002\n"
+ " \n"
+ "Changes the password used to identify you as the nick's\n"
+ "owner."));
return true;
}
void OnSyntaxError(CommandSource &source, const Anope::string &)
{
// XXX
- SyntaxError(source, "SET", NICK_SET_SYNTAX);
+ SyntaxError(source, "SET", LanguageString::NICK_SET_SYNTAX);
}
void OnServHelp(CommandSource &source)
{
- source.Reply(NICK_HELP_CMD_SET_PASSWORD);
+ source.Reply(_(" PASSWORD Set your nickname password"));
}
};
diff --git a/modules/core/ns_set_autoop.cpp b/modules/core/ns_set_autoop.cpp
index 61ebb78a2..a7fc9f9fa 100644
--- a/modules/core/ns_set_autoop.cpp
+++ b/modules/core/ns_set_autoop.cpp
@@ -32,12 +32,12 @@ class CommandNSSetAutoOp : public Command
if (param.equals_ci("ON"))
{
nc->SetFlag(NI_AUTOOP);
- source.Reply(NICK_SASET_AUTOOP_ON, nc->display.c_str());
+ source.Reply(_("Services will now autoop %s in channels."), nc->display.c_str());
}
else if (param.equals_ci("OFF"))
{
nc->UnsetFlag(NI_AUTOOP);
- source.Reply(NICK_SASET_AUTOOP_OFF, nc->display.c_str());
+ source.Reply(_("Services will no longer autoop %s in channels."), nc->display.c_str());
}
else
this->OnSyntaxError(source, "AUTOOP");
@@ -47,18 +47,21 @@ class CommandNSSetAutoOp : public Command
bool OnHelp(CommandSource &source, const Anope::string &)
{
- source.Reply(NICK_HELP_SET_AUTOOP);
+ source.Reply(_("Syntax: \002SET AUTOOP {ON | OFF}\002\n"
+ " \n"
+ "Sets whether you will be opped automatically. Set to ON to \n"
+ "allow ChanServ to op you automatically when entering channels."));
return true;
}
void OnSyntaxError(CommandSource &source, const Anope::string &)
{
- SyntaxError(source, "SET AUTOOP", NICK_SET_AUTOOP_SYNTAX);
+ SyntaxError(source, "SET AUTOOP", _("SET AUTOOP {ON | OFF}"));
}
void OnServHelp(CommandSource &source)
{
- source.Reply(NICK_HELP_CMD_SET_AUTOOP);
+ source.Reply(_(" AUTOOP Should services op you automatically. "));
}
};
@@ -71,18 +74,22 @@ class CommandNSSASetAutoOp : public CommandNSSetAutoOp
bool OnHelp(CommandSource &source, const Anope::string &)
{
- source.Reply(NICK_HELP_SASET_AUTOOP);
+ source.Reply(_("Syntax: \002SASET \037nickname\037 AUTOOP {ON | OFF}\002\n"
+ " \n"
+ "Sets whether the given nickname will be opped automatically.\n"
+ "Set to \002ON\002 to allow ChanServ to op the given nickname \n"
+ "omatically when joining channels."));
return true;
}
void OnSyntaxError(CommandSource &source, const Anope::string &)
{
- SyntaxError(source, "SET AUTOOP", NICK_SASET_AUTOOP_SYNTAX);
+ SyntaxError(source, "SET AUTOOP", _("SASET \037nickname\037 AUTOOP {ON | OFF}"));
}
void OnServHelp(CommandSource &source)
{
- source.Reply(NICK_HELP_CMD_SASET_AUTOOP);
+ source.Reply(_(" AUTOOP Turn autoop on or off"));
}
};
diff --git a/modules/core/ns_set_email.cpp b/modules/core/ns_set_email.cpp
index 227941acd..41aa84e31 100644
--- a/modules/core/ns_set_email.cpp
+++ b/modules/core/ns_set_email.cpp
@@ -32,29 +32,29 @@ class CommandNSSetEmail : public Command
if (param.empty() && Config->NSForceEmail)
{
- source.Reply(NICK_SET_EMAIL_UNSET_IMPOSSIBLE);
+ source.Reply(_("You cannot unset the e-mail on this network."));
return MOD_CONT;
}
else if (Config->NSSecureAdmins && u->Account() != nc && nc->IsServicesOper())
{
- source.Reply(ACCESS_DENIED);
+ source.Reply(LanguageString::ACCESS_DENIED);
return MOD_CONT;
}
else if (!param.empty() && !MailValidate(param))
{
- source.Reply(MAIL_X_INVALID, param.c_str());
+ source.Reply(LanguageString::MAIL_X_INVALID, param.c_str());
return MOD_CONT;
}
if (!param.empty())
{
nc->email = param;
- source.Reply(NICK_SASET_EMAIL_CHANGED, nc->display.c_str(), param.c_str());
+ source.Reply(_("E-mail address for \002%s\002 changed to \002%s\002."), nc->display.c_str(), param.c_str());
}
else
{
nc->email.clear();
- source.Reply(NICK_SASET_EMAIL_UNSET, nc->display.c_str());
+ source.Reply(_("E-mail address for \002%s\002 unset."), nc->display.c_str());
}
return MOD_CONT;
@@ -62,13 +62,17 @@ class CommandNSSetEmail : public Command
bool OnHelp(CommandSource &source, const Anope::string &)
{
- source.Reply(NICK_HELP_SET_EMAIL);
+ source.Reply(_("Syntax: \002SET EMAIL \037address\037\002\n"
+ " \n"
+ "Associates the given E-mail address with your nickname.\n"
+ "This address will be displayed whenever someone requests\n"
+ "information on the nickname with the \002INFO\002 command."));
return true;
}
void OnServHelp(CommandSource &source)
{
- source.Reply(NICK_HELP_CMD_SET_EMAIL);
+ source.Reply(_(" EMAIL Associate an E-mail address with your nickname"));
}
};
@@ -81,13 +85,15 @@ class CommandNSSASetEmail : public CommandNSSetEmail
bool OnHelp(CommandSource &source, const Anope::string &)
{
- source.Reply(NICK_HELP_SASET_EMAIL);
+ source.Reply(_("Syntax: \002SASET \037nickname\037 EMAIL \037address\037\002\n"
+ " \n"
+ "Associates the given E-mail address with the nickname."));
return true;
}
void OnServHelp(CommandSource &source)
{
- source.Reply(NICK_HELP_CMD_SASET_EMAIL);
+ source.Reply(_(" EMAIL Associate an E-mail address with the nickname"));
}
};
diff --git a/modules/core/ns_set_greet.cpp b/modules/core/ns_set_greet.cpp
index ab1733fa8..d0c0bdcd9 100644
--- a/modules/core/ns_set_greet.cpp
+++ b/modules/core/ns_set_greet.cpp
@@ -32,12 +32,12 @@ class CommandNSSetGreet : public Command
if (!param.empty())
{
nc->greet = param;
- source.Reply(NICK_SASET_GREET_CHANGED, nc->display.c_str(), nc->greet.c_str());
+ source.Reply(_("Greet message for \002%s\002 changed to \002%s\002."), nc->display.c_str(), nc->greet.c_str());
}
else
{
nc->greet.clear();
- source.Reply(NICK_SASET_GREET_UNSET, nc->display.c_str());
+ source.Reply(_("Greet message for \002%s\002 unset."), nc->display.c_str());
}
return MOD_CONT;
@@ -45,13 +45,18 @@ class CommandNSSetGreet : public Command
bool OnHelp(CommandSource &source, const Anope::string &)
{
- source.Reply(NICK_HELP_SET_GREET);
+ source.Reply(_("Syntax: \002SET GREET \037message\037\002\n"
+ " \n"
+ "Makes the given message the greet of your nickname, that\n"
+ "will be displayed when joining a channel that has GREET\n"
+ "option enabled, provided that you have the necessary \n"
+ "access on it."));
return true;
}
void OnServHelp(CommandSource &source)
{
- source.Reply(NICK_HELP_CMD_SET_GREET);
+ source.Reply(_(" GREET Associate a greet message with your nickname"));
}
};
@@ -64,13 +69,18 @@ class CommandNSSASetGreet : public CommandNSSetGreet
bool OnHelp(CommandSource &source, const Anope::string &)
{
- source.Reply(NICK_HELP_SASET_GREET);
+ source.Reply(_("Syntax: \002SASET \037nickname\037 GREET \037message\037\002\n"
+ " \n"
+ "Makes the given message the greet of the nickname, that\n"
+ "will be displayed when joining a channel that has GREET\n"
+ "option enabled, provided that the user has the necessary \n"
+ "access on it."));
return true;
}
void OnServHelp(CommandSource &source)
{
- source.Reply(NICK_HELP_CMD_SASET_GREET);
+ source.Reply(_(" GREET Associate a greet message with the nickname"));
}
};
diff --git a/modules/core/ns_set_hide.cpp b/modules/core/ns_set_hide.cpp
index f7685cfc2..460dbebaa 100644
--- a/modules/core/ns_set_hide.cpp
+++ b/modules/core/ns_set_hide.cpp
@@ -27,7 +27,7 @@ class CommandNSSetHide : public Command
throw CoreException("NULL na in CommandNSSetHide");
NickCore *nc = na->nc;
- LanguageString onmsg, offmsg;
+ Anope::string onmsg, offmsg;
NickCoreFlag flag;
Anope::string param = params[1];
@@ -36,26 +36,26 @@ class CommandNSSetHide : public Command
if (param.equals_ci("EMAIL"))
{
flag = NI_HIDE_EMAIL;
- onmsg = NICK_SASET_HIDE_EMAIL_ON;
- offmsg = NICK_SASET_HIDE_EMAIL_OFF;
+ onmsg = _("The E-mail address of \002%s\002 will now be hidden from %s INFO displays.");
+ offmsg = _("The E-mail address of \002%s\002 will now be shown in %s INFO displays.");
}
else if (param.equals_ci("USERMASK"))
{
flag = NI_HIDE_MASK;
- onmsg = NICK_SASET_HIDE_MASK_ON;
- offmsg = NICK_SASET_HIDE_MASK_OFF;
+ onmsg = _("The last seen user@host mask of \002%s\002 will now be hidden from %s INFO displays.");
+ offmsg = _("The last seen user@host mask of \002%s\002 will now be shown in %s INFO displays.");
}
else if (param.equals_ci("STATUS"))
{
flag = NI_HIDE_STATUS;
- onmsg = NICK_SASET_HIDE_STATUS_ON;
- offmsg = NICK_SASET_HIDE_STATUS_OFF;
+ onmsg = _("The services access status of \002%s\002 will now be hidden from %s INFO displays.");
+ offmsg = _("The services access status of \002%s\002 will now be shown in %s INFO displays.");
}
else if (param.equals_ci("QUIT"))
{
flag = NI_HIDE_QUIT;
- onmsg = NICK_SASET_HIDE_QUIT_ON;
- offmsg = NICK_SASET_HIDE_QUIT_OFF;
+ onmsg = _("The last quit message of \002%s\002 will now be hidden from %s INFO displays.");
+ offmsg = _("The last quit message of \002%s\002 will now be shown in %s INFO displays.");
}
else
{
@@ -66,12 +66,12 @@ class CommandNSSetHide : public Command
if (arg.equals_ci("ON"))
{
nc->SetFlag(flag);
- source.Reply(onmsg, nc->display.c_str(), Config->s_NickServ.c_str());
+ source.Reply(onmsg.c_str(), nc->display.c_str(), Config->s_NickServ.c_str());
}
else if (arg.equals_ci("OFF"))
{
nc->UnsetFlag(flag);
- source.Reply(offmsg, nc->display.c_str(), Config->s_NickServ.c_str());
+ source.Reply(offmsg.c_str(), nc->display.c_str(), Config->s_NickServ.c_str());
}
else
this->OnSyntaxError(source, "HIDE");
@@ -81,18 +81,26 @@ class CommandNSSetHide : public Command
bool OnHelp(CommandSource &source, const Anope::string &)
{
- source.Reply(NICK_HELP_SET_HIDE);
+ source.Reply(_("Syntax: \002SET HIDE {EMAIL | STATUS | USERMASK | QUIT} {ON | OFF}\002\n"
+ " \n"
+ "Allows you to prevent certain pieces of information from\n"
+ "being displayed when someone does a %S \002INFO\002 on your\n"
+ "nick. You can hide your E-mail address (\002EMAIL\002), last seen\n"
+ "user@host mask (\002USERMASK\002), your services access status\n"
+ "(\002STATUS\002) and last quit message (\002QUIT\002).\n"
+ "The second parameter specifies whether the information should\n"
+ "be displayed (\002OFF\002) or hidden (\002ON\002)."));
return true;
}
void OnSyntaxError(CommandSource &source, const Anope::string &)
{
- SyntaxError(source, "SET HIDE", NICK_SET_HIDE_SYNTAX);
+ SyntaxError(source, "SET HIDE", _("SET HIDE {EMAIL | STATUS | USERMASK | QUIT} {ON | OFF}"));
}
void OnServHelp(CommandSource &source)
{
- source.Reply(NICK_HELP_CMD_SET_HIDE);
+ source.Reply(_(" HIDE Hide certain pieces of nickname information"));
}
};
@@ -105,18 +113,26 @@ class CommandNSSASetHide : public CommandNSSetHide
bool OnHelp(CommandSource &source, const Anope::string &)
{
- source.Reply(NICK_HELP_SASET_HIDE);
+ source.Reply(_("Syntax: \002SASET \037nickname\037 HIDE {EMAIL | STATUS | USERMASK | QUIT} {ON | OFF}\002\n"
+ " \n"
+ "Allows you to prevent certain pieces of information from\n"
+ "being displayed when someone does a %S \002INFO\002 on the\n"
+ "nick. You can hide the E-mail address (\002EMAIL\002), last seen\n"
+ "user@host mask (\002USERMASK\002), the services access status\n"
+ "(\002STATUS\002) and last quit message (\002QUIT\002).\n"
+ "The second parameter specifies whether the information should\n"
+ "be displayed (\002OFF\002) or hidden (\002ON\002)."));
return true;
}
void OnSyntaxError(CommandSource &source, const Anope::string &)
{
- SyntaxError(source, "SASET HIDE", NICK_SASET_HIDE_SYNTAX);
+ SyntaxError(source, "SASET HIDE", _("SASET NICK_SASET_HIDE_SYNTAX37nicknameNICK_SASET_HIDE_SYNTAX37 HIDE {EMAIL | STATUS | USERMASK | QUIT} {ON | OFF}"));
}
void OnServHelp(CommandSource &source)
{
- source.Reply(NICK_HELP_CMD_SET_HIDE);
+ source.Reply(_(" HIDE Hide certain pieces of nickname information"));
}
};
diff --git a/modules/core/ns_set_kill.cpp b/modules/core/ns_set_kill.cpp
index 2e8b86320..35cca658d 100644
--- a/modules/core/ns_set_kill.cpp
+++ b/modules/core/ns_set_kill.cpp
@@ -35,14 +35,14 @@ class CommandNSSetKill : public Command
nc->SetFlag(NI_KILLPROTECT);
nc->UnsetFlag(NI_KILL_QUICK);
nc->UnsetFlag(NI_KILL_IMMED);
- source.Reply(NICK_SASET_KILL_ON, nc->display.c_str());
+ source.Reply(_("Protection is now \002\002 for \002%s\002."), nc->display.c_str());
}
else if (param.equals_ci("QUICK"))
{
nc->SetFlag(NI_KILLPROTECT);
nc->SetFlag(NI_KILL_QUICK);
nc->UnsetFlag(NI_KILL_IMMED);
- source.Reply(NICK_SASET_KILL_QUICK, nc->display.c_str());
+ source.Reply(_("Protection is now \002\002 for \002%s\002, with a reduced delay."), nc->display.c_str());
}
else if (param.equals_ci("IMMED"))
{
@@ -51,17 +51,17 @@ class CommandNSSetKill : public Command
nc->SetFlag(NI_KILLPROTECT);
nc->SetFlag(NI_KILL_IMMED);
nc->UnsetFlag(NI_KILL_QUICK);
- source.Reply(NICK_SASET_KILL_IMMED, nc->display.c_str());
+ source.Reply(_("Protection is now \002\002 for \002%s\002, with no delay."), nc->display.c_str());
}
else
- source.Reply(NICK_SET_KILL_IMMED_DISABLED);
+ source.Reply(_("The \002IMMED\002 option is not available on this network."));
}
else if (param.equals_ci("OFF"))
{
nc->UnsetFlag(NI_KILLPROTECT);
nc->UnsetFlag(NI_KILL_QUICK);
nc->UnsetFlag(NI_KILL_IMMED);
- source.Reply(NICK_SASET_KILL_OFF, nc->display.c_str());
+ source.Reply(_("Protection is now \002\002 for \002%s\002."), nc->display.c_str());
}
else
this->OnSyntaxError(source, "KILL");
@@ -71,18 +71,31 @@ class CommandNSSetKill : public Command
bool OnHelp(CommandSource &source, const Anope::string &)
{
- source.Reply(NICK_HELP_SET_KILL);
+ source.Reply(_("Syntax: \002SET KILL {ON | QUICK | IMMED | OFF}\002\n"
+ " \n"
+ "Turns the automatic protection option for your nick\n"
+ "on or off. With protection on, if another user\n"
+ "tries to take your nick, they will be given one minute to\n"
+ "change to another nick, after which %S will forcibly change\n"
+ "their nick.\n"
+ " \n"
+ "If you select \002QUICK\002, the user will be given only 20 seconds\n"
+ "to change nicks instead of the usual 60. If you select\n"
+ "\002IMMED\002, user's nick will be changed immediately \037without\037 being\n"
+ "warned first or given a chance to change their nick; please\n"
+ "do not use this option unless necessary. Also, your\n"
+ "network's administrators may have disabled this option."));
return true;
}
void OnSyntaxError(CommandSource &source, const Anope::string &)
{
- SyntaxError(source, "SET KILL", Config->NSAllowKillImmed ? NICK_SET_KILL_IMMED_SYNTAX : NICK_SET_KILL_SYNTAX);
+ SyntaxError(source, "SET KILL", Config->NSAllowKillImmed ? _("SET KILL {ON | QUICK | IMMED | OFF}") : _("SET KILL {ON | QUICK | OFF}"));
}
void OnServHelp(CommandSource &source)
{
- source.Reply(NICK_HELP_CMD_SET_KILL);
+ source.Reply(_(" KILL Turn protection on or off"));
}
};
@@ -95,18 +108,31 @@ class CommandNSSASetKill : public CommandNSSetKill
bool OnHelp(CommandSource &source, const Anope::string &)
{
- source.Reply(NICK_HELP_SASET_KILL);
+ source.Reply(_("Syntax: \002SASET \037nickname\037 KILL {ON | QUICK | IMMED | OFF}\002\n"
+ " \n"
+ "Turns the automatic protection option for the nick\n"
+ "on or off. With protection on, if another user\n"
+ "tries to take the nick, they will be given one minute to\n"
+ "change to another nick, after which %S will forcibly change\n"
+ "their nick.\n"
+ " \n"
+ "If you select \002QUICK\002, the user will be given only 20 seconds\n"
+ "to change nicks instead of the usual 60. If you select\n"
+ "\002IMMED\002, the user's nick will be changed immediately \037without\037 being\n"
+ "warned first or given a chance to change their nick; please\n"
+ "do not use this option unless necessary. Also, your\n"
+ "network's administrators may have disabled this option."));
return true;
}
void OnSyntaxError(CommandSource &source, const Anope::string &)
{
- SyntaxError(source, "SASET KILL", Config->NSAllowKillImmed ? NICK_SASET_KILL_IMMED_SYNTAX : NICK_SASET_KILL_SYNTAX);
+ SyntaxError(source, "SASET KILL", Config->NSAllowKillImmed ? _("SASET \037nickname\037 KILL {ON | QUICK | IMMED | OFF}") : _("SASET \037nickname\037 KILL {ON | QUICK | OFF}"));
}
void OnServHelp(CommandSource &source)
{
- source.Reply(NICK_HELP_CMD_SET_KILL);
+ source.Reply(_(" KILL Turn protection on or off"));
}
};
diff --git a/modules/core/ns_set_language.cpp b/modules/core/ns_set_language.cpp
index 9f81a43f0..e942be388 100644
--- a/modules/core/ns_set_language.cpp
+++ b/modules/core/ns_set_language.cpp
@@ -41,18 +41,28 @@ class CommandNSSetLanguage : public Command
}
nc->language = param != "en" ? param : "";
- source.Reply(NICK_SET_LANGUAGE_CHANGED);
+ PopLanguage();
+ PushLanguage("anope", nc->language);
+ source.Reply(_("Language changed to \002English\002."));
return MOD_CONT;
}
bool OnHelp(CommandSource &source, const Anope::string &)
{
- source.Reply(NICK_HELP_SET_LANGUAGE);
+ source.Reply(_("Syntax: \002SET LANGUAGE \037language\037\002\n"
+ " \n"
+ "Changes the language Services uses when sending messages to\n"
+ "you (for example, when responding to a command you send).\n"
+ "\037language\037 should be chosen from the following list of\n"
+ "supported languages:"));
+
source.Reply(" en (English)");
for (unsigned j = 0; j < languages.size(); ++j)
{
- const Anope::string &langname = GetString(languages[j], LANGUAGE_NAME);
+ PushLanguage("anope", languages[j]);
+ const Anope::string &langname = _("English");
+ PopLanguage();
if (langname == "English")
continue;
source.Reply(" %s (%s)", languages[j].c_str(), langname.c_str());
@@ -63,12 +73,14 @@ class CommandNSSetLanguage : public Command
void OnSyntaxError(CommandSource &source, const Anope::string &)
{
- SyntaxError(source, "SET LANGUAGE", NICK_SET_LANGUAGE_SYNTAX);
+ SyntaxError(source, "SET LANGUAGE", _("SET LANGUAGE \037language\037"));
}
void OnServHelp(CommandSource &source)
{
- source.Reply(NICK_HELP_CMD_SET_LANGUAGE);
+ source.Reply(_(" LANGUAGE Set the language Services will use when\n"
+ " sending messages to you"));
+
}
};
@@ -81,18 +93,28 @@ class CommandNSSASetLanguage : public CommandNSSetLanguage
bool OnHelp(CommandSource &source, const Anope::string &)
{
- source.Reply(NICK_HELP_SASET_LANGUAGE);
+ source.Reply(_("Syntax: \002SET LANGUAGE \037language\037\002\n"
+ " \n"
+ "Changes the language Services uses when sending messages to\n"
+ "you (for example, when responding to a command you send).\n"
+ "\037language\037 should be chosen from the following list of\n"
+ "supported languages:"));
return true;
}
void OnSyntaxError(CommandSource &source, const Anope::string &)
{
- SyntaxError(source, "SASET LANGUAGE", NICK_SASET_LANGUAGE_SYNTAX);
+ SyntaxError(source, "SASET LANGUAGE", _("SASET \037nickname\037 LANGUAGE \037number\037"));
}
void OnServHelp(CommandSource &source)
{
- source.Reply(NICK_HELP_CMD_SASET_LANGUAGE);
+ source.Reply(_("Syntax: \002SASET \037nickname\037 LANGUAGE \037language\037\002\n"
+ " \n"
+ "Changes the language Services uses when sending messages to\n"
+ "\037nickname\037 (for example, when responding to a command he sends).\n"
+ "\037language\037 should be chosen from a list of supported languages\n"
+ "that you can get by typing \002%R%S HELP SET LANGUAGE\002."));
}
};
diff --git a/modules/core/ns_set_message.cpp b/modules/core/ns_set_message.cpp
index 948a12f52..fc14e067d 100644
--- a/modules/core/ns_set_message.cpp
+++ b/modules/core/ns_set_message.cpp
@@ -29,7 +29,7 @@ class CommandNSSetMessage : public Command
if (!Config->UsePrivmsg)
{
- source.Reply(NICK_SET_OPTION_DISABLED, "MSG");
+ source.Reply(_("Option \002%s\02 cannot be set on this network."), "MSG");
return MOD_CONT;
}
@@ -38,12 +38,12 @@ class CommandNSSetMessage : public Command
if (param.equals_ci("ON"))
{
nc->SetFlag(NI_MSG);
- source.Reply(NICK_SASET_MSG_ON, nc->display.c_str());
+ source.Reply(_("Services will now reply to \002%s\002 with \002messages\002."), nc->display.c_str());
}
else if (param.equals_ci("OFF"))
{
nc->UnsetFlag(NI_MSG);
- source.Reply(NICK_SASET_MSG_OFF, nc->display.c_str());
+ source.Reply(_("Services will now reply to \002%s\002 with \002notices\002."), nc->display.c_str());
}
else
this->OnSyntaxError(source, "MSG");
@@ -53,18 +53,22 @@ class CommandNSSetMessage : public Command
bool OnHelp(CommandSource &source, const Anope::string &)
{
- source.Reply(NICK_HELP_SET_MSG);
+ source.Reply(_("Syntax: \002SET MSG {ON | OFF}\002\n"
+ " \n"
+ "Allows you to choose the way Services are communicating with \n"
+ "you. With \002MSG\002 set, Services will use messages, else they'll \n"
+ "use notices."));
return true;
}
void OnSyntaxError(CommandSource &source, const Anope::string &)
{
- SyntaxError(source, "SET MSG", NICK_SET_MSG_SYNTAX);
+ SyntaxError(source, "SET MSG", _("SET MSG {ON | OFF}"));
}
void OnServHelp(CommandSource &source)
{
- source.Reply(NICK_HELP_CMD_SET_MSG);
+ source.Reply(_(" MSG Change the communication method of Services"));
}
};
@@ -77,18 +81,22 @@ class CommandNSSASetMessage : public CommandNSSetMessage
bool OnHelp(CommandSource &source, const Anope::string &)
{
- source.Reply(NICK_HELP_SASET_MSG);
+ source.Reply(_("Syntax: \002SASET \037nickname\037 MSG {ON | OFF}\002\n"
+ " \n"
+ "Allows you to choose the way Services are communicating with \n"
+ "the given user. With \002MSG\002 set, Services will use messages,\n"
+ "else they'll use notices."));
return true;
}
void OnSyntaxError(CommandSource &source, const Anope::string &)
{
- SyntaxError(source, "SASET MSG", NICK_SASET_MSG_SYNTAX);
+ SyntaxError(source, "SASET MSG", _("SASAET \037nickname\037 PRIVATE {ON | OFF}"));
}
void OnServHelp(CommandSource &source)
{
- source.Reply(NICK_HELP_CMD_SET_MSG);
+ source.Reply(_(" MSG Change the communication method of Services"));
}
};
diff --git a/modules/core/ns_set_private.cpp b/modules/core/ns_set_private.cpp
index 61d6f5bd8..70e93e27e 100644
--- a/modules/core/ns_set_private.cpp
+++ b/modules/core/ns_set_private.cpp
@@ -32,12 +32,12 @@ class CommandNSSetPrivate : public Command
if (param.equals_ci("ON"))
{
nc->SetFlag(NI_PRIVATE);
- source.Reply(NICK_SASET_PRIVATE_ON, nc->display.c_str());
+ source.Reply(_("Private option is now \002\002 for \002%s\002."), nc->display.c_str());
}
else if (param.equals_ci("OFF"))
{
nc->UnsetFlag(NI_PRIVATE);
- source.Reply(NICK_SASET_PRIVATE_OFF, nc->display.c_str());
+ source.Reply(_("Private option is now \002\002 for \002%s\002."), nc->display.c_str());
}
else
this->OnSyntaxError(source, "PRIVATE");
@@ -47,18 +47,24 @@ class CommandNSSetPrivate : public Command
bool OnHelp(CommandSource &source, const Anope::string &)
{
- source.Reply(NICK_HELP_SET_PRIVATE);
+ source.Reply(_("Syntax: \002SET PRIVATE {ON | OFF}\002\n"
+ " \n"
+ "Turns %S's privacy option on or off for your nick.\n"
+ "With \002PRIVATE\002 set, your nickname will not appear in\n"
+ "nickname lists generated with %S's \002LIST\002 command.\n"
+ "(However, anyone who knows your nickname can still get\n"
+ "information on it using the \002INFO\002 command.)"));
return true;
}
void OnSyntaxError(CommandSource &source, const Anope::string &)
{
- SyntaxError(source, "SET PRIVATE", NICK_SET_PRIVATE_SYNTAX);
+ SyntaxError(source, "SET PRIVATE", _("SET PRIVATE {ON | OFF}"));
}
void OnServHelp(CommandSource &source)
{
- source.Reply(NICK_HELP_CMD_SET_PRIVATE);
+ source.Reply(_(" PRIVATE Prevent the nickname from appearing in a \002%R%S LIST\002"));
}
};
@@ -71,18 +77,23 @@ class CommandNSSASetPrivate : public CommandNSSetPrivate
bool OnHelp(CommandSource &source, const Anope::string &)
{
- source.Reply(NICK_HELP_SASET_PRIVATE);
+ source.Reply(_("Syntax: \002SASET \037nickname\037 PRIVATE {ON | OFF}\002\n"
+ " \n"
+ "Turns %S's privacy option on or off for the nick.\n"
+ "With \002PRIVATE\002 set, the nickname will not appear in\n"
+ "nickname lists generated with %S's \002LIST\002 command.\n"
+ "(However, anyone who knows the nickname can still get\n"
+ "information on it using the \002INFO\002 command.)"));
return true;
}
void OnSyntaxError(CommandSource &source, const Anope::string &)
{
- SyntaxError(source, "SASET PRIVATE", NICK_SASET_PRIVATE_SYNTAX);
+ SyntaxError(source, "SASET PRIVATE", _("SASET \037nickname\037 PRIVATE {ON | OFF}"));
}
void OnServHelp(CommandSource &source)
{
- source.Reply(NICK_HELP_CMD_SASET_PRIVATE);
}
};
diff --git a/modules/core/ns_set_secure.cpp b/modules/core/ns_set_secure.cpp
index afcaf6db0..9c3ad7b60 100644
--- a/modules/core/ns_set_secure.cpp
+++ b/modules/core/ns_set_secure.cpp
@@ -32,12 +32,12 @@ class CommandNSSetSecure : public Command
if (param.equals_ci("ON"))
{
nc->SetFlag(NI_SECURE);
- source.Reply(NICK_SASET_SECURE_ON, nc->display.c_str());
+ source.Reply(_("Secure option is now \002\002 for \002%s\002."), nc->display.c_str());
}
else if (param.equals_ci("OFF"))
{
nc->UnsetFlag(NI_SECURE);
- source.Reply(NICK_SASET_SECURE_OFF, nc->display.c_str());
+ source.Reply(_("Secure option is now \002\002 for \002%s\002."), nc->display.c_str());
}
else
this->OnSyntaxError(source, "SECURE");
@@ -47,18 +47,26 @@ class CommandNSSetSecure : public Command
bool OnHelp(CommandSource &source, const Anope::string &)
{
- source.Reply(NICK_HELP_SET_SECURE);
+ source.Reply(_("Syntax: \002SET SECURE {ON | OFF}\002\n"
+ " \n"
+ "Turns %S's security features on or off for your\n"
+ "nick. With \002SECURE\002 set, you must enter your password\n"
+ "before you will be recognized as the owner of the nick,\n"
+ "regardless of whether your address is on the access\n"
+ "list. However, if you are on the access list, %S\n"
+ "will not auto-kill you regardless of the setting of the\n"
+ "\002KILL\002 option."));
return true;
}
void OnSyntaxError(CommandSource &source, const Anope::string &)
{
- SyntaxError(source, "SET SECURE", NICK_SET_SECURE_SYNTAX);
+ SyntaxError(source, "SET SECURE", _("SET SECURE {ON | OFF}"));
}
void OnServHelp(CommandSource &source)
{
- source.Reply(NICK_HELP_CMD_SET_SECURE);
+ source.Reply(_(" SECURE Turn nickname security on or off"));
}
};
@@ -71,18 +79,26 @@ class CommandNSSASetSecure : public CommandNSSetSecure
bool OnHelp(CommandSource &source, const Anope::string &)
{
- source.Reply(NICK_HELP_SASET_SECURE);
+ source.Reply(_("Syntax: \002SASET \037nickname\037 SECURE {ON | OFF}\002\n"
+ " \n"
+ "Turns %S's security features on or off for your\n"
+ "nick. With \002SECURE\002 set, you must enter your password\n"
+ "before you will be recognized as the owner of the nick,\n"
+ "regardless of whether your address is on the access\n"
+ "list. However, if you are on the access list, %S\n"
+ "will not auto-kill you regardless of the setting of the\n"
+ "\002KILL\002 option."));
return true;
}
void OnSyntaxError(CommandSource &source, const Anope::string &)
{
- SyntaxError(source, "SASET SECURE", NICK_SASET_SECURE_SYNTAX);
+ SyntaxError(source, "SASET SECURE", _("SASET \037nickname\037 SECURE {ON | OFF}"));
}
void OnServHelp(CommandSource &source)
{
- source.Reply(NICK_HELP_CMD_SET_SECURE);
+ source.Reply(_(" SECURE Turn nickname security on or off"));
}
};
diff --git a/modules/core/ns_status.cpp b/modules/core/ns_status.cpp
index 824b9a7d4..5584d957d 100644
--- a/modules/core/ns_status.cpp
+++ b/modules/core/ns_status.cpp
@@ -33,31 +33,50 @@ class CommandNSStatus : public Command
{
User *u2 = finduser(nickbuf);
if (!u2) /* Nick is not online */
- source.Reply(NICK_STATUS_REPLY, nickbuf.c_str(), 0, "");
+ source.Reply(_("STATUS %s %d %s"), nickbuf.c_str(), 0, "");
else if (u2->IsIdentified() && na && na->nc == u2->Account()) /* Nick is identified */
- source.Reply(NICK_STATUS_REPLY, nickbuf.c_str(), 3, u2->Account()->display.c_str());
+ source.Reply(_("STATUS %s %d %s"), nickbuf.c_str(), 3, u2->Account()->display.c_str());
else if (u2->IsRecognized()) /* Nick is recognised, but NOT identified */
- source.Reply(NICK_STATUS_REPLY, nickbuf.c_str(), 2, u2->Account() ? u2->Account()->display.c_str() : "");
+ source.Reply(_("STATUS %s %d %s"), nickbuf.c_str(), 2, u2->Account() ? u2->Account()->display.c_str() : "");
else if (!na) /* Nick is online, but NOT a registered */
- source.Reply(NICK_STATUS_REPLY, nickbuf.c_str(), 0, "");
+ source.Reply(_("STATUS %s %d %s"), nickbuf.c_str(), 0, "");
else
/* Nick is not identified for the nick, but they could be logged into an account,
* so we tell the user about it
*/
- source.Reply(NICK_STATUS_REPLY, nickbuf.c_str(), 1, u2->Account() ? u2->Account()->display.c_str() : "");
+ source.Reply(_("STATUS %s %d %s"), nickbuf.c_str(), 1, u2->Account() ? u2->Account()->display.c_str() : "");
}
return MOD_CONT;
}
bool OnHelp(CommandSource &source, const Anope::string &subcommand)
{
- source.Reply(NICK_HELP_STATUS);
+ source.Reply(_("Syntax: \002STATUS \037nickname\037...\002\n"
+ " \n"
+ "Returns whether the user using the given nickname is\n"
+ "recognized as the owner of the nickname. The response has\n"
+ "this format:\n"
+ " \n"
+ " \037nickname\037 \037status-code\037 \037account\037\n"
+ " \n"
+ "where \037nickname\037 is the nickname sent with the command,\n"
+ "\037status-code\037 is one of the following, and \037account\037\n"
+ "is the account they are logged in as.\n"
+ " \n"
+ " 0 - no such user online \002or\002 nickname not registered\n"
+ " 1 - user not recognized as nickname's owner\n"
+ " 2 - user recognized as owner via access list only\n"
+ " 3 - user recognized as owner via password identification\n"
+ " \n"
+ "Up to sixteen nicknames may be sent with each command; the\n"
+ "rest will be ignored. If no nickname is given, your status\n"
+ "will be returned."));
return true;
}
void OnServHelp(CommandSource &source)
{
- source.Reply(NICK_HELP_CMD_STATUS);
+ source.Reply(_(" STATUS Returns the owner status of the given nickname"));
}
};
diff --git a/modules/core/ns_suspend.cpp b/modules/core/ns_suspend.cpp
index c07999762..70a8ea122 100644
--- a/modules/core/ns_suspend.cpp
+++ b/modules/core/ns_suspend.cpp
@@ -29,26 +29,26 @@ class CommandNSSuspend : public Command
if (readonly)
{
- source.Reply(READ_ONLY_MODE);
+ source.Reply(LanguageString::READ_ONLY_MODE);
return MOD_CONT;
}
NickAlias *na = findnick(nick);
if (!na)
{
- source.Reply(NICK_X_NOT_REGISTERED, nick.c_str());
+ source.Reply(LanguageString::NICK_X_NOT_REGISTERED, nick.c_str());
return MOD_CONT;
}
if (na->HasFlag(NS_FORBIDDEN))
{
- source.Reply(NICK_X_FORBIDDEN, na->nick.c_str());
+ source.Reply(LanguageString::NICK_X_FORBIDDEN, na->nick.c_str());
return MOD_CONT;
}
if (Config->NSSecureAdmins && na->nc->IsServicesOper())
{
- source.Reply(ACCESS_DENIED);
+ source.Reply(LanguageString::ACCESS_DENIED);
return MOD_CONT;
}
@@ -79,7 +79,7 @@ class CommandNSSuspend : public Command
ircdproto->SendGlobops(NickServ, "\2%s\2 used SUSPEND on \2%s\2", u->nick.c_str(), nick.c_str());
Log(LOG_ADMIN, u, this) << "for " << nick << " (" << (!reason.empty() ? reason : "No reason") << ")";
- source.Reply(NICK_SUSPEND_SUCCEEDED, nick.c_str());
+ source.Reply(_("Nick %s is now suspended."), nick.c_str());
FOREACH_MOD(I_OnNickSuspended, OnNickSuspend(na));
@@ -88,18 +88,19 @@ class CommandNSSuspend : public Command
bool OnHelp(CommandSource &source, const Anope::string &subcommand)
{
- source.Reply(NICK_SERVADMIN_HELP_SUSPEND);
+ source.Reply(_("Syntax: SUSPEND nickname reason\n"
+ "SUSPENDs a nickname from being used."));
return true;
}
void OnSyntaxError(CommandSource &source, const Anope::string &subcommand)
{
- SyntaxError(source, "SUSPEND", NICK_SUSPEND_SYNTAX);
+ SyntaxError(source, "SUSPEND", _("SUSPEND nickname reason"));
}
void OnServHelp(CommandSource &source)
{
- source.Reply(NICK_HELP_CMD_SUSPEND);
+ source.Reply(_(" SUSPEND Suspend a given nick"));
}
};
@@ -117,26 +118,26 @@ class CommandNSUnSuspend : public Command
if (readonly)
{
- source.Reply(READ_ONLY_MODE);
+ source.Reply(LanguageString::READ_ONLY_MODE);
return MOD_CONT;
}
NickAlias *na = findnick(nick);
if (!na)
{
- source.Reply(NICK_X_NOT_REGISTERED, nick.c_str());
+ source.Reply(LanguageString::NICK_X_NOT_REGISTERED, nick.c_str());
return MOD_CONT;
}
if (na->HasFlag(NS_FORBIDDEN))
{
- source.Reply(NICK_X_FORBIDDEN, na->nick.c_str());
+ source.Reply(LanguageString::NICK_X_FORBIDDEN, na->nick.c_str());
return MOD_CONT;
}
if (Config->NSSecureAdmins && na->nc->IsServicesOper())
{
- source.Reply(ACCESS_DENIED);
+ source.Reply(LanguageString::ACCESS_DENIED);
return MOD_CONT;
}
@@ -146,7 +147,7 @@ class CommandNSUnSuspend : public Command
ircdproto->SendGlobops(NickServ, "\2%s\2 used UNSUSPEND on \2%s\2", u->nick.c_str(), nick.c_str());
Log(LOG_ADMIN, u, this) << "for " << na->nick;
- source.Reply(NICK_UNSUSPEND_SUCCEEDED, nick.c_str());
+ source.Reply(_("Nick %s is now released."), nick.c_str());
FOREACH_MOD(I_OnNickUnsuspended, OnNickUnsuspended(na));
@@ -155,18 +156,19 @@ class CommandNSUnSuspend : public Command
bool OnHelp(CommandSource &source, const Anope::string &subcommand)
{
- source.Reply(NICK_SERVADMIN_HELP_UNSUSPEND);
+ source.Reply(_("Syntax: UNSUSPEND nickname\n"
+ "UNSUSPENDS a nickname from being used."));
return true;
}
void OnSyntaxError(CommandSource &source, const Anope::string &subcommand)
{
- SyntaxError(source, "UNSUSPEND", NICK_UNSUSPEND_SYNTAX);
+ SyntaxError(source, "UNSUSPEND", _("UNSUSPEND nickname"));
}
void OnServHelp(CommandSource &source)
{
- source.Reply(NICK_HELP_CMD_UNSUSPEND);
+ source.Reply(_(" UNSUSPEND Unsuspend a given nick"));
}
};
diff --git a/modules/core/ns_update.cpp b/modules/core/ns_update.cpp
index 2d5bd6391..6ddf7cdb5 100644
--- a/modules/core/ns_update.cpp
+++ b/modules/core/ns_update.cpp
@@ -35,19 +35,22 @@ class CommandNSUpdate : public Command
na->last_seen = Anope::CurTime;
if (ircd->vhost)
do_on_id(u);
- source.Reply(NICK_UPDATE_SUCCESS, Config->s_NickServ.c_str());
+ source.Reply(_("Status updated (memos, vhost, chmodes, flags)."), Config->s_NickServ.c_str());
return MOD_CONT;
}
bool OnHelp(CommandSource &source, const Anope::string &)
{
- source.Reply(NICK_HELP_UPDATE);
+ source.Reply(_("Syntax: UPDATE\n"
+ "Updates your current status, i.e. it checks for new memos,\n"
+ "sets needed chanmodes (ModeonID) and updates your vhost and\n"
+ "your userflags (lastseentime, etc)."));
return true;
}
void OnServHelp(CommandSource &source)
{
- source.Reply(NICK_HELP_CMD_UPDATE);
+ source.Reply(_(" UPDATE Updates your current status, i.e. it checks for new memos"));
}
};
diff --git a/modules/core/os_akill.cpp b/modules/core/os_akill.cpp
index f5212cb2b..499fd380d 100644
--- a/modules/core/os_akill.cpp
+++ b/modules/core/os_akill.cpp
@@ -25,11 +25,11 @@ class AkillDelCallback : public NumberList
~AkillDelCallback()
{
if (!Deleted)
- source.Reply(OPER_AKILL_NO_MATCH);
+ source.Reply(_("No matching entries on the AKILL list."));
else if (Deleted == 1)
- source.Reply(OPER_AKILL_DELETED_ONE);
+ source.Reply(_("Deleted 1 entry from the AKILL list."));
else
- source.Reply(OPER_AKILL_DELETED_SEVERAL, Deleted);
+ source.Reply(_("Deleted %d entries from the AKILL list."), Deleted);
}
void HandleNumber(unsigned Number)
@@ -65,9 +65,9 @@ class AkillListCallback : public NumberList
~AkillListCallback()
{
if (!SentHeader)
- source.Reply(OPER_AKILL_NO_MATCH);
+ source.Reply(_("No matching entries on the AKILL list."));
else
- source.Reply(END_OF_ANY_LIST, "Akill");
+ source.Reply(LanguageString::END_OF_ANY_LIST, "Akill");
}
void HandleNumber(unsigned Number)
@@ -83,7 +83,8 @@ class AkillListCallback : public NumberList
if (!SentHeader)
{
SentHeader = true;
- source.Reply(OPER_AKILL_LIST_HEADER);
+ source.Reply(_("Current AKILL list:\n"
+ " Num Mask Reason"));
}
DoList(source, x, Number);
@@ -91,7 +92,7 @@ class AkillListCallback : public NumberList
static void DoList(CommandSource &source, XLine *x, unsigned Number)
{
- source.Reply(OPER_LIST_FORMAT, Number + 1, x->Mask.c_str(), x->Reason.c_str());
+ source.Reply(LanguageString::OPER_LIST_FORMAT, Number + 1, x->Mask.c_str(), x->Reason.c_str());
}
};
@@ -115,7 +116,7 @@ class AkillViewCallback : public AkillListCallback
if (!SentHeader)
{
SentHeader = true;
- source.Reply(OPER_AKILL_VIEW_HEADER);
+ source.Reply(_("Current AKILL list:"));
}
DoList(source, x, Number);
@@ -123,7 +124,7 @@ class AkillViewCallback : public AkillListCallback
static void DoList(CommandSource &source, XLine *x, unsigned Number)
{
- source.Reply(OPER_VIEW_FORMAT, Number + 1, x->Mask.c_str(), x->By.c_str(), do_strftime(x->Created).c_str(), expire_left(source.u->Account(), x->Expires).c_str(), x->Reason.c_str());
+ source.Reply(LanguageString::OPER_VIEW_FORMAT, Number + 1, x->Mask.c_str(), x->By.c_str(), do_strftime(x->Created).c_str(), expire_left(source.u->Account(), x->Expires).c_str(), x->Reason.c_str());
}
};
@@ -154,7 +155,7 @@ class CommandOSAKill : public Command
/* Do not allow less than a minute expiry time */
if (expires && expires < 60)
{
- source.Reply(BAD_EXPIRY_TIME);
+ source.Reply(LanguageString::BAD_EXPIRY_TIME);
return MOD_CONT;
}
else if (expires > 0)
@@ -182,7 +183,7 @@ class CommandOSAKill : public Command
if (percent > 95)
{
- source.Reply(USERHOST_MASK_TOO_WIDE, mask.c_str());
+ source.Reply(LanguageString::USERHOST_MASK_TOO_WIDE, mask.c_str());
Log(LOG_ADMIN, u, this) << "tried to akill " << percent << "% of the network (" << affected << " users)";
return MOD_CONT;
}
@@ -192,7 +193,7 @@ class CommandOSAKill : public Command
if (!x)
return MOD_CONT;
- source.Reply(OPER_AKILL_ADDED, mask.c_str());
+ source.Reply(_("\002%s\002 added to the AKILL list."), mask.c_str());
if (Config->WallOSAkill)
{
@@ -228,7 +229,7 @@ class CommandOSAKill : public Command
}
if (readonly)
- source.Reply(READ_ONLY_MODE);
+ source.Reply(LanguageString::READ_ONLY_MODE);
}
else
this->OnSyntaxError(source, "ADD");
@@ -249,7 +250,7 @@ class CommandOSAKill : public Command
if (SGLine->GetList().empty())
{
- source.Reply(OPER_LIST_EMPTY);
+ source.Reply(_("AKILL list is empty."));
return MOD_CONT;
}
@@ -264,18 +265,18 @@ class CommandOSAKill : public Command
if (!x)
{
- source.Reply(OPER_AKILL_NOT_FOUND, mask.c_str());
+ source.Reply(_("\002%s\002 not found on the AKILL list."), mask.c_str());
return MOD_CONT;
}
FOREACH_MOD(I_OnDelAkill, OnDelAkill(u, x));
AkillDelCallback::DoDel(source, x);
- source.Reply(OPER_AKILL_DELETED, mask.c_str());
+ source.Reply(_("\002%s\002 deleted from the AKILL list."), mask.c_str());
}
if (readonly)
- source.Reply(READ_ONLY_MODE);
+ source.Reply(LanguageString::READ_ONLY_MODE);
return MOD_CONT;
}
@@ -284,7 +285,7 @@ class CommandOSAKill : public Command
{
if (SGLine->GetList().empty())
{
- source.Reply(OPER_LIST_EMPTY);
+ source.Reply(_("AKILL list is empty."));
return MOD_CONT;
}
@@ -308,7 +309,8 @@ class CommandOSAKill : public Command
if (!SentHeader)
{
SentHeader = true;
- source.Reply(OPER_AKILL_LIST_HEADER);
+ source.Reply(_("Current AKILL list:\n"
+ " Num Mask Reason"));
}
AkillListCallback::DoList(source, x, i);
@@ -316,9 +318,9 @@ class CommandOSAKill : public Command
}
if (!SentHeader)
- source.Reply(OPER_AKILL_NO_MATCH);
+ source.Reply(_("No matching entries on the AKILL list."));
else
- source.Reply(END_OF_ANY_LIST, "Akill");
+ source.Reply(LanguageString::END_OF_ANY_LIST, "Akill");
}
return MOD_CONT;
@@ -328,7 +330,7 @@ class CommandOSAKill : public Command
{
if (SGLine->GetList().empty())
{
- source.Reply(OPER_LIST_EMPTY);
+ source.Reply(_("AKILL list is empty."));
return MOD_CONT;
}
@@ -352,7 +354,7 @@ class CommandOSAKill : public Command
if (!SentHeader)
{
SentHeader = true;
- source.Reply(OPER_AKILL_VIEW_HEADER);
+ source.Reply(_("Current AKILL list:"));
}
AkillViewCallback::DoList(source, x, i);
@@ -360,7 +362,7 @@ class CommandOSAKill : public Command
}
if (!SentHeader)
- source.Reply(OPER_AKILL_NO_MATCH);
+ source.Reply(_("No matching entries on the AKILL list."));
}
return MOD_CONT;
@@ -371,7 +373,7 @@ class CommandOSAKill : public Command
User *u = source.u;
FOREACH_MOD(I_OnDelAkill, OnDelAkill(u, NULL));
SGLine->Clear();
- source.Reply(OPER_AKILL_CLEAR);
+ source.Reply(_("The AKILL list has been cleared."));
return MOD_CONT;
}
@@ -402,18 +404,59 @@ class CommandOSAKill : public Command
bool OnHelp(CommandSource &source, const Anope::string &subcommand)
{
- source.Reply(OPER_HELP_AKILL);
+ source.Reply(_("Syntax: \002AKILL ADD [+\037expiry\037] \037mask\037 \037reason\037\002\n"
+ " \002AKILL DEL {\037mask\037 | \037entry-num\037 | \037list\037}\002\n"
+ " \002AKILL LIST [\037mask\037 | \037list\037]\002\n"
+ " \002AKILL VIEW [\037mask\037 | \037list\037]\002\n"
+ " \002AKILL CLEAR\002\n"
+ " \n"
+ "Allows Services operators to manipulate the AKILL list. If\n"
+ "a user matching an AKILL mask attempts to connect, Services\n"
+ "will issue a KILL for that user and, on supported server\n"
+ "types, will instruct all servers to add a ban (K-line) for\n"
+ "the mask which the user matched.\n"
+ " \n"
+ "\002AKILL ADD\002 adds the given nick or user@host/ip mask to the AKILL\n"
+ "list for the given reason (which \002must\002 be given).\n"
+ "\037expiry\037 is specified as an integer followed by one of \037d\037 \n"
+ "(days), \037h\037 (hours), or \037m\037 (minutes). Combinations (such as \n"
+ "\0371h30m\037) are not permitted. If a unit specifier is not \n"
+ "included, the default is days (so \037+30\037 by itself means 30 \n"
+ "days). To add an AKILL which does not expire, use \037+0\037. If the\n"
+ "usermask to be added starts with a \037+\037, an expiry time must\n"
+ "be given, even if it is the same as the default. The\n"
+ "current AKILL default expiry time can be found with the\n"
+ "\002STATS AKILL\002 command.\n"
+ " \n"
+ "The \002AKILL DEL\002 command removes the given mask from the\n"
+ "AKILL list if it is present. If a list of entry numbers is \n"
+ "given, those entries are deleted. (See the example for LIST \n"
+ "below.)\n"
+ " \n"
+ "The \002AKILL LIST\002 command displays the AKILL list. \n"
+ "If a wildcard mask is given, only those entries matching the\n"
+ "mask are displayed. If a list of entry numbers is given,\n"
+ "only those entries are shown; for example:\n"
+ " \002AKILL LIST 2-5,7-9\002\n"
+ " Lists AKILL entries numbered 2 through 5 and 7 \n"
+ " through 9.\n"
+ " \n"
+ "\002AKILL VIEW\002 is a more verbose version of \002AKILL LIST\002, and \n"
+ "will show who added an AKILL, the date it was added, and when \n"
+ "it expires, as well as the user@host/ip mask and reason.\n"
+ " \n"
+ "\002AKILL CLEAR\002 clears all entries of the AKILL list."));
return true;
}
void OnSyntaxError(CommandSource &source, const Anope::string &subcommand)
{
- SyntaxError(source, "AKILL", OPER_AKILL_SYNTAX);
+ SyntaxError(source, "AKILL", _("AKILL {ADD | DEL | LIST | VIEW | CLEAR} [[+\037expiry\037] {\037nick\037 | \037mask\037 | \037entry-list\037} [\037reason\037]]"));
}
void OnServHelp(CommandSource &source)
{
- source.Reply(OPER_HELP_CMD_AKILL);
+ source.Reply(_(" AKILL Manipulate the AKILL list"));
}
};
diff --git a/modules/core/os_chankill.cpp b/modules/core/os_chankill.cpp
index a61c799fe..6fffd8827 100644
--- a/modules/core/os_chankill.cpp
+++ b/modules/core/os_chankill.cpp
@@ -41,7 +41,7 @@ class CommandOSChanKill : public Command
expires *= 86400;
if (expires && expires < 60)
{
- source.Reply(BAD_EXPIRY_TIME);
+ source.Reply(LanguageString::BAD_EXPIRY_TIME);
return MOD_CONT;
}
else if (expires > 0)
@@ -80,25 +80,28 @@ class CommandOSChanKill : public Command
ircdproto->SendGlobops(OperServ, "%s used CHANKILL on %s (%s)", u->nick.c_str(), channel.c_str(), realreason.c_str());
}
else
- source.Reply(CHAN_X_NOT_IN_USE, channel.c_str());
+ source.Reply(LanguageString::CHAN_X_NOT_IN_USE, channel.c_str());
}
return MOD_CONT;
}
bool OnHelp(CommandSource &source, const Anope::string &subcommand)
{
- source.Reply(OPER_HELP_CHANKILL);
+ source.Reply(_("Syntax: \002CHANKILL [+\037expiry\037] \037channel\037 \037reason\037\002\n"
+ "Puts an AKILL for every nick on the specified channel. It\n"
+ "uses the entire and complete real ident@host for every nick,\n"
+ "then enforces the AKILL."));
return true;
}
void OnSyntaxError(CommandSource &source, const Anope::string &subcommand)
{
- SyntaxError(source, "CHANKILL", OPER_CHANKILL_SYNTAX);
+ SyntaxError(source, "CHANKILL", _("CHANKILL [+\037expiry\037] {\037#channel\037} [\037reason\037]"));
}
void OnServHelp(CommandSource &source)
{
- source.Reply(OPER_HELP_CMD_CHANKILL);
+ source.Reply(_(" CHANKILL AKILL all users on a specific channel"));
}
};
diff --git a/modules/core/os_chanlist.cpp b/modules/core/os_chanlist.cpp
index 4c2ade3f1..dbf36e44c 100644
--- a/modules/core/os_chanlist.cpp
+++ b/modules/core/os_chanlist.cpp
@@ -35,7 +35,8 @@ class CommandOSChanList : public Command
if (!pattern.empty() && (u2 = finduser(pattern)))
{
- source.Reply(OPER_CHANLIST_HEADER_USER, u2->nick.c_str());
+ source.Reply(_("\002%s\002 channel list:\n"
+ "Name Users Modes Topic"), u2->nick.c_str());
for (UChannelList::iterator uit = u2->chans.begin(), uit_end = u2->chans.end(); uit != uit_end; ++uit)
{
@@ -46,12 +47,13 @@ class CommandOSChanList : public Command
if (!cc->chan->HasMode(*it))
continue;
- source.Reply(OPER_CHANLIST_RECORD, cc->chan->name.c_str(), cc->chan->users.size(), cc->chan->GetModes(true, true).c_str(), !cc->chan->topic.empty() ? cc->chan->topic.c_str() : "");
+ source.Reply(_("%-20s %4d +%-6s %s"), cc->chan->name.c_str(), cc->chan->users.size(), cc->chan->GetModes(true, true).c_str(), !cc->chan->topic.empty() ? cc->chan->topic.c_str() : "");
}
}
else
{
- source.Reply(OPER_CHANLIST_HEADER);
+ source.Reply(_("Channel list:\n"
+ "Name Users Modes Topic"));
for (channel_map::const_iterator cit = ChannelList.begin(), cit_end = ChannelList.end(); cit != cit_end; ++cit)
{
@@ -64,23 +66,30 @@ class CommandOSChanList : public Command
if (!c->HasMode(*it))
continue;
- source.Reply(OPER_CHANLIST_RECORD, c->name.c_str(), c->users.size(), c->GetModes(true, true).c_str(), !c->topic.empty() ? c->topic.c_str() : "");
+ source.Reply(_("%-20s %4d +%-6s %s"), c->name.c_str(), c->users.size(), c->GetModes(true, true).c_str(), !c->topic.empty() ? c->topic.c_str() : "");
}
}
- source.Reply(OPER_CHANLIST_END);
+ source.Reply(_("End of channel list."));
return MOD_CONT;
}
bool OnHelp(CommandSource &source, const Anope::string &subcommand)
{
- source.Reply(OPER_HELP_CHANLIST);
+ source.Reply(_("Syntax: \002CHANLIST [{\037pattern\037 | \037nick\037} [\037SECRET\037]]\002\n"
+ " \n"
+ "Lists all channels currently in use on the IRC network, whether they\n"
+ "are registered or not.\n"
+ "If \002pattern\002 is given, lists only channels that match it. If a nickname\n"
+ "is given, lists only the channels the user using it is on. If SECRET is\n"
+ "specified, lists only channels matching \002pattern\002 that have the +s or\n"
+ "+p mode."));
return true;
}
void OnServHelp(CommandSource &source)
{
- source.Reply(OPER_HELP_CMD_CHANLIST);
+ source.Reply(_(" CHANLIST Lists all channel records"));
}
};
diff --git a/modules/core/os_defcon.cpp b/modules/core/os_defcon.cpp
index 69eeabe51..209fa4231 100644
--- a/modules/core/os_defcon.cpp
+++ b/modules/core/os_defcon.cpp
@@ -33,14 +33,14 @@ class DefConTimeout : public Timer
Config->DefConLevel = level;
FOREACH_MOD(I_OnDefconLevel, OnDefconLevel(level));
Log(OperServ, "operserv/defcon") << "Defcon level timeout, returning to level " << level;
- ircdproto->SendGlobops(OperServ, GetString(OPER_DEFCON_WALL).c_str(), Config->s_OperServ.c_str(), level);
+ ircdproto->SendGlobops(OperServ, GetString(NULL, _("\002%s\002 Changed the DEFCON level to \002%d\002")).c_str(), Config->s_OperServ.c_str(), level);
if (Config->GlobalOnDefcon)
{
if (!Config->DefConOffMessage.empty())
oper_global("", "%s", Config->DefConOffMessage.c_str());
else
- oper_global("", GetString(DEFCON_GLOBAL).c_str(), Config->DefConLevel);
+ oper_global("", GetString(NULL, _("The Defcon Level is now at Level: \002%d\002")).c_str(), Config->DefConLevel);
if (Config->GlobalOnDefconMore && Config->DefConOffMessage.empty())
oper_global("", "%s", Config->DefconMessage.c_str());
@@ -67,7 +67,7 @@ class CommandOSDefcon : public Command
if (lvl.empty())
{
- source.Reply(OPER_DEFCON_CHANGED, Config->DefConLevel);
+ source.Reply(_("Services are now at DEFCON \002%d\002"), Config->DefConLevel);
defcon_sendlvls(source);
return MOD_CONT;
}
@@ -90,10 +90,10 @@ class CommandOSDefcon : public Command
if (Config->DefConTimeOut)
timeout = new DefConTimeout(5);
- source.Reply(OPER_DEFCON_CHANGED, Config->DefConLevel);
+ source.Reply(_("Services are now at DEFCON \002%d\002"), Config->DefConLevel);
defcon_sendlvls(source);
Log(LOG_ADMIN, u, this) << "to change defcon level to " << newLevel;
- ircdproto->SendGlobops(OperServ, GetString(OPER_DEFCON_WALL).c_str(), u->nick.c_str(), newLevel);
+ ircdproto->SendGlobops(OperServ, GetString(NULL, _("\002%s\002 Changed the DEFCON level to \002%d\002")).c_str(), u->nick.c_str(), newLevel);
/* Global notice the user what is happening. Also any Message that
the Admin would like to add. Set in config file. */
if (Config->GlobalOnDefcon)
@@ -101,7 +101,7 @@ class CommandOSDefcon : public Command
if (Config->DefConLevel == 5 && !Config->DefConOffMessage.empty())
oper_global("", "%s", Config->DefConOffMessage.c_str());
else
- oper_global("", GetString(DEFCON_GLOBAL).c_str(), Config->DefConLevel);
+ oper_global("", GetString(NULL, _("The Defcon Level is now at Level: \002%d\002")).c_str(), Config->DefConLevel);
}
if (Config->GlobalOnDefconMore)
{
@@ -115,18 +115,21 @@ class CommandOSDefcon : public Command
bool OnHelp(CommandSource &source, const Anope::string &subcommand)
{
- source.Reply(OPER_HELP_DEFCON);
+ source.Reply(_("Syntax: \002DEFCON\002 [\0021\002|\0022\002|\0023\002|\0024\002|\0025\002]\n"
+ "The defcon system can be used to implement a pre-defined\n"
+ "set of restrictions to services useful during an attempted\n"
+ "attack on the network."));
return true;
}
void OnSyntaxError(CommandSource &source, const Anope::string &subcommand)
{
- SyntaxError(source, "DEFCON", OPER_DEFCON_SYNTAX);
+ SyntaxError(source, "DEFCON", _("DEFCON [\0021\002|\0022\002|\0023\002|\0024\002|\0025\002]"));
}
void OnServHelp(CommandSource &source)
{
- source.Reply(OPER_HELP_CMD_DEFCON);
+ source.Reply(_(" DEFCON Manipulate the DefCon system"));
}
};
@@ -211,7 +214,7 @@ class OSDefcon : public Module
if (!u->HasMode(UMODE_OPER) && (CheckDefCon(DEFCON_OPER_ONLY) || CheckDefCon(DEFCON_SILENT_OPER_ONLY)))
{
if (!CheckDefCon(DEFCON_SILENT_OPER_ONLY))
- u->SendMessage(bi, OPER_DEFCON_DENIED);
+ u->SendMessage(bi, _("Services are in Defcon mode, Please try again later."));
return EVENT_STOP;
}
@@ -228,7 +231,7 @@ class OSDefcon : public Module
{
if (CheckDefCon(DEFCON_NO_NEW_NICKS))
{
- source.Reply(OPER_DEFCON_DENIED);
+ source.Reply(_("Services are in Defcon mode, Please try again later."));
return EVENT_STOP;
}
}
@@ -239,7 +242,7 @@ class OSDefcon : public Module
{
if (!params.empty() && params[0].equals_ci("MLOCK") && CheckDefCon(DEFCON_NO_MLOCK_CHANGE))
{
- source.Reply(OPER_DEFCON_DENIED);
+ source.Reply(_("Services are in Defcon mode, Please try again later."));
return EVENT_STOP;
}
}
@@ -247,7 +250,7 @@ class OSDefcon : public Module
{
if (CheckDefCon(DEFCON_NO_NEW_CHANNELS))
{
- source.Reply(OPER_DEFCON_DENIED);
+ source.Reply(_("Services are in Defcon mode, Please try again later."));
return EVENT_STOP;
}
}
@@ -258,7 +261,7 @@ class OSDefcon : public Module
{
if (CheckDefCon(DEFCON_NO_NEW_MEMOS))
{
- source.Reply(OPER_DEFCON_DENIED);
+ source.Reply(_("Services are in Defcon mode, Please try again later."));
return EVENT_STOP;
}
}
@@ -319,25 +322,25 @@ class OSDefcon : public Module
void defcon_sendlvls(CommandSource &source)
{
if (CheckDefCon(DEFCON_NO_NEW_CHANNELS))
- source.Reply(OPER_HELP_DEFCON_NO_NEW_CHANNELS);
+ source.Reply(_("* No new channel registrations"));
if (CheckDefCon(DEFCON_NO_NEW_NICKS))
- source.Reply(OPER_HELP_DEFCON_NO_NEW_NICKS);
+ source.Reply(_("* No new nick registrations"));
if (CheckDefCon(DEFCON_NO_MLOCK_CHANGE))
- source.Reply(OPER_HELP_DEFCON_NO_MLOCK_CHANGE);
+ source.Reply(_("* No MLOCK changes"));
if (CheckDefCon(DEFCON_FORCE_CHAN_MODES) && !Config->DefConChanModes.empty())
- source.Reply(OPER_HELP_DEFCON_FORCE_CHAN_MODES, Config->DefConChanModes.c_str());
+ source.Reply(_("* Force Chan Modes (%s) to be set on all channels"), Config->DefConChanModes.c_str());
if (CheckDefCon(DEFCON_REDUCE_SESSION))
- source.Reply(OPER_HELP_DEFCON_REDUCE_SESSION, Config->DefConSessionLimit);
+ source.Reply(_("* Use the reduced session limit of %d"), Config->DefConSessionLimit);
if (CheckDefCon(DEFCON_NO_NEW_CLIENTS))
- source.Reply(OPER_HELP_DEFCON_NO_NEW_CLIENTS);
+ source.Reply(_("* Kill any NEW clients connecting"));
if (CheckDefCon(DEFCON_OPER_ONLY))
- source.Reply(OPER_HELP_DEFCON_OPER_ONLY);
+ source.Reply(_("* Ignore any non-opers with message"));
if (CheckDefCon(DEFCON_SILENT_OPER_ONLY))
- source.Reply(OPER_HELP_DEFCON_SILENT_OPER_ONLY);
+ source.Reply(_("* Silently ignore non-opers"));
if (CheckDefCon(DEFCON_AKILL_NEW_CLIENTS))
- source.Reply(OPER_HELP_DEFCON_AKILL_NEW_CLIENTS);
+ source.Reply(_("* AKILL any new clients connecting"));
if (CheckDefCon(DEFCON_NO_NEW_MEMOS))
- source.Reply(OPER_HELP_DEFCON_NO_NEW_MEMOS);
+ source.Reply(_("* No new memos sent"));
}
void runDefCon()
diff --git a/modules/core/os_global.cpp b/modules/core/os_global.cpp
index 838446bd0..5d8bb39e4 100644
--- a/modules/core/os_global.cpp
+++ b/modules/core/os_global.cpp
@@ -33,18 +33,21 @@ class CommandOSGlobal : public Command
bool OnHelp(CommandSource &source, const Anope::string &subcommand)
{
- source.Reply(OPER_HELP_GLOBAL, Config->s_GlobalNoticer.c_str());
+ source.Reply(_("Syntax: \002GLOBAL \037message\037\002\n"
+ " \n"
+ "Allows Administrators to send messages to all users on the \n"
+ "network. The message will be sent from the nick \002%s\002."), Config->s_GlobalNoticer.c_str());
return true;
}
void OnSyntaxError(CommandSource &source, const Anope::string &subcommand)
{
- SyntaxError(source, "GLOBAL", OPER_GLOBAL_SYNTAX);
+ SyntaxError(source, "GLOBAL", _("GLOBAL \037message\037"));
}
void OnServHelp(CommandSource &source)
{
- source.Reply(OPER_HELP_CMD_GLOBAL);
+ source.Reply(_(" GLOBAL Send a message to all users"));
}
};
diff --git a/modules/core/os_help.cpp b/modules/core/os_help.cpp
index 9f0141940..31b62b349 100644
--- a/modules/core/os_help.cpp
+++ b/modules/core/os_help.cpp
@@ -29,11 +29,11 @@ class CommandOSHelp : public Command
void OnSyntaxError(CommandSource &source, const Anope::string &subcommand)
{
User *u = source.u;
- source.Reply(OPER_HELP);
+ source.Reply(_("%S commands:"));
for (CommandMap::const_iterator it = OperServ->Commands.begin(), it_end = OperServ->Commands.end(); it != it_end; ++it)
if (!Config->HidePrivilegedCommands || it->second->permission.empty() || (u->Account() && u->Account()->HasCommand(it->second->permission)))
it->second->OnServHelp(source);
- source.Reply(OPER_HELP_LOGGED);
+ source.Reply(_("\002Notice:\002 All commands sent to %S are logged!"));
}
};
diff --git a/modules/core/os_ignore.cpp b/modules/core/os_ignore.cpp
index 332b42f9c..bf5538dd9 100644
--- a/modules/core/os_ignore.cpp
+++ b/modules/core/os_ignore.cpp
@@ -165,15 +165,15 @@ class CommandOSIgnore : public Command
if (t <= -1)
{
- source.Reply(OPER_IGNORE_VALID_TIME);
+ source.Reply(_("You have to enter a valid number as time."));
return MOD_CONT;
}
ignore_service->AddIgnore(nick, source.u->nick, reason, t);
if (!t)
- source.Reply(OPER_IGNORE_PERM_DONE, nick.c_str());
+ source.Reply(_("\002%s\002 will now permanently be ignored."), nick.c_str());
else
- source.Reply(OPER_IGNORE_TIME_DONE, nick.c_str(), time.c_str());
+ source.Reply(_("\002%s\002 will now be ignored for \002%s\002."), nick.c_str(), time.c_str());
}
return MOD_CONT;
@@ -187,10 +187,11 @@ class CommandOSIgnore : public Command
const std::list<IgnoreData> &ignores = ignore_service->GetIgnores();
if (ignores.empty())
- source.Reply(OPER_IGNORE_LIST_EMPTY);
+ source.Reply(_("Ignore list is empty."));
else
{
- source.Reply(OPER_IGNORE_LIST);
+ source.Reply(_("Services ignore list:\n"
+ " Mask Creator Reason Expires"));
for (std::list<IgnoreData>::const_iterator ign = ignores.begin(), ign_end = ignores.end(); ign != ign_end; ++ign)
{
const IgnoreData &ignore = *ign;
@@ -212,9 +213,9 @@ class CommandOSIgnore : public Command
if (nick.empty())
this->OnSyntaxError(source, "DEL");
else if (ignore_service->DelIgnore(nick))
- source.Reply(OPER_IGNORE_DEL_DONE, nick.c_str());
+ source.Reply(_("\002%s\002 will no longer be ignored."), nick.c_str());
else
- source.Reply(OPER_IGNORE_LIST_NOMATCH, nick.c_str());
+ source.Reply(_("Nick \002%s\002 not found on ignore list."), nick.c_str());
return MOD_CONT;
}
@@ -226,7 +227,7 @@ class CommandOSIgnore : public Command
return MOD_CONT;
ignore_service->ClearIgnores();
- source.Reply(OPER_IGNORE_LIST_CLEARED);
+ source.Reply(_("Ignore list has been cleared."));
return MOD_CONT;
}
@@ -256,18 +257,31 @@ class CommandOSIgnore : public Command
bool OnHelp(CommandSource &source, const Anope::string &subcommand)
{
- source.Reply(OPER_HELP_IGNORE);
+ source.Reply(_("Syntax: \002IGNORE {ADD|DEL|LIST|CLEAR} [\037time\037] [\037nick\037] [\037reason\037]\002\n"
+ " \n"
+ "Allows Services Operators to make Services ignore a nick or mask\n"
+ "for a certain time or until the next restart. The default\n"
+ "time format is seconds. You can specify it by using units.\n"
+ "Valid units are: \037s\037 for seconds, \037m\037 for minutes, \n"
+ "\037h\037 for hours and \037d\037 for days. \n"
+ "Combinations of these units are not permitted.\n"
+ "To make Services permanently ignore the user, type 0 as time.\n"
+ "When adding a \037mask\037, it should be in the format user@host\n"
+ "or nick!user@host, everything else will be considered a nick.\n"
+ "Wildcards are permitted.\n"
+ " \n"
+ "Ignores will not be enforced on IRC Operators."));
return true;
}
void OnSyntaxError(CommandSource &source, const Anope::string &subcommand)
{
- SyntaxError(source, "IGNORE", OPER_IGNORE_SYNTAX);
+ SyntaxError(source, "IGNORE", _("IGNORE {ADD|DEL|LIST|CLEAR} [\037time\037] [\037nick\037] [\037reason\037]\002"));
}
void OnServHelp(CommandSource &source)
{
- source.Reply(OPER_HELP_CMD_IGNORE);
+ source.Reply(_(" IGNORE Modify the Services ignore list"));
}
};
diff --git a/modules/core/os_jupe.cpp b/modules/core/os_jupe.cpp
index 81a1c4c94..5220bd04c 100644
--- a/modules/core/os_jupe.cpp
+++ b/modules/core/os_jupe.cpp
@@ -28,9 +28,9 @@ class CommandOSJupe : public Command
Server *server = Server::Find(jserver);
if (!isValidHost(jserver, 3))
- source.Reply(OPER_JUPE_HOST_ERROR);
+ source.Reply(_("Please use a valid server name when juping"));
else if (server && (server == Me || server == Me->GetLinks().front()))
- source.Reply(OPER_JUPE_INVALID_SERVER);
+ source.Reply(_("You can not jupe your services server or your uplink server."));
else
{
Anope::string rbuf = "Juped by " + u->nick + (!reason.empty() ? ": " + reason : "");
@@ -47,18 +47,27 @@ class CommandOSJupe : public Command
bool OnHelp(CommandSource &source, const Anope::string &subcommand)
{
- source.Reply(OPER_HELP_JUPE);
+ source.Reply(_("Syntax: \002JUPE \037server\037 [\037reason\037]\002\n"
+ " \n"
+ "Tells Services to jupiter a server -- that is, to create\n"
+ "a fake \"server\" connected to Services which prevents\n"
+ "the real server of that name from connecting. The jupe\n"
+ "may be removed using a standard \002SQUIT\002. If a reason is\n"
+ "given, it is placed in the server information field;\n"
+ "otherwise, the server information field will contain the\n"
+ "text \"Juped by <nick>\", showing the nickname of the\n"
+ "person who jupitered the server."));
return true;
}
void OnSyntaxError(CommandSource &source, const Anope::string &subcommand)
{
- SyntaxError(source, "JUPE", OPER_JUPE_SYNTAX);
+ SyntaxError(source, "JUPE", _("JUPE \037servername\037 [\037reason\037]"));
}
void OnServHelp(CommandSource &source)
{
- source.Reply(OPER_HELP_CMD_JUPE);
+ source.Reply(_(" JUPE \"Jupiter\" a server"));
}
};
diff --git a/modules/core/os_kick.cpp b/modules/core/os_kick.cpp
index c68ac9fbb..5cdca38ce 100644
--- a/modules/core/os_kick.cpp
+++ b/modules/core/os_kick.cpp
@@ -31,17 +31,17 @@ class CommandOSKick : public Command
if (!(c = findchan(chan)))
{
- source.Reply(CHAN_X_NOT_IN_USE, chan.c_str());
+ source.Reply(LanguageString::CHAN_X_NOT_IN_USE, chan.c_str());
return MOD_CONT;
}
else if (c->bouncy_modes)
{
- source.Reply(OPER_BOUNCY_MODES_U_LINE);
+ source.Reply(_("Services is unable to change modes. Are your servers' U:lines configured correctly?"));
return MOD_CONT;
}
else if (!(u2 = finduser(nick)))
{
- source.Reply(NICK_X_NOT_IN_USE, nick.c_str());
+ source.Reply(LanguageString::NICK_X_NOT_IN_USE, nick.c_str());
return MOD_CONT;
}
@@ -53,18 +53,25 @@ class CommandOSKick : public Command
bool OnHelp(CommandSource &source, const Anope::string &subcommand)
{
- source.Reply(OPER_HELP_KICK);
+ source.Reply(_("Syntax: \002KICK \037channel\037 \037user\037 \037reason\037\002\n"
+ " \n"
+ "Allows staff to kick a user from any channel.\n"
+ "Parameters are the same as for the standard /KICK\n"
+ "command. The kick message will have the nickname of the\n"
+ "IRCop sending the KICK command prepended; for example:\n"
+ " \n"
+ "*** SpamMan has been kicked off channel #my_channel by %S (Alcan (Flood))"));
return true;
}
void OnSyntaxError(CommandSource &source, const Anope::string &subcommand)
{
- SyntaxError(source, "KICK", OPER_KICK_SYNTAX);
+ SyntaxError(source, "KICK", _("KICK \037channel\037 \037user\037 \037reason\037"));
}
void OnServHelp(CommandSource &source)
{
- source.Reply(OPER_HELP_CMD_KICK);
+ source.Reply(_(" KICK Kick a user from a channel"));
}
};
diff --git a/modules/core/os_mode.cpp b/modules/core/os_mode.cpp
index 61a577ae3..ab2378052 100644
--- a/modules/core/os_mode.cpp
+++ b/modules/core/os_mode.cpp
@@ -28,9 +28,9 @@ class CommandOSMode : public Command
Channel *c;
if (!(c = findchan(chan)))
- source.Reply(CHAN_X_NOT_IN_USE, chan.c_str());
+ source.Reply(LanguageString::CHAN_X_NOT_IN_USE, chan.c_str());
else if (c->bouncy_modes)
- source.Reply(OPER_BOUNCY_MODES_U_LINE);
+ source.Reply(_("Services is unable to change modes. Are your servers' U:lines configured correctly?"));
else
{
c->SetModes(OperServ, false, modes.c_str());
@@ -43,18 +43,22 @@ class CommandOSMode : public Command
bool OnHelp(CommandSource &source, const Anope::string &subcommand)
{
- source.Reply(OPER_HELP_MODE);
+ source.Reply(_("Syntax: \002MODE \037channel\037 \037modes\037\002\n"
+ " \n"
+ "Allows Services operators to set channel modes for any\n"
+ "channel. Parameters are the same as for the standard /MODE\n"
+ "command."));
return true;
}
void OnSyntaxError(CommandSource &source, const Anope::string &subcommand)
{
- SyntaxError(source, "MODE", OPER_MODE_SYNTAX);
+ SyntaxError(source, "MODE", _("MODE \037channel\037 \037modes\037"));
}
void OnServHelp(CommandSource &source)
{
- source.Reply(OPER_HELP_CMD_MODE);
+ source.Reply(_(" MODE Change a channel's modes"));
}
};
diff --git a/modules/core/os_modinfo.cpp b/modules/core/os_modinfo.cpp
index 6cc3ebbeb..9ee5b65fd 100644
--- a/modules/core/os_modinfo.cpp
+++ b/modules/core/os_modinfo.cpp
@@ -29,7 +29,7 @@ class CommandOSModInfo : public Command
if (c->module && c->module->name.equals_ci(mod_name) && c->service)
{
- source.Reply(OPER_MODULE_CMD_LIST, c->service->nick.c_str(), c->name.c_str());
+ source.Reply(_("Providing command: %\002%s %s\002"), c->service->nick.c_str(), c->name.c_str());
++display;
}
}
@@ -49,7 +49,7 @@ class CommandOSModInfo : public Command
Module *m = FindModule(file);
if (m)
{
- source.Reply(OPER_MODULE_INFO_LIST, m->name.c_str(), !m->version.empty() ? m->version.c_str() : "?", !m->author.empty() ? m->author.c_str() : "?", do_strftime(m->created).c_str());
+ source.Reply(_("Module: \002%s\002 Version: \002%s\002 Author: \002%s\002 loaded: \002%s\002"), m->name.c_str(), !m->version.empty() ? m->version.c_str() : "?", !m->author.empty() ? m->author.c_str() : "?", do_strftime(m->created).c_str());
showModuleCmdLoaded(HostServ, m->name, source);
showModuleCmdLoaded(OperServ, m->name, source);
@@ -59,25 +59,27 @@ class CommandOSModInfo : public Command
showModuleCmdLoaded(MemoServ, m->name, source);
}
else
- source.Reply(OPER_MODULE_NO_INFO, file.c_str());
+ source.Reply(_("No information about module \002%s\002 is available"), file.c_str());
return MOD_CONT;
}
bool OnHelp(CommandSource &source, const Anope::string &subcommand)
{
- source.Reply(OPER_HELP_MODINFO);
+ source.Reply(_("Syntax: \002MODINFO\002 \002FileName\002\n"
+ " \n"
+ "This command lists information about the specified loaded module"));
return true;
}
void OnSyntaxError(CommandSource &source, const Anope::string &subcommand)
{
- SyntaxError(source, "MODINFO", OPER_MODULE_INFO_SYNTAX);
+ SyntaxError(source, "MODINFO", _("MODINFO \037FileName\037"));
}
void OnServHelp(CommandSource &source)
{
- source.Reply(OPER_HELP_CMD_MODINFO);
+ source.Reply(_(" MODINFO Info about a loaded module"));
}
};
diff --git a/modules/core/os_modlist.cpp b/modules/core/os_modlist.cpp
index fa6c5e9a9..3a70e631a 100644
--- a/modules/core/os_modlist.cpp
+++ b/modules/core/os_modlist.cpp
@@ -129,7 +129,7 @@ class CommandOSModList : public Command
}
}
- source.Reply(OPER_MODULE_LIST_HEADER);
+ source.Reply(_("Current Module list:"));
for (std::list<Module *>::iterator it = Modules.begin(), it_end = Modules.end(); it != it_end; ++it)
{
@@ -140,56 +140,56 @@ class CommandOSModList : public Command
case CORE:
if (showCore)
{
- source.Reply(OPER_MODULE_LIST, m->name.c_str(), m->version.c_str(), core);
+ source.Reply(_("Module: \002%s\002 [%s] [%s]"), m->name.c_str(), m->version.c_str(), core);
++count;
}
break;
case THIRD:
if (showThird)
{
- source.Reply(OPER_MODULE_LIST, m->name.c_str(), m->version.c_str(), third);
+ source.Reply(_("Module: \002%s\002 [%s] [%s]"), m->name.c_str(), m->version.c_str(), third);
++count;
}
break;
case PROTOCOL:
if (showProto)
{
- source.Reply(OPER_MODULE_LIST, m->name.c_str(), m->version.c_str(), proto);
+ source.Reply(_("Module: \002%s\002 [%s] [%s]"), m->name.c_str(), m->version.c_str(), proto);
++count;
}
break;
case SUPPORTED:
if (showSupported)
{
- source.Reply(OPER_MODULE_LIST, m->name.c_str(), m->version.c_str(), supported);
+ source.Reply(_("Module: \002%s\002 [%s] [%s]"), m->name.c_str(), m->version.c_str(), supported);
++count;
}
break;
case QATESTED:
if (showQA)
{
- source.Reply(OPER_MODULE_LIST, m->name.c_str(), m->version.c_str(), qa);
+ source.Reply(_("Module: \002%s\002 [%s] [%s]"), m->name.c_str(), m->version.c_str(), qa);
++count;
}
break;
case ENCRYPTION:
if (showEnc)
{
- source.Reply(OPER_MODULE_LIST, m->name.c_str(), m->version.c_str(), enc);
+ source.Reply(_("Module: \002%s\002 [%s] [%s]"), m->name.c_str(), m->version.c_str(), enc);
++count;
}
break;
case DATABASE:
if (showDB)
{
- source.Reply(OPER_MODULE_LIST, m->name.c_str(), m->version.c_str(), db);
+ source.Reply(_("Module: \002%s\002 [%s] [%s]"), m->name.c_str(), m->version.c_str(), db);
++count;
}
break;
case SOCKETENGINE:
if (showSocketEngine)
{
- source.Reply(OPER_MODULE_LIST, m->name.c_str(), m->version.c_str(), socketengine);
+ source.Reply(_("Module: \002%s\002 [%s] [%s]"), m->name.c_str(), m->version.c_str(), socketengine);
++count;
}
break;
@@ -198,22 +198,24 @@ class CommandOSModList : public Command
}
}
if (!count)
- source.Reply(OPER_MODULE_NO_LIST);
+ source.Reply(_("No modules currently loaded"));
else
- source.Reply(OPER_MODULE_LIST_FOOTER, count);
+ source.Reply(_("%d Modules loaded."), count);
return MOD_CONT;
}
bool OnHelp(CommandSource &source, const Anope::string &subcommand)
{
- source.Reply(OPER_HELP_MODLIST);
+ source.Reply(_("Syntax: \002MODLIST\002 [Core|3rd|protocol|encryption|supported|qatested]\n"
+ " \n"
+ "Lists all currently loaded modules."));
return true;
}
void OnServHelp(CommandSource &source)
{
- source.Reply(OPER_HELP_CMD_MODLIST);
+ source.Reply(_(" MODLIST List loaded modules"));
}
};
diff --git a/modules/core/os_modload.cpp b/modules/core/os_modload.cpp
index 5009535ea..c655df683 100644
--- a/modules/core/os_modload.cpp
+++ b/modules/core/os_modload.cpp
@@ -28,7 +28,7 @@ class CommandOSModLoad : public Command
Module *m = FindModule(mname);
if (m)
{
- source.Reply(OPER_MODULE_ALREADY_LOADED, mname.c_str());
+ source.Reply(_("Module \002%s\002 is already loaded."), mname.c_str());
return MOD_CONT;
}
@@ -36,7 +36,7 @@ class CommandOSModLoad : public Command
if (status == MOD_ERR_OK)
{
ircdproto->SendGlobops(OperServ, "%s loaded module %s", u->nick.c_str(), mname.c_str());
- source.Reply(OPER_MODULE_LOADED, mname.c_str());
+ source.Reply(_("Module \002%s\002 loaded"), mname.c_str());
/* If a user is loading this module, then the core databases have already been loaded
* so trigger the event manually
@@ -46,25 +46,28 @@ class CommandOSModLoad : public Command
m->OnPostLoadDatabases();
}
else
- source.Reply(OPER_MODULE_LOAD_FAIL, mname.c_str());
+ source.Reply(_("Unable to load module \002%s\002"), mname.c_str());
return MOD_CONT;
}
bool OnHelp(CommandSource &source, const Anope::string &subcommand)
{
- source.Reply(OPER_HELP_MODLOAD);
+ source.Reply(_("Syntax: \002MODLOAD\002 \002FileName\002\n"
+ " \n"
+ "This command loads the module named FileName from the modules\n"
+ "directory."));
return true;
}
void OnSyntaxError(CommandSource &source, const Anope::string &subcommand)
{
- SyntaxError(source, "MODLOAD", OPER_MODULE_LOAD_SYNTAX);
+ SyntaxError(source, "MODLOAD", _("MODLOAD \037FileName\037"));
}
void OnServHelp(CommandSource &source)
{
- source.Reply(OPER_HELP_CMD_MODLOAD);
+ source.Reply(_(" MODLOAD Load a module"));
}
};
diff --git a/modules/core/os_modreload.cpp b/modules/core/os_modreload.cpp
index e7882ed5e..10a4e1b07 100644
--- a/modules/core/os_modreload.cpp
+++ b/modules/core/os_modreload.cpp
@@ -28,19 +28,19 @@ class CommandOSModReLoad : public Command
Module *m = FindModule(mname);
if (!m)
{
- source.Reply(OPER_MODULE_ISNT_LOADED, mname.c_str());
+ source.Reply(_("Module \002%s\002 isn't loaded."), mname.c_str());
return MOD_CONT;
}
if (!m->handle)
{
- source.Reply(OPER_MODULE_REMOVE_FAIL, m->name.c_str());
+ source.Reply(_("Unable to remove module \002%s\002"), m->name.c_str());
return MOD_CONT;
}
if (m->GetPermanent())
{
- source.Reply(OPER_MODULE_NO_UNLOAD);
+ source.Reply(_("Unable to remove module \002%s\002"));
return MOD_CONT;
}
@@ -50,7 +50,7 @@ class CommandOSModReLoad : public Command
if (status != MOD_ERR_OK)
{
- source.Reply(OPER_MODULE_REMOVE_FAIL, mname.c_str());
+ source.Reply(_("Unable to remove module \002%s\002"), mname.c_str());
return MOD_CONT;
}
@@ -58,7 +58,7 @@ class CommandOSModReLoad : public Command
if (status == MOD_ERR_OK)
{
ircdproto->SendGlobops(OperServ, "%s reloaded module %s", u->nick.c_str(), mname.c_str());
- source.Reply(OPER_MODULE_RELOADED, mname.c_str());
+ source.Reply(_("Module \002%s\002 reloaded"), mname.c_str());
/* If a user is loading this module, then the core databases have already been loaded
* so trigger the event manually
@@ -72,7 +72,7 @@ class CommandOSModReLoad : public Command
if (fatal)
throw FatalException("Unable to reload module " + mname);
else
- source.Reply(OPER_MODULE_LOAD_FAIL, mname.c_str());
+ source.Reply(_("Unable to load module \002%s\002"), mname.c_str());
}
return MOD_CONT;
@@ -80,18 +80,20 @@ class CommandOSModReLoad : public Command
bool OnHelp(CommandSource &source, const Anope::string &subcommand)
{
- source.Reply(OPER_HELP_MODRELOAD);
+ source.Reply(_("Syntax: \002MODRELOAD\002 \002FileName\002\n"
+ " \n"
+ "This command reloads the module named FileName."));
return true;
}
void OnSyntaxError(CommandSource &source, const Anope::string &subcommand)
{
- SyntaxError(source, "MODLOAD", OPER_MODULE_RELOAD_SYNTAX);
+ SyntaxError(source, "MODLOAD", _("MODRELOAD \037FileName\037"));
}
void OnServHelp(CommandSource &source)
{
- source.Reply(OPER_HELP_CMD_MODRELOAD);
+ source.Reply(_(" MODRELOAD Reload a module"));
}
};
diff --git a/modules/core/os_modunload.cpp b/modules/core/os_modunload.cpp
index 8efbc8bdf..9dc3f8d39 100644
--- a/modules/core/os_modunload.cpp
+++ b/modules/core/os_modunload.cpp
@@ -28,19 +28,19 @@ class CommandOSModUnLoad : public Command
Module *m = FindModule(mname);
if (!m)
{
- source.Reply(OPER_MODULE_ISNT_LOADED, mname.c_str());
+ source.Reply(_("Module \002%s\002 isn't loaded."), mname.c_str());
return MOD_CONT;
}
if (!m->handle)
{
- source.Reply(OPER_MODULE_REMOVE_FAIL, m->name.c_str());
+ source.Reply(_("Unable to remove module \002%s\002"), m->name.c_str());
return MOD_CONT;
}
if (m->GetPermanent() || m->type == PROTOCOL)
{
- source.Reply(OPER_MODULE_NO_UNLOAD);
+ source.Reply(_("Unable to remove module \002%s\002"));
return MOD_CONT;
}
@@ -50,29 +50,32 @@ class CommandOSModUnLoad : public Command
if (status == MOD_ERR_OK)
{
- source.Reply(OPER_MODULE_UNLOADED, mname.c_str());
+ source.Reply(_("Module \002%s\002 unloaded"), mname.c_str());
ircdproto->SendGlobops(OperServ, "%s unloaded module %s", u->nick.c_str(), mname.c_str());
}
else
- source.Reply(OPER_MODULE_REMOVE_FAIL, mname.c_str());
+ source.Reply(_("Unable to remove module \002%s\002"), mname.c_str());
return MOD_CONT;
}
bool OnHelp(CommandSource &source, const Anope::string &subcommand)
{
- source.Reply(OPER_HELP_MODUNLOAD);
+ source.Reply(_("Syntax: \002MODUNLOAD\002 \002FileName\002\n"
+ " \n"
+ "This command unloads the module named FileName from the modules\n"
+ "directory."));
return true;
}
void OnSyntaxError(CommandSource &source, const Anope::string &subcommand)
{
- SyntaxError(source, "MODUNLOAD", OPER_MODULE_UNLOAD_SYNTAX);
+ SyntaxError(source, "MODUNLOAD", _("MODUNLOAD \037FileName\037"));
}
void OnServHelp(CommandSource &source)
{
- source.Reply(OPER_HELP_CMD_MODUNLOAD);
+ source.Reply(_(" MODUNLOAD Un-Load a module"));
}
};
diff --git a/modules/core/os_news.cpp b/modules/core/os_news.cpp
index fe3788dfe..d8574e5de 100644
--- a/modules/core/os_news.cpp
+++ b/modules/core/os_news.cpp
@@ -33,54 +33,54 @@ enum
struct NewsMessages msgarray[] = {
{NEWS_LOGON, "LOGON",
- {NEWS_LOGON_SYNTAX,
- NEWS_LOGON_LIST_HEADER,
- NEWS_LOGON_LIST_NONE,
- NEWS_LOGON_ADD_SYNTAX,
- NEWS_LOGON_ADDED,
- NEWS_LOGON_DEL_SYNTAX,
- NEWS_LOGON_DEL_NOT_FOUND,
- NEWS_LOGON_DELETED,
- NEWS_LOGON_DEL_NONE,
- NEWS_LOGON_DELETED_ALL}
+ {_("LOGONNEWS {ADD|DEL|LIST} [\037text\037|\037num\037]\002"),
+ _("Logon news items:"),
+ _("There is no logon news."),
+ _("Syntax: \002LOGONNEWS ADD \037text\037\002"),
+ _("Added new logon news item (#%d)."),
+ _("Syntax: \002LOGONNEWS DEL {\037num\037 | ALL}"),
+ _("Logon news item #%d not found!"),
+ _("LOGONNEWS {ADD|DEL|LIST} [\037text\037|\037num\037]\002"),
+ _("No logon news items to delete!"),
+ _("All logon news items deleted.")}
},
{NEWS_OPER, "OPER",
- {NEWS_OPER_SYNTAX,
- NEWS_OPER_LIST_HEADER,
- NEWS_OPER_LIST_NONE,
- NEWS_OPER_ADD_SYNTAX,
- NEWS_OPER_ADDED,
- NEWS_OPER_DEL_SYNTAX,
- NEWS_OPER_DEL_NOT_FOUND,
- NEWS_OPER_DELETED,
- NEWS_OPER_DEL_NONE,
- NEWS_OPER_DELETED_ALL}
+ {_("OPERNEWS {ADD|DEL|LIST} [\037text\037|\037num\037]\002"),
+ _("Oper news items:"),
+ _("There is no oper news."),
+ _("Syntax: \002OPERNEWS ADD \037text\037\002"),
+ _("Added new oper news item (#%d)."),
+ _("Syntax: \002OPERNEWS DEL {\037num\037 | ALL}"),
+ _("Oper news item #%d not found!"),
+ _("Oper news item #%d deleted."),
+ _("No oper news items to delete!"),
+ _("All oper news items deleted.")}
},
{NEWS_RANDOM, "RANDOM",
- {NEWS_RANDOM_SYNTAX,
- NEWS_RANDOM_LIST_HEADER,
- NEWS_RANDOM_LIST_NONE,
- NEWS_RANDOM_ADD_SYNTAX,
- NEWS_RANDOM_ADDED,
- NEWS_RANDOM_DEL_SYNTAX,
- NEWS_RANDOM_DEL_NOT_FOUND,
- NEWS_RANDOM_DELETED,
- NEWS_RANDOM_DEL_NONE,
- NEWS_RANDOM_DELETED_ALL}
+ {_("RANDOMNEWS {ADD|DEL|LIST} [\037text\037|\037num\037]\002"),
+ _("Random news items:"),
+ _("There is no random news."),
+ _("Syntax: \002RANDOMNEWS ADD \037text\037\002"),
+ _("Added new random news item (#%d)."),
+ _("Syntax: \002RANDOMNEWS DEL {\037num\037 | ALL}"),
+ _("Random news item #%d not found!"),
+ _("Random news item #%d deleted."),
+ _("No random news items to delete!"),
+ _("All random news items deleted.")}
}
};
static void DisplayNews(User *u, NewsType Type)
{
- LanguageString msg;
static unsigned current_news = 0;
+ Anope::string msg;
if (Type == NEWS_LOGON)
- msg = NEWS_LOGON_TEXT;
+ msg = _("[\002Logon News\002 - %s] %s");
else if (Type == NEWS_OPER)
- msg = NEWS_OPER_TEXT;
+ msg = _("[\002Oper News\002 - %s] %s");
else if (Type == NEWS_RANDOM)
- msg = NEWS_RANDOM_TEXT;
+ msg = _("[\002Random News\002 - %s] %s");
else
throw CoreException("news: Invalid type (" + stringify(Type) + ") to display_news()");
@@ -95,7 +95,7 @@ static void DisplayNews(User *u, NewsType Type)
if (Type == NEWS_RANDOM && i == current_news)
continue;
- u->SendMessage(OperServ, msg, do_strftime(News[i]->time).c_str(), News[i]->Text.c_str());
+ u->SendMessage(OperServ, msg.c_str(), do_strftime(News[i]->time).c_str(), News[i]->Text.c_str());
++displayed;
@@ -152,7 +152,7 @@ static int del_newsitem(unsigned num, NewsType type)
return count;
}
-static LanguageString *findmsgs(NewsType type, Anope::string &type_name)
+static const char **findmsgs(NewsType type, Anope::string &type_name)
{
for (unsigned i = 0; i < lenof(msgarray); ++i)
if (msgarray[i].type == type)
@@ -166,7 +166,7 @@ static LanguageString *findmsgs(NewsType type, Anope::string &type_name)
class NewsBase : public Command
{
protected:
- CommandReturn DoList(CommandSource &source, NewsType type, LanguageString *msgs)
+ CommandReturn DoList(CommandSource &source, NewsType type, const char **msgs)
{
int count = 0;
@@ -175,18 +175,18 @@ class NewsBase : public Command
{
if (!count)
source.Reply(msgs[MSG_LIST_HEADER]);
- source.Reply(NEWS_LIST_ENTRY, News[i]->num, do_strftime(News[i]->time).c_str(), !News[i]->who.empty() ? News[i]->who.c_str() : "<unknown>", News[i]->Text.c_str());
+ source.Reply(_("%5d (%s by %s)\n"" %s"), News[i]->num, do_strftime(News[i]->time).c_str(), !News[i]->who.empty() ? News[i]->who.c_str() : "<unknown>", News[i]->Text.c_str());
++count;
}
if (!count)
source.Reply(msgs[MSG_LIST_NONE]);
else
- source.Reply(END_OF_ANY_LIST, "News");
+ source.Reply(LanguageString::END_OF_ANY_LIST, "News");
return MOD_CONT;
}
- CommandReturn DoAdd(CommandSource &source, const std::vector<Anope::string> &params, NewsType type, LanguageString *msgs)
+ CommandReturn DoAdd(CommandSource &source, const std::vector<Anope::string> &params, NewsType type, const char **msgs)
{
const Anope::string text = params.size() > 1 ? params[1] : "";
int n;
@@ -197,12 +197,12 @@ class NewsBase : public Command
{
if (readonly)
{
- source.Reply(READ_ONLY_MODE);
+ source.Reply(LanguageString::READ_ONLY_MODE);
return MOD_CONT;
}
n = add_newsitem(source, text, type);
if (n < 0)
- source.Reply(NEWS_ADD_FULL);
+ source.Reply(_("News list is full!"));
else
source.Reply(msgs[MSG_ADDED], n);
}
@@ -210,7 +210,7 @@ class NewsBase : public Command
return MOD_CONT;
}
- CommandReturn DoDel(CommandSource &source, const std::vector<Anope::string> &params, NewsType type, LanguageString *msgs)
+ CommandReturn DoDel(CommandSource &source, const std::vector<Anope::string> &params, NewsType type, const char **msgs)
{
const Anope::string &text = params.size() > 1 ? params[1] : "";
unsigned num;
@@ -221,7 +221,7 @@ class NewsBase : public Command
{
if (readonly)
{
- source.Reply(READ_ONLY_MODE);
+ source.Reply(LanguageString::READ_ONLY_MODE);
return MOD_CONT;
}
if (!text.equals_ci("ALL"))
@@ -254,7 +254,7 @@ class NewsBase : public Command
const Anope::string &cmd = params[0];
Anope::string type_name;
- LanguageString *msgs = findmsgs(type, type_name);
+ const char **msgs = findmsgs(type, type_name);
if (!msgs)
throw CoreException("news: Invalid type to do_news()");
@@ -299,18 +299,29 @@ class CommandOSLogonNews : public NewsBase
bool OnHelp(CommandSource &source, const Anope::string &subcommand)
{
- source.Reply(NEWS_HELP_LOGON, Config->NewsCount);
+ source.Reply(_("Syntax: \002LOGONNEWS ADD \037text\037\002\n"
+ " \002LOGONNEWS DEL {\037num\037 | ALL}\002\n"
+ " \002LOGONNEWS LIST\002\n"
+ " \n"
+ "Edits or displays the list of logon news messages. When a\n"
+ "user connects to the network, these messages will be sent\n"
+ "to them. (However, no more than \002%d\002 messages will be\n"
+ "sent in order to avoid flooding the user. If there are\n"
+ "more news messages, only the most recent will be sent.)\n"
+ "NewsCount can be configured in services.conf.\n"
+ " \n"
+ "LOGONNEWS may only be used by Services Operators."), Config->NewsCount);
return true;
}
void OnSyntaxError(CommandSource &source, const Anope::string &subcommand)
{
- SyntaxError(source, "LOGONNEWS", NEWS_LOGON_SYNTAX);
+ SyntaxError(source, "LOGONNEWS", _("LOGONNEWS {ADD|DEL|LIST} [\037text\037|\037num\037]\002"));
}
void OnServHelp(CommandSource &source)
{
- source.Reply(OPER_HELP_CMD_LOGONNEWS);
+ source.Reply(_(" LOGONNEWS Define messages to be shown to users at logon"));
}
};
@@ -328,18 +339,29 @@ class CommandOSOperNews : public NewsBase
bool OnHelp(CommandSource &source, const Anope::string &subcommand)
{
- source.Reply(NEWS_HELP_OPER, Config->NewsCount);
+ source.Reply(_("Syntax: \002OPERNEWS ADD \037text\037\002\n"
+ " \002OPERNEWS DEL {\037num\037 | ALL}\002\n"
+ " \002OPERNEWS LIST\002\n"
+ " \n"
+ "Edits or displays the list of oper news messages. When a\n"
+ "user opers up (with the /OPER command), these messages will\n"
+ "be sent to them. (However, no more than \002%d\002 messages will\n"
+ "be sent in order to avoid flooding the user. If there are\n"
+ "more news messages, only the most recent will be sent.)\n"
+ "NewsCount can be configured in services.conf.\n"
+ " \n"
+ "OPERNEWS may only be used by Services Operators."), Config->NewsCount);
return true;
}
void OnSyntaxError(CommandSource &source, const Anope::string &subcommand)
{
- SyntaxError(source, "OPERNEWS", NEWS_OPER_SYNTAX);
+ SyntaxError(source, "OPERNEWS", _("OPERNEWS {ADD|DEL|LIST} [\037text\037|\037num\037]\002"));
}
void OnServHelp(CommandSource &source)
{
- source.Reply(OPER_HELP_CMD_OPERNEWS);
+ source.Reply(_(" OPERNEWS Define messages to be shown to users who oper"));
}
};
@@ -357,18 +379,27 @@ class CommandOSRandomNews : public NewsBase
bool OnHelp(CommandSource &source, const Anope::string &subcommand)
{
- source.Reply(NEWS_HELP_RANDOM);
+ source.Reply(_("Syntax: \002RANDOMNEWS ADD \037text\037\002\n"
+ " \002RANDOMNEWS DEL {\037num\037 | ALL}\002\n"
+ " \002RANDOMNEWS LIST\002\n"
+ " \n"
+ "Edits or displays the list of random news messages. When a\n"
+ "user connects to the network, one (and only one) of the\n"
+ "random news will be randomly chosen and sent to them.\n"
+ " \n"
+ "RANDOMNEWS may only be used by Services Operators."));
return true;
}
void OnSyntaxError(CommandSource &source, const Anope::string &subcommand)
{
- SyntaxError(source, "RANDOMNEWS", NEWS_RANDOM_SYNTAX);
+ SyntaxError(source, "RANDOMNEWS", _("RANDOMNEWS {ADD|DEL|LIST} [\037text\037|\037num\037]\002"));
}
void OnServHelp(CommandSource &source)
{
- source.Reply(OPER_HELP_CMD_RANDOMNEWS);
+ source.Reply(_(" RANDOMNEWS Define messages to be randomly shown to users \n"
+ " at logon"));
}
};
diff --git a/modules/core/os_noop.cpp b/modules/core/os_noop.cpp
index 49f29d2c9..ae6d1fda7 100644
--- a/modules/core/os_noop.cpp
+++ b/modules/core/os_noop.cpp
@@ -36,7 +36,7 @@ class CommandOSNOOP : public Command
reason = "NOOP command used by " + u->nick;
if (Config->WallOSNoOp)
ircdproto->SendGlobops(OperServ, "\2%s\2 used NOOP on \2%s\2", u->nick.c_str(), server.c_str());
- source.Reply(OPER_NOOP_SET, server.c_str());
+ source.Reply(_("All O:lines of \002%s\002 have been removed."), server.c_str());
/* Kill all the IRCops of the server */
patricia_tree<User *, ci::ci_char_traits>::iterator it(UserListByNick);
@@ -52,7 +52,7 @@ class CommandOSNOOP : public Command
else if (cmd.equals_ci("REVOKE"))
{
ircdproto->SendSVSNOOP(server, 0);
- source.Reply(OPER_NOOP_REVOKE, server.c_str());
+ source.Reply(_("All O:lines of \002%s\002 have been reset."), server.c_str());
}
else
this->OnSyntaxError(source, "");
@@ -61,18 +61,29 @@ class CommandOSNOOP : public Command
bool OnHelp(CommandSource &source, const Anope::string &subcommand)
{
- source.Reply(OPER_HELP_NOOP);
+ source.Reply(_("Syntax: \002NOOP SET \037server\037\002\n"
+ " \002NOOP REVOKE \037server\037\002\n"
+ "\n"
+ "\002NOOP SET\002 remove all O:lines of the given\n"
+ "\002server\002 and kill all IRCops currently on it to\n"
+ "prevent them from rehashing the server (because this\n"
+ "would just cancel the effect).\n"
+ "\002NOOP REVOKE\002 makes all removed O:lines available again\n"
+ "on the given \002server\002.\n"
+ "\002Note:\002 The \002server\002 is not checked at all by the\n"
+ "Services."));
return true;
}
void OnSyntaxError(CommandSource &source, const Anope::string &subcommand)
{
- SyntaxError(source, "NOOP", OPER_NOOP_SYNTAX);
+ SyntaxError(source, "NOOP", _("NOOP {SET|REVOKE} \037server\037"));
}
void OnServHelp(CommandSource &source)
{
- source.Reply(OPER_HELP_CMD_NOOP);
+ source.Reply(_(" NOOP Temporarily remove all O:lines of a server \n"
+ " remotely"));
}
};
diff --git a/modules/core/os_oline.cpp b/modules/core/os_oline.cpp
index 39b75651f..833bf6ab9 100644
--- a/modules/core/os_oline.cpp
+++ b/modules/core/os_oline.cpp
@@ -29,40 +29,45 @@ class CommandOSOLine : public Command
/* let's check whether the user is online */
if (!(u2 = finduser(nick)))
- source.Reply(NICK_X_NOT_IN_USE, nick.c_str());
+ source.Reply(LanguageString::NICK_X_NOT_IN_USE, nick.c_str());
else if (u2 && flag[0] == '+')
{
ircdproto->SendSVSO(Config->s_OperServ, nick, flag);
u2->SetMode(OperServ, UMODE_OPER);
- u2->SendMessage(OperServ, OPER_OLINE_IRCOP);
- source.Reply(OPER_OLINE_SUCCESS, flag.c_str(), nick.c_str());
+ u2->SendMessage(OperServ, _("You are now an IRC Operator."));
+ source.Reply(_("Operflags \002%s\002 have been added for \002%s\002."), flag.c_str(), nick.c_str());
ircdproto->SendGlobops(OperServ, "\2%s\2 used OLINE for %s", u->nick.c_str(), nick.c_str());
}
else if (u2 && flag[0] == '-')
{
ircdproto->SendSVSO(Config->s_OperServ, nick, flag);
- source.Reply(OPER_OLINE_SUCCESS, flag.c_str(), nick.c_str());
+ source.Reply(_("Operflags \002%s\002 have been added for \002%s\002."), flag.c_str(), nick.c_str());
ircdproto->SendGlobops(OperServ, "\2%s\2 used OLINE for %s", u->nick.c_str(), nick.c_str());
}
else
this->OnSyntaxError(source, "");
+
return MOD_CONT;
}
bool OnHelp(CommandSource &source, const Anope::string &subcommand)
{
- source.Reply(OPER_HELP_OLINE);
+ source.Reply(_("Syntax: \002OLINE \037user\037 \037flags\037\002\n"
+ " \n"
+ "Allows Services Opers to give Operflags to any user.\n"
+ "Flags have to be prefixed with a \"+\" or a \"-\". To\n"
+ "remove all flags simply type a \"-\" instead of any flags."));
return true;
}
void OnSyntaxError(CommandSource &source, const Anope::string &subcommand)
{
- SyntaxError(source, "OLINE", OPER_OLINE_SYNTAX);
+ SyntaxError(source, "OLINE", _("OLINE \037nick\037 \037flags\037"));
}
void OnServHelp(CommandSource &source)
{
- source.Reply(OPER_HELP_CMD_OLINE);
+ source.Reply(_(" OLINE Give Operflags to a certain user"));
}
};
diff --git a/modules/core/os_quit.cpp b/modules/core/os_quit.cpp
index edf654334..c06236bd1 100644
--- a/modules/core/os_quit.cpp
+++ b/modules/core/os_quit.cpp
@@ -34,13 +34,19 @@ class CommandOSQuit : public Command
bool OnHelp(CommandSource &source, const Anope::string &subcommand)
{
- source.Reply(OPER_HELP_QUIT);
+ source.Reply(_("Syntax: \002QUIT\002\n"
+ " \n"
+ "Causes Services to do an immediate shutdown; databases are\n"
+ "\002not\002 saved. This command should not be used unless\n"
+ "damage to the in-memory copies of the databases is feared\n"
+ "and they should not be saved. For normal shutdowns, use the\n"
+ "\002SHUTDOWN\002 command."));
return true;
}
void OnServHelp(CommandSource &source)
{
- source.Reply(OPER_HELP_CMD_QUIT);
+ source.Reply(_(" QUIT Terminate the Services program with no save"));
}
};
diff --git a/modules/core/os_reload.cpp b/modules/core/os_reload.cpp
index a5b392ec2..f1ec14949 100644
--- a/modules/core/os_reload.cpp
+++ b/modules/core/os_reload.cpp
@@ -34,19 +34,23 @@ class CommandOSReload : public Command
Log() << "Error reloading configuration file: " << ex.GetReason();
}
- source.Reply(OPER_RELOAD);
+ source.Reply(_("Services' configuration file has been reloaded."));
return MOD_CONT;
}
bool OnHelp(CommandSource &source, const Anope::string &subcommand)
{
- source.Reply(OPER_HELP_RELOAD);
+ source.Reply(_("Syntax: \002RELOAD\002\n"
+ "Causes Services to reload the configuration file. Note that\n"
+ "some directives still need the restart of the Services to\n"
+ "take effect (such as Services' nicknames, activation of the \n"
+ "session limitation, etc.)"));
return true;
}
void OnServHelp(CommandSource &source)
{
- source.Reply(OPER_HELP_CMD_RELOAD);
+ source.Reply(_(" RELOAD Reload services' configuration file"));
}
};
diff --git a/modules/core/os_restart.cpp b/modules/core/os_restart.cpp
index 1f611f0ab..e0c2bde45 100644
--- a/modules/core/os_restart.cpp
+++ b/modules/core/os_restart.cpp
@@ -34,13 +34,16 @@ class CommandOSRestart : public Command
bool OnHelp(CommandSource &source, const Anope::string &subcommand)
{
- source.Reply(OPER_HELP_RESTART);
+ source.Reply(_("Syntax: \002RESTART\002\n"
+ " \n"
+ "Causes Services to save all databases and then restart\n"
+ "(i.e. exit and immediately re-run the executable)."));
return true;
}
void OnServHelp(CommandSource &source)
{
- source.Reply(OPER_HELP_CMD_RESTART);
+ source.Reply(_(" RESTART Save databases and restart Services"));
}
};
diff --git a/modules/core/os_session.cpp b/modules/core/os_session.cpp
index 712603fa4..e5f26d548 100644
--- a/modules/core/os_session.cpp
+++ b/modules/core/os_session.cpp
@@ -26,11 +26,11 @@ class ExceptionDelCallback : public NumberList
~ExceptionDelCallback()
{
if (!Deleted)
- source.Reply(OPER_EXCEPTION_NO_MATCH);
+ source.Reply(_("No matching entries on session-limit exception list."));
else if (Deleted == 1)
- source.Reply(OPER_EXCEPTION_DELETED_ONE);
+ source.Reply(_("Deleted 1 entry from session-limit exception list."));
else
- source.Reply(OPER_EXCEPTION_DELETED_SEVERAL, Deleted);
+ source.Reply(_("Deleted %d entries from session-limit exception list."), Deleted);
}
virtual void HandleNumber(unsigned Number)
@@ -70,8 +70,8 @@ class ExceptionListCallback : public NumberList
if (!SentHeader)
{
SentHeader = true;
- source.Reply(OPER_EXCEPTION_LIST_HEADER);
- source.Reply(OPER_EXCEPTION_LIST_COLHEAD);
+ source.Reply(_("Current Session Limit Exception list:"));
+ source.Reply(_("Num Limit Host"));
}
DoList(source, Number - 1);
@@ -82,7 +82,7 @@ class ExceptionListCallback : public NumberList
if (index >= exceptions.size())
return;
- source.Reply(OPER_EXCEPTION_LIST_FORMAT, index + 1, exceptions[index]->limit, exceptions[index]->mask.c_str());
+ source.Reply(_("%3d %4d %s"), index + 1, exceptions[index]->limit, exceptions[index]->mask.c_str());
}
};
@@ -101,7 +101,7 @@ class ExceptionViewCallback : public ExceptionListCallback
if (!SentHeader)
{
SentHeader = true;
- source.Reply(OPER_EXCEPTION_LIST_HEADER);
+ source.Reply(_("Current Session Limit Exception list:"));
}
DoList(source, Number - 1);
@@ -114,7 +114,7 @@ class ExceptionViewCallback : public ExceptionListCallback
Anope::string expirebuf = expire_left(source.u->Account(), exceptions[index]->expires);
- source.Reply(OPER_EXCEPTION_VIEW_FORMAT, index + 1, exceptions[index]->mask.c_str(), !exceptions[index]->who.empty() ? exceptions[index]->who.c_str() : "<unknown>", do_strftime((exceptions[index]->time ? exceptions[index]->time : Anope::CurTime)).c_str(), expirebuf.c_str(), exceptions[index]->limit, exceptions[index]->reason.c_str());
+ source.Reply(_("%3d. %s (by %s on %s; %s)\n " " Limit: %-4d - %s"), index + 1, exceptions[index]->mask.c_str(), !exceptions[index]->who.empty() ? exceptions[index]->who.c_str() : "<unknown>", do_strftime((exceptions[index]->time ? exceptions[index]->time : Anope::CurTime)).c_str(), expirebuf.c_str(), exceptions[index]->limit, exceptions[index]->reason.c_str());
}
};
@@ -128,18 +128,18 @@ class CommandOSSession : public Command
unsigned mincount = param.is_pos_number_only() ? convertTo<unsigned>(param) : 0;
if (mincount <= 1)
- source.Reply(OPER_SESSION_INVALID_THRESHOLD);
+ source.Reply(_("Invalid threshold value. It must be a valid integer greater than 1."));
else
{
- source.Reply(OPER_SESSION_LIST_HEADER, mincount);
- source.Reply(OPER_SESSION_LIST_COLHEAD);
+ source.Reply(_("Hosts with at least \002%d\002 sessions:"), mincount);
+ source.Reply(_("Sessions Host"));
for (patricia_tree<Session *>::iterator it(SessionList); it.next();)
{
Session *session = *it;
if (session->count >= mincount)
- source.Reply(OPER_SESSION_LIST_FORMAT, session->count, session->host.c_str());
+ source.Reply(_("%6d %s"), session->count, session->host.c_str());
}
}
@@ -152,11 +152,11 @@ class CommandOSSession : public Command
Session *session = findsession(param);
if (!session)
- source.Reply(OPER_SESSION_NOT_FOUND, param.c_str());
+ source.Reply(_("\002%s\002 not found on session list."), param.c_str());
else
{
Exception *exception = find_host_exception(param);
- source.Reply(OPER_SESSION_VIEW_FORMAT, param.c_str(), session->count, exception ? exception-> limit : Config->DefSessionLimit);
+ source.Reply(_("The host \002%s\002 currently has \002%d\002 sessions with a limit of \002%d\002."), param.c_str(), session->count, exception ? exception-> limit : Config->DefSessionLimit);
}
return MOD_CONT;
@@ -172,7 +172,7 @@ class CommandOSSession : public Command
if (!Config->LimitSessions)
{
- source.Reply(OPER_EXCEPTION_DISABLED);
+ source.Reply(_("Session limiting is disabled."));
return MOD_CONT;
}
@@ -188,18 +188,31 @@ class CommandOSSession : public Command
bool OnHelp(CommandSource &source, const Anope::string &subcommand)
{
- source.Reply(OPER_HELP_SESSION);
+ source.Reply(_("Syntax: \002SESSION LIST \037threshold\037\002\n"
+ " \002SESSION VIEW \037host\037\002\n"
+ " \n"
+ "Allows Services Operators to view the session list.\n"
+ "\002SESSION LIST\002 lists hosts with at least \037threshold\037 sessions.\n"
+ "The threshold must be a number greater than 1. This is to \n"
+ "prevent accidental listing of the large number of single \n"
+ "session hosts.\n"
+ "\002SESSION VIEW\002 displays detailed information about a specific\n"
+ "host - including the current session count and session limit.\n"
+ "The \037host\037 value may not include wildcards.\n"
+ "See the \002EXCEPTION\002 help for more information about session\n"
+ "limiting and how to set session limits specific to certain\n"
+ "hosts and groups thereof."));
return true;
}
void OnSyntaxError(CommandSource &source, const Anope::string &subcommand)
{
- SyntaxError(source, "SESSION", OPER_SESSION_LIST_SYNTAX);
+ SyntaxError(source, "SESSION", _("SESSION LIST \037limit\037"));
}
void OnServHelp(CommandSource &source)
{
- source.Reply(OPER_HELP_CMD_SESSION);
+ source.Reply(_(" SESSION View the list of host sessions"));
}
};
@@ -241,7 +254,7 @@ class CommandOSException : public Command
time_t expires = !expiry.empty() ? dotime(expiry) : Config->ExceptionExpiry;
if (expires < 0)
{
- source.Reply(BAD_EXPIRY_TIME);
+ source.Reply(LanguageString::BAD_EXPIRY_TIME);
return MOD_CONT;
}
else if (expires > 0)
@@ -251,24 +264,24 @@ class CommandOSException : public Command
if (limit < 0 || limit > static_cast<int>(Config->MaxSessionLimit))
{
- source.Reply(OPER_EXCEPTION_INVALID_LIMIT, Config->MaxSessionLimit);
+ source.Reply(_("Invalid session limit. It must be a valid integer greater than or equal to zero and less than \002%d\002."), Config->MaxSessionLimit);
return MOD_CONT;
}
else
{
if (mask.find('!') != Anope::string::npos || mask.find('@') != Anope::string::npos)
{
- source.Reply(OPER_EXCEPTION_INVALID_HOSTMASK);
+ source.Reply(_("Invalid hostmask. Only real hostmasks are valid as exceptions are not matched against nicks or usernames."));
return MOD_CONT;
}
x = exception_add(u, mask, limit, reason, u->nick, expires);
if (x == 1)
- source.Reply(OPER_EXCEPTION_ADDED, mask.c_str(), limit);
+ source.Reply(_("Session limit for \002%s\002 set to \002%d\002."), mask.c_str(), limit);
if (readonly)
- source.Reply(READ_ONLY_MODE);
+ source.Reply(LanguageString::READ_ONLY_MODE);
}
return MOD_CONT;
@@ -296,15 +309,15 @@ class CommandOSException : public Command
if (mask.equals_ci(exceptions[i]->mask))
{
ExceptionDelCallback::DoDel(source, i);
- source.Reply(OPER_EXCEPTION_DELETED, mask.c_str());
+ source.Reply(_("\002%s\002 deleted from session-limit exception list."), mask.c_str());
break;
}
if (i == end)
- source.Reply(OPER_EXCEPTION_NOT_FOUND, mask.c_str());
+ source.Reply(_("\002%s\002 not found on session-limit exception list."), mask.c_str());
}
if (readonly)
- source.Reply(READ_ONLY_MODE);
+ source.Reply(LanguageString::READ_ONLY_MODE);
return MOD_CONT;
}
@@ -330,10 +343,10 @@ class CommandOSException : public Command
exceptions[n1] = exceptions[n2];
exceptions[n2] = temp;
- source.Reply(OPER_EXCEPTION_MOVED, exceptions[n1]->mask.c_str(), n1 + 1, n2 + 1);
+ source.Reply(_("Exception for \002%s\002 (#%d) moved to position \002%d\002."), exceptions[n1]->mask.c_str(), n1 + 1, n2 + 1);
if (readonly)
- source.Reply(READ_ONLY_MODE);
+ source.Reply(LanguageString::READ_ONLY_MODE);
}
else
this->OnSyntaxError(source, "MOVE");
@@ -361,15 +374,15 @@ class CommandOSException : public Command
if (!SentHeader)
{
SentHeader = true;
- source.Reply(OPER_EXCEPTION_LIST_HEADER);
- source.Reply(OPER_EXCEPTION_LIST_COLHEAD);
+ source.Reply(_("Current Session Limit Exception list:"));
+ source.Reply(_("Num Limit Host"));
}
ExceptionListCallback::DoList(source, i);
}
if (!SentHeader)
- source.Reply(OPER_EXCEPTION_NO_MATCH);
+ source.Reply(_("No matching entries on session-limit exception list."));
}
return MOD_CONT;
@@ -395,14 +408,14 @@ class CommandOSException : public Command
if (!SentHeader)
{
SentHeader = true;
- source.Reply(OPER_EXCEPTION_LIST_HEADER);
+ source.Reply(_("Current Session Limit Exception list:"));
}
ExceptionViewCallback::DoList(source, i);
}
if (!SentHeader)
- source.Reply(OPER_EXCEPTION_NO_MATCH);
+ source.Reply(_("No matching entries on session-limit exception list."));
}
return MOD_CONT;
@@ -418,7 +431,7 @@ class CommandOSException : public Command
if (!Config->LimitSessions)
{
- source.Reply(OPER_EXCEPTION_DISABLED);
+ source.Reply(_("Session limiting is disabled."));
return MOD_CONT;
}
@@ -440,18 +453,54 @@ class CommandOSException : public Command
bool OnHelp(CommandSource &source, const Anope::string &subcommand)
{
- source.Reply(OPER_HELP_EXCEPTION);
+ source.Reply(_("Syntax: \002EXCEPTION ADD [\037+expiry\037] \037mask\037 \037limit\037 \037reason\037\002\n"
+ " \002EXCEPTION DEL {\037mask\037 | \037list\037}\002\n"
+ " \002EXCEPTION MOVE \037num\037 \037position\037\002\n"
+ " \002EXCEPTION LIST [\037mask\037 | \037list\037]\002\n"
+ " \002EXCEPTION VIEW [\037mask\037 | \037list\037]\002\n"
+ " \n"
+ "Allows Services Operators to manipulate the list of hosts that\n"
+ "have specific session limits - allowing certain machines, \n"
+ "such as shell servers, to carry more than the default number\n"
+ "of clients at a time. Once a host reaches its session limit,\n"
+ "all clients attempting to connect from that host will be\n"
+ "killed. Before the user is killed, they are notified, via a\n"
+ "/NOTICE from %S, of a source of help regarding session\n"
+ "limiting. The content of this notice is a config setting.\n"
+ " \n"
+ "\002EXCEPTION ADD\002 adds the given host mask to the exception list.\n"
+ "Note that \002nick!user@host\002 and \002user@host\002 masks are invalid!\n"
+ "Only real host masks, such as \002box.host.dom\002 and \002*.host.dom\002,\n"
+ "are allowed because sessions limiting does not take nick or\n"
+ "user names into account. \037limit\037 must be a number greater than\n"
+ "or equal to zero. This determines how many sessions this host\n"
+ "may carry at a time. A value of zero means the host has an\n"
+ "unlimited session limit. See the \002AKILL\002 help for details about\n"
+ "the format of the optional \037expiry\037 parameter.\n"
+ "\002EXCEPTION DEL\002 removes the given mask from the exception list.\n"
+ "\002EXCEPTION MOVE\002 moves exception \037num\037 to \037position\037. The\n"
+ "exceptions inbetween will be shifted up or down to fill the gap.\n"
+ "\002EXCEPTION LIST\002 and \002EXCEPTION VIEW\002 show all current\n"
+ "exceptions; if the optional mask is given, the list is limited\n"
+ "to those exceptions matching the mask. The difference is that\n"
+ "\002EXCEPTION VIEW\002 is more verbose, displaying the name of the\n"
+ "person who added the exception, its session limit, reason, \n"
+ "host mask and the expiry date and time.\n"
+ " \n"
+ "Note that a connecting client will \"use\" the first exception\n"
+ "their host matches. Large exception lists and widely matching\n"
+ "exception masks are likely to degrade services' performance."));
return true;
}
void OnSyntaxError(CommandSource &source, const Anope::string &subcommand)
{
- SyntaxError(source, "EXCEPTION", OPER_EXCEPTION_SYNTAX);
+ SyntaxError(source, "EXCEPTION", _("EXCEPTION {ADD | DEL | MOVE | LIST | VIEW} [\037params\037]"));
}
void OnServHelp(CommandSource &source)
{
- source.Reply(OPER_HELP_CMD_EXCEPTION);
+ source.Reply(_(" EXCEPTION Modify the session-limit exception list"));
}
};
diff --git a/modules/core/os_set.cpp b/modules/core/os_set.cpp
index 9a693c143..17841279a 100644
--- a/modules/core/os_set.cpp
+++ b/modules/core/os_set.cpp
@@ -20,14 +20,14 @@ class CommandOSSet : public Command
{
Log(LOG_ADMIN, source.u, this);
- LanguageString index;
+ Anope::string index;
- index = readonly ? OPER_SET_LIST_OPTION_ON : OPER_SET_LIST_OPTION_OFF;
- source.Reply(index, "READONLY");
- index = debug ? OPER_SET_LIST_OPTION_ON : OPER_SET_LIST_OPTION_OFF;
- source.Reply(index, "DEBUG");
- index = noexpire ? OPER_SET_LIST_OPTION_ON : OPER_SET_LIST_OPTION_OFF;
- source.Reply(index, "NOEXPIRE");
+ index = readonly ? _("%s is enabled") : _("%s is disabled");
+ source.Reply(index.c_str(), "READONLY");
+ index = debug ? _("%s is enabled") : _("%s is disabled");
+ source.Reply(index.c_str(), "DEBUG");
+ index = noexpire ? _("%s is enabled") : _("%s is disabled");
+ source.Reply(index.c_str(), "NOEXPIRE");
return MOD_CONT;
}
@@ -47,16 +47,16 @@ class CommandOSSet : public Command
{
readonly = true;
Log(LOG_ADMIN, u, this) << "READONLY ON";
- source.Reply(OPER_SET_READONLY_ON);
+ source.Reply(_("Services are now in \002read-only\002 mode."));
}
else if (setting.equals_ci("OFF"))
{
readonly = false;
Log(LOG_ADMIN, u, this) << "READONLY OFF";
- source.Reply(OPER_SET_READONLY_OFF);
+ source.Reply(_("Services are now in \002read-write\002 mode."));
}
else
- source.Reply(OPER_SET_READONLY_ERROR);
+ source.Reply(_("Setting for READONLY must be \002\002 or \002\002."));
return MOD_CONT;
}
@@ -78,23 +78,23 @@ class CommandOSSet : public Command
* Rob
**/
if (!Config->SuperAdmin)
- source.Reply(OPER_SUPER_ADMIN_NOT_ENABLED);
+ source.Reply(_("SuperAdmin setting not enabled in services.conf"));
else if (setting.equals_ci("ON"))
{
u->isSuperAdmin = 1;
- source.Reply(OPER_SUPER_ADMIN_ON);
+ source.Reply(_("You are now a SuperAdmin"));
Log(LOG_ADMIN, u, this) << "SUPERADMIN ON";
- ircdproto->SendGlobops(OperServ, GetString(OPER_SUPER_ADMIN_WALL_ON).c_str(), u->nick.c_str());
+ ircdproto->SendGlobops(OperServ, GetString(NULL, _("%s is now a Super-Admin")).c_str(), u->nick.c_str());
}
else if (setting.equals_ci("OFF"))
{
u->isSuperAdmin = 0;
- source.Reply(OPER_SUPER_ADMIN_OFF);
+ source.Reply(_("You are no longer a SuperAdmin"));
Log(LOG_ADMIN, u, this) << "SUPERADMIN OFF";
- ircdproto->SendGlobops(OperServ, GetString(OPER_SUPER_ADMIN_WALL_OFF).c_str(), u->nick.c_str());
+ ircdproto->SendGlobops(OperServ, GetString(NULL, _("%s is no longer a Super-Admin")).c_str(), u->nick.c_str());
}
else
- source.Reply(OPER_SUPER_ADMIN_SYNTAX);
+ source.Reply(_("Setting for SuperAdmin must be \002\002 or \002\002 (must be enabled in services.conf)"));
return MOD_CONT;
}
@@ -114,22 +114,22 @@ class CommandOSSet : public Command
{
debug = 1;
Log(LOG_ADMIN, u, this) << "DEBUG ON";
- source.Reply(OPER_SET_DEBUG_ON);
+ source.Reply(_("Services are now in debug mode."));
}
else if (setting.equals_ci("OFF") || (setting[0] == '0' && setting.is_number_only() && !convertTo<int>(setting)))
{
Log(LOG_ADMIN, u, this) << "DEBUG OFF";
debug = 0;
- source.Reply(OPER_SET_DEBUG_OFF);
+ source.Reply(_("Services are now in non-debug mode."));
}
else if (setting.is_number_only() && convertTo<int>(setting) > 0)
{
debug = convertTo<int>(setting);
Log(LOG_ADMIN, u, this) << "DEBUG " << debug;
- source.Reply(OPER_SET_DEBUG_LEVEL, debug);
+ source.Reply(_("Services are now in debug mode (level %d)."), debug);
}
else
- source.Reply(OPER_SET_DEBUG_ERROR);
+ source.Reply(_("Setting for DEBUG must be \002\002, \002\002, or a positive number."));
return MOD_CONT;
}
@@ -149,16 +149,16 @@ class CommandOSSet : public Command
{
noexpire = true;
Log(LOG_ADMIN, u, this) << "NOEXPIRE ON";
- source.Reply(OPER_SET_NOEXPIRE_ON);
+ source.Reply(_("Services are now in \002no expire\002 mode."));
}
else if (setting.equals_ci("OFF"))
{
noexpire = false;
Log(LOG_ADMIN, u, this) << "NOEXPIRE OFF";
- source.Reply(OPER_SET_NOEXPIRE_OFF);
+ source.Reply(_("Services are now in \002expire\002 mode."));
}
else
- source.Reply(OPER_SET_NOEXPIRE_ERROR);
+ source.Reply(_("Setting for NOEXPIRE must be \002\002 or \002\002."));
return MOD_CONT;
}
@@ -182,7 +182,7 @@ class CommandOSSet : public Command
else if (option.equals_ci("NOEXPIRE"))
return this->DoSetNoExpire(source, params);
else
- source.Reply(OPER_SET_UNKNOWN_OPTION, option.c_str());
+ source.Reply(_("Unknown option \002%s\002."), option.c_str());
return MOD_CONT;
}
@@ -190,29 +190,57 @@ class CommandOSSet : public Command
bool OnHelp(CommandSource &source, const Anope::string &subcommand)
{
if (subcommand.empty())
- source.Reply(OPER_HELP_SET);
+ source.Reply(_("Syntax: \002SET \037option\037 \037setting\037\002\n"
+ "Sets various global Services options. Option names\n"
+ "currently defined are:\n"
+ " READONLY Set read-only or read-write mode\n"
+ " DEBUG Activate or deactivate debug mode\n"
+ " NOEXPIRE Activate or deactivate no expire mode\n"
+ " SUPERADMIN Activate or deactivate super-admin mode\n"
+ " LIST List the options"));
else if (subcommand.equals_ci("LIST"))
- source.Reply(OPER_HELP_SET_LIST);
+ source.Reply(_("Syntax: \002SET LIST\n"
+ "Display the various %S settings"));
else if (subcommand.equals_ci("READONLY"))
- source.Reply(OPER_HELP_SET_READONLY);
+ source.Reply(_("Syntax: \002SET READONLY {ON | OFF}\002\n"
+ " \n"
+ "Sets read-only mode on or off. In read-only mode, normal\n"
+ "users will not be allowed to modify any Services data,\n"
+ "including channel and nickname access lists, etc. IRCops\n"
+ "with sufficient Services privileges will be able to modify\n"
+ "Services' AKILL list and drop or forbid nicknames and\n"
+ "channels, but any such changes will not be saved unless\n"
+ "read-only mode is deactivated before Services is terminated\n"
+ "or restarted.\n"
+ " \n"
+ "This option is equivalent to the command-line option\n"
+ "\002-readonly\002."));
else if (subcommand.equals_ci("NOEXPIRE"))
- source.Reply(OPER_HELP_SET_NOEXPIRE);
+ source.Reply(_("Syntax: \002SET NOEXPIRE {ON | OFF}\002\n"
+ "Sets no expire mode on or off. In no expire mode, nicks,\n"
+ "channels, akills and exceptions won't expire until the\n"
+ "option is unset.\n"
+ "This option is equivalent to the command-line option\n"
+ "\002-noexpire\002."));
else if (subcommand.equals_ci("SUPERADMIN"))
- source.Reply(OPER_HELP_SET_SUPERADMIN);
+ source.Reply(_("Syntax: \002SET SUPERADMIN {ON | OFF}\002\n"
+ "Setting this will grant you extra privileges such as the\n"
+ "ability to be \"founder\" on all channel's etc...\n"
+ "This option is \002not\002 persistent, and should only be used when\n"
+ "needed, and set back to OFF when no longer needed."));
else
return false;
-
return true;
}
void OnSyntaxError(CommandSource &source, const Anope::string &subcommand)
{
- SyntaxError(source, "SET", OPER_SET_SYNTAX);
+ SyntaxError(source, "SET", _("SET \037option\037 \037setting\037"));
}
void OnServHelp(CommandSource &source)
{
- source.Reply(OPER_HELP_CMD_SET);
+ source.Reply(_(" SET Set various global Services options"));
}
};
diff --git a/modules/core/os_shutdown.cpp b/modules/core/os_shutdown.cpp
index 45eb205d1..7f15d5169 100644
--- a/modules/core/os_shutdown.cpp
+++ b/modules/core/os_shutdown.cpp
@@ -33,13 +33,15 @@ class CommandOSShutdown : public Command
bool OnHelp(CommandSource &source, const Anope::string &subcommand)
{
- source.Reply(OPER_HELP_SHUTDOWN);
+ source.Reply(_("Syntax: \002SHUTDOWN\002\n"
+ " \n"
+ "Causes Services to save all databases and then shut down."));
return true;
}
void OnServHelp(CommandSource &source)
{
- source.Reply(OPER_HELP_CMD_SHUTDOWN);
+ source.Reply(_(" SHUTDOWN Terminate the Services program with save"));
}
};
diff --git a/modules/core/os_snline.cpp b/modules/core/os_snline.cpp
index 9ea88ec5e..97d1911d7 100644
--- a/modules/core/os_snline.cpp
+++ b/modules/core/os_snline.cpp
@@ -26,11 +26,11 @@ class SNLineDelCallback : public NumberList
~SNLineDelCallback()
{
if (!Deleted)
- source.Reply(OPER_SNLINE_NO_MATCH);
+ source.Reply(_("No matching entries on the SNLINE list."));
else if (Deleted == 1)
- source.Reply(OPER_SNLINE_DELETED_ONE);
+ source.Reply(_("Deleted 1 entry from the SNLINE list."));
else
- source.Reply(OPER_SNLINE_DELETED_SEVERAL, Deleted);
+ source.Reply(_("Deleted %d entries from the SNLINE list."), Deleted);
}
void HandleNumber(unsigned Number)
@@ -66,7 +66,7 @@ class SNLineListCallback : public NumberList
~SNLineListCallback()
{
if (!SentHeader)
- source.Reply(OPER_SNLINE_NO_MATCH);
+ source.Reply(_("No matching entries on the SNLINE list."));
}
virtual void HandleNumber(unsigned Number)
@@ -82,7 +82,7 @@ class SNLineListCallback : public NumberList
if (!SentHeader)
{
SentHeader = true;
- source.Reply(OPER_SNLINE_LIST_HEADER);
+ source.Reply(_("Current SNLINE list:\n Num Mask Reason"));
}
DoList(source, x, Number - 1);
@@ -90,7 +90,7 @@ class SNLineListCallback : public NumberList
static void DoList(CommandSource &source, XLine *x, unsigned Number)
{
- source.Reply(OPER_LIST_FORMAT, Number + 1, x->Mask.c_str(), x->Reason.c_str());
+ source.Reply(LanguageString::OPER_LIST_FORMAT, Number + 1, x->Mask.c_str(), x->Reason.c_str());
}
};
@@ -114,7 +114,7 @@ class SNLineViewCallback : public SNLineListCallback
if (!SentHeader)
{
SentHeader = true;
- source.Reply(OPER_SNLINE_VIEW_HEADER);
+ source.Reply(_("Current SNLINE list:"));
}
DoList(source, x, Number - 1);
@@ -123,7 +123,7 @@ class SNLineViewCallback : public SNLineListCallback
static void DoList(CommandSource &source, XLine *x, unsigned Number)
{
Anope::string expirebuf = expire_left(source.u->Account(), x->Expires);
- source.Reply(OPER_VIEW_FORMAT, Number + 1, x->Mask.c_str(), x->By.c_str(), do_strftime(x->Created).c_str(), expirebuf.c_str(), x->Reason.c_str());
+ source.Reply(LanguageString::OPER_VIEW_FORMAT, Number + 1, x->Mask.c_str(), x->By.c_str(), do_strftime(x->Created).c_str(), expirebuf.c_str(), x->Reason.c_str());
}
};
@@ -154,7 +154,7 @@ class CommandOSSNLine : public Command
/* Do not allow less than a minute expiry time */
if (expires && expires < 60)
{
- source.Reply(BAD_EXPIRY_TIME);
+ source.Reply(LanguageString::BAD_EXPIRY_TIME);
return MOD_CONT;
}
else if (expires > 0)
@@ -197,7 +197,7 @@ class CommandOSSNLine : public Command
if (percent > 95)
{
- source.Reply(USERHOST_MASK_TOO_WIDE, mask.c_str());
+ source.Reply(LanguageString::USERHOST_MASK_TOO_WIDE, mask.c_str());
Log(LOG_ADMIN, u, this) << "tried to SNLine " << percent << "% of the network (" << affected << " users)";
return MOD_CONT;
}
@@ -207,7 +207,7 @@ class CommandOSSNLine : public Command
if (!x)
return MOD_CONT;
- source.Reply(OPER_SNLINE_ADDED, mask.c_str());
+ source.Reply(_("\002%s\002 added to the SNLINE list."), mask.c_str());
if (Config->WallOSSNLine)
{
@@ -243,7 +243,7 @@ class CommandOSSNLine : public Command
}
if (readonly)
- source.Reply(READ_ONLY_MODE);
+ source.Reply(LanguageString::READ_ONLY_MODE);
}
else
@@ -258,7 +258,7 @@ class CommandOSSNLine : public Command
if (SNLine->GetList().empty())
{
- source.Reply(OPER_SNLINE_LIST_EMPTY);
+ source.Reply(_("SNLINE list is empty."));
return MOD_CONT;
}
@@ -281,18 +281,18 @@ class CommandOSSNLine : public Command
if (!x)
{
- source.Reply(OPER_SNLINE_NOT_FOUND, mask.c_str());
+ source.Reply(_("\002%s\002 not found on the SNLINE list."), mask.c_str());
return MOD_CONT;
}
FOREACH_MOD(I_OnDelXLine, OnDelXLine(u, x, X_SNLINE));
SNLineDelCallback::DoDel(source, x);
- source.Reply(OPER_SNLINE_DELETED, mask.c_str());
+ source.Reply(_("\002%s\002 deleted from the SNLINE list."), mask.c_str());
}
if (readonly)
- source.Reply(READ_ONLY_MODE);
+ source.Reply(LanguageString::READ_ONLY_MODE);
return MOD_CONT;
}
@@ -301,7 +301,7 @@ class CommandOSSNLine : public Command
{
if (SNLine->GetList().empty())
{
- source.Reply(OPER_SNLINE_LIST_EMPTY);
+ source.Reply(_("SNLINE list is empty."));
return MOD_CONT;
}
@@ -325,7 +325,7 @@ class CommandOSSNLine : public Command
if (!SentHeader)
{
SentHeader = true;
- source.Reply(OPER_SNLINE_LIST_HEADER);
+ source.Reply(_("Current SNLINE list:\n Num Mask Reason"));
}
SNLineListCallback::DoList(source, x, i);
@@ -333,9 +333,9 @@ class CommandOSSNLine : public Command
}
if (!SentHeader)
- source.Reply(OPER_SNLINE_NO_MATCH);
+ source.Reply(_("No matching entries on the SNLINE list."));
else
- source.Reply(END_OF_ANY_LIST, "SNLine");
+ source.Reply(LanguageString::END_OF_ANY_LIST, "SNLine");
}
return MOD_CONT;
@@ -345,7 +345,7 @@ class CommandOSSNLine : public Command
{
if (SNLine->GetList().empty())
{
- source.Reply(OPER_SNLINE_LIST_EMPTY);
+ source.Reply(_("SNLINE list is empty."));
return MOD_CONT;
}
@@ -369,7 +369,7 @@ class CommandOSSNLine : public Command
if (!SentHeader)
{
SentHeader = true;
- source.Reply(OPER_SNLINE_VIEW_HEADER);
+ source.Reply(_("Current SNLINE list:"));
}
SNLineViewCallback::DoList(source, x, i);
@@ -377,7 +377,7 @@ class CommandOSSNLine : public Command
}
if (!SentHeader)
- source.Reply(OPER_SNLINE_NO_MATCH);
+ source.Reply(_("No matching entries on the SNLINE list."));
}
return MOD_CONT;
@@ -388,7 +388,7 @@ class CommandOSSNLine : public Command
User *u = source.u;
FOREACH_MOD(I_OnDelXLine, OnDelXLine(u, NULL, X_SNLINE));
SNLine->Clear();
- source.Reply(OPER_SNLINE_CLEAR);
+ source.Reply(_("The SNLINE list has been cleared."));
return MOD_CONT;
}
@@ -419,18 +419,60 @@ class CommandOSSNLine : public Command
bool OnHelp(CommandSource &source, const Anope::string &subcommand)
{
- source.Reply(OPER_HELP_SNLINE);
+ source.Reply(_("Syntax: \002SNLINE ADD [+\037expiry\037] \037mask\037:\037reason\037\002\n"
+ " \002SNLINE DEL {\037mask\037 | \037entry-num\037 | \037list\037}\002\n"
+ " \002SNLINE LIST [\037mask\037 | \037list\037]\002\n"
+ " \002SNLINE VIEW [\037mask\037 | \037list\037]\002\n"
+ " \002SNLINE CLEAR\002\n"
+ " \n"
+ "Allows Services operators to manipulate the SNLINE list. If\n"
+ "a user with a realname matching an SNLINE mask attempts to \n"
+ "connect, Services will not allow it to pursue his IRC\n"
+ "session.\n"
+ " \n"
+ "\002SNLINE ADD\002 adds the given realname mask to the SNLINE\n"
+ "list for the given reason (which \002must\002 be given).\n"
+ "\037expiry\037 is specified as an integer followed by one of \037d\037 \n"
+ "(days), \037h\037 (hours), or \037m\037 (minutes). Combinations (such as \n"
+ "\0371h30m\037) are not permitted. If a unit specifier is not \n"
+ "included, the default is days (so \037+30\037 by itself means 30 \n"
+ "days). To add an SNLINE which does not expire, use \037+0\037. If the\n"
+ "realname mask to be added starts with a \037+\037, an expiry time must\n"
+ "be given, even if it is the same as the default. The\n"
+ "current SNLINE default expiry time can be found with the\n"
+ "\002STATS AKILL\002 command.\n"
+ "Note: because the realname mask may contain spaces, the\n"
+ "separator between it and the reason is a colon.\n"
+ " \n"
+ "The \002SNLINE DEL\002 command removes the given mask from the\n"
+ "SNLINE list if it is present. If a list of entry numbers is \n"
+ "given, those entries are deleted. (See the example for LIST \n"
+ "below.)\n"
+ " \n"
+ "The \002SNLINE LIST\002 command displays the SNLINE list. \n"
+ "If a wildcard mask is given, only those entries matching the\n"
+ "mask are displayed. If a list of entry numbers is given,\n"
+ "only those entries are shown; for example:\n"
+ " \002SNLINE LIST 2-5,7-9\002\n"
+ " Lists SNLINE entries numbered 2 through 5 and 7 \n"
+ " through 9.\n"
+ " \n"
+ "\002SNLINE VIEW\002 is a more verbose version of \002SNLINE LIST\002, and \n"
+ "will show who added an SNLINE, the date it was added, and when \n"
+ "it expires, as well as the realname mask and reason.\n"
+ " \n"
+ "\002SNLINE CLEAR\002 clears all entries of the SNLINE list."));
return true;
}
void OnSyntaxError(CommandSource &source, const Anope::string &subcommand)
{
- SyntaxError(source, "SNLINE", OPER_SNLINE_SYNTAX);
+ SyntaxError(source, "SNLINE", _("SNLINE {ADD | DEL | LIST | VIEW | CLEAR} [[+\037expiry\037] {\037mask\037 | \037entry-list\037}[:\037reason\037]]"));
}
void OnServHelp(CommandSource &source)
{
- source.Reply(OPER_HELP_CMD_SNLINE);
+ source.Reply(_(" SNLINE Manipulate the SNLINE list"));
}
};
diff --git a/modules/core/os_sqline.cpp b/modules/core/os_sqline.cpp
index dbf6dcbe4..4117ebf57 100644
--- a/modules/core/os_sqline.cpp
+++ b/modules/core/os_sqline.cpp
@@ -25,11 +25,11 @@ class SQLineDelCallback : public NumberList
~SQLineDelCallback()
{
if (!Deleted)
- source.Reply(OPER_SQLINE_NO_MATCH);
+ source.Reply(_("No matching entries on the SQLINE list."));
else if (Deleted == 1)
- source.Reply(OPER_SQLINE_DELETED_ONE);
+ source.Reply(_("Deleted 1 entry from the SQLINE list."));
else
- source.Reply(OPER_SQLINE_DELETED_SEVERAL, Deleted);
+ source.Reply(_("Deleted %d entries from the SQLINE list."), Deleted);
}
void HandleNumber(unsigned Number)
@@ -65,7 +65,7 @@ class SQLineListCallback : public NumberList
~SQLineListCallback()
{
if (!SentHeader)
- source.Reply(OPER_SQLINE_NO_MATCH);
+ source.Reply(_("No matching entries on the SQLINE list."));
}
virtual void HandleNumber(unsigned Number)
@@ -81,7 +81,7 @@ class SQLineListCallback : public NumberList
if (!SentHeader)
{
SentHeader = true;
- source.Reply(OPER_SQLINE_LIST_HEADER);
+ source.Reply(_("Current SQLINE list:\n Num Mask Reason"));
}
DoList(source, x, Number - 1);
@@ -89,7 +89,7 @@ class SQLineListCallback : public NumberList
static void DoList(CommandSource &source, XLine *x, unsigned Number)
{
- source.Reply(OPER_LIST_FORMAT, Number + 1, x->Mask.c_str(), x->Reason.c_str());
+ source.Reply(LanguageString::OPER_LIST_FORMAT, Number + 1, x->Mask.c_str(), x->Reason.c_str());
}
};
@@ -113,7 +113,7 @@ class SQLineViewCallback : public SQLineListCallback
if (!SentHeader)
{
SentHeader = true;
- source.Reply(OPER_SQLINE_VIEW_HEADER);
+ source.Reply(_("Current SQLINE list:"));
}
DoList(source, x, Number);
@@ -122,7 +122,7 @@ class SQLineViewCallback : public SQLineListCallback
static void DoList(CommandSource &source, XLine *x, unsigned Number)
{
Anope::string expirebuf = expire_left(source.u->Account(), x->Expires);
- source.Reply(OPER_VIEW_FORMAT, Number + 1, x->Mask.c_str(), x->By.c_str(), do_strftime(x->Created).c_str(), expirebuf.c_str(), x->Reason.c_str());
+ source.Reply(LanguageString::OPER_VIEW_FORMAT, Number + 1, x->Mask.c_str(), x->By.c_str(), do_strftime(x->Created).c_str(), expirebuf.c_str(), x->Reason.c_str());
}
};
@@ -153,7 +153,7 @@ class CommandOSSQLine : public Command
/* Do not allow less than a minute expiry time */
if (expires && expires < 60)
{
- source.Reply(BAD_EXPIRY_TIME);
+ source.Reply(LanguageString::BAD_EXPIRY_TIME);
return MOD_CONT;
}
else if (expires > 0)
@@ -178,7 +178,7 @@ class CommandOSSQLine : public Command
if (percent > 95)
{
- source.Reply(USERHOST_MASK_TOO_WIDE, mask.c_str());
+ source.Reply(LanguageString::USERHOST_MASK_TOO_WIDE, mask.c_str());
Log(LOG_ADMIN, u, this) << "tried to SQLine " << percent << "% of the network (" << affected << " users)";
return MOD_CONT;
}
@@ -187,7 +187,7 @@ class CommandOSSQLine : public Command
if (!x)
return MOD_CONT;
- source.Reply(OPER_SQLINE_ADDED, mask.c_str());
+ source.Reply(_("\002%s\002 added to the SQLINE list."), mask.c_str());
if (Config->WallOSSQLine)
{
@@ -223,7 +223,7 @@ class CommandOSSQLine : public Command
}
if (readonly)
- source.Reply(READ_ONLY_MODE);
+ source.Reply(LanguageString::READ_ONLY_MODE);
}
else
@@ -238,7 +238,7 @@ class CommandOSSQLine : public Command
if (SQLine->GetList().empty())
{
- source.Reply(OPER_SQLINE_LIST_EMPTY);
+ source.Reply(_("SQLINE list is empty."));
return MOD_CONT;
}
@@ -261,18 +261,18 @@ class CommandOSSQLine : public Command
if (!x)
{
- source.Reply(OPER_SQLINE_NOT_FOUND, mask.c_str());
+ source.Reply(_("\002%s\002 not found on the SQLINE list."), mask.c_str());
return MOD_CONT;
}
FOREACH_MOD(I_OnDelXLine, OnDelXLine(u, x, X_SQLINE));
SQLineDelCallback::DoDel(source, x);
- source.Reply(OPER_SQLINE_DELETED, mask.c_str());
+ source.Reply(_("\002%s\002 deleted from the SQLINE list."), mask.c_str());
}
if (readonly)
- source.Reply(READ_ONLY_MODE);
+ source.Reply(LanguageString::READ_ONLY_MODE);
return MOD_CONT;
}
@@ -281,7 +281,7 @@ class CommandOSSQLine : public Command
{
if (SQLine->GetList().empty())
{
- source.Reply(OPER_SQLINE_LIST_EMPTY);
+ source.Reply(_("SQLINE list is empty."));
return MOD_CONT;
}
@@ -305,7 +305,7 @@ class CommandOSSQLine : public Command
if (!SentHeader)
{
SentHeader = true;
- source.Reply(OPER_SQLINE_LIST_HEADER);
+ source.Reply(_("Current SQLINE list:\n Num Mask Reason"));
}
SQLineListCallback::DoList(source, x, i);
@@ -313,9 +313,9 @@ class CommandOSSQLine : public Command
}
if (!SentHeader)
- source.Reply(OPER_SQLINE_NO_MATCH);
+ source.Reply(_("No matching entries on the SQLINE list."));
else
- source.Reply(END_OF_ANY_LIST, "SQLine");
+ source.Reply(LanguageString::END_OF_ANY_LIST, "SQLine");
}
return MOD_CONT;
@@ -325,7 +325,7 @@ class CommandOSSQLine : public Command
{
if (SQLine->GetList().empty())
{
- source.Reply(OPER_SQLINE_LIST_EMPTY);
+ source.Reply(_("SQLINE list is empty."));
return MOD_CONT;
}
@@ -349,7 +349,7 @@ class CommandOSSQLine : public Command
if (!SentHeader)
{
SentHeader = true;
- source.Reply(OPER_SQLINE_VIEW_HEADER);
+ source.Reply(_("Current SQLINE list:"));
}
SQLineViewCallback::DoList(source, x, i);
@@ -357,7 +357,7 @@ class CommandOSSQLine : public Command
}
if (!SentHeader)
- source.Reply(OPER_SQLINE_NO_MATCH);
+ source.Reply(_("No matching entries on the SQLINE list."));
}
return MOD_CONT;
@@ -368,7 +368,7 @@ class CommandOSSQLine : public Command
User *u = source.u;
FOREACH_MOD(I_OnDelXLine, OnDelXLine(u, NULL, X_SQLINE));
SQLine->Clear();
- source.Reply(OPER_SQLINE_CLEAR);
+ source.Reply(_("The SQLINE list has been cleared."));
return MOD_CONT;
}
@@ -398,18 +398,61 @@ class CommandOSSQLine : public Command
bool OnHelp(CommandSource &source, const Anope::string &subcommand)
{
- source.Reply(OPER_HELP_SQLINE);
+ source.Reply(_("Syntax: \002SQLINE ADD [+\037expiry\037] \037mask\037 \037reason\037\002\n"
+ " \002SQLINE DEL {\037mask\037 | \037entry-num\037 | \037list\037}\002\n"
+ " \002SQLINE LIST [\037mask\037 | \037list\037]\002\n"
+ " \002SQLINE VIEW [\037mask\037 | \037list\037]\002\n"
+ " \002SQLINE CLEAR\002\n"
+ " \n"
+ "Allows Services operators to manipulate the SQLINE list. If\n"
+ "a user with a nick matching an SQLINE mask attempts to \n"
+ "connect, Services will not allow it to pursue his IRC\n"
+ "session.\n"
+ "If the first character of the mask is #, services will \n"
+ "prevent the use of matching channels (on IRCds that \n"
+ "support it).\n"
+ " \n"
+ "\002SQLINE ADD\002 adds the given (nick's) mask to the SQLINE\n"
+ "list for the given reason (which \002must\002 be given).\n"
+ "\037expiry\037 is specified as an integer followed by one of \037d\037 \n"
+ "(days), \037h\037 (hours), or \037m\037 (minutes). Combinations (such as \n"
+ "\0371h30m\037) are not permitted. If a unit specifier is not \n"
+ "included, the default is days (so \037+30\037 by itself means 30 \n"
+ "days). To add an SQLINE which does not expire, use \037+0\037. \n"
+ "If the mask to be added starts with a \037+\037, an expiry time \n"
+ "must be given, even if it is the same as the default. The\n"
+ "current SQLINE default expiry time can be found with the\n"
+ "\002STATS AKILL\002 command.\n"
+ " \n"
+ "The \002SQLINE DEL\002 command removes the given mask from the\n"
+ "SQLINE list if it is present. If a list of entry numbers is \n"
+ "given, those entries are deleted. (See the example for LIST \n"
+ "below.)\n"
+ " \n"
+ "The \002SQLINE LIST\002 command displays the SQLINE list. \n"
+ "If a wildcard mask is given, only those entries matching the\n"
+ "mask are displayed. If a list of entry numbers is given,\n"
+ "only those entries are shown; for example:\n"
+ " \002SQLINE LIST 2-5,7-9\002\n"
+ " Lists SQLINE entries numbered 2 through 5 and 7 \n"
+ " through 9.\n"
+ " \n"
+ "\002SQLINE VIEW\002 is a more verbose version of \002SQLINE LIST\002, and \n"
+ "will show who added an SQLINE, the date it was added, and when \n"
+ "it expires, as well as the mask and reason.\n"
+ " \n"
+ "\002SQLINE CLEAR\002 clears all entries of the SQLINE list."));
return true;
}
void OnSyntaxError(CommandSource &source, const Anope::string &subcommand)
{
- SyntaxError(source, "SQLINE", OPER_SQLINE_SYNTAX);
+ SyntaxError(source, "SQLINE", _("SQLINE {ADD | DEL | LIST | VIEW | CLEAR} [[+\037expiry\037] {\037nick\037 | \037mask\037 | \037entry-list\037} [\037reason\037]]"));
}
void OnServHelp(CommandSource &source)
{
- source.Reply(OPER_HELP_CMD_SQLINE);
+ source.Reply(_(" SQLINE Manipulate the SQLINE list"));
}
};
diff --git a/modules/core/os_staff.cpp b/modules/core/os_staff.cpp
index 5b1af9ae1..1f6b60eb3 100644
--- a/modules/core/os_staff.cpp
+++ b/modules/core/os_staff.cpp
@@ -22,7 +22,7 @@ class CommandOSStaff : public Command
CommandReturn Execute(CommandSource &source, const std::vector<Anope::string> &params)
{
- source.Reply(OPER_STAFF_LIST_HEADER);
+ source.Reply(_("On Level Nick"));
for (std::list<std::pair<Anope::string, Anope::string> >::iterator it = Config->Opers.begin(), it_end = Config->Opers.end(); it != it_end; ++it)
{
@@ -37,28 +37,30 @@ class CommandOSStaff : public Command
User *u2 = *uit;
if (na->nick.equals_ci(u2->nick))
- source.Reply(OPER_STAFF_FORMAT, '*', type.c_str(), u2->nick.c_str());
+ source.Reply(_(" %c %s %s"), '*', type.c_str(), u2->nick.c_str());
else
- source.Reply(OPER_STAFF_AFORMAT, '*', type.c_str(), na->nick.c_str(), u2->nick.c_str());
+ source.Reply(_(" %c %s %s [%s]"), '*', type.c_str(), na->nick.c_str(), u2->nick.c_str());
}
if (nc->Users.empty())
- source.Reply(OPER_STAFF_FORMAT, ' ', type.c_str(), na->nick.c_str());
+ source.Reply(_(" %c %s %s"), ' ', type.c_str(), na->nick.c_str());
}
}
- source.Reply(END_OF_ANY_LIST, "Staff");
+ source.Reply(LanguageString::END_OF_ANY_LIST, "Staff");
return MOD_CONT;
}
bool OnHelp(CommandSource &source, const Anope::string &subcommand)
{
- source.Reply(OPER_HELP_STAFF);
+ source.Reply(_("Syntax: \002STAFF\002\n"
+ "Displays all Services Staff nicks along with level\n"
+ "and on-line status."));
return true;
}
void OnServHelp(CommandSource &source)
{
- source.Reply(OPER_HELP_CMD_STAFF);
+ source.Reply(_(" STAFF Display Services staff and online status"));
}
};
diff --git a/modules/core/os_stats.cpp b/modules/core/os_stats.cpp
index cf972b7a6..96d0bcb75 100644
--- a/modules/core/os_stats.cpp
+++ b/modules/core/os_stats.cpp
@@ -41,81 +41,81 @@ class CommandOSStats : public Command
{
int timeout;
/* AKILLs */
- source.Reply(OPER_STATS_AKILL_COUNT, SGLine->GetCount());
+ source.Reply(_("Current number of AKILLs: \002%d\002"), SGLine->GetCount());
timeout = Config->AutokillExpiry + 59;
if (timeout >= 172800)
- source.Reply(OPER_STATS_AKILL_EXPIRE_DAYS, timeout / 86400);
+ source.Reply(_("Default AKILL expiry time: \002%d days\002"), timeout / 86400);
else if (timeout >= 86400)
- source.Reply(OPER_STATS_AKILL_EXPIRE_DAY);
+ source.Reply(_("Default AKILL expiry time: \0021 day\002"));
else if (timeout >= 7200)
- source.Reply(OPER_STATS_AKILL_EXPIRE_HOURS, timeout / 3600);
+ source.Reply(_("Default AKILL expiry time: \002%d hours\002"), timeout / 3600);
else if (timeout >= 3600)
- source.Reply(OPER_STATS_AKILL_EXPIRE_HOUR);
+ source.Reply(_("Default AKILL expiry time: \0021 hour\002"));
else if (timeout >= 120)
- source.Reply(OPER_STATS_AKILL_EXPIRE_MINS, timeout / 60);
+ source.Reply(_("Default AKILL expiry time: \002%d minutes\002"), timeout / 60);
else if (timeout >= 60)
- source.Reply(OPER_STATS_AKILL_EXPIRE_MIN);
+ source.Reply(_("Default AKILL expiry time: \0021 minute\002"));
else
- source.Reply(OPER_STATS_AKILL_EXPIRE_NONE);
+ source.Reply(_("Default AKILL expiry time: \002No expiration\002"));
if (ircd->snline)
{
/* SNLINEs */
- source.Reply(OPER_STATS_SNLINE_COUNT, SNLine->GetCount());
+ source.Reply(_("Current number of SNLINEs: \002%d\002"), SNLine->GetCount());
timeout = Config->SNLineExpiry + 59;
if (timeout >= 172800)
- source.Reply(OPER_STATS_SNLINE_EXPIRE_DAYS, timeout / 86400);
+ source.Reply(_("Default SNLINE expiry time: \002%d days\002"), timeout / 86400);
else if (timeout >= 86400)
- source.Reply(OPER_STATS_SNLINE_EXPIRE_DAY);
+ source.Reply(_("Default SNLINE expiry time: \0021 day\002"));
else if (timeout >= 7200)
- source.Reply(OPER_STATS_SNLINE_EXPIRE_HOURS, timeout / 3600);
+ source.Reply(_("Default SNLINE expiry time: \002%d hours\002"), timeout / 3600);
else if (timeout >= 3600)
- source.Reply(OPER_STATS_SNLINE_EXPIRE_HOUR);
+ source.Reply(_("Default SNLINE expiry time: \0021 hour\002"));
else if (timeout >= 120)
- source.Reply(OPER_STATS_SNLINE_EXPIRE_MINS, timeout / 60);
+ source.Reply(_("Default SNLINE expiry time: \002%d minutes\002"), timeout / 60);
else if (timeout >= 60)
- source.Reply(OPER_STATS_SNLINE_EXPIRE_MIN);
+ source.Reply(_("Default SNLINE expiry time: \0021 minute\002"));
else
- source.Reply(OPER_STATS_SNLINE_EXPIRE_NONE);
+ source.Reply(_("Default SNLINE expiry time: \002No expiration\002"));
}
if (ircd->sqline)
{
/* SQLINEs */
- source.Reply(OPER_STATS_SQLINE_COUNT, SQLine->GetCount());
+ source.Reply(_("Current number of SQLINEs: \002%d\002"), SQLine->GetCount());
timeout = Config->SQLineExpiry + 59;
if (timeout >= 172800)
- source.Reply(OPER_STATS_SQLINE_EXPIRE_DAYS, timeout / 86400);
+ source.Reply(_("Default SQLINE expiry time: \002%d days\002"), timeout / 86400);
else if (timeout >= 86400)
- source.Reply(OPER_STATS_SQLINE_EXPIRE_DAY);
+ source.Reply(_("Default SQLINE expiry time: \0021 day\002"));
else if (timeout >= 7200)
- source.Reply(OPER_STATS_SQLINE_EXPIRE_HOURS, timeout / 3600);
+ source.Reply(_("Default SQLINE expiry time: \002%d hours\002"), timeout / 3600);
else if (timeout >= 3600)
- source.Reply(OPER_STATS_SQLINE_EXPIRE_HOUR);
+ source.Reply(_("Default SQLINE expiry time: \0021 hour\002"));
else if (timeout >= 120)
- source.Reply(OPER_STATS_SQLINE_EXPIRE_MINS, timeout / 60);
+ source.Reply(_("Default SQLINE expiry time: \002%d minutes\002"), timeout / 60);
else if (timeout >= 60)
- source.Reply(OPER_STATS_SQLINE_EXPIRE_MIN);
+ source.Reply(_("Default SQLINE expiry time: \0021 minute\002"));
else
- source.Reply(OPER_STATS_SQLINE_EXPIRE_NONE);
+ source.Reply(_("Default SQLINE expiry time: \002No expiration\002"));
}
if (ircd->szline)
{
/* SZLINEs */
- source.Reply(OPER_STATS_SZLINE_COUNT, SZLine->GetCount());
+ source.Reply(_("Current number of SZLINEs: \002%d\002"), SZLine->GetCount());
timeout = Config->SZLineExpiry + 59;
if (timeout >= 172800)
- source.Reply(OPER_STATS_SZLINE_EXPIRE_DAYS, timeout / 86400);
+ source.Reply(_("Default SZLINE expiry time: \002%d days\002"), timeout / 86400);
else if (timeout >= 86400)
- source.Reply(OPER_STATS_SZLINE_EXPIRE_DAY);
+ source.Reply(_("Default SZLINE expiry time: \0021 day\002"));
else if (timeout >= 7200)
- source.Reply(OPER_STATS_SZLINE_EXPIRE_HOURS, timeout / 3600);
+ source.Reply(_("Default SZLINE expiry time: \002%d hours\002"), timeout / 3600);
else if (timeout >= 3600)
- source.Reply(OPER_STATS_SZLINE_EXPIRE_HOUR);
+ source.Reply(_("Default SZLINE expiry time: \0021 hour\002"));
else if (timeout >= 120)
- source.Reply(OPER_STATS_SZLINE_EXPIRE_MINS, timeout / 60);
+ source.Reply(_("Default SZLINE expiry time: \002%d minutes\002"), timeout / 60);
else if (timeout >= 60)
- source.Reply(OPER_STATS_SZLINE_EXPIRE_MIN);
+ source.Reply(_("Default SZLINE expiry time: \0021 minute\002"));
else
- source.Reply(OPER_STATS_SZLINE_EXPIRE_NONE);
+ source.Reply(_("Default SZLINE expiry time: \002No expiration\002"));
}
return MOD_CONT;
}
@@ -123,7 +123,7 @@ class CommandOSStats : public Command
CommandReturn DoStatsReset(CommandSource &source)
{
maxusercnt = usercnt;
- source.Reply(OPER_STATS_RESET);
+ source.Reply(_("Statistics reset."));
return MOD_CONT;
}
@@ -131,43 +131,43 @@ class CommandOSStats : public Command
{
time_t uptime = Anope::CurTime - start_time;
int days = uptime / 86400, hours = (uptime / 3600) % 24, mins = (uptime / 60) % 60, secs = uptime % 60;
- source.Reply(OPER_STATS_CURRENT_USERS, usercnt, opcnt);
- source.Reply(OPER_STATS_MAX_USERS, maxusercnt, do_strftime(maxusertime).c_str());
+ source.Reply(_("Current users: \002%d\002 (\002%d\002 ops)"), usercnt, opcnt);
+ source.Reply(_("Maximum users: \002%d\002 (%s)"), maxusercnt, do_strftime(maxusertime).c_str());
if (days > 1)
- source.Reply(OPER_STATS_UPTIME_DHMS, days, hours, mins, secs);
+ source.Reply(_("Services up \002%d\002 days, \002%02d:%02d\002"), days, hours, mins, secs);
else if (days == 1)
- source.Reply(OPER_STATS_UPTIME_1DHMS, days, hours, mins, secs);
+ source.Reply(_("Services up OPER_STATS_UPTIME_1\002%dOPER_STATS_UPTIME_1\002 day, OPER_STATS_UPTIME_1\002%02d:%02dOPER_STATS_UPTIME_1\002"), days, hours, mins, secs);
else
{
if (hours > 1)
{
if (mins != 1)
- source.Reply(OPER_STATS_UPTIME_HMS, hours, mins);
+ source.Reply(_("Services up \002%d\002 hours, \002%d\002 minutes"), hours, mins);
else
- source.Reply(OPER_STATS_UPTIME_H1MS, hours, mins, secs);
+ source.Reply(_("Services up OPER_STATS_UPTIME_H1\002%dOPER_STATS_UPTIME_H1\002 hours, OPER_STATS_UPTIME_H1\002%dOPER_STATS_UPTIME_H1\002 minute"), hours, mins, secs);
}
else if (hours == 1)
{
if (mins != 1)
- source.Reply(OPER_STATS_UPTIME_1HMS, hours, mins, secs);
+ source.Reply(_("Services up OPER_STATS_UPTIME_1\002%dOPER_STATS_UPTIME_1\002 hour, OPER_STATS_UPTIME_1\002%dOPER_STATS_UPTIME_1\002 minutes"), hours, mins, secs);
else
- source.Reply(OPER_STATS_UPTIME_1H1MS, hours, mins, secs);
+ source.Reply(_("Services up OPER_STATS_UPTIME_1H1\002%dOPER_STATS_UPTIME_1H1\002 hour, OPER_STATS_UPTIME_1H1\002%dOPER_STATS_UPTIME_1H1\002 minute"), hours, mins, secs);
}
else
{
if (mins != 1)
{
if (secs != 1)
- source.Reply(OPER_STATS_UPTIME_MS, mins, secs);
+ source.Reply(_("Services up \002%d\002 minutes, \002%d\002 seconds"), mins, secs);
else
- source.Reply(OPER_STATS_UPTIME_M1S, mins, secs);
+ source.Reply(_("Services up OPER_STATS_UPTIME_M1\002%dOPER_STATS_UPTIME_M1\002 minutes, OPER_STATS_UPTIME_M1\002%dOPER_STATS_UPTIME_M1\002 second"), mins, secs);
}
else
{
if (secs != 1)
- source.Reply(OPER_STATS_UPTIME_1MS, mins, secs);
+ source.Reply(_("Services up OPER_STATS_UPTIME_1\002%dOPER_STATS_UPTIME_1\002 minute, OPER_STATS_UPTIME_1\002%dOPER_STATS_UPTIME_1\002 seconds"), mins, secs);
else
- source.Reply(OPER_STATS_UPTIME_1M1S, mins, secs);
+ source.Reply(_("Services up OPER_STATS_UPTIME_1M1\002%dOPER_STATS_UPTIME_1M1\002 minute, OPER_STATS_UPTIME_1M1\002%dOPER_STATS_UPTIME_1M1\002 second"), mins, secs);
}
}
}
@@ -186,9 +186,9 @@ class CommandOSStats : public Command
if (!buf.empty())
buf.erase(buf.begin());
- source.Reply(OPER_STATS_UPLINK_SERVER, Me->GetLinks().front()->GetName().c_str());
- source.Reply(OPER_STATS_UPLINK_CAPAB, buf.c_str());
- source.Reply(OPER_STATS_UPLINK_SERVER_COUNT, stats_count_servers(Me->GetLinks().front()));
+ source.Reply(_("Uplink server: %s"), Me->GetLinks().front()->GetName().c_str());
+ source.Reply(_("Uplink capab: %s"), buf.c_str());
+ source.Reply(_("Servers found: %d"), stats_count_servers(Me->GetLinks().front()));
return MOD_CONT;
}
@@ -196,33 +196,33 @@ class CommandOSStats : public Command
{
long count, mem;
- source.Reply(OPER_STATS_BYTES_READ, TotalRead / 1024);
- source.Reply(OPER_STATS_BYTES_WRITTEN, TotalWritten / 1024);
+ source.Reply(_("Bytes read : %5d kB"), TotalRead / 1024);
+ source.Reply(_("Bytes written : %5d kB"), TotalWritten / 1024);
get_user_stats(count, mem);
- source.Reply(OPER_STATS_USER_MEM, count, (mem + 512) / 1024);
+ source.Reply(_("User : \002%6d\002 records, \002%5d\002 kB"), count, (mem + 512) / 1024);
get_channel_stats(&count, &mem);
- source.Reply(OPER_STATS_CHANNEL_MEM, count, (mem + 512) / 1024);
+ source.Reply(_("Channel : \002%6d\002 records, \002%5d\002 kB"), count, (mem + 512) / 1024);
get_core_stats(count, mem);
- source.Reply(OPER_STATS_GROUPS_MEM, count, (mem + 512) / 1024);
+ source.Reply(_("NS Groups : \002%6d\002 records, \002%5d\002 kB"), count, (mem + 512) / 1024);
get_aliases_stats(count, mem);
- source.Reply(OPER_STATS_ALIASES_MEM, count, (mem + 512) / 1024);
+ source.Reply(_("NS Aliases : \002%6d\002 records, \002%5d\002 kB"), count, (mem + 512) / 1024);
get_chanserv_stats(&count, &mem);
- source.Reply(OPER_STATS_CHANSERV_MEM, count, (mem + 512) / 1024);
+ source.Reply(_("ChanServ : \002%6d\002 records, \002%5d\002 kB"), count, (mem + 512) / 1024);
if (!Config->s_BotServ.empty())
{
get_botserv_stats(&count, &mem);
- source.Reply(OPER_STATS_BOTSERV_MEM, count, (mem + 512) / 1024);
+ source.Reply(_("BotServ : \002%6d\002 records, \002%5d\002 kB"), count, (mem + 512) / 1024);
}
if (!Config->s_HostServ.empty())
{
get_hostserv_stats(&count, &mem);
- source.Reply(OPER_STATS_HOSTSERV_MEM, count, (mem + 512) / 1024);
+ source.Reply(_("HostServ : \002%6d\002 records, \002%5d\002 kB"), count, (mem + 512) / 1024);
}
get_operserv_stats(&count, &mem);
- source.Reply(OPER_STATS_OPERSERV_MEM, count, (mem + 512) / 1024);
+ source.Reply(_("OperServ : \002%6d\002 records, \002%5d\002 kB"), count, (mem + 512) / 1024);
get_session_stats(count, mem);
- source.Reply(OPER_STATS_SESSIONS_MEM, count, (mem + 512) / 1024);
+ source.Reply(_("Sessions : \002%6d\002 records, \002%5d\002 kB"), count, (mem + 512) / 1024);
return MOD_CONT;
}
@@ -242,7 +242,7 @@ class CommandOSStats : public Command
else if (extra.equals_ci("RESET"))
return this->DoStatsReset(source);
else if (!extra.equals_ci("MEMORY") && !extra.equals_ci("UPLINK"))
- source.Reply(OPER_STATS_UNKNOWN_OPTION, extra.c_str());
+ source.Reply(_("Unknown STATS option \002%s\002."), extra.c_str());
}
if (extra.empty() || (!extra.equals_ci("MEMORY") && !extra.equals_ci("UPLINK")))
@@ -259,13 +259,34 @@ class CommandOSStats : public Command
bool OnHelp(CommandSource &source, const Anope::string &subcommand)
{
- source.Reply(OPER_HELP_STATS);
+ source.Reply(_("Syntax: \002STATS [AKILL | ALL | RESET | MEMORY | UPLINK]\002\n"
+ " \n"
+ "Without any option, shows the current number of users and\n"
+ "IRCops online (excluding Services), the highest number of\n"
+ "users online since Services was started, and the length of\n"
+ "time Services has been running.\n"
+ " \n"
+ "With the \002AKILL\002 option, displays the current size of the\n"
+ "AKILL list and the current default expiry time.\n"
+ " \n"
+ "The \002RESET\002 option currently resets the maximum user count\n"
+ "to the number of users currently present on the network.\n"
+ " \n"
+ "The \002MEMORY\002 option displays information on the memory\n"
+ "usage of Services. Using this option can freeze Services for\n"
+ "a short period of time on large networks; don't overuse it!\n"
+ " \n"
+ "The \002UPLINK\002 option displays information about the current\n"
+ "server Anope uses as an uplink to the network.\n"
+ " \n"
+ "The \002ALL\002 displays the user and uptime statistics, and\n"
+ "everything you'd see with \002MEMORY\002 and \002UPLINK\002 options."));
return true;
}
void OnServHelp(CommandSource &source)
{
- source.Reply(OPER_HELP_CMD_STATS);
+ source.Reply(_(" STATS Show status of Services and network"));
}
};
diff --git a/modules/core/os_svsnick.cpp b/modules/core/os_svsnick.cpp
index 1e59aea2e..30a06310a 100644
--- a/modules/core/os_svsnick.cpp
+++ b/modules/core/os_svsnick.cpp
@@ -32,33 +32,33 @@ class CommandOSSVSNick : public Command
/* Truncate long nicknames to NICKMAX-2 characters */
if (newnick.length() > Config->NickLen)
{
- source.Reply(NICK_X_TRUNCATED, newnick.c_str(), Config->NickLen, newnick.c_str());
+ source.Reply(_("Nick \002%s\002 was truncated to %d characters."), newnick.c_str(), Config->NickLen, newnick.c_str());
newnick = params[1].substr(0, Config->NickLen);
}
/* Check for valid characters */
if (newnick[0] == '-' || isdigit(newnick[0]))
{
- source.Reply(NICK_X_ILLEGAL, newnick.c_str());
+ source.Reply(_("Nick \002%s\002 is an illegal nickname and cannot be used."), newnick.c_str());
return MOD_CONT;
}
for (unsigned i = 0, end = newnick.length(); i < end; ++i)
if (!isvalidnick(newnick[i]))
{
- source.Reply(NICK_X_ILLEGAL, newnick.c_str());
+ source.Reply(_("Nick \002%s\002 is an illegal nickname and cannot be used."), newnick.c_str());
return MOD_CONT;
}
/* Check for a nick in use or a forbidden/suspended nick */
if (!(u2 = finduser(nick)))
- source.Reply(NICK_X_NOT_IN_USE, nick.c_str());
+ source.Reply(LanguageString::NICK_X_NOT_IN_USE, nick.c_str());
else if (finduser(newnick))
- source.Reply(NICK_X_IN_USE, newnick.c_str());
+ source.Reply(_("Nick \002%s\002 is currently in use."), newnick.c_str());
else if ((na = findnick(newnick)) && na->HasFlag(NS_FORBIDDEN))
- source.Reply(NICK_X_FORBIDDEN, newnick.c_str());
+ source.Reply(LanguageString::NICK_X_FORBIDDEN, newnick.c_str());
else
{
- source.Reply(OPER_SVSNICK_NEWNICK, nick.c_str(), newnick.c_str());
+ source.Reply(_("The nick \002%s\002 is now being changed to \002%s\002."), nick.c_str(), newnick.c_str());
ircdproto->SendGlobops(OperServ, "%s used SVSNICK to change %s to %s", u->nick.c_str(), nick.c_str(), newnick.c_str());
ircdproto->SendForceNickChange(u2, newnick, Anope::CurTime);
}
@@ -67,18 +67,20 @@ class CommandOSSVSNick : public Command
bool OnHelp(CommandSource &source, const Anope::string &subcommand)
{
- source.Reply(OPER_HELP_SVSNICK);
+ source.Reply(_("Syntax: \002SVSNICK \037nick\037 \037newnick\037\002\n"
+ " \n"
+ "Forcefully changes a user's nickname from nick to newnick."));
return true;
}
void OnSyntaxError(CommandSource &source, const Anope::string &subcommand)
{
- SyntaxError(source, "SVSNICK", OPER_SVSNICK_SYNTAX);
+ SyntaxError(source, "SVSNICK", _("SVSNICK \037nick\037 \037newnick\037 "));
}
void OnServHelp(CommandSource &source)
{
- source.Reply(OPER_HELP_CMD_SVSNICK);
+ source.Reply(_(" SVSNICK Forcefully change a user's nickname"));
}
};
diff --git a/modules/core/os_szline.cpp b/modules/core/os_szline.cpp
index 4535335ed..5cc219291 100644
--- a/modules/core/os_szline.cpp
+++ b/modules/core/os_szline.cpp
@@ -25,11 +25,11 @@ class SZLineDelCallback : public NumberList
~SZLineDelCallback()
{
if (!Deleted)
- source.Reply(OPER_SZLINE_NO_MATCH);
+ source.Reply(_("No matching entries on the SZLINE list."));
else if (Deleted == 1)
- source.Reply(OPER_SZLINE_DELETED_ONE);
+ source.Reply(_("Deleted 1 entry from the SZLINE list."));
else
- source.Reply(OPER_SZLINE_DELETED_SEVERAL, Deleted);
+ source.Reply(_("Deleted %d entries from the SZLINE list."), Deleted);
}
void HandleNumber(unsigned Number)
@@ -65,7 +65,7 @@ class SZLineListCallback : public NumberList
~SZLineListCallback()
{
if (!SentHeader)
- source.Reply(OPER_SZLINE_NO_MATCH);
+ source.Reply(_("No matching entries on the SZLINE list."));
}
virtual void HandleNumber(unsigned Number)
@@ -81,7 +81,7 @@ class SZLineListCallback : public NumberList
if (!SentHeader)
{
SentHeader = true;
- source.Reply(OPER_SZLINE_LIST_HEADER);
+ source.Reply(_("Current SZLINE list:\n Num Mask Reason"));
}
DoList(source, x, Number - 1);
@@ -89,7 +89,7 @@ class SZLineListCallback : public NumberList
static void DoList(CommandSource &source, XLine *x, unsigned Number)
{
- source.Reply(OPER_LIST_FORMAT, Number + 1, x->Mask.c_str(), x->Reason.c_str());
+ source.Reply(LanguageString::OPER_LIST_FORMAT, Number + 1, x->Mask.c_str(), x->Reason.c_str());
}
};
@@ -113,7 +113,7 @@ class SZLineViewCallback : public SZLineListCallback
if (!SentHeader)
{
SentHeader = true;
- source.Reply(OPER_SZLINE_VIEW_HEADER);
+ source.Reply(_("Current SZLINE list:"));
}
DoList(source, x, Number - 1);
@@ -122,7 +122,7 @@ class SZLineViewCallback : public SZLineListCallback
static void DoList(CommandSource &source, XLine *x, unsigned Number)
{
Anope::string expirebuf = expire_left(source.u->Account(), x->Expires);
- source.Reply(OPER_VIEW_FORMAT, Number + 1, x->Mask.c_str(), x->By.c_str(), do_strftime(x->Created).c_str(), expirebuf.c_str(), x->Reason.c_str());
+ source.Reply(LanguageString::OPER_VIEW_FORMAT, Number + 1, x->Mask.c_str(), x->By.c_str(), do_strftime(x->Created).c_str(), expirebuf.c_str(), x->Reason.c_str());
}
};
@@ -153,7 +153,7 @@ class CommandOSSZLine : public Command
/* Do not allow less than a minute expiry time */
if (expires && expires < 60)
{
- source.Reply(BAD_EXPIRY_TIME);
+ source.Reply(LanguageString::BAD_EXPIRY_TIME);
return MOD_CONT;
}
else if (expires > 0)
@@ -181,7 +181,7 @@ class CommandOSSZLine : public Command
if (percent > 95)
{
- source.Reply(USERHOST_MASK_TOO_WIDE, mask.c_str());
+ source.Reply(LanguageString::USERHOST_MASK_TOO_WIDE, mask.c_str());
Log(LOG_ADMIN, u, this) << "tried to SZLine " << percent << "% of the network (" << affected << " users)";
return MOD_CONT;
}
@@ -191,7 +191,7 @@ class CommandOSSZLine : public Command
if (!x)
return MOD_CONT;
- source.Reply(OPER_SZLINE_ADDED, mask.c_str());
+ source.Reply(_("\002%s\002 added to the SZLINE list."), mask.c_str());
if (Config->WallOSSZLine)
{
@@ -227,7 +227,7 @@ class CommandOSSZLine : public Command
}
if (readonly)
- source.Reply(READ_ONLY_MODE);
+ source.Reply(LanguageString::READ_ONLY_MODE);
}
else
@@ -242,7 +242,7 @@ class CommandOSSZLine : public Command
if (SZLine->GetList().empty())
{
- source.Reply(OPER_SZLINE_LIST_EMPTY);
+ source.Reply(_("SZLINE list is empty."));
return MOD_CONT;
}
@@ -265,18 +265,18 @@ class CommandOSSZLine : public Command
if (!x)
{
- source.Reply(OPER_SZLINE_NOT_FOUND, mask.c_str());
+ source.Reply(_("\002%s\002 not found on the SZLINE list."), mask.c_str());
return MOD_CONT;
}
FOREACH_MOD(I_OnDelXLine, OnDelXLine(u, x, X_SZLINE));
SZLineDelCallback::DoDel(source, x);
- source.Reply(OPER_SZLINE_DELETED, mask.c_str());
+ source.Reply(_("\002%s\002 deleted from the SZLINE list."), mask.c_str());
}
if (readonly)
- source.Reply(READ_ONLY_MODE);
+ source.Reply(LanguageString::READ_ONLY_MODE);
return MOD_CONT;
}
@@ -285,7 +285,7 @@ class CommandOSSZLine : public Command
{
if (SZLine->GetList().empty())
{
- source.Reply(OPER_SZLINE_LIST_EMPTY);
+ source.Reply(_("SZLINE list is empty."));
return MOD_CONT;
}
@@ -309,7 +309,7 @@ class CommandOSSZLine : public Command
if (!SentHeader)
{
SentHeader = true;
- source.Reply(OPER_SZLINE_LIST_HEADER);
+ source.Reply(_("Current SZLINE list:\n Num Mask Reason"));
}
SZLineListCallback::DoList(source, x, i);
@@ -317,7 +317,7 @@ class CommandOSSZLine : public Command
}
if (!SentHeader)
- source.Reply(OPER_SZLINE_NO_MATCH);
+ source.Reply(_("No matching entries on the SZLINE list."));
}
return MOD_CONT;
@@ -327,7 +327,7 @@ class CommandOSSZLine : public Command
{
if (SZLine->GetList().empty())
{
- source.Reply(OPER_SZLINE_LIST_EMPTY);
+ source.Reply(_("SZLINE list is empty."));
return MOD_CONT;
}
@@ -351,7 +351,7 @@ class CommandOSSZLine : public Command
if (!SentHeader)
{
SentHeader = true;
- source.Reply(OPER_SZLINE_VIEW_HEADER);
+ source.Reply(_("Current SZLINE list:"));
}
SZLineViewCallback::DoList(source, x, i);
@@ -359,7 +359,7 @@ class CommandOSSZLine : public Command
}
if (!SentHeader)
- source.Reply(OPER_SZLINE_NO_MATCH);
+ source.Reply(_("No matching entries on the SZLINE list."));
}
return MOD_CONT;
@@ -370,7 +370,7 @@ class CommandOSSZLine : public Command
User *u = source.u;
FOREACH_MOD(I_OnDelXLine, OnDelXLine(u, NULL, X_SZLINE));
SZLine->Clear();
- source.Reply(OPER_SZLINE_CLEAR);
+ source.Reply(_("The SZLINE list has been cleared."));
return MOD_CONT;
}
@@ -401,18 +401,58 @@ class CommandOSSZLine : public Command
bool OnHelp(CommandSource &source, const Anope::string &subcommand)
{
- source.Reply(OPER_HELP_SZLINE);
+ source.Reply(_("Syntax: \002SZLINE ADD [+\037expiry\037] \037mask\037 \037reason\037\002\n"
+ " \002SZLINE DEL {\037mask\037 | \037entry-num\037 | \037list\037}\002\n"
+ " \002SZLINE LIST [\037mask\037 | \037list\037]\002\n"
+ " \002SZLINE VIEW [\037mask\037 | \037list\037]\002\n"
+ " \002SZLINE CLEAR\002\n"
+ " \n"
+ "Allows Services operators to manipulate the SZLINE list. If\n"
+ "a user with an IP matching an SZLINE mask attempts to \n"
+ "connect, Services will not allow it to pursue his IRC\n"
+ "session (and this, whether the IP has a PTR RR or not).\n"
+ " \n"
+ "\002SZLINE ADD\002 adds the given (nick's) IP mask to the SZLINE\n"
+ "list for the given reason (which \002must\002 be given).\n"
+ "\037expiry\037 is specified as an integer followed by one of \037d\037 \n"
+ "(days), \037h\037 (hours), or \037m\037 (minutes). Combinations (such as \n"
+ "\0371h30m\037) are not permitted. If a unit specifier is not \n"
+ "included, the default is days (so \037+30\037 by itself means 30 \n"
+ "days). To add an SZLINE which does not expire, use \037+0\037. If the\n"
+ "realname mask to be added starts with a \037+\037, an expiry time must\n"
+ "be given, even if it is the same as the default. The\n"
+ "current SZLINE default expiry time can be found with the\n"
+ "\002STATS AKILL\002 command.\n"
+ " \n"
+ "The \002SZLINE DEL\002 command removes the given mask from the\n"
+ "SZLINE list if it is present. If a list of entry numbers is \n"
+ "given, those entries are deleted. (See the example for LIST \n"
+ "below.)\n"
+ " \n"
+ "The \002SZLINE LIST\002 command displays the SZLINE list.\n"
+ "If a wildcard mask is given, only those entries matching the\n"
+ "mask are displayed. If a list of entry numbers is given,\n"
+ "only those entries are shown; for example:\n"
+ " \002SZLINE LIST 2-5,7-9\002\n"
+ " Lists SZLINE entries numbered 2 through 5 and 7 \n"
+ " through 9.\n"
+ " \n"
+ "\002SZLINE VIEW\002 is a more verbose version of \002SZLINE LIST\002, and \n"
+ "will show who added an SZLINE, the date it was added, and when\n"
+ "it expires, as well as the IP mask and reason.\n"
+ " \n"
+ "\002SZLINE CLEAR\002 clears all entries of the SZLINE list."));
return true;
}
void OnSyntaxError(CommandSource &source, const Anope::string &subcommand)
{
- SyntaxError(source, "SZLINE", OPER_SZLINE_SYNTAX);
+ SyntaxError(source, "SZLINE", _("SZLINE {ADD | DEL | LIST | VIEW | CLEAR} [[+\037expiry\037] {\037nick\037 | \037mask\037 | \037entry-list\037} [\037reason\037]]"));
}
void OnServHelp(CommandSource &source)
{
- source.Reply(OPER_HELP_CMD_SZLINE);
+ source.Reply(_(" SZLINE Manipulate the SZLINE list"));
}
};
diff --git a/modules/core/os_umode.cpp b/modules/core/os_umode.cpp
index 106a9c4e4..046ec670b 100644
--- a/modules/core/os_umode.cpp
+++ b/modules/core/os_umode.cpp
@@ -38,13 +38,13 @@ class CommandOSUMode : public Command
return MOD_CONT;
}
if (!(u2 = finduser(nick)))
- source.Reply(NICK_X_NOT_IN_USE, nick.c_str());
+ source.Reply(LanguageString::NICK_X_NOT_IN_USE, nick.c_str());
else
{
u2->SetModes(OperServ, "%s", modes.c_str());
- source.Reply(OPER_UMODE_SUCCESS, nick.c_str());
- u2->SendMessage(OperServ, OPER_UMODE_CHANGED, u->nick.c_str());
+ source.Reply(_("Changed usermodes of \002%s\002."), nick.c_str());
+ u2->SendMessage(OperServ, _("\002%s\002 changed your usermodes."), u->nick.c_str());
if (Config->WallOSMode)
ircdproto->SendGlobops(OperServ, "\2%s\2 used UMODE on %s", u->nick.c_str(), nick.c_str());
@@ -54,18 +54,22 @@ class CommandOSUMode : public Command
bool OnHelp(CommandSource &source, const Anope::string &subcommand)
{
- source.Reply(OPER_HELP_UMODE);
+ source.Reply(_("Syntax: \002UMODE \037user\037 \037modes\037\002\n"
+ " \n"
+ "Allows Services Opers to set user modes for any user.\n"
+ "Parameters are the same as for the standard /MODE\n"
+ "command."));
return true;
}
void OnSyntaxError(CommandSource &source, const Anope::string &subcommand)
{
- SyntaxError(source, "UMODE", OPER_UMODE_SYNTAX);
+ SyntaxError(source, "UMODE", _("UMODE \037nick\037 \037modes\037"));
}
void OnServHelp(CommandSource &source)
{
- source.Reply(OPER_HELP_CMD_UMODE);
+ source.Reply(_(" UMODE Change a user's modes"));
}
};
diff --git a/modules/core/os_update.cpp b/modules/core/os_update.cpp
index 414b7e973..1ea6d090b 100644
--- a/modules/core/os_update.cpp
+++ b/modules/core/os_update.cpp
@@ -22,20 +22,24 @@ class CommandOSUpdate : public Command
CommandReturn Execute(CommandSource &source, const std::vector<Anope::string> &params)
{
- source.Reply(OPER_UPDATING);
+ source.Reply(_("Updating databases."));
save_data = true;
return MOD_CONT;
}
bool OnHelp(CommandSource &source, const Anope::string &subcommand)
{
- source.Reply(OPER_HELP_UPDATE);
+ source.Reply(_("Syntax: \002UPDATE\002\n"
+ " \n"
+ "Causes Services to update all database files as soon as you\n"
+ "send the command."));
return true;
}
void OnServHelp(CommandSource &source)
{
- source.Reply(OPER_HELP_CMD_UPDATE);
+ source.Reply(_(" UPDATE Force the Services databases to be\n"
+ " updated on disk immediately"));
}
};
diff --git a/modules/core/os_userlist.cpp b/modules/core/os_userlist.cpp
index 4f5c9d0f9..a4dac7a41 100644
--- a/modules/core/os_userlist.cpp
+++ b/modules/core/os_userlist.cpp
@@ -32,7 +32,8 @@ class CommandOSUserList : public Command
if (!pattern.empty() && (c = findchan(pattern)))
{
- source.Reply(OPER_USERLIST_HEADER_CHAN, pattern.c_str());
+ source.Reply(_("\002%s\002 users list:\n"
+ "Nick Mask"), pattern.c_str());
for (CUserList::iterator cuit = c->users.begin(), cuit_end = c->users.end(); cuit != cuit_end; ++cuit)
{
@@ -43,12 +44,13 @@ class CommandOSUserList : public Command
if (!uc->user->HasMode(*it))
continue;
- source.Reply(OPER_USERLIST_RECORD, uc->user->nick.c_str(), uc->user->GetIdent().c_str(), uc->user->GetDisplayedHost().c_str());
+ source.Reply(_("%-20s %s@%s"), uc->user->nick.c_str(), uc->user->GetIdent().c_str(), uc->user->GetDisplayedHost().c_str());
}
}
else
{
- source.Reply(OPER_USERLIST_HEADER);
+ source.Reply(_("Users list:\n"
+ "Nick Mask"));
for (patricia_tree<User *, ci::ci_char_traits>::iterator it(UserListByNick); it.next();)
{
@@ -64,23 +66,31 @@ class CommandOSUserList : public Command
if (!u2->HasMode(*mit))
continue;
}
- source.Reply(OPER_USERLIST_RECORD, u2->nick.c_str(), u2->GetIdent().c_str(), u2->GetDisplayedHost().c_str());
+ source.Reply(_("%-20s %s@%s"), u2->nick.c_str(), u2->GetIdent().c_str(), u2->GetDisplayedHost().c_str());
}
}
- source.Reply(OPER_USERLIST_END);
+ source.Reply(_("End of users list."));
return MOD_CONT;
}
bool OnHelp(CommandSource &source, const Anope::string &subcommand)
{
- source.Reply(OPER_HELP_USERLIST);
+ source.Reply(_("Syntax: \002USERLIST [{\037pattern | channel\037} [\037INVISIBLE\037]]\002\n"
+ " \n"
+ "Lists all users currently online on the IRC network, whether their\n"
+ "nick is registered or not.\n"
+ " \n"
+ "If \002pattern\002 is given, lists only users that match it (it must be in\n"
+ "the format nick!user@host). If \002channel\002 is given, lists only users\n"
+ "that are on the given channel. If INVISIBLE is specified, only users\n"
+ "with the +i flag will be listed."));
return true;
}
void OnServHelp(CommandSource &source)
{
- source.Reply(OPER_HELP_CMD_USERLIST);
+ source.Reply(_(" USERLIST Lists all user records"));
}
};
diff --git a/modules/extra/cs_appendtopic.cpp b/modules/extra/cs_appendtopic.cpp
index 8124aa535..c8c641876 100644
--- a/modules/extra/cs_appendtopic.cpp
+++ b/modules/extra/cs_appendtopic.cpp
@@ -59,9 +59,9 @@ class CommandCSAppendTopic : public Command
Channel *c = ci->c;
if (!c)
- u->SendMessage(ChanServ, CHAN_X_NOT_IN_USE, ci->name.c_str());
+ u->SendMessage(ChanServ, LanguageString::CHAN_X_NOT_IN_USE, ci->name.c_str());
else if (!check_access(u, ci, CA_TOPIC))
- u->SendMessage(ChanServ, ACCESS_DENIED);
+ u->SendMessage(ChanServ, LanguageString::ACCESS_DENIED);
else
{
Anope::string topic;
diff --git a/modules/extra/cs_enforce.cpp b/modules/extra/cs_enforce.cpp
index 568d0b17f..c5a2ee590 100644
--- a/modules/extra/cs_enforce.cpp
+++ b/modules/extra/cs_enforce.cpp
@@ -89,7 +89,7 @@ class CommandCSEnforce : public Command
if (check_access(uc->user, ci, CA_NOJOIN))
{
get_idealban(ci, uc->user, mask);
- Anope::string reason = GetString(uc->user, CHAN_NOT_ALLOWED_TO_JOIN);
+ Anope::string reason = GetString(uc->user->Account(), LanguageString::CHAN_NOT_ALLOWED_TO_JOIN);
c->SetMode(NULL, CMODE_BAN, mask);
c->Kick(NULL, uc->user, "%s", reason.c_str());
}
@@ -113,7 +113,7 @@ class CommandCSEnforce : public Command
if (!uc->user->IsIdentified())
{
get_idealban(ci, uc->user, mask);
- Anope::string reason = GetString(uc->user, CHAN_NOT_ALLOWED_TO_JOIN);
+ Anope::string reason = GetString(uc->user->Account(), LanguageString::CHAN_NOT_ALLOWED_TO_JOIN);
if (!c->HasMode(CMODE_REGISTERED))
c->SetMode(NULL, CMODE_BAN, mask);
c->Kick(NULL, uc->user, "%s", reason.c_str());
@@ -134,9 +134,9 @@ class CommandCSEnforce : public Command
Channel *c = ci->c;
if (!c)
- u->SendMessage(ChanServ, CHAN_X_NOT_IN_USE, ci->name.c_str());
+ u->SendMessage(ChanServ, LanguageString::CHAN_X_NOT_IN_USE, ci->name.c_str());
else if (!check_access(u, ci, CA_AKICK))
- u->SendMessage(ChanServ, ACCESS_DENIED);
+ u->SendMessage(ChanServ, LanguageString::ACCESS_DENIED);
else
{
if (what.empty() || what.equals_ci("SET"))
diff --git a/modules/extra/cs_entrymsg.cpp b/modules/extra/cs_entrymsg.cpp
index 3edeef84c..b32937847 100644
--- a/modules/extra/cs_entrymsg.cpp
+++ b/modules/extra/cs_entrymsg.cpp
@@ -33,40 +33,40 @@ unsigned EntryMsg::MaxEntries = 0;
class CommandEntryMessage : public Command
{
private:
- void DoList(User *u, ChannelInfo *ci)
+ void DoList(CommandSource &source, ChannelInfo *ci)
{
std::vector<EntryMsg> messages;
if (ci->GetExtRegular("cs_entrymsg", messages))
{
- u->SendMessage(ChanServ, CHAN_ENTRYMSG_LIST_HEADER, ci->name.c_str());
+ source.Reply(_("Entry message list for \2%s\2:"), ci->name.c_str());
for (unsigned i = 0; i < messages.size(); ++i)
- u->SendMessage(ChanServ, CHAN_ENTRYMSG_LIST_ENTRY, i + 1, messages[i].message.c_str(), messages[i].creator.c_str(), do_strftime(messages[i].when).c_str());
- u->SendMessage(ChanServ, CHAN_ENTRYMSG_LIST_END);
+ source.Reply(LanguageString::CHAN_LIST_ENTRY, i + 1, messages[i].message.c_str(), messages[i].creator.c_str(), do_strftime(messages[i].when).c_str());
+ source.Reply(_("End of entry message list."));
}
else
- u->SendMessage(ChanServ, CHAN_ENTRYMSG_LIST_EMPTY, ci->name.c_str());
+ source.Reply(_("Entry message list for \2%s\2 is empty."), ci->name.c_str());
}
- void DoAdd(User *u, ChannelInfo *ci, const Anope::string &message)
+ void DoAdd(CommandSource &source, ChannelInfo *ci, const Anope::string &message)
{
std::vector<EntryMsg> messages;
ci->GetExtRegular("cs_entrymsg", messages);
if (EntryMsg::MaxEntries && messages.size() >= EntryMsg::MaxEntries)
- u->SendMessage(ChanServ, CHAN_ENTRYMSG_LIST_FULL, ci->name.c_str());
+ source.Reply(_("The entry message list for \2%s\2 is full."), ci->name.c_str());
else
{
- messages.push_back(EntryMsg(u->nick, message));
+ messages.push_back(EntryMsg(source.u->nick, message));
ci->Extend("cs_entrymsg", new ExtensibleItemRegular<std::vector<EntryMsg> >(messages));
- u->SendMessage(ChanServ, CHAN_ENTRYMSG_ADDED, ci->name.c_str());
+ source.Reply(_("Entry message added to \2%s\2"), ci->name.c_str());
}
}
- void DoDel(User *u, ChannelInfo *ci, const Anope::string &message)
+ void DoDel(CommandSource &source, ChannelInfo *ci, const Anope::string &message)
{
std::vector<EntryMsg> messages;
if (!message.is_pos_number_only())
- u->SendMessage(ChanServ, CHAN_ENTRYMSG_NOT_FOUND, message.c_str(), ci->name.c_str());
+ source.Reply(("Entry message \002%s\002 not found on channel \002%s\002."), message.c_str(), ci->name.c_str());
else if (ci->GetExtRegular("cs_entrymsg", messages))
{
unsigned i = convertTo<unsigned>(message);
@@ -74,19 +74,19 @@ class CommandEntryMessage : public Command
{
messages.erase(messages.begin() + i - 1);
ci->Extend("cs_entrymsg", new ExtensibleItemRegular<std::vector<EntryMsg> >(messages));
- u->SendMessage(ChanServ, CHAN_ENTRYMSG_DELETED, i, ci->name.c_str());
+ source.Reply(_("Entry message \2%i\2 for \2%s\2 deleted."), i, ci->name.c_str());
}
else
- u->SendMessage(ChanServ, CHAN_ENTRYMSG_NOT_FOUND, message.c_str(), ci->name.c_str());
+ source.Reply(_("Entry message \2%s\2 not found on channel \2%s\2."), message.c_str(), ci->name.c_str());
}
else
- u->SendMessage(ChanServ, CHAN_ENTRYMSG_LIST_EMPTY, ci->name.c_str());
+ source.Reply(_("Entry message list for \2%s\2 is empty."), ci->name.c_str());
}
- void DoClear(User *u, ChannelInfo *ci)
+ void DoClear(CommandSource &source, ChannelInfo *ci)
{
ci->Shrink("cs_entrymsg");
- u->SendMessage(ChanServ, CHAN_ENTRYMSG_CLEARED, ci->name.c_str());
+ source.Reply(_("Entry messages for \2%s\2 have been cleared."), ci->name.c_str());
}
public:
@@ -103,18 +103,18 @@ class CommandEntryMessage : public Command
{
bool success = true;
if (params[1].equals_ci("LIST"))
- this->DoList(u, ci);
+ this->DoList(source, ci);
else if (params[1].equals_ci("CLEAR"))
- this->DoClear(u, ci);
+ this->DoClear(source, ci);
else if (params.size() < 3)
{
success = false;
this->OnSyntaxError(source, "");
}
else if (params[1].equals_ci("ADD"))
- this->DoAdd(u, ci, params[2]);
+ this->DoAdd(source, ci, params[2]);
else if (params[1].equals_ci("DEL"))
- this->DoDel(u, ci, params[2]);
+ this->DoDel(source, ci, params[2]);
else
{
success = false;
@@ -125,7 +125,7 @@ class CommandEntryMessage : public Command
}
else
{
- u->SendMessage(ChanServ, ACCESS_DENIED);
+ u->SendMessage(ChanServ, LanguageString::ACCESS_DENIED);
}
return MOD_CONT;
@@ -133,18 +133,20 @@ class CommandEntryMessage : public Command
void OnSyntaxError(CommandSource &source, const Anope::string &)
{
- SyntaxError(source, "ENTRYMSG", CHAN_ENTRYMSG_SYNTAX);
+ SyntaxError(source, "ENTRYMSG", _("ENTRYMSG \037channel\037 {ADD|DEL|LIST|CLEAR} [\037message\037|\037num\037]"));
}
bool OnHelp(CommandSource &source, const Anope::string &subcommand)
{
- source.Reply(CHAN_HELP_ENTRYMSG);
+ source.Reply(_("Syntax: \002ENTRYMSG \037channel\037 {ADD|DEL|LIST|CLEAR} [\037message\037|\037num\037]\002\n"
+ " \n"
+ "Controls what messages will be sent to users when they join the channel."));
return true;
}
void OnServHelp(CommandSource &source)
{
- source.Reply(CHAN_HELP_CMD_ENTRYMSG);
+ source.Reply(_(" ENTRYMSG Manage the channel's entrymsgs"));
}
};
diff --git a/modules/extra/cs_set_misc.cpp b/modules/extra/cs_set_misc.cpp
index 1a21b66d5..e91f32860 100644
--- a/modules/extra/cs_set_misc.cpp
+++ b/modules/extra/cs_set_misc.cpp
@@ -31,17 +31,17 @@ class CommandCSSetMisc : public Command
if (params.size() > 1)
{
ci->Extend("chanserv:" + this->name, new ExtensibleItemRegular<Anope::string>(params[1]));
- u->SendMessage(ChanServ, CHAN_SETTING_CHANGED, this->name.c_str(), ci->name.c_str(), params[1].c_str());
+ u->SendMessage(ChanServ, LanguageString::CHAN_SETTING_CHANGED, this->name.c_str(), ci->name.c_str(), params[1].c_str());
}
else
- u->SendMessage(ChanServ, CHAN_SETTING_UNSET, this->name.c_str(), ci->name.c_str());
+ u->SendMessage(ChanServ, LanguageString::CHAN_SETTING_UNSET, this->name.c_str(), ci->name.c_str());
return MOD_CONT;
}
void OnSyntaxError(CommandSource &source, const Anope::string &)
{
- SyntaxError(source, "SET", CHAN_SET_SYNTAX);
+ SyntaxError(source, "SET", LanguageString::CHAN_SET_SYNTAX);
}
void OnServHelp(CommandSource &source)
@@ -59,7 +59,7 @@ class CommandCSSASetMisc : public CommandCSSetMisc
void OnSyntaxError(CommandSource &source, const Anope::string &)
{
- SyntaxError(source, "SASET", CHAN_SASET_SYNTAX);
+ SyntaxError(source, "SASET", LanguageString::CHAN_SASET_SYNTAX);
}
};
diff --git a/modules/extra/cs_tban.cpp b/modules/extra/cs_tban.cpp
index 35757ff1e..6e54da6be 100644
--- a/modules/extra/cs_tban.cpp
+++ b/modules/extra/cs_tban.cpp
@@ -40,11 +40,11 @@ static bool CanBanUser(Channel *c, User *u, User *u2)
ChannelInfo *ci = c->ci;
bool ok = false;
if (!check_access(u, ci, CA_BAN))
- u->SendMessage(ChanServ, ACCESS_DENIED);
+ u->SendMessage(ChanServ, LanguageString::ACCESS_DENIED);
else if (matches_list(c, u2, CMODE_EXCEPT))
- u->SendMessage(ChanServ, CHAN_EXCEPTED, u2->nick.c_str(), ci->name.c_str());
+ u->SendMessage(ChanServ, LanguageString::CHAN_EXCEPTED, u2->nick.c_str(), ci->name.c_str());
else if (u2->IsProtected())
- u->SendMessage(ChanServ, ACCESS_DENIED);
+ u->SendMessage(ChanServ, LanguageString::ACCESS_DENIED);
else
ok = true;
@@ -70,9 +70,9 @@ class CommandCSTBan : public Command
User *u2;
if (!c)
- u->SendMessage(ChanServ, CHAN_X_NOT_IN_USE, chan.c_str());
+ u->SendMessage(ChanServ, LanguageString::CHAN_X_NOT_IN_USE, chan.c_str());
else if (!(u2 = finduser(nick)))
- u->SendMessage(ChanServ, NICK_X_NOT_IN_USE, nick.c_str());
+ u->SendMessage(ChanServ, LanguageString::NICK_X_NOT_IN_USE, nick.c_str());
else
if (CanBanUser(c, u, u2))
{
diff --git a/modules/extra/db_mysql.cpp b/modules/extra/db_mysql.cpp
index 180b66463..03515d239 100644
--- a/modules/extra/db_mysql.cpp
+++ b/modules/extra/db_mysql.cpp
@@ -129,13 +129,17 @@ class CommandSQLSync : public Command
bool OnHelp(CommandSource &source, const Anope::string &subcommand)
{
- source.Reply(OPER_HELP_SYNC);
+ source.Reply(_("Syntax: \002SQLSYNC\002\n"
+ " \n"
+ "This command syncs your databases with SQL. You should\n"
+ "only have to execute this command once, when you initially\n"
+ "import your databases into SQL."));
return true;
}
void OnServHelp(CommandSource &source)
{
- source.Reply(OPER_HELP_CMD_SQLSYNC);
+ source.Reply(_(" SQLSYNC Import your databases to SQL"));
}
};
@@ -1393,7 +1397,7 @@ CommandReturn CommandSQLSync::Execute(CommandSource &source, const std::vector<A
{
User *u = source.u;
SaveDatabases();
- u->SendMessage(OperServ, OPER_SYNC_UPDATED);
+ u->SendMessage(OperServ, _("Updating MySQL."));
return MOD_CONT;
}
diff --git a/modules/extra/db_mysql_live.cpp b/modules/extra/db_mysql_live.cpp
index bf5a1e6f7..55e891623 100644
--- a/modules/extra/db_mysql_live.cpp
+++ b/modules/extra/db_mysql_live.cpp
@@ -42,7 +42,7 @@ class CommandMutex : public Thread
if (!command->permission.empty() && !u->Account()->HasCommand(command->permission))
{
- u->SendMessage(bi, ACCESS_DENIED);
+ u->SendMessage(bi, LanguageString::ACCESS_DENIED);
Log(LOG_COMMAND, "denied", bi) << "Access denied for user " << u->GetMask() << " with command " << command;
}
else
diff --git a/modules/extra/hs_request.cpp b/modules/extra/hs_request.cpp
index 6f9111b5e..3a1237328 100644
--- a/modules/extra/hs_request.cpp
+++ b/modules/extra/hs_request.cpp
@@ -67,19 +67,19 @@ class CommandHSRequest : public Command
}
if (vIdent.length() > Config->UserLen)
{
- source.Reply(HOST_SET_IDENTTOOLONG, Config->UserLen);
+ source.Reply(LanguageString::HOST_SET_IDENTTOOLONG, Config->UserLen);
return MOD_CONT;
}
else
for (Anope::string::iterator s = vIdent.begin(), s_end = vIdent.end(); s != s_end; ++s)
if (!isvalidchar(*s))
{
- source.Reply(HOST_SET_IDENT_ERROR);
+ source.Reply(LanguageString::HOST_SET_IDENT_ERROR);
return MOD_CONT;
}
if (!ircd->vident)
{
- source.Reply(HOST_NO_VIDENT);
+ source.Reply(LanguageString::HOST_NO_VIDENT);
return MOD_CONT;
}
}
@@ -87,13 +87,13 @@ class CommandHSRequest : public Command
hostmask = rawhostmask;
else
{
- source.Reply(HOST_SET_TOOLONG, Config->HostLen);
+ source.Reply(LanguageString::HOST_SET_TOOLONG, Config->HostLen);
return MOD_CONT;
}
if (!isValidHost(hostmask, 3))
{
- source.Reply(HOST_SET_ERROR);
+ source.Reply(LanguageString::HOST_SET_ERROR);
return MOD_CONT;
}
@@ -167,7 +167,7 @@ class CommandHSActivate : public Command
me->SendMessage(source, _("No request for nick %s found."), nick.c_str());
}
else
- u->SendMessage(HostServ, NICK_X_NOT_REGISTERED, nick.c_str());
+ u->SendMessage(HostServ, LanguageString::NICK_X_NOT_REGISTERED, nick.c_str());
return MOD_CONT;
}
@@ -222,7 +222,7 @@ class CommandHSReject : public Command
if (!reason.empty())
snprintf(message, sizeof(message), _("[auto memo] Your requested vHost has been rejected. Reason: %s"), reason.c_str());
else
- snprintf(message, sizeof(message), _("[auto memo] Your requested vHost has been rejected."));
+ snprintf(message, sizeof(message), "%s", _("[auto memo] Your requested vHost has been rejected."));
memo_send(source, nick, message, 2);
}
@@ -269,13 +269,13 @@ class HSListBase : public Command
{
++display_counter;
if (!hr->ident.empty())
- u->SendMessage(HostServ, HOST_IDENT_ENTRY, counter, it->first.c_str(), hr->ident.c_str(), hr->host.c_str(), it->first.c_str(), do_strftime(hr->time).c_str());
+ u->SendMessage(HostServ, _("#%d Nick:\002%s\002, vhost:\002%s\002@\002%s\002 (%s - %s)"), counter, it->first.c_str(), hr->ident.c_str(), hr->host.c_str(), it->first.c_str(), do_strftime(hr->time).c_str());
else
- u->SendMessage(HostServ, HOST_ENTRY, counter, it->first.c_str(), hr->host.c_str(), it->first.c_str(), do_strftime(hr->time).c_str());
+ u->SendMessage(HostServ, _("#%d Nick:\002%s\002, vhost:\002%s\002 (%s - %s)"), counter, it->first.c_str(), hr->host.c_str(), it->first.c_str(), do_strftime(hr->time).c_str());
}
++counter;
}
- u->SendMessage(HostServ, HOST_LIST_FOOTER, display_counter);
+ u->SendMessage(HostServ, _("Displayed all records (Count: \002%d\002)"), display_counter);
return MOD_CONT;
}
diff --git a/modules/extra/language/CMakeLists.txt b/modules/extra/language/CMakeLists.txt
new file mode 100644
index 000000000..af4dd90a6
--- /dev/null
+++ b/modules/extra/language/CMakeLists.txt
@@ -0,0 +1,38 @@
+# Only do this if gettext is installed
+if(GETTEXT_FOUND)
+ # Get all of the .po files
+ file(GLOB LANG_SRCS_PO RELATIVE ${CMAKE_CURRENT_SOURCE_DIR} "*.*.po")
+ sort_list(LANG_SRCS_PO)
+
+ foreach(LANG_PO ${LANG_SRCS_PO})
+ # Get the domain for this language file
+ string(LENGTH ${LANG_PO} LANG_PO_LENGTH)
+ math(EXPR DOMAIN_LENGTH "${LANG_PO_LENGTH} - 9")
+ string(SUBSTRING ${LANG_PO} 0 ${DOMAIN_LENGTH} LANG_DOMAIN)
+
+ # Get the language for this language file
+ math(EXPR DOMAIN_LENGTH "${LANG_PO_LENGTH} - 8")
+ string(SUBSTRING ${LANG_PO} ${DOMAIN_LENGTH} 5 LANG_LANG)
+
+ # Get the .mo file name
+ string(REGEX REPLACE "\\.po$" ".mo" LANG_MO ${LANG_PO})
+ # Add the .mo file to a list for use later with add_custom_target
+ set(LANG_SRCS_MO ${LANG_SRCS_MO} ${CMAKE_CURRENT_BINARY_DIR}/${LANG_MO})
+ # Run msgfmt on the language file, depends on the .po file
+ add_custom_command(OUTPUT ${CMAKE_CURRENT_BINARY_DIR}/${LANG_MO}
+ COMMAND ${GETTEXT_MSGFMT_EXECUTABLE} -c ${CMAKE_CURRENT_SOURCE_DIR}/${LANG_PO} -o ${CMAKE_CURRENT_BINARY_DIR}/${LANG_MO}
+ MAIN_DEPENDENCY ${LANG_PO}
+ )
+ # Add to cpack ignored files if not on Windows.
+ if(NOT WIN32)
+ add_to_cpack_ignored_files("${LANG_MO}")
+ endif(NOT WIN32)
+
+ # Install the new language file
+ install(CODE "FILE(MAKE_DIRECTORY \${CMAKE_INSTALL_PREFIX}/data/languages/${LANG_LANG}/LC_MESSAGES/)")
+ install(FILES ${CMAKE_CURRENT_BINARY_DIR}/${LANG_MO} DESTINATION data/languages/${LANG_LANG}/LC_MESSAGES RENAME ${LANG_DOMAIN}.mo PERMISSIONS ${PERMS})
+ endforeach(LANG_PO)
+
+ # Generate languages, depends on the mo files
+ add_custom_target(module_language DEPENDS ${LANG_SRCS_MO})
+endif(GETTEXT_FOUND)
diff --git a/modules/extra/language/cs_appendtopic.de_DE.po b/modules/extra/language/cs_appendtopic.de_DE.po
new file mode 100644
index 000000000..8e5111d5d
--- /dev/null
+++ b/modules/extra/language/cs_appendtopic.de_DE.po
@@ -0,0 +1,37 @@
+# German translations for cs_appendtopic
+# German messages for cs_appendtopic
+# Copyright (C) 2011 Anope Team
+# This file is distributed under the same license as Anope IRC Services
+# Adam <adam@anope.org>, 2011.
+#
+msgid ""
+msgstr ""
+"Project-Id-Version: Anope\n"
+"Report-Msgid-Bugs-To: \n"
+"POT-Creation-Date: 2011-02-04 03:41-0500\n"
+"PO-Revision-Date: 2010-09-25 20:57-0400\n"
+"Last-Translator: Adam <adam@anope.org>\n"
+"Language-Team: German\n"
+"MIME-Version: 1.0\n"
+"Content-Type: text/plain; charset=ISO-8859-1\n"
+"Content-Transfer-Encoding: 8bit\n"
+"Plural-Forms: nplurals=2; plural=(n != 1);\n"
+
+#: ../cs_appendtopic.cpp:106
+msgid " APPENDTOPIC Add text to a channels topic"
+msgstr " APPENDTOPIC Fьgt einen Text zu einem Channel-Topic hinzu."
+
+#: ../cs_appendtopic.cpp:90 ../cs_appendtopic.cpp:101
+msgid "Syntax: APPENDTOPIC channel text"
+msgstr "Syntax: APPENDTOPIC Channel Text"
+
+#: ../cs_appendtopic.cpp:92
+msgid ""
+"This command allows users to append text to a currently set\n"
+"channel topic. When TOPICLOCK is on, the topic is updated and\n"
+"the new, updated topic is locked."
+msgstr ""
+"Dieser Befehl erlaubt Benutzern, einen Text zu dem vorhandenen Channel-"
+"Topic\n"
+"hinzuzufьgen. Wenn TOPICLOCK gesetzt ist, wird das Topic aktualisiert\n"
+"und das neue, aktualisierte Topic wird gesperrt."
diff --git a/modules/extra/language/cs_appendtopic.it_IT.po b/modules/extra/language/cs_appendtopic.it_IT.po
new file mode 100644
index 000000000..827fe5bd6
--- /dev/null
+++ b/modules/extra/language/cs_appendtopic.it_IT.po
@@ -0,0 +1,38 @@
+# Italian translations for cs_appendtopic
+# Traduzioni italiane per il cs_appendtopic
+# Copyright (C) 2011 Anope Team
+# This file is distributed under the same license as Anope IRC Services
+# Adam <adam@anope.org>, 2011.
+#
+msgid ""
+msgstr ""
+"Project-Id-Version: Anope\n"
+"Report-Msgid-Bugs-To: \n"
+"POT-Creation-Date: 2011-02-04 03:41-0500\n"
+"PO-Revision-Date: 2010-09-25 21:04-0400\n"
+"Last-Translator: Adam <adam@anope.org>\n"
+"Language-Team: Italian\n"
+"MIME-Version: 1.0\n"
+"Content-Type: text/plain; charset=ISO-8859-1\n"
+"Content-Transfer-Encoding: 8bit\n"
+"Plural-Forms: nplurals=2; plural=(n != 1);\n"
+
+#: ../cs_appendtopic.cpp:106
+msgid " APPENDTOPIC Add text to a channels topic"
+msgstr " APPENDTOPIC Aggiunge del testo al topic di un canale"
+
+#: ../cs_appendtopic.cpp:90 ../cs_appendtopic.cpp:101
+msgid "Syntax: APPENDTOPIC channel text"
+msgstr "Sintassi: APPENDTOPIC canale testo"
+
+#: ../cs_appendtopic.cpp:92
+msgid ""
+"This command allows users to append text to a currently set\n"
+"channel topic. When TOPICLOCK is on, the topic is updated and\n"
+"the new, updated topic is locked."
+msgstr ""
+"Questo comando permette agli utenti di aggiungere del testo ad un topic di "
+"un canale\n"
+"giа impostato. Se TOPICLOCK и attivato, il topic viene aggiornato e il nuovo "
+"topic\n"
+"viene bloccato."
diff --git a/modules/extra/language/cs_appendtopic.nl_NL.po b/modules/extra/language/cs_appendtopic.nl_NL.po
new file mode 100644
index 000000000..15e857506
--- /dev/null
+++ b/modules/extra/language/cs_appendtopic.nl_NL.po
@@ -0,0 +1,37 @@
+# Dutch translations for cs_appendtopic
+# Engelse vertalingen voor het cs_appendtopic
+# Copyright (C) 2011 Anope Team
+# This file is distributed under the same license as Anope IRC Services
+# Adam <adam@anope.org>, 2011.
+#
+msgid ""
+msgstr ""
+"Project-Id-Version: Anope\n"
+"Report-Msgid-Bugs-To: \n"
+"POT-Creation-Date: 2011-02-04 03:41-0500\n"
+"PO-Revision-Date: 2010-09-25 20:55-0400\n"
+"Last-Translator: Adam <adam@anope.org>\n"
+"Language-Team: Dutch\n"
+"MIME-Version: 1.0\n"
+"Content-Type: text/plain; charset=ISO-8859-1\n"
+"Content-Transfer-Encoding: 8bit\n"
+"Plural-Forms: nplurals=2; plural=(n != 1);\n"
+
+#: ../cs_appendtopic.cpp:106
+msgid " APPENDTOPIC Add text to a channels topic"
+msgstr " APPENDTOPIC Voeg tekst aan een kanaal onderwerp toe"
+
+#: ../cs_appendtopic.cpp:90 ../cs_appendtopic.cpp:101
+msgid "Syntax: APPENDTOPIC channel text"
+msgstr "Gebruik: APPENDTOPIC kanaal tekst"
+
+#: ../cs_appendtopic.cpp:92
+msgid ""
+"This command allows users to append text to a currently set\n"
+"channel topic. When TOPICLOCK is on, the topic is updated and\n"
+"the new, updated topic is locked."
+msgstr ""
+"Dit command stelt gebruikers in staat om text toe te voegen\n"
+"achter het huidige onderwerp van een kanaal. Als TOPICLOCK aan\n"
+"staat, zal het onderwerp worden bijgewerkt en zal het nieuwe,\n"
+"bijgewerkte topic worden geforceerd."
diff --git a/modules/extra/language/cs_appendtopic.pot b/modules/extra/language/cs_appendtopic.pot
new file mode 100644
index 000000000..4c37b8d37
--- /dev/null
+++ b/modules/extra/language/cs_appendtopic.pot
@@ -0,0 +1,32 @@
+# SOME DESCRIPTIVE TITLE.
+# Copyright (C) YEAR THE PACKAGE'S COPYRIGHT HOLDER
+# This file is distributed under the same license as the PACKAGE package.
+# FIRST AUTHOR <EMAIL@ADDRESS>, YEAR.
+#
+#, fuzzy
+msgid ""
+msgstr ""
+"Project-Id-Version: PACKAGE VERSION\n"
+"Report-Msgid-Bugs-To: \n"
+"POT-Creation-Date: 2011-02-04 03:41-0500\n"
+"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
+"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
+"Language-Team: LANGUAGE <LL@li.org>\n"
+"MIME-Version: 1.0\n"
+"Content-Type: text/plain; charset=CHARSET\n"
+"Content-Transfer-Encoding: 8bit\n"
+
+#: ../cs_appendtopic.cpp:106
+msgid " APPENDTOPIC Add text to a channels topic"
+msgstr ""
+
+#: ../cs_appendtopic.cpp:90 ../cs_appendtopic.cpp:101
+msgid "Syntax: APPENDTOPIC channel text"
+msgstr ""
+
+#: ../cs_appendtopic.cpp:92
+msgid ""
+"This command allows users to append text to a currently set\n"
+"channel topic. When TOPICLOCK is on, the topic is updated and\n"
+"the new, updated topic is locked."
+msgstr ""
diff --git a/modules/extra/language/cs_appendtopic.pt_PT.po b/modules/extra/language/cs_appendtopic.pt_PT.po
new file mode 100644
index 000000000..853f0502c
--- /dev/null
+++ b/modules/extra/language/cs_appendtopic.pt_PT.po
@@ -0,0 +1,35 @@
+# Portuguese translations for cs_appendtopic
+# Copyright (C) 2011 Anope Team
+# This file is distributed under the same license as Anope IRC Services
+# Adam <adam@anope.org>, 2011.
+#
+msgid ""
+msgstr ""
+"Project-Id-Version: Anope\n"
+"Report-Msgid-Bugs-To: \n"
+"POT-Creation-Date: 2011-02-04 03:41-0500\n"
+"PO-Revision-Date: 2010-09-25 21:00-0400\n"
+"Last-Translator: Adam <adam@anope.org>\n"
+"Language-Team: Portuguese\n"
+"MIME-Version: 1.0\n"
+"Content-Type: text/plain; charset=ISO-8859-1\n"
+"Content-Transfer-Encoding: 8bit\n"
+"Plural-Forms: nplurals=2; plural=(n != 1);\n"
+
+#: ../cs_appendtopic.cpp:106
+msgid " APPENDTOPIC Add text to a channels topic"
+msgstr " APPENDTOPIC Adiciona texto ao tуpico de um canal"
+
+#: ../cs_appendtopic.cpp:90 ../cs_appendtopic.cpp:101
+msgid "Syntax: APPENDTOPIC channel text"
+msgstr "Sintaxe: APPENDTOPIC canal texto"
+
+#: ../cs_appendtopic.cpp:92
+msgid ""
+"This command allows users to append text to a currently set\n"
+"channel topic. When TOPICLOCK is on, the topic is updated and\n"
+"the new, updated topic is locked."
+msgstr ""
+"Este comando permite aos usuбrios anexar texto a um tуpico de canal\n"
+"jб definido. Quando TOPICLOCK estб ativado, o tуpico й atualizado e\n"
+"o novo tуpico й travado."
diff --git a/modules/extra/language/cs_appendtopic.ru_RU.po b/modules/extra/language/cs_appendtopic.ru_RU.po
new file mode 100644
index 000000000..89e0a19b3
--- /dev/null
+++ b/modules/extra/language/cs_appendtopic.ru_RU.po
@@ -0,0 +1,40 @@
+# Russian translations for cs_appendtopic
+# ?????????? ???????? ??? ?????? cs_appendtopic
+# Copyright (C) 2011 Anope Team
+# This file is distributed under the same license as Anope IRC Services
+# Adam <adam@anope.org>, 2011.
+#
+msgid ""
+msgstr ""
+"Project-Id-Version: Anope\n"
+"Report-Msgid-Bugs-To: \n"
+"POT-Creation-Date: 2011-02-04 03:41-0500\n"
+"PO-Revision-Date: 2010-09-25 21:02-0400\n"
+"Last-Translator: Adam <adam@anope.org>\n"
+"Language-Team: Russian\n"
+"MIME-Version: 1.0\n"
+"Content-Type: text/plain; charset=ISO-8859-1\n"
+"Content-Transfer-Encoding: 8bit\n"
+"Plural-Forms: nplurals=3; plural=(n%10==1 && n%100!=11 ? 0 : n%10>=2 && n%"
+"10<=4 && (n%100<10 || n%100>=20) ? 1 : 2);\n"
+
+#: ../cs_appendtopic.cpp:106
+msgid " APPENDTOPIC Add text to a channels topic"
+msgstr " APPENDTOPIC Добавляет текст к топику канала"
+
+#: ../cs_appendtopic.cpp:90 ../cs_appendtopic.cpp:101
+msgid "Syntax: APPENDTOPIC channel text"
+msgstr "Синтаксис: APPENDTOPIC #канал текст"
+
+#: ../cs_appendtopic.cpp:92
+msgid ""
+"This command allows users to append text to a currently set\n"
+"channel topic. When TOPICLOCK is on, the topic is updated and\n"
+"the new, updated topic is locked."
+msgstr ""
+"Данная команда позволяет добавить текст к топику, который установлен на "
+"указанном\n"
+"канале. Если активирован режим TOPICLOCK, топик будет обновлен и "
+"заблокирован.\n"
+"Примечание: текст будет ДОБАВЛЕН к топику, то есть старый топик удален НЕ "
+"БУДЕТ."
diff --git a/modules/extra/language/cs_enforce.de_DE.po b/modules/extra/language/cs_enforce.de_DE.po
new file mode 100644
index 000000000..40eddc19c
--- /dev/null
+++ b/modules/extra/language/cs_enforce.de_DE.po
@@ -0,0 +1,85 @@
+# German translations for cs_enforce
+# German messages for cs_enforce
+# Copyright (C) 2011 Anope Team
+# This file is distributed under the same license as Anope IRC Services
+# Adam <adam@anope.org>, 2011.
+#
+msgid ""
+msgstr ""
+"Project-Id-Version: Anope\n"
+"Report-Msgid-Bugs-To: \n"
+"POT-Creation-Date: 2011-02-04 03:41-0500\n"
+"PO-Revision-Date: 2010-09-25 21:12-0400\n"
+"Last-Translator: Adam <adam@anope.org>\n"
+"Language-Team: German\n"
+"MIME-Version: 1.0\n"
+"Content-Type: text/plain; charset=ISO-8859-1\n"
+"Content-Transfer-Encoding: 8bit\n"
+"Plural-Forms: nplurals=2; plural=(n != 1);\n"
+
+#: ../cs_enforce.cpp:213
+msgid " ENFORCE Enforce various channel modes and set options"
+msgstr " ENFORCE Erzwingt verschieden Modes und SET Optionen"
+
+#: ../cs_enforce.cpp:178
+msgid ""
+"Enforce various channel modes and set options. The channel\n"
+"option indicates what channel to enforce the modes and options\n"
+"on. The what option indicates what modes and options to\n"
+"enforce, and can be any of SET, SECUREOPS, RESTRICTED, MODES,\n"
+"or +R. When left out, it defaults to SET.\n"
+" \n"
+"If what is SET, it will enforce SECUREOPS and RESTRICTED\n"
+"on the users currently in the channel, if they are set. Give\n"
+"SECUREOPS to enforce the SECUREOPS option, even if it is not\n"
+"enabled. Use RESTRICTED to enfore the RESTRICTED option, also\n"
+"if it's not enabled."
+msgstr ""
+"Erzwingt verschieden Modes und SET Optionen. Die Channel\n"
+"Option zeigt dir den Channel an, indem Modes und Optionen\n"
+"zu erzwingen sind. Die was Option zeigt dir welche Modes\n"
+"und Optionen zu erzwingen sind. Die kцnnen nur SET, SECUREOPS,\n"
+"RESTRICTED, MODES oder +R sein.Default ist SET.\n"
+" \n"
+"Wenn was SET ist, wird SECUREOPS und RESTRICTED\n"
+"auf die User die z.Z.in Channel sind erzwungen, wenn sie AN sind.\n"
+"Benutze SECUREOPS oder RESTRICTED , um die Optionen einzeln\n"
+"zu erzwingen, also wenn sie nicht eingeschaltet sind."
+
+#: ../cs_enforce.cpp:145 ../cs_enforce.cpp:150 ../cs_enforce.cpp:155
+#: ../cs_enforce.cpp:160 ../cs_enforce.cpp:165
+#, c-format
+msgid "Enforced %s"
+msgstr "Erzwungen %s"
+
+#: ../cs_enforce.cpp:191
+msgid ""
+"If what is MODES, it will enforce channelmode +R if it is\n"
+"set. If +R is specified for what, the +R channelmode will\n"
+"also be enforced, but even if it is not set. If it is not set,\n"
+"users will be banned to ensure they don't just rejoin."
+msgstr ""
+"Wenn was MODES ist, wird das ChannelMode +R erzwungen\n"
+"falls an. Wenn was +R ist, wird +R erzwungen aber eben\n"
+"wenn noch nicht als Channel-Mode ist. Wenn +R noch nicht als\n"
+"Channel-Mode war werden alle User aus den Channel gebannt um\n"
+"sicher zu sein das sie nicht rejoinen."
+
+#: ../cs_enforce.cpp:196
+msgid ""
+"If what is MODES, nothing will be enforced, since it would\n"
+"enforce modes that the current ircd does not support. If +R is\n"
+"specified for what, an equalivant of channelmode +R on\n"
+"other ircds will be enforced. All users that are in the channel\n"
+"but have not identified for their nickname will be kicked and\n"
+"banned from the channel."
+msgstr ""
+"Wenn was MODES ist, wird nichts erzwungen weil es MODES seine\n"
+"kцnnen die dein IRCD nicht unterstьtzt. Wenn was +R ist\n"
+"oder ein Modes was auf ein anderen IRCD gleich +R ist, wird es\n"
+"erzwungen. Alle User die nicht fьr deren Nicknamen identifiziert\n"
+"sind werden aus den Channel gekickt und gebannt."
+
+#: ../cs_enforce.cpp:176 ../cs_enforce.cpp:208
+msgid "Syntax: ENFORCE channel [what]"
+msgstr "Syntax: ENFORCE Channel [was]"
diff --git a/modules/extra/language/cs_enforce.it_IT.po b/modules/extra/language/cs_enforce.it_IT.po
new file mode 100644
index 000000000..98605397c
--- /dev/null
+++ b/modules/extra/language/cs_enforce.it_IT.po
@@ -0,0 +1,85 @@
+# Italian translations for cs_enforce
+# Traduzioni italiane per il cs_enforce
+# Copyright (C) 2011 Anope Team
+# This file is distributed under the same license as Anope IRC Services
+# Adam <adam@anope.org>, 2011.
+#
+msgid ""
+msgstr ""
+"Project-Id-Version: Anope\n"
+"Report-Msgid-Bugs-To: \n"
+"POT-Creation-Date: 2011-02-04 03:41-0500\n"
+"PO-Revision-Date: 2010-09-25 21:55-0400\n"
+"Last-Translator: Adam <adam@anope.org>\n"
+"Language-Team: Italian\n"
+"MIME-Version: 1.0\n"
+"Content-Type: text/plain; charset=ISO-8859-1\n"
+"Content-Transfer-Encoding: 8bit\n"
+"Plural-Forms: nplurals=2; plural=(n != 1);\n"
+
+#: ../cs_enforce.cpp:213
+msgid " ENFORCE Enforce various channel modes and set options"
+msgstr " ENFORCE Forza diversi modi di canale ed opzioni SET"
+
+#: ../cs_enforce.cpp:178
+msgid ""
+"Enforce various channel modes and set options. The channel\n"
+"option indicates what channel to enforce the modes and options\n"
+"on. The what option indicates what modes and options to\n"
+"enforce, and can be any of SET, SECUREOPS, RESTRICTED, MODES,\n"
+"or +R. When left out, it defaults to SET.\n"
+" \n"
+"If what is SET, it will enforce SECUREOPS and RESTRICTED\n"
+"on the users currently in the channel, if they are set. Give\n"
+"SECUREOPS to enforce the SECUREOPS option, even if it is not\n"
+"enabled. Use RESTRICTED to enfore the RESTRICTED option, also\n"
+"if it's not enabled."
+msgstr ""
+"Forza diversi modi di canale ed opzioni SET. Il parametro canale\n"
+"indica il canale sul quale forzare i modi e le opzioni. Il parametro\n"
+"cosa indica i modi e le opzioni da forzare, e possono essere\n"
+"qualsiasi delle opzioni SET, SECUREOPS, RESTRICTED, MODES, o +R.\n"
+"Se non specificato, viene sottointeso SET.\n"
+" \n"
+"Se cosa и SET, forzerа SECUREOPS e RESTRICTED sugli utenti\n"
+"attualmente nel canale, se sono impostati. Specifica SECUREOPS per\n"
+"forzare l'opzione SECUREOPS, anche se non и attivata. Specifica\n"
+"RESTRICTED per forzare l'opzione RESTRICTED, anche se non и\n"
+"attivata."
+
+#: ../cs_enforce.cpp:145 ../cs_enforce.cpp:150 ../cs_enforce.cpp:155
+#: ../cs_enforce.cpp:160 ../cs_enforce.cpp:165
+#, c-format
+msgid "Enforced %s"
+msgstr "Forzato %s"
+
+#: ../cs_enforce.cpp:191
+msgid ""
+"If what is MODES, it will enforce channelmode +R if it is\n"
+"set. If +R is specified for what, the +R channelmode will\n"
+"also be enforced, but even if it is not set. If it is not set,\n"
+"users will be banned to ensure they don't just rejoin."
+msgstr ""
+"Se cosa и MODES, forzerа il modo del canale +R se и impostato.\n"
+"Se +R и specificato per cosa, il modo del canale +R verrа\n"
+"forzato, anche se non и impostato. Se non и impostato, gli utenti\n"
+"verranno bannati per assicurare che non rientrino semplicemente."
+
+#: ../cs_enforce.cpp:196
+msgid ""
+"If what is MODES, nothing will be enforced, since it would\n"
+"enforce modes that the current ircd does not support. If +R is\n"
+"specified for what, an equalivant of channelmode +R on\n"
+"other ircds will be enforced. All users that are in the channel\n"
+"but have not identified for their nickname will be kicked and\n"
+"banned from the channel."
+msgstr ""
+"Se cosa и MODES, niente verrа forzato, siccome forzerebbe\n"
+"dei modi che l'ircd in uso non supporterebbe. Se +R и specificato\n"
+"per cosa, un modo equivalente a +R sui altri ircd verrа\n"
+"forzato. Tutti gli utenti presenti nel canale ma non identificati\n"
+"per il loro nickname verranno bannati ed espulsi dal canale."
+
+#: ../cs_enforce.cpp:176 ../cs_enforce.cpp:208
+msgid "Syntax: ENFORCE channel [what]"
+msgstr "Sintassi: ENFORCE canale [cosa]"
diff --git a/modules/extra/language/cs_enforce.nl_NL.po b/modules/extra/language/cs_enforce.nl_NL.po
new file mode 100644
index 000000000..e791db46d
--- /dev/null
+++ b/modules/extra/language/cs_enforce.nl_NL.po
@@ -0,0 +1,88 @@
+# Dutch translations for cs_enforce
+# Engelse vertalingen voor het cs_enforce
+# Copyright (C) 2011 Anope Team
+# This file is distributed under the same license as the Anope IRC Services
+# Adam <adam@anope.org>, 2011.
+#
+msgid ""
+msgstr ""
+"Project-Id-Version: Anope\n"
+"Report-Msgid-Bugs-To: \n"
+"POT-Creation-Date: 2011-02-04 03:41-0500\n"
+"PO-Revision-Date: 2010-09-25 21:07-0400\n"
+"Last-Translator: Adam <adam@anope.org>\n"
+"Language-Team: Dutch\n"
+"MIME-Version: 1.0\n"
+"Content-Type: text/plain; charset=ISO-8859-1\n"
+"Content-Transfer-Encoding: 8bit\n"
+"Plural-Forms: nplurals=2; plural=(n != 1);\n"
+
+#: ../cs_enforce.cpp:213
+msgid " ENFORCE Enforce various channel modes and set options"
+msgstr " ENFORCE Forceer enkele kanaalmodes en set-opties"
+
+#: ../cs_enforce.cpp:178
+msgid ""
+"Enforce various channel modes and set options. The channel\n"
+"option indicates what channel to enforce the modes and options\n"
+"on. The what option indicates what modes and options to\n"
+"enforce, and can be any of SET, SECUREOPS, RESTRICTED, MODES,\n"
+"or +R. When left out, it defaults to SET.\n"
+" \n"
+"If what is SET, it will enforce SECUREOPS and RESTRICTED\n"
+"on the users currently in the channel, if they are set. Give\n"
+"SECUREOPS to enforce the SECUREOPS option, even if it is not\n"
+"enabled. Use RESTRICTED to enfore the RESTRICTED option, also\n"
+"if it's not enabled."
+msgstr ""
+"Forceer enkele kannalmodes en set-opties. De kanaal optie\n"
+"geeft aan op welk kanaal de modes en opties geforceerd moeten\n"
+"worden. De wat optie geeft aan welke modes en opties\n"
+"geforceerd moeten worden; dit kan SET, SECUREOPS, RESTRICTED,\n"
+"MODES, of +R zijn. Indien weggelaten is dit standaard SET.\n"
+" \n"
+"Als er voor wat SET wordt ingevuld, zullen SECUREOPS en\n"
+"RESTRICTED geforceerd worden op de gebruikers in het kanaal,\n"
+"maar alleen als die opties aangezet zijn voor het kanaal. Als\n"
+"SECUREOPS of RESTRICTED wordt gegeven voor wat zal die optie\n"
+"altijd geforceerd worden, ook als die niet is aangezet."
+
+#: ../cs_enforce.cpp:145 ../cs_enforce.cpp:150 ../cs_enforce.cpp:155
+#: ../cs_enforce.cpp:160 ../cs_enforce.cpp:165
+#, c-format
+msgid "Enforced %s"
+msgstr ""
+
+#: ../cs_enforce.cpp:191
+msgid ""
+"If what is MODES, it will enforce channelmode +R if it is\n"
+"set. If +R is specified for what, the +R channelmode will\n"
+"also be enforced, but even if it is not set. If it is not set,\n"
+"users will be banned to ensure they don't just rejoin."
+msgstr ""
+"Als er voor wat MODES wordt ingevuld, zal kanaalmode +R worden\n"
+"geforceerd, als die op het kanaal aan staat. Als +R wordt ingevuld,\n"
+"zal kanaalmode +R worden geforceerd, maar ook als die niet aanstaat voor het "
+"kanaal. Als +R niet aan staat, zullen alle ook\n"
+"gebanned worden om te zorgen dat ze niet opnieuw het kanaal binnen\n"
+"kunnen komen."
+
+#: ../cs_enforce.cpp:196
+msgid ""
+"If what is MODES, nothing will be enforced, since it would\n"
+"enforce modes that the current ircd does not support. If +R is\n"
+"specified for what, an equalivant of channelmode +R on\n"
+"other ircds will be enforced. All users that are in the channel\n"
+"but have not identified for their nickname will be kicked and\n"
+"banned from the channel."
+msgstr ""
+"Als er voor wat MODES wordt ingevuld, zal er niks gebeuren.\n"
+"Normaal gesproken wordt er een kanaalmode geforceerd die op deze\n"
+"server niet ondersteund wordt. Als +R wordt ingevuld voor wat\n"
+"zullen alle gebruikers die in het kanaal zitten maar zich niet\n"
+"hebben geidentificeerd voor hun nick uit het kanaal gekicked en\n"
+"verbannen worden."
+
+#: ../cs_enforce.cpp:176 ../cs_enforce.cpp:208
+msgid "Syntax: ENFORCE channel [what]"
+msgstr "Syntax: ENFORCE kanaal [wat]"
diff --git a/modules/extra/language/cs_enforce.pot b/modules/extra/language/cs_enforce.pot
new file mode 100644
index 000000000..e3604eb44
--- /dev/null
+++ b/modules/extra/language/cs_enforce.pot
@@ -0,0 +1,64 @@
+# SOME DESCRIPTIVE TITLE.
+# Copyright (C) YEAR THE PACKAGE'S COPYRIGHT HOLDER
+# This file is distributed under the same license as the PACKAGE package.
+# FIRST AUTHOR <EMAIL@ADDRESS>, YEAR.
+#
+#, fuzzy
+msgid ""
+msgstr ""
+"Project-Id-Version: PACKAGE VERSION\n"
+"Report-Msgid-Bugs-To: \n"
+"POT-Creation-Date: 2011-02-04 03:41-0500\n"
+"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
+"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
+"Language-Team: LANGUAGE <LL@li.org>\n"
+"MIME-Version: 1.0\n"
+"Content-Type: text/plain; charset=CHARSET\n"
+"Content-Transfer-Encoding: 8bit\n"
+
+#: ../cs_enforce.cpp:213
+msgid " ENFORCE Enforce various channel modes and set options"
+msgstr ""
+
+#: ../cs_enforce.cpp:178
+msgid ""
+"Enforce various channel modes and set options. The channel\n"
+"option indicates what channel to enforce the modes and options\n"
+"on. The what option indicates what modes and options to\n"
+"enforce, and can be any of SET, SECUREOPS, RESTRICTED, MODES,\n"
+"or +R. When left out, it defaults to SET.\n"
+" \n"
+"If what is SET, it will enforce SECUREOPS and RESTRICTED\n"
+"on the users currently in the channel, if they are set. Give\n"
+"SECUREOPS to enforce the SECUREOPS option, even if it is not\n"
+"enabled. Use RESTRICTED to enfore the RESTRICTED option, also\n"
+"if it's not enabled."
+msgstr ""
+
+#: ../cs_enforce.cpp:145 ../cs_enforce.cpp:150 ../cs_enforce.cpp:155
+#: ../cs_enforce.cpp:160 ../cs_enforce.cpp:165
+#, c-format
+msgid "Enforced %s"
+msgstr ""
+
+#: ../cs_enforce.cpp:191
+msgid ""
+"If what is MODES, it will enforce channelmode +R if it is\n"
+"set. If +R is specified for what, the +R channelmode will\n"
+"also be enforced, but even if it is not set. If it is not set,\n"
+"users will be banned to ensure they don't just rejoin."
+msgstr ""
+
+#: ../cs_enforce.cpp:196
+msgid ""
+"If what is MODES, nothing will be enforced, since it would\n"
+"enforce modes that the current ircd does not support. If +R is\n"
+"specified for what, an equalivant of channelmode +R on\n"
+"other ircds will be enforced. All users that are in the channel\n"
+"but have not identified for their nickname will be kicked and\n"
+"banned from the channel."
+msgstr ""
+
+#: ../cs_enforce.cpp:176 ../cs_enforce.cpp:208
+msgid "Syntax: ENFORCE channel [what]"
+msgstr ""
diff --git a/modules/extra/language/cs_enforce.pt_PT.po b/modules/extra/language/cs_enforce.pt_PT.po
new file mode 100644
index 000000000..864db1f96
--- /dev/null
+++ b/modules/extra/language/cs_enforce.pt_PT.po
@@ -0,0 +1,87 @@
+# Portuguese translations for cs_enforce
+# Copyright (C) 2011 Anope Team
+# This file is distributed under the same license as the Anope IRC Services
+# Adam <adam@anope.org>, 2011.
+#
+msgid ""
+msgstr ""
+"Project-Id-Version: Anope\n"
+"Report-Msgid-Bugs-To: \n"
+"POT-Creation-Date: 2011-02-04 03:41-0500\n"
+"PO-Revision-Date: 2010-09-25 21:24-0400\n"
+"Last-Translator: Adam <adam@anope.org>\n"
+"Language-Team: Portuguese\n"
+"MIME-Version: 1.0\n"
+"Content-Type: text/plain; charset=ISO-8859-1\n"
+"Content-Transfer-Encoding: 8bit\n"
+"Plural-Forms: nplurals=2; plural=(n != 1);\n"
+
+#: ../cs_enforce.cpp:213
+msgid " ENFORCE Enforce various channel modes and set options"
+msgstr ""
+" ENFORCE Verifica o cumprimento de vбrios modos de canal e opзхes "
+"ajustadas"
+
+#: ../cs_enforce.cpp:178
+msgid ""
+"Enforce various channel modes and set options. The channel\n"
+"option indicates what channel to enforce the modes and options\n"
+"on. The what option indicates what modes and options to\n"
+"enforce, and can be any of SET, SECUREOPS, RESTRICTED, MODES,\n"
+"or +R. When left out, it defaults to SET.\n"
+" \n"
+"If what is SET, it will enforce SECUREOPS and RESTRICTED\n"
+"on the users currently in the channel, if they are set. Give\n"
+"SECUREOPS to enforce the SECUREOPS option, even if it is not\n"
+"enabled. Use RESTRICTED to enfore the RESTRICTED option, also\n"
+"if it's not enabled."
+msgstr ""
+"Verifica o cumprimento de vбrios modos de canal e opзхes ajustadas.\n"
+"O campo canal indica qual canal deve ter os modos e opзхes verificadas\n"
+"O campo opзгo indica quais modos e opзхes devem ser verificadas,\n"
+"e pode ser: SET, SECUREOPS, RESTRICTED, MODES ou +R\n"
+"Quando deixado em branco, o padrгo й SET.\n"
+" \n"
+"Se opзгo for SET, serгo verificadas as opзхes SECUREOPS e RESTRICTED\n"
+"para usuбrios que estiverem no canal, caso elas estejam ativadas. Use\n"
+"SECUREOPS para verificar a opзгo SECUREOPS, mesmo que ela nгo esteja "
+"ativada\n"
+"Use RESTRICTED para verificar a opзгo RESTRICTED, mesmo que ela nгo esteja\n"
+"ativada."
+
+#: ../cs_enforce.cpp:145 ../cs_enforce.cpp:150 ../cs_enforce.cpp:155
+#: ../cs_enforce.cpp:160 ../cs_enforce.cpp:165
+#, c-format
+msgid "Enforced %s"
+msgstr "Verificado %s"
+
+#: ../cs_enforce.cpp:191
+msgid ""
+"If what is MODES, it will enforce channelmode +R if it is\n"
+"set. If +R is specified for what, the +R channelmode will\n"
+"also be enforced, but even if it is not set. If it is not set,\n"
+"users will be banned to ensure they don't just rejoin."
+msgstr ""
+"Se opзгo for MODES, serб verificado o modo de canal +R caso ele\n"
+"esteja ativado. Se +R for especificado para opзгo, o modo de canal\n"
+"+R tambйm serб verificado, mesmo que ele nгo esteja ativado. Se ele nгo\n"
+"estiver ativado, os usuбrios serгo banidos para evitar que reentrem no canal."
+
+#: ../cs_enforce.cpp:196
+msgid ""
+"If what is MODES, nothing will be enforced, since it would\n"
+"enforce modes that the current ircd does not support. If +R is\n"
+"specified for what, an equalivant of channelmode +R on\n"
+"other ircds will be enforced. All users that are in the channel\n"
+"but have not identified for their nickname will be kicked and\n"
+"banned from the channel."
+msgstr ""
+"Se opзгo for MODES, nada serб verificado, visto que isto poderia\n"
+"verificar modos que o IRCd atual nгo suporta. Se +R for especificado\n"
+"para opзгo, um equivalente ao modo de canal +R em outros IRCds\n"
+"serб verificado. Todos os usuбrios que estгo no canal, mas nгo estejam\n"
+"identificados para seus nicks serгo kickados e banidos do canal."
+
+#: ../cs_enforce.cpp:176 ../cs_enforce.cpp:208
+msgid "Syntax: ENFORCE channel [what]"
+msgstr "Sintaxe: ENFORCE canal [opзгo]"
diff --git a/modules/extra/language/cs_enforce.ru_RU.po b/modules/extra/language/cs_enforce.ru_RU.po
new file mode 100644
index 000000000..67032f069
--- /dev/null
+++ b/modules/extra/language/cs_enforce.ru_RU.po
@@ -0,0 +1,89 @@
+# Russian translations for cs_enforce
+# ?????????? ???????? ??? ?????? cs_enforce
+# Copyright (C) 2011 Anope Team
+# This file is distributed under the same license as Anope IRC Services
+# Adam <adam@anope.org>, 2011.
+#
+msgid ""
+msgstr ""
+"Project-Id-Version: Anope\n"
+"Report-Msgid-Bugs-To: \n"
+"POT-Creation-Date: 2011-02-04 03:41-0500\n"
+"PO-Revision-Date: 2010-09-25 21:38-0400\n"
+"Last-Translator: Adam <adam@anope.org>\n"
+"Language-Team: Russian\n"
+"MIME-Version: 1.0\n"
+"Content-Type: text/plain; charset=ISO-8859-1\n"
+"Content-Transfer-Encoding: 8bit\n"
+"Plural-Forms: nplurals=3; plural=(n%10==1 && n%100!=11 ? 0 : n%10>=2 && n%"
+"10<=4 && (n%100<10 || n%100>=20) ? 1 : 2);\n"
+
+#: ../cs_enforce.cpp:213
+msgid " ENFORCE Enforce various channel modes and set options"
+msgstr ""
+" ENFORCE Перепроверка и установка различных режимов и опций канала"
+
+#: ../cs_enforce.cpp:178
+msgid ""
+"Enforce various channel modes and set options. The channel\n"
+"option indicates what channel to enforce the modes and options\n"
+"on. The what option indicates what modes and options to\n"
+"enforce, and can be any of SET, SECUREOPS, RESTRICTED, MODES,\n"
+"or +R. When left out, it defaults to SET.\n"
+" \n"
+"If what is SET, it will enforce SECUREOPS and RESTRICTED\n"
+"on the users currently in the channel, if they are set. Give\n"
+"SECUREOPS to enforce the SECUREOPS option, even if it is not\n"
+"enabled. Use RESTRICTED to enfore the RESTRICTED option, also\n"
+"if it's not enabled."
+msgstr ""
+"Перепроверка и установка различных режимов и опций канала.\n"
+"Параметр указывает какие опции или режимы канала должны быть\n"
+"перепроверены. В качестве параметра могут быть указаны: SET, SECUREOPS,\n"
+"RESTRICTED, MODES, или +R. Если параметр не указан, по-умолчанию будет SET.\n"
+" \n"
+"Если в качестве параметра указано SET, будут перепроверены опции\n"
+"SECUREOPS и RESTRICTED относительно пользователей на указанном канале\n"
+"(при условии, что опции включены). Отдельно указанный параметр SECUREOPS\n"
+"применит опцию SECUREOPS (даже если она НЕ установлена). Параметр\n"
+"RESTRICTED применит опцию RESTRICTED (даже если она НЕ установлена)"
+
+#: ../cs_enforce.cpp:145 ../cs_enforce.cpp:150 ../cs_enforce.cpp:155
+#: ../cs_enforce.cpp:160 ../cs_enforce.cpp:165
+#, c-format
+msgid "Enforced %s"
+msgstr "Перепроверено: %s"
+
+#: ../cs_enforce.cpp:191
+msgid ""
+"If what is MODES, it will enforce channelmode +R if it is\n"
+"set. If +R is specified for what, the +R channelmode will\n"
+"also be enforced, but even if it is not set. If it is not set,\n"
+"users will be banned to ensure they don't just rejoin."
+msgstr ""
+"Если в качестве параметра указано MODES, будет перепроверен режим +R\n"
+"(если он установлен). Отдельно указанный параметр +R применит\n"
+"канальный режим +R, даже если он не установлен, и забанит всех "
+"пользователей,\n"
+"которые не идентифицировались к своему нику или не имеют зарегистрированного "
+"ника."
+
+#: ../cs_enforce.cpp:196
+msgid ""
+"If what is MODES, nothing will be enforced, since it would\n"
+"enforce modes that the current ircd does not support. If +R is\n"
+"specified for what, an equalivant of channelmode +R on\n"
+"other ircds will be enforced. All users that are in the channel\n"
+"but have not identified for their nickname will be kicked and\n"
+"banned from the channel."
+msgstr ""
+"Если в качестве параметра указано MODES, перепроверка осуществлена\n"
+"НЕ БУДЕТ, так как текущий IRCD не поддерживает необходимые режимы.\n"
+"Отдельно указанный параметр +R применит канальный режим, эквивалентный\n"
+"режиму +R и забанит всех пользователей, которые не идентифицировались к "
+"своему\n"
+"нику или не имеют зарегистрированного ника."
+
+#: ../cs_enforce.cpp:176 ../cs_enforce.cpp:208
+msgid "Syntax: ENFORCE channel [what]"
+msgstr "Синтаксис: ENFORCE #канал параметр"
diff --git a/modules/extra/language/cs_entrymsg.pot b/modules/extra/language/cs_entrymsg.pot
new file mode 100644
index 000000000..756bb439c
--- /dev/null
+++ b/modules/extra/language/cs_entrymsg.pot
@@ -0,0 +1,71 @@
+# SOME DESCRIPTIVE TITLE.
+# Copyright (C) YEAR THE PACKAGE'S COPYRIGHT HOLDER
+# This file is distributed under the same license as the PACKAGE package.
+# FIRST AUTHOR <EMAIL@ADDRESS>, YEAR.
+#
+#, fuzzy
+msgid ""
+msgstr ""
+"Project-Id-Version: PACKAGE VERSION\n"
+"Report-Msgid-Bugs-To: \n"
+"POT-Creation-Date: 2011-02-04 03:41-0500\n"
+"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
+"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
+"Language-Team: LANGUAGE <LL@li.org>\n"
+"MIME-Version: 1.0\n"
+"Content-Type: text/plain; charset=CHARSET\n"
+"Content-Transfer-Encoding: 8bit\n"
+
+#: ../cs_entrymsg.cpp:149
+msgid " ENTRYMSG Manage the channel's entrymsgs"
+msgstr ""
+
+#: ../cs_entrymsg.cpp:136
+msgid "ENTRYMSG channel {ADD|DEL|LIST|CLEAR} [message|num]"
+msgstr ""
+
+#: ../cs_entrymsg.cpp:44
+msgid "End of entry message list."
+msgstr ""
+
+#: ../cs_entrymsg.cpp:77
+#, c-format
+msgid "Entry message %i for %s deleted."
+msgstr ""
+
+#: ../cs_entrymsg.cpp:80
+#, c-format
+msgid "Entry message %s not found on channel %s."
+msgstr ""
+
+#: ../cs_entrymsg.cpp:61
+#, c-format
+msgid "Entry message added to %s"
+msgstr ""
+
+#: ../cs_entrymsg.cpp:47 ../cs_entrymsg.cpp:83
+#, c-format
+msgid "Entry message list for %s is empty."
+msgstr ""
+
+#: ../cs_entrymsg.cpp:41
+#, c-format
+msgid "Entry message list for %s:"
+msgstr ""
+
+#: ../cs_entrymsg.cpp:89
+#, c-format
+msgid "Entry messages for %s have been cleared."
+msgstr ""
+
+#: ../cs_entrymsg.cpp:141
+msgid ""
+"Syntax: ENTRYMSG channel {ADD|DEL|LIST|CLEAR} [message|num]\n"
+" \n"
+"Controls what messages will be sent to users when they join the channel."
+msgstr ""
+
+#: ../cs_entrymsg.cpp:56
+#, c-format
+msgid "The entry message list for %s is full."
+msgstr ""
diff --git a/modules/extra/language/cs_tban.de_DE.po b/modules/extra/language/cs_tban.de_DE.po
new file mode 100644
index 000000000..56980dee0
--- /dev/null
+++ b/modules/extra/language/cs_tban.de_DE.po
@@ -0,0 +1,39 @@
+# German translations for cs_tban
+# German messages for cs_tban
+# Copyright (C) 2011 Anope Team
+# This file is distributed under the same license as the Anope IRC Services
+# Adam <adam@anope.org>, 2011.
+#
+msgid ""
+msgstr ""
+"Project-Id-Version: Anope\n"
+"Report-Msgid-Bugs-To: \n"
+"POT-Creation-Date: 2011-02-04 03:41-0500\n"
+"PO-Revision-Date: 2010-09-26 00:16-0400\n"
+"Last-Translator: Adam <adam@anope.org>\n"
+"Language-Team: German\n"
+"MIME-Version: 1.0\n"
+"Content-Type: text/plain; charset=ISO-8859-1\n"
+"Content-Transfer-Encoding: 8bit\n"
+"Plural-Forms: nplurals=2; plural=(n != 1);\n"
+
+#: ../cs_tban.cpp:106
+msgid " TBAN Bans the user for a given length of time"
+msgstr " TBAN Bant ein User fьr eine bestimmte Zeit aus ein Channel"
+
+#: ../cs_tban.cpp:83
+#, c-format
+msgid "%s banned from %s, will auto-expire in %s"
+msgstr "%s gebannt von %s, wird auto-auslaufen in %s"
+
+#: ../cs_tban.cpp:93
+msgid ""
+"Bans the given user from a channel for a specified length of\n"
+"time. If the ban is removed before by hand, it will NOT be replaced."
+msgstr ""
+"Bant ein User fьr eine bestimmte Zeit aus ein Channel\n"
+"Wenn der Ban manuell entfernt wird, wird es NICHT ersetzt."
+
+#: ../cs_tban.cpp:101
+msgid "Syntax: TBAN channel nick time"
+msgstr "Syntax: TBAN Channel Nickname Zeit"
diff --git a/modules/extra/language/cs_tban.it_IT.po b/modules/extra/language/cs_tban.it_IT.po
new file mode 100644
index 000000000..9f7797eba
--- /dev/null
+++ b/modules/extra/language/cs_tban.it_IT.po
@@ -0,0 +1,40 @@
+# Italian translations for cs_tban
+# Traduzioni italiane per il cs_tban
+# Copyright (C) 2011 Anope Team
+# This file is distributed under the same license as the Anope IRC Services
+# Adam <adam@anope.org>, 2011.
+#
+msgid ""
+msgstr ""
+"Project-Id-Version: Anope\n"
+"Report-Msgid-Bugs-To: \n"
+"POT-Creation-Date: 2011-02-04 03:41-0500\n"
+"PO-Revision-Date: 2010-09-26 00:22-0400\n"
+"Last-Translator: Adam <adam@anope.org>\n"
+"Language-Team: Italian\n"
+"MIME-Version: 1.0\n"
+"Content-Type: text/plain; charset=ISO-8859-1\n"
+"Content-Transfer-Encoding: 8bit\n"
+"Plural-Forms: nplurals=2; plural=(n != 1);\n"
+
+#: ../cs_tban.cpp:106
+msgid " TBAN Bans the user for a given length of time"
+msgstr " TBAN Banna l'utente per un periodo di tempo specificato"
+
+#: ../cs_tban.cpp:83
+#, c-format
+msgid "%s banned from %s, will auto-expire in %s"
+msgstr "%s bannato da %s, scadrа automaticamente tra %s"
+
+#: ../cs_tban.cpp:93
+msgid ""
+"Bans the given user from a channel for a specified length of\n"
+"time. If the ban is removed before by hand, it will NOT be replaced."
+msgstr ""
+"Banna l'utente specificato da un canale per un periodo di tempo\n"
+"specificato. Se il ban viene rimosso a mano prima della scadenza, NON verrа "
+"rimpiazzato."
+
+#: ../cs_tban.cpp:101
+msgid "Syntax: TBAN channel nick time"
+msgstr "Sintassi: TBAN canale nick tempo"
diff --git a/modules/extra/language/cs_tban.nl_NL.po b/modules/extra/language/cs_tban.nl_NL.po
new file mode 100644
index 000000000..9439b7408
--- /dev/null
+++ b/modules/extra/language/cs_tban.nl_NL.po
@@ -0,0 +1,40 @@
+# Dutch translations for cs_tban
+# Engelse vertalingen voor het cs_tban
+# Copyright (C) 2011 Anope Team
+# This file is distributed under the same license as the Anope IRC Services
+# Adam <adam@anope.org>, 2011.
+#
+msgid ""
+msgstr ""
+"Project-Id-Version: Anope\n"
+"Report-Msgid-Bugs-To: \n"
+"POT-Creation-Date: 2011-02-04 03:41-0500\n"
+"PO-Revision-Date: 2010-09-26 00:15-0400\n"
+"Last-Translator: Adam <adam@anope.org>\n"
+"Language-Team: Dutch\n"
+"MIME-Version: 1.0\n"
+"Content-Type: text/plain; charset=ISO-8859-1\n"
+"Content-Transfer-Encoding: 8bit\n"
+"Plural-Forms: nplurals=2; plural=(n != 1);\n"
+
+#: ../cs_tban.cpp:106
+msgid " TBAN Bans the user for a given length of time"
+msgstr " TBAN Verban een gebruiker voor een bepaalde tijd"
+
+#: ../cs_tban.cpp:83
+#, c-format
+msgid "%s banned from %s, will auto-expire in %s"
+msgstr "%s verbannen van %s, zal verlopen in %s"
+
+#: ../cs_tban.cpp:93
+msgid ""
+"Bans the given user from a channel for a specified length of\n"
+"time. If the ban is removed before by hand, it will NOT be replaced."
+msgstr ""
+"Verbant de gegeven gebruiken van het gegeven kanaal voor de\n"
+"gegeven tijdsduur. Als de verbanning eerder wordt verwijderd,\n"
+"zal deze NIET worden vervangen."
+
+#: ../cs_tban.cpp:101
+msgid "Syntax: TBAN channel nick time"
+msgstr "Syntax: TBAN kanaal nick tijd"
diff --git a/modules/extra/language/cs_tban.pot b/modules/extra/language/cs_tban.pot
new file mode 100644
index 000000000..6717f9e2c
--- /dev/null
+++ b/modules/extra/language/cs_tban.pot
@@ -0,0 +1,36 @@
+# SOME DESCRIPTIVE TITLE.
+# Copyright (C) YEAR THE PACKAGE'S COPYRIGHT HOLDER
+# This file is distributed under the same license as the PACKAGE package.
+# FIRST AUTHOR <EMAIL@ADDRESS>, YEAR.
+#
+#, fuzzy
+msgid ""
+msgstr ""
+"Project-Id-Version: PACKAGE VERSION\n"
+"Report-Msgid-Bugs-To: \n"
+"POT-Creation-Date: 2011-02-04 03:41-0500\n"
+"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
+"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
+"Language-Team: LANGUAGE <LL@li.org>\n"
+"MIME-Version: 1.0\n"
+"Content-Type: text/plain; charset=CHARSET\n"
+"Content-Transfer-Encoding: 8bit\n"
+
+#: ../cs_tban.cpp:106
+msgid " TBAN Bans the user for a given length of time"
+msgstr ""
+
+#: ../cs_tban.cpp:83
+#, c-format
+msgid "%s banned from %s, will auto-expire in %s"
+msgstr ""
+
+#: ../cs_tban.cpp:93
+msgid ""
+"Bans the given user from a channel for a specified length of\n"
+"time. If the ban is removed before by hand, it will NOT be replaced."
+msgstr ""
+
+#: ../cs_tban.cpp:101
+msgid "Syntax: TBAN channel nick time"
+msgstr ""
diff --git a/modules/extra/language/cs_tban.pt_PT.po b/modules/extra/language/cs_tban.pt_PT.po
new file mode 100644
index 000000000..0f60ecbcf
--- /dev/null
+++ b/modules/extra/language/cs_tban.pt_PT.po
@@ -0,0 +1,39 @@
+# Portuguese translations for cs_tban
+# Copyright (C) 2011 Anope Team
+# This file is distributed under the same license as the Anope IRC Services
+# Adam <adam@anope.org>, 2011.
+#
+msgid ""
+msgstr ""
+"Project-Id-Version: Anope\n"
+"Report-Msgid-Bugs-To: \n"
+"POT-Creation-Date: 2011-02-04 03:41-0500\n"
+"PO-Revision-Date: 2010-09-26 00:18-0400\n"
+"Last-Translator: Adam <adam@anope.org>\n"
+"Language-Team: Portuguese\n"
+"MIME-Version: 1.0\n"
+"Content-Type: text/plain; charset=ISO-8859-1\n"
+"Content-Transfer-Encoding: 8bit\n"
+"Plural-Forms: nplurals=2; plural=(n != 1);\n"
+
+#: ../cs_tban.cpp:106
+msgid " TBAN Bans the user for a given length of time"
+msgstr " TBAN Bane o usuбrio por um determinado perнodo de tempo"
+
+#: ../cs_tban.cpp:83
+#, c-format
+msgid "%s banned from %s, will auto-expire in %s"
+msgstr "%s foi banido do %s, irб auto-expirar em %s"
+
+#: ../cs_tban.cpp:93
+msgid ""
+"Bans the given user from a channel for a specified length of\n"
+"time. If the ban is removed before by hand, it will NOT be replaced."
+msgstr ""
+"Bane de um canal o usuбrio especificado por um determinado perнodo de\n"
+"tempo. Se o ban for removido manualmente antes do tempo, ele nгo serб "
+"recolocado."
+
+#: ../cs_tban.cpp:101
+msgid "Syntax: TBAN channel nick time"
+msgstr "Sintaxe: TBAN canal nick tempo"
diff --git a/modules/extra/language/cs_tban.ru_RU.po b/modules/extra/language/cs_tban.ru_RU.po
new file mode 100644
index 000000000..f14c06d58
--- /dev/null
+++ b/modules/extra/language/cs_tban.ru_RU.po
@@ -0,0 +1,41 @@
+# Russian translations for cs_tban
+# ?????????? ???????? ??? ?????? cs_tban
+# Copyright (C) 2011 Anope Team
+# This file is distributed under the same license as the Anope IRC Services
+# Adam <adam@anope.org>, 2011.
+#
+msgid ""
+msgstr ""
+"Project-Id-Version: Anope\n"
+"Report-Msgid-Bugs-To: \n"
+"POT-Creation-Date: 2011-02-04 03:41-0500\n"
+"PO-Revision-Date: 2010-09-26 00:20-0400\n"
+"Last-Translator: Adam <adam@anope.org>\n"
+"Language-Team: Russian\n"
+"MIME-Version: 1.0\n"
+"Content-Type: text/plain; charset=ISO-8859-1\n"
+"Content-Transfer-Encoding: 8bit\n"
+"Plural-Forms: nplurals=3; plural=(n%10==1 && n%100!=11 ? 0 : n%10>=2 && n%"
+"10<=4 && (n%100<10 || n%100>=20) ? 1 : 2);\n"
+
+#: ../cs_tban.cpp:106
+msgid " TBAN Bans the user for a given length of time"
+msgstr " TBAN Банит пользователя на указанный промежуток времени"
+
+#: ../cs_tban.cpp:83
+#, c-format
+msgid "%s banned from %s, will auto-expire in %s"
+msgstr "Установленный бан %s на канале %s истечет через %s секунд"
+
+#: ../cs_tban.cpp:93
+msgid ""
+"Bans the given user from a channel for a specified length of\n"
+"time. If the ban is removed before by hand, it will NOT be replaced."
+msgstr ""
+"Банит пользователя на указанный промежуток времени в секундах\n"
+"Примечание: удаленный вручную (до своего истечения) бан НЕ БУДЕТ\n"
+"переустановлен сервисами автоматически!"
+
+#: ../cs_tban.cpp:101
+msgid "Syntax: TBAN channel nick time"
+msgstr "Синтаксис: TBAN #канал ник время"
diff --git a/modules/extra/language/db_mysql.pot b/modules/extra/language/db_mysql.pot
new file mode 100644
index 000000000..ac04cee49
--- /dev/null
+++ b/modules/extra/language/db_mysql.pot
@@ -0,0 +1,34 @@
+# SOME DESCRIPTIVE TITLE.
+# Copyright (C) YEAR THE PACKAGE'S COPYRIGHT HOLDER
+# This file is distributed under the same license as the PACKAGE package.
+# FIRST AUTHOR <EMAIL@ADDRESS>, YEAR.
+#
+#, fuzzy
+msgid ""
+msgstr ""
+"Project-Id-Version: PACKAGE VERSION\n"
+"Report-Msgid-Bugs-To: \n"
+"POT-Creation-Date: 2011-02-04 03:41-0500\n"
+"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
+"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
+"Language-Team: LANGUAGE <LL@li.org>\n"
+"MIME-Version: 1.0\n"
+"Content-Type: text/plain; charset=CHARSET\n"
+"Content-Transfer-Encoding: 8bit\n"
+
+#: ../db_mysql.cpp:142
+msgid " SQLSYNC Import your databases to SQL"
+msgstr ""
+
+#: ../db_mysql.cpp:132
+msgid ""
+"Syntax: SQLSYNC\n"
+" \n"
+"This command syncs your databases with SQL. You should\n"
+"only have to execute this command once, when you initially\n"
+"import your databases into SQL."
+msgstr ""
+
+#: ../db_mysql.cpp:1400
+msgid "Updating MySQL."
+msgstr ""
diff --git a/modules/extra/language/hs_request.it_IT.po b/modules/extra/language/hs_request.it_IT.po
new file mode 100644
index 000000000..0f50b0596
--- /dev/null
+++ b/modules/extra/language/hs_request.it_IT.po
@@ -0,0 +1,135 @@
+# Italian translations for hs_request
+# Traduzioni italiane per il hs_request
+# Copyright (C) 2011 Anope Team
+# This file is distributed under the same license as Anope IRC Services
+# Adam <adam@anope.org>, 2011.
+#
+msgid ""
+msgstr ""
+"Project-Id-Version: Anope\n"
+"Report-Msgid-Bugs-To: \n"
+"POT-Creation-Date: 2011-02-04 03:41-0500\n"
+"PO-Revision-Date: 2010-09-25 23:42-0400\n"
+"Last-Translator: Adam <adam@anope.org>\n"
+"Language-Team: Italian\n"
+"MIME-Version: 1.0\n"
+"Content-Type: text/plain; charset=ISO-8859-1\n"
+"Content-Transfer-Encoding: 8bit\n"
+"Plural-Forms: nplurals=2; plural=(n != 1);\n"
+
+#: ../hs_request.cpp:193
+msgid ""
+" ACTIVATE Approve the requested vHost of a user\n"
+" REJECT Reject the requested vHost of a user\n"
+" WAITING Convenience command for LIST +req"
+msgstr ""
+" ACTIVATE Approva il vHost richiesto di un utente\n"
+" REJECT Rifiuta il vHost richiesto di un utente\n"
+" WAITING Comando per LIST +req"
+
+#: ../hs_request.cpp:132
+msgid " REQUEST Request a vHost for your nick"
+msgstr " REQUEST Richiede un vHost per il tuo nick"
+
+#: ../hs_request.cpp:274
+#, c-format
+msgid "#%d Nick:%s, vhost:%s (%s - %s)"
+msgstr ""
+
+#: ../hs_request.cpp:272
+#, c-format
+msgid "#%d Nick:%s, vhost:%s@%s (%s - %s)"
+msgstr ""
+
+#: ../hs_request.cpp:181 ../hs_request.cpp:245
+msgid "A memo informing the user will also be sent."
+msgstr "Viene inviato un memo per informare l'utente."
+
+#: ../hs_request.cpp:179
+msgid "Activate the requested vHost for the given nick."
+msgstr "Attiva il vHost richiesto per il nick specificato."
+
+#: ../hs_request.cpp:278
+#, c-format
+msgid "Displayed all records (Count: %d)"
+msgstr ""
+
+#: ../hs_request.cpp:167 ../hs_request.cpp:234
+#, c-format
+msgid "No request for nick %s found."
+msgstr "Nessuna richiesta trovata per il nick %s."
+
+#: ../hs_request.cpp:102
+#, c-format
+msgid "Please wait %d seconds before requesting a new vHost"
+msgstr "Prego attendere %d secondi prima di richiedere un nuovo vHost"
+
+#: ../hs_request.cpp:243
+msgid "Reject the requested vHost for the given nick."
+msgstr "Rifiuta il vHost richiesto per il nick specificato."
+
+#: ../hs_request.cpp:119
+msgid ""
+"Request the given vHost to be actived for your nick by the\n"
+"network administrators. Please be patient while your request\n"
+"is being considered."
+msgstr ""
+"Richiede l'attivazione del vHost specificato per il tuo nick da parte\n"
+"degli amministratori di rete. Sei pregato di pazientare finchи la tua\n"
+"richiesta viene elaborata."
+
+#: ../hs_request.cpp:177 ../hs_request.cpp:188
+msgid "Syntax: ACTIVATE nick"
+msgstr "Sintassi: ACTIVATE nick"
+
+#: ../hs_request.cpp:241 ../hs_request.cpp:252
+msgid "Syntax: REJECT nick"
+msgstr "Sintassi: REJECT nick"
+
+#: ../hs_request.cpp:65 ../hs_request.cpp:117 ../hs_request.cpp:127
+msgid "Syntax: REQUEST vhost"
+msgstr "Sintassi: REQUEST vhost"
+
+#: ../hs_request.cpp:307
+msgid "Syntax: WAITING"
+msgstr "Sintassi: WAITING"
+
+#: ../hs_request.cpp:309
+msgid ""
+"This command is provided for convenience. It is essentially\n"
+"the same as performing a LIST +req ."
+msgstr ""
+"Questo comando и per comoditа. Praticamente и la stessa cosa che\n"
+"eseguire un LIST +req ."
+
+#: ../hs_request.cpp:108
+msgid "Your vHost has been requested"
+msgstr "Il tuo vHost и stato richiesto"
+
+#: ../hs_request.cpp:159
+msgid "[auto memo] Your requested vHost has been approved."
+msgstr "[auto memo] Il vHost da te richiesto и stato approvato."
+
+#: ../hs_request.cpp:225
+msgid "[auto memo] Your requested vHost has been rejected."
+msgstr "[auto memo] Il vHost da te richiesto и stato rifiutato."
+
+#: ../hs_request.cpp:223
+#, c-format
+msgid "[auto memo] Your requested vHost has been rejected. Reason: %s"
+msgstr "[auto memo] Il vHost da te richiesto и stato rifiutato. Motivo: %s"
+
+#: ../hs_request.cpp:443
+#, c-format
+msgid "[auto memo] vHost %s has been requested."
+msgstr "[auto memo] и stato richiesto il vHost %s."
+
+#: ../hs_request.cpp:161
+#, c-format
+msgid "vHost for %s has been activated"
+msgstr "Il vHost per %s и stato attivato"
+
+#: ../hs_request.cpp:230
+#, c-format
+msgid "vHost for %s has been rejected"
+msgstr "Il vHost per %s и stato rifiutato"
diff --git a/modules/extra/language/hs_request.nl_NL.po b/modules/extra/language/hs_request.nl_NL.po
new file mode 100644
index 000000000..59852158c
--- /dev/null
+++ b/modules/extra/language/hs_request.nl_NL.po
@@ -0,0 +1,136 @@
+# Dutch translations for hs_request
+# Engelse vertalingen voor het hs_request
+# Copyright (C) 2011 Anope Team
+# This file is distributed under the same license as Anope IRC Services
+# Adam <adam@anope.org>, 2011.
+#
+msgid ""
+msgstr ""
+"Project-Id-Version: Anope\n"
+"Report-Msgid-Bugs-To: \n"
+"POT-Creation-Date: 2011-02-04 03:41-0500\n"
+"PO-Revision-Date: 2010-09-25 22:26-0400\n"
+"Last-Translator: Adam <adam@anope.org>\n"
+"Language-Team: Dutch\n"
+"MIME-Version: 1.0\n"
+"Content-Type: text/plain; charset=ISO-8859-1\n"
+"Content-Transfer-Encoding: 8bit\n"
+"Plural-Forms: nplurals=2; plural=(n != 1);\n"
+
+#: ../hs_request.cpp:193
+msgid ""
+" ACTIVATE Approve the requested vHost of a user\n"
+" REJECT Reject the requested vHost of a user\n"
+" WAITING Convenience command for LIST +req"
+msgstr ""
+" ACTIVATE Activeer de aangevraagde vHost voor een gebruiker\n"
+" REJECT Keur de aangevraagde vHost voor een gebruiker af\n"
+" WAITING Snelkoppeling naar LIST +req"
+
+#: ../hs_request.cpp:132
+msgid " REQUEST Request a vHost for your nick"
+msgstr " REQUEST Vraag een vHost aan voor je nick"
+
+#: ../hs_request.cpp:274
+#, c-format
+msgid "#%d Nick:%s, vhost:%s (%s - %s)"
+msgstr ""
+
+#: ../hs_request.cpp:272
+#, c-format
+msgid "#%d Nick:%s, vhost:%s@%s (%s - %s)"
+msgstr ""
+
+#: ../hs_request.cpp:181 ../hs_request.cpp:245
+msgid "A memo informing the user will also be sent."
+msgstr ""
+"Een memo die de gebruiker op de hoogste stelt zal ook worden verstuurd."
+
+#: ../hs_request.cpp:179
+msgid "Activate the requested vHost for the given nick."
+msgstr "Activeer de aangevraagde vHost voor de gegeven nick."
+
+#: ../hs_request.cpp:278
+#, c-format
+msgid "Displayed all records (Count: %d)"
+msgstr ""
+
+#: ../hs_request.cpp:167 ../hs_request.cpp:234
+#, c-format
+msgid "No request for nick %s found."
+msgstr "Geen aanvraag voor nick %s gevonden."
+
+#: ../hs_request.cpp:102
+#, c-format
+msgid "Please wait %d seconds before requesting a new vHost"
+msgstr "Wacht %d seconden voor je een nieuwe vHost aanvraagt"
+
+#: ../hs_request.cpp:243
+msgid "Reject the requested vHost for the given nick."
+msgstr "Keur de aangevraagde vHost voor de gegeven nick af."
+
+#: ../hs_request.cpp:119
+msgid ""
+"Request the given vHost to be actived for your nick by the\n"
+"network administrators. Please be patient while your request\n"
+"is being considered."
+msgstr ""
+"Verzoek de gegeven vHost te activeren voor jouw nick bij de\n"
+"netwerk beheerders. Het kan even duren voordat je aanvraag\n"
+"afgehandeld wordt."
+
+#: ../hs_request.cpp:177 ../hs_request.cpp:188
+msgid "Syntax: ACTIVATE nick"
+msgstr "Gebruik: ACTIVATE nick"
+
+#: ../hs_request.cpp:241 ../hs_request.cpp:252
+msgid "Syntax: REJECT nick"
+msgstr "Gebruik: REJECT nick"
+
+#: ../hs_request.cpp:65 ../hs_request.cpp:117 ../hs_request.cpp:127
+msgid "Syntax: REQUEST vhost"
+msgstr "Gebruik: REQUEST vhost"
+
+#: ../hs_request.cpp:307
+msgid "Syntax: WAITING"
+msgstr "Gebruik: WAITING"
+
+#: ../hs_request.cpp:309
+msgid ""
+"This command is provided for convenience. It is essentially\n"
+"the same as performing a LIST +req ."
+msgstr ""
+"Dit commando is beschikbaar als handigheid. Het is simpelweg\n"
+"hetzelfde als LIST +req ."
+
+#: ../hs_request.cpp:108
+msgid "Your vHost has been requested"
+msgstr "Je vHost is aangevraagd"
+
+#: ../hs_request.cpp:159
+msgid "[auto memo] Your requested vHost has been approved."
+msgstr "[auto memo] Je aangevraagde vHost is geaccepteerd."
+
+#: ../hs_request.cpp:225
+msgid "[auto memo] Your requested vHost has been rejected."
+msgstr "[auto memo] Je aangevraagde vHost is afgekeurd."
+
+#: ../hs_request.cpp:223
+#, c-format
+msgid "[auto memo] Your requested vHost has been rejected. Reason: %s"
+msgstr "[auto memo] Je aangevraagde vHost is afgekeurd. Reden: %s"
+
+#: ../hs_request.cpp:443
+#, c-format
+msgid "[auto memo] vHost %s has been requested."
+msgstr "[auto memo] vHost %s is aangevraagd."
+
+#: ../hs_request.cpp:161
+#, c-format
+msgid "vHost for %s has been activated"
+msgstr "vHost voor %s is geactiveerd"
+
+#: ../hs_request.cpp:230
+#, c-format
+msgid "vHost for %s has been rejected"
+msgstr "vHost voor %s is afgekeurd"
diff --git a/modules/extra/language/hs_request.pot b/modules/extra/language/hs_request.pot
new file mode 100644
index 000000000..d2e0a7c35
--- /dev/null
+++ b/modules/extra/language/hs_request.pot
@@ -0,0 +1,126 @@
+# SOME DESCRIPTIVE TITLE.
+# Copyright (C) YEAR THE PACKAGE'S COPYRIGHT HOLDER
+# This file is distributed under the same license as the PACKAGE package.
+# FIRST AUTHOR <EMAIL@ADDRESS>, YEAR.
+#
+#, fuzzy
+msgid ""
+msgstr ""
+"Project-Id-Version: PACKAGE VERSION\n"
+"Report-Msgid-Bugs-To: \n"
+"POT-Creation-Date: 2011-02-04 03:41-0500\n"
+"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
+"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
+"Language-Team: LANGUAGE <LL@li.org>\n"
+"MIME-Version: 1.0\n"
+"Content-Type: text/plain; charset=CHARSET\n"
+"Content-Transfer-Encoding: 8bit\n"
+
+#: ../hs_request.cpp:193
+msgid ""
+" ACTIVATE Approve the requested vHost of a user\n"
+" REJECT Reject the requested vHost of a user\n"
+" WAITING Convenience command for LIST +req"
+msgstr ""
+
+#: ../hs_request.cpp:132
+msgid " REQUEST Request a vHost for your nick"
+msgstr ""
+
+#: ../hs_request.cpp:274
+#, c-format
+msgid "#%d Nick:%s, vhost:%s (%s - %s)"
+msgstr ""
+
+#: ../hs_request.cpp:272
+#, c-format
+msgid "#%d Nick:%s, vhost:%s@%s (%s - %s)"
+msgstr ""
+
+#: ../hs_request.cpp:181 ../hs_request.cpp:245
+msgid "A memo informing the user will also be sent."
+msgstr ""
+
+#: ../hs_request.cpp:179
+msgid "Activate the requested vHost for the given nick."
+msgstr ""
+
+#: ../hs_request.cpp:278
+#, c-format
+msgid "Displayed all records (Count: %d)"
+msgstr ""
+
+#: ../hs_request.cpp:167 ../hs_request.cpp:234
+#, c-format
+msgid "No request for nick %s found."
+msgstr ""
+
+#: ../hs_request.cpp:102
+#, c-format
+msgid "Please wait %d seconds before requesting a new vHost"
+msgstr ""
+
+#: ../hs_request.cpp:243
+msgid "Reject the requested vHost for the given nick."
+msgstr ""
+
+#: ../hs_request.cpp:119
+msgid ""
+"Request the given vHost to be actived for your nick by the\n"
+"network administrators. Please be patient while your request\n"
+"is being considered."
+msgstr ""
+
+#: ../hs_request.cpp:177 ../hs_request.cpp:188
+msgid "Syntax: ACTIVATE nick"
+msgstr ""
+
+#: ../hs_request.cpp:241 ../hs_request.cpp:252
+msgid "Syntax: REJECT nick"
+msgstr ""
+
+#: ../hs_request.cpp:65 ../hs_request.cpp:117 ../hs_request.cpp:127
+msgid "Syntax: REQUEST vhost"
+msgstr ""
+
+#: ../hs_request.cpp:307
+msgid "Syntax: WAITING"
+msgstr ""
+
+#: ../hs_request.cpp:309
+msgid ""
+"This command is provided for convenience. It is essentially\n"
+"the same as performing a LIST +req ."
+msgstr ""
+
+#: ../hs_request.cpp:108
+msgid "Your vHost has been requested"
+msgstr ""
+
+#: ../hs_request.cpp:159
+msgid "[auto memo] Your requested vHost has been approved."
+msgstr ""
+
+#: ../hs_request.cpp:225
+msgid "[auto memo] Your requested vHost has been rejected."
+msgstr ""
+
+#: ../hs_request.cpp:223
+#, c-format
+msgid "[auto memo] Your requested vHost has been rejected. Reason: %s"
+msgstr ""
+
+#: ../hs_request.cpp:443
+#, c-format
+msgid "[auto memo] vHost %s has been requested."
+msgstr ""
+
+#: ../hs_request.cpp:161
+#, c-format
+msgid "vHost for %s has been activated"
+msgstr ""
+
+#: ../hs_request.cpp:230
+#, c-format
+msgid "vHost for %s has been rejected"
+msgstr ""
diff --git a/modules/extra/language/hs_request.pt_PT.po b/modules/extra/language/hs_request.pt_PT.po
new file mode 100644
index 000000000..a9fd9844c
--- /dev/null
+++ b/modules/extra/language/hs_request.pt_PT.po
@@ -0,0 +1,134 @@
+# Portuguese translations for hs_request
+# Copyright (C) 2011 Anope Team
+# This file is distributed under the same license as Anope IRC Services
+# Adam <adam@anope.org>, 2011.
+#
+msgid ""
+msgstr ""
+"Project-Id-Version: Anope\n"
+"Report-Msgid-Bugs-To: \n"
+"POT-Creation-Date: 2011-02-04 03:41-0500\n"
+"PO-Revision-Date: 2010-09-25 22:48-0400\n"
+"Last-Translator: Adam <adam@anope.org>\n"
+"Language-Team: Portuguese\n"
+"MIME-Version: 1.0\n"
+"Content-Type: text/plain; charset=ISO-8859-1\n"
+"Content-Transfer-Encoding: 8bit\n"
+"Plural-Forms: nplurals=2; plural=(n != 1);\n"
+
+#: ../hs_request.cpp:193
+msgid ""
+" ACTIVATE Approve the requested vHost of a user\n"
+" REJECT Reject the requested vHost of a user\n"
+" WAITING Convenience command for LIST +req"
+msgstr ""
+" ACTIVATE Aprova o pedido de vHost de um usuбrio\n"
+" REJECT Recusa o pedido de vHost de um usuбrio\n"
+" WAITING Comando para LISTAR +req"
+
+#: ../hs_request.cpp:132
+msgid " REQUEST Request a vHost for your nick"
+msgstr " REQUEST Request a vHost for your nick"
+
+#: ../hs_request.cpp:274
+#, c-format
+msgid "#%d Nick:%s, vhost:%s (%s - %s)"
+msgstr ""
+
+#: ../hs_request.cpp:272
+#, c-format
+msgid "#%d Nick:%s, vhost:%s@%s (%s - %s)"
+msgstr ""
+
+#: ../hs_request.cpp:181 ../hs_request.cpp:245
+msgid "A memo informing the user will also be sent."
+msgstr "Um memo informando o usuбrio tambйm serб enviado."
+
+#: ../hs_request.cpp:179
+msgid "Activate the requested vHost for the given nick."
+msgstr "Ativa o vHost solicitado para o nick fornecido."
+
+#: ../hs_request.cpp:278
+#, c-format
+msgid "Displayed all records (Count: %d)"
+msgstr ""
+
+#: ../hs_request.cpp:167 ../hs_request.cpp:234
+#, c-format
+msgid "No request for nick %s found."
+msgstr "Nenhum pedido encontrado para o nick %s."
+
+#: ../hs_request.cpp:102
+#, c-format
+msgid "Please wait %d seconds before requesting a new vHost"
+msgstr "Por favor, espere %d segundos antes de fazer um novo pedido de vHost"
+
+#: ../hs_request.cpp:243
+msgid "Reject the requested vHost for the given nick."
+msgstr "Recusa o pedido de vHost para o nick fornecido."
+
+#: ../hs_request.cpp:119
+msgid ""
+"Request the given vHost to be actived for your nick by the\n"
+"network administrators. Please be patient while your request\n"
+"is being considered."
+msgstr ""
+"Solicita a ativaзгo do vHost fornecido em seu nick pelos\n"
+"administradores da rede. Por favor, tenha paciкncia\n"
+"enquanto seu pedido й analisado."
+
+#: ../hs_request.cpp:177 ../hs_request.cpp:188
+msgid "Syntax: ACTIVATE nick"
+msgstr "Sintaxe: ACTIVATE nick"
+
+#: ../hs_request.cpp:241 ../hs_request.cpp:252
+msgid "Syntax: REJECT nick"
+msgstr "Sintaxe: REJECT nick"
+
+#: ../hs_request.cpp:65 ../hs_request.cpp:117 ../hs_request.cpp:127
+msgid "Syntax: REQUEST vhost"
+msgstr "Sintaxe: REQUEST vhost"
+
+#: ../hs_request.cpp:307
+msgid "Syntax: WAITING"
+msgstr "Sintaxe: WAITING"
+
+#: ../hs_request.cpp:309
+msgid ""
+"This command is provided for convenience. It is essentially\n"
+"the same as performing a LIST +req ."
+msgstr ""
+"Este comando й usado por conveniкncia. Й essencialmente\n"
+"o mesmo que fazer um LIST +req"
+
+#: ../hs_request.cpp:108
+msgid "Your vHost has been requested"
+msgstr "Seu pedido de vHost foi encaminhado"
+
+#: ../hs_request.cpp:159
+msgid "[auto memo] Your requested vHost has been approved."
+msgstr "[Auto Memo] Seu pedido de vHost foi aprovado."
+
+#: ../hs_request.cpp:225
+msgid "[auto memo] Your requested vHost has been rejected."
+msgstr "[Auto Memo] Seu pedido de vHost foi recusado."
+
+#: ../hs_request.cpp:223
+#, c-format
+msgid "[auto memo] Your requested vHost has been rejected. Reason: %s"
+msgstr "[Auto Memo] Seu pedido de vHost foi recusado. Motivo: %s"
+
+#: ../hs_request.cpp:443
+#, c-format
+msgid "[auto memo] vHost %s has been requested."
+msgstr "[Auto Memo] O vHost %s foi solicitado."
+
+#: ../hs_request.cpp:161
+#, c-format
+msgid "vHost for %s has been activated"
+msgstr "O vHost para %s foi ativado"
+
+#: ../hs_request.cpp:230
+#, c-format
+msgid "vHost for %s has been rejected"
+msgstr "O vHost de %s foi recusado"
diff --git a/modules/extra/language/hs_request.ru_RU.po b/modules/extra/language/hs_request.ru_RU.po
new file mode 100644
index 000000000..646fc4714
--- /dev/null
+++ b/modules/extra/language/hs_request.ru_RU.po
@@ -0,0 +1,137 @@
+# Russian translations for hs_request
+# ?????????? ???????? ??? ?????? PACKAGE.
+# Copyright (C) 2011 Anope Team
+# This file is distributed under the same license as Anope IRC Services
+# Adam <adam@anope.org>, 2011.
+#
+msgid ""
+msgstr ""
+"Project-Id-Version: Anope\n"
+"Report-Msgid-Bugs-To: \n"
+"POT-Creation-Date: 2011-02-04 03:41-0500\n"
+"PO-Revision-Date: 2010-09-25 23:27-0400\n"
+"Last-Translator: Adam <adam@anope.org>\n"
+"Language-Team: Russian\n"
+"MIME-Version: 1.0\n"
+"Content-Type: text/plain; charset=ISO-8859-1\n"
+"Content-Transfer-Encoding: 8bit\n"
+"Plural-Forms: nplurals=3; plural=(n%10==1 && n%100!=11 ? 0 : n%10>=2 && n%"
+"10<=4 && (n%100<10 || n%100>=20) ? 1 : 2);\n"
+
+#: ../hs_request.cpp:193
+msgid ""
+" ACTIVATE Approve the requested vHost of a user\n"
+" REJECT Reject the requested vHost of a user\n"
+" WAITING Convenience command for LIST +req"
+msgstr ""
+" ACTIVATE Утвердить запрашиваемый пользователем vHost\n"
+" REJECT Отклонить запрашиваемый пользователем vHost\n"
+" WAITING Список запросов ожидающих обработки (аналог LIST +req)"
+
+#: ../hs_request.cpp:132
+msgid " REQUEST Request a vHost for your nick"
+msgstr " REQUEST Запрос на vHost для вашего текущего ника"
+
+#: ../hs_request.cpp:274
+#, c-format
+msgid "#%d Nick:%s, vhost:%s (%s - %s)"
+msgstr ""
+
+#: ../hs_request.cpp:272
+#, c-format
+msgid "#%d Nick:%s, vhost:%s@%s (%s - %s)"
+msgstr ""
+
+#: ../hs_request.cpp:181 ../hs_request.cpp:245
+msgid "A memo informing the user will also be sent."
+msgstr "Пользователю будет послано авто-уведомление об активации его запроса."
+
+#: ../hs_request.cpp:179
+msgid "Activate the requested vHost for the given nick."
+msgstr "Утвердить запрашиваемый vHost для указанного ника."
+
+#: ../hs_request.cpp:278
+#, c-format
+msgid "Displayed all records (Count: %d)"
+msgstr ""
+
+#: ../hs_request.cpp:167 ../hs_request.cpp:234
+#, c-format
+msgid "No request for nick %s found."
+msgstr "Запрос на vHost для ника %s не найден."
+
+#: ../hs_request.cpp:102
+#, c-format
+msgid "Please wait %d seconds before requesting a new vHost"
+msgstr "Пожалуйста, подождите %d секунд, прежде чем запрашивать новый vHost"
+
+#: ../hs_request.cpp:243
+msgid "Reject the requested vHost for the given nick."
+msgstr "Отклонить запрашиваемый vHost для указанного ника."
+
+#: ../hs_request.cpp:119
+msgid ""
+"Request the given vHost to be actived for your nick by the\n"
+"network administrators. Please be patient while your request\n"
+"is being considered."
+msgstr ""
+"Отправляет запрос на активацию vHost, который будет рассмотрен одним из\n"
+"администраторов сети. Просьба проявить терпение, пока запрос\n"
+"рассматривается администрацией."
+
+#: ../hs_request.cpp:177 ../hs_request.cpp:188
+msgid "Syntax: ACTIVATE nick"
+msgstr "Синтаксис: ACTIVATE ник"
+
+#: ../hs_request.cpp:241 ../hs_request.cpp:252
+msgid "Syntax: REJECT nick"
+msgstr "Синтаксис: REJECT ник"
+
+#: ../hs_request.cpp:65 ../hs_request.cpp:117 ../hs_request.cpp:127
+msgid "Syntax: REQUEST vhost"
+msgstr "Синтаксис: REQUEST vHost"
+
+#: ../hs_request.cpp:307
+msgid "Syntax: WAITING"
+msgstr "Синтаксис: WAITING"
+
+#: ../hs_request.cpp:309
+msgid ""
+"This command is provided for convenience. It is essentially\n"
+"the same as performing a LIST +req ."
+msgstr ""
+"Данная команда создана для удобства использования и выводит список "
+"запросов,\n"
+"ожидающих обработки. Аналогичная команда: LIST +req ."
+
+#: ../hs_request.cpp:108
+msgid "Your vHost has been requested"
+msgstr "Ваш запрос на vHost отправлен."
+
+#: ../hs_request.cpp:159
+msgid "[auto memo] Your requested vHost has been approved."
+msgstr "[авто-сообщение] Запрашиваемый вами vHost утвержден и активирован."
+
+#: ../hs_request.cpp:225
+msgid "[auto memo] Your requested vHost has been rejected."
+msgstr "[авто-сообщение] Запрашиваемый вами vHost отклонен."
+
+#: ../hs_request.cpp:223
+#, c-format
+msgid "[auto memo] Your requested vHost has been rejected. Reason: %s"
+msgstr "[авто-сообщение] Запрашиваемый вами vHost отклонен. Причина: %s"
+
+#: ../hs_request.cpp:443
+#, c-format
+msgid "[auto memo] vHost %s has been requested."
+msgstr "[авто-сообщение] Был запрошен vHost %s"
+
+#: ../hs_request.cpp:161
+#, c-format
+msgid "vHost for %s has been activated"
+msgstr "vHost для %s успешно активирован"
+
+#: ../hs_request.cpp:230
+#, c-format
+msgid "vHost for %s has been rejected"
+msgstr "vHost для %s отклонен."
diff --git a/modules/extra/language/ns_maxemail.de_DE.po b/modules/extra/language/ns_maxemail.de_DE.po
new file mode 100644
index 000000000..fe1f3aef4
--- /dev/null
+++ b/modules/extra/language/ns_maxemail.de_DE.po
@@ -0,0 +1,28 @@
+# German translations for ns_maxemail
+# German messages for ns_maxemail
+# Copyright (C) 2011 Anope Team
+# This file is distributed under the same license as Anope IRC Services
+# Adam <adam@anope.org>, 2011.
+#
+msgid ""
+msgstr ""
+"Project-Id-Version: Anope\n"
+"Report-Msgid-Bugs-To: \n"
+"POT-Creation-Date: 2011-02-04 03:41-0500\n"
+"PO-Revision-Date: 2010-09-26 00:03-0400\n"
+"Last-Translator: Adam <adam@anope.org>\n"
+"Language-Team: German\n"
+"MIME-Version: 1.0\n"
+"Content-Type: text/plain; charset=ISO-8859-1\n"
+"Content-Transfer-Encoding: 8bit\n"
+"Plural-Forms: nplurals=2; plural=(n != 1);\n"
+
+#: ../ns_maxemail.cpp:33
+#, fuzzy, c-format
+msgid "The given email address has reached its usage limit of %d users."
+msgstr "Die angegebene eMail hat die limit Begrenzung von %d User erreicht."
+
+#: ../ns_maxemail.cpp:31
+#, fuzzy
+msgid "The given email address has reached its usage limit of 1 user."
+msgstr "Die angegebene eMail hat die limit Begrenzung von 1 User erreicht."
diff --git a/modules/extra/language/ns_maxemail.it_IT.po b/modules/extra/language/ns_maxemail.it_IT.po
new file mode 100644
index 000000000..1cd1a4083
--- /dev/null
+++ b/modules/extra/language/ns_maxemail.it_IT.po
@@ -0,0 +1,32 @@
+# Italian translations for ns_maxemail
+# Traduzioni italiane per il ns_maxemail
+# Copyright (C) 2011 Anope Team
+# This file is distributed under the same license as Anope IRC Services
+# Adam <adam@anope.org>, 2011.
+#
+msgid ""
+msgstr ""
+"Project-Id-Version: Anope\n"
+"Report-Msgid-Bugs-To: \n"
+"POT-Creation-Date: 2011-02-04 03:41-0500\n"
+"PO-Revision-Date: 2010-09-26 00:11-0400\n"
+"Last-Translator: Adam <adam@anope.org>\n"
+"Language-Team: Italian\n"
+"MIME-Version: 1.0\n"
+"Content-Type: text/plain; charset=ISO-8859-1\n"
+"Content-Transfer-Encoding: 8bit\n"
+"Plural-Forms: nplurals=2; plural=(n != 1);\n"
+
+#: ../ns_maxemail.cpp:33
+#, fuzzy, c-format
+msgid "The given email address has reached its usage limit of %d users."
+msgstr ""
+"L'indirizzo email specificato ha raggiunto il suo limite d'utilizzo di %d "
+"utenti."
+
+#: ../ns_maxemail.cpp:31
+#, fuzzy
+msgid "The given email address has reached its usage limit of 1 user."
+msgstr ""
+"L'indirizzo email specificato ha raggiunto il suo limite d'utilizzo di 1 "
+"utente."
diff --git a/modules/extra/language/ns_maxemail.nl_NL.po b/modules/extra/language/ns_maxemail.nl_NL.po
new file mode 100644
index 000000000..fb84c786a
--- /dev/null
+++ b/modules/extra/language/ns_maxemail.nl_NL.po
@@ -0,0 +1,28 @@
+# Dutch translations for ns_maxemail
+# Engelse vertalingen voor het ns_maxemail
+# Copyright (C) 2011 Anope Team
+# This file is distributed under the same license as Anope IRC Services
+# Adam <adam@anope.org>, 2011.
+#
+msgid ""
+msgstr ""
+"Project-Id-Version: Anope\n"
+"Report-Msgid-Bugs-To: \n"
+"POT-Creation-Date: 2011-02-04 03:41-0500\n"
+"PO-Revision-Date: 2010-09-25 23:57-0400\n"
+"Last-Translator: Adam <adam@anope.org>\n"
+"Language-Team: Dutch\n"
+"MIME-Version: 1.0\n"
+"Content-Type: text/plain; charset=ISO-8859-1\n"
+"Content-Transfer-Encoding: 8bit\n"
+"Plural-Forms: nplurals=2; plural=(n != 1);\n"
+
+#: ../ns_maxemail.cpp:33
+#, fuzzy, c-format
+msgid "The given email address has reached its usage limit of %d users."
+msgstr "Het gegeven email adres heeft de limiet van %d gebruikers bereikt."
+
+#: ../ns_maxemail.cpp:31
+#, fuzzy
+msgid "The given email address has reached its usage limit of 1 user."
+msgstr "Het gegeven email adres heeft de limiet van 1 gebruiker bereikt."
diff --git a/modules/extra/language/ns_maxemail.pot b/modules/extra/language/ns_maxemail.pot
new file mode 100644
index 000000000..c799470d3
--- /dev/null
+++ b/modules/extra/language/ns_maxemail.pot
@@ -0,0 +1,26 @@
+# SOME DESCRIPTIVE TITLE.
+# Copyright (C) YEAR THE PACKAGE'S COPYRIGHT HOLDER
+# This file is distributed under the same license as the PACKAGE package.
+# FIRST AUTHOR <EMAIL@ADDRESS>, YEAR.
+#
+#, fuzzy
+msgid ""
+msgstr ""
+"Project-Id-Version: PACKAGE VERSION\n"
+"Report-Msgid-Bugs-To: \n"
+"POT-Creation-Date: 2011-02-04 03:41-0500\n"
+"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
+"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
+"Language-Team: LANGUAGE <LL@li.org>\n"
+"MIME-Version: 1.0\n"
+"Content-Type: text/plain; charset=CHARSET\n"
+"Content-Transfer-Encoding: 8bit\n"
+
+#: ../ns_maxemail.cpp:33
+#, c-format
+msgid "The given email address has reached its usage limit of %d users."
+msgstr ""
+
+#: ../ns_maxemail.cpp:31
+msgid "The given email address has reached its usage limit of 1 user."
+msgstr ""
diff --git a/modules/extra/language/ns_maxemail.pt_PT.po b/modules/extra/language/ns_maxemail.pt_PT.po
new file mode 100644
index 000000000..ff807f582
--- /dev/null
+++ b/modules/extra/language/ns_maxemail.pt_PT.po
@@ -0,0 +1,28 @@
+# Portuguese translations for ns_maxemail
+# Copyright (C) 2011 Anope Team
+# This file is distributed under the same license as Anope IRC Services
+# Adam <adam@anope.org>, 2011.
+#
+msgid ""
+msgstr ""
+"Project-Id-Version: Anope\n"
+"Report-Msgid-Bugs-To: \n"
+"POT-Creation-Date: 2011-02-04 03:41-0500\n"
+"PO-Revision-Date: 2010-09-26 00:05-0400\n"
+"Last-Translator: Adam <adam@anope.org>\n"
+"Language-Team: Portuguese\n"
+"MIME-Version: 1.0\n"
+"Content-Type: text/plain; charset=ISO-8859-1\n"
+"Content-Transfer-Encoding: 8bit\n"
+"Plural-Forms: nplurals=2; plural=(n != 1);\n"
+
+#: ../ns_maxemail.cpp:33
+#, fuzzy, c-format
+msgid "The given email address has reached its usage limit of %d users."
+msgstr ""
+"O endereзo de email fornecido alcanзou seu limite de uso de %d usuбrios."
+
+#: ../ns_maxemail.cpp:31
+#, fuzzy
+msgid "The given email address has reached its usage limit of 1 user."
+msgstr "O endereзo de email fornecido alcanзou seu limite de uso de 1 usuбrio."
diff --git a/modules/extra/language/ns_maxemail.ru_RU.po b/modules/extra/language/ns_maxemail.ru_RU.po
new file mode 100644
index 000000000..1fa267d55
--- /dev/null
+++ b/modules/extra/language/ns_maxemail.ru_RU.po
@@ -0,0 +1,30 @@
+# Russian translations for ns_maxemail
+# ?????????? ???????? ??? ?????? ns_maxemail
+# Copyright (C) 2011 Anope Team
+# This file is distributed under the same license as Anope IRC Services
+# Adam <adam@anope.org>, 2011.
+#
+msgid ""
+msgstr ""
+"Project-Id-Version: Anope\n"
+"Report-Msgid-Bugs-To: \n"
+"POT-Creation-Date: 2011-02-04 03:41-0500\n"
+"PO-Revision-Date: 2010-09-26 00:07-0400\n"
+"Last-Translator: Adam <adam@anope.org>\n"
+"Language-Team: Russian\n"
+"MIME-Version: 1.0\n"
+"Content-Type: text/plain; charset=ISO-8859-1\n"
+"Content-Transfer-Encoding: 8bit\n"
+"Plural-Forms: nplurals=3; plural=(n%10==1 && n%100!=11 ? 0 : n%10>=2 && n%"
+"10<=4 && (n%100<10 || n%100>=20) ? 1 : 2);\n"
+
+#: ../ns_maxemail.cpp:33
+#, fuzzy, c-format
+msgid "The given email address has reached its usage limit of %d users."
+msgstr ""
+"Указанный вами email-адрес используется максимально допустимое кол-во раз: %d"
+
+#: ../ns_maxemail.cpp:31
+#, fuzzy
+msgid "The given email address has reached its usage limit of 1 user."
+msgstr "Указанный вами email-адрес уже кем-то используется."
diff --git a/modules/extra/language/update.sh b/modules/extra/language/update.sh
new file mode 100755
index 000000000..3ca7081ae
--- /dev/null
+++ b/modules/extra/language/update.sh
@@ -0,0 +1,14 @@
+#!/bin/bash
+
+for f in `ls ../*.cpp`
+do
+ BASE=`basename $f | cut -d'.' -f1`
+ xgettext -C -s -d $BASE -o $BASE.pot --from-code=utf-8 --keyword=_ $f
+done
+
+for f in `ls *.po`
+do
+ msgmerge -v -s -U $f `basename $f | cut -d'.' -f1`.pot
+done
+
+rm -f *~
diff --git a/modules/extra/ns_set_misc.cpp b/modules/extra/ns_set_misc.cpp
index dc420e36d..72b4ba5e9 100644
--- a/modules/extra/ns_set_misc.cpp
+++ b/modules/extra/ns_set_misc.cpp
@@ -35,17 +35,17 @@ class CommandNSSetMisc : public Command
if (params.size() > 1)
{
nc->Extend("nickserv:" + this->name, new ExtensibleItemRegular<Anope::string>(params[1]));
- u->SendMessage(NickServ, CHAN_SETTING_CHANGED, this->name.c_str(), nc->display.c_str(), params[1].c_str());
+ u->SendMessage(NickServ, LanguageString::CHAN_SETTING_CHANGED, this->name.c_str(), nc->display.c_str(), params[1].c_str());
}
else
- u->SendMessage(NickServ, CHAN_SETTING_UNSET, this->name.c_str(), nc->display.c_str());
+ u->SendMessage(NickServ, LanguageString::CHAN_SETTING_UNSET, this->name.c_str(), nc->display.c_str());
return MOD_CONT;
}
void OnSyntaxError(CommandSource &source, const Anope::string &)
{
- SyntaxError(source, "SET", NICK_SET_SYNTAX);
+ SyntaxError(source, "SET", LanguageString::NICK_SET_SYNTAX);
}
void OnServHelp(CommandSource &source)
@@ -63,7 +63,7 @@ class CommandNSSASetMisc : public CommandNSSetMisc
void OnSyntaxError(CommandSource &source, const Anope::string &)
{
- SyntaxError(source, "SASET", NICK_SASET_SYNTAX);
+ SyntaxError(source, "SASET", LanguageString::NICK_SASET_SYNTAX);
}
};