summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--include/language.h218
-rw-r--r--include/modules.h8
-rw-r--r--modules/core/bs_act.cpp6
-rw-r--r--modules/core/bs_assign.cpp8
-rw-r--r--modules/core/bs_badwords.cpp2
-rw-r--r--modules/core/bs_bot.cpp20
-rw-r--r--modules/core/bs_info.cpp78
-rw-r--r--modules/core/bs_kick.cpp6
-rw-r--r--modules/core/bs_say.cpp6
-rw-r--r--modules/core/bs_set.cpp8
-rw-r--r--modules/core/bs_unassign.cpp6
-rw-r--r--modules/core/cs_access.cpp30
-rw-r--r--modules/core/cs_akick.cpp21
-rw-r--r--modules/core/cs_ban.cpp12
-rw-r--r--modules/core/cs_clearusers.cpp4
-rw-r--r--modules/core/cs_clone.cpp8
-rw-r--r--modules/core/cs_drop.cpp6
-rw-r--r--modules/core/cs_forbid.cpp6
-rw-r--r--modules/core/cs_getkey.cpp2
-rw-r--r--modules/core/cs_info.cpp44
-rw-r--r--modules/core/cs_invite.cpp6
-rw-r--r--modules/core/cs_kick.cpp12
-rw-r--r--modules/core/cs_list.cpp8
-rw-r--r--modules/core/cs_mode.cpp4
-rw-r--r--modules/core/cs_modes.cpp14
-rw-r--r--modules/core/cs_register.cpp6
-rw-r--r--modules/core/cs_saset.cpp8
-rw-r--r--modules/core/cs_set.cpp12
-rw-r--r--modules/core/cs_set_bantype.cpp4
-rw-r--r--modules/core/cs_set_description.cpp4
-rw-r--r--modules/core/cs_set_founder.cpp10
-rw-r--r--modules/core/cs_set_securefounder.cpp2
-rw-r--r--modules/core/cs_set_successor.cpp10
-rw-r--r--modules/core/cs_suspend.cpp6
-rw-r--r--modules/core/cs_topic.cpp4
-rw-r--r--modules/core/cs_unban.cpp6
-rw-r--r--modules/core/cs_xop.cpp14
-rw-r--r--modules/core/hs_del.cpp4
-rw-r--r--modules/core/hs_delall.cpp4
-rw-r--r--modules/core/hs_group.cpp2
-rw-r--r--modules/core/hs_list.cpp4
-rw-r--r--modules/core/hs_off.cpp2
-rw-r--r--modules/core/hs_on.cpp2
-rw-r--r--modules/core/hs_set.cpp14
-rw-r--r--modules/core/hs_setall.cpp14
-rw-r--r--modules/core/ms_cancel.cpp4
-rw-r--r--modules/core/ms_check.cpp4
-rw-r--r--modules/core/ms_del.cpp10
-rw-r--r--modules/core/ms_ignore.cpp6
-rw-r--r--modules/core/ms_info.cpp10
-rw-r--r--modules/core/ms_list.cpp12
-rw-r--r--modules/core/ms_read.cpp12
-rw-r--r--modules/core/ms_rsend.cpp2
-rw-r--r--modules/core/ms_send.cpp2
-rw-r--r--modules/core/ms_sendall.cpp2
-rw-r--r--modules/core/ms_set.cpp12
-rw-r--r--modules/core/ms_staff.cpp2
-rw-r--r--modules/core/ns_access.cpp8
-rw-r--r--modules/core/ns_ajoin.cpp2
-rw-r--r--modules/core/ns_alist.cpp6
-rw-r--r--modules/core/ns_drop.cpp12
-rw-r--r--modules/core/ns_forbid.cpp8
-rw-r--r--modules/core/ns_getpass.cpp6
-rw-r--r--modules/core/ns_ghost.cpp10
-rw-r--r--modules/core/ns_group.cpp26
-rw-r--r--modules/core/ns_identify.cpp10
-rw-r--r--modules/core/ns_info.cpp12
-rw-r--r--modules/core/ns_list.cpp8
-rw-r--r--modules/core/ns_logout.cpp2
-rw-r--r--modules/core/ns_recover.cpp20
-rw-r--r--modules/core/ns_register.cpp22
-rw-r--r--modules/core/ns_release.cpp10
-rw-r--r--modules/core/ns_resetpass.cpp8
-rw-r--r--modules/core/ns_saset.cpp30
-rw-r--r--modules/core/ns_sendpass.cpp6
-rw-r--r--modules/core/ns_set.cpp26
-rw-r--r--modules/core/ns_set_email.cpp4
-rw-r--r--modules/core/ns_suspend.cpp16
-rw-r--r--modules/core/os_akill.cpp16
-rw-r--r--modules/core/os_chankill.cpp4
-rw-r--r--modules/core/os_kick.cpp4
-rw-r--r--modules/core/os_mode.cpp4
-rw-r--r--modules/core/os_news.cpp6
-rw-r--r--modules/core/os_oline.cpp2
-rw-r--r--modules/core/os_session.cpp8
-rw-r--r--modules/core/os_snline.cpp14
-rw-r--r--modules/core/os_sqline.cpp14
-rw-r--r--modules/core/os_staff.cpp2
-rw-r--r--modules/core/os_svsnick.cpp4
-rw-r--r--modules/core/os_szline.cpp12
-rw-r--r--modules/extra/cs_appendtopic.cpp4
-rw-r--r--modules/extra/cs_enforce.cpp10
-rw-r--r--modules/extra/cs_entrymsg.cpp4
-rw-r--r--modules/extra/cs_set_misc.cpp12
-rw-r--r--modules/extra/cs_tban.cpp16
-rw-r--r--modules/extra/hs_request.cpp27
-rw-r--r--modules/extra/m_async_commands.cpp2
-rw-r--r--modules/extra/ns_set_misc.cpp13
-rw-r--r--src/botserv.cpp4
-rw-r--r--src/commands.cpp16
-rw-r--r--src/language.cpp2
-rw-r--r--src/memoserv.cpp16
-rw-r--r--src/misc.cpp2
-rw-r--r--src/nickserv.cpp10
-rw-r--r--src/operserv.cpp10
-rw-r--r--src/protocol.cpp4
-rw-r--r--src/regchannel.cpp2
107 files changed, 619 insertions, 630 deletions
diff --git a/include/language.h b/include/language.h
index 7c06745a1..c27c99087 100644
--- a/include/language.h
+++ b/include/language.h
@@ -6,115 +6,111 @@
* Please read COPYING and README for further details.
*/
-namespace LanguageString
-{
- const char *const MORE_INFO = _("\002%R%s HELP %s\002 for more information.");
- const char *const BAD_USERHOST_MASK = _("Mask must be in the form \037user\037@\037host\037.");
- const char *const BAD_EXPIRY_TIME = _("Invalid expiry time.");
- const char *const USERHOST_MASK_TOO_WIDE = _("%s coverage is too wide; Please use a more specific mask.");
- const char *const READ_ONLY_MODE = _("\002Notice:\002 Services is in read-only mode; changes will not be saved!");
- const char *const PASSWORD_INCORRECT = _("Password incorrect.");
- const char *const ACCESS_DENIED = _("Access denied.");
- const char *const MORE_OBSCURE_PASSWORD = _("Please try again with a more obscure password. Passwords should be at least five characters long, should not be something easily guessed (e.g. your real name or your nick), and cannot contain the space or tab characters.");
- const char *const PASSWORD_TOO_LONG = _("Your password is too long. Please try again with a shorter password.");
- const char *const NICK_NOT_REGISTERED = _("Your nick isn't registered.");
- const char *const NICK_X_NOT_REGISTERED = _("Nick \002%s\002 isn't registered.");
- const char *const NICK_X_NOT_IN_USE = _("Nick \002%s\002 isn't currently in use.");
- const char *const NICK_X_NOT_ON_CHAN = _("\002%s\002 is not currently on channel %s.");
- const char *const NICK_X_FORBIDDEN = _("Nick \002%s\002 may not be registered or used.");
- const char *const NICK_X_FORBIDDEN_OPER = _("Nick \002%s\002 has been forbidden by %s:\n"
- "%s");
- const char *const NICK_X_SUSPENDED = _("Nick %s is currently suspended.");
- const char *const CHAN_X_NOT_REGISTERED = _("Channel \002%s\002 isn't registered.");
- const char *const CHAN_X_NOT_IN_USE = _("Channel \002%s\002 doesn't exist.");
- const char *const CHAN_X_FORBIDDEN = _("Channel \002%s\002 may not be registered or used.");
- const char *const CHAN_X_FORBIDDEN_OPER = _("Channel \002%s\002 has been forbidden by %s:\n" \
- "%s");
- const char *const NICK_IDENTIFY_REQUIRED = _("Password authentication required for that command.\n" \
- "Retry after typing \002%R%s IDENTIFY \037password\037\002.");
- const char *const MAIL_X_INVALID = _("\002%s\002 is not a valid e-mail address.");
- const char *const NO_REASON = _("No reason");
- const char *const UNKNOWN = _("<unknown>");
- const char *const NO_EXPIRE = _("does not expire");
- const char *const END_OF_ANY_LIST = _("End of \002%s\002 list.");
- const char *const LIST_INCORRECT_RANGE = _("Incorrect range specified. The correct syntax is \002#\037from\037-\037to\037\002.");
- const char *const UNKNOWN_OPTION = _("Unknown option \002%s\002.\n"
- "Type %R%S HELP %s for more information.");
- /* move these */
- const char *const NICK_IS_REGISTERED = _("This nick is owned by someone else. Please choose another.\n"
- "(If this is your nick, type \002%R%s IDENTIFY \037password\037\002.)");
- const char *const NICK_IS_SECURE = _("This nickname is registered and protected. If it is your\n"
- "nick, type \002%R%s IDENTIFY \037password\037\002. Otherwise,\n"
- "please choose a different nick.");
- const char *const FORCENICKCHANGE_NOW = _("This nickname has been registered; you may not use it.");
- const char *const NICK_CANNOT_BE_REGISTERED = _("Nickname \002%s\002 may not be registered.");
- const char *const NICK_ALREADY_REGISTERED = _("Nickname \002%s\002 is already registered!");
- const char *const NICK_SET_SYNTAX = _("SET \037option\037 \037parameters\037");
- const char *const NICK_SET_DISABLED = _("Sorry, nickname option setting is temporarily disabled.");
- const char *const NICK_SET_UNKNOWN_OPTION = _("Unknown SET option \002%s\002.");
- const char *const NICK_SET_DISPLAY_CHANGED = _("The new display is now \002%s\002.");
- const char *const NICK_SASET_SYNTAX = _("SASET \037nickname\037 \037option\037 \037parameters\037");
- const char *const NICK_SASET_DISPLAY_INVALID = _("The new display for \002%s\002 MUST be a nickname of the nickname group!");
- const char *const NICK_SASET_PASSWORD_FAILED = _("Sorry, couldn't change password for \002%s\002.");
- const char *const NICK_SASET_PASSWORD_CHANGED = _("Password for \002%s\002 changed.");
- const char *const NICK_SASET_PASSWORD_CHANGED_TO = _("Password for \002%s\002 changed to \002%s\002.");
- const char *const NICK_INFO_OPTIONS = _(" Options: %s");
- const char *const NICK_LIST_SYNTAX = _("LIST \037pattern\037");
- const char *const LIST_HEADER = _("List of entries matching \002%s\002:");
- const char *const NICK_RECOVERED = _("User claiming your nick has been killed.\n"
- "\002%R%s RELEASE %s\002 to get it back before %s timeout.");
- const char *const NICK_REQUESTED = _("This nick has already been requested, please check your e-mail address for the pass code");
- const char *const NICK_IS_PREREG = _("This nick is awaiting an e-mail verification code before completing registration.");
- const char *const NICK_CONFIRM_INVALID = _("Invalid passcode has been entered, please check the e-mail again, and retry");
- const char *const CHAN_NOT_ALLOWED_TO_JOIN = _("You are not permitted to be on this channel.");
- const char *const CHAN_X_INVALID = _("Channel %s is not a valid channel.");
- const char *const CHAN_REACHED_CHANNEL_LIMIT = _("Sorry, you have already reached your limit of \002%d\002 channels.");
- const char *const CHAN_EXCEEDED_CHANNEL_LIMIT = _("Sorry, you have already exceeded your limit of \002%d\002 channels.");
- const char *const CHAN_SYMBOL_REQUIRED = _("Please use the symbol of \002#\002 when attempting to register");
- const char *const CHAN_SASET_SYNTAX = _("SASET \002channel\002 \037option\037 \037parameters\037");
- const char *const CHAN_SET_SYNTAX = _("SET \037channel\037 \037option\037 \037parameters\037");
- const char *const CHAN_SET_DISABLED = _("Sorry, channel option setting is temporarily disabled.");
- const char *const CHAN_SETTING_CHANGED = _("%s for %s set to %s.");
- const char *const CHAN_SETTING_UNSET = _("%s for %s unset.");
- const char *const CHAN_SET_MLOCK_DEPRECATED = _("MLOCK is deprecated. Use \002%R%s HELP MODE\002 instead.");
- const char *const CHAN_ACCESS_LEVEL_RANGE = _("Access level must be between %d and %d inclusive.");
- const char *const CHAN_ACCESS_LIST_HEADER = _("Access list for %s:\n"
- " Num Lev Mask");
- const char *const CHAN_ACCESS_VIEW_XOP_FORMAT = _(" %3d %s %s\n"
- " by %s, last seen %s");
- const char *const CHAN_ACCESS_VIEW_AXS_FORMAT = _(" %3d %4d %s\n"
- " by %s, last seen %s");
- const char *const CHAN_AKICK_VIEW_FORMAT = _("%3d %s (by %s on %s)\n"
- " %s");
- const char *const CHAN_INFO_HEADER = _("Information for channel \002%s\002:");
- const char *const CHAN_EXCEPTED = _("\002%s\002 matches an except on %s and cannot be banned until the except have been removed.");
- const char *const CHAN_LIST_ENTRY = _("%3d %s\n"
- " Added by %s on %s");
- const char *const MEMO_NEW_X_MEMO_ARRIVED = _("There is a new memo on channel %s.\n"
- "Type \002%R%s READ %s %d\002 to read it.");
- const char *const MEMO_NEW_MEMO_ARRIVED = _("You have a new memo from %s.\n"
- "Type \002%R%s READ %d\002 to read it.");
- const char *const MEMO_HAVE_NO_MEMOS = _("You have no memos.");
- const char *const MEMO_X_HAS_NO_MEMOS = _("%s has no memos.");
- const char *const MEMO_SEND_SYNTAX = _("SEND {\037nick\037 | \037channel\037} \037memo-text\037");
- const char *const MEMO_SEND_DISABLED = _("Sorry, memo sending is temporarily disabled.");
- const char *const MEMO_HAVE_NO_NEW_MEMOS = _("You have no new memos.");
- const char *const MEMO_X_HAS_NO_NEW_MEMOS = _("%s has no new memos.");
- const char *const BOT_DOES_NOT_EXIST = _("Bot \002%s\002 does not exist.");
- const char *const BOT_NOT_ASSIGNED = _("You must assign a bot to the channel before using this command.\n"
- "Type %R%S HELP ASSIGN for more information.");
- const char *const BOT_NOT_ON_CHANNEL = _("Bot is not on channel \002%s\002.");
- const char *const BOT_ASSIGN_READONLY = _("Sorry, bot assignment is temporarily disabled.");
- const char *const ENABLED = _("Enabled");
- const char *const DISABLED = _("Disabled");
- const char *const OPER_LIST_FORMAT = _(" %3d %-32s %s");
- const char *const OPER_VIEW_FORMAT = _("%3d %s (by %s on %s; %s)\n"
- " %s");
- const char *const HOST_SET_ERROR = _("A vhost must be in the format of a valid hostmask.");
- const char *const HOST_SET_IDENT_ERROR = _("A vhost ident must be in the format of a valid ident");
- const char *const HOST_SET_TOOLONG = _("Error! The vhost is too long, please use a host shorter than %d characters.");
- const char *const HOST_SET_IDENTTOOLONG = _("Error! The Ident is too long, please use an ident shorter than %d characters.");
- const char *const HOST_NOT_ASSIGNED = _("Please contact an Operator to get a vhost assigned to this nick.");
- const char *const HOST_NO_VIDENT = _("Your IRCD does not support vIdent's, if this is incorrect, please report this as a possible bug");
-}
+#define MORE_INFO "\002%R%s HELP %s\002 for more information."
+#define BAD_USERHOST_MASK "Mask must be in the form \037user\037@\037host\037."
+#define BAD_EXPIRY_TIME "Invalid expiry time."
+#define USERHOST_MASK_TOO_WIDE "%s coverage is too wide; Please use a more specific mask."
+#define READ_ONLY_MODE "\002Notice:\002 Services is in read-only mode; changes will not be saved!"
+#define PASSWORD_INCORRECT "Password incorrect."
+#define ACCESS_DENIED "Access denied."
+#define MORE_OBSCURE_PASSWORD "Please try again with a more obscure password. Passwords should be at least five characters long, should not be something easily guessed (e.g. your real name or your nick), and cannot contain the space or tab characters."
+#define PASSWORD_TOO_LONG "Your password is too long. Please try again with a shorter password."
+#define NICK_NOT_REGISTERED "Your nick isn't registered."
+#define NICK_X_NOT_REGISTERED "Nick \002%s\002 isn't registered."
+#define NICK_X_NOT_IN_USE "Nick \002%s\002 isn't currently in use."
+#define NICK_X_NOT_ON_CHAN "\002%s\002 is not currently on channel %s."
+#define NICK_X_FORBIDDEN "Nick \002%s\002 may not be registered or used."
+#define NICK_X_FORBIDDEN_OPER "Nick \002%s\002 has been forbidden by %s:\n" \
+ "%s"
+#define NICK_X_SUSPENDED "Nick %s is currently suspended."
+#define CHAN_X_NOT_REGISTERED "Channel \002%s\002 isn't registered."
+#define CHAN_X_NOT_IN_USE "Channel \002%s\002 doesn't exist."
+#define CHAN_X_FORBIDDEN "Channel \002%s\002 may not be registered or used."
+#define CHAN_X_FORBIDDEN_OPER "Channel \002%s\002 has been forbidden by %s:\n" \
+ "%s"
+#define NICK_IDENTIFY_REQUIRED "Password authentication required for that command.\n" \
+ "Retry after typing \002%R%s IDENTIFY \037password\037\002."
+#define MAIL_X_INVALID "\002%s\002 is not a valid e-mail address."
+#define NO_REASON "No reason"
+#define UNKNOWN "<unknown>"
+#define NO_EXPIRE "does not expire"
+#define END_OF_ANY_LIST "End of \002%s\002 list."
+#define LIST_INCORRECT_RANGE "Incorrect range specified. The correct syntax is \002#\037from\037-\037to\037\002."
+#define UNKNOWN_OPTION "Unknown option \002%s\002.\n" \
+ "Type %R%S HELP %s for more information."
+#define NICK_IS_REGISTERED "This nick is owned by someone else. Please choose another.\n" \
+ "(If this is your nick, type \002%R%s IDENTIFY \037password\037\002.)"
+#define NICK_IS_SECURE "This nickname is registered and protected. If it is your\n" \
+ "nick, type \002%R%s IDENTIFY \037password\037\002. Otherwise,\n" \
+ "please choose a different nick."
+#define FORCENICKCHANGE_NOW "This nickname has been registered; you may not use it."
+#define NICK_CANNOT_BE_REGISTERED "Nickname \002%s\002 may not be registered."
+#define NICK_ALREADY_REGISTERED "Nickname \002%s\002 is already registered!"
+#define NICK_SET_SYNTAX "SET \037option\037 \037parameters\037"
+#define NICK_SET_DISABLED "Sorry, nickname option setting is temporarily disabled."
+#define NICK_SET_UNKNOWN_OPTION "Unknown SET option \002%s\002."
+#define NICK_SET_DISPLAY_CHANGED "The new display is now \002%s\002."
+#define NICK_SASET_SYNTAX "SASET \037nickname\037 \037option\037 \037parameters\037"
+#define NICK_SASET_DISPLAY_INVALID "The new display for \002%s\002 MUST be a nickname of the nickname group!"
+#define NICK_SASET_PASSWORD_FAILED "Sorry, couldn't change password for \002%s\002."
+#define NICK_SASET_PASSWORD_CHANGED "Password for \002%s\002 changed."
+#define NICK_SASET_PASSWORD_CHANGED_TO "Password for \002%s\002 changed to \002%s\002."
+#define NICK_INFO_OPTIONS " Options: %s"
+#define NICK_LIST_SYNTAX "LIST \037pattern\037"
+#define LIST_HEADER "List of entries matching \002%s\002:"
+#define NICK_RECOVERED "User claiming your nick has been killed.\n" \
+ "\002%R%s RELEASE %s\002 to get it back before %s timeout."
+#define NICK_REQUESTED "This nick has already been requested, please check your e-mail address for the pass code"
+#define NICK_IS_PREREG "This nick is awaiting an e-mail verification code before completing registration."
+#define NICK_CONFIRM_INVALID "Invalid passcode has been entered, please check the e-mail again, and retry"
+#define CHAN_NOT_ALLOWED_TO_JOIN "You are not permitted to be on this channel."
+#define CHAN_X_INVALID "Channel %s is not a valid channel."
+#define CHAN_REACHED_CHANNEL_LIMIT "Sorry, you have already reached your limit of \002%d\002 channels."
+#define CHAN_EXCEEDED_CHANNEL_LIMIT "Sorry, you have already exceeded your limit of \002%d\002 channels."
+#define CHAN_SYMBOL_REQUIRED "Please use the symbol of \002#\002 when attempting to register"
+#define CHAN_SASET_SYNTAX "SASET \002channel\002 \037option\037 \037parameters\037"
+#define CHAN_SET_SYNTAX "SET \037channel\037 \037option\037 \037parameters\037"
+#define CHAN_SET_DISABLED "Sorry, channel option setting is temporarily disabled."
+#define CHAN_SETTING_CHANGED "%s for %s set to %s."
+#define CHAN_SETTING_UNSET "%s for %s unset."
+#define CHAN_SET_MLOCK_DEPRECATED "MLOCK is deprecated. Use \002%R%s HELP MODE\002 instead."
+#define CHAN_ACCESS_LEVEL_RANGE "Access level must be between %d and %d inclusive."
+#define CHAN_ACCESS_LIST_HEADER "Access list for %s:\n" \
+ " Num Lev Mask"
+#define CHAN_ACCESS_VIEW_XOP_FORMAT " %3d %s %s\n" \
+ " by %s, last seen %s"
+#define CHAN_ACCESS_VIEW_AXS_FORMAT " %3d %4d %s\n" \
+ " by %s, last seen %s"
+#define CHAN_AKICK_VIEW_FORMAT "%3d %s (by %s on %s)\n" \
+ " %s"
+#define CHAN_INFO_HEADER "Information for channel \002%s\002:"
+#define CHAN_EXCEPTED "\002%s\002 matches an except on %s and cannot be banned until the except have been removed."
+#define CHAN_LIST_ENTRY "%3d %s\n" \
+ " Added by %s on %s"
+#define MEMO_NEW_X_MEMO_ARRIVED "There is a new memo on channel %s.\n" \
+ "Type \002%R%s READ %s %d\002 to read it."
+#define MEMO_NEW_MEMO_ARRIVED "You have a new memo from %s.\n" \
+ "Type \002%R%s READ %d\002 to read it."
+#define MEMO_HAVE_NO_MEMOS "You have no memos."
+#define MEMO_X_HAS_NO_MEMOS "%s has no memos."
+#define MEMO_SEND_SYNTAX "SEND {\037nick\037 | \037channel\037} \037memo-text\037"
+#define MEMO_SEND_DISABLED "Sorry, memo sending is temporarily disabled."
+#define MEMO_HAVE_NO_NEW_MEMOS "You have no new memos."
+#define MEMO_X_HAS_NO_NEW_MEMOS "%s has no new memos."
+#define BOT_DOES_NOT_EXIST "Bot \002%s\002 does not exist."
+#define BOT_NOT_ASSIGNED "You must assign a bot to the channel before using this command.\n" \
+ "Type %R%S HELP ASSIGN for more information."
+#define BOT_NOT_ON_CHANNEL "Bot is not on channel \002%s\002."
+#define BOT_ASSIGN_READONLY "Sorry, bot assignment is temporarily disabled."
+#define ENABLED "Enabled"
+#define DISABLED "Disabled"
+#define OPER_LIST_FORMAT " %3d %-32s %s"
+#define OPER_VIEW_FORMAT "%3d %s (by %s on %s; %s)\n" \
+ " %s"
+#define HOST_SET_ERROR "A vhost must be in the format of a valid hostmask."
+#define HOST_SET_IDENT_ERROR "A vhost ident must be in the format of a valid ident"
+#define HOST_SET_TOOLONG "Error! The vhost is too long, please use a host shorter than %d characters."
+#define HOST_SET_IDENTTOOLONG "Error! The Ident is too long, please use an ident shorter than %d characters."
+#define HOST_NOT_ASSIGNED "Please contact an Operator to get a vhost assigned to this nick."
+#define HOST_NO_VIDENT "Your IRCD does not support vIdent's, if this is incorrect, please report this as a possible bug"
diff --git a/include/modules.h b/include/modules.h
index 4253b3799..5b78584d1 100644
--- a/include/modules.h
+++ b/include/modules.h
@@ -815,11 +815,11 @@ class CoreExport Module : public Extensible
virtual void OnAkickDel(User *u, ChannelInfo *ci, AutoKick *ak) { }
/** Called when a user requests info for a channel
- * @param u The user requesting info
+ * @param source The user requesting info
* @param ci The channel the user is requesting info for
* @param ShowHidden true if we should show the user everything
*/
- virtual void OnChanInfo(User *u, ChannelInfo *ci, bool ShowHidden) { }
+ virtual void OnChanInfo(CommandSource &source, ChannelInfo *ci, bool ShowHidden) { }
/** Called on cs_findchan()
* @param chname The name being looked up
@@ -912,11 +912,11 @@ class CoreExport Module : public Extensible
virtual void OnNickEraseAccess(NickCore *nc, const Anope::string &entry) { }
/** Called when a user requests info for a nick
- * @param u The user requesting info
+ * @param source The user requesting info
* @param na The nick the user is requesting info from
* @param ShowHidden true if we should show the user everything
*/
- virtual void OnNickInfo(User *u, NickAlias *na, bool ShowHidden) { }
+ virtual void OnNickInfo(CommandSource &source, NickAlias *na, bool ShowHidden) { }
/** Called in findnick()
* Useful to modify the na returned by findnick()
diff --git a/modules/core/bs_act.cpp b/modules/core/bs_act.cpp
index 0b2402f90..30021ce38 100644
--- a/modules/core/bs_act.cpp
+++ b/modules/core/bs_act.cpp
@@ -29,19 +29,19 @@ class CommandBSAct : public Command
if (!check_access(u, ci, CA_SAY))
{
- source.Reply(LanguageString::ACCESS_DENIED);
+ source.Reply(_(ACCESS_DENIED));
return MOD_CONT;
}
if (!ci->bi)
{
- source.Reply(LanguageString::BOT_NOT_ASSIGNED);
+ source.Reply(_(BOT_NOT_ASSIGNED));
return MOD_CONT;
}
if (!ci->c || !ci->c->FindUser(ci->bi))
{
- source.Reply(LanguageString::BOT_NOT_ON_CHANNEL, ci->name.c_str());
+ source.Reply(_(BOT_NOT_ON_CHANNEL), ci->name.c_str());
return MOD_CONT;
}
diff --git a/modules/core/bs_assign.cpp b/modules/core/bs_assign.cpp
index 65e5ff2ea..b1d967305 100644
--- a/modules/core/bs_assign.cpp
+++ b/modules/core/bs_assign.cpp
@@ -30,26 +30,26 @@ class CommandBSAssign : public Command
if (readonly)
{
- source.Reply(LanguageString::BOT_ASSIGN_READONLY);
+ source.Reply(_(BOT_ASSIGN_READONLY));
return MOD_CONT;
}
BotInfo *bi = findbot(nick);
if (!bi)
{
- source.Reply(LanguageString::BOT_DOES_NOT_EXIST, nick.c_str());
+ source.Reply(_(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(LanguageString::ACCESS_DENIED);
+ source.Reply(_(ACCESS_DENIED));
return MOD_CONT;
}
if (bi->HasFlag(BI_PRIVATE) && !u->Account()->HasCommand("botserv/assign/private"))
{
- source.Reply(LanguageString::ACCESS_DENIED);
+ source.Reply(_(ACCESS_DENIED));
return MOD_CONT;
}
diff --git a/modules/core/bs_badwords.cpp b/modules/core/bs_badwords.cpp
index dd87ba41d..191ef958d 100644
--- a/modules/core/bs_badwords.cpp
+++ b/modules/core/bs_badwords.cpp
@@ -246,7 +246,7 @@ class CommandBSBadwords : public Command
if (!check_access(u, ci, CA_BADWORDS) && (!need_args || !u->Account()->HasPriv("botserv/administration")))
{
- source.Reply(LanguageString::ACCESS_DENIED);
+ source.Reply(_(ACCESS_DENIED));
return MOD_CONT;
}
diff --git a/modules/core/bs_bot.cpp b/modules/core/bs_bot.cpp
index 60dc5afaa..0c0c0730d 100644
--- a/modules/core/bs_bot.cpp
+++ b/modules/core/bs_bot.cpp
@@ -89,7 +89,7 @@ class CommandBSBot : public Command
*/
if (findnick(nick))
{
- source.Reply(LanguageString::NICK_ALREADY_REGISTERED, nick.c_str());
+ source.Reply(_(NICK_ALREADY_REGISTERED), nick.c_str());
return MOD_CONT;
}
@@ -125,13 +125,13 @@ class CommandBSBot : public Command
if (!(bi = findbot(oldnick)))
{
- source.Reply(LanguageString::BOT_DOES_NOT_EXIST, oldnick.c_str());
+ source.Reply(_(BOT_DOES_NOT_EXIST), oldnick.c_str());
return MOD_CONT;
}
if (!oldnick.equals_ci(nick) && nickIsServices(oldnick, false))
{
- source.Reply(LanguageString::BOT_DOES_NOT_EXIST, oldnick.c_str());
+ source.Reply(_(BOT_DOES_NOT_EXIST), oldnick.c_str());
return MOD_CONT;
}
@@ -155,7 +155,7 @@ class CommandBSBot : public Command
if (!oldnick.equals_ci(nick) && nickIsServices(nick, false))
{
- source.Reply(LanguageString::BOT_DOES_NOT_EXIST, oldnick.c_str());
+ source.Reply(_(BOT_DOES_NOT_EXIST), oldnick.c_str());
return MOD_CONT;
}
@@ -219,7 +219,7 @@ class CommandBSBot : public Command
*/
if (findnick(nick))
{
- source.Reply(LanguageString::NICK_ALREADY_REGISTERED, nick.c_str());
+ source.Reply(_(NICK_ALREADY_REGISTERED), nick.c_str());
return MOD_CONT;
}
@@ -282,13 +282,13 @@ class CommandBSBot : public Command
if (!(bi = findbot(nick)))
{
- source.Reply(LanguageString::BOT_DOES_NOT_EXIST, nick.c_str());
+ source.Reply(_(BOT_DOES_NOT_EXIST), nick.c_str());
return MOD_CONT;
}
if (nickIsServices(nick, false))
{
- source.Reply(LanguageString::BOT_DOES_NOT_EXIST, nick.c_str());
+ source.Reply(_(BOT_DOES_NOT_EXIST), nick.c_str());
return MOD_CONT;
}
@@ -323,7 +323,7 @@ class CommandBSBot : public Command
// ADD nick user host real - 5
if (!u->Account()->HasCommand("botserv/bot/add"))
{
- source.Reply(LanguageString::ACCESS_DENIED);
+ source.Reply(_(ACCESS_DENIED));
return MOD_CONT;
}
@@ -346,7 +346,7 @@ class CommandBSBot : public Command
// but only oldn and newn are required
if (!u->Account()->HasCommand("botserv/bot/change"))
{
- source.Reply(LanguageString::ACCESS_DENIED);
+ source.Reply(_(ACCESS_DENIED));
return MOD_CONT;
}
@@ -363,7 +363,7 @@ class CommandBSBot : public Command
// DEL nick
if (!u->Account()->HasCommand("botserv/bot/del"))
{
- source.Reply(LanguageString::ACCESS_DENIED);
+ source.Reply(_(ACCESS_DENIED));
return MOD_CONT;
}
diff --git a/modules/core/bs_info.cpp b/modules/core/bs_info.cpp
index 48f09bc19..cb10631cb 100644
--- a/modules/core/bs_info.cpp
+++ b/modules/core/bs_info.cpp
@@ -72,11 +72,11 @@ class CommandBSInfo : public Command
{
if (!check_access(u, ci, CA_FOUNDER) && !u->Account()->HasPriv("botserv/administration"))
{
- source.Reply(LanguageString::ACCESS_DENIED);
+ source.Reply(_(ACCESS_DENIED));
return MOD_CONT;
}
- source.Reply(LanguageString::CHAN_INFO_HEADER, ci->name.c_str());
+ source.Reply(_(CHAN_INFO_HEADER), ci->name.c_str());
if (ci->bi)
source.Reply(_(" Bot nick : %s"), ci->bi->nick.c_str());
else
@@ -85,93 +85,93 @@ class CommandBSInfo : public Command
if (ci->botflags.HasFlag(BS_KICK_BADWORDS))
{
if (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]);
+ source.Reply(_(" Bad words kicker : %s (%d kick(s) to ban)"), _(ENABLED), ci->ttb[TTB_BADWORDS]);
else
- source.Reply(_(" Bad words kicker : %s"), GetString(u->Account(), LanguageString::ENABLED).c_str());
+ source.Reply(_(" Bad words kicker : %s"), _(ENABLED));
}
else
- source.Reply(_(" Bad words kicker : %s"), GetString(u->Account(), LanguageString::DISABLED).c_str());
+ source.Reply(_(" Bad words kicker : %s"), _(DISABLED));
if (ci->botflags.HasFlag(BS_KICK_BOLDS))
{
if (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]);
+ source.Reply(_(" Bolds kicker : %s (%d kick(s) to ban)"), _(ENABLED), ci->ttb[TTB_BOLDS]);
else
- source.Reply(_(" Bolds kicker : %s"), GetString(u->Account(), LanguageString::ENABLED).c_str());
+ source.Reply(_(" Bolds kicker : %s"), _(ENABLED));
}
else
- source.Reply(_(" Bolds kicker : %s"), GetString(u->Account(), LanguageString::DISABLED).c_str());
+ source.Reply(_(" Bolds kicker : %s"), _(DISABLED));
if (ci->botflags.HasFlag(BS_KICK_CAPS))
{
if (ci->ttb[TTB_CAPS])
- 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);
+ source.Reply(_(" Caps kicker : %s (%d kick(s) to ban; minimum %d/%d%%)"), _(ENABLED), ci->ttb[TTB_CAPS], ci->capsmin, ci->capspercent);
else
- source.Reply(_(" Caps kicker : %s (minimum %d/%d%%)"), GetString(u->Account(), LanguageString::ENABLED).c_str(), ci->capsmin, ci->capspercent);
+ source.Reply(_(" Caps kicker : %s (minimum %d/%d%%)"), _(ENABLED), ci->capsmin, ci->capspercent);
}
else
- source.Reply(_(" Caps kicker : %s"), GetString(u->Account(), LanguageString::DISABLED).c_str());
+ source.Reply(_(" Caps kicker : %s"), _(DISABLED));
if (ci->botflags.HasFlag(BS_KICK_COLORS))
{
if (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]);
+ source.Reply(_(" Colors kicker : %s (%d kick(s) to ban)"), _(ENABLED), ci->ttb[TTB_COLORS]);
else
- source.Reply(_(" Colors kicker : %s"), GetString(u->Account(), LanguageString::ENABLED).c_str());
+ source.Reply(_(" Colors kicker : %s"), _(ENABLED));
}
else
- source.Reply(_(" Colors kicker : %s"), GetString(u->Account(), LanguageString::DISABLED).c_str());
+ source.Reply(_(" Colors kicker : %s"), _(DISABLED));
if (ci->botflags.HasFlag(BS_KICK_FLOOD))
{
if (ci->ttb[TTB_FLOOD])
- 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);
+ source.Reply(_(" Flood kicker : %s (%d kick(s) to ban; %d lines in %ds)"), _(ENABLED), ci->ttb[TTB_FLOOD], ci->floodlines, ci->floodsecs);
else
- source.Reply(_(" Flood kicker : %s (%d lines in %ds)"), GetString(u->Account(), LanguageString::ENABLED).c_str(), ci->floodlines, ci->floodsecs);
+ source.Reply(_(" Flood kicker : %s (%d lines in %ds)"), _(ENABLED), ci->floodlines, ci->floodsecs);
}
else
- source.Reply(_(" Flood kicker : %s"), GetString(u->Account(), LanguageString::DISABLED).c_str());
+ source.Reply(_(" Flood kicker : %s"), _(DISABLED));
if (ci->botflags.HasFlag(BS_KICK_REPEAT))
{
if (ci->ttb[TTB_REPEAT])
- 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);
+ source.Reply(_(" Repeat kicker : %s (%d kick(s) to ban; %d times)"), _(ENABLED), ci->ttb[TTB_REPEAT], ci->repeattimes);
else
- source.Reply(_(" Repeat kicker : %s (%d times)"), GetString(u->Account(), LanguageString::ENABLED).c_str(), ci->repeattimes);
+ source.Reply(_(" Repeat kicker : %s (%d times)"), _(ENABLED), ci->repeattimes);
}
else
- source.Reply(_(" Repeat kicker : %s"), GetString(u->Account(), LanguageString::DISABLED).c_str());
+ source.Reply(_(" Repeat kicker : %s"), _(DISABLED));
if (ci->botflags.HasFlag(BS_KICK_REVERSES))
{
if (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]);
+ source.Reply(_(" Reverses kicker : %s (%d kick(s) to ban)"), _(ENABLED), ci->ttb[TTB_REVERSES]);
else
- source.Reply(_(" Reverses kicker : %s"), GetString(u->Account(), LanguageString::ENABLED).c_str());
+ source.Reply(_(" Reverses kicker : %s"), _(ENABLED));
}
else
- source.Reply(_(" Reverses kicker : %s"), GetString(u->Account(), LanguageString::DISABLED).c_str());
+ source.Reply(_(" Reverses kicker : %s"), _(DISABLED));
if (ci->botflags.HasFlag(BS_KICK_UNDERLINES))
{
if (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]);
+ source.Reply(_(" Underlines kicker : %s (%d kick(s) to ban)"), _(ENABLED), ci->ttb[TTB_UNDERLINES]);
else
- source.Reply(_(" Underlines kicker : %s"), GetString(u->Account(), LanguageString::ENABLED).c_str());
+ source.Reply(_(" Underlines kicker : %s"), _(ENABLED));
}
else
- source.Reply(_(" Underlines kicker : %s"), GetString(u->Account(), LanguageString::DISABLED).c_str());
+ source.Reply(_(" Underlines kicker : %s"), _(DISABLED));
if (ci->botflags.HasFlag(BS_KICK_ITALICS))
{
if (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]);
+ source.Reply(_(" Italics kicker : %s (%d kick(s) to ban)"), _(ENABLED), ci->ttb[TTB_ITALICS]);
else
- source.Reply(_(" Italics kicker : %s"), GetString(u->Account(), LanguageString::ENABLED).c_str());
+ source.Reply(_(" Italics kicker : %s"), _(ENABLED));
}
else
- source.Reply(_(" Italics kicker : %s"), GetString(u->Account(), LanguageString::DISABLED).c_str());
+ source.Reply(_(" Italics kicker : %s"), _(DISABLED));
if (ci->botflags.HasFlag(BS_KICK_AMSGS))
{
if (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]);
+ source.Reply(_(" AMSG kicker : %s (%d kick(s) to ban)"), _(ENABLED), ci->ttb[TTB_AMSGS]);
else
- source.Reply(_(" AMSG kicker : %s"), GetString(u->Account(), LanguageString::ENABLED).c_str());
+ source.Reply(_(" AMSG kicker : %s"), _(ENABLED));
}
else
- source.Reply(_(" AMSG kicker : %s"), GetString(u->Account(), LanguageString::DISABLED).c_str());
+ source.Reply(_(" AMSG kicker : %s"), _(DISABLED));
if (ci->botflags.HasFlag(BS_MSG_PRIVMSG))
source.Reply(_(" Fantasy reply : %s"), "PRIVMSG");
@@ -184,35 +184,35 @@ class CommandBSInfo : public Command
*end = 0;
if (ci->botflags.HasFlag(BS_DONTKICKOPS))
{
- end += snprintf(end, sizeof(buf) - (end - buf), "%s", GetString(u->Account(), _("Ops protection")).c_str());
+ end += snprintf(end, sizeof(buf) - (end - buf), "%s", _("Ops protection"));
need_comma = true;
}
if (ci->botflags.HasFlag(BS_DONTKICKVOICES))
{
- end += snprintf(end, sizeof(buf) - (end - buf), "%s%s", need_comma ? ", " : "", GetString(u->Account(), _("Voices protection")).c_str());
+ end += snprintf(end, sizeof(buf) - (end - buf), "%s%s", need_comma ? ", " : "", _("Voices protection"));
need_comma = true;
}
if (ci->botflags.HasFlag(BS_FANTASY))
{
- end += snprintf(end, sizeof(buf) - (end - buf), "%s%s", need_comma ? ", " : "", GetString(u->Account(), _("Fantasy")).c_str());
+ end += snprintf(end, sizeof(buf) - (end - buf), "%s%s", need_comma ? ", " : "", _("Fantasy"));
need_comma = true;
}
if (ci->botflags.HasFlag(BS_GREET))
{
- end += snprintf(end, sizeof(buf) - (end - buf), "%s%s", need_comma ? ", " : "", GetString(u->Account(), _("Greet")).c_str());
+ end += snprintf(end, sizeof(buf) - (end - buf), "%s%s", need_comma ? ", " : "", _("Greet"));
need_comma = true;
}
if (ci->botflags.HasFlag(BS_NOBOT))
{
- end += snprintf(end, sizeof(buf) - (end - buf), "%s%s", need_comma ? ", " : "", GetString(u->Account(), _("No bot")).c_str());
+ end += snprintf(end, sizeof(buf) - (end - buf), "%s%s", need_comma ? ", " : "", _("No bot"));
need_comma = true;
}
if (ci->botflags.HasFlag(BS_SYMBIOSIS))
{
- end += snprintf(end, sizeof(buf) - (end - buf), "%s%s", need_comma ? ", " : "", GetString(u->Account(), _("Symbiosis")).c_str());
+ end += snprintf(end, sizeof(buf) - (end - buf), "%s%s", need_comma ? ", " : "", _("Symbiosis"));
need_comma = true;
}
- source.Reply(_(" Options : %s"), *buf ? buf : GetString(u->Account(), _("None")).c_str());
+ source.Reply(_(" Options : %s"), *buf ? buf : _("None"));
}
else
source.Reply(_("\002%s\002 is not a valid bot or registered channel."), query.c_str());
diff --git a/modules/core/bs_kick.cpp b/modules/core/bs_kick.cpp
index 680ccc3d9..d737f5ec9 100644
--- a/modules/core/bs_kick.cpp
+++ b/modules/core/bs_kick.cpp
@@ -39,9 +39,9 @@ class CommandBSKick : public Command
else if (!value.equals_ci("ON") && !value.equals_ci("OFF"))
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(LanguageString::ACCESS_DENIED);
+ source.Reply(_(ACCESS_DENIED));
else if (!ci->bi)
- source.Reply(LanguageString::BOT_NOT_ASSIGNED);
+ source.Reply(_(BOT_NOT_ASSIGNED));
else
{
bool override = !check_access(u, ci, CA_SET);
@@ -451,7 +451,7 @@ class CommandBSKick : public Command
}
}
else
- source.Reply(LanguageString::UNKNOWN_OPTION, option.c_str(), this->name.c_str());
+ source.Reply(_(UNKNOWN_OPTION), option.c_str(), this->name.c_str());
}
return MOD_CONT;
}
diff --git a/modules/core/bs_say.cpp b/modules/core/bs_say.cpp
index 3d8f64577..8b9d0627b 100644
--- a/modules/core/bs_say.cpp
+++ b/modules/core/bs_say.cpp
@@ -30,19 +30,19 @@ class CommandBSSay : public Command
if (!check_access(u, ci, CA_SAY))
{
- source.Reply(LanguageString::ACCESS_DENIED);
+ source.Reply(_(ACCESS_DENIED));
return MOD_CONT;
}
if (!ci->bi)
{
- source.Reply(LanguageString::BOT_NOT_ASSIGNED);
+ source.Reply(_(BOT_NOT_ASSIGNED));
return MOD_CONT;
}
if (!ci->c || !ci->c->FindUser(ci->bi))
{
- source.Reply(LanguageString::BOT_NOT_ON_CHANNEL, ci->name.c_str());
+ source.Reply(_(BOT_NOT_ON_CHANNEL), ci->name.c_str());
return MOD_CONT;
}
diff --git a/modules/core/bs_set.cpp b/modules/core/bs_set.cpp
index 3e9bf13a0..8439ef9e7 100644
--- a/modules/core/bs_set.cpp
+++ b/modules/core/bs_set.cpp
@@ -39,7 +39,7 @@ class CommandBSSet : public Command
if (!(bi = findbot(chan)))
{
- source.Reply(LanguageString::BOT_DOES_NOT_EXIST, chan.c_str());
+ source.Reply(_(BOT_DOES_NOT_EXIST), chan.c_str());
return MOD_CONT;
}
@@ -58,9 +58,9 @@ class CommandBSSet : public Command
return MOD_CONT;
}
else if (!(ci = cs_findchan(chan)))
- source.Reply(LanguageString::CHAN_X_NOT_REGISTERED, chan.c_str());
+ source.Reply(_(CHAN_X_NOT_REGISTERED), chan.c_str());
else if (!u->Account()->HasPriv("botserv/administration") && !check_access(u, ci, CA_SET))
- source.Reply(LanguageString::ACCESS_DENIED);
+ source.Reply(_(ACCESS_DENIED));
else
{
bool override = !check_access(u, ci, CA_SET);
@@ -192,7 +192,7 @@ class CommandBSSet : public Command
SyntaxError(source, "SET MSG", _("SET \037channel\037 MSG {\037OFF|PRIVMSG|NOTICE|\037}"));
}
else
- source.Reply(LanguageString::UNKNOWN_OPTION, option.c_str(), this->name.c_str());
+ source.Reply(_(UNKNOWN_OPTION), option.c_str(), this->name.c_str());
}
return MOD_CONT;
diff --git a/modules/core/bs_unassign.cpp b/modules/core/bs_unassign.cpp
index f7201c905..d9c17b617 100644
--- a/modules/core/bs_unassign.cpp
+++ b/modules/core/bs_unassign.cpp
@@ -29,11 +29,11 @@ class CommandBSUnassign : public Command
ChannelInfo *ci = source.ci;
if (readonly)
- source.Reply(LanguageString::BOT_ASSIGN_READONLY);
+ source.Reply(_(BOT_ASSIGN_READONLY));
else if (!u->Account()->HasPriv("botserv/administration") && !check_access(u, ci, CA_ASSIGN))
- source.Reply(LanguageString::ACCESS_DENIED);
+ source.Reply(_(ACCESS_DENIED));
else if (!ci->bi)
- source.Reply(LanguageString::BOT_NOT_ASSIGNED);
+ source.Reply(_(BOT_NOT_ASSIGNED));
else if (ci->HasFlag(CI_PERSIST) && !cm)
source.Reply(_("You can not unassign bots while persist is set on the channel."));
else
diff --git a/modules/core/cs_access.cpp b/modules/core/cs_access.cpp
index b119fb9d7..413652974 100644
--- a/modules/core/cs_access.cpp
+++ b/modules/core/cs_access.cpp
@@ -39,7 +39,7 @@ class AccessListCallback : public NumberList
if (!SentHeader)
{
SentHeader = true;
- source.Reply(LanguageString::CHAN_ACCESS_LIST_HEADER, source.ci->name.c_str());
+ source.Reply(_(CHAN_ACCESS_LIST_HEADER), source.ci->name.c_str());
}
DoList(source, Number - 1, source.ci->GetAccess(Number - 1));
@@ -72,7 +72,7 @@ class AccessViewCallback : public AccessListCallback
if (!SentHeader)
{
SentHeader = true;
- source.Reply(LanguageString::CHAN_ACCESS_LIST_HEADER, source.ci->name.c_str());
+ source.Reply(_(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(LanguageString::CHAN_ACCESS_VIEW_XOP_FORMAT, Number + 1, xop.c_str(), access->mask.c_str(), access->creator.c_str(), timebuf.c_str());
+ source.Reply(_(CHAN_ACCESS_VIEW_XOP_FORMAT), Number + 1, xop.c_str(), access->mask.c_str(), access->creator.c_str(), timebuf.c_str());
}
else
- source.Reply(LanguageString::CHAN_ACCESS_VIEW_AXS_FORMAT, Number + 1, access->level, access->mask.c_str(), access->creator.c_str(), timebuf.c_str());
+ source.Reply(_(CHAN_ACCESS_VIEW_AXS_FORMAT), Number + 1, access->level, access->mask.c_str(), access->creator.c_str(), timebuf.c_str());
}
};
@@ -117,7 +117,7 @@ class AccessDelCallback : public NumberList
~AccessDelCallback()
{
if (Denied && !Deleted)
- source.Reply(LanguageString::ACCESS_DENIED);
+ source.Reply(_(ACCESS_DENIED));
else if (!Deleted)
source.Reply(_("No matching entries on %s access list."), source.ci->name.c_str());
else
@@ -181,7 +181,7 @@ 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(LanguageString::ACCESS_DENIED);
+ source.Reply(_(ACCESS_DENIED));
return MOD_CONT;
}
@@ -192,7 +192,7 @@ class CommandCSAccess : public Command
}
else if (level <= ACCESS_INVALID || level >= ACCESS_FOUNDER)
{
- source.Reply(LanguageString::CHAN_ACCESS_LEVEL_RANGE, ACCESS_INVALID + 1, ACCESS_FOUNDER - 1);
+ source.Reply(_(CHAN_ACCESS_LEVEL_RANGE), ACCESS_INVALID + 1, ACCESS_FOUNDER - 1);
return MOD_CONT;
}
@@ -203,7 +203,7 @@ class CommandCSAccess : public Command
mask += "!*@*";
else if (na && na->HasFlag(NS_FORBIDDEN))
{
- source.Reply(LanguageString::NICK_X_FORBIDDEN, mask.c_str());
+ source.Reply(_(NICK_X_FORBIDDEN), mask.c_str());
return MOD_CONT;
}
@@ -213,7 +213,7 @@ 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(LanguageString::ACCESS_DENIED);
+ source.Reply(_(ACCESS_DENIED));
return MOD_CONT;
}
if (access->level == level)
@@ -268,7 +268,7 @@ class CommandCSAccess : public Command
if (!access)
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(LanguageString::ACCESS_DENIED);
+ source.Reply(_(ACCESS_DENIED));
else
{
source.Reply(_("\002%s\002 deleted from %s access list."), access->mask.c_str(), ci->name.c_str());
@@ -311,7 +311,7 @@ class CommandCSAccess : public Command
if (!SentHeader)
{
SentHeader = true;
- source.Reply(LanguageString::CHAN_ACCESS_LIST_HEADER, ci->name.c_str());
+ source.Reply(_(CHAN_ACCESS_LIST_HEADER), ci->name.c_str());
}
AccessListCallback::DoList(source, i, access);
@@ -353,7 +353,7 @@ class CommandCSAccess : public Command
if (!SentHeader)
{
SentHeader = true;
- source.Reply(LanguageString::CHAN_ACCESS_LIST_HEADER, ci->name.c_str());
+ source.Reply(_(CHAN_ACCESS_LIST_HEADER), ci->name.c_str());
}
AccessViewCallback::DoList(source, i, access);
@@ -374,7 +374,7 @@ class CommandCSAccess : public Command
ChannelInfo *ci = source.ci;
if (!IsFounder(u, ci) && !u->Account()->HasPriv("chanserv/access/modify"))
- source.Reply(LanguageString::ACCESS_DENIED);
+ source.Reply(_(ACCESS_DENIED));
else
{
ci->ClearAccess();
@@ -427,7 +427,7 @@ 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(LanguageString::ACCESS_DENIED);
+ source.Reply(_(ACCESS_DENIED));
/* We still allow LIST and CLEAR in xOP mode, but not others */
else if (ci->HasFlag(CI_XOP) && !is_list && !is_clear)
{
@@ -689,7 +689,7 @@ class CommandCSLevels : public Command
else if (ci->HasFlag(CI_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(LanguageString::ACCESS_DENIED);
+ source.Reply(_(ACCESS_DENIED));
else if (cmd.equals_ci("SET"))
this->DoSet(source, params);
else if (cmd.equals_ci("DIS") || cmd.equals_ci("DISABLE"))
diff --git a/modules/core/cs_akick.cpp b/modules/core/cs_akick.cpp
index e3ebeeb2a..3761e95de 100644
--- a/modules/core/cs_akick.cpp
+++ b/modules/core/cs_akick.cpp
@@ -83,7 +83,7 @@ class AkickListCallback : public NumberList
static void DoList(CommandSource &source, unsigned index, AutoKick *akick)
{
- 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());
+ 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() : _(NO_REASON));
}
};
@@ -110,15 +110,14 @@ class AkickViewCallback : public AkickListCallback
static void DoList(CommandSource &source, unsigned index, AutoKick *akick)
{
- User *u = source.u;
Anope::string timebuf;
if (akick->addtime)
timebuf = do_strftime(akick->addtime);
else
- timebuf = GetString(u->Account(), LanguageString::UNKNOWN);
+ timebuf = _(UNKNOWN);
- 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());
+ 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() : UNKNOWN, timebuf.c_str(), !akick->reason.empty() ? akick->reason.c_str() : _(NO_REASON));
if (akick->last_used)
source.Reply(_(" Last used %s"), do_strftime(akick->last_used).c_str());
@@ -184,7 +183,7 @@ class CommandCSAKick : public Command
{
if (na->HasFlag(NS_FORBIDDEN))
{
- source.Reply(LanguageString::NICK_X_FORBIDDEN, mask.c_str());
+ source.Reply(_(NICK_X_FORBIDDEN), mask.c_str());
return;
}
@@ -194,7 +193,7 @@ class CommandCSAKick : public Command
/* Check excepts BEFORE we get this far */
if (ModeManager::FindChannelModeByName(CMODE_EXCEPT) && is_excepted_mask(ci, mask))
{
- source.Reply(LanguageString::CHAN_EXCEPTED, mask.c_str(), ci->name.c_str());
+ source.Reply(_(CHAN_EXCEPTED), mask.c_str(), ci->name.c_str());
return;
}
@@ -206,7 +205,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(LanguageString::ACCESS_DENIED);
+ source.Reply(_(ACCESS_DENIED));
return;
}
}
@@ -224,7 +223,7 @@ class CommandCSAKick : public Command
if ((check_access(u2, ci, CA_FOUNDER) || u2_level >= u_level) && entry_mask.Matches(u2))
{
- source.Reply(LanguageString::ACCESS_DENIED);
+ source.Reply(_(ACCESS_DENIED));
return;
}
}
@@ -245,7 +244,7 @@ class CommandCSAKick : public Command
Anope::string buf = na2->nick + "!" + na2->last_usermask;
if (Anope::Match(buf, mask))
{
- source.Reply(LanguageString::ACCESS_DENIED);
+ source.Reply(_(ACCESS_DENIED));
return;
}
}
@@ -443,7 +442,7 @@ class CommandCSAKick : public Command
if (!c)
{
- source.Reply(LanguageString::CHAN_X_NOT_IN_USE, ci->name.c_str());
+ source.Reply(_(CHAN_X_NOT_IN_USE), ci->name.c_str());
return;
}
@@ -490,7 +489,7 @@ 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(LanguageString::ACCESS_DENIED);
+ source.Reply(_(ACCESS_DENIED));
else if (!cmd.equals_ci("LIST") && !cmd.equals_ci("VIEW") && !cmd.equals_ci("ENFORCE") && readonly)
source.Reply(_("Sorry, channel autokick list modification is temporarily disabled."));
else if (cmd.equals_ci("ADD"))
diff --git a/modules/core/cs_ban.cpp b/modules/core/cs_ban.cpp
index 8f85a0a48..b269e7492 100644
--- a/modules/core/cs_ban.cpp
+++ b/modules/core/cs_ban.cpp
@@ -37,21 +37,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(LanguageString::CHAN_X_NOT_IN_USE, chan.c_str());
+ source.Reply(_(CHAN_X_NOT_IN_USE), chan.c_str());
else if (!u2)
- source.Reply(LanguageString::NICK_X_NOT_IN_USE, target.c_str());
+ source.Reply(_(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(LanguageString::ACCESS_DENIED);
+ source.Reply(_(ACCESS_DENIED));
else if (!is_same && ci->HasFlag(CI_PEACE) && u2_level >= u_level)
- source.Reply(LanguageString::ACCESS_DENIED);
+ source.Reply(_(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(LanguageString::CHAN_EXCEPTED, u2->nick.c_str(), ci->name.c_str());
+ source.Reply(_(CHAN_EXCEPTED), u2->nick.c_str(), ci->name.c_str());
else if (u2->IsProtected())
- source.Reply(LanguageString::ACCESS_DENIED);
+ source.Reply(_(ACCESS_DENIED));
else
{
Anope::string mask;
diff --git a/modules/core/cs_clearusers.cpp b/modules/core/cs_clearusers.cpp
index ef82240fc..2c11a132b 100644
--- a/modules/core/cs_clearusers.cpp
+++ b/modules/core/cs_clearusers.cpp
@@ -32,9 +32,9 @@ class CommandCSClearUsers : public Command
Anope::string modebuf;
if (!c)
- source.Reply(LanguageString::CHAN_X_NOT_IN_USE, chan.c_str());
+ source.Reply(_(CHAN_X_NOT_IN_USE), chan.c_str());
else if (!check_access(u, ci, CA_FOUNDER))
- source.Reply(LanguageString::ACCESS_DENIED);
+ source.Reply(_(ACCESS_DENIED));
Anope::string buf = "CLEARUSERS command from " + u->nick + " (" + u->Account()->display + ")";
diff --git a/modules/core/cs_clone.cpp b/modules/core/cs_clone.cpp
index 2e0759807..82f6bb961 100644
--- a/modules/core/cs_clone.cpp
+++ b/modules/core/cs_clone.cpp
@@ -32,24 +32,24 @@ public:
if (!check_access(u, ci, CA_SET))
{
- source.Reply(LanguageString::ACCESS_DENIED);
+ source.Reply(_(ACCESS_DENIED));
return MOD_CONT;
}
ChannelInfo *target_ci = cs_findchan(target);
if (!target_ci)
{
- source.Reply(LanguageString::CHAN_X_NOT_REGISTERED, target.c_str());
+ source.Reply(_(CHAN_X_NOT_REGISTERED), target.c_str());
return MOD_CONT;
}
if (!IsFounder(u, ci) || !IsFounder(u, target_ci))
{
- source.Reply(LanguageString::ACCESS_DENIED);
+ source.Reply(_(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 ? LanguageString::CHAN_EXCEEDED_CHANNEL_LIMIT : LanguageString::CHAN_REACHED_CHANNEL_LIMIT, Config->CSMaxReg);
+ source.Reply(u->Account()->channelcount > Config->CSMaxReg ? _(CHAN_EXCEEDED_CHANNEL_LIMIT) : _(CHAN_REACHED_CHANNEL_LIMIT), Config->CSMaxReg);
return MOD_CONT;
}
diff --git a/modules/core/cs_drop.cpp b/modules/core/cs_drop.cpp
index 3b10a95f8..87de45c0f 100644
--- a/modules/core/cs_drop.cpp
+++ b/modules/core/cs_drop.cpp
@@ -40,19 +40,19 @@ class CommandCSDrop : public Command
if (ci->HasFlag(CI_FORBIDDEN) && !u->Account()->HasCommand("chanserv/drop"))
{
- source.Reply(LanguageString::CHAN_X_FORBIDDEN, chan.c_str());
+ source.Reply(_(CHAN_X_FORBIDDEN), chan.c_str());
return MOD_CONT;
}
if (ci->HasFlag(CI_SUSPENDED) && !u->Account()->HasCommand("chanserv/drop"))
{
- source.Reply(LanguageString::CHAN_X_FORBIDDEN, chan.c_str());
+ source.Reply(_(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(LanguageString::ACCESS_DENIED);
+ source.Reply(_(ACCESS_DENIED));
return MOD_CONT;
}
diff --git a/modules/core/cs_forbid.cpp b/modules/core/cs_forbid.cpp
index dabf27f2b..3d75b9233 100644
--- a/modules/core/cs_forbid.cpp
+++ b/modules/core/cs_forbid.cpp
@@ -38,13 +38,13 @@ class CommandCSForbid : public Command
if (chan[0] != '#')
{
- source.Reply(LanguageString::CHAN_SYMBOL_REQUIRED);
+ source.Reply(_(CHAN_SYMBOL_REQUIRED));
return MOD_CONT;
}
if (readonly)
{
- source.Reply(LanguageString::READ_ONLY_MODE);
+ source.Reply(_(READ_ONLY_MODE));
return MOD_CONT;
}
@@ -75,7 +75,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->Account(), _("This channel has been forbidden.")).c_str());
+ c->Kick(ChanServ, uc->user, "%s", !reason.empty() ? reason.c_str() : GetString(uc->user->Account(), "This channel has been forbidden.").c_str());
}
}
diff --git a/modules/core/cs_getkey.cpp b/modules/core/cs_getkey.cpp
index a5a84616c..d1466d398 100644
--- a/modules/core/cs_getkey.cpp
+++ b/modules/core/cs_getkey.cpp
@@ -30,7 +30,7 @@ class CommandCSGetKey : public Command
if (!check_access(u, ci, CA_GETKEY) && !u->Account()->HasCommand("chanserv/getkey"))
{
- source.Reply(LanguageString::ACCESS_DENIED);
+ source.Reply(_(ACCESS_DENIED));
return MOD_CONT;
}
diff --git a/modules/core/cs_info.cpp b/modules/core/cs_info.cpp
index 6ba34f3a5..8e239c099 100644
--- a/modules/core/cs_info.cpp
+++ b/modules/core/cs_info.cpp
@@ -48,9 +48,9 @@ class CommandCSInfo : public Command
if (ci->HasFlag(CI_FORBIDDEN))
{
if (u->HasMode(UMODE_OPER) && !ci->forbidby.empty())
- 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());
+ source.Reply(_(CHAN_X_FORBIDDEN_OPER), chan.c_str(), ci->forbidby.c_str(), !ci->forbidreason.empty() ? ci->forbidreason.c_str() : _(NO_REASON));
else
- source.Reply(LanguageString::CHAN_X_FORBIDDEN, chan.c_str());
+ source.Reply(_(CHAN_X_FORBIDDEN), chan.c_str());
return MOD_CONT;
}
@@ -59,7 +59,7 @@ class CommandCSInfo : public Command
if (has_auspex || check_access(u, ci, CA_INFO))
show_all = true;
- source.Reply(LanguageString::CHAN_INFO_HEADER, chan.c_str());
+ source.Reply(_(CHAN_INFO_HEADER), chan.c_str());
source.Reply(_(" Founder: %s"), ci->founder->display.c_str());
if (show_all && ci->successor)
@@ -81,35 +81,33 @@ class CommandCSInfo : public Command
source.Reply(_(" Ban type: %d"), ci->bantype);
Anope::string optbuf;
- 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());
+ CheckOptStr(optbuf, CI_KEEPTOPIC, _("Topic Retention"), ci, u->Account());
+ CheckOptStr(optbuf, CI_OPNOTICE, _("OP Notice"), ci, u->Account());
+ CheckOptStr(optbuf, CI_PEACE, _("Peace"), ci, u->Account());
+ CheckOptStr(optbuf, CI_PRIVATE, _("Private"), ci, u->Account());
+ CheckOptStr(optbuf, CI_RESTRICTED, _("Restricted Access"), ci, u->Account());
+ CheckOptStr(optbuf, CI_SECURE, _("Secure"), ci, u->Account());
+ CheckOptStr(optbuf, CI_SECUREFOUNDER, _("Secure Founder"), ci, u->Account());
+ CheckOptStr(optbuf, CI_SECUREOPS, _("Secure Ops"), ci, u->Account());
if (ci->HasFlag(CI_SIGNKICK))
- CheckOptStr(optbuf, CI_SIGNKICK, GetString(u->Account(), _("Signed kicks")), ci, u->Account());
+ CheckOptStr(optbuf, CI_SIGNKICK, _("Signed kicks"), ci, u->Account());
else
- 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());
+ CheckOptStr(optbuf, CI_SIGNKICK_LEVEL, _("Signed kicks"), ci, u->Account());
+ CheckOptStr(optbuf, CI_TOPICLOCK, _("Topic Lock"), ci, u->Account());
+ CheckOptStr(optbuf, CI_XOP, _("xOP lists system"), ci, u->Account());
+ CheckOptStr(optbuf, CI_PERSIST, _("Persistant"), ci, u->Account());
+ CheckOptStr(optbuf, CI_NO_EXPIRE, _("No expire"), ci, u->Account());
- source.Reply(LanguageString::NICK_INFO_OPTIONS, optbuf.empty() ? _("None") : optbuf.c_str());
+ source.Reply(_(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(_("This channel will not expire."));
- else
+ if (!ci->HasFlag(CI_NO_EXPIRE))
source.Reply(_(" Expires on: %s"), do_strftime(ci->last_used + Config->CSExpire).c_str());
}
if (ci->HasFlag(CI_SUSPENDED))
- source.Reply(_(" Suspended: [%s] %s"), ci->forbidby.c_str(), !ci->forbidreason.empty() ? ci->forbidreason.c_str() : GetString(u->Account(), LanguageString::NO_REASON).c_str());
+ source.Reply(_(" Suspended: [%s] %s"), ci->forbidby.c_str(), !ci->forbidreason.empty() ? ci->forbidreason.c_str() : _(NO_REASON));
- FOREACH_MOD(I_OnChanInfo, OnChanInfo(u, ci, show_all));
+ FOREACH_MOD(I_OnChanInfo, OnChanInfo(source, ci, show_all));
return MOD_CONT;
}
diff --git a/modules/core/cs_invite.cpp b/modules/core/cs_invite.cpp
index 986d5c5ea..55efd6edf 100644
--- a/modules/core/cs_invite.cpp
+++ b/modules/core/cs_invite.cpp
@@ -31,7 +31,7 @@ class CommandCSInvite : public Command
if (!(c = findchan(chan)))
{
- source.Reply(LanguageString::CHAN_X_NOT_IN_USE, chan.c_str());
+ source.Reply(_(CHAN_X_NOT_IN_USE), chan.c_str());
return MOD_CONT;
}
@@ -39,7 +39,7 @@ class CommandCSInvite : public Command
if (!check_access(u, ci, CA_INVITE))
{
- source.Reply(LanguageString::ACCESS_DENIED);
+ source.Reply(_(ACCESS_DENIED));
return MOD_CONT;
}
@@ -50,7 +50,7 @@ class CommandCSInvite : public Command
{
if (!(u2 = finduser(params[1])))
{
- source.Reply(LanguageString::NICK_X_NOT_IN_USE, params[1].c_str());
+ source.Reply(_(NICK_X_NOT_IN_USE), params[1].c_str());
return MOD_CONT;
}
}
diff --git a/modules/core/cs_kick.cpp b/modules/core/cs_kick.cpp
index 3e37b4b41..cd0c5c387 100644
--- a/modules/core/cs_kick.cpp
+++ b/modules/core/cs_kick.cpp
@@ -37,17 +37,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(LanguageString::CHAN_X_NOT_IN_USE, chan.c_str());
+ source.Reply(_(CHAN_X_NOT_IN_USE), chan.c_str());
else if (!u2)
- source.Reply(LanguageString::NICK_X_NOT_IN_USE, target.c_str());
+ source.Reply(_(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(LanguageString::ACCESS_DENIED);
+ source.Reply(_(ACCESS_DENIED));
else if (!is_same && (ci->HasFlag(CI_PEACE)) && u2_level >= u_level)
- source.Reply(LanguageString::ACCESS_DENIED);
+ source.Reply(_(ACCESS_DENIED));
else if (u2->IsProtected())
- source.Reply(LanguageString::ACCESS_DENIED);
+ source.Reply(_(ACCESS_DENIED));
else if (!c->FindUser(u2))
- source.Reply(LanguageString::NICK_X_NOT_ON_CHAN, u2->nick.c_str(), c->name.c_str());
+ source.Reply(_(NICK_X_NOT_ON_CHAN), u2->nick.c_str(), c->name.c_str());
else
{
// XXX
diff --git a/modules/core/cs_list.cpp b/modules/core/cs_list.cpp
index 4f1a95952..12da08ed3 100644
--- a/modules/core/cs_list.cpp
+++ b/modules/core/cs_list.cpp
@@ -36,7 +36,7 @@ class CommandCSList : public Command
if (Config->CSListOpersOnly && !u->HasMode(UMODE_OPER))
{
- source.Reply(LanguageString::ACCESS_DENIED);
+ source.Reply(_(ACCESS_DENIED));
return MOD_CONT;
}
@@ -52,7 +52,7 @@ class CommandCSList : public Command
}
catch (const ConvertException &)
{
- source.Reply(LanguageString::LIST_INCORRECT_RANGE);
+ source.Reply(_(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;
@@ -80,7 +80,7 @@ class CommandCSList : public Command
Anope::string spattern = "#" + pattern;
- source.Reply(LanguageString::LIST_HEADER, pattern.c_str());
+ source.Reply(_(LIST_HEADER), pattern.c_str());
for (registered_channel_map::const_iterator it = RegisteredChannelList.begin(), it_end = RegisteredChannelList.end(); it != it_end; ++it)
{
@@ -133,7 +133,7 @@ class CommandCSList : public Command
void OnSyntaxError(CommandSource &source, const Anope::string &subcommand)
{
- SyntaxError(source, "LIST", LanguageString::NICK_LIST_SYNTAX);
+ SyntaxError(source, "LIST", _(NICK_LIST_SYNTAX));
}
};
diff --git a/modules/core/cs_mode.cpp b/modules/core/cs_mode.cpp
index a295c6d3d..6399bdc35 100644
--- a/modules/core/cs_mode.cpp
+++ b/modules/core/cs_mode.cpp
@@ -266,9 +266,9 @@ class CommandCSMode : public Command
ChannelInfo *ci = source.ci;
if (!ci || !ci->c)
- source.Reply(LanguageString::CHAN_X_NOT_IN_USE, ci->name.c_str());
+ source.Reply(_(CHAN_X_NOT_IN_USE), ci->name.c_str());
else if (!check_access(u, ci, CA_MODE) && !u->Account()->HasCommand("chanserv/mode"))
- source.Reply(LanguageString::ACCESS_DENIED);
+ source.Reply(_(ACCESS_DENIED));
else if (subcommand.equals_ci("LOCK"))
this->DoLock(source, params);
else if (subcommand.equals_ci("SET"))
diff --git a/modules/core/cs_modes.cpp b/modules/core/cs_modes.cpp
index b7ddc3971..e51274996 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(LanguageString::CHAN_X_NOT_IN_USE, chan.c_str());
+ source.Reply(_(CHAN_X_NOT_IN_USE), chan.c_str());
else if (!ci)
- source.Reply(LanguageString::CHAN_X_NOT_REGISTERED, chan.c_str());
+ source.Reply(_(CHAN_X_NOT_REGISTERED), chan.c_str());
else if (!u2)
- source.Reply(LanguageString::NICK_X_NOT_IN_USE, nick.c_str());
+ source.Reply(_(NICK_X_NOT_IN_USE), nick.c_str());
else if (is_same ? !check_access(u, ci, levelself) : !check_access(u, ci, level))
- source.Reply(LanguageString::ACCESS_DENIED);
+ source.Reply(_(ACCESS_DENIED));
else if (!set && !is_same && ci->HasFlag(CI_PEACE) && u2_level >= u_level)
- source.Reply(LanguageString::ACCESS_DENIED);
+ source.Reply(_(ACCESS_DENIED));
else if (!set && u2->IsProtected() && !is_same)
- source.Reply(LanguageString::ACCESS_DENIED);
+ source.Reply(_(ACCESS_DENIED));
else if (!c->FindUser(u2))
- source.Reply(LanguageString::NICK_X_NOT_ON_CHAN, u2->nick.c_str(), c->name.c_str());
+ source.Reply(_(NICK_X_NOT_ON_CHAN), u2->nick.c_str(), c->name.c_str());
else
{
if (set)
diff --git a/modules/core/cs_register.cpp b/modules/core/cs_register.cpp
index ebcc76811..34cdc50df 100644
--- a/modules/core/cs_register.cpp
+++ b/modules/core/cs_register.cpp
@@ -40,15 +40,15 @@ class CommandCSRegister : public Command
if (chan[0] == '&')
source.Reply(_("Local channels cannot be registered."));
else if (chan[0] != '#')
- source.Reply(LanguageString::CHAN_SYMBOL_REQUIRED);
+ source.Reply(_(CHAN_SYMBOL_REQUIRED));
else if (!ircdproto->IsChannelValid(chan))
- source.Reply(LanguageString::CHAN_X_INVALID, chan.c_str());
+ source.Reply(_(CHAN_X_INVALID), chan.c_str());
else if (ci)
source.Reply(_("Channel \002%s\002 is already registered!"), chan.c_str());
else if (c && !c->HasUserStatus(u, CMODE_OP))
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 ? LanguageString::CHAN_EXCEEDED_CHANNEL_LIMIT : LanguageString::CHAN_REACHED_CHANNEL_LIMIT, Config->CSMaxReg);
+ source.Reply(u->Account()->channelcount > Config->CSMaxReg ? _(CHAN_EXCEEDED_CHANNEL_LIMIT) : _(CHAN_REACHED_CHANNEL_LIMIT), Config->CSMaxReg);
else
{
ci = new ChannelInfo(chan);
diff --git a/modules/core/cs_saset.cpp b/modules/core/cs_saset.cpp
index 876a487a3..c419d7141 100644
--- a/modules/core/cs_saset.cpp
+++ b/modules/core/cs_saset.cpp
@@ -35,14 +35,14 @@ class CommandCSSASet : public Command
if (readonly)
{
- source.Reply(LanguageString::CHAN_SET_DISABLED);
+ source.Reply(_(CHAN_SET_DISABLED));
return MOD_CONT;
}
// XXX Remove after 1.9.4 release
if (params[1].equals_ci("MLOCK"))
{
- source.Reply(LanguageString::CHAN_SET_MLOCK_DEPRECATED);
+ source.Reply(_(CHAN_SET_MLOCK_DEPRECATED));
return MOD_CONT;
}
@@ -60,7 +60,7 @@ class CommandCSSASet : public Command
else
{
source.Reply(_("Unknown SASET option \002%s\002."), params[1].c_str());
- source.Reply(LanguageString::MORE_INFO, Config->s_ChanServ.c_str(), "SET");
+ source.Reply(_(MORE_INFO), Config->s_ChanServ.c_str(), "SET");
}
return MOD_CONT;
@@ -95,7 +95,7 @@ class CommandCSSASet : public Command
void OnSyntaxError(CommandSource &source, const Anope::string &subcommand)
{
- SyntaxError(source, "SASET", LanguageString::CHAN_SASET_SYNTAX);
+ SyntaxError(source, "SASET", _(CHAN_SASET_SYNTAX));
}
bool AddSubcommand(Module *creator, Command *c)
diff --git a/modules/core/cs_set.cpp b/modules/core/cs_set.cpp
index e089d4a2a..bfb708cac 100644
--- a/modules/core/cs_set.cpp
+++ b/modules/core/cs_set.cpp
@@ -35,19 +35,19 @@ class CommandCSSet : public Command
if (readonly)
{
- source.Reply(LanguageString::CHAN_SET_DISABLED);
+ source.Reply(_(CHAN_SET_DISABLED));
return MOD_CONT;
}
if (!check_access(u, cs_findchan(params[0]), CA_SET))
{
- source.Reply(LanguageString::ACCESS_DENIED);
+ source.Reply(_(ACCESS_DENIED));
return MOD_CONT;
}
// XXX Remove after 1.9.4 release
if (params[1].equals_ci("MLOCK"))
{
- source.Reply(LanguageString::CHAN_SET_MLOCK_DEPRECATED, Config->s_ChanServ.c_str());
+ source.Reply(_(CHAN_SET_MLOCK_DEPRECATED), Config->s_ChanServ.c_str());
return MOD_CONT;
}
@@ -63,8 +63,8 @@ class CommandCSSet : public Command
}
else
{
- source.Reply(LanguageString::NICK_SET_UNKNOWN_OPTION, params[1].c_str());
- source.Reply(LanguageString::MORE_INFO, Config->s_ChanServ.c_str(), "SET");
+ source.Reply(_(NICK_SET_UNKNOWN_OPTION), params[1].c_str());
+ source.Reply(_(MORE_INFO), Config->s_ChanServ.c_str(), "SET");
}
return MOD_CONT;
@@ -99,7 +99,7 @@ class CommandCSSet : public Command
void OnSyntaxError(CommandSource &source, const Anope::string &subcommand)
{
- SyntaxError(source, "SET", LanguageString::CHAN_SET_SYNTAX);
+ SyntaxError(source, "SET", _(CHAN_SET_SYNTAX));
}
bool AddSubcommand(Module *creator, Command *c)
diff --git a/modules/core/cs_set_bantype.cpp b/modules/core/cs_set_bantype.cpp
index d509bffe9..1059c2fc9 100644
--- a/modules/core/cs_set_bantype.cpp
+++ b/modules/core/cs_set_bantype.cpp
@@ -59,7 +59,7 @@ class CommandCSSetBanType : public Command
void OnSyntaxError(CommandSource &source, const Anope::string &)
{
// XXX
- SyntaxError(source, "SET", LanguageString::CHAN_SET_SYNTAX);
+ SyntaxError(source, "SET", _(CHAN_SET_SYNTAX));
}
};
@@ -73,7 +73,7 @@ class CommandCSSASetBanType : public CommandCSSetBanType
void OnSyntaxError(CommandSource &source, const Anope::string &)
{
// XXX
- SyntaxError(source, "SASET", LanguageString::CHAN_SASET_SYNTAX);
+ SyntaxError(source, "SASET", _(CHAN_SASET_SYNTAX));
}
};
diff --git a/modules/core/cs_set_description.cpp b/modules/core/cs_set_description.cpp
index c0a7a5093..deebd5d1b 100644
--- a/modules/core/cs_set_description.cpp
+++ b/modules/core/cs_set_description.cpp
@@ -46,7 +46,7 @@ class CommandCSSetDescription : public Command
void OnSyntaxError(CommandSource &source, const Anope::string &)
{
// XXX
- SyntaxError(source, "SET", LanguageString::CHAN_SET_SYNTAX);
+ SyntaxError(source, "SET", _(CHAN_SET_SYNTAX));
}
};
@@ -60,7 +60,7 @@ class CommandCSSASetDescription : public CommandCSSetDescription
void OnSyntaxError(CommandSource &source, const Anope::string &)
{
// XXX
- SyntaxError(source, "SASET", LanguageString::CHAN_SASET_SYNTAX);
+ SyntaxError(source, "SASET", _(CHAN_SASET_SYNTAX));
}
};
diff --git a/modules/core/cs_set_founder.cpp b/modules/core/cs_set_founder.cpp
index a9ba31291..a50d9e558 100644
--- a/modules/core/cs_set_founder.cpp
+++ b/modules/core/cs_set_founder.cpp
@@ -30,7 +30,7 @@ class CommandCSSetFounder : public Command
if (this->permission.empty() && (ci->HasFlag(CI_SECUREFOUNDER) ? !IsFounder(u, ci) : !check_access(u, ci, CA_FOUNDER)))
{
- source.Reply(LanguageString::ACCESS_DENIED);
+ source.Reply(_(ACCESS_DENIED));
return MOD_CONT;
}
@@ -39,12 +39,12 @@ class CommandCSSetFounder : public Command
if (!na)
{
- source.Reply(LanguageString::NICK_X_NOT_REGISTERED, params[1].c_str());
+ source.Reply(_(NICK_X_NOT_REGISTERED), params[1].c_str());
return MOD_CONT;
}
else if (na->HasFlag(NS_FORBIDDEN))
{
- source.Reply(LanguageString::NICK_X_FORBIDDEN, na->nick.c_str());
+ source.Reply(_(NICK_X_FORBIDDEN), na->nick.c_str());
return MOD_CONT;
}
@@ -82,7 +82,7 @@ class CommandCSSetFounder : public Command
void OnSyntaxError(CommandSource &source, const Anope::string &)
{
// XXX
- SyntaxError(source, "SET", LanguageString::CHAN_SET_SYNTAX);
+ SyntaxError(source, "SET", _(CHAN_SET_SYNTAX));
}
};
@@ -96,7 +96,7 @@ class CommandCSSASetFounder : public CommandCSSetFounder
void OnSyntaxError(CommandSource &source, const Anope::string &)
{
// XXX
- SyntaxError(source, "SASET", LanguageString::CHAN_SASET_SYNTAX);
+ SyntaxError(source, "SASET", _(CHAN_SASET_SYNTAX));
}
};
diff --git a/modules/core/cs_set_securefounder.cpp b/modules/core/cs_set_securefounder.cpp
index c90d7d20c..67045baba 100644
--- a/modules/core/cs_set_securefounder.cpp
+++ b/modules/core/cs_set_securefounder.cpp
@@ -30,7 +30,7 @@ class CommandCSSetSecureFounder : public Command
if (this->permission.empty() && ci->HasFlag(CI_SECUREFOUNDER) ? !IsFounder(u, ci) : !check_access(u, ci, CA_FOUNDER))
{
- source.Reply(LanguageString::ACCESS_DENIED);
+ source.Reply(_(ACCESS_DENIED));
return MOD_CONT;
}
diff --git a/modules/core/cs_set_successor.cpp b/modules/core/cs_set_successor.cpp
index ad0b57fea..9cb572a96 100644
--- a/modules/core/cs_set_successor.cpp
+++ b/modules/core/cs_set_successor.cpp
@@ -30,7 +30,7 @@ class CommandCSSetSuccessor : public Command
if (this->permission.empty() && ci->HasFlag(CI_SECUREFOUNDER) ? !IsFounder(u, ci) : !check_access(u, ci, CA_FOUNDER))
{
- source.Reply(LanguageString::ACCESS_DENIED);
+ source.Reply(_(ACCESS_DENIED));
return MOD_CONT;
}
@@ -42,12 +42,12 @@ class CommandCSSetSuccessor : public Command
if (!na)
{
- source.Reply(LanguageString::NICK_X_NOT_REGISTERED, params[1].c_str());
+ source.Reply(_(NICK_X_NOT_REGISTERED), params[1].c_str());
return MOD_CONT;
}
if (na->HasFlag(NS_FORBIDDEN))
{
- source.Reply(LanguageString::NICK_X_FORBIDDEN, na->nick.c_str());
+ source.Reply(_(NICK_X_FORBIDDEN), na->nick.c_str());
return MOD_CONT;
}
if (na->nc == ci->founder)
@@ -89,7 +89,7 @@ class CommandCSSetSuccessor : public Command
void OnSyntaxError(CommandSource &source, const Anope::string &)
{
// XXX
- SyntaxError(source, "SET", LanguageString::CHAN_SET_SYNTAX);
+ SyntaxError(source, "SET", _(CHAN_SET_SYNTAX));
}
};
@@ -103,7 +103,7 @@ class CommandCSSASetSuccessor : public CommandCSSetSuccessor
void OnSyntaxError(CommandSource &source, const Anope::string &)
{
// XXX
- SyntaxError(source, "SASET", LanguageString::CHAN_SASET_SYNTAX);
+ SyntaxError(source, "SASET", _(CHAN_SASET_SYNTAX));
}
};
diff --git a/modules/core/cs_suspend.cpp b/modules/core/cs_suspend.cpp
index 82eac64a2..669354151 100644
--- a/modules/core/cs_suspend.cpp
+++ b/modules/core/cs_suspend.cpp
@@ -44,7 +44,7 @@ class CommandCSSuspend : public Command
}
if (readonly)
- source.Reply(LanguageString::READ_ONLY_MODE);
+ source.Reply(_(READ_ONLY_MODE));
ci->SetFlag(CI_SUSPENDED);
ci->forbidby = u->nick;
@@ -60,7 +60,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(), _("This channel has been suspended.")).c_str());
+ c->Kick(NULL, uc->user, "%s", !reason.empty() ? reason.c_str() : GetString(uc->user->Account(), "This channel has been suspended.").c_str());
}
}
@@ -105,7 +105,7 @@ class CommandCSUnSuspend : public Command
ChannelInfo *ci = source.ci;
if (readonly)
- source.Reply(LanguageString::READ_ONLY_MODE);
+ source.Reply(_(READ_ONLY_MODE));
/* Only UNSUSPEND already suspended channels */
if (!ci->HasFlag(CI_SUSPENDED))
diff --git a/modules/core/cs_topic.cpp b/modules/core/cs_topic.cpp
index a470713d4..bdd8a3205 100644
--- a/modules/core/cs_topic.cpp
+++ b/modules/core/cs_topic.cpp
@@ -30,9 +30,9 @@ class CommandCSTopic : public Command
Channel *c = ci->c;
if (!c)
- source.Reply(LanguageString::CHAN_X_NOT_IN_USE, ci->name.c_str());
+ source.Reply(_(CHAN_X_NOT_IN_USE), ci->name.c_str());
else if (!check_access(u, ci, CA_TOPIC) && !u->Account()->HasCommand("chanserv/topic"))
- source.Reply(LanguageString::ACCESS_DENIED);
+ source.Reply(_(ACCESS_DENIED));
else
{
bool has_topiclock = ci->HasFlag(CI_TOPICLOCK);
diff --git a/modules/core/cs_unban.cpp b/modules/core/cs_unban.cpp
index 32f88b8bd..a681d1100 100644
--- a/modules/core/cs_unban.cpp
+++ b/modules/core/cs_unban.cpp
@@ -29,13 +29,13 @@ class CommandCSUnban : public Command
if (!c)
{
- source.Reply(LanguageString::CHAN_X_NOT_IN_USE, ci->name.c_str());
+ source.Reply(_(CHAN_X_NOT_IN_USE), ci->name.c_str());
return MOD_CONT;
}
if (!check_access(u, ci, CA_UNBAN))
{
- source.Reply(LanguageString::ACCESS_DENIED);
+ source.Reply(_(ACCESS_DENIED));
return MOD_CONT;
}
@@ -45,7 +45,7 @@ class CommandCSUnban : public Command
if (!u2)
{
- source.Reply(LanguageString::NICK_X_NOT_IN_USE, params[1].c_str());
+ source.Reply(_(NICK_X_NOT_IN_USE), params[1].c_str());
return MOD_CONT;
}
diff --git a/modules/core/cs_xop.cpp b/modules/core/cs_xop.cpp
index 066e19471..a3e3937d1 100644
--- a/modules/core/cs_xop.cpp
+++ b/modules/core/cs_xop.cpp
@@ -133,7 +133,7 @@ class XOPBase : public Command
if ((level >= ulev || ulev < ACCESS_AOP) && !u->Account()->HasPriv("chanserv/access/modify"))
{
- source.Reply(LanguageString::ACCESS_DENIED);
+ source.Reply(_(ACCESS_DENIED));
return MOD_CONT;
}
@@ -142,7 +142,7 @@ class XOPBase : public Command
mask += "!*@*";
else if (na && na->HasFlag(NS_FORBIDDEN))
{
- source.Reply(LanguageString::NICK_X_FORBIDDEN, na->nick.c_str());
+ source.Reply(_(NICK_X_FORBIDDEN), na->nick.c_str());
return MOD_CONT;
}
@@ -154,7 +154,7 @@ class XOPBase : public Command
**/
if (access->level >= ulev && !u->Account()->HasPriv("chanserv/access/modify"))
{
- source.Reply(LanguageString::ACCESS_DENIED);
+ source.Reply(_(ACCESS_DENIED));
return MOD_CONT;
}
++change;
@@ -222,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(LanguageString::ACCESS_DENIED);
+ source.Reply(_(ACCESS_DENIED));
return MOD_CONT;
}
@@ -243,7 +243,7 @@ class XOPBase : public Command
else
{
if (access->nc != u->Account() && ulev <= access->level && !u->Account()->HasPriv("chanserv/access/modify"))
- source.Reply(LanguageString::ACCESS_DENIED);
+ source.Reply(_(ACCESS_DENIED));
else
{
bool override = ulev <= access->level;
@@ -272,7 +272,7 @@ class XOPBase : public Command
if (!ulev && !u->Account()->HasCommand("chanserv/access/list"))
{
- source.Reply(LanguageString::ACCESS_DENIED);
+ source.Reply(_(ACCESS_DENIED));
return MOD_CONT;
}
@@ -338,7 +338,7 @@ class XOPBase : public Command
if (!check_access(u, ci, CA_FOUNDER) && !u->Account()->HasPriv("chanserv/access/modify"))
{
- source.Reply(LanguageString::ACCESS_DENIED);
+ source.Reply(_(ACCESS_DENIED));
return MOD_CONT;
}
diff --git a/modules/core/hs_del.cpp b/modules/core/hs_del.cpp
index 1503ca014..351909ec5 100644
--- a/modules/core/hs_del.cpp
+++ b/modules/core/hs_del.cpp
@@ -30,7 +30,7 @@ class CommandHSDel : public Command
{
if (na->HasFlag(NS_FORBIDDEN))
{
- source.Reply(LanguageString::NICK_X_FORBIDDEN, nick.c_str());
+ source.Reply(_(NICK_X_FORBIDDEN), nick.c_str());
return MOD_CONT;
}
Log(LOG_ADMIN, u, this) << "for user " << na->nick;
@@ -39,7 +39,7 @@ class CommandHSDel : public Command
source.Reply(_("vhost for \002%s\002 removed."), nick.c_str());
}
else
- source.Reply(LanguageString::NICK_X_NOT_REGISTERED, nick.c_str());
+ source.Reply(_(NICK_X_NOT_REGISTERED), nick.c_str());
return MOD_CONT;
}
diff --git a/modules/core/hs_delall.cpp b/modules/core/hs_delall.cpp
index c641f05b2..248d650ae 100644
--- a/modules/core/hs_delall.cpp
+++ b/modules/core/hs_delall.cpp
@@ -30,7 +30,7 @@ class CommandHSDelAll : public Command
{
if (na->HasFlag(NS_FORBIDDEN))
{
- source.Reply(LanguageString::NICK_X_FORBIDDEN, nick.c_str());
+ source.Reply(_(NICK_X_FORBIDDEN), nick.c_str());
return MOD_CONT;
}
FOREACH_MOD(I_OnDeleteVhost, OnDeleteVhost(na));
@@ -44,7 +44,7 @@ class CommandHSDelAll : public Command
source.Reply(_("vhosts for group \002%s\002 have been removed."), nc->display.c_str());
}
else
- source.Reply(LanguageString::NICK_X_NOT_REGISTERED, nick.c_str());
+ source.Reply(_(NICK_X_NOT_REGISTERED), nick.c_str());
return MOD_CONT;
}
diff --git a/modules/core/hs_group.cpp b/modules/core/hs_group.cpp
index 270ea8bfe..afbc0ca17 100644
--- a/modules/core/hs_group.cpp
+++ b/modules/core/hs_group.cpp
@@ -34,7 +34,7 @@ class CommandHSGroup : public Command
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(LanguageString::HOST_NOT_ASSIGNED);
+ source.Reply(_(HOST_NOT_ASSIGNED));
return MOD_CONT;
}
diff --git a/modules/core/hs_list.cpp b/modules/core/hs_list.cpp
index 4bc9bbd91..1906d6192 100644
--- a/modules/core/hs_list.cpp
+++ b/modules/core/hs_list.cpp
@@ -36,14 +36,14 @@ class CommandHSList : public Command
size_t tmp = key.find('-');
if (tmp == Anope::string::npos || tmp == key.length() || tmp == 1)
{
- source.Reply(LanguageString::LIST_INCORRECT_RANGE);
+ source.Reply(_(LIST_INCORRECT_RANGE));
return MOD_CONT;
}
for (unsigned i = 1, end = key.length(); i < end; ++i)
{
if (!isdigit(key[i]) && i != tmp)
{
- source.Reply(LanguageString::LIST_INCORRECT_RANGE);
+ source.Reply(_(LIST_INCORRECT_RANGE));
return MOD_CONT;
}
try
diff --git a/modules/core/hs_off.cpp b/modules/core/hs_off.cpp
index 6459c81ee..3768b5c7c 100644
--- a/modules/core/hs_off.cpp
+++ b/modules/core/hs_off.cpp
@@ -27,7 +27,7 @@ class CommandHSOff : public Command
NickAlias *na = findnick(u->nick);
if (!na || !na->hostinfo.HasVhost())
- source.Reply(LanguageString::HOST_NOT_ASSIGNED);
+ source.Reply(_(HOST_NOT_ASSIGNED));
else
{
ircdproto->SendVhostDel(u);
diff --git a/modules/core/hs_on.cpp b/modules/core/hs_on.cpp
index f8a227590..c969b7a9b 100644
--- a/modules/core/hs_on.cpp
+++ b/modules/core/hs_on.cpp
@@ -43,7 +43,7 @@ class CommandHSOn : public Command
u->UpdateHost();
}
else
- source.Reply(LanguageString::HOST_NOT_ASSIGNED);
+ source.Reply(_(HOST_NOT_ASSIGNED));
return MOD_CONT;
}
diff --git a/modules/core/hs_set.cpp b/modules/core/hs_set.cpp
index 6dfbfbab4..10976aa7a 100644
--- a/modules/core/hs_set.cpp
+++ b/modules/core/hs_set.cpp
@@ -40,7 +40,7 @@ class CommandHSSet : public Command
}
if (vIdent.length() > Config->UserLen)
{
- source.Reply(LanguageString::HOST_SET_IDENTTOOLONG, Config->UserLen);
+ source.Reply(_(HOST_SET_IDENTTOOLONG), Config->UserLen);
return MOD_CONT;
}
else
@@ -48,13 +48,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(LanguageString::HOST_SET_IDENT_ERROR);
+ source.Reply(_(HOST_SET_IDENT_ERROR));
return MOD_CONT;
}
}
if (!ircd->vident)
{
- source.Reply(LanguageString::HOST_NO_VIDENT);
+ source.Reply(_(HOST_NO_VIDENT));
return MOD_CONT;
}
}
@@ -62,13 +62,13 @@ class CommandHSSet : public Command
hostmask = rawhostmask;
else
{
- source.Reply(LanguageString::HOST_SET_TOOLONG, Config->HostLen);
+ source.Reply(_(HOST_SET_TOOLONG), Config->HostLen);
return MOD_CONT;
}
if (!isValidHost(hostmask, 3))
{
- source.Reply(LanguageString::HOST_SET_ERROR);
+ source.Reply(_(HOST_SET_ERROR));
return MOD_CONT;
}
@@ -77,7 +77,7 @@ class CommandHSSet : public Command
{
if (na->HasFlag(NS_FORBIDDEN))
{
- source.Reply(LanguageString::NICK_X_FORBIDDEN, nick.c_str());
+ source.Reply(_(NICK_X_FORBIDDEN), nick.c_str());
return MOD_CONT;
}
@@ -91,7 +91,7 @@ class CommandHSSet : public Command
source.Reply(_("vhost for \002%s\002 set to \002%s\002."), nick.c_str(), hostmask.c_str());
}
else
- source.Reply(LanguageString::NICK_X_NOT_REGISTERED, nick.c_str());
+ source.Reply(_(NICK_X_NOT_REGISTERED), nick.c_str());
return MOD_CONT;
}
diff --git a/modules/core/hs_setall.cpp b/modules/core/hs_setall.cpp
index 20d160b9d..b7baf867d 100644
--- a/modules/core/hs_setall.cpp
+++ b/modules/core/hs_setall.cpp
@@ -33,12 +33,12 @@ class CommandHSSetAll : public Command
NickAlias *na = findnick(nick);
if (!na)
{
- source.Reply(LanguageString::NICK_X_NOT_REGISTERED, nick.c_str());
+ source.Reply(_(NICK_X_NOT_REGISTERED), nick.c_str());
return MOD_CONT;
}
else if (na->HasFlag(NS_FORBIDDEN))
{
- source.Reply(LanguageString::NICK_X_FORBIDDEN, nick.c_str());
+ source.Reply(_(NICK_X_FORBIDDEN), nick.c_str());
return MOD_CONT;
}
@@ -53,7 +53,7 @@ class CommandHSSetAll : public Command
}
if (vIdent.length() > Config->UserLen)
{
- source.Reply(LanguageString::HOST_SET_IDENTTOOLONG, Config->UserLen);
+ source.Reply(_(HOST_SET_IDENTTOOLONG), Config->UserLen);
return MOD_CONT;
}
else
@@ -61,13 +61,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(LanguageString::HOST_SET_IDENT_ERROR);
+ source.Reply(_(HOST_SET_IDENT_ERROR));
return MOD_CONT;
}
}
if (!ircd->vident)
{
- source.Reply(LanguageString::HOST_NO_VIDENT);
+ source.Reply(_(HOST_NO_VIDENT));
return MOD_CONT;
}
}
@@ -77,13 +77,13 @@ class CommandHSSetAll : public Command
hostmask = rawhostmask;
else
{
- source.Reply(LanguageString::HOST_SET_TOOLONG, Config->HostLen);
+ source.Reply(_(HOST_SET_TOOLONG), Config->HostLen);
return MOD_CONT;
}
if (!isValidHost(hostmask, 3))
{
- source.Reply(LanguageString::HOST_SET_ERROR);
+ source.Reply(_(HOST_SET_ERROR));
return MOD_CONT;
}
diff --git a/modules/core/ms_cancel.cpp b/modules/core/ms_cancel.cpp
index b143943de..7fad59290 100644
--- a/modules/core/ms_cancel.cpp
+++ b/modules/core/ms_cancel.cpp
@@ -35,9 +35,9 @@ class CommandMSCancel : public Command
if (!(mi = getmemoinfo(nname, ischan, isforbid)))
{
if (isforbid)
- source.Reply(ischan ? LanguageString::CHAN_X_FORBIDDEN : LanguageString::NICK_X_FORBIDDEN, nname.c_str());
+ source.Reply(ischan ? _(CHAN_X_FORBIDDEN) : _(NICK_X_FORBIDDEN), nname.c_str());
else
- source.Reply(ischan ? LanguageString::CHAN_X_NOT_REGISTERED : LanguageString::NICK_X_NOT_REGISTERED, nname.c_str());
+ source.Reply(ischan ? _(CHAN_X_NOT_REGISTERED) : _(NICK_X_NOT_REGISTERED), nname.c_str());
}
else
{
diff --git a/modules/core/ms_check.cpp b/modules/core/ms_check.cpp
index f06055a75..6a28971fd 100644
--- a/modules/core/ms_check.cpp
+++ b/modules/core/ms_check.cpp
@@ -32,13 +32,13 @@ class CommandMSCheck : public Command
NickAlias *na = findnick(recipient);
if (!na)
{
- source.Reply(LanguageString::NICK_X_NOT_REGISTERED, recipient.c_str());
+ source.Reply(_(NICK_X_NOT_REGISTERED), recipient.c_str());
return MOD_CONT;
}
if (na->HasFlag(NS_FORBIDDEN))
{
- source.Reply(LanguageString::NICK_X_FORBIDDEN, recipient.c_str());
+ source.Reply(_(NICK_X_FORBIDDEN), recipient.c_str());
return MOD_CONT;
}
diff --git a/modules/core/ms_del.cpp b/modules/core/ms_del.cpp
index 3a06eba7f..cca2d36bd 100644
--- a/modules/core/ms_del.cpp
+++ b/modules/core/ms_del.cpp
@@ -61,17 +61,17 @@ class CommandMSDel : public Command
if (!(ci = cs_findchan(chan)))
{
- source.Reply(LanguageString::CHAN_X_NOT_REGISTERED, chan.c_str());
+ source.Reply(_(CHAN_X_NOT_REGISTERED), chan.c_str());
return MOD_CONT;
}
else if (readonly)
{
- source.Reply(LanguageString::READ_ONLY_MODE);
+ source.Reply(_(READ_ONLY_MODE));
return MOD_CONT;
}
else if (!check_access(u, ci, CA_MEMO))
{
- source.Reply(LanguageString::ACCESS_DENIED);
+ source.Reply(_(ACCESS_DENIED));
return MOD_CONT;
}
mi = &ci->memos;
@@ -83,9 +83,9 @@ class CommandMSDel : public Command
else if (mi->memos.empty())
{
if (!chan.empty())
- source.Reply(LanguageString::MEMO_X_HAS_NO_MEMOS, chan.c_str());
+ source.Reply(_(MEMO_X_HAS_NO_MEMOS), chan.c_str());
else
- source.Reply(LanguageString::MEMO_HAVE_NO_MEMOS);
+ source.Reply(_(MEMO_HAVE_NO_MEMOS));
}
else
{
diff --git a/modules/core/ms_ignore.cpp b/modules/core/ms_ignore.cpp
index c7f083457..5b7746714 100644
--- a/modules/core/ms_ignore.cpp
+++ b/modules/core/ms_ignore.cpp
@@ -41,12 +41,12 @@ class CommandMSIgnore : public Command
if (!mi)
{
if (isforbid)
- source.Reply(ischan ? LanguageString::CHAN_X_FORBIDDEN : LanguageString::NICK_X_FORBIDDEN, channel.c_str());
+ source.Reply(ischan ? _(CHAN_X_FORBIDDEN) : _(NICK_X_FORBIDDEN), channel.c_str());
else
- source.Reply(ischan ? LanguageString::CHAN_X_NOT_REGISTERED : LanguageString::NICK_X_NOT_REGISTERED, channel.c_str());
+ source.Reply(ischan ? _(CHAN_X_NOT_REGISTERED) : _(NICK_X_NOT_REGISTERED), channel.c_str());
}
else if (ischan && !check_access(u, cs_findchan(channel), CA_MEMO))
- source.Reply(LanguageString::ACCESS_DENIED);
+ source.Reply(_(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())
diff --git a/modules/core/ms_info.cpp b/modules/core/ms_info.cpp
index 922caeb7a..baf73b608 100644
--- a/modules/core/ms_info.cpp
+++ b/modules/core/ms_info.cpp
@@ -36,12 +36,12 @@ class CommandMSInfo : public Command
na = findnick(nname);
if (!na)
{
- source.Reply(LanguageString::NICK_X_NOT_REGISTERED, nname.c_str());
+ source.Reply(_(NICK_X_NOT_REGISTERED), nname.c_str());
return MOD_CONT;
}
else if (na->HasFlag(NS_FORBIDDEN))
{
- source.Reply(LanguageString::NICK_X_FORBIDDEN, nname.c_str());
+ source.Reply(_(NICK_X_FORBIDDEN), nname.c_str());
return MOD_CONT;
}
mi = &na->nc->memos;
@@ -51,12 +51,12 @@ class CommandMSInfo : public Command
{
if (!(ci = cs_findchan(nname)))
{
- source.Reply(LanguageString::CHAN_X_NOT_REGISTERED, nname.c_str());
+ source.Reply(_(CHAN_X_NOT_REGISTERED), nname.c_str());
return MOD_CONT;
}
else if (!check_access(u, ci, CA_MEMO))
{
- source.Reply(LanguageString::ACCESS_DENIED);
+ source.Reply(_(ACCESS_DENIED));
return MOD_CONT;
}
mi = &ci->memos;
@@ -64,7 +64,7 @@ class CommandMSInfo : public Command
}
else if (!nname.empty()) /* It's not a chan and we aren't services admin */
{
- source.Reply(LanguageString::ACCESS_DENIED);
+ source.Reply(_(ACCESS_DENIED));
return MOD_CONT;
}
else
diff --git a/modules/core/ms_list.cpp b/modules/core/ms_list.cpp
index fa1264a83..e2699a4a8 100644
--- a/modules/core/ms_list.cpp
+++ b/modules/core/ms_list.cpp
@@ -74,12 +74,12 @@ class CommandMSList : public Command
if (!(ci = cs_findchan(chan)))
{
- source.Reply(LanguageString::CHAN_X_NOT_REGISTERED, chan.c_str());
+ source.Reply(_(CHAN_X_NOT_REGISTERED), chan.c_str());
return MOD_CONT;
}
else if (!check_access(u, ci, CA_MEMO))
{
- source.Reply(LanguageString::ACCESS_DENIED);
+ source.Reply(_(ACCESS_DENIED));
return MOD_CONT;
}
mi = &ci->memos;
@@ -91,9 +91,9 @@ class CommandMSList : public Command
else if (!mi->memos.size())
{
if (!chan.empty())
- source.Reply(LanguageString::MEMO_X_HAS_NO_MEMOS, chan.c_str());
+ source.Reply(_(MEMO_X_HAS_NO_MEMOS), chan.c_str());
else
- source.Reply(LanguageString::MEMO_HAVE_NO_MEMOS);
+ source.Reply(_(MEMO_HAVE_NO_MEMOS));
}
else
{
@@ -112,9 +112,9 @@ class CommandMSList : public Command
if (i == end)
{
if (!chan.empty())
- source.Reply(LanguageString::MEMO_X_HAS_NO_NEW_MEMOS, chan.c_str());
+ source.Reply(_(MEMO_X_HAS_NO_NEW_MEMOS), chan.c_str());
else
- source.Reply(LanguageString::MEMO_HAVE_NO_NEW_MEMOS);
+ source.Reply(_(MEMO_HAVE_NO_NEW_MEMOS));
return MOD_CONT;
}
}
diff --git a/modules/core/ms_read.cpp b/modules/core/ms_read.cpp
index 0c9be0a61..6e1c302cb 100644
--- a/modules/core/ms_read.cpp
+++ b/modules/core/ms_read.cpp
@@ -69,12 +69,12 @@ class CommandMSRead : public Command
if (!(ci = cs_findchan(chan)))
{
- source.Reply(LanguageString::CHAN_X_NOT_REGISTERED, chan.c_str());
+ source.Reply(_(CHAN_X_NOT_REGISTERED), chan.c_str());
return MOD_CONT;
}
else if (!check_access(u, ci, CA_MEMO))
{
- source.Reply(LanguageString::ACCESS_DENIED);
+ source.Reply(_(ACCESS_DENIED));
return MOD_CONT;
}
mi = &ci->memos;
@@ -87,9 +87,9 @@ class CommandMSRead : public Command
else if (mi->memos.empty())
{
if (!chan.empty())
- source.Reply(LanguageString::MEMO_X_HAS_NO_MEMOS, chan.c_str());
+ source.Reply(_(MEMO_X_HAS_NO_MEMOS), chan.c_str());
else
- source.Reply(LanguageString::MEMO_HAVE_NO_MEMOS);
+ source.Reply(_(MEMO_HAVE_NO_MEMOS));
}
else
{
@@ -107,9 +107,9 @@ class CommandMSRead : public Command
if (!readcount)
{
if (!chan.empty())
- source.Reply(LanguageString::MEMO_X_HAS_NO_NEW_MEMOS, chan.c_str());
+ source.Reply(_(MEMO_X_HAS_NO_NEW_MEMOS), chan.c_str());
else
- source.Reply(LanguageString::MEMO_HAVE_NO_NEW_MEMOS);
+ source.Reply(_(MEMO_HAVE_NO_NEW_MEMOS));
}
}
else if (numstr.equals_ci("LAST"))
diff --git a/modules/core/ms_rsend.cpp b/modules/core/ms_rsend.cpp
index 48b908022..830caac51 100644
--- a/modules/core/ms_rsend.cpp
+++ b/modules/core/ms_rsend.cpp
@@ -42,7 +42,7 @@ class CommandMSRSend : public Command
if (u->Account()->IsServicesOper())
memo_send(source, nick, text, 3);
else
- source.Reply(LanguageString::ACCESS_DENIED);
+ source.Reply(_(ACCESS_DENIED));
}
else if (Config->MSMemoReceipt == 2)
/* Everybody can use rsend */
diff --git a/modules/core/ms_send.cpp b/modules/core/ms_send.cpp
index 03022a210..bd45e9159 100644
--- a/modules/core/ms_send.cpp
+++ b/modules/core/ms_send.cpp
@@ -42,7 +42,7 @@ class CommandMSSend : public Command
void OnSyntaxError(CommandSource &source, const Anope::string &subcommand)
{
- SyntaxError(source, "SEND", LanguageString::MEMO_SEND_SYNTAX);
+ SyntaxError(source, "SEND", _(MEMO_SEND_SYNTAX));
}
};
diff --git a/modules/core/ms_sendall.cpp b/modules/core/ms_sendall.cpp
index b6517b31d..1d826af0f 100644
--- a/modules/core/ms_sendall.cpp
+++ b/modules/core/ms_sendall.cpp
@@ -28,7 +28,7 @@ class CommandMSSendAll : public Command
if (readonly)
{
- source.Reply(LanguageString::MEMO_SEND_DISABLED);
+ source.Reply(_(MEMO_SEND_DISABLED));
return MOD_CONT;
}
diff --git a/modules/core/ms_set.cpp b/modules/core/ms_set.cpp
index 9899ee362..7fc2fc953 100644
--- a/modules/core/ms_set.cpp
+++ b/modules/core/ms_set.cpp
@@ -88,12 +88,12 @@ class CommandMSSet : public Command
p3 = params.size() > 4 ? params[4] : "";
if (!(ci = cs_findchan(chan)))
{
- source.Reply(LanguageString::CHAN_X_NOT_REGISTERED, chan.c_str());
+ source.Reply(_(CHAN_X_NOT_REGISTERED), chan.c_str());
return MOD_CONT;
}
else if (!is_servadmin && !check_access(u, ci, CA_MEMO))
{
- source.Reply(LanguageString::ACCESS_DENIED);
+ source.Reply(_(ACCESS_DENIED));
return MOD_CONT;
}
mi = &ci->memos;
@@ -105,7 +105,7 @@ class CommandMSSet : public Command
NickAlias *na;
if (!(na = findnick(p1)))
{
- source.Reply(LanguageString::NICK_X_NOT_REGISTERED, p1.c_str());
+ source.Reply(_(NICK_X_NOT_REGISTERED), p1.c_str());
return MOD_CONT;
}
user = p1;
@@ -218,8 +218,8 @@ class CommandMSSet : public Command
return this->DoLimit(source, params, mi);
else
{
- source.Reply(LanguageString::NICK_SET_UNKNOWN_OPTION, cmd.c_str());
- source.Reply(LanguageString::MORE_INFO, Config->s_MemoServ.c_str(), "SET");
+ source.Reply(_(NICK_SET_UNKNOWN_OPTION), cmd.c_str());
+ source.Reply(_(MORE_INFO), Config->s_MemoServ.c_str(), "SET");
}
return MOD_CONT;
@@ -293,7 +293,7 @@ class CommandMSSet : public Command
void OnSyntaxError(CommandSource &source, const Anope::string &subcommand)
{
- SyntaxError(source, "SET", LanguageString::NICK_SET_SYNTAX);
+ SyntaxError(source, "SET", _(NICK_SET_SYNTAX));
}
};
diff --git a/modules/core/ms_staff.cpp b/modules/core/ms_staff.cpp
index 22c379151..34afa2f68 100644
--- a/modules/core/ms_staff.cpp
+++ b/modules/core/ms_staff.cpp
@@ -27,7 +27,7 @@ class CommandMSStaff : public Command
if (readonly)
{
- source.Reply(LanguageString::MEMO_SEND_DISABLED);
+ source.Reply(_(MEMO_SEND_DISABLED));
return MOD_CONT;
}
diff --git a/modules/core/ns_access.cpp b/modules/core/ns_access.cpp
index d79f189ca..bd637cbaa 100644
--- a/modules/core/ns_access.cpp
+++ b/modules/core/ns_access.cpp
@@ -29,7 +29,7 @@ class CommandNSAccess : public Command
if (nc->HasFlag(NI_SUSPENDED))
{
- source.Reply(LanguageString::NICK_X_SUSPENDED, nc->display.c_str());
+ source.Reply(_(NICK_X_SUSPENDED), nc->display.c_str());
return MOD_CONT;
}
@@ -132,11 +132,11 @@ class CommandNSAccess : public Command
if (!mask.empty() && mask.find('@') == Anope::string::npos)
{
- source.Reply(LanguageString::BAD_USERHOST_MASK);
- source.Reply(LanguageString::MORE_INFO, Config->s_NickServ.c_str(), "ACCESS");
+ source.Reply(_(BAD_USERHOST_MASK));
+ source.Reply(_(MORE_INFO), Config->s_NickServ.c_str(), "ACCESS");
}
else if (u->Account()->HasFlag(NI_SUSPENDED))
- source.Reply(LanguageString::NICK_X_SUSPENDED, u->Account()->display.c_str());
+ source.Reply(_(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"))
diff --git a/modules/core/ns_ajoin.cpp b/modules/core/ns_ajoin.cpp
index 0b1a78fb8..fef23c889 100644
--- a/modules/core/ns_ajoin.cpp
+++ b/modules/core/ns_ajoin.cpp
@@ -39,7 +39,7 @@ class CommandNSAJoin : public Command
if (channels.size() >= Config->AJoinMax)
source.Reply(_("Your auto join list is full."));
else if (ircdproto->IsChannelValid(params[1]) == false)
- source.Reply(LanguageString::CHAN_X_INVALID, params[1].c_str());
+ source.Reply(_(CHAN_X_INVALID), params[1].c_str());
else
{
channels.push_back(std::make_pair(params[1], params.size() > 2 ? params[2] : ""));
diff --git a/modules/core/ns_alist.cpp b/modules/core/ns_alist.cpp
index c77d277f4..8b3128861 100644
--- a/modules/core/ns_alist.cpp
+++ b/modules/core/ns_alist.cpp
@@ -84,11 +84,11 @@ class CommandNSAList : public Command
}
if (!na)
- source.Reply(LanguageString::NICK_X_NOT_REGISTERED, nick.c_str());
+ source.Reply(_(NICK_X_NOT_REGISTERED), nick.c_str());
else if (na->HasFlag(NS_FORBIDDEN))
- source.Reply(LanguageString::NICK_X_FORBIDDEN, na->nick.c_str());
+ source.Reply(_(NICK_X_FORBIDDEN), na->nick.c_str());
else if (min_level <= ACCESS_INVALID || min_level > ACCESS_FOUNDER)
- source.Reply(LanguageString::CHAN_ACCESS_LEVEL_RANGE, ACCESS_INVALID + 1, ACCESS_FOUNDER - 1);
+ source.Reply(_(CHAN_ACCESS_LEVEL_RANGE), ACCESS_INVALID + 1, ACCESS_FOUNDER - 1);
else
{
int chan_count = 0;
diff --git a/modules/core/ns_drop.cpp b/modules/core/ns_drop.cpp
index ae731e255..e7edcd79a 100644
--- a/modules/core/ns_drop.cpp
+++ b/modules/core/ns_drop.cpp
@@ -55,17 +55,17 @@ class CommandNSDrop : public Command
else if (bad_password(u))
return MOD_STOP;
else
- source.Reply(LanguageString::PASSWORD_INCORRECT);
+ source.Reply(_(PASSWORD_INCORRECT));
}
else
- source.Reply(LanguageString::NICK_NOT_REGISTERED);
+ source.Reply(_(NICK_NOT_REGISTERED));
return MOD_CONT;
}
if (!u->Account())
{
- source.Reply(LanguageString::NICK_IDENTIFY_REQUIRED, Config->s_NickServ.c_str());
+ source.Reply(_(NICK_IDENTIFY_REQUIRED), Config->s_NickServ.c_str());
return MOD_CONT;
}
@@ -75,13 +75,13 @@ class CommandNSDrop : public Command
my_nick = na->nick;
if (!is_mine && !u->Account()->HasPriv("nickserv/drop"))
- source.Reply(LanguageString::ACCESS_DENIED);
+ source.Reply(_(ACCESS_DENIED));
else if (Config->NSSecureAdmins && !is_mine && na->nc->IsServicesOper())
- source.Reply(LanguageString::ACCESS_DENIED);
+ source.Reply(_(ACCESS_DENIED));
else
{
if (readonly)
- source.Reply(LanguageString::READ_ONLY_MODE);
+ source.Reply(_(READ_ONLY_MODE));
if (ircd->sqline && na->HasFlag(NS_FORBIDDEN))
{
diff --git a/modules/core/ns_forbid.cpp b/modules/core/ns_forbid.cpp
index e6fbc89d3..a9d3bd09b 100644
--- a/modules/core/ns_forbid.cpp
+++ b/modules/core/ns_forbid.cpp
@@ -35,10 +35,10 @@ class CommandNSForbid : public Command
}
if (readonly)
- source.Reply(LanguageString::READ_ONLY_MODE);
+ source.Reply(_(READ_ONLY_MODE));
if (!ircdproto->IsNickValid(nick))
{
- source.Reply(LanguageString::NICK_X_FORBIDDEN, nick.c_str());
+ source.Reply(_(NICK_X_FORBIDDEN), nick.c_str());
return MOD_CONT;
}
@@ -47,7 +47,7 @@ class CommandNSForbid : public Command
{
if (Config->NSSecureAdmins && na->nc->IsServicesOper())
{
- source.Reply(LanguageString::ACCESS_DENIED);
+ source.Reply(_(ACCESS_DENIED));
return MOD_CONT;
}
delete na;
@@ -64,7 +64,7 @@ class CommandNSForbid : public Command
if (curr)
{
- curr->SendMessage(NickServ, LanguageString::FORCENICKCHANGE_NOW);
+ curr->SendMessage(NickServ, _(FORCENICKCHANGE_NOW));
curr->Collide(na);
}
diff --git a/modules/core/ns_getpass.cpp b/modules/core/ns_getpass.cpp
index a78e2eb95..fdd5f2cd0 100644
--- a/modules/core/ns_getpass.cpp
+++ b/modules/core/ns_getpass.cpp
@@ -37,12 +37,12 @@ class CommandNSGetPass : public Command
source.Reply(_("Passcode for %s is \002%s\002."), nick.c_str(), nr->passcode.c_str());
}
else
- source.Reply(LanguageString::NICK_X_NOT_REGISTERED, nick.c_str());
+ source.Reply(_(NICK_X_NOT_REGISTERED), nick.c_str());
}
else if (na->HasFlag(NS_FORBIDDEN))
- source.Reply(LanguageString::NICK_X_FORBIDDEN, na->nick.c_str());
+ source.Reply(_(NICK_X_FORBIDDEN), na->nick.c_str());
else if (Config->NSSecureAdmins && na->nc->IsServicesOper())
- source.Reply(LanguageString::ACCESS_DENIED);
+ source.Reply(_(ACCESS_DENIED));
else
{
if (enc_decrypt(na->nc->pass, tmp_pass) == 1)
diff --git a/modules/core/ns_ghost.cpp b/modules/core/ns_ghost.cpp
index f25785b76..56be92919 100644
--- a/modules/core/ns_ghost.cpp
+++ b/modules/core/ns_ghost.cpp
@@ -32,13 +32,13 @@ class CommandNSGhost : public Command
NickAlias *na = findnick(nick);
if (!user)
- source.Reply(LanguageString::NICK_X_NOT_IN_USE, nick.c_str());
+ source.Reply(_(NICK_X_NOT_IN_USE), nick.c_str());
else if (!na)
- source.Reply(LanguageString::NICK_X_NOT_REGISTERED, nick.c_str());
+ source.Reply(_(NICK_X_NOT_REGISTERED), nick.c_str());
else if (na->HasFlag(NS_FORBIDDEN))
- source.Reply(LanguageString::NICK_X_FORBIDDEN, na->nick.c_str());
+ source.Reply(_(NICK_X_FORBIDDEN), na->nick.c_str());
else if (na->nc->HasFlag(NI_SUSPENDED))
- source.Reply(LanguageString::NICK_X_SUSPENDED, na->nick.c_str());
+ source.Reply(_(NICK_X_SUSPENDED), na->nick.c_str());
else if (nick.equals_ci(u->nick))
source.Reply(_("You can't ghost yourself!"));
else if ((u->Account() == na->nc || (!na->nc->HasFlag(NI_SECURE) && is_on_access(u, na->nc))) ||
@@ -56,7 +56,7 @@ class CommandNSGhost : public Command
}
else
{
- source.Reply(LanguageString::ACCESS_DENIED);
+ source.Reply(_(ACCESS_DENIED));
if (!pass.empty())
{
Log(LOG_COMMAND, u, this) << "with an invalid password for " << nick;
diff --git a/modules/core/ns_group.cpp b/modules/core/ns_group.cpp
index 8509c88f5..4ab1d112c 100644
--- a/modules/core/ns_group.cpp
+++ b/modules/core/ns_group.cpp
@@ -31,7 +31,7 @@ class CommandNSGroup : public Command
if (Config->NSEmailReg && findrequestnick(u->nick))
{
- source.Reply(LanguageString::NICK_REQUESTED);
+ source.Reply(_(NICK_REQUESTED));
return MOD_CONT;
}
@@ -43,7 +43,7 @@ class CommandNSGroup : public Command
if (!ircdproto->IsNickValid(u->nick))
{
- source.Reply(LanguageString::NICK_X_FORBIDDEN, u->nick.c_str());
+ source.Reply(_(NICK_X_FORBIDDEN), u->nick.c_str());
return MOD_CONT;
}
@@ -51,31 +51,31 @@ 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(LanguageString::NICK_CANNOT_BE_REGISTERED, u->nick.c_str());
+ source.Reply(_(NICK_CANNOT_BE_REGISTERED), u->nick.c_str());
return MOD_CONT;
}
NickAlias *target, *na = findnick(u->nick);
if (!(target = findnick(nick)))
- source.Reply(LanguageString::NICK_X_NOT_REGISTERED, nick.c_str());
+ source.Reply(_(NICK_X_NOT_REGISTERED), nick.c_str());
else if (Anope::CurTime < u->lastnickreg + Config->NSRegDelay)
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(LanguageString::NICK_X_SUSPENDED, u->nick.c_str());
+ source.Reply(_(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(LanguageString::NICK_X_SUSPENDED, target->nick.c_str());
+ source.Reply(_(NICK_X_SUSPENDED), target->nick.c_str());
}
else if (target->HasFlag(NS_FORBIDDEN))
- source.Reply(LanguageString::NICK_X_FORBIDDEN, nick.c_str());
+ source.Reply(_(NICK_X_FORBIDDEN), nick.c_str());
else if (na && target->nc == na->nc)
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(LanguageString::NICK_IDENTIFY_REQUIRED, Config->s_NickServ.c_str());
+ source.Reply(_(NICK_IDENTIFY_REQUIRED), Config->s_NickServ.c_str());
else if (na && Config->NSNoGroupChange)
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())
@@ -88,7 +88,7 @@ class CommandNSGroup : public Command
if (res == -1)
{
Log(LOG_COMMAND, u, this) << "failed group for " << na->nick << " (invalid password)";
- source.Reply(LanguageString::PASSWORD_INCORRECT);
+ source.Reply(_(PASSWORD_INCORRECT));
if (bad_password(u))
return MOD_STOP;
}
@@ -106,7 +106,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(LanguageString::NICK_CANNOT_BE_REGISTERED, u->nick.c_str());
+ source.Reply(_(NICK_CANNOT_BE_REGISTERED), u->nick.c_str());
return MOD_CONT;
}
}
@@ -193,7 +193,7 @@ class CommandNSUngroup : public Command
if (u->Account()->aliases.size() == 1)
source.Reply(_("Your nick is not grouped to anything, you can't ungroup it."));
else if (!na)
- source.Reply(LanguageString::NICK_X_NOT_REGISTERED, !nick.empty() ? nick.c_str() : u->nick.c_str());
+ source.Reply(_(NICK_X_NOT_REGISTERED), !nick.empty() ? nick.c_str() : u->nick.c_str());
else if (na->nc != u->Account())
source.Reply(_("The nick %s is not in your group."), na->nick.c_str());
else
@@ -257,9 +257,9 @@ class CommandNSGList : public Command
const NickCore *nc = u->Account();
if (!nick.empty() && (!nick.equals_ci(u->nick) && !u->Account()->IsServicesOper()))
- source.Reply(LanguageString::ACCESS_DENIED, Config->s_NickServ.c_str());
+ source.Reply(_(ACCESS_DENIED), Config->s_NickServ.c_str());
else if (!nick.empty() && (!findnick(nick) || !(nc = findnick(nick)->nc)))
- source.Reply(nick.empty() ? LanguageString::NICK_NOT_REGISTERED : LanguageString::NICK_X_NOT_REGISTERED, nick.c_str());
+ source.Reply(nick.empty() ? _(NICK_NOT_REGISTERED) : _(NICK_X_NOT_REGISTERED), nick.c_str());
else
{
source.Reply(!nick.empty() ? _("List of nicknames in the group of \002%s\002:") : _("List of nicknames in your group:"), nc->display.c_str());
diff --git a/modules/core/ns_identify.cpp b/modules/core/ns_identify.cpp
index f2960c0ff..f48f5e388 100644
--- a/modules/core/ns_identify.cpp
+++ b/modules/core/ns_identify.cpp
@@ -34,14 +34,14 @@ class CommandNSIdentify : public Command
{
NickRequest *nr = findrequestnick(nick);
if (nr)
- source.Reply(LanguageString::NICK_IS_PREREG);
+ source.Reply(_(NICK_IS_PREREG));
else
- source.Reply(LanguageString::NICK_NOT_REGISTERED);
+ source.Reply(_(NICK_NOT_REGISTERED));
}
else if (na->HasFlag(NS_FORBIDDEN))
- source.Reply(LanguageString::NICK_X_FORBIDDEN, na->nick.c_str());
+ source.Reply(_(NICK_X_FORBIDDEN), na->nick.c_str());
else if (na->nc->HasFlag(NI_SUSPENDED))
- source.Reply(LanguageString::NICK_X_SUSPENDED, na->nick.c_str());
+ source.Reply(_(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
@@ -54,7 +54,7 @@ class CommandNSIdentify : public Command
if (!res)
{
Log(LOG_COMMAND, u, this) << "and failed to identify";
- source.Reply(LanguageString::PASSWORD_INCORRECT);
+ source.Reply(_(PASSWORD_INCORRECT));
if (bad_password(u))
return MOD_STOP;
}
diff --git a/modules/core/ns_info.cpp b/modules/core/ns_info.cpp
index c804b4cf8..52326ddb6 100644
--- a/modules/core/ns_info.cpp
+++ b/modules/core/ns_info.cpp
@@ -47,21 +47,21 @@ class CommandNSInfo : public Command
NickRequest *nr = findrequestnick(nick);
if (nr)
{
- source.Reply(LanguageString::NICK_IS_PREREG);
+ source.Reply(_(NICK_IS_PREREG));
if (has_auspex)
source.Reply(_(" E-mail address: %s"), nr->email.c_str());
}
else if (nickIsServices(nick, true))
source.Reply(_("Nick \002%s\002 is part of this Network's Services."), nick.c_str());
else
- source.Reply(LanguageString::NICK_X_NOT_REGISTERED, nick.c_str());
+ source.Reply(_(NICK_X_NOT_REGISTERED), nick.c_str());
}
else if (na->HasFlag(NS_FORBIDDEN))
{
if (u->HasMode(UMODE_OPER) && !na->last_usermask.empty())
- 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());
+ source.Reply(_(NICK_X_FORBIDDEN_OPER), nick.c_str(), na->last_usermask.c_str(), !na->last_realname.empty() ? na->last_realname.c_str() : _(NO_REASON));
else
- source.Reply(LanguageString::NICK_X_FORBIDDEN, nick.c_str());
+ source.Reply(_(NICK_X_FORBIDDEN), nick.c_str());
}
else
{
@@ -126,7 +126,7 @@ class CommandNSInfo : public Command
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(LanguageString::NICK_INFO_OPTIONS, optbuf.empty() ? _("None") : optbuf.c_str());
+ source.Reply(_(NICK_INFO_OPTIONS), optbuf.empty() ? _("None") : optbuf.c_str());
if (na->nc->HasFlag(NI_SUSPENDED))
{
@@ -142,7 +142,7 @@ class CommandNSInfo : public Command
source.Reply(_("Expires on: %s"), do_strftime(na->last_seen + Config->NSExpire).c_str());
}
- FOREACH_MOD(I_OnNickInfo, OnNickInfo(u, na, show_hidden));
+ FOREACH_MOD(I_OnNickInfo, OnNickInfo(source, na, show_hidden));
}
return MOD_CONT;
}
diff --git a/modules/core/ns_list.cpp b/modules/core/ns_list.cpp
index 9d49ce2f5..1ecbad3d3 100644
--- a/modules/core/ns_list.cpp
+++ b/modules/core/ns_list.cpp
@@ -52,7 +52,7 @@ class CommandNSList : public Command
if (Config->NSListOpersOnly && !u->HasMode(UMODE_OPER)) /* reverse the help logic */
{
- source.Reply(LanguageString::ACCESS_DENIED);
+ source.Reply(_(ACCESS_DENIED));
return MOD_CONT;
}
@@ -68,7 +68,7 @@ class CommandNSList : public Command
}
catch (const ConvertException &)
{
- source.Reply(LanguageString::LIST_INCORRECT_RANGE);
+ source.Reply(_(LIST_INCORRECT_RANGE));
return MOD_CONT;
}
@@ -96,7 +96,7 @@ class CommandNSList : public Command
mync = u->Account();
- source.Reply(LanguageString::LIST_HEADER, pattern.c_str());
+ source.Reply(_(LIST_HEADER), pattern.c_str());
if (!unconfirmed)
{
for (nickalias_map::const_iterator it = NickAliasList.begin(), it_end = NickAliasList.end(); it != it_end; ++it)
@@ -219,7 +219,7 @@ class CommandNSList : public Command
if (u->Account()->IsServicesOper())
SyntaxError(source, "LIST", _("LIST \037pattern\037 [FORBIDDEN] [SUSPENDED] [NOEXPIRE] [UNCONFIRMED]"));
else
- SyntaxError(source, "LIST", LanguageString::NICK_LIST_SYNTAX);
+ SyntaxError(source, "LIST", _(NICK_LIST_SYNTAX));
}
};
diff --git a/modules/core/ns_logout.cpp b/modules/core/ns_logout.cpp
index ef375f2bb..28fcc2302 100644
--- a/modules/core/ns_logout.cpp
+++ b/modules/core/ns_logout.cpp
@@ -32,7 +32,7 @@ class CommandNSLogout : public Command
if (!u->Account()->IsServicesOper() && !nick.empty())
this->OnSyntaxError(source, "");
else if (!(u2 = (!nick.empty() ? finduser(nick) : u)))
- source.Reply(LanguageString::NICK_X_NOT_IN_USE, nick.c_str());
+ source.Reply(_(NICK_X_NOT_IN_USE), nick.c_str());
else if (!nick.empty() && u2->Account() && !u2->Account()->IsServicesOper())
source.Reply(_("You can't logout %s because they are a Services Operator."), nick.c_str());
else
diff --git a/modules/core/ns_recover.cpp b/modules/core/ns_recover.cpp
index 0cc76cfae..af50ed573 100644
--- a/modules/core/ns_recover.cpp
+++ b/modules/core/ns_recover.cpp
@@ -32,13 +32,13 @@ class CommandNSRecover : public Command
NickAlias *na;
User *u2;
if (!(u2 = finduser(nick)))
- source.Reply(LanguageString::NICK_X_NOT_IN_USE, nick.c_str());
+ source.Reply(_(NICK_X_NOT_IN_USE), nick.c_str());
else if (!(na = findnick(u2->nick)))
- source.Reply(LanguageString::NICK_X_NOT_REGISTERED, nick.c_str());
+ source.Reply(_(NICK_X_NOT_REGISTERED), nick.c_str());
else if (na->HasFlag(NS_FORBIDDEN))
- source.Reply(LanguageString::NICK_X_FORBIDDEN, na->nick.c_str());
+ source.Reply(_(NICK_X_FORBIDDEN), na->nick.c_str());
else if (na->nc->HasFlag(NI_SUSPENDED))
- source.Reply(LanguageString::NICK_X_SUSPENDED, na->nick.c_str());
+ source.Reply(_(NICK_X_SUSPENDED), na->nick.c_str());
else if (nick.equals_ci(u->nick))
source.Reply(_("You can't recover yourself!"));
else if (!pass.empty())
@@ -47,17 +47,17 @@ class CommandNSRecover : public Command
if (res == 1)
{
- u2->SendMessage(NickServ, LanguageString::FORCENICKCHANGE_NOW);
+ u2->SendMessage(NickServ, _(FORCENICKCHANGE_NOW));
u2->Collide(na);
/* Convert Config->NSReleaseTimeout seconds to string format */
Anope::string relstr = duration(na->nc, Config->NSReleaseTimeout);
- source.Reply(LanguageString::NICK_RECOVERED, Config->s_NickServ.c_str(), nick.c_str(), relstr.c_str());
+ source.Reply(_(NICK_RECOVERED), Config->s_NickServ.c_str(), nick.c_str(), relstr.c_str());
}
else
{
- source.Reply(LanguageString::ACCESS_DENIED);
+ source.Reply(_(ACCESS_DENIED));
if (!res)
{
Log(LOG_COMMAND, u, this) << "with invalid password for " << nick;
@@ -70,16 +70,16 @@ class CommandNSRecover : public Command
{
if (u->Account() == na->nc || (!na->nc->HasFlag(NI_SECURE) && is_on_access(u, na->nc)))
{
- u2->SendMessage(NickServ, LanguageString::FORCENICKCHANGE_NOW);
+ u2->SendMessage(NickServ, _(FORCENICKCHANGE_NOW));
u2->Collide(na);
/* Convert Config->NSReleaseTimeout seconds to string format */
Anope::string relstr = duration(na->nc, Config->NSReleaseTimeout);
- source.Reply(LanguageString::NICK_RECOVERED, Config->s_NickServ.c_str(), nick.c_str(), relstr.c_str());
+ source.Reply(_(NICK_RECOVERED), Config->s_NickServ.c_str(), nick.c_str(), relstr.c_str());
}
else
- source.Reply(LanguageString::ACCESS_DENIED);
+ source.Reply(_(ACCESS_DENIED));
}
return MOD_CONT;
}
diff --git a/modules/core/ns_register.cpp b/modules/core/ns_register.cpp
index 00baadc9f..80dc92488 100644
--- a/modules/core/ns_register.cpp
+++ b/modules/core/ns_register.cpp
@@ -116,7 +116,7 @@ class CommandNSConfirm : public Command
if (!nr->passcode.equals_cs(passcode))
{
- source.Reply(LanguageString::NICK_CONFIRM_INVALID);
+ source.Reply(_(NICK_CONFIRM_INVALID));
return MOD_CONT;
}
}
@@ -166,7 +166,7 @@ class CommandNSConfirm : public Command
void OnSyntaxError(CommandSource &source, const Anope::string &subcommand)
{
- source.Reply(LanguageString::NICK_CONFIRM_INVALID);
+ source.Reply(_(NICK_CONFIRM_INVALID));
}
};
@@ -213,7 +213,7 @@ class CommandNSRegister : public CommandNSConfirm
if ((anr = findrequestnick(u->nick)))
{
- source.Reply(LanguageString::NICK_REQUESTED);
+ source.Reply(_(NICK_REQUESTED));
return MOD_CONT;
}
@@ -224,13 +224,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(LanguageString::NICK_CANNOT_BE_REGISTERED, u->nick.c_str());
+ source.Reply(_(NICK_CANNOT_BE_REGISTERED), u->nick.c_str());
return MOD_CONT;
}
if (!ircdproto->IsNickValid(u->nick))
{
- source.Reply(LanguageString::NICK_X_FORBIDDEN, u->nick.c_str());
+ source.Reply(_(NICK_X_FORBIDDEN), u->nick.c_str());
return MOD_CONT;
}
@@ -241,7 +241,7 @@ class CommandNSRegister : public CommandNSConfirm
if (u->nick.find_ci(nick) != Anope::string::npos && !u->HasMode(UMODE_OPER))
{
- source.Reply(LanguageString::NICK_CANNOT_BE_REGISTERED, u->nick.c_str());
+ source.Reply(_(NICK_CANNOT_BE_REGISTERED), u->nick.c_str());
return MOD_CONT;
}
}
@@ -256,17 +256,17 @@ class CommandNSRegister : public CommandNSConfirm
if (na->HasFlag(NS_FORBIDDEN))
{
Log(NickServ) << u->GetMask() << " tried to register FORBIDden nick " << u->nick;
- source.Reply(LanguageString::NICK_CANNOT_BE_REGISTERED, u->nick.c_str());
+ source.Reply(_(NICK_CANNOT_BE_REGISTERED), u->nick.c_str());
}
else
- source.Reply(LanguageString::NICK_ALREADY_REGISTERED, u->nick.c_str());
+ source.Reply(_(NICK_ALREADY_REGISTERED), u->nick.c_str());
}
else if (pass.equals_ci(u->nick) || (Config->StrictPasswords && pass.length() < 5))
- source.Reply(LanguageString::MORE_OBSCURE_PASSWORD);
+ source.Reply(_(MORE_OBSCURE_PASSWORD));
else if (pass.length() > Config->PassLen)
- source.Reply(LanguageString::PASSWORD_TOO_LONG);
+ source.Reply(_(PASSWORD_TOO_LONG));
else if (!email.empty() && !MailValidate(email))
- source.Reply(LanguageString::MAIL_X_INVALID, email.c_str());
+ source.Reply(_(MAIL_X_INVALID), email.c_str());
else
{
for (idx = 0; idx < 9; ++idx)
diff --git a/modules/core/ns_release.cpp b/modules/core/ns_release.cpp
index 088f0dade..1a0319b78 100644
--- a/modules/core/ns_release.cpp
+++ b/modules/core/ns_release.cpp
@@ -30,11 +30,11 @@ class CommandNSRelease : public Command
NickAlias *na;
if (!(na = findnick(nick)))
- source.Reply(LanguageString::NICK_X_NOT_REGISTERED, nick.c_str());
+ source.Reply(_(NICK_X_NOT_REGISTERED), nick.c_str());
else if (na->HasFlag(NS_FORBIDDEN))
- source.Reply(LanguageString::NICK_X_FORBIDDEN, na->nick.c_str());
+ source.Reply(_(NICK_X_FORBIDDEN), na->nick.c_str());
else if (na->nc->HasFlag(NI_SUSPENDED))
- source.Reply(LanguageString::NICK_X_SUSPENDED, na->nick.c_str());
+ source.Reply(_(NICK_X_SUSPENDED), na->nick.c_str());
else if (!na->HasFlag(NS_HELD))
source.Reply(_("Nick \002%s\002 isn't being held."), nick.c_str());
else if (!pass.empty())
@@ -47,7 +47,7 @@ class CommandNSRelease : public Command
}
else
{
- source.Reply(LanguageString::ACCESS_DENIED);
+ source.Reply(_(ACCESS_DENIED));
if (!res)
{
Log(LOG_COMMAND, u, this) << "invalid password for " << nick;
@@ -64,7 +64,7 @@ class CommandNSRelease : public Command
source.Reply(_("Services' hold on your nick has been released."));
}
else
- source.Reply(LanguageString::ACCESS_DENIED);
+ source.Reply(_(ACCESS_DENIED));
}
return MOD_CONT;
}
diff --git a/modules/core/ns_resetpass.cpp b/modules/core/ns_resetpass.cpp
index 07b918125..068cb2b4f 100644
--- a/modules/core/ns_resetpass.cpp
+++ b/modules/core/ns_resetpass.cpp
@@ -30,11 +30,11 @@ class CommandNSResetPass : public Command
NickAlias *na;
if (Config->RestrictMail && (!u->Account() || !u->Account()->HasCommand("nickserv/resetpass")))
- source.Reply(LanguageString::ACCESS_DENIED);
+ source.Reply(_(ACCESS_DENIED));
if (!(na = findnick(params[0])))
- source.Reply(LanguageString::NICK_X_NOT_REGISTERED, params[0].c_str());
+ source.Reply(_(NICK_X_NOT_REGISTERED), params[0].c_str());
else if (na->HasFlag(NS_FORBIDDEN))
- source.Reply(LanguageString::NICK_X_FORBIDDEN, na->nick.c_str());
+ source.Reply(_(NICK_X_FORBIDDEN), na->nick.c_str());
else
{
if (SendResetEmail(u, na))
@@ -126,7 +126,7 @@ class NSResetPass : public Module
else
{
Log(LOG_COMMAND, u, &commandnsresetpass) << "invalid confirm passcode for " << na->nick;
- source.Reply(LanguageString::NICK_CONFIRM_INVALID);
+ source.Reply(_(NICK_CONFIRM_INVALID));
bad_password(u);
}
diff --git a/modules/core/ns_saset.cpp b/modules/core/ns_saset.cpp
index 993a090fc..f1fd9b105 100644
--- a/modules/core/ns_saset.cpp
+++ b/modules/core/ns_saset.cpp
@@ -37,17 +37,17 @@ class CommandNSSASet : public Command
if (readonly)
{
- source.Reply(LanguageString::NICK_SET_DISABLED);
+ source.Reply(_(NICK_SET_DISABLED));
return MOD_CONT;
}
NickAlias *na = findnick(nick);
if (!na)
- source.Reply(LanguageString::NICK_X_NOT_REGISTERED, nick.c_str());
+ source.Reply(_(NICK_X_NOT_REGISTERED), nick.c_str());
else if (na->HasFlag(NS_FORBIDDEN))
- source.Reply(LanguageString::NICK_X_FORBIDDEN, na->nick.c_str());
+ source.Reply(_(NICK_X_FORBIDDEN), na->nick.c_str());
else if (na->nc->HasFlag(NI_SUSPENDED))
- source.Reply(LanguageString::NICK_X_SUSPENDED, na->nick.c_str());
+ source.Reply(_(NICK_X_SUSPENDED), na->nick.c_str());
else
{
Command *c = this->FindCommand(params[1]);
@@ -98,7 +98,7 @@ class CommandNSSASet : public Command
void OnSyntaxError(CommandSource &source, const Anope::string &subcommand)
{
- SyntaxError(source, "SASET", LanguageString::NICK_SASET_SYNTAX);
+ SyntaxError(source, "SASET", _(NICK_SASET_SYNTAX));
}
bool AddSubcommand(Module *creator, Command *c)
@@ -142,12 +142,12 @@ class CommandNSSASetDisplay : public Command
NickAlias *na = findnick(params[1]);
if (!na || na->nc != nc)
{
- source.Reply(LanguageString::NICK_SASET_DISPLAY_INVALID, nc->display.c_str());
+ source.Reply(_(NICK_SASET_DISPLAY_INVALID), nc->display.c_str());
return MOD_CONT;
}
change_core_display(nc, params[1]);
- source.Reply(LanguageString::NICK_SET_DISPLAY_CHANGED, nc->display.c_str());
+ source.Reply(_(NICK_SET_DISPLAY_CHANGED), nc->display.c_str());
return MOD_CONT;
}
@@ -163,7 +163,7 @@ class CommandNSSASetDisplay : public Command
void OnSyntaxError(CommandSource &source, const Anope::string &)
{
// XXX
- SyntaxError(source, "SASET", LanguageString::NICK_SASET_SYNTAX);
+ SyntaxError(source, "SASET", _(NICK_SASET_SYNTAX));
}
};
@@ -187,32 +187,32 @@ class CommandNSSASetPassword : public Command
if (Config->NSSecureAdmins && u->Account() != nc && nc->IsServicesOper())
{
- source.Reply(LanguageString::ACCESS_DENIED);
+ source.Reply(_(ACCESS_DENIED));
return MOD_CONT;
}
else if (nc->display.equals_ci(params[1]) || (Config->StrictPasswords && len < 5))
{
- source.Reply(LanguageString::MORE_OBSCURE_PASSWORD);
+ source.Reply(_(MORE_OBSCURE_PASSWORD));
return MOD_CONT;
}
else if (len > Config->PassLen)
{
- source.Reply(LanguageString::PASSWORD_TOO_LONG);
+ source.Reply(_(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(LanguageString::NICK_SASET_PASSWORD_FAILED, nc->display.c_str());
+ source.Reply(_(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(LanguageString::NICK_SASET_PASSWORD_CHANGED_TO, nc->display.c_str(), tmp_pass.c_str());
+ source.Reply(_(NICK_SASET_PASSWORD_CHANGED_TO), nc->display.c_str(), tmp_pass.c_str());
else
- source.Reply(LanguageString::NICK_SASET_PASSWORD_CHANGED, nc->display.c_str());
+ source.Reply(_(NICK_SASET_PASSWORD_CHANGED), nc->display.c_str());
return MOD_CONT;
}
@@ -227,7 +227,7 @@ class CommandNSSASetPassword : public Command
void OnSyntaxError(CommandSource &source, const Anope::string &)
{
- SyntaxError(source, "SASET", LanguageString::NICK_SASET_SYNTAX);
+ SyntaxError(source, "SASET", _(NICK_SASET_SYNTAX));
}
};
diff --git a/modules/core/ns_sendpass.cpp b/modules/core/ns_sendpass.cpp
index 40d9dd00d..342a22329 100644
--- a/modules/core/ns_sendpass.cpp
+++ b/modules/core/ns_sendpass.cpp
@@ -31,11 +31,11 @@ class CommandNSSendPass : public Command
NickAlias *na;
if (Config->RestrictMail && (!u->Account() || !u->Account()->HasCommand("nickserv/sendpass")))
- source.Reply(LanguageString::ACCESS_DENIED);
+ source.Reply(_(ACCESS_DENIED));
else if (!(na = findnick(nick)))
- source.Reply(LanguageString::NICK_X_NOT_REGISTERED, nick.c_str());
+ source.Reply(_(NICK_X_NOT_REGISTERED), nick.c_str());
else if (na->HasFlag(NS_FORBIDDEN))
- source.Reply(LanguageString::NICK_X_FORBIDDEN, na->nick.c_str());
+ source.Reply(_(NICK_X_FORBIDDEN), na->nick.c_str());
else
{
Anope::string tmp_pass;
diff --git a/modules/core/ns_set.cpp b/modules/core/ns_set.cpp
index 86272c084..8e5e27033 100644
--- a/modules/core/ns_set.cpp
+++ b/modules/core/ns_set.cpp
@@ -35,13 +35,13 @@ class CommandNSSet : public Command
if (readonly)
{
- source.Reply(LanguageString::NICK_SET_DISABLED);
+ source.Reply(_(NICK_SET_DISABLED));
return MOD_CONT;
}
if (u->Account()->HasFlag(NI_SUSPENDED))
{
- source.Reply(LanguageString::NICK_X_SUSPENDED, u->Account()->display.c_str());
+ source.Reply(_(NICK_X_SUSPENDED), u->Account()->display.c_str());
return MOD_CONT;
}
@@ -60,7 +60,7 @@ class CommandNSSet : public Command
mod_run_cmd(NickServ, u, NULL, c, params[0], cmdparams);
}
else
- source.Reply(LanguageString::NICK_SET_UNKNOWN_OPTION, params[0].c_str());
+ source.Reply(_(NICK_SET_UNKNOWN_OPTION), params[0].c_str());
return MOD_CONT;
}
@@ -95,7 +95,7 @@ class CommandNSSet : public Command
void OnSyntaxError(CommandSource &source, const Anope::string &subcommand)
{
- SyntaxError(source, "SET", LanguageString::NICK_SET_SYNTAX);
+ SyntaxError(source, "SET", _(NICK_SET_SYNTAX));
}
bool AddSubcommand(Module *creator, Command *c)
@@ -136,12 +136,12 @@ class CommandNSSetDisplay : public Command
if (!na || na->nc != u->Account())
{
- source.Reply(LanguageString::NICK_SASET_DISPLAY_INVALID, u->Account()->display.c_str());
+ source.Reply(_(NICK_SASET_DISPLAY_INVALID), u->Account()->display.c_str());
return MOD_CONT;
}
change_core_display(u->Account(), params[1]);
- source.Reply(LanguageString::NICK_SET_DISPLAY_CHANGED, u->Account()->display.c_str());
+ source.Reply(_(NICK_SET_DISPLAY_CHANGED), u->Account()->display.c_str());
return MOD_CONT;
}
@@ -157,7 +157,7 @@ class CommandNSSetDisplay : public Command
void OnSyntaxError(CommandSource &source, const Anope::string &)
{
// XXX
- SyntaxError(source, "SET", LanguageString::NICK_SET_SYNTAX);
+ SyntaxError(source, "SET", _(NICK_SET_SYNTAX));
}
};
@@ -178,27 +178,27 @@ class CommandNSSetPassword : public Command
if (u->Account()->display.equals_ci(param) || (Config->StrictPasswords && len < 5))
{
- source.Reply(LanguageString::MORE_OBSCURE_PASSWORD);
+ source.Reply(_(MORE_OBSCURE_PASSWORD));
return MOD_CONT;
}
else if (len > Config->PassLen)
{
- source.Reply(LanguageString::PASSWORD_TOO_LONG);
+ source.Reply(_(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(LanguageString::NICK_SASET_PASSWORD_FAILED);
+ source.Reply(_(NICK_SASET_PASSWORD_FAILED));
return MOD_CONT;
}
Anope::string tmp_pass;
if (enc_decrypt(u->Account()->pass, tmp_pass) == 1)
- source.Reply(LanguageString::NICK_SASET_PASSWORD_CHANGED_TO, u->Account()->display.c_str(), tmp_pass.c_str());
+ source.Reply(_(NICK_SASET_PASSWORD_CHANGED_TO), u->Account()->display.c_str(), tmp_pass.c_str());
else
- source.Reply(LanguageString::NICK_SASET_PASSWORD_CHANGED, u->Account()->display.c_str());
+ source.Reply(_(NICK_SASET_PASSWORD_CHANGED), u->Account()->display.c_str());
return MOD_CONT;
}
@@ -215,7 +215,7 @@ class CommandNSSetPassword : public Command
void OnSyntaxError(CommandSource &source, const Anope::string &)
{
// XXX
- SyntaxError(source, "SET", LanguageString::NICK_SET_SYNTAX);
+ SyntaxError(source, "SET", _(NICK_SET_SYNTAX));
}
};
diff --git a/modules/core/ns_set_email.cpp b/modules/core/ns_set_email.cpp
index 900ff9ec3..6d6d97795 100644
--- a/modules/core/ns_set_email.cpp
+++ b/modules/core/ns_set_email.cpp
@@ -38,12 +38,12 @@ class CommandNSSetEmail : public Command
}
else if (Config->NSSecureAdmins && u->Account() != nc && nc->IsServicesOper())
{
- source.Reply(LanguageString::ACCESS_DENIED);
+ source.Reply(_(ACCESS_DENIED));
return MOD_CONT;
}
else if (!param.empty() && !MailValidate(param))
{
- source.Reply(LanguageString::MAIL_X_INVALID, param.c_str());
+ source.Reply(_(MAIL_X_INVALID), param.c_str());
return MOD_CONT;
}
diff --git a/modules/core/ns_suspend.cpp b/modules/core/ns_suspend.cpp
index 159ec0196..12b271dca 100644
--- a/modules/core/ns_suspend.cpp
+++ b/modules/core/ns_suspend.cpp
@@ -30,26 +30,26 @@ class CommandNSSuspend : public Command
if (readonly)
{
- source.Reply(LanguageString::READ_ONLY_MODE);
+ source.Reply(_(READ_ONLY_MODE));
return MOD_CONT;
}
NickAlias *na = findnick(nick);
if (!na)
{
- source.Reply(LanguageString::NICK_X_NOT_REGISTERED, nick.c_str());
+ source.Reply(_(NICK_X_NOT_REGISTERED), nick.c_str());
return MOD_CONT;
}
if (na->HasFlag(NS_FORBIDDEN))
{
- source.Reply(LanguageString::NICK_X_FORBIDDEN, na->nick.c_str());
+ source.Reply(_(NICK_X_FORBIDDEN), na->nick.c_str());
return MOD_CONT;
}
if (Config->NSSecureAdmins && na->nc->IsServicesOper())
{
- source.Reply(LanguageString::ACCESS_DENIED);
+ source.Reply(_(ACCESS_DENIED));
return MOD_CONT;
}
@@ -112,26 +112,26 @@ class CommandNSUnSuspend : public Command
if (readonly)
{
- source.Reply(LanguageString::READ_ONLY_MODE);
+ source.Reply(_(READ_ONLY_MODE));
return MOD_CONT;
}
NickAlias *na = findnick(nick);
if (!na)
{
- source.Reply(LanguageString::NICK_X_NOT_REGISTERED, nick.c_str());
+ source.Reply(_(NICK_X_NOT_REGISTERED), nick.c_str());
return MOD_CONT;
}
if (na->HasFlag(NS_FORBIDDEN))
{
- source.Reply(LanguageString::NICK_X_FORBIDDEN, na->nick.c_str());
+ source.Reply(_(NICK_X_FORBIDDEN), na->nick.c_str());
return MOD_CONT;
}
if (Config->NSSecureAdmins && na->nc->IsServicesOper())
{
- source.Reply(LanguageString::ACCESS_DENIED);
+ source.Reply(_(ACCESS_DENIED));
return MOD_CONT;
}
diff --git a/modules/core/os_akill.cpp b/modules/core/os_akill.cpp
index b2396e360..dd07e2abc 100644
--- a/modules/core/os_akill.cpp
+++ b/modules/core/os_akill.cpp
@@ -67,7 +67,7 @@ class AkillListCallback : public NumberList
if (!SentHeader)
source.Reply(_("No matching entries on the AKILL list."));
else
- source.Reply(LanguageString::END_OF_ANY_LIST, "Akill");
+ source.Reply(_(END_OF_ANY_LIST), "Akill");
}
void HandleNumber(unsigned Number)
@@ -92,7 +92,7 @@ class AkillListCallback : public NumberList
static void DoList(CommandSource &source, XLine *x, unsigned Number)
{
- source.Reply(LanguageString::OPER_LIST_FORMAT, Number + 1, x->Mask.c_str(), x->Reason.c_str());
+ source.Reply(_(OPER_LIST_FORMAT), Number + 1, x->Mask.c_str(), x->Reason.c_str());
}
};
@@ -124,7 +124,7 @@ class AkillViewCallback : public AkillListCallback
static void DoList(CommandSource &source, XLine *x, unsigned Number)
{
- 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());
+ 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());
}
};
@@ -155,7 +155,7 @@ class CommandOSAKill : public Command
/* Do not allow less than a minute expiry time */
if (expires && expires < 60)
{
- source.Reply(LanguageString::BAD_EXPIRY_TIME);
+ source.Reply(_(BAD_EXPIRY_TIME));
return MOD_CONT;
}
else if (expires > 0)
@@ -183,7 +183,7 @@ class CommandOSAKill : public Command
if (percent > 95)
{
- source.Reply(LanguageString::USERHOST_MASK_TOO_WIDE, mask.c_str());
+ source.Reply(_(USERHOST_MASK_TOO_WIDE), mask.c_str());
Log(LOG_ADMIN, u, this) << "tried to akill " << percent << "% of the network (" << affected << " users)";
return MOD_CONT;
}
@@ -198,7 +198,7 @@ class CommandOSAKill : public Command
Log(LOG_ADMIN, u, this) << "on " << mask << " (" << reason << ") expires in " << duration(NULL, expires - Anope::CurTime) << " [affects " << affected << " user(s) (" << percent << "%)]";
if (readonly)
- source.Reply(LanguageString::READ_ONLY_MODE);
+ source.Reply(_(READ_ONLY_MODE));
}
else
this->OnSyntaxError(source, "ADD");
@@ -245,7 +245,7 @@ class CommandOSAKill : public Command
}
if (readonly)
- source.Reply(LanguageString::READ_ONLY_MODE);
+ source.Reply(_(READ_ONLY_MODE));
return MOD_CONT;
}
@@ -289,7 +289,7 @@ class CommandOSAKill : public Command
if (!SentHeader)
source.Reply(_("No matching entries on the AKILL list."));
else
- source.Reply(LanguageString::END_OF_ANY_LIST, "Akill");
+ source.Reply(_(END_OF_ANY_LIST), "Akill");
}
return MOD_CONT;
diff --git a/modules/core/os_chankill.cpp b/modules/core/os_chankill.cpp
index 2d1ed23cd..c16a4c1fc 100644
--- a/modules/core/os_chankill.cpp
+++ b/modules/core/os_chankill.cpp
@@ -42,7 +42,7 @@ class CommandOSChanKill : public Command
expires *= 86400;
if (expires && expires < 60)
{
- source.Reply(LanguageString::BAD_EXPIRY_TIME);
+ source.Reply(_(BAD_EXPIRY_TIME));
return MOD_CONT;
}
else if (expires > 0)
@@ -81,7 +81,7 @@ class CommandOSChanKill : public Command
Log(LOG_ADMIN, u, this) << "(" << realreason << ")";
}
else
- source.Reply(LanguageString::CHAN_X_NOT_IN_USE, channel.c_str());
+ source.Reply(_(CHAN_X_NOT_IN_USE), channel.c_str());
}
return MOD_CONT;
}
diff --git a/modules/core/os_kick.cpp b/modules/core/os_kick.cpp
index a0f81acbe..5e55ae1e2 100644
--- a/modules/core/os_kick.cpp
+++ b/modules/core/os_kick.cpp
@@ -32,7 +32,7 @@ class CommandOSKick : public Command
if (!(c = findchan(chan)))
{
- source.Reply(LanguageString::CHAN_X_NOT_IN_USE, chan.c_str());
+ source.Reply(_(CHAN_X_NOT_IN_USE), chan.c_str());
return MOD_CONT;
}
else if (c->bouncy_modes)
@@ -42,7 +42,7 @@ class CommandOSKick : public Command
}
else if (!(u2 = finduser(nick)))
{
- source.Reply(LanguageString::NICK_X_NOT_IN_USE, nick.c_str());
+ source.Reply(_(NICK_X_NOT_IN_USE), nick.c_str());
return MOD_CONT;
}
diff --git a/modules/core/os_mode.cpp b/modules/core/os_mode.cpp
index 74c458704..da1fe8081 100644
--- a/modules/core/os_mode.cpp
+++ b/modules/core/os_mode.cpp
@@ -31,7 +31,7 @@ class CommandOSMode : public Command
{
Channel *c = findchan(target);
if (!c)
- source.Reply(LanguageString::CHAN_X_NOT_IN_USE, target.c_str());
+ source.Reply(_(CHAN_X_NOT_IN_USE), target.c_str());
else if (c->bouncy_modes)
source.Reply(_("Services is unable to change modes. Are your servers' U:lines configured correctly?"));
else
@@ -45,7 +45,7 @@ class CommandOSMode : public Command
{
User *u2 = finduser(target);
if (!u2)
- source.Reply(LanguageString::NICK_X_NOT_IN_USE, target.c_str());
+ source.Reply(_(NICK_X_NOT_IN_USE), target.c_str());
else
{
u2->SetModes(OperServ, "%s", modes.c_str());
diff --git a/modules/core/os_news.cpp b/modules/core/os_news.cpp
index 1ab5a838c..3fc5c2959 100644
--- a/modules/core/os_news.cpp
+++ b/modules/core/os_news.cpp
@@ -181,7 +181,7 @@ class NewsBase : public Command
if (!count)
source.Reply(msgs[MSG_LIST_NONE]);
else
- source.Reply(LanguageString::END_OF_ANY_LIST, "News");
+ source.Reply(_(END_OF_ANY_LIST), "News");
return MOD_CONT;
}
@@ -197,7 +197,7 @@ class NewsBase : public Command
{
if (readonly)
{
- source.Reply(LanguageString::READ_ONLY_MODE);
+ source.Reply(_(READ_ONLY_MODE));
return MOD_CONT;
}
n = add_newsitem(source, text, type);
@@ -220,7 +220,7 @@ class NewsBase : public Command
{
if (readonly)
{
- source.Reply(LanguageString::READ_ONLY_MODE);
+ source.Reply(_(READ_ONLY_MODE));
return MOD_CONT;
}
if (!text.equals_ci("ALL"))
diff --git a/modules/core/os_oline.cpp b/modules/core/os_oline.cpp
index 6fc8903ac..0d5232e64 100644
--- a/modules/core/os_oline.cpp
+++ b/modules/core/os_oline.cpp
@@ -30,7 +30,7 @@ class CommandOSOLine : public Command
/* let's check whether the user is online */
if (!(u2 = finduser(nick)))
- source.Reply(LanguageString::NICK_X_NOT_IN_USE, nick.c_str());
+ source.Reply(_(NICK_X_NOT_IN_USE), nick.c_str());
else if (u2 && flag[0] == '+')
{
ircdproto->SendSVSO(Config->s_OperServ, nick, flag);
diff --git a/modules/core/os_session.cpp b/modules/core/os_session.cpp
index 6d1d0a0b2..7dd41b769 100644
--- a/modules/core/os_session.cpp
+++ b/modules/core/os_session.cpp
@@ -255,7 +255,7 @@ class CommandOSException : public Command
time_t expires = !expiry.empty() ? dotime(expiry) : Config->ExceptionExpiry;
if (expires < 0)
{
- source.Reply(LanguageString::BAD_EXPIRY_TIME);
+ source.Reply(_(BAD_EXPIRY_TIME));
return MOD_CONT;
}
else if (expires > 0)
@@ -287,7 +287,7 @@ class CommandOSException : public Command
source.Reply(_("Session limit for \002%s\002 set to \002%d\002."), mask.c_str(), limit);
if (readonly)
- source.Reply(LanguageString::READ_ONLY_MODE);
+ source.Reply(_(READ_ONLY_MODE));
}
return MOD_CONT;
@@ -323,7 +323,7 @@ class CommandOSException : public Command
}
if (readonly)
- source.Reply(LanguageString::READ_ONLY_MODE);
+ source.Reply(_(READ_ONLY_MODE));
return MOD_CONT;
}
@@ -357,7 +357,7 @@ class CommandOSException : public Command
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(LanguageString::READ_ONLY_MODE);
+ source.Reply(_(READ_ONLY_MODE));
}
else
this->OnSyntaxError(source, "MOVE");
diff --git a/modules/core/os_snline.cpp b/modules/core/os_snline.cpp
index 8a03c73a3..f9697a98f 100644
--- a/modules/core/os_snline.cpp
+++ b/modules/core/os_snline.cpp
@@ -90,7 +90,7 @@ class SNLineListCallback : public NumberList
static void DoList(CommandSource &source, XLine *x, unsigned Number)
{
- source.Reply(LanguageString::OPER_LIST_FORMAT, Number + 1, x->Mask.c_str(), x->Reason.c_str());
+ source.Reply(_(OPER_LIST_FORMAT), Number + 1, x->Mask.c_str(), x->Reason.c_str());
}
};
@@ -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(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());
+ 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());
}
};
@@ -154,7 +154,7 @@ class CommandOSSNLine : public Command
/* Do not allow less than a minute expiry time */
if (expires && expires < 60)
{
- source.Reply(LanguageString::BAD_EXPIRY_TIME);
+ source.Reply(_(BAD_EXPIRY_TIME));
return MOD_CONT;
}
else if (expires > 0)
@@ -197,7 +197,7 @@ class CommandOSSNLine : public Command
if (percent > 95)
{
- source.Reply(LanguageString::USERHOST_MASK_TOO_WIDE, mask.c_str());
+ source.Reply(_(USERHOST_MASK_TOO_WIDE), mask.c_str());
Log(LOG_ADMIN, u, this) << "tried to SNLine " << percent << "% of the network (" << affected << " users)";
return MOD_CONT;
}
@@ -211,7 +211,7 @@ class CommandOSSNLine : public Command
Log(LOG_ADMIN, u, this) << "on " << mask << " (" << reason << ") expires in " << duration(NULL, expires - Anope::CurTime) << " [affects " << affected << " user(s) (" << percent << "%)]";
if (readonly)
- source.Reply(LanguageString::READ_ONLY_MODE);
+ source.Reply(_(READ_ONLY_MODE));
}
else
@@ -260,7 +260,7 @@ class CommandOSSNLine : public Command
}
if (readonly)
- source.Reply(LanguageString::READ_ONLY_MODE);
+ source.Reply(_(READ_ONLY_MODE));
return MOD_CONT;
}
@@ -303,7 +303,7 @@ class CommandOSSNLine : public Command
if (!SentHeader)
source.Reply(_("No matching entries on the SNLINE list."));
else
- source.Reply(LanguageString::END_OF_ANY_LIST, "SNLine");
+ source.Reply(_(END_OF_ANY_LIST), "SNLine");
}
return MOD_CONT;
diff --git a/modules/core/os_sqline.cpp b/modules/core/os_sqline.cpp
index 544956dee..d13523fb5 100644
--- a/modules/core/os_sqline.cpp
+++ b/modules/core/os_sqline.cpp
@@ -89,7 +89,7 @@ class SQLineListCallback : public NumberList
static void DoList(CommandSource &source, XLine *x, unsigned Number)
{
- source.Reply(LanguageString::OPER_LIST_FORMAT, Number + 1, x->Mask.c_str(), x->Reason.c_str());
+ source.Reply(_(OPER_LIST_FORMAT), Number + 1, x->Mask.c_str(), x->Reason.c_str());
}
};
@@ -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(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());
+ 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());
}
};
@@ -153,7 +153,7 @@ class CommandOSSQLine : public Command
/* Do not allow less than a minute expiry time */
if (expires && expires < 60)
{
- source.Reply(LanguageString::BAD_EXPIRY_TIME);
+ source.Reply(_(BAD_EXPIRY_TIME));
return MOD_CONT;
}
else if (expires > 0)
@@ -178,7 +178,7 @@ class CommandOSSQLine : public Command
if (percent > 95)
{
- source.Reply(LanguageString::USERHOST_MASK_TOO_WIDE, mask.c_str());
+ source.Reply(_(USERHOST_MASK_TOO_WIDE), mask.c_str());
Log(LOG_ADMIN, u, this) << "tried to SQLine " << percent << "% of the network (" << affected << " users)";
return MOD_CONT;
}
@@ -191,7 +191,7 @@ class CommandOSSQLine : public Command
Log(LOG_ADMIN, u, this) << "on " << mask << " (" << reason << ") expires in " << duration(NULL, expires - Anope::CurTime) << " [affects " << affected << " user(s) (" << percent << "%)]";
if (readonly)
- source.Reply(LanguageString::READ_ONLY_MODE);
+ source.Reply(_(READ_ONLY_MODE));
}
else
@@ -240,7 +240,7 @@ class CommandOSSQLine : public Command
}
if (readonly)
- source.Reply(LanguageString::READ_ONLY_MODE);
+ source.Reply(_(READ_ONLY_MODE));
return MOD_CONT;
}
@@ -283,7 +283,7 @@ class CommandOSSQLine : public Command
if (!SentHeader)
source.Reply(_("No matching entries on the SQLINE list."));
else
- source.Reply(LanguageString::END_OF_ANY_LIST, "SQLine");
+ source.Reply(_(END_OF_ANY_LIST), "SQLine");
}
return MOD_CONT;
diff --git a/modules/core/os_staff.cpp b/modules/core/os_staff.cpp
index e1e5d6942..3050941a9 100644
--- a/modules/core/os_staff.cpp
+++ b/modules/core/os_staff.cpp
@@ -47,7 +47,7 @@ class CommandOSStaff : public Command
}
}
- source.Reply(LanguageString::END_OF_ANY_LIST, "Staff");
+ source.Reply(_(END_OF_ANY_LIST), "Staff");
return MOD_CONT;
}
diff --git a/modules/core/os_svsnick.cpp b/modules/core/os_svsnick.cpp
index 00200a29d..c21ac8b67 100644
--- a/modules/core/os_svsnick.cpp
+++ b/modules/core/os_svsnick.cpp
@@ -52,11 +52,11 @@ class CommandOSSVSNick : public Command
/* Check for a nick in use or a forbidden/suspended nick */
if (!(u2 = finduser(nick)))
- source.Reply(LanguageString::NICK_X_NOT_IN_USE, nick.c_str());
+ source.Reply(_(NICK_X_NOT_IN_USE), nick.c_str());
else if (finduser(newnick))
source.Reply(_("Nick \002%s\002 is currently in use."), newnick.c_str());
else if ((na = findnick(newnick)) && na->HasFlag(NS_FORBIDDEN))
- source.Reply(LanguageString::NICK_X_FORBIDDEN, newnick.c_str());
+ source.Reply(_(NICK_X_FORBIDDEN), newnick.c_str());
else
{
source.Reply(_("The nick \002%s\002 is now being changed to \002%s\002."), nick.c_str(), newnick.c_str());
diff --git a/modules/core/os_szline.cpp b/modules/core/os_szline.cpp
index 899ba69b7..3225aab39 100644
--- a/modules/core/os_szline.cpp
+++ b/modules/core/os_szline.cpp
@@ -89,7 +89,7 @@ class SZLineListCallback : public NumberList
static void DoList(CommandSource &source, XLine *x, unsigned Number)
{
- source.Reply(LanguageString::OPER_LIST_FORMAT, Number + 1, x->Mask.c_str(), x->Reason.c_str());
+ source.Reply(_(OPER_LIST_FORMAT), Number + 1, x->Mask.c_str(), x->Reason.c_str());
}
};
@@ -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(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());
+ 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());
}
};
@@ -153,7 +153,7 @@ class CommandOSSZLine : public Command
/* Do not allow less than a minute expiry time */
if (expires && expires < 60)
{
- source.Reply(LanguageString::BAD_EXPIRY_TIME);
+ source.Reply(_(BAD_EXPIRY_TIME));
return MOD_CONT;
}
else if (expires > 0)
@@ -181,7 +181,7 @@ class CommandOSSZLine : public Command
if (percent > 95)
{
- source.Reply(LanguageString::USERHOST_MASK_TOO_WIDE, mask.c_str());
+ source.Reply(_(USERHOST_MASK_TOO_WIDE), mask.c_str());
Log(LOG_ADMIN, u, this) << "tried to SZLine " << percent << "% of the network (" << affected << " users)";
return MOD_CONT;
}
@@ -195,7 +195,7 @@ class CommandOSSZLine : public Command
Log(LOG_ADMIN, u, this) << "on " << mask << " (" << reason << ") expires in " << duration(NULL, expires - Anope::CurTime) << " [affects " << affected << " user(s) (" << percent << "%)]";
if (readonly)
- source.Reply(LanguageString::READ_ONLY_MODE);
+ source.Reply(_(READ_ONLY_MODE));
}
else
@@ -244,7 +244,7 @@ class CommandOSSZLine : public Command
}
if (readonly)
- source.Reply(LanguageString::READ_ONLY_MODE);
+ source.Reply(_(READ_ONLY_MODE));
return MOD_CONT;
}
diff --git a/modules/extra/cs_appendtopic.cpp b/modules/extra/cs_appendtopic.cpp
index e46c6654e..97a98e4cc 100644
--- a/modules/extra/cs_appendtopic.cpp
+++ b/modules/extra/cs_appendtopic.cpp
@@ -60,9 +60,9 @@ class CommandCSAppendTopic : public Command
Channel *c = ci->c;
if (!c)
- u->SendMessage(ChanServ, LanguageString::CHAN_X_NOT_IN_USE, ci->name.c_str());
+ source.Reply(_(CHAN_X_NOT_IN_USE), ci->name.c_str());
else if (!check_access(u, ci, CA_TOPIC))
- u->SendMessage(ChanServ, LanguageString::ACCESS_DENIED);
+ source.Reply(_(ACCESS_DENIED));
else
{
Anope::string topic;
diff --git a/modules/extra/cs_enforce.cpp b/modules/extra/cs_enforce.cpp
index 93873fe3c..5e79342a5 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->Account(), LanguageString::CHAN_NOT_ALLOWED_TO_JOIN);
+ Anope::string reason = GetString(uc->user->Account(), CHAN_NOT_ALLOWED_TO_JOIN);
c->SetMode(NULL, CMODE_BAN, mask);
c->Kick(NULL, uc->user, "%s", reason.c_str());
}
@@ -113,8 +113,8 @@ class CommandCSEnforce : public Command
if (!uc->user->IsIdentified())
{
get_idealban(ci, uc->user, mask);
- Anope::string reason = GetString(uc->user->Account(), LanguageString::CHAN_NOT_ALLOWED_TO_JOIN);
- if (!c->HasMode(CMODE_REGISTERED))
+ Anope::string reason = GetString(uc->user->Account(), CHAN_NOT_ALLOWED_TO_JOIN);
+ if (!c->HasMode(CMODE_REGISTEREDONLY))
c->SetMode(NULL, CMODE_BAN, mask);
c->Kick(NULL, uc->user, "%s", reason.c_str());
}
@@ -135,9 +135,9 @@ class CommandCSEnforce : public Command
Channel *c = ci->c;
if (!c)
- u->SendMessage(ChanServ, LanguageString::CHAN_X_NOT_IN_USE, ci->name.c_str());
+ source.Reply(_(CHAN_X_NOT_IN_USE), ci->name.c_str());
else if (!check_access(u, ci, CA_AKICK))
- u->SendMessage(ChanServ, LanguageString::ACCESS_DENIED);
+ source.Reply(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 b6b7fd66d..ad50dbb16 100644
--- a/modules/extra/cs_entrymsg.cpp
+++ b/modules/extra/cs_entrymsg.cpp
@@ -40,7 +40,7 @@ class CommandEntryMessage : public Command
{
source.Reply(_("Entry message list for \2%s\2:"), ci->name.c_str());
for (unsigned i = 0; i < messages.size(); ++i)
- 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(_(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
@@ -133,7 +133,7 @@ class CommandEntryMessage : public Command
}
else
{
- u->SendMessage(ChanServ, LanguageString::ACCESS_DENIED);
+ source.Reply(_(ACCESS_DENIED));
}
return MOD_CONT;
diff --git a/modules/extra/cs_set_misc.cpp b/modules/extra/cs_set_misc.cpp
index 301112769..1ed2e3c64 100644
--- a/modules/extra/cs_set_misc.cpp
+++ b/modules/extra/cs_set_misc.cpp
@@ -32,17 +32,17 @@ class CommandCSSetMisc : public Command
if (params.size() > 1)
{
ci->Extend("chanserv:" + this->name, new ExtensibleItemRegular<Anope::string>(params[1]));
- u->SendMessage(ChanServ, LanguageString::CHAN_SETTING_CHANGED, this->name.c_str(), ci->name.c_str(), params[1].c_str());
+ source.Reply(_(CHAN_SETTING_CHANGED), this->name.c_str(), ci->name.c_str(), params[1].c_str());
}
else
- u->SendMessage(ChanServ, LanguageString::CHAN_SETTING_UNSET, this->name.c_str(), ci->name.c_str());
+ source.Reply(_(CHAN_SETTING_UNSET), this->name.c_str(), ci->name.c_str());
return MOD_CONT;
}
void OnSyntaxError(CommandSource &source, const Anope::string &)
{
- SyntaxError(source, "SET", LanguageString::CHAN_SET_SYNTAX);
+ SyntaxError(source, "SET", _(CHAN_SET_SYNTAX));
}
};
@@ -55,7 +55,7 @@ class CommandCSSASetMisc : public CommandCSSetMisc
void OnSyntaxError(CommandSource &source, const Anope::string &)
{
- SyntaxError(source, "SASET", LanguageString::CHAN_SASET_SYNTAX);
+ SyntaxError(source, "SASET", _(CHAN_SASET_SYNTAX));
}
};
@@ -160,7 +160,7 @@ class CSSetMisc : public Module
}
}
- void OnChanInfo(User *u, ChannelInfo *ci, bool ShowHidden)
+ void OnChanInfo(CommandSource &source, ChannelInfo *ci, bool ShowHidden)
{
for (std::map<Anope::string, CommandInfo *>::const_iterator it = this->Commands.begin(), it_end = this->Commands.end(); it != it_end; ++it)
{
@@ -169,7 +169,7 @@ class CSSetMisc : public Module
Anope::string value;
if (ci->GetExtRegular("chanserv:" + it->first, value))
- u->SendMessage(ChanServ, " %s: %s", it->first.c_str(), value.c_str());
+ source.Reply(" %s: %s", it->first.c_str(), value.c_str());
}
}
diff --git a/modules/extra/cs_tban.cpp b/modules/extra/cs_tban.cpp
index 873a0cfee..8932726d6 100644
--- a/modules/extra/cs_tban.cpp
+++ b/modules/extra/cs_tban.cpp
@@ -35,16 +35,17 @@ class TempBan : public CallBack
}
};
-static bool CanBanUser(Channel *c, User *u, User *u2)
+static bool CanBanUser(CommandSource &source, Channel *c, User *u2)
{
+ User *u = source.u;
ChannelInfo *ci = c->ci;
bool ok = false;
if (!check_access(u, ci, CA_BAN))
- u->SendMessage(ChanServ, LanguageString::ACCESS_DENIED);
+ source.Reply(_(ACCESS_DENIED));
else if (matches_list(c, u2, CMODE_EXCEPT))
- u->SendMessage(ChanServ, LanguageString::CHAN_EXCEPTED, u2->nick.c_str(), ci->name.c_str());
+ source.Reply(_(CHAN_EXCEPTED), u2->nick.c_str(), ci->name.c_str());
else if (u2->IsProtected())
- u->SendMessage(ChanServ, LanguageString::ACCESS_DENIED);
+ source.Reply(_(ACCESS_DENIED));
else
ok = true;
@@ -61,7 +62,6 @@ class CommandCSTBan : public Command
CommandReturn Execute(CommandSource &source, const std::vector<Anope::string> &params)
{
- User *u = source.u;
ChannelInfo *ci = source.ci;
Channel *c = ci->c;
@@ -71,11 +71,11 @@ class CommandCSTBan : public Command
User *u2;
if (!c)
- u->SendMessage(ChanServ, LanguageString::CHAN_X_NOT_IN_USE, chan.c_str());
+ source.Reply(_(CHAN_X_NOT_IN_USE), chan.c_str());
else if (!(u2 = finduser(nick)))
- u->SendMessage(ChanServ, LanguageString::NICK_X_NOT_IN_USE, nick.c_str());
+ source.Reply(_(NICK_X_NOT_IN_USE), nick.c_str());
else
- if (CanBanUser(c, u, u2))
+ if (CanBanUser(source, c, u2))
{
Anope::string mask;
get_idealban(c->ci, u2, mask);
diff --git a/modules/extra/hs_request.cpp b/modules/extra/hs_request.cpp
index 0dd3e707b..9a4eb8644 100644
--- a/modules/extra/hs_request.cpp
+++ b/modules/extra/hs_request.cpp
@@ -68,19 +68,19 @@ class CommandHSRequest : public Command
}
if (vIdent.length() > Config->UserLen)
{
- source.Reply(LanguageString::HOST_SET_IDENTTOOLONG, Config->UserLen);
+ source.Reply(_(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(LanguageString::HOST_SET_IDENT_ERROR);
+ source.Reply(_(HOST_SET_IDENT_ERROR));
return MOD_CONT;
}
if (!ircd->vident)
{
- source.Reply(LanguageString::HOST_NO_VIDENT);
+ source.Reply(_(HOST_NO_VIDENT));
return MOD_CONT;
}
}
@@ -88,13 +88,13 @@ class CommandHSRequest : public Command
hostmask = rawhostmask;
else
{
- source.Reply(LanguageString::HOST_SET_TOOLONG, Config->HostLen);
+ source.Reply(_(HOST_SET_TOOLONG), Config->HostLen);
return MOD_CONT;
}
if (!isValidHost(hostmask, 3))
{
- source.Reply(LanguageString::HOST_SET_ERROR);
+ source.Reply(_(HOST_SET_ERROR));
return MOD_CONT;
}
@@ -164,7 +164,7 @@ class CommandHSActivate : public Command
me->SendMessage(source, _("No request for nick %s found."), nick.c_str());
}
else
- u->SendMessage(HostServ, LanguageString::NICK_X_NOT_REGISTERED, nick.c_str());
+ source.Reply(_(NICK_X_NOT_REGISTERED), nick.c_str());
return MOD_CONT;
}
@@ -247,7 +247,7 @@ class CommandHSReject : public Command
class HSListBase : public Command
{
protected:
- CommandReturn DoList(User *u)
+ CommandReturn DoList(CommandSource &source)
{
int counter = 1;
int from = 0, to = 0;
@@ -260,13 +260,13 @@ class HSListBase : public Command
{
++display_counter;
if (!hr->ident.empty())
- 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());
+ source.Reply(_("#%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, _("#%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());
+ source.Reply(_("#%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, _("Displayed all records (Count: \002%d\002)"), display_counter);
+ source.Reply(_("Displayed all records (Count: \002%d\002)"), display_counter);
return MOD_CONT;
}
@@ -274,11 +274,6 @@ class HSListBase : public Command
HSListBase(const Anope::string &cmd, int min, int max) : Command(cmd, min, max, "hostserv/set")
{
}
-
- void OnSyntaxError(CommandSource &source, const Anope::string &subcommand)
- {
- // no-op
- }
};
class CommandHSWaiting : public HSListBase
@@ -291,7 +286,7 @@ class CommandHSWaiting : public HSListBase
CommandReturn Execute(CommandSource &source, const std::vector<Anope::string> &params)
{
- return this->DoList(source.u);
+ return this->DoList(source);
}
bool OnHelp(CommandSource &source, const Anope::string &subcommand)
diff --git a/modules/extra/m_async_commands.cpp b/modules/extra/m_async_commands.cpp
index b97be4788..d4bbaaf6d 100644
--- a/modules/extra/m_async_commands.cpp
+++ b/modules/extra/m_async_commands.cpp
@@ -45,7 +45,7 @@ class AsynchCommandMutex : public CommandMutex
if (!command->permission.empty() && !u->Account()->HasCommand(command->permission))
{
- u->SendMessage(bi, LanguageString::ACCESS_DENIED);
+ u->SendMessage(bi, _(ACCESS_DENIED));
Log(LOG_COMMAND, "denied", bi) << "Access denied for user " << u->GetMask() << " with command " << command;
}
else
diff --git a/modules/extra/ns_set_misc.cpp b/modules/extra/ns_set_misc.cpp
index 767077e53..a1bf091c5 100644
--- a/modules/extra/ns_set_misc.cpp
+++ b/modules/extra/ns_set_misc.cpp
@@ -26,7 +26,6 @@ class CommandNSSetMisc : public Command
CommandReturn Execute(CommandSource &source, const std::vector<Anope::string> &params)
{
- User *u = source.u;
NickAlias *na = findnick(params[0]);
if (!na)
throw CoreException("NULL na in CommandNSSetMisc");
@@ -36,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, LanguageString::CHAN_SETTING_CHANGED, this->name.c_str(), nc->display.c_str(), params[1].c_str());
+ source.Reply(_(CHAN_SETTING_CHANGED), this->name.c_str(), nc->display.c_str(), params[1].c_str());
}
else
- u->SendMessage(NickServ, LanguageString::CHAN_SETTING_UNSET, this->name.c_str(), nc->display.c_str());
+ source.Reply(_(CHAN_SETTING_UNSET), this->name.c_str(), nc->display.c_str());
return MOD_CONT;
}
void OnSyntaxError(CommandSource &source, const Anope::string &)
{
- SyntaxError(source, "SET", LanguageString::NICK_SET_SYNTAX);
+ SyntaxError(source, "SET", _(NICK_SET_SYNTAX));
}
};
@@ -59,7 +58,7 @@ class CommandNSSASetMisc : public CommandNSSetMisc
void OnSyntaxError(CommandSource &source, const Anope::string &)
{
- SyntaxError(source, "SASET", LanguageString::NICK_SASET_SYNTAX);
+ SyntaxError(source, "SASET", _(NICK_SASET_SYNTAX));
}
};
@@ -163,7 +162,7 @@ class NSSetMisc : public Module
}
}
- void OnNickInfo(User *u, NickAlias *na, bool ShowHidden)
+ void OnNickInfo(CommandSource &source, NickAlias *na, bool ShowHidden)
{
for (std::map<Anope::string, CommandInfo *>::const_iterator it = this->Commands.begin(), it_end = this->Commands.end(); it != it_end; ++it)
{
@@ -172,7 +171,7 @@ class NSSetMisc : public Module
Anope::string value;
if (na->nc->GetExtRegular("nickserv:" + it->first, value))
- u->SendMessage(NickServ, " %s: %s", it->first.c_str(), value.c_str());
+ source.Reply(" %s: %s", it->first.c_str(), value.c_str());
}
}
diff --git a/src/botserv.cpp b/src/botserv.cpp
index e65118921..c1b7fde56 100644
--- a/src/botserv.cpp
+++ b/src/botserv.cpp
@@ -519,7 +519,7 @@ void bot_raw_ban(User *requester, ChannelInfo *ci, User *u, const Anope::string
if (ModeManager::FindUserModeByName(UMODE_PROTECTED) && u->IsProtected() && requester != u)
{
- ircdproto->SendPrivmsg(ci->bi, ci->name, "%s", GetString(requester->Account(), LanguageString::ACCESS_DENIED).c_str());
+ ircdproto->SendPrivmsg(ci->bi, ci->name, "%s", GetString(requester->Account(), _(ACCESS_DENIED)).c_str());
return;
}
@@ -561,7 +561,7 @@ void bot_raw_kick(User *requester, ChannelInfo *ci, User *u, const Anope::string
if (ModeManager::FindUserModeByName(UMODE_PROTECTED) && u->IsProtected() && requester != u)
{
- ircdproto->SendPrivmsg(ci->bi, ci->name, "%s", GetString(requester->Account(), LanguageString::ACCESS_DENIED).c_str());
+ ircdproto->SendPrivmsg(ci->bi, ci->name, "%s", GetString(requester->Account(), _(ACCESS_DENIED)).c_str());
return;
}
diff --git a/src/commands.cpp b/src/commands.cpp
index c9f66b25a..425c72671 100644
--- a/src/commands.cpp
+++ b/src/commands.cpp
@@ -65,7 +65,7 @@ void mod_run_cmd(BotInfo *bi, User *u, ChannelInfo *ci, Command *c, const Anope:
// Command requires registered users only
if (!c->HasFlag(CFLAG_ALLOW_UNREGISTERED) && !u->IsIdentified())
{
- u->SendMessage(bi, _(LanguageString::NICK_IDENTIFY_REQUIRED), Config->s_NickServ.c_str());
+ u->SendMessage(bi, _(_(NICK_IDENTIFY_REQUIRED)), Config->s_NickServ.c_str());
Log(LOG_COMMAND, "denied", bi) << "Access denied for unregistered user " << u->GetMask() << " with command " << command;
PopLanguage();
return;
@@ -102,14 +102,14 @@ void mod_run_cmd(BotInfo *bi, User *u, ChannelInfo *ci, Command *c, const Anope:
{
if (ci->HasFlag(CI_FORBIDDEN) && !c->HasFlag(CFLAG_ALLOW_FORBIDDEN))
{
- u->SendMessage(bi, _(LanguageString::CHAN_X_FORBIDDEN), ci->name.c_str());
+ u->SendMessage(bi, _(_(CHAN_X_FORBIDDEN)), ci->name.c_str());
Log(LOG_COMMAND, "denied", bi) << "Access denied for user " << u->GetMask() << " with command " << command << " because of FORBIDDEN channel " << ci->name;
PopLanguage();
return;
}
else if (ci->HasFlag(CI_SUSPENDED) && !c->HasFlag(CFLAG_ALLOW_SUSPENDED))
{
- u->SendMessage(bi, _(LanguageString::CHAN_X_FORBIDDEN), ci->name.c_str());
+ u->SendMessage(bi, _(_(CHAN_X_FORBIDDEN)), ci->name.c_str());
Log(LOG_COMMAND, "denied", bi) << "Access denied for user " << u->GetMask() << " with command " << command << " because of SUSPENDED channel " << ci->name;
PopLanguage();
return;
@@ -117,7 +117,7 @@ void mod_run_cmd(BotInfo *bi, User *u, ChannelInfo *ci, Command *c, const Anope:
}
else if (!c->HasFlag(CFLAG_ALLOW_UNREGISTEREDCHANNEL))
{
- u->SendMessage(bi, _(LanguageString::CHAN_X_NOT_REGISTERED), params[0].c_str());
+ u->SendMessage(bi, _(_(CHAN_X_NOT_REGISTERED)), params[0].c_str());
PopLanguage();
return;
}
@@ -125,7 +125,7 @@ void mod_run_cmd(BotInfo *bi, User *u, ChannelInfo *ci, Command *c, const Anope:
/* A user not giving a channel name for a param that should be a channel */
else
{
- u->SendMessage(bi, LanguageString::CHAN_X_INVALID, params[0].c_str());
+ u->SendMessage(bi, _(CHAN_X_INVALID), params[0].c_str());
PopLanguage();
return;
}
@@ -158,7 +158,7 @@ void mod_run_cmd(BotInfo *bi, User *u, ChannelInfo *ci, Command *c, const Anope:
// If the command requires a permission, and they aren't registered or don't have the required perm, DENIED
if (!c->permission.empty() && !u->Account()->HasCommand(c->permission))
{
- u->SendMessage(bi, LanguageString::ACCESS_DENIED);
+ u->SendMessage(bi, _(ACCESS_DENIED));
Log(LOG_COMMAND, "denied", bi) << "Access denied for user " << u->GetMask() << " with command " << command;
source.DoReply();
PopLanguage();
@@ -205,7 +205,7 @@ void mod_help_cmd(BotInfo *bi, User *u, ChannelInfo *ci, const Anope::string &cm
source.Reply( _("No help available for \002%s\002."), cmd.c_str());
else
{
- u->SendMessage(bi, " ");
+ source.Reply(" ");
/* Inform the user what permission is required to use the command */
if (!c->permission.empty())
@@ -221,4 +221,6 @@ void mod_help_cmd(BotInfo *bi, User *u, ChannelInfo *ci, const Anope::string &cm
else
source.Reply(_("You can use this command."));
}
+
+ source.DoReply();
}
diff --git a/src/language.cpp b/src/language.cpp
index 5d2ced124..6ae4eb10d 100644
--- a/src/language.cpp
+++ b/src/language.cpp
@@ -115,6 +115,6 @@ const char *anope_gettext(const char *string)
void SyntaxError(CommandSource &source, const Anope::string &command, const Anope::string &message)
{
source.Reply(_("Syntax: \002%s\002"), message.c_str());
- source.Reply(_(LanguageString::MORE_INFO), source.owner->nick.c_str(), command.c_str());
+ source.Reply(_(_(MORE_INFO)), source.owner->nick.c_str(), command.c_str());
}
diff --git a/src/memoserv.cpp b/src/memoserv.cpp
index 14cc344ba..128694557 100644
--- a/src/memoserv.cpp
+++ b/src/memoserv.cpp
@@ -170,11 +170,11 @@ void memo_send(CommandSource &source, const Anope::string &name, const Anope::st
int is_servoper = u && u->Account() && u->Account()->IsServicesOper();
if (readonly)
- u->SendMessage(MemoServ, LanguageString::MEMO_SEND_DISABLED);
+ u->SendMessage(MemoServ, _(MEMO_SEND_DISABLED));
else if (text.empty())
{
if (!z)
- SyntaxError(source, "SEND", LanguageString::MEMO_SEND_SYNTAX);
+ SyntaxError(source, "SEND", _(MEMO_SEND_SYNTAX));
if (z == 3)
SyntaxError(source, "RSEND", _("{\037nick\037 | \037channel\037} \037memo-text\037")); // XXX?
@@ -182,16 +182,16 @@ void memo_send(CommandSource &source, const Anope::string &name, const Anope::st
else if (!u->IsIdentified() && !u->IsRecognized())
{
if (!z || z == 3)
- source.Reply(LanguageString::NICK_IDENTIFY_REQUIRED, Config->s_NickServ.c_str());
+ source.Reply(_(NICK_IDENTIFY_REQUIRED), Config->s_NickServ.c_str());
}
else if (!(mi = getmemoinfo(name, ischan, isforbid)))
{
if (!z || z == 3)
{
if (isforbid)
- source.Reply(ischan ? LanguageString::CHAN_X_FORBIDDEN : LanguageString::NICK_X_FORBIDDEN, name.c_str());
+ source.Reply(ischan ? _(CHAN_X_FORBIDDEN) : _(NICK_X_FORBIDDEN), name.c_str());
else
- source.Reply(ischan ? LanguageString::CHAN_X_NOT_REGISTERED : LanguageString::NICK_X_NOT_REGISTERED, name.c_str());
+ source.Reply(ischan ? _(CHAN_X_NOT_REGISTERED) : _(NICK_X_NOT_REGISTERED), name.c_str());
}
}
else if (z != 2 && Config->MSSendDelay > 0 && u && u->lastmemosend + Config->MSSendDelay > Anope::CurTime)
@@ -248,13 +248,13 @@ void memo_send(CommandSource &source, const Anope::string &name, const Anope::st
NickAlias *na = *it;
User *user = finduser(na->nick);
if (user && user->IsIdentified())
- user->SendMessage(MemoServ, LanguageString::MEMO_NEW_MEMO_ARRIVED, sender.c_str(), Config->s_MemoServ.c_str(), mi->memos.size());
+ user->SendMessage(MemoServ, _(MEMO_NEW_MEMO_ARRIVED), sender.c_str(), Config->s_MemoServ.c_str(), mi->memos.size());
}
}
else
{
if ((u = finduser(name)) && u->IsIdentified() && nc->HasFlag(NI_MEMO_RECEIVE))
- u->SendMessage(MemoServ, LanguageString::MEMO_NEW_MEMO_ARRIVED, sender.c_str(), Config->s_MemoServ.c_str(), mi->memos.size());
+ u->SendMessage(MemoServ, _(MEMO_NEW_MEMO_ARRIVED), sender.c_str(), Config->s_MemoServ.c_str(), mi->memos.size());
} /* if (flags & MEMO_RECEIVE) */
}
/* if (MSNotifyAll) */
@@ -277,7 +277,7 @@ void memo_send(CommandSource &source, const Anope::string &name, const Anope::st
if (check_access(cu->user, c->ci, CA_MEMO))
{
if (cu->user->Account() && cu->user->Account()->HasFlag(NI_MEMO_RECEIVE))
- cu->user->SendMessage(MemoServ, LanguageString::MEMO_NEW_X_MEMO_ARRIVED, c->ci->name.c_str(), Config->s_MemoServ.c_str(), c->ci->name.c_str(), mi->memos.size());
+ cu->user->SendMessage(MemoServ, _(MEMO_NEW_X_MEMO_ARRIVED), c->ci->name.c_str(), Config->s_MemoServ.c_str(), c->ci->name.c_str(), mi->memos.size());
}
}
} /* MSNotifyAll */
diff --git a/src/misc.cpp b/src/misc.cpp
index fe216fff8..9efacf314 100644
--- a/src/misc.cpp
+++ b/src/misc.cpp
@@ -301,7 +301,7 @@ Anope::string do_strftime(const time_t &t)
Anope::string expire_left(NickCore *nc, time_t expires)
{
if (!expires)
- return GetString(nc, LanguageString::NO_EXPIRE);
+ return GetString(nc, _(NO_EXPIRE));
else if (expires <= Anope::CurTime)
return GetString(nc, _("expires at next database update"));
else
diff --git a/src/nickserv.cpp b/src/nickserv.cpp
index 920eaa6b2..4a45e6ce2 100644
--- a/src/nickserv.cpp
+++ b/src/nickserv.cpp
@@ -172,7 +172,7 @@ int validate_user(User *u)
NickRequest *nr = findrequestnick(u->nick);
if (nr)
{
- u->SendMessage(NickServ, LanguageString::NICK_IS_PREREG);
+ u->SendMessage(NickServ, _(NICK_IS_PREREG));
return 0;
}
@@ -189,7 +189,7 @@ int validate_user(User *u)
if (na->nc->HasFlag(NI_SUSPENDED))
{
- u->SendMessage(NickServ, LanguageString::NICK_X_SUSPENDED, u->nick.c_str());
+ u->SendMessage(NickServ, _(NICK_X_SUSPENDED), u->nick.c_str());
u->Collide(na);
return 0;
}
@@ -209,16 +209,16 @@ int validate_user(User *u)
if (u->IsRecognized() || !na->nc->HasFlag(NI_KILL_IMMED))
{
if (na->nc->HasFlag(NI_SECURE))
- u->SendMessage(NickServ, LanguageString::NICK_IS_SECURE, Config->s_NickServ.c_str());
+ u->SendMessage(NickServ, _(NICK_IS_SECURE), Config->s_NickServ.c_str());
else
- u->SendMessage(NickServ, LanguageString::NICK_IS_REGISTERED, Config->s_NickServ.c_str());
+ u->SendMessage(NickServ, _(NICK_IS_REGISTERED), Config->s_NickServ.c_str());
}
if (na->nc->HasFlag(NI_KILLPROTECT) && !u->IsRecognized())
{
if (na->nc->HasFlag(NI_KILL_IMMED))
{
- u->SendMessage(NickServ, LanguageString::FORCENICKCHANGE_NOW);
+ u->SendMessage(NickServ, _(FORCENICKCHANGE_NOW));
u->Collide(na);
}
else if (na->nc->HasFlag(NI_KILL_QUICK))
diff --git a/src/operserv.cpp b/src/operserv.cpp
index 4e915117c..5329988c2 100644
--- a/src/operserv.cpp
+++ b/src/operserv.cpp
@@ -488,14 +488,14 @@ XLine *SGLineManager::Add(BotInfo *bi, User *u, const Anope::string &mask, time_
if (mask.find('@') == Anope::string::npos)
{
if (bi && u)
- u->SendMessage(bi, LanguageString::BAD_USERHOST_MASK);
+ u->SendMessage(bi, _(BAD_USERHOST_MASK));
return NULL;
}
if (mask.find_first_not_of("~@.*?") == Anope::string::npos)
{
if (bi && u)
- u->SendMessage(bi, LanguageString::USERHOST_MASK_TOO_WIDE, mask.c_str());
+ u->SendMessage(bi, _(USERHOST_MASK_TOO_WIDE), mask.c_str());
return NULL;
}
@@ -563,7 +563,7 @@ XLine *SNLineManager::Add(BotInfo *bi, User *u, const Anope::string &mask, time_
if (!mask.empty() && mask.find_first_not_of("*?") == Anope::string::npos)
{
if (bi && u)
- u->SendMessage(bi, LanguageString::USERHOST_MASK_TOO_WIDE, mask.c_str());
+ u->SendMessage(bi, _(USERHOST_MASK_TOO_WIDE), mask.c_str());
return NULL;
}
@@ -666,7 +666,7 @@ XLine *SQLineManager::Add(BotInfo *bi, User *u, const Anope::string &mask, time_
if (mask.find_first_not_of("*") == Anope::string::npos)
{
if (bi && u)
- u->SendMessage(OperServ, LanguageString::USERHOST_MASK_TOO_WIDE, mask.c_str());
+ u->SendMessage(OperServ, _(USERHOST_MASK_TOO_WIDE), mask.c_str());
return NULL;
}
@@ -798,7 +798,7 @@ XLine *SZLineManager::Add(BotInfo *bi, User *u, const Anope::string &mask, time_
if (mask.find_first_not_of("*?") == Anope::string::npos)
{
- u->SendMessage(OperServ, LanguageString::USERHOST_MASK_TOO_WIDE, mask.c_str());
+ u->SendMessage(OperServ, _(USERHOST_MASK_TOO_WIDE), mask.c_str());
return NULL;
}
diff --git a/src/protocol.cpp b/src/protocol.cpp
index 35c9d8c0b..264f0d02a 100644
--- a/src/protocol.cpp
+++ b/src/protocol.cpp
@@ -436,7 +436,7 @@ bool IRCdMessage::OnPrivmsg(const Anope::string &source, const std::vector<Anope
else if (bi == ChanServ)
{
if (!u->HasMode(UMODE_OPER) && Config->CSOpersOnly)
- u->SendMessage(ChanServ, LanguageString::ACCESS_DENIED);
+ u->SendMessage(ChanServ, _(ACCESS_DENIED));
else
mod_run_cmd(bi, u, NULL, message);
}
@@ -451,7 +451,7 @@ bool IRCdMessage::OnPrivmsg(const Anope::string &source, const std::vector<Anope
{
if (!u->HasMode(UMODE_OPER) && Config->OSOpersOnly)
{
- u->SendMessage(OperServ, LanguageString::ACCESS_DENIED);
+ u->SendMessage(OperServ, _(ACCESS_DENIED));
if (Config->WallBadOS)
ircdproto->SendGlobops(OperServ, "Denied access to %s from %s!%s@%s (non-oper)", Config->s_OperServ.c_str(), u->nick.c_str(), u->GetIdent().c_str(), u->host.c_str());
}
diff --git a/src/regchannel.cpp b/src/regchannel.cpp
index a04cb54df..f9e9aed96 100644
--- a/src/regchannel.cpp
+++ b/src/regchannel.cpp
@@ -793,7 +793,7 @@ bool ChannelInfo::CheckKick(User *user)
if (!do_kick && check_access(user, this, CA_NOJOIN))
{
get_idealban(this, user, mask);
- reason = GetString(user->Account(), LanguageString::CHAN_NOT_ALLOWED_TO_JOIN);
+ reason = GetString(user->Account(), _(CHAN_NOT_ALLOWED_TO_JOIN));
do_kick = true;
}