summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAdam <Adam@anope.org>2010-08-17 19:27:37 -0400
committerAdam <Adam@anope.org>2010-08-17 19:27:37 -0400
commite65d8b2f3dfdb40858259b3bb48ef6998c31e62f (patch)
treefd845bdef5664d025ab19c262ae2c5e9d23d7bb2
parent2575008baa5c9d0ca789680da1a3b81dc74786f7 (diff)
Rewrote the config reader to better handle invalid configs.
This prevents Anope from exploding when /os reload has errors.
-rw-r--r--docs/TODO2
-rw-r--r--include/config.h47
-rw-r--r--include/extern.h12
-rw-r--r--modules/core/bs_act.cpp16
-rw-r--r--modules/core/bs_assign.cpp18
-rw-r--r--modules/core/bs_badwords.cpp44
-rw-r--r--modules/core/bs_bot.cpp96
-rw-r--r--modules/core/bs_botlist.cpp18
-rw-r--r--modules/core/bs_help.cpp8
-rw-r--r--modules/core/bs_info.cpp88
-rw-r--r--modules/core/bs_kick.cpp110
-rw-r--r--modules/core/bs_say.cpp16
-rw-r--r--modules/core/bs_set.cpp74
-rw-r--r--modules/core/bs_unassign.cpp16
-rw-r--r--modules/core/cs_access.cpp142
-rw-r--r--modules/core/cs_akick.cpp82
-rw-r--r--modules/core/cs_ban.cpp18
-rw-r--r--modules/core/cs_clear.cpp24
-rw-r--r--modules/core/cs_drop.cpp22
-rw-r--r--modules/core/cs_forbid.cpp24
-rw-r--r--modules/core/cs_getkey.cpp12
-rw-r--r--modules/core/cs_help.cpp14
-rw-r--r--modules/core/cs_info.cpp42
-rw-r--r--modules/core/cs_invite.cpp14
-rw-r--r--modules/core/cs_kick.cpp18
-rw-r--r--modules/core/cs_list.cpp34
-rw-r--r--modules/core/cs_modes.cpp72
-rw-r--r--modules/core/cs_register.cpp30
-rw-r--r--modules/core/cs_saset.cpp14
-rw-r--r--modules/core/cs_saset_noexpire.cpp10
-rw-r--r--modules/core/cs_set.cpp16
-rw-r--r--modules/core/cs_set_bantype.cpp14
-rw-r--r--modules/core/cs_set_description.cpp12
-rw-r--r--modules/core/cs_set_entrymsg.cpp14
-rw-r--r--modules/core/cs_set_founder.cpp24
-rw-r--r--modules/core/cs_set_keeptopic.cpp14
-rw-r--r--modules/core/cs_set_mlock.cpp20
-rw-r--r--modules/core/cs_set_opnotice.cpp14
-rw-r--r--modules/core/cs_set_peace.cpp14
-rw-r--r--modules/core/cs_set_persist.cpp18
-rw-r--r--modules/core/cs_set_private.cpp14
-rw-r--r--modules/core/cs_set_restricted.cpp14
-rw-r--r--modules/core/cs_set_secure.cpp14
-rw-r--r--modules/core/cs_set_securefounder.cpp16
-rw-r--r--modules/core/cs_set_secureops.cpp14
-rw-r--r--modules/core/cs_set_signkick.cpp16
-rw-r--r--modules/core/cs_set_successor.cpp24
-rw-r--r--modules/core/cs_set_topiclock.cpp14
-rw-r--r--modules/core/cs_set_xop.cpp20
-rw-r--r--modules/core/cs_status.cpp12
-rw-r--r--modules/core/cs_suspend.cpp46
-rw-r--r--modules/core/cs_topic.cpp14
-rw-r--r--modules/core/cs_unban.cpp16
-rw-r--r--modules/core/cs_xop.cpp96
-rw-r--r--modules/core/db_plain.cpp6
-rw-r--r--modules/core/enc_md5.cpp2
-rw-r--r--modules/core/enc_none.cpp2
-rw-r--r--modules/core/enc_old.cpp2
-rw-r--r--modules/core/enc_sha1.cpp2
-rw-r--r--modules/core/enc_sha256.cpp2
-rw-r--r--modules/core/hs_del.cpp12
-rw-r--r--modules/core/hs_delall.cpp12
-rw-r--r--modules/core/hs_group.cpp10
-rw-r--r--modules/core/hs_help.cpp4
-rw-r--r--modules/core/hs_list.cpp26
-rw-r--r--modules/core/hs_off.cpp8
-rw-r--r--modules/core/hs_on.cpp10
-rw-r--r--modules/core/hs_set.cpp30
-rw-r--r--modules/core/hs_setall.cpp30
-rw-r--r--modules/core/ms_cancel.cpp16
-rw-r--r--modules/core/ms_check.cpp18
-rw-r--r--modules/core/ms_del.cpp22
-rw-r--r--modules/core/ms_help.cpp6
-rw-r--r--modules/core/ms_info.cpp80
-rw-r--r--modules/core/ms_list.cpp32
-rw-r--r--modules/core/ms_read.cpp24
-rw-r--r--modules/core/ms_rsend.cpp20
-rw-r--r--modules/core/ms_send.cpp6
-rw-r--r--modules/core/ms_sendall.cpp10
-rw-r--r--modules/core/ms_set.cpp72
-rw-r--r--modules/core/ms_staff.cpp8
-rw-r--r--modules/core/ns_access.cpp40
-rw-r--r--modules/core/ns_alist.cpp20
-rw-r--r--modules/core/ns_drop.cpp36
-rw-r--r--modules/core/ns_forbid.cpp28
-rw-r--r--modules/core/ns_getemail.cpp12
-rw-r--r--modules/core/ns_getpass.cpp28
-rw-r--r--modules/core/ns_ghost.cpp30
-rw-r--r--modules/core/ns_group.cpp92
-rw-r--r--modules/core/ns_help.cpp16
-rw-r--r--modules/core/ns_identify.cpp36
-rw-r--r--modules/core/ns_info.cpp56
-rw-r--r--modules/core/ns_list.cpp34
-rw-r--r--modules/core/ns_logout.cpp18
-rw-r--r--modules/core/ns_recover.cpp42
-rw-r--r--modules/core/ns_register.cpp124
-rw-r--r--modules/core/ns_release.cpp30
-rw-r--r--modules/core/ns_resetpass.cpp38
-rw-r--r--modules/core/ns_saset.cpp58
-rw-r--r--modules/core/ns_saset_noexpire.cpp10
-rw-r--r--modules/core/ns_sendpass.cpp26
-rw-r--r--modules/core/ns_set.cpp48
-rw-r--r--modules/core/ns_set_autoop.cpp16
-rw-r--r--modules/core/ns_set_email.cpp24
-rw-r--r--modules/core/ns_set_greet.cpp12
-rw-r--r--modules/core/ns_set_hide.cpp16
-rw-r--r--modules/core/ns_set_kill.cpp24
-rw-r--r--modules/core/ns_set_language.cpp16
-rw-r--r--modules/core/ns_set_message.cpp20
-rw-r--r--modules/core/ns_set_private.cpp16
-rw-r--r--modules/core/ns_set_secure.cpp16
-rw-r--r--modules/core/ns_status.cpp14
-rw-r--r--modules/core/ns_suspend.cpp44
-rw-r--r--modules/core/ns_update.cpp6
-rw-r--r--modules/core/os_akill.cpp58
-rw-r--r--modules/core/os_chankill.cpp16
-rw-r--r--modules/core/os_chanlist.cpp14
-rw-r--r--modules/core/os_clearmodes.cpp16
-rw-r--r--modules/core/os_defcon.cpp132
-rw-r--r--modules/core/os_global.cpp8
-rw-r--r--modules/core/os_help.cpp6
-rw-r--r--modules/core/os_ignore.cpp24
-rw-r--r--modules/core/os_jupe.cpp12
-rw-r--r--modules/core/os_kick.cpp14
-rw-r--r--modules/core/os_mode.cpp12
-rw-r--r--modules/core/os_modinfo.cpp12
-rw-r--r--modules/core/os_modlist.cpp26
-rw-r--r--modules/core/os_modload.cpp10
-rw-r--r--modules/core/os_modunload.cpp10
-rw-r--r--modules/core/os_news.cpp46
-rw-r--r--modules/core/os_noop.cpp14
-rw-r--r--modules/core/os_oline.cpp18
-rw-r--r--modules/core/os_quit.cpp8
-rw-r--r--modules/core/os_reload.cpp19
-rw-r--r--modules/core/os_restart.cpp8
-rw-r--r--modules/core/os_session.cpp82
-rw-r--r--modules/core/os_set.cpp92
-rw-r--r--modules/core/os_shutdown.cpp8
-rw-r--r--modules/core/os_snline.cpp58
-rw-r--r--modules/core/os_sqline.cpp56
-rw-r--r--modules/core/os_staff.cpp16
-rw-r--r--modules/core/os_stats.cpp144
-rw-r--r--modules/core/os_svsnick.cpp24
-rw-r--r--modules/core/os_szline.cpp54
-rw-r--r--modules/core/os_umode.cpp14
-rw-r--r--modules/core/os_update.cpp6
-rw-r--r--modules/core/os_userlist.cpp14
-rw-r--r--modules/core/ss_main.cpp2
-rw-r--r--modules/extra/cs_appendtopic.cpp18
-rw-r--r--modules/extra/cs_enforce.cpp30
-rw-r--r--modules/extra/cs_set_misc.cpp12
-rw-r--r--modules/extra/cs_tban.cpp20
-rw-r--r--modules/extra/db_mysql.cpp14
-rw-r--r--modules/extra/hs_request.cpp86
-rw-r--r--modules/extra/m_ssl.cpp2
-rw-r--r--modules/extra/ns_maxemail.cpp6
-rw-r--r--modules/extra/ns_set_misc.cpp12
-rw-r--r--modules/protocol/bahamut.cpp26
-rw-r--r--modules/protocol/inspircd11.cpp40
-rw-r--r--modules/protocol/inspircd12.cpp10
-rw-r--r--modules/protocol/inspircd20.cpp10
-rw-r--r--modules/protocol/ratbox.cpp14
-rw-r--r--modules/protocol/unreal32.cpp40
-rw-r--r--modules/socketengines/m_socketengine_epoll.cpp2
-rw-r--r--modules/socketengines/m_socketengine_select.cpp2
-rw-r--r--src/actions.cpp8
-rw-r--r--src/bots.cpp20
-rw-r--r--src/botserv.cpp32
-rw-r--r--src/channels.cpp18
-rw-r--r--src/chanserv.cpp28
-rw-r--r--src/commands.cpp4
-rw-r--r--src/config.cpp1183
-rw-r--r--src/configreader.cpp40
-rw-r--r--src/hostserv.cpp8
-rw-r--r--src/init.cpp59
-rw-r--r--src/language.cpp14
-rw-r--r--src/log.cpp8
-rw-r--r--src/mail.cpp16
-rw-r--r--src/main.cpp38
-rw-r--r--src/memoserv.cpp50
-rw-r--r--src/messages.cpp92
-rw-r--r--src/misc.cpp26
-rw-r--r--src/modes.cpp12
-rw-r--r--src/modulemanager.cpp8
-rw-r--r--src/modules.cpp12
-rw-r--r--src/nickalias.cpp8
-rw-r--r--src/nickcore.cpp4
-rw-r--r--src/nickserv.cpp24
-rw-r--r--src/operserv.cpp42
-rw-r--r--src/protocol.cpp12
-rw-r--r--src/regchannel.cpp10
-rw-r--r--src/send.cpp2
-rw-r--r--src/servers.cpp8
-rw-r--r--src/sessions.cpp26
-rw-r--r--src/users.cpp24
195 files changed, 3131 insertions, 3247 deletions
diff --git a/docs/TODO b/docs/TODO
index 080008461..85bba12e7 100644
--- a/docs/TODO
+++ b/docs/TODO
@@ -20,7 +20,7 @@ Legend:
[ ] Modules should also have a way to add strings programatically
[ ] Should be able to add many strings by dropping a file in a set location.
[+] Method to store listmodes (more generically than AKICK, too) for e.g. +beI and extbans, etc.
-[ ] Config bailing on /os reload needs to be non fatal
+[x] Config bailing on /os reload needs to be non fatal
[ ] AutoID needs to be able to live through /os restart, current system is just annoying.
[ ] SQL tables need to changed to have references etc
[ ] MS IGNORE. Make it take nick (accounts) or n!u@h masks. Fake success of memo send still, but send to opers?
diff --git a/include/config.h b/include/config.h
index 54e3d095f..8313f94d6 100644
--- a/include/config.h
+++ b/include/config.h
@@ -343,10 +343,10 @@ typedef std::deque<ValueItem> ValueList;
typedef bool (*Validator)(ServerConfig *, const Anope::string &, const Anope::string &, ValueItem &);
/** A callback for validating multiple value entries
*/
-typedef bool (*MultiValidator)(ServerConfig *, const Anope::string &, const Anope::string *, ValueList &, int *, bool);
+typedef bool (*MultiValidator)(ServerConfig *, const Anope::string &, const Anope::string *, ValueList &, int *);
/** A callback indicating the end of a group of entries
*/
-typedef bool (*MultiNotify)(ServerConfig *, const Anope::string &, bool);
+typedef bool (*MultiNotify)(ServerConfig *, const Anope::string &);
/** Holds a core configuration item and its callbacks
*/
@@ -395,18 +395,12 @@ struct MultiConfig
class ServerConfig
{
private:
- /** This variable holds the names of all
- * files included from the main one. This
- * is used to make sure that no files are
- * recursively included.
- */
- std::vector<std::string> include_stack;
/** Check that there is only one of each configuration item
*/
bool CheckOnce(const Anope::string &);
public:
+ /* Error from the config */
std::ostringstream errstr;
- ConfigDataHash newconfig;
/** This holds all the information in the config file,
* it's indexed by tag name to a vector of key/values.
*/
@@ -414,25 +408,15 @@ class ServerConfig
/** Construct a new ServerConfig
*/
ServerConfig();
- /** Clears the include stack in preperation for a Read() call.
- */
- void ClearStack();
/** Read the entire configuration into memory
* and initialize this class. All other methods
* should be used only by the core.
*/
- int Read(bool);
- /** Report a configuration error given in errormessage.
- * @param bail If this is set to true, the error is sent to the console, and the program exits
- * @param connection If this is set to a non-null value, and bail is false, the errors are spooled to
- * this connection as SNOTICEs.
- * If the parameter is NULL, the messages are spooled to all connections via WriteOpers as SNOTICEs.
- */
- void ReportConfigError(const Anope::string &, bool);
+ void Read();
/** Load 'filename' into 'target', with the new config parser everything is parsed into
* tag/key/value at load-time rather than at read-value time.
*/
- bool LoadConf(ConfigDataHash &, const Anope::string &, std::ostringstream &);
+ bool LoadConf(ConfigDataHash &, const Anope::string &);
// Both these return true if the value existed or false otherwise
/** Writes 'length' chars into 'result' as a string
*/
@@ -454,7 +438,7 @@ class ServerConfig
bool ConfValueBool(ConfigDataHash &, const Anope::string &, const Anope::string &, const Anope::string &, int);
/** Returns the number of occurences of tag in the config file
*/
- int ConfValueEnum(ConfigDataHash &, const Anope::string &);
+ int ConfValueEnum(const ConfigDataHash &, const Anope::string &);
/** Returns the numbers of vars inside the index'th 'tag in the config file
*/
int ConfVarEnum(ConfigDataHash &, const Anope::string &, int);
@@ -880,18 +864,6 @@ class ConfigException : public CoreException
class CoreExport ConfigReader
{
protected:
- /** The contents of the configuration file
- * This protected member should never be accessed by a module (and cannot be accessed unless the
- * core is changed). It will contain a pointer to the configuration file data with unneeded data
- * (such as comments) stripped from it.
- */
- ConfigDataHash *data;
- /** Used to store errors
- */
- std::ostringstream *errorlog;
- /** If we're using our own config data hash or not
- */
- bool privatehash;
/** True if an error occured reading the config file
*/
bool readerror;
@@ -971,13 +943,6 @@ class CoreExport ConfigReader
* file does not exist or could not be opened.
*/
bool Verify();
- /** Dumps the list of errors in a config file to an output location. If bail is true,
- * then the program will abort. If bail is false and user points to a valid user
- * record, the error report will be spooled to the given user by means of NOTICE.
- * if bool is false AND user is false, the error report will be spooled to all opers
- * by means of a NOTICE to all opers.
- */
- void DumpErrors(bool);
/** Returns the number of items within a tag.
* For example if the tag was &lt;test tag="blah" data="foo"&gt; then this
* function would return 2. Spaces and newlines both qualify as valid seperators
diff --git a/include/extern.h b/include/extern.h
index f7c488030..b2dd30b79 100644
--- a/include/extern.h
+++ b/include/extern.h
@@ -94,7 +94,12 @@ E Entry *elist_match_user(EList *list, User *u);
E Entry *elist_find_mask(EList *list, const Anope::string &mask);
E long get_memuse(EList *list);
-#define whosends(ci) (!(ci) || !((ci)->botflags.HasFlag(BS_SYMBIOSIS)) || !(ci)->bi || !(ci)->c || (ci)->c->FindUser((ci)->bi) ? findbot(Config.s_ChanServ) : (ci)->bi)
+inline BotInfo *whosends(ChannelInfo *ci)
+{
+ if (!ci || !ci->bi || !ci->c || !ci->botflags.HasFlag(BS_SYMBIOSIS) || !ci->c->FindUser(ci->bi))
+ return ChanServ;
+ return ci->bi;
+}
/**** chanserv.c ****/
@@ -130,8 +135,7 @@ E Anope::string get_mlock_modes(ChannelInfo *ci, int complete);
/**** config.c ****/
E Anope::string services_conf;
-E ServerConfig Config;
-E int read_config(int reload);
+E ServerConfig *Config;
/* hostserv.c */
E void do_on_id(User *u);
@@ -297,7 +301,7 @@ E Flags<ChannelModeName> DefMLockOff;
E std::map<ChannelModeName, Anope::string> DefMLockParams;
/* Modes to set on bots when they join the channel */
E std::list<ChannelModeStatus *> BotModes;
-E void SetDefaultMLock();
+E void SetDefaultMLock(ServerConfig *config);
/**** nickserv.c ****/
diff --git a/modules/core/bs_act.cpp b/modules/core/bs_act.cpp
index d553aa950..34251cbb2 100644
--- a/modules/core/bs_act.cpp
+++ b/modules/core/bs_act.cpp
@@ -27,19 +27,19 @@ class CommandBSAct : public Command
if (!check_access(u, ci, CA_SAY))
{
- notice_lang(Config.s_BotServ, u, ACCESS_DENIED);
+ notice_lang(Config->s_BotServ, u, ACCESS_DENIED);
return MOD_CONT;
}
if (!ci->bi)
{
- notice_help(Config.s_BotServ, u, BOT_NOT_ASSIGNED);
+ notice_help(Config->s_BotServ, u, BOT_NOT_ASSIGNED);
return MOD_CONT;
}
if (!ci->c || !ci->c->FindUser(ci->bi))
{
- notice_lang(Config.s_BotServ, u, BOT_NOT_ON_CHANNEL, ci->name.c_str());
+ notice_lang(Config->s_BotServ, u, BOT_NOT_ON_CHANNEL, ci->name.c_str());
return MOD_CONT;
}
@@ -49,25 +49,25 @@ class CommandBSAct : public Command
ircdproto->SendAction(ci->bi, ci->name, "%s", message.c_str());
ci->bi->lastmsg = time(NULL);
- if (Config.LogBot && !Config.LogChannel.empty() && LogChan && !debug && findchan(Config.LogChannel))
- ircdproto->SendPrivmsg(ci->bi, Config.LogChannel, "ACT %s %s %s", u->nick.c_str(), ci->name.c_str(), message.c_str());
+ if (Config->LogBot && !Config->LogChannel.empty() && LogChan && !debug && findchan(Config->LogChannel))
+ ircdproto->SendPrivmsg(ci->bi, Config->LogChannel, "ACT %s %s %s", u->nick.c_str(), ci->name.c_str(), message.c_str());
return MOD_CONT;
}
void OnSyntaxError(User *u, const Anope::string &subcommand)
{
- syntax_error(Config.s_BotServ, u, "ACT", BOT_ACT_SYNTAX);
+ syntax_error(Config->s_BotServ, u, "ACT", BOT_ACT_SYNTAX);
}
bool OnHelp(User *u, const Anope::string &subcommand)
{
- notice_help(Config.s_BotServ, u, BOT_HELP_ACT);
+ notice_help(Config->s_BotServ, u, BOT_HELP_ACT);
return true;
}
void OnServHelp(User *u)
{
- notice_lang(Config.s_BotServ, u, BOT_HELP_CMD_ACT);
+ notice_lang(Config->s_BotServ, u, BOT_HELP_CMD_ACT);
}
};
diff --git a/modules/core/bs_assign.cpp b/modules/core/bs_assign.cpp
index ab24b1f39..b1242c857 100644
--- a/modules/core/bs_assign.cpp
+++ b/modules/core/bs_assign.cpp
@@ -29,13 +29,13 @@ class CommandBSAssign : public Command
if (readonly)
{
- notice_lang(Config.s_BotServ, u, BOT_ASSIGN_READONLY);
+ notice_lang(Config->s_BotServ, u, BOT_ASSIGN_READONLY);
return MOD_CONT;
}
if (!(bi = findbot(nick)))
{
- notice_lang(Config.s_BotServ, u, BOT_DOES_NOT_EXIST, nick.c_str());
+ notice_lang(Config->s_BotServ, u, BOT_DOES_NOT_EXIST, nick.c_str());
return MOD_CONT;
}
@@ -43,41 +43,41 @@ class CommandBSAssign : public Command
if (ci->botflags.HasFlag(BS_NOBOT) || (!check_access(u, ci, CA_ASSIGN) && !u->Account()->HasPriv("botserv/administration")))
{
- notice_lang(Config.s_BotServ, u, ACCESS_DENIED);
+ notice_lang(Config->s_BotServ, u, ACCESS_DENIED);
return MOD_CONT;
}
if (bi->HasFlag(BI_PRIVATE) && !u->Account()->HasCommand("botserv/assign/private"))
{
- notice_lang(Config.s_BotServ, u, ACCESS_DENIED);
+ notice_lang(Config->s_BotServ, u, ACCESS_DENIED);
return MOD_CONT;
}
if (ci->bi && nick.equals_ci(ci->bi->nick))
{
- notice_lang(Config.s_BotServ, u, BOT_ASSIGN_ALREADY, ci->bi->nick.c_str(), chan.c_str());
+ notice_lang(Config->s_BotServ, u, BOT_ASSIGN_ALREADY, ci->bi->nick.c_str(), chan.c_str());
return MOD_CONT;
}
bi->Assign(u, ci);
- notice_lang(Config.s_BotServ, u, BOT_ASSIGN_ASSIGNED, bi->nick.c_str(), ci->name.c_str());
+ notice_lang(Config->s_BotServ, u, BOT_ASSIGN_ASSIGNED, bi->nick.c_str(), ci->name.c_str());
return MOD_CONT;
}
bool OnHelp(User *u, const Anope::string &subcommand)
{
- notice_help(Config.s_BotServ, u, BOT_HELP_ASSIGN);
+ notice_help(Config->s_BotServ, u, BOT_HELP_ASSIGN);
return true;
}
void OnSyntaxError(User *u, const Anope::string &subcommand)
{
- syntax_error(Config.s_BotServ, u, "ASSIGN", BOT_ASSIGN_SYNTAX);
+ syntax_error(Config->s_BotServ, u, "ASSIGN", BOT_ASSIGN_SYNTAX);
}
void OnServHelp(User *u)
{
- notice_lang(Config.s_BotServ, u, BOT_HELP_CMD_ASSIGN);
+ notice_lang(Config->s_BotServ, u, BOT_HELP_CMD_ASSIGN);
}
};
diff --git a/modules/core/bs_badwords.cpp b/modules/core/bs_badwords.cpp
index 92567252e..46b38bf1d 100644
--- a/modules/core/bs_badwords.cpp
+++ b/modules/core/bs_badwords.cpp
@@ -26,7 +26,7 @@ class BadwordsListCallback : public NumberList
~BadwordsListCallback()
{
if (!SentHeader)
- notice_lang(Config.s_BotServ, u, BOT_BADWORDS_NO_MATCH, ci->name.c_str());
+ notice_lang(Config->s_BotServ, u, BOT_BADWORDS_NO_MATCH, ci->name.c_str());
}
void HandleNumber(unsigned Number)
@@ -37,7 +37,7 @@ class BadwordsListCallback : public NumberList
if (!SentHeader)
{
SentHeader = true;
- notice_lang(Config.s_BotServ, u, BOT_BADWORDS_LIST_HEADER, ci->name.c_str());
+ notice_lang(Config->s_BotServ, u, BOT_BADWORDS_LIST_HEADER, ci->name.c_str());
}
DoList(u, ci, Number - 1, ci->GetBadWord(Number - 1));
@@ -45,7 +45,7 @@ class BadwordsListCallback : public NumberList
static void DoList(User *u, ChannelInfo *ci, unsigned Number, BadWord *bw)
{
- notice_lang(Config.s_BotServ, u, BOT_BADWORDS_LIST_FORMAT, Number + 1, bw->word.c_str(), bw->type == BW_SINGLE ? "(SINGLE)" : (bw->type == BW_START ? "(START)" : (bw->type == BW_END ? "(END)" : "")));
+ notice_lang(Config->s_BotServ, u, BOT_BADWORDS_LIST_FORMAT, Number + 1, bw->word.c_str(), bw->type == BW_SINGLE ? "(SINGLE)" : (bw->type == BW_START ? "(START)" : (bw->type == BW_END ? "(END)" : "")));
}
};
@@ -62,11 +62,11 @@ class BadwordsDelCallback : public NumberList
~BadwordsDelCallback()
{
if (!Deleted)
- notice_lang(Config.s_BotServ, u, BOT_BADWORDS_NO_MATCH, ci->name.c_str());
+ notice_lang(Config->s_BotServ, u, BOT_BADWORDS_NO_MATCH, ci->name.c_str());
else if (Deleted == 1)
- notice_lang(Config.s_BotServ, u, BOT_BADWORDS_DELETED_ONE, ci->name.c_str());
+ notice_lang(Config->s_BotServ, u, BOT_BADWORDS_DELETED_ONE, ci->name.c_str());
else
- notice_lang(Config.s_BotServ, u, BOT_BADWORDS_DELETED_SEVERAL, Deleted, ci->name.c_str());
+ notice_lang(Config->s_BotServ, u, BOT_BADWORDS_DELETED_SEVERAL, Deleted, ci->name.c_str());
}
void HandleNumber(unsigned Number)
@@ -85,7 +85,7 @@ class CommandBSBadwords : public Command
CommandReturn DoList(User *u, ChannelInfo *ci, const Anope::string &word)
{
if (!ci->GetBadWordCount())
- notice_lang(Config.s_BotServ, u, BOT_BADWORDS_LIST_EMPTY, ci->name.c_str());
+ notice_lang(Config->s_BotServ, u, BOT_BADWORDS_LIST_EMPTY, ci->name.c_str());
else if (!word.empty() && word.find_first_not_of("1234567890,-") == Anope::string::npos)
{
BadwordsListCallback list(u, ci, word);
@@ -105,14 +105,14 @@ class CommandBSBadwords : public Command
if (!SentHeader)
{
SentHeader = true;
- notice_lang(Config.s_BotServ, u, BOT_BADWORDS_LIST_HEADER, ci->name.c_str());
+ notice_lang(Config->s_BotServ, u, BOT_BADWORDS_LIST_HEADER, ci->name.c_str());
}
BadwordsListCallback::DoList(u, ci, i, bw);
}
if (!SentHeader)
- notice_lang(Config.s_BotServ, u, BOT_BADWORDS_NO_MATCH, ci->name.c_str());
+ notice_lang(Config->s_BotServ, u, BOT_BADWORDS_NO_MATCH, ci->name.c_str());
}
return MOD_CONT;
@@ -139,9 +139,9 @@ class CommandBSBadwords : public Command
realword = word.substr(0, pos);
}
- if (ci->GetBadWordCount() >= Config.BSBadWordsMax)
+ if (ci->GetBadWordCount() >= Config->BSBadWordsMax)
{
- notice_lang(Config.s_BotServ, u, BOT_BADWORDS_REACHED_LIMIT, Config.BSBadWordsMax);
+ notice_lang(Config->s_BotServ, u, BOT_BADWORDS_REACHED_LIMIT, Config->BSBadWordsMax);
return MOD_CONT;
}
@@ -149,16 +149,16 @@ class CommandBSBadwords : public Command
{
BadWord *bw = ci->GetBadWord(i);
- if (!bw->word.empty() && ((Config.BSCaseSensitive && realword.equals_cs(bw->word)) || (!Config.BSCaseSensitive && realword.equals_ci(bw->word))))
+ if (!bw->word.empty() && ((Config->BSCaseSensitive && realword.equals_cs(bw->word)) || (!Config->BSCaseSensitive && realword.equals_ci(bw->word))))
{
- notice_lang(Config.s_BotServ, u, BOT_BADWORDS_ALREADY_EXISTS, bw->word.c_str(), ci->name.c_str());
+ notice_lang(Config->s_BotServ, u, BOT_BADWORDS_ALREADY_EXISTS, bw->word.c_str(), ci->name.c_str());
return MOD_CONT;
}
}
ci->AddBadWord(realword, type);
- notice_lang(Config.s_BotServ, u, BOT_BADWORDS_ADDED, realword.c_str(), ci->name.c_str());
+ notice_lang(Config->s_BotServ, u, BOT_BADWORDS_ADDED, realword.c_str(), ci->name.c_str());
return MOD_CONT;
}
@@ -186,13 +186,13 @@ class CommandBSBadwords : public Command
if (i == end)
{
- notice_lang(Config.s_BotServ, u, BOT_BADWORDS_NOT_FOUND, word.c_str(), ci->name.c_str());
+ notice_lang(Config->s_BotServ, u, BOT_BADWORDS_NOT_FOUND, word.c_str(), ci->name.c_str());
return MOD_CONT;
}
ci->EraseBadWord(i);
- notice_lang(Config.s_BotServ, u, BOT_BADWORDS_DELETED, badword->word.c_str(), ci->name.c_str());
+ notice_lang(Config->s_BotServ, u, BOT_BADWORDS_DELETED, badword->word.c_str(), ci->name.c_str());
}
return MOD_CONT;
@@ -201,7 +201,7 @@ class CommandBSBadwords : public Command
CommandReturn DoClear(User *u, ChannelInfo *ci)
{
ci->ClearBadWords();
- notice_lang(Config.s_BotServ, u, BOT_BADWORDS_CLEAR);
+ notice_lang(Config->s_BotServ, u, BOT_BADWORDS_CLEAR);
return MOD_CONT;
}
public:
@@ -227,13 +227,13 @@ class CommandBSBadwords : public Command
if (!check_access(u, ci, CA_BADWORDS) && (!need_args || !u->Account()->HasPriv("botserv/administration")))
{
- notice_lang(Config.s_BotServ, u, ACCESS_DENIED);
+ notice_lang(Config->s_BotServ, u, ACCESS_DENIED);
return MOD_CONT;
}
if (readonly)
{
- notice_lang(Config.s_BotServ, u, BOT_BADWORDS_DISABLED);
+ notice_lang(Config->s_BotServ, u, BOT_BADWORDS_DISABLED);
return MOD_CONT;
}
@@ -253,18 +253,18 @@ class CommandBSBadwords : public Command
bool OnHelp(User *u, const Anope::string &subcommand)
{
- notice_help(Config.s_BotServ, u, BOT_HELP_BADWORDS);
+ notice_help(Config->s_BotServ, u, BOT_HELP_BADWORDS);
return true;
}
void OnSyntaxError(User *u, const Anope::string &subcommand)
{
- syntax_error(Config.s_BotServ, u, "BADWORDS", BOT_BADWORDS_SYNTAX);
+ syntax_error(Config->s_BotServ, u, "BADWORDS", BOT_BADWORDS_SYNTAX);
}
void OnServHelp(User *u)
{
- notice_lang(Config.s_BotServ, u, BOT_HELP_CMD_BADWORDS);
+ notice_lang(Config->s_BotServ, u, BOT_HELP_CMD_BADWORDS);
}
};
diff --git a/modules/core/bs_bot.cpp b/modules/core/bs_bot.cpp
index fdff5ba5c..f001c81a4 100644
--- a/modules/core/bs_bot.cpp
+++ b/modules/core/bs_bot.cpp
@@ -26,60 +26,60 @@ class CommandBSBot : public Command
if (findbot(nick))
{
- notice_lang(Config.s_BotServ, u, BOT_BOT_ALREADY_EXISTS, nick.c_str());
+ notice_lang(Config->s_BotServ, u, BOT_BOT_ALREADY_EXISTS, nick.c_str());
return MOD_CONT;
}
- if (nick.length() > Config.NickLen)
+ if (nick.length() > Config->NickLen)
{
- notice_lang(Config.s_BotServ, u, BOT_BAD_NICK);
+ notice_lang(Config->s_BotServ, u, BOT_BAD_NICK);
return MOD_CONT;
}
- if (user.length() > Config.UserLen)
+ if (user.length() > Config->UserLen)
{
- notice_lang(Config.s_BotServ, u, BOT_LONG_IDENT, Config.UserLen);
+ notice_lang(Config->s_BotServ, u, BOT_LONG_IDENT, Config->UserLen);
return MOD_CONT;
}
- if (host.length() > Config.HostLen)
+ if (host.length() > Config->HostLen)
{
- notice_lang(Config.s_BotServ, u, BOT_LONG_HOST, Config.HostLen);
+ notice_lang(Config->s_BotServ, u, BOT_LONG_HOST, Config->HostLen);
return MOD_CONT;
}
/* Check the nick is valid re RFC 2812 */
if (isdigit(nick[0]) || nick[0] == '-')
{
- notice_lang(Config.s_BotServ, u, BOT_BAD_NICK);
+ notice_lang(Config->s_BotServ, u, BOT_BAD_NICK);
return MOD_CONT;
}
- for (unsigned i = 0, end = nick.length(); i < end && i < Config.NickLen; ++i)
+ for (unsigned i = 0, end = nick.length(); i < end && i < Config->NickLen; ++i)
if (!isvalidnick(nick[i]))
{
- notice_lang(Config.s_BotServ, u, BOT_BAD_NICK);
+ notice_lang(Config->s_BotServ, u, BOT_BAD_NICK);
return MOD_CONT;
}
/* check for hardcored ircd forbidden nicks */
if (!ircdproto->IsNickValid(nick))
{
- notice_lang(Config.s_BotServ, u, BOT_BAD_NICK);
+ notice_lang(Config->s_BotServ, u, BOT_BAD_NICK);
return MOD_CONT;
}
/* Check the host is valid re RFC 2812 */
if (!isValidHost(host, 3))
{
- notice_lang(Config.s_BotServ, u, BOT_BAD_HOST);
+ notice_lang(Config->s_BotServ, u, BOT_BAD_HOST);
return MOD_CONT;
}
- for (unsigned i = 0, end = user.length(); i < end && i < Config.UserLen; ++i)
+ for (unsigned i = 0, end = user.length(); i < end && i < Config->UserLen; ++i)
if (!isalnum(user[i]))
{
- notice_lang(Config.s_BotServ, u, BOT_BAD_IDENT, Config.UserLen);
+ notice_lang(Config->s_BotServ, u, BOT_BAD_IDENT, Config->UserLen);
return MOD_CONT;
}
@@ -89,17 +89,17 @@ class CommandBSBot : public Command
*/
if (findnick(nick))
{
- notice_lang(Config.s_BotServ, u, NICK_ALREADY_REGISTERED, nick.c_str());
+ notice_lang(Config->s_BotServ, u, NICK_ALREADY_REGISTERED, nick.c_str());
return MOD_CONT;
}
if (!(bi = new BotInfo(nick, user, host, real)))
{
- notice_lang(Config.s_BotServ, u, BOT_BOT_CREATION_FAILED);
+ notice_lang(Config->s_BotServ, u, BOT_BOT_CREATION_FAILED);
return MOD_CONT;
}
- notice_lang(Config.s_BotServ, u, BOT_BOT_ADDED, bi->nick.c_str(), bi->GetIdent().c_str(), bi->host.c_str(), bi->realname.c_str());
+ notice_lang(Config->s_BotServ, u, BOT_BOT_ADDED, bi->nick.c_str(), bi->GetIdent().c_str(), bi->host.c_str(), bi->realname.c_str());
FOREACH_MOD(I_OnBotCreate, OnBotCreate(bi));
return MOD_CONT;
@@ -122,37 +122,37 @@ class CommandBSBot : public Command
if (!(bi = findbot(oldnick)))
{
- notice_lang(Config.s_BotServ, u, BOT_DOES_NOT_EXIST, oldnick.c_str());
+ notice_lang(Config->s_BotServ, u, BOT_DOES_NOT_EXIST, oldnick.c_str());
return MOD_CONT;
}
if (!oldnick.equals_ci(nick) && nickIsServices(oldnick, false))
{
- notice_lang(Config.s_BotServ, u, BOT_DOES_NOT_EXIST, oldnick.c_str());
+ notice_lang(Config->s_BotServ, u, BOT_DOES_NOT_EXIST, oldnick.c_str());
return MOD_CONT;
}
- if (nick.length() > Config.NickLen)
+ if (nick.length() > Config->NickLen)
{
- notice_lang(Config.s_BotServ, u, BOT_BAD_NICK);
+ notice_lang(Config->s_BotServ, u, BOT_BAD_NICK);
return MOD_CONT;
}
- if (!user.empty() && user.length() > Config.UserLen)
+ if (!user.empty() && user.length() > Config->UserLen)
{
- notice_lang(Config.s_BotServ, u, BOT_LONG_IDENT, Config.UserLen);
+ notice_lang(Config->s_BotServ, u, BOT_LONG_IDENT, Config->UserLen);
return MOD_CONT;
}
- if (!host.empty() && host.length() > Config.HostLen)
+ if (!host.empty() && host.length() > Config->HostLen)
{
- notice_lang(Config.s_BotServ, u, BOT_LONG_HOST, Config.HostLen);
+ notice_lang(Config->s_BotServ, u, BOT_LONG_HOST, Config->HostLen);
return MOD_CONT;
}
if (!oldnick.equals_ci(nick) && nickIsServices(nick, false))
{
- notice_lang(Config.s_BotServ, u, BOT_DOES_NOT_EXIST, oldnick.c_str());
+ notice_lang(Config->s_BotServ, u, BOT_DOES_NOT_EXIST, oldnick.c_str());
return MOD_CONT;
}
@@ -163,48 +163,48 @@ class CommandBSBot : public Command
*/
if (nick.equals_cs(bi->nick) && (!user.empty() ? user.equals_cs(bi->GetIdent()) : 1) && (!host.empty() ? host.equals_cs(bi->host) : 1) && (!real.empty() ? real.equals_cs(bi->realname) : 1))
{
- notice_lang(Config.s_BotServ, u, BOT_BOT_ANY_CHANGES);
+ notice_lang(Config->s_BotServ, u, BOT_BOT_ANY_CHANGES);
return MOD_CONT;
}
/* Check the nick is valid re RFC 2812 */
if (isdigit(nick[0]) || nick[0] == '-')
{
- notice_lang(Config.s_BotServ, u, BOT_BAD_NICK);
+ notice_lang(Config->s_BotServ, u, BOT_BAD_NICK);
return MOD_CONT;
}
- for (unsigned i = 0, end = nick.length(); i < end && i < Config.NickLen; ++i)
+ for (unsigned i = 0, end = nick.length(); i < end && i < Config->NickLen; ++i)
if (!isvalidnick(nick[i]))
{
- notice_lang(Config.s_BotServ, u, BOT_BAD_NICK);
+ notice_lang(Config->s_BotServ, u, BOT_BAD_NICK);
return MOD_CONT;
}
/* check for hardcored ircd forbidden nicks */
if (!ircdproto->IsNickValid(nick))
{
- notice_lang(Config.s_BotServ, u, BOT_BAD_NICK);
+ notice_lang(Config->s_BotServ, u, BOT_BAD_NICK);
return MOD_CONT;
}
if (!host.empty() && !isValidHost(host, 3))
{
- notice_lang(Config.s_BotServ, u, BOT_BAD_HOST);
+ notice_lang(Config->s_BotServ, u, BOT_BAD_HOST);
return MOD_CONT;
}
if (!user.empty())
- for (unsigned i = 0, end = user.length(); i < end && i < Config.UserLen; ++i)
+ for (unsigned i = 0, end = user.length(); i < end && i < Config->UserLen; ++i)
if (!isalnum(user[i]))
{
- notice_lang(Config.s_BotServ, u, BOT_BAD_IDENT, Config.UserLen);
+ notice_lang(Config->s_BotServ, u, BOT_BAD_IDENT, Config->UserLen);
return MOD_CONT;
}
if (!nick.equals_ci(bi->nick) && findbot(nick))
{
- notice_lang(Config.s_BotServ, u, BOT_BOT_ALREADY_EXISTS, nick.c_str());
+ notice_lang(Config->s_BotServ, u, BOT_BOT_ALREADY_EXISTS, nick.c_str());
return MOD_CONT;
}
@@ -216,7 +216,7 @@ class CommandBSBot : public Command
*/
if (findnick(nick))
{
- notice_lang(Config.s_BotServ, u, NICK_ALREADY_REGISTERED, nick.c_str());
+ notice_lang(Config->s_BotServ, u, NICK_ALREADY_REGISTERED, nick.c_str());
return MOD_CONT;
}
@@ -229,7 +229,7 @@ class CommandBSBot : public Command
}
/* We check whether user with this nick is online, and kill it if so */
- EnforceQlinedNick(nick, Config.s_BotServ);
+ EnforceQlinedNick(nick, Config->s_BotServ);
}
if (!user.empty())
@@ -259,7 +259,7 @@ class CommandBSBot : public Command
bi->RejoinAll();
}
- notice_lang(Config.s_BotServ, u, BOT_BOT_CHANGED, oldnick.c_str(), bi->nick.c_str(), bi->GetIdent().c_str(), bi->host.c_str(), bi->realname.c_str());
+ notice_lang(Config->s_BotServ, u, BOT_BOT_CHANGED, oldnick.c_str(), bi->nick.c_str(), bi->GetIdent().c_str(), bi->host.c_str(), bi->realname.c_str());
FOREACH_MOD(I_OnBotChange, OnBotChange(bi));
return MOD_CONT;
@@ -278,13 +278,13 @@ class CommandBSBot : public Command
if (!(bi = findbot(nick)))
{
- notice_lang(Config.s_BotServ, u, BOT_DOES_NOT_EXIST, nick.c_str());
+ notice_lang(Config->s_BotServ, u, BOT_DOES_NOT_EXIST, nick.c_str());
return MOD_CONT;
}
if (nickIsServices(nick, false))
{
- notice_lang(Config.s_BotServ, u, BOT_DOES_NOT_EXIST, nick.c_str());
+ notice_lang(Config->s_BotServ, u, BOT_DOES_NOT_EXIST, nick.c_str());
return MOD_CONT;
}
@@ -295,7 +295,7 @@ class CommandBSBot : public Command
ircdproto->SendSQLineDel(&x);
delete bi;
- notice_lang(Config.s_BotServ, u, BOT_BOT_DELETED, nick.c_str());
+ notice_lang(Config->s_BotServ, u, BOT_BOT_DELETED, nick.c_str());
return MOD_CONT;
}
public:
@@ -310,7 +310,7 @@ class CommandBSBot : public Command
if (readonly)
{
- notice_lang(Config.s_BotServ, u, BOT_BOT_READONLY);
+ notice_lang(Config->s_BotServ, u, BOT_BOT_READONLY);
return MOD_CONT;
}
@@ -319,7 +319,7 @@ class CommandBSBot : public Command
// ADD nick user host real - 5
if (!u->Account()->HasCommand("botserv/bot/add"))
{
- notice_lang(Config.s_BotServ, u, ACCESS_DENIED);
+ notice_lang(Config->s_BotServ, u, ACCESS_DENIED);
return MOD_CONT;
}
@@ -342,7 +342,7 @@ class CommandBSBot : public Command
// but only oldn and newn are required
if (!u->Account()->HasCommand("botserv/bot/change"))
{
- notice_lang(Config.s_BotServ, u, ACCESS_DENIED);
+ notice_lang(Config->s_BotServ, u, ACCESS_DENIED);
return MOD_CONT;
}
@@ -359,7 +359,7 @@ class CommandBSBot : public Command
// DEL nick
if (!u->Account()->HasCommand("botserv/bot/del"))
{
- notice_lang(Config.s_BotServ, u, ACCESS_DENIED);
+ notice_lang(Config->s_BotServ, u, ACCESS_DENIED);
return MOD_CONT;
}
@@ -379,18 +379,18 @@ class CommandBSBot : public Command
bool OnHelp(User *u, const Anope::string &subcommand)
{
- notice_lang(Config.s_BotServ, u, BOT_SERVADMIN_HELP_BOT);
+ notice_lang(Config->s_BotServ, u, BOT_SERVADMIN_HELP_BOT);
return true;
}
void OnSyntaxError(User *u, const Anope::string &subcommand)
{
- syntax_error(Config.s_BotServ, u, "BOT", BOT_BOT_SYNTAX);
+ syntax_error(Config->s_BotServ, u, "BOT", BOT_BOT_SYNTAX);
}
void OnServHelp(User *u)
{
- notice_lang(Config.s_BotServ, u, BOT_HELP_CMD_BOT);
+ notice_lang(Config->s_BotServ, u, BOT_HELP_CMD_BOT);
}
};
diff --git a/modules/core/bs_botlist.cpp b/modules/core/bs_botlist.cpp
index 0dbb8bedf..3234027ed 100644
--- a/modules/core/bs_botlist.cpp
+++ b/modules/core/bs_botlist.cpp
@@ -26,7 +26,7 @@ class CommandBSBotList : public Command
if (BotListByNick.empty())
{
- notice_lang(Config.s_BotServ, u, BOT_BOTLIST_EMPTY);
+ notice_lang(Config->s_BotServ, u, BOT_BOTLIST_EMPTY);
return MOD_CONT;
}
@@ -37,15 +37,15 @@ class CommandBSBotList : public Command
if (!bi->HasFlag(BI_PRIVATE))
{
if (!count)
- notice_lang(Config.s_BotServ, u, BOT_BOTLIST_HEADER);
+ notice_lang(Config->s_BotServ, u, BOT_BOTLIST_HEADER);
++count;
- u->SendMessage(Config.s_BotServ, " %-15s (%s@%s)", bi->nick.c_str(), bi->GetIdent().c_str(), bi->host.c_str());
+ u->SendMessage(Config->s_BotServ, " %-15s (%s@%s)", bi->nick.c_str(), bi->GetIdent().c_str(), bi->host.c_str());
}
}
if (u->Account()->HasCommand("botserv/botlist") && count < BotListByNick.size())
{
- notice_lang(Config.s_BotServ, u, BOT_BOTLIST_PRIVATE_HEADER);
+ notice_lang(Config->s_BotServ, u, BOT_BOTLIST_PRIVATE_HEADER);
for (botinfo_map::const_iterator it = BotListByNick.begin(), it_end = BotListByNick.end(); it != it_end; ++it)
{
@@ -53,29 +53,29 @@ class CommandBSBotList : public Command
if (bi->HasFlag(BI_PRIVATE))
{
- u->SendMessage(Config.s_BotServ, " %-15s (%s@%s)", bi->nick.c_str(), bi->GetIdent().c_str(), bi->host.c_str());
+ u->SendMessage(Config->s_BotServ, " %-15s (%s@%s)", bi->nick.c_str(), bi->GetIdent().c_str(), bi->host.c_str());
++count;
}
}
}
if (!count)
- notice_lang(Config.s_BotServ, u, BOT_BOTLIST_EMPTY);
+ notice_lang(Config->s_BotServ, u, BOT_BOTLIST_EMPTY);
else
- notice_lang(Config.s_BotServ, u, BOT_BOTLIST_FOOTER, count);
+ notice_lang(Config->s_BotServ, u, BOT_BOTLIST_FOOTER, count);
return MOD_CONT;
}
bool OnHelp(User *u, const Anope::string &subcommand)
{
- notice_help(Config.s_BotServ, u, BOT_HELP_BOTLIST);
+ notice_help(Config->s_BotServ, u, BOT_HELP_BOTLIST);
return true;
}
void OnServHelp(User *u)
{
- notice_lang(Config.s_BotServ, u, BOT_HELP_CMD_BOTLIST);
+ notice_lang(Config->s_BotServ, u, BOT_HELP_CMD_BOTLIST);
}
};
diff --git a/modules/core/bs_help.cpp b/modules/core/bs_help.cpp
index c41472ad3..9faeae9cf 100644
--- a/modules/core/bs_help.cpp
+++ b/modules/core/bs_help.cpp
@@ -24,18 +24,18 @@ class CommandBSHelp : public Command
CommandReturn Execute(User *u, const std::vector<Anope::string> &params)
{
- mod_help_cmd(findbot(Config.s_BotServ), u, params[0]);
+ mod_help_cmd(findbot(Config->s_BotServ), u, params[0]);
return MOD_CONT;
}
void OnSyntaxError(User *u, const Anope::string &subcommand)
{
// Abuse syntax error to display general list help.
- notice_help(Config.s_BotServ, u, BOT_HELP);
+ notice_help(Config->s_BotServ, u, BOT_HELP);
for (CommandMap::const_iterator it = BotServ->Commands.begin(), it_end = BotServ->Commands.end(); it != it_end; ++it)
- if (!Config.HidePrivilegedCommands || it->second->permission.empty() || (u->Account() && u->Account()->HasCommand(it->second->permission)))
+ if (!Config->HidePrivilegedCommands || it->second->permission.empty() || (u->Account() && u->Account()->HasCommand(it->second->permission)))
it->second->OnServHelp(u);
- notice_help(Config.s_BotServ, u, BOT_HELP_FOOTER, Config.BSMinUsers);
+ notice_help(Config->s_BotServ, u, BOT_HELP_FOOTER, Config->BSMinUsers);
}
};
diff --git a/modules/core/bs_info.cpp b/modules/core/bs_info.cpp
index fdf1b8d10..214ed6e3a 100644
--- a/modules/core/bs_info.cpp
+++ b/modules/core/bs_info.cpp
@@ -28,7 +28,7 @@ class CommandBSInfo : public Command
{
if (buf.length() + ci->name.length() > 300)
{
- u->SendMessage(Config.s_BotServ, "%s", buf.c_str());
+ u->SendMessage(Config->s_BotServ, "%s", buf.c_str());
buf.clear();
}
buf += " " + ci->name + " ";
@@ -36,7 +36,7 @@ class CommandBSInfo : public Command
}
if (!buf.empty())
- u->SendMessage(Config.s_BotServ, "%s", buf.c_str());
+ u->SendMessage(Config->s_BotServ, "%s", buf.c_str());
return;
}
public:
@@ -59,14 +59,14 @@ class CommandBSInfo : public Command
{
struct tm *tm;
- notice_lang(Config.s_BotServ, u, BOT_INFO_BOT_HEADER, bi->nick.c_str());
- notice_lang(Config.s_BotServ, u, BOT_INFO_BOT_MASK, bi->GetIdent().c_str(), bi->host.c_str());
- notice_lang(Config.s_BotServ, u, BOT_INFO_BOT_REALNAME, bi->realname.c_str());
+ notice_lang(Config->s_BotServ, u, BOT_INFO_BOT_HEADER, bi->nick.c_str());
+ notice_lang(Config->s_BotServ, u, BOT_INFO_BOT_MASK, bi->GetIdent().c_str(), bi->host.c_str());
+ notice_lang(Config->s_BotServ, u, BOT_INFO_BOT_REALNAME, bi->realname.c_str());
tm = localtime(&bi->created);
strftime_lang(buf, sizeof(buf), u, STRFTIME_DATE_TIME_FORMAT, tm);
- notice_lang(Config.s_BotServ, u, BOT_INFO_BOT_CREATED, buf);
- notice_lang(Config.s_BotServ, u, BOT_INFO_BOT_OPTIONS, getstring(u, (bi->HasFlag(BI_PRIVATE) ? BOT_INFO_OPT_PRIVATE : BOT_INFO_OPT_NONE)));
- notice_lang(Config.s_BotServ, u, BOT_INFO_BOT_USAGE, bi->chancount);
+ notice_lang(Config->s_BotServ, u, BOT_INFO_BOT_CREATED, buf);
+ notice_lang(Config->s_BotServ, u, BOT_INFO_BOT_OPTIONS, getstring(u, (bi->HasFlag(BI_PRIVATE) ? BOT_INFO_OPT_PRIVATE : BOT_INFO_OPT_NONE)));
+ notice_lang(Config->s_BotServ, u, BOT_INFO_BOT_USAGE, bi->chancount);
if (u->Account()->HasPriv("botserv/administration"))
this->send_bot_channels(u, bi);
@@ -75,97 +75,97 @@ class CommandBSInfo : public Command
{
if (!check_access(u, ci, CA_FOUNDER) && !u->Account()->HasPriv("botserv/administration"))
{
- notice_lang(Config.s_BotServ, u, ACCESS_DENIED);
+ notice_lang(Config->s_BotServ, u, ACCESS_DENIED);
return MOD_CONT;
}
- notice_lang(Config.s_BotServ, u, BOT_INFO_CHAN_HEADER, ci->name.c_str());
+ notice_lang(Config->s_BotServ, u, BOT_INFO_CHAN_HEADER, ci->name.c_str());
if (ci->bi)
- notice_lang(Config.s_BotServ, u, BOT_INFO_CHAN_BOT, ci->bi->nick.c_str());
+ notice_lang(Config->s_BotServ, u, BOT_INFO_CHAN_BOT, ci->bi->nick.c_str());
else
- notice_lang(Config.s_BotServ, u, BOT_INFO_CHAN_BOT_NONE);
+ notice_lang(Config->s_BotServ, u, BOT_INFO_CHAN_BOT_NONE);
if (ci->botflags.HasFlag(BS_KICK_BADWORDS))
{
if (ci->ttb[TTB_BADWORDS])
- notice_lang(Config.s_BotServ, u, BOT_INFO_CHAN_KICK_BADWORDS_BAN, getstring(u, BOT_INFO_ACTIVE), ci->ttb[TTB_BADWORDS]);
+ notice_lang(Config->s_BotServ, u, BOT_INFO_CHAN_KICK_BADWORDS_BAN, getstring(u, BOT_INFO_ACTIVE), ci->ttb[TTB_BADWORDS]);
else
- notice_lang(Config.s_BotServ, u, BOT_INFO_CHAN_KICK_BADWORDS, getstring(u, BOT_INFO_ACTIVE));
+ notice_lang(Config->s_BotServ, u, BOT_INFO_CHAN_KICK_BADWORDS, getstring(u, BOT_INFO_ACTIVE));
}
else
- notice_lang(Config.s_BotServ, u, BOT_INFO_CHAN_KICK_BADWORDS, getstring(u, BOT_INFO_INACTIVE));
+ notice_lang(Config->s_BotServ, u, BOT_INFO_CHAN_KICK_BADWORDS, getstring(u, BOT_INFO_INACTIVE));
if (ci->botflags.HasFlag(BS_KICK_BOLDS))
{
if (ci->ttb[TTB_BOLDS])
- notice_lang(Config.s_BotServ, u, BOT_INFO_CHAN_KICK_BOLDS_BAN, getstring(u, BOT_INFO_ACTIVE), ci->ttb[TTB_BOLDS]);
+ notice_lang(Config->s_BotServ, u, BOT_INFO_CHAN_KICK_BOLDS_BAN, getstring(u, BOT_INFO_ACTIVE), ci->ttb[TTB_BOLDS]);
else
- notice_lang(Config.s_BotServ, u, BOT_INFO_CHAN_KICK_BOLDS, getstring(u, BOT_INFO_ACTIVE));
+ notice_lang(Config->s_BotServ, u, BOT_INFO_CHAN_KICK_BOLDS, getstring(u, BOT_INFO_ACTIVE));
}
else
- notice_lang(Config.s_BotServ, u, BOT_INFO_CHAN_KICK_BOLDS, getstring(u, BOT_INFO_INACTIVE));
+ notice_lang(Config->s_BotServ, u, BOT_INFO_CHAN_KICK_BOLDS, getstring(u, BOT_INFO_INACTIVE));
if (ci->botflags.HasFlag(BS_KICK_CAPS))
{
if (ci->ttb[TTB_CAPS])
- notice_lang(Config.s_BotServ, u, BOT_INFO_CHAN_KICK_CAPS_BAN, getstring(u, BOT_INFO_ACTIVE), ci->ttb[TTB_CAPS], ci->capsmin, ci->capspercent);
+ notice_lang(Config->s_BotServ, u, BOT_INFO_CHAN_KICK_CAPS_BAN, getstring(u, BOT_INFO_ACTIVE), ci->ttb[TTB_CAPS], ci->capsmin, ci->capspercent);
else
- notice_lang(Config.s_BotServ, u, BOT_INFO_CHAN_KICK_CAPS_ON, getstring(u, BOT_INFO_ACTIVE), ci->capsmin, ci->capspercent);
+ notice_lang(Config->s_BotServ, u, BOT_INFO_CHAN_KICK_CAPS_ON, getstring(u, BOT_INFO_ACTIVE), ci->capsmin, ci->capspercent);
}
else
- notice_lang(Config.s_BotServ, u, BOT_INFO_CHAN_KICK_CAPS_OFF, getstring(u, BOT_INFO_INACTIVE));
+ notice_lang(Config->s_BotServ, u, BOT_INFO_CHAN_KICK_CAPS_OFF, getstring(u, BOT_INFO_INACTIVE));
if (ci->botflags.HasFlag(BS_KICK_COLORS))
{
if (ci->ttb[TTB_COLORS])
- notice_lang(Config.s_BotServ, u, BOT_INFO_CHAN_KICK_COLORS_BAN, getstring(u, BOT_INFO_ACTIVE), ci->ttb[TTB_COLORS]);
+ notice_lang(Config->s_BotServ, u, BOT_INFO_CHAN_KICK_COLORS_BAN, getstring(u, BOT_INFO_ACTIVE), ci->ttb[TTB_COLORS]);
else
- notice_lang(Config.s_BotServ, u, BOT_INFO_CHAN_KICK_COLORS, getstring(u, BOT_INFO_ACTIVE));
+ notice_lang(Config->s_BotServ, u, BOT_INFO_CHAN_KICK_COLORS, getstring(u, BOT_INFO_ACTIVE));
}
else
- notice_lang(Config.s_BotServ, u, BOT_INFO_CHAN_KICK_COLORS, getstring(u, BOT_INFO_INACTIVE));
+ notice_lang(Config->s_BotServ, u, BOT_INFO_CHAN_KICK_COLORS, getstring(u, BOT_INFO_INACTIVE));
if (ci->botflags.HasFlag(BS_KICK_FLOOD))
{
if (ci->ttb[TTB_FLOOD])
- notice_lang(Config.s_BotServ, u, BOT_INFO_CHAN_KICK_FLOOD_BAN, getstring(u, BOT_INFO_ACTIVE), ci->ttb[TTB_FLOOD], ci->floodlines, ci->floodsecs);
+ notice_lang(Config->s_BotServ, u, BOT_INFO_CHAN_KICK_FLOOD_BAN, getstring(u, BOT_INFO_ACTIVE), ci->ttb[TTB_FLOOD], ci->floodlines, ci->floodsecs);
else
- notice_lang(Config.s_BotServ, u, BOT_INFO_CHAN_KICK_FLOOD_ON, getstring(u, BOT_INFO_ACTIVE), ci->floodlines, ci->floodsecs);
+ notice_lang(Config->s_BotServ, u, BOT_INFO_CHAN_KICK_FLOOD_ON, getstring(u, BOT_INFO_ACTIVE), ci->floodlines, ci->floodsecs);
}
else
- notice_lang(Config.s_BotServ, u, BOT_INFO_CHAN_KICK_FLOOD_OFF, getstring(u, BOT_INFO_INACTIVE));
+ notice_lang(Config->s_BotServ, u, BOT_INFO_CHAN_KICK_FLOOD_OFF, getstring(u, BOT_INFO_INACTIVE));
if (ci->botflags.HasFlag(BS_KICK_REPEAT))
{
if (ci->ttb[TTB_REPEAT])
- notice_lang(Config.s_BotServ, u, BOT_INFO_CHAN_KICK_REPEAT_BAN, getstring(u, BOT_INFO_ACTIVE), ci->ttb[TTB_REPEAT], ci->repeattimes);
+ notice_lang(Config->s_BotServ, u, BOT_INFO_CHAN_KICK_REPEAT_BAN, getstring(u, BOT_INFO_ACTIVE), ci->ttb[TTB_REPEAT], ci->repeattimes);
else
- notice_lang(Config.s_BotServ, u, BOT_INFO_CHAN_KICK_REPEAT_ON, getstring(u, BOT_INFO_ACTIVE), ci->repeattimes);
+ notice_lang(Config->s_BotServ, u, BOT_INFO_CHAN_KICK_REPEAT_ON, getstring(u, BOT_INFO_ACTIVE), ci->repeattimes);
}
else
- notice_lang(Config.s_BotServ, u, BOT_INFO_CHAN_KICK_REPEAT_OFF, getstring(u, BOT_INFO_INACTIVE));
+ notice_lang(Config->s_BotServ, u, BOT_INFO_CHAN_KICK_REPEAT_OFF, getstring(u, BOT_INFO_INACTIVE));
if (ci->botflags.HasFlag(BS_KICK_REVERSES))
{
if (ci->ttb[TTB_REVERSES])
- notice_lang(Config.s_BotServ, u, BOT_INFO_CHAN_KICK_REVERSES_BAN, getstring(u, BOT_INFO_ACTIVE), ci->ttb[TTB_REVERSES]);
+ notice_lang(Config->s_BotServ, u, BOT_INFO_CHAN_KICK_REVERSES_BAN, getstring(u, BOT_INFO_ACTIVE), ci->ttb[TTB_REVERSES]);
else
- notice_lang(Config.s_BotServ, u, BOT_INFO_CHAN_KICK_REVERSES, getstring(u, BOT_INFO_ACTIVE));
+ notice_lang(Config->s_BotServ, u, BOT_INFO_CHAN_KICK_REVERSES, getstring(u, BOT_INFO_ACTIVE));
}
else
- notice_lang(Config.s_BotServ, u, BOT_INFO_CHAN_KICK_REVERSES, getstring(u, BOT_INFO_INACTIVE));
+ notice_lang(Config->s_BotServ, u, BOT_INFO_CHAN_KICK_REVERSES, getstring(u, BOT_INFO_INACTIVE));
if (ci->botflags.HasFlag(BS_KICK_UNDERLINES))
{
if (ci->ttb[TTB_UNDERLINES])
- notice_lang(Config.s_BotServ, u, BOT_INFO_CHAN_KICK_UNDERLINES_BAN, getstring(u, BOT_INFO_ACTIVE), ci->ttb[TTB_UNDERLINES]);
+ notice_lang(Config->s_BotServ, u, BOT_INFO_CHAN_KICK_UNDERLINES_BAN, getstring(u, BOT_INFO_ACTIVE), ci->ttb[TTB_UNDERLINES]);
else
- notice_lang(Config.s_BotServ, u, BOT_INFO_CHAN_KICK_UNDERLINES, getstring(u, BOT_INFO_ACTIVE));
+ notice_lang(Config->s_BotServ, u, BOT_INFO_CHAN_KICK_UNDERLINES, getstring(u, BOT_INFO_ACTIVE));
}
else
- notice_lang(Config.s_BotServ, u, BOT_INFO_CHAN_KICK_UNDERLINES, getstring(u, BOT_INFO_INACTIVE));
+ notice_lang(Config->s_BotServ, u, BOT_INFO_CHAN_KICK_UNDERLINES, getstring(u, BOT_INFO_INACTIVE));
if (ci->botflags.HasFlag(BS_KICK_ITALICS))
{
if (ci->ttb[TTB_ITALICS])
- notice_lang(Config.s_BotServ, u, BOT_INFO_CHAN_KICK_ITALICS_BAN, getstring(u, BOT_INFO_ACTIVE), ci->ttb[TTB_ITALICS]);
+ notice_lang(Config->s_BotServ, u, BOT_INFO_CHAN_KICK_ITALICS_BAN, getstring(u, BOT_INFO_ACTIVE), ci->ttb[TTB_ITALICS]);
else
- notice_lang(Config.s_BotServ, u, BOT_INFO_CHAN_KICK_ITALICS, getstring(u, BOT_INFO_ACTIVE));
+ notice_lang(Config->s_BotServ, u, BOT_INFO_CHAN_KICK_ITALICS, getstring(u, BOT_INFO_ACTIVE));
}
else
- notice_lang(Config.s_BotServ, u, BOT_INFO_CHAN_KICK_ITALICS, getstring(u, BOT_INFO_INACTIVE));
+ notice_lang(Config->s_BotServ, u, BOT_INFO_CHAN_KICK_ITALICS, getstring(u, BOT_INFO_INACTIVE));
end = buf;
*end = 0;
@@ -199,27 +199,27 @@ class CommandBSInfo : public Command
end += snprintf(end, sizeof(buf) - (end - buf), "%s%s", need_comma ? commastr : "", getstring(u, BOT_INFO_OPT_SYMBIOSIS));
need_comma = 1;
}
- notice_lang(Config.s_BotServ, u, BOT_INFO_CHAN_OPTIONS, *buf ? buf : getstring(u, BOT_INFO_OPT_NONE));
+ notice_lang(Config->s_BotServ, u, BOT_INFO_CHAN_OPTIONS, *buf ? buf : getstring(u, BOT_INFO_OPT_NONE));
}
else
- notice_lang(Config.s_BotServ, u, BOT_INFO_NOT_FOUND, query.c_str());
+ notice_lang(Config->s_BotServ, u, BOT_INFO_NOT_FOUND, query.c_str());
return MOD_CONT;
}
bool OnHelp(User *u, const Anope::string &subcommand)
{
- notice_help(Config.s_BotServ, u, BOT_HELP_INFO);
+ notice_help(Config->s_BotServ, u, BOT_HELP_INFO);
return true;
}
void OnSyntaxError(User *u, const Anope::string &subcommand)
{
- syntax_error(Config.s_BotServ, u, "INFO", BOT_INFO_SYNTAX);
+ syntax_error(Config->s_BotServ, u, "INFO", BOT_INFO_SYNTAX);
}
void OnServHelp(User *u)
{
- notice_lang(Config.s_BotServ, u, BOT_HELP_CMD_INFO);
+ notice_lang(Config->s_BotServ, u, BOT_HELP_CMD_INFO);
}
};
diff --git a/modules/core/bs_kick.cpp b/modules/core/bs_kick.cpp
index 6a4528b7e..849efb7d0 100644
--- a/modules/core/bs_kick.cpp
+++ b/modules/core/bs_kick.cpp
@@ -31,15 +31,15 @@ class CommandBSKick : public Command
ChannelInfo *ci = cs_findchan(chan);
if (readonly)
- notice_lang(Config.s_BotServ, u, BOT_KICK_DISABLED);
+ notice_lang(Config->s_BotServ, u, BOT_KICK_DISABLED);
else if (chan.empty() || option.empty() || value.empty())
- syntax_error(Config.s_BotServ, u, "KICK", BOT_KICK_SYNTAX);
+ syntax_error(Config->s_BotServ, u, "KICK", BOT_KICK_SYNTAX);
else if (!value.equals_ci("ON") && !value.equals_ci("OFF"))
- syntax_error(Config.s_BotServ, u, "KICK", BOT_KICK_SYNTAX);
+ syntax_error(Config->s_BotServ, u, "KICK", BOT_KICK_SYNTAX);
else if (!check_access(u, ci, CA_SET) && !u->Account()->HasPriv("botserv/administration"))
- notice_lang(Config.s_BotServ, u, ACCESS_DENIED);
+ notice_lang(Config->s_BotServ, u, ACCESS_DENIED);
else if (!ci->bi)
- notice_help(Config.s_BotServ, u, BOT_NOT_ASSIGNED);
+ notice_help(Config->s_BotServ, u, BOT_NOT_ASSIGNED);
else
{
if (option.equals_ci("BADWORDS"))
@@ -57,7 +57,7 @@ class CommandBSKick : public Command
Alog(LOG_DEBUG) << "remainder of ttb " << error << " ttb " << ci->ttb[TTB_BADWORDS];
/* reset the value back to 0 - TSL */
ci->ttb[TTB_BADWORDS] = 0;
- notice_lang(Config.s_BotServ, u, BOT_KICK_BAD_TTB, ttb.c_str());
+ notice_lang(Config->s_BotServ, u, BOT_KICK_BAD_TTB, ttb.c_str());
return MOD_CONT;
}
}
@@ -65,14 +65,14 @@ class CommandBSKick : public Command
ci->ttb[TTB_BADWORDS] = 0;
ci->botflags.SetFlag(BS_KICK_BADWORDS);
if (ci->ttb[TTB_BADWORDS])
- notice_lang(Config.s_BotServ, u, BOT_KICK_BADWORDS_ON_BAN, ci->ttb[TTB_BADWORDS]);
+ notice_lang(Config->s_BotServ, u, BOT_KICK_BADWORDS_ON_BAN, ci->ttb[TTB_BADWORDS]);
else
- notice_lang(Config.s_BotServ, u, BOT_KICK_BADWORDS_ON);
+ notice_lang(Config->s_BotServ, u, BOT_KICK_BADWORDS_ON);
}
else
{
ci->botflags.UnsetFlag(BS_KICK_BADWORDS);
- notice_lang(Config.s_BotServ, u, BOT_KICK_BADWORDS_OFF);
+ notice_lang(Config->s_BotServ, u, BOT_KICK_BADWORDS_OFF);
}
}
else if (option.equals_ci("BOLDS"))
@@ -87,7 +87,7 @@ class CommandBSKick : public Command
{
Alog(LOG_DEBUG) << "remainder of ttb " << error << " ttb " << ci->ttb[TTB_BOLDS];
ci->ttb[TTB_BOLDS] = 0;
- notice_lang(Config.s_BotServ, u, BOT_KICK_BAD_TTB, ttb.c_str());
+ notice_lang(Config->s_BotServ, u, BOT_KICK_BAD_TTB, ttb.c_str());
return MOD_CONT;
}
}
@@ -95,14 +95,14 @@ class CommandBSKick : public Command
ci->ttb[TTB_BOLDS] = 0;
ci->botflags.SetFlag(BS_KICK_BOLDS);
if (ci->ttb[TTB_BOLDS])
- notice_lang(Config.s_BotServ, u, BOT_KICK_BOLDS_ON_BAN, ci->ttb[TTB_BOLDS]);
+ notice_lang(Config->s_BotServ, u, BOT_KICK_BOLDS_ON_BAN, ci->ttb[TTB_BOLDS]);
else
- notice_lang(Config.s_BotServ, u, BOT_KICK_BOLDS_ON);
+ notice_lang(Config->s_BotServ, u, BOT_KICK_BOLDS_ON);
}
else
{
ci->botflags.UnsetFlag(BS_KICK_BOLDS);
- notice_lang(Config.s_BotServ, u, BOT_KICK_BOLDS_OFF);
+ notice_lang(Config->s_BotServ, u, BOT_KICK_BOLDS_OFF);
}
}
else if (option.equals_ci("CAPS"))
@@ -120,7 +120,7 @@ class CommandBSKick : public Command
{
Alog(LOG_DEBUG) << "remainder of ttb " << error << " ttb " << ci->ttb[TTB_CAPS];
ci->ttb[TTB_CAPS] = 0;
- notice_lang(Config.s_BotServ, u, BOT_KICK_BAD_TTB, ttb.c_str());
+ notice_lang(Config->s_BotServ, u, BOT_KICK_BAD_TTB, ttb.c_str());
return MOD_CONT;
}
}
@@ -143,14 +143,14 @@ class CommandBSKick : public Command
ci->botflags.SetFlag(BS_KICK_CAPS);
if (ci->ttb[TTB_CAPS])
- notice_lang(Config.s_BotServ, u, BOT_KICK_CAPS_ON_BAN, ci->capsmin, ci->capspercent, ci->ttb[TTB_CAPS]);
+ notice_lang(Config->s_BotServ, u, BOT_KICK_CAPS_ON_BAN, ci->capsmin, ci->capspercent, ci->ttb[TTB_CAPS]);
else
- notice_lang(Config.s_BotServ, u, BOT_KICK_CAPS_ON, ci->capsmin, ci->capspercent);
+ notice_lang(Config->s_BotServ, u, BOT_KICK_CAPS_ON, ci->capsmin, ci->capspercent);
}
else
{
ci->botflags.UnsetFlag(BS_KICK_CAPS);
- notice_lang(Config.s_BotServ, u, BOT_KICK_CAPS_OFF);
+ notice_lang(Config->s_BotServ, u, BOT_KICK_CAPS_OFF);
}
}
else if (option.equals_ci("COLORS"))
@@ -165,7 +165,7 @@ class CommandBSKick : public Command
{
Alog(LOG_DEBUG) << "remainder of ttb " << error << " ttb " << ci->ttb[TTB_COLORS];
ci->ttb[TTB_COLORS] = 0;
- notice_lang(Config.s_BotServ, u, BOT_KICK_BAD_TTB, ttb.c_str());
+ notice_lang(Config->s_BotServ, u, BOT_KICK_BAD_TTB, ttb.c_str());
return MOD_CONT;
}
}
@@ -173,14 +173,14 @@ class CommandBSKick : public Command
ci->ttb[TTB_COLORS] = 0;
ci->botflags.SetFlag(BS_KICK_COLORS);
if (ci->ttb[TTB_COLORS])
- notice_lang(Config.s_BotServ, u, BOT_KICK_COLORS_ON_BAN, ci->ttb[TTB_COLORS]);
+ notice_lang(Config->s_BotServ, u, BOT_KICK_COLORS_ON_BAN, ci->ttb[TTB_COLORS]);
else
- notice_lang(Config.s_BotServ, u, BOT_KICK_COLORS_ON);
+ notice_lang(Config->s_BotServ, u, BOT_KICK_COLORS_ON);
}
else
{
ci->botflags.UnsetFlag(BS_KICK_COLORS);
- notice_lang(Config.s_BotServ, u, BOT_KICK_COLORS_OFF);
+ notice_lang(Config->s_BotServ, u, BOT_KICK_COLORS_OFF);
}
}
else if (option.equals_ci("FLOOD"))
@@ -198,7 +198,7 @@ class CommandBSKick : public Command
{
Alog(LOG_DEBUG) << "remainder of ttb " << error << " ttb " << ci->ttb[TTB_FLOOD];
ci->ttb[TTB_FLOOD] = 0;
- notice_lang(Config.s_BotServ, u, BOT_KICK_BAD_TTB, ttb.c_str());
+ notice_lang(Config->s_BotServ, u, BOT_KICK_BAD_TTB, ttb.c_str());
return MOD_CONT;
}
}
@@ -216,19 +216,19 @@ class CommandBSKick : public Command
ci->floodsecs = 10;
else
ci->floodsecs = secs.is_number_only() ? convertTo<int16>(secs) : 10;
- if (ci->floodsecs < 1 || ci->floodsecs > Config.BSKeepData)
+ if (ci->floodsecs < 1 || ci->floodsecs > Config->BSKeepData)
ci->floodsecs = 10;
ci->botflags.SetFlag(BS_KICK_FLOOD);
if (ci->ttb[TTB_FLOOD])
- notice_lang(Config.s_BotServ, u, BOT_KICK_FLOOD_ON_BAN, ci->floodlines, ci->floodsecs, ci->ttb[TTB_FLOOD]);
+ notice_lang(Config->s_BotServ, u, BOT_KICK_FLOOD_ON_BAN, ci->floodlines, ci->floodsecs, ci->ttb[TTB_FLOOD]);
else
- notice_lang(Config.s_BotServ, u, BOT_KICK_FLOOD_ON, ci->floodlines, ci->floodsecs);
+ notice_lang(Config->s_BotServ, u, BOT_KICK_FLOOD_ON, ci->floodlines, ci->floodsecs);
}
else
{
ci->botflags.UnsetFlag(BS_KICK_FLOOD);
- notice_lang(Config.s_BotServ, u, BOT_KICK_FLOOD_OFF);
+ notice_lang(Config->s_BotServ, u, BOT_KICK_FLOOD_OFF);
}
}
else if (option.equals_ci("REPEAT"))
@@ -245,7 +245,7 @@ class CommandBSKick : public Command
{
Alog(LOG_DEBUG) << "remainder of ttb " << error << " ttb " << ci->ttb[TTB_REPEAT];
ci->ttb[TTB_REPEAT] = 0;
- notice_lang(Config.s_BotServ, u, BOT_KICK_BAD_TTB, ttb.c_str());
+ notice_lang(Config->s_BotServ, u, BOT_KICK_BAD_TTB, ttb.c_str());
return MOD_CONT;
}
}
@@ -261,14 +261,14 @@ class CommandBSKick : public Command
ci->botflags.SetFlag(BS_KICK_REPEAT);
if (ci->ttb[TTB_REPEAT])
- notice_lang(Config.s_BotServ, u, BOT_KICK_REPEAT_ON_BAN, ci->repeattimes, ci->ttb[TTB_REPEAT]);
+ notice_lang(Config->s_BotServ, u, BOT_KICK_REPEAT_ON_BAN, ci->repeattimes, ci->ttb[TTB_REPEAT]);
else
- notice_lang(Config.s_BotServ, u, BOT_KICK_REPEAT_ON, ci->repeattimes);
+ notice_lang(Config->s_BotServ, u, BOT_KICK_REPEAT_ON, ci->repeattimes);
}
else
{
ci->botflags.UnsetFlag(BS_KICK_REPEAT);
- notice_lang(Config.s_BotServ, u, BOT_KICK_REPEAT_OFF);
+ notice_lang(Config->s_BotServ, u, BOT_KICK_REPEAT_OFF);
}
}
else if (option.equals_ci("REVERSES"))
@@ -283,7 +283,7 @@ class CommandBSKick : public Command
{
Alog(LOG_DEBUG) << "remainder of ttb " << error << " ttb " << ci->ttb[TTB_REVERSES];
ci->ttb[TTB_REVERSES] = 0;
- notice_lang(Config.s_BotServ, u, BOT_KICK_BAD_TTB, ttb.c_str());
+ notice_lang(Config->s_BotServ, u, BOT_KICK_BAD_TTB, ttb.c_str());
return MOD_CONT;
}
}
@@ -291,14 +291,14 @@ class CommandBSKick : public Command
ci->ttb[TTB_REVERSES] = 0;
ci->botflags.SetFlag(BS_KICK_REVERSES);
if (ci->ttb[TTB_REVERSES])
- notice_lang(Config.s_BotServ, u, BOT_KICK_REVERSES_ON_BAN, ci->ttb[TTB_REVERSES]);
+ notice_lang(Config->s_BotServ, u, BOT_KICK_REVERSES_ON_BAN, ci->ttb[TTB_REVERSES]);
else
- notice_lang(Config.s_BotServ, u, BOT_KICK_REVERSES_ON);
+ notice_lang(Config->s_BotServ, u, BOT_KICK_REVERSES_ON);
}
else
{
ci->botflags.UnsetFlag(BS_KICK_REVERSES);
- notice_lang(Config.s_BotServ, u, BOT_KICK_REVERSES_OFF);
+ notice_lang(Config->s_BotServ, u, BOT_KICK_REVERSES_OFF);
}
}
else if (option.equals_ci("UNDERLINES"))
@@ -313,7 +313,7 @@ class CommandBSKick : public Command
{
Alog(LOG_DEBUG) << "remainder of ttb " << error << " ttb " << ci->ttb[TTB_UNDERLINES];
ci->ttb[TTB_UNDERLINES] = 0;
- notice_lang(Config.s_BotServ, u, BOT_KICK_BAD_TTB, ttb.c_str());
+ notice_lang(Config->s_BotServ, u, BOT_KICK_BAD_TTB, ttb.c_str());
return MOD_CONT;
}
}
@@ -321,14 +321,14 @@ class CommandBSKick : public Command
ci->ttb[TTB_UNDERLINES] = 0;
ci->botflags.SetFlag(BS_KICK_UNDERLINES);
if (ci->ttb[TTB_UNDERLINES])
- notice_lang(Config.s_BotServ, u, BOT_KICK_UNDERLINES_ON_BAN, ci->ttb[TTB_UNDERLINES]);
+ notice_lang(Config->s_BotServ, u, BOT_KICK_UNDERLINES_ON_BAN, ci->ttb[TTB_UNDERLINES]);
else
- notice_lang(Config.s_BotServ, u, BOT_KICK_UNDERLINES_ON);
+ notice_lang(Config->s_BotServ, u, BOT_KICK_UNDERLINES_ON);
}
else
{
ci->botflags.UnsetFlag(BS_KICK_UNDERLINES);
- notice_lang(Config.s_BotServ, u, BOT_KICK_UNDERLINES_OFF);
+ notice_lang(Config->s_BotServ, u, BOT_KICK_UNDERLINES_OFF);
}
}
else if (option.equals_ci("ITALICS"))
@@ -343,7 +343,7 @@ class CommandBSKick : public Command
{
Alog(LOG_DEBUG) << "remainder of ttb " << error << " ttb " << ci->ttb[TTB_ITALICS];
ci->ttb[TTB_ITALICS] = 0;
- notice_lang(Config.s_BotServ, u, BOT_KICK_BAD_TTB, ttb.c_str());
+ notice_lang(Config->s_BotServ, u, BOT_KICK_BAD_TTB, ttb.c_str());
return MOD_CONT;
}
}
@@ -351,18 +351,18 @@ class CommandBSKick : public Command
ci->ttb[TTB_ITALICS] = 0;
ci->botflags.SetFlag(BS_KICK_ITALICS);
if (ci->ttb[TTB_ITALICS])
- notice_lang(Config.s_BotServ, u, BOT_KICK_ITALICS_ON_BAN, ci->ttb[TTB_ITALICS]);
+ notice_lang(Config->s_BotServ, u, BOT_KICK_ITALICS_ON_BAN, ci->ttb[TTB_ITALICS]);
else
- notice_lang(Config.s_BotServ, u, BOT_KICK_ITALICS_ON);
+ notice_lang(Config->s_BotServ, u, BOT_KICK_ITALICS_ON);
}
else
{
ci->botflags.UnsetFlag(BS_KICK_ITALICS);
- notice_lang(Config.s_BotServ, u, BOT_KICK_ITALICS_OFF);
+ notice_lang(Config->s_BotServ, u, BOT_KICK_ITALICS_OFF);
}
}
else
- notice_help(Config.s_BotServ, u, BOT_KICK_UNKNOWN, option.c_str());
+ notice_help(Config->s_BotServ, u, BOT_KICK_UNKNOWN, option.c_str());
}
return MOD_CONT;
}
@@ -370,25 +370,25 @@ class CommandBSKick : public Command
bool OnHelp(User *u, const Anope::string &subcommand)
{
if (subcommand.empty())
- notice_help(Config.s_BotServ, u, BOT_HELP_KICK);
+ notice_help(Config->s_BotServ, u, BOT_HELP_KICK);
else if (subcommand.equals_ci("BADWORDS"))
- notice_help(Config.s_BotServ, u, BOT_HELP_KICK_BADWORDS);
+ notice_help(Config->s_BotServ, u, BOT_HELP_KICK_BADWORDS);
else if (subcommand.equals_ci("BOLDS"))
- notice_help(Config.s_BotServ, u, BOT_HELP_KICK_BOLDS);
+ notice_help(Config->s_BotServ, u, BOT_HELP_KICK_BOLDS);
else if (subcommand.equals_ci("CAPS"))
- notice_help(Config.s_BotServ, u, BOT_HELP_KICK_CAPS);
+ notice_help(Config->s_BotServ, u, BOT_HELP_KICK_CAPS);
else if (subcommand.equals_ci("COLORS"))
- notice_help(Config.s_BotServ, u, BOT_HELP_KICK_COLORS);
+ notice_help(Config->s_BotServ, u, BOT_HELP_KICK_COLORS);
else if (subcommand.equals_ci("FLOOD"))
- notice_help(Config.s_BotServ, u, BOT_HELP_KICK_FLOOD);
+ notice_help(Config->s_BotServ, u, BOT_HELP_KICK_FLOOD);
else if (subcommand.equals_ci("REPEAT"))
- notice_help(Config.s_BotServ, u, BOT_HELP_KICK_REPEAT);
+ notice_help(Config->s_BotServ, u, BOT_HELP_KICK_REPEAT);
else if (subcommand.equals_ci("REVERSES"))
- notice_help(Config.s_BotServ, u, BOT_HELP_KICK_REVERSES);
+ notice_help(Config->s_BotServ, u, BOT_HELP_KICK_REVERSES);
else if (subcommand.equals_ci("UNDERLINES"))
- notice_help(Config.s_BotServ, u, BOT_HELP_KICK_UNDERLINES);
+ notice_help(Config->s_BotServ, u, BOT_HELP_KICK_UNDERLINES);
else if (subcommand.equals_ci("ITALICS"))
- notice_help(Config.s_BotServ, u, BOT_HELP_KICK_ITALICS);
+ notice_help(Config->s_BotServ, u, BOT_HELP_KICK_ITALICS);
else
return false;
@@ -397,12 +397,12 @@ class CommandBSKick : public Command
void OnSyntaxError(User *u, const Anope::string &subcommand)
{
- syntax_error(Config.s_BotServ, u, "KICK", BOT_KICK_SYNTAX);
+ syntax_error(Config->s_BotServ, u, "KICK", BOT_KICK_SYNTAX);
}
void OnServHelp(User *u)
{
- notice_lang(Config.s_BotServ, u, BOT_HELP_CMD_KICK);
+ notice_lang(Config->s_BotServ, u, BOT_HELP_CMD_KICK);
}
};
diff --git a/modules/core/bs_say.cpp b/modules/core/bs_say.cpp
index ca9e6bde3..1b799c415 100644
--- a/modules/core/bs_say.cpp
+++ b/modules/core/bs_say.cpp
@@ -31,19 +31,19 @@ class CommandBSSay : public Command
if (!check_access(u, ci, CA_SAY))
{
- notice_lang(Config.s_BotServ, u, ACCESS_DENIED);
+ notice_lang(Config->s_BotServ, u, ACCESS_DENIED);
return MOD_CONT;
}
if (!ci->bi)
{
- notice_help(Config.s_BotServ, u, BOT_NOT_ASSIGNED);
+ notice_help(Config->s_BotServ, u, BOT_NOT_ASSIGNED);
return MOD_CONT;
}
if (!ci->c || !ci->c->FindUser(ci->bi))
{
- notice_lang(Config.s_BotServ, u, BOT_NOT_ON_CHANNEL, ci->name.c_str());
+ notice_lang(Config->s_BotServ, u, BOT_NOT_ON_CHANNEL, ci->name.c_str());
return MOD_CONT;
}
@@ -55,25 +55,25 @@ class CommandBSSay : public Command
ircdproto->SendPrivmsg(ci->bi, ci->name, "%s", text.c_str());
ci->bi->lastmsg = time(NULL);
- if (Config.LogBot && !Config.LogChannel.empty() && LogChan && !debug && findchan(Config.LogChannel))
- ircdproto->SendPrivmsg(ci->bi, Config.LogChannel, "SAY %s %s %s", u->nick.c_str(), ci->name.c_str(), text.c_str());
+ if (Config->LogBot && !Config->LogChannel.empty() && LogChan && !debug && findchan(Config->LogChannel))
+ ircdproto->SendPrivmsg(ci->bi, Config->LogChannel, "SAY %s %s %s", u->nick.c_str(), ci->name.c_str(), text.c_str());
return MOD_CONT;
}
bool OnHelp(User *u, const Anope::string &subcommand)
{
- notice_help(Config.s_BotServ, u, BOT_HELP_SAY);
+ notice_help(Config->s_BotServ, u, BOT_HELP_SAY);
return true;
}
void OnSyntaxError(User *u, const Anope::string &subcommand)
{
- syntax_error(Config.s_BotServ, u, "SAY", BOT_SAY_SYNTAX);
+ syntax_error(Config->s_BotServ, u, "SAY", BOT_SAY_SYNTAX);
}
void OnServHelp(User *u)
{
- notice_lang(Config.s_BotServ, u, BOT_HELP_CMD_SAY);
+ notice_lang(Config->s_BotServ, u, BOT_HELP_CMD_SAY);
}
};
diff --git a/modules/core/bs_set.cpp b/modules/core/bs_set.cpp
index 1a329ee4f..87a15cf66 100644
--- a/modules/core/bs_set.cpp
+++ b/modules/core/bs_set.cpp
@@ -30,7 +30,7 @@ class CommandBSSet : public Command
if (readonly)
{
- notice_lang(Config.s_BotServ, u, BOT_SET_DISABLED);
+ notice_lang(Config->s_BotServ, u, BOT_SET_DISABLED);
return MOD_CONT;
}
@@ -40,28 +40,28 @@ class CommandBSSet : public Command
if (!(bi = findbot(chan)))
{
- notice_lang(Config.s_BotServ, u, BOT_DOES_NOT_EXIST, chan.c_str());
+ notice_lang(Config->s_BotServ, u, BOT_DOES_NOT_EXIST, chan.c_str());
return MOD_CONT;
}
if (value.equals_ci("ON"))
{
bi->SetFlag(BI_PRIVATE);
- notice_lang(Config.s_BotServ, u, BOT_SET_PRIVATE_ON, bi->nick.c_str());
+ notice_lang(Config->s_BotServ, u, BOT_SET_PRIVATE_ON, bi->nick.c_str());
}
else if (value.equals_ci("OFF"))
{
bi->UnsetFlag(BI_PRIVATE);
- notice_lang(Config.s_BotServ, u, BOT_SET_PRIVATE_OFF, bi->nick.c_str());
+ notice_lang(Config->s_BotServ, u, BOT_SET_PRIVATE_OFF, bi->nick.c_str());
}
else
- syntax_error(Config.s_BotServ, u, "SET PRIVATE", BOT_SET_PRIVATE_SYNTAX);
+ syntax_error(Config->s_BotServ, u, "SET PRIVATE", BOT_SET_PRIVATE_SYNTAX);
return MOD_CONT;
}
else if (!(ci = cs_findchan(chan)))
- notice_lang(Config.s_BotServ, u, CHAN_X_NOT_REGISTERED, chan.c_str());
+ notice_lang(Config->s_BotServ, u, CHAN_X_NOT_REGISTERED, chan.c_str());
else if (!u->Account()->HasPriv("botserv/administration") && !check_access(u, ci, CA_SET))
- notice_lang(Config.s_BotServ, u, ACCESS_DENIED);
+ notice_lang(Config->s_BotServ, u, ACCESS_DENIED);
else
{
if (option.equals_ci("DONTKICKOPS"))
@@ -69,60 +69,60 @@ class CommandBSSet : public Command
if (value.equals_ci("ON"))
{
ci->botflags.SetFlag(BS_DONTKICKOPS);
- notice_lang(Config.s_BotServ, u, BOT_SET_DONTKICKOPS_ON, ci->name.c_str());
+ notice_lang(Config->s_BotServ, u, BOT_SET_DONTKICKOPS_ON, ci->name.c_str());
}
else if (value.equals_ci("OFF"))
{
ci->botflags.UnsetFlag(BS_DONTKICKOPS);
- notice_lang(Config.s_BotServ, u, BOT_SET_DONTKICKOPS_OFF, ci->name.c_str());
+ notice_lang(Config->s_BotServ, u, BOT_SET_DONTKICKOPS_OFF, ci->name.c_str());
}
else
- syntax_error(Config.s_BotServ, u, "SET DONTKICKOPS", BOT_SET_DONTKICKOPS_SYNTAX);
+ syntax_error(Config->s_BotServ, u, "SET DONTKICKOPS", BOT_SET_DONTKICKOPS_SYNTAX);
}
else if (option.equals_ci("DONTKICKVOICES"))
{
if (value.equals_ci("ON"))
{
ci->botflags.SetFlag(BS_DONTKICKVOICES);
- notice_lang(Config.s_BotServ, u, BOT_SET_DONTKICKVOICES_ON, ci->name.c_str());
+ notice_lang(Config->s_BotServ, u, BOT_SET_DONTKICKVOICES_ON, ci->name.c_str());
}
else if (value.equals_ci("OFF"))
{
ci->botflags.UnsetFlag(BS_DONTKICKVOICES);
- notice_lang(Config.s_BotServ, u, BOT_SET_DONTKICKVOICES_OFF, ci->name.c_str());
+ notice_lang(Config->s_BotServ, u, BOT_SET_DONTKICKVOICES_OFF, ci->name.c_str());
}
else
- syntax_error(Config.s_BotServ, u, "SET DONTKICKVOICES", BOT_SET_DONTKICKVOICES_SYNTAX);
+ syntax_error(Config->s_BotServ, u, "SET DONTKICKVOICES", BOT_SET_DONTKICKVOICES_SYNTAX);
}
else if (option.equals_ci("FANTASY"))
{
if (value.equals_ci("ON"))
{
ci->botflags.SetFlag(BS_FANTASY);
- notice_lang(Config.s_BotServ, u, BOT_SET_FANTASY_ON, ci->name.c_str());
+ notice_lang(Config->s_BotServ, u, BOT_SET_FANTASY_ON, ci->name.c_str());
}
else if (value.equals_ci("OFF"))
{
ci->botflags.UnsetFlag(BS_FANTASY);
- notice_lang(Config.s_BotServ, u, BOT_SET_FANTASY_OFF, ci->name.c_str());
+ notice_lang(Config->s_BotServ, u, BOT_SET_FANTASY_OFF, ci->name.c_str());
}
else
- syntax_error(Config.s_BotServ, u, "SET FANTASY", BOT_SET_FANTASY_SYNTAX);
+ syntax_error(Config->s_BotServ, u, "SET FANTASY", BOT_SET_FANTASY_SYNTAX);
}
else if (option.equals_ci("GREET"))
{
if (value.equals_ci("ON"))
{
ci->botflags.SetFlag(BS_GREET);
- notice_lang(Config.s_BotServ, u, BOT_SET_GREET_ON, ci->name.c_str());
+ notice_lang(Config->s_BotServ, u, BOT_SET_GREET_ON, ci->name.c_str());
}
else if (value.equals_ci("OFF"))
{
ci->botflags.UnsetFlag(BS_GREET);
- notice_lang(Config.s_BotServ, u, BOT_SET_GREET_OFF, ci->name.c_str());
+ notice_lang(Config->s_BotServ, u, BOT_SET_GREET_OFF, ci->name.c_str());
}
else
- syntax_error(Config.s_BotServ, u, "SET GREET", BOT_SET_GREET_SYNTAX);
+ syntax_error(Config->s_BotServ, u, "SET GREET", BOT_SET_GREET_SYNTAX);
}
else if (u->Account()->HasCommand("botserv/set/nobot") && option.equals_ci("NOBOT"))
{
@@ -131,33 +131,33 @@ class CommandBSSet : public Command
ci->botflags.SetFlag(BS_NOBOT);
if (ci->bi)
ci->bi->UnAssign(u, ci);
- notice_lang(Config.s_BotServ, u, BOT_SET_NOBOT_ON, ci->name.c_str());
+ notice_lang(Config->s_BotServ, u, BOT_SET_NOBOT_ON, ci->name.c_str());
}
else if (value.equals_ci("OFF"))
{
ci->botflags.UnsetFlag(BS_NOBOT);
- notice_lang(Config.s_BotServ, u, BOT_SET_NOBOT_OFF, ci->name.c_str());
+ notice_lang(Config->s_BotServ, u, BOT_SET_NOBOT_OFF, ci->name.c_str());
}
else
- syntax_error(Config.s_BotServ, u, "SET NOBOT", BOT_SET_NOBOT_SYNTAX);
+ syntax_error(Config->s_BotServ, u, "SET NOBOT", BOT_SET_NOBOT_SYNTAX);
}
else if (option.equals_ci("SYMBIOSIS"))
{
if (value.equals_ci("ON"))
{
ci->botflags.SetFlag(BS_SYMBIOSIS);
- notice_lang(Config.s_BotServ, u, BOT_SET_SYMBIOSIS_ON, ci->name.c_str());
+ notice_lang(Config->s_BotServ, u, BOT_SET_SYMBIOSIS_ON, ci->name.c_str());
}
else if (value.equals_ci("OFF"))
{
ci->botflags.UnsetFlag(BS_SYMBIOSIS);
- notice_lang(Config.s_BotServ, u, BOT_SET_SYMBIOSIS_OFF, ci->name.c_str());
+ notice_lang(Config->s_BotServ, u, BOT_SET_SYMBIOSIS_OFF, ci->name.c_str());
}
else
- syntax_error(Config.s_BotServ, u, "SET SYMBIOSIS", BOT_SET_SYMBIOSIS_SYNTAX);
+ syntax_error(Config->s_BotServ, u, "SET SYMBIOSIS", BOT_SET_SYMBIOSIS_SYNTAX);
}
else
- notice_help(Config.s_BotServ, u, BOT_SET_UNKNOWN, option.c_str());
+ notice_help(Config->s_BotServ, u, BOT_SET_UNKNOWN, option.c_str());
}
return MOD_CONT;
}
@@ -166,24 +166,24 @@ class CommandBSSet : public Command
{
if (subcommand.empty())
{
- notice_help(Config.s_BotServ, u, BOT_HELP_SET);
+ notice_help(Config->s_BotServ, u, BOT_HELP_SET);
if (u->Account() && u->Account()->IsServicesOper())
- notice_help(Config.s_BotServ, u, BOT_SERVADMIN_HELP_SET);
+ notice_help(Config->s_BotServ, u, BOT_SERVADMIN_HELP_SET);
}
else if (subcommand.equals_ci("DONTKICKOPS"))
- notice_help(Config.s_BotServ, u, BOT_HELP_SET_DONTKICKOPS);
+ notice_help(Config->s_BotServ, u, BOT_HELP_SET_DONTKICKOPS);
else if (subcommand.equals_ci("DONTKICKVOICES"))
- notice_help(Config.s_BotServ, u, BOT_HELP_SET_DONTKICKVOICES);
+ notice_help(Config->s_BotServ, u, BOT_HELP_SET_DONTKICKVOICES);
else if (subcommand.equals_ci("FANTASY"))
- notice_help(Config.s_BotServ, u, BOT_HELP_SET_FANTASY);
+ notice_help(Config->s_BotServ, u, BOT_HELP_SET_FANTASY);
else if (subcommand.equals_ci("GREET"))
- notice_help(Config.s_BotServ, u, BOT_HELP_SET_GREET);
+ notice_help(Config->s_BotServ, u, BOT_HELP_SET_GREET);
else if (subcommand.equals_ci("SYMBIOSIS"))
- notice_lang(Config.s_BotServ, u, BOT_HELP_SET_SYMBIOSIS, Config.s_ChanServ.c_str());
+ notice_lang(Config->s_BotServ, u, BOT_HELP_SET_SYMBIOSIS, Config->s_ChanServ.c_str());
else if (subcommand.equals_ci("NOBOT"))
- notice_lang(Config.s_BotServ, u, BOT_SERVADMIN_HELP_SET_NOBOT);
+ notice_lang(Config->s_BotServ, u, BOT_SERVADMIN_HELP_SET_NOBOT);
else if (subcommand.equals_ci("PRIVATE"))
- notice_lang(Config.s_BotServ, u, BOT_SERVADMIN_HELP_SET_PRIVATE);
+ notice_lang(Config->s_BotServ, u, BOT_SERVADMIN_HELP_SET_PRIVATE);
else
return false;
@@ -192,12 +192,12 @@ class CommandBSSet : public Command
void OnSyntaxError(User *u, const Anope::string &subcommand)
{
- syntax_error(Config.s_BotServ, u, "SET", BOT_SET_SYNTAX);
+ syntax_error(Config->s_BotServ, u, "SET", BOT_SET_SYNTAX);
}
void OnServHelp(User *u)
{
- notice_lang(Config.s_BotServ, u, BOT_HELP_CMD_SET);
+ notice_lang(Config->s_BotServ, u, BOT_HELP_CMD_SET);
}
};
diff --git a/modules/core/bs_unassign.cpp b/modules/core/bs_unassign.cpp
index 8dd01f7f5..bde37f78e 100644
--- a/modules/core/bs_unassign.cpp
+++ b/modules/core/bs_unassign.cpp
@@ -27,35 +27,35 @@ class CommandBSUnassign : public Command
ChannelMode *cm = ModeManager::FindChannelModeByName(CMODE_PERM);
if (readonly)
- notice_lang(Config.s_BotServ, u, BOT_ASSIGN_READONLY);
+ notice_lang(Config->s_BotServ, u, BOT_ASSIGN_READONLY);
else if (!u->Account()->HasPriv("botserv/administration") && !check_access(u, ci, CA_ASSIGN))
- notice_lang(Config.s_BotServ, u, ACCESS_DENIED);
+ notice_lang(Config->s_BotServ, u, ACCESS_DENIED);
else if (!ci->bi)
- notice_help(Config.s_BotServ, u, BOT_NOT_ASSIGNED);
+ notice_help(Config->s_BotServ, u, BOT_NOT_ASSIGNED);
else if (ci->HasFlag(CI_PERSIST) && !cm)
- notice_help(Config.s_BotServ, u, BOT_UNASSIGN_PERSISTANT_CHAN);
+ notice_help(Config->s_BotServ, u, BOT_UNASSIGN_PERSISTANT_CHAN);
else
{
ci->bi->UnAssign(u, ci);
- notice_lang(Config.s_BotServ, u, BOT_UNASSIGN_UNASSIGNED, ci->name.c_str());
+ notice_lang(Config->s_BotServ, u, BOT_UNASSIGN_UNASSIGNED, ci->name.c_str());
}
return MOD_CONT;
}
bool OnHelp(User *u, const Anope::string &subcommand)
{
- notice_help(Config.s_BotServ, u, BOT_HELP_UNASSIGN);
+ notice_help(Config->s_BotServ, u, BOT_HELP_UNASSIGN);
return true;
}
void OnSyntaxError(User *u, const Anope::string &subcommand)
{
- syntax_error(Config.s_BotServ, u, "UNASSIGN", BOT_UNASSIGN_SYNTAX);
+ syntax_error(Config->s_BotServ, u, "UNASSIGN", BOT_UNASSIGN_SYNTAX);
}
void OnServHelp(User *u)
{
- notice_lang(Config.s_BotServ, u, BOT_HELP_CMD_UNASSIGN);
+ notice_lang(Config->s_BotServ, u, BOT_HELP_CMD_UNASSIGN);
}
};
diff --git a/modules/core/cs_access.cpp b/modules/core/cs_access.cpp
index 23e5a415b..5fea57486 100644
--- a/modules/core/cs_access.cpp
+++ b/modules/core/cs_access.cpp
@@ -27,9 +27,9 @@ class AccessListCallback : public NumberList
~AccessListCallback()
{
if (SentHeader)
- notice_lang(Config.s_ChanServ, u, CHAN_ACCESS_LIST_FOOTER, ci->name.c_str());
+ notice_lang(Config->s_ChanServ, u, CHAN_ACCESS_LIST_FOOTER, ci->name.c_str());
else
- notice_lang(Config.s_ChanServ, u, CHAN_ACCESS_NO_MATCH, ci->name.c_str());
+ notice_lang(Config->s_ChanServ, u, CHAN_ACCESS_NO_MATCH, ci->name.c_str());
}
virtual void HandleNumber(unsigned Number)
@@ -40,7 +40,7 @@ class AccessListCallback : public NumberList
if (!SentHeader)
{
SentHeader = true;
- notice_lang(Config.s_ChanServ, u, CHAN_ACCESS_LIST_HEADER, ci->name.c_str());
+ notice_lang(Config->s_ChanServ, u, CHAN_ACCESS_LIST_HEADER, ci->name.c_str());
}
DoList(u, ci, Number - 1, ci->GetAccess(Number - 1));
@@ -51,10 +51,10 @@ class AccessListCallback : public NumberList
if (ci->HasFlag(CI_XOP))
{
Anope::string xop = get_xop_level(access->level);
- notice_lang(Config.s_ChanServ, u, CHAN_ACCESS_LIST_XOP_FORMAT, Number + 1, xop.c_str(), access->nc->display.c_str());
+ notice_lang(Config->s_ChanServ, u, CHAN_ACCESS_LIST_XOP_FORMAT, Number + 1, xop.c_str(), access->nc->display.c_str());
}
else
- notice_lang(Config.s_ChanServ, u, CHAN_ACCESS_LIST_AXS_FORMAT, Number + 1, access->level, access->nc->display.c_str());
+ notice_lang(Config->s_ChanServ, u, CHAN_ACCESS_LIST_AXS_FORMAT, Number + 1, access->level, access->nc->display.c_str());
}
};
@@ -73,7 +73,7 @@ class AccessViewCallback : public AccessListCallback
if (!SentHeader)
{
SentHeader = true;
- notice_lang(Config.s_ChanServ, u, CHAN_ACCESS_LIST_HEADER, ci->name.c_str());
+ notice_lang(Config->s_ChanServ, u, CHAN_ACCESS_LIST_HEADER, ci->name.c_str());
}
DoList(u, ci, Number - 1, ci->GetAccess(Number - 1));
@@ -97,10 +97,10 @@ class AccessViewCallback : public AccessListCallback
if (ci->HasFlag(CI_XOP))
{
Anope::string xop = get_xop_level(access->level);
- notice_lang(Config.s_ChanServ, u, CHAN_ACCESS_VIEW_XOP_FORMAT, Number + 1, xop.c_str(), access->nc->display.c_str(), access->creator.c_str(), timebuf);
+ notice_lang(Config->s_ChanServ, u, CHAN_ACCESS_VIEW_XOP_FORMAT, Number + 1, xop.c_str(), access->nc->display.c_str(), access->creator.c_str(), timebuf);
}
else
- notice_lang(Config.s_ChanServ, u, CHAN_ACCESS_VIEW_AXS_FORMAT, Number + 1, access->level, access->nc->display.c_str(), access->creator.c_str(), timebuf);
+ notice_lang(Config->s_ChanServ, u, CHAN_ACCESS_VIEW_AXS_FORMAT, Number + 1, access->level, access->nc->display.c_str(), access->creator.c_str(), timebuf);
}
};
@@ -119,17 +119,17 @@ class AccessDelCallback : public NumberList
~AccessDelCallback()
{
if (Denied && !Deleted)
- notice_lang(Config.s_ChanServ, u, ACCESS_DENIED);
+ notice_lang(Config->s_ChanServ, u, ACCESS_DENIED);
else if (!Deleted)
- notice_lang(Config.s_ChanServ, u, CHAN_ACCESS_NO_MATCH, ci->name.c_str());
+ notice_lang(Config->s_ChanServ, u, CHAN_ACCESS_NO_MATCH, ci->name.c_str());
else
{
- Alog() << Config.s_ChanServ << ": " << u->GetMask() << " (level " << get_access(u, ci) << ") deleted access of user" << (Deleted == 1 ? " " : "s ") << Nicks << " on " << ci->name;
+ Alog() << Config->s_ChanServ << ": " << u->GetMask() << " (level " << get_access(u, ci) << ") deleted access of user" << (Deleted == 1 ? " " : "s ") << Nicks << " on " << ci->name;
if (Deleted == 1)
- notice_lang(Config.s_ChanServ, u, CHAN_ACCESS_DELETED_ONE, ci->name.c_str());
+ notice_lang(Config->s_ChanServ, u, CHAN_ACCESS_DELETED_ONE, ci->name.c_str());
else
- notice_lang(Config.s_ChanServ, u, CHAN_ACCESS_DELETED_SEVERAL, Deleted, ci->name.c_str());
+ notice_lang(Config->s_ChanServ, u, CHAN_ACCESS_DELETED_SEVERAL, Deleted, ci->name.c_str());
}
}
@@ -168,30 +168,30 @@ class CommandCSAccess : public Command
if (level >= ulev && !u->Account()->HasPriv("chanserv/access/modify"))
{
- notice_lang(Config.s_ChanServ, u, ACCESS_DENIED);
+ notice_lang(Config->s_ChanServ, u, ACCESS_DENIED);
return MOD_CONT;
}
if (!level)
{
- notice_lang(Config.s_ChanServ, u, CHAN_ACCESS_LEVEL_NONZERO);
+ notice_lang(Config->s_ChanServ, u, CHAN_ACCESS_LEVEL_NONZERO);
return MOD_CONT;
}
else if (level <= ACCESS_INVALID || level >= ACCESS_FOUNDER)
{
- notice_lang(Config.s_ChanServ, u, CHAN_ACCESS_LEVEL_RANGE, ACCESS_INVALID + 1, ACCESS_FOUNDER - 1);
+ notice_lang(Config->s_ChanServ, u, CHAN_ACCESS_LEVEL_RANGE, ACCESS_INVALID + 1, ACCESS_FOUNDER - 1);
return MOD_CONT;
}
NickAlias *na = findnick(nick);
if (!na)
{
- notice_lang(Config.s_ChanServ, u, CHAN_ACCESS_NICKS_ONLY);
+ notice_lang(Config->s_ChanServ, u, CHAN_ACCESS_NICKS_ONLY);
return MOD_CONT;
}
else if (na->HasFlag(NS_FORBIDDEN))
{
- notice_lang(Config.s_ChanServ, u, NICK_X_FORBIDDEN, nick.c_str());
+ notice_lang(Config->s_ChanServ, u, NICK_X_FORBIDDEN, nick.c_str());
return MOD_CONT;
}
@@ -202,26 +202,26 @@ class CommandCSAccess : public Command
/* Don't allow lowering from a level >= ulev */
if (access->level >= ulev && !u->Account()->HasPriv("chanserv/access/modify"))
{
- notice_lang(Config.s_ChanServ, u, ACCESS_DENIED);
+ notice_lang(Config->s_ChanServ, u, ACCESS_DENIED);
return MOD_CONT;
}
if (access->level == level)
{
- notice_lang(Config.s_ChanServ, u, CHAN_ACCESS_LEVEL_UNCHANGED, access->nc->display.c_str(), ci->name.c_str(), level);
+ notice_lang(Config->s_ChanServ, u, CHAN_ACCESS_LEVEL_UNCHANGED, access->nc->display.c_str(), ci->name.c_str(), level);
return MOD_CONT;
}
access->level = level;
FOREACH_MOD(I_OnAccessChange, OnAccessChange(ci, u, na->nc, level));
- Alog() << Config.s_ChanServ << ": " << u->GetMask() << " (level " << ulev << ") set access level " << access->level << " to " << na->nick << " (group " << nc->display << ") on channel " << ci->name;
- notice_lang(Config.s_ChanServ, u, CHAN_ACCESS_LEVEL_CHANGED, nc->display.c_str(), ci->name.c_str(), level);
+ Alog() << Config->s_ChanServ << ": " << u->GetMask() << " (level " << ulev << ") set access level " << access->level << " to " << na->nick << " (group " << nc->display << ") on channel " << ci->name;
+ notice_lang(Config->s_ChanServ, u, CHAN_ACCESS_LEVEL_CHANGED, nc->display.c_str(), ci->name.c_str(), level);
return MOD_CONT;
}
- if (ci->GetAccessCount() >= Config.CSAccessMax)
+ if (ci->GetAccessCount() >= Config->CSAccessMax)
{
- notice_lang(Config.s_ChanServ, u, CHAN_ACCESS_REACHED_LIMIT, Config.CSAccessMax);
+ notice_lang(Config->s_ChanServ, u, CHAN_ACCESS_REACHED_LIMIT, Config->CSAccessMax);
return MOD_CONT;
}
@@ -229,8 +229,8 @@ class CommandCSAccess : public Command
FOREACH_MOD(I_OnAccessAdd, OnAccessAdd(ci, u, nc, level));
- Alog() << Config.s_ChanServ << ": " << u->GetMask() << " (level " << ulev << ") set access level " << level << " to " << na->nick << " (group " << nc->display << ") on channel " << ci->name;
- notice_lang(Config.s_ChanServ, u, CHAN_ACCESS_ADDED, nc->display.c_str(), ci->name.c_str(), level);
+ Alog() << Config->s_ChanServ << ": " << u->GetMask() << " (level " << ulev << ") set access level " << level << " to " << na->nick << " (group " << nc->display << ") on channel " << ci->name;
+ notice_lang(Config->s_ChanServ, u, CHAN_ACCESS_ADDED, nc->display.c_str(), ci->name.c_str(), level);
return MOD_CONT;
}
@@ -240,7 +240,7 @@ class CommandCSAccess : public Command
Anope::string nick = params[2];
if (!ci->GetAccessCount())
- notice_lang(Config.s_ChanServ, u, CHAN_ACCESS_LIST_EMPTY, ci->name.c_str());
+ notice_lang(Config->s_ChanServ, u, CHAN_ACCESS_LIST_EMPTY, ci->name.c_str());
else if (isdigit(nick[0]) && nick.find_first_not_of("1234567890,-") == Anope::string::npos)
{
AccessDelCallback list(u, ci, nick);
@@ -251,7 +251,7 @@ class CommandCSAccess : public Command
NickAlias *na = findnick(nick);
if (!na)
{
- notice_lang(Config.s_ChanServ, u, NICK_X_NOT_REGISTERED, nick.c_str());
+ notice_lang(Config->s_ChanServ, u, NICK_X_NOT_REGISTERED, nick.c_str());
return MOD_CONT;
}
@@ -268,13 +268,13 @@ class CommandCSAccess : public Command
}
if (i == end)
- notice_lang(Config.s_ChanServ, u, CHAN_ACCESS_NOT_FOUND, nick.c_str(), ci->name.c_str());
+ notice_lang(Config->s_ChanServ, u, CHAN_ACCESS_NOT_FOUND, nick.c_str(), ci->name.c_str());
else if (get_access(u, ci) <= access->level && !u->Account()->HasPriv("chanserv/access/modify"))
- notice_lang(Config.s_ChanServ, u, ACCESS_DENIED);
+ notice_lang(Config->s_ChanServ, u, ACCESS_DENIED);
else
{
- notice_lang(Config.s_ChanServ, u, CHAN_ACCESS_DELETED, access->nc->display.c_str(), ci->name.c_str());
- Alog() << Config.s_ChanServ << ": " << u->GetMask() << " (level " << get_access(u, ci) << ") deleted access of " << na->nick << " (group " << access->nc->display << ") on " << ci->name;
+ notice_lang(Config->s_ChanServ, u, CHAN_ACCESS_DELETED, access->nc->display.c_str(), ci->name.c_str());
+ Alog() << Config->s_ChanServ << ": " << u->GetMask() << " (level " << get_access(u, ci) << ") deleted access of " << na->nick << " (group " << access->nc->display << ") on " << ci->name;
FOREACH_MOD(I_OnAccessDel, OnAccessDel(ci, u, na->nc));
ci->EraseAccess(i);
@@ -289,7 +289,7 @@ class CommandCSAccess : public Command
Anope::string nick = params.size() > 2 ? params[2] : "";
if (!ci->GetAccessCount())
- notice_lang(Config.s_ChanServ, u, CHAN_ACCESS_LIST_EMPTY, ci->name.c_str());
+ notice_lang(Config->s_ChanServ, u, CHAN_ACCESS_LIST_EMPTY, ci->name.c_str());
else if (!nick.empty() && nick.find_first_not_of("1234567890,-") == Anope::string::npos)
{
AccessListCallback list(u, ci, nick);
@@ -309,16 +309,16 @@ class CommandCSAccess : public Command
if (!SentHeader)
{
SentHeader = true;
- notice_lang(Config.s_ChanServ, u, CHAN_ACCESS_LIST_HEADER, ci->name.c_str());
+ notice_lang(Config->s_ChanServ, u, CHAN_ACCESS_LIST_HEADER, ci->name.c_str());
}
AccessListCallback::DoList(u, ci, i, access);
}
if (SentHeader)
- notice_lang(Config.s_ChanServ, u, CHAN_ACCESS_LIST_FOOTER, ci->name.c_str());
+ notice_lang(Config->s_ChanServ, u, CHAN_ACCESS_LIST_FOOTER, ci->name.c_str());
else
- notice_lang(Config.s_ChanServ, u, CHAN_ACCESS_NO_MATCH, ci->name.c_str());
+ notice_lang(Config->s_ChanServ, u, CHAN_ACCESS_NO_MATCH, ci->name.c_str());
}
return MOD_CONT;
@@ -329,7 +329,7 @@ class CommandCSAccess : public Command
Anope::string nick = params.size() > 2 ? params[2] : "";
if (!ci->GetAccessCount())
- notice_lang(Config.s_ChanServ, u, CHAN_ACCESS_LIST_EMPTY, ci->name.c_str());
+ notice_lang(Config->s_ChanServ, u, CHAN_ACCESS_LIST_EMPTY, ci->name.c_str());
else if (!nick.empty() && nick.find_first_not_of("1234567890,-") == Anope::string::npos)
{
AccessViewCallback list(u, ci, nick);
@@ -349,16 +349,16 @@ class CommandCSAccess : public Command
if (!SentHeader)
{
SentHeader = true;
- notice_lang(Config.s_ChanServ, u, CHAN_ACCESS_LIST_HEADER, ci->name.c_str());
+ notice_lang(Config->s_ChanServ, u, CHAN_ACCESS_LIST_HEADER, ci->name.c_str());
}
AccessViewCallback::DoList(u, ci, i, access);
}
if (SentHeader)
- notice_lang(Config.s_ChanServ, u, CHAN_ACCESS_LIST_FOOTER, ci->name.c_str());
+ notice_lang(Config->s_ChanServ, u, CHAN_ACCESS_LIST_FOOTER, ci->name.c_str());
else
- notice_lang(Config.s_ChanServ, u, CHAN_ACCESS_NO_MATCH, ci->name.c_str());
+ notice_lang(Config->s_ChanServ, u, CHAN_ACCESS_NO_MATCH, ci->name.c_str());
}
return MOD_CONT;
@@ -367,15 +367,15 @@ class CommandCSAccess : public Command
CommandReturn DoClear(User *u, ChannelInfo *ci)
{
if (!IsFounder(u, ci) && !u->Account()->HasPriv("chanserv/access/modify"))
- notice_lang(Config.s_ChanServ, u, ACCESS_DENIED);
+ notice_lang(Config->s_ChanServ, u, ACCESS_DENIED);
else
{
ci->ClearAccess();
FOREACH_MOD(I_OnAccessClear, OnAccessClear(ci, u));
- notice_lang(Config.s_ChanServ, u, CHAN_ACCESS_CLEAR, ci->name.c_str());
- Alog() << Config.s_ChanServ << ": " << u->GetMask() << " (level " << get_access(u, ci) << " cleared access list on " << ci->name;
+ notice_lang(Config->s_ChanServ, u, CHAN_ACCESS_CLEAR, ci->name.c_str());
+ Alog() << Config->s_ChanServ << ": " << u->GetMask() << " (level " << get_access(u, ci) << " cleared access list on " << ci->name;
}
return MOD_CONT;
@@ -407,14 +407,14 @@ class CommandCSAccess : public Command
else if (ci->HasFlag(CI_XOP) && !is_list && !is_clear)
{
if (ModeManager::FindChannelModeByName(CMODE_HALFOP))
- notice_lang(Config.s_ChanServ, u, CHAN_ACCESS_XOP_HOP, Config.s_ChanServ.c_str());
+ notice_lang(Config->s_ChanServ, u, CHAN_ACCESS_XOP_HOP, Config->s_ChanServ.c_str());
else
- notice_lang(Config.s_ChanServ, u, CHAN_ACCESS_XOP, Config.s_ChanServ.c_str());
+ notice_lang(Config->s_ChanServ, u, CHAN_ACCESS_XOP, Config->s_ChanServ.c_str());
}
else if ((is_list && !check_access(u, ci, CA_ACCESS_LIST) && !u->Account()->HasCommand("chanserv/access/list")) || (!is_list && !check_access(u, ci, CA_ACCESS_CHANGE) && !u->Account()->HasPriv("chanserv/access/modify")))
- notice_lang(Config.s_ChanServ, u, ACCESS_DENIED);
+ notice_lang(Config->s_ChanServ, u, ACCESS_DENIED);
else if (readonly && (cmd.equals_ci("ADD") || cmd.equals_ci("DEL") || cmd.equals_ci("CLEAR")))
- notice_lang(Config.s_ChanServ, u, CHAN_ACCESS_DISABLED);
+ notice_lang(Config->s_ChanServ, u, CHAN_ACCESS_DISABLED);
else if (cmd.equals_ci("ADD"))
this->DoAdd(u, ci, params);
else if (cmd.equals_ci("DEL"))
@@ -433,14 +433,14 @@ class CommandCSAccess : public Command
bool OnHelp(User *u, const Anope::string &subcommand)
{
- notice_help(Config.s_ChanServ, u, CHAN_HELP_ACCESS);
- notice_help(Config.s_ChanServ, u, CHAN_HELP_ACCESS_LEVELS);
+ notice_help(Config->s_ChanServ, u, CHAN_HELP_ACCESS);
+ notice_help(Config->s_ChanServ, u, CHAN_HELP_ACCESS_LEVELS);
return true;
}
void OnSyntaxError(User *u, const Anope::string &subcommand)
{
- syntax_error(Config.s_ChanServ, u, "ACCESS", CHAN_ACCESS_SYNTAX);
+ syntax_error(Config->s_ChanServ, u, "ACCESS", CHAN_ACCESS_SYNTAX);
}
};
@@ -463,7 +463,7 @@ class CommandCSLevels : public Command
if (!error.empty())
this->OnSyntaxError(u, "SET");
else if (level <= ACCESS_INVALID || level > ACCESS_FOUNDER)
- notice_lang(Config.s_ChanServ, u, CHAN_LEVELS_RANGE, ACCESS_INVALID + 1, ACCESS_FOUNDER - 1);
+ notice_lang(Config->s_ChanServ, u, CHAN_LEVELS_RANGE, ACCESS_INVALID + 1, ACCESS_FOUNDER - 1);
else
for (int i = 0; levelinfo[i].what >= 0; ++i)
{
@@ -471,16 +471,16 @@ class CommandCSLevels : public Command
{
ci->levels[levelinfo[i].what] = level;
FOREACH_MOD(I_OnLevelChange, OnLevelChange(u, ci, i, level));
- Alog() << Config.s_ChanServ << ": " << u->GetMask() << " set level " << levelinfo[i].name << " on channel " << ci->name << " to " << level;
+ Alog() << Config->s_ChanServ << ": " << u->GetMask() << " set level " << levelinfo[i].name << " on channel " << ci->name << " to " << level;
if (level == ACCESS_FOUNDER)
- notice_lang(Config.s_ChanServ, u, CHAN_LEVELS_CHANGED_FOUNDER, levelinfo[i].name.c_str(), ci->name.c_str());
+ notice_lang(Config->s_ChanServ, u, CHAN_LEVELS_CHANGED_FOUNDER, levelinfo[i].name.c_str(), ci->name.c_str());
else
- notice_lang(Config.s_ChanServ, u, CHAN_LEVELS_CHANGED, levelinfo[i].name.c_str(), ci->name.c_str(), level);
+ notice_lang(Config->s_ChanServ, u, CHAN_LEVELS_CHANGED, levelinfo[i].name.c_str(), ci->name.c_str(), level);
return MOD_CONT;
}
}
- notice_lang(Config.s_ChanServ, u, CHAN_LEVELS_UNKNOWN, what.c_str(), Config.s_ChanServ.c_str());
+ notice_lang(Config->s_ChanServ, u, CHAN_LEVELS_UNKNOWN, what.c_str(), Config->s_ChanServ.c_str());
return MOD_CONT;
}
@@ -498,20 +498,20 @@ class CommandCSLevels : public Command
ci->levels[levelinfo[i].what] = ACCESS_INVALID;
FOREACH_MOD(I_OnLevelChange, OnLevelChange(u, ci, i, levelinfo[i].what));
- Alog() << Config.s_ChanServ << ": " << u->GetMask() << " disabled level " << levelinfo[i].name << " on channel " << ci->name;
- notice_lang(Config.s_ChanServ, u, CHAN_LEVELS_DISABLED, levelinfo[i].name.c_str(), ci->name.c_str());
+ Alog() << Config->s_ChanServ << ": " << u->GetMask() << " disabled level " << levelinfo[i].name << " on channel " << ci->name;
+ notice_lang(Config->s_ChanServ, u, CHAN_LEVELS_DISABLED, levelinfo[i].name.c_str(), ci->name.c_str());
return MOD_CONT;
}
}
- notice_lang(Config.s_ChanServ, u, CHAN_LEVELS_UNKNOWN, what.c_str(), Config.s_ChanServ.c_str());
+ notice_lang(Config->s_ChanServ, u, CHAN_LEVELS_UNKNOWN, what.c_str(), Config->s_ChanServ.c_str());
return MOD_CONT;
}
CommandReturn DoList(User *u, ChannelInfo *ci)
{
- notice_lang(Config.s_ChanServ, u, CHAN_LEVELS_LIST_HEADER, ci->name.c_str());
+ notice_lang(Config->s_ChanServ, u, CHAN_LEVELS_LIST_HEADER, ci->name.c_str());
if (!levelinfo_maxwidth)
for (int i = 0; levelinfo[i].what >= 0; ++i)
@@ -530,14 +530,14 @@ class CommandCSLevels : public Command
j = levelinfo[i].what;
if (j == CA_AUTOOP || j == CA_AUTODEOP || j == CA_AUTOVOICE || j == CA_NOJOIN)
- notice_lang(Config.s_ChanServ, u, CHAN_LEVELS_LIST_DISABLED, levelinfo_maxwidth, levelinfo[i].name.c_str());
+ notice_lang(Config->s_ChanServ, u, CHAN_LEVELS_LIST_DISABLED, levelinfo_maxwidth, levelinfo[i].name.c_str());
else
- notice_lang(Config.s_ChanServ, u, CHAN_LEVELS_LIST_DISABLED, levelinfo_maxwidth, levelinfo[i].name.c_str());
+ notice_lang(Config->s_ChanServ, u, CHAN_LEVELS_LIST_DISABLED, levelinfo_maxwidth, levelinfo[i].name.c_str());
}
else if (j == ACCESS_FOUNDER)
- notice_lang(Config.s_ChanServ, u, CHAN_LEVELS_LIST_FOUNDER, levelinfo_maxwidth, levelinfo[i].name.c_str());
+ notice_lang(Config->s_ChanServ, u, CHAN_LEVELS_LIST_FOUNDER, levelinfo_maxwidth, levelinfo[i].name.c_str());
else
- notice_lang(Config.s_ChanServ, u, CHAN_LEVELS_LIST_NORMAL, levelinfo_maxwidth, levelinfo[i].name.c_str(), j);
+ notice_lang(Config->s_ChanServ, u, CHAN_LEVELS_LIST_NORMAL, levelinfo_maxwidth, levelinfo[i].name.c_str(), j);
}
return MOD_CONT;
@@ -547,8 +547,8 @@ class CommandCSLevels : public Command
{
reset_levels(ci);
FOREACH_MOD(I_OnLevelChange, OnLevelChange(u, ci, -1, 0));
- Alog() << Config.s_ChanServ << ": " << u->GetMask() << " reset levels definitions on channel " << ci->name;
- notice_lang(Config.s_ChanServ, u, CHAN_LEVELS_RESET, ci->name.c_str());
+ Alog() << Config->s_ChanServ << ": " << u->GetMask() << " reset levels definitions on channel " << ci->name;
+ notice_lang(Config->s_ChanServ, u, CHAN_LEVELS_RESET, ci->name.c_str());
return MOD_CONT;
}
@@ -572,9 +572,9 @@ class CommandCSLevels : public Command
if (cmd.equals_ci("SET") ? s.empty() : (cmd.substr(0, 3).equals_ci("DIS") ? (what.empty() || !s.empty()) : !what.empty()))
this->OnSyntaxError(u, cmd);
else if (ci->HasFlag(CI_XOP))
- notice_lang(Config.s_ChanServ, u, CHAN_LEVELS_XOP);
+ notice_lang(Config->s_ChanServ, u, CHAN_LEVELS_XOP);
else if (!check_access(u, ci, CA_FOUNDER) && !u->Account()->HasPriv("chanserv/access/modify"))
- notice_lang(Config.s_ChanServ, u, ACCESS_DENIED);
+ notice_lang(Config->s_ChanServ, u, ACCESS_DENIED);
else if (cmd.equals_ci("SET"))
this->DoSet(u, ci, params);
else if (cmd.equals_ci("DIS") || cmd.equals_ci("DISABLE"))
@@ -591,19 +591,19 @@ class CommandCSLevels : public Command
bool OnHelp(User *u, const Anope::string &subcommand)
{
- notice_help(Config.s_ChanServ, u, CHAN_HELP_LEVELS);
+ notice_help(Config->s_ChanServ, u, CHAN_HELP_LEVELS);
return true;
}
void OnSyntaxError(User *u, const Anope::string &subcommand)
{
- syntax_error(Config.s_ChanServ, u, "LEVELS", CHAN_LEVELS_SYNTAX);
+ syntax_error(Config->s_ChanServ, u, "LEVELS", CHAN_LEVELS_SYNTAX);
}
void OnServHelp(User *u)
{
- notice_lang(Config.s_ChanServ, u, CHAN_HELP_CMD_ACCESS);
- notice_lang(Config.s_ChanServ, u, CHAN_HELP_CMD_LEVELS);
+ notice_lang(Config->s_ChanServ, u, CHAN_HELP_CMD_ACCESS);
+ notice_lang(Config->s_ChanServ, u, CHAN_HELP_CMD_LEVELS);
}
};
diff --git a/modules/core/cs_akick.cpp b/modules/core/cs_akick.cpp
index ee41c964b..c3d3c77b5 100644
--- a/modules/core/cs_akick.cpp
+++ b/modules/core/cs_akick.cpp
@@ -65,7 +65,7 @@ class AkickListCallback : public NumberList
~AkickListCallback()
{
if (!SentHeader)
- notice_lang(Config.s_ChanServ, u, CHAN_AKICK_NO_MATCH, ci->name.c_str());
+ notice_lang(Config->s_ChanServ, u, CHAN_AKICK_NO_MATCH, ci->name.c_str());
}
virtual void HandleNumber(unsigned Number)
@@ -76,7 +76,7 @@ class AkickListCallback : public NumberList
if (!SentHeader)
{
SentHeader = true;
- notice_lang(Config.s_ChanServ, u, CHAN_AKICK_LIST_HEADER, ci->name.c_str());
+ notice_lang(Config->s_ChanServ, u, CHAN_AKICK_LIST_HEADER, ci->name.c_str());
}
DoList(u, ci, Number - 1, ci->GetAkick(Number - 1));
@@ -84,7 +84,7 @@ class AkickListCallback : public NumberList
static void DoList(User *u, ChannelInfo *ci, unsigned index, AutoKick *akick)
{
- notice_lang(Config.s_ChanServ, u, CHAN_AKICK_LIST_FORMAT, index + 1, akick->HasFlag(AK_ISNICK) ? akick->nc->display.c_str() :akick->mask.c_str(), !akick->reason.empty() ? akick->reason.c_str() : getstring(u, NO_REASON));
+ notice_lang(Config->s_ChanServ, u, CHAN_AKICK_LIST_FORMAT, index + 1, akick->HasFlag(AK_ISNICK) ? akick->nc->display.c_str() :akick->mask.c_str(), !akick->reason.empty() ? akick->reason.c_str() : getstring(u, NO_REASON));
}
};
@@ -103,7 +103,7 @@ class AkickViewCallback : public AkickListCallback
if (!SentHeader)
{
SentHeader = true;
- notice_lang(Config.s_ChanServ, u, CHAN_AKICK_LIST_HEADER, ci->name.c_str());
+ notice_lang(Config->s_ChanServ, u, CHAN_AKICK_LIST_HEADER, ci->name.c_str());
}
DoList(u, ci, Number - 1, ci->GetAkick(Number - 1));
@@ -122,14 +122,14 @@ class AkickViewCallback : public AkickListCallback
else
snprintf(timebuf, sizeof(timebuf), "%s", getstring(u, UNKNOWN));
- notice_lang(Config.s_ChanServ, u, akick->HasFlag(AK_STUCK) ? CHAN_AKICK_VIEW_FORMAT_STUCK : CHAN_AKICK_VIEW_FORMAT, index + 1, akick->HasFlag(AK_ISNICK) ? akick->nc->display.c_str() : akick->mask.c_str(), !akick->creator.empty() ? akick->creator.c_str() : getstring(u, UNKNOWN), timebuf, !akick->reason.empty() ? akick->reason.c_str() : getstring(u, NO_REASON));
+ notice_lang(Config->s_ChanServ, u, akick->HasFlag(AK_STUCK) ? CHAN_AKICK_VIEW_FORMAT_STUCK : CHAN_AKICK_VIEW_FORMAT, index + 1, akick->HasFlag(AK_ISNICK) ? akick->nc->display.c_str() : akick->mask.c_str(), !akick->creator.empty() ? akick->creator.c_str() : getstring(u, UNKNOWN), timebuf, !akick->reason.empty() ? akick->reason.c_str() : getstring(u, NO_REASON));
if (akick->last_used)
{
char last_used[64];
tm = *localtime(&akick->last_used);
strftime_lang(last_used, sizeof(last_used), u, STRFTIME_SHORT_DATE_FORMAT, &tm);
- notice_lang(Config.s_ChanServ, u, CHAN_AKICK_LAST_USED, last_used);
+ notice_lang(Config->s_ChanServ, u, CHAN_AKICK_LAST_USED, last_used);
}
}
};
@@ -147,11 +147,11 @@ class AkickDelCallback : public NumberList
~AkickDelCallback()
{
if (!Deleted)
- notice_lang(Config.s_ChanServ, u, CHAN_AKICK_NO_MATCH, ci->name.c_str());
+ notice_lang(Config->s_ChanServ, u, CHAN_AKICK_NO_MATCH, ci->name.c_str());
else if (Deleted == 1)
- notice_lang(Config.s_ChanServ, u, CHAN_AKICK_DELETED_ONE, ci->name.c_str());
+ notice_lang(Config->s_ChanServ, u, CHAN_AKICK_DELETED_ONE, ci->name.c_str());
else
- notice_lang(Config.s_ChanServ, u, CHAN_AKICK_DELETED_SEVERAL, Deleted, ci->name.c_str());
+ notice_lang(Config->s_ChanServ, u, CHAN_AKICK_DELETED_SEVERAL, Deleted, ci->name.c_str());
}
void HandleNumber(unsigned Number)
@@ -185,7 +185,7 @@ class CommandCSAKick : public Command
{
if (na->HasFlag(NS_FORBIDDEN))
{
- notice_lang(Config.s_ChanServ, u, NICK_X_FORBIDDEN, mask.c_str());
+ notice_lang(Config->s_ChanServ, u, NICK_X_FORBIDDEN, mask.c_str());
return;
}
@@ -195,7 +195,7 @@ class CommandCSAKick : public Command
/* Check excepts BEFORE we get this far */
if (ModeManager::FindChannelModeByName(CMODE_EXCEPT) && is_excepted_mask(ci, mask))
{
- notice_lang(Config.s_ChanServ, u, CHAN_EXCEPTED, mask.c_str(), ci->name.c_str());
+ notice_lang(Config->s_ChanServ, u, CHAN_EXCEPTED, mask.c_str(), ci->name.c_str());
return;
}
@@ -205,7 +205,7 @@ class CommandCSAKick : public Command
{
if (nc == ci->founder || get_access_level(ci, nc) >= get_access(u, ci))
{
- notice_lang(Config.s_ChanServ, u, ACCESS_DENIED);
+ notice_lang(Config->s_ChanServ, u, ACCESS_DENIED);
return;
}
}
@@ -219,7 +219,7 @@ class CommandCSAKick : public Command
if ((check_access(u2, ci, CA_FOUNDER) || get_access(u2, ci) >= get_access(u, ci)) && match_usermask(mask, u2))
{
- notice_lang(Config.s_ChanServ, u, ACCESS_DENIED);
+ notice_lang(Config->s_ChanServ, u, ACCESS_DENIED);
return;
}
}
@@ -238,7 +238,7 @@ class CommandCSAKick : public Command
Anope::string buf = na2->nick + "!" + na2->last_usermask;
if (Anope::Match(buf, mask))
{
- notice_lang(Config.s_ChanServ, u, ACCESS_DENIED);
+ notice_lang(Config->s_ChanServ, u, ACCESS_DENIED);
return;
}
}
@@ -250,14 +250,14 @@ class CommandCSAKick : public Command
akick = ci->GetAkick(j);
if (akick->HasFlag(AK_ISNICK) ? akick->nc == nc : mask.equals_ci(akick->mask))
{
- notice_lang(Config.s_ChanServ, u, CHAN_AKICK_ALREADY_EXISTS, akick->HasFlag(AK_ISNICK) ? akick->nc->display.c_str() : akick->mask.c_str(), ci->name.c_str());
+ notice_lang(Config->s_ChanServ, u, CHAN_AKICK_ALREADY_EXISTS, akick->HasFlag(AK_ISNICK) ? akick->nc->display.c_str() : akick->mask.c_str(), ci->name.c_str());
return;
}
}
- if (ci->GetAkickCount() >= Config.CSAutokickMax)
+ if (ci->GetAkickCount() >= Config->CSAutokickMax)
{
- notice_lang(Config.s_ChanServ, u, CHAN_AKICK_REACHED_LIMIT, Config.CSAutokickMax);
+ notice_lang(Config->s_ChanServ, u, CHAN_AKICK_REACHED_LIMIT, Config->CSAutokickMax);
return;
}
@@ -268,7 +268,7 @@ class CommandCSAKick : public Command
FOREACH_MOD(I_OnAkickAdd, OnAkickAdd(u, ci, akick));
- notice_lang(Config.s_ChanServ, u, CHAN_AKICK_ADDED, mask.c_str(), ci->name.c_str());
+ notice_lang(Config->s_ChanServ, u, CHAN_AKICK_ADDED, mask.c_str(), ci->name.c_str());
this->DoEnforce(u, ci);
}
@@ -283,7 +283,7 @@ class CommandCSAKick : public Command
if (!ci->GetAkickCount())
{
- notice_lang(Config.s_ChanServ, u, CHAN_AKICK_LIST_EMPTY, ci->name.c_str());
+ notice_lang(Config->s_ChanServ, u, CHAN_AKICK_LIST_EMPTY, ci->name.c_str());
return;
}
@@ -302,12 +302,12 @@ class CommandCSAKick : public Command
if (i == end)
{
- notice_lang(Config.s_ChanServ, u, CHAN_AKICK_NOT_FOUND, mask.c_str(), ci->name.c_str());
+ notice_lang(Config->s_ChanServ, u, CHAN_AKICK_NOT_FOUND, mask.c_str(), ci->name.c_str());
return;
}
akick->SetFlag(AK_STUCK);
- notice_lang(Config.s_ChanServ, u, CHAN_AKICK_STUCK, akick->mask.c_str(), ci->name.c_str());
+ notice_lang(Config->s_ChanServ, u, CHAN_AKICK_STUCK, akick->mask.c_str(), ci->name.c_str());
if (ci->c)
stick_mask(ci, akick);
@@ -323,7 +323,7 @@ class CommandCSAKick : public Command
if (!ci->GetAkickCount())
{
- notice_lang(Config.s_ChanServ, u, CHAN_AKICK_LIST_EMPTY, ci->name.c_str());
+ notice_lang(Config->s_ChanServ, u, CHAN_AKICK_LIST_EMPTY, ci->name.c_str());
return;
}
@@ -342,12 +342,12 @@ class CommandCSAKick : public Command
if (i == end)
{
- notice_lang(Config.s_ChanServ, u, CHAN_AKICK_NOT_FOUND, mask.c_str(), ci->name.c_str());
+ notice_lang(Config->s_ChanServ, u, CHAN_AKICK_NOT_FOUND, mask.c_str(), ci->name.c_str());
return;
}
akick->UnsetFlag(AK_STUCK);
- notice_lang(Config.s_ChanServ, u, CHAN_AKICK_UNSTUCK, akick->mask.c_str(), ci->name.c_str());
+ notice_lang(Config->s_ChanServ, u, CHAN_AKICK_UNSTUCK, akick->mask.c_str(), ci->name.c_str());
}
void DoDel(User *u, ChannelInfo *ci, const std::vector<Anope::string> &params)
@@ -358,7 +358,7 @@ class CommandCSAKick : public Command
if (!ci->GetAkickCount())
{
- notice_lang(Config.s_ChanServ, u, CHAN_AKICK_LIST_EMPTY, ci->name.c_str());
+ notice_lang(Config->s_ChanServ, u, CHAN_AKICK_LIST_EMPTY, ci->name.c_str());
return;
}
@@ -383,13 +383,13 @@ class CommandCSAKick : public Command
if (i == ci->GetAkickCount())
{
- notice_lang(Config.s_ChanServ, u, CHAN_AKICK_NOT_FOUND, mask.c_str(), ci->name.c_str());
+ notice_lang(Config->s_ChanServ, u, CHAN_AKICK_NOT_FOUND, mask.c_str(), ci->name.c_str());
return;
}
ci->EraseAkick(i);
- notice_lang(Config.s_ChanServ, u, CHAN_AKICK_DELETED, mask.c_str(), ci->name.c_str());
+ notice_lang(Config->s_ChanServ, u, CHAN_AKICK_DELETED, mask.c_str(), ci->name.c_str());
}
}
@@ -399,7 +399,7 @@ class CommandCSAKick : public Command
if (!ci->GetAkickCount())
{
- notice_lang(Config.s_ChanServ, u, CHAN_AKICK_LIST_EMPTY, ci->name.c_str());
+ notice_lang(Config->s_ChanServ, u, CHAN_AKICK_LIST_EMPTY, ci->name.c_str());
return;
}
@@ -427,14 +427,14 @@ class CommandCSAKick : public Command
if (!SentHeader)
{
SentHeader = true;
- notice_lang(Config.s_ChanServ, u, CHAN_AKICK_LIST_HEADER, ci->name.c_str());
+ notice_lang(Config->s_ChanServ, u, CHAN_AKICK_LIST_HEADER, ci->name.c_str());
}
AkickListCallback::DoList(u, ci, i, akick);
}
if (!SentHeader)
- notice_lang(Config.s_ChanServ, u, CHAN_AKICK_NO_MATCH, ci->name.c_str());
+ notice_lang(Config->s_ChanServ, u, CHAN_AKICK_NO_MATCH, ci->name.c_str());
}
}
@@ -444,7 +444,7 @@ class CommandCSAKick : public Command
if (!ci->GetAkickCount())
{
- notice_lang(Config.s_ChanServ, u, CHAN_AKICK_LIST_EMPTY, ci->name.c_str());
+ notice_lang(Config->s_ChanServ, u, CHAN_AKICK_LIST_EMPTY, ci->name.c_str());
return;
}
@@ -472,14 +472,14 @@ class CommandCSAKick : public Command
if (!SentHeader)
{
SentHeader = true;
- notice_lang(Config.s_ChanServ, u, CHAN_AKICK_LIST_HEADER, ci->name.c_str());
+ notice_lang(Config->s_ChanServ, u, CHAN_AKICK_LIST_HEADER, ci->name.c_str());
}
AkickViewCallback::DoList(u, ci, i, akick);
}
if (!SentHeader)
- notice_lang(Config.s_ChanServ, u, CHAN_AKICK_NO_MATCH, ci->name.c_str());
+ notice_lang(Config->s_ChanServ, u, CHAN_AKICK_NO_MATCH, ci->name.c_str());
}
}
@@ -490,7 +490,7 @@ class CommandCSAKick : public Command
if (!c)
{
- notice_lang(Config.s_ChanServ, u, CHAN_X_NOT_IN_USE, ci->name.c_str());
+ notice_lang(Config->s_ChanServ, u, CHAN_X_NOT_IN_USE, ci->name.c_str());
return;
}
@@ -502,13 +502,13 @@ class CommandCSAKick : public Command
++count;
}
- notice_lang(Config.s_ChanServ, u, CHAN_AKICK_ENFORCE_DONE, ci->name.c_str(), count);
+ notice_lang(Config->s_ChanServ, u, CHAN_AKICK_ENFORCE_DONE, ci->name.c_str(), count);
}
void DoClear(User *u, ChannelInfo *ci)
{
ci->ClearAkick();
- notice_lang(Config.s_ChanServ, u, CHAN_AKICK_CLEAR, ci->name.c_str());
+ notice_lang(Config->s_ChanServ, u, CHAN_AKICK_CLEAR, ci->name.c_str());
}
public:
@@ -527,9 +527,9 @@ class CommandCSAKick : public Command
if (mask.empty() && (cmd.equals_ci("ADD") || cmd.equals_ci("STICK") || cmd.equals_ci("UNSTICK") || cmd.equals_ci("DEL")))
this->OnSyntaxError(u, cmd);
else if (!check_access(u, ci, CA_AKICK) && !u->Account()->HasPriv("chanserv/access/modify"))
- notice_lang(Config.s_ChanServ, u, ACCESS_DENIED);
+ notice_lang(Config->s_ChanServ, u, ACCESS_DENIED);
else if (!cmd.equals_ci("LIST") && !cmd.equals_ci("VIEW") && !cmd.equals_ci("ENFORCE") && readonly)
- notice_lang(Config.s_ChanServ, u, CHAN_AKICK_DISABLED);
+ notice_lang(Config->s_ChanServ, u, CHAN_AKICK_DISABLED);
else if (cmd.equals_ci("ADD"))
this->DoAdd(u, ci, params);
else if (cmd.equals_ci("STICK"))
@@ -554,18 +554,18 @@ class CommandCSAKick : public Command
bool OnHelp(User *u, const Anope::string &subcommand)
{
- notice_help(Config.s_ChanServ, u, CHAN_HELP_AKICK);
+ notice_help(Config->s_ChanServ, u, CHAN_HELP_AKICK);
return true;
}
void OnSyntaxError(User *u, const Anope::string &subcommand)
{
- syntax_error(Config.s_ChanServ, u, "AKICK", CHAN_AKICK_SYNTAX);
+ syntax_error(Config->s_ChanServ, u, "AKICK", CHAN_AKICK_SYNTAX);
}
void OnServHelp(User *u)
{
- notice_lang(Config.s_ChanServ, u, CHAN_HELP_CMD_AKICK);
+ notice_lang(Config->s_ChanServ, u, CHAN_HELP_CMD_AKICK);
}
};
diff --git a/modules/core/cs_ban.cpp b/modules/core/cs_ban.cpp
index 20e97503a..500db20f5 100644
--- a/modules/core/cs_ban.cpp
+++ b/modules/core/cs_ban.cpp
@@ -38,21 +38,21 @@ class CommandCSBan : public Command
ci = c->ci;
if (!c)
- notice_lang(Config.s_ChanServ, u, CHAN_X_NOT_IN_USE, chan.c_str());
+ notice_lang(Config->s_ChanServ, u, CHAN_X_NOT_IN_USE, chan.c_str());
else if (is_same ? !(u2 = u) : !(u2 = finduser(target)))
- notice_lang(Config.s_ChanServ, u, NICK_X_NOT_IN_USE, target.c_str());
+ notice_lang(Config->s_ChanServ, u, NICK_X_NOT_IN_USE, target.c_str());
else if (!is_same ? !check_access(u, ci, CA_BAN) : !check_access(u, ci, CA_BANME))
- notice_lang(Config.s_ChanServ, u, ACCESS_DENIED);
+ notice_lang(Config->s_ChanServ, u, ACCESS_DENIED);
else if (!is_same && (ci->HasFlag(CI_PEACE)) && (get_access(u2, ci) >= get_access(u, ci)))
- notice_lang(Config.s_ChanServ, u, ACCESS_DENIED);
+ notice_lang(Config->s_ChanServ, u, ACCESS_DENIED);
/*
* Dont ban/kick the user on channels where he is excepted
* to prevent services <-> server wars.
*/
else if (ModeManager::FindChannelModeByName(CMODE_EXCEPT) && is_excepted(ci, u2))
- notice_lang(Config.s_ChanServ, u, CHAN_EXCEPTED, u2->nick.c_str(), ci->name.c_str());
+ notice_lang(Config->s_ChanServ, u, CHAN_EXCEPTED, u2->nick.c_str(), ci->name.c_str());
else if (u2->IsProtected())
- notice_lang(Config.s_ChanServ, u, ACCESS_DENIED);
+ notice_lang(Config->s_ChanServ, u, ACCESS_DENIED);
else
{
Anope::string mask;
@@ -75,18 +75,18 @@ class CommandCSBan : public Command
bool OnHelp(User *u, const Anope::string &subcommand)
{
- notice_help(Config.s_ChanServ, u, CHAN_HELP_BAN);
+ notice_help(Config->s_ChanServ, u, CHAN_HELP_BAN);
return true;
}
void OnSyntaxError(User *u, const Anope::string &subcommand)
{
- syntax_error(Config.s_ChanServ, u, "BAN", CHAN_BAN_SYNTAX);
+ syntax_error(Config->s_ChanServ, u, "BAN", CHAN_BAN_SYNTAX);
}
void OnServHelp(User *u)
{
- notice_lang(Config.s_ChanServ, u, CHAN_HELP_CMD_BAN);
+ notice_lang(Config->s_ChanServ, u, CHAN_HELP_CMD_BAN);
}
};
diff --git a/modules/core/cs_clear.cpp b/modules/core/cs_clear.cpp
index f62e2b5f0..42a9bd53a 100644
--- a/modules/core/cs_clear.cpp
+++ b/modules/core/cs_clear.cpp
@@ -35,33 +35,33 @@ class CommandCSClear : public Command
ChannelMode *voice = ModeManager::FindChannelModeByName(CMODE_VOICE);
if (!c)
- notice_lang(Config.s_ChanServ, u, CHAN_X_NOT_IN_USE, chan.c_str());
+ notice_lang(Config->s_ChanServ, u, CHAN_X_NOT_IN_USE, chan.c_str());
else if (!u || !check_access(u, ci, CA_CLEAR))
- notice_lang(Config.s_ChanServ, u, ACCESS_DENIED);
+ notice_lang(Config->s_ChanServ, u, ACCESS_DENIED);
else if (what.equals_ci("bans"))
{
c->ClearBans();
- notice_lang(Config.s_ChanServ, u, CHAN_CLEARED_BANS, chan.c_str());
+ notice_lang(Config->s_ChanServ, u, CHAN_CLEARED_BANS, chan.c_str());
}
else if (ModeManager::FindChannelModeByName(CMODE_EXCEPT) && what.equals_ci("excepts"))
{
c->ClearExcepts();
- notice_lang(Config.s_ChanServ, u, CHAN_CLEARED_EXCEPTS, chan.c_str());
+ notice_lang(Config->s_ChanServ, u, CHAN_CLEARED_EXCEPTS, chan.c_str());
}
else if (ModeManager::FindChannelModeByName(CMODE_INVITE) && what.equals_ci("invites"))
{
c->ClearInvites();
- notice_lang(Config.s_ChanServ, u, CHAN_CLEARED_INVITES, chan.c_str());
+ notice_lang(Config->s_ChanServ, u, CHAN_CLEARED_INVITES, chan.c_str());
}
else if (what.equals_ci("modes"))
{
c->ClearModes();
check_modes(c);
- notice_lang(Config.s_ChanServ, u, CHAN_CLEARED_MODES, chan.c_str());
+ notice_lang(Config->s_ChanServ, u, CHAN_CLEARED_MODES, chan.c_str());
}
else if (what.equals_ci("ops"))
{
@@ -101,7 +101,7 @@ class CommandCSClear : public Command
}
}
- notice_lang(Config.s_ChanServ, u, CHAN_CLEARED_OPS, chan.c_str());
+ notice_lang(Config->s_ChanServ, u, CHAN_CLEARED_OPS, chan.c_str());
}
else if ((halfop && what.equals_ci("hops")) || (voice && what.equals_ci("voices")))
{
@@ -135,28 +135,28 @@ class CommandCSClear : public Command
c->Kick(NULL, uc->user, "%s", buf.c_str());
}
- notice_lang(Config.s_ChanServ, u, CHAN_CLEARED_USERS, chan.c_str());
+ notice_lang(Config->s_ChanServ, u, CHAN_CLEARED_USERS, chan.c_str());
}
else
- syntax_error(Config.s_ChanServ, u, "CLEAR", CHAN_CLEAR_SYNTAX);
+ syntax_error(Config->s_ChanServ, u, "CLEAR", CHAN_CLEAR_SYNTAX);
return MOD_CONT;
}
bool OnHelp(User *u, const Anope::string &subcommand)
{
- notice_help(Config.s_ChanServ, u, CHAN_HELP_CLEAR);
+ notice_help(Config->s_ChanServ, u, CHAN_HELP_CLEAR);
return true;
}
void OnSyntaxError(User *u, const Anope::string &subcommand)
{
- syntax_error(Config.s_ChanServ, u, "CLEAR", CHAN_CLEAR_SYNTAX);
+ syntax_error(Config->s_ChanServ, u, "CLEAR", CHAN_CLEAR_SYNTAX);
}
void OnServHelp(User *u)
{
- notice_lang(Config.s_ChanServ, u, CHAN_HELP_CMD_CLEAR);
+ notice_lang(Config->s_ChanServ, u, CHAN_HELP_CMD_CLEAR);
}
};
diff --git a/modules/core/cs_drop.cpp b/modules/core/cs_drop.cpp
index 5136772b2..608fe3664 100644
--- a/modules/core/cs_drop.cpp
+++ b/modules/core/cs_drop.cpp
@@ -29,7 +29,7 @@ class CommandCSDrop : public Command
if (readonly)
{
- notice_lang(Config.s_ChanServ, u, CHAN_DROP_DISABLED); // XXX: READ_ONLY_MODE?
+ notice_lang(Config->s_ChanServ, u, CHAN_DROP_DISABLED); // XXX: READ_ONLY_MODE?
return MOD_CONT;
}
@@ -37,19 +37,19 @@ class CommandCSDrop : public Command
if (ci->HasFlag(CI_FORBIDDEN) && !u->Account()->HasCommand("chanserv/drop"))
{
- notice_lang(Config.s_ChanServ, u, CHAN_X_FORBIDDEN, chan.c_str());
+ notice_lang(Config->s_ChanServ, u, CHAN_X_FORBIDDEN, chan.c_str());
return MOD_CONT;
}
if (ci->HasFlag(CI_SUSPENDED) && !u->Account()->HasCommand("chanserv/drop"))
{
- notice_lang(Config.s_ChanServ, u, CHAN_X_FORBIDDEN, chan.c_str());
+ notice_lang(Config->s_ChanServ, u, 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"))
{
- notice_lang(Config.s_ChanServ, u, ACCESS_DENIED);
+ notice_lang(Config->s_ChanServ, u, ACCESS_DENIED);
return MOD_CONT;
}
@@ -64,17 +64,17 @@ class CommandCSDrop : public Command
ircdproto->SendSQLineDel(&x);
}
- Alog() << Config.s_ChanServ << ": Channel " << ci->name << " dropped by " << u->GetMask() << " (founder: " << (ci->founder ? ci->founder->display : "(none)") << ")";
+ Alog() << Config->s_ChanServ << ": Channel " << ci->name << " dropped by " << u->GetMask() << " (founder: " << (ci->founder ? ci->founder->display : "(none)") << ")";
delete ci;
/* We must make sure that the Services admin has not normally the right to
* drop the channel before issuing the wallops.
*/
- if (Config.WallDrop && (level < ACCESS_FOUNDER || (!IsFounder(u, ci) && ci->HasFlag(CI_SECUREFOUNDER))))
+ if (Config->WallDrop && (level < ACCESS_FOUNDER || (!IsFounder(u, ci) && ci->HasFlag(CI_SECUREFOUNDER))))
ircdproto->SendGlobops(ChanServ, "\2%s\2 used DROP on channel \2%s\2", u->nick.c_str(), chan.c_str());
- notice_lang(Config.s_ChanServ, u, CHAN_DROPPED, chan.c_str());
+ notice_lang(Config->s_ChanServ, u, CHAN_DROPPED, chan.c_str());
FOREACH_MOD(I_OnChanDrop, OnChanDrop(chan));
@@ -84,21 +84,21 @@ class CommandCSDrop : public Command
bool OnHelp(User *u, const Anope::string &subcommand)
{
if (u->Account() && u->Account()->IsServicesOper())
- notice_help(Config.s_ChanServ, u, CHAN_SERVADMIN_HELP_DROP);
+ notice_help(Config->s_ChanServ, u, CHAN_SERVADMIN_HELP_DROP);
else
- notice_help(Config.s_ChanServ, u, CHAN_HELP_DROP);
+ notice_help(Config->s_ChanServ, u, CHAN_HELP_DROP);
return true;
}
void OnSyntaxError(User *u, const Anope::string &subcommand)
{
- syntax_error(Config.s_ChanServ, u, "DROP", CHAN_DROP_SYNTAX);
+ syntax_error(Config->s_ChanServ, u, "DROP", CHAN_DROP_SYNTAX);
}
void OnServHelp(User *u)
{
- notice_lang(Config.s_ChanServ, u, CHAN_HELP_CMD_DROP);
+ notice_lang(Config->s_ChanServ, u, CHAN_HELP_CMD_DROP);
}
};
diff --git a/modules/core/cs_forbid.cpp b/modules/core/cs_forbid.cpp
index 004b523cc..09fddd091 100644
--- a/modules/core/cs_forbid.cpp
+++ b/modules/core/cs_forbid.cpp
@@ -29,21 +29,21 @@ class CommandCSForbid : public Command
Channel *c;
- if (Config.ForceForbidReason && reason.empty())
+ if (Config->ForceForbidReason && reason.empty())
{
- syntax_error(Config.s_ChanServ, u, "FORBID", CHAN_FORBID_SYNTAX_REASON);
+ syntax_error(Config->s_ChanServ, u, "FORBID", CHAN_FORBID_SYNTAX_REASON);
return MOD_CONT;
}
if (chan[0] != '#')
{
- notice_lang(Config.s_ChanServ, u, CHAN_SYMBOL_REQUIRED);
+ notice_lang(Config->s_ChanServ, u, CHAN_SYMBOL_REQUIRED);
return MOD_CONT;
}
if (readonly)
{
- notice_lang(Config.s_ChanServ, u, READ_ONLY_MODE);
+ notice_lang(Config->s_ChanServ, u, READ_ONLY_MODE);
return MOD_CONT;
}
@@ -53,8 +53,8 @@ class CommandCSForbid : public Command
ci = new ChannelInfo(chan);
if (!ci)
{
- Alog() << Config.s_ChanServ << ": Valid FORBID for " << ci->name << " by " << u->nick << " failed";
- notice_lang(Config.s_ChanServ, u, CHAN_FORBID_FAILED, chan.c_str());
+ Alog() << Config->s_ChanServ << ": Valid FORBID for " << ci->name << " by " << u->nick << " failed";
+ notice_lang(Config->s_ChanServ, u, CHAN_FORBID_FAILED, chan.c_str());
return MOD_CONT;
}
@@ -80,7 +80,7 @@ class CommandCSForbid : public Command
}
}
- if (Config.WallForbid)
+ if (Config->WallForbid)
ircdproto->SendGlobops(ChanServ, "\2%s\2 used FORBID on channel \2%s\2", u->nick.c_str(), ci->name.c_str());
if (ircd->chansqline)
@@ -89,8 +89,8 @@ class CommandCSForbid : public Command
ircdproto->SendSQLine(&x);
}
- Alog() << Config.s_ChanServ << ": " << u->nick << " set FORBID for channel " << ci->name;
- notice_lang(Config.s_ChanServ, u, CHAN_FORBID_SUCCEEDED, chan.c_str());
+ Alog() << Config->s_ChanServ << ": " << u->nick << " set FORBID for channel " << ci->name;
+ notice_lang(Config->s_ChanServ, u, CHAN_FORBID_SUCCEEDED, chan.c_str());
FOREACH_MOD(I_OnChanForbidden, OnChanForbidden(ci));
@@ -99,18 +99,18 @@ class CommandCSForbid : public Command
bool OnHelp(User *u, const Anope::string &subcommand)
{
- notice_help(Config.s_ChanServ, u, CHAN_SERVADMIN_HELP_FORBID);
+ notice_help(Config->s_ChanServ, u, CHAN_SERVADMIN_HELP_FORBID);
return true;
}
void OnSyntaxError(User *u, const Anope::string &subcommand)
{
- syntax_error(Config.s_ChanServ, u, "FORBID", CHAN_FORBID_SYNTAX);
+ syntax_error(Config->s_ChanServ, u, "FORBID", CHAN_FORBID_SYNTAX);
}
void OnServHelp(User *u)
{
- notice_lang(Config.s_ChanServ, u, CHAN_HELP_CMD_FORBID);
+ notice_lang(Config->s_ChanServ, u, CHAN_HELP_CMD_FORBID);
}
};
diff --git a/modules/core/cs_getkey.cpp b/modules/core/cs_getkey.cpp
index c95330f60..c39000ea3 100644
--- a/modules/core/cs_getkey.cpp
+++ b/modules/core/cs_getkey.cpp
@@ -30,34 +30,34 @@ class CommandCSGetKey : public Command
if (!check_access(u, ci, CA_GETKEY) && !u->Account()->HasCommand("chanserv/getkey"))
{
- notice_lang(Config.s_ChanServ, u, ACCESS_DENIED);
+ notice_lang(Config->s_ChanServ, u, ACCESS_DENIED);
return MOD_CONT;
}
if (!ci->c || !ci->c->GetParam(CMODE_KEY, key))
{
- notice_lang(Config.s_ChanServ, u, CHAN_GETKEY_NOKEY, chan.c_str());
+ notice_lang(Config->s_ChanServ, u, CHAN_GETKEY_NOKEY, chan.c_str());
return MOD_CONT;
}
- notice_lang(Config.s_ChanServ, u, CHAN_GETKEY_KEY, chan.c_str(), key.c_str());
+ notice_lang(Config->s_ChanServ, u, CHAN_GETKEY_KEY, chan.c_str(), key.c_str());
return MOD_CONT;
}
bool OnHelp(User *u, const Anope::string &subcommand)
{
- notice_help(Config.s_ChanServ, u, CHAN_HELP_GETKEY);
+ notice_help(Config->s_ChanServ, u, CHAN_HELP_GETKEY);
return true;
}
void OnSyntaxError(User *u, const Anope::string &subcommand)
{
- syntax_error(Config.s_ChanServ, u, "GETKEY", CHAN_GETKEY_SYNTAX);
+ syntax_error(Config->s_ChanServ, u, "GETKEY", CHAN_GETKEY_SYNTAX);
}
void OnServHelp(User *u)
{
- notice_lang(Config.s_ChanServ, u, CHAN_HELP_CMD_GETKEY);
+ notice_lang(Config->s_ChanServ, u, CHAN_HELP_CMD_GETKEY);
}
};
diff --git a/modules/core/cs_help.cpp b/modules/core/cs_help.cpp
index 168c5fa07..2d012fbf6 100644
--- a/modules/core/cs_help.cpp
+++ b/modules/core/cs_help.cpp
@@ -29,7 +29,7 @@ class CommandCSHelp : public Command
if (cmd.equals_ci("LEVELS DESC"))
{
int i;
- notice_help(Config.s_ChanServ, u, CHAN_HELP_LEVELS_DESC);
+ notice_help(Config->s_ChanServ, u, CHAN_HELP_LEVELS_DESC);
if (!levelinfo_maxwidth)
for (i = 0; levelinfo[i].what >= 0; ++i)
{
@@ -38,7 +38,7 @@ class CommandCSHelp : public Command
levelinfo_maxwidth = len;
}
for (i = 0; levelinfo[i].what >= 0; ++i)
- notice_help(Config.s_ChanServ, u, CHAN_HELP_LEVELS_DESC_FORMAT, levelinfo_maxwidth, levelinfo[i].name.c_str(), getstring(u, levelinfo[i].desc));
+ notice_help(Config->s_ChanServ, u, CHAN_HELP_LEVELS_DESC_FORMAT, levelinfo_maxwidth, levelinfo[i].name.c_str(), getstring(u, levelinfo[i].desc));
}
else
mod_help_cmd(ChanServ, u, cmd);
@@ -48,14 +48,14 @@ class CommandCSHelp : public Command
void OnSyntaxError(User *u, const Anope::string &subcommand)
{
- notice_help(Config.s_ChanServ, u, CHAN_HELP);
+ notice_help(Config->s_ChanServ, u, CHAN_HELP);
for (CommandMap::const_iterator it = ChanServ->Commands.begin(); it != ChanServ->Commands.end(); ++it)
- if (!Config.HidePrivilegedCommands || it->second->permission.empty() || (u->Account() && u->Account()->HasCommand(it->second->permission)))
+ if (!Config->HidePrivilegedCommands || it->second->permission.empty() || (u->Account() && u->Account()->HasCommand(it->second->permission)))
it->second->OnServHelp(u);
- if (Config.CSExpire >= 86400)
- notice_help(Config.s_ChanServ, u, CHAN_HELP_EXPIRES, Config.CSExpire / 86400);
+ if (Config->CSExpire >= 86400)
+ notice_help(Config->s_ChanServ, u, CHAN_HELP_EXPIRES, Config->CSExpire / 86400);
if (u->Account() && u->Account()->IsServicesOper())
- notice_help(Config.s_ChanServ, u, CHAN_SERVADMIN_HELP);
+ notice_help(Config->s_ChanServ, u, CHAN_SERVADMIN_HELP);
}
};
diff --git a/modules/core/cs_info.cpp b/modules/core/cs_info.cpp
index 82722fe03..add7f39ff 100644
--- a/modules/core/cs_info.cpp
+++ b/modules/core/cs_info.cpp
@@ -49,9 +49,9 @@ class CommandCSInfo : public Command
if (ci->HasFlag(CI_FORBIDDEN))
{
if (is_oper(u) && !ci->forbidby.empty())
- notice_lang(Config.s_ChanServ, u, CHAN_X_FORBIDDEN_OPER, chan.c_str(), ci->forbidby.c_str(), !ci->forbidreason.empty() ? ci->forbidreason.c_str() : getstring(u, NO_REASON));
+ notice_lang(Config->s_ChanServ, u, CHAN_X_FORBIDDEN_OPER, chan.c_str(), ci->forbidby.c_str(), !ci->forbidreason.empty() ? ci->forbidreason.c_str() : getstring(u, NO_REASON));
else
- notice_lang(Config.s_ChanServ, u, CHAN_X_FORBIDDEN, chan.c_str());
+ notice_lang(Config->s_ChanServ, u, CHAN_X_FORBIDDEN, chan.c_str());
return MOD_CONT;
}
@@ -60,32 +60,32 @@ class CommandCSInfo : public Command
if (has_auspex && check_access(u, ci, CA_INFO))
show_all = true;
- notice_lang(Config.s_ChanServ, u, CHAN_INFO_HEADER, chan.c_str());
- notice_lang(Config.s_ChanServ, u, CHAN_INFO_NO_FOUNDER, ci->founder->display.c_str());
+ notice_lang(Config->s_ChanServ, u, CHAN_INFO_HEADER, chan.c_str());
+ notice_lang(Config->s_ChanServ, u, CHAN_INFO_NO_FOUNDER, ci->founder->display.c_str());
if (show_all && ci->successor)
- notice_lang(Config.s_ChanServ, u, CHAN_INFO_NO_SUCCESSOR, ci->successor->display.c_str());
+ notice_lang(Config->s_ChanServ, u, CHAN_INFO_NO_SUCCESSOR, ci->successor->display.c_str());
- notice_lang(Config.s_ChanServ, u, CHAN_INFO_DESCRIPTION, ci->desc.c_str());
+ notice_lang(Config->s_ChanServ, u, CHAN_INFO_DESCRIPTION, ci->desc.c_str());
tm = localtime(&ci->time_registered);
strftime_lang(buf, sizeof(buf), u, STRFTIME_DATE_TIME_FORMAT, tm);
- notice_lang(Config.s_ChanServ, u, CHAN_INFO_TIME_REGGED, buf);
+ notice_lang(Config->s_ChanServ, u, CHAN_INFO_TIME_REGGED, buf);
tm = localtime(&ci->last_used);
strftime_lang(buf, sizeof(buf), u, STRFTIME_DATE_TIME_FORMAT, tm);
- notice_lang(Config.s_ChanServ, u, CHAN_INFO_LAST_USED, buf);
+ notice_lang(Config->s_ChanServ, u, CHAN_INFO_LAST_USED, buf);
if (!ci->last_topic.empty() && (show_all || (!ci->HasMLock(CMODE_SECRET, true) && (!ci->c || !ci->c->HasMode(CMODE_SECRET)))))
{
- notice_lang(Config.s_ChanServ, u, CHAN_INFO_LAST_TOPIC, ci->last_topic.c_str());
- notice_lang(Config.s_ChanServ, u, CHAN_INFO_TOPIC_SET_BY, ci->last_topic_setter.c_str());
+ notice_lang(Config->s_ChanServ, u, CHAN_INFO_LAST_TOPIC, ci->last_topic.c_str());
+ notice_lang(Config->s_ChanServ, u, CHAN_INFO_TOPIC_SET_BY, ci->last_topic_setter.c_str());
}
if (!ci->entry_message.empty() && show_all)
- notice_lang(Config.s_ChanServ, u, CHAN_INFO_ENTRYMSG, ci->entry_message.c_str());
+ notice_lang(Config->s_ChanServ, u, CHAN_INFO_ENTRYMSG, ci->entry_message.c_str());
if (show_all)
{
- notice_lang(Config.s_ChanServ, u, CHAN_INFO_BANTYPE, ci->bantype);
+ notice_lang(Config->s_ChanServ, u, CHAN_INFO_BANTYPE, ci->bantype);
Anope::string optbuf;
CheckOptStr(optbuf, CI_KEEPTOPIC, getstring(u, CHAN_INFO_OPT_KEEPTOPIC), ci, u->Account());
@@ -104,22 +104,22 @@ class CommandCSInfo : public Command
CheckOptStr(optbuf, CI_XOP, getstring(u, CHAN_INFO_OPT_XOP), ci, u->Account());
CheckOptStr(optbuf, CI_PERSIST, getstring(u, CHAN_INFO_OPT_PERSIST), ci, u->Account());
- notice_lang(Config.s_ChanServ, u, CHAN_INFO_OPTIONS, optbuf.empty() ? getstring(u, CHAN_INFO_OPT_NONE) : optbuf.c_str());
- notice_lang(Config.s_ChanServ, u, CHAN_INFO_MODE_LOCK, get_mlock_modes(ci, 1).c_str());
+ notice_lang(Config->s_ChanServ, u, CHAN_INFO_OPTIONS, optbuf.empty() ? getstring(u, CHAN_INFO_OPT_NONE) : optbuf.c_str());
+ notice_lang(Config->s_ChanServ, u, CHAN_INFO_MODE_LOCK, 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))
- notice_lang(Config.s_ChanServ, u, CHAN_INFO_NO_EXPIRE);
+ notice_lang(Config->s_ChanServ, u, CHAN_INFO_NO_EXPIRE);
else
{
- expt = ci->last_used + Config.CSExpire;
+ expt = ci->last_used + Config->CSExpire;
tm = localtime(&expt);
strftime_lang(buf, sizeof(buf), u, STRFTIME_DATE_TIME_FORMAT, tm);
- notice_lang(Config.s_ChanServ, u, CHAN_INFO_EXPIRE, buf);
+ notice_lang(Config->s_ChanServ, u, CHAN_INFO_EXPIRE, buf);
}
}
if (ci->HasFlag(CI_SUSPENDED))
- notice_lang(Config.s_ChanServ, u, CHAN_X_SUSPENDED, ci->forbidby.c_str(), !ci->forbidreason.empty() ? ci->forbidreason.c_str() : getstring(u, NO_REASON));
+ notice_lang(Config->s_ChanServ, u, CHAN_X_SUSPENDED, ci->forbidby.c_str(), !ci->forbidreason.empty() ? ci->forbidreason.c_str() : getstring(u, NO_REASON));
FOREACH_MOD(I_OnChanInfo, OnChanInfo(u, ci, show_all));
@@ -128,19 +128,19 @@ class CommandCSInfo : public Command
bool OnHelp(User *u, const Anope::string &subcommand)
{
- notice_lang(Config.s_ChanServ, u, CHAN_HELP_INFO);
+ notice_lang(Config->s_ChanServ, u, CHAN_HELP_INFO);
return true;
}
void OnSyntaxError(User *u, const Anope::string &subcommand)
{
- syntax_error(Config.s_ChanServ, u, "INFO", CHAN_INFO_SYNTAX);
+ syntax_error(Config->s_ChanServ, u, "INFO", CHAN_INFO_SYNTAX);
}
void OnServHelp(User *u)
{
- notice_lang(Config.s_ChanServ, u, CHAN_HELP_CMD_INFO);
+ notice_lang(Config->s_ChanServ, u, CHAN_HELP_CMD_INFO);
}
};
diff --git a/modules/core/cs_invite.cpp b/modules/core/cs_invite.cpp
index c4f3bd4fa..926375b3e 100644
--- a/modules/core/cs_invite.cpp
+++ b/modules/core/cs_invite.cpp
@@ -29,7 +29,7 @@ class CommandCSInvite : public Command
if (!(c = findchan(chan)))
{
- notice_lang(Config.s_ChanServ, u, CHAN_X_NOT_IN_USE, chan.c_str());
+ notice_lang(Config->s_ChanServ, u, CHAN_X_NOT_IN_USE, chan.c_str());
return MOD_CONT;
}
@@ -37,7 +37,7 @@ class CommandCSInvite : public Command
if (!u || !check_access(u, ci, CA_INVITE))
{
- notice_lang(Config.s_ChanServ, u, ACCESS_DENIED);
+ notice_lang(Config->s_ChanServ, u, ACCESS_DENIED);
return MOD_CONT;
}
@@ -47,13 +47,13 @@ class CommandCSInvite : public Command
{
if (!(u2 = finduser(params[1])))
{
- notice_lang(Config.s_ChanServ, u, NICK_X_NOT_IN_USE, params[1].c_str());
+ notice_lang(Config->s_ChanServ, u, NICK_X_NOT_IN_USE, params[1].c_str());
return MOD_CONT;
}
}
if (c->FindUser(u2))
- notice_lang(Config.s_ChanServ, u, CHAN_INVITE_ALREADY_IN, c->name.c_str());
+ notice_lang(Config->s_ChanServ, u, CHAN_INVITE_ALREADY_IN, c->name.c_str());
else
{
ircdproto->SendInvite(whosends(ci), chan, u2->nick);
@@ -65,18 +65,18 @@ class CommandCSInvite : public Command
bool OnHelp(User *u, const Anope::string &subcommand)
{
- notice_help(Config.s_ChanServ, u, CHAN_HELP_INVITE);
+ notice_help(Config->s_ChanServ, u, CHAN_HELP_INVITE);
return true;
}
void OnSyntaxError(User *u, const Anope::string &subcommand)
{
- syntax_error(Config.s_ChanServ, u, "INVITE", CHAN_INVITE_SYNTAX);
+ syntax_error(Config->s_ChanServ, u, "INVITE", CHAN_INVITE_SYNTAX);
}
void OnServHelp(User *u)
{
- notice_lang(Config.s_ChanServ, u, CHAN_HELP_CMD_INVITE);
+ notice_lang(Config->s_ChanServ, u, CHAN_HELP_CMD_INVITE);
}
};
diff --git a/modules/core/cs_kick.cpp b/modules/core/cs_kick.cpp
index 5654e4479..06f0004b8 100644
--- a/modules/core/cs_kick.cpp
+++ b/modules/core/cs_kick.cpp
@@ -38,17 +38,17 @@ class CommandCSKick : public Command
ci = c->ci;
if (!c)
- notice_lang(Config.s_ChanServ, u, CHAN_X_NOT_IN_USE, chan.c_str());
+ notice_lang(Config->s_ChanServ, u, CHAN_X_NOT_IN_USE, chan.c_str());
else if (is_same ? !(u2 = u) : !(u2 = finduser(target)))
- notice_lang(Config.s_ChanServ, u, NICK_X_NOT_IN_USE, target.c_str());
+ notice_lang(Config->s_ChanServ, u, NICK_X_NOT_IN_USE, target.c_str());
else if (!is_same ? !check_access(u, ci, CA_KICK) : !check_access(u, ci, CA_KICKME))
- notice_lang(Config.s_ChanServ, u, ACCESS_DENIED);
+ notice_lang(Config->s_ChanServ, u, ACCESS_DENIED);
else if (!is_same && (ci->HasFlag(CI_PEACE)) && get_access(u2, ci) >= get_access(u, ci))
- notice_lang(Config.s_ChanServ, u, ACCESS_DENIED);
+ notice_lang(Config->s_ChanServ, u, ACCESS_DENIED);
else if (u2->IsProtected())
- notice_lang(Config.s_ChanServ, u, ACCESS_DENIED);
+ notice_lang(Config->s_ChanServ, u, ACCESS_DENIED);
else if (!c->FindUser(u2))
- notice_lang(Config.s_ChanServ, u, NICK_X_NOT_ON_CHAN, u2->nick.c_str(), c->name.c_str());
+ notice_lang(Config->s_ChanServ, u, NICK_X_NOT_ON_CHAN, u2->nick.c_str(), c->name.c_str());
else
{
if (ci->HasFlag(CI_SIGNKICK) || (ci->HasFlag(CI_SIGNKICK_LEVEL) && !check_access(u, ci, CA_SIGNKICK)))
@@ -61,18 +61,18 @@ class CommandCSKick : public Command
bool OnHelp(User *u, const Anope::string &subcommand)
{
- notice_help(Config.s_ChanServ, u, CHAN_HELP_KICK);
+ notice_help(Config->s_ChanServ, u, CHAN_HELP_KICK);
return true;
}
void OnSyntaxError(User *u, const Anope::string &subcommand)
{
- syntax_error(Config.s_ChanServ, u, "KICK", CHAN_KICK_SYNTAX);
+ syntax_error(Config->s_ChanServ, u, "KICK", CHAN_KICK_SYNTAX);
}
void OnServHelp(User *u)
{
- notice_lang(Config.s_ChanServ, u, CHAN_HELP_CMD_KICK);
+ notice_lang(Config->s_ChanServ, u, CHAN_HELP_CMD_KICK);
}
};
diff --git a/modules/core/cs_list.cpp b/modules/core/cs_list.cpp
index 284f90e84..3292ec874 100644
--- a/modules/core/cs_list.cpp
+++ b/modules/core/cs_list.cpp
@@ -31,9 +31,9 @@ public:
int count = 0, from = 0, to = 0;
bool forbidden = false, suspended = false, channoexpire = false;
- if (Config.CSListOpersOnly && !is_oper(u))
+ if (Config->CSListOpersOnly && !is_oper(u))
{
- notice_lang(Config.s_ChanServ, u, ACCESS_DENIED);
+ notice_lang(Config->s_ChanServ, u, ACCESS_DENIED);
return MOD_STOP;
}
@@ -42,28 +42,28 @@ public:
Anope::string tmp = myStrGetToken(pattern.substr(1), '-', 0); /* Read FROM out */
if (tmp.empty())
{
- notice_lang(Config.s_ChanServ, u, LIST_INCORRECT_RANGE);
- notice_lang(Config.s_ChanServ, u, CS_LIST_INCORRECT_RANGE);
+ notice_lang(Config->s_ChanServ, u, LIST_INCORRECT_RANGE);
+ notice_lang(Config->s_ChanServ, u, CS_LIST_INCORRECT_RANGE);
return MOD_CONT;
}
if (!tmp.is_number_only())
{
- notice_lang(Config.s_ChanServ, u, LIST_INCORRECT_RANGE);
- notice_lang(Config.s_ChanServ, u, CS_LIST_INCORRECT_RANGE);
+ notice_lang(Config->s_ChanServ, u, LIST_INCORRECT_RANGE);
+ notice_lang(Config->s_ChanServ, u, CS_LIST_INCORRECT_RANGE);
return MOD_CONT;
}
from = convertTo<int>(tmp);
tmp = myStrGetTokenRemainder(pattern, '-', 1); /* Read TO out */
if (tmp.empty())
{
- notice_lang(Config.s_ChanServ, u, LIST_INCORRECT_RANGE);
- notice_lang(Config.s_ChanServ, u, CS_LIST_INCORRECT_RANGE);
+ notice_lang(Config->s_ChanServ, u, LIST_INCORRECT_RANGE);
+ notice_lang(Config->s_ChanServ, u, CS_LIST_INCORRECT_RANGE);
return MOD_CONT;
}
if (!tmp.is_number_only())
{
- notice_lang(Config.s_ChanServ, u, LIST_INCORRECT_RANGE);
- notice_lang(Config.s_ChanServ, u, CS_LIST_INCORRECT_RANGE);
+ notice_lang(Config->s_ChanServ, u, LIST_INCORRECT_RANGE);
+ notice_lang(Config->s_ChanServ, u, CS_LIST_INCORRECT_RANGE);
return MOD_CONT;
}
to = convertTo<int>(tmp);
@@ -89,7 +89,7 @@ public:
Anope::string spattern = "#" + pattern;
- notice_lang(Config.s_ChanServ, u, CHAN_LIST_HEADER, pattern.c_str());
+ notice_lang(Config->s_ChanServ, u, CHAN_LIST_HEADER, pattern.c_str());
for (registered_channel_map::const_iterator it = RegisteredChannelList.begin(), it_end = RegisteredChannelList.end(); it != it_end; ++it)
{
@@ -106,7 +106,7 @@ public:
if (pattern.equals_ci(ci->name) || ci->name.equals_ci(spattern) || Anope::Match(ci->name, pattern) || Anope::Match(ci->name, spattern))
{
- if (((count + 1 >= from && count + 1 <= to) || (!from && !to)) && ++nchans <= Config.CSListMax)
+ if (((count + 1 >= from && count + 1 <= to) || (!from && !to)) && ++nchans <= Config->CSListMax)
{
char noexpire_char = ' ';
if (is_servadmin && (ci->HasFlag(CI_NO_EXPIRE)))
@@ -119,30 +119,30 @@ public:
else
snprintf(buf, sizeof(buf), "%-20s %s", ci->name.c_str(), !ci->desc.empty() ? ci->desc.c_str() : "");
- u->SendMessage(Config.s_ChanServ, " %c%s", noexpire_char, buf);
+ u->SendMessage(Config->s_ChanServ, " %c%s", noexpire_char, buf);
}
++count;
}
}
- notice_lang(Config.s_ChanServ, u, CHAN_LIST_END, nchans > Config.CSListMax ? Config.CSListMax : nchans, nchans);
+ notice_lang(Config->s_ChanServ, u, CHAN_LIST_END, nchans > Config->CSListMax ? Config->CSListMax : nchans, nchans);
return MOD_CONT;
}
bool OnHelp(User *u, const Anope::string &subcommand)
{
- notice_help(Config.s_ChanServ, u, CHAN_HELP_LIST);
+ notice_help(Config->s_ChanServ, u, CHAN_HELP_LIST);
return true;
}
void OnSyntaxError(User *u, const Anope::string &subcommand)
{
- syntax_error(Config.s_ChanServ, u, "LIST", CHAN_LIST_SYNTAX);
+ syntax_error(Config->s_ChanServ, u, "LIST", CHAN_LIST_SYNTAX);
}
void OnServHelp(User *u)
{
- notice_lang(Config.s_ChanServ, u, CHAN_HELP_CMD_LIST);
+ notice_lang(Config->s_ChanServ, u, CHAN_HELP_CMD_LIST);
}
};
diff --git a/modules/core/cs_modes.cpp b/modules/core/cs_modes.cpp
index 66f882147..274c7e5af 100644
--- a/modules/core/cs_modes.cpp
+++ b/modules/core/cs_modes.cpp
@@ -42,17 +42,17 @@ static CommandReturn do_util(User *u, ChannelMode *cm, const Anope::string &chan
ci = c->ci;
if (!c)
- notice_lang(Config.s_ChanServ, u, CHAN_X_NOT_IN_USE, chan.c_str());
+ notice_lang(Config->s_ChanServ, u, CHAN_X_NOT_IN_USE, chan.c_str());
else if (is_same ? !(u2 = u) : !(u2 = finduser(realnick)))
- notice_lang(Config.s_ChanServ, u, NICK_X_NOT_IN_USE, realnick.c_str());
+ notice_lang(Config->s_ChanServ, u, NICK_X_NOT_IN_USE, realnick.c_str());
else if (is_same ? !check_access(u, ci, levelself) : !check_access(u, ci, level))
- notice_lang(Config.s_ChanServ, u, ACCESS_DENIED);
+ notice_lang(Config->s_ChanServ, u, ACCESS_DENIED);
else if (!set && !is_same && (ci->HasFlag(CI_PEACE)) && (get_access(u2, ci) >= get_access(u, ci)))
- notice_lang(Config.s_ChanServ, u, ACCESS_DENIED);
+ notice_lang(Config->s_ChanServ, u, ACCESS_DENIED);
else if (!set && u2->IsProtected() && !is_same)
- notice_lang(Config.s_ChanServ, u, ACCESS_DENIED);
+ notice_lang(Config->s_ChanServ, u, ACCESS_DENIED);
else if (!c->FindUser(u2))
- notice_lang(Config.s_ChanServ, u, NICK_X_NOT_ON_CHAN, u2->nick.c_str(), c->name.c_str());
+ notice_lang(Config->s_ChanServ, u, NICK_X_NOT_ON_CHAN, u2->nick.c_str(), c->name.c_str());
else
{
if (set)
@@ -83,18 +83,18 @@ class CommandCSOp : public Command
bool OnHelp(User *u, const Anope::string &subcommand)
{
- notice_help(Config.s_ChanServ, u, CHAN_HELP_OP);
+ notice_help(Config->s_ChanServ, u, CHAN_HELP_OP);
return true;
}
void OnSyntaxError(User *u, const Anope::string &subcommand)
{
- syntax_error(Config.s_ChanServ, u, "OP", CHAN_OP_SYNTAX);
+ syntax_error(Config->s_ChanServ, u, "OP", CHAN_OP_SYNTAX);
}
void OnServHelp(User *u)
{
- notice_lang(Config.s_ChanServ, u, CHAN_HELP_CMD_OP);
+ notice_lang(Config->s_ChanServ, u, CHAN_HELP_CMD_OP);
}
};
@@ -114,18 +114,18 @@ class CommandCSDeOp : public Command
bool OnHelp(User *u, const Anope::string &subcommand)
{
- notice_help(Config.s_ChanServ, u, CHAN_HELP_DEOP);
+ notice_help(Config->s_ChanServ, u, CHAN_HELP_DEOP);
return true;
}
void OnSyntaxError(User *u, const Anope::string &subcommand)
{
- syntax_error(Config.s_ChanServ, u, "DEOP", CHAN_DEOP_SYNTAX);
+ syntax_error(Config->s_ChanServ, u, "DEOP", CHAN_DEOP_SYNTAX);
}
void OnServHelp(User *u)
{
- notice_lang(Config.s_ChanServ, u, CHAN_HELP_CMD_DEOP);
+ notice_lang(Config->s_ChanServ, u, CHAN_HELP_CMD_DEOP);
}
};
@@ -145,18 +145,18 @@ class CommandCSVoice : public Command
bool OnHelp(User *u, const Anope::string &subcommand)
{
- notice_help(Config.s_ChanServ, u, CHAN_HELP_VOICE);
+ notice_help(Config->s_ChanServ, u, CHAN_HELP_VOICE);
return true;
}
void OnSyntaxError(User *u, const Anope::string &subcommand)
{
- syntax_error(Config.s_ChanServ, u, "VOICE", CHAN_VOICE_SYNTAX);
+ syntax_error(Config->s_ChanServ, u, "VOICE", CHAN_VOICE_SYNTAX);
}
void OnServHelp(User *u)
{
- notice_lang(Config.s_ChanServ, u, CHAN_HELP_CMD_VOICE);
+ notice_lang(Config->s_ChanServ, u, CHAN_HELP_CMD_VOICE);
}
};
@@ -176,18 +176,18 @@ class CommandCSDeVoice : public Command
bool OnHelp(User *u, const Anope::string &subcommand)
{
- notice_help(Config.s_ChanServ, u, CHAN_HELP_DEVOICE);
+ notice_help(Config->s_ChanServ, u, CHAN_HELP_DEVOICE);
return true;
}
void OnSyntaxError(User *u, const Anope::string &subcommand)
{
- syntax_error(Config.s_ChanServ, u, "DEVOICE", CHAN_DEVOICE_SYNTAX);
+ syntax_error(Config->s_ChanServ, u, "DEVOICE", CHAN_DEVOICE_SYNTAX);
}
void OnServHelp(User *u)
{
- notice_lang(Config.s_ChanServ, u, CHAN_HELP_CMD_DEVOICE);
+ notice_lang(Config->s_ChanServ, u, CHAN_HELP_CMD_DEVOICE);
}
};
@@ -212,18 +212,18 @@ class CommandCSHalfOp : public Command
bool OnHelp(User *u, const Anope::string &subcommand)
{
- notice_help(Config.s_ChanServ, u, CHAN_HELP_HALFOP);
+ notice_help(Config->s_ChanServ, u, CHAN_HELP_HALFOP);
return true;
}
void OnSyntaxError(User *u, const Anope::string &subcommand)
{
- syntax_error(Config.s_ChanServ, u, "HALFOP", CHAN_HALFOP_SYNTAX);
+ syntax_error(Config->s_ChanServ, u, "HALFOP", CHAN_HALFOP_SYNTAX);
}
void OnServHelp(User *u)
{
- notice_lang(Config.s_ChanServ, u, CHAN_HELP_CMD_HALFOP);
+ notice_lang(Config->s_ChanServ, u, CHAN_HELP_CMD_HALFOP);
}
};
@@ -246,18 +246,18 @@ class CommandCSDeHalfOp : public Command
bool OnHelp(User *u, const Anope::string &subcommand)
{
- notice_help(Config.s_ChanServ, u, CHAN_HELP_DEHALFOP);
+ notice_help(Config->s_ChanServ, u, CHAN_HELP_DEHALFOP);
return true;
}
void OnSyntaxError(User *u, const Anope::string &subcommand)
{
- syntax_error(Config.s_ChanServ, u, "DEHALFOP", CHAN_DEHALFOP_SYNTAX);
+ syntax_error(Config->s_ChanServ, u, "DEHALFOP", CHAN_DEHALFOP_SYNTAX);
}
void OnServHelp(User *u)
{
- notice_lang(Config.s_ChanServ, u, CHAN_HELP_CMD_DEHALFOP);
+ notice_lang(Config->s_ChanServ, u, CHAN_HELP_CMD_DEHALFOP);
}
};
@@ -280,18 +280,18 @@ class CommandCSProtect : public Command
bool OnHelp(User *u, const Anope::string &subcommand)
{
- notice_help(Config.s_ChanServ, u, CHAN_HELP_PROTECT);
+ notice_help(Config->s_ChanServ, u, CHAN_HELP_PROTECT);
return true;
}
void OnSyntaxError(User *u, const Anope::string &subcommand)
{
- syntax_error(Config.s_ChanServ, u, "PROTECT", CHAN_PROTECT_SYNTAX);
+ syntax_error(Config->s_ChanServ, u, "PROTECT", CHAN_PROTECT_SYNTAX);
}
void OnServHelp(User *u)
{
- notice_lang(Config.s_ChanServ, u, CHAN_HELP_CMD_PROTECT);
+ notice_lang(Config->s_ChanServ, u, CHAN_HELP_CMD_PROTECT);
}
};
@@ -314,18 +314,18 @@ class CommandCSDeProtect : public Command
bool OnHelp(User *u, const Anope::string &subcommand)
{
- notice_help(Config.s_ChanServ, u, CHAN_HELP_DEPROTECT);
+ notice_help(Config->s_ChanServ, u, CHAN_HELP_DEPROTECT);
return true;
}
void OnSyntaxError(User *u, const Anope::string &subcommand)
{
- syntax_error(Config.s_ChanServ, u, "DEPROTECT", CHAN_DEPROTECT_SYNTAX);
+ syntax_error(Config->s_ChanServ, u, "DEPROTECT", CHAN_DEPROTECT_SYNTAX);
}
void OnServHelp(User *u)
{
- notice_lang(Config.s_ChanServ, u, CHAN_HELP_CMD_DEPROTECT);
+ notice_lang(Config->s_ChanServ, u, CHAN_HELP_CMD_DEPROTECT);
}
};
@@ -348,18 +348,18 @@ class CommandCSOwner : public Command
bool OnHelp(User *u, const Anope::string &subcommand)
{
- notice_help(Config.s_ChanServ, u, CHAN_HELP_OWNER);
+ notice_help(Config->s_ChanServ, u, CHAN_HELP_OWNER);
return true;
}
void OnSyntaxError(User *u, const Anope::string &subcommand)
{
- syntax_error(Config.s_ChanServ, u, "OWNER", CHAN_OWNER_SYNTAX);
+ syntax_error(Config->s_ChanServ, u, "OWNER", CHAN_OWNER_SYNTAX);
}
void OnServHelp(User *u)
{
- notice_lang(Config.s_ChanServ, u, CHAN_HELP_CMD_OWNER);
+ notice_lang(Config->s_ChanServ, u, CHAN_HELP_CMD_OWNER);
}
};
@@ -382,18 +382,18 @@ class CommandCSDeOwner : public Command
bool OnHelp(User *u, const Anope::string &subcommand)
{
- notice_help(Config.s_ChanServ, u, CHAN_HELP_DEOWNER);
+ notice_help(Config->s_ChanServ, u, CHAN_HELP_DEOWNER);
return true;
}
void OnSyntaxError(User *u, const Anope::string &subcommand)
{
- syntax_error(Config.s_ChanServ, u, "DEOWNER", CHAN_DEOWNER_SYNTAX);
+ syntax_error(Config->s_ChanServ, u, "DEOWNER", CHAN_DEOWNER_SYNTAX);
}
void OnServHelp(User *u)
{
- notice_lang(Config.s_ChanServ, u, CHAN_HELP_CMD_DEOWNER);
+ notice_lang(Config->s_ChanServ, u, CHAN_HELP_CMD_DEOWNER);
}
};
diff --git a/modules/core/cs_register.cpp b/modules/core/cs_register.cpp
index 5e570f40e..70a436fa5 100644
--- a/modules/core/cs_register.cpp
+++ b/modules/core/cs_register.cpp
@@ -31,26 +31,26 @@ class CommandCSRegister : public Command
if (readonly)
{
- notice_lang(Config.s_ChanServ, u, CHAN_REGISTER_DISABLED);
+ notice_lang(Config->s_ChanServ, u, CHAN_REGISTER_DISABLED);
return MOD_CONT;
}
if (chan[0] == '&')
- notice_lang(Config.s_ChanServ, u, CHAN_REGISTER_NOT_LOCAL);
+ notice_lang(Config->s_ChanServ, u, CHAN_REGISTER_NOT_LOCAL);
else if (chan[0] != '#')
- notice_lang(Config.s_ChanServ, u, CHAN_SYMBOL_REQUIRED);
+ notice_lang(Config->s_ChanServ, u, CHAN_SYMBOL_REQUIRED);
else if (!ircdproto->IsChannelValid(chan))
- notice_lang(Config.s_ChanServ, u, CHAN_X_INVALID, chan.c_str());
+ notice_lang(Config->s_ChanServ, u, CHAN_X_INVALID, chan.c_str());
else if ((ci = cs_findchan(chan)))
- notice_lang(Config.s_ChanServ, u, CHAN_ALREADY_REGISTERED, chan.c_str());
+ notice_lang(Config->s_ChanServ, u, CHAN_ALREADY_REGISTERED, chan.c_str());
else if (c && !c->HasUserStatus(u, CMODE_OP))
- notice_lang(Config.s_ChanServ, u, CHAN_MUST_BE_CHANOP);
- else if (Config.CSMaxReg && u->Account()->channelcount >= Config.CSMaxReg && !u->Account()->HasPriv("chanserv/no-register-limit"))
- notice_lang(Config.s_ChanServ, u, u->Account()->channelcount > Config.CSMaxReg ? CHAN_EXCEEDED_CHANNEL_LIMIT : CHAN_REACHED_CHANNEL_LIMIT, Config.CSMaxReg);
+ notice_lang(Config->s_ChanServ, u, CHAN_MUST_BE_CHANOP);
+ else if (Config->CSMaxReg && u->Account()->channelcount >= Config->CSMaxReg && !u->Account()->HasPriv("chanserv/no-register-limit"))
+ notice_lang(Config->s_ChanServ, u, u->Account()->channelcount > Config->CSMaxReg ? CHAN_EXCEEDED_CHANNEL_LIMIT : CHAN_REACHED_CHANNEL_LIMIT, Config->CSMaxReg);
else if (!(ci = new ChannelInfo(chan)))
{
- Alog() << Config.s_ChanServ << ": makechan() failed for REGISTER " << chan;
- notice_lang(Config.s_ChanServ, u, CHAN_REGISTRATION_FAILED);
+ Alog() << Config->s_ChanServ << ": makechan() failed for REGISTER " << chan;
+ notice_lang(Config->s_ChanServ, u, CHAN_REGISTRATION_FAILED);
}
else
{
@@ -69,12 +69,12 @@ class CommandCSRegister : public Command
ci->last_topic_time = c->topic_time;
}
else
- ci->last_topic_setter = Config.s_ChanServ;
+ ci->last_topic_setter = Config->s_ChanServ;
ci->bi = NULL;
++ci->founder->channelcount;
- Alog() << Config.s_ChanServ << ": Channel '" << chan << "' registered by " << u->GetMask();
- notice_lang(Config.s_ChanServ, u, CHAN_REGISTERED, chan.c_str(), u->nick.c_str());
+ Alog() << Config->s_ChanServ << ": Channel '" << chan << "' registered by " << u->GetMask();
+ notice_lang(Config->s_ChanServ, u, CHAN_REGISTERED, chan.c_str(), u->nick.c_str());
/* Implement new mode lock */
if (c)
@@ -101,13 +101,13 @@ class CommandCSRegister : public Command
bool OnHelp(User *u, const Anope::string &subcommand)
{
- notice_help(Config.s_ChanServ, u, CHAN_HELP_REGISTER, Config.s_ChanServ.c_str());
+ notice_help(Config->s_ChanServ, u, CHAN_HELP_REGISTER, Config->s_ChanServ.c_str());
return true;
}
void OnSyntaxError(User *u, const Anope::string &subcommand)
{
- syntax_error(Config.s_ChanServ, u, "REGISTER", CHAN_REGISTER_SYNTAX);
+ syntax_error(Config->s_ChanServ, u, "REGISTER", CHAN_REGISTER_SYNTAX);
}
};
diff --git a/modules/core/cs_saset.cpp b/modules/core/cs_saset.cpp
index 7d6e9e2ab..61ae2f299 100644
--- a/modules/core/cs_saset.cpp
+++ b/modules/core/cs_saset.cpp
@@ -32,7 +32,7 @@ class CommandCSSASet : public Command
{
if (readonly)
{
- notice_lang(Config.s_ChanServ, u, CHAN_SET_DISABLED);
+ notice_lang(Config->s_ChanServ, u, CHAN_SET_DISABLED);
return MOD_CONT;
}
@@ -47,8 +47,8 @@ class CommandCSSASet : public Command
}
else
{
- notice_lang(Config.s_ChanServ, u, CHAN_SET_UNKNOWN_OPTION, params[1].c_str());
- notice_lang(Config.s_ChanServ, u, MORE_INFO, Config.s_ChanServ.c_str(), "SET");
+ notice_lang(Config->s_ChanServ, u, CHAN_SET_UNKNOWN_OPTION, params[1].c_str());
+ notice_lang(Config->s_ChanServ, u, MORE_INFO, Config->s_ChanServ.c_str(), "SET");
}
return MOD_CONT;
@@ -58,10 +58,10 @@ class CommandCSSASet : public Command
{
if (subcommand.empty())
{
- notice_help(Config.s_ChanServ, u, CHAN_HELP_SASET_HEAD);
+ notice_help(Config->s_ChanServ, u, CHAN_HELP_SASET_HEAD);
for (subcommand_map::iterator it = this->subcommands.begin(), it_end = this->subcommands.end(); it != it_end; ++it)
it->second->OnServHelp(u);
- notice_help(Config.s_ChanServ, u, CHAN_HELP_SASET_TAIL);
+ notice_help(Config->s_ChanServ, u, CHAN_HELP_SASET_TAIL);
return true;
}
else
@@ -77,12 +77,12 @@ class CommandCSSASet : public Command
void OnSyntaxError(User *u, const Anope::string &subcommand)
{
- syntax_error(Config.s_ChanServ, u, "SASET", CHAN_SASET_SYNTAX);
+ syntax_error(Config->s_ChanServ, u, "SASET", CHAN_SASET_SYNTAX);
}
void OnServHelp(User *u)
{
- notice_lang(Config.s_ChanServ, u, CHAN_HELP_CMD_SASET);
+ notice_lang(Config->s_ChanServ, u, CHAN_HELP_CMD_SASET);
}
bool AddSubcommand(Command *c)
diff --git a/modules/core/cs_saset_noexpire.cpp b/modules/core/cs_saset_noexpire.cpp
index 449239983..125290dc7 100644
--- a/modules/core/cs_saset_noexpire.cpp
+++ b/modules/core/cs_saset_noexpire.cpp
@@ -29,12 +29,12 @@ class CommandCSSASetNoexpire : public Command
if (params[1].equals_ci("ON"))
{
ci->SetFlag(CI_NO_EXPIRE);
- notice_lang(Config.s_ChanServ, u, CHAN_SET_NOEXPIRE_ON, ci->name.c_str());
+ notice_lang(Config->s_ChanServ, u, CHAN_SET_NOEXPIRE_ON, ci->name.c_str());
}
else if (params[1].equals_ci("OFF"))
{
ci->UnsetFlag(CI_NO_EXPIRE);
- notice_lang(Config.s_ChanServ, u, CHAN_SET_NOEXPIRE_OFF, ci->name.c_str());
+ notice_lang(Config->s_ChanServ, u, CHAN_SET_NOEXPIRE_OFF, ci->name.c_str());
}
else
this->OnSyntaxError(u, "NOEXPIRE");
@@ -44,18 +44,18 @@ class CommandCSSASetNoexpire : public Command
bool OnHelp(User *u, const Anope::string &)
{
- notice_help(Config.s_ChanServ, u, CHAN_SERVADMIN_HELP_SET_NOEXPIRE);
+ notice_help(Config->s_ChanServ, u, CHAN_SERVADMIN_HELP_SET_NOEXPIRE);
return true;
}
void OnSyntaxError(User *u, const Anope::string &)
{
- syntax_error(Config.s_ChanServ, u, "SET NOEXPIRE", CHAN_SET_NOEXPIRE_SYNTAX);
+ syntax_error(Config->s_ChanServ, u, "SET NOEXPIRE", CHAN_SET_NOEXPIRE_SYNTAX);
}
void OnServHelp(User *u)
{
- notice_lang(Config.s_ChanServ, u, CHAN_HELP_CMD_SET_NOEXPIRE);
+ notice_lang(Config->s_ChanServ, u, CHAN_HELP_CMD_SET_NOEXPIRE);
}
};
diff --git a/modules/core/cs_set.cpp b/modules/core/cs_set.cpp
index 49c5ca0fe..dd2063ffe 100644
--- a/modules/core/cs_set.cpp
+++ b/modules/core/cs_set.cpp
@@ -32,12 +32,12 @@ class CommandCSSet : public Command
{
if (readonly)
{
- notice_lang(Config.s_ChanServ, u, CHAN_SET_DISABLED);
+ notice_lang(Config->s_ChanServ, u, CHAN_SET_DISABLED);
return MOD_CONT;
}
if (!check_access(u, cs_findchan(params[0]), CA_SET))
{
- notice_lang(Config.s_ChanServ, u, ACCESS_DENIED);
+ notice_lang(Config->s_ChanServ, u, ACCESS_DENIED);
return MOD_CONT;
}
@@ -52,8 +52,8 @@ class CommandCSSet : public Command
}
else
{
- notice_lang(Config.s_ChanServ, u, CHAN_SET_UNKNOWN_OPTION, params[1].c_str());
- notice_lang(Config.s_ChanServ, u, MORE_INFO, Config.s_ChanServ.c_str(), "SET");
+ notice_lang(Config->s_ChanServ, u, CHAN_SET_UNKNOWN_OPTION, params[1].c_str());
+ notice_lang(Config->s_ChanServ, u, MORE_INFO, Config->s_ChanServ.c_str(), "SET");
}
return MOD_CONT;
@@ -63,10 +63,10 @@ class CommandCSSet : public Command
{
if (subcommand.empty())
{
- notice_help(Config.s_ChanServ, u, CHAN_HELP_SET_HEAD);
+ notice_help(Config->s_ChanServ, u, CHAN_HELP_SET_HEAD);
for (subcommand_map::iterator it = this->subcommands.begin(), it_end = this->subcommands.end(); it != it_end; ++it)
it->second->OnServHelp(u);
- notice_help(Config.s_ChanServ, u, CHAN_HELP_SET_TAIL);
+ notice_help(Config->s_ChanServ, u, CHAN_HELP_SET_TAIL);
return true;
}
else
@@ -82,12 +82,12 @@ class CommandCSSet : public Command
void OnSyntaxError(User *u, const Anope::string &subcommand)
{
- syntax_error(Config.s_ChanServ, u, "SET", CHAN_SET_SYNTAX);
+ syntax_error(Config->s_ChanServ, u, "SET", CHAN_SET_SYNTAX);
}
void OnServHelp(User *u)
{
- notice_lang(Config.s_ChanServ, u, CHAN_HELP_CMD_SET);
+ notice_lang(Config->s_ChanServ, u, CHAN_HELP_CMD_SET);
}
bool AddSubcommand(Command *c)
diff --git a/modules/core/cs_set_bantype.cpp b/modules/core/cs_set_bantype.cpp
index 6f0830a55..afb15781b 100644
--- a/modules/core/cs_set_bantype.cpp
+++ b/modules/core/cs_set_bantype.cpp
@@ -31,11 +31,11 @@ class CommandCSSetBanType : public Command
int16 bantype = convertTo<int16>(params[1], end, false);
if (!end.empty() || bantype < 0 || bantype > 3)
- notice_lang(Config.s_ChanServ, u, CHAN_SET_BANTYPE_INVALID, params[1].c_str());
+ notice_lang(Config->s_ChanServ, u, CHAN_SET_BANTYPE_INVALID, params[1].c_str());
else
{
ci->bantype = bantype;
- notice_lang(Config.s_ChanServ, u, CHAN_SET_BANTYPE_CHANGED, ci->name.c_str(), ci->bantype);
+ notice_lang(Config->s_ChanServ, u, CHAN_SET_BANTYPE_CHANGED, ci->name.c_str(), ci->bantype);
}
return MOD_CONT;
@@ -43,19 +43,19 @@ class CommandCSSetBanType : public Command
bool OnHelp(User *u, const Anope::string &)
{
- notice_help(Config.s_ChanServ, u, CHAN_HELP_SET_BANTYPE, "SET");
+ notice_help(Config->s_ChanServ, u, CHAN_HELP_SET_BANTYPE, "SET");
return true;
}
void OnSyntaxError(User *u, const Anope::string &)
{
// XXX
- syntax_error(Config.s_ChanServ, u, "SET", CHAN_SET_SYNTAX);
+ syntax_error(Config->s_ChanServ, u, "SET", CHAN_SET_SYNTAX);
}
void OnServHelp(User *u)
{
- notice_lang(Config.s_ChanServ, u, CHAN_HELP_CMD_SET_BANTYPE);
+ notice_lang(Config->s_ChanServ, u, CHAN_HELP_CMD_SET_BANTYPE);
}
};
@@ -68,14 +68,14 @@ class CommandCSSASetBanType : public CommandCSSetBanType
bool OnHelp(User *u, const Anope::string &)
{
- notice_help(Config.s_ChanServ, u, CHAN_HELP_SET_BANTYPE, "SASET");
+ notice_help(Config->s_ChanServ, u, CHAN_HELP_SET_BANTYPE, "SASET");
return true;
}
void OnSyntaxError(User *u, const Anope::string &)
{
// XXX
- syntax_error(Config.s_ChanServ, u, "SASET", CHAN_SASET_SYNTAX);
+ syntax_error(Config->s_ChanServ, u, "SASET", CHAN_SASET_SYNTAX);
}
};
diff --git a/modules/core/cs_set_description.cpp b/modules/core/cs_set_description.cpp
index a00a6d24e..1365de91a 100644
--- a/modules/core/cs_set_description.cpp
+++ b/modules/core/cs_set_description.cpp
@@ -28,26 +28,26 @@ class CommandCSSetDescription : public Command
ci->desc = params[1];
- notice_lang(Config.s_ChanServ, u, CHAN_DESC_CHANGED, ci->name.c_str(), ci->desc.c_str());
+ notice_lang(Config->s_ChanServ, u, CHAN_DESC_CHANGED, ci->name.c_str(), ci->desc.c_str());
return MOD_CONT;
}
bool OnHelp(User *u, const Anope::string &)
{
- notice_help(Config.s_ChanServ, u, CHAN_HELP_SET_DESC, "SET");
+ notice_help(Config->s_ChanServ, u, CHAN_HELP_SET_DESC, "SET");
return true;
}
void OnSyntaxError(User *u, const Anope::string &)
{
// XXX
- syntax_error(Config.s_ChanServ, u, "SET", CHAN_SET_SYNTAX);
+ syntax_error(Config->s_ChanServ, u, "SET", CHAN_SET_SYNTAX);
}
void OnServHelp(User *u)
{
- notice_lang(Config.s_ChanServ, u, CHAN_HELP_CMD_SET_DESC);
+ notice_lang(Config->s_ChanServ, u, CHAN_HELP_CMD_SET_DESC);
}
};
@@ -60,14 +60,14 @@ class CommandCSSASetDescription : public CommandCSSetDescription
bool OnHelp(User *u, const Anope::string &)
{
- notice_help(Config.s_ChanServ, u, CHAN_HELP_SET_DESC, "SASET");
+ notice_help(Config->s_ChanServ, u, CHAN_HELP_SET_DESC, "SASET");
return true;
}
void OnSyntaxError(User *u, const Anope::string &)
{
// XXX
- syntax_error(Config.s_ChanServ, u, "SASET", CHAN_SASET_SYNTAX);
+ syntax_error(Config->s_ChanServ, u, "SASET", CHAN_SASET_SYNTAX);
}
};
diff --git a/modules/core/cs_set_entrymsg.cpp b/modules/core/cs_set_entrymsg.cpp
index 2e56cdba9..0e864e666 100644
--- a/modules/core/cs_set_entrymsg.cpp
+++ b/modules/core/cs_set_entrymsg.cpp
@@ -29,12 +29,12 @@ class CommandCSSetEntryMsg : public Command
if (params.size() > 1)
{
ci->entry_message = params[1];
- notice_lang(Config.s_ChanServ, u, CHAN_ENTRY_MSG_CHANGED, ci->name.c_str(), ci->entry_message.c_str());
+ notice_lang(Config->s_ChanServ, u, CHAN_ENTRY_MSG_CHANGED, ci->name.c_str(), ci->entry_message.c_str());
}
else
{
ci->entry_message.clear();
- notice_lang(Config.s_ChanServ, u, CHAN_ENTRY_MSG_UNSET, ci->name.c_str());
+ notice_lang(Config->s_ChanServ, u, CHAN_ENTRY_MSG_UNSET, ci->name.c_str());
}
return MOD_CONT;
@@ -42,19 +42,19 @@ class CommandCSSetEntryMsg : public Command
bool OnHelp(User *u, const Anope::string &)
{
- notice_help(Config.s_ChanServ, u, CHAN_HELP_SET_ENTRYMSG, "SET");
+ notice_help(Config->s_ChanServ, u, CHAN_HELP_SET_ENTRYMSG, "SET");
return true;
}
void OnSyntaxError(User *u, const Anope::string &)
{
// XXX
- syntax_error(Config.s_ChanServ, u, "SET", CHAN_SET_SYNTAX);
+ syntax_error(Config->s_ChanServ, u, "SET", CHAN_SET_SYNTAX);
}
void OnServHelp(User *u)
{
- notice_lang(Config.s_ChanServ, u, CHAN_HELP_CMD_SET_ENTRYMSG);
+ notice_lang(Config->s_ChanServ, u, CHAN_HELP_CMD_SET_ENTRYMSG);
}
};
@@ -67,14 +67,14 @@ class CommandCSSASetEntryMsg : public CommandCSSetEntryMsg
bool OnHelp(User *u, const Anope::string &)
{
- notice_help(Config.s_ChanServ, u, CHAN_HELP_SET_ENTRYMSG, "SASET");
+ notice_help(Config->s_ChanServ, u, CHAN_HELP_SET_ENTRYMSG, "SASET");
return true;
}
void OnSyntaxError(User *u, const Anope::string &)
{
// XXX
- syntax_error(Config.s_ChanServ, u, "SASET", CHAN_SASET_SYNTAX);
+ syntax_error(Config->s_ChanServ, u, "SASET", CHAN_SASET_SYNTAX);
}
};
diff --git a/modules/core/cs_set_founder.cpp b/modules/core/cs_set_founder.cpp
index 5daefcba9..b6af6220a 100644
--- a/modules/core/cs_set_founder.cpp
+++ b/modules/core/cs_set_founder.cpp
@@ -28,7 +28,7 @@ class CommandCSSetFounder : public Command
if (this->permission.empty() && (ci->HasFlag(CI_SECUREFOUNDER) ? !IsFounder(u, ci) : !check_access(u, ci, CA_FOUNDER)))
{
- notice_lang(Config.s_ChanServ, u, ACCESS_DENIED);
+ notice_lang(Config->s_ChanServ, u, ACCESS_DENIED);
return MOD_CONT;
}
@@ -37,23 +37,23 @@ class CommandCSSetFounder : public Command
if (!na)
{
- notice_lang(Config.s_ChanServ, u, NICK_X_NOT_REGISTERED, params[1].c_str());
+ notice_lang(Config->s_ChanServ, u, NICK_X_NOT_REGISTERED, params[1].c_str());
return MOD_CONT;
}
else if (na->HasFlag(NS_FORBIDDEN))
{
- notice_lang(Config.s_ChanServ, u, NICK_X_FORBIDDEN, na->nick.c_str());
+ notice_lang(Config->s_ChanServ, u, NICK_X_FORBIDDEN, na->nick.c_str());
return MOD_CONT;
}
nc = na->nc;
- if (Config.CSMaxReg && nc->channelcount >= Config.CSMaxReg && !u->Account()->HasPriv("chanserv/no-register-limit"))
+ if (Config->CSMaxReg && nc->channelcount >= Config->CSMaxReg && !u->Account()->HasPriv("chanserv/no-register-limit"))
{
- notice_lang(Config.s_ChanServ, u, CHAN_SET_FOUNDER_TOO_MANY_CHANS, na->nick.c_str());
+ notice_lang(Config->s_ChanServ, u, CHAN_SET_FOUNDER_TOO_MANY_CHANS, na->nick.c_str());
return MOD_CONT;
}
- Alog() << Config.s_ChanServ << ": Changing founder of " << ci->name << " from " << ci->founder->display << " to " << nc->display << " by " << u->GetMask();
+ Alog() << Config->s_ChanServ << ": Changing founder of " << ci->name << " from " << ci->founder->display << " to " << nc->display << " by " << u->GetMask();
/* Founder and successor must not be the same group */
if (nc == ci->successor)
@@ -63,26 +63,26 @@ class CommandCSSetFounder : public Command
ci->founder = nc;
++nc->channelcount;
- notice_lang(Config.s_ChanServ, u, CHAN_FOUNDER_CHANGED, ci->name.c_str(), na->nick.c_str());
+ notice_lang(Config->s_ChanServ, u, CHAN_FOUNDER_CHANGED, ci->name.c_str(), na->nick.c_str());
return MOD_CONT;
}
bool OnHelp(User *u, const Anope::string &)
{
- notice_help(Config.s_ChanServ, u, CHAN_HELP_SET_FOUNDER, "SET");
+ notice_help(Config->s_ChanServ, u, CHAN_HELP_SET_FOUNDER, "SET");
return true;
}
void OnSyntaxError(User *u, const Anope::string &)
{
// XXX
- syntax_error(Config.s_ChanServ, u, "SET", CHAN_SET_SYNTAX);
+ syntax_error(Config->s_ChanServ, u, "SET", CHAN_SET_SYNTAX);
}
void OnServHelp(User *u)
{
- notice_lang(Config.s_ChanServ, u, CHAN_HELP_CMD_SET_FOUNDER);
+ notice_lang(Config->s_ChanServ, u, CHAN_HELP_CMD_SET_FOUNDER);
}
};
@@ -95,14 +95,14 @@ class CommandCSSASetFounder : public CommandCSSetFounder
bool OnHelp(User *u, const Anope::string &)
{
- notice_help(Config.s_ChanServ, u, CHAN_HELP_SET_FOUNDER, "SASET");
+ notice_help(Config->s_ChanServ, u, CHAN_HELP_SET_FOUNDER, "SASET");
return true;
}
void OnSyntaxError(User *u, const Anope::string &)
{
// XXX
- syntax_error(Config.s_ChanServ, u, "SASET", CHAN_SASET_SYNTAX);
+ syntax_error(Config->s_ChanServ, u, "SASET", CHAN_SASET_SYNTAX);
}
};
diff --git a/modules/core/cs_set_keeptopic.cpp b/modules/core/cs_set_keeptopic.cpp
index df494f48b..d5b718d71 100644
--- a/modules/core/cs_set_keeptopic.cpp
+++ b/modules/core/cs_set_keeptopic.cpp
@@ -29,12 +29,12 @@ class CommandCSSetKeepTopic : public Command
if (params[1].equals_ci("ON"))
{
ci->SetFlag(CI_KEEPTOPIC);
- notice_lang(Config.s_ChanServ, u, CHAN_SET_KEEPTOPIC_ON, ci->name.c_str());
+ notice_lang(Config->s_ChanServ, u, CHAN_SET_KEEPTOPIC_ON, ci->name.c_str());
}
else if (params[1].equals_ci("OFF"))
{
ci->UnsetFlag(CI_KEEPTOPIC);
- notice_lang(Config.s_ChanServ, u, CHAN_SET_KEEPTOPIC_OFF, ci->name.c_str());
+ notice_lang(Config->s_ChanServ, u, CHAN_SET_KEEPTOPIC_OFF, ci->name.c_str());
}
else
this->OnSyntaxError(u, "KEEPTOPIC");
@@ -44,18 +44,18 @@ class CommandCSSetKeepTopic : public Command
bool OnHelp(User *u, const Anope::string &)
{
- notice_help(Config.s_ChanServ, u, CHAN_HELP_SET_KEEPTOPIC, "SET");
+ notice_help(Config->s_ChanServ, u, CHAN_HELP_SET_KEEPTOPIC, "SET");
return true;
}
void OnSyntaxError(User *u, const Anope::string &)
{
- syntax_error(Config.s_ChanServ, u, "SET KEEPTOPIC", CHAN_SET_KEEPTOPIC_SYNTAX);
+ syntax_error(Config->s_ChanServ, u, "SET KEEPTOPIC", CHAN_SET_KEEPTOPIC_SYNTAX);
}
void OnServHelp(User *u)
{
- notice_lang(Config.s_ChanServ, u, CHAN_HELP_CMD_SET_KEEPTOPIC);
+ notice_lang(Config->s_ChanServ, u, CHAN_HELP_CMD_SET_KEEPTOPIC);
}
};
@@ -68,13 +68,13 @@ class CommandCSSASetKeepTopic : public CommandCSSetKeepTopic
bool OnHelp(User *u, const Anope::string &)
{
- notice_help(Config.s_ChanServ, u, CHAN_HELP_SET_KEEPTOPIC, "SASET");
+ notice_help(Config->s_ChanServ, u, CHAN_HELP_SET_KEEPTOPIC, "SASET");
return true;
}
void OnSyntaxError(User *u, const Anope::string &)
{
- syntax_error(Config.s_ChanServ, u, "SET KEEPTOPIC", CHAN_SASET_KEEPTOPIC_SYNTAX);
+ syntax_error(Config->s_ChanServ, u, "SET KEEPTOPIC", CHAN_SASET_KEEPTOPIC_SYNTAX);
}
};
diff --git a/modules/core/cs_set_mlock.cpp b/modules/core/cs_set_mlock.cpp
index 263f7e477..cfae860a7 100644
--- a/modules/core/cs_set_mlock.cpp
+++ b/modules/core/cs_set_mlock.cpp
@@ -55,7 +55,7 @@ class CommandCSSetMLock : public Command
if ((cm = ModeManager::FindChannelModeByChar(*ch)))
{
if (cm->Type == MODE_STATUS || cm->Type == MODE_LIST || !cm->CanSet(u))
- notice_lang(Config.s_ChanServ, u, CHAN_SET_MLOCK_IMPOSSIBLE_CHAR, *ch);
+ notice_lang(Config->s_ChanServ, u, CHAN_SET_MLOCK_IMPOSSIBLE_CHAR, *ch);
else if (add)
{
ci->RemoveMLock(cm->Name);
@@ -81,14 +81,14 @@ class CommandCSSetMLock : public Command
ci->SetMLock(cm->Name, false);
}
else
- notice_lang(Config.s_ChanServ, u, CHAN_SET_MLOCK_UNKNOWN_CHAR, *ch);
+ notice_lang(Config->s_ChanServ, u, CHAN_SET_MLOCK_UNKNOWN_CHAR, *ch);
}
/* We can't mlock +L if +l is not mlocked as well. */
if (ModeManager::FindChannelModeByName(CMODE_REDIRECT) && ci->HasMLock(CMODE_REDIRECT, true) && !ci->HasMLock(CMODE_LIMIT, true))
{
ci->RemoveMLock(CMODE_REDIRECT);
- notice_lang(Config.s_ChanServ, u, CHAN_SET_MLOCK_L_REQUIRED);
+ notice_lang(Config->s_ChanServ, u, CHAN_SET_MLOCK_L_REQUIRED);
}
/* Some ircd we can't set NOKNOCK without INVITE */
@@ -96,14 +96,14 @@ class CommandCSSetMLock : public Command
if (ModeManager::FindChannelModeByName(CMODE_NOKNOCK) && ircd->knock_needs_i && ci->HasMLock(CMODE_NOKNOCK, true) && !ci->HasMLock(CMODE_INVITE, true))
{
ci->RemoveMLock(CMODE_NOKNOCK);
- notice_lang(Config.s_ChanServ, u, CHAN_SET_MLOCK_K_REQUIRED);
+ notice_lang(Config->s_ChanServ, u, CHAN_SET_MLOCK_K_REQUIRED);
}
/* Since we always enforce mode r there is no way to have no
* mode lock at all.
*/
if (!get_mlock_modes(ci, 0).empty())
- notice_lang(Config.s_ChanServ, u, CHAN_MLOCK_CHANGED, ci->name.c_str(), get_mlock_modes(ci, 0).c_str());
+ notice_lang(Config->s_ChanServ, u, CHAN_MLOCK_CHANGED, ci->name.c_str(), get_mlock_modes(ci, 0).c_str());
/* Implement the new lock. */
if (ci->c)
@@ -114,19 +114,19 @@ class CommandCSSetMLock : public Command
bool OnHelp(User *u, const Anope::string &)
{
- notice_help(Config.s_ChanServ, u, CHAN_HELP_SET_MLOCK, "SET");
+ notice_help(Config->s_ChanServ, u, CHAN_HELP_SET_MLOCK, "SET");
return true;
}
void OnSyntaxError(User *u, const Anope::string &)
{
// XXX
- syntax_error(Config.s_ChanServ, u, "SET", CHAN_SET_SYNTAX);
+ syntax_error(Config->s_ChanServ, u, "SET", CHAN_SET_SYNTAX);
}
void OnServHelp(User *u)
{
- notice_lang(Config.s_ChanServ, u, CHAN_HELP_CMD_SET_MLOCK);
+ notice_lang(Config->s_ChanServ, u, CHAN_HELP_CMD_SET_MLOCK);
}
};
@@ -139,14 +139,14 @@ class CommandCSSASetMLock : public CommandCSSetMLock
bool OnHelp(User *u, const Anope::string &)
{
- notice_help(Config.s_ChanServ, u, CHAN_HELP_SET_MLOCK, "SASET");
+ notice_help(Config->s_ChanServ, u, CHAN_HELP_SET_MLOCK, "SASET");
return true;
}
void OnSyntaxError(User *u, const Anope::string &)
{
// XXX
- syntax_error(Config.s_ChanServ, u, "SASET", CHAN_SASET_SYNTAX);
+ syntax_error(Config->s_ChanServ, u, "SASET", CHAN_SASET_SYNTAX);
}
};
diff --git a/modules/core/cs_set_opnotice.cpp b/modules/core/cs_set_opnotice.cpp
index 69db85109..6db794d76 100644
--- a/modules/core/cs_set_opnotice.cpp
+++ b/modules/core/cs_set_opnotice.cpp
@@ -29,12 +29,12 @@ class CommandCSSetOpNotice : public Command
if (params[1].equals_ci("ON"))
{
ci->SetFlag(CI_OPNOTICE);
- notice_lang(Config.s_ChanServ, u, CHAN_SET_OPNOTICE_ON, ci->name.c_str());
+ notice_lang(Config->s_ChanServ, u, CHAN_SET_OPNOTICE_ON, ci->name.c_str());
}
else if (params[1].equals_ci("OFF"))
{
ci->UnsetFlag(CI_OPNOTICE);
- notice_lang(Config.s_ChanServ, u, CHAN_SET_OPNOTICE_OFF, ci->name.c_str());
+ notice_lang(Config->s_ChanServ, u, CHAN_SET_OPNOTICE_OFF, ci->name.c_str());
}
else
this->OnSyntaxError(u, "OPNOTICE");
@@ -44,18 +44,18 @@ class CommandCSSetOpNotice : public Command
bool OnHelp(User *u, const Anope::string &)
{
- notice_help(Config.s_ChanServ, u, CHAN_HELP_SET_OPNOTICE, "SET");
+ notice_help(Config->s_ChanServ, u, CHAN_HELP_SET_OPNOTICE, "SET");
return true;
}
void OnSyntaxError(User *u, const Anope::string &)
{
- syntax_error(Config.s_ChanServ, u, "SET OPNOTICE", CHAN_SET_OPNOTICE_SYNTAX);
+ syntax_error(Config->s_ChanServ, u, "SET OPNOTICE", CHAN_SET_OPNOTICE_SYNTAX);
}
void OnServHelp(User *u)
{
- notice_lang(Config.s_ChanServ, u, CHAN_HELP_CMD_SET_OPNOTICE);
+ notice_lang(Config->s_ChanServ, u, CHAN_HELP_CMD_SET_OPNOTICE);
}
};
@@ -68,13 +68,13 @@ class CommandCSSASetOpNotice : public CommandCSSetOpNotice
bool OnHelp(User *u, const Anope::string &)
{
- notice_help(Config.s_ChanServ, u, CHAN_HELP_SET_OPNOTICE, "SASET");
+ notice_help(Config->s_ChanServ, u, CHAN_HELP_SET_OPNOTICE, "SASET");
return true;
}
void OnSyntaxError(User *u, const Anope::string &)
{
- syntax_error(Config.s_ChanServ, u, "SET OPNOTICE", CHAN_SASET_OPNOTICE_SYNTAX);
+ syntax_error(Config->s_ChanServ, u, "SET OPNOTICE", CHAN_SASET_OPNOTICE_SYNTAX);
}
};
diff --git a/modules/core/cs_set_peace.cpp b/modules/core/cs_set_peace.cpp
index f8c21132a..0c2454f70 100644
--- a/modules/core/cs_set_peace.cpp
+++ b/modules/core/cs_set_peace.cpp
@@ -29,12 +29,12 @@ class CommandCSSetPeace : public Command
if (params[1].equals_ci("ON"))
{
ci->SetFlag(CI_PEACE);
- notice_lang(Config.s_ChanServ, u, CHAN_SET_PEACE_ON, ci->name.c_str());
+ notice_lang(Config->s_ChanServ, u, CHAN_SET_PEACE_ON, ci->name.c_str());
}
else if (params[1].equals_ci("OFF"))
{
ci->UnsetFlag(CI_PEACE);
- notice_lang(Config.s_ChanServ, u, CHAN_SET_PEACE_OFF, ci->name.c_str());
+ notice_lang(Config->s_ChanServ, u, CHAN_SET_PEACE_OFF, ci->name.c_str());
}
else
this->OnSyntaxError(u, "PEACE");
@@ -44,18 +44,18 @@ class CommandCSSetPeace : public Command
bool OnHelp(User *u, const Anope::string &)
{
- notice_help(Config.s_ChanServ, u, CHAN_HELP_SET_PEACE, "SET");
+ notice_help(Config->s_ChanServ, u, CHAN_HELP_SET_PEACE, "SET");
return true;
}
void OnSyntaxError(User *u, const Anope::string &)
{
- syntax_error(Config.s_ChanServ, u, "SET PEACE", CHAN_SET_PEACE_SYNTAX);
+ syntax_error(Config->s_ChanServ, u, "SET PEACE", CHAN_SET_PEACE_SYNTAX);
}
void OnServHelp(User *u)
{
- notice_lang(Config.s_ChanServ, u, CHAN_HELP_CMD_SET_PEACE, "SET");
+ notice_lang(Config->s_ChanServ, u, CHAN_HELP_CMD_SET_PEACE, "SET");
}
};
@@ -68,13 +68,13 @@ class CommandCSSASetPeace : public CommandCSSetPeace
bool OnHelp(User *u, const Anope::string &)
{
- notice_help(Config.s_ChanServ, u, CHAN_HELP_SET_PEACE, "SASET");
+ notice_help(Config->s_ChanServ, u, CHAN_HELP_SET_PEACE, "SASET");
return true;
}
void OnSyntaxError(User *u, const Anope::string &)
{
- syntax_error(Config.s_ChanServ, u, "SASET PEACE", CHAN_SASET_PEACE_SYNTAX);
+ syntax_error(Config->s_ChanServ, u, "SASET PEACE", CHAN_SASET_PEACE_SYNTAX);
}
};
diff --git a/modules/core/cs_set_persist.cpp b/modules/core/cs_set_persist.cpp
index 076cca95b..fe3c84242 100644
--- a/modules/core/cs_set_persist.cpp
+++ b/modules/core/cs_set_persist.cpp
@@ -44,7 +44,7 @@ class CommandCSSetPersist : public Command
/* No botserv bot, no channel mode */
/* Give them ChanServ
- * Yes, this works fine with no Config.s_BotServ
+ * Yes, this works fine with no Config->s_BotServ
*/
if (!ci->bi && !cm)
{
@@ -58,7 +58,7 @@ class CommandCSSetPersist : public Command
ci->c->SetMode(NULL, cm);
}
- notice_lang(Config.s_ChanServ, u, CHAN_SET_PERSIST_ON, ci->name.c_str());
+ notice_lang(Config->s_ChanServ, u, CHAN_SET_PERSIST_ON, ci->name.c_str());
}
else if (params[1].equals_ci("OFF"))
{
@@ -73,12 +73,12 @@ class CommandCSSetPersist : public Command
/* No channel mode, no BotServ, but using ChanServ as the botserv bot
* which was assigned when persist was set on
*/
- if (!cm && Config.s_BotServ.empty() && ci->bi)
+ if (!cm && Config->s_BotServ.empty() && ci->bi)
/* Unassign bot */
ChanServ->UnAssign(NULL, ci);
}
- notice_lang(Config.s_ChanServ, u, CHAN_SET_PERSIST_OFF, ci->name.c_str());
+ notice_lang(Config->s_ChanServ, u, CHAN_SET_PERSIST_OFF, ci->name.c_str());
}
else
this->OnSyntaxError(u, "PERSIST");
@@ -88,18 +88,18 @@ class CommandCSSetPersist : public Command
bool OnHelp(User *u, const Anope::string &)
{
- notice_help(Config.s_ChanServ, u, CHAN_HELP_SET_PERSIST, "SET");
+ notice_help(Config->s_ChanServ, u, CHAN_HELP_SET_PERSIST, "SET");
return true;
}
void OnSyntaxError(User *u, const Anope::string &)
{
- syntax_error(Config.s_ChanServ, u, "SET PERSIST", CHAN_SET_PERSIST_SYNTAX);
+ syntax_error(Config->s_ChanServ, u, "SET PERSIST", CHAN_SET_PERSIST_SYNTAX);
}
void OnServHelp(User *u)
{
- notice_lang(Config.s_ChanServ, u, CHAN_HELP_CMD_SET_PERSIST);
+ notice_lang(Config->s_ChanServ, u, CHAN_HELP_CMD_SET_PERSIST);
}
};
@@ -112,13 +112,13 @@ class CommandCSSASetPersist : public CommandCSSetPersist
bool OnHelp(User *u, const Anope::string &)
{
- notice_help(Config.s_ChanServ, u, CHAN_HELP_SET_PERSIST, "SASET");
+ notice_help(Config->s_ChanServ, u, CHAN_HELP_SET_PERSIST, "SASET");
return true;
}
void OnSyntaxError(User *u, const Anope::string &)
{
- syntax_error(Config.s_ChanServ, u, "SASET PERSIST", CHAN_SASET_PERSIST_SYNTAX);
+ syntax_error(Config->s_ChanServ, u, "SASET PERSIST", CHAN_SASET_PERSIST_SYNTAX);
}
};
diff --git a/modules/core/cs_set_private.cpp b/modules/core/cs_set_private.cpp
index 68ed17fa5..c116fdbbe 100644
--- a/modules/core/cs_set_private.cpp
+++ b/modules/core/cs_set_private.cpp
@@ -29,12 +29,12 @@ class CommandCSSetPrivate : public Command
if (params[1].equals_ci("ON"))
{
ci->SetFlag(CI_PRIVATE);
- notice_lang(Config.s_ChanServ, u, CHAN_SET_PRIVATE_ON, ci->name.c_str());
+ notice_lang(Config->s_ChanServ, u, CHAN_SET_PRIVATE_ON, ci->name.c_str());
}
else if (params[1].equals_ci("OFF"))
{
ci->UnsetFlag(CI_PRIVATE);
- notice_lang(Config.s_ChanServ, u, CHAN_SET_PRIVATE_OFF, ci->name.c_str());
+ notice_lang(Config->s_ChanServ, u, CHAN_SET_PRIVATE_OFF, ci->name.c_str());
}
else
this->OnSyntaxError(u, "PRIVATE");
@@ -44,18 +44,18 @@ class CommandCSSetPrivate : public Command
bool OnHelp(User *u, const Anope::string &)
{
- notice_help(Config.s_ChanServ, u, CHAN_HELP_SET_PRIVATE, "SASET");
+ notice_help(Config->s_ChanServ, u, CHAN_HELP_SET_PRIVATE, "SASET");
return true;
}
void OnSyntaxError(User *u, const Anope::string &)
{
- syntax_error(Config.s_ChanServ, u, "SET PRIVATE", CHAN_SET_PRIVATE_SYNTAX);
+ syntax_error(Config->s_ChanServ, u, "SET PRIVATE", CHAN_SET_PRIVATE_SYNTAX);
}
void OnServHelp(User *u)
{
- notice_lang(Config.s_ChanServ, u, CHAN_HELP_CMD_SET_PRIVATE);
+ notice_lang(Config->s_ChanServ, u, CHAN_HELP_CMD_SET_PRIVATE);
}
};
@@ -68,13 +68,13 @@ class CommandCSSASetPrivate : public CommandCSSetPrivate
bool OnHelp(User *u, const Anope::string &)
{
- notice_help(Config.s_ChanServ, u, CHAN_HELP_SET_PRIVATE, "SASET");
+ notice_help(Config->s_ChanServ, u, CHAN_HELP_SET_PRIVATE, "SASET");
return true;
}
void OnSyntaxError(User *u, const Anope::string &)
{
- syntax_error(Config.s_ChanServ, u, "SASET PRIVATE", CHAN_SASET_PRIVATE_SYNTAX);
+ syntax_error(Config->s_ChanServ, u, "SASET PRIVATE", CHAN_SASET_PRIVATE_SYNTAX);
}
};
diff --git a/modules/core/cs_set_restricted.cpp b/modules/core/cs_set_restricted.cpp
index 23531c80b..bd376cac1 100644
--- a/modules/core/cs_set_restricted.cpp
+++ b/modules/core/cs_set_restricted.cpp
@@ -30,14 +30,14 @@ class CommandCSSetRestricted : public Command
ci->SetFlag(CI_RESTRICTED);
if (ci->levels[CA_NOJOIN] < 0)
ci->levels[CA_NOJOIN] = 0;
- notice_lang(Config.s_ChanServ, u, CHAN_SET_RESTRICTED_ON, ci->name.c_str());
+ notice_lang(Config->s_ChanServ, u, CHAN_SET_RESTRICTED_ON, ci->name.c_str());
}
else if (params[1].equals_ci("OFF"))
{
ci->UnsetFlag(CI_RESTRICTED);
if (ci->levels[CA_NOJOIN] >= 0)
ci->levels[CA_NOJOIN] = -2;
- notice_lang(Config.s_ChanServ, u, CHAN_SET_RESTRICTED_OFF, ci->name.c_str());
+ notice_lang(Config->s_ChanServ, u, CHAN_SET_RESTRICTED_OFF, ci->name.c_str());
}
else
this->OnSyntaxError(u, "RESTRICTED");
@@ -47,18 +47,18 @@ class CommandCSSetRestricted : public Command
bool OnHelp(User *u, const Anope::string &)
{
- notice_help(Config.s_ChanServ, u, CHAN_HELP_SET_RESTRICTED, "SET");
+ notice_help(Config->s_ChanServ, u, CHAN_HELP_SET_RESTRICTED, "SET");
return true;
}
void OnSyntaxError(User *u, const Anope::string &)
{
- syntax_error(Config.s_ChanServ, u, "SET RESTRICTED", CHAN_SET_RESTRICTED_SYNTAX);
+ syntax_error(Config->s_ChanServ, u, "SET RESTRICTED", CHAN_SET_RESTRICTED_SYNTAX);
}
void OnServHelp(User *u)
{
- notice_lang(Config.s_ChanServ, u, CHAN_HELP_CMD_SET_RESTRICTED);
+ notice_lang(Config->s_ChanServ, u, CHAN_HELP_CMD_SET_RESTRICTED);
}
};
@@ -71,13 +71,13 @@ class CommandCSSASetRestricted : public CommandCSSetRestricted
bool OnHelp(User *u, const Anope::string &)
{
- notice_help(Config.s_ChanServ, u, CHAN_HELP_SET_RESTRICTED, "SASET");
+ notice_help(Config->s_ChanServ, u, CHAN_HELP_SET_RESTRICTED, "SASET");
return true;
}
void OnSyntaxError(User *u, const Anope::string &)
{
- syntax_error(Config.s_ChanServ, u, "SASET RESTRICTED", CHAN_SASET_RESTRICTED_SYNTAX);
+ syntax_error(Config->s_ChanServ, u, "SASET RESTRICTED", CHAN_SASET_RESTRICTED_SYNTAX);
}
};
diff --git a/modules/core/cs_set_secure.cpp b/modules/core/cs_set_secure.cpp
index 8942c794a..53b19b894 100644
--- a/modules/core/cs_set_secure.cpp
+++ b/modules/core/cs_set_secure.cpp
@@ -29,12 +29,12 @@ class CommandCSSetSecure : public Command
if (params[1].equals_ci("ON"))
{
ci->SetFlag(CI_SECURE);
- notice_lang(Config.s_ChanServ, u, CHAN_SET_SECURE_ON, ci->name.c_str());
+ notice_lang(Config->s_ChanServ, u, CHAN_SET_SECURE_ON, ci->name.c_str());
}
else if (params[1].equals_ci("OFF"))
{
ci->UnsetFlag(CI_SECURE);
- notice_lang(Config.s_ChanServ, u, CHAN_SET_SECURE_OFF, ci->name.c_str());
+ notice_lang(Config->s_ChanServ, u, CHAN_SET_SECURE_OFF, ci->name.c_str());
}
else
this->OnSyntaxError(u, "SECURE");
@@ -44,18 +44,18 @@ class CommandCSSetSecure : public Command
bool OnHelp(User *u, const Anope::string &)
{
- notice_help(Config.s_ChanServ, u, CHAN_HELP_SET_SECURE, "SET", Config.s_NickServ.c_str());
+ notice_help(Config->s_ChanServ, u, CHAN_HELP_SET_SECURE, "SET", Config->s_NickServ.c_str());
return true;
}
void OnSyntaxError(User *u, const Anope::string &)
{
- syntax_error(Config.s_ChanServ, u, "SET SECURE", CHAN_SET_SECURE_SYNTAX);
+ syntax_error(Config->s_ChanServ, u, "SET SECURE", CHAN_SET_SECURE_SYNTAX);
}
void OnServHelp(User *u)
{
- notice_help(Config.s_ChanServ, u, CHAN_HELP_CMD_SET_SECURE);
+ notice_help(Config->s_ChanServ, u, CHAN_HELP_CMD_SET_SECURE);
}
};
@@ -68,13 +68,13 @@ class CommandCSSASetSecure : public CommandCSSetSecure
bool OnHelp(User *u, const Anope::string &)
{
- notice_help(Config.s_ChanServ, u, CHAN_HELP_SET_SECURE, "SASET", Config.s_NickServ.c_str());
+ notice_help(Config->s_ChanServ, u, CHAN_HELP_SET_SECURE, "SASET", Config->s_NickServ.c_str());
return true;
}
void OnSyntaxError(User *u, const Anope::string &)
{
- syntax_error(Config.s_ChanServ, u, "SASET SECURE", CHAN_SASET_SECURE_SYNTAX);
+ syntax_error(Config->s_ChanServ, u, "SASET SECURE", CHAN_SASET_SECURE_SYNTAX);
}
};
diff --git a/modules/core/cs_set_securefounder.cpp b/modules/core/cs_set_securefounder.cpp
index bf2db2048..b31097d01 100644
--- a/modules/core/cs_set_securefounder.cpp
+++ b/modules/core/cs_set_securefounder.cpp
@@ -28,19 +28,19 @@ class CommandCSSetSecureFounder : public Command
if (this->permission.empty() && ci->HasFlag(CI_SECUREFOUNDER) ? !IsFounder(u, ci) : !check_access(u, ci, CA_FOUNDER))
{
- notice_lang(Config.s_ChanServ, u, ACCESS_DENIED);
+ notice_lang(Config->s_ChanServ, u, ACCESS_DENIED);
return MOD_CONT;
}
if (params[1].equals_ci("ON"))
{
ci->SetFlag(CI_SECUREFOUNDER);
- notice_lang(Config.s_ChanServ, u, CHAN_SET_SECUREFOUNDER_ON, ci->name.c_str());
+ notice_lang(Config->s_ChanServ, u, CHAN_SET_SECUREFOUNDER_ON, ci->name.c_str());
}
else if (params[1].equals_ci("OFF"))
{
ci->UnsetFlag(CI_SECUREFOUNDER);
- notice_lang(Config.s_ChanServ, u, CHAN_SET_SECUREFOUNDER_OFF, ci->name.c_str());
+ notice_lang(Config->s_ChanServ, u, CHAN_SET_SECUREFOUNDER_OFF, ci->name.c_str());
}
else
this->OnSyntaxError(u, "SECUREFOUNDER");
@@ -50,18 +50,18 @@ class CommandCSSetSecureFounder : public Command
bool OnHelp(User *u, const Anope::string &)
{
- notice_help(Config.s_ChanServ, u, CHAN_HELP_SET_SECUREFOUNDER, "SET");
+ notice_help(Config->s_ChanServ, u, CHAN_HELP_SET_SECUREFOUNDER, "SET");
return true;
}
void OnSyntaxError(User *u, const Anope::string &)
{
- syntax_error(Config.s_ChanServ, u, "SET SECUREFOUNDER", CHAN_SET_SECUREFOUNDER_SYNTAX);
+ syntax_error(Config->s_ChanServ, u, "SET SECUREFOUNDER", CHAN_SET_SECUREFOUNDER_SYNTAX);
}
void OnServHelp(User *u)
{
- notice_lang(Config.s_ChanServ, u, CHAN_HELP_CMD_SET_SECUREFOUNDER);
+ notice_lang(Config->s_ChanServ, u, CHAN_HELP_CMD_SET_SECUREFOUNDER);
}
};
@@ -74,13 +74,13 @@ class CommandCSSASetSecureFounder : public CommandCSSetSecureFounder
bool OnHelp(User *u, const Anope::string &)
{
- notice_help(Config.s_ChanServ, u, CHAN_HELP_SET_SECUREFOUNDER, "SASET");
+ notice_help(Config->s_ChanServ, u, CHAN_HELP_SET_SECUREFOUNDER, "SASET");
return true;
}
void OnSyntaxError(User *u, const Anope::string &)
{
- syntax_error(Config.s_ChanServ, u, "SASET SECUREFOUNDER", CHAN_SASET_SECUREFOUNDER_SYNTAX);
+ syntax_error(Config->s_ChanServ, u, "SASET SECUREFOUNDER", CHAN_SASET_SECUREFOUNDER_SYNTAX);
}
};
diff --git a/modules/core/cs_set_secureops.cpp b/modules/core/cs_set_secureops.cpp
index d0c4554f6..0aeadd818 100644
--- a/modules/core/cs_set_secureops.cpp
+++ b/modules/core/cs_set_secureops.cpp
@@ -29,12 +29,12 @@ class CommandCSSetSecureOps : public Command
if (params[1].equals_ci("ON"))
{
ci->SetFlag(CI_SECUREOPS);
- notice_lang(Config.s_ChanServ, u, CHAN_SET_SECUREOPS_ON, ci->name.c_str());
+ notice_lang(Config->s_ChanServ, u, CHAN_SET_SECUREOPS_ON, ci->name.c_str());
}
else if (params[1].equals_ci("OFF"))
{
ci->UnsetFlag(CI_SECUREOPS);
- notice_lang(Config.s_ChanServ, u, CHAN_SET_SECUREOPS_OFF, ci->name.c_str());
+ notice_lang(Config->s_ChanServ, u, CHAN_SET_SECUREOPS_OFF, ci->name.c_str());
}
else
this->OnSyntaxError(u, "SECUREOPS");
@@ -44,18 +44,18 @@ class CommandCSSetSecureOps : public Command
bool OnHelp(User *u, const Anope::string &)
{
- notice_help(Config.s_ChanServ, u, CHAN_HELP_SET_SECUREOPS, "SET");
+ notice_help(Config->s_ChanServ, u, CHAN_HELP_SET_SECUREOPS, "SET");
return true;
}
void OnSyntaxError(User *u, const Anope::string &)
{
- syntax_error(Config.s_ChanServ, u, "SET SECUREOPS", CHAN_SET_SECUREOPS_SYNTAX);
+ syntax_error(Config->s_ChanServ, u, "SET SECUREOPS", CHAN_SET_SECUREOPS_SYNTAX);
}
void OnServHelp(User *u)
{
- notice_lang(Config.s_ChanServ, u, CHAN_HELP_CMD_SET_SECUREOPS);
+ notice_lang(Config->s_ChanServ, u, CHAN_HELP_CMD_SET_SECUREOPS);
}
};
@@ -68,13 +68,13 @@ class CommandCSSASetSecureOps : public CommandCSSetSecureOps
bool OnHelp(User *u, const Anope::string &)
{
- notice_help(Config.s_ChanServ, u, CHAN_HELP_SET_SECUREOPS, "SASET");
+ notice_help(Config->s_ChanServ, u, CHAN_HELP_SET_SECUREOPS, "SASET");
return true;
}
void OnSyntaxError(User *u, const Anope::string &)
{
- syntax_error(Config.s_ChanServ, u, "SASET SECUREOPS", CHAN_SASET_SECUREOPS_SYNTAX);
+ syntax_error(Config->s_ChanServ, u, "SASET SECUREOPS", CHAN_SASET_SECUREOPS_SYNTAX);
}
};
diff --git a/modules/core/cs_set_signkick.cpp b/modules/core/cs_set_signkick.cpp
index c0d39d7cf..11210524f 100644
--- a/modules/core/cs_set_signkick.cpp
+++ b/modules/core/cs_set_signkick.cpp
@@ -30,19 +30,19 @@ class CommandCSSetSignKick : public Command
{
ci->SetFlag(CI_SIGNKICK);
ci->UnsetFlag(CI_SIGNKICK_LEVEL);
- notice_lang(Config.s_ChanServ, u, CHAN_SET_SIGNKICK_ON, ci->name.c_str());
+ notice_lang(Config->s_ChanServ, u, CHAN_SET_SIGNKICK_ON, ci->name.c_str());
}
else if (params[1].equals_ci("LEVEL"))
{
ci->SetFlag(CI_SIGNKICK_LEVEL);
ci->UnsetFlag(CI_SIGNKICK);
- notice_lang(Config.s_ChanServ, u, CHAN_SET_SIGNKICK_LEVEL, ci->name.c_str());
+ notice_lang(Config->s_ChanServ, u, CHAN_SET_SIGNKICK_LEVEL, ci->name.c_str());
}
else if (params[1].equals_ci("OFF"))
{
ci->UnsetFlag(CI_SIGNKICK);
ci->UnsetFlag(CI_SIGNKICK_LEVEL);
- notice_lang(Config.s_ChanServ, u, CHAN_SET_SIGNKICK_OFF, ci->name.c_str());
+ notice_lang(Config->s_ChanServ, u, CHAN_SET_SIGNKICK_OFF, ci->name.c_str());
}
else
this->OnSyntaxError(u, "SIGNKICK");
@@ -52,18 +52,18 @@ class CommandCSSetSignKick : public Command
bool OnHelp(User *u, const Anope::string &)
{
- notice_help(Config.s_ChanServ, u, CHAN_HELP_SET_SIGNKICK, "SET");
+ notice_help(Config->s_ChanServ, u, CHAN_HELP_SET_SIGNKICK, "SET");
return true;
}
void OnSyntaxError(User *u, const Anope::string &)
{
- syntax_error(Config.s_ChanServ, u, "SET SIGNKICK", CHAN_SET_SIGNKICK_SYNTAX);
+ syntax_error(Config->s_ChanServ, u, "SET SIGNKICK", CHAN_SET_SIGNKICK_SYNTAX);
}
void OnServHelp(User *u)
{
- notice_lang(Config.s_ChanServ, u, CHAN_HELP_CMD_SET_SIGNKICK);
+ notice_lang(Config->s_ChanServ, u, CHAN_HELP_CMD_SET_SIGNKICK);
}
};
@@ -76,13 +76,13 @@ class CommandCSSASetSignKick : public CommandCSSetSignKick
bool OnHelp(User *u, const Anope::string &)
{
- notice_help(Config.s_ChanServ, u, CHAN_HELP_SET_SIGNKICK, "SASET");
+ notice_help(Config->s_ChanServ, u, CHAN_HELP_SET_SIGNKICK, "SASET");
return true;
}
void OnSyntaxError(User *u, const Anope::string &)
{
- syntax_error(Config.s_ChanServ, u, "SASET SIGNKICK", CHAN_SASET_SIGNKICK_SYNTAX);
+ syntax_error(Config->s_ChanServ, u, "SASET SIGNKICK", CHAN_SASET_SIGNKICK_SYNTAX);
}
};
diff --git a/modules/core/cs_set_successor.cpp b/modules/core/cs_set_successor.cpp
index 10ae237a7..7478651c4 100644
--- a/modules/core/cs_set_successor.cpp
+++ b/modules/core/cs_set_successor.cpp
@@ -28,7 +28,7 @@ class CommandCSSetSuccessor : public Command
if (this->permission.empty() && ci->HasFlag(CI_SECUREFOUNDER) ? !IsFounder(u, ci) : !check_access(u, ci, CA_FOUNDER))
{
- notice_lang(Config.s_ChanServ, u, ACCESS_DENIED);
+ notice_lang(Config->s_ChanServ, u, ACCESS_DENIED);
return MOD_CONT;
}
@@ -40,17 +40,17 @@ class CommandCSSetSuccessor : public Command
if (!na)
{
- notice_lang(Config.s_ChanServ, u, NICK_X_NOT_REGISTERED, params[1].c_str());
+ notice_lang(Config->s_ChanServ, u, NICK_X_NOT_REGISTERED, params[1].c_str());
return MOD_CONT;
}
if (na->HasFlag(NS_FORBIDDEN))
{
- notice_lang(Config.s_ChanServ, u, NICK_X_FORBIDDEN, na->nick.c_str());
+ notice_lang(Config->s_ChanServ, u, NICK_X_FORBIDDEN, na->nick.c_str());
return MOD_CONT;
}
if (na->nc == ci->founder)
{
- notice_lang(Config.s_ChanServ, u, CHAN_SUCCESSOR_IS_FOUNDER, na->nick.c_str(), ci->name.c_str());
+ notice_lang(Config->s_ChanServ, u, CHAN_SUCCESSOR_IS_FOUNDER, na->nick.c_str(), ci->name.c_str());
return MOD_CONT;
}
nc = na->nc;
@@ -58,33 +58,33 @@ class CommandCSSetSuccessor : public Command
else
nc = NULL;
- Alog() << Config.s_ChanServ << ": Changing successor of " << ci->name << " from " << (ci->successor ? ci->successor->display : "none") << " to " << (nc ? nc->display : "none") << " by " << u->GetMask();
+ Alog() << Config->s_ChanServ << ": Changing successor of " << ci->name << " from " << (ci->successor ? ci->successor->display : "none") << " to " << (nc ? nc->display : "none") << " by " << u->GetMask();
ci->successor = nc;
if (nc)
- notice_lang(Config.s_ChanServ, u, CHAN_SUCCESSOR_CHANGED, ci->name.c_str(), nc->display.c_str());
+ notice_lang(Config->s_ChanServ, u, CHAN_SUCCESSOR_CHANGED, ci->name.c_str(), nc->display.c_str());
else
- notice_lang(Config.s_ChanServ, u, CHAN_SUCCESSOR_UNSET, ci->name.c_str());
+ notice_lang(Config->s_ChanServ, u, CHAN_SUCCESSOR_UNSET, ci->name.c_str());
return MOD_CONT;
}
bool OnHelp(User *u, const Anope::string &)
{
- notice_help(Config.s_ChanServ, u, CHAN_HELP_SET_SUCCESSOR, "SET");
+ notice_help(Config->s_ChanServ, u, CHAN_HELP_SET_SUCCESSOR, "SET");
return true;
}
void OnSyntaxError(User *u, const Anope::string &)
{
// XXX
- syntax_error(Config.s_ChanServ, u, "SET", CHAN_SET_SYNTAX);
+ syntax_error(Config->s_ChanServ, u, "SET", CHAN_SET_SYNTAX);
}
void OnServHelp(User *u)
{
- notice_lang(Config.s_ChanServ, u, CHAN_HELP_CMD_SET_SUCCESSOR);
+ notice_lang(Config->s_ChanServ, u, CHAN_HELP_CMD_SET_SUCCESSOR);
}
};
@@ -97,14 +97,14 @@ class CommandCSSASetSuccessor : public CommandCSSetSuccessor
bool OnHelp(User *u, const Anope::string &)
{
- notice_help(Config.s_ChanServ, u, CHAN_HELP_SET_SUCCESSOR, "SASET");
+ notice_help(Config->s_ChanServ, u, CHAN_HELP_SET_SUCCESSOR, "SASET");
return true;
}
void OnSyntaxError(User *u, const Anope::string &)
{
// XXX
- syntax_error(Config.s_ChanServ, u, "SASET", CHAN_SASET_SYNTAX);
+ syntax_error(Config->s_ChanServ, u, "SASET", CHAN_SASET_SYNTAX);
}
};
diff --git a/modules/core/cs_set_topiclock.cpp b/modules/core/cs_set_topiclock.cpp
index 44ae5390c..4e54267a7 100644
--- a/modules/core/cs_set_topiclock.cpp
+++ b/modules/core/cs_set_topiclock.cpp
@@ -29,12 +29,12 @@ class CommandCSSetTopicLock : public Command
if (params[1].equals_ci("ON"))
{
ci->SetFlag(CI_TOPICLOCK);
- notice_lang(Config.s_ChanServ, u, CHAN_SET_TOPICLOCK_ON, ci->name.c_str());
+ notice_lang(Config->s_ChanServ, u, CHAN_SET_TOPICLOCK_ON, ci->name.c_str());
}
else if (params[1].equals_ci("OFF"))
{
ci->UnsetFlag(CI_TOPICLOCK);
- notice_lang(Config.s_ChanServ, u, CHAN_SET_TOPICLOCK_OFF, ci->name.c_str());
+ notice_lang(Config->s_ChanServ, u, CHAN_SET_TOPICLOCK_OFF, ci->name.c_str());
}
else
this->OnSyntaxError(u, "TOPICLOCK");
@@ -44,18 +44,18 @@ class CommandCSSetTopicLock : public Command
bool OnHelp(User *u, const Anope::string &)
{
- notice_help(Config.s_ChanServ, u, CHAN_HELP_SET_TOPICLOCK, "SET");
+ notice_help(Config->s_ChanServ, u, CHAN_HELP_SET_TOPICLOCK, "SET");
return true;
}
void OnSyntaxError(User *u, const Anope::string &)
{
- syntax_error(Config.s_ChanServ, u, "SET", CHAN_SET_TOPICLOCK_SYNTAX);;
+ syntax_error(Config->s_ChanServ, u, "SET", CHAN_SET_TOPICLOCK_SYNTAX);;
}
void OnServHelp(User *u)
{
- notice_lang(Config.s_ChanServ, u, CHAN_HELP_CMD_SET_TOPICLOCK);
+ notice_lang(Config->s_ChanServ, u, CHAN_HELP_CMD_SET_TOPICLOCK);
}
};
@@ -68,13 +68,13 @@ class CommandCSSASetTopicLock : public CommandCSSetTopicLock
bool OnHelp(User *u, const Anope::string &)
{
- notice_help(Config.s_ChanServ, u, CHAN_HELP_SET_TOPICLOCK, "SASET");
+ notice_help(Config->s_ChanServ, u, CHAN_HELP_SET_TOPICLOCK, "SASET");
return true;
}
void OnSyntaxError(User *u, const Anope::string &)
{
- syntax_error(Config.s_ChanServ, u, "SASET", CHAN_SASET_TOPICLOCK_SYNTAX);
+ syntax_error(Config->s_ChanServ, u, "SASET", CHAN_SASET_TOPICLOCK_SYNTAX);
}
};
diff --git a/modules/core/cs_set_xop.cpp b/modules/core/cs_set_xop.cpp
index 1c4c2f431..18e4df76d 100644
--- a/modules/core/cs_set_xop.cpp
+++ b/modules/core/cs_set_xop.cpp
@@ -25,7 +25,7 @@ class CommandCSSetXOP : public Command
{
if (!FindModule("cs_xop"))
{
- notice_lang(Config.s_ChanServ, u, CHAN_XOP_NOT_AVAILABLE, "XOP");
+ notice_lang(Config->s_ChanServ, u, CHAN_XOP_NOT_AVAILABLE, "XOP");
return MOD_CONT;
}
@@ -64,15 +64,15 @@ class CommandCSSetXOP : public Command
ci->SetFlag(CI_XOP);
}
- Alog() << Config.s_ChanServ << ": " << u->GetMask() << " enabled XOP for " << ci->name;
- notice_lang(Config.s_ChanServ, u, CHAN_SET_XOP_ON, ci->name.c_str());
+ Alog() << Config->s_ChanServ << ": " << u->GetMask() << " enabled XOP for " << ci->name;
+ notice_lang(Config->s_ChanServ, u, CHAN_SET_XOP_ON, ci->name.c_str());
}
else if (params[1].equals_ci("OFF"))
{
ci->UnsetFlag(CI_XOP);
- Alog() << Config.s_ChanServ << ": " << u->GetMask() << " disabled XOP for " << ci->name;
- notice_lang(Config.s_ChanServ, u, CHAN_SET_XOP_OFF, ci->name.c_str());
+ Alog() << Config->s_ChanServ << ": " << u->GetMask() << " disabled XOP for " << ci->name;
+ notice_lang(Config->s_ChanServ, u, CHAN_SET_XOP_OFF, ci->name.c_str());
}
else
this->OnSyntaxError(u, "XOP");
@@ -82,18 +82,18 @@ class CommandCSSetXOP : public Command
bool OnHelp(User *u, const Anope::string &)
{
- notice_help(Config.s_ChanServ, u, CHAN_HELP_SET_XOP, "SET");
+ notice_help(Config->s_ChanServ, u, CHAN_HELP_SET_XOP, "SET");
return true;
}
void OnSyntaxError(User *u, const Anope::string &)
{
- syntax_error(Config.s_ChanServ, u, "SET XOP", CHAN_SET_XOP_SYNTAX);
+ syntax_error(Config->s_ChanServ, u, "SET XOP", CHAN_SET_XOP_SYNTAX);
}
void OnServHelp(User *u)
{
- notice_lang(Config.s_ChanServ, u, CHAN_HELP_CMD_SET_XOP);
+ notice_lang(Config->s_ChanServ, u, CHAN_HELP_CMD_SET_XOP);
}
};
@@ -106,13 +106,13 @@ class CommandCSSASetXOP : public CommandCSSetXOP
bool OnHelp(User *u, const Anope::string &)
{
- notice_help(Config.s_ChanServ, u, CHAN_HELP_SET_XOP, "SASET");
+ notice_help(Config->s_ChanServ, u, CHAN_HELP_SET_XOP, "SASET");
return true;
}
void OnSyntaxError(User *u, const Anope::string &)
{
- syntax_error(Config.s_ChanServ, u, "SASET XOP", CHAN_SASET_XOP_SYNTAX);
+ syntax_error(Config->s_ChanServ, u, "SASET XOP", CHAN_SASET_XOP_SYNTAX);
}
};
diff --git a/modules/core/cs_status.cpp b/modules/core/cs_status.cpp
index 0d41a5481..b97bb540a 100644
--- a/modules/core/cs_status.cpp
+++ b/modules/core/cs_status.cpp
@@ -36,28 +36,28 @@ class CommandCSStatus : public Command
ci = cs_findchan(chan);
}
if (!ci)
- notice_lang(Config.s_ChanServ, u, CHAN_STATUS_NOT_REGGED, temp.c_str());
+ notice_lang(Config->s_ChanServ, u, CHAN_STATUS_NOT_REGGED, temp.c_str());
else if ((u2 = finduser(nick)))
- notice_lang(Config.s_ChanServ, u, CHAN_STATUS_INFO, chan.c_str(), nick.c_str(), get_access(u2, ci));
+ notice_lang(Config->s_ChanServ, u, CHAN_STATUS_INFO, chan.c_str(), nick.c_str(), get_access(u2, ci));
else /* !u2 */
- notice_lang(Config.s_ChanServ, u, CHAN_STATUS_NOTONLINE, nick.c_str());
+ notice_lang(Config->s_ChanServ, u, CHAN_STATUS_NOTONLINE, nick.c_str());
return MOD_CONT;
}
bool OnHelp(User *u, const Anope::string &subcommand)
{
- notice_help(Config.s_ChanServ, u, CHAN_SERVADMIN_HELP_STATUS);
+ notice_help(Config->s_ChanServ, u, CHAN_SERVADMIN_HELP_STATUS);
return true;
}
void OnSyntaxError(User *u, const Anope::string &subcommand)
{
- syntax_error(Config.s_ChanServ, u, "STATUS", CHAN_STATUS_SYNTAX);
+ syntax_error(Config->s_ChanServ, u, "STATUS", CHAN_STATUS_SYNTAX);
}
void OnServHelp(User *u)
{
- notice_lang(Config.s_ChanServ, u, CHAN_HELP_CMD_STATUS);
+ notice_lang(Config->s_ChanServ, u, CHAN_HELP_CMD_STATUS);
}
};
diff --git a/modules/core/cs_suspend.cpp b/modules/core/cs_suspend.cpp
index 24a7019f4..7af933a69 100644
--- a/modules/core/cs_suspend.cpp
+++ b/modules/core/cs_suspend.cpp
@@ -29,7 +29,7 @@ class CommandCSSuspend : public Command
Channel *c;
/* Assumes that permission checking has already been done. */
- if (Config.ForceForbidReason && reason.empty())
+ if (Config->ForceForbidReason && reason.empty())
{
this->OnSyntaxError(u, "");
return MOD_CONT;
@@ -37,19 +37,19 @@ class CommandCSSuspend : public Command
if (chan[0] != '#')
{
- notice_lang(Config.s_ChanServ, u, CHAN_UNSUSPEND_ERROR);
+ notice_lang(Config->s_ChanServ, u, CHAN_UNSUSPEND_ERROR);
return MOD_CONT;
}
/* You should not SUSPEND a FORBIDEN channel */
if (ci->HasFlag(CI_FORBIDDEN))
{
- notice_lang(Config.s_ChanServ, u, CHAN_MAY_NOT_BE_REGISTERED, chan.c_str());
+ notice_lang(Config->s_ChanServ, u, CHAN_MAY_NOT_BE_REGISTERED, chan.c_str());
return MOD_CONT;
}
if (readonly)
- notice_lang(Config.s_ChanServ, u, READ_ONLY_MODE);
+ notice_lang(Config->s_ChanServ, u, READ_ONLY_MODE);
if (ci)
{
@@ -71,36 +71,36 @@ class CommandCSSuspend : public Command
}
}
- if (Config.WallForbid)
+ if (Config->WallForbid)
ircdproto->SendGlobops(ChanServ, "\2%s\2 used SUSPEND on channel \2%s\2", u->nick.c_str(), ci->name.c_str());
- Alog() << Config.s_ChanServ << ": " << u->GetMask() << " set SUSPEND for channel " << ci->name;
- notice_lang(Config.s_ChanServ, u, CHAN_SUSPEND_SUCCEEDED, chan.c_str());
+ Alog() << Config->s_ChanServ << ": " << u->GetMask() << " set SUSPEND for channel " << ci->name;
+ notice_lang(Config->s_ChanServ, u, CHAN_SUSPEND_SUCCEEDED, chan.c_str());
FOREACH_MOD(I_OnChanSuspend, OnChanSuspend(ci));
}
else
{
- Alog() << Config.s_ChanServ << ": Valid SUSPEND for " << ci->name << " by " << u->GetMask() << " failed";
- notice_lang(Config.s_ChanServ, u, CHAN_SUSPEND_FAILED, chan.c_str());
+ Alog() << Config->s_ChanServ << ": Valid SUSPEND for " << ci->name << " by " << u->GetMask() << " failed";
+ notice_lang(Config->s_ChanServ, u, CHAN_SUSPEND_FAILED, chan.c_str());
}
return MOD_CONT;
}
bool OnHelp(User *u, const Anope::string &subcommand)
{
- notice_help(Config.s_ChanServ, u, CHAN_SERVADMIN_HELP_SUSPEND);
+ notice_help(Config->s_ChanServ, u, CHAN_SERVADMIN_HELP_SUSPEND);
return true;
}
void OnSyntaxError(User *u, const Anope::string &subcommand)
{
- syntax_error(Config.s_ChanServ, u, "SUSPEND", Config.ForceForbidReason ? CHAN_SUSPEND_SYNTAX_REASON : CHAN_SUSPEND_SYNTAX);
+ syntax_error(Config->s_ChanServ, u, "SUSPEND", Config->ForceForbidReason ? CHAN_SUSPEND_SYNTAX_REASON : CHAN_SUSPEND_SYNTAX);
}
void OnServHelp(User *u)
{
- notice_lang(Config.s_ChanServ, u, CHAN_HELP_CMD_SUSPEND);
+ notice_lang(Config->s_ChanServ, u, CHAN_HELP_CMD_SUSPEND);
}
};
@@ -119,16 +119,16 @@ class CommandCSUnSuspend : public Command
if (chan[0] != '#')
{
- notice_lang(Config.s_ChanServ, u, CHAN_UNSUSPEND_ERROR);
+ notice_lang(Config->s_ChanServ, u, CHAN_UNSUSPEND_ERROR);
return MOD_CONT;
}
if (readonly)
- notice_lang(Config.s_ChanServ, u, READ_ONLY_MODE);
+ notice_lang(Config->s_ChanServ, u, READ_ONLY_MODE);
/* Only UNSUSPEND already suspended channels */
if (!ci->HasFlag(CI_SUSPENDED))
{
- notice_lang(Config.s_ChanServ, u, CHAN_UNSUSPEND_FAILED, chan.c_str());
+ notice_lang(Config->s_ChanServ, u, CHAN_UNSUSPEND_FAILED, chan.c_str());
return MOD_CONT;
}
@@ -138,36 +138,36 @@ class CommandCSUnSuspend : public Command
ci->forbidreason.clear();
ci->forbidby.clear();
- if (Config.WallForbid)
+ if (Config->WallForbid)
ircdproto->SendGlobops(ChanServ, "\2%s\2 used UNSUSPEND on channel \2%s\2", u->nick.c_str(), ci->name.c_str());
- Alog() << Config.s_ChanServ << ": " << u->GetMask() << " set UNSUSPEND for channel " << ci->name;
- notice_lang(Config.s_ChanServ, u, CHAN_UNSUSPEND_SUCCEEDED, chan.c_str());
+ Alog() << Config->s_ChanServ << ": " << u->GetMask() << " set UNSUSPEND for channel " << ci->name;
+ notice_lang(Config->s_ChanServ, u, CHAN_UNSUSPEND_SUCCEEDED, chan.c_str());
FOREACH_MOD(I_OnChanUnsuspend, OnChanUnsuspend(ci));
}
else
{
- Alog() << Config.s_ChanServ << ": Valid UNSUSPEND for " << chan << " by " << u->nick << " failed";
- notice_lang(Config.s_ChanServ, u, CHAN_UNSUSPEND_FAILED, chan.c_str());
+ Alog() << Config->s_ChanServ << ": Valid UNSUSPEND for " << chan << " by " << u->nick << " failed";
+ notice_lang(Config->s_ChanServ, u, CHAN_UNSUSPEND_FAILED, chan.c_str());
}
return MOD_CONT;
}
bool OnHelp(User *u, const Anope::string &subcommand)
{
- notice_help(Config.s_ChanServ, u, CHAN_SERVADMIN_HELP_UNSUSPEND);
+ notice_help(Config->s_ChanServ, u, CHAN_SERVADMIN_HELP_UNSUSPEND);
return true;
}
void OnSyntaxError(User *u, const Anope::string &subcommand)
{
- syntax_error(Config.s_ChanServ, u, "UNSUSPEND", CHAN_UNSUSPEND_SYNTAX);
+ syntax_error(Config->s_ChanServ, u, "UNSUSPEND", CHAN_UNSUSPEND_SYNTAX);
}
void OnServHelp(User *u)
{
- notice_lang(Config.s_ChanServ, u, CHAN_HELP_CMD_UNSUSPEND);
+ notice_lang(Config->s_ChanServ, u, CHAN_HELP_CMD_UNSUSPEND);
}
};
diff --git a/modules/core/cs_topic.cpp b/modules/core/cs_topic.cpp
index 913ceb239..5a421e272 100644
--- a/modules/core/cs_topic.cpp
+++ b/modules/core/cs_topic.cpp
@@ -32,9 +32,9 @@ class CommandCSTopic : public Command
ci = c->ci;
if (!c)
- notice_lang(Config.s_ChanServ, u, CHAN_X_NOT_IN_USE, chan.c_str());
+ notice_lang(Config->s_ChanServ, u, CHAN_X_NOT_IN_USE, chan.c_str());
else if (!check_access(u, ci, CA_TOPIC) && !u->Account()->HasCommand("chanserv/topic"))
- notice_lang(Config.s_ChanServ, u, ACCESS_DENIED);
+ notice_lang(Config->s_ChanServ, u, ACCESS_DENIED);
else
{
ci->last_topic = topic;
@@ -49,11 +49,11 @@ class CommandCSTopic : public Command
c->topic_time = ci->last_topic_time;
if (!check_access(u, ci, CA_TOPIC))
- Alog() << Config.s_NickServ << ": " << u->GetMask() << " changed topic of " << c->name << " as services admin.";
+ Alog() << Config->s_NickServ << ": " << u->GetMask() << " changed topic of " << c->name << " as services admin.";
if (ircd->join2set && whosends(ci) == ChanServ)
{
ChanServ->Join(c);
- ircdproto->SendMode(NULL, c, "+o %s", Config.s_ChanServ.c_str()); // XXX
+ ircdproto->SendMode(NULL, c, "+o %s", Config->s_ChanServ.c_str()); // XXX
}
ircdproto->SendTopic(whosends(ci), c, u->nick, topic);
if (ircd->join2set && whosends(ci) == ChanServ)
@@ -64,18 +64,18 @@ class CommandCSTopic : public Command
bool OnHelp(User *u, const Anope::string &subcommand)
{
- notice_help(Config.s_ChanServ, u, CHAN_HELP_TOPIC);
+ notice_help(Config->s_ChanServ, u, CHAN_HELP_TOPIC);
return true;
}
void OnSyntaxError(User *u, const Anope::string &subcommand)
{
- syntax_error(Config.s_ChanServ, u, "TOPIC", CHAN_TOPIC_SYNTAX);
+ syntax_error(Config->s_ChanServ, u, "TOPIC", CHAN_TOPIC_SYNTAX);
}
void OnServHelp(User *u)
{
- notice_lang(Config.s_ChanServ, u, CHAN_HELP_CMD_TOPIC);
+ notice_lang(Config->s_ChanServ, u, CHAN_HELP_CMD_TOPIC);
}
};
diff --git a/modules/core/cs_unban.cpp b/modules/core/cs_unban.cpp
index 9b9360f23..ab9bdb4b4 100644
--- a/modules/core/cs_unban.cpp
+++ b/modules/core/cs_unban.cpp
@@ -28,13 +28,13 @@ class CommandCSUnban : public Command
if (!(c = findchan(chan)))
{
- notice_lang(Config.s_ChanServ, u, CHAN_X_NOT_IN_USE, chan.c_str());
+ notice_lang(Config->s_ChanServ, u, CHAN_X_NOT_IN_USE, chan.c_str());
return MOD_CONT;
}
if (!check_access(u, c->ci, CA_UNBAN))
{
- notice_lang(Config.s_ChanServ, u, ACCESS_DENIED);
+ notice_lang(Config->s_ChanServ, u, ACCESS_DENIED);
return MOD_CONT;
}
@@ -44,32 +44,32 @@ class CommandCSUnban : public Command
if (!u2)
{
- notice_lang(Config.s_ChanServ, u, NICK_X_NOT_IN_USE, params[1].c_str());
+ notice_lang(Config->s_ChanServ, u, NICK_X_NOT_IN_USE, params[1].c_str());
return MOD_CONT;
}
common_unban(c->ci, u2->nick);
if (u2 == u)
- notice_lang(Config.s_ChanServ, u, CHAN_UNBANNED, c->name.c_str());
+ notice_lang(Config->s_ChanServ, u, CHAN_UNBANNED, c->name.c_str());
else
- notice_lang(Config.s_ChanServ, u, CHAN_UNBANNED_OTHER, u2->nick.c_str(), c->name.c_str());
+ notice_lang(Config->s_ChanServ, u, CHAN_UNBANNED_OTHER, u2->nick.c_str(), c->name.c_str());
return MOD_CONT;
}
bool OnHelp(User *u, const Anope::string &subcommand)
{
- notice_help(Config.s_ChanServ, u, CHAN_HELP_UNBAN);
+ notice_help(Config->s_ChanServ, u, CHAN_HELP_UNBAN);
return true;
}
void OnSyntaxError(User *u, const Anope::string &subcommand)
{
- syntax_error(Config.s_ChanServ, u, "UNBAN", CHAN_UNBAN_SYNTAX);
+ syntax_error(Config->s_ChanServ, u, "UNBAN", CHAN_UNBAN_SYNTAX);
}
void OnServHelp(User *u)
{
- notice_lang(Config.s_ChanServ, u, CHAN_HELP_CMD_UNBAN);
+ notice_lang(Config->s_ChanServ, u, CHAN_HELP_CMD_UNBAN);
}
};
diff --git a/modules/core/cs_xop.cpp b/modules/core/cs_xop.cpp
index b9b271ea3..973febf0a 100644
--- a/modules/core/cs_xop.cpp
+++ b/modules/core/cs_xop.cpp
@@ -134,7 +134,7 @@ class XOPListCallback : public NumberList
if (!SentHeader)
{
SentHeader = true;
- notice_lang(Config.s_ChanServ, u, messages[XOP_LIST_HEADER], ci->name.c_str());
+ notice_lang(Config->s_ChanServ, u, messages[XOP_LIST_HEADER], ci->name.c_str());
}
DoList(u, ci, access, Number - 1, level, messages);
@@ -142,7 +142,7 @@ class XOPListCallback : public NumberList
static void DoList(User *u, ChannelInfo *ci, ChanAccess *access, unsigned index, int level, int *messages)
{
- notice_lang(Config.s_ChanServ, u, CHAN_XOP_LIST_FORMAT, index, access->nc->display.c_str());
+ notice_lang(Config->s_ChanServ, u, CHAN_XOP_LIST_FORMAT, index, access->nc->display.c_str());
}
};
@@ -161,15 +161,15 @@ class XOPDelCallback : public NumberList
~XOPDelCallback()
{
if (!Deleted)
- notice_lang(Config.s_ChanServ, u, messages[XOP_NO_MATCH], ci->name.c_str());
+ notice_lang(Config->s_ChanServ, u, messages[XOP_NO_MATCH], ci->name.c_str());
else
{
- Alog() << Config.s_ChanServ << ": " << u->GetMask() << " (level " << get_access(u, ci) << ") deleted access of users " << Nicks << " on " << ci->name;
+ Alog() << Config->s_ChanServ << ": " << u->GetMask() << " (level " << get_access(u, ci) << ") deleted access of users " << Nicks << " on " << ci->name;
if (Deleted == 1)
- notice_lang(Config.s_ChanServ, u, messages[XOP_DELETED_ONE], ci->name.c_str());
+ notice_lang(Config->s_ChanServ, u, messages[XOP_DELETED_ONE], ci->name.c_str());
else
- notice_lang(Config.s_ChanServ, u, messages[XOP_DELETED_SEVERAL], Deleted, ci->name.c_str());
+ notice_lang(Config->s_ChanServ, u, messages[XOP_DELETED_SEVERAL], Deleted, ci->name.c_str());
}
}
@@ -209,7 +209,7 @@ class XOPBase : public Command
if (readonly)
{
- notice_lang(Config.s_ChanServ, u, messages[XOP_DISABLED]);
+ notice_lang(Config->s_ChanServ, u, messages[XOP_DISABLED]);
return MOD_CONT;
}
@@ -217,19 +217,19 @@ class XOPBase : public Command
if ((level >= ulev || ulev < ACCESS_AOP) && !u->Account()->HasPriv("chanserv/access/modify"))
{
- notice_lang(Config.s_ChanServ, u, ACCESS_DENIED);
+ notice_lang(Config->s_ChanServ, u, ACCESS_DENIED);
return MOD_CONT;
}
NickAlias *na = findnick(nick);
if (!na)
{
- notice_lang(Config.s_ChanServ, u, messages[XOP_NICKS_ONLY]);
+ notice_lang(Config->s_ChanServ, u, messages[XOP_NICKS_ONLY]);
return MOD_CONT;
}
else if (na->HasFlag(NS_FORBIDDEN))
{
- notice_lang(Config.s_ChanServ, u, NICK_X_FORBIDDEN, na->nick.c_str());
+ notice_lang(Config->s_ChanServ, u, NICK_X_FORBIDDEN, na->nick.c_str());
return MOD_CONT;
}
@@ -242,15 +242,15 @@ class XOPBase : public Command
**/
if (access->level >= ulev && !u->Account()->HasPriv("chanserv/access/modify"))
{
- notice_lang(Config.s_ChanServ, u, ACCESS_DENIED);
+ notice_lang(Config->s_ChanServ, u, ACCESS_DENIED);
return MOD_CONT;
}
++change;
}
- if (!change && ci->GetAccessCount() >= Config.CSAccessMax)
+ if (!change && ci->GetAccessCount() >= Config->CSAccessMax)
{
- notice_lang(Config.s_ChanServ, u, CHAN_XOP_REACHED_LIMIT, Config.CSAccessMax);
+ notice_lang(Config->s_ChanServ, u, CHAN_XOP_REACHED_LIMIT, Config->CSAccessMax);
return MOD_CONT;
}
@@ -263,17 +263,17 @@ class XOPBase : public Command
access->creator = u->nick;
}
- Alog() << Config.s_ChanServ << ": " << u->GetMask() << " (level " << ulev << ") " << (change ? "changed" : "set") << " access level " << level << " to " << na->nick << " (group " << nc->display << ") on channel " << ci->name;
+ Alog() << Config->s_ChanServ << ": " << u->GetMask() << " (level " << ulev << ") " << (change ? "changed" : "set") << " access level " << level << " to " << na->nick << " (group " << nc->display << ") on channel " << ci->name;
if (!change)
{
FOREACH_MOD(I_OnAccessAdd, OnAccessAdd(ci, u, nc, level));
- notice_lang(Config.s_ChanServ, u, messages[XOP_ADDED], nc->display.c_str(), ci->name.c_str());
+ notice_lang(Config->s_ChanServ, u, messages[XOP_ADDED], nc->display.c_str(), ci->name.c_str());
}
else
{
FOREACH_MOD(I_OnAccessChange, OnAccessChange(ci, u, na->nc, level));
- notice_lang(Config.s_ChanServ, u, messages[XOP_MOVED], nc->display.c_str(), ci->name.c_str());
+ notice_lang(Config->s_ChanServ, u, messages[XOP_MOVED], nc->display.c_str(), ci->name.c_str());
}
return MOD_CONT;
@@ -292,13 +292,13 @@ class XOPBase : public Command
if (readonly)
{
- notice_lang(Config.s_ChanServ, u, messages[XOP_DISABLED]);
+ notice_lang(Config->s_ChanServ, u, messages[XOP_DISABLED]);
return MOD_CONT;
}
if (!ci->GetAccessCount())
{
- notice_lang(Config.s_ChanServ, u, messages[XOP_LIST_EMPTY], ci->name.c_str());
+ notice_lang(Config->s_ChanServ, u, messages[XOP_LIST_EMPTY], ci->name.c_str());
return MOD_CONT;
}
@@ -306,7 +306,7 @@ class XOPBase : public Command
if ((level >= ulev || ulev < ACCESS_AOP) && !u->Account()->HasPriv("chanserv/access/modify"))
{
- notice_lang(Config.s_ChanServ, u, ACCESS_DENIED);
+ notice_lang(Config->s_ChanServ, u, ACCESS_DENIED);
return MOD_CONT;
}
@@ -321,7 +321,7 @@ class XOPBase : public Command
NickAlias *na = findnick(nick);
if (!na)
{
- notice_lang(Config.s_ChanServ, u, NICK_X_NOT_REGISTERED, nick.c_str());
+ notice_lang(Config->s_ChanServ, u, NICK_X_NOT_REGISTERED, nick.c_str());
return MOD_CONT;
}
NickCore *nc = na->nc;
@@ -337,17 +337,17 @@ class XOPBase : public Command
if (i == end)
{
- notice_lang(Config.s_ChanServ, u, messages[XOP_NOT_FOUND], nick.c_str(), ci->name.c_str());
+ notice_lang(Config->s_ChanServ, u, messages[XOP_NOT_FOUND], nick.c_str(), ci->name.c_str());
return MOD_CONT;
}
if (ulev <= access->level && !u->Account()->HasPriv("chanserv/access/modify"))
- notice_lang(Config.s_ChanServ, u, ACCESS_DENIED);
+ notice_lang(Config->s_ChanServ, u, ACCESS_DENIED);
else
{
- Alog() << Config.s_ChanServ << ": " << u->GetMask() << " (level " << get_access(u, ci) << ") deleted access of user " << access->nc->display << " on " << ci->name;
+ Alog() << Config->s_ChanServ << ": " << u->GetMask() << " (level " << get_access(u, ci) << ") deleted access of user " << access->nc->display << " on " << ci->name;
- notice_lang(Config.s_ChanServ, u, messages[XOP_DELETED], access->nc->display.c_str(), ci->name.c_str());
+ notice_lang(Config->s_ChanServ, u, messages[XOP_DELETED], access->nc->display.c_str(), ci->name.c_str());
FOREACH_MOD(I_OnAccessDel, OnAccessDel(ci, u, na->nc));
@@ -364,13 +364,13 @@ class XOPBase : public Command
if (!get_access(u, ci) && !u->Account()->HasCommand("chanserv/access/list"))
{
- notice_lang(Config.s_ChanServ, u, ACCESS_DENIED);
+ notice_lang(Config->s_ChanServ, u, ACCESS_DENIED);
return MOD_CONT;
}
if (!ci->GetAccessCount())
{
- notice_lang(Config.s_ChanServ, u, messages[XOP_LIST_EMPTY], ci->name.c_str());
+ notice_lang(Config->s_ChanServ, u, messages[XOP_LIST_EMPTY], ci->name.c_str());
return MOD_CONT;
}
@@ -393,14 +393,14 @@ class XOPBase : public Command
if (!SentHeader)
{
SentHeader = true;
- notice_lang(Config.s_ChanServ, u, messages[XOP_LIST_HEADER], ci->name.c_str());
+ notice_lang(Config->s_ChanServ, u, messages[XOP_LIST_HEADER], ci->name.c_str());
}
XOPListCallback::DoList(u, ci, access, i, level, messages);
}
if (!SentHeader)
- notice_lang(Config.s_ChanServ, u, messages[XOP_NO_MATCH], ci->name.c_str());
+ notice_lang(Config->s_ChanServ, u, messages[XOP_NO_MATCH], ci->name.c_str());
}
return MOD_CONT;
@@ -410,19 +410,19 @@ class XOPBase : public Command
{
if (readonly)
{
- notice_lang(Config.s_ChanServ, u, messages[XOP_DISABLED]);
+ notice_lang(Config->s_ChanServ, u, messages[XOP_DISABLED]);
return MOD_CONT;
}
if (!ci->GetAccessCount())
{
- notice_lang(Config.s_ChanServ, u, messages[XOP_LIST_EMPTY], ci->name.c_str());
+ notice_lang(Config->s_ChanServ, u, messages[XOP_LIST_EMPTY], ci->name.c_str());
return MOD_CONT;
}
if (!check_access(u, ci, CA_FOUNDER) && !u->Account()->HasPriv("chanserv/access/modify"))
{
- notice_lang(Config.s_ChanServ, u, ACCESS_DENIED);
+ notice_lang(Config->s_ChanServ, u, ACCESS_DENIED);
return MOD_CONT;
}
@@ -435,7 +435,7 @@ class XOPBase : public Command
FOREACH_MOD(I_OnAccessClear, OnAccessClear(ci, u));
- notice_lang(Config.s_ChanServ, u, messages[XOP_CLEAR], ci->name.c_str());
+ notice_lang(Config->s_ChanServ, u, messages[XOP_CLEAR], ci->name.c_str());
return MOD_CONT;
}
@@ -448,7 +448,7 @@ class XOPBase : public Command
ChannelInfo *ci = cs_findchan(chan);
if (!ci->HasFlag(CI_XOP))
- notice_lang(Config.s_ChanServ, u, CHAN_XOP_ACCESS, Config.s_ChanServ.c_str());
+ notice_lang(Config->s_ChanServ, u, CHAN_XOP_ACCESS, Config->s_ChanServ.c_str());
else if (cmd.equals_ci("ADD"))
return this->DoAdd(u, params, ci, level, messages);
else if (cmd.equals_ci("DEL"))
@@ -493,18 +493,18 @@ class CommandCSQOP : public XOPBase
bool OnHelp(User *u, const Anope::string &subcommand)
{
- notice_help(Config.s_ChanServ, u, CHAN_HELP_QOP);
+ notice_help(Config->s_ChanServ, u, CHAN_HELP_QOP);
return true;
}
void OnSyntaxError(User *u, const Anope::string &subcommand)
{
- syntax_error(Config.s_ChanServ, u, "QOP", CHAN_QOP_SYNTAX);
+ syntax_error(Config->s_ChanServ, u, "QOP", CHAN_QOP_SYNTAX);
}
void OnServHelp(User *u)
{
- notice_lang(Config.s_ChanServ, u, CHAN_HELP_CMD_QOP);
+ notice_lang(Config->s_ChanServ, u, CHAN_HELP_CMD_QOP);
}
};
@@ -522,18 +522,18 @@ class CommandCSAOP : public XOPBase
bool OnHelp(User *u, const Anope::string &subcommand)
{
- notice_help(Config.s_ChanServ, u, CHAN_HELP_AOP);
+ notice_help(Config->s_ChanServ, u, CHAN_HELP_AOP);
return true;
}
void OnSyntaxError(User *u, const Anope::string &subcommand)
{
- syntax_error(Config.s_ChanServ, u, "AOP", CHAN_AOP_SYNTAX);
+ syntax_error(Config->s_ChanServ, u, "AOP", CHAN_AOP_SYNTAX);
}
void OnServHelp(User *u)
{
- notice_lang(Config.s_ChanServ, u, CHAN_HELP_CMD_AOP);
+ notice_lang(Config->s_ChanServ, u, CHAN_HELP_CMD_AOP);
}
};
@@ -551,18 +551,18 @@ class CommandCSHOP : public XOPBase
bool OnHelp(User *u, const Anope::string &subcommand)
{
- notice_help(Config.s_ChanServ, u, CHAN_HELP_HOP);
+ notice_help(Config->s_ChanServ, u, CHAN_HELP_HOP);
return true;
}
void OnSyntaxError(User *u, const Anope::string &subcommand)
{
- syntax_error(Config.s_ChanServ, u, "HOP", CHAN_HOP_SYNTAX);
+ syntax_error(Config->s_ChanServ, u, "HOP", CHAN_HOP_SYNTAX);
}
void OnServHelp(User *u)
{
- notice_lang(Config.s_ChanServ, u, CHAN_HELP_CMD_HOP);
+ notice_lang(Config->s_ChanServ, u, CHAN_HELP_CMD_HOP);
}
};
@@ -580,18 +580,18 @@ class CommandCSSOP : public XOPBase
bool OnHelp(User *u, const Anope::string &subcommand)
{
- notice_help(Config.s_ChanServ, u, CHAN_HELP_SOP);
+ notice_help(Config->s_ChanServ, u, CHAN_HELP_SOP);
return true;
}
void OnSyntaxError(User *u, const Anope::string &subcommand)
{
- syntax_error(Config.s_ChanServ, u, "SOP", CHAN_SOP_SYNTAX);
+ syntax_error(Config->s_ChanServ, u, "SOP", CHAN_SOP_SYNTAX);
}
void OnServHelp(User *u)
{
- notice_lang(Config.s_ChanServ, u, CHAN_HELP_CMD_SOP);
+ notice_lang(Config->s_ChanServ, u, CHAN_HELP_CMD_SOP);
}
};
@@ -609,18 +609,18 @@ class CommandCSVOP : public XOPBase
bool OnHelp(User *u, const Anope::string &subcommand)
{
- notice_help(Config.s_ChanServ, u, CHAN_HELP_VOP);
+ notice_help(Config->s_ChanServ, u, CHAN_HELP_VOP);
return true;
}
void OnSyntaxError(User *u, const Anope::string &subcommand)
{
- syntax_error(Config.s_ChanServ, u, "VOP", CHAN_VOP_SYNTAX);
+ syntax_error(Config->s_ChanServ, u, "VOP", CHAN_VOP_SYNTAX);
}
void OnServHelp(User *u)
{
- notice_lang(Config.s_ChanServ, u, CHAN_HELP_CMD_VOP);
+ notice_lang(Config->s_ChanServ, u, CHAN_HELP_CMD_VOP);
}
};
diff --git a/modules/core/db_plain.cpp b/modules/core/db_plain.cpp
index d3aa5e00f..7f90ad6f9 100644
--- a/modules/core/db_plain.cpp
+++ b/modules/core/db_plain.cpp
@@ -539,7 +539,7 @@ class DBPlain : public Module
ircdproto->SendGlobops(OperServ, "Unable to backup database!");
Alog() << "Unable to back up database!";
- if (!Config.NoBackupOkay)
+ if (!Config->NoBackupOkay)
quitting = true;
return;
@@ -547,7 +547,7 @@ class DBPlain : public Module
Backups.push_back(newname);
- unsigned KeepBackups = Config.KeepBackups;
+ unsigned KeepBackups = Config->KeepBackups;
if (KeepBackups && Backups.size() > KeepBackups)
{
DeleteFile(Backups.front().c_str());
@@ -679,7 +679,7 @@ class DBPlain : public Module
EventReturn OnDatabaseReadMetadata(ChannelInfo *ci, const Anope::string &key, const std::vector<Anope::string> &params)
{
if (key.equals_ci("BANTYPE"))
- ci->bantype = params[0].is_number_only() ? convertTo<int16>(params[0]) : Config.CSDefBantype;
+ ci->bantype = params[0].is_number_only() ? convertTo<int16>(params[0]) : Config->CSDefBantype;
else if (key.equals_ci("MEMOMAX"))
ci->memos.memomax = params[0].is_number_only() ? convertTo<int16>(params[0]) : 1;
else if (key.equals_ci("FOUNDER"))
diff --git a/modules/core/enc_md5.cpp b/modules/core/enc_md5.cpp
index 3ec3f8ecd..e75c7afeb 100644
--- a/modules/core/enc_md5.cpp
+++ b/modules/core/enc_md5.cpp
@@ -359,7 +359,7 @@ class EMD5 : public Module
/* if we are NOT the first module in the list,
* we want to re-encrypt the pass with the new encryption
*/
- if (!this->name.equals_ci(Config.EncModuleList.front()))
+ if (!this->name.equals_ci(Config->EncModuleList.front()))
enc_encrypt(plaintext, password);
return EVENT_ALLOW;
}
diff --git a/modules/core/enc_none.cpp b/modules/core/enc_none.cpp
index 510380aee..445dcb767 100644
--- a/modules/core/enc_none.cpp
+++ b/modules/core/enc_none.cpp
@@ -54,7 +54,7 @@ class ENone : public Module
/* if we are NOT the first module in the list,
* we want to re-encrypt the pass with the new encryption
*/
- if (!this->name.equals_ci(Config.EncModuleList.front()))
+ if (!this->name.equals_ci(Config->EncModuleList.front()))
enc_encrypt(plaintext, password);
return EVENT_ALLOW;
}
diff --git a/modules/core/enc_old.cpp b/modules/core/enc_old.cpp
index dfaa838a9..6a100fd85 100644
--- a/modules/core/enc_old.cpp
+++ b/modules/core/enc_old.cpp
@@ -369,7 +369,7 @@ class EOld : public Module
/* if we are NOT the first module in the list,
* we want to re-encrypt the pass with the new encryption
*/
- if (!this->name.equals_ci(Config.EncModuleList.front()))
+ if (!this->name.equals_ci(Config->EncModuleList.front()))
enc_encrypt(plaintext, password);
return EVENT_ALLOW;
}
diff --git a/modules/core/enc_sha1.cpp b/modules/core/enc_sha1.cpp
index 5c4f2b066..28175fd3f 100644
--- a/modules/core/enc_sha1.cpp
+++ b/modules/core/enc_sha1.cpp
@@ -213,7 +213,7 @@ class ESHA1 : public Module
/* when we are NOT the first module in the list,
* we want to re-encrypt the pass with the new encryption
*/
- if (!this->name.equals_ci(Config.EncModuleList.front()))
+ if (!this->name.equals_ci(Config->EncModuleList.front()))
enc_encrypt(plaintext, password);
return EVENT_ALLOW;
}
diff --git a/modules/core/enc_sha256.cpp b/modules/core/enc_sha256.cpp
index 4fb076b8a..16a26a77b 100644
--- a/modules/core/enc_sha256.cpp
+++ b/modules/core/enc_sha256.cpp
@@ -302,7 +302,7 @@ class ESHA256 : public Module
/* if we are NOT the first module in the list,
* we want to re-encrypt the pass with the new encryption
*/
- if (!this->name.equals_ci(Config.EncModuleList.front()))
+ if (!this->name.equals_ci(Config->EncModuleList.front()))
enc_encrypt(plaintext, password);
return EVENT_ALLOW;
}
diff --git a/modules/core/hs_del.cpp b/modules/core/hs_del.cpp
index 3030a7a27..4ef8d8424 100644
--- a/modules/core/hs_del.cpp
+++ b/modules/core/hs_del.cpp
@@ -28,33 +28,33 @@ class CommandHSDel : public Command
{
if (na->HasFlag(NS_FORBIDDEN))
{
- notice_lang(Config.s_HostServ, u, NICK_X_FORBIDDEN, nick.c_str());
+ notice_lang(Config->s_HostServ, u, NICK_X_FORBIDDEN, nick.c_str());
return MOD_CONT;
}
Alog() << "vHost for user \2" << nick << "\2 deleted by oper \2" << u->nick << "\2";
FOREACH_MOD(I_OnDeleteVhost, OnDeleteVhost(na));
na->hostinfo.RemoveVhost();
- notice_lang(Config.s_HostServ, u, HOST_DEL, nick.c_str());
+ notice_lang(Config->s_HostServ, u, HOST_DEL, nick.c_str());
}
else
- notice_lang(Config.s_HostServ, u, HOST_NOREG, nick.c_str());
+ notice_lang(Config->s_HostServ, u, HOST_NOREG, nick.c_str());
return MOD_CONT;
}
bool OnHelp(User *u, const Anope::string &subcommand)
{
- notice_help(Config.s_HostServ, u, HOST_HELP_DEL);
+ notice_help(Config->s_HostServ, u, HOST_HELP_DEL);
return true;
}
void OnSyntaxError(User *u, const Anope::string &subcommand)
{
- syntax_error(Config.s_HostServ, u, "DEL", HOST_DEL_SYNTAX);
+ syntax_error(Config->s_HostServ, u, "DEL", HOST_DEL_SYNTAX);
}
void OnServHelp(User *u)
{
- notice_lang(Config.s_HostServ, u, HOST_HELP_CMD_DEL);
+ notice_lang(Config->s_HostServ, u, HOST_HELP_CMD_DEL);
}
};
diff --git a/modules/core/hs_delall.cpp b/modules/core/hs_delall.cpp
index 328b77854..301f14473 100644
--- a/modules/core/hs_delall.cpp
+++ b/modules/core/hs_delall.cpp
@@ -28,7 +28,7 @@ class CommandHSDelAll : public Command
{
if (na->HasFlag(NS_FORBIDDEN))
{
- notice_lang(Config.s_HostServ, u, NICK_X_FORBIDDEN, nick.c_str());
+ notice_lang(Config->s_HostServ, u, NICK_X_FORBIDDEN, nick.c_str());
return MOD_CONT;
}
FOREACH_MOD(I_OnDeleteVhost, OnDeleteVhost(na));
@@ -39,27 +39,27 @@ class CommandHSDelAll : public Command
na->hostinfo.RemoveVhost();
}
Alog() << "vHosts for all nicks in group \2" << nc->display << "\2 deleted by oper \2" << u->nick << "\2";
- notice_lang(Config.s_HostServ, u, HOST_DELALL, nc->display.c_str());
+ notice_lang(Config->s_HostServ, u, HOST_DELALL, nc->display.c_str());
}
else
- notice_lang(Config.s_HostServ, u, HOST_NOREG, nick.c_str());
+ notice_lang(Config->s_HostServ, u, HOST_NOREG, nick.c_str());
return MOD_CONT;
}
bool OnHelp(User *u, const Anope::string &subcommand)
{
- notice_help(Config.s_HostServ, u, HOST_HELP_DELALL);
+ notice_help(Config->s_HostServ, u, HOST_HELP_DELALL);
return true;
}
void OnSyntaxError(User *u, const Anope::string &subcommand)
{
- syntax_error(Config.s_HostServ, u, "DELALL", HOST_DELALL_SYNTAX);
+ syntax_error(Config->s_HostServ, u, "DELALL", HOST_DELALL_SYNTAX);
}
void OnServHelp(User *u)
{
- notice_lang(Config.s_HostServ, u, HOST_HELP_CMD_DELALL);
+ notice_lang(Config->s_HostServ, u, HOST_HELP_CMD_DELALL);
}
};
diff --git a/modules/core/hs_group.cpp b/modules/core/hs_group.cpp
index 00a30cb54..688d70258 100644
--- a/modules/core/hs_group.cpp
+++ b/modules/core/hs_group.cpp
@@ -27,25 +27,25 @@ class CommandHSGroup : public Command
{
HostServSyncVhosts(na);
if (!na->hostinfo.GetIdent().empty())
- notice_lang(Config.s_HostServ, u, HOST_IDENT_GROUP, u->Account()->display.c_str(), na->hostinfo.GetIdent().c_str(), na->hostinfo.GetHost().c_str());
+ notice_lang(Config->s_HostServ, u, HOST_IDENT_GROUP, u->Account()->display.c_str(), na->hostinfo.GetIdent().c_str(), na->hostinfo.GetHost().c_str());
else
- notice_lang(Config.s_HostServ, u, HOST_GROUP, u->Account()->display.c_str(), na->hostinfo.GetHost().c_str());
+ notice_lang(Config->s_HostServ, u, HOST_GROUP, u->Account()->display.c_str(), na->hostinfo.GetHost().c_str());
}
else
- notice_lang(Config.s_HostServ, u, HOST_NOT_ASSIGNED);
+ notice_lang(Config->s_HostServ, u, HOST_NOT_ASSIGNED);
return MOD_CONT;
}
bool OnHelp(User *u, const Anope::string &subcommand)
{
- notice_help(Config.s_HostServ, u, HOST_HELP_GROUP);
+ notice_help(Config->s_HostServ, u, HOST_HELP_GROUP);
return true;
}
void OnServHelp(User *u)
{
- notice_lang(Config.s_HostServ, u, HOST_HELP_CMD_GROUP);
+ notice_lang(Config->s_HostServ, u, HOST_HELP_CMD_GROUP);
}
};
diff --git a/modules/core/hs_help.cpp b/modules/core/hs_help.cpp
index 78480651a..744e0c84d 100644
--- a/modules/core/hs_help.cpp
+++ b/modules/core/hs_help.cpp
@@ -29,9 +29,9 @@ class CommandHSHelp : public Command
void OnSyntaxError(User *u, const Anope::string &subcommand)
{
- notice_help(Config.s_HostServ, u, HOST_HELP, Config.s_HostServ.c_str());
+ notice_help(Config->s_HostServ, u, HOST_HELP, Config->s_HostServ.c_str());
for (CommandMap::const_iterator it = HostServ->Commands.begin(), it_end = HostServ->Commands.end(); it != it_end; ++it)
- if (!Config.HidePrivilegedCommands || it->second->permission.empty() || (u->Account() && u->Account()->HasCommand(it->second->permission)))
+ if (!Config->HidePrivilegedCommands || it->second->permission.empty() || (u->Account() && u->Account()->HasCommand(it->second->permission)))
it->second->OnServHelp(u);
}
};
diff --git a/modules/core/hs_list.cpp b/modules/core/hs_list.cpp
index d85ace345..7e9332f22 100644
--- a/modules/core/hs_list.cpp
+++ b/modules/core/hs_list.cpp
@@ -37,14 +37,14 @@ class CommandHSList : public Command
size_t tmp = key.find('-');
if (tmp == Anope::string::npos || tmp == key.length() || tmp == 1)
{
- notice_lang(Config.s_HostServ, u, LIST_INCORRECT_RANGE);
+ notice_lang(Config->s_HostServ, u, LIST_INCORRECT_RANGE);
return MOD_CONT;
}
for (unsigned i = 1, end = key.length(); i < end; ++i)
{
if (!isdigit(key[i]) && i != tmp)
{
- notice_lang(Config.s_HostServ, u, LIST_INCORRECT_RANGE);
+ notice_lang(Config->s_HostServ, u, LIST_INCORRECT_RANGE);
return MOD_CONT;
}
from = convertTo<int>(key.substr(1, tmp - 1));
@@ -61,16 +61,16 @@ class CommandHSList : public Command
if (!key.empty() && key[0] != '#')
{
- if ((Anope::Match(na->nick, key) || Anope::Match(na->hostinfo.GetHost(), key)) && display_counter < Config.NSListMax)
+ if ((Anope::Match(na->nick, key) || Anope::Match(na->hostinfo.GetHost(), key)) && display_counter < Config->NSListMax)
{
++display_counter;
time_t time = na->hostinfo.GetTime();
tm = localtime(&time);
strftime_lang(buf, sizeof(buf), u, STRFTIME_DATE_TIME_FORMAT, tm);
if (!na->hostinfo.GetIdent().empty())
- notice_lang(Config.s_HostServ, u, HOST_IDENT_ENTRY, counter, na->nick.c_str(), na->hostinfo.GetIdent().c_str(), na->hostinfo.GetHost().c_str(), na->hostinfo.GetCreator().c_str(), buf);
+ notice_lang(Config->s_HostServ, u, HOST_IDENT_ENTRY, counter, na->nick.c_str(), na->hostinfo.GetIdent().c_str(), na->hostinfo.GetHost().c_str(), na->hostinfo.GetCreator().c_str(), buf);
else
- notice_lang(Config.s_HostServ, u, HOST_ENTRY, counter, na->nick.c_str(), na->hostinfo.GetHost().c_str(), na->hostinfo.GetCreator().c_str(), buf);
+ notice_lang(Config->s_HostServ, u, HOST_ENTRY, counter, na->nick.c_str(), na->hostinfo.GetHost().c_str(), na->hostinfo.GetCreator().c_str(), buf);
}
}
else
@@ -79,41 +79,41 @@ class CommandHSList : public Command
* List the host if its in the display range, and not more
* than NSListMax records have been displayed...
**/
- if (((counter >= from && counter <= to) || (!from && !to)) && display_counter < Config.NSListMax)
+ if (((counter >= from && counter <= to) || (!from && !to)) && display_counter < Config->NSListMax)
{
++display_counter;
time_t time = na->hostinfo.GetTime();
tm = localtime(&time);
strftime_lang(buf, sizeof(buf), u, STRFTIME_DATE_TIME_FORMAT, tm);
if (!na->hostinfo.GetIdent().empty())
- notice_lang(Config.s_HostServ, u, HOST_IDENT_ENTRY, counter, na->nick.c_str(), na->hostinfo.GetIdent().c_str(), na->hostinfo.GetHost().c_str(), na->hostinfo.GetCreator().c_str(), buf);
+ notice_lang(Config->s_HostServ, u, HOST_IDENT_ENTRY, counter, na->nick.c_str(), na->hostinfo.GetIdent().c_str(), na->hostinfo.GetHost().c_str(), na->hostinfo.GetCreator().c_str(), buf);
else
- notice_lang(Config.s_HostServ, u, HOST_ENTRY, counter, na->nick.c_str(), na->hostinfo.GetHost().c_str(), na->hostinfo.GetCreator().c_str(), buf);
+ notice_lang(Config->s_HostServ, u, HOST_ENTRY, counter, na->nick.c_str(), na->hostinfo.GetHost().c_str(), na->hostinfo.GetCreator().c_str(), buf);
}
}
++counter;
}
if (!key.empty())
- notice_lang(Config.s_HostServ, u, HOST_LIST_KEY_FOOTER, key.c_str(), display_counter);
+ notice_lang(Config->s_HostServ, u, HOST_LIST_KEY_FOOTER, key.c_str(), display_counter);
else
{
if (from)
- notice_lang(Config.s_HostServ, u, HOST_LIST_RANGE_FOOTER, from, to);
+ notice_lang(Config->s_HostServ, u, HOST_LIST_RANGE_FOOTER, from, to);
else
- notice_lang(Config.s_HostServ, u, HOST_LIST_FOOTER, display_counter);
+ notice_lang(Config->s_HostServ, u, HOST_LIST_FOOTER, display_counter);
}
return MOD_CONT;
}
bool OnHelp(User *u, const Anope::string &subcommand)
{
- notice_help(Config.s_HostServ, u, HOST_HELP_LIST);
+ notice_help(Config->s_HostServ, u, HOST_HELP_LIST);
return true;
}
void OnServHelp(User *u)
{
- notice_lang(Config.s_HostServ, u, HOST_HELP_CMD_LIST);
+ notice_lang(Config->s_HostServ, u, HOST_HELP_CMD_LIST);
}
};
diff --git a/modules/core/hs_off.cpp b/modules/core/hs_off.cpp
index ed64e2368..ef7039aeb 100644
--- a/modules/core/hs_off.cpp
+++ b/modules/core/hs_off.cpp
@@ -25,11 +25,11 @@ class CommandHSOff : public Command
NickAlias *na = findnick(u->nick);
if (!na || !na->hostinfo.HasVhost())
- notice_lang(Config.s_HostServ, u, HOST_NOT_ASSIGNED);
+ notice_lang(Config->s_HostServ, u, HOST_NOT_ASSIGNED);
else
{
ircdproto->SendVhostDel(u);
- notice_lang(Config.s_HostServ, u, HOST_OFF);
+ notice_lang(Config->s_HostServ, u, HOST_OFF);
}
return MOD_CONT;
@@ -37,13 +37,13 @@ class CommandHSOff : public Command
bool OnHelp(User *u, const Anope::string &subcommand)
{
- notice_help(Config.s_HostServ, u, HOST_HELP_OFF);
+ notice_help(Config->s_HostServ, u, HOST_HELP_OFF);
return true;
}
void OnServHelp(User *u)
{
- notice_lang(Config.s_HostServ, u, HOST_HELP_CMD_OFF);
+ notice_lang(Config->s_HostServ, u, HOST_HELP_CMD_OFF);
}
};
diff --git a/modules/core/hs_on.cpp b/modules/core/hs_on.cpp
index 1cc38e3f8..b94f22264 100644
--- a/modules/core/hs_on.cpp
+++ b/modules/core/hs_on.cpp
@@ -26,9 +26,9 @@ class CommandHSOn : public Command
if (na && u->Account() == na->nc && na->hostinfo.HasVhost())
{
if (!na->hostinfo.GetIdent().empty())
- notice_lang(Config.s_HostServ, u, HOST_IDENT_ACTIVATED, na->hostinfo.GetIdent().c_str(), na->hostinfo.GetHost().c_str());
+ notice_lang(Config->s_HostServ, u, HOST_IDENT_ACTIVATED, na->hostinfo.GetIdent().c_str(), na->hostinfo.GetHost().c_str());
else
- notice_lang(Config.s_HostServ, u, HOST_ACTIVATED, na->hostinfo.GetHost().c_str());
+ notice_lang(Config->s_HostServ, u, HOST_ACTIVATED, na->hostinfo.GetHost().c_str());
ircdproto->SendVhost(u, na->hostinfo.GetIdent(), na->hostinfo.GetHost());
if (ircd->vhost)
u->vhost = na->hostinfo.GetHost();
@@ -40,20 +40,20 @@ class CommandHSOn : public Command
u->UpdateHost();
}
else
- notice_lang(Config.s_HostServ, u, HOST_NOT_ASSIGNED);
+ notice_lang(Config->s_HostServ, u, HOST_NOT_ASSIGNED);
return MOD_CONT;
}
bool OnHelp(User *u, const Anope::string &subcommand)
{
- notice_help(Config.s_HostServ, u, HOST_HELP_ON);
+ notice_help(Config->s_HostServ, u, HOST_HELP_ON);
return true;
}
void OnServHelp(User *u)
{
- notice_lang(Config.s_HostServ, u, HOST_HELP_CMD_ON);
+ notice_lang(Config->s_HostServ, u, HOST_HELP_CMD_ON);
}
};
diff --git a/modules/core/hs_set.cpp b/modules/core/hs_set.cpp
index 604593e34..8ee6a8723 100644
--- a/modules/core/hs_set.cpp
+++ b/modules/core/hs_set.cpp
@@ -35,12 +35,12 @@ class CommandHSSet : public Command
rawhostmask = myStrGetTokenRemainder(rawhostmask, '@', 1); /* get the remaining string */
if (rawhostmask.empty())
{
- notice_lang(Config.s_HostServ, u, HOST_SET_SYNTAX, Config.s_HostServ.c_str());
+ notice_lang(Config->s_HostServ, u, HOST_SET_SYNTAX, Config->s_HostServ.c_str());
return MOD_CONT;
}
- if (vIdent.length() > Config.UserLen)
+ if (vIdent.length() > Config->UserLen)
{
- notice_lang(Config.s_HostServ, u, HOST_SET_IDENTTOOLONG, Config.UserLen);
+ notice_lang(Config->s_HostServ, u, HOST_SET_IDENTTOOLONG, Config->UserLen);
return MOD_CONT;
}
else
@@ -48,27 +48,27 @@ class CommandHSSet : public Command
for (Anope::string::iterator s = vIdent.begin(), s_end = vIdent.end(); s != s_end; ++s)
if (!isvalidchar(*s))
{
- notice_lang(Config.s_HostServ, u, HOST_SET_IDENT_ERROR);
+ notice_lang(Config->s_HostServ, u, HOST_SET_IDENT_ERROR);
return MOD_CONT;
}
}
if (!ircd->vident)
{
- notice_lang(Config.s_HostServ, u, HOST_NO_VIDENT);
+ notice_lang(Config->s_HostServ, u, HOST_NO_VIDENT);
return MOD_CONT;
}
}
- if (rawhostmask.length() < Config.HostLen)
+ if (rawhostmask.length() < Config->HostLen)
hostmask = rawhostmask;
else
{
- notice_lang(Config.s_HostServ, u, HOST_SET_TOOLONG, Config.HostLen);
+ notice_lang(Config->s_HostServ, u, HOST_SET_TOOLONG, Config->HostLen);
return MOD_CONT;
}
if (!isValidHost(hostmask, 3))
{
- notice_lang(Config.s_HostServ, u, HOST_SET_ERROR);
+ notice_lang(Config->s_HostServ, u, HOST_SET_ERROR);
return MOD_CONT;
}
@@ -78,7 +78,7 @@ class CommandHSSet : public Command
{
if (na->HasFlag(NS_FORBIDDEN))
{
- notice_lang(Config.s_HostServ, u, NICK_X_FORBIDDEN, nick.c_str());
+ notice_lang(Config->s_HostServ, u, NICK_X_FORBIDDEN, nick.c_str());
return MOD_CONT;
}
Alog() << "vHost for user \2" << nick << "\2 set to \2" << (!vIdent.empty() && ircd->vident ? vIdent : "") << (!vIdent.empty() && ircd->vident ? "@" : "") << hostmask << " \2 by oper \2" << u->nick << "\2";
@@ -86,29 +86,29 @@ class CommandHSSet : public Command
na->hostinfo.SetVhost(vIdent, hostmask, u->nick);
FOREACH_MOD(I_OnSetVhost, OnSetVhost(na));
if (!vIdent.empty())
- notice_lang(Config.s_HostServ, u, HOST_IDENT_SET, nick.c_str(), vIdent.c_str(), hostmask.c_str());
+ notice_lang(Config->s_HostServ, u, HOST_IDENT_SET, nick.c_str(), vIdent.c_str(), hostmask.c_str());
else
- notice_lang(Config.s_HostServ, u, HOST_SET, nick.c_str(), hostmask.c_str());
+ notice_lang(Config->s_HostServ, u, HOST_SET, nick.c_str(), hostmask.c_str());
}
else
- notice_lang(Config.s_HostServ, u, HOST_NOREG, nick.c_str());
+ notice_lang(Config->s_HostServ, u, HOST_NOREG, nick.c_str());
return MOD_CONT;
}
bool OnHelp(User *u, const Anope::string &subcommand)
{
- notice_help(Config.s_HostServ, u, HOST_HELP_SET);
+ notice_help(Config->s_HostServ, u, HOST_HELP_SET);
return true;
}
void OnSyntaxError(User *u, const Anope::string &subcommand)
{
- syntax_error(Config.s_HostServ, u, "SET", HOST_SET_SYNTAX);
+ syntax_error(Config->s_HostServ, u, "SET", HOST_SET_SYNTAX);
}
void OnServHelp(User *u)
{
- notice_lang(Config.s_HostServ, u, HOST_HELP_CMD_SET);
+ notice_lang(Config->s_HostServ, u, HOST_HELP_CMD_SET);
}
};
diff --git a/modules/core/hs_setall.cpp b/modules/core/hs_setall.cpp
index 9bf6369fe..3ace182fd 100644
--- a/modules/core/hs_setall.cpp
+++ b/modules/core/hs_setall.cpp
@@ -31,12 +31,12 @@ class CommandHSSetAll : public Command
if (!(na = findnick(nick)))
{
- notice_lang(Config.s_HostServ, u, HOST_NOREG, nick.c_str());
+ notice_lang(Config->s_HostServ, u, HOST_NOREG, nick.c_str());
return MOD_CONT;
}
else if (na->HasFlag(NS_FORBIDDEN))
{
- notice_lang(Config.s_HostServ, u, NICK_X_FORBIDDEN, nick.c_str());
+ notice_lang(Config->s_HostServ, u, NICK_X_FORBIDDEN, nick.c_str());
return MOD_CONT;
}
@@ -46,12 +46,12 @@ class CommandHSSetAll : public Command
rawhostmask = myStrGetTokenRemainder(rawhostmask, '@', 1); /* get the remaining string */
if (rawhostmask.empty())
{
- notice_lang(Config.s_HostServ, u, HOST_SETALL_SYNTAX, Config.s_HostServ.c_str());
+ notice_lang(Config->s_HostServ, u, HOST_SETALL_SYNTAX, Config->s_HostServ.c_str());
return MOD_CONT;
}
- if (vIdent.length() > Config.UserLen)
+ if (vIdent.length() > Config->UserLen)
{
- notice_lang(Config.s_HostServ, u, HOST_SET_IDENTTOOLONG, Config.UserLen);
+ notice_lang(Config->s_HostServ, u, HOST_SET_IDENTTOOLONG, Config->UserLen);
return MOD_CONT;
}
else
@@ -59,28 +59,28 @@ class CommandHSSetAll : public Command
for (Anope::string::iterator s = vIdent.begin(), s_end = vIdent.end(); s != s_end; ++s)
if (!isvalidchar(*s))
{
- notice_lang(Config.s_HostServ, u, HOST_SET_IDENT_ERROR);
+ notice_lang(Config->s_HostServ, u, HOST_SET_IDENT_ERROR);
return MOD_CONT;
}
}
if (!ircd->vident)
{
- notice_lang(Config.s_HostServ, u, HOST_NO_VIDENT);
+ notice_lang(Config->s_HostServ, u, HOST_NO_VIDENT);
return MOD_CONT;
}
}
- if (rawhostmask.length() < Config.HostLen)
+ if (rawhostmask.length() < Config->HostLen)
hostmask = rawhostmask;
else
{
- notice_lang(Config.s_HostServ, u, HOST_SET_TOOLONG, Config.HostLen);
+ notice_lang(Config->s_HostServ, u, HOST_SET_TOOLONG, Config->HostLen);
return MOD_CONT;
}
if (!isValidHost(hostmask, 3))
{
- notice_lang(Config.s_HostServ, u, HOST_SET_ERROR);
+ notice_lang(Config->s_HostServ, u, HOST_SET_ERROR);
return MOD_CONT;
}
@@ -92,26 +92,26 @@ class CommandHSSetAll : public Command
HostServSyncVhosts(na);
FOREACH_MOD(I_OnSetVhost, OnSetVhost(na));
if (!vIdent.empty())
- notice_lang(Config.s_HostServ, u, HOST_IDENT_SETALL, nick.c_str(), vIdent.c_str(), hostmask.c_str());
+ notice_lang(Config->s_HostServ, u, HOST_IDENT_SETALL, nick.c_str(), vIdent.c_str(), hostmask.c_str());
else
- notice_lang(Config.s_HostServ, u, HOST_SETALL, nick.c_str(), hostmask.c_str());
+ notice_lang(Config->s_HostServ, u, HOST_SETALL, nick.c_str(), hostmask.c_str());
return MOD_CONT;
}
bool OnHelp(User *u, const Anope::string &subcommand)
{
- notice_help(Config.s_HostServ, u, HOST_HELP_SETALL);
+ notice_help(Config->s_HostServ, u, HOST_HELP_SETALL);
return true;
}
void OnSyntaxError(User *u, const Anope::string &subcommand)
{
- syntax_error(Config.s_HostServ, u, "SETALL", HOST_SETALL_SYNTAX);
+ syntax_error(Config->s_HostServ, u, "SETALL", HOST_SETALL_SYNTAX);
}
void OnServHelp(User *u)
{
- notice_lang(Config.s_HostServ, u, HOST_HELP_CMD_SETALL);
+ notice_lang(Config->s_HostServ, u, HOST_HELP_CMD_SETALL);
}
};
diff --git a/modules/core/ms_cancel.cpp b/modules/core/ms_cancel.cpp
index f246c02f5..60fd01ca2 100644
--- a/modules/core/ms_cancel.cpp
+++ b/modules/core/ms_cancel.cpp
@@ -29,13 +29,13 @@ class CommandMSCancel : public Command
MemoInfo *mi;
if (!u->IsRecognized())
- notice_lang(Config.s_MemoServ, u, NICK_IDENTIFY_REQUIRED, Config.s_NickServ.c_str());
+ notice_lang(Config->s_MemoServ, u, NICK_IDENTIFY_REQUIRED, Config->s_NickServ.c_str());
else if (!(mi = getmemoinfo(name, ischan, isforbid)))
{
if (isforbid)
- notice_lang(Config.s_MemoServ, u, ischan ? CHAN_X_FORBIDDEN : NICK_X_FORBIDDEN, name.c_str());
+ notice_lang(Config->s_MemoServ, u, ischan ? CHAN_X_FORBIDDEN : NICK_X_FORBIDDEN, name.c_str());
else
- notice_lang(Config.s_MemoServ, u, ischan ? CHAN_X_NOT_REGISTERED : NICK_X_NOT_REGISTERED, name.c_str());
+ notice_lang(Config->s_MemoServ, u, ischan ? CHAN_X_NOT_REGISTERED : NICK_X_NOT_REGISTERED, name.c_str());
}
else
{
@@ -46,29 +46,29 @@ class CommandMSCancel : public Command
{
FOREACH_MOD(I_OnMemoDel, OnMemoDel(findnick(name)->nc, mi, mi->memos[i]->number));
delmemo(mi, mi->memos[i]->number);
- notice_lang(Config.s_MemoServ, u, MEMO_CANCELLED, name.c_str());
+ notice_lang(Config->s_MemoServ, u, MEMO_CANCELLED, name.c_str());
return MOD_CONT;
}
- notice_lang(Config.s_MemoServ, u, MEMO_CANCEL_NONE);
+ notice_lang(Config->s_MemoServ, u, MEMO_CANCEL_NONE);
}
return MOD_CONT;
}
bool OnHelp(User *u, const Anope::string &subcommand)
{
- notice_help(Config.s_MemoServ, u, MEMO_HELP_CANCEL);
+ notice_help(Config->s_MemoServ, u, MEMO_HELP_CANCEL);
return true;
}
void OnSyntaxError(User *u, const Anope::string &subcommand)
{
- syntax_error(Config.s_MemoServ, u, "CANCEL", MEMO_CANCEL_SYNTAX);
+ syntax_error(Config->s_MemoServ, u, "CANCEL", MEMO_CANCEL_SYNTAX);
}
void OnServHelp(User *u)
{
- notice_lang(Config.s_MemoServ, u, MEMO_HELP_CMD_CANCEL);
+ notice_lang(Config->s_MemoServ, u, MEMO_HELP_CMD_CANCEL);
}
};
diff --git a/modules/core/ms_check.cpp b/modules/core/ms_check.cpp
index 299be5302..53b497702 100644
--- a/modules/core/ms_check.cpp
+++ b/modules/core/ms_check.cpp
@@ -31,18 +31,18 @@ class CommandMSCheck : public Command
if (!u->IsRecognized())
{
- notice_lang(Config.s_MemoServ, u, NICK_IDENTIFY_REQUIRED, Config.s_NickServ.c_str());
+ notice_lang(Config->s_MemoServ, u, NICK_IDENTIFY_REQUIRED, Config->s_NickServ.c_str());
return MOD_CONT;
}
else if (!(na = findnick(recipient)))
{
- notice_lang(Config.s_MemoServ, u, NICK_X_NOT_REGISTERED, recipient.c_str());
+ notice_lang(Config->s_MemoServ, u, NICK_X_NOT_REGISTERED, recipient.c_str());
return MOD_CONT;
}
if (na->HasFlag(NS_FORBIDDEN))
{
- notice_lang(Config.s_MemoServ, u, NICK_X_FORBIDDEN, recipient.c_str());
+ notice_lang(Config->s_MemoServ, u, NICK_X_FORBIDDEN, recipient.c_str());
return MOD_CONT;
}
@@ -61,33 +61,33 @@ class CommandMSCheck : public Command
strftime_lang(timebuf, sizeof(timebuf), u, STRFTIME_DATE_TIME_FORMAT, tm);
if (mi->memos[i]->HasFlag(MF_UNREAD))
- notice_lang(Config.s_MemoServ, u, MEMO_CHECK_NOT_READ, na->nick.c_str(), timebuf);
+ notice_lang(Config->s_MemoServ, u, MEMO_CHECK_NOT_READ, na->nick.c_str(), timebuf);
else
- notice_lang(Config.s_MemoServ, u, MEMO_CHECK_READ, na->nick.c_str(), timebuf);
+ notice_lang(Config->s_MemoServ, u, MEMO_CHECK_READ, na->nick.c_str(), timebuf);
break;
}
}
if (!found)
- notice_lang(Config.s_MemoServ, u, MEMO_CHECK_NO_MEMO, na->nick.c_str());
+ notice_lang(Config->s_MemoServ, u, MEMO_CHECK_NO_MEMO, na->nick.c_str());
return MOD_CONT;
}
bool OnHelp(User *u, const Anope::string &subcommand)
{
- notice_help(Config.s_MemoServ, u, MEMO_HELP_CHECK);
+ notice_help(Config->s_MemoServ, u, MEMO_HELP_CHECK);
return true;
}
void OnSyntaxError(User *u, const Anope::string &subcommand)
{
- syntax_error(Config.s_MemoServ, u, "CHECK", MEMO_CHECK_SYNTAX);
+ syntax_error(Config->s_MemoServ, u, "CHECK", MEMO_CHECK_SYNTAX);
}
void OnServHelp(User *u)
{
- notice_lang(Config.s_MemoServ, u, MEMO_HELP_CMD_CHECK);
+ notice_lang(Config->s_MemoServ, u, MEMO_HELP_CMD_CHECK);
}
};
diff --git a/modules/core/ms_del.cpp b/modules/core/ms_del.cpp
index 8d5b45c04..8ffed7532 100644
--- a/modules/core/ms_del.cpp
+++ b/modules/core/ms_del.cpp
@@ -59,17 +59,17 @@ class CommandMSDel : public Command
if (!(ci = cs_findchan(chan)))
{
- notice_lang(Config.s_MemoServ, u, CHAN_X_NOT_REGISTERED, chan.c_str());
+ notice_lang(Config->s_MemoServ, u, CHAN_X_NOT_REGISTERED, chan.c_str());
return MOD_CONT;
}
else if (readonly)
{
- notice_lang(Config.s_MemoServ, u, READ_ONLY_MODE);
+ notice_lang(Config->s_MemoServ, u, READ_ONLY_MODE);
return MOD_CONT;
}
else if (!check_access(u, ci, CA_MEMO))
{
- notice_lang(Config.s_MemoServ, u, ACCESS_DENIED);
+ notice_lang(Config->s_MemoServ, u, ACCESS_DENIED);
return MOD_CONT;
}
mi = &ci->memos;
@@ -81,9 +81,9 @@ class CommandMSDel : public Command
else if (mi->memos.empty())
{
if (!chan.empty())
- notice_lang(Config.s_MemoServ, u, MEMO_X_HAS_NO_MEMOS, chan.c_str());
+ notice_lang(Config->s_MemoServ, u, MEMO_X_HAS_NO_MEMOS, chan.c_str());
else
- notice_lang(Config.s_MemoServ, u, MEMO_HAVE_NO_MEMOS);
+ notice_lang(Config->s_MemoServ, u, MEMO_HAVE_NO_MEMOS);
}
else
{
@@ -102,7 +102,7 @@ class CommandMSDel : public Command
else
FOREACH_MOD(I_OnMemoDel, OnMemoDel(u->Account(), mi, last));
delmemo(mi, last);
- notice_lang(Config.s_MemoServ, u, MEMO_DELETED_ONE, last);
+ notice_lang(Config->s_MemoServ, u, MEMO_DELETED_ONE, last);
}
else
{
@@ -115,9 +115,9 @@ class CommandMSDel : public Command
delete mi->memos[i];
mi->memos.clear();
if (!chan.empty())
- notice_lang(Config.s_MemoServ, u, MEMO_CHAN_DELETED_ALL, chan.c_str());
+ notice_lang(Config->s_MemoServ, u, MEMO_CHAN_DELETED_ALL, chan.c_str());
else
- notice_lang(Config.s_MemoServ, u, MEMO_DELETED_ALL);
+ notice_lang(Config->s_MemoServ, u, MEMO_DELETED_ALL);
}
/* Reset the order */
@@ -129,18 +129,18 @@ class CommandMSDel : public Command
bool OnHelp(User *u, const Anope::string &subcommand)
{
- notice_help(Config.s_MemoServ, u, MEMO_HELP_DEL);
+ notice_help(Config->s_MemoServ, u, MEMO_HELP_DEL);
return true;
}
void OnSyntaxError(User *u, const Anope::string &subcommand)
{
- syntax_error(Config.s_MemoServ, u, "DEL", MEMO_DEL_SYNTAX);
+ syntax_error(Config->s_MemoServ, u, "DEL", MEMO_DEL_SYNTAX);
}
void OnServHelp(User *u)
{
- notice_lang(Config.s_MemoServ, u, MEMO_HELP_CMD_DEL);
+ notice_lang(Config->s_MemoServ, u, MEMO_HELP_CMD_DEL);
}
};
diff --git a/modules/core/ms_help.cpp b/modules/core/ms_help.cpp
index 535b051f0..a82c8200e 100644
--- a/modules/core/ms_help.cpp
+++ b/modules/core/ms_help.cpp
@@ -29,11 +29,11 @@ class CommandMSHelp : public Command
void OnSyntaxError(User *u, const Anope::string &subcommand)
{
- notice_help(Config.s_MemoServ, u, MEMO_HELP_HEADER);
+ notice_help(Config->s_MemoServ, u, MEMO_HELP_HEADER);
for (CommandMap::const_iterator it = MemoServ->Commands.begin(), it_end = MemoServ->Commands.end(); it != it_end; ++it)
- if (!Config.HidePrivilegedCommands || it->second->permission.empty() || (u->Account() && u->Account()->HasCommand(it->second->permission)))
+ if (!Config->HidePrivilegedCommands || it->second->permission.empty() || (u->Account() && u->Account()->HasCommand(it->second->permission)))
it->second->OnServHelp(u);
- notice_help(Config.s_MemoServ, u, MEMO_HELP_FOOTER, Config.s_ChanServ.c_str());
+ notice_help(Config->s_MemoServ, u, MEMO_HELP_FOOTER, Config->s_ChanServ.c_str());
}
};
diff --git a/modules/core/ms_info.cpp b/modules/core/ms_info.cpp
index 89b816a60..2dfb6398d 100644
--- a/modules/core/ms_info.cpp
+++ b/modules/core/ms_info.cpp
@@ -33,12 +33,12 @@ class CommandMSInfo : public Command
na = findnick(name);
if (!na)
{
- notice_lang(Config.s_MemoServ, u, NICK_X_NOT_REGISTERED, name.c_str());
+ notice_lang(Config->s_MemoServ, u, NICK_X_NOT_REGISTERED, name.c_str());
return MOD_CONT;
}
else if (na->HasFlag(NS_FORBIDDEN))
{
- notice_lang(Config.s_MemoServ, u, NICK_X_FORBIDDEN, name.c_str());
+ notice_lang(Config->s_MemoServ, u, NICK_X_FORBIDDEN, name.c_str());
return MOD_CONT;
}
mi = &na->nc->memos;
@@ -48,12 +48,12 @@ class CommandMSInfo : public Command
{
if (!(ci = cs_findchan(name)))
{
- notice_lang(Config.s_MemoServ, u, CHAN_X_NOT_REGISTERED, name.c_str());
+ notice_lang(Config->s_MemoServ, u, CHAN_X_NOT_REGISTERED, name.c_str());
return MOD_CONT;
}
else if (!check_access(u, ci, CA_MEMO))
{
- notice_lang(Config.s_MemoServ, u, ACCESS_DENIED);
+ notice_lang(Config->s_MemoServ, u, ACCESS_DENIED);
return MOD_CONT;
}
mi = &ci->memos;
@@ -61,7 +61,7 @@ class CommandMSInfo : public Command
}
else if (!name.empty()) /* It's not a chan and we aren't services admin */
{
- notice_lang(Config.s_MemoServ, u, ACCESS_DENIED);
+ notice_lang(Config->s_MemoServ, u, ACCESS_DENIED);
return MOD_CONT;
}
else
@@ -73,13 +73,13 @@ class CommandMSInfo : public Command
if (!name.empty() && (ci || na->nc != u->Account()))
{
if (mi->memos.empty())
- notice_lang(Config.s_MemoServ, u, MEMO_INFO_X_NO_MEMOS, name.c_str());
+ notice_lang(Config->s_MemoServ, u, MEMO_INFO_X_NO_MEMOS, name.c_str());
else if (mi->memos.size() == 1)
{
if (mi->memos[0]->HasFlag(MF_UNREAD))
- notice_lang(Config.s_MemoServ, u, MEMO_INFO_X_MEMO_UNREAD, name.c_str());
+ notice_lang(Config->s_MemoServ, u, MEMO_INFO_X_MEMO_UNREAD, name.c_str());
else
- notice_lang(Config.s_MemoServ, u, MEMO_INFO_X_MEMO, name.c_str());
+ notice_lang(Config->s_MemoServ, u, MEMO_INFO_X_MEMO, name.c_str());
}
else
{
@@ -88,55 +88,55 @@ class CommandMSInfo : public Command
if (mi->memos[i]->HasFlag(MF_UNREAD))
++count;
if (count == mi->memos.size())
- notice_lang(Config.s_MemoServ, u, MEMO_INFO_X_MEMOS_ALL_UNREAD, name.c_str(), count);
+ notice_lang(Config->s_MemoServ, u, MEMO_INFO_X_MEMOS_ALL_UNREAD, name.c_str(), count);
else if (!count)
- notice_lang(Config.s_MemoServ, u, MEMO_INFO_X_MEMOS, name.c_str(), mi->memos.size());
+ notice_lang(Config->s_MemoServ, u, MEMO_INFO_X_MEMOS, name.c_str(), mi->memos.size());
else if (count == 1)
- notice_lang(Config.s_MemoServ, u, MEMO_INFO_X_MEMOS_ONE_UNREAD, name.c_str(), mi->memos.size());
+ notice_lang(Config->s_MemoServ, u, MEMO_INFO_X_MEMOS_ONE_UNREAD, name.c_str(), mi->memos.size());
else
- notice_lang(Config.s_MemoServ, u, MEMO_INFO_X_MEMOS_SOME_UNREAD, name.c_str(), mi->memos.size(), count);
+ notice_lang(Config->s_MemoServ, u, MEMO_INFO_X_MEMOS_SOME_UNREAD, name.c_str(), mi->memos.size(), count);
}
if (!mi->memomax)
{
if (hardmax)
- notice_lang(Config.s_MemoServ, u, MEMO_INFO_X_HARD_LIMIT, name.c_str(), mi->memomax);
+ notice_lang(Config->s_MemoServ, u, MEMO_INFO_X_HARD_LIMIT, name.c_str(), mi->memomax);
else
- notice_lang(Config.s_MemoServ, u, MEMO_INFO_X_LIMIT, name.c_str(), mi->memomax);
+ notice_lang(Config->s_MemoServ, u, MEMO_INFO_X_LIMIT, name.c_str(), mi->memomax);
}
else if (mi->memomax > 0)
{
if (hardmax)
- notice_lang(Config.s_MemoServ, u, MEMO_INFO_X_HARD_LIMIT, name.c_str(), mi->memomax);
+ notice_lang(Config->s_MemoServ, u, MEMO_INFO_X_HARD_LIMIT, name.c_str(), mi->memomax);
else
- notice_lang(Config.s_MemoServ, u, MEMO_INFO_X_LIMIT, name.c_str(), mi->memomax);
+ notice_lang(Config->s_MemoServ, u, MEMO_INFO_X_LIMIT, name.c_str(), mi->memomax);
}
else
- notice_lang(Config.s_MemoServ, u, MEMO_INFO_X_NO_LIMIT, name.c_str());
+ notice_lang(Config->s_MemoServ, u, MEMO_INFO_X_NO_LIMIT, name.c_str());
/* I ripped this code out of ircservices 4.4.5, since I didn't want
to rewrite the whole thing (it pisses me off). */
if (na)
{
if (na->nc->HasFlag(NI_MEMO_RECEIVE) && na->nc->HasFlag(NI_MEMO_SIGNON))
- notice_lang(Config.s_MemoServ, u, MEMO_INFO_X_NOTIFY_ON, name.c_str());
+ notice_lang(Config->s_MemoServ, u, MEMO_INFO_X_NOTIFY_ON, name.c_str());
else if (na->nc->HasFlag(NI_MEMO_RECEIVE))
- notice_lang(Config.s_MemoServ, u, MEMO_INFO_X_NOTIFY_RECEIVE, name.c_str());
+ notice_lang(Config->s_MemoServ, u, MEMO_INFO_X_NOTIFY_RECEIVE, name.c_str());
else if (na->nc->HasFlag(NI_MEMO_SIGNON))
- notice_lang(Config.s_MemoServ, u, MEMO_INFO_X_NOTIFY_SIGNON, name.c_str());
+ notice_lang(Config->s_MemoServ, u, MEMO_INFO_X_NOTIFY_SIGNON, name.c_str());
else
- notice_lang(Config.s_MemoServ, u, MEMO_INFO_X_NOTIFY_OFF, name.c_str());
+ notice_lang(Config->s_MemoServ, u, MEMO_INFO_X_NOTIFY_OFF, name.c_str());
}
}
else /* !name || (!ci || na->nc == u->Account()) */
{
if (mi->memos.empty())
- notice_lang(Config.s_MemoServ, u, MEMO_INFO_NO_MEMOS);
+ notice_lang(Config->s_MemoServ, u, MEMO_INFO_NO_MEMOS);
else if (mi->memos.size() == 1)
{
if (mi->memos[0]->HasFlag(MF_UNREAD))
- notice_lang(Config.s_MemoServ, u, MEMO_INFO_MEMO_UNREAD);
+ notice_lang(Config->s_MemoServ, u, MEMO_INFO_MEMO_UNREAD);
else
- notice_lang(Config.s_MemoServ, u, MEMO_INFO_MEMO);
+ notice_lang(Config->s_MemoServ, u, MEMO_INFO_MEMO);
}
else
{
@@ -145,41 +145,41 @@ class CommandMSInfo : public Command
if (mi->memos[i]->HasFlag(MF_UNREAD))
++count;
if (count == mi->memos.size())
- notice_lang(Config.s_MemoServ, u, MEMO_INFO_MEMOS_ALL_UNREAD, count);
+ notice_lang(Config->s_MemoServ, u, MEMO_INFO_MEMOS_ALL_UNREAD, count);
else if (!count)
- notice_lang(Config.s_MemoServ, u, MEMO_INFO_MEMOS, mi->memos.size());
+ notice_lang(Config->s_MemoServ, u, MEMO_INFO_MEMOS, mi->memos.size());
else if (count == 1)
- notice_lang(Config.s_MemoServ, u, MEMO_INFO_MEMOS_ONE_UNREAD, mi->memos.size());
+ notice_lang(Config->s_MemoServ, u, MEMO_INFO_MEMOS_ONE_UNREAD, mi->memos.size());
else
- notice_lang(Config.s_MemoServ, u, MEMO_INFO_MEMOS_SOME_UNREAD, mi->memos.size(), count);
+ notice_lang(Config->s_MemoServ, u, MEMO_INFO_MEMOS_SOME_UNREAD, mi->memos.size(), count);
}
if (!mi->memomax)
{
if (!u->Account()->IsServicesOper() && hardmax)
- notice_lang(Config.s_MemoServ, u, MEMO_INFO_HARD_LIMIT_ZERO);
+ notice_lang(Config->s_MemoServ, u, MEMO_INFO_HARD_LIMIT_ZERO);
else
- notice_lang(Config.s_MemoServ, u, MEMO_INFO_LIMIT_ZERO);
+ notice_lang(Config->s_MemoServ, u, MEMO_INFO_LIMIT_ZERO);
}
else if (mi->memomax > 0)
{
if (!u->Account()->IsServicesOper() && hardmax)
- notice_lang(Config.s_MemoServ, u, MEMO_INFO_HARD_LIMIT, mi->memomax);
+ notice_lang(Config->s_MemoServ, u, MEMO_INFO_HARD_LIMIT, mi->memomax);
else
- notice_lang(Config.s_MemoServ, u, MEMO_INFO_LIMIT, mi->memomax);
+ notice_lang(Config->s_MemoServ, u, MEMO_INFO_LIMIT, mi->memomax);
}
else
- notice_lang(Config.s_MemoServ, u, MEMO_INFO_NO_LIMIT);
+ notice_lang(Config->s_MemoServ, u, MEMO_INFO_NO_LIMIT);
/* Ripped too. But differently because of a seg fault (loughs) */
if (u->Account()->HasFlag(NI_MEMO_RECEIVE) && u->Account()->HasFlag(NI_MEMO_SIGNON))
- notice_lang(Config.s_MemoServ, u, MEMO_INFO_NOTIFY_ON);
+ notice_lang(Config->s_MemoServ, u, MEMO_INFO_NOTIFY_ON);
else if (u->Account()->HasFlag(NI_MEMO_RECEIVE))
- notice_lang(Config.s_MemoServ, u, MEMO_INFO_NOTIFY_RECEIVE);
+ notice_lang(Config->s_MemoServ, u, MEMO_INFO_NOTIFY_RECEIVE);
else if (u->Account()->HasFlag(NI_MEMO_SIGNON))
- notice_lang(Config.s_MemoServ, u, MEMO_INFO_NOTIFY_SIGNON);
+ notice_lang(Config->s_MemoServ, u, MEMO_INFO_NOTIFY_SIGNON);
else
- notice_lang(Config.s_MemoServ, u, MEMO_INFO_NOTIFY_OFF);
+ notice_lang(Config->s_MemoServ, u, MEMO_INFO_NOTIFY_OFF);
}
return MOD_CONT;
}
@@ -187,16 +187,16 @@ class CommandMSInfo : public Command
bool OnHelp(User *u, const Anope::string &subcommand)
{
if (u->Account() && u->Account()->IsServicesOper())
- notice_help(Config.s_MemoServ, u, MEMO_SERVADMIN_HELP_INFO);
+ notice_help(Config->s_MemoServ, u, MEMO_SERVADMIN_HELP_INFO);
else
- notice_help(Config.s_MemoServ, u, MEMO_HELP_INFO);
+ notice_help(Config->s_MemoServ, u, MEMO_HELP_INFO);
return true;
}
void OnServHelp(User *u)
{
- notice_lang(Config.s_MemoServ, u, MEMO_HELP_CMD_INFO);
+ notice_lang(Config->s_MemoServ, u, MEMO_HELP_CMD_INFO);
}
};
diff --git a/modules/core/ms_list.cpp b/modules/core/ms_list.cpp
index 0d09583a3..dc9b0c6bc 100644
--- a/modules/core/ms_list.cpp
+++ b/modules/core/ms_list.cpp
@@ -33,11 +33,11 @@ class MemoListCallback : public NumberList
{
SentHeader = true;
if (ci)
- notice_lang(Config.s_MemoServ, u, MEMO_LIST_CHAN_MEMOS, ci->name.c_str(), Config.s_MemoServ.c_str(), ci->name.c_str());
+ notice_lang(Config->s_MemoServ, u, MEMO_LIST_CHAN_MEMOS, ci->name.c_str(), Config->s_MemoServ.c_str(), ci->name.c_str());
else
- notice_lang(Config.s_MemoServ, u, MEMO_LIST_MEMOS, u->nick.c_str(), Config.s_MemoServ.c_str());
+ notice_lang(Config->s_MemoServ, u, MEMO_LIST_MEMOS, u->nick.c_str(), Config->s_MemoServ.c_str());
- notice_lang(Config.s_MemoServ, u, MEMO_LIST_HEADER);
+ notice_lang(Config->s_MemoServ, u, MEMO_LIST_HEADER);
}
DoList(u, ci, mi, Number - 1);
@@ -50,7 +50,7 @@ class MemoListCallback : public NumberList
char timebuf[64];
strftime_lang(timebuf, sizeof(timebuf), u, STRFTIME_DATE_TIME_FORMAT, &tm);
timebuf[sizeof(timebuf) - 1] = 0; /* just in case */
- notice_lang(Config.s_MemoServ, u, MEMO_LIST_FORMAT, (m->HasFlag(MF_UNREAD)) ? '*' : ' ', m->number, m->sender.c_str(), timebuf);
+ notice_lang(Config->s_MemoServ, u, MEMO_LIST_FORMAT, (m->HasFlag(MF_UNREAD)) ? '*' : ' ', m->number, m->sender.c_str(), timebuf);
}
};
@@ -75,12 +75,12 @@ class CommandMSList : public Command
if (!(ci = cs_findchan(chan)))
{
- notice_lang(Config.s_MemoServ, u, CHAN_X_NOT_REGISTERED, chan.c_str());
+ notice_lang(Config->s_MemoServ, u, CHAN_X_NOT_REGISTERED, chan.c_str());
return MOD_CONT;
}
else if (!check_access(u, ci, CA_MEMO))
{
- notice_lang(Config.s_MemoServ, u, ACCESS_DENIED);
+ notice_lang(Config->s_MemoServ, u, ACCESS_DENIED);
return MOD_CONT;
}
mi = &ci->memos;
@@ -92,9 +92,9 @@ class CommandMSList : public Command
else if (!mi->memos.size())
{
if (!chan.empty())
- notice_lang(Config.s_MemoServ, u, MEMO_X_HAS_NO_MEMOS, chan.c_str());
+ notice_lang(Config->s_MemoServ, u, MEMO_X_HAS_NO_MEMOS, chan.c_str());
else
- notice_lang(Config.s_MemoServ, u, MEMO_HAVE_NO_MEMOS);
+ notice_lang(Config->s_MemoServ, u, MEMO_HAVE_NO_MEMOS);
}
else
{
@@ -113,9 +113,9 @@ class CommandMSList : public Command
if (i == end)
{
if (!chan.empty())
- notice_lang(Config.s_MemoServ, u, MEMO_X_HAS_NO_NEW_MEMOS, chan.c_str());
+ notice_lang(Config->s_MemoServ, u, MEMO_X_HAS_NO_NEW_MEMOS, chan.c_str());
else
- notice_lang(Config.s_MemoServ, u, MEMO_HAVE_NO_NEW_MEMOS);
+ notice_lang(Config->s_MemoServ, u, MEMO_HAVE_NO_NEW_MEMOS);
return MOD_CONT;
}
}
@@ -131,10 +131,10 @@ class CommandMSList : public Command
{
SentHeader = true;
if (ci)
- notice_lang(Config.s_MemoServ, u, !param.empty() ? MEMO_LIST_CHAN_NEW_MEMOS : MEMO_LIST_CHAN_MEMOS, ci->name.c_str(), Config.s_MemoServ.c_str(), ci->name.c_str());
+ notice_lang(Config->s_MemoServ, u, !param.empty() ? MEMO_LIST_CHAN_NEW_MEMOS : MEMO_LIST_CHAN_MEMOS, ci->name.c_str(), Config->s_MemoServ.c_str(), ci->name.c_str());
else
- notice_lang(Config.s_MemoServ, u, !param.empty() ? MEMO_LIST_NEW_MEMOS : MEMO_LIST_MEMOS, u->nick.c_str(), Config.s_MemoServ.c_str());
- notice_lang(Config.s_MemoServ, u, MEMO_LIST_HEADER);
+ notice_lang(Config->s_MemoServ, u, !param.empty() ? MEMO_LIST_NEW_MEMOS : MEMO_LIST_MEMOS, u->nick.c_str(), Config->s_MemoServ.c_str());
+ notice_lang(Config->s_MemoServ, u, MEMO_LIST_HEADER);
}
MemoListCallback::DoList(u, ci, mi, i);
@@ -146,18 +146,18 @@ class CommandMSList : public Command
bool OnHelp(User *u, const Anope::string &subcommand)
{
- notice_help(Config.s_MemoServ, u, MEMO_HELP_LIST);
+ notice_help(Config->s_MemoServ, u, MEMO_HELP_LIST);
return true;
}
void OnSyntaxError(User *u, const Anope::string &subcommand)
{
- syntax_error(Config.s_MemoServ, u, "LIST", MEMO_LIST_SYNTAX);
+ syntax_error(Config->s_MemoServ, u, "LIST", MEMO_LIST_SYNTAX);
}
void OnServCommand(User *u)
{
- notice_lang(Config.s_MemoServ, u, MEMO_HELP_CMD_LIST);
+ notice_lang(Config->s_MemoServ, u, MEMO_HELP_CMD_LIST);
}
};
diff --git a/modules/core/ms_read.cpp b/modules/core/ms_read.cpp
index 5f25230e3..80e1d5bf6 100644
--- a/modules/core/ms_read.cpp
+++ b/modules/core/ms_read.cpp
@@ -38,10 +38,10 @@ class MemoListCallback : public NumberList
strftime_lang(timebuf, sizeof(timebuf), u, STRFTIME_DATE_TIME_FORMAT, &tm);
timebuf[sizeof(timebuf) - 1] = 0;
if (ci)
- notice_lang(Config.s_MemoServ, u, MEMO_CHAN_HEADER, m->number, m->sender.c_str(), timebuf, Config.s_MemoServ.c_str(), ci->name.c_str(), m->number);
+ notice_lang(Config->s_MemoServ, u, MEMO_CHAN_HEADER, m->number, m->sender.c_str(), timebuf, Config->s_MemoServ.c_str(), ci->name.c_str(), m->number);
else
- notice_lang(Config.s_MemoServ, u, MEMO_HEADER, m->number, m->sender.c_str(), timebuf, Config.s_MemoServ.c_str(), m->number);
- notice_lang(Config.s_MemoServ, u, MEMO_TEXT, m->text.c_str());
+ notice_lang(Config->s_MemoServ, u, MEMO_HEADER, m->number, m->sender.c_str(), timebuf, Config->s_MemoServ.c_str(), m->number);
+ notice_lang(Config->s_MemoServ, u, MEMO_TEXT, m->text.c_str());
m->UnsetFlag(MF_UNREAD);
/* Check if a receipt notification was requested */
@@ -71,12 +71,12 @@ class CommandMSRead : public Command
if (!(ci = cs_findchan(chan)))
{
- notice_lang(Config.s_MemoServ, u, CHAN_X_NOT_REGISTERED, chan.c_str());
+ notice_lang(Config->s_MemoServ, u, CHAN_X_NOT_REGISTERED, chan.c_str());
return MOD_CONT;
}
else if (!check_access(u, ci, CA_MEMO))
{
- notice_lang(Config.s_MemoServ, u, ACCESS_DENIED);
+ notice_lang(Config->s_MemoServ, u, ACCESS_DENIED);
return MOD_CONT;
}
mi = &ci->memos;
@@ -89,9 +89,9 @@ class CommandMSRead : public Command
else if (mi->memos.empty())
{
if (!chan.empty())
- notice_lang(Config.s_MemoServ, u, MEMO_X_HAS_NO_MEMOS, chan.c_str());
+ notice_lang(Config->s_MemoServ, u, MEMO_X_HAS_NO_MEMOS, chan.c_str());
else
- notice_lang(Config.s_MemoServ, u, MEMO_HAVE_NO_MEMOS);
+ notice_lang(Config->s_MemoServ, u, MEMO_HAVE_NO_MEMOS);
}
else {
int i, end;
@@ -108,9 +108,9 @@ class CommandMSRead : public Command
if (!readcount)
{
if (!chan.empty())
- notice_lang(Config.s_MemoServ, u, MEMO_X_HAS_NO_NEW_MEMOS, chan.c_str());
+ notice_lang(Config->s_MemoServ, u, MEMO_X_HAS_NO_NEW_MEMOS, chan.c_str());
else
- notice_lang(Config.s_MemoServ, u, MEMO_HAVE_NO_NEW_MEMOS);
+ notice_lang(Config->s_MemoServ, u, MEMO_HAVE_NO_NEW_MEMOS);
}
}
else if (numstr.equals_ci("LAST"))
@@ -129,18 +129,18 @@ class CommandMSRead : public Command
bool OnHelp(User *u, const Anope::string &subcommand)
{
- notice_help(Config.s_MemoServ, u, MEMO_HELP_READ);
+ notice_help(Config->s_MemoServ, u, MEMO_HELP_READ);
return true;
}
void OnSyntaxError(User *u, const Anope::string &subcommand)
{
- syntax_error(Config.s_MemoServ, u, "READ", MEMO_READ_SYNTAX);
+ syntax_error(Config->s_MemoServ, u, "READ", MEMO_READ_SYNTAX);
}
void OnServHelp(User *u)
{
- notice_lang(Config.s_MemoServ, u, MEMO_HELP_CMD_READ);
+ notice_lang(Config->s_MemoServ, u, MEMO_HELP_CMD_READ);
}
};
diff --git a/modules/core/ms_rsend.cpp b/modules/core/ms_rsend.cpp
index ed0c51998..03c643c11 100644
--- a/modules/core/ms_rsend.cpp
+++ b/modules/core/ms_rsend.cpp
@@ -29,26 +29,26 @@ class CommandMSRSend : public Command
/* prevent user from rsend to themselves */
if ((na = findnick(nick)) && na->nc == u->Account())
{
- notice_lang(Config.s_MemoServ, u, MEMO_NO_RSEND_SELF);
+ notice_lang(Config->s_MemoServ, u, MEMO_NO_RSEND_SELF);
return MOD_CONT;
}
- if (Config.MSMemoReceipt == 1)
+ if (Config->MSMemoReceipt == 1)
{
/* Services opers and above can use rsend */
if (u->Account()->IsServicesOper())
memo_send(u, nick, text, 3);
else
- notice_lang(Config.s_MemoServ, u, ACCESS_DENIED);
+ notice_lang(Config->s_MemoServ, u, ACCESS_DENIED);
}
- else if (Config.MSMemoReceipt == 2)
+ else if (Config->MSMemoReceipt == 2)
/* Everybody can use rsend */
memo_send(u, nick, text, 3);
else
{
/* rsend has been disabled */
- Alog(LOG_DEBUG) << "MSMemoReceipt is set misconfigured to " << Config.MSMemoReceipt;
- notice_lang(Config.s_MemoServ, u, MEMO_RSEND_DISABLED);
+ Alog(LOG_DEBUG) << "MSMemoReceipt is set misconfigured to " << Config->MSMemoReceipt;
+ notice_lang(Config->s_MemoServ, u, MEMO_RSEND_DISABLED);
}
return MOD_CONT;
@@ -56,18 +56,18 @@ class CommandMSRSend : public Command
bool OnHelp(User *u, const Anope::string &subcommand)
{
- notice_help(Config.s_MemoServ, u, MEMO_HELP_RSEND);
+ notice_help(Config->s_MemoServ, u, MEMO_HELP_RSEND);
return true;
}
void OnSyntaxError(User *u, const Anope::string &subcommand)
{
- syntax_error(Config.s_MemoServ, u, "RSEND", MEMO_RSEND_SYNTAX);
+ syntax_error(Config->s_MemoServ, u, "RSEND", MEMO_RSEND_SYNTAX);
}
void OnServHelp(User *u)
{
- notice_lang(Config.s_MemoServ, u, MEMO_HELP_CMD_RSEND);
+ notice_lang(Config->s_MemoServ, u, MEMO_HELP_CMD_RSEND);
}
};
@@ -78,7 +78,7 @@ class MSRSend : public Module
public:
MSRSend(const Anope::string &modname, const Anope::string &creator) : Module(modname, creator)
{
- if (!Config.MSMemoReceipt)
+ if (!Config->MSMemoReceipt)
throw ModuleException("Don't like memo reciepts, or something.");
this->SetAuthor("Anope");
diff --git a/modules/core/ms_send.cpp b/modules/core/ms_send.cpp
index 67fe265d1..015302a8e 100644
--- a/modules/core/ms_send.cpp
+++ b/modules/core/ms_send.cpp
@@ -30,18 +30,18 @@ class CommandMSSend : public Command
bool OnHelp(User *u, const Anope::string &subcommand)
{
- notice_help(Config.s_MemoServ, u, MEMO_HELP_SEND);
+ notice_help(Config->s_MemoServ, u, MEMO_HELP_SEND);
return true;
}
void OnSyntaxError(User *u, const Anope::string &subcommand)
{
- syntax_error(Config.s_MemoServ, u, "SEND", MEMO_SEND_SYNTAX);
+ syntax_error(Config->s_MemoServ, u, "SEND", MEMO_SEND_SYNTAX);
}
void OnServHelp(User *u)
{
- notice_lang(Config.s_MemoServ, u, MEMO_HELP_CMD_SEND);
+ notice_lang(Config->s_MemoServ, u, MEMO_HELP_CMD_SEND);
}
};
diff --git a/modules/core/ms_sendall.cpp b/modules/core/ms_sendall.cpp
index aa19cfb6c..e15b8ae93 100644
--- a/modules/core/ms_sendall.cpp
+++ b/modules/core/ms_sendall.cpp
@@ -26,7 +26,7 @@ class CommandMSSendAll : public Command
if (readonly)
{
- notice_lang(Config.s_MemoServ, u, MEMO_SEND_DISABLED);
+ notice_lang(Config->s_MemoServ, u, MEMO_SEND_DISABLED);
return MOD_CONT;
}
@@ -40,24 +40,24 @@ class CommandMSSendAll : public Command
memo_send(u, nc->display, text, 1);
}
- notice_lang(Config.s_MemoServ, u, MEMO_MASS_SENT);
+ notice_lang(Config->s_MemoServ, u, MEMO_MASS_SENT);
return MOD_CONT;
}
bool OnHelp(User *u, const Anope::string &subcommand)
{
- notice_help(Config.s_MemoServ, u, MEMO_HELP_SENDALL);
+ notice_help(Config->s_MemoServ, u, MEMO_HELP_SENDALL);
return true;
}
void OnSyntaxError(User *u, const Anope::string &subcommand)
{
- syntax_error(Config.s_MemoServ, u, "SENDALL", MEMO_SEND_SYNTAX);
+ syntax_error(Config->s_MemoServ, u, "SENDALL", MEMO_SEND_SYNTAX);
}
void OnServHelp(User *u)
{
- notice_lang(Config.s_MemoServ, u, MEMO_HELP_CMD_SENDALL);
+ notice_lang(Config->s_MemoServ, u, MEMO_HELP_CMD_SENDALL);
}
};
diff --git a/modules/core/ms_set.cpp b/modules/core/ms_set.cpp
index f0abdc5de..bb065974d 100644
--- a/modules/core/ms_set.cpp
+++ b/modules/core/ms_set.cpp
@@ -24,44 +24,44 @@ class CommandMSSet : public Command
{
u->Account()->SetFlag(NI_MEMO_SIGNON);
u->Account()->SetFlag(NI_MEMO_RECEIVE);
- notice_lang(Config.s_MemoServ, u, MEMO_SET_NOTIFY_ON, Config.s_MemoServ.c_str());
+ notice_lang(Config->s_MemoServ, u, MEMO_SET_NOTIFY_ON, Config->s_MemoServ.c_str());
}
else if (param.equals_ci("LOGON"))
{
u->Account()->SetFlag(NI_MEMO_SIGNON);
u->Account()->UnsetFlag(NI_MEMO_RECEIVE);
- notice_lang(Config.s_MemoServ, u, MEMO_SET_NOTIFY_LOGON, Config.s_MemoServ.c_str());
+ notice_lang(Config->s_MemoServ, u, MEMO_SET_NOTIFY_LOGON, Config->s_MemoServ.c_str());
}
else if (param.equals_ci("NEW"))
{
u->Account()->UnsetFlag(NI_MEMO_SIGNON);
u->Account()->SetFlag(NI_MEMO_RECEIVE);
- notice_lang(Config.s_MemoServ, u, MEMO_SET_NOTIFY_NEW, Config.s_MemoServ.c_str());
+ notice_lang(Config->s_MemoServ, u, MEMO_SET_NOTIFY_NEW, Config->s_MemoServ.c_str());
}
else if (param.equals_ci("MAIL"))
{
if (!u->Account()->email.empty())
{
u->Account()->SetFlag(NI_MEMO_MAIL);
- notice_lang(Config.s_MemoServ, u, MEMO_SET_NOTIFY_MAIL);
+ notice_lang(Config->s_MemoServ, u, MEMO_SET_NOTIFY_MAIL);
}
else
- notice_lang(Config.s_MemoServ, u, MEMO_SET_NOTIFY_INVALIDMAIL);
+ notice_lang(Config->s_MemoServ, u, MEMO_SET_NOTIFY_INVALIDMAIL);
}
else if (param.equals_ci("NOMAIL"))
{
u->Account()->UnsetFlag(NI_MEMO_MAIL);
- notice_lang(Config.s_MemoServ, u, MEMO_SET_NOTIFY_NOMAIL);
+ notice_lang(Config->s_MemoServ, u, MEMO_SET_NOTIFY_NOMAIL);
}
else if (param.equals_ci("OFF"))
{
u->Account()->UnsetFlag(NI_MEMO_SIGNON);
u->Account()->UnsetFlag(NI_MEMO_RECEIVE);
u->Account()->UnsetFlag(NI_MEMO_MAIL);
- notice_lang(Config.s_MemoServ, u, MEMO_SET_NOTIFY_OFF, Config.s_MemoServ.c_str());
+ notice_lang(Config->s_MemoServ, u, MEMO_SET_NOTIFY_OFF, Config->s_MemoServ.c_str());
}
else
- syntax_error(Config.s_MemoServ, u, "SET NOTIFY", MEMO_SET_NOTIFY_SYNTAX);
+ syntax_error(Config->s_MemoServ, u, "SET NOTIFY", MEMO_SET_NOTIFY_SYNTAX);
return MOD_CONT;
}
@@ -84,12 +84,12 @@ class CommandMSSet : public Command
p3 = params.size() > 4 ? params[4] : "";
if (!(ci = cs_findchan(chan)))
{
- notice_lang(Config.s_MemoServ, u, CHAN_X_NOT_REGISTERED, chan.c_str());
+ notice_lang(Config->s_MemoServ, u, CHAN_X_NOT_REGISTERED, chan.c_str());
return MOD_CONT;
}
else if (!is_servadmin && !check_access(u, ci, CA_MEMO))
{
- notice_lang(Config.s_MemoServ, u, ACCESS_DENIED);
+ notice_lang(Config->s_MemoServ, u, ACCESS_DENIED);
return MOD_CONT;
}
mi = &ci->memos;
@@ -101,7 +101,7 @@ class CommandMSSet : public Command
NickAlias *na;
if (!(na = findnick(p1)))
{
- notice_lang(Config.s_MemoServ, u, NICK_X_NOT_REGISTERED, p1.c_str());
+ notice_lang(Config->s_MemoServ, u, NICK_X_NOT_REGISTERED, p1.c_str());
return MOD_CONT;
}
user = p1;
@@ -112,12 +112,12 @@ class CommandMSSet : public Command
}
else if (p1.empty())
{
- syntax_error(Config.s_MemoServ, u, "SET LIMIT", MEMO_SET_LIMIT_SERVADMIN_SYNTAX);
+ syntax_error(Config->s_MemoServ, u, "SET LIMIT", MEMO_SET_LIMIT_SERVADMIN_SYNTAX);
return MOD_CONT;
}
if ((!isdigit(p1[0]) && !p1.equals_ci("NONE")) || (!p2.empty() && !p2.equals_ci("HARD")))
{
- syntax_error(Config.s_MemoServ, u, "SET LIMIT", MEMO_SET_LIMIT_SERVADMIN_SYNTAX);
+ syntax_error(Config->s_MemoServ, u, "SET LIMIT", MEMO_SET_LIMIT_SERVADMIN_SYNTAX);
return MOD_CONT;
}
if (!chan.empty())
@@ -137,7 +137,7 @@ class CommandMSSet : public Command
limit = p1.is_number_only() ? convertTo<int32>(p1) : -1;
if (limit < 0 || limit > 32767)
{
- notice_lang(Config.s_MemoServ, u, MEMO_SET_LIMIT_OVERFLOW, 32767);
+ notice_lang(Config->s_MemoServ, u, MEMO_SET_LIMIT_OVERFLOW, 32767);
limit = 32767;
}
if (p1.equals_ci("NONE"))
@@ -147,33 +147,33 @@ class CommandMSSet : public Command
{
if (p1.empty() || !p2.empty() || !isdigit(p1[0]))
{
- syntax_error(Config.s_MemoServ, u, "SET LIMIT", MEMO_SET_LIMIT_SYNTAX);
+ syntax_error(Config->s_MemoServ, u, "SET LIMIT", MEMO_SET_LIMIT_SYNTAX);
return MOD_CONT;
}
if (!chan.empty() && ci->HasFlag(CI_MEMO_HARDMAX))
{
- notice_lang(Config.s_MemoServ, u, MEMO_SET_LIMIT_FORBIDDEN, chan.c_str());
+ notice_lang(Config->s_MemoServ, u, MEMO_SET_LIMIT_FORBIDDEN, chan.c_str());
return MOD_CONT;
}
else if (chan.empty() && nc->HasFlag(NI_MEMO_HARDMAX))
{
- notice_lang(Config.s_MemoServ, u, MEMO_SET_YOUR_LIMIT_FORBIDDEN);
+ notice_lang(Config->s_MemoServ, u, MEMO_SET_YOUR_LIMIT_FORBIDDEN);
return MOD_CONT;
}
limit = p1.is_number_only() ? convertTo<int32>(p1) : -1;
/* The first character is a digit, but we could still go negative
* from overflow... watch out! */
- if (limit < 0 || (Config.MSMaxMemos > 0 && limit > Config.MSMaxMemos))
+ if (limit < 0 || (Config->MSMaxMemos > 0 && limit > Config->MSMaxMemos))
{
if (!chan.empty())
- notice_lang(Config.s_MemoServ, u, MEMO_SET_LIMIT_TOO_HIGH, chan.c_str(), Config.MSMaxMemos);
+ notice_lang(Config->s_MemoServ, u, MEMO_SET_LIMIT_TOO_HIGH, chan.c_str(), Config->MSMaxMemos);
else
- notice_lang(Config.s_MemoServ, u, MEMO_SET_YOUR_LIMIT_TOO_HIGH, Config.MSMaxMemos);
+ notice_lang(Config->s_MemoServ, u, MEMO_SET_YOUR_LIMIT_TOO_HIGH, Config->MSMaxMemos);
return MOD_CONT;
}
else if (limit > 32767)
{
- notice_lang(Config.s_MemoServ, u, MEMO_SET_LIMIT_OVERFLOW, 32767);
+ notice_lang(Config->s_MemoServ, u, MEMO_SET_LIMIT_OVERFLOW, 32767);
limit = 32767;
}
}
@@ -181,23 +181,23 @@ class CommandMSSet : public Command
if (limit > 0)
{
if (chan.empty() && nc == u->Account())
- notice_lang(Config.s_MemoServ, u, MEMO_SET_YOUR_LIMIT, limit);
+ notice_lang(Config->s_MemoServ, u, MEMO_SET_YOUR_LIMIT, limit);
else
- notice_lang(Config.s_MemoServ, u, MEMO_SET_LIMIT, !chan.empty() ? chan.c_str() : user.c_str(), limit);
+ notice_lang(Config->s_MemoServ, u, MEMO_SET_LIMIT, !chan.empty() ? chan.c_str() : user.c_str(), limit);
}
else if (!limit)
{
if (chan.empty() && nc == u->Account())
- notice_lang(Config.s_MemoServ, u, MEMO_SET_YOUR_LIMIT_ZERO);
+ notice_lang(Config->s_MemoServ, u, MEMO_SET_YOUR_LIMIT_ZERO);
else
- notice_lang(Config.s_MemoServ, u, MEMO_SET_LIMIT_ZERO, !chan.empty() ? chan.c_str() : user.c_str());
+ notice_lang(Config->s_MemoServ, u, MEMO_SET_LIMIT_ZERO, !chan.empty() ? chan.c_str() : user.c_str());
}
else
{
if (chan.empty() && nc == u->Account())
- notice_lang(Config.s_MemoServ, u, MEMO_UNSET_YOUR_LIMIT);
+ notice_lang(Config->s_MemoServ, u, MEMO_UNSET_YOUR_LIMIT);
else
- notice_lang(Config.s_MemoServ, u, MEMO_UNSET_LIMIT, !chan.empty() ? chan.c_str() : user.c_str());
+ notice_lang(Config->s_MemoServ, u, MEMO_UNSET_LIMIT, !chan.empty() ? chan.c_str() : user.c_str());
}
return MOD_CONT;
}
@@ -213,7 +213,7 @@ class CommandMSSet : public Command
if (readonly)
{
- notice_lang(Config.s_MemoServ, u, MEMO_SET_DISABLED);
+ notice_lang(Config->s_MemoServ, u, MEMO_SET_DISABLED);
return MOD_CONT;
}
else if (cmd.equals_ci("NOTIFY"))
@@ -222,8 +222,8 @@ class CommandMSSet : public Command
return this->DoLimit(u, params, mi);
else
{
- notice_lang(Config.s_MemoServ, u, MEMO_SET_UNKNOWN_OPTION, cmd.c_str());
- notice_lang(Config.s_MemoServ, u, MORE_INFO, Config.s_MemoServ.c_str(), "SET");
+ notice_lang(Config->s_MemoServ, u, MEMO_SET_UNKNOWN_OPTION, cmd.c_str());
+ notice_lang(Config->s_MemoServ, u, MORE_INFO, Config->s_MemoServ.c_str(), "SET");
}
return MOD_CONT;
}
@@ -231,15 +231,15 @@ class CommandMSSet : public Command
bool OnHelp(User *u, const Anope::string &subcommand)
{
if (subcommand.empty())
- notice_help(Config.s_MemoServ, u, MEMO_HELP_SET);
+ notice_help(Config->s_MemoServ, u, MEMO_HELP_SET);
else if (subcommand.equals_ci("NOTIFY"))
- notice_help(Config.s_MemoServ, u, MEMO_HELP_SET_NOTIFY);
+ notice_help(Config->s_MemoServ, u, MEMO_HELP_SET_NOTIFY);
else if (subcommand.equals_ci("LIMIT"))
{
if (u->Account() && u->Account()->IsServicesOper())
- notice_help(Config.s_MemoServ, u, MEMO_SERVADMIN_HELP_SET_LIMIT, Config.MSMaxMemos);
+ notice_help(Config->s_MemoServ, u, MEMO_SERVADMIN_HELP_SET_LIMIT, Config->MSMaxMemos);
else
- notice_help(Config.s_MemoServ, u, MEMO_HELP_SET_LIMIT, Config.MSMaxMemos);
+ notice_help(Config->s_MemoServ, u, MEMO_HELP_SET_LIMIT, Config->MSMaxMemos);
}
else
return false;
@@ -249,12 +249,12 @@ class CommandMSSet : public Command
void OnSyntaxError(User *u, const Anope::string &subcommand)
{
- syntax_error(Config.s_MemoServ, u, "SET", MEMO_SET_SYNTAX);
+ syntax_error(Config->s_MemoServ, u, "SET", MEMO_SET_SYNTAX);
}
void OnServHelp(User *u)
{
- notice_lang(Config.s_MemoServ, u, MEMO_HELP_CMD_SET);
+ notice_lang(Config->s_MemoServ, u, MEMO_HELP_CMD_SET);
}
};
diff --git a/modules/core/ms_staff.cpp b/modules/core/ms_staff.cpp
index a53289610..292161a7b 100644
--- a/modules/core/ms_staff.cpp
+++ b/modules/core/ms_staff.cpp
@@ -26,7 +26,7 @@ class CommandMSStaff : public Command
if (readonly)
{
- notice_lang(Config.s_MemoServ, u, MEMO_SEND_DISABLED);
+ notice_lang(Config->s_MemoServ, u, MEMO_SEND_DISABLED);
return MOD_CONT;
}
@@ -43,18 +43,18 @@ class CommandMSStaff : public Command
bool OnHelp(User *u, const Anope::string &subcommand)
{
- notice_help(Config.s_MemoServ, u, MEMO_HELP_STAFF);
+ notice_help(Config->s_MemoServ, u, MEMO_HELP_STAFF);
return true;
}
void OnSyntaxError(User *u, const Anope::string &subcommand)
{
- syntax_error(Config.s_MemoServ, u, "STAFF", MEMO_STAFF_SYNTAX);
+ syntax_error(Config->s_MemoServ, u, "STAFF", MEMO_STAFF_SYNTAX);
}
void OnServHelp(User *u)
{
- notice_lang(Config.s_MemoServ, u, MEMO_HELP_CMD_STAFF);
+ notice_lang(Config->s_MemoServ, u, MEMO_HELP_CMD_STAFF);
}
};
diff --git a/modules/core/ns_access.cpp b/modules/core/ns_access.cpp
index 3e097427d..bd2d34a32 100644
--- a/modules/core/ns_access.cpp
+++ b/modules/core/ns_access.cpp
@@ -23,23 +23,23 @@ class CommandNSAccess : public Command
if (nc->access.empty())
{
- notice_lang(Config.s_NickServ, u, NICK_ACCESS_LIST_X_EMPTY, nc->display.c_str());
+ notice_lang(Config->s_NickServ, u, NICK_ACCESS_LIST_X_EMPTY, nc->display.c_str());
return MOD_CONT;
}
if (nc->HasFlag(NI_SUSPENDED))
{
- notice_lang(Config.s_NickServ, u, NICK_X_SUSPENDED, nc->display.c_str());
+ notice_lang(Config->s_NickServ, u, NICK_X_SUSPENDED, nc->display.c_str());
return MOD_CONT;
}
- notice_lang(Config.s_NickServ, u, NICK_ACCESS_LIST_X, params[1].c_str());
+ notice_lang(Config->s_NickServ, u, NICK_ACCESS_LIST_X, params[1].c_str());
for (i = 0, end = nc->access.size(); i < end; ++i)
{
Anope::string access = nc->GetAccess(i);
if (!mask.empty() && !Anope::Match(access, mask))
continue;
- u->SendMessage(Config.s_NickServ, " %s", access.c_str());
+ u->SendMessage(Config->s_NickServ, " %s", access.c_str());
}
return MOD_CONT;
@@ -53,20 +53,20 @@ class CommandNSAccess : public Command
return MOD_CONT;
}
- if (nc->access.size() >= Config.NSAccessMax)
+ if (nc->access.size() >= Config->NSAccessMax)
{
- notice_lang(Config.s_NickServ, u, NICK_ACCESS_REACHED_LIMIT, Config.NSAccessMax);
+ notice_lang(Config->s_NickServ, u, NICK_ACCESS_REACHED_LIMIT, Config->NSAccessMax);
return MOD_CONT;
}
if (nc->FindAccess(mask))
{
- notice_lang(Config.s_NickServ, u, NICK_ACCESS_ALREADY_PRESENT, mask.c_str());
+ notice_lang(Config->s_NickServ, u, NICK_ACCESS_ALREADY_PRESENT, mask.c_str());
return MOD_CONT;
}
nc->AddAccess(mask);
- notice_lang(Config.s_NickServ, u, NICK_ACCESS_ADDED, mask.c_str());
+ notice_lang(Config->s_NickServ, u, NICK_ACCESS_ADDED, mask.c_str());
return MOD_CONT;
}
@@ -81,11 +81,11 @@ class CommandNSAccess : public Command
if (!nc->FindAccess(mask))
{
- notice_lang(Config.s_NickServ, u, NICK_ACCESS_NOT_FOUND, mask.c_str());
+ notice_lang(Config->s_NickServ, u, NICK_ACCESS_NOT_FOUND, mask.c_str());
return MOD_CONT;
}
- notice_lang(Config.s_NickServ, u, NICK_ACCESS_DELETED, mask.c_str());
+ notice_lang(Config->s_NickServ, u, NICK_ACCESS_DELETED, mask.c_str());
nc->EraseAccess(mask);
return MOD_CONT;
@@ -97,17 +97,17 @@ class CommandNSAccess : public Command
if (nc->access.empty())
{
- notice_lang(Config.s_NickServ, u, NICK_ACCESS_LIST_EMPTY, u->nick.c_str());
+ notice_lang(Config->s_NickServ, u, NICK_ACCESS_LIST_EMPTY, u->nick.c_str());
return MOD_CONT;
}
- notice_lang(Config.s_NickServ, u, NICK_ACCESS_LIST);
+ notice_lang(Config->s_NickServ, u, NICK_ACCESS_LIST);
for (i = 0, end = nc->access.size(); i < end; ++i)
{
Anope::string access = nc->GetAccess(i);
if (!mask.empty() && !Anope::Match(access, mask))
continue;
- u->SendMessage(Config.s_NickServ, " %s", access.c_str());
+ u->SendMessage(Config->s_NickServ, " %s", access.c_str());
}
return MOD_CONT;
@@ -128,15 +128,15 @@ class CommandNSAccess : public Command
if (!mask.empty() && mask.find('@') == Anope::string::npos)
{
- notice_lang(Config.s_NickServ, u, BAD_USERHOST_MASK);
- notice_lang(Config.s_NickServ, u, MORE_INFO, Config.s_NickServ.c_str(), "ACCESS");
+ notice_lang(Config->s_NickServ, u, BAD_USERHOST_MASK);
+ notice_lang(Config->s_NickServ, u, MORE_INFO, Config->s_NickServ.c_str(), "ACCESS");
}
/*
else if (na->HasFlag(NS_FORBIDDEN))
- notice_lang(Config.s_NickServ, u, NICK_X_FORBIDDEN, na->nick);
+ notice_lang(Config->s_NickServ, u, NICK_X_FORBIDDEN, na->nick);
*/
else if (u->Account()->HasFlag(NI_SUSPENDED))
- notice_lang(Config.s_NickServ, u, NICK_X_SUSPENDED, u->Account()->display.c_str());
+ notice_lang(Config->s_NickServ, u, NICK_X_SUSPENDED, u->Account()->display.c_str());
else if (cmd.equals_ci("ADD"))
return this->DoAdd(u, u->Account(), mask);
else if (cmd.equals_ci("DEL"))
@@ -150,18 +150,18 @@ class CommandNSAccess : public Command
bool OnHelp(User *u, const Anope::string &subcommand)
{
- notice_help(Config.s_NickServ, u, NICK_HELP_ACCESS);
+ notice_help(Config->s_NickServ, u, NICK_HELP_ACCESS);
return true;
}
void OnSyntaxError(User *u, const Anope::string &subcommand)
{
- syntax_error(Config.s_NickServ, u, "ACCESS", NICK_ACCESS_SYNTAX);
+ syntax_error(Config->s_NickServ, u, "ACCESS", NICK_ACCESS_SYNTAX);
}
void OnServHelp(User *u)
{
- notice_lang(Config.s_NickServ, u, NICK_HELP_CMD_ACCESS);
+ notice_lang(Config->s_NickServ, u, NICK_HELP_CMD_ACCESS);
}
};
diff --git a/modules/core/ns_alist.cpp b/modules/core/ns_alist.cpp
index 174b6fc80..fe022a7fa 100644
--- a/modules/core/ns_alist.cpp
+++ b/modules/core/ns_alist.cpp
@@ -77,18 +77,18 @@ class CommandNSAList : public Command
}
if (!na)
- notice_lang(Config.s_NickServ, u, NICK_X_NOT_REGISTERED, nick.c_str());
+ notice_lang(Config->s_NickServ, u, NICK_X_NOT_REGISTERED, nick.c_str());
else if (na->HasFlag(NS_FORBIDDEN))
- notice_lang(Config.s_NickServ, u, NICK_X_FORBIDDEN, na->nick.c_str());
+ notice_lang(Config->s_NickServ, u, NICK_X_FORBIDDEN, na->nick.c_str());
else if (min_level <= ACCESS_INVALID || min_level > ACCESS_FOUNDER)
- notice_lang(Config.s_NickServ, u, CHAN_ACCESS_LEVEL_RANGE, ACCESS_INVALID + 1, ACCESS_FOUNDER - 1);
+ notice_lang(Config->s_NickServ, u, CHAN_ACCESS_LEVEL_RANGE, ACCESS_INVALID + 1, ACCESS_FOUNDER - 1);
else
{
int level;
int chan_count = 0;
int match_count = 0;
- notice_lang(Config.s_NickServ, u, is_servadmin ? NICK_ALIST_HEADER_X : NICK_ALIST_HEADER, na->nick.c_str());
+ notice_lang(Config->s_NickServ, u, is_servadmin ? NICK_ALIST_HEADER_X : NICK_ALIST_HEADER, na->nick.c_str());
for (registered_channel_map::const_iterator it = RegisteredChannelList.begin(), it_end = RegisteredChannelList.end(); it != it_end; ++it)
{
@@ -107,14 +107,14 @@ class CommandNSAList : public Command
{
Anope::string xop = get_xop_level(level);
- notice_lang(Config.s_NickServ, u, NICK_ALIST_XOP_FORMAT, match_count, ci->HasFlag(CI_NO_EXPIRE) ? '!' : ' ', ci->name.c_str(), xop.c_str(), !ci->desc.empty() ? ci->desc.c_str() : "");
+ notice_lang(Config->s_NickServ, u, NICK_ALIST_XOP_FORMAT, match_count, ci->HasFlag(CI_NO_EXPIRE) ? '!' : ' ', ci->name.c_str(), xop.c_str(), !ci->desc.empty() ? ci->desc.c_str() : "");
}
else
- notice_lang(Config.s_NickServ, u, NICK_ALIST_ACCESS_FORMAT, match_count, ci->HasFlag(CI_NO_EXPIRE) ? '!' : ' ', ci->name.c_str(), level, !ci->desc.empty() ? ci->desc.c_str() : "");
+ notice_lang(Config->s_NickServ, u, NICK_ALIST_ACCESS_FORMAT, match_count, ci->HasFlag(CI_NO_EXPIRE) ? '!' : ' ', ci->name.c_str(), level, !ci->desc.empty() ? ci->desc.c_str() : "");
}
}
- notice_lang(Config.s_NickServ, u, NICK_ALIST_FOOTER, match_count, chan_count);
+ notice_lang(Config->s_NickServ, u, NICK_ALIST_FOOTER, match_count, chan_count);
}
return MOD_CONT;
}
@@ -122,16 +122,16 @@ class CommandNSAList : public Command
bool OnHelp(User *u, const Anope::string &subcommand)
{
if (u->Account() && u->Account()->IsServicesOper())
- notice_help(Config.s_NickServ, u, NICK_SERVADMIN_HELP_ALIST);
+ notice_help(Config->s_NickServ, u, NICK_SERVADMIN_HELP_ALIST);
else
- notice_help(Config.s_NickServ, u, NICK_HELP_ALIST);
+ notice_help(Config->s_NickServ, u, NICK_HELP_ALIST);
return true;
}
void OnServHelp(User *u)
{
- notice_lang(Config.s_NickServ, u, NICK_HELP_CMD_ALIST);
+ notice_lang(Config->s_NickServ, u, NICK_HELP_CMD_ALIST);
}
};
diff --git a/modules/core/ns_drop.cpp b/modules/core/ns_drop.cpp
index d5758197a..497a375f1 100644
--- a/modules/core/ns_drop.cpp
+++ b/modules/core/ns_drop.cpp
@@ -30,7 +30,7 @@ class CommandNSDrop : public Command
if (readonly)
{
- notice_lang(Config.s_NickServ, u, NICK_DROP_DISABLED);
+ notice_lang(Config->s_NickServ, u, NICK_DROP_DISABLED);
return MOD_CONT;
}
@@ -40,17 +40,17 @@ class CommandNSDrop : public Command
{
if ((nr = findrequestnick(nick)) && u->Account()->IsServicesOper())
{
- if (Config.WallDrop)
+ if (Config->WallDrop)
ircdproto->SendGlobops(NickServ, "\2%s\2 used DROP on \2%s\2", u->nick.c_str(), nick.c_str());
- Alog() << Config.s_NickServ << ": " << u->GetMask() << " dropped nickname " << nr->nick << " (e-mail: " << nr->email << ")";
+ Alog() << Config->s_NickServ << ": " << u->GetMask() << " dropped nickname " << nr->nick << " (e-mail: " << nr->email << ")";
delete nr;
- notice_lang(Config.s_NickServ, u, NICK_X_DROPPED, nick.c_str());
+ notice_lang(Config->s_NickServ, u, NICK_X_DROPPED, nick.c_str());
}
else
- notice_lang(Config.s_NickServ, u, NICK_X_NOT_REGISTERED, nick.c_str());
+ notice_lang(Config->s_NickServ, u, NICK_X_NOT_REGISTERED, nick.c_str());
}
else
- notice_lang(Config.s_NickServ, u, NICK_NOT_REGISTERED);
+ notice_lang(Config->s_NickServ, u, NICK_NOT_REGISTERED);
return MOD_CONT;
}
@@ -59,13 +59,13 @@ class CommandNSDrop : public Command
my_nick = na->nick;
if (!is_mine && !u->Account()->HasPriv("nickserv/drop"))
- notice_lang(Config.s_NickServ, u, ACCESS_DENIED);
- else if (Config.NSSecureAdmins && !is_mine && na->nc->IsServicesOper())
- notice_lang(Config.s_NickServ, u, ACCESS_DENIED);
+ notice_lang(Config->s_NickServ, u, ACCESS_DENIED);
+ else if (Config->NSSecureAdmins && !is_mine && na->nc->IsServicesOper())
+ notice_lang(Config->s_NickServ, u, ACCESS_DENIED);
else
{
if (readonly)
- notice_lang(Config.s_NickServ, u, READ_ONLY_MODE);
+ notice_lang(Config->s_NickServ, u, READ_ONLY_MODE);
if (ircd->sqline && na->HasFlag(NS_FORBIDDEN))
{
@@ -73,23 +73,23 @@ class CommandNSDrop : public Command
ircdproto->SendSQLineDel(&x);
}
- Alog() << Config.s_NickServ << ": " << u->GetMask() << " dropped nickname " << na->nick << " (group " << na->nc->display << ") (e-mail: " << (!na->nc->email.empty() ? na->nc->email : "none") << ")";
+ Alog() << Config->s_NickServ << ": " << u->GetMask() << " dropped nickname " << na->nick << " (group " << na->nc->display << ") (e-mail: " << (!na->nc->email.empty() ? na->nc->email : "none") << ")";
delete na;
FOREACH_MOD(I_OnNickDrop, OnNickDrop(!my_nick.empty() ? my_nick : nick));
if (!is_mine)
{
- if (Config.WallDrop)
+ if (Config->WallDrop)
ircdproto->SendGlobops(NickServ, "\2%s\2 used DROP on \2%s\2", u->nick.c_str(), nick.c_str());
- notice_lang(Config.s_NickServ, u, NICK_X_DROPPED, nick.c_str());
+ notice_lang(Config->s_NickServ, u, NICK_X_DROPPED, nick.c_str());
}
else
{
if (!nick.empty())
- notice_lang(Config.s_NickServ, u, NICK_X_DROPPED, nick.c_str());
+ notice_lang(Config->s_NickServ, u, NICK_X_DROPPED, nick.c_str());
else
- notice_lang(Config.s_NickServ, u, NICK_DROPPED);
+ notice_lang(Config->s_NickServ, u, NICK_DROPPED);
}
}
@@ -99,16 +99,16 @@ class CommandNSDrop : public Command
bool OnHelp(User *u, const Anope::string &subcommand)
{
if (u->Account() && u->Account()->HasPriv("nickserv/drop"))
- notice_help(Config.s_NickServ, u, NICK_SERVADMIN_HELP_DROP);
+ notice_help(Config->s_NickServ, u, NICK_SERVADMIN_HELP_DROP);
else
- notice_help(Config.s_NickServ, u, NICK_HELP_DROP);
+ notice_help(Config->s_NickServ, u, NICK_HELP_DROP);
return true;
}
void OnServHelp(User *u)
{
- notice_lang(Config.s_NickServ, u, NICK_HELP_CMD_DROP);
+ notice_lang(Config->s_NickServ, u, NICK_HELP_CMD_DROP);
}
};
diff --git a/modules/core/ns_forbid.cpp b/modules/core/ns_forbid.cpp
index 511ef3a2f..f10b1f04e 100644
--- a/modules/core/ns_forbid.cpp
+++ b/modules/core/ns_forbid.cpp
@@ -27,24 +27,24 @@ class CommandNSForbid : public Command
Anope::string reason = params.size() > 1 ? params[1] : "";
/* Assumes that permission checking has already been done. */
- if (Config.ForceForbidReason && reason.empty())
+ if (Config->ForceForbidReason && reason.empty())
{
this->OnSyntaxError(u, "");
return MOD_CONT;
}
if (readonly)
- notice_lang(Config.s_NickServ, u, READ_ONLY_MODE);
+ notice_lang(Config->s_NickServ, u, READ_ONLY_MODE);
if (!ircdproto->IsNickValid(nick))
{
- notice_lang(Config.s_NickServ, u, NICK_X_FORBIDDEN, nick.c_str());
+ notice_lang(Config->s_NickServ, u, NICK_X_FORBIDDEN, nick.c_str());
return MOD_CONT;
}
if ((na = findnick(nick)))
{
- if (Config.NSSecureAdmins && na->nc->IsServicesOper())
+ if (Config->NSSecureAdmins && na->nc->IsServicesOper())
{
- notice_lang(Config.s_NickServ, u, ACCESS_DENIED);
+ notice_lang(Config->s_NickServ, u, ACCESS_DENIED);
return MOD_CONT;
}
delete na;
@@ -63,7 +63,7 @@ class CommandNSForbid : public Command
if (curr)
{
- notice_lang(Config.s_NickServ, curr, FORCENICKCHANGE_NOW);
+ notice_lang(Config->s_NickServ, curr, FORCENICKCHANGE_NOW);
curr->Collide(na);
}
@@ -73,36 +73,36 @@ class CommandNSForbid : public Command
ircdproto->SendSQLine(&x);
}
- if (Config.WallForbid)
+ if (Config->WallForbid)
ircdproto->SendGlobops(NickServ, "\2%s\2 used FORBID on \2%s\2", u->nick.c_str(), nick.c_str());
- Alog() << Config.s_NickServ << ": " << u->nick << " set FORBID for nick " << nick;
- notice_lang(Config.s_NickServ, u, NICK_FORBID_SUCCEEDED, nick.c_str());
+ Alog() << Config->s_NickServ << ": " << u->nick << " set FORBID for nick " << nick;
+ notice_lang(Config->s_NickServ, u, NICK_FORBID_SUCCEEDED, nick.c_str());
FOREACH_MOD(I_OnNickForbidden, OnNickForbidden(na));
}
else
{
- Alog() << Config.s_NickServ << ": Valid FORBID for " << nick << " by " << u->nick << " failed";
- notice_lang(Config.s_NickServ, u, NICK_FORBID_FAILED, nick.c_str());
+ Alog() << Config->s_NickServ << ": Valid FORBID for " << nick << " by " << u->nick << " failed";
+ notice_lang(Config->s_NickServ, u, NICK_FORBID_FAILED, nick.c_str());
}
return MOD_CONT;
}
bool OnHelp(User *u, const Anope::string &subcommand)
{
- notice_help(Config.s_NickServ, u, NICK_SERVADMIN_HELP_FORBID);
+ notice_help(Config->s_NickServ, u, NICK_SERVADMIN_HELP_FORBID);
return true;
}
void OnSyntaxError(User *u, const Anope::string &subcommand)
{
- syntax_error(Config.s_NickServ, u, "FORBID", Config.ForceForbidReason ? NICK_FORBID_SYNTAX_REASON : NICK_FORBID_SYNTAX);
+ syntax_error(Config->s_NickServ, u, "FORBID", Config->ForceForbidReason ? NICK_FORBID_SYNTAX_REASON : NICK_FORBID_SYNTAX);
}
void OnServHelp(User *u)
{
- notice_lang(Config.s_NickServ, u, NICK_HELP_CMD_FORBID);
+ notice_lang(Config->s_NickServ, u, NICK_HELP_CMD_FORBID);
}
};
diff --git a/modules/core/ns_getemail.cpp b/modules/core/ns_getemail.cpp
index 3cf795772..dbfb91562 100644
--- a/modules/core/ns_getemail.cpp
+++ b/modules/core/ns_getemail.cpp
@@ -29,7 +29,7 @@ class CommandNSGetEMail : public Command
Anope::string email = params[0];
int j = 0;
- Alog() << Config.s_NickServ << ": " << u->GetMask() << " used GETEMAIL on " << email;
+ Alog() << Config->s_NickServ << ": " << u->GetMask() << " used GETEMAIL on " << email;
for (nickcore_map::const_iterator it = NickCoreList.begin(), it_end = NickCoreList.end(); it != it_end; ++it)
{
@@ -38,13 +38,13 @@ class CommandNSGetEMail : public Command
if (!nc->email.empty() && nc->email.equals_ci(email))
{
++j;
- notice_lang(Config.s_NickServ, u, NICK_GETEMAIL_EMAILS_ARE, nc->display.c_str(), email.c_str());
+ notice_lang(Config->s_NickServ, u, NICK_GETEMAIL_EMAILS_ARE, nc->display.c_str(), email.c_str());
}
}
if (j <= 0)
{
- notice_lang(Config.s_NickServ, u, NICK_GETEMAIL_NOT_USED, email.c_str());
+ notice_lang(Config->s_NickServ, u, NICK_GETEMAIL_NOT_USED, email.c_str());
return MOD_CONT;
}
@@ -53,18 +53,18 @@ class CommandNSGetEMail : public Command
bool OnHelp(User *u, const Anope::string &subcommand)
{
- notice_help(Config.s_NickServ, u, NICK_SERVADMIN_HELP_GETEMAIL);
+ notice_help(Config->s_NickServ, u, NICK_SERVADMIN_HELP_GETEMAIL);
return true;
}
void OnSyntaxError(User *u, const Anope::string &subcommand)
{
- syntax_error(Config.s_NickServ, u, "GETMAIL", NICK_GETEMAIL_SYNTAX);
+ syntax_error(Config->s_NickServ, u, "GETMAIL", NICK_GETEMAIL_SYNTAX);
}
void OnServHelp(User *u)
{
- notice_lang(Config.s_NickServ, u, NICK_HELP_CMD_GETEMAIL);
+ notice_lang(Config->s_NickServ, u, NICK_HELP_CMD_GETEMAIL);
}
};
diff --git a/modules/core/ns_getpass.cpp b/modules/core/ns_getpass.cpp
index e1e16d96b..e4f196d23 100644
--- a/modules/core/ns_getpass.cpp
+++ b/modules/core/ns_getpass.cpp
@@ -31,47 +31,47 @@ class CommandNSGetPass : public Command
{
if ((nr = findrequestnick(nick)))
{
- Alog() << Config.s_NickServ << ": " << u->GetMask() << " used GETPASS on " << nick;
- if (Config.WallGetpass)
+ Alog() << Config->s_NickServ << ": " << u->GetMask() << " used GETPASS on " << nick;
+ if (Config->WallGetpass)
ircdproto->SendGlobops(NickServ, "\2%s\2 used GETPASS on \2%s\2", u->nick.c_str(), nick.c_str());
- notice_lang(Config.s_NickServ, u, NICK_GETPASS_PASSCODE_IS, nick.c_str(), nr->passcode.c_str());
+ notice_lang(Config->s_NickServ, u, NICK_GETPASS_PASSCODE_IS, nick.c_str(), nr->passcode.c_str());
}
else
- notice_lang(Config.s_NickServ, u, NICK_X_NOT_REGISTERED, nick.c_str());
+ notice_lang(Config->s_NickServ, u, NICK_X_NOT_REGISTERED, nick.c_str());
}
else if (na->HasFlag(NS_FORBIDDEN))
- notice_lang(Config.s_NickServ, u, NICK_X_FORBIDDEN, na->nick.c_str());
- else if (Config.NSSecureAdmins && na->nc->IsServicesOper())
- notice_lang(Config.s_NickServ, u, ACCESS_DENIED);
+ notice_lang(Config->s_NickServ, u, NICK_X_FORBIDDEN, na->nick.c_str());
+ else if (Config->NSSecureAdmins && na->nc->IsServicesOper())
+ notice_lang(Config->s_NickServ, u, ACCESS_DENIED);
else
{
if (enc_decrypt(na->nc->pass, tmp_pass) == 1)
{
- Alog() << Config.s_NickServ << ": " << u->GetMask() << " used GETPASS on " << nick;
- if (Config.WallGetpass)
+ Alog() << Config->s_NickServ << ": " << u->GetMask() << " used GETPASS on " << nick;
+ if (Config->WallGetpass)
ircdproto->SendGlobops(NickServ, "\2%s\2 used GETPASS on \2%s\2", u->nick.c_str(), nick.c_str());
- notice_lang(Config.s_NickServ, u, NICK_GETPASS_PASSWORD_IS, nick.c_str(), tmp_pass.c_str());
+ notice_lang(Config->s_NickServ, u, NICK_GETPASS_PASSWORD_IS, nick.c_str(), tmp_pass.c_str());
}
else
- notice_lang(Config.s_NickServ, u, NICK_GETPASS_UNAVAILABLE);
+ notice_lang(Config->s_NickServ, u, NICK_GETPASS_UNAVAILABLE);
}
return MOD_CONT;
}
bool OnHelp(User *u, const Anope::string &subcommand)
{
- notice_help(Config.s_NickServ, u, NICK_SERVADMIN_HELP_GETPASS);
+ notice_help(Config->s_NickServ, u, NICK_SERVADMIN_HELP_GETPASS);
return true;
}
void OnSyntaxError(User *u, const Anope::string &subcommand)
{
- syntax_error(Config.s_NickServ, u, "GETPASS", NICK_GETPASS_SYNTAX);
+ syntax_error(Config->s_NickServ, u, "GETPASS", NICK_GETPASS_SYNTAX);
}
void OnServHelp(User *u)
{
- notice_lang(Config.s_NickServ, u, NICK_HELP_CMD_GETPASS);
+ notice_lang(Config->s_NickServ, u, NICK_HELP_CMD_GETPASS);
}
};
diff --git a/modules/core/ns_ghost.cpp b/modules/core/ns_ghost.cpp
index 9fb82a9d4..9c19b0af7 100644
--- a/modules/core/ns_ghost.cpp
+++ b/modules/core/ns_ghost.cpp
@@ -28,30 +28,30 @@ class CommandNSGhost : public Command
NickAlias *na = findnick(nick);
if (!finduser(nick))
- notice_lang(Config.s_NickServ, u, NICK_X_NOT_IN_USE, nick.c_str());
+ notice_lang(Config->s_NickServ, u, NICK_X_NOT_IN_USE, nick.c_str());
else if (!na)
- notice_lang(Config.s_NickServ, u, NICK_X_NOT_REGISTERED, nick.c_str());
+ notice_lang(Config->s_NickServ, u, NICK_X_NOT_REGISTERED, nick.c_str());
else if (na->HasFlag(NS_FORBIDDEN))
- notice_lang(Config.s_NickServ, u, NICK_X_FORBIDDEN, na->nick.c_str());
+ notice_lang(Config->s_NickServ, u, NICK_X_FORBIDDEN, na->nick.c_str());
else if (na->nc->HasFlag(NI_SUSPENDED))
- notice_lang(Config.s_NickServ, u, NICK_X_SUSPENDED, na->nick.c_str());
+ notice_lang(Config->s_NickServ, u, NICK_X_SUSPENDED, na->nick.c_str());
else if (nick.equals_ci(u->nick))
- notice_lang(Config.s_NickServ, u, NICK_NO_GHOST_SELF);
+ notice_lang(Config->s_NickServ, u, NICK_NO_GHOST_SELF);
else if (!pass.empty())
{
int res = enc_check_password(pass, na->nc->pass);
if (res == 1)
{
Anope::string buf = "GHOST command used by " + u->nick;
- kill_user(Config.s_NickServ, nick, buf);
- notice_lang(Config.s_NickServ, u, NICK_GHOST_KILLED, nick.c_str());
+ kill_user(Config->s_NickServ, nick, buf);
+ notice_lang(Config->s_NickServ, u, NICK_GHOST_KILLED, nick.c_str());
}
else
{
- notice_lang(Config.s_NickServ, u, ACCESS_DENIED);
+ notice_lang(Config->s_NickServ, u, ACCESS_DENIED);
if (!res)
{
- Alog() << Config.s_NickServ << ": GHOST: invalid password for " << nick << " by " << u->GetMask();
+ Alog() << Config->s_NickServ << ": GHOST: invalid password for " << nick << " by " << u->GetMask();
if (bad_password(u))
return MOD_STOP;
}
@@ -62,29 +62,29 @@ class CommandNSGhost : public Command
if (u->Account() == na->nc || (!na->nc->HasFlag(NI_SECURE) && is_on_access(u, na->nc)))
{
Anope::string buf = "GHOST command used by " + u->nick;
- kill_user(Config.s_NickServ, nick, buf);
- notice_lang(Config.s_NickServ, u, NICK_GHOST_KILLED, nick.c_str());
+ kill_user(Config->s_NickServ, nick, buf);
+ notice_lang(Config->s_NickServ, u, NICK_GHOST_KILLED, nick.c_str());
}
else
- notice_lang(Config.s_NickServ, u, ACCESS_DENIED);
+ notice_lang(Config->s_NickServ, u, ACCESS_DENIED);
}
return MOD_CONT;
}
bool OnHelp(User *u, const Anope::string &subcommand)
{
- notice_help(Config.s_NickServ, u, NICK_HELP_GHOST);
+ notice_help(Config->s_NickServ, u, NICK_HELP_GHOST);
return true;
}
void OnSyntaxError(User *u, const Anope::string &subcommand)
{
- syntax_error(Config.s_NickServ, u, "GHOST", NICK_GHOST_SYNTAX);
+ syntax_error(Config->s_NickServ, u, "GHOST", NICK_GHOST_SYNTAX);
}
void OnServHelp(User *u)
{
- notice_lang(Config.s_NickServ, u, NICK_HELP_CMD_GHOST);
+ notice_lang(Config->s_NickServ, u, NICK_HELP_CMD_GHOST);
}
};
diff --git a/modules/core/ns_group.cpp b/modules/core/ns_group.cpp
index 574b5ae39..915915af3 100644
--- a/modules/core/ns_group.cpp
+++ b/modules/core/ns_group.cpp
@@ -28,62 +28,62 @@ class CommandNSGroup : public Command
Anope::string pass = params[1];
std::list<std::pair<Anope::string, Anope::string> >::iterator it, it_end;
- if (Config.NSEmailReg && findrequestnick(u->nick))
+ if (Config->NSEmailReg && findrequestnick(u->nick))
{
- notice_lang(Config.s_NickServ, u, NICK_REQUESTED);
+ notice_lang(Config->s_NickServ, u, NICK_REQUESTED);
return MOD_CONT;
}
if (readonly)
{
- notice_lang(Config.s_NickServ, u, NICK_GROUP_DISABLED);
+ notice_lang(Config->s_NickServ, u, NICK_GROUP_DISABLED);
return MOD_CONT;
}
if (!ircdproto->IsNickValid(u->nick))
{
- notice_lang(Config.s_NickServ, u, NICK_X_FORBIDDEN, u->nick.c_str());
+ notice_lang(Config->s_NickServ, u, NICK_X_FORBIDDEN, u->nick.c_str());
return MOD_CONT;
}
- if (Config.RestrictOperNicks)
- for (it = Config.Opers.begin(), it_end = Config.Opers.end(); it != it_end; ++it)
+ if (Config->RestrictOperNicks)
+ for (it = Config->Opers.begin(), it_end = Config->Opers.end(); it != it_end; ++it)
if (!is_oper(u) && u->nick.find_ci(it->first) != Anope::string::npos)
{
- notice_lang(Config.s_NickServ, u, NICK_CANNOT_BE_REGISTERED, u->nick.c_str());
+ notice_lang(Config->s_NickServ, u, NICK_CANNOT_BE_REGISTERED, u->nick.c_str());
return MOD_CONT;
}
na = findnick(u->nick);
if (!(target = findnick(nick)))
- notice_lang(Config.s_NickServ, u, NICK_X_NOT_REGISTERED, nick.c_str());
- else if (time(NULL) < u->lastnickreg + Config.NSRegDelay)
- notice_lang(Config.s_NickServ, u, NICK_GROUP_PLEASE_WAIT, (Config.NSRegDelay + u->lastnickreg) - time(NULL));
+ notice_lang(Config->s_NickServ, u, NICK_X_NOT_REGISTERED, nick.c_str());
+ else if (time(NULL) < u->lastnickreg + Config->NSRegDelay)
+ notice_lang(Config->s_NickServ, u, NICK_GROUP_PLEASE_WAIT, (Config->NSRegDelay + u->lastnickreg) - time(NULL));
else if (u->Account() && u->Account()->HasFlag(NI_SUSPENDED))
{
- Alog() << Config.s_NickServ << ": " << u->GetMask() << " tried to use GROUP from SUSPENDED nick " << target->nick;
- notice_lang(Config.s_NickServ, u, NICK_X_SUSPENDED, u->nick.c_str());
+ Alog() << Config->s_NickServ << ": " << u->GetMask() << " tried to use GROUP from SUSPENDED nick " << target->nick;
+ notice_lang(Config->s_NickServ, u, NICK_X_SUSPENDED, u->nick.c_str());
}
else if (target && target->nc->HasFlag(NI_SUSPENDED))
{
- Alog() << Config.s_NickServ << ": " << u->GetMask() << " tried to use GROUP for SUSPENDED nick " << target->nick;
- notice_lang(Config.s_NickServ, u, NICK_X_SUSPENDED, target->nick.c_str());
+ Alog() << Config->s_NickServ << ": " << u->GetMask() << " tried to use GROUP for SUSPENDED nick " << target->nick;
+ notice_lang(Config->s_NickServ, u, NICK_X_SUSPENDED, target->nick.c_str());
}
else if (target->HasFlag(NS_FORBIDDEN))
- notice_lang(Config.s_NickServ, u, NICK_X_FORBIDDEN, nick.c_str());
+ notice_lang(Config->s_NickServ, u, NICK_X_FORBIDDEN, nick.c_str());
else if (na && target->nc == na->nc)
- notice_lang(Config.s_NickServ, u, NICK_GROUP_SAME, target->nick.c_str());
+ notice_lang(Config->s_NickServ, u, NICK_GROUP_SAME, target->nick.c_str());
else if (na && na->nc != u->Account())
- notice_lang(Config.s_NickServ, u, NICK_IDENTIFY_REQUIRED, Config.s_NickServ.c_str());
- else if (Config.NSMaxAliases && (target->nc->aliases.size() >= Config.NSMaxAliases) && !target->nc->IsServicesOper())
- notice_lang(Config.s_NickServ, u, NICK_GROUP_TOO_MANY, target->nick.c_str(), Config.s_NickServ.c_str(), Config.s_NickServ.c_str());
+ notice_lang(Config->s_NickServ, u, NICK_IDENTIFY_REQUIRED, Config->s_NickServ.c_str());
+ else if (Config->NSMaxAliases && (target->nc->aliases.size() >= Config->NSMaxAliases) && !target->nc->IsServicesOper())
+ notice_lang(Config->s_NickServ, u, NICK_GROUP_TOO_MANY, target->nick.c_str(), Config->s_NickServ.c_str(), Config->s_NickServ.c_str());
else
{
int res = enc_check_password(pass, target->nc->pass);
if (res == -1)
{
- Alog() << Config.s_NickServ << ": Failed GROUP for " << u->GetMask() << " (invalid password)";
- notice_lang(Config.s_NickServ, u, PASSWORD_INCORRECT);
+ Alog() << Config->s_NickServ << ": Failed GROUP for " << u->GetMask() << " (invalid password)";
+ notice_lang(Config->s_NickServ, u, PASSWORD_INCORRECT);
if (bad_password(u))
return MOD_STOP;
}
@@ -96,12 +96,12 @@ class CommandNSGroup : public Command
delete na;
else
{
- size_t prefixlen = Config.NSGuestNickPrefix.length();
+ size_t prefixlen = Config->NSGuestNickPrefix.length();
size_t nicklen = u->nick.length();
- if (nicklen <= prefixlen + 7 && nicklen >= prefixlen + 1 && !u->nick.find_ci(Config.NSGuestNickPrefix) && !u->nick.substr(prefixlen).find_first_not_of("1234567890"))
+ if (nicklen <= prefixlen + 7 && nicklen >= prefixlen + 1 && !u->nick.find_ci(Config->NSGuestNickPrefix) && !u->nick.substr(prefixlen).find_first_not_of("1234567890"))
{
- notice_lang(Config.s_NickServ, u, NICK_CANNOT_BE_REGISTERED, u->nick.c_str());
+ notice_lang(Config->s_NickServ, u, NICK_CANNOT_BE_REGISTERED, u->nick.c_str());
return MOD_CONT;
}
}
@@ -119,9 +119,9 @@ class CommandNSGroup : public Command
FOREACH_MOD(I_OnNickGroup, OnNickGroup(u, target));
ircdproto->SetAutoIdentificationToken(u);
- Alog() << Config.s_NickServ << ": " << u->GetMask() << " makes " << u->nick << " join group of " << target->nick << " (" << target->nc->display << ") (e-mail: " <<
+ Alog() << Config->s_NickServ << ": " << u->GetMask() << " makes " << u->nick << " join group of " << target->nick << " (" << target->nc->display << ") (e-mail: " <<
(!target->nc->email.empty() ? target->nc->email : "none") << ")";
- notice_lang(Config.s_NickServ, u, NICK_GROUP_JOINED, target->nick.c_str());
+ notice_lang(Config->s_NickServ, u, NICK_GROUP_JOINED, target->nick.c_str());
u->lastnickreg = time(NULL);
@@ -129,8 +129,8 @@ class CommandNSGroup : public Command
}
else
{
- Alog() << Config.s_NickServ << ": makealias(" << u->nick << ") failed";
- notice_lang(Config.s_NickServ, u, NICK_GROUP_FAILED);
+ Alog() << Config->s_NickServ << ": makealias(" << u->nick << ") failed";
+ notice_lang(Config->s_NickServ, u, NICK_GROUP_FAILED);
}
}
}
@@ -139,18 +139,18 @@ class CommandNSGroup : public Command
bool OnHelp(User *u, const Anope::string &subcommand)
{
- notice_help(Config.s_NickServ, u, NICK_HELP_GROUP);
+ notice_help(Config->s_NickServ, u, NICK_HELP_GROUP);
return true;
}
void OnSyntaxError(User *u, const Anope::string &subcommand)
{
- syntax_error(Config.s_NickServ, u, "GROUP", NICK_GROUP_SYNTAX);
+ syntax_error(Config->s_NickServ, u, "GROUP", NICK_GROUP_SYNTAX);
}
void OnServHelp(User *u)
{
- notice_lang(Config.s_NickServ, u, NICK_HELP_CMD_GROUP);
+ notice_lang(Config->s_NickServ, u, NICK_HELP_CMD_GROUP);
}
};
@@ -167,11 +167,11 @@ class CommandNSUngroup : public Command
NickAlias *na = findnick(!nick.empty() ? nick : u->nick);
if (u->Account()->aliases.size() == 1)
- notice_lang(Config.s_NickServ, u, NICK_UNGROUP_ONE_NICK);
+ notice_lang(Config->s_NickServ, u, NICK_UNGROUP_ONE_NICK);
else if (!na)
- notice_lang(Config.s_NickServ, u, NICK_X_NOT_REGISTERED, !nick.empty() ? nick.c_str() : u->nick.c_str());
+ notice_lang(Config->s_NickServ, u, NICK_X_NOT_REGISTERED, !nick.empty() ? nick.c_str() : u->nick.c_str());
else if (na->nc != u->Account())
- notice_lang(Config.s_NickServ, u, NICK_UNGROUP_NOT_IN_GROUP, na->nick.c_str());
+ notice_lang(Config->s_NickServ, u, NICK_UNGROUP_NOT_IN_GROUP, na->nick.c_str());
else
{
NickCore *oldcore = na->nc;
@@ -193,7 +193,7 @@ class CommandNSUngroup : public Command
na->nc->greet = oldcore->greet;
na->nc->language = oldcore->language;
- notice_lang(Config.s_NickServ, u, NICK_UNGROUP_SUCCESSFUL, na->nick.c_str(), oldcore->display.c_str());
+ notice_lang(Config->s_NickServ, u, NICK_UNGROUP_SUCCESSFUL, na->nick.c_str(), oldcore->display.c_str());
User *user = finduser(na->nick);
if (user)
@@ -206,13 +206,13 @@ class CommandNSUngroup : public Command
bool OnHelp(User *u, const Anope::string &subcommand)
{
- notice_help(Config.s_NickServ, u, NICK_HELP_UNGROUP);
+ notice_help(Config->s_NickServ, u, NICK_HELP_UNGROUP);
return true;
}
void OnServHelp(User *u)
{
- notice_lang(Config.s_NickServ, u, NICK_HELP_CMD_UNGROUP);
+ notice_lang(Config->s_NickServ, u, NICK_HELP_CMD_UNGROUP);
}
};
@@ -230,9 +230,9 @@ class CommandNSGList : public Command
const NickCore *nc = u->Account();
if (!nick.empty() && (!nick.equals_ci(u->nick) && !u->Account()->IsServicesOper()))
- notice_lang(Config.s_NickServ, u, ACCESS_DENIED, Config.s_NickServ.c_str());
+ notice_lang(Config->s_NickServ, u, ACCESS_DENIED, Config->s_NickServ.c_str());
else if (!nick.empty() && (!findnick(nick) || !(nc = findnick(nick)->nc)))
- notice_lang(Config.s_NickServ, u, nick.empty() ? NICK_NOT_REGISTERED : NICK_X_NOT_REGISTERED, nick.c_str());
+ notice_lang(Config->s_NickServ, u, nick.empty() ? NICK_NOT_REGISTERED : NICK_X_NOT_REGISTERED, nick.c_str());
else
{
time_t expt;
@@ -240,20 +240,20 @@ class CommandNSGList : public Command
char buf[BUFSIZE];
int wont_expire;
- notice_lang(Config.s_NickServ, u, !nick.empty() ? NICK_GLIST_HEADER_X : NICK_GLIST_HEADER, nc->display.c_str());
+ notice_lang(Config->s_NickServ, u, !nick.empty() ? NICK_GLIST_HEADER_X : NICK_GLIST_HEADER, nc->display.c_str());
for (std::list<NickAlias *>::const_iterator it = nc->aliases.begin(), it_end = nc->aliases.end(); it != it_end; ++it)
{
NickAlias *na2 = *it;
if (!(wont_expire = na2->HasFlag(NS_NO_EXPIRE)))
{
- expt = na2->last_seen + Config.NSExpire;
+ expt = na2->last_seen + Config->NSExpire;
tm = localtime(&expt);
strftime_lang(buf, sizeof(buf), finduser(na2->nick), STRFTIME_DATE_TIME_FORMAT, tm);
}
- notice_lang(Config.s_NickServ, u, wont_expire ? NICK_GLIST_REPLY_NOEXPIRE : NICK_GLIST_REPLY, na2->nick.c_str(), buf);
+ notice_lang(Config->s_NickServ, u, wont_expire ? NICK_GLIST_REPLY_NOEXPIRE : NICK_GLIST_REPLY, na2->nick.c_str(), buf);
}
- notice_lang(Config.s_NickServ, u, NICK_GLIST_FOOTER, nc->aliases.size());
+ notice_lang(Config->s_NickServ, u, NICK_GLIST_FOOTER, nc->aliases.size());
}
return MOD_CONT;
}
@@ -261,16 +261,16 @@ class CommandNSGList : public Command
bool OnHelp(User *u, const Anope::string &subcommand)
{
if (u->Account() && u->Account()->IsServicesOper())
- notice_help(Config.s_NickServ, u, NICK_SERVADMIN_HELP_GLIST);
+ notice_help(Config->s_NickServ, u, NICK_SERVADMIN_HELP_GLIST);
else
- notice_help(Config.s_NickServ, u, NICK_HELP_GLIST);
+ notice_help(Config->s_NickServ, u, NICK_HELP_GLIST);
return true;
}
void OnServHelp(User *u)
{
- notice_lang(Config.s_NickServ, u, NICK_HELP_CMD_GLIST);
+ notice_lang(Config->s_NickServ, u, NICK_HELP_CMD_GLIST);
}
};
diff --git a/modules/core/ns_help.cpp b/modules/core/ns_help.cpp
index 1ece4bc00..7dad067b9 100644
--- a/modules/core/ns_help.cpp
+++ b/modules/core/ns_help.cpp
@@ -28,9 +28,9 @@ class CommandNSHelp : public Command
if (cmd.equals_ci("SET LANGUAGE"))
{
int i;
- notice_help(Config.s_NickServ, u, NICK_HELP_SET_LANGUAGE);
+ notice_help(Config->s_NickServ, u, NICK_HELP_SET_LANGUAGE);
for (i = 0; i < NUM_LANGS && langlist[i] >= 0; ++i)
- u->SendMessage(Config.s_NickServ, " %2d) %s", i + 1, langnames[langlist[i]]);
+ u->SendMessage(Config->s_NickServ, " %2d) %s", i + 1, langnames[langlist[i]]);
}
else
mod_help_cmd(NickServ, u, cmd);
@@ -40,15 +40,15 @@ class CommandNSHelp : public Command
void OnSyntaxError(User *u, const Anope::string &subcommand)
{
- notice_help(Config.s_NickServ, u, NICK_HELP);
+ notice_help(Config->s_NickServ, u, NICK_HELP);
for (CommandMap::const_iterator it = NickServ->Commands.begin(), it_end = NickServ->Commands.end(); it != it_end; ++it)
- if (!Config.HidePrivilegedCommands || it->second->permission.empty() || (u->Account() && u->Account()->HasCommand(it->second->permission)))
+ if (!Config->HidePrivilegedCommands || it->second->permission.empty() || (u->Account() && u->Account()->HasCommand(it->second->permission)))
it->second->OnServHelp(u);
if (u->Account() && u->Account()->IsServicesOper())
- notice_help(Config.s_NickServ, u, NICK_SERVADMIN_HELP);
- if (Config.NSExpire >= 86400)
- notice_help(Config.s_NickServ, u, NICK_HELP_EXPIRES, Config.NSExpire / 86400);
- notice_help(Config.s_NickServ, u, NICK_HELP_FOOTER);
+ notice_help(Config->s_NickServ, u, NICK_SERVADMIN_HELP);
+ if (Config->NSExpire >= 86400)
+ notice_help(Config->s_NickServ, u, NICK_HELP_EXPIRES, Config->NSExpire / 86400);
+ notice_help(Config->s_NickServ, u, NICK_HELP_FOOTER);
}
};
diff --git a/modules/core/ns_identify.cpp b/modules/core/ns_identify.cpp
index db9a70a55..6746a6e02 100644
--- a/modules/core/ns_identify.cpp
+++ b/modules/core/ns_identify.cpp
@@ -31,36 +31,36 @@ class CommandNSIdentify : public Command
if (!(na = findnick(u->nick)))
{
if ((nr = findrequestnick(u->nick)))
- notice_lang(Config.s_NickServ, u, NICK_IS_PREREG);
+ notice_lang(Config->s_NickServ, u, NICK_IS_PREREG);
else
- notice_lang(Config.s_NickServ, u, NICK_NOT_REGISTERED);
+ notice_lang(Config->s_NickServ, u, NICK_NOT_REGISTERED);
}
else if (na->HasFlag(NS_FORBIDDEN))
- notice_lang(Config.s_NickServ, u, NICK_X_FORBIDDEN, na->nick.c_str());
+ notice_lang(Config->s_NickServ, u, NICK_X_FORBIDDEN, na->nick.c_str());
else if (na->nc->HasFlag(NI_SUSPENDED))
- notice_lang(Config.s_NickServ, u, NICK_X_SUSPENDED, na->nick.c_str());
+ notice_lang(Config->s_NickServ, u, NICK_X_SUSPENDED, na->nick.c_str());
/* You can now identify for other nicks without logging out first,
* however you can not identify again for the group you're already
* identified as
*/
else if (u->Account() && u->Account() == na->nc)
- notice_lang(Config.s_NickServ, u, NICK_ALREADY_IDENTIFIED);
+ notice_lang(Config->s_NickServ, u, NICK_ALREADY_IDENTIFIED);
else
{
res = enc_check_password(pass, na->nc->pass);
if (!res)
{
- Alog() << Config.s_NickServ << ": Failed IDENTIFY for " << u->nick << "!" << u->GetIdent() << "@" << u->host;
- notice_lang(Config.s_NickServ, u, PASSWORD_INCORRECT);
+ Alog() << Config->s_NickServ << ": Failed IDENTIFY for " << u->nick << "!" << u->GetIdent() << "@" << u->host;
+ notice_lang(Config->s_NickServ, u, PASSWORD_INCORRECT);
if (bad_password(u))
return MOD_STOP;
}
else if (res == -1)
- notice_lang(Config.s_NickServ, u, NICK_IDENTIFY_FAILED);
+ notice_lang(Config->s_NickServ, u, NICK_IDENTIFY_FAILED);
else
{
if (u->IsIdentified())
- Alog() << Config.s_NickServ << ": " << u->GetMask() << " logged out of account " << u->Account()->display;
+ Alog() << Config->s_NickServ << ": " << u->GetMask() << " logged out of account " << u->Account()->display;
na->last_realname = u->realname;
na->last_seen = time(NULL);
@@ -73,17 +73,17 @@ class CommandNSIdentify : public Command
FOREACH_MOD(I_OnNickIdentify, OnNickIdentify(u));
- Alog() << Config.s_NickServ << ": " << u->GetMask() << " identified for account " << u->Account()->display;
- notice_lang(Config.s_NickServ, u, NICK_IDENTIFY_SUCCEEDED);
+ Alog() << Config->s_NickServ << ": " << u->GetMask() << " identified for account " << u->Account()->display;
+ notice_lang(Config->s_NickServ, u, NICK_IDENTIFY_SUCCEEDED);
if (ircd->vhost)
do_on_id(u);
- if (Config.NSModeOnID)
+ if (Config->NSModeOnID)
do_setmodes(u);
- if (Config.NSForceEmail && u->Account() && u->Account()->email.empty())
+ if (Config->NSForceEmail && u->Account() && u->Account()->email.empty())
{
- notice_lang(Config.s_NickServ, u, NICK_IDENTIFY_EMAIL_REQUIRED);
- notice_help(Config.s_NickServ, u, NICK_IDENTIFY_EMAIL_HOWTO);
+ notice_lang(Config->s_NickServ, u, NICK_IDENTIFY_EMAIL_REQUIRED);
+ notice_help(Config->s_NickServ, u, NICK_IDENTIFY_EMAIL_HOWTO);
}
if (u->IsIdentified())
@@ -95,19 +95,19 @@ class CommandNSIdentify : public Command
bool OnHelp(User *u, const Anope::string &subcommand)
{
- notice_help(Config.s_NickServ, u, NICK_HELP_IDENTIFY);
+ notice_help(Config->s_NickServ, u, NICK_HELP_IDENTIFY);
return true;
}
void OnSyntaxError(User *u, const Anope::string &subcommand)
{
- syntax_error(Config.s_NickServ, u, "IDENTIFY", NICK_IDENTIFY_SYNTAX);
+ syntax_error(Config->s_NickServ, u, "IDENTIFY", NICK_IDENTIFY_SYNTAX);
}
void OnServHelp(User *u)
{
if (this->name.equals_ci("IDENTIFY"))
- notice_lang(Config.s_NickServ, u, NICK_HELP_CMD_IDENTIFY);
+ notice_lang(Config->s_NickServ, u, NICK_HELP_CMD_IDENTIFY);
}
};
diff --git a/modules/core/ns_info.cpp b/modules/core/ns_info.cpp
index abdcb80a6..c6c1aa2a4 100644
--- a/modules/core/ns_info.cpp
+++ b/modules/core/ns_info.cpp
@@ -46,21 +46,21 @@ class CommandNSInfo : public Command
NickRequest *nr = findrequestnick(nick);
if (nr)
{
- notice_lang(Config.s_NickServ, u, NICK_IS_PREREG);
+ notice_lang(Config->s_NickServ, u, NICK_IS_PREREG);
if (has_auspex)
- notice_lang(Config.s_NickServ, u, NICK_INFO_EMAIL, nr->email.c_str());
+ notice_lang(Config->s_NickServ, u, NICK_INFO_EMAIL, nr->email.c_str());
}
else if (nickIsServices(nick, true))
- notice_lang(Config.s_NickServ, u, NICK_X_IS_SERVICES, nick.c_str());
+ notice_lang(Config->s_NickServ, u, NICK_X_IS_SERVICES, nick.c_str());
else
- notice_lang(Config.s_NickServ, u, NICK_X_NOT_REGISTERED, nick.c_str());
+ notice_lang(Config->s_NickServ, u, NICK_X_NOT_REGISTERED, nick.c_str());
}
else if (na->HasFlag(NS_FORBIDDEN))
{
if (is_oper(u) && !na->last_usermask.empty())
- notice_lang(Config.s_NickServ, u, NICK_X_FORBIDDEN_OPER, nick.c_str(), na->last_usermask.c_str(), !na->last_realname.empty() ? na->last_realname.c_str() : getstring(u, NO_REASON));
+ notice_lang(Config->s_NickServ, u, NICK_X_FORBIDDEN_OPER, nick.c_str(), na->last_usermask.c_str(), !na->last_realname.empty() ? na->last_realname.c_str() : getstring(u, NO_REASON));
else
- notice_lang(Config.s_NickServ, u, NICK_X_FORBIDDEN, nick.c_str());
+ notice_lang(Config->s_NickServ, u, NICK_X_FORBIDDEN, nick.c_str());
}
else
{
@@ -77,52 +77,52 @@ class CommandNSInfo : public Command
if (has_auspex || (u->Account() && na->nc == u->Account()))
show_hidden = true;
- notice_lang(Config.s_NickServ, u, NICK_INFO_REALNAME, na->nick.c_str(), na->last_realname.c_str());
+ notice_lang(Config->s_NickServ, u, NICK_INFO_REALNAME, na->nick.c_str(), na->last_realname.c_str());
if (na->nc->IsServicesOper() && (show_hidden || !na->nc->HasFlag(NI_HIDE_STATUS)))
- notice_lang(Config.s_NickServ, u, NICK_INFO_SERVICES_OPERTYPE, na->nick.c_str(), na->nc->ot->GetName().c_str());
+ notice_lang(Config->s_NickServ, u, NICK_INFO_SERVICES_OPERTYPE, na->nick.c_str(), na->nc->ot->GetName().c_str());
if (nick_online)
{
if (show_hidden || !na->nc->HasFlag(NI_HIDE_MASK))
- notice_lang(Config.s_NickServ, u, NICK_INFO_ADDRESS_ONLINE, na->last_usermask.c_str());
+ notice_lang(Config->s_NickServ, u, NICK_INFO_ADDRESS_ONLINE, na->last_usermask.c_str());
else
- notice_lang(Config.s_NickServ, u, NICK_INFO_ADDRESS_ONLINE_NOHOST, na->nick.c_str());
+ notice_lang(Config->s_NickServ, u, NICK_INFO_ADDRESS_ONLINE_NOHOST, na->nick.c_str());
}
else
{
if (show_hidden || !na->nc->HasFlag(NI_HIDE_MASK))
- notice_lang(Config.s_NickServ, u, NICK_INFO_ADDRESS, na->last_usermask.c_str());
+ notice_lang(Config->s_NickServ, u, NICK_INFO_ADDRESS, na->last_usermask.c_str());
}
tm = localtime(&na->time_registered);
strftime_lang(buf, sizeof(buf), u, STRFTIME_DATE_TIME_FORMAT, tm);
- notice_lang(Config.s_NickServ, u, NICK_INFO_TIME_REGGED, buf);
+ notice_lang(Config->s_NickServ, u, NICK_INFO_TIME_REGGED, buf);
if (!nick_online)
{
tm = localtime(&na->last_seen);
strftime_lang(buf, sizeof(buf), u, STRFTIME_DATE_TIME_FORMAT, tm);
- notice_lang(Config.s_NickServ, u, NICK_INFO_LAST_SEEN, buf);
+ notice_lang(Config->s_NickServ, u, NICK_INFO_LAST_SEEN, buf);
}
if (!na->last_quit.empty() && (show_hidden || !na->nc->HasFlag(NI_HIDE_QUIT)))
- notice_lang(Config.s_NickServ, u, NICK_INFO_LAST_QUIT, na->last_quit.c_str());
+ notice_lang(Config->s_NickServ, u, NICK_INFO_LAST_QUIT, na->last_quit.c_str());
if (!na->nc->email.empty() && (show_hidden || !na->nc->HasFlag(NI_HIDE_EMAIL)))
- notice_lang(Config.s_NickServ, u, NICK_INFO_EMAIL, na->nc->email.c_str());
+ notice_lang(Config->s_NickServ, u, NICK_INFO_EMAIL, na->nc->email.c_str());
if (show_hidden)
{
- if (!Config.s_HostServ.empty() && ircd->vhost && na->hostinfo.HasVhost())
+ if (!Config->s_HostServ.empty() && ircd->vhost && na->hostinfo.HasVhost())
{
if (ircd->vident && !na->hostinfo.GetIdent().empty())
- notice_lang(Config.s_NickServ, u, NICK_INFO_VHOST2, na->hostinfo.GetIdent().c_str(), na->hostinfo.GetHost().c_str());
+ notice_lang(Config->s_NickServ, u, NICK_INFO_VHOST2, na->hostinfo.GetIdent().c_str(), na->hostinfo.GetHost().c_str());
else
- notice_lang(Config.s_NickServ, u, NICK_INFO_VHOST, na->hostinfo.GetHost().c_str());
+ notice_lang(Config->s_NickServ, u, NICK_INFO_VHOST, na->hostinfo.GetHost().c_str());
}
if (!na->nc->greet.empty())
- notice_lang(Config.s_NickServ, u, NICK_INFO_GREET, na->nc->greet.c_str());
+ notice_lang(Config->s_NickServ, u, NICK_INFO_GREET, na->nc->greet.c_str());
Anope::string optbuf;
@@ -132,24 +132,24 @@ class CommandNSInfo : public Command
CheckOptStr(optbuf, NI_MSG, getstring(u, NICK_INFO_OPT_MSG), na->nc);
CheckOptStr(optbuf, NI_AUTOOP, getstring(u, NICK_INFO_OPT_AUTOOP), na->nc);
- notice_lang(Config.s_NickServ, u, NICK_INFO_OPTIONS, optbuf.empty() ? getstring(u, NICK_INFO_OPT_NONE) : optbuf.c_str());
+ notice_lang(Config->s_NickServ, u, NICK_INFO_OPTIONS, optbuf.empty() ? getstring(u, NICK_INFO_OPT_NONE) : optbuf.c_str());
if (na->nc->HasFlag(NI_SUSPENDED))
{
if (!na->last_quit.empty())
- notice_lang(Config.s_NickServ, u, NICK_INFO_SUSPENDED, na->last_quit.c_str());
+ notice_lang(Config->s_NickServ, u, NICK_INFO_SUSPENDED, na->last_quit.c_str());
else
- notice_lang(Config.s_NickServ, u, NICK_INFO_SUSPENDED_NO_REASON);
+ notice_lang(Config->s_NickServ, u, NICK_INFO_SUSPENDED_NO_REASON);
}
if (na->HasFlag(NS_NO_EXPIRE))
- notice_lang(Config.s_NickServ, u, NICK_INFO_NO_EXPIRE);
+ notice_lang(Config->s_NickServ, u, NICK_INFO_NO_EXPIRE);
else
{
- expt = na->last_seen + Config.NSExpire;
+ expt = na->last_seen + Config->NSExpire;
tm = localtime(&expt);
strftime_lang(buf, sizeof(buf), finduser(na->nick), STRFTIME_DATE_TIME_FORMAT, tm);
- notice_lang(Config.s_NickServ, u, NICK_INFO_EXPIRE, buf);
+ notice_lang(Config->s_NickServ, u, NICK_INFO_EXPIRE, buf);
}
}
@@ -160,19 +160,19 @@ class CommandNSInfo : public Command
bool OnHelp(User *u, const Anope::string &subcommand)
{
- notice_help(Config.s_NickServ, u, NICK_HELP_INFO);
+ notice_help(Config->s_NickServ, u, NICK_HELP_INFO);
return true;
}
void OnSyntaxError(User *u, const Anope::string &subcommand)
{
- syntax_error(Config.s_NickServ, u, "INFO", NICK_INFO_SYNTAX);
+ syntax_error(Config->s_NickServ, u, "INFO", NICK_INFO_SYNTAX);
}
void OnServHelp(User *u)
{
- notice_lang(Config.s_NickServ, u, NICK_HELP_CMD_INFO);
+ notice_lang(Config->s_NickServ, u, NICK_HELP_CMD_INFO);
}
};
diff --git a/modules/core/ns_list.cpp b/modules/core/ns_list.cpp
index 680d332e0..3ba44c77e 100644
--- a/modules/core/ns_list.cpp
+++ b/modules/core/ns_list.cpp
@@ -47,9 +47,9 @@ class CommandNSList : public Command
suspended = nsnoexpire = forbidden = unconfirmed = false;
- if (Config.NSListOpersOnly && !is_oper(u)) /* reverse the help logic */
+ if (Config->NSListOpersOnly && !is_oper(u)) /* reverse the help logic */
{
- notice_lang(Config.s_NickServ, u, ACCESS_DENIED);
+ notice_lang(Config->s_NickServ, u, ACCESS_DENIED);
return MOD_STOP;
}
@@ -58,24 +58,24 @@ class CommandNSList : public Command
Anope::string tmp = myStrGetToken(pattern.substr(1), '-', 0); /* Read FROM out */
if (tmp.empty())
{
- notice_lang(Config.s_NickServ, u, LIST_INCORRECT_RANGE);
+ notice_lang(Config->s_NickServ, u, LIST_INCORRECT_RANGE);
return MOD_CONT;
}
if (!tmp.is_number_only())
{
- notice_lang(Config.s_NickServ, u, LIST_INCORRECT_RANGE);
+ notice_lang(Config->s_NickServ, u, LIST_INCORRECT_RANGE);
return MOD_CONT;
}
from = convertTo<int>(tmp);
tmp = myStrGetTokenRemainder(pattern, '-', 1); /* Read TO out */
if (tmp.empty())
{
- notice_lang(Config.s_NickServ, u, LIST_INCORRECT_RANGE);
+ notice_lang(Config->s_NickServ, u, LIST_INCORRECT_RANGE);
return MOD_CONT;
}
if (!tmp.is_number_only())
{
- notice_lang(Config.s_NickServ, u, LIST_INCORRECT_RANGE);
+ notice_lang(Config->s_NickServ, u, LIST_INCORRECT_RANGE);
return MOD_CONT;
}
to = convertTo<int>(tmp);
@@ -103,7 +103,7 @@ class CommandNSList : public Command
mync = u->Account();
- notice_lang(Config.s_NickServ, u, NICK_LIST_HEADER, pattern.c_str());
+ notice_lang(Config->s_NickServ, u, NICK_LIST_HEADER, pattern.c_str());
if (!unconfirmed)
{
for (nickalias_map::const_iterator it = NickAliasList.begin(), it_end = NickAliasList.end(); it != it_end; ++it)
@@ -128,7 +128,7 @@ class CommandNSList : public Command
snprintf(buf, sizeof(buf), "%s!%s", na->nick.c_str(), !na->last_usermask.empty() && !na->HasFlag(NS_FORBIDDEN) ? na->last_usermask.c_str() : "*@*");
if (na->nick.equals_ci(pattern) || Anope::Match(buf, pattern))
{
- if (((count + 1 >= from && count + 1 <= to) || (!from && !to)) && ++nnicks <= Config.NSListMax)
+ if (((count + 1 >= from && count + 1 <= to) || (!from && !to)) && ++nnicks <= Config->NSListMax)
{
if (is_servadmin && na->HasFlag(NS_NO_EXPIRE))
noexpire_char = '!';
@@ -142,7 +142,7 @@ class CommandNSList : public Command
snprintf(buf, sizeof(buf), "%-20s [Suspended]", na->nick.c_str());
else
snprintf(buf, sizeof(buf), "%-20s %s", na->nick.c_str(), na->last_usermask.c_str());
- u->SendMessage(Config.s_NickServ, " %c%s", noexpire_char, buf);
+ u->SendMessage(Config->s_NickServ, " %c%s", noexpire_char, buf);
}
++count;
}
@@ -158,23 +158,23 @@ class CommandNSList : public Command
NickRequest *nr = it->second;
snprintf(buf, sizeof(buf), "%s!*@*", nr->nick.c_str());
- if ((nr->nick.equals_ci(pattern) || Anope::Match(buf, pattern)) && ++nnicks <= Config.NSListMax)
+ if ((nr->nick.equals_ci(pattern) || Anope::Match(buf, pattern)) && ++nnicks <= Config->NSListMax)
{
snprintf(buf, sizeof(buf), "%-20s [UNCONFIRMED]", nr->nick.c_str());
- u->SendMessage(Config.s_NickServ, " %c%s", noexpire_char, buf);
+ u->SendMessage(Config->s_NickServ, " %c%s", noexpire_char, buf);
}
}
}
- notice_lang(Config.s_NickServ, u, NICK_LIST_RESULTS, nnicks > Config.NSListMax ? Config.NSListMax : nnicks, nnicks);
+ notice_lang(Config->s_NickServ, u, NICK_LIST_RESULTS, nnicks > Config->NSListMax ? Config->NSListMax : nnicks, nnicks);
return MOD_CONT;
}
bool OnHelp(User *u, const Anope::string &subcommand)
{
if (u->Account() && u->Account()->IsServicesOper())
- notice_help(Config.s_NickServ, u, NICK_SERVADMIN_HELP_LIST);
+ notice_help(Config->s_NickServ, u, NICK_SERVADMIN_HELP_LIST);
else
- notice_help(Config.s_NickServ, u, NICK_HELP_LIST);
+ notice_help(Config->s_NickServ, u, NICK_HELP_LIST);
return true;
}
@@ -182,14 +182,14 @@ class CommandNSList : public Command
void OnSyntaxError(User *u, const Anope::string &subcommand)
{
if (u->Account()->IsServicesOper())
- syntax_error(Config.s_NickServ, u, "LIST", NICK_LIST_SERVADMIN_SYNTAX);
+ syntax_error(Config->s_NickServ, u, "LIST", NICK_LIST_SERVADMIN_SYNTAX);
else
- syntax_error(Config.s_NickServ, u, "LIST", NICK_LIST_SYNTAX);
+ syntax_error(Config->s_NickServ, u, "LIST", NICK_LIST_SYNTAX);
}
void OnServHelp(User *u)
{
- notice_lang(Config.s_NickServ, u, NICK_HELP_CMD_LIST);
+ notice_lang(Config->s_NickServ, u, NICK_HELP_CMD_LIST);
}
};
diff --git a/modules/core/ns_logout.cpp b/modules/core/ns_logout.cpp
index e2504b978..7d0d69254 100644
--- a/modules/core/ns_logout.cpp
+++ b/modules/core/ns_logout.cpp
@@ -29,22 +29,22 @@ class CommandNSLogout : public Command
if (!u->Account()->IsServicesOper() && !nick.empty())
this->OnSyntaxError(u, "");
else if (!(u2 = (!nick.empty() ? finduser(nick) : u)))
- notice_lang(Config.s_NickServ, u, NICK_X_NOT_IN_USE, nick.c_str());
+ notice_lang(Config->s_NickServ, u, NICK_X_NOT_IN_USE, nick.c_str());
else if (!nick.empty() && u2->Account() && !u2->Account()->IsServicesOper())
- notice_lang(Config.s_NickServ, u, NICK_LOGOUT_SERVICESADMIN, nick.c_str());
+ notice_lang(Config->s_NickServ, u, NICK_LOGOUT_SERVICESADMIN, nick.c_str());
else
{
if (!nick.empty() && !param.empty() && param.equals_ci("REVALIDATE"))
validate_user(u2);
u2->isSuperAdmin = 0; /* Dont let people logout and remain a SuperAdmin */
- Alog() << Config.s_NickServ << ": " << u->GetMask() << " logged out nickname " << u2->nick;
+ Alog() << Config->s_NickServ << ": " << u->GetMask() << " logged out nickname " << u2->nick;
/* Remove founder status from this user in all channels */
if (!nick.empty())
- notice_lang(Config.s_NickServ, u, NICK_LOGOUT_X_SUCCEEDED, nick.c_str());
+ notice_lang(Config->s_NickServ, u, NICK_LOGOUT_X_SUCCEEDED, nick.c_str());
else
- notice_lang(Config.s_NickServ, u, NICK_LOGOUT_SUCCEEDED);
+ notice_lang(Config->s_NickServ, u, NICK_LOGOUT_SUCCEEDED);
ircdproto->SendAccountLogout(u2, u2->Account());
u2->RemoveMode(NickServ, UMODE_REGISTERED);
@@ -61,21 +61,21 @@ class CommandNSLogout : public Command
bool OnHelp(User *u, const Anope::string &subcommand)
{
if (u->Account() && u->Account()->IsServicesOper())
- notice_help(Config.s_NickServ, u, NICK_SERVADMIN_HELP_LOGOUT);
+ notice_help(Config->s_NickServ, u, NICK_SERVADMIN_HELP_LOGOUT);
else
- notice_help(Config.s_NickServ, u, NICK_HELP_LOGOUT);
+ notice_help(Config->s_NickServ, u, NICK_HELP_LOGOUT);
return true;
}
void OnSyntaxError(User *u, const Anope::string &subcommand)
{
- syntax_error(Config.s_NickServ, u, "LOGOUT", NICK_LOGOUT_SYNTAX);
+ syntax_error(Config->s_NickServ, u, "LOGOUT", NICK_LOGOUT_SYNTAX);
}
void OnServHelp(User *u)
{
- notice_lang(Config.s_NickServ, u, NICK_HELP_CMD_LOGOUT);
+ notice_lang(Config->s_NickServ, u, NICK_HELP_CMD_LOGOUT);
}
};
diff --git a/modules/core/ns_recover.cpp b/modules/core/ns_recover.cpp
index b8107e08a..e2f4befdf 100644
--- a/modules/core/ns_recover.cpp
+++ b/modules/core/ns_recover.cpp
@@ -29,35 +29,35 @@ class CommandNSRecover : public Command
User *u2;
if (!(u2 = finduser(nick)))
- notice_lang(Config.s_NickServ, u, NICK_X_NOT_IN_USE, nick.c_str());
+ notice_lang(Config->s_NickServ, u, NICK_X_NOT_IN_USE, nick.c_str());
else if (!(na = findnick(u2->nick)))
- notice_lang(Config.s_NickServ, u, NICK_X_NOT_REGISTERED, nick.c_str());
+ notice_lang(Config->s_NickServ, u, NICK_X_NOT_REGISTERED, nick.c_str());
else if (na->HasFlag(NS_FORBIDDEN))
- notice_lang(Config.s_NickServ, u, NICK_X_FORBIDDEN, na->nick.c_str());
+ notice_lang(Config->s_NickServ, u, NICK_X_FORBIDDEN, na->nick.c_str());
else if (na->nc->HasFlag(NI_SUSPENDED))
- notice_lang(Config.s_NickServ, u, NICK_X_SUSPENDED, na->nick.c_str());
+ notice_lang(Config->s_NickServ, u, NICK_X_SUSPENDED, na->nick.c_str());
else if (nick.equals_ci(u->nick))
- notice_lang(Config.s_NickServ, u, NICK_NO_RECOVER_SELF);
+ notice_lang(Config->s_NickServ, u, NICK_NO_RECOVER_SELF);
else if (!pass.empty())
{
int res = enc_check_password(pass, na->nc->pass);
if (res == 1)
{
- notice_lang(Config.s_NickServ, u2, FORCENICKCHANGE_NOW);
+ notice_lang(Config->s_NickServ, u2, FORCENICKCHANGE_NOW);
u2->Collide(na);
- /* Convert Config.NSReleaseTimeout seconds to string format */
- Anope::string relstr = duration(na->nc, Config.NSReleaseTimeout);
+ /* Convert Config->NSReleaseTimeout seconds to string format */
+ Anope::string relstr = duration(na->nc, Config->NSReleaseTimeout);
- notice_lang(Config.s_NickServ, u, NICK_RECOVERED, Config.s_NickServ.c_str(), nick.c_str(), relstr.c_str());
+ notice_lang(Config->s_NickServ, u, NICK_RECOVERED, Config->s_NickServ.c_str(), nick.c_str(), relstr.c_str());
}
else
{
- notice_lang(Config.s_NickServ, u, ACCESS_DENIED);
+ notice_lang(Config->s_NickServ, u, ACCESS_DENIED);
if (!res)
{
- Alog() << Config.s_NickServ << ": RECOVER: invalid password for " << nick << " by " << u->GetMask();
+ Alog() << Config->s_NickServ << ": RECOVER: invalid password for " << nick << " by " << u->GetMask();
if (bad_password(u))
return MOD_STOP;
}
@@ -67,38 +67,38 @@ class CommandNSRecover : public Command
{
if (u->Account() == na->nc || (!na->nc->HasFlag(NI_SECURE) && is_on_access(u, na->nc)))
{
- notice_lang(Config.s_NickServ, u2, FORCENICKCHANGE_NOW);
+ notice_lang(Config->s_NickServ, u2, FORCENICKCHANGE_NOW);
u2->Collide(na);
- /* Convert Config.NSReleaseTimeout seconds to string format */
- Anope::string relstr = duration(na->nc, Config.NSReleaseTimeout);
+ /* Convert Config->NSReleaseTimeout seconds to string format */
+ Anope::string relstr = duration(na->nc, Config->NSReleaseTimeout);
- notice_lang(Config.s_NickServ, u, NICK_RECOVERED, Config.s_NickServ.c_str(), nick.c_str(), relstr.c_str());
+ notice_lang(Config->s_NickServ, u, NICK_RECOVERED, Config->s_NickServ.c_str(), nick.c_str(), relstr.c_str());
}
else
- notice_lang(Config.s_NickServ, u, ACCESS_DENIED);
+ notice_lang(Config->s_NickServ, u, ACCESS_DENIED);
}
return MOD_CONT;
}
bool OnHelp(User *u, const Anope::string &subcommand)
{
- /* Convert Config.NSReleaseTimeout seconds to string format */
- Anope::string relstr = duration(u->Account(), Config.NSReleaseTimeout);
+ /* Convert Config->NSReleaseTimeout seconds to string format */
+ Anope::string relstr = duration(u->Account(), Config->NSReleaseTimeout);
- notice_help(Config.s_NickServ, u, NICK_HELP_RECOVER, relstr.c_str());
+ notice_help(Config->s_NickServ, u, NICK_HELP_RECOVER, relstr.c_str());
return true;
}
void OnSyntaxError(User *u, const Anope::string &subcommand)
{
- syntax_error(Config.s_NickServ, u, "RECOVER", NICK_RECOVER_SYNTAX);
+ syntax_error(Config->s_NickServ, u, "RECOVER", NICK_RECOVER_SYNTAX);
}
void OnServHelp(User *u)
{
- notice_lang(Config.s_NickServ, u, NICK_HELP_CMD_RECOVER);
+ notice_lang(Config->s_NickServ, u, NICK_HELP_CMD_RECOVER);
}
};
diff --git a/modules/core/ns_register.cpp b/modules/core/ns_register.cpp
index 51afc6e3e..eb126a791 100644
--- a/modules/core/ns_register.cpp
+++ b/modules/core/ns_register.cpp
@@ -24,8 +24,8 @@ class CommandNSConfirm : public Command
if (!na)
{
- Alog() << Config.s_NickServ << ": makenick(" << u->nick << ") failed";
- notice_lang(Config.s_NickServ, u, NICK_REGISTRATION_FAILED);
+ Alog() << Config->s_NickServ << ": makenick(" << u->nick << ") failed";
+ notice_lang(Config->s_NickServ, u, NICK_REGISTRATION_FAILED);
return MOD_CONT;
}
@@ -33,7 +33,7 @@ class CommandNSConfirm : public Command
na->nc->pass = nr->password;
- na->nc->memos.memomax = Config.MSMaxMemos;
+ na->nc->memos.memomax = Config->MSMaxMemos;
if (force)
{
@@ -45,37 +45,37 @@ class CommandNSConfirm : public Command
Anope::string last_usermask = u->GetIdent() + "@" + u->GetDisplayedHost();
na->last_usermask = last_usermask;
na->last_realname = u->realname;
- if (Config.NSAddAccessOnReg)
+ if (Config->NSAddAccessOnReg)
na->nc->AddAccess(create_mask(u));
}
na->time_registered = na->last_seen = time(NULL);
- na->nc->language = Config.NSDefLanguage;
+ na->nc->language = Config->NSDefLanguage;
if (!nr->email.empty())
na->nc->email = nr->email;
if (!force)
{
u->Login(na->nc);
- Alog() << Config.s_NickServ << ": '" << u->nick << "' registered by " << u->GetIdent() << "@" << u->host << " (e-mail: " << (!nr->email.empty() ? nr->email : "none") << ")";
- if (Config.NSAddAccessOnReg)
- notice_lang(Config.s_NickServ, u, NICK_REGISTERED, u->nick.c_str(), na->nc->GetAccess(0).c_str());
+ Alog() << Config->s_NickServ << ": '" << u->nick << "' registered by " << u->GetIdent() << "@" << u->host << " (e-mail: " << (!nr->email.empty() ? nr->email : "none") << ")";
+ if (Config->NSAddAccessOnReg)
+ notice_lang(Config->s_NickServ, u, NICK_REGISTERED, u->nick.c_str(), na->nc->GetAccess(0).c_str());
else
- notice_lang(Config.s_NickServ, u, NICK_REGISTERED_NO_MASK, u->nick.c_str());
+ notice_lang(Config->s_NickServ, u, NICK_REGISTERED_NO_MASK, u->nick.c_str());
delete nr;
ircdproto->SendAccountLogin(u, u->Account());
ircdproto->SetAutoIdentificationToken(u);
if (enc_decrypt(na->nc->pass, tmp_pass) == 1)
- notice_lang(Config.s_NickServ, u, NICK_PASSWORD_IS, tmp_pass.c_str());
+ notice_lang(Config->s_NickServ, u, NICK_PASSWORD_IS, tmp_pass.c_str());
u->lastnickreg = time(NULL);
}
else
{
- Alog() << Config.s_NickServ << ": '" << nr->nick << "' confirmed by " << u->GetMask() << " (email: " << (!nr->email.empty() ? nr->email : "none") << " )";
- notice_lang(Config.s_NickServ, u, NICK_FORCE_REG, nr->nick.c_str());
+ Alog() << Config->s_NickServ << ": '" << nr->nick << "' confirmed by " << u->GetMask() << " (email: " << (!nr->email.empty() ? nr->email : "none") << " )";
+ notice_lang(Config->s_NickServ, u, NICK_FORCE_REG, nr->nick.c_str());
User *user = finduser(nr->nick);
/* Delrequest must be called before validate_user */
delete nr;
@@ -94,7 +94,7 @@ class CommandNSConfirm : public Command
NickRequest *nr = findrequestnick(u->nick);
- if (Config.NSEmailReg)
+ if (Config->NSEmailReg)
{
if (passcode.empty())
{
@@ -115,21 +115,21 @@ class CommandNSConfirm : public Command
return MOD_CONT;
}
}
- notice_lang(Config.s_NickServ, u, NICK_CONFIRM_NOT_FOUND, Config.s_NickServ.c_str());
+ notice_lang(Config->s_NickServ, u, NICK_CONFIRM_NOT_FOUND, Config->s_NickServ.c_str());
return MOD_CONT;
}
if (!nr->passcode.equals_cs(passcode))
{
- notice_lang(Config.s_NickServ, u, NICK_CONFIRM_INVALID);
+ notice_lang(Config->s_NickServ, u, NICK_CONFIRM_INVALID);
return MOD_CONT;
}
}
if (!nr)
{
- notice_lang(Config.s_NickServ, u, NICK_REGISTRATION_FAILED);
+ notice_lang(Config->s_NickServ, u, NICK_REGISTRATION_FAILED);
return MOD_CONT;
}
@@ -150,20 +150,20 @@ class CommandNSConfirm : public Command
bool OnHelp(User *u, const Anope::string &subcommand)
{
- notice_help(Config.s_NickServ, u, NICK_HELP_CONFIRM);
+ notice_help(Config->s_NickServ, u, NICK_HELP_CONFIRM);
if (u->Account() && u->Account()->HasPriv("nickserv/confirm"))
- notice_help(Config.s_NickServ, u, NICK_HELP_CONFIRM_OPER);
+ notice_help(Config->s_NickServ, u, NICK_HELP_CONFIRM_OPER);
return true;
}
void OnSyntaxError(User *u, const Anope::string &subcommand)
{
- notice_lang(Config.s_NickServ, u, NICK_CONFIRM_INVALID);
+ notice_lang(Config->s_NickServ, u, NICK_CONFIRM_INVALID);
}
void OnServHelp(User *u)
{
- notice_lang(Config.s_NickServ, u, NICK_HELP_CMD_CONFIRM);
+ notice_lang(Config->s_NickServ, u, NICK_HELP_CMD_CONFIRM);
}
};
@@ -179,7 +179,7 @@ class CommandNSRegister : public CommandNSConfirm
{
NickRequest *nr = NULL, *anr = NULL;
NickAlias *na;
- size_t prefixlen = Config.NSGuestNickPrefix.length();
+ size_t prefixlen = Config->NSGuestNickPrefix.length();
size_t nicklen = u->nick.length();
Anope::string pass = params[0];
Anope::string email = params.size() > 1 ? params[1] : "";
@@ -196,19 +196,19 @@ class CommandNSRegister : public CommandNSConfirm
if (readonly)
{
- notice_lang(Config.s_NickServ, u, NICK_REGISTRATION_DISABLED);
+ notice_lang(Config->s_NickServ, u, NICK_REGISTRATION_DISABLED);
return MOD_CONT;
}
- if (!is_oper(u) && Config.NickRegDelay && time(NULL) - u->my_signon < Config.NickRegDelay)
+ if (!is_oper(u) && Config->NickRegDelay && time(NULL) - u->my_signon < Config->NickRegDelay)
{
- notice_lang(Config.s_NickServ, u, NICK_REG_DELAY, Config.NickRegDelay);
+ notice_lang(Config->s_NickServ, u, NICK_REG_DELAY, Config->NickRegDelay);
return MOD_CONT;
}
if ((anr = findrequestnick(u->nick)))
{
- notice_lang(Config.s_NickServ, u, NICK_REQUESTED);
+ notice_lang(Config->s_NickServ, u, NICK_REQUESTED);
return MOD_CONT;
}
@@ -217,51 +217,51 @@ class CommandNSRegister : public CommandNSConfirm
/* Guest nick can now have a series of between 1 and 7 digits.
* --lara
*/
- if (nicklen <= prefixlen + 7 && nicklen >= prefixlen + 1 && !u->nick.find_ci(Config.NSGuestNickPrefix) && !u->nick.substr(prefixlen).find_first_not_of("1234567890"))
+ if (nicklen <= prefixlen + 7 && nicklen >= prefixlen + 1 && !u->nick.find_ci(Config->NSGuestNickPrefix) && !u->nick.substr(prefixlen).find_first_not_of("1234567890"))
{
- notice_lang(Config.s_NickServ, u, NICK_CANNOT_BE_REGISTERED, u->nick.c_str());
+ notice_lang(Config->s_NickServ, u, NICK_CANNOT_BE_REGISTERED, u->nick.c_str());
return MOD_CONT;
}
if (!ircdproto->IsNickValid(u->nick))
{
- notice_lang(Config.s_NickServ, u, NICK_X_FORBIDDEN, u->nick.c_str());
+ notice_lang(Config->s_NickServ, u, NICK_X_FORBIDDEN, u->nick.c_str());
return MOD_CONT;
}
- if (Config.RestrictOperNicks)
- for (it = Config.Opers.begin(), it_end = Config.Opers.end(); it != it_end; ++it)
+ if (Config->RestrictOperNicks)
+ for (it = Config->Opers.begin(), it_end = Config->Opers.end(); it != it_end; ++it)
{
Anope::string nick = it->first;
if (u->nick.find_ci(nick) != Anope::string::npos && !is_oper(u))
{
- notice_lang(Config.s_NickServ, u, NICK_CANNOT_BE_REGISTERED, u->nick.c_str());
+ notice_lang(Config->s_NickServ, u, NICK_CANNOT_BE_REGISTERED, u->nick.c_str());
return MOD_CONT;
}
}
- if (Config.NSForceEmail && email.empty())
+ if (Config->NSForceEmail && email.empty())
this->OnSyntaxError(u, "");
- else if (time(NULL) < u->lastnickreg + Config.NSRegDelay)
- notice_lang(Config.s_NickServ, u, NICK_REG_PLEASE_WAIT, (u->lastnickreg + Config.NSRegDelay) - time(NULL));
+ else if (time(NULL) < u->lastnickreg + Config->NSRegDelay)
+ notice_lang(Config->s_NickServ, u, NICK_REG_PLEASE_WAIT, (u->lastnickreg + Config->NSRegDelay) - time(NULL));
else if ((na = findnick(u->nick)))
{
/* i.e. there's already such a nick regged */
if (na->HasFlag(NS_FORBIDDEN))
{
- Alog() << Config.s_NickServ << ": " << u->GetIdent() << "@" << u->host << " tried to register FORBIDden nick " << u->nick;
- notice_lang(Config.s_NickServ, u, NICK_CANNOT_BE_REGISTERED, u->nick.c_str());
+ Alog() << Config->s_NickServ << ": " << u->GetIdent() << "@" << u->host << " tried to register FORBIDden nick " << u->nick;
+ notice_lang(Config->s_NickServ, u, NICK_CANNOT_BE_REGISTERED, u->nick.c_str());
}
else
- notice_lang(Config.s_NickServ, u, NICK_ALREADY_REGISTERED, u->nick.c_str());
+ notice_lang(Config->s_NickServ, u, NICK_ALREADY_REGISTERED, u->nick.c_str());
}
- else if (pass.equals_ci(u->nick) || (Config.StrictPasswords && pass.length() < 5))
- notice_lang(Config.s_NickServ, u, MORE_OBSCURE_PASSWORD);
- else if (pass.length() > Config.PassLen)
- notice_lang(Config.s_NickServ, u, PASSWORD_TOO_LONG);
+ else if (pass.equals_ci(u->nick) || (Config->StrictPasswords && pass.length() < 5))
+ notice_lang(Config->s_NickServ, u, MORE_OBSCURE_PASSWORD);
+ else if (pass.length() > Config->PassLen)
+ notice_lang(Config->s_NickServ, u, PASSWORD_TOO_LONG);
else if (!email.empty() && !MailValidate(email))
- notice_lang(Config.s_NickServ, u, MAIL_X_INVALID, email.c_str());
+ notice_lang(Config->s_NickServ, u, MAIL_X_INVALID, email.c_str());
else
{
for (idx = 0; idx < 9; ++idx)
@@ -273,17 +273,17 @@ class CommandNSRegister : public CommandNSConfirm
nr->email = email;
nr->requested = time(NULL);
FOREACH_MOD(I_OnMakeNickRequest, OnMakeNickRequest(nr));
- if (Config.NSEmailReg)
+ if (Config->NSEmailReg)
{
if (SendRegmail(u, nr))
{
- notice_lang(Config.s_NickServ, u, NICK_ENTER_REG_CODE, email.c_str(), Config.s_NickServ.c_str());
- Alog() << Config.s_NickServ << ": sent registration verification code to " << nr->email;
+ notice_lang(Config->s_NickServ, u, NICK_ENTER_REG_CODE, email.c_str(), Config->s_NickServ.c_str());
+ Alog() << Config->s_NickServ << ": sent registration verification code to " << nr->email;
}
else
{
- Alog() << Config.s_NickServ << ": Unable to send registration verification mail";
- notice_lang(Config.s_NickServ, u, NICK_REG_UNABLE);
+ Alog() << Config->s_NickServ << ": Unable to send registration verification mail";
+ notice_lang(Config->s_NickServ, u, NICK_REG_UNABLE);
delete nr;
return MOD_CONT;
}
@@ -300,21 +300,21 @@ class CommandNSRegister : public CommandNSConfirm
bool OnHelp(User *u, const Anope::string &subcommand)
{
- notice_help(Config.s_NickServ, u, NICK_HELP_REGISTER);
+ notice_help(Config->s_NickServ, u, NICK_HELP_REGISTER);
return true;
}
void OnSyntaxError(User *u, const Anope::string &subcommand)
{
- if (Config.NSForceEmail)
- syntax_error(Config.s_NickServ, u, "REGISTER", NICK_REGISTER_SYNTAX_EMAIL);
+ if (Config->NSForceEmail)
+ syntax_error(Config->s_NickServ, u, "REGISTER", NICK_REGISTER_SYNTAX_EMAIL);
else
- syntax_error(Config.s_NickServ, u, "REGISTER", NICK_REGISTER_SYNTAX);
+ syntax_error(Config->s_NickServ, u, "REGISTER", NICK_REGISTER_SYNTAX);
}
void OnServHelp(User *u)
{
- notice_lang(Config.s_NickServ, u, NICK_HELP_CMD_REGISTER);
+ notice_lang(Config->s_NickServ, u, NICK_HELP_CMD_REGISTER);
}
};
@@ -329,24 +329,24 @@ class CommandNSResend : public Command
CommandReturn Execute(User *u, const std::vector<Anope::string> &params)
{
NickRequest *nr = NULL;
- if (Config.NSEmailReg)
+ if (Config->NSEmailReg)
{
if ((nr = findrequestnick(u->nick)))
{
- if (time(NULL) < nr->lastmail + Config.NSResendDelay)
+ if (time(NULL) < nr->lastmail + Config->NSResendDelay)
{
- notice_lang(Config.s_NickServ, u, MAIL_LATER);
+ notice_lang(Config->s_NickServ, u, MAIL_LATER);
return MOD_CONT;
}
if (!SendRegmail(u, nr))
{
nr->lastmail = time(NULL);
- notice_lang(Config.s_NickServ, u, NICK_REG_RESENT, nr->email.c_str());
- Alog() << Config.s_NickServ << ": re-sent registration verification code for " << nr->nick << " to " << nr->email;
+ notice_lang(Config->s_NickServ, u, NICK_REG_RESENT, nr->email.c_str());
+ Alog() << Config->s_NickServ << ": re-sent registration verification code for " << nr->nick << " to " << nr->email;
}
else
{
- Alog() << Config.s_NickServ << ": Unable to re-send registration verification mail for " << nr->nick;
+ Alog() << Config->s_NickServ << ": Unable to re-send registration verification mail for " << nr->nick;
return MOD_CONT;
}
}
@@ -356,13 +356,13 @@ class CommandNSResend : public Command
bool OnHelp(User *u, const Anope::string &subcommand)
{
- notice_help(Config.s_NickServ, u, NICK_HELP_RESEND);
+ notice_help(Config->s_NickServ, u, NICK_HELP_RESEND);
return true;
}
void OnServHelp(User *u)
{
- notice_lang(Config.s_NickServ, u, NICK_HELP_CMD_RESEND);
+ notice_lang(Config->s_NickServ, u, NICK_HELP_CMD_RESEND);
}
};
@@ -389,9 +389,9 @@ static bool SendRegmail(User *u, NickRequest *nr)
char subject[BUFSIZE], message[BUFSIZE];
snprintf(subject, sizeof(subject), getstring(NICK_REG_MAIL_SUBJECT), nr->nick.c_str());
- snprintf(message, sizeof(message), getstring(NICK_REG_MAIL), nr->nick.c_str(), Config.NetworkName.c_str(), Config.s_NickServ.c_str(), nr->passcode.c_str(), Config.NetworkName.c_str());
+ snprintf(message, sizeof(message), getstring(NICK_REG_MAIL), nr->nick.c_str(), Config->NetworkName.c_str(), Config->s_NickServ.c_str(), nr->passcode.c_str(), Config->NetworkName.c_str());
- return Mail(u, nr, Config.s_NickServ, subject, message);
+ return Mail(u, nr, Config->s_NickServ, subject, message);
}
MODULE_INIT(NSRegister)
diff --git a/modules/core/ns_release.cpp b/modules/core/ns_release.cpp
index bbf5401ca..bb455d23e 100644
--- a/modules/core/ns_release.cpp
+++ b/modules/core/ns_release.cpp
@@ -28,27 +28,27 @@ class CommandNSRelease : public Command
NickAlias *na;
if (!(na = findnick(nick)))
- notice_lang(Config.s_NickServ, u, NICK_X_NOT_REGISTERED, nick.c_str());
+ notice_lang(Config->s_NickServ, u, NICK_X_NOT_REGISTERED, nick.c_str());
else if (na->HasFlag(NS_FORBIDDEN))
- notice_lang(Config.s_NickServ, u, NICK_X_FORBIDDEN, na->nick.c_str());
+ notice_lang(Config->s_NickServ, u, NICK_X_FORBIDDEN, na->nick.c_str());
else if (na->nc->HasFlag(NI_SUSPENDED))
- notice_lang(Config.s_NickServ, u, NICK_X_SUSPENDED, na->nick.c_str());
+ notice_lang(Config->s_NickServ, u, NICK_X_SUSPENDED, na->nick.c_str());
else if (!na->HasFlag(NS_HELD))
- notice_lang(Config.s_NickServ, u, NICK_RELEASE_NOT_HELD, nick.c_str());
+ notice_lang(Config->s_NickServ, u, NICK_RELEASE_NOT_HELD, nick.c_str());
else if (!pass.empty())
{
int res = enc_check_password(pass, na->nc->pass);
if (res == 1)
{
na->Release();
- notice_lang(Config.s_NickServ, u, NICK_RELEASED);
+ notice_lang(Config->s_NickServ, u, NICK_RELEASED);
}
else
{
- notice_lang(Config.s_NickServ, u, ACCESS_DENIED);
+ notice_lang(Config->s_NickServ, u, ACCESS_DENIED);
if (!res)
{
- Alog() << Config.s_NickServ << ": RELEASE: invalid password for " << nick << " by " << u->GetMask();
+ Alog() << Config->s_NickServ << ": RELEASE: invalid password for " << nick << " by " << u->GetMask();
if (bad_password(u))
return MOD_STOP;
}
@@ -59,33 +59,33 @@ class CommandNSRelease : public Command
if (u->Account() == na->nc || (!na->nc->HasFlag(NI_SECURE) && is_on_access(u, na->nc)))
{
na->Release();
- notice_lang(Config.s_NickServ, u, NICK_RELEASED);
+ notice_lang(Config->s_NickServ, u, NICK_RELEASED);
}
else
- notice_lang(Config.s_NickServ, u, ACCESS_DENIED);
+ notice_lang(Config->s_NickServ, u, ACCESS_DENIED);
}
return MOD_CONT;
}
bool OnHelp(User *u, const Anope::string &subcommand)
{
- /* Convert Config.NSReleaseTimeout seconds to string format */
- Anope::string relstr = duration(u->Account(), Config.NSReleaseTimeout);
+ /* Convert Config->NSReleaseTimeout seconds to string format */
+ Anope::string relstr = duration(u->Account(), Config->NSReleaseTimeout);
- notice_help(Config.s_NickServ, u, NICK_HELP_RELEASE, relstr.c_str());
- //do_help_limited(Config.s_NickServ, u, this);
+ notice_help(Config->s_NickServ, u, NICK_HELP_RELEASE, relstr.c_str());
+ //do_help_limited(Config->s_NickServ, u, this);
return true;
}
void OnSyntaxError(User *u, const Anope::string &subcommand)
{
- syntax_error(Config.s_NickServ, u, "RELEASE", NICK_RELEASE_SYNTAX);
+ syntax_error(Config->s_NickServ, u, "RELEASE", NICK_RELEASE_SYNTAX);
}
void OnServHelp(User *u)
{
- notice_lang(Config.s_NickServ, u, NICK_HELP_CMD_RELEASE);
+ notice_lang(Config->s_NickServ, u, NICK_HELP_CMD_RELEASE);
}
};
diff --git a/modules/core/ns_resetpass.cpp b/modules/core/ns_resetpass.cpp
index b0f95d8ef..bae4eb1b2 100644
--- a/modules/core/ns_resetpass.cpp
+++ b/modules/core/ns_resetpass.cpp
@@ -26,18 +26,18 @@ class CommandNSResetPass : public Command
{
NickAlias *na;
- if (Config.RestrictMail && !u->Account()->HasCommand("nickserv/resetpass"))
- notice_lang(Config.s_NickServ, u, ACCESS_DENIED);
+ if (Config->RestrictMail && !u->Account()->HasCommand("nickserv/resetpass"))
+ notice_lang(Config->s_NickServ, u, ACCESS_DENIED);
if (!(na = findnick(params[0])))
- notice_lang(Config.s_NickServ, u, NICK_X_NOT_REGISTERED, params[0].c_str());
+ notice_lang(Config->s_NickServ, u, NICK_X_NOT_REGISTERED, params[0].c_str());
else if (na->HasFlag(NS_FORBIDDEN))
- notice_lang(Config.s_NickServ, u, NICK_X_FORBIDDEN, na->nick.c_str());
+ notice_lang(Config->s_NickServ, u, NICK_X_FORBIDDEN, na->nick.c_str());
else
{
if (SendResetEmail(u, na))
{
- Alog() << Config.s_NickServ << ": " << u->GetMask() << " used RESETPASS on " << na->nick << " (" << na->nc->display << ")";
- notice_lang(Config.s_NickServ, u, NICK_RESETPASS_COMPLETE, na->nick.c_str());
+ Alog() << Config->s_NickServ << ": " << u->GetMask() << " used RESETPASS on " << na->nick << " (" << na->nc->display << ")";
+ notice_lang(Config->s_NickServ, u, NICK_RESETPASS_COMPLETE, na->nick.c_str());
}
}
@@ -46,18 +46,18 @@ class CommandNSResetPass : public Command
bool OnHelp(User *u, const Anope::string &subcommand)
{
- notice_help(Config.s_NickServ, u, NICK_HELP_RESETPASS);
+ notice_help(Config->s_NickServ, u, NICK_HELP_RESETPASS);
return true;
}
void OnSyntaxError(User *u, const Anope::string &subcommand)
{
- syntax_error(Config.s_NickServ, u, "RESETPASS", NICK_RESETPASS_SYNTAX);
+ syntax_error(Config->s_NickServ, u, "RESETPASS", NICK_RESETPASS_SYNTAX);
}
void OnServHelp(User *u)
{
- notice_lang(Config.s_NickServ, u, NICK_HELP_CMD_RESETPASS);
+ notice_lang(Config->s_NickServ, u, NICK_HELP_CMD_RESETPASS);
}
};
@@ -68,7 +68,7 @@ class NSResetPass : public Module
public:
NSResetPass(const Anope::string &modname, const Anope::string &creator) : Module(modname, creator)
{
- if (!Config.UseMail)
+ if (!Config->UseMail)
throw ModuleException("Not using mail.");
this->SetAuthor("Anope");
@@ -81,7 +81,7 @@ class NSResetPass : public Module
EventReturn OnPreCommand(User *u, BotInfo *service, const Anope::string &command, const std::vector<Anope::string> &params)
{
- if (service == findbot(Config.s_NickServ) && command.equals_ci("CONFIRM") && !params.empty())
+ if (service == findbot(Config->s_NickServ) && command.equals_ci("CONFIRM") && !params.empty())
{
NickAlias *na = findnick(u->nick);
@@ -93,7 +93,7 @@ class NSResetPass : public Module
{
na->nc->Shrink("ns_resetpass_code");
na->nc->Shrink("ns_resetpass_time");
- notice_lang(Config.s_NickServ, u, NICK_CONFIRM_EXPIRED);
+ notice_lang(Config->s_NickServ, u, NICK_CONFIRM_EXPIRED);
return EVENT_STOP;
}
@@ -111,19 +111,19 @@ class NSResetPass : public Module
ircdproto->SetAutoIdentificationToken(u);
FOREACH_MOD(I_OnNickIdentify, OnNickIdentify(u));
- Alog() << Config.s_NickServ << ": " << u->GetMask() << " used CONFIRM with RESETPASS to forcefully identify to " << na->nick;
- notice_lang(Config.s_NickServ, u, NICK_CONFIRM_SUCCESS, Config.s_NickServ.c_str());
+ Alog() << Config->s_NickServ << ": " << u->GetMask() << " used CONFIRM with RESETPASS to forcefully identify to " << na->nick;
+ notice_lang(Config->s_NickServ, u, NICK_CONFIRM_SUCCESS, Config->s_NickServ.c_str());
if (ircd->vhost)
do_on_id(u);
- if (Config.NSModeOnID)
+ if (Config->NSModeOnID)
do_setmodes(u);
check_memos(u);
}
else
{
- Alog() << Config.s_NickServ << ": Invalid CONFIRM passcode for " << na->nick << " from " << u->GetMask();
- notice_lang(Config.s_NickServ, u, NICK_CONFIRM_INVALID);
+ Alog() << Config->s_NickServ << ": Invalid CONFIRM passcode for " << na->nick << " from " << u->GetMask();
+ notice_lang(Config->s_NickServ, u, NICK_CONFIRM_INVALID);
bad_password(u);
}
@@ -155,7 +155,7 @@ static bool SendResetEmail(User *u, NickAlias *na)
for (idx = 0; idx < 20; ++idx)
passcode += chars[1 + static_cast<int>((static_cast<float>(max - min)) * getrandom16() / 65536.0) + min];
- snprintf(message, sizeof(message), getstring(na, NICK_RESETPASS_MESSAGE), na->nick.c_str(), Config.s_NickServ.c_str(), passcode.c_str(), Config.NetworkName.c_str());
+ snprintf(message, sizeof(message), getstring(na, NICK_RESETPASS_MESSAGE), na->nick.c_str(), Config->s_NickServ.c_str(), passcode.c_str(), Config->NetworkName.c_str());
na->nc->Shrink("ns_resetpass_code");
na->nc->Shrink("ns_resetpass_time");
@@ -163,7 +163,7 @@ static bool SendResetEmail(User *u, NickAlias *na)
na->nc->Extend("ns_resetpass_code", new ExtensibleItemRegular<Anope::string>(passcode));
na->nc->Extend("ns_resetpass_time", new ExtensibleItemRegular<time_t>(time(NULL)));
- return Mail(u, na->nc, Config.s_NickServ, subject, message);
+ return Mail(u, na->nc, Config->s_NickServ, subject, message);
}
MODULE_INIT(NSResetPass)
diff --git a/modules/core/ns_saset.cpp b/modules/core/ns_saset.cpp
index 6de0a66a7..73cb706b9 100644
--- a/modules/core/ns_saset.cpp
+++ b/modules/core/ns_saset.cpp
@@ -35,17 +35,17 @@ class CommandNSSASet : public Command
if (readonly)
{
- notice_lang(Config.s_NickServ, u, NICK_SASET_DISABLED);
+ notice_lang(Config->s_NickServ, u, NICK_SASET_DISABLED);
return MOD_CONT;
}
NickAlias *na = findnick(nick);
if (!na)
- notice_lang(Config.s_NickServ, u, NICK_SASET_BAD_NICK, nick.c_str());
+ notice_lang(Config->s_NickServ, u, NICK_SASET_BAD_NICK, nick.c_str());
else if (na->HasFlag(NS_FORBIDDEN))
- notice_lang(Config.s_NickServ, u, NICK_X_FORBIDDEN, na->nick.c_str());
+ notice_lang(Config->s_NickServ, u, NICK_X_FORBIDDEN, na->nick.c_str());
else if (na->nc->HasFlag(NI_SUSPENDED))
- notice_lang(Config.s_NickServ, u, NICK_X_SUSPENDED, na->nick.c_str());
+ notice_lang(Config->s_NickServ, u, NICK_X_SUSPENDED, na->nick.c_str());
else
{
Command *c = this->FindCommand(params[1]);
@@ -58,7 +58,7 @@ class CommandNSSASet : public Command
mod_run_cmd(NickServ, u, c, params[1], cmdparams);
}
else
- notice_lang(Config.s_NickServ, u, NICK_SASET_UNKNOWN_OPTION, cmd.c_str());
+ notice_lang(Config->s_NickServ, u, NICK_SASET_UNKNOWN_OPTION, cmd.c_str());
}
return MOD_CONT;
@@ -68,10 +68,10 @@ class CommandNSSASet : public Command
{
if (subcommand.empty())
{
- notice_help(Config.s_NickServ, u, NICK_HELP_SASET_HEAD);
+ notice_help(Config->s_NickServ, u, NICK_HELP_SASET_HEAD);
for (subcommand_map::iterator it = this->subcommands.begin(), it_end = this->subcommands.end(); it != it_end; ++it)
it->second->OnServHelp(u);
- notice_help(Config.s_NickServ, u, NICK_HELP_SASET_TAIL);
+ notice_help(Config->s_NickServ, u, NICK_HELP_SASET_TAIL);
return true;
}
else
@@ -87,12 +87,12 @@ class CommandNSSASet : public Command
void OnSyntaxError(User *u, const Anope::string &subcommand)
{
- syntax_error(Config.s_NickServ, u, "SASET", NICK_SASET_SYNTAX);
+ syntax_error(Config->s_NickServ, u, "SASET", NICK_SASET_SYNTAX);
}
void OnServHelp(User *u)
{
- notice_lang(Config.s_NickServ, u, NICK_HELP_CMD_SASET);
+ notice_lang(Config->s_NickServ, u, NICK_HELP_CMD_SASET);
}
bool AddSubcommand(Command *c)
@@ -132,30 +132,30 @@ class CommandNSSASetDisplay : public Command
NickAlias *na = findnick(params[1]);
if (!na || na->nc != nc)
{
- notice_lang(Config.s_NickServ, u, NICK_SASET_DISPLAY_INVALID, nc->display.c_str());
+ notice_lang(Config->s_NickServ, u, NICK_SASET_DISPLAY_INVALID, nc->display.c_str());
return MOD_CONT;
}
change_core_display(nc, params[1]);
- notice_lang(Config.s_NickServ, u, NICK_SASET_DISPLAY_CHANGED, nc->display.c_str());
+ notice_lang(Config->s_NickServ, u, NICK_SASET_DISPLAY_CHANGED, nc->display.c_str());
return MOD_CONT;
}
bool OnHelp(User *u, const Anope::string &)
{
- notice_help(Config.s_NickServ, u, NICK_HELP_SASET_DISPLAY);
+ notice_help(Config->s_NickServ, u, NICK_HELP_SASET_DISPLAY);
return true;
}
void OnSyntaxError(User *u, const Anope::string &)
{
// XXX
- syntax_error(Config.s_NickServ, u, "SASET", NICK_SASET_SYNTAX);
+ syntax_error(Config->s_NickServ, u, "SASET", NICK_SASET_SYNTAX);
}
void OnServHelp(User *u)
{
- notice_lang(Config.s_NickServ, u, NICK_HELP_CMD_SASET_DISPLAY);
+ notice_lang(Config->s_NickServ, u, NICK_HELP_CMD_SASET_DISPLAY);
}
};
@@ -174,38 +174,38 @@ class CommandNSSASetPassword : public Command
size_t len = params[1].length();
- if (Config.NSSecureAdmins && u->Account() != nc && nc->IsServicesOper())
+ if (Config->NSSecureAdmins && u->Account() != nc && nc->IsServicesOper())
{
- notice_lang(Config.s_NickServ, u, ACCESS_DENIED);
+ notice_lang(Config->s_NickServ, u, ACCESS_DENIED);
return MOD_CONT;
}
- else if (nc->display.equals_ci(params[1]) || (Config.StrictPasswords && len < 5))
+ else if (nc->display.equals_ci(params[1]) || (Config->StrictPasswords && len < 5))
{
- notice_lang(Config.s_NickServ, u, MORE_OBSCURE_PASSWORD);
+ notice_lang(Config->s_NickServ, u, MORE_OBSCURE_PASSWORD);
return MOD_CONT;
}
- else if (len > Config.PassLen)
+ else if (len > Config->PassLen)
{
- notice_lang(Config.s_NickServ, u, PASSWORD_TOO_LONG);
+ notice_lang(Config->s_NickServ, u, PASSWORD_TOO_LONG);
return MOD_CONT;
}
if (enc_encrypt(params[1], nc->pass))
{
- Alog() << Config.s_NickServ << ": Failed to encrypt password for " << nc->display << " (saset)";
- notice_lang(Config.s_NickServ, u, NICK_SASET_PASSWORD_FAILED, nc->display.c_str());
+ Alog() << Config->s_NickServ << ": Failed to encrypt password for " << nc->display << " (saset)";
+ notice_lang(Config->s_NickServ, u, NICK_SASET_PASSWORD_FAILED, nc->display.c_str());
return MOD_CONT;
}
Anope::string tmp_pass;
if (enc_decrypt(nc->pass, tmp_pass) == 1)
- notice_lang(Config.s_NickServ, u, NICK_SASET_PASSWORD_CHANGED_TO, nc->display.c_str(), tmp_pass.c_str());
+ notice_lang(Config->s_NickServ, u, NICK_SASET_PASSWORD_CHANGED_TO, nc->display.c_str(), tmp_pass.c_str());
else
- notice_lang(Config.s_NickServ, u, NICK_SASET_PASSWORD_CHANGED, nc->display.c_str());
+ notice_lang(Config->s_NickServ, u, NICK_SASET_PASSWORD_CHANGED, nc->display.c_str());
- Alog() << Config.s_NickServ << ": " << u->GetMask() << " used SASET PASSWORD on " << nc->display << " (e-mail: "<< (!nc->email.empty() ? nc->email : "none") << ")";
+ Alog() << Config->s_NickServ << ": " << u->GetMask() << " used SASET PASSWORD on " << nc->display << " (e-mail: "<< (!nc->email.empty() ? nc->email : "none") << ")";
- if (Config.WallSetpass)
+ if (Config->WallSetpass)
ircdproto->SendGlobops(NickServ, "\2%s\2 used SASET PASSWORD on \2%s\2", u->nick.c_str(), nc->display.c_str());
return MOD_CONT;
@@ -213,18 +213,18 @@ class CommandNSSASetPassword : public Command
bool OnHelp(User *u, const Anope::string &)
{
- notice_help(Config.s_NickServ, u, NICK_HELP_SASET_PASSWORD);
+ notice_help(Config->s_NickServ, u, NICK_HELP_SASET_PASSWORD);
return true;
}
void OnSyntaxError(User *u, const Anope::string &)
{
- syntax_error(Config.s_NickServ, u, "SASET", NICK_SASET_SYNTAX);
+ syntax_error(Config->s_NickServ, u, "SASET", NICK_SASET_SYNTAX);
}
void OnServHelp(User *u)
{
- notice_lang(Config.s_NickServ, u, NICK_HELP_CMD_SASET_PASSWORD);
+ notice_lang(Config->s_NickServ, u, NICK_HELP_CMD_SASET_PASSWORD);
}
};
diff --git a/modules/core/ns_saset_noexpire.cpp b/modules/core/ns_saset_noexpire.cpp
index 3404a0db2..6d1c3816b 100644
--- a/modules/core/ns_saset_noexpire.cpp
+++ b/modules/core/ns_saset_noexpire.cpp
@@ -31,12 +31,12 @@ class CommandNSSASetNoexpire : public Command
if (param.equals_ci("ON"))
{
na->SetFlag(NS_NO_EXPIRE);
- notice_lang(Config.s_NickServ, u, NICK_SASET_NOEXPIRE_ON, na->nick.c_str());
+ notice_lang(Config->s_NickServ, u, NICK_SASET_NOEXPIRE_ON, na->nick.c_str());
}
else if (param.equals_ci("OFF"))
{
na->UnsetFlag(NS_NO_EXPIRE);
- notice_lang(Config.s_NickServ, u, NICK_SASET_NOEXPIRE_OFF, na->nick.c_str());
+ notice_lang(Config->s_NickServ, u, NICK_SASET_NOEXPIRE_OFF, na->nick.c_str());
}
else
this->OnSyntaxError(u, "NOEXPIRE");
@@ -46,18 +46,18 @@ class CommandNSSASetNoexpire : public Command
bool OnHelp(User *u, const Anope::string &)
{
- notice_help(Config.s_NickServ, u, NICK_HELP_SASET_NOEXPIRE);
+ notice_help(Config->s_NickServ, u, NICK_HELP_SASET_NOEXPIRE);
return true;
}
void OnSyntaxError(User *u, const Anope::string &)
{
- syntax_error(Config.s_NickServ, u, "SASET NOEXPIRE", NICK_SASET_NOEXPIRE_SYNTAX);
+ syntax_error(Config->s_NickServ, u, "SASET NOEXPIRE", NICK_SASET_NOEXPIRE_SYNTAX);
}
void OnServHelp(User *u)
{
- notice_lang(Config.s_NickServ, u, NICK_HELP_CMD_SASET_NOEXPIRE);
+ notice_lang(Config->s_NickServ, u, NICK_HELP_CMD_SASET_NOEXPIRE);
}
};
diff --git a/modules/core/ns_sendpass.cpp b/modules/core/ns_sendpass.cpp
index 30783a5b6..e5695e37e 100644
--- a/modules/core/ns_sendpass.cpp
+++ b/modules/core/ns_sendpass.cpp
@@ -27,12 +27,12 @@ class CommandNSSendPass : public Command
Anope::string nick = params[0];
NickAlias *na;
- if (Config.RestrictMail && !u->Account()->HasCommand("nickserv/sendpass"))
- notice_lang(Config.s_NickServ, u, ACCESS_DENIED);
+ if (Config->RestrictMail && !u->Account()->HasCommand("nickserv/sendpass"))
+ notice_lang(Config->s_NickServ, u, ACCESS_DENIED);
else if (!(na = findnick(nick)))
- notice_lang(Config.s_NickServ, u, NICK_X_NOT_REGISTERED, nick.c_str());
+ notice_lang(Config->s_NickServ, u, NICK_X_NOT_REGISTERED, nick.c_str());
else if (na->HasFlag(NS_FORBIDDEN))
- notice_lang(Config.s_NickServ, u, NICK_X_FORBIDDEN, na->nick.c_str());
+ notice_lang(Config->s_NickServ, u, NICK_X_FORBIDDEN, na->nick.c_str());
else
{
Anope::string tmp_pass;
@@ -40,12 +40,12 @@ class CommandNSSendPass : public Command
{
if (SendPassMail(u, na, tmp_pass))
{
- Alog() << Config.s_NickServ << ": " << u->GetMask() << " used SENDPASS on " << nick;
- notice_lang(Config.s_NickServ, u, NICK_SENDPASS_OK, nick.c_str());
+ Alog() << Config->s_NickServ << ": " << u->GetMask() << " used SENDPASS on " << nick;
+ notice_lang(Config->s_NickServ, u, NICK_SENDPASS_OK, nick.c_str());
}
}
else
- notice_lang(Config.s_NickServ, u, NICK_SENDPASS_UNAVAILABLE);
+ notice_lang(Config->s_NickServ, u, NICK_SENDPASS_UNAVAILABLE);
}
return MOD_CONT;
@@ -53,18 +53,18 @@ class CommandNSSendPass : public Command
bool OnHelp(User *u, const Anope::string &subcommand)
{
- notice_help(Config.s_NickServ, u, NICK_HELP_SENDPASS);
+ notice_help(Config->s_NickServ, u, NICK_HELP_SENDPASS);
return true;
}
void OnSyntaxError(User *u, const Anope::string &subcommand)
{
- syntax_error(Config.s_NickServ, u, "SENDPASS", NICK_SENDPASS_SYNTAX);
+ syntax_error(Config->s_NickServ, u, "SENDPASS", NICK_SENDPASS_SYNTAX);
}
void OnServHelp(User *u)
{
- notice_lang(Config.s_NickServ, u, NICK_HELP_CMD_SENDPASS);
+ notice_lang(Config->s_NickServ, u, NICK_HELP_CMD_SENDPASS);
}
};
@@ -75,7 +75,7 @@ class NSSendPass : public Module
public:
NSSendPass(const Anope::string &modname, const Anope::string &creator) : Module(modname, creator)
{
- if (!Config.UseMail)
+ if (!Config->UseMail)
throw ModuleException("Not using mail, whut.");
Anope::string tmp_pass = "plain:tmp";
@@ -94,9 +94,9 @@ static bool SendPassMail(User *u, NickAlias *na, const Anope::string &pass)
char subject[BUFSIZE], message[BUFSIZE];
snprintf(subject, sizeof(subject), getstring(na, NICK_SENDPASS_SUBJECT), na->nick.c_str());
- snprintf(message, sizeof(message), getstring(na, NICK_SENDPASS), na->nick.c_str(), pass.c_str(), Config.NetworkName.c_str());
+ snprintf(message, sizeof(message), getstring(na, NICK_SENDPASS), na->nick.c_str(), pass.c_str(), Config->NetworkName.c_str());
- return Mail(u, na->nc, Config.s_NickServ, subject, message);
+ return Mail(u, na->nc, Config->s_NickServ, subject, message);
}
MODULE_INIT(NSSendPass)
diff --git a/modules/core/ns_set.cpp b/modules/core/ns_set.cpp
index ee426931b..fde4d6cb5 100644
--- a/modules/core/ns_set.cpp
+++ b/modules/core/ns_set.cpp
@@ -32,13 +32,13 @@ class CommandNSSet : public Command
{
if (readonly)
{
- notice_lang(Config.s_NickServ, u, NICK_SET_DISABLED);
+ notice_lang(Config->s_NickServ, u, NICK_SET_DISABLED);
return MOD_CONT;
}
if (u->Account()->HasFlag(NI_SUSPENDED))
{
- notice_lang(Config.s_NickServ, u, NICK_X_SUSPENDED, u->Account()->display.c_str());
+ notice_lang(Config->s_NickServ, u, NICK_X_SUSPENDED, u->Account()->display.c_str());
return MOD_CONT;
}
@@ -52,7 +52,7 @@ class CommandNSSet : public Command
mod_run_cmd(NickServ, u, c, params[0], cmdparams);
}
else
- notice_lang(Config.s_NickServ, u, NICK_SET_UNKNOWN_OPTION, params[0].c_str());
+ notice_lang(Config->s_NickServ, u, NICK_SET_UNKNOWN_OPTION, params[0].c_str());
return MOD_CONT;
}
@@ -61,10 +61,10 @@ class CommandNSSet : public Command
{
if (subcommand.empty())
{
- notice_help(Config.s_NickServ, u, NICK_HELP_SET_HEAD);
+ notice_help(Config->s_NickServ, u, NICK_HELP_SET_HEAD);
for (subcommand_map::iterator it = this->subcommands.begin(), it_end = this->subcommands.end(); it != it_end; ++it)
it->second->OnServHelp(u);
- notice_help(Config.s_NickServ, u, NICK_HELP_SET_TAIL);
+ notice_help(Config->s_NickServ, u, NICK_HELP_SET_TAIL);
return true;
}
else
@@ -80,12 +80,12 @@ class CommandNSSet : public Command
void OnSyntaxError(User *u, const Anope::string &subcommand)
{
- syntax_error(Config.s_NickServ, u, "SET", NICK_SET_SYNTAX);
+ syntax_error(Config->s_NickServ, u, "SET", NICK_SET_SYNTAX);
}
void OnServHelp(User *u)
{
- notice_lang(Config.s_NickServ, u, NICK_HELP_CMD_SET);
+ notice_lang(Config->s_NickServ, u, NICK_HELP_CMD_SET);
}
bool AddSubcommand(Command *c)
@@ -122,30 +122,30 @@ class CommandNSSetDisplay : public Command
if (!na || na->nc != u->Account())
{
- notice_lang(Config.s_NickServ, u, NICK_SASET_DISPLAY_INVALID, u->Account()->display.c_str());
+ notice_lang(Config->s_NickServ, u, NICK_SASET_DISPLAY_INVALID, u->Account()->display.c_str());
return MOD_CONT;
}
change_core_display(u->Account(), params[0]);
- notice_lang(Config.s_NickServ, u, NICK_SET_DISPLAY_CHANGED, u->Account()->display.c_str());
+ notice_lang(Config->s_NickServ, u, NICK_SET_DISPLAY_CHANGED, u->Account()->display.c_str());
return MOD_CONT;
}
bool OnHelp(User *u, const Anope::string &)
{
- notice_help(Config.s_NickServ, u, NICK_HELP_SET_DISPLAY);
+ notice_help(Config->s_NickServ, u, NICK_HELP_SET_DISPLAY);
return true;
}
void OnSyntaxError(User *u, const Anope::string &)
{
// XXX
- syntax_error(Config.s_NickServ, u, "SET", NICK_SET_SYNTAX);
+ syntax_error(Config->s_NickServ, u, "SET", NICK_SET_SYNTAX);
}
void OnServHelp(User *u)
{
- notice_lang(Config.s_NickServ, u, NICK_HELP_CMD_SET_DISPLAY);
+ notice_lang(Config->s_NickServ, u, NICK_HELP_CMD_SET_DISPLAY);
}
};
@@ -162,49 +162,49 @@ class CommandNSSetPassword : public Command
int len = param.length();
- if (u->Account()->display.equals_ci(param) || (Config.StrictPasswords && len < 5))
+ if (u->Account()->display.equals_ci(param) || (Config->StrictPasswords && len < 5))
{
- notice_lang(Config.s_NickServ, u, MORE_OBSCURE_PASSWORD);
+ notice_lang(Config->s_NickServ, u, MORE_OBSCURE_PASSWORD);
return MOD_CONT;
}
- else if (len > Config.PassLen)
+ else if (len > Config->PassLen)
{
- notice_lang(Config.s_NickServ, u, PASSWORD_TOO_LONG);
+ notice_lang(Config->s_NickServ, u, PASSWORD_TOO_LONG);
return MOD_CONT;
}
if (enc_encrypt(param, u->Account()->pass) < 0)
{
- Alog() << Config.s_NickServ << ": Failed to encrypt password for " << u->Account()->display << " (set)";
- notice_lang(Config.s_NickServ, u, NICK_SASET_PASSWORD_FAILED);
+ Alog() << Config->s_NickServ << ": Failed to encrypt password for " << u->Account()->display << " (set)";
+ notice_lang(Config->s_NickServ, u, NICK_SASET_PASSWORD_FAILED);
return MOD_CONT;
}
Anope::string tmp_pass;
if (enc_decrypt(u->Account()->pass, tmp_pass) == 1)
- notice_lang(Config.s_NickServ, u, NICK_SASET_PASSWORD_CHANGED_TO, u->Account()->display.c_str(), tmp_pass.c_str());
+ notice_lang(Config->s_NickServ, u, NICK_SASET_PASSWORD_CHANGED_TO, u->Account()->display.c_str(), tmp_pass.c_str());
else
- notice_lang(Config.s_NickServ, u, NICK_SASET_PASSWORD_CHANGED, u->Account()->display.c_str());
+ notice_lang(Config->s_NickServ, u, NICK_SASET_PASSWORD_CHANGED, u->Account()->display.c_str());
- Alog() << Config.s_NickServ << ": " << u->GetMask() << " (e-mail: " << (!u->Account()->email.empty() ? u->Account()->email : "none") << ") changed its password.";
+ Alog() << Config->s_NickServ << ": " << u->GetMask() << " (e-mail: " << (!u->Account()->email.empty() ? u->Account()->email : "none") << ") changed its password.";
return MOD_CONT;
}
bool OnHelp(User *u, const Anope::string &)
{
- notice_help(Config.s_NickServ, u, NICK_HELP_SET_PASSWORD);
+ notice_help(Config->s_NickServ, u, NICK_HELP_SET_PASSWORD);
return true;
}
void OnSyntaxError(User *u, const Anope::string &)
{
// XXX
- syntax_error(Config.s_NickServ, u, "SET", NICK_SET_SYNTAX);
+ syntax_error(Config->s_NickServ, u, "SET", NICK_SET_SYNTAX);
}
void OnServHelp(User *u)
{
- notice_lang(Config.s_NickServ, u, NICK_HELP_CMD_SET_PASSWORD);
+ notice_lang(Config->s_NickServ, u, NICK_HELP_CMD_SET_PASSWORD);
}
};
diff --git a/modules/core/ns_set_autoop.cpp b/modules/core/ns_set_autoop.cpp
index 8e0c0a8ad..fea68d742 100644
--- a/modules/core/ns_set_autoop.cpp
+++ b/modules/core/ns_set_autoop.cpp
@@ -31,12 +31,12 @@ class CommandNSSetAutoOp : public Command
if (param.equals_ci("ON"))
{
nc->SetFlag(NI_AUTOOP);
- notice_lang(Config.s_NickServ, u, NICK_SASET_AUTOOP_ON, nc->display.c_str());
+ notice_lang(Config->s_NickServ, u, NICK_SASET_AUTOOP_ON, nc->display.c_str());
}
else if (param.equals_ci("OFF"))
{
nc->UnsetFlag(NI_AUTOOP);
- notice_lang(Config.s_NickServ, u, NICK_SASET_AUTOOP_OFF, nc->display.c_str());
+ notice_lang(Config->s_NickServ, u, NICK_SASET_AUTOOP_OFF, nc->display.c_str());
}
else
this->OnSyntaxError(u, "AUTOOP");
@@ -46,18 +46,18 @@ class CommandNSSetAutoOp : public Command
bool OnHelp(User *u, const Anope::string &)
{
- notice_help(Config.s_NickServ, u, NICK_HELP_SET_AUTOOP);
+ notice_help(Config->s_NickServ, u, NICK_HELP_SET_AUTOOP);
return true;
}
void OnSyntaxError(User *u, const Anope::string &)
{
- syntax_error(Config.s_NickServ, u, "SET AUTOOP", NICK_SET_AUTOOP_SYNTAX);
+ syntax_error(Config->s_NickServ, u, "SET AUTOOP", NICK_SET_AUTOOP_SYNTAX);
}
void OnServHelp(User *u)
{
- notice_lang(Config.s_NickServ, u, NICK_HELP_CMD_SET_AUTOOP);
+ notice_lang(Config->s_NickServ, u, NICK_HELP_CMD_SET_AUTOOP);
}
};
@@ -70,18 +70,18 @@ class CommandNSSASetAutoOp : public CommandNSSetAutoOp
bool Help(User *u, const Anope::string &)
{
- notice_help(Config.s_NickServ, u, NICK_HELP_SASET_AUTOOP);
+ notice_help(Config->s_NickServ, u, NICK_HELP_SASET_AUTOOP);
return true;
}
void OnSyntaxError(User *u, const Anope::string &)
{
- syntax_error(Config.s_NickServ, u, "SET AUTOOP", NICK_SASET_AUTOOP_SYNTAX);
+ syntax_error(Config->s_NickServ, u, "SET AUTOOP", NICK_SASET_AUTOOP_SYNTAX);
}
void OnServHelp(User *u)
{
- notice_lang(Config.s_NickServ, u, NICK_HELP_CMD_SASET_AUTOOP);
+ notice_lang(Config->s_NickServ, u, NICK_HELP_CMD_SASET_AUTOOP);
}
};
diff --git a/modules/core/ns_set_email.cpp b/modules/core/ns_set_email.cpp
index 6b52dc011..d8471e2db 100644
--- a/modules/core/ns_set_email.cpp
+++ b/modules/core/ns_set_email.cpp
@@ -28,33 +28,33 @@ class CommandNSSetEmail : public Command
Anope::string param = params.size() > 1 ? params[1] : "";
- if (param.empty() && Config.NSForceEmail)
+ if (param.empty() && Config->NSForceEmail)
{
- notice_lang(Config.s_NickServ, u, NICK_SASET_EMAIL_UNSET_IMPOSSIBLE);
+ notice_lang(Config->s_NickServ, u, NICK_SASET_EMAIL_UNSET_IMPOSSIBLE);
return MOD_CONT;
}
- else if (Config.NSSecureAdmins && u->Account() != nc && nc->IsServicesOper())
+ else if (Config->NSSecureAdmins && u->Account() != nc && nc->IsServicesOper())
{
- notice_lang(Config.s_NickServ, u, ACCESS_DENIED);
+ notice_lang(Config->s_NickServ, u, ACCESS_DENIED);
return MOD_CONT;
}
else if (!param.empty() && !MailValidate(param))
{
- notice_lang(Config.s_NickServ, u, MAIL_X_INVALID, param.c_str());
+ notice_lang(Config->s_NickServ, u, MAIL_X_INVALID, param.c_str());
return MOD_CONT;
}
- Alog() << Config.s_NickServ << ": " << u->GetMask() << " (e-mail: " << (!u->Account()->email.empty() ? u->Account()->email : "none") << ") changed the e-mail of " << nc->display << " to " << (!param.empty() ? param : "none");
+ Alog() << Config->s_NickServ << ": " << u->GetMask() << " (e-mail: " << (!u->Account()->email.empty() ? u->Account()->email : "none") << ") changed the e-mail of " << nc->display << " to " << (!param.empty() ? param : "none");
if (!param.empty())
{
nc->email = param;
- notice_lang(Config.s_NickServ, u, NICK_SASET_EMAIL_CHANGED, nc->display.c_str(), param.c_str());
+ notice_lang(Config->s_NickServ, u, NICK_SASET_EMAIL_CHANGED, nc->display.c_str(), param.c_str());
}
else
{
nc->email.clear();
- notice_lang(Config.s_NickServ, u, NICK_SASET_EMAIL_UNSET, nc->display.c_str());
+ notice_lang(Config->s_NickServ, u, NICK_SASET_EMAIL_UNSET, nc->display.c_str());
}
return MOD_CONT;
@@ -62,13 +62,13 @@ class CommandNSSetEmail : public Command
bool OnHelp(User *u, const Anope::string &)
{
- notice_help(Config.s_NickServ, u, NICK_HELP_SET_EMAIL);
+ notice_help(Config->s_NickServ, u, NICK_HELP_SET_EMAIL);
return true;
}
void OnServHelp(User *u)
{
- notice_lang(Config.s_NickServ, u, NICK_HELP_CMD_SET_EMAIL);
+ notice_lang(Config->s_NickServ, u, NICK_HELP_CMD_SET_EMAIL);
}
};
@@ -81,13 +81,13 @@ class CommandNSSASetEmail : public CommandNSSetEmail
bool OnHelp(User *u, const Anope::string &)
{
- notice_help(Config.s_NickServ, u, NICK_HELP_SASET_EMAIL);
+ notice_help(Config->s_NickServ, u, NICK_HELP_SASET_EMAIL);
return true;
}
void OnServHelp(User *u)
{
- notice_lang(Config.s_NickServ, u, NICK_HELP_CMD_SASET_EMAIL);
+ notice_lang(Config->s_NickServ, u, NICK_HELP_CMD_SASET_EMAIL);
}
};
diff --git a/modules/core/ns_set_greet.cpp b/modules/core/ns_set_greet.cpp
index effa0d64f..0390b92f8 100644
--- a/modules/core/ns_set_greet.cpp
+++ b/modules/core/ns_set_greet.cpp
@@ -31,12 +31,12 @@ class CommandNSSetGreet : public Command
if (!param.empty())
{
nc->greet = param;
- notice_lang(Config.s_NickServ, u, NICK_SASET_GREET_CHANGED, nc->display.c_str(), nc->greet.c_str());
+ notice_lang(Config->s_NickServ, u, NICK_SASET_GREET_CHANGED, nc->display.c_str(), nc->greet.c_str());
}
else
{
nc->greet.clear();
- notice_lang(Config.s_NickServ, u, NICK_SASET_GREET_UNSET, nc->display.c_str());
+ notice_lang(Config->s_NickServ, u, NICK_SASET_GREET_UNSET, nc->display.c_str());
}
return MOD_CONT;
@@ -44,13 +44,13 @@ class CommandNSSetGreet : public Command
bool OnHelp(User *u, const Anope::string &)
{
- notice_help(Config.s_NickServ, u, NICK_HELP_SET_GREET);
+ notice_help(Config->s_NickServ, u, NICK_HELP_SET_GREET);
return true;
}
void OnServHelp(User *u)
{
- notice_lang(Config.s_NickServ, u, NICK_HELP_CMD_SET_GREET);
+ notice_lang(Config->s_NickServ, u, NICK_HELP_CMD_SET_GREET);
}
};
@@ -63,13 +63,13 @@ class CommandNSSASetGreet : public CommandNSSetGreet
bool OnHelp(User *u, const Anope::string &)
{
- notice_help(Config.s_NickServ, u, NICK_HELP_SASET_GREET);
+ notice_help(Config->s_NickServ, u, NICK_HELP_SASET_GREET);
return true;
}
void OnServHelp(User *u)
{
- notice_lang(Config.s_NickServ, u, NICK_HELP_CMD_SASET_GREET);
+ notice_lang(Config->s_NickServ, u, NICK_HELP_CMD_SASET_GREET);
}
};
diff --git a/modules/core/ns_set_hide.cpp b/modules/core/ns_set_hide.cpp
index 631df77bb..b8487027d 100644
--- a/modules/core/ns_set_hide.cpp
+++ b/modules/core/ns_set_hide.cpp
@@ -65,12 +65,12 @@ class CommandNSSetHide : public Command
if (arg.equals_ci("ON"))
{
nc->SetFlag(flag);
- notice_lang(Config.s_NickServ, u, onmsg, nc->display.c_str(), Config.s_NickServ.c_str());
+ notice_lang(Config->s_NickServ, u, onmsg, nc->display.c_str(), Config->s_NickServ.c_str());
}
else if (arg.equals_ci("OFF"))
{
nc->UnsetFlag(flag);
- notice_lang(Config.s_NickServ, u, offmsg, nc->display.c_str(), Config.s_NickServ.c_str());
+ notice_lang(Config->s_NickServ, u, offmsg, nc->display.c_str(), Config->s_NickServ.c_str());
}
else
this->OnSyntaxError(u, "HIDE");
@@ -80,18 +80,18 @@ class CommandNSSetHide : public Command
bool OnHelp(User *u, const Anope::string &)
{
- notice_help(Config.s_NickServ, u, NICK_HELP_SET_HIDE);
+ notice_help(Config->s_NickServ, u, NICK_HELP_SET_HIDE);
return true;
}
void OnSyntaxError(User *u, const Anope::string &)
{
- syntax_error(Config.s_NickServ, u, "SET HIDE", NICK_SET_HIDE_SYNTAX);
+ syntax_error(Config->s_NickServ, u, "SET HIDE", NICK_SET_HIDE_SYNTAX);
}
void OnServHelp(User *u)
{
- notice_lang(Config.s_NickServ, u, NICK_HELP_CMD_SET_HIDE);
+ notice_lang(Config->s_NickServ, u, NICK_HELP_CMD_SET_HIDE);
}
};
@@ -104,18 +104,18 @@ class CommandNSSASetHide : public CommandNSSetHide
bool OnHelp(User *u, const Anope::string &)
{
- notice_help(Config.s_NickServ, u, NICK_HELP_SASET_HIDE);
+ notice_help(Config->s_NickServ, u, NICK_HELP_SASET_HIDE);
return true;
}
void OnSyntaxError(User *u, const Anope::string &)
{
- syntax_error(Config.s_NickServ, u, "SASET HIDE", NICK_SASET_HIDE_SYNTAX);
+ syntax_error(Config->s_NickServ, u, "SASET HIDE", NICK_SASET_HIDE_SYNTAX);
}
void OnServHelp(User *u)
{
- notice_lang(Config.s_NickServ, u, NICK_HELP_CMD_SASET_HIDE);
+ notice_lang(Config->s_NickServ, u, NICK_HELP_CMD_SASET_HIDE);
}
};
diff --git a/modules/core/ns_set_kill.cpp b/modules/core/ns_set_kill.cpp
index c85570d87..2a3448232 100644
--- a/modules/core/ns_set_kill.cpp
+++ b/modules/core/ns_set_kill.cpp
@@ -34,33 +34,33 @@ class CommandNSSetKill : public Command
nc->SetFlag(NI_KILLPROTECT);
nc->UnsetFlag(NI_KILL_QUICK);
nc->UnsetFlag(NI_KILL_IMMED);
- notice_lang(Config.s_NickServ, u, NICK_SASET_KILL_ON, nc->display.c_str());
+ notice_lang(Config->s_NickServ, u, NICK_SASET_KILL_ON, nc->display.c_str());
}
else if (param.equals_ci("QUICK"))
{
nc->SetFlag(NI_KILLPROTECT);
nc->SetFlag(NI_KILL_QUICK);
nc->UnsetFlag(NI_KILL_IMMED);
- notice_lang(Config.s_NickServ, u, NICK_SASET_KILL_QUICK, nc->display.c_str());
+ notice_lang(Config->s_NickServ, u, NICK_SASET_KILL_QUICK, nc->display.c_str());
}
else if (param.equals_ci("IMMED"))
{
- if (Config.NSAllowKillImmed)
+ if (Config->NSAllowKillImmed)
{
nc->SetFlag(NI_KILLPROTECT);
nc->SetFlag(NI_KILL_IMMED);
nc->UnsetFlag(NI_KILL_QUICK);
- notice_lang(Config.s_NickServ, u, NICK_SASET_KILL_IMMED, nc->display.c_str());
+ notice_lang(Config->s_NickServ, u, NICK_SASET_KILL_IMMED, nc->display.c_str());
}
else
- notice_lang(Config.s_NickServ, u, NICK_SASET_KILL_IMMED_DISABLED);
+ notice_lang(Config->s_NickServ, u, NICK_SASET_KILL_IMMED_DISABLED);
}
else if (param.equals_ci("OFF"))
{
nc->UnsetFlag(NI_KILLPROTECT);
nc->UnsetFlag(NI_KILL_QUICK);
nc->UnsetFlag(NI_KILL_IMMED);
- notice_lang(Config.s_NickServ, u, NICK_SASET_KILL_OFF, nc->display.c_str());
+ notice_lang(Config->s_NickServ, u, NICK_SASET_KILL_OFF, nc->display.c_str());
}
else
this->OnSyntaxError(u, "KILL");
@@ -70,18 +70,18 @@ class CommandNSSetKill : public Command
bool OnHelp(User *u, const Anope::string &)
{
- notice_help(Config.s_NickServ, u, NICK_HELP_SET_KILL);
+ notice_help(Config->s_NickServ, u, NICK_HELP_SET_KILL);
return true;
}
void OnSyntaxError(User *u, const Anope::string &)
{
- syntax_error(Config.s_NickServ, u, "SET KILL", Config.NSAllowKillImmed ? NICK_SET_KILL_IMMED_SYNTAX : NICK_SET_KILL_SYNTAX);
+ syntax_error(Config->s_NickServ, u, "SET KILL", Config->NSAllowKillImmed ? NICK_SET_KILL_IMMED_SYNTAX : NICK_SET_KILL_SYNTAX);
}
void OnServHelp(User *u)
{
- notice_lang(Config.s_NickServ, u, NICK_HELP_CMD_SET_KILL);
+ notice_lang(Config->s_NickServ, u, NICK_HELP_CMD_SET_KILL);
}
};
@@ -94,18 +94,18 @@ class CommandNSSASetKill : public CommandNSSetKill
bool OnHelp(User *u, const Anope::string &)
{
- notice_help(Config.s_NickServ, u, NICK_HELP_SASET_KILL);
+ notice_help(Config->s_NickServ, u, NICK_HELP_SASET_KILL);
return true;
}
void OnSyntaxError(User *u, const Anope::string &)
{
- syntax_error(Config.s_NickServ, u, "SASET KILL", Config.NSAllowKillImmed ? NICK_SASET_KILL_IMMED_SYNTAX : NICK_SASET_KILL_SYNTAX);
+ syntax_error(Config->s_NickServ, u, "SASET KILL", Config->NSAllowKillImmed ? NICK_SASET_KILL_IMMED_SYNTAX : NICK_SASET_KILL_SYNTAX);
}
void OnServHelp(User *u)
{
- notice_lang(Config.s_NickServ, u, NICK_HELP_CMD_SASET_KILL);
+ notice_lang(Config->s_NickServ, u, NICK_HELP_CMD_SASET_KILL);
}
};
diff --git a/modules/core/ns_set_language.cpp b/modules/core/ns_set_language.cpp
index 844826204..084b97769 100644
--- a/modules/core/ns_set_language.cpp
+++ b/modules/core/ns_set_language.cpp
@@ -37,30 +37,30 @@ class CommandNSSetLanguage : public Command
int langnum = convertTo<int>(param) - 1;
if (langnum < 0 || langnum >= NUM_LANGS || langlist[langnum] < 0)
{
- notice_lang(Config.s_NickServ, u, NICK_SET_LANGUAGE_UNKNOWN, langnum + 1, Config.s_NickServ.c_str());
+ notice_lang(Config->s_NickServ, u, NICK_SET_LANGUAGE_UNKNOWN, langnum + 1, Config->s_NickServ.c_str());
return MOD_CONT;
}
nc->language = langlist[langnum];
- notice_lang(Config.s_NickServ, u, NICK_SASET_LANGUAGE_CHANGED);
+ notice_lang(Config->s_NickServ, u, NICK_SASET_LANGUAGE_CHANGED);
return MOD_CONT;
}
bool OnHelp(User *u, const Anope::string &)
{
- notice_help(Config.s_NickServ, u, NICK_HELP_SET_LANGUAGE);
+ notice_help(Config->s_NickServ, u, NICK_HELP_SET_LANGUAGE);
return true;
}
void OnSyntaxError(User *u, const Anope::string &)
{
- syntax_error(Config.s_NickServ, u, "SET LANGUAGE", NICK_SET_LANGUAGE_SYNTAX);
+ syntax_error(Config->s_NickServ, u, "SET LANGUAGE", NICK_SET_LANGUAGE_SYNTAX);
}
void OnServHelp(User *u)
{
- notice_lang(Config.s_NickServ, u, NICK_HELP_CMD_SET_LANGUAGE);
+ notice_lang(Config->s_NickServ, u, NICK_HELP_CMD_SET_LANGUAGE);
}
};
@@ -73,18 +73,18 @@ class CommandNSSASetLanguage : public CommandNSSetLanguage
bool OnHelp(User *u, const Anope::string &)
{
- notice_help(Config.s_NickServ, u, NICK_HELP_SASET_LANGUAGE);
+ notice_help(Config->s_NickServ, u, NICK_HELP_SASET_LANGUAGE);
return true;
}
void OnSyntaxError(User *u, const Anope::string &)
{
- syntax_error(Config.s_NickServ, u, "SASET LANGUAGE", NICK_SASET_LANGUAGE_SYNTAX);
+ syntax_error(Config->s_NickServ, u, "SASET LANGUAGE", NICK_SASET_LANGUAGE_SYNTAX);
}
void OnServHelp(User *u)
{
- notice_lang(Config.s_NickServ, u, NICK_HELP_CMD_SASET_LANGUAGE);
+ notice_lang(Config->s_NickServ, u, NICK_HELP_CMD_SASET_LANGUAGE);
}
};
diff --git a/modules/core/ns_set_message.cpp b/modules/core/ns_set_message.cpp
index 2152777f6..07d64733f 100644
--- a/modules/core/ns_set_message.cpp
+++ b/modules/core/ns_set_message.cpp
@@ -26,9 +26,9 @@ class CommandNSSetMessage : public Command
if (!nc)
throw CoreException("NULL nc in CommandNSSetMessage");
- if (!Config.UsePrivmsg)
+ if (!Config->UsePrivmsg)
{
- notice_lang(Config.s_NickServ, u, NICK_SASET_OPTION_DISABLED, "MSG");
+ notice_lang(Config->s_NickServ, u, NICK_SASET_OPTION_DISABLED, "MSG");
return MOD_CONT;
}
@@ -37,12 +37,12 @@ class CommandNSSetMessage : public Command
if (param.equals_ci("ON"))
{
nc->SetFlag(NI_MSG);
- notice_lang(Config.s_NickServ, u, NICK_SASET_MSG_ON, nc->display.c_str());
+ notice_lang(Config->s_NickServ, u, NICK_SASET_MSG_ON, nc->display.c_str());
}
else if (param.equals_ci("OFF"))
{
nc->UnsetFlag(NI_MSG);
- notice_lang(Config.s_NickServ, u, NICK_SASET_MSG_OFF, nc->display.c_str());
+ notice_lang(Config->s_NickServ, u, NICK_SASET_MSG_OFF, nc->display.c_str());
}
else
this->OnSyntaxError(u, "MSG");
@@ -52,18 +52,18 @@ class CommandNSSetMessage : public Command
bool OnHelp(User *u, const Anope::string &)
{
- notice_help(Config.s_NickServ, u, NICK_HELP_SET_MSG);
+ notice_help(Config->s_NickServ, u, NICK_HELP_SET_MSG);
return true;
}
void OnSyntaxError(User *u, const Anope::string &)
{
- syntax_error(Config.s_NickServ, u, "SET MSG", NICK_SET_MSG_SYNTAX);
+ syntax_error(Config->s_NickServ, u, "SET MSG", NICK_SET_MSG_SYNTAX);
}
void OnServHelp(User *u)
{
- notice_lang(Config.s_NickServ, u, NICK_HELP_CMD_SET_MSG);
+ notice_lang(Config->s_NickServ, u, NICK_HELP_CMD_SET_MSG);
}
};
@@ -76,18 +76,18 @@ class CommandNSSASetMessage : public CommandNSSetMessage
bool OnHelp(User *u, const Anope::string &)
{
- notice_help(Config.s_NickServ, u, NICK_HELP_SASET_MSG);
+ notice_help(Config->s_NickServ, u, NICK_HELP_SASET_MSG);
return true;
}
void OnSyntaxError(User *u, const Anope::string &)
{
- syntax_error(Config.s_NickServ, u, "SASET MSG", NICK_SASET_MSG_SYNTAX);
+ syntax_error(Config->s_NickServ, u, "SASET MSG", NICK_SASET_MSG_SYNTAX);
}
void OnServHelp(User *u)
{
- notice_lang(Config.s_NickServ, u, NICK_HELP_CMD_SASET_MSG);
+ notice_lang(Config->s_NickServ, u, NICK_HELP_CMD_SASET_MSG);
}
};
diff --git a/modules/core/ns_set_private.cpp b/modules/core/ns_set_private.cpp
index 776d8fcad..03f52515a 100644
--- a/modules/core/ns_set_private.cpp
+++ b/modules/core/ns_set_private.cpp
@@ -31,12 +31,12 @@ class CommandNSSetPrivate : public Command
if (param.equals_ci("ON"))
{
nc->SetFlag(NI_PRIVATE);
- notice_lang(Config.s_NickServ, u, NICK_SASET_PRIVATE_ON, nc->display.c_str());
+ notice_lang(Config->s_NickServ, u, NICK_SASET_PRIVATE_ON, nc->display.c_str());
}
else if (param.equals_ci("OFF"))
{
nc->UnsetFlag(NI_PRIVATE);
- notice_lang(Config.s_NickServ, u, NICK_SASET_PRIVATE_OFF, nc->display.c_str());
+ notice_lang(Config->s_NickServ, u, NICK_SASET_PRIVATE_OFF, nc->display.c_str());
}
else
this->OnSyntaxError(u, "PRIVATE");
@@ -46,18 +46,18 @@ class CommandNSSetPrivate : public Command
bool OnHelp(User *u, const Anope::string &)
{
- notice_help(Config.s_NickServ, u, NICK_HELP_SET_PRIVATE);
+ notice_help(Config->s_NickServ, u, NICK_HELP_SET_PRIVATE);
return true;
}
void OnSyntaxError(User *u, const Anope::string &)
{
- syntax_error(Config.s_NickServ, u, "SET PRIVATE", NICK_SET_PRIVATE_SYNTAX);
+ syntax_error(Config->s_NickServ, u, "SET PRIVATE", NICK_SET_PRIVATE_SYNTAX);
}
void OnServHelp(User *u)
{
- notice_help(Config.s_NickServ, u, NICK_HELP_CMD_SET_PRIVATE);
+ notice_help(Config->s_NickServ, u, NICK_HELP_CMD_SET_PRIVATE);
}
};
@@ -70,18 +70,18 @@ class CommandNSSASetPrivate : public CommandNSSetPrivate
bool OnHelp(User *u, const Anope::string &)
{
- notice_help(Config.s_NickServ, u, NICK_HELP_SASET_PRIVATE);
+ notice_help(Config->s_NickServ, u, NICK_HELP_SASET_PRIVATE);
return true;
}
void OnSyntaxError(User *u, const Anope::string &)
{
- syntax_error(Config.s_NickServ, u, "SASET PRIVATE", NICK_SASET_PRIVATE_SYNTAX);
+ syntax_error(Config->s_NickServ, u, "SASET PRIVATE", NICK_SASET_PRIVATE_SYNTAX);
}
void OnServHelp(User *u)
{
- notice_help(Config.s_NickServ, u, NICK_HELP_CMD_SASET_PRIVATE);
+ notice_help(Config->s_NickServ, u, NICK_HELP_CMD_SASET_PRIVATE);
}
};
diff --git a/modules/core/ns_set_secure.cpp b/modules/core/ns_set_secure.cpp
index 035140bf7..dac17d6ae 100644
--- a/modules/core/ns_set_secure.cpp
+++ b/modules/core/ns_set_secure.cpp
@@ -31,12 +31,12 @@ class CommandNSSetSecure : public Command
if (param.equals_ci("ON"))
{
nc->SetFlag(NI_SECURE);
- notice_lang(Config.s_NickServ, u, NICK_SASET_SECURE_ON, nc->display.c_str());
+ notice_lang(Config->s_NickServ, u, NICK_SASET_SECURE_ON, nc->display.c_str());
}
else if (param.equals_ci("OFF"))
{
nc->UnsetFlag(NI_SECURE);
- notice_lang(Config.s_NickServ, u, NICK_SASET_SECURE_OFF, nc->display.c_str());
+ notice_lang(Config->s_NickServ, u, NICK_SASET_SECURE_OFF, nc->display.c_str());
}
else
this->OnSyntaxError(u, "SECURE");
@@ -46,18 +46,18 @@ class CommandNSSetSecure : public Command
bool OnHelp(User *u, const Anope::string &)
{
- notice_help(Config.s_NickServ, u, NICK_HELP_SET_SECURE);
+ notice_help(Config->s_NickServ, u, NICK_HELP_SET_SECURE);
return true;
}
void OnSyntaxError(User *u, const Anope::string &)
{
- syntax_error(Config.s_NickServ, u, "SET SECURE", NICK_SET_SECURE_SYNTAX);
+ syntax_error(Config->s_NickServ, u, "SET SECURE", NICK_SET_SECURE_SYNTAX);
}
void OnServHelp(User *u)
{
- notice_lang(Config.s_NickServ, u, NICK_HELP_CMD_SET_SECURE);
+ notice_lang(Config->s_NickServ, u, NICK_HELP_CMD_SET_SECURE);
}
};
@@ -70,18 +70,18 @@ class CommandNSSASetSecure : public CommandNSSetSecure
bool OnHelp(User *u, const Anope::string &)
{
- notice_help(Config.s_NickServ, u, NICK_HELP_SASET_SECURE);
+ notice_help(Config->s_NickServ, u, NICK_HELP_SASET_SECURE);
return true;
}
void OnSyntaxError(User *u, const Anope::string &)
{
- syntax_error(Config.s_NickServ, u, "SASET SECURE", NICK_SASET_SECURE_SYNTAX);
+ syntax_error(Config->s_NickServ, u, "SASET SECURE", NICK_SASET_SECURE_SYNTAX);
}
void OnServHelp(User *u)
{
- notice_lang(Config.s_NickServ, u, NICK_HELP_CMD_SASET_SECURE);
+ notice_lang(Config->s_NickServ, u, NICK_HELP_CMD_SASET_SECURE);
}
};
diff --git a/modules/core/ns_status.cpp b/modules/core/ns_status.cpp
index 7a92fe819..2ece5c328 100644
--- a/modules/core/ns_status.cpp
+++ b/modules/core/ns_status.cpp
@@ -32,31 +32,31 @@ class CommandNSStatus : public Command
while (sep.GetToken(nickbuf))
{
if (!(u2 = finduser(nickbuf))) /* Nick is not online */
- notice_lang(Config.s_NickServ, u, NICK_STATUS_REPLY, nickbuf.c_str(), 0, "");
+ notice_lang(Config->s_NickServ, u, NICK_STATUS_REPLY, nickbuf.c_str(), 0, "");
else if (u2->IsIdentified() && na && na->nc == u2->Account()) /* Nick is identified */
- notice_lang(Config.s_NickServ, u, NICK_STATUS_REPLY, nickbuf.c_str(), 3, u2->Account()->display.c_str());
+ notice_lang(Config->s_NickServ, u, NICK_STATUS_REPLY, nickbuf.c_str(), 3, u2->Account()->display.c_str());
else if (u2->IsRecognized()) /* Nick is recognised, but NOT identified */
- notice_lang(Config.s_NickServ, u, NICK_STATUS_REPLY, nickbuf.c_str(), 2, u2->Account() ? u2->Account()->display.c_str() : "");
+ notice_lang(Config->s_NickServ, u, NICK_STATUS_REPLY, nickbuf.c_str(), 2, u2->Account() ? u2->Account()->display.c_str() : "");
else if (!na) /* Nick is online, but NOT a registered */
- notice_lang(Config.s_NickServ, u, NICK_STATUS_REPLY, nickbuf.c_str(), 0, "");
+ notice_lang(Config->s_NickServ, u, NICK_STATUS_REPLY, nickbuf.c_str(), 0, "");
else
/* Nick is not identified for the nick, but they could be logged into an account,
* so we tell the user about it
*/
- notice_lang(Config.s_NickServ, u, NICK_STATUS_REPLY, nickbuf.c_str(), 1, u2->Account() ? u2->Account()->display.c_str() : "");
+ notice_lang(Config->s_NickServ, u, NICK_STATUS_REPLY, nickbuf.c_str(), 1, u2->Account() ? u2->Account()->display.c_str() : "");
}
return MOD_CONT;
}
bool OnHelp(User *u, const Anope::string &subcommand)
{
- notice_help(Config.s_NickServ, u, NICK_HELP_STATUS);
+ notice_help(Config->s_NickServ, u, NICK_HELP_STATUS);
return true;
}
void OnServHelp(User *u)
{
- notice_lang(Config.s_NickServ, u, NICK_HELP_CMD_STATUS);
+ notice_lang(Config->s_NickServ, u, NICK_HELP_CMD_STATUS);
}
};
diff --git a/modules/core/ns_suspend.cpp b/modules/core/ns_suspend.cpp
index da8ea4e50..ff5de7768 100644
--- a/modules/core/ns_suspend.cpp
+++ b/modules/core/ns_suspend.cpp
@@ -29,25 +29,25 @@ class CommandNSSuspend : public Command
if (readonly)
{
- notice_lang(Config.s_NickServ, u, READ_ONLY_MODE);
+ notice_lang(Config->s_NickServ, u, READ_ONLY_MODE);
return MOD_CONT;
}
if (!(na = findnick(nick)))
{
- notice_lang(Config.s_NickServ, u, NICK_X_NOT_REGISTERED, nick.c_str());
+ notice_lang(Config->s_NickServ, u, NICK_X_NOT_REGISTERED, nick.c_str());
return MOD_CONT;
}
if (na->HasFlag(NS_FORBIDDEN))
{
- notice_lang(Config.s_NickServ, u, NICK_X_FORBIDDEN, na->nick.c_str());
+ notice_lang(Config->s_NickServ, u, NICK_X_FORBIDDEN, na->nick.c_str());
return MOD_CONT;
}
- if (Config.NSSecureAdmins && na->nc->IsServicesOper())
+ if (Config->NSSecureAdmins && na->nc->IsServicesOper())
{
- notice_lang(Config.s_NickServ, u, ACCESS_DENIED);
+ notice_lang(Config->s_NickServ, u, ACCESS_DENIED);
return MOD_CONT;
}
@@ -73,11 +73,11 @@ class CommandNSSuspend : public Command
}
}
- if (Config.WallForbid)
+ if (Config->WallForbid)
ircdproto->SendGlobops(NickServ, "\2%s\2 used SUSPEND on \2%s\2", u->nick.c_str(), nick.c_str());
- Alog() << Config.s_NickServ << ": " << u->nick << " set SUSPEND for nick " << nick;
- notice_lang(Config.s_NickServ, u, NICK_SUSPEND_SUCCEEDED, nick.c_str());
+ Alog() << Config->s_NickServ << ": " << u->nick << " set SUSPEND for nick " << nick;
+ notice_lang(Config->s_NickServ, u, NICK_SUSPEND_SUCCEEDED, nick.c_str());
FOREACH_MOD(I_OnNickSuspended, OnNickSuspend(na));
@@ -86,18 +86,18 @@ class CommandNSSuspend : public Command
bool OnHelp(User *u, const Anope::string &subcommand)
{
- notice_help(Config.s_NickServ, u, NICK_SERVADMIN_HELP_SUSPEND);
+ notice_help(Config->s_NickServ, u, NICK_SERVADMIN_HELP_SUSPEND);
return true;
}
void OnSyntaxError(User *u, const Anope::string &subcommand)
{
- syntax_error(Config.s_NickServ, u, "SUSPEND", NICK_SUSPEND_SYNTAX);
+ syntax_error(Config->s_NickServ, u, "SUSPEND", NICK_SUSPEND_SYNTAX);
}
void OnServHelp(User *u)
{
- notice_lang(Config.s_NickServ, u, NICK_HELP_CMD_SUSPEND);
+ notice_lang(Config->s_NickServ, u, NICK_HELP_CMD_SUSPEND);
}
};
@@ -115,35 +115,35 @@ class CommandNSUnSuspend : public Command
if (readonly)
{
- notice_lang(Config.s_NickServ, u, READ_ONLY_MODE);
+ notice_lang(Config->s_NickServ, u, READ_ONLY_MODE);
return MOD_CONT;
}
if (!(na = findnick(nick)))
{
- notice_lang(Config.s_NickServ, u, NICK_X_NOT_REGISTERED, nick.c_str());
+ notice_lang(Config->s_NickServ, u, NICK_X_NOT_REGISTERED, nick.c_str());
return MOD_CONT;
}
if (na->HasFlag(NS_FORBIDDEN))
{
- notice_lang(Config.s_NickServ, u, NICK_X_FORBIDDEN, na->nick.c_str());
+ notice_lang(Config->s_NickServ, u, NICK_X_FORBIDDEN, na->nick.c_str());
return MOD_CONT;
}
- if (Config.NSSecureAdmins && na->nc->IsServicesOper())
+ if (Config->NSSecureAdmins && na->nc->IsServicesOper())
{
- notice_lang(Config.s_NickServ, u, ACCESS_DENIED);
+ notice_lang(Config->s_NickServ, u, ACCESS_DENIED);
return MOD_CONT;
}
na->nc->UnsetFlag(NI_SUSPENDED);
- if (Config.WallForbid)
+ if (Config->WallForbid)
ircdproto->SendGlobops(NickServ, "\2%s\2 used UNSUSPEND on \2%s\2", u->nick.c_str(), nick.c_str());
- Alog() << Config.s_NickServ << ": " << u->nick << " set UNSUSPEND for nick " << nick;
- notice_lang(Config.s_NickServ, u, NICK_UNSUSPEND_SUCCEEDED, nick.c_str());
+ Alog() << Config->s_NickServ << ": " << u->nick << " set UNSUSPEND for nick " << nick;
+ notice_lang(Config->s_NickServ, u, NICK_UNSUSPEND_SUCCEEDED, nick.c_str());
FOREACH_MOD(I_OnNickUnsuspended, OnNickUnsuspended(na));
@@ -152,18 +152,18 @@ class CommandNSUnSuspend : public Command
bool OnHelp(User *u, const Anope::string &subcommand)
{
- notice_help(Config.s_NickServ, u, NICK_SERVADMIN_HELP_UNSUSPEND);
+ notice_help(Config->s_NickServ, u, NICK_SERVADMIN_HELP_UNSUSPEND);
return true;
}
void OnSyntaxError(User *u, const Anope::string &subcommand)
{
- syntax_error(Config.s_NickServ, u, "UNSUSPEND", NICK_UNSUSPEND_SYNTAX);
+ syntax_error(Config->s_NickServ, u, "UNSUSPEND", NICK_UNSUSPEND_SYNTAX);
}
void OnServHelp(User *u)
{
- notice_lang(Config.s_NickServ, u, NICK_HELP_CMD_UNSUSPEND);
+ notice_lang(Config->s_NickServ, u, NICK_HELP_CMD_UNSUSPEND);
}
};
diff --git a/modules/core/ns_update.cpp b/modules/core/ns_update.cpp
index 7e4ae6e01..baeae756c 100644
--- a/modules/core/ns_update.cpp
+++ b/modules/core/ns_update.cpp
@@ -34,19 +34,19 @@ class CommandNSUpdate : public Command
na->last_seen = time(NULL);
if (ircd->vhost)
do_on_id(u);
- notice_lang(Config.s_NickServ, u, NICK_UPDATE_SUCCESS, Config.s_NickServ.c_str());
+ notice_lang(Config->s_NickServ, u, NICK_UPDATE_SUCCESS, Config->s_NickServ.c_str());
return MOD_CONT;
}
bool OnHelp(User *u, const Anope::string &)
{
- notice_help(Config.s_NickServ, u, NICK_HELP_UPDATE);
+ notice_help(Config->s_NickServ, u, NICK_HELP_UPDATE);
return true;
}
void OnServHelp(User *u)
{
- notice_lang(Config.s_NickServ, u, NICK_HELP_CMD_UPDATE);
+ notice_lang(Config->s_NickServ, u, NICK_HELP_CMD_UPDATE);
}
};
diff --git a/modules/core/os_akill.cpp b/modules/core/os_akill.cpp
index b46e9ae7f..f550938fb 100644
--- a/modules/core/os_akill.cpp
+++ b/modules/core/os_akill.cpp
@@ -25,11 +25,11 @@ class AkillDelCallback : public NumberList
~AkillDelCallback()
{
if (!Deleted)
- notice_lang(Config.s_OperServ, u, OPER_AKILL_NO_MATCH);
+ notice_lang(Config->s_OperServ, u, OPER_AKILL_NO_MATCH);
else if (Deleted == 1)
- notice_lang(Config.s_OperServ, u, OPER_AKILL_DELETED_ONE);
+ notice_lang(Config->s_OperServ, u, OPER_AKILL_DELETED_ONE);
else
- notice_lang(Config.s_OperServ, u, OPER_AKILL_DELETED_SEVERAL, Deleted);
+ notice_lang(Config->s_OperServ, u, OPER_AKILL_DELETED_SEVERAL, Deleted);
}
void HandleNumber(unsigned Number)
@@ -62,9 +62,9 @@ class AkillListCallback : public NumberList
~AkillListCallback()
{
if (!SentHeader)
- notice_lang(Config.s_OperServ, u, OPER_AKILL_NO_MATCH);
+ notice_lang(Config->s_OperServ, u, OPER_AKILL_NO_MATCH);
else
- notice_lang(Config.s_OperServ, u, END_OF_ANY_LIST, "Akill");
+ notice_lang(Config->s_OperServ, u, END_OF_ANY_LIST, "Akill");
}
void HandleNumber(unsigned Number)
@@ -77,7 +77,7 @@ class AkillListCallback : public NumberList
if (!SentHeader)
{
SentHeader = true;
- notice_lang(Config.s_OperServ, u, OPER_AKILL_LIST_HEADER);
+ notice_lang(Config->s_OperServ, u, OPER_AKILL_LIST_HEADER);
}
DoList(u, x, Number);
@@ -85,7 +85,7 @@ class AkillListCallback : public NumberList
static void DoList(User *u, XLine *x, unsigned Number)
{
- notice_lang(Config.s_OperServ, u, OPER_AKILL_LIST_FORMAT, Number + 1, x->Mask.c_str(), x->Reason.c_str());
+ notice_lang(Config->s_OperServ, u, OPER_AKILL_LIST_FORMAT, Number + 1, x->Mask.c_str(), x->Reason.c_str());
}
};
@@ -106,7 +106,7 @@ class AkillViewCallback : public AkillListCallback
if (!SentHeader)
{
SentHeader = true;
- notice_lang(Config.s_OperServ, u, OPER_AKILL_VIEW_HEADER);
+ notice_lang(Config->s_OperServ, u, OPER_AKILL_VIEW_HEADER);
}
DoList(u, x, Number);
@@ -121,7 +121,7 @@ class AkillViewCallback : public AkillListCallback
strftime_lang(timebuf, sizeof(timebuf), u, STRFTIME_SHORT_DATE_FORMAT, &tm);
Anope::string expirebuf = expire_left(u->Account(), x->Expires);
- notice_lang(Config.s_OperServ, u, OPER_AKILL_VIEW_FORMAT, Number + 1, x->Mask.c_str(), x->By.c_str(), timebuf, expirebuf.c_str(), x->Reason.c_str());
+ notice_lang(Config->s_OperServ, u, OPER_AKILL_VIEW_FORMAT, Number + 1, x->Mask.c_str(), x->By.c_str(), timebuf, expirebuf.c_str(), x->Reason.c_str());
}
};
@@ -142,7 +142,7 @@ class CommandOSAKill : public Command
last_param = 3;
}
- expires = !expiry.empty() ? dotime(expiry) : Config.AutokillExpiry;
+ expires = !expiry.empty() ? dotime(expiry) : Config->AutokillExpiry;
/* If the expiry given does not contain a final letter, it's in days,
* said the doc. Ah well.
*/
@@ -151,7 +151,7 @@ class CommandOSAKill : public Command
/* Do not allow less than a minute expiry time */
if (expires && expires < 60)
{
- notice_lang(Config.s_OperServ, u, BAD_EXPIRY_TIME);
+ notice_lang(Config->s_OperServ, u, BAD_EXPIRY_TIME);
return MOD_CONT;
}
else if (expires > 0)
@@ -173,9 +173,9 @@ class CommandOSAKill : public Command
if (!x)
return MOD_CONT;
- notice_lang(Config.s_OperServ, u, OPER_AKILL_ADDED, mask.c_str());
+ notice_lang(Config->s_OperServ, u, OPER_AKILL_ADDED, mask.c_str());
- if (Config.WallOSAkill)
+ if (Config->WallOSAkill)
{
Anope::string buf;
@@ -209,7 +209,7 @@ class CommandOSAKill : public Command
}
if (readonly)
- notice_lang(Config.s_OperServ, u, READ_ONLY_MODE);
+ notice_lang(Config->s_OperServ, u, READ_ONLY_MODE);
}
else
this->OnSyntaxError(u, "ADD");
@@ -229,7 +229,7 @@ class CommandOSAKill : public Command
if (SGLine->GetList().empty())
{
- notice_lang(Config.s_OperServ, u, OPER_AKILL_LIST_EMPTY);
+ notice_lang(Config->s_OperServ, u, OPER_AKILL_LIST_EMPTY);
return MOD_CONT;
}
@@ -244,18 +244,18 @@ class CommandOSAKill : public Command
if (!x)
{
- notice_lang(Config.s_OperServ, u, OPER_AKILL_NOT_FOUND, mask.c_str());
+ notice_lang(Config->s_OperServ, u, OPER_AKILL_NOT_FOUND, mask.c_str());
return MOD_CONT;
}
FOREACH_MOD(I_OnDelAkill, OnDelAkill(u, x));
AkillDelCallback::DoDel(u, x);
- notice_lang(Config.s_OperServ, u, OPER_AKILL_DELETED, mask.c_str());
+ notice_lang(Config->s_OperServ, u, OPER_AKILL_DELETED, mask.c_str());
}
if (readonly)
- notice_lang(Config.s_OperServ, u, READ_ONLY_MODE);
+ notice_lang(Config->s_OperServ, u, READ_ONLY_MODE);
return MOD_CONT;
}
@@ -264,7 +264,7 @@ class CommandOSAKill : public Command
{
if (SGLine->GetList().empty())
{
- notice_lang(Config.s_OperServ, u, OPER_AKILL_LIST_EMPTY);
+ notice_lang(Config->s_OperServ, u, OPER_AKILL_LIST_EMPTY);
return MOD_CONT;
}
@@ -288,7 +288,7 @@ class CommandOSAKill : public Command
if (!SentHeader)
{
SentHeader = true;
- notice_lang(Config.s_OperServ, u, OPER_AKILL_LIST_HEADER);
+ notice_lang(Config->s_OperServ, u, OPER_AKILL_LIST_HEADER);
}
AkillListCallback::DoList(u, x, i);
@@ -296,9 +296,9 @@ class CommandOSAKill : public Command
}
if (!SentHeader)
- notice_lang(Config.s_OperServ, u, OPER_AKILL_NO_MATCH);
+ notice_lang(Config->s_OperServ, u, OPER_AKILL_NO_MATCH);
else
- notice_lang(Config.s_OperServ, u, END_OF_ANY_LIST, "Akill");
+ notice_lang(Config->s_OperServ, u, END_OF_ANY_LIST, "Akill");
}
return MOD_CONT;
@@ -308,7 +308,7 @@ class CommandOSAKill : public Command
{
if (SGLine->GetList().empty())
{
- notice_lang(Config.s_OperServ, u, OPER_AKILL_LIST_EMPTY);
+ notice_lang(Config->s_OperServ, u, OPER_AKILL_LIST_EMPTY);
return MOD_CONT;
}
@@ -332,7 +332,7 @@ class CommandOSAKill : public Command
if (!SentHeader)
{
SentHeader = true;
- notice_lang(Config.s_OperServ, u, OPER_AKILL_VIEW_HEADER);
+ notice_lang(Config->s_OperServ, u, OPER_AKILL_VIEW_HEADER);
}
AkillViewCallback::DoList(u, x, i);
@@ -340,7 +340,7 @@ class CommandOSAKill : public Command
}
if (!SentHeader)
- notice_lang(Config.s_OperServ, u, OPER_AKILL_NO_MATCH);
+ notice_lang(Config->s_OperServ, u, OPER_AKILL_NO_MATCH);
}
return MOD_CONT;
@@ -350,7 +350,7 @@ class CommandOSAKill : public Command
{
FOREACH_MOD(I_OnDelAkill, OnDelAkill(u, NULL));
SGLine->Clear();
- notice_lang(Config.s_OperServ, u, OPER_AKILL_CLEAR);
+ notice_lang(Config->s_OperServ, u, OPER_AKILL_CLEAR);
return MOD_CONT;
}
@@ -380,18 +380,18 @@ class CommandOSAKill : public Command
bool OnHelp(User *u, const Anope::string &subcommand)
{
- notice_help(Config.s_OperServ, u, OPER_HELP_AKILL);
+ notice_help(Config->s_OperServ, u, OPER_HELP_AKILL);
return true;
}
void OnSyntaxError(User *u, const Anope::string &subcommand)
{
- syntax_error(Config.s_OperServ, u, "AKILL", OPER_AKILL_SYNTAX);
+ syntax_error(Config->s_OperServ, u, "AKILL", OPER_AKILL_SYNTAX);
}
void OnServHelp(User *u)
{
- notice_lang(Config.s_OperServ, u, OPER_HELP_CMD_AKILL);
+ notice_lang(Config->s_OperServ, u, OPER_HELP_CMD_AKILL);
}
};
diff --git a/modules/core/os_chankill.cpp b/modules/core/os_chankill.cpp
index 4f8b7f34c..04ce6603c 100644
--- a/modules/core/os_chankill.cpp
+++ b/modules/core/os_chankill.cpp
@@ -35,12 +35,12 @@ class CommandOSChanKill : public Command
last_param = 2;
}
- expires = !expiry.empty() ? dotime(expiry) : Config.ChankillExpiry;
+ expires = !expiry.empty() ? dotime(expiry) : Config->ChankillExpiry;
if (!expiry.empty() && isdigit(expiry[expiry.length() - 1]))
expires *= 86400;
if (expires && expires < 60)
{
- notice_lang(Config.s_OperServ, u, BAD_EXPIRY_TIME);
+ notice_lang(Config->s_OperServ, u, BAD_EXPIRY_TIME);
return MOD_CONT;
}
else if (expires > 0)
@@ -58,7 +58,7 @@ class CommandOSChanKill : public Command
if (!reason.empty())
{
Anope::string realreason;
- if (Config.AddAkiller)
+ if (Config->AddAkiller)
realreason = "[" + u->nick + "] " + reason;
else
realreason = reason;
@@ -75,29 +75,29 @@ class CommandOSChanKill : public Command
SGLine->Add(OperServ, u, "*@" + uc->user->host, expires, realreason);
SGLine->Check(uc->user);
}
- if (Config.WallOSAkill)
+ if (Config->WallOSAkill)
ircdproto->SendGlobops(OperServ, "%s used CHANKILL on %s (%s)", u->nick.c_str(), channel.c_str(), realreason.c_str());
}
else
- notice_lang(Config.s_OperServ, u, CHAN_X_NOT_IN_USE, channel.c_str());
+ notice_lang(Config->s_OperServ, u, CHAN_X_NOT_IN_USE, channel.c_str());
}
return MOD_CONT;
}
bool OnHelp(User *u, const Anope::string &subcommand)
{
- notice_help(Config.s_OperServ, u, OPER_HELP_CHANKILL);
+ notice_help(Config->s_OperServ, u, OPER_HELP_CHANKILL);
return true;
}
void OnSyntaxError(User *u, const Anope::string &subcommand)
{
- syntax_error(Config.s_OperServ, u, "CHANKILL", OPER_CHANKILL_SYNTAX);
+ syntax_error(Config->s_OperServ, u, "CHANKILL", OPER_CHANKILL_SYNTAX);
}
void OnServHelp(User *u)
{
- notice_lang(Config.s_OperServ, u, OPER_HELP_CMD_CHANKILL);
+ notice_lang(Config->s_OperServ, u, OPER_HELP_CMD_CHANKILL);
}
};
diff --git a/modules/core/os_chanlist.cpp b/modules/core/os_chanlist.cpp
index 774a4e2c7..8fcb1c397 100644
--- a/modules/core/os_chanlist.cpp
+++ b/modules/core/os_chanlist.cpp
@@ -35,7 +35,7 @@ class CommandOSChanList : public Command
if (!pattern.empty() && (u2 = finduser(pattern)))
{
- notice_lang(Config.s_OperServ, u, OPER_CHANLIST_HEADER_USER, u2->nick.c_str());
+ notice_lang(Config->s_OperServ, u, OPER_CHANLIST_HEADER_USER, u2->nick.c_str());
for (UChannelList::iterator uit = u2->chans.begin(), uit_end = u2->chans.end(); uit != uit_end; ++uit)
{
@@ -46,12 +46,12 @@ class CommandOSChanList : public Command
if (!cc->chan->HasMode(*it))
continue;
- notice_lang(Config.s_OperServ, u, OPER_CHANLIST_RECORD, cc->chan->name.c_str(), cc->chan->users.size(), chan_get_modes(cc->chan, 1, 1).c_str(), !cc->chan->topic.empty() ? cc->chan->topic.c_str() : "");
+ notice_lang(Config->s_OperServ, u, OPER_CHANLIST_RECORD, cc->chan->name.c_str(), cc->chan->users.size(), chan_get_modes(cc->chan, 1, 1).c_str(), !cc->chan->topic.empty() ? cc->chan->topic.c_str() : "");
}
}
else
{
- notice_lang(Config.s_OperServ, u, OPER_CHANLIST_HEADER);
+ notice_lang(Config->s_OperServ, u, OPER_CHANLIST_HEADER);
for (channel_map::const_iterator cit = ChannelList.begin(), cit_end = ChannelList.end(); cit != cit_end; ++cit)
{
@@ -64,23 +64,23 @@ class CommandOSChanList : public Command
if (!c->HasMode(*it))
continue;
- notice_lang(Config.s_OperServ, u, OPER_CHANLIST_RECORD, c->name.c_str(), c->users.size(), chan_get_modes(c, 1, 1).c_str(), !c->topic.empty() ? c->topic.c_str() : "");
+ notice_lang(Config->s_OperServ, u, OPER_CHANLIST_RECORD, c->name.c_str(), c->users.size(), chan_get_modes(c, 1, 1).c_str(), !c->topic.empty() ? c->topic.c_str() : "");
}
}
- notice_lang(Config.s_OperServ, u, OPER_CHANLIST_END);
+ notice_lang(Config->s_OperServ, u, OPER_CHANLIST_END);
return MOD_CONT;
}
bool OnHelp(User *u, const Anope::string &subcommand)
{
- notice_help(Config.s_OperServ, u, OPER_HELP_CHANLIST);
+ notice_help(Config->s_OperServ, u, OPER_HELP_CHANLIST);
return true;
}
void OnServHelp(User *u)
{
- notice_lang(Config.s_OperServ, u, OPER_HELP_CMD_CHANLIST);
+ notice_lang(Config->s_OperServ, u, OPER_HELP_CMD_CHANLIST);
}
};
diff --git a/modules/core/os_clearmodes.cpp b/modules/core/os_clearmodes.cpp
index ddea9379d..56567568b 100644
--- a/modules/core/os_clearmodes.cpp
+++ b/modules/core/os_clearmodes.cpp
@@ -30,12 +30,12 @@ class CommandOSClearModes : public Command
if (!(c = findchan(chan)))
{
- notice_lang(Config.s_OperServ, u, CHAN_X_NOT_IN_USE, chan.c_str());
+ notice_lang(Config->s_OperServ, u, CHAN_X_NOT_IN_USE, chan.c_str());
return MOD_CONT;
}
else if (c->bouncy_modes)
{
- notice_lang(Config.s_OperServ, u, OPER_BOUNCY_MODES_U_LINE);
+ notice_lang(Config->s_OperServ, u, OPER_BOUNCY_MODES_U_LINE);
return MOD_CONT;
}
else
@@ -52,7 +52,7 @@ class CommandOSClearModes : public Command
}
}
- if (Config.WallOSClearmodes)
+ if (Config->WallOSClearmodes)
ircdproto->SendGlobops(OperServ, "%s used CLEARMODES%s on %s", u->nick.c_str(), all ? " ALL" : "", chan.c_str());
if (all)
{
@@ -148,27 +148,27 @@ class CommandOSClearModes : public Command
}
if (all)
- notice_lang(Config.s_OperServ, u, OPER_CLEARMODES_ALL_DONE, chan.c_str());
+ notice_lang(Config->s_OperServ, u, OPER_CLEARMODES_ALL_DONE, chan.c_str());
else
- notice_lang(Config.s_OperServ, u, OPER_CLEARMODES_DONE, chan.c_str());
+ notice_lang(Config->s_OperServ, u, OPER_CLEARMODES_DONE, chan.c_str());
return MOD_CONT;
}
bool OnHelp(User *u, const Anope::string &subcommand)
{
- notice_help(Config.s_OperServ, u, OPER_HELP_CLEARMODES);
+ notice_help(Config->s_OperServ, u, OPER_HELP_CLEARMODES);
return true;
}
void OnSyntaxError(User *u, const Anope::string &subcommand)
{
- syntax_error(Config.s_OperServ, u, "CLEARMODES", OPER_CLEARMODES_SYNTAX);
+ syntax_error(Config->s_OperServ, u, "CLEARMODES", OPER_CLEARMODES_SYNTAX);
}
void OnServHelp(User *u)
{
- notice_lang(Config.s_OperServ, u, OPER_HELP_CMD_CLEARMODES);
+ notice_lang(Config->s_OperServ, u, OPER_HELP_CMD_CLEARMODES);
}
};
diff --git a/modules/core/os_defcon.cpp b/modules/core/os_defcon.cpp
index ca7f2ace4..e52b25269 100644
--- a/modules/core/os_defcon.cpp
+++ b/modules/core/os_defcon.cpp
@@ -24,26 +24,26 @@ class DefConTimeout : public Timer
int level;
public:
- DefConTimeout(int newlevel) : Timer(Config.DefConTimeOut), level(newlevel) { }
+ DefConTimeout(int newlevel) : Timer(Config->DefConTimeOut), level(newlevel) { }
void Tick(time_t)
{
- if (Config.DefConLevel != level)
+ if (Config->DefConLevel != level)
{
- Config.DefConLevel = level;
+ Config->DefConLevel = level;
FOREACH_MOD(I_OnDefconLevel, OnDefconLevel(level));
Alog() << "Defcon level timeout, returning to lvl " << level;
- ircdproto->SendGlobops(OperServ, getstring(OPER_DEFCON_WALL), Config.s_OperServ.c_str(), level);
+ ircdproto->SendGlobops(OperServ, getstring(OPER_DEFCON_WALL), Config->s_OperServ.c_str(), level);
- if (Config.GlobalOnDefcon)
+ if (Config->GlobalOnDefcon)
{
- if (!Config.DefConOffMessage.empty())
- oper_global("", "%s", Config.DefConOffMessage.c_str());
+ if (!Config->DefConOffMessage.empty())
+ oper_global("", "%s", Config->DefConOffMessage.c_str());
else
- oper_global("", getstring(DEFCON_GLOBAL), Config.DefConLevel);
+ oper_global("", getstring(DEFCON_GLOBAL), Config->DefConLevel);
- if (Config.GlobalOnDefconMore && Config.DefConOffMessage.empty())
- oper_global("", "%s", Config.DefconMessage.c_str());
+ if (Config->GlobalOnDefconMore && Config->DefConOffMessage.empty())
+ oper_global("", "%s", Config->DefconMessage.c_str());
}
runDefCon();
@@ -67,7 +67,7 @@ class CommandOSDefcon : public Command
if (lvl.empty())
{
- notice_lang(Config.s_OperServ, u, OPER_DEFCON_CHANGED, Config.DefConLevel);
+ notice_lang(Config->s_OperServ, u, OPER_DEFCON_CHANGED, Config->DefConLevel);
defcon_sendlvls(u);
return MOD_CONT;
}
@@ -77,7 +77,7 @@ class CommandOSDefcon : public Command
this->OnSyntaxError(u, "");
return MOD_CONT;
}
- Config.DefConLevel = newLevel;
+ Config->DefConLevel = newLevel;
FOREACH_MOD(I_OnDefconLevel, OnDefconLevel(newLevel));
@@ -87,26 +87,26 @@ class CommandOSDefcon : public Command
timeout = NULL;
}
- if (Config.DefConTimeOut)
+ if (Config->DefConTimeOut)
timeout = new DefConTimeout(5);
- notice_lang(Config.s_OperServ, u, OPER_DEFCON_CHANGED, Config.DefConLevel);
+ notice_lang(Config->s_OperServ, u, OPER_DEFCON_CHANGED, Config->DefConLevel);
defcon_sendlvls(u);
Alog() << "Defcon level changed to " << newLevel << " by Oper " << u->nick;
ircdproto->SendGlobops(OperServ, getstring(OPER_DEFCON_WALL), u->nick.c_str(), newLevel);
/* Global notice the user what is happening. Also any Message that
the Admin would like to add. Set in config file. */
- if (Config.GlobalOnDefcon)
+ if (Config->GlobalOnDefcon)
{
- if (Config.DefConLevel == 5 && !Config.DefConOffMessage.empty())
- oper_global("", "%s", Config.DefConOffMessage.c_str());
+ if (Config->DefConLevel == 5 && !Config->DefConOffMessage.empty())
+ oper_global("", "%s", Config->DefConOffMessage.c_str());
else
- oper_global("", langglobal, Config.DefConLevel);
+ oper_global("", langglobal, Config->DefConLevel);
}
- if (Config.GlobalOnDefconMore)
+ if (Config->GlobalOnDefconMore)
{
- if (Config.DefConOffMessage.empty() || Config.DefConLevel != 5)
- oper_global("", "%s", Config.DefconMessage.c_str());
+ if (Config->DefConOffMessage.empty() || Config->DefConLevel != 5)
+ oper_global("", "%s", Config->DefconMessage.c_str());
}
/* Run any defcon functions, e.g. FORCE CHAN MODE */
runDefCon();
@@ -115,18 +115,18 @@ class CommandOSDefcon : public Command
bool OnHelp(User *u, const Anope::string &subcommand)
{
- notice_help(Config.s_OperServ, u, OPER_HELP_DEFCON);
+ notice_help(Config->s_OperServ, u, OPER_HELP_DEFCON);
return true;
}
void OnSyntaxError(User *u, const Anope::string &subcommand)
{
- syntax_error(Config.s_OperServ, u, "DEFCON", OPER_DEFCON_SYNTAX);
+ syntax_error(Config->s_OperServ, u, "DEFCON", OPER_DEFCON_SYNTAX);
}
void OnServHelp(User *u)
{
- notice_lang(Config.s_OperServ, u, OPER_HELP_CMD_DEFCON);
+ notice_lang(Config->s_OperServ, u, OPER_HELP_CMD_DEFCON);
}
};
@@ -137,7 +137,7 @@ class OSDefcon : public Module
public:
OSDefcon(const Anope::string &modname, const Anope::string &creator) : Module(modname, creator)
{
- if (!Config.DefConLevel)
+ if (!Config->DefConLevel)
throw ModuleException("Invalid configuration settings");
this->SetAuthor("Anope");
@@ -148,7 +148,7 @@ class OSDefcon : public Module
this->AddCommand(OperServ, &commandosdefcon);
- defconParseModeString(Config.DefConChanModes);
+ defconParseModeString(Config->DefConChanModes);
}
EventReturn OnPreUserConnect(User *u)
@@ -158,13 +158,13 @@ class OSDefcon : public Module
if (CheckDefCon(DEFCON_AKILL_NEW_CLIENTS))
{
Alog() << "DEFCON: adding akill for *@" << u->host;
- XLine *x = SGLine->Add(NULL, NULL, "*@" + u->host, time(NULL) + Config.DefConAKILL, !Config.DefConAkillReason.empty() ? Config.DefConAkillReason : "DEFCON AKILL");
+ XLine *x = SGLine->Add(NULL, NULL, "*@" + u->host, time(NULL) + Config->DefConAKILL, !Config->DefConAkillReason.empty() ? Config->DefConAkillReason : "DEFCON AKILL");
if (x)
- x->By = Config.s_OperServ;
+ x->By = Config->s_OperServ;
}
if (CheckDefCon(DEFCON_NO_NEW_CLIENTS) || CheckDefCon(DEFCON_AKILL_NEW_CLIENTS))
- kill_user(Config.s_OperServ, u->nick, Config.DefConAkillReason);
+ kill_user(Config->s_OperServ, u->nick, Config->DefConAkillReason);
return EVENT_STOP;
}
@@ -226,24 +226,24 @@ class OSDefcon : public Module
EventReturn OnPreCommand(User *u, BotInfo *service, const Anope::string &command, const std::vector<Anope::string> &params)
{
- if (service == findbot(Config.s_NickServ))
+ if (service == findbot(Config->s_NickServ))
{
if (command.equals_ci("REGISTER") || command.equals_ci("GROUP"))
{
if (CheckDefCon(DEFCON_NO_NEW_NICKS))
{
- notice_lang(Config.s_NickServ, u, OPER_DEFCON_DENIED);
+ notice_lang(Config->s_NickServ, u, OPER_DEFCON_DENIED);
return EVENT_STOP;
}
}
}
- else if (service == findbot(Config.s_ChanServ))
+ else if (service == findbot(Config->s_ChanServ))
{
if (command.equals_ci("SET"))
{
if (!params.empty() && params[0].equals_ci("MLOCK") && CheckDefCon(DEFCON_NO_MLOCK_CHANGE))
{
- notice_lang(Config.s_ChanServ, u, OPER_DEFCON_DENIED);
+ notice_lang(Config->s_ChanServ, u, OPER_DEFCON_DENIED);
return EVENT_STOP;
}
}
@@ -251,18 +251,18 @@ class OSDefcon : public Module
{
if (CheckDefCon(DEFCON_NO_NEW_CHANNELS))
{
- notice_lang(Config.s_ChanServ, u, OPER_DEFCON_DENIED);
+ notice_lang(Config->s_ChanServ, u, OPER_DEFCON_DENIED);
return EVENT_STOP;
}
}
}
- else if (service == findbot(Config.s_MemoServ))
+ else if (service == findbot(Config->s_MemoServ))
{
if (command.equals_ci("SEND") || command.equals_ci("SENDALL"))
{
if (CheckDefCon(DEFCON_NO_NEW_MEMOS))
{
- notice_lang(Config.s_MemoServ, u, OPER_DEFCON_DENIED);
+ notice_lang(Config->s_MemoServ, u, OPER_DEFCON_DENIED);
return EVENT_STOP;
}
}
@@ -278,18 +278,18 @@ class OSDefcon : public Module
if (CheckDefCon(DEFCON_REDUCE_SESSION) && !exception)
{
- if (session && session->count > Config.DefConSessionLimit)
+ if (session && session->count > Config->DefConSessionLimit)
{
- if (!Config.SessionLimitExceeded.empty())
- ircdproto->SendMessage(OperServ, u->nick, Config.SessionLimitExceeded.c_str(), u->host.c_str());
- if (!Config.SessionLimitDetailsLoc.empty())
- ircdproto->SendMessage(OperServ, u->nick, "%s", Config.SessionLimitDetailsLoc.c_str());
+ if (!Config->SessionLimitExceeded.empty())
+ ircdproto->SendMessage(OperServ, u->nick, Config->SessionLimitExceeded.c_str(), u->host.c_str());
+ if (!Config->SessionLimitDetailsLoc.empty())
+ ircdproto->SendMessage(OperServ, u->nick, "%s", Config->SessionLimitDetailsLoc.c_str());
- kill_user(Config.s_OperServ, u->nick, "Session limit exceeded");
+ kill_user(Config->s_OperServ, u->nick, "Session limit exceeded");
++session->hits;
- if (Config.MaxSessionKill && session->hits >= Config.MaxSessionKill)
+ if (Config->MaxSessionKill && session->hits >= Config->MaxSessionKill)
{
- SGLine->Add(NULL, NULL, "*@" + u->host, time(NULL) + Config.SessionAutoKillExpiry, "Session limit exceeded");
+ SGLine->Add(NULL, NULL, "*@" + u->host, time(NULL) + Config->SessionAutoKillExpiry, "Session limit exceeded");
ircdproto->SendGlobops(OperServ, "Added a temporary AKILL for \2*@%s\2 due to excessive connections", u->host.c_str());
}
}
@@ -298,22 +298,22 @@ class OSDefcon : public Module
void OnChannelModeAdd(ChannelMode *cm)
{
- if (!Config.DefConChanModes.empty())
+ if (!Config->DefConChanModes.empty())
{
- Anope::string modes = Config.DefConChanModes;
+ Anope::string modes = Config->DefConChanModes;
if (modes.find(cm->ModeChar) != Anope::string::npos)
/* New mode has been added to Anope, check to see if defcon
* requires it
*/
- defconParseModeString(Config.DefConChanModes);
+ defconParseModeString(Config->DefConChanModes);
}
}
void OnChannelCreate(Channel *c)
{
if (CheckDefCon(DEFCON_FORCE_CHAN_MODES))
- c->SetModes(OperServ, false, "%s", Config.DefConChanModes.c_str());
+ c->SetModes(OperServ, false, "%s", Config->DefConChanModes.c_str());
}
};
@@ -323,49 +323,49 @@ class OSDefcon : public Module
void defcon_sendlvls(User *u)
{
if (CheckDefCon(DEFCON_NO_NEW_CHANNELS))
- notice_lang(Config.s_OperServ, u, OPER_HELP_DEFCON_NO_NEW_CHANNELS);
+ notice_lang(Config->s_OperServ, u, OPER_HELP_DEFCON_NO_NEW_CHANNELS);
if (CheckDefCon(DEFCON_NO_NEW_NICKS))
- notice_lang(Config.s_OperServ, u, OPER_HELP_DEFCON_NO_NEW_NICKS);
+ notice_lang(Config->s_OperServ, u, OPER_HELP_DEFCON_NO_NEW_NICKS);
if (CheckDefCon(DEFCON_NO_MLOCK_CHANGE))
- notice_lang(Config.s_OperServ, u, OPER_HELP_DEFCON_NO_MLOCK_CHANGE);
- if (CheckDefCon(DEFCON_FORCE_CHAN_MODES) && !Config.DefConChanModes.empty())
- notice_lang(Config.s_OperServ, u, OPER_HELP_DEFCON_FORCE_CHAN_MODES, Config.DefConChanModes.c_str());
+ notice_lang(Config->s_OperServ, u, OPER_HELP_DEFCON_NO_MLOCK_CHANGE);
+ if (CheckDefCon(DEFCON_FORCE_CHAN_MODES) && !Config->DefConChanModes.empty())
+ notice_lang(Config->s_OperServ, u, OPER_HELP_DEFCON_FORCE_CHAN_MODES, Config->DefConChanModes.c_str());
if (CheckDefCon(DEFCON_REDUCE_SESSION))
- notice_lang(Config.s_OperServ, u, OPER_HELP_DEFCON_REDUCE_SESSION, Config.DefConSessionLimit);
+ notice_lang(Config->s_OperServ, u, OPER_HELP_DEFCON_REDUCE_SESSION, Config->DefConSessionLimit);
if (CheckDefCon(DEFCON_NO_NEW_CLIENTS))
- notice_lang(Config.s_OperServ, u, OPER_HELP_DEFCON_NO_NEW_CLIENTS);
+ notice_lang(Config->s_OperServ, u, OPER_HELP_DEFCON_NO_NEW_CLIENTS);
if (CheckDefCon(DEFCON_OPER_ONLY))
- notice_lang(Config.s_OperServ, u, OPER_HELP_DEFCON_OPER_ONLY);
+ notice_lang(Config->s_OperServ, u, OPER_HELP_DEFCON_OPER_ONLY);
if (CheckDefCon(DEFCON_SILENT_OPER_ONLY))
- notice_lang(Config.s_OperServ, u, OPER_HELP_DEFCON_SILENT_OPER_ONLY);
+ notice_lang(Config->s_OperServ, u, OPER_HELP_DEFCON_SILENT_OPER_ONLY);
if (CheckDefCon(DEFCON_AKILL_NEW_CLIENTS))
- notice_lang(Config.s_OperServ, u, OPER_HELP_DEFCON_AKILL_NEW_CLIENTS);
+ notice_lang(Config->s_OperServ, u, OPER_HELP_DEFCON_AKILL_NEW_CLIENTS);
if (CheckDefCon(DEFCON_NO_NEW_MEMOS))
- notice_lang(Config.s_OperServ, u, OPER_HELP_DEFCON_NO_NEW_MEMOS);
+ notice_lang(Config->s_OperServ, u, OPER_HELP_DEFCON_NO_NEW_MEMOS);
}
void runDefCon()
{
if (CheckDefCon(DEFCON_FORCE_CHAN_MODES))
{
- if (!Config.DefConChanModes.empty() && !DefConModesSet)
+ if (!Config->DefConChanModes.empty() && !DefConModesSet)
{
- if (Config.DefConChanModes[0] == '+' || Config.DefConChanModes[0] == '-')
+ if (Config->DefConChanModes[0] == '+' || Config->DefConChanModes[0] == '-')
{
- Alog() << "DEFCON: setting " << Config.DefConChanModes << " on all channels";
+ Alog() << "DEFCON: setting " << Config->DefConChanModes << " on all channels";
DefConModesSet = true;
- MassChannelModes(OperServ, Config.DefConChanModes);
+ MassChannelModes(OperServ, Config->DefConChanModes);
}
}
}
else
{
- if (!Config.DefConChanModes.empty() && DefConModesSet)
+ if (!Config->DefConChanModes.empty() && DefConModesSet)
{
- if (Config.DefConChanModes[0] == '+' || Config.DefConChanModes[0] == '-')
+ if (Config->DefConChanModes[0] == '+' || Config->DefConChanModes[0] == '-')
{
DefConModesSet = false;
- Anope::string newmodes = defconReverseModes(Config.DefConChanModes);
+ Anope::string newmodes = defconReverseModes(Config->DefConChanModes);
if (!newmodes.empty())
{
Alog() << "DEFCON: setting " << newmodes << " on all channels";
diff --git a/modules/core/os_global.cpp b/modules/core/os_global.cpp
index 01c4dee5f..949421470 100644
--- a/modules/core/os_global.cpp
+++ b/modules/core/os_global.cpp
@@ -24,7 +24,7 @@ class CommandOSGlobal : public Command
{
Anope::string msg = params[0];
- if (Config.WallOSGlobal)
+ if (Config->WallOSGlobal)
ircdproto->SendGlobops(OperServ, "\2%s\2 just used GLOBAL command.", u->nick.c_str());
oper_global(u->nick, "%s", msg.c_str());
return MOD_CONT;
@@ -32,18 +32,18 @@ class CommandOSGlobal : public Command
bool OnHelp(User *u, const Anope::string &subcommand)
{
- notice_help(Config.s_OperServ, u, OPER_HELP_GLOBAL, Config.s_GlobalNoticer.c_str());
+ notice_help(Config->s_OperServ, u, OPER_HELP_GLOBAL, Config->s_GlobalNoticer.c_str());
return true;
}
void OnSyntaxError(User *u, const Anope::string &subcommand)
{
- syntax_error(Config.s_OperServ, u, "GLOBAL", OPER_GLOBAL_SYNTAX);
+ syntax_error(Config->s_OperServ, u, "GLOBAL", OPER_GLOBAL_SYNTAX);
}
void OnServHelp(User *u)
{
- notice_lang(Config.s_OperServ, u, OPER_HELP_CMD_GLOBAL);
+ notice_lang(Config->s_OperServ, u, OPER_HELP_CMD_GLOBAL);
}
};
diff --git a/modules/core/os_help.cpp b/modules/core/os_help.cpp
index ad26fb2d6..229dce8ee 100644
--- a/modules/core/os_help.cpp
+++ b/modules/core/os_help.cpp
@@ -28,11 +28,11 @@ class CommandOSHelp : public Command
void OnSyntaxError(User *u, const Anope::string &subcommand)
{
- notice_help(Config.s_OperServ, u, OPER_HELP);
+ notice_help(Config->s_OperServ, u, OPER_HELP);
for (CommandMap::const_iterator it = OperServ->Commands.begin(), it_end = OperServ->Commands.end(); it != it_end; ++it)
- if (!Config.HidePrivilegedCommands || it->second->permission.empty() || (u->Account() && u->Account()->HasCommand(it->second->permission)))
+ if (!Config->HidePrivilegedCommands || it->second->permission.empty() || (u->Account() && u->Account()->HasCommand(it->second->permission)))
it->second->OnServHelp(u);
- notice_help(Config.s_OperServ, u, OPER_HELP_LOGGED);
+ notice_help(Config->s_OperServ, u, OPER_HELP_LOGGED);
}
};
diff --git a/modules/core/os_ignore.cpp b/modules/core/os_ignore.cpp
index eb15ad3b1..0068691f0 100644
--- a/modules/core/os_ignore.cpp
+++ b/modules/core/os_ignore.cpp
@@ -33,18 +33,18 @@ class CommandOSIgnore : public Command
if (t <= -1)
{
- notice_lang(Config.s_OperServ, u, OPER_IGNORE_VALID_TIME);
+ notice_lang(Config->s_OperServ, u, OPER_IGNORE_VALID_TIME);
return MOD_CONT;
}
else if (!t)
{
add_ignore(nick, t);
- notice_lang(Config.s_OperServ, u, OPER_IGNORE_PERM_DONE, nick.c_str());
+ notice_lang(Config->s_OperServ, u, OPER_IGNORE_PERM_DONE, nick.c_str());
}
else
{
add_ignore(nick, t);
- notice_lang(Config.s_OperServ, u, OPER_IGNORE_TIME_DONE, nick.c_str(), time.c_str());
+ notice_lang(Config->s_OperServ, u, OPER_IGNORE_TIME_DONE, nick.c_str(), time.c_str());
}
}
@@ -55,13 +55,13 @@ class CommandOSIgnore : public Command
{
if (ignore.empty())
{
- notice_lang(Config.s_OperServ, u, OPER_IGNORE_LIST_EMPTY);
+ notice_lang(Config->s_OperServ, u, OPER_IGNORE_LIST_EMPTY);
return MOD_CONT;
}
- notice_lang(Config.s_OperServ, u, OPER_IGNORE_LIST);
+ notice_lang(Config->s_OperServ, u, OPER_IGNORE_LIST);
for (std::list<IgnoreData *>::iterator ign = ignore.begin(), ign_end = ignore.end(); ign != ign_end; ++ign)
- u->SendMessage(Config.s_OperServ, "%s", (*ign)->mask.c_str());
+ u->SendMessage(Config->s_OperServ, "%s", (*ign)->mask.c_str());
return MOD_CONT;
}
@@ -75,10 +75,10 @@ class CommandOSIgnore : public Command
{
if (delete_ignore(nick))
{
- notice_lang(Config.s_OperServ, u, OPER_IGNORE_DEL_DONE, nick.c_str());
+ notice_lang(Config->s_OperServ, u, OPER_IGNORE_DEL_DONE, nick.c_str());
return MOD_CONT;
}
- notice_lang(Config.s_OperServ, u, OPER_IGNORE_LIST_NOMATCH, nick.c_str());
+ notice_lang(Config->s_OperServ, u, OPER_IGNORE_LIST_NOMATCH, nick.c_str());
}
return MOD_CONT;
@@ -87,7 +87,7 @@ class CommandOSIgnore : public Command
CommandReturn DoClear(User *u)
{
clear_ignores();
- notice_lang(Config.s_OperServ, u, OPER_IGNORE_LIST_CLEARED);
+ notice_lang(Config->s_OperServ, u, OPER_IGNORE_LIST_CLEARED);
return MOD_CONT;
}
@@ -116,18 +116,18 @@ class CommandOSIgnore : public Command
bool OnHelp(User *u, const Anope::string &subcommand)
{
- notice_help(Config.s_OperServ, u, OPER_HELP_IGNORE);
+ notice_help(Config->s_OperServ, u, OPER_HELP_IGNORE);
return true;
}
void OnSyntaxError(User *u, const Anope::string &subcommand)
{
- syntax_error(Config.s_OperServ, u, "IGNORE", OPER_IGNORE_SYNTAX);
+ syntax_error(Config->s_OperServ, u, "IGNORE", OPER_IGNORE_SYNTAX);
}
void OnServHelp(User *u)
{
- notice_lang(Config.s_OperServ, u, OPER_HELP_CMD_IGNORE);
+ notice_lang(Config->s_OperServ, u, OPER_HELP_CMD_IGNORE);
}
};
diff --git a/modules/core/os_jupe.cpp b/modules/core/os_jupe.cpp
index 220e88abd..8cb78cfd5 100644
--- a/modules/core/os_jupe.cpp
+++ b/modules/core/os_jupe.cpp
@@ -27,9 +27,9 @@ class CommandOSJupe : public Command
Server *server = Server::Find(jserver);
if (!isValidHost(jserver, 3))
- notice_lang(Config.s_OperServ, u, OPER_JUPE_HOST_ERROR);
+ notice_lang(Config->s_OperServ, u, OPER_JUPE_HOST_ERROR);
else if (server && (server == Me || server == Me->GetLinks().front()))
- notice_lang(Config.s_OperServ, u, OPER_JUPE_INVALID_SERVER);
+ notice_lang(Config->s_OperServ, u, OPER_JUPE_INVALID_SERVER);
else
{
Anope::string rbuf = "Juped by " + u->nick + (!reason.empty() ? ": " + reason : "");
@@ -39,7 +39,7 @@ class CommandOSJupe : public Command
juped_server->SetFlag(SERVER_JUPED);
ircdproto->SendServer(juped_server);
- if (Config.WallOSJupe)
+ if (Config->WallOSJupe)
ircdproto->SendGlobops(OperServ, "\2%s\2 used JUPE on \2%s\2", u->nick.c_str(), jserver.c_str());
}
return MOD_CONT;
@@ -47,18 +47,18 @@ class CommandOSJupe : public Command
bool OnHelp(User *u, const Anope::string &subcommand)
{
- notice_help(Config.s_OperServ, u, OPER_HELP_JUPE);
+ notice_help(Config->s_OperServ, u, OPER_HELP_JUPE);
return true;
}
void OnSyntaxError(User *u, const Anope::string &subcommand)
{
- syntax_error(Config.s_OperServ, u, "JUPE", OPER_JUPE_SYNTAX);
+ syntax_error(Config->s_OperServ, u, "JUPE", OPER_JUPE_SYNTAX);
}
void OnServHelp(User *u)
{
- notice_lang(Config.s_OperServ, u, OPER_HELP_CMD_JUPE);
+ notice_lang(Config->s_OperServ, u, OPER_HELP_CMD_JUPE);
}
};
diff --git a/modules/core/os_kick.cpp b/modules/core/os_kick.cpp
index 44a474d04..0cef0ec84 100644
--- a/modules/core/os_kick.cpp
+++ b/modules/core/os_kick.cpp
@@ -28,40 +28,40 @@ class CommandOSKick : public Command
if (!(c = findchan(chan)))
{
- notice_lang(Config.s_OperServ, u, CHAN_X_NOT_IN_USE, chan.c_str());
+ notice_lang(Config->s_OperServ, u, CHAN_X_NOT_IN_USE, chan.c_str());
return MOD_CONT;
}
else if (c->bouncy_modes)
{
- notice_lang(Config.s_OperServ, u, OPER_BOUNCY_MODES_U_LINE);
+ notice_lang(Config->s_OperServ, u, OPER_BOUNCY_MODES_U_LINE);
return MOD_CONT;
}
else if (!(u2 = finduser(nick)))
{
- notice_lang(Config.s_OperServ, u, NICK_X_NOT_IN_USE, nick.c_str());
+ notice_lang(Config->s_OperServ, u, NICK_X_NOT_IN_USE, nick.c_str());
return MOD_CONT;
}
c->Kick(OperServ, u2, "%s (%s)", u->nick.c_str(), s.c_str());
- if (Config.WallOSKick)
+ if (Config->WallOSKick)
ircdproto->SendGlobops(OperServ, "%s used KICK on %s/%s", u->nick.c_str(), u2->nick.c_str(), chan.c_str());
return MOD_CONT;
}
bool OnHelp(User *u, const Anope::string &subcommand)
{
- notice_help(Config.s_OperServ, u, OPER_HELP_KICK);
+ notice_help(Config->s_OperServ, u, OPER_HELP_KICK);
return true;
}
void OnSyntaxError(User *u, const Anope::string &subcommand)
{
- syntax_error(Config.s_OperServ, u, "KICK", OPER_KICK_SYNTAX);
+ syntax_error(Config->s_OperServ, u, "KICK", OPER_KICK_SYNTAX);
}
void OnServHelp(User *u)
{
- notice_lang(Config.s_OperServ, u, OPER_HELP_CMD_KICK);
+ notice_lang(Config->s_OperServ, u, OPER_HELP_CMD_KICK);
}
};
diff --git a/modules/core/os_mode.cpp b/modules/core/os_mode.cpp
index 52d73e88a..fc005624f 100644
--- a/modules/core/os_mode.cpp
+++ b/modules/core/os_mode.cpp
@@ -26,14 +26,14 @@ class CommandOSMode : public Command
Channel *c;
if (!(c = findchan(chan)))
- notice_lang(Config.s_OperServ, u, CHAN_X_NOT_IN_USE, chan.c_str());
+ notice_lang(Config->s_OperServ, u, CHAN_X_NOT_IN_USE, chan.c_str());
else if (c->bouncy_modes)
- notice_lang(Config.s_OperServ, u, OPER_BOUNCY_MODES_U_LINE);
+ notice_lang(Config->s_OperServ, u, OPER_BOUNCY_MODES_U_LINE);
else
{
c->SetModes(OperServ, false, modes.c_str());
- if (Config.WallOSMode)
+ if (Config->WallOSMode)
ircdproto->SendGlobops(OperServ, "%s used MODE %s on %s", u->nick.c_str(), modes.c_str(), chan.c_str());
}
return MOD_CONT;
@@ -41,18 +41,18 @@ class CommandOSMode : public Command
bool OnHelp(User *u, const Anope::string &subcommand)
{
- notice_help(Config.s_OperServ, u, OPER_HELP_MODE);
+ notice_help(Config->s_OperServ, u, OPER_HELP_MODE);
return true;
}
void OnSyntaxError(User *u, const Anope::string &subcommand)
{
- syntax_error(Config.s_OperServ, u, "MODE", OPER_MODE_SYNTAX);
+ syntax_error(Config->s_OperServ, u, "MODE", OPER_MODE_SYNTAX);
}
void OnServHelp(User *u)
{
- notice_lang(Config.s_OperServ, u, OPER_HELP_CMD_MODE);
+ notice_lang(Config->s_OperServ, u, OPER_HELP_CMD_MODE);
}
};
diff --git a/modules/core/os_modinfo.cpp b/modules/core/os_modinfo.cpp
index 83864ef54..d105b6ccf 100644
--- a/modules/core/os_modinfo.cpp
+++ b/modules/core/os_modinfo.cpp
@@ -33,7 +33,7 @@ class CommandOSModInfo : public Command
{
tm = *localtime(&m->created);
strftime_lang(timebuf, sizeof(timebuf), u, STRFTIME_DATE_TIME_FORMAT, &tm);
- notice_lang(Config.s_OperServ, u, OPER_MODULE_INFO_LIST, m->name.c_str(), !m->version.empty() ? m->version.c_str() : "?", !m->author.empty() ? m->author.c_str() : "?", timebuf);
+ notice_lang(Config->s_OperServ, u, OPER_MODULE_INFO_LIST, m->name.c_str(), !m->version.empty() ? m->version.c_str() : "?", !m->author.empty() ? m->author.c_str() : "?", timebuf);
showModuleCmdLoaded(HostServ, m->name, u);
showModuleCmdLoaded(OperServ, m->name, u);
@@ -43,25 +43,25 @@ class CommandOSModInfo : public Command
showModuleCmdLoaded(MemoServ, m->name, u);
}
else
- notice_lang(Config.s_OperServ, u, OPER_MODULE_NO_INFO, file.c_str());
+ notice_lang(Config->s_OperServ, u, OPER_MODULE_NO_INFO, file.c_str());
return MOD_CONT;
}
bool OnHelp(User *u, const Anope::string &subcommand)
{
- notice_help(Config.s_OperServ, u, OPER_HELP_MODINFO);
+ notice_help(Config->s_OperServ, u, OPER_HELP_MODINFO);
return true;
}
void OnSyntaxError(User *u, const Anope::string &subcommand)
{
- syntax_error(Config.s_OperServ, u, "MODINFO", OPER_MODULE_INFO_SYNTAX);
+ syntax_error(Config->s_OperServ, u, "MODINFO", OPER_MODULE_INFO_SYNTAX);
}
void OnServHelp(User *u)
{
- notice_lang(Config.s_OperServ, u, OPER_HELP_CMD_MODINFO);
+ notice_lang(Config->s_OperServ, u, OPER_HELP_CMD_MODINFO);
}
};
@@ -92,7 +92,7 @@ static int showModuleCmdLoaded(BotInfo *bi, const Anope::string &mod_name, User
if (c->module && c->module->name.equals_ci(mod_name))
{
- notice_lang(Config.s_OperServ, u, OPER_MODULE_CMD_LIST, c->service, c->name.c_str());
+ notice_lang(Config->s_OperServ, u, OPER_MODULE_CMD_LIST, c->service, c->name.c_str());
++display;
}
}
diff --git a/modules/core/os_modlist.cpp b/modules/core/os_modlist.cpp
index 0089c4b92..bdd7d3f19 100644
--- a/modules/core/os_modlist.cpp
+++ b/modules/core/os_modlist.cpp
@@ -129,7 +129,7 @@ class CommandOSModList : public Command
}
}
- notice_lang(Config.s_OperServ, u, OPER_MODULE_LIST_HEADER);
+ notice_lang(Config->s_OperServ, u, OPER_MODULE_LIST_HEADER);
for (std::list<Module *>::iterator it = Modules.begin(), it_end = Modules.end(); it != it_end; ++it)
{
@@ -140,78 +140,78 @@ class CommandOSModList : public Command
case CORE:
if (showCore)
{
- notice_lang(Config.s_OperServ, u, OPER_MODULE_LIST, m->name.c_str(), m->version.c_str(), core);
+ notice_lang(Config->s_OperServ, u, OPER_MODULE_LIST, m->name.c_str(), m->version.c_str(), core);
++count;
}
break;
case THIRD:
if (showThird)
{
- notice_lang(Config.s_OperServ, u, OPER_MODULE_LIST, m->name.c_str(), m->version.c_str(), third);
+ notice_lang(Config->s_OperServ, u, OPER_MODULE_LIST, m->name.c_str(), m->version.c_str(), third);
++count;
}
break;
case PROTOCOL:
if (showProto)
{
- notice_lang(Config.s_OperServ, u, OPER_MODULE_LIST, m->name.c_str(), m->version.c_str(), proto);
+ notice_lang(Config->s_OperServ, u, OPER_MODULE_LIST, m->name.c_str(), m->version.c_str(), proto);
++count;
}
break;
case SUPPORTED:
if (showSupported)
{
- notice_lang(Config.s_OperServ, u, OPER_MODULE_LIST, m->name.c_str(), m->version.c_str(), supported);
+ notice_lang(Config->s_OperServ, u, OPER_MODULE_LIST, m->name.c_str(), m->version.c_str(), supported);
++count;
}
break;
case QATESTED:
if (showQA)
{
- notice_lang(Config.s_OperServ, u, OPER_MODULE_LIST, m->name.c_str(), m->version.c_str(), qa);
+ notice_lang(Config->s_OperServ, u, OPER_MODULE_LIST, m->name.c_str(), m->version.c_str(), qa);
++count;
}
break;
case ENCRYPTION:
if (showEnc)
{
- notice_lang(Config.s_OperServ, u, OPER_MODULE_LIST, m->name.c_str(), m->version.c_str(), enc);
+ notice_lang(Config->s_OperServ, u, OPER_MODULE_LIST, m->name.c_str(), m->version.c_str(), enc);
++count;
}
break;
case DATABASE:
if (showDB)
{
- notice_lang(Config.s_OperServ, u, OPER_MODULE_LIST, m->name.c_str(), m->version.c_str(), db);
+ notice_lang(Config->s_OperServ, u, OPER_MODULE_LIST, m->name.c_str(), m->version.c_str(), db);
++count;
}
break;
case SOCKETENGINE:
if (showSocketEngine)
{
- notice_lang(Config.s_OperServ, u, OPER_MODULE_LIST, m->name.c_str(), m->version.c_str(), socketengine);
+ notice_lang(Config->s_OperServ, u, OPER_MODULE_LIST, m->name.c_str(), m->version.c_str(), socketengine);
++count;
}
break;
}
}
if (!count)
- notice_lang(Config.s_OperServ, u, OPER_MODULE_NO_LIST);
+ notice_lang(Config->s_OperServ, u, OPER_MODULE_NO_LIST);
else
- notice_lang(Config.s_OperServ, u, OPER_MODULE_LIST_FOOTER, count);
+ notice_lang(Config->s_OperServ, u, OPER_MODULE_LIST_FOOTER, count);
return MOD_CONT;
}
bool OnHelp(User *u, const Anope::string &subcommand)
{
- notice_help(Config.s_OperServ, u, OPER_HELP_MODLIST);
+ notice_help(Config->s_OperServ, u, OPER_HELP_MODLIST);
return true;
}
void OnServHelp(User *u)
{
- notice_lang(Config.s_OperServ, u, OPER_HELP_CMD_MODLIST);
+ notice_lang(Config->s_OperServ, u, OPER_HELP_CMD_MODLIST);
}
};
diff --git a/modules/core/os_modload.cpp b/modules/core/os_modload.cpp
index dbc07139f..0d36ad567 100644
--- a/modules/core/os_modload.cpp
+++ b/modules/core/os_modload.cpp
@@ -27,14 +27,14 @@ class CommandOSModLoad : public Command
Module *m = FindModule(mname);
if (m)
{
- notice_lang(Config.s_OperServ, u, OPER_MODULE_ALREADY_LOADED, mname.c_str());
+ notice_lang(Config->s_OperServ, u, OPER_MODULE_ALREADY_LOADED, mname.c_str());
return MOD_CONT;
}
int status = ModuleManager::LoadModule(mname, u);
if (status != MOD_ERR_OK)
{
- notice_lang(Config.s_OperServ, u, OPER_MODULE_LOAD_FAIL, mname.c_str());
+ notice_lang(Config->s_OperServ, u, OPER_MODULE_LOAD_FAIL, mname.c_str());
}
return MOD_CONT;
@@ -42,18 +42,18 @@ class CommandOSModLoad : public Command
bool OnHelp(User *u, const Anope::string &subcommand)
{
- notice_help(Config.s_OperServ, u, OPER_HELP_MODLOAD);
+ notice_help(Config->s_OperServ, u, OPER_HELP_MODLOAD);
return true;
}
void OnSyntaxError(User *u, const Anope::string &subcommand)
{
- syntax_error(Config.s_OperServ, u, "MODLOAD", OPER_MODULE_LOAD_SYNTAX);
+ syntax_error(Config->s_OperServ, u, "MODLOAD", OPER_MODULE_LOAD_SYNTAX);
}
void OnServHelp(User *u)
{
- notice_lang(Config.s_OperServ, u, OPER_HELP_CMD_MODLOAD);
+ notice_lang(Config->s_OperServ, u, OPER_HELP_CMD_MODLOAD);
}
};
diff --git a/modules/core/os_modunload.cpp b/modules/core/os_modunload.cpp
index de70a6bb0..ceea0c658 100644
--- a/modules/core/os_modunload.cpp
+++ b/modules/core/os_modunload.cpp
@@ -28,7 +28,7 @@ class CommandOSModUnLoad : public Command
Module *m = FindModule(mname);
if (!m)
{
- notice_lang(Config.s_OperServ, u, OPER_MODULE_ISNT_LOADED, mname.c_str());
+ notice_lang(Config->s_OperServ, u, OPER_MODULE_ISNT_LOADED, mname.c_str());
return MOD_CONT;
}
@@ -37,25 +37,25 @@ class CommandOSModUnLoad : public Command
status = ModuleManager::UnloadModule(m, u);
if (status != MOD_ERR_OK)
- notice_lang(Config.s_OperServ, u, OPER_MODULE_REMOVE_FAIL, mname.c_str());
+ notice_lang(Config->s_OperServ, u, OPER_MODULE_REMOVE_FAIL, mname.c_str());
return MOD_CONT;
}
bool OnHelp(User *u, const Anope::string &subcommand)
{
- notice_help(Config.s_OperServ, u, OPER_HELP_MODUNLOAD);
+ notice_help(Config->s_OperServ, u, OPER_HELP_MODUNLOAD);
return true;
}
void OnSyntaxError(User *u, const Anope::string &subcommand)
{
- syntax_error(Config.s_OperServ, u, "MODUNLOAD", OPER_MODULE_UNLOAD_SYNTAX);
+ syntax_error(Config->s_OperServ, u, "MODUNLOAD", OPER_MODULE_UNLOAD_SYNTAX);
}
void OnServHelp(User *u)
{
- notice_lang(Config.s_OperServ, u, OPER_HELP_CMD_MODUNLOAD);
+ notice_lang(Config->s_OperServ, u, OPER_HELP_CMD_MODUNLOAD);
}
};
diff --git a/modules/core/os_news.cpp b/modules/core/os_news.cpp
index 03cfe3603..8c159b32d 100644
--- a/modules/core/os_news.cpp
+++ b/modules/core/os_news.cpp
@@ -111,7 +111,7 @@ static void DisplayNews(User *u, NewsType Type)
tm = localtime(&News[i]->time);
strftime_lang(timebuf, sizeof(timebuf), u, STRFTIME_SHORT_DATE_FORMAT, tm);
- notice_lang(Config.s_GlobalNoticer, u, msg, timebuf, News[i]->Text.c_str());
+ notice_lang(Config->s_GlobalNoticer, u, msg, timebuf, News[i]->Text.c_str());
++displayed;
@@ -120,7 +120,7 @@ static void DisplayNews(User *u, NewsType Type)
current_news = i;
return;
}
- else if (displayed >= Config.NewsCount)
+ else if (displayed >= Config->NewsCount)
return;
}
@@ -192,16 +192,16 @@ class NewsBase : public Command
if (News[i]->type == type)
{
if (!count)
- notice_lang(Config.s_OperServ, u, msgs[MSG_LIST_HEADER]);
+ notice_lang(Config->s_OperServ, u, msgs[MSG_LIST_HEADER]);
tm = localtime(&News[i]->time);
strftime_lang(timebuf, sizeof(timebuf), u, STRFTIME_DATE_TIME_FORMAT, tm);
- notice_lang(Config.s_OperServ, u, msgs[MSG_LIST_ENTRY], News[i]->num, timebuf, !News[i]->who.empty() ? News[i]->who.c_str() : "<unknown>", News[i]->Text.c_str());
+ notice_lang(Config->s_OperServ, u, msgs[MSG_LIST_ENTRY], News[i]->num, timebuf, !News[i]->who.empty() ? News[i]->who.c_str() : "<unknown>", News[i]->Text.c_str());
++count;
}
if (!count)
- notice_lang(Config.s_OperServ, u, msgs[MSG_LIST_NONE]);
+ notice_lang(Config->s_OperServ, u, msgs[MSG_LIST_NONE]);
else
- notice_lang(Config.s_OperServ, u, END_OF_ANY_LIST, "News");
+ notice_lang(Config->s_OperServ, u, END_OF_ANY_LIST, "News");
return MOD_CONT;
}
@@ -217,14 +217,14 @@ class NewsBase : public Command
{
if (readonly)
{
- notice_lang(Config.s_OperServ, u, READ_ONLY_MODE);
+ notice_lang(Config->s_OperServ, u, READ_ONLY_MODE);
return MOD_CONT;
}
n = add_newsitem(u, text, type);
if (n < 0)
- notice_lang(Config.s_OperServ, u, msgs[MSG_ADD_FULL]);
+ notice_lang(Config->s_OperServ, u, msgs[MSG_ADD_FULL]);
else
- notice_lang(Config.s_OperServ, u, msgs[MSG_ADDED], n);
+ notice_lang(Config->s_OperServ, u, msgs[MSG_ADDED], n);
}
return MOD_CONT;
@@ -241,7 +241,7 @@ class NewsBase : public Command
{
if (readonly)
{
- notice_lang(Config.s_OperServ, u, READ_ONLY_MODE);
+ notice_lang(Config->s_OperServ, u, READ_ONLY_MODE);
return MOD_CONT;
}
if (!text.equals_ci("ALL"))
@@ -249,20 +249,20 @@ class NewsBase : public Command
num = text.is_number_only() ? convertTo<unsigned>(text) : 0;
if (num > 0 && del_newsitem(num, type))
{
- notice_lang(Config.s_OperServ, u, msgs[MSG_DELETED], num);
+ notice_lang(Config->s_OperServ, u, msgs[MSG_DELETED], num);
for (unsigned i = 0, end = News.size(); i < end; ++i)
if (News[i]->type == type && News[i]->num > num)
--News[i]->num;
}
else
- notice_lang(Config.s_OperServ, u, msgs[MSG_DEL_NOT_FOUND], num);
+ notice_lang(Config->s_OperServ, u, msgs[MSG_DEL_NOT_FOUND], num);
}
else
{
if (del_newsitem(0, type))
- notice_lang(Config.s_OperServ, u, msgs[MSG_DELETED_ALL]);
+ notice_lang(Config->s_OperServ, u, msgs[MSG_DELETED_ALL]);
else
- notice_lang(Config.s_OperServ, u, msgs[MSG_DEL_NONE]);
+ notice_lang(Config->s_OperServ, u, msgs[MSG_DEL_NONE]);
}
}
@@ -323,18 +323,18 @@ class CommandOSLogonNews : public NewsBase
bool OnHelp(User *u, const Anope::string &subcommand)
{
- notice_help(Config.s_OperServ, u, NEWS_HELP_LOGON, Config.NewsCount);
+ notice_help(Config->s_OperServ, u, NEWS_HELP_LOGON, Config->NewsCount);
return true;
}
void OnSyntaxError(User *u, const Anope::string &subcommand)
{
- syntax_error(Config.s_OperServ, u, "LOGONNEWS", NEWS_LOGON_SYNTAX);
+ syntax_error(Config->s_OperServ, u, "LOGONNEWS", NEWS_LOGON_SYNTAX);
}
void OnServHelp(User *u)
{
- notice_lang(Config.s_OperServ, u, OPER_HELP_CMD_LOGONNEWS);
+ notice_lang(Config->s_OperServ, u, OPER_HELP_CMD_LOGONNEWS);
}
};
@@ -352,18 +352,18 @@ class CommandOSOperNews : public NewsBase
bool OnHelp(User *u, const Anope::string &subcommand)
{
- notice_help(Config.s_OperServ, u, NEWS_HELP_OPER, Config.NewsCount);
+ notice_help(Config->s_OperServ, u, NEWS_HELP_OPER, Config->NewsCount);
return true;
}
void OnSyntaxError(User *u, const Anope::string &subcommand)
{
- syntax_error(Config.s_OperServ, u, "OPERNEWS", NEWS_OPER_SYNTAX);
+ syntax_error(Config->s_OperServ, u, "OPERNEWS", NEWS_OPER_SYNTAX);
}
void OnServHelp(User *u)
{
- notice_lang(Config.s_OperServ, u, OPER_HELP_CMD_OPERNEWS);
+ notice_lang(Config->s_OperServ, u, OPER_HELP_CMD_OPERNEWS);
}
};
@@ -381,18 +381,18 @@ class CommandOSRandomNews : public NewsBase
bool OnHelp(User *u, const Anope::string &subcommand)
{
- notice_help(Config.s_OperServ, u, NEWS_HELP_RANDOM);
+ notice_help(Config->s_OperServ, u, NEWS_HELP_RANDOM);
return true;
}
void OnSyntaxError(User *u, const Anope::string &subcommand)
{
- syntax_error(Config.s_OperServ, u, "RANDOMNEWS", NEWS_RANDOM_SYNTAX);
+ syntax_error(Config->s_OperServ, u, "RANDOMNEWS", NEWS_RANDOM_SYNTAX);
}
void OnServHelp(User *u)
{
- notice_lang(Config.s_OperServ, u, OPER_HELP_CMD_RANDOMNEWS);
+ notice_lang(Config->s_OperServ, u, OPER_HELP_CMD_RANDOMNEWS);
}
};
diff --git a/modules/core/os_noop.cpp b/modules/core/os_noop.cpp
index 91c1b93e8..33944f011 100644
--- a/modules/core/os_noop.cpp
+++ b/modules/core/os_noop.cpp
@@ -33,9 +33,9 @@ class CommandOSNOOP : public Command
ircdproto->SendSVSNOOP(server, 1);
reason = "NOOP command used by " + u->nick;
- if (Config.WallOSNoOp)
+ if (Config->WallOSNoOp)
ircdproto->SendGlobops(OperServ, "\2%s\2 used NOOP on \2%s\2", u->nick.c_str(), server.c_str());
- notice_lang(Config.s_OperServ, u, OPER_NOOP_SET, server.c_str());
+ notice_lang(Config->s_OperServ, u, OPER_NOOP_SET, server.c_str());
/* Kill all the IRCops of the server */
for (user_map::const_iterator it = UserListByNick.begin(), it_end = UserListByNick.end(); it != it_end; )
@@ -44,13 +44,13 @@ class CommandOSNOOP : public Command
++it;
if (u2 && is_oper(u2) && Anope::Match(u2->server->GetName(), server, true))
- kill_user(Config.s_OperServ, u2->nick, reason);
+ kill_user(Config->s_OperServ, u2->nick, reason);
}
}
else if (cmd.equals_ci("REVOKE"))
{
ircdproto->SendSVSNOOP(server, 0);
- notice_lang(Config.s_OperServ, u, OPER_NOOP_REVOKE, server.c_str());
+ notice_lang(Config->s_OperServ, u, OPER_NOOP_REVOKE, server.c_str());
}
else
this->OnSyntaxError(u, "");
@@ -59,18 +59,18 @@ class CommandOSNOOP : public Command
bool OnHelp(User *u, const Anope::string &subcommand)
{
- notice_help(Config.s_OperServ, u, OPER_HELP_NOOP);
+ notice_help(Config->s_OperServ, u, OPER_HELP_NOOP);
return true;
}
void OnSyntaxError(User *u, const Anope::string &subcommand)
{
- syntax_error(Config.s_OperServ, u, "NOOP", OPER_NOOP_SYNTAX);
+ syntax_error(Config->s_OperServ, u, "NOOP", OPER_NOOP_SYNTAX);
}
void OnServHelp(User *u)
{
- notice_lang(Config.s_OperServ, u, OPER_HELP_CMD_NOOP);
+ notice_lang(Config->s_OperServ, u, OPER_HELP_CMD_NOOP);
}
};
diff --git a/modules/core/os_oline.cpp b/modules/core/os_oline.cpp
index 64f89b0e5..0404741c9 100644
--- a/modules/core/os_oline.cpp
+++ b/modules/core/os_oline.cpp
@@ -28,19 +28,19 @@ class CommandOSOLine : public Command
/* let's check whether the user is online */
if (!(u2 = finduser(nick)))
- notice_lang(Config.s_OperServ, u, NICK_X_NOT_IN_USE, nick.c_str());
+ notice_lang(Config->s_OperServ, u, NICK_X_NOT_IN_USE, nick.c_str());
else if (u2 && flag[0] == '+')
{
- ircdproto->SendSVSO(Config.s_OperServ, nick, flag);
+ ircdproto->SendSVSO(Config->s_OperServ, nick, flag);
u2->SetMode(OperServ, UMODE_OPER);
- notice_lang(Config.s_OperServ, u2, OPER_OLINE_IRCOP);
- notice_lang(Config.s_OperServ, u, OPER_OLINE_SUCCESS, flag.c_str(), nick.c_str());
+ notice_lang(Config->s_OperServ, u2, OPER_OLINE_IRCOP);
+ notice_lang(Config->s_OperServ, u, OPER_OLINE_SUCCESS, flag.c_str(), nick.c_str());
ircdproto->SendGlobops(OperServ, "\2%s\2 used OLINE for %s", u->nick.c_str(), nick.c_str());
}
else if (u2 && flag[0] == '-')
{
- ircdproto->SendSVSO(Config.s_OperServ, nick, flag);
- notice_lang(Config.s_OperServ, u, OPER_OLINE_SUCCESS, flag.c_str(), nick.c_str());
+ ircdproto->SendSVSO(Config->s_OperServ, nick, flag);
+ notice_lang(Config->s_OperServ, u, OPER_OLINE_SUCCESS, flag.c_str(), nick.c_str());
ircdproto->SendGlobops(OperServ, "\2%s\2 used OLINE for %s", u->nick.c_str(), nick.c_str());
}
else
@@ -50,18 +50,18 @@ class CommandOSOLine : public Command
bool OnHelp(User *u, const Anope::string &subcommand)
{
- notice_help(Config.s_OperServ, u, OPER_HELP_OLINE);
+ notice_help(Config->s_OperServ, u, OPER_HELP_OLINE);
return true;
}
void OnSyntaxError(User *u, const Anope::string &subcommand)
{
- syntax_error(Config.s_OperServ, u, "OLINE", OPER_OLINE_SYNTAX);
+ syntax_error(Config->s_OperServ, u, "OLINE", OPER_OLINE_SYNTAX);
}
void OnServHelp(User *u)
{
- notice_lang(Config.s_OperServ, u, OPER_HELP_CMD_OLINE);
+ notice_lang(Config->s_OperServ, u, OPER_HELP_CMD_OLINE);
}
};
diff --git a/modules/core/os_quit.cpp b/modules/core/os_quit.cpp
index 47f3daba3..4eb184338 100644
--- a/modules/core/os_quit.cpp
+++ b/modules/core/os_quit.cpp
@@ -25,21 +25,21 @@ class CommandOSQuit : public Command
{
quitmsg = "QUIT command received from " + u->nick;
- if (Config.GlobalOnCycle)
- oper_global("", "%s", Config.GlobalOnCycleMessage.c_str());
+ if (Config->GlobalOnCycle)
+ oper_global("", "%s", Config->GlobalOnCycleMessage.c_str());
quitting = true;
return MOD_CONT;
}
bool OnHelp(User *u, const Anope::string &subcommand)
{
- notice_help(Config.s_OperServ, u, OPER_HELP_QUIT);
+ notice_help(Config->s_OperServ, u, OPER_HELP_QUIT);
return true;
}
void OnServHelp(User *u)
{
- notice_lang(Config.s_OperServ, u, OPER_HELP_CMD_QUIT);
+ notice_lang(Config->s_OperServ, u, OPER_HELP_CMD_QUIT);
}
};
diff --git a/modules/core/os_reload.cpp b/modules/core/os_reload.cpp
index a01625026..4344efcff 100644
--- a/modules/core/os_reload.cpp
+++ b/modules/core/os_reload.cpp
@@ -22,26 +22,31 @@ class CommandOSReload : public Command
CommandReturn Execute(User *u, const std::vector<Anope::string> &params)
{
- if (!read_config(1))
+ try
{
- quitmsg = "Error during the reload of the configuration file!";
- quitting = true;
+ ServerConfig *newconfig = new ServerConfig();
+ delete Config;
+ Config = newconfig;
+ FOREACH_MOD(I_OnReload, OnReload(false));
+ }
+ catch (const ConfigException &ex)
+ {
+ Alog() << "Error reloading configuration file: " << ex.GetReason();
}
- FOREACH_MOD(I_OnReload, OnReload(false));
- notice_lang(Config.s_OperServ, u, OPER_RELOAD);
+ notice_lang(Config->s_OperServ, u, OPER_RELOAD);
return MOD_CONT;
}
bool OnHelp(User *u, const Anope::string &subcommand)
{
- notice_help(Config.s_OperServ, u, OPER_HELP_RELOAD);
+ notice_help(Config->s_OperServ, u, OPER_HELP_RELOAD);
return true;
}
void OnServHelp(User *u)
{
- notice_lang(Config.s_OperServ, u, OPER_HELP_CMD_RELOAD);
+ notice_lang(Config->s_OperServ, u, OPER_HELP_CMD_RELOAD);
}
};
diff --git a/modules/core/os_restart.cpp b/modules/core/os_restart.cpp
index 00f273958..c1d8c35ff 100644
--- a/modules/core/os_restart.cpp
+++ b/modules/core/os_restart.cpp
@@ -24,8 +24,8 @@ class CommandOSRestart : public Command
{
quitmsg = "RESTART command received from " + u->nick;
- if (Config.GlobalOnCycle)
- oper_global("", "%s", Config.GlobalOnCycleMessage.c_str());
+ if (Config->GlobalOnCycle)
+ oper_global("", "%s", Config->GlobalOnCycleMessage.c_str());
/* raise(SIGHUP); */
do_restart_services();
return MOD_CONT;
@@ -33,13 +33,13 @@ class CommandOSRestart : public Command
bool OnHelp(User *u, const Anope::string &subcommand)
{
- notice_help(Config.s_OperServ, u, OPER_HELP_RESTART);
+ notice_help(Config->s_OperServ, u, OPER_HELP_RESTART);
return true;
}
void OnServHelp(User *u)
{
- notice_lang(Config.s_OperServ, u, OPER_HELP_CMD_RESTART);
+ notice_lang(Config->s_OperServ, u, OPER_HELP_CMD_RESTART);
}
};
diff --git a/modules/core/os_session.cpp b/modules/core/os_session.cpp
index 8b8e06dca..9f81ef12d 100644
--- a/modules/core/os_session.cpp
+++ b/modules/core/os_session.cpp
@@ -26,11 +26,11 @@ class ExceptionDelCallback : public NumberList
~ExceptionDelCallback()
{
if (!Deleted)
- notice_lang(Config.s_OperServ, u, OPER_EXCEPTION_NO_MATCH);
+ notice_lang(Config->s_OperServ, u, OPER_EXCEPTION_NO_MATCH);
else if (Deleted == 1)
- notice_lang(Config.s_OperServ, u, OPER_EXCEPTION_DELETED_ONE);
+ notice_lang(Config->s_OperServ, u, OPER_EXCEPTION_DELETED_ONE);
else
- notice_lang(Config.s_OperServ, u, OPER_EXCEPTION_DELETED_SEVERAL, Deleted);
+ notice_lang(Config->s_OperServ, u, OPER_EXCEPTION_DELETED_SEVERAL, Deleted);
}
virtual void HandleNumber(unsigned Number)
@@ -70,8 +70,8 @@ class ExceptionListCallback : public NumberList
if (!SentHeader)
{
SentHeader = true;
- notice_lang(Config.s_OperServ, u, OPER_EXCEPTION_LIST_HEADER);
- notice_lang(Config.s_OperServ, u, OPER_EXCEPTION_LIST_COLHEAD);
+ notice_lang(Config->s_OperServ, u, OPER_EXCEPTION_LIST_HEADER);
+ notice_lang(Config->s_OperServ, u, OPER_EXCEPTION_LIST_COLHEAD);
}
DoList(u, Number - 1);
@@ -82,7 +82,7 @@ class ExceptionListCallback : public NumberList
if (index >= exceptions.size())
return;
- notice_lang(Config.s_OperServ, u, OPER_EXCEPTION_LIST_FORMAT, index + 1, exceptions[index]->limit, exceptions[index]->mask.c_str());
+ notice_lang(Config->s_OperServ, u, OPER_EXCEPTION_LIST_FORMAT, index + 1, exceptions[index]->limit, exceptions[index]->mask.c_str());
}
};
@@ -101,7 +101,7 @@ class ExceptionViewCallback : public ExceptionListCallback
if (!SentHeader)
{
SentHeader = true;
- notice_lang(Config.s_OperServ, u, OPER_EXCEPTION_LIST_HEADER);
+ notice_lang(Config->s_OperServ, u, OPER_EXCEPTION_LIST_HEADER);
}
DoList(u, Number - 1);
@@ -121,7 +121,7 @@ class ExceptionViewCallback : public ExceptionListCallback
Anope::string expirebuf = expire_left(u->Account(), exceptions[index]->expires);
- notice_lang(Config.s_OperServ, u, OPER_EXCEPTION_VIEW_FORMAT, index + 1, exceptions[index]->mask.c_str(), !exceptions[index]->who.empty() ? exceptions[index]->who.c_str() : "<unknown>", timebuf, expirebuf.c_str(), exceptions[index]->limit, exceptions[index]->reason.c_str());
+ notice_lang(Config->s_OperServ, u, OPER_EXCEPTION_VIEW_FORMAT, index + 1, exceptions[index]->mask.c_str(), !exceptions[index]->who.empty() ? exceptions[index]->who.c_str() : "<unknown>", timebuf, expirebuf.c_str(), exceptions[index]->limit, exceptions[index]->reason.c_str());
}
};
@@ -134,18 +134,18 @@ class CommandOSSession : public Command
Anope::string param = params[1];
if ((mincount = (param.is_number_only() ? convertTo<int>(param) : 0)) <= 1)
- notice_lang(Config.s_OperServ, u, OPER_SESSION_INVALID_THRESHOLD);
+ notice_lang(Config->s_OperServ, u, OPER_SESSION_INVALID_THRESHOLD);
else
{
- notice_lang(Config.s_OperServ, u, OPER_SESSION_LIST_HEADER, mincount);
- notice_lang(Config.s_OperServ, u, OPER_SESSION_LIST_COLHEAD);
+ notice_lang(Config->s_OperServ, u, OPER_SESSION_LIST_HEADER, mincount);
+ notice_lang(Config->s_OperServ, u, OPER_SESSION_LIST_COLHEAD);
for (session_map::const_iterator it = SessionList.begin(), it_end = SessionList.end(); it != it_end; ++it)
{
Session *session = it->second;
if (session->count >= mincount)
- notice_lang(Config.s_OperServ, u, OPER_SESSION_LIST_FORMAT, session->count, session->host.c_str());
+ notice_lang(Config->s_OperServ, u, OPER_SESSION_LIST_FORMAT, session->count, session->host.c_str());
}
}
@@ -158,11 +158,11 @@ class CommandOSSession : public Command
Session *session = findsession(param);
if (!session)
- notice_lang(Config.s_OperServ, u, OPER_SESSION_NOT_FOUND, param.c_str());
+ notice_lang(Config->s_OperServ, u, OPER_SESSION_NOT_FOUND, param.c_str());
else
{
Exception *exception = find_host_exception(param);
- notice_lang(Config.s_OperServ, u, OPER_SESSION_VIEW_FORMAT, param.c_str(), session->count, exception ? exception-> limit : Config.DefSessionLimit);
+ notice_lang(Config->s_OperServ, u, OPER_SESSION_VIEW_FORMAT, param.c_str(), session->count, exception ? exception-> limit : Config->DefSessionLimit);
}
return MOD_CONT;
@@ -176,9 +176,9 @@ class CommandOSSession : public Command
{
Anope::string cmd = params[0];
- if (!Config.LimitSessions)
+ if (!Config->LimitSessions)
{
- notice_lang(Config.s_OperServ, u, OPER_SESSION_DISABLED);
+ notice_lang(Config->s_OperServ, u, OPER_SESSION_DISABLED);
return MOD_CONT;
}
@@ -193,18 +193,18 @@ class CommandOSSession : public Command
bool OnHelp(User *u, const Anope::string &subcommand)
{
- notice_help(Config.s_OperServ, u, OPER_HELP_SESSION);
+ notice_help(Config->s_OperServ, u, OPER_HELP_SESSION);
return true;
}
void OnSyntaxError(User *u, const Anope::string &subcommand)
{
- syntax_error(Config.s_OperServ, u, "SESSION", OPER_SESSION_LIST_SYNTAX);
+ syntax_error(Config->s_OperServ, u, "SESSION", OPER_SESSION_LIST_SYNTAX);
}
void OnServHelp(User *u)
{
- notice_lang(Config.s_OperServ, u, OPER_HELP_CMD_SESSION);
+ notice_lang(Config->s_OperServ, u, OPER_HELP_CMD_SESSION);
}
};
@@ -242,10 +242,10 @@ class CommandOSException : public Command
return MOD_CONT;
}
- time_t expires = !expiry.empty() ? dotime(expiry) : Config.ExceptionExpiry;
+ time_t expires = !expiry.empty() ? dotime(expiry) : Config->ExceptionExpiry;
if (expires < 0)
{
- notice_lang(Config.s_OperServ, u, BAD_EXPIRY_TIME);
+ notice_lang(Config->s_OperServ, u, BAD_EXPIRY_TIME);
return MOD_CONT;
}
else if (expires > 0)
@@ -253,26 +253,26 @@ class CommandOSException : public Command
int limit = !limitstr.empty() && limitstr.is_number_only() ? convertTo<int>(limitstr) : -1;
- if (limit < 0 || limit > static_cast<int>(Config.MaxSessionLimit))
+ if (limit < 0 || limit > static_cast<int>(Config->MaxSessionLimit))
{
- notice_lang(Config.s_OperServ, u, OPER_EXCEPTION_INVALID_LIMIT, Config.MaxSessionLimit);
+ notice_lang(Config->s_OperServ, u, OPER_EXCEPTION_INVALID_LIMIT, Config->MaxSessionLimit);
return MOD_CONT;
}
else
{
if (mask.find('!') == Anope::string::npos || mask.find('@') == Anope::string::npos)
{
- notice_lang(Config.s_OperServ, u, OPER_EXCEPTION_INVALID_HOSTMASK);
+ notice_lang(Config->s_OperServ, u, OPER_EXCEPTION_INVALID_HOSTMASK);
return MOD_CONT;
}
x = exception_add(u, mask, limit, reason, u->nick, expires);
if (x == 1)
- notice_lang(Config.s_OperServ, u, OPER_EXCEPTION_ADDED, mask.c_str(), limit);
+ notice_lang(Config->s_OperServ, u, OPER_EXCEPTION_ADDED, mask.c_str(), limit);
if (readonly)
- notice_lang(Config.s_OperServ, u, READ_ONLY_MODE);
+ notice_lang(Config->s_OperServ, u, READ_ONLY_MODE);
}
return MOD_CONT;
@@ -300,15 +300,15 @@ class CommandOSException : public Command
if (mask.equals_ci(exceptions[i]->mask))
{
ExceptionDelCallback::DoDel(u, i);
- notice_lang(Config.s_OperServ, u, OPER_EXCEPTION_DELETED, mask.c_str());
+ notice_lang(Config->s_OperServ, u, OPER_EXCEPTION_DELETED, mask.c_str());
break;
}
if (i == end)
- notice_lang(Config.s_OperServ, u, OPER_EXCEPTION_NOT_FOUND, mask.c_str());
+ notice_lang(Config->s_OperServ, u, OPER_EXCEPTION_NOT_FOUND, mask.c_str());
}
if (readonly)
- notice_lang(Config.s_OperServ, u, READ_ONLY_MODE);
+ notice_lang(Config->s_OperServ, u, READ_ONLY_MODE);
return MOD_CONT;
}
@@ -334,10 +334,10 @@ class CommandOSException : public Command
exceptions[n1] = exceptions[n2];
exceptions[n2] = temp;
- notice_lang(Config.s_OperServ, u, OPER_EXCEPTION_MOVED, exceptions[n1]->mask.c_str(), n1 + 1, n2 + 1);
+ notice_lang(Config->s_OperServ, u, OPER_EXCEPTION_MOVED, exceptions[n1]->mask.c_str(), n1 + 1, n2 + 1);
if (readonly)
- notice_lang(Config.s_OperServ, u, READ_ONLY_MODE);
+ notice_lang(Config->s_OperServ, u, READ_ONLY_MODE);
}
else
this->OnSyntaxError(u, "MOVE");
@@ -365,15 +365,15 @@ class CommandOSException : public Command
if (!SentHeader)
{
SentHeader = true;
- notice_lang(Config.s_OperServ, u, OPER_EXCEPTION_LIST_HEADER);
- notice_lang(Config.s_OperServ, u, OPER_EXCEPTION_LIST_COLHEAD);
+ notice_lang(Config->s_OperServ, u, OPER_EXCEPTION_LIST_HEADER);
+ notice_lang(Config->s_OperServ, u, OPER_EXCEPTION_LIST_COLHEAD);
}
ExceptionListCallback::DoList(u, i);
}
if (!SentHeader)
- notice_lang(Config.s_OperServ, u, OPER_EXCEPTION_NO_MATCH);
+ notice_lang(Config->s_OperServ, u, OPER_EXCEPTION_NO_MATCH);
}
return MOD_CONT;
@@ -399,14 +399,14 @@ class CommandOSException : public Command
if (!SentHeader)
{
SentHeader = true;
- notice_lang(Config.s_OperServ, u, OPER_EXCEPTION_LIST_HEADER);
+ notice_lang(Config->s_OperServ, u, OPER_EXCEPTION_LIST_HEADER);
}
ExceptionViewCallback::DoList(u, i);
}
if (!SentHeader)
- notice_lang(Config.s_OperServ, u, OPER_EXCEPTION_NO_MATCH);
+ notice_lang(Config->s_OperServ, u, OPER_EXCEPTION_NO_MATCH);
}
return MOD_CONT;
@@ -420,9 +420,9 @@ class CommandOSException : public Command
{
Anope::string cmd = params[0];
- if (!Config.LimitSessions)
+ if (!Config->LimitSessions)
{
- notice_lang(Config.s_OperServ, u, OPER_EXCEPTION_DISABLED);
+ notice_lang(Config->s_OperServ, u, OPER_EXCEPTION_DISABLED);
return MOD_CONT;
}
@@ -443,18 +443,18 @@ class CommandOSException : public Command
bool OnHelp(User *u, const Anope::string &subcommand)
{
- notice_help(Config.s_OperServ, u, OPER_HELP_EXCEPTION);
+ notice_help(Config->s_OperServ, u, OPER_HELP_EXCEPTION);
return true;
}
void OnSyntaxError(User *u, const Anope::string &subcommand)
{
- syntax_error(Config.s_OperServ, u, "EXCEPTION", OPER_EXCEPTION_SYNTAX);
+ syntax_error(Config->s_OperServ, u, "EXCEPTION", OPER_EXCEPTION_SYNTAX);
}
void OnServHelp(User *u)
{
- notice_lang(Config.s_OperServ, u, OPER_HELP_CMD_EXCEPTION);
+ notice_lang(Config->s_OperServ, u, OPER_HELP_CMD_EXCEPTION);
}
};
diff --git a/modules/core/os_set.cpp b/modules/core/os_set.cpp
index e46d91bb7..377dddfcf 100644
--- a/modules/core/os_set.cpp
+++ b/modules/core/os_set.cpp
@@ -21,15 +21,15 @@ class CommandOSSet : public Command
int index;
index = allow_ignore ? OPER_SET_LIST_OPTION_ON : OPER_SET_LIST_OPTION_OFF;
- notice_lang(Config.s_OperServ, u, index, "IGNORE");
+ notice_lang(Config->s_OperServ, u, index, "IGNORE");
index = readonly ? OPER_SET_LIST_OPTION_ON : OPER_SET_LIST_OPTION_OFF;
- notice_lang(Config.s_OperServ, u, index, "READONLY");
+ notice_lang(Config->s_OperServ, u, index, "READONLY");
index = LogChan ? OPER_SET_LIST_OPTION_ON : OPER_SET_LIST_OPTION_OFF;
- notice_lang(Config.s_OperServ, u, index, "LOGCHAN");
+ notice_lang(Config->s_OperServ, u, index, "LOGCHAN");
index = debug ? OPER_SET_LIST_OPTION_ON : OPER_SET_LIST_OPTION_OFF;
- notice_lang(Config.s_OperServ, u, index, "DEBUG");
+ notice_lang(Config->s_OperServ, u, index, "DEBUG");
index = noexpire ? OPER_SET_LIST_OPTION_ON : OPER_SET_LIST_OPTION_OFF;
- notice_lang(Config.s_OperServ, u, index, "NOEXPIRE");
+ notice_lang(Config->s_OperServ, u, index, "NOEXPIRE");
return MOD_CONT;
}
@@ -47,15 +47,15 @@ class CommandOSSet : public Command
if (setting.equals_ci("ON"))
{
allow_ignore = 1;
- notice_lang(Config.s_OperServ, u, OPER_SET_IGNORE_ON);
+ notice_lang(Config->s_OperServ, u, OPER_SET_IGNORE_ON);
}
else if (setting.equals_ci("OFF"))
{
allow_ignore = 0;
- notice_lang(Config.s_OperServ, u, OPER_SET_IGNORE_OFF);
+ notice_lang(Config->s_OperServ, u, OPER_SET_IGNORE_OFF);
}
else
- notice_lang(Config.s_OperServ, u, OPER_SET_IGNORE_ERROR);
+ notice_lang(Config->s_OperServ, u, OPER_SET_IGNORE_ERROR);
return MOD_CONT;
}
@@ -75,17 +75,17 @@ class CommandOSSet : public Command
readonly = true;
Alog() << "Read-only mode activated";
close_log();
- notice_lang(Config.s_OperServ, u, OPER_SET_READONLY_ON);
+ notice_lang(Config->s_OperServ, u, OPER_SET_READONLY_ON);
}
else if (setting.equals_ci("OFF"))
{
readonly = false;
open_log();
Alog() << "Read-only mode deactivated";
- notice_lang(Config.s_OperServ, u, OPER_SET_READONLY_OFF);
+ notice_lang(Config->s_OperServ, u, OPER_SET_READONLY_OFF);
}
else
- notice_lang(Config.s_OperServ, u, OPER_SET_READONLY_ERROR);
+ notice_lang(Config->s_OperServ, u, OPER_SET_READONLY_ERROR);
return MOD_CONT;
}
@@ -102,36 +102,36 @@ class CommandOSSet : public Command
}
/* Unlike the other SET commands where only stricmp is necessary,
- * we also have to ensure that Config.LogChannel is defined or we can't
+ * we also have to ensure that Config->LogChannel is defined or we can't
* send to it.
*
* -jester
*/
- if (!Config.LogChannel.empty() && setting.equals_ci("ON"))
+ if (!Config->LogChannel.empty() && setting.equals_ci("ON"))
{
if (ircd->join2msg)
{
- c = findchan(Config.LogChannel);
+ c = findchan(Config->LogChannel);
if (c)
Global->Join(c);
else
- Global->Join(Config.LogChannel);
+ Global->Join(Config->LogChannel);
}
LogChan = true;
- Alog() << "Now sending log messages to " << Config.LogChannel;
- notice_lang(Config.s_OperServ, u, OPER_SET_LOGCHAN_ON, Config.LogChannel.c_str());
+ Alog() << "Now sending log messages to " << Config->LogChannel;
+ notice_lang(Config->s_OperServ, u, OPER_SET_LOGCHAN_ON, Config->LogChannel.c_str());
}
- else if (!Config.LogChannel.empty() && setting.equals_ci("OFF"))
+ else if (!Config->LogChannel.empty() && setting.equals_ci("OFF"))
{
Alog() << "No longer sending log messages to a channel";
- c = findchan(Config.LogChannel);
+ c = findchan(Config->LogChannel);
if (ircd->join2msg && c)
Global->Part(c);
LogChan = false;
- notice_lang(Config.s_OperServ, u, OPER_SET_LOGCHAN_OFF);
+ notice_lang(Config->s_OperServ, u, OPER_SET_LOGCHAN_OFF);
}
else
- notice_lang(Config.s_OperServ, u, OPER_SET_LOGCHAN_ERROR);
+ notice_lang(Config->s_OperServ, u, OPER_SET_LOGCHAN_ERROR);
return MOD_CONT;
}
@@ -151,24 +151,24 @@ class CommandOSSet : public Command
*
* Rob
**/
- if (!Config.SuperAdmin)
- notice_lang(Config.s_OperServ, u, OPER_SUPER_ADMIN_NOT_ENABLED);
+ if (!Config->SuperAdmin)
+ notice_lang(Config->s_OperServ, u, OPER_SUPER_ADMIN_NOT_ENABLED);
else if (setting.equals_ci("ON"))
{
u->isSuperAdmin = 1;
- notice_lang(Config.s_OperServ, u, OPER_SUPER_ADMIN_ON);
- Alog() << Config.s_OperServ << ": " << u->nick << " is a SuperAdmin";
+ notice_lang(Config->s_OperServ, u, OPER_SUPER_ADMIN_ON);
+ Alog() << Config->s_OperServ << ": " << u->nick << " is a SuperAdmin";
ircdproto->SendGlobops(OperServ, getstring(OPER_SUPER_ADMIN_WALL_ON), u->nick.c_str());
}
else if (setting.equals_ci("OFF"))
{
u->isSuperAdmin = 0;
- notice_lang(Config.s_OperServ, u, OPER_SUPER_ADMIN_OFF);
- Alog() << Config.s_OperServ << ": " << u->nick << " is no longer a SuperAdmin";
+ notice_lang(Config->s_OperServ, u, OPER_SUPER_ADMIN_OFF);
+ Alog() << Config->s_OperServ << ": " << u->nick << " is no longer a SuperAdmin";
ircdproto->SendGlobops(OperServ, getstring(OPER_SUPER_ADMIN_WALL_OFF), u->nick.c_str());
}
else
- notice_lang(Config.s_OperServ, u, OPER_SUPER_ADMIN_SYNTAX);
+ notice_lang(Config->s_OperServ, u, OPER_SUPER_ADMIN_SYNTAX);
return MOD_CONT;
}
@@ -187,22 +187,22 @@ class CommandOSSet : public Command
{
debug = 1;
Alog() << "Debug mode activated";
- notice_lang(Config.s_OperServ, u, OPER_SET_DEBUG_ON);
+ notice_lang(Config->s_OperServ, u, OPER_SET_DEBUG_ON);
}
else if (setting.equals_ci("OFF") || (setting[0] == '0' && setting.is_number_only() && !convertTo<int>(setting)))
{
Alog() << "Debug mode deactivated";
debug = 0;
- notice_lang(Config.s_OperServ, u, OPER_SET_DEBUG_OFF);
+ notice_lang(Config->s_OperServ, u, OPER_SET_DEBUG_OFF);
}
else if (setting.is_number_only() && convertTo<int>(setting) > 0)
{
debug = convertTo<int>(setting);
Alog() << "Debug mode activated (level " << debug << ")";
- notice_lang(Config.s_OperServ, u, OPER_SET_DEBUG_LEVEL, debug);
+ notice_lang(Config->s_OperServ, u, OPER_SET_DEBUG_LEVEL, debug);
}
else
- notice_lang(Config.s_OperServ, u, OPER_SET_DEBUG_ERROR);
+ notice_lang(Config->s_OperServ, u, OPER_SET_DEBUG_ERROR);
return MOD_CONT;
}
@@ -221,16 +221,16 @@ class CommandOSSet : public Command
{
noexpire = true;
Alog() << "No expire mode activated";
- notice_lang(Config.s_OperServ, u, OPER_SET_NOEXPIRE_ON);
+ notice_lang(Config->s_OperServ, u, OPER_SET_NOEXPIRE_ON);
}
else if (setting.equals_ci("OFF"))
{
noexpire = false;
Alog() << "No expire mode deactivated";
- notice_lang(Config.s_OperServ, u, OPER_SET_NOEXPIRE_OFF);
+ notice_lang(Config->s_OperServ, u, OPER_SET_NOEXPIRE_OFF);
}
else
- notice_lang(Config.s_OperServ, u, OPER_SET_NOEXPIRE_ERROR);
+ notice_lang(Config->s_OperServ, u, OPER_SET_NOEXPIRE_ERROR);
return MOD_CONT;
}
@@ -258,28 +258,28 @@ class CommandOSSet : public Command
else if (option.equals_ci("NOEXPIRE"))
return this->DoSetNoExpire(u, params);
else
- notice_lang(Config.s_OperServ, u, OPER_SET_UNKNOWN_OPTION, option.c_str());
+ notice_lang(Config->s_OperServ, u, OPER_SET_UNKNOWN_OPTION, option.c_str());
return MOD_CONT;
}
bool OnHelp(User *u, const Anope::string &subcommand)
{
if (subcommand.empty())
- notice_help(Config.s_OperServ, u, OPER_HELP_SET);
+ notice_help(Config->s_OperServ, u, OPER_HELP_SET);
else if (subcommand.equals_ci("LIST"))
- notice_help(Config.s_OperServ, u, OPER_HELP_SET_LIST);
+ notice_help(Config->s_OperServ, u, OPER_HELP_SET_LIST);
else if (subcommand.equals_ci("READONLY"))
- notice_help(Config.s_OperServ, u, OPER_HELP_SET_READONLY);
+ notice_help(Config->s_OperServ, u, OPER_HELP_SET_READONLY);
else if (subcommand.equals_ci("LOGCHAN"))
- notice_help(Config.s_OperServ, u, OPER_HELP_SET_LOGCHAN);
+ notice_help(Config->s_OperServ, u, OPER_HELP_SET_LOGCHAN);
else if (subcommand.equals_ci("DEBUG"))
- notice_help(Config.s_OperServ, u, OPER_HELP_SET_DEBUG);
+ notice_help(Config->s_OperServ, u, OPER_HELP_SET_DEBUG);
else if (subcommand.equals_ci("NOEXPIRE"))
- notice_help(Config.s_OperServ, u, OPER_HELP_SET_NOEXPIRE);
+ notice_help(Config->s_OperServ, u, OPER_HELP_SET_NOEXPIRE);
else if (subcommand.equals_ci("IGNORE"))
- notice_help(Config.s_OperServ, u, OPER_HELP_SET_IGNORE);
+ notice_help(Config->s_OperServ, u, OPER_HELP_SET_IGNORE);
else if (subcommand.equals_ci("SUPERADMIN"))
- notice_help(Config.s_OperServ, u, OPER_HELP_SET_SUPERADMIN);
+ notice_help(Config->s_OperServ, u, OPER_HELP_SET_SUPERADMIN);
else
return false;
@@ -288,12 +288,12 @@ class CommandOSSet : public Command
void OnSyntaxError(User *u, const Anope::string &subcommand)
{
- syntax_error(Config.s_OperServ, u, "SET", OPER_SET_SYNTAX);
+ syntax_error(Config->s_OperServ, u, "SET", OPER_SET_SYNTAX);
}
void OnServHelp(User *u)
{
- notice_lang(Config.s_OperServ, u, OPER_HELP_CMD_SET);
+ notice_lang(Config->s_OperServ, u, OPER_HELP_CMD_SET);
}
};
diff --git a/modules/core/os_shutdown.cpp b/modules/core/os_shutdown.cpp
index c92713f83..04e303b31 100644
--- a/modules/core/os_shutdown.cpp
+++ b/modules/core/os_shutdown.cpp
@@ -24,21 +24,21 @@ class CommandOSShutdown : public Command
{
quitmsg = "SHUTDOWN command received from " + u->nick;
- if (Config.GlobalOnCycle)
- oper_global("", "%s", Config.GlobalOnCycleMessage.c_str());
+ if (Config->GlobalOnCycle)
+ oper_global("", "%s", Config->GlobalOnCycleMessage.c_str());
shutting_down = true;
return MOD_CONT;
}
bool OnHelp(User *u, const Anope::string &subcommand)
{
- notice_help(Config.s_OperServ, u, OPER_HELP_SHUTDOWN);
+ notice_help(Config->s_OperServ, u, OPER_HELP_SHUTDOWN);
return true;
}
void OnServHelp(User *u)
{
- notice_lang(Config.s_OperServ, u, OPER_HELP_CMD_SHUTDOWN);
+ notice_lang(Config->s_OperServ, u, OPER_HELP_CMD_SHUTDOWN);
}
};
diff --git a/modules/core/os_snline.cpp b/modules/core/os_snline.cpp
index 0c01e6b75..30be073b5 100644
--- a/modules/core/os_snline.cpp
+++ b/modules/core/os_snline.cpp
@@ -26,11 +26,11 @@ class SNLineDelCallback : public NumberList
~SNLineDelCallback()
{
if (!Deleted)
- notice_lang(Config.s_OperServ, u, OPER_SNLINE_NO_MATCH);
+ notice_lang(Config->s_OperServ, u, OPER_SNLINE_NO_MATCH);
else if (Deleted == 1)
- notice_lang(Config.s_OperServ, u, OPER_SNLINE_DELETED_ONE);
+ notice_lang(Config->s_OperServ, u, OPER_SNLINE_DELETED_ONE);
else
- notice_lang(Config.s_OperServ, u, OPER_SNLINE_DELETED_SEVERAL, Deleted);
+ notice_lang(Config->s_OperServ, u, OPER_SNLINE_DELETED_SEVERAL, Deleted);
}
void HandleNumber(unsigned Number)
@@ -63,7 +63,7 @@ class SNLineListCallback : public NumberList
~SNLineListCallback()
{
if (!SentHeader)
- notice_lang(Config.s_OperServ, u, OPER_SNLINE_NO_MATCH);
+ notice_lang(Config->s_OperServ, u, OPER_SNLINE_NO_MATCH);
}
virtual void HandleNumber(unsigned Number)
@@ -76,7 +76,7 @@ class SNLineListCallback : public NumberList
if (!SentHeader)
{
SentHeader = true;
- notice_lang(Config.s_OperServ, u, OPER_SNLINE_LIST_HEADER);
+ notice_lang(Config->s_OperServ, u, OPER_SNLINE_LIST_HEADER);
}
DoList(u, x, Number - 1);
@@ -84,7 +84,7 @@ class SNLineListCallback : public NumberList
static void DoList(User *u, XLine *x, unsigned Number)
{
- notice_lang(Config.s_OperServ, u, OPER_SNLINE_LIST_FORMAT, Number + 1, x->Mask.c_str(), x->Reason.c_str());
+ notice_lang(Config->s_OperServ, u, OPER_SNLINE_LIST_FORMAT, Number + 1, x->Mask.c_str(), x->Reason.c_str());
}
};
@@ -105,7 +105,7 @@ class SNLineViewCallback : public SNLineListCallback
if (!SentHeader)
{
SentHeader = true;
- notice_lang(Config.s_OperServ, u, OPER_SNLINE_VIEW_HEADER);
+ notice_lang(Config->s_OperServ, u, OPER_SNLINE_VIEW_HEADER);
}
DoList(u, x, Number - 1);
@@ -119,7 +119,7 @@ class SNLineViewCallback : public SNLineListCallback
tm = *localtime(&x->Created);
strftime_lang(timebuf, sizeof(timebuf), u, STRFTIME_SHORT_DATE_FORMAT, &tm);
Anope::string expirebuf = expire_left(u->Account(), x->Expires);
- notice_lang(Config.s_OperServ, u, OPER_SNLINE_VIEW_FORMAT, Number + 1, x->Mask.c_str(), x->By.c_str(), timebuf, expirebuf.c_str(), x->Reason.c_str());
+ notice_lang(Config->s_OperServ, u, OPER_SNLINE_VIEW_FORMAT, Number + 1, x->Mask.c_str(), x->By.c_str(), timebuf, expirebuf.c_str(), x->Reason.c_str());
}
};
@@ -140,7 +140,7 @@ class CommandOSSNLine : public Command
last_param = 3;
}
- expires = !expiry.empty() ? dotime(expiry) : Config.SNLineExpiry;
+ expires = !expiry.empty() ? dotime(expiry) : Config->SNLineExpiry;
/* If the expiry given does not contain a final letter, it's in days,
* said the doc. Ah well.
*/
@@ -149,7 +149,7 @@ class CommandOSSNLine : public Command
/* Do not allow less than a minute expiry time */
if (expires && expires < 60)
{
- notice_lang(Config.s_OperServ, u, BAD_EXPIRY_TIME);
+ notice_lang(Config->s_OperServ, u, BAD_EXPIRY_TIME);
return MOD_CONT;
}
else if (expires > 0)
@@ -190,9 +190,9 @@ class CommandOSSNLine : public Command
if (!x)
return MOD_CONT;
- notice_lang(Config.s_OperServ, u, OPER_SNLINE_ADDED, mask.c_str());
+ notice_lang(Config->s_OperServ, u, OPER_SNLINE_ADDED, mask.c_str());
- if (Config.WallOSSNLine)
+ if (Config->WallOSSNLine)
{
Anope::string buf;
@@ -222,11 +222,11 @@ class CommandOSSNLine : public Command
buf = "expires in " + stringify(wall_expiry) + " " + s + (wall_expiry == 1 ? "" : "s");
}
- ircdproto->SendGlobops(findbot(Config.s_OperServ), "%s added an SNLINE for %s (%s)", u->nick.c_str(), mask.c_str(), buf.c_str());
+ ircdproto->SendGlobops(findbot(Config->s_OperServ), "%s added an SNLINE for %s (%s)", u->nick.c_str(), mask.c_str(), buf.c_str());
}
if (readonly)
- notice_lang(Config.s_OperServ, u, READ_ONLY_MODE);
+ notice_lang(Config->s_OperServ, u, READ_ONLY_MODE);
}
else
@@ -239,7 +239,7 @@ class CommandOSSNLine : public Command
{
if (SNLine->GetList().empty())
{
- notice_lang(Config.s_OperServ, u, OPER_SNLINE_LIST_EMPTY);
+ notice_lang(Config->s_OperServ, u, OPER_SNLINE_LIST_EMPTY);
return MOD_CONT;
}
@@ -262,18 +262,18 @@ class CommandOSSNLine : public Command
if (!x)
{
- notice_lang(Config.s_OperServ, u, OPER_SNLINE_NOT_FOUND, mask.c_str());
+ notice_lang(Config->s_OperServ, u, OPER_SNLINE_NOT_FOUND, mask.c_str());
return MOD_CONT;
}
FOREACH_MOD(I_OnDelXLine, OnDelXLine(u, x, X_SNLINE));
SNLineDelCallback::DoDel(u, x);
- notice_lang(Config.s_OperServ, u, OPER_SNLINE_DELETED, mask.c_str());
+ notice_lang(Config->s_OperServ, u, OPER_SNLINE_DELETED, mask.c_str());
}
if (readonly)
- notice_lang(Config.s_OperServ, u, READ_ONLY_MODE);
+ notice_lang(Config->s_OperServ, u, READ_ONLY_MODE);
return MOD_CONT;
}
@@ -282,7 +282,7 @@ class CommandOSSNLine : public Command
{
if (SNLine->GetList().empty())
{
- notice_lang(Config.s_OperServ, u, OPER_SNLINE_LIST_EMPTY);
+ notice_lang(Config->s_OperServ, u, OPER_SNLINE_LIST_EMPTY);
return MOD_CONT;
}
@@ -306,7 +306,7 @@ class CommandOSSNLine : public Command
if (!SentHeader)
{
SentHeader = true;
- notice_lang(Config.s_OperServ, u, OPER_SNLINE_LIST_HEADER);
+ notice_lang(Config->s_OperServ, u, OPER_SNLINE_LIST_HEADER);
}
SNLineListCallback::DoList(u, x, i);
@@ -314,9 +314,9 @@ class CommandOSSNLine : public Command
}
if (!SentHeader)
- notice_lang(Config.s_OperServ, u, OPER_SNLINE_NO_MATCH);
+ notice_lang(Config->s_OperServ, u, OPER_SNLINE_NO_MATCH);
else
- notice_lang(Config.s_OperServ, u, END_OF_ANY_LIST, "SNLine");
+ notice_lang(Config->s_OperServ, u, END_OF_ANY_LIST, "SNLine");
}
return MOD_CONT;
@@ -326,7 +326,7 @@ class CommandOSSNLine : public Command
{
if (SNLine->GetList().empty())
{
- notice_lang(Config.s_OperServ, u, OPER_SNLINE_LIST_EMPTY);
+ notice_lang(Config->s_OperServ, u, OPER_SNLINE_LIST_EMPTY);
return MOD_CONT;
}
@@ -350,7 +350,7 @@ class CommandOSSNLine : public Command
if (!SentHeader)
{
SentHeader = true;
- notice_lang(Config.s_OperServ, u, OPER_SNLINE_VIEW_HEADER);
+ notice_lang(Config->s_OperServ, u, OPER_SNLINE_VIEW_HEADER);
}
SNLineViewCallback::DoList(u, x, i);
@@ -358,7 +358,7 @@ class CommandOSSNLine : public Command
}
if (!SentHeader)
- notice_lang(Config.s_OperServ, u, OPER_SNLINE_NO_MATCH);
+ notice_lang(Config->s_OperServ, u, OPER_SNLINE_NO_MATCH);
}
return MOD_CONT;
@@ -368,7 +368,7 @@ class CommandOSSNLine : public Command
{
FOREACH_MOD(I_OnDelXLine, OnDelXLine(u, NULL, X_SNLINE));
SNLine->Clear();
- notice_lang(Config.s_OperServ, u, OPER_SNLINE_CLEAR);
+ notice_lang(Config->s_OperServ, u, OPER_SNLINE_CLEAR);
return MOD_CONT;
}
@@ -398,18 +398,18 @@ class CommandOSSNLine : public Command
bool OnHelp(User *u, const Anope::string &subcommand)
{
- notice_help(Config.s_OperServ, u, OPER_HELP_SNLINE);
+ notice_help(Config->s_OperServ, u, OPER_HELP_SNLINE);
return true;
}
void OnSyntaxError(User *u, const Anope::string &subcommand)
{
- syntax_error(Config.s_OperServ, u, "SNLINE", OPER_SNLINE_SYNTAX);
+ syntax_error(Config->s_OperServ, u, "SNLINE", OPER_SNLINE_SYNTAX);
}
void OnServHelp(User *u)
{
- notice_lang(Config.s_OperServ, u, OPER_HELP_CMD_SNLINE);
+ notice_lang(Config->s_OperServ, u, OPER_HELP_CMD_SNLINE);
}
};
diff --git a/modules/core/os_sqline.cpp b/modules/core/os_sqline.cpp
index dbf0d4c18..e014d6c82 100644
--- a/modules/core/os_sqline.cpp
+++ b/modules/core/os_sqline.cpp
@@ -25,11 +25,11 @@ class SQLineDelCallback : public NumberList
~SQLineDelCallback()
{
if (!Deleted)
- notice_lang(Config.s_OperServ, u, OPER_SQLINE_NO_MATCH);
+ notice_lang(Config->s_OperServ, u, OPER_SQLINE_NO_MATCH);
else if (Deleted == 1)
- notice_lang(Config.s_OperServ, u, OPER_SQLINE_DELETED_ONE);
+ notice_lang(Config->s_OperServ, u, OPER_SQLINE_DELETED_ONE);
else
- notice_lang(Config.s_OperServ, u, OPER_SQLINE_DELETED_SEVERAL, Deleted);
+ notice_lang(Config->s_OperServ, u, OPER_SQLINE_DELETED_SEVERAL, Deleted);
}
void HandleNumber(unsigned Number)
@@ -62,7 +62,7 @@ class SQLineListCallback : public NumberList
~SQLineListCallback()
{
if (!SentHeader)
- notice_lang(Config.s_OperServ, u, OPER_SQLINE_NO_MATCH);
+ notice_lang(Config->s_OperServ, u, OPER_SQLINE_NO_MATCH);
}
virtual void HandleNumber(unsigned Number)
@@ -75,7 +75,7 @@ class SQLineListCallback : public NumberList
if (!SentHeader)
{
SentHeader = true;
- notice_lang(Config.s_OperServ, u, OPER_SQLINE_LIST_HEADER);
+ notice_lang(Config->s_OperServ, u, OPER_SQLINE_LIST_HEADER);
}
DoList(u, x, Number - 1);
@@ -83,7 +83,7 @@ class SQLineListCallback : public NumberList
static void DoList(User *u, XLine *x, unsigned Number)
{
- notice_lang(Config.s_OperServ, u, OPER_SQLINE_LIST_FORMAT, Number + 1, x->Mask.c_str(), x->Reason.c_str());
+ notice_lang(Config->s_OperServ, u, OPER_SQLINE_LIST_FORMAT, Number + 1, x->Mask.c_str(), x->Reason.c_str());
}
};
@@ -104,7 +104,7 @@ class SQLineViewCallback : public SQLineListCallback
if (!SentHeader)
{
SentHeader = true;
- notice_lang(Config.s_OperServ, u, OPER_SQLINE_VIEW_HEADER);
+ notice_lang(Config->s_OperServ, u, OPER_SQLINE_VIEW_HEADER);
}
DoList(u, x, Number);
@@ -118,7 +118,7 @@ class SQLineViewCallback : public SQLineListCallback
tm = *localtime(&x->Created);
strftime_lang(timebuf, sizeof(timebuf), u, STRFTIME_SHORT_DATE_FORMAT, &tm);
Anope::string expirebuf = expire_left(u->Account(), x->Expires);
- notice_lang(Config.s_OperServ, u, OPER_SQLINE_VIEW_FORMAT, Number + 1, x->Mask.c_str(), x->By.c_str(), timebuf, expirebuf.c_str(), x->Reason.c_str());
+ notice_lang(Config->s_OperServ, u, OPER_SQLINE_VIEW_FORMAT, Number + 1, x->Mask.c_str(), x->By.c_str(), timebuf, expirebuf.c_str(), x->Reason.c_str());
}
};
@@ -139,7 +139,7 @@ class CommandOSSQLine : public Command
last_param = 3;
}
- expires = !expiry.empty() ? dotime(expiry) : Config.SQLineExpiry;
+ expires = !expiry.empty() ? dotime(expiry) : Config->SQLineExpiry;
/* If the expiry given does not contain a final letter, it's in days,
* said the doc. Ah well.
*/
@@ -148,7 +148,7 @@ class CommandOSSQLine : public Command
/* Do not allow less than a minute expiry time */
if (expires && expires < 60)
{
- notice_lang(Config.s_OperServ, u, BAD_EXPIRY_TIME);
+ notice_lang(Config->s_OperServ, u, BAD_EXPIRY_TIME);
return MOD_CONT;
}
else if (expires > 0)
@@ -170,9 +170,9 @@ class CommandOSSQLine : public Command
if (!x)
return MOD_CONT;
- notice_lang(Config.s_OperServ, u, OPER_SQLINE_ADDED, mask.c_str());
+ notice_lang(Config->s_OperServ, u, OPER_SQLINE_ADDED, mask.c_str());
- if (Config.WallOSSQLine)
+ if (Config->WallOSSQLine)
{
Anope::string buf;
@@ -206,7 +206,7 @@ class CommandOSSQLine : public Command
}
if (readonly)
- notice_lang(Config.s_OperServ, u, READ_ONLY_MODE);
+ notice_lang(Config->s_OperServ, u, READ_ONLY_MODE);
}
else
@@ -219,7 +219,7 @@ class CommandOSSQLine : public Command
{
if (SQLine->GetList().empty())
{
- notice_lang(Config.s_OperServ, u, OPER_SQLINE_LIST_EMPTY);
+ notice_lang(Config->s_OperServ, u, OPER_SQLINE_LIST_EMPTY);
return MOD_CONT;
}
@@ -242,18 +242,18 @@ class CommandOSSQLine : public Command
if (!x)
{
- notice_lang(Config.s_OperServ, u, OPER_SQLINE_NOT_FOUND, mask.c_str());
+ notice_lang(Config->s_OperServ, u, OPER_SQLINE_NOT_FOUND, mask.c_str());
return MOD_CONT;
}
FOREACH_MOD(I_OnDelXLine, OnDelXLine(u, x, X_SQLINE));
SQLineDelCallback::DoDel(u, x);
- notice_lang(Config.s_OperServ, u, OPER_SQLINE_DELETED, mask.c_str());
+ notice_lang(Config->s_OperServ, u, OPER_SQLINE_DELETED, mask.c_str());
}
if (readonly)
- notice_lang(Config.s_OperServ, u, READ_ONLY_MODE);
+ notice_lang(Config->s_OperServ, u, READ_ONLY_MODE);
return MOD_CONT;
}
@@ -262,7 +262,7 @@ class CommandOSSQLine : public Command
{
if (SQLine->GetList().empty())
{
- notice_lang(Config.s_OperServ, u, OPER_SQLINE_LIST_EMPTY);
+ notice_lang(Config->s_OperServ, u, OPER_SQLINE_LIST_EMPTY);
return MOD_CONT;
}
@@ -286,7 +286,7 @@ class CommandOSSQLine : public Command
if (!SentHeader)
{
SentHeader = true;
- notice_lang(Config.s_OperServ, u, OPER_SQLINE_LIST_HEADER);
+ notice_lang(Config->s_OperServ, u, OPER_SQLINE_LIST_HEADER);
}
SQLineListCallback::DoList(u, x, i);
@@ -294,9 +294,9 @@ class CommandOSSQLine : public Command
}
if (!SentHeader)
- notice_lang(Config.s_OperServ, u, OPER_SQLINE_NO_MATCH);
+ notice_lang(Config->s_OperServ, u, OPER_SQLINE_NO_MATCH);
else
- notice_lang(Config.s_OperServ, u, END_OF_ANY_LIST, "SQLine");
+ notice_lang(Config->s_OperServ, u, END_OF_ANY_LIST, "SQLine");
}
return MOD_CONT;
@@ -306,7 +306,7 @@ class CommandOSSQLine : public Command
{
if (SQLine->GetList().empty())
{
- notice_lang(Config.s_OperServ, u, OPER_SQLINE_LIST_EMPTY);
+ notice_lang(Config->s_OperServ, u, OPER_SQLINE_LIST_EMPTY);
return MOD_CONT;
}
@@ -330,7 +330,7 @@ class CommandOSSQLine : public Command
if (!SentHeader)
{
SentHeader = true;
- notice_lang(Config.s_OperServ, u, OPER_SQLINE_VIEW_HEADER);
+ notice_lang(Config->s_OperServ, u, OPER_SQLINE_VIEW_HEADER);
}
SQLineViewCallback::DoList(u, x, i);
@@ -338,7 +338,7 @@ class CommandOSSQLine : public Command
}
if (!SentHeader)
- notice_lang(Config.s_OperServ, u, OPER_SQLINE_NO_MATCH);
+ notice_lang(Config->s_OperServ, u, OPER_SQLINE_NO_MATCH);
}
return MOD_CONT;
@@ -348,7 +348,7 @@ class CommandOSSQLine : public Command
{
FOREACH_MOD(I_OnDelXLine, OnDelXLine(u, NULL, X_SQLINE));
SGLine->Clear();
- notice_lang(Config.s_OperServ, u, OPER_SQLINE_CLEAR);
+ notice_lang(Config->s_OperServ, u, OPER_SQLINE_CLEAR);
return MOD_CONT;
}
@@ -378,18 +378,18 @@ class CommandOSSQLine : public Command
bool OnHelp(User *u, const Anope::string &subcommand)
{
- notice_help(Config.s_OperServ, u, OPER_HELP_SQLINE);
+ notice_help(Config->s_OperServ, u, OPER_HELP_SQLINE);
return true;
}
void OnSyntaxError(User *u, const Anope::string &subcommand)
{
- syntax_error(Config.s_OperServ, u, "SQLINE", OPER_SQLINE_SYNTAX);
+ syntax_error(Config->s_OperServ, u, "SQLINE", OPER_SQLINE_SYNTAX);
}
void OnServHelp(User *u)
{
- notice_lang(Config.s_OperServ, u, OPER_HELP_CMD_SQLINE);
+ notice_lang(Config->s_OperServ, u, OPER_HELP_CMD_SQLINE);
}
};
diff --git a/modules/core/os_staff.cpp b/modules/core/os_staff.cpp
index e8a8bf0a9..c1d5b38ba 100644
--- a/modules/core/os_staff.cpp
+++ b/modules/core/os_staff.cpp
@@ -22,9 +22,9 @@ class CommandOSStaff : public Command
CommandReturn Execute(User *u, const std::vector<Anope::string> &params)
{
- notice_lang(Config.s_OperServ, u, OPER_STAFF_LIST_HEADER);
+ notice_lang(Config->s_OperServ, u, OPER_STAFF_LIST_HEADER);
- for (std::list<std::pair<Anope::string, Anope::string> >::iterator it = Config.Opers.begin(), it_end = Config.Opers.end(); it != it_end; ++it)
+ for (std::list<std::pair<Anope::string, Anope::string> >::iterator it = Config->Opers.begin(), it_end = Config->Opers.end(); it != it_end; ++it)
{
int found = 0;
Anope::string nick = it->first, type = it->second;
@@ -41,29 +41,29 @@ class CommandOSStaff : public Command
{
found = 1;
if (na->nick.equals_ci(u2->nick))
- notice_lang(Config.s_OperServ, u, OPER_STAFF_FORMAT, '*', type.c_str(), u2->nick.c_str());
+ notice_lang(Config->s_OperServ, u, OPER_STAFF_FORMAT, '*', type.c_str(), u2->nick.c_str());
else
- notice_lang(Config.s_OperServ, u, OPER_STAFF_AFORMAT, '*', type.c_str(), na->nick.c_str(), u2->nick.c_str());
+ notice_lang(Config->s_OperServ, u, OPER_STAFF_AFORMAT, '*', type.c_str(), na->nick.c_str(), u2->nick.c_str());
}
}
if (!found)
- notice_lang(Config.s_OperServ, u, OPER_STAFF_FORMAT, ' ', type.c_str(), na->nick.c_str());
+ notice_lang(Config->s_OperServ, u, OPER_STAFF_FORMAT, ' ', type.c_str(), na->nick.c_str());
}
}
- notice_lang(Config.s_OperServ, u, END_OF_ANY_LIST, "Staff");
+ notice_lang(Config->s_OperServ, u, END_OF_ANY_LIST, "Staff");
return MOD_CONT;
}
bool OnHelp(User *u, const Anope::string &subcommand)
{
- notice_help(Config.s_OperServ, u, OPER_HELP_STAFF);
+ notice_help(Config->s_OperServ, u, OPER_HELP_STAFF);
return true;
}
void OnServHelp(User *u)
{
- notice_lang(Config.s_OperServ, u, OPER_HELP_CMD_STAFF);
+ notice_lang(Config->s_OperServ, u, OPER_HELP_CMD_STAFF);
}
};
diff --git a/modules/core/os_stats.cpp b/modules/core/os_stats.cpp
index efbf62e2f..d965c7dc5 100644
--- a/modules/core/os_stats.cpp
+++ b/modules/core/os_stats.cpp
@@ -41,81 +41,81 @@ class CommandOSStats : public Command
{
int timeout;
/* AKILLs */
- notice_lang(Config.s_OperServ, u, OPER_STATS_AKILL_COUNT, SGLine->GetCount());
- timeout = Config.AutokillExpiry + 59;
+ notice_lang(Config->s_OperServ, u, OPER_STATS_AKILL_COUNT, SGLine->GetCount());
+ timeout = Config->AutokillExpiry + 59;
if (timeout >= 172800)
- notice_lang(Config.s_OperServ, u, OPER_STATS_AKILL_EXPIRE_DAYS, timeout / 86400);
+ notice_lang(Config->s_OperServ, u, OPER_STATS_AKILL_EXPIRE_DAYS, timeout / 86400);
else if (timeout >= 86400)
- notice_lang(Config.s_OperServ, u, OPER_STATS_AKILL_EXPIRE_DAY);
+ notice_lang(Config->s_OperServ, u, OPER_STATS_AKILL_EXPIRE_DAY);
else if (timeout >= 7200)
- notice_lang(Config.s_OperServ, u, OPER_STATS_AKILL_EXPIRE_HOURS, timeout / 3600);
+ notice_lang(Config->s_OperServ, u, OPER_STATS_AKILL_EXPIRE_HOURS, timeout / 3600);
else if (timeout >= 3600)
- notice_lang(Config.s_OperServ, u, OPER_STATS_AKILL_EXPIRE_HOUR);
+ notice_lang(Config->s_OperServ, u, OPER_STATS_AKILL_EXPIRE_HOUR);
else if (timeout >= 120)
- notice_lang(Config.s_OperServ, u, OPER_STATS_AKILL_EXPIRE_MINS, timeout / 60);
+ notice_lang(Config->s_OperServ, u, OPER_STATS_AKILL_EXPIRE_MINS, timeout / 60);
else if (timeout >= 60)
- notice_lang(Config.s_OperServ, u, OPER_STATS_AKILL_EXPIRE_MIN);
+ notice_lang(Config->s_OperServ, u, OPER_STATS_AKILL_EXPIRE_MIN);
else
- notice_lang(Config.s_OperServ, u, OPER_STATS_AKILL_EXPIRE_NONE);
+ notice_lang(Config->s_OperServ, u, OPER_STATS_AKILL_EXPIRE_NONE);
if (ircd->snline)
{
/* SNLINEs */
- notice_lang(Config.s_OperServ, u, OPER_STATS_SNLINE_COUNT, SNLine->GetCount());
- timeout = Config.SNLineExpiry + 59;
+ notice_lang(Config->s_OperServ, u, OPER_STATS_SNLINE_COUNT, SNLine->GetCount());
+ timeout = Config->SNLineExpiry + 59;
if (timeout >= 172800)
- notice_lang(Config.s_OperServ, u, OPER_STATS_SNLINE_EXPIRE_DAYS, timeout / 86400);
+ notice_lang(Config->s_OperServ, u, OPER_STATS_SNLINE_EXPIRE_DAYS, timeout / 86400);
else if (timeout >= 86400)
- notice_lang(Config.s_OperServ, u, OPER_STATS_SNLINE_EXPIRE_DAY);
+ notice_lang(Config->s_OperServ, u, OPER_STATS_SNLINE_EXPIRE_DAY);
else if (timeout >= 7200)
- notice_lang(Config.s_OperServ, u, OPER_STATS_SNLINE_EXPIRE_HOURS, timeout / 3600);
+ notice_lang(Config->s_OperServ, u, OPER_STATS_SNLINE_EXPIRE_HOURS, timeout / 3600);
else if (timeout >= 3600)
- notice_lang(Config.s_OperServ, u, OPER_STATS_SNLINE_EXPIRE_HOUR);
+ notice_lang(Config->s_OperServ, u, OPER_STATS_SNLINE_EXPIRE_HOUR);
else if (timeout >= 120)
- notice_lang(Config.s_OperServ, u, OPER_STATS_SNLINE_EXPIRE_MINS, timeout / 60);
+ notice_lang(Config->s_OperServ, u, OPER_STATS_SNLINE_EXPIRE_MINS, timeout / 60);
else if (timeout >= 60)
- notice_lang(Config.s_OperServ, u, OPER_STATS_SNLINE_EXPIRE_MIN);
+ notice_lang(Config->s_OperServ, u, OPER_STATS_SNLINE_EXPIRE_MIN);
else
- notice_lang(Config.s_OperServ, u, OPER_STATS_SNLINE_EXPIRE_NONE);
+ notice_lang(Config->s_OperServ, u, OPER_STATS_SNLINE_EXPIRE_NONE);
}
if (ircd->sqline)
{
/* SQLINEs */
- notice_lang(Config.s_OperServ, u, OPER_STATS_SQLINE_COUNT, SQLine->GetCount());
- timeout = Config.SQLineExpiry + 59;
+ notice_lang(Config->s_OperServ, u, OPER_STATS_SQLINE_COUNT, SQLine->GetCount());
+ timeout = Config->SQLineExpiry + 59;
if (timeout >= 172800)
- notice_lang(Config.s_OperServ, u, OPER_STATS_SQLINE_EXPIRE_DAYS, timeout / 86400);
+ notice_lang(Config->s_OperServ, u, OPER_STATS_SQLINE_EXPIRE_DAYS, timeout / 86400);
else if (timeout >= 86400)
- notice_lang(Config.s_OperServ, u, OPER_STATS_SQLINE_EXPIRE_DAY);
+ notice_lang(Config->s_OperServ, u, OPER_STATS_SQLINE_EXPIRE_DAY);
else if (timeout >= 7200)
- notice_lang(Config.s_OperServ, u, OPER_STATS_SQLINE_EXPIRE_HOURS, timeout / 3600);
+ notice_lang(Config->s_OperServ, u, OPER_STATS_SQLINE_EXPIRE_HOURS, timeout / 3600);
else if (timeout >= 3600)
- notice_lang(Config.s_OperServ, u, OPER_STATS_SQLINE_EXPIRE_HOUR);
+ notice_lang(Config->s_OperServ, u, OPER_STATS_SQLINE_EXPIRE_HOUR);
else if (timeout >= 120)
- notice_lang(Config.s_OperServ, u, OPER_STATS_SQLINE_EXPIRE_MINS, timeout / 60);
+ notice_lang(Config->s_OperServ, u, OPER_STATS_SQLINE_EXPIRE_MINS, timeout / 60);
else if (timeout >= 60)
- notice_lang(Config.s_OperServ, u, OPER_STATS_SQLINE_EXPIRE_MIN);
+ notice_lang(Config->s_OperServ, u, OPER_STATS_SQLINE_EXPIRE_MIN);
else
- notice_lang(Config.s_OperServ, u, OPER_STATS_SQLINE_EXPIRE_NONE);
+ notice_lang(Config->s_OperServ, u, OPER_STATS_SQLINE_EXPIRE_NONE);
}
if (ircd->szline)
{
/* SZLINEs */
- notice_lang(Config.s_OperServ, u, OPER_STATS_SZLINE_COUNT, SZLine->GetCount());
- timeout = Config.SZLineExpiry + 59;
+ notice_lang(Config->s_OperServ, u, OPER_STATS_SZLINE_COUNT, SZLine->GetCount());
+ timeout = Config->SZLineExpiry + 59;
if (timeout >= 172800)
- notice_lang(Config.s_OperServ, u, OPER_STATS_SZLINE_EXPIRE_DAYS, timeout / 86400);
+ notice_lang(Config->s_OperServ, u, OPER_STATS_SZLINE_EXPIRE_DAYS, timeout / 86400);
else if (timeout >= 86400)
- notice_lang(Config.s_OperServ, u, OPER_STATS_SZLINE_EXPIRE_DAY);
+ notice_lang(Config->s_OperServ, u, OPER_STATS_SZLINE_EXPIRE_DAY);
else if (timeout >= 7200)
- notice_lang(Config.s_OperServ, u, OPER_STATS_SZLINE_EXPIRE_HOURS, timeout / 3600);
+ notice_lang(Config->s_OperServ, u, OPER_STATS_SZLINE_EXPIRE_HOURS, timeout / 3600);
else if (timeout >= 3600)
- notice_lang(Config.s_OperServ, u, OPER_STATS_SZLINE_EXPIRE_HOUR);
+ notice_lang(Config->s_OperServ, u, OPER_STATS_SZLINE_EXPIRE_HOUR);
else if (timeout >= 120)
- notice_lang(Config.s_OperServ, u, OPER_STATS_SZLINE_EXPIRE_MINS, timeout / 60);
+ notice_lang(Config->s_OperServ, u, OPER_STATS_SZLINE_EXPIRE_MINS, timeout / 60);
else if (timeout >= 60)
- notice_lang(Config.s_OperServ, u, OPER_STATS_SZLINE_EXPIRE_MIN);
+ notice_lang(Config->s_OperServ, u, OPER_STATS_SZLINE_EXPIRE_MIN);
else
- notice_lang(Config.s_OperServ, u, OPER_STATS_SZLINE_EXPIRE_NONE);
+ notice_lang(Config->s_OperServ, u, OPER_STATS_SZLINE_EXPIRE_NONE);
}
return MOD_CONT;
}
@@ -123,7 +123,7 @@ class CommandOSStats : public Command
CommandReturn DoStatsReset(User *u)
{
maxusercnt = usercnt;
- notice_lang(Config.s_OperServ, u, OPER_STATS_RESET);
+ notice_lang(Config->s_OperServ, u, OPER_STATS_RESET);
return MOD_CONT;
}
@@ -132,14 +132,14 @@ class CommandOSStats : public Command
char timebuf[64];
time_t uptime = time(NULL) - start_time;
int days = uptime / 86400, hours = (uptime / 3600) % 24, mins = (uptime / 60) % 60, secs = uptime % 60;
- notice_lang(Config.s_OperServ, u, OPER_STATS_CURRENT_USERS, usercnt, opcnt);
+ notice_lang(Config->s_OperServ, u, OPER_STATS_CURRENT_USERS, usercnt, opcnt);
struct tm *tm = localtime(&maxusertime);
strftime_lang(timebuf, sizeof(timebuf), u, STRFTIME_DATE_TIME_FORMAT, tm);
- notice_lang(Config.s_OperServ, u, OPER_STATS_MAX_USERS, maxusercnt, timebuf);
+ notice_lang(Config->s_OperServ, u, OPER_STATS_MAX_USERS, maxusercnt, timebuf);
if (days > 1)
- notice_lang(Config.s_OperServ, u, OPER_STATS_UPTIME_DHMS, days, hours, mins, secs);
+ notice_lang(Config->s_OperServ, u, OPER_STATS_UPTIME_DHMS, days, hours, mins, secs);
else if (days == 1)
- notice_lang(Config.s_OperServ, u, OPER_STATS_UPTIME_1DHMS, days, hours, mins, secs);
+ notice_lang(Config->s_OperServ, u, OPER_STATS_UPTIME_1DHMS, days, hours, mins, secs);
else
{
if (hours > 1)
@@ -147,16 +147,16 @@ class CommandOSStats : public Command
if (mins != 1)
{
if (secs != 1)
- notice_lang(Config.s_OperServ, u, OPER_STATS_UPTIME_HMS, hours, mins, secs);
+ notice_lang(Config->s_OperServ, u, OPER_STATS_UPTIME_HMS, hours, mins, secs);
else
- notice_lang(Config.s_OperServ, u, OPER_STATS_UPTIME_HM1S, hours, mins, secs);
+ notice_lang(Config->s_OperServ, u, OPER_STATS_UPTIME_HM1S, hours, mins, secs);
}
else
{
if (secs != 1)
- notice_lang(Config.s_OperServ, u, OPER_STATS_UPTIME_H1MS, hours, mins, secs);
+ notice_lang(Config->s_OperServ, u, OPER_STATS_UPTIME_H1MS, hours, mins, secs);
else
- notice_lang(Config.s_OperServ, u, OPER_STATS_UPTIME_H1M1S, hours, mins, secs);
+ notice_lang(Config->s_OperServ, u, OPER_STATS_UPTIME_H1M1S, hours, mins, secs);
}
}
else if (hours == 1)
@@ -164,16 +164,16 @@ class CommandOSStats : public Command
if (mins != 1)
{
if (secs != 1)
- notice_lang(Config.s_OperServ, u, OPER_STATS_UPTIME_1HMS, hours, mins, secs);
+ notice_lang(Config->s_OperServ, u, OPER_STATS_UPTIME_1HMS, hours, mins, secs);
else
- notice_lang(Config.s_OperServ, u, OPER_STATS_UPTIME_1HM1S, hours, mins, secs);
+ notice_lang(Config->s_OperServ, u, OPER_STATS_UPTIME_1HM1S, hours, mins, secs);
}
else
{
if (secs != 1)
- notice_lang(Config.s_OperServ, u, OPER_STATS_UPTIME_1H1MS, hours, mins, secs);
+ notice_lang(Config->s_OperServ, u, OPER_STATS_UPTIME_1H1MS, hours, mins, secs);
else
- notice_lang(Config.s_OperServ, u, OPER_STATS_UPTIME_1H1M1S, hours, mins, secs);
+ notice_lang(Config->s_OperServ, u, OPER_STATS_UPTIME_1H1M1S, hours, mins, secs);
}
}
else
@@ -181,16 +181,16 @@ class CommandOSStats : public Command
if (mins != 1)
{
if (secs != 1)
- notice_lang(Config.s_OperServ, u, OPER_STATS_UPTIME_MS, mins, secs);
+ notice_lang(Config->s_OperServ, u, OPER_STATS_UPTIME_MS, mins, secs);
else
- notice_lang(Config.s_OperServ, u, OPER_STATS_UPTIME_M1S, mins, secs);
+ notice_lang(Config->s_OperServ, u, OPER_STATS_UPTIME_M1S, mins, secs);
}
else
{
if (secs != 1)
- notice_lang(Config.s_OperServ, u, OPER_STATS_UPTIME_1MS, mins, secs);
+ notice_lang(Config->s_OperServ, u, OPER_STATS_UPTIME_1MS, mins, secs);
else
- notice_lang(Config.s_OperServ, u, OPER_STATS_UPTIME_1M1S, mins, secs);
+ notice_lang(Config->s_OperServ, u, OPER_STATS_UPTIME_1M1S, mins, secs);
}
}
}
@@ -209,9 +209,9 @@ class CommandOSStats : public Command
if (!buf.empty())
buf.erase(buf.begin());
- notice_lang(Config.s_OperServ, u, OPER_STATS_UPLINK_SERVER, Me->GetLinks().front()->GetName().c_str());
- notice_lang(Config.s_OperServ, u, OPER_STATS_UPLINK_CAPAB, buf.c_str());
- notice_lang(Config.s_OperServ, u, OPER_STATS_UPLINK_SERVER_COUNT, stats_count_servers(Me->GetLinks().front()));
+ notice_lang(Config->s_OperServ, u, OPER_STATS_UPLINK_SERVER, Me->GetLinks().front()->GetName().c_str());
+ notice_lang(Config->s_OperServ, u, OPER_STATS_UPLINK_CAPAB, buf.c_str());
+ notice_lang(Config->s_OperServ, u, OPER_STATS_UPLINK_SERVER_COUNT, stats_count_servers(Me->GetLinks().front()));
return MOD_CONT;
}
@@ -219,33 +219,33 @@ class CommandOSStats : public Command
{
long count, mem;
- notice_lang(Config.s_OperServ, u, OPER_STATS_BYTES_READ, TotalRead / 1024);
- notice_lang(Config.s_OperServ, u, OPER_STATS_BYTES_WRITTEN, TotalWritten / 1024);
+ notice_lang(Config->s_OperServ, u, OPER_STATS_BYTES_READ, TotalRead / 1024);
+ notice_lang(Config->s_OperServ, u, OPER_STATS_BYTES_WRITTEN, TotalWritten / 1024);
get_user_stats(count, mem);
- notice_lang(Config.s_OperServ, u, OPER_STATS_USER_MEM, count, (mem + 512) / 1024);
+ notice_lang(Config->s_OperServ, u, OPER_STATS_USER_MEM, count, (mem + 512) / 1024);
get_channel_stats(&count, &mem);
- notice_lang(Config.s_OperServ, u, OPER_STATS_CHANNEL_MEM, count, (mem + 512) / 1024);
+ notice_lang(Config->s_OperServ, u, OPER_STATS_CHANNEL_MEM, count, (mem + 512) / 1024);
get_core_stats(count, mem);
- notice_lang(Config.s_OperServ, u, OPER_STATS_GROUPS_MEM, count, (mem + 512) / 1024);
+ notice_lang(Config->s_OperServ, u, OPER_STATS_GROUPS_MEM, count, (mem + 512) / 1024);
get_aliases_stats(count, mem);
- notice_lang(Config.s_OperServ, u, OPER_STATS_ALIASES_MEM, count, (mem + 512) / 1024);
+ notice_lang(Config->s_OperServ, u, OPER_STATS_ALIASES_MEM, count, (mem + 512) / 1024);
get_chanserv_stats(&count, &mem);
- notice_lang(Config.s_OperServ, u, OPER_STATS_CHANSERV_MEM, count, (mem + 512) / 1024);
- if (!Config.s_BotServ.empty())
+ notice_lang(Config->s_OperServ, u, OPER_STATS_CHANSERV_MEM, count, (mem + 512) / 1024);
+ if (!Config->s_BotServ.empty())
{
get_botserv_stats(&count, &mem);
- notice_lang(Config.s_OperServ, u, OPER_STATS_BOTSERV_MEM, count, (mem + 512) / 1024);
+ notice_lang(Config->s_OperServ, u, OPER_STATS_BOTSERV_MEM, count, (mem + 512) / 1024);
}
- if (!Config.s_HostServ.empty())
+ if (!Config->s_HostServ.empty())
{
get_hostserv_stats(&count, &mem);
- notice_lang(Config.s_OperServ, u, OPER_STATS_HOSTSERV_MEM, count, (mem + 512) / 1024);
+ notice_lang(Config->s_OperServ, u, OPER_STATS_HOSTSERV_MEM, count, (mem + 512) / 1024);
}
get_operserv_stats(&count, &mem);
- notice_lang(Config.s_OperServ, u, OPER_STATS_OPERSERV_MEM, count, (mem + 512) / 1024);
+ notice_lang(Config->s_OperServ, u, OPER_STATS_OPERSERV_MEM, count, (mem + 512) / 1024);
get_session_stats(count, mem);
- notice_lang(Config.s_OperServ, u, OPER_STATS_SESSIONS_MEM, count, (mem + 512) / 1024);
+ notice_lang(Config->s_OperServ, u, OPER_STATS_SESSIONS_MEM, count, (mem + 512) / 1024);
return MOD_CONT;
}
@@ -265,7 +265,7 @@ class CommandOSStats : public Command
else if (extra.equals_ci("RESET"))
return this->DoStatsReset(u);
else if (!extra.equals_ci("MEMORY") && !extra.equals_ci("UPLINK"))
- notice_lang(Config.s_OperServ, u, OPER_STATS_UNKNOWN_OPTION, extra.c_str());
+ notice_lang(Config->s_OperServ, u, OPER_STATS_UNKNOWN_OPTION, extra.c_str());
}
if (extra.empty() || (!extra.equals_ci("MEMORY") && !extra.equals_ci("UPLINK")))
@@ -282,13 +282,13 @@ class CommandOSStats : public Command
bool OnHelp(User *u, const Anope::string &subcommand)
{
- notice_help(Config.s_OperServ, u, OPER_HELP_STATS);
+ notice_help(Config->s_OperServ, u, OPER_HELP_STATS);
return true;
}
void OnServHelp(User *u)
{
- notice_lang(Config.s_OperServ, u, OPER_HELP_CMD_STATS);
+ notice_lang(Config->s_OperServ, u, OPER_HELP_CMD_STATS);
}
};
diff --git a/modules/core/os_svsnick.cpp b/modules/core/os_svsnick.cpp
index 78d6e0485..a459691b0 100644
--- a/modules/core/os_svsnick.cpp
+++ b/modules/core/os_svsnick.cpp
@@ -29,35 +29,35 @@ class CommandOSSVSNick : public Command
NickAlias *na;
/* Truncate long nicknames to NICKMAX-2 characters */
- if (newnick.length() > Config.NickLen)
+ if (newnick.length() > Config->NickLen)
{
- notice_lang(Config.s_OperServ, u, NICK_X_TRUNCATED, newnick.c_str(), Config.NickLen, newnick.c_str());
- newnick = params[1].substr(0, Config.NickLen);
+ notice_lang(Config->s_OperServ, u, NICK_X_TRUNCATED, newnick.c_str(), Config->NickLen, newnick.c_str());
+ newnick = params[1].substr(0, Config->NickLen);
}
/* Check for valid characters */
if (newnick[0] == '-' || isdigit(newnick[0]))
{
- notice_lang(Config.s_OperServ, u, NICK_X_ILLEGAL, newnick.c_str());
+ notice_lang(Config->s_OperServ, u, NICK_X_ILLEGAL, newnick.c_str());
return MOD_CONT;
}
for (unsigned i = 0, end = newnick.length(); i < end; ++i)
if (!isvalidnick(newnick[i]))
{
- notice_lang(Config.s_OperServ, u, NICK_X_ILLEGAL, newnick.c_str());
+ notice_lang(Config->s_OperServ, u, NICK_X_ILLEGAL, newnick.c_str());
return MOD_CONT;
}
/* Check for a nick in use or a forbidden/suspended nick */
if (!(u2 = finduser(nick)))
- notice_lang(Config.s_OperServ, u, NICK_X_NOT_IN_USE, nick.c_str());
+ notice_lang(Config->s_OperServ, u, NICK_X_NOT_IN_USE, nick.c_str());
else if (finduser(newnick))
- notice_lang(Config.s_OperServ, u, NICK_X_IN_USE, newnick.c_str());
+ notice_lang(Config->s_OperServ, u, NICK_X_IN_USE, newnick.c_str());
else if ((na = findnick(newnick)) && na->HasFlag(NS_FORBIDDEN))
- notice_lang(Config.s_OperServ, u, NICK_X_FORBIDDEN, newnick.c_str());
+ notice_lang(Config->s_OperServ, u, NICK_X_FORBIDDEN, newnick.c_str());
else
{
- notice_lang(Config.s_OperServ, u, OPER_SVSNICK_NEWNICK, nick.c_str(), newnick.c_str());
+ notice_lang(Config->s_OperServ, u, OPER_SVSNICK_NEWNICK, nick.c_str(), newnick.c_str());
ircdproto->SendGlobops(OperServ, "%s used SVSNICK to change %s to %s", u->nick.c_str(), nick.c_str(), newnick.c_str());
ircdproto->SendForceNickChange(u2, newnick, time(NULL));
}
@@ -66,18 +66,18 @@ class CommandOSSVSNick : public Command
bool OnHelp(User *u, const Anope::string &subcommand)
{
- notice_help(Config.s_OperServ, u, OPER_HELP_SVSNICK);
+ notice_help(Config->s_OperServ, u, OPER_HELP_SVSNICK);
return true;
}
void OnSyntaxError(User *u, const Anope::string &subcommand)
{
- syntax_error(Config.s_OperServ, u, "SVSNICK", OPER_SVSNICK_SYNTAX);
+ syntax_error(Config->s_OperServ, u, "SVSNICK", OPER_SVSNICK_SYNTAX);
}
void OnServHelp(User *u)
{
- notice_lang(Config.s_OperServ, u, OPER_HELP_CMD_SVSNICK);
+ notice_lang(Config->s_OperServ, u, OPER_HELP_CMD_SVSNICK);
}
};
diff --git a/modules/core/os_szline.cpp b/modules/core/os_szline.cpp
index 73d6fc0fe..6174d4c43 100644
--- a/modules/core/os_szline.cpp
+++ b/modules/core/os_szline.cpp
@@ -25,11 +25,11 @@ class SZLineDelCallback : public NumberList
~SZLineDelCallback()
{
if (!Deleted)
- notice_lang(Config.s_OperServ, u, OPER_SZLINE_NO_MATCH);
+ notice_lang(Config->s_OperServ, u, OPER_SZLINE_NO_MATCH);
else if (Deleted == 1)
- notice_lang(Config.s_OperServ, u, OPER_SZLINE_DELETED_ONE);
+ notice_lang(Config->s_OperServ, u, OPER_SZLINE_DELETED_ONE);
else
- notice_lang(Config.s_OperServ, u, OPER_SZLINE_DELETED_SEVERAL, Deleted);
+ notice_lang(Config->s_OperServ, u, OPER_SZLINE_DELETED_SEVERAL, Deleted);
}
void HandleNumber(unsigned Number)
@@ -62,7 +62,7 @@ class SZLineListCallback : public NumberList
~SZLineListCallback()
{
if (!SentHeader)
- notice_lang(Config.s_OperServ, u, OPER_SZLINE_NO_MATCH);
+ notice_lang(Config->s_OperServ, u, OPER_SZLINE_NO_MATCH);
}
virtual void HandleNumber(unsigned Number)
@@ -75,7 +75,7 @@ class SZLineListCallback : public NumberList
if (!SentHeader)
{
SentHeader = true;
- notice_lang(Config.s_OperServ, u, OPER_SZLINE_LIST_HEADER);
+ notice_lang(Config->s_OperServ, u, OPER_SZLINE_LIST_HEADER);
}
DoList(u, x, Number - 1);
@@ -83,7 +83,7 @@ class SZLineListCallback : public NumberList
static void DoList(User *u, XLine *x, unsigned Number)
{
- notice_lang(Config.s_OperServ, u, OPER_SZLINE_LIST_FORMAT, Number + 1, x->Mask.c_str(), x->Reason.c_str());
+ notice_lang(Config->s_OperServ, u, OPER_SZLINE_LIST_FORMAT, Number + 1, x->Mask.c_str(), x->Reason.c_str());
}
};
@@ -104,7 +104,7 @@ class SZLineViewCallback : public SZLineListCallback
if (!SentHeader)
{
SentHeader = true;
- notice_lang(Config.s_OperServ, u, OPER_SZLINE_VIEW_HEADER);
+ notice_lang(Config->s_OperServ, u, OPER_SZLINE_VIEW_HEADER);
}
DoList(u, x, Number - 1);
@@ -118,7 +118,7 @@ class SZLineViewCallback : public SZLineListCallback
tm = *localtime(&x->Created);
strftime_lang(timebuf, sizeof(timebuf), u, STRFTIME_SHORT_DATE_FORMAT, &tm);
Anope::string expirebuf = expire_left(u->Account(), x->Expires);
- notice_lang(Config.s_OperServ, u, OPER_SZLINE_VIEW_FORMAT, Number + 1, x->Mask.c_str(), x->By.c_str(), timebuf, expirebuf.c_str(), x->Reason.c_str());
+ notice_lang(Config->s_OperServ, u, OPER_SZLINE_VIEW_FORMAT, Number + 1, x->Mask.c_str(), x->By.c_str(), timebuf, expirebuf.c_str(), x->Reason.c_str());
}
};
@@ -139,7 +139,7 @@ class CommandOSSZLine : public Command
last_param = 3;
}
- expires = !expiry.empty() ? dotime(expiry) : Config.SZLineExpiry;
+ expires = !expiry.empty() ? dotime(expiry) : Config->SZLineExpiry;
/* If the expiry given does not contain a final letter, it's in days,
* said the doc. Ah well.
*/
@@ -148,7 +148,7 @@ class CommandOSSZLine : public Command
/* Do not allow less than a minute expiry time */
if (expires && expires < 60)
{
- notice_lang(Config.s_OperServ, u, BAD_EXPIRY_TIME);
+ notice_lang(Config->s_OperServ, u, BAD_EXPIRY_TIME);
return MOD_CONT;
}
else if (expires > 0)
@@ -170,9 +170,9 @@ class CommandOSSZLine : public Command
if (!x)
return MOD_CONT;
- notice_lang(Config.s_OperServ, u, OPER_SZLINE_ADDED, mask.c_str());
+ notice_lang(Config->s_OperServ, u, OPER_SZLINE_ADDED, mask.c_str());
- if (Config.WallOSSZLine)
+ if (Config->WallOSSZLine)
{
Anope::string buf;
@@ -206,7 +206,7 @@ class CommandOSSZLine : public Command
}
if (readonly)
- notice_lang(Config.s_OperServ, u, READ_ONLY_MODE);
+ notice_lang(Config->s_OperServ, u, READ_ONLY_MODE);
}
else
@@ -219,7 +219,7 @@ class CommandOSSZLine : public Command
{
if (SZLine->GetList().empty())
{
- notice_lang(Config.s_OperServ, u, OPER_SZLINE_LIST_EMPTY);
+ notice_lang(Config->s_OperServ, u, OPER_SZLINE_LIST_EMPTY);
return MOD_CONT;
}
@@ -242,18 +242,18 @@ class CommandOSSZLine : public Command
if (!x)
{
- notice_lang(Config.s_OperServ, u, OPER_SZLINE_NOT_FOUND, mask.c_str());
+ notice_lang(Config->s_OperServ, u, OPER_SZLINE_NOT_FOUND, mask.c_str());
return MOD_CONT;
}
FOREACH_MOD(I_OnDelXLine, OnDelXLine(u, x, X_SZLINE));
SZLineDelCallback::DoDel(u, x);
- notice_lang(Config.s_OperServ, u, OPER_SZLINE_DELETED, mask.c_str());
+ notice_lang(Config->s_OperServ, u, OPER_SZLINE_DELETED, mask.c_str());
}
if (readonly)
- notice_lang(Config.s_OperServ, u, READ_ONLY_MODE);
+ notice_lang(Config->s_OperServ, u, READ_ONLY_MODE);
return MOD_CONT;
}
@@ -262,7 +262,7 @@ class CommandOSSZLine : public Command
{
if (SZLine->GetList().empty())
{
- notice_lang(Config.s_OperServ, u, OPER_SZLINE_LIST_EMPTY);
+ notice_lang(Config->s_OperServ, u, OPER_SZLINE_LIST_EMPTY);
return MOD_CONT;
}
@@ -286,7 +286,7 @@ class CommandOSSZLine : public Command
if (!SentHeader)
{
SentHeader = true;
- notice_lang(Config.s_OperServ, u, OPER_SZLINE_LIST_HEADER);
+ notice_lang(Config->s_OperServ, u, OPER_SZLINE_LIST_HEADER);
}
SZLineListCallback::DoList(u, x, i);
@@ -294,7 +294,7 @@ class CommandOSSZLine : public Command
}
if (!SentHeader)
- notice_lang(Config.s_OperServ, u, OPER_SZLINE_NO_MATCH);
+ notice_lang(Config->s_OperServ, u, OPER_SZLINE_NO_MATCH);
}
return MOD_CONT;
@@ -304,7 +304,7 @@ class CommandOSSZLine : public Command
{
if (SZLine->GetList().empty())
{
- notice_lang(Config.s_OperServ, u, OPER_SZLINE_LIST_EMPTY);
+ notice_lang(Config->s_OperServ, u, OPER_SZLINE_LIST_EMPTY);
return MOD_CONT;
}
@@ -328,7 +328,7 @@ class CommandOSSZLine : public Command
if (!SentHeader)
{
SentHeader = true;
- notice_lang(Config.s_OperServ, u, OPER_SZLINE_VIEW_HEADER);
+ notice_lang(Config->s_OperServ, u, OPER_SZLINE_VIEW_HEADER);
}
SZLineViewCallback::DoList(u, x, i);
@@ -336,7 +336,7 @@ class CommandOSSZLine : public Command
}
if (!SentHeader)
- notice_lang(Config.s_OperServ, u, OPER_SZLINE_NO_MATCH);
+ notice_lang(Config->s_OperServ, u, OPER_SZLINE_NO_MATCH);
}
return MOD_CONT;
@@ -346,7 +346,7 @@ class CommandOSSZLine : public Command
{
FOREACH_MOD(I_OnDelXLine, OnDelXLine(u, NULL, X_SZLINE));
SZLine->Clear();
- notice_lang(Config.s_OperServ, u, OPER_SZLINE_CLEAR);
+ notice_lang(Config->s_OperServ, u, OPER_SZLINE_CLEAR);
return MOD_CONT;
}
@@ -376,18 +376,18 @@ class CommandOSSZLine : public Command
bool OnHelp(User *u, const Anope::string &subcommand)
{
- notice_help(Config.s_OperServ, u, OPER_HELP_SZLINE);
+ notice_help(Config->s_OperServ, u, OPER_HELP_SZLINE);
return true;
}
void OnSyntaxError(User *u, const Anope::string &subcommand)
{
- syntax_error(Config.s_OperServ, u, "SZLINE", OPER_SZLINE_SYNTAX);
+ syntax_error(Config->s_OperServ, u, "SZLINE", OPER_SZLINE_SYNTAX);
}
void OnServHelp(User *u)
{
- notice_lang(Config.s_OperServ, u, OPER_HELP_CMD_SZLINE);
+ notice_lang(Config->s_OperServ, u, OPER_HELP_CMD_SZLINE);
}
};
diff --git a/modules/core/os_umode.cpp b/modules/core/os_umode.cpp
index 1b65e7e18..d80637d49 100644
--- a/modules/core/os_umode.cpp
+++ b/modules/core/os_umode.cpp
@@ -37,15 +37,15 @@ class CommandOSUMode : public Command
return MOD_CONT;
}
if (!(u2 = finduser(nick)))
- notice_lang(Config.s_OperServ, u, NICK_X_NOT_IN_USE, nick.c_str());
+ notice_lang(Config->s_OperServ, u, NICK_X_NOT_IN_USE, nick.c_str());
else
{
u2->SetModes(OperServ, "%s", modes.c_str());
- notice_lang(Config.s_OperServ, u, OPER_UMODE_SUCCESS, nick.c_str());
- notice_lang(Config.s_OperServ, u2, OPER_UMODE_CHANGED, u->nick.c_str());
+ notice_lang(Config->s_OperServ, u, OPER_UMODE_SUCCESS, nick.c_str());
+ notice_lang(Config->s_OperServ, u2, OPER_UMODE_CHANGED, u->nick.c_str());
- if (Config.WallOSMode)
+ if (Config->WallOSMode)
ircdproto->SendGlobops(OperServ, "\2%s\2 used UMODE on %s", u->nick.c_str(), nick.c_str());
}
return MOD_CONT;
@@ -53,18 +53,18 @@ class CommandOSUMode : public Command
bool OnHelp(User *u, const Anope::string &subcommand)
{
- notice_help(Config.s_OperServ, u, OPER_HELP_UMODE);
+ notice_help(Config->s_OperServ, u, OPER_HELP_UMODE);
return true;
}
void OnSyntaxError(User *u, const Anope::string &subcommand)
{
- syntax_error(Config.s_OperServ, u, "UMODE", OPER_UMODE_SYNTAX);
+ syntax_error(Config->s_OperServ, u, "UMODE", OPER_UMODE_SYNTAX);
}
void OnServHelp(User *u)
{
- notice_lang(Config.s_OperServ, u, OPER_HELP_CMD_UMODE);
+ notice_lang(Config->s_OperServ, u, OPER_HELP_CMD_UMODE);
}
};
diff --git a/modules/core/os_update.cpp b/modules/core/os_update.cpp
index dbe6bef24..ad632f277 100644
--- a/modules/core/os_update.cpp
+++ b/modules/core/os_update.cpp
@@ -22,20 +22,20 @@ class CommandOSUpdate : public Command
CommandReturn Execute(User *u, const std::vector<Anope::string> &params)
{
- notice_lang(Config.s_OperServ, u, OPER_UPDATING);
+ notice_lang(Config->s_OperServ, u, OPER_UPDATING);
save_data = true;
return MOD_CONT;
}
bool OnHelp(User *u, const Anope::string &subcommand)
{
- notice_help(Config.s_OperServ, u, OPER_HELP_UPDATE);
+ notice_help(Config->s_OperServ, u, OPER_HELP_UPDATE);
return true;
}
void OnServHelp(User *u)
{
- notice_lang(Config.s_OperServ, u, OPER_HELP_CMD_UPDATE);
+ notice_lang(Config->s_OperServ, u, OPER_HELP_CMD_UPDATE);
}
};
diff --git a/modules/core/os_userlist.cpp b/modules/core/os_userlist.cpp
index dbc055cb6..f7579fc32 100644
--- a/modules/core/os_userlist.cpp
+++ b/modules/core/os_userlist.cpp
@@ -32,7 +32,7 @@ class CommandOSUserList : public Command
if (!pattern.empty() && (c = findchan(pattern)))
{
- notice_lang(Config.s_OperServ, u, OPER_USERLIST_HEADER_CHAN, pattern.c_str());
+ notice_lang(Config->s_OperServ, u, OPER_USERLIST_HEADER_CHAN, pattern.c_str());
for (CUserList::iterator cuit = c->users.begin(), cuit_end = c->users.end(); cuit != cuit_end; ++cuit)
{
@@ -43,12 +43,12 @@ class CommandOSUserList : public Command
if (!uc->user->HasMode(*it))
continue;
- notice_lang(Config.s_OperServ, u, OPER_USERLIST_RECORD, uc->user->nick.c_str(), uc->user->GetIdent().c_str(), uc->user->GetDisplayedHost().c_str());
+ notice_lang(Config->s_OperServ, u, OPER_USERLIST_RECORD, uc->user->nick.c_str(), uc->user->GetIdent().c_str(), uc->user->GetDisplayedHost().c_str());
}
}
else
{
- notice_lang(Config.s_OperServ, u, OPER_USERLIST_HEADER);
+ notice_lang(Config->s_OperServ, u, OPER_USERLIST_HEADER);
for (user_map::const_iterator uit = UserListByNick.begin(), uit_end = UserListByNick.end(); uit != uit_end; ++uit)
{
@@ -64,23 +64,23 @@ class CommandOSUserList : public Command
if (!u2->HasMode(*it))
continue;
}
- notice_lang(Config.s_OperServ, u, OPER_USERLIST_RECORD, u2->nick.c_str(), u2->GetIdent().c_str(), u2->GetDisplayedHost().c_str());
+ notice_lang(Config->s_OperServ, u, OPER_USERLIST_RECORD, u2->nick.c_str(), u2->GetIdent().c_str(), u2->GetDisplayedHost().c_str());
}
}
- notice_lang(Config.s_OperServ, u, OPER_USERLIST_END);
+ notice_lang(Config->s_OperServ, u, OPER_USERLIST_END);
return MOD_CONT;
}
bool OnHelp(User *u, const Anope::string &subcommand)
{
- notice_help(Config.s_OperServ, u, OPER_HELP_USERLIST);
+ notice_help(Config->s_OperServ, u, OPER_HELP_USERLIST);
return true;
}
void OnServHelp(User *u)
{
- notice_lang(Config.s_OperServ, u, OPER_HELP_CMD_USERLIST);
+ notice_lang(Config->s_OperServ, u, OPER_HELP_CMD_USERLIST);
}
};
diff --git a/modules/core/ss_main.cpp b/modules/core/ss_main.cpp
index ffe06c795..1b7188781 100644
--- a/modules/core/ss_main.cpp
+++ b/modules/core/ss_main.cpp
@@ -42,7 +42,7 @@ class SSMain : public Module
if (!statserv)
{
Alog() << "Creating SS";
- statserv = new BotInfo("StatServ", Config.ServiceUser, Config.ServiceHost, "Stats Service");
+ statserv = new BotInfo("StatServ", Config->ServiceUser, Config->ServiceHost, "Stats Service");
}
Alog() << "Done creating SS";
diff --git a/modules/extra/cs_appendtopic.cpp b/modules/extra/cs_appendtopic.cpp
index 42ccb8187..3da548cf2 100644
--- a/modules/extra/cs_appendtopic.cpp
+++ b/modules/extra/cs_appendtopic.cpp
@@ -70,9 +70,9 @@ class CommandCSAppendTopic : public Command
ci = c->ci;
if (!c)
- notice_lang(Config.s_ChanServ, u, CHAN_X_NOT_IN_USE, chan.c_str());
+ notice_lang(Config->s_ChanServ, u, CHAN_X_NOT_IN_USE, chan.c_str());
else if (!check_access(u, ci, CA_TOPIC))
- notice_lang(Config.s_ChanServ, u, ACCESS_DENIED);
+ notice_lang(Config->s_ChanServ, u, ACCESS_DENIED);
else
{
if (!ci->last_topic.empty())
@@ -95,11 +95,11 @@ class CommandCSAppendTopic : public Command
c->topic_time = ci->last_topic_time;
if (!check_access(u, ci, CA_TOPIC))
- Alog() << Config.s_ChanServ << ": " << u->GetMask() << " changed topic of " << c->name << " as services admin.";
+ Alog() << Config->s_ChanServ << ": " << u->GetMask() << " changed topic of " << c->name << " as services admin.";
if (ircd->join2set && whosends(ci) == ChanServ)
{
ChanServ->Join(c);
- ircdproto->SendMode(NULL, c, "+o %s", Config.s_ChanServ.c_str()); // XXX
+ ircdproto->SendMode(NULL, c, "+o %s", Config->s_ChanServ.c_str()); // XXX
}
ircdproto->SendTopic(whosends(ci), c, u->nick, topic);
if (ircd->join2set && whosends(ci) == ChanServ)
@@ -110,21 +110,21 @@ class CommandCSAppendTopic : public Command
bool OnHelp(User *u, const Anope::string &subcommand)
{
- me->NoticeLang(Config.s_ChanServ, u, LNG_APPENDTOPIC_SYNTAX);
- u->SendMessage(Config.s_ChanServ, " ");
- me->NoticeLang(Config.s_ChanServ, u, LNG_CHAN_HELP_APPENDTOPIC);
+ me->NoticeLang(Config->s_ChanServ, u, LNG_APPENDTOPIC_SYNTAX);
+ u->SendMessage(Config->s_ChanServ, " ");
+ me->NoticeLang(Config->s_ChanServ, u, LNG_CHAN_HELP_APPENDTOPIC);
return true;
}
void OnSyntaxError(User *u, const Anope::string &subcommand)
{
- me->NoticeLang(Config.s_ChanServ, u, LNG_APPENDTOPIC_SYNTAX);
+ me->NoticeLang(Config->s_ChanServ, u, LNG_APPENDTOPIC_SYNTAX);
}
void OnServHelp(User *u)
{
- me->NoticeLang(Config.s_ChanServ, u, LNG_CHAN_HELP);
+ me->NoticeLang(Config->s_ChanServ, u, LNG_CHAN_HELP);
}
};
diff --git a/modules/extra/cs_enforce.cpp b/modules/extra/cs_enforce.cpp
index cba949e1d..1f2472e47 100644
--- a/modules/extra/cs_enforce.cpp
+++ b/modules/extra/cs_enforce.cpp
@@ -156,35 +156,35 @@ class CommandCSEnforce : public Command
ci = c->ci;
if (!c)
- notice_lang(Config.s_ChanServ, u, CHAN_X_NOT_IN_USE, chan.c_str());
+ notice_lang(Config->s_ChanServ, u, CHAN_X_NOT_IN_USE, chan.c_str());
else if (!check_access(u, ci, CA_AKICK))
- notice_lang(Config.s_ChanServ, u, ACCESS_DENIED);
+ notice_lang(Config->s_ChanServ, u, ACCESS_DENIED);
else
{
if (what.empty() || what.equals_ci("SET"))
{
this->DoSet(c);
- me->NoticeLang(Config.s_ChanServ, u, LNG_CHAN_RESPONSE, !what.empty() ? what.c_str() : "SET");
+ me->NoticeLang(Config->s_ChanServ, u, LNG_CHAN_RESPONSE, !what.empty() ? what.c_str() : "SET");
}
else if (what.equals_ci("MODES"))
{
this->DoModes(c);
- me->NoticeLang(Config.s_ChanServ, u, LNG_CHAN_RESPONSE, what.c_str());
+ me->NoticeLang(Config->s_ChanServ, u, LNG_CHAN_RESPONSE, what.c_str());
}
else if (what.equals_ci("SECUREOPS"))
{
this->DoSecureOps(c);
- me->NoticeLang(Config.s_ChanServ, u, LNG_CHAN_RESPONSE, what.c_str());
+ me->NoticeLang(Config->s_ChanServ, u, LNG_CHAN_RESPONSE, what.c_str());
}
else if (what.equals_ci("RESTRICTED"))
{
this->DoRestricted(c);
- me->NoticeLang(Config.s_ChanServ, u, LNG_CHAN_RESPONSE, what.c_str());
+ me->NoticeLang(Config->s_ChanServ, u, LNG_CHAN_RESPONSE, what.c_str());
}
else if (what.equals_ci("+R"))
{
this->DoCModeR(c);
- me->NoticeLang(Config.s_ChanServ, u, LNG_CHAN_RESPONSE, what.c_str());
+ me->NoticeLang(Config->s_ChanServ, u, LNG_CHAN_RESPONSE, what.c_str());
}
else
this->OnSyntaxError(u, "");
@@ -195,26 +195,26 @@ class CommandCSEnforce : public Command
bool OnHelp(User *u, const Anope::string &subcommand)
{
- me->NoticeLang(Config.s_ChanServ, u, LNG_ENFORCE_SYNTAX);
- u->SendMessage(Config.s_ChanServ, " ");
- me->NoticeLang(Config.s_ChanServ, u, LNG_CHAN_HELP_ENFORCE);
- u->SendMessage(Config.s_ChanServ, " ");
+ me->NoticeLang(Config->s_ChanServ, u, LNG_ENFORCE_SYNTAX);
+ u->SendMessage(Config->s_ChanServ, " ");
+ me->NoticeLang(Config->s_ChanServ, u, LNG_CHAN_HELP_ENFORCE);
+ u->SendMessage(Config->s_ChanServ, " ");
if (ModeManager::FindChannelModeByName(CMODE_REGISTERED))
- me->NoticeLang(Config.s_ChanServ, u, LNG_CHAN_HELP_ENFORCE_R_ENABLED);
+ me->NoticeLang(Config->s_ChanServ, u, LNG_CHAN_HELP_ENFORCE_R_ENABLED);
else
- me->NoticeLang(Config.s_ChanServ, u, LNG_CHAN_HELP_ENFORCE_R_DISABLED);
+ me->NoticeLang(Config->s_ChanServ, u, LNG_CHAN_HELP_ENFORCE_R_DISABLED);
return true;
}
void OnSyntaxError(User *u, const Anope::string &subcommand)
{
- me->NoticeLang(Config.s_ChanServ, u, LNG_ENFORCE_SYNTAX);
+ me->NoticeLang(Config->s_ChanServ, u, LNG_ENFORCE_SYNTAX);
}
void OnServHelp(User *u)
{
- me->NoticeLang(Config.s_ChanServ, u, LNG_CHAN_HELP);
+ me->NoticeLang(Config->s_ChanServ, u, LNG_CHAN_HELP);
}
};
diff --git a/modules/extra/cs_set_misc.cpp b/modules/extra/cs_set_misc.cpp
index 48cd636e7..b52eb525e 100644
--- a/modules/extra/cs_set_misc.cpp
+++ b/modules/extra/cs_set_misc.cpp
@@ -30,22 +30,22 @@ class CommandCSSetMisc : public Command
if (params.size() > 1)
{
ci->Extend("chanserv:" + this->name, new ExtensibleItemRegular<Anope::string>(params[1]));
- notice_lang(Config.s_ChanServ, u, CHAN_SETTING_CHANGED, this->name.c_str(), ci->name.c_str(), params[1].c_str());
+ notice_lang(Config->s_ChanServ, u, CHAN_SETTING_CHANGED, this->name.c_str(), ci->name.c_str(), params[1].c_str());
}
else
- notice_lang(Config.s_ChanServ, u, CHAN_SETTING_UNSET, this->name.c_str(), ci->name.c_str());
+ notice_lang(Config->s_ChanServ, u, CHAN_SETTING_UNSET, this->name.c_str(), ci->name.c_str());
return MOD_CONT;
}
void OnSyntaxError(User *u, const Anope::string &)
{
- syntax_error(Config.s_ChanServ, u, "SET", CHAN_SET_SYNTAX);
+ syntax_error(Config->s_ChanServ, u, "SET", CHAN_SET_SYNTAX);
}
void OnServHelp(User *u)
{
- u->SendMessage(Config.s_ChanServ, " %-10s %s", this->name.c_str(), this->Desc.c_str());
+ u->SendMessage(Config->s_ChanServ, " %-10s %s", this->name.c_str(), this->Desc.c_str());
}
};
@@ -58,7 +58,7 @@ class CommandCSSASetMisc : public CommandCSSetMisc
void OnSyntaxError(User *u, const Anope::string &)
{
- syntax_error(Config.s_ChanServ, u, "SASET", CHAN_SASET_SYNTAX);
+ syntax_error(Config->s_ChanServ, u, "SASET", CHAN_SASET_SYNTAX);
}
};
@@ -172,7 +172,7 @@ class CSSetMisc : public Module
Anope::string value;
if (ci->GetExtRegular("chanserv:" + it->first, value))
- u->SendMessage(Config.s_ChanServ, " %s: %s", it->first.c_str(), value.c_str());
+ u->SendMessage(Config->s_ChanServ, " %s: %s", it->first.c_str(), value.c_str());
}
}
diff --git a/modules/extra/cs_tban.cpp b/modules/extra/cs_tban.cpp
index d01c96ee5..32bcd4add 100644
--- a/modules/extra/cs_tban.cpp
+++ b/modules/extra/cs_tban.cpp
@@ -55,9 +55,9 @@ class CommandCSTBan : public Command
Anope::string time = params[2];
if (!(c = findchan(chan)))
- notice_lang(Config.s_ChanServ, u, CHAN_X_NOT_IN_USE, chan.c_str());
+ notice_lang(Config->s_ChanServ, u, CHAN_X_NOT_IN_USE, chan.c_str());
else if (!(u2 = finduser(nick)))
- notice_lang(Config.s_ChanServ, u, NICK_X_NOT_IN_USE, nick.c_str());
+ notice_lang(Config->s_ChanServ, u, NICK_X_NOT_IN_USE, nick.c_str());
else
if (canBanUser(c, u, u2))
{
@@ -72,20 +72,20 @@ class CommandCSTBan : public Command
bool OnHelp(User *u, const Anope::string &subcommand)
{
this->OnSyntaxError(u, "");
- u->SendMessage(Config.s_ChanServ, " ");
- me->NoticeLang(Config.s_ChanServ, u, TBAN_HELP_DETAIL);
+ u->SendMessage(Config->s_ChanServ, " ");
+ me->NoticeLang(Config->s_ChanServ, u, TBAN_HELP_DETAIL);
return true;
}
void OnSyntaxError(User *u, const Anope::string &subcommand)
{
- me->NoticeLang(Config.s_ChanServ, u, TBAN_SYNTAX);
+ me->NoticeLang(Config->s_ChanServ, u, TBAN_SYNTAX);
}
void OnServHelp(User *u)
{
- me->NoticeLang(Config.s_ChanServ, u, TBAN_HELP);
+ me->NoticeLang(Config->s_ChanServ, u, TBAN_HELP);
}
};
@@ -164,7 +164,7 @@ class CSTBan : public Module
void mySendResponse(User *u, const Anope::string &channel, const Anope::string &mask, const Anope::string &time)
{
- me->NoticeLang(Config.s_ChanServ, u, TBAN_RESPONSE, mask.c_str(), channel.c_str(), time.c_str());
+ me->NoticeLang(Config->s_ChanServ, u, TBAN_RESPONSE, mask.c_str(), channel.c_str(), time.c_str());
}
class TempBan : public CallBack
@@ -197,11 +197,11 @@ int canBanUser(Channel *c, User *u, User *u2)
ChannelInfo *ci = c->ci;
int ok = 0;
if (!check_access(u, ci, CA_BAN))
- notice_lang(Config.s_ChanServ, u, ACCESS_DENIED);
+ notice_lang(Config->s_ChanServ, u, ACCESS_DENIED);
else if (is_excepted(ci, u2))
- notice_lang(Config.s_ChanServ, u, CHAN_EXCEPTED, u2->nick.c_str(), ci->name.c_str());
+ notice_lang(Config->s_ChanServ, u, CHAN_EXCEPTED, u2->nick.c_str(), ci->name.c_str());
else if (u2->IsProtected())
- notice_lang(Config.s_ChanServ, u, ACCESS_DENIED);
+ notice_lang(Config->s_ChanServ, u, ACCESS_DENIED);
else
ok = 1;
diff --git a/modules/extra/db_mysql.cpp b/modules/extra/db_mysql.cpp
index e93abba10..0e7c89bdc 100644
--- a/modules/extra/db_mysql.cpp
+++ b/modules/extra/db_mysql.cpp
@@ -298,13 +298,13 @@ class CommandSQLSync : public Command
bool OnHelp(User *u, const Anope::string &subcommand)
{
- notice_help(Config.s_OperServ, u, OPER_HELP_SYNC);
+ notice_help(Config->s_OperServ, u, OPER_HELP_SYNC);
return true;
}
void OnServHelp(User *u)
{
- notice_lang(Config.s_OperServ, u, OPER_HELP_CMD_SQLSYNC);
+ notice_lang(Config->s_OperServ, u, OPER_HELP_CMD_SQLSYNC);
}
};
@@ -347,7 +347,7 @@ class DBMySQL : public Module
{
time_t now = time(NULL);
- if (now - Config.UpdateTimeout > lastwarn)
+ if (now - Config->UpdateTimeout > lastwarn)
{
ircdproto->SendGlobops(OperServ, "Unable to locate SQL reference, is m_mysql loaded? Going to readonly...");
readonly = this->ro = true;
@@ -935,7 +935,7 @@ class DBMySQL : public Module
void OnPostCommand(User *u, const Anope::string &service, const Anope::string &command, const std::vector<Anope::string> &params)
{
- if (service == Config.s_NickServ)
+ if (service == Config->s_NickServ)
{
if (u->Account() && ((command.equals_ci("SET") && !params.empty()) || (command.equals_ci("SASET") && u->Account()->HasCommand("nickserv/saset") && params.size() > 1)))
{
@@ -965,7 +965,7 @@ class DBMySQL : public Module
}
}
}
- else if (service == Config.s_ChanServ)
+ else if (service == Config->s_ChanServ)
{
if (command.equals_ci("SET") && u->Account() && params.size() > 1)
{
@@ -1006,7 +1006,7 @@ class DBMySQL : public Module
}
}
}
- else if (service == Config.s_BotServ)
+ else if (service == Config->s_BotServ)
{
if (command.equals_ci("KICK") && params.size() > 2)
{
@@ -1542,7 +1542,7 @@ static void SaveDatabases()
CommandReturn CommandSQLSync::Execute(User *u, const std::vector<Anope::string> &params)
{
SaveDatabases();
- notice_lang(Config.s_OperServ, u, OPER_SYNC_UPDATED);
+ notice_lang(Config->s_OperServ, u, OPER_SYNC_UPDATED);
return MOD_CONT;
}
diff --git a/modules/extra/hs_request.cpp b/modules/extra/hs_request.cpp
index 6fd48a3ef..3920c4b90 100644
--- a/modules/extra/hs_request.cpp
+++ b/modules/extra/hs_request.cpp
@@ -92,78 +92,78 @@ class CommandHSRequest : public Command
rawhostmask = myStrGetTokenRemainder(rawhostmask, '@', 1); /* get the remaining string */
if (rawhostmask.empty())
{
- me->NoticeLang(Config.s_HostServ, u, LNG_REQUEST_SYNTAX);
+ me->NoticeLang(Config->s_HostServ, u, LNG_REQUEST_SYNTAX);
return MOD_CONT;
}
- if (vIdent.length() > Config.UserLen)
+ if (vIdent.length() > Config->UserLen)
{
- notice_lang(Config.s_HostServ, u, HOST_SET_IDENTTOOLONG, Config.UserLen);
+ notice_lang(Config->s_HostServ, u, 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 (!my_isvalidchar(*s))
{
- notice_lang(Config.s_HostServ, u, HOST_SET_IDENT_ERROR);
+ notice_lang(Config->s_HostServ, u, HOST_SET_IDENT_ERROR);
return MOD_CONT;
}
if (!ircd->vident)
{
- notice_lang(Config.s_HostServ, u, HOST_NO_VIDENT);
+ notice_lang(Config->s_HostServ, u, HOST_NO_VIDENT);
return MOD_CONT;
}
}
- if (rawhostmask.length() < Config.HostLen)
+ if (rawhostmask.length() < Config->HostLen)
hostmask = rawhostmask;
else
{
- notice_lang(Config.s_HostServ, u, HOST_SET_TOOLONG, Config.HostLen);
+ notice_lang(Config->s_HostServ, u, HOST_SET_TOOLONG, Config->HostLen);
return MOD_CONT;
}
if (!isValidHost(hostmask, 3))
{
- notice_lang(Config.s_HostServ, u, HOST_SET_ERROR);
+ notice_lang(Config->s_HostServ, u, HOST_SET_ERROR);
return MOD_CONT;
}
if ((na = findnick(nick)))
{
- if ((HSRequestMemoOper || HSRequestMemoSetters) && Config.MSSendDelay > 0 && u && u->lastmemosend + Config.MSSendDelay > now)
+ if ((HSRequestMemoOper || HSRequestMemoSetters) && Config->MSSendDelay > 0 && u && u->lastmemosend + Config->MSSendDelay > now)
{
- me->NoticeLang(Config.s_HostServ, u, LNG_REQUEST_WAIT, Config.MSSendDelay);
+ me->NoticeLang(Config->s_HostServ, u, LNG_REQUEST_WAIT, Config->MSSendDelay);
u->lastmemosend = now;
return MOD_CONT;
}
my_add_host_request(nick, vIdent, hostmask, u->nick, now);
- me->NoticeLang(Config.s_HostServ, u, LNG_REQUESTED);
+ me->NoticeLang(Config->s_HostServ, u, LNG_REQUESTED);
req_send_memos(u, vIdent, hostmask);
Alog() << "New vHost Requested by " << nick;
}
else
- notice_lang(Config.s_HostServ, u, HOST_NOREG, nick.c_str());
+ notice_lang(Config->s_HostServ, u, HOST_NOREG, nick.c_str());
return MOD_CONT;
}
bool OnHelp(User *u, const Anope::string &subcommand)
{
- me->NoticeLang(Config.s_HostServ, u, LNG_REQUEST_SYNTAX);
- u->SendMessage(Config.s_HostServ, " ");
- me->NoticeLang(Config.s_HostServ, u, LNG_HELP_REQUEST);
+ me->NoticeLang(Config->s_HostServ, u, LNG_REQUEST_SYNTAX);
+ u->SendMessage(Config->s_HostServ, " ");
+ me->NoticeLang(Config->s_HostServ, u, LNG_HELP_REQUEST);
return true;
}
void OnSyntaxError(User *u, const Anope::string &subcommand)
{
- me->NoticeLang(Config.s_HostServ, u, LNG_REQUEST_SYNTAX);
+ me->NoticeLang(Config->s_HostServ, u, LNG_REQUEST_SYNTAX);
}
void OnServHelp(User *u)
{
- me->NoticeLang(Config.s_HostServ, u, LNG_HELP);
+ me->NoticeLang(Config->s_HostServ, u, LNG_HELP);
}
};
@@ -191,37 +191,37 @@ class CommandHSActivate : public Command
if (HSRequestMemoUser)
my_memo_lang(u, na->nick, 2, LNG_ACTIVATE_MEMO);
- me->NoticeLang(Config.s_HostServ, u, LNG_ACTIVATED, nick.c_str());
+ me->NoticeLang(Config->s_HostServ, u, LNG_ACTIVATED, nick.c_str());
Alog() << "Host Request for " << nick << " activated by " << u->nick;
}
else
- me->NoticeLang(Config.s_HostServ, u, LNG_NO_REQUEST, nick.c_str());
+ me->NoticeLang(Config->s_HostServ, u, LNG_NO_REQUEST, nick.c_str());
}
else
- notice_lang(Config.s_HostServ, u, NICK_X_NOT_REGISTERED, nick.c_str());
+ notice_lang(Config->s_HostServ, u, NICK_X_NOT_REGISTERED, nick.c_str());
return MOD_CONT;
}
bool OnHelp(User *u, const Anope::string &subcommand)
{
- me->NoticeLang(Config.s_HostServ, u, LNG_ACTIVATE_SYNTAX);
- u->SendMessage(Config.s_HostServ, " ");
- me->NoticeLang(Config.s_HostServ, u, LNG_HELP_ACTIVATE);
+ me->NoticeLang(Config->s_HostServ, u, LNG_ACTIVATE_SYNTAX);
+ u->SendMessage(Config->s_HostServ, " ");
+ me->NoticeLang(Config->s_HostServ, u, LNG_HELP_ACTIVATE);
if (HSRequestMemoUser)
- me->NoticeLang(Config.s_HostServ, u, LNG_HELP_ACTIVATE_MEMO);
+ me->NoticeLang(Config->s_HostServ, u, LNG_HELP_ACTIVATE_MEMO);
return true;
}
void OnSyntaxError(User *u, const Anope::string &subcommand)
{
- me->NoticeLang(Config.s_HostServ, u, LNG_ACTIVATE_SYNTAX);
+ me->NoticeLang(Config->s_HostServ, u, LNG_ACTIVATE_SYNTAX);
}
void OnServHelp(User *u)
{
- me->NoticeLang(Config.s_HostServ, u, LNG_HELP_SETTER);
+ me->NoticeLang(Config->s_HostServ, u, LNG_HELP_SETTER);
}
};
@@ -251,29 +251,29 @@ class CommandHSReject : public Command
my_memo_lang(u, nick, 2, LNG_REJECT_MEMO);
}
- me->NoticeLang(Config.s_HostServ, u, LNG_REJECTED, nick.c_str());
+ me->NoticeLang(Config->s_HostServ, u, LNG_REJECTED, nick.c_str());
Alog() << "Host Request for " << nick << " rejected by " << u->nick << " (" << (!reason.empty() ? reason : "") << ")";
}
else
- me->NoticeLang(Config.s_HostServ, u, LNG_NO_REQUEST, nick.c_str());
+ me->NoticeLang(Config->s_HostServ, u, LNG_NO_REQUEST, nick.c_str());
return MOD_CONT;
}
bool OnHelp(User *u, const Anope::string &subcommand)
{
- me->NoticeLang(Config.s_HostServ, u, LNG_REJECT_SYNTAX);
- u->SendMessage(Config.s_HostServ, " ");
- me->NoticeLang(Config.s_HostServ, u, LNG_HELP_REJECT);
+ me->NoticeLang(Config->s_HostServ, u, LNG_REJECT_SYNTAX);
+ u->SendMessage(Config->s_HostServ, " ");
+ me->NoticeLang(Config->s_HostServ, u, LNG_HELP_REJECT);
if (HSRequestMemoUser)
- me->NoticeLang(Config.s_HostServ, u, LNG_HELP_REJECT_MEMO);
+ me->NoticeLang(Config->s_HostServ, u, LNG_HELP_REJECT_MEMO);
return true;
}
void OnSyntaxError(User *u, const Anope::string &subcommand)
{
- me->NoticeLang(Config.s_HostServ, u, LNG_REJECT_SYNTAX);
+ me->NoticeLang(Config->s_HostServ, u, LNG_REJECT_SYNTAX);
}
};
@@ -291,19 +291,19 @@ class HSListBase : public Command
for (RequestMap::iterator it = Requests.begin(), it_end = Requests.end(); it != it_end; ++it)
{
HostRequest *hr = it->second;
- if (((counter >= from && counter <= to) || (!from && !to)) && display_counter < Config.NSListMax)
+ if (((counter >= from && counter <= to) || (!from && !to)) && display_counter < Config->NSListMax)
{
++display_counter;
tm = localtime(&hr->time);
strftime(buf, sizeof(buf), getstring(u, STRFTIME_DATE_TIME_FORMAT), tm);
if (!hr->ident.empty())
- notice_lang(Config.s_HostServ, u, HOST_IDENT_ENTRY, counter, it->first.c_str(), hr->ident.c_str(), hr->host.c_str(), it->first.c_str(), buf);
+ notice_lang(Config->s_HostServ, u, HOST_IDENT_ENTRY, counter, it->first.c_str(), hr->ident.c_str(), hr->host.c_str(), it->first.c_str(), buf);
else
- notice_lang(Config.s_HostServ, u, HOST_ENTRY, counter, it->first.c_str(), hr->host.c_str(), it->first.c_str(), buf);
+ notice_lang(Config->s_HostServ, u, HOST_ENTRY, counter, it->first.c_str(), hr->host.c_str(), it->first.c_str(), buf);
}
++counter;
}
- notice_lang(Config.s_HostServ, u, HOST_LIST_FOOTER, display_counter);
+ notice_lang(Config->s_HostServ, u, HOST_LIST_FOOTER, display_counter);
return MOD_CONT;
}
@@ -332,9 +332,9 @@ class CommandHSWaiting : public HSListBase
bool OnHelp(User *u, const Anope::string &subcommand)
{
- me->NoticeLang(Config.s_HostServ, u, LNG_WAITING_SYNTAX);
- u->SendMessage(Config.s_HostServ, " ");
- me->NoticeLang(Config.s_HostServ, u, LNG_HELP_WAITING);
+ me->NoticeLang(Config->s_HostServ, u, LNG_WAITING_SYNTAX);
+ u->SendMessage(Config->s_HostServ, " ");
+ me->NoticeLang(Config->s_HostServ, u, LNG_HELP_WAITING);
return true;
}
@@ -634,7 +634,7 @@ class HSRequest : public Module
EventReturn OnPreCommand(User *u, BotInfo *service, const Anope::string &command, const std::vector<Anope::string> &params)
{
- if (!Config.s_HostServ.empty() && service == findbot(Config.s_HostServ))
+ if (!Config->s_HostServ.empty() && service == findbot(Config->s_HostServ))
{
if (command.equals_ci("LIST"))
{
@@ -649,7 +649,7 @@ class HSRequest : public Module
}
}
}
- else if (service == findbot(Config.s_NickServ))
+ else if (service == findbot(Config->s_NickServ))
{
if (command.equals_ci("DROP"))
{
@@ -751,7 +751,7 @@ void req_send_memos(User *u, const Anope::string &vIdent, const Anope::string &v
host = vHost;
if (HSRequestMemoOper == 1)
- for (it = Config.Opers.begin(), it_end = Config.Opers.end(); it != it_end; ++it)
+ for (it = Config->Opers.begin(), it_end = Config->Opers.end(); it != it_end; ++it)
{
Anope::string nick = it->first;
my_memo_lang(u, nick, 2, LNG_REQUEST_MEMO, host.c_str());
diff --git a/modules/extra/m_ssl.cpp b/modules/extra/m_ssl.cpp
index ea1c3e4fb..397facd7d 100644
--- a/modules/extra/m_ssl.cpp
+++ b/modules/extra/m_ssl.cpp
@@ -128,7 +128,7 @@ class SSLModule : public Module
{
try
{
- new SSLSocket(u->host, u->port, Config.LocalHost, u->ipv6);
+ new SSLSocket(u->host, u->port, Config->LocalHost, u->ipv6);
Alog() << "Connected to Server " << Number << " (" << u->host << ":" << u->port << ")";
}
catch (const SocketException &ex)
diff --git a/modules/extra/ns_maxemail.cpp b/modules/extra/ns_maxemail.cpp
index bcddc18f5..a82798916 100644
--- a/modules/extra/ns_maxemail.cpp
+++ b/modules/extra/ns_maxemail.cpp
@@ -104,7 +104,7 @@ class NSMaxEmail : public Module
EventReturn OnPreCommand(User *u, BotInfo *service, const Anope::string &command, const std::vector<Anope::string> &params)
{
- if (service == findbot(Config.s_NickServ))
+ if (service == findbot(Config->s_NickServ))
{
if (command.equals_ci("REGISTER"))
{
@@ -152,9 +152,9 @@ bool check_email_limit_reached(const Anope::string &email, User *u)
return false;
if (NSEmailMax == 1)
- me->NoticeLang(Config.s_NickServ, u, LNG_NSEMAILMAX_REACHED_ONE);
+ me->NoticeLang(Config->s_NickServ, u, LNG_NSEMAILMAX_REACHED_ONE);
else
- me->NoticeLang(Config.s_NickServ, u, LNG_NSEMAILMAX_REACHED, NSEmailMax);
+ me->NoticeLang(Config->s_NickServ, u, LNG_NSEMAILMAX_REACHED, NSEmailMax);
return true;
}
diff --git a/modules/extra/ns_set_misc.cpp b/modules/extra/ns_set_misc.cpp
index 87113fb67..2d31c6b63 100644
--- a/modules/extra/ns_set_misc.cpp
+++ b/modules/extra/ns_set_misc.cpp
@@ -29,10 +29,10 @@ class CommandNSSetMisc : public Command
if (params.size() > 1)
{
nc->Extend("nickserv:" + this->name, new ExtensibleItemRegular<Anope::string>(params[1]));
- notice_lang(Config.s_NickServ, u, CHAN_SETTING_CHANGED, this->name.c_str(), nc->display.c_str(), params[1].c_str());
+ notice_lang(Config->s_NickServ, u, CHAN_SETTING_CHANGED, this->name.c_str(), nc->display.c_str(), params[1].c_str());
}
else
- notice_lang(Config.s_NickServ, u, CHAN_SETTING_UNSET, this->name.c_str(), nc->display.c_str());
+ notice_lang(Config->s_NickServ, u, CHAN_SETTING_UNSET, this->name.c_str(), nc->display.c_str());
return MOD_CONT;
}
@@ -51,12 +51,12 @@ class CommandNSSetMisc : public Command
void OnSyntaxError(User *u, const Anope::string &)
{
- syntax_error(Config.s_NickServ, u, "SET", NICK_SET_SYNTAX);
+ syntax_error(Config->s_NickServ, u, "SET", NICK_SET_SYNTAX);
}
void OnServHelp(User *u)
{
- u->SendMessage(Config.s_NickServ, " %-10s %s", this->name.c_str(), this->Desc.c_str());
+ u->SendMessage(Config->s_NickServ, " %-10s %s", this->name.c_str(), this->Desc.c_str());
}
};
@@ -76,7 +76,7 @@ class CommandNSSASetMisc : public CommandNSSetMisc
void OnSyntaxError(User *u, const Anope::string &)
{
- syntax_error(Config.s_NickServ, u, "SASET", NICK_SASET_SYNTAX);
+ syntax_error(Config->s_NickServ, u, "SASET", NICK_SASET_SYNTAX);
}
};
@@ -189,7 +189,7 @@ class NSSetMisc : public Module
Anope::string value;
if (na->nc->GetExtRegular("nickserv:" + it->first, value))
- u->SendMessage(Config.s_NickServ, " %s: %s", it->first.c_str(), value.c_str());
+ u->SendMessage(Config->s_NickServ, " %s: %s", it->first.c_str(), value.c_str());
}
}
diff --git a/modules/protocol/bahamut.cpp b/modules/protocol/bahamut.cpp
index 72b57ce4c..32579f50d 100644
--- a/modules/protocol/bahamut.cpp
+++ b/modules/protocol/bahamut.cpp
@@ -101,19 +101,19 @@ class BahamutIRCdProto : public IRCDProto
{
if (buf.empty())
return;
- send_cmd(bi ? bi->nick : Config.ServerName, "SVSMODE %s %ld %s", u->nick.c_str(), static_cast<long>(u->timestamp), buf.c_str());
+ send_cmd(bi ? bi->nick : Config->ServerName, "SVSMODE %s %ld %s", u->nick.c_str(), static_cast<long>(u->timestamp), buf.c_str());
}
/* SVSHOLD - set */
void SendSVSHold(const Anope::string &nick)
{
- send_cmd(Config.ServerName, "SVSHOLD %s %u :Being held for registered user", nick.c_str(), static_cast<unsigned>(Config.NSReleaseTimeout));
+ send_cmd(Config->ServerName, "SVSHOLD %s %u :Being held for registered user", nick.c_str(), static_cast<unsigned>(Config->NSReleaseTimeout));
}
/* SVSHOLD - release */
void SendSVSHoldDel(const Anope::string &nick)
{
- send_cmd(Config.ServerName, "SVSHOLD %s 0", nick.c_str());
+ send_cmd(Config->ServerName, "SVSHOLD %s 0", nick.c_str());
}
/* SVSMODE -b */
@@ -126,9 +126,9 @@ class BahamutIRCdProto : public IRCDProto
void SendSVSModeChan(const Channel *c, const Anope::string &mode, const Anope::string &nick)
{
if (!nick.empty())
- send_cmd(Config.ServerName, "SVSMODE %s %s %s", c->name.c_str(), mode.c_str(), nick.c_str());
+ send_cmd(Config->ServerName, "SVSMODE %s %s %s", c->name.c_str(), mode.c_str(), nick.c_str());
else
- send_cmd(Config.ServerName, "SVSMODE %s %s", c->name.c_str(), mode.c_str());
+ send_cmd(Config->ServerName, "SVSMODE %s %s", c->name.c_str(), mode.c_str());
}
/* SQLINE */
@@ -248,8 +248,8 @@ class BahamutIRCdProto : public IRCDProto
void SendClientIntroduction(const Anope::string &nick, const Anope::string &user, const Anope::string &host, const Anope::string &real, const Anope::string &modes, const Anope::string &)
{
- EnforceQlinedNick(nick, Config.s_BotServ);
- send_cmd("", "NICK %s 1 %ld %s %s %s %s 0 0 :%s", nick.c_str(), static_cast<long>(time(NULL)), modes.c_str(), user.c_str(), host.c_str(), Config.ServerName.c_str(), real.c_str());
+ EnforceQlinedNick(nick, Config->s_BotServ);
+ send_cmd("", "NICK %s 1 %ld %s %s %s %s 0 0 :%s", nick.c_str(), static_cast<long>(time(NULL)), modes.c_str(), user.c_str(), host.c_str(), Config->ServerName.c_str(), real.c_str());
}
/* SVSMODE +d */
@@ -501,7 +501,7 @@ int anope_event_os(const Anope::string &source, int ac, const char **av)
{
if (ac < 1)
return MOD_CONT;
- m_privmsg(source, Config.s_OperServ, av[0]);
+ m_privmsg(source, Config->s_OperServ, av[0]);
return MOD_CONT;
}
@@ -510,7 +510,7 @@ int anope_event_ns(const Anope::string &source, int ac, const char **av)
{
if (ac < 1)
return MOD_CONT;
- m_privmsg(source, Config.s_NickServ, av[0]);
+ m_privmsg(source, Config->s_NickServ, av[0]);
return MOD_CONT;
}
@@ -519,7 +519,7 @@ int anope_event_ms(const Anope::string &source, int ac, const char **av)
{
if (ac < 1)
return MOD_CONT;
- m_privmsg(source, Config.s_MemoServ, av[0]);
+ m_privmsg(source, Config->s_MemoServ, av[0]);
return MOD_CONT;
}
@@ -528,7 +528,7 @@ int anope_event_hs(const Anope::string &source, int ac, const char **av)
{
if (ac < 1)
return MOD_CONT;
- m_privmsg(source, Config.s_HostServ, av[0]);
+ m_privmsg(source, Config->s_HostServ, av[0]);
return MOD_CONT;
}
@@ -537,7 +537,7 @@ int anope_event_cs(const Anope::string &source, int ac, const char **av)
{
if (ac < 1)
return MOD_CONT;
- m_privmsg(source, Config.s_ChanServ, av[0]);
+ m_privmsg(source, Config->s_ChanServ, av[0]);
return MOD_CONT;
}
@@ -668,7 +668,7 @@ int anope_event_ping(const Anope::string &source, int ac, const char **av)
{
if (ac < 1)
return MOD_CONT;
- ircdproto->SendPong(ac > 1 ? av[1] : Config.ServerName, av[0]);
+ ircdproto->SendPong(ac > 1 ? av[1] : Config->ServerName, av[0]);
return MOD_CONT;
}
diff --git a/modules/protocol/inspircd11.cpp b/modules/protocol/inspircd11.cpp
index c5a4c79f7..31ea2ae19 100644
--- a/modules/protocol/inspircd11.cpp
+++ b/modules/protocol/inspircd11.cpp
@@ -70,7 +70,7 @@ void inspircd_cmd_chghost(const Anope::string &nick, const Anope::string &vhost)
{
if (nick.empty() || vhost.empty())
return;
- send_cmd(Config.s_OperServ, "CHGHOST %s %s", nick.c_str(), vhost.c_str());
+ send_cmd(Config->s_OperServ, "CHGHOST %s %s", nick.c_str(), vhost.c_str());
}
else
ircdproto->SendGlobops(OperServ, "CHGHOST not loaded!");
@@ -95,7 +95,7 @@ class InspIRCdProto : public IRCDProto
{
void SendAkillDel(const XLine *x)
{
- send_cmd(Config.s_OperServ, "GLINE %s", x->Mask.c_str());
+ send_cmd(Config->s_OperServ, "GLINE %s", x->Mask.c_str());
}
void SendTopic(const BotInfo *whosets, const Channel *c, const Anope::string &whosetit, const Anope::string &topic)
@@ -120,12 +120,12 @@ class InspIRCdProto : public IRCDProto
time_t timeleft = x->Expires - time(NULL);
if (timeleft > 172800)
timeleft = 172800;
- send_cmd(Config.ServerName, "ADDLINE G %s %s %ld %ld :%s", x->Mask.c_str(), x->By.c_str(), static_cast<long>(time(NULL)), static_cast<long>(timeleft), x->Reason.c_str());
+ send_cmd(Config->ServerName, "ADDLINE G %s %s %ld %ld :%s", x->Mask.c_str(), x->By.c_str(), static_cast<long>(time(NULL)), static_cast<long>(timeleft), x->Reason.c_str());
}
void SendSVSKillInternal(const BotInfo *source, const User *user, const Anope::string &buf)
{
- send_cmd(source ? source->nick : Config.ServerName, "KILL %s :%s", user->nick.c_str(), buf.c_str());
+ send_cmd(source ? source->nick : Config->ServerName, "KILL %s :%s", user->nick.c_str(), buf.c_str());
}
void SendSVSMode(const User *u, int ac, const char **av)
@@ -142,19 +142,19 @@ class InspIRCdProto : public IRCDProto
{
if (buf.empty())
return;
- send_cmd(source ? source->nick : Config.s_OperServ, "FMODE %s %u %s", dest->name.c_str(), static_cast<unsigned>(dest->creation_time), buf.c_str());
+ send_cmd(source ? source->nick : Config->s_OperServ, "FMODE %s %u %s", dest->name.c_str(), static_cast<unsigned>(dest->creation_time), buf.c_str());
}
void SendModeInternal(const BotInfo *bi, const User *u, const Anope::string &buf)
{
if (buf.empty())
return;
- send_cmd(bi ? bi->nick : Config.ServerName, "MODE %s %s", u->nick.c_str(), buf.c_str());
+ send_cmd(bi ? bi->nick : Config->ServerName, "MODE %s %s", u->nick.c_str(), buf.c_str());
}
void SendClientIntroduction(const Anope::string &nick, const Anope::string &user, const Anope::string &host, const Anope::string &real, const Anope::string &modes, const Anope::string &)
{
- send_cmd(Config.ServerName, "NICK %ld %s %s %s %s %s 0.0.0.0 :%s", static_cast<long>(time(NULL)), nick.c_str(), host.c_str(), host.c_str(), user.c_str(), modes.c_str(), real.c_str());
+ send_cmd(Config->ServerName, "NICK %ld %s %s %s %s %s 0.0.0.0 :%s", static_cast<long>(time(NULL)), nick.c_str(), host.c_str(), host.c_str(), user.c_str(), modes.c_str(), real.c_str());
send_cmd(nick, "OPERTYPE Service");
}
@@ -170,13 +170,13 @@ class InspIRCdProto : public IRCDProto
{
if (buf.empty())
return;
- send_cmd(Config.ServerName, "NOTICE @%s :%s", dest->name.c_str(), buf.c_str());
+ send_cmd(Config->ServerName, "NOTICE @%s :%s", dest->name.c_str(), buf.c_str());
}
/* SERVER services-dev.chatspike.net password 0 :Description here */
void SendServer(const Server *server)
{
- send_cmd(Config.ServerName, "SERVER %s %s %d :%s", server->GetName().c_str(), currentpass.c_str(), server->GetHops(), server->GetDescription().c_str());
+ send_cmd(Config->ServerName, "SERVER %s %s %d :%s", server->GetName().c_str(), currentpass.c_str(), server->GetHops(), server->GetDescription().c_str());
}
/* JOIN */
@@ -188,13 +188,13 @@ class InspIRCdProto : public IRCDProto
/* UNSQLINE */
void SendSQLineDel(const XLine *x)
{
- send_cmd(Config.s_OperServ, "QLINE %s", x->Mask.c_str());
+ send_cmd(Config->s_OperServ, "QLINE %s", x->Mask.c_str());
}
/* SQLINE */
void SendSQLine(const XLine *x)
{
- send_cmd(Config.ServerName, "ADDLINE Q %s %s %ld 0 :%s", x->Mask.c_str(), Config.s_OperServ.c_str(), static_cast<long>(time(NULL)), x->Reason.c_str());
+ send_cmd(Config->ServerName, "ADDLINE Q %s %s %ld 0 :%s", x->Mask.c_str(), Config->s_OperServ.c_str(), static_cast<long>(time(NULL)), x->Reason.c_str());
}
/* SQUIT */
@@ -202,7 +202,7 @@ class InspIRCdProto : public IRCDProto
{
if (servname.empty() || message.empty())
return;
- send_cmd(Config.ServerName, "SQUIT %s :%s", servname.c_str(), message.c_str());
+ send_cmd(Config->ServerName, "SQUIT %s :%s", servname.c_str(), message.c_str());
}
/* Functions that use serval cmd functions */
@@ -220,7 +220,7 @@ class InspIRCdProto : public IRCDProto
inspircd_cmd_pass(uplink_server->password);
SendServer(Me);
send_cmd("", "BURST");
- send_cmd(Config.ServerName, "VERSION :Anope-%s %s :%s - (%s) -- %s", Anope::Version().c_str(), Config.ServerName.c_str(), ircd->name, Config.EncModuleList.begin()->c_str(), Anope::Build().c_str());
+ send_cmd(Config->ServerName, "VERSION :Anope-%s %s :%s - (%s) -- %s", Anope::Version().c_str(), Config->ServerName.c_str(), ircd->name, Config->EncModuleList.begin()->c_str(), Anope::Build().c_str());
}
/* CHGIDENT */
@@ -230,7 +230,7 @@ class InspIRCdProto : public IRCDProto
{
if (nick.empty() || vIdent.empty())
return;
- send_cmd(Config.s_OperServ, "CHGIDENT %s %s", nick.c_str(), vIdent.c_str());
+ send_cmd(Config->s_OperServ, "CHGIDENT %s %s", nick.c_str(), vIdent.c_str());
}
else
ircdproto->SendGlobops(OperServ, "CHGIDENT not loaded!");
@@ -239,25 +239,25 @@ class InspIRCdProto : public IRCDProto
/* SVSHOLD - set */
void SendSVSHold(const Anope::string &nick)
{
- send_cmd(Config.s_OperServ, "SVSHOLD %s %ds :Being held for registered user", nick.c_str(), static_cast<int>(Config.NSReleaseTimeout));
+ send_cmd(Config->s_OperServ, "SVSHOLD %s %ds :Being held for registered user", nick.c_str(), static_cast<int>(Config->NSReleaseTimeout));
}
/* SVSHOLD - release */
void SendSVSHoldDel(const Anope::string &nick)
{
- send_cmd(Config.s_OperServ, "SVSHOLD %s", nick.c_str());
+ send_cmd(Config->s_OperServ, "SVSHOLD %s", nick.c_str());
}
/* UNSZLINE */
void SendSZLineDel(const XLine *x)
{
- send_cmd(Config.s_OperServ, "ZLINE %s", x->Mask.c_str());
+ send_cmd(Config->s_OperServ, "ZLINE %s", x->Mask.c_str());
}
/* SZLINE */
void SendSZLine(const XLine *x)
{
- send_cmd(Config.ServerName, "ADDLINE Z %s %s %ld 0 :%s", x->Mask.c_str(), x->By.c_str(), static_cast<long>(time(NULL)), x->Reason.c_str());
+ send_cmd(Config->ServerName, "ADDLINE Z %s %s %ld 0 :%s", x->Mask.c_str(), x->By.c_str(), static_cast<long>(time(NULL)), x->Reason.c_str());
}
void SendSVSJoin(const Anope::string &source, const Anope::string &nick, const Anope::string &chan, const Anope::string &)
@@ -507,7 +507,7 @@ int anope_event_ping(const Anope::string &source, int ac, const char **av)
{
if (ac < 1)
return MOD_CONT;
- ircdproto->SendPong(Config.ServerName, av[0]);
+ ircdproto->SendPong(Config->ServerName, av[0]);
return MOD_CONT;
}
@@ -579,7 +579,7 @@ int anope_event_rsquit(const Anope::string &source, int ac, const char **av)
return MOD_CONT;
/* Horrible workaround to an insp bug (#) in how RSQUITs are sent - mark */
- if (ac > 1 && Config.ServerName.equals_cs(av[0]))
+ if (ac > 1 && Config->ServerName.equals_cs(av[0]))
do_squit(source, ac - 1, av + 1);
else
do_squit(source, ac, av);
diff --git a/modules/protocol/inspircd12.cpp b/modules/protocol/inspircd12.cpp
index cd628b005..4a4ef9a00 100644
--- a/modules/protocol/inspircd12.cpp
+++ b/modules/protocol/inspircd12.cpp
@@ -194,7 +194,7 @@ class InspIRCdProto : public IRCDProto
/* SQLINE */
void SendSQLine(const XLine *x)
{
- send_cmd(TS6SID, "ADDLINE Q %s %s %ld 0 :%s", x->Mask.c_str(), Config.s_OperServ.c_str(), static_cast<long>(time(NULL)), x->Reason.c_str());
+ send_cmd(TS6SID, "ADDLINE Q %s %s %ld 0 :%s", x->Mask.c_str(), Config->s_OperServ.c_str(), static_cast<long>(time(NULL)), x->Reason.c_str());
}
/* SQUIT */
@@ -218,7 +218,7 @@ class InspIRCdProto : public IRCDProto
inspircd_cmd_pass(uplink_server->password);
SendServer(Me);
send_cmd(TS6SID, "BURST");
- send_cmd(TS6SID, "VERSION :Anope-%s %s :%s - (%s) -- %s", Anope::Version().c_str(), Config.ServerName.c_str(), ircd->name, Config.EncModuleList.begin()->c_str(), Anope::Build().c_str());
+ send_cmd(TS6SID, "VERSION :Anope-%s %s :%s - (%s) -- %s", Anope::Version().c_str(), Config->ServerName.c_str(), ircd->name, Config->EncModuleList.begin()->c_str(), Anope::Build().c_str());
}
/* CHGIDENT */
@@ -233,7 +233,7 @@ class InspIRCdProto : public IRCDProto
/* SVSHOLD - set */
void SendSVSHold(const Anope::string &nick)
{
- send_cmd(OperServ->GetUID(), "SVSHOLD %s %u :Being held for registered user", nick.c_str(), static_cast<unsigned>(Config.NSReleaseTimeout));
+ send_cmd(OperServ->GetUID(), "SVSHOLD %s %u :Being held for registered user", nick.c_str(), static_cast<unsigned>(Config->NSReleaseTimeout));
}
/* SVSHOLD - release */
@@ -1285,8 +1285,8 @@ class ProtoInspIRCd : public Module
this->SetAuthor("Anope");
this->SetType(PROTOCOL);
- if (!Config.Numeric.empty())
- TS6SID = Config.Numeric;
+ if (!Config->Numeric.empty())
+ TS6SID = Config->Numeric;
pmodule_ircd_version("InspIRCd 1.2");
pmodule_ircd_var(myIrcd);
diff --git a/modules/protocol/inspircd20.cpp b/modules/protocol/inspircd20.cpp
index dfea02246..0a1a9eee6 100644
--- a/modules/protocol/inspircd20.cpp
+++ b/modules/protocol/inspircd20.cpp
@@ -192,7 +192,7 @@ class InspIRCdProto : public IRCDProto
/* SQLINE */
void SendSQLine(const XLine *x)
{
- send_cmd(TS6SID, "ADDLINE Q %s %s %ld 0 :%s", x->Mask.c_str(), Config.s_OperServ.c_str(), static_cast<long>(time(NULL)), x->Reason.c_str());
+ send_cmd(TS6SID, "ADDLINE Q %s %s %ld 0 :%s", x->Mask.c_str(), Config->s_OperServ.c_str(), static_cast<long>(time(NULL)), x->Reason.c_str());
}
/* SQUIT */
@@ -219,7 +219,7 @@ class InspIRCdProto : public IRCDProto
inspircd_cmd_pass(uplink_server->password);
SendServer(Me);
send_cmd(TS6SID, "BURST");
- send_cmd(TS6SID, "VERSION :Anope-%s %s :%s - (%s) -- %s", Anope::Version().c_str(), Config.ServerName.c_str(), ircd->name, Config.EncModuleList.begin()->c_str(), Anope::Build().c_str());
+ send_cmd(TS6SID, "VERSION :Anope-%s %s :%s - (%s) -- %s", Anope::Version().c_str(), Config->ServerName.c_str(), ircd->name, Config->EncModuleList.begin()->c_str(), Anope::Build().c_str());
}
/* CHGIDENT */
@@ -234,7 +234,7 @@ class InspIRCdProto : public IRCDProto
/* SVSHOLD - set */
void SendSVSHold(const Anope::string &nick)
{
- send_cmd(OperServ->GetUID(), "SVSHOLD %s %u :Being held for registered user", nick.c_str(), static_cast<unsigned>(Config.NSReleaseTimeout));
+ send_cmd(OperServ->GetUID(), "SVSHOLD %s %u :Being held for registered user", nick.c_str(), static_cast<unsigned>(Config->NSReleaseTimeout));
}
/* SVSHOLD - release */
@@ -1259,8 +1259,8 @@ class ProtoInspIRCd : public Module
this->SetAuthor("Anope");
this->SetType(PROTOCOL);
- if (!Config.Numeric.empty())
- TS6SID = Config.Numeric;
+ if (!Config->Numeric.empty())
+ TS6SID = Config->Numeric;
pmodule_ircd_version("InspIRCd 2.0");
pmodule_ircd_var(myIrcd);
diff --git a/modules/protocol/ratbox.cpp b/modules/protocol/ratbox.cpp
index ff2a0f6c6..59abc7bc8 100644
--- a/modules/protocol/ratbox.cpp
+++ b/modules/protocol/ratbox.cpp
@@ -120,19 +120,19 @@ class RatboxProto : public IRCDTS6Proto
void SendSGLineDel(const XLine *x)
{
BotInfo *bi = OperServ;
- send_cmd(bi ? bi->GetUID() : Config.s_OperServ, "UNXLINE * %s", x->Mask.c_str());
+ send_cmd(bi ? bi->GetUID() : Config->s_OperServ, "UNXLINE * %s", x->Mask.c_str());
}
void SendSGLine(const XLine *x)
{
BotInfo *bi = OperServ;
- send_cmd(bi ? bi->GetUID() : Config.s_OperServ, "XLINE * %s 0 :%s", x->Mask.c_str(), x->Reason.c_str());
+ send_cmd(bi ? bi->GetUID() : Config->s_OperServ, "XLINE * %s 0 :%s", x->Mask.c_str(), x->Reason.c_str());
}
void SendAkillDel(const XLine *x)
{
BotInfo *bi = OperServ;
- send_cmd(bi ? bi->GetUID() : Config.s_OperServ, "UNKLINE * %s %s", x->GetUser().c_str(), x->GetHost().c_str());
+ send_cmd(bi ? bi->GetUID() : Config->s_OperServ, "UNKLINE * %s %s", x->GetUser().c_str(), x->GetHost().c_str());
}
void SendSQLineDel(const XLine *x)
@@ -148,7 +148,7 @@ class RatboxProto : public IRCDTS6Proto
void SendAkill(const XLine *x)
{
BotInfo *bi = OperServ;
- send_cmd(bi ? bi->GetUID() : Config.s_OperServ, "KLINE * %ld %s %s :%s", static_cast<long>(x->Expires - time(NULL)), x->GetUser().c_str(), x->GetHost().c_str(), x->Reason.c_str());
+ send_cmd(bi ? bi->GetUID() : Config->s_OperServ, "KLINE * %ld %s %s :%s", static_cast<long>(x->Expires - time(NULL)), x->GetUser().c_str(), x->GetHost().c_str(), x->Reason.c_str());
}
void SendSVSKillInternal(const BotInfo *source, const User *user, const Anope::string &buf)
@@ -538,7 +538,7 @@ int anope_event_ping(const Anope::string &source, int ac, const char **av)
{
if (ac < 1)
return MOD_CONT;
- ircdproto->SendPong(ac > 1 ? av[1] : Config.ServerName, av[0]);
+ ircdproto->SendPong(ac > 1 ? av[1] : Config->ServerName, av[0]);
return MOD_CONT;
}
@@ -811,8 +811,8 @@ class ProtoRatbox : public Module
this->SetAuthor("Anope");
this->SetType(PROTOCOL);
- if (!Config.Numeric.empty())
- TS6SID = Config.Numeric;
+ if (!Config->Numeric.empty())
+ TS6SID = Config->Numeric;
UseTSMODE = 1; /* TMODE */
pmodule_ircd_version("Ratbox IRCD 2.0+");
diff --git a/modules/protocol/unreal32.cpp b/modules/protocol/unreal32.cpp
index 16fc8582e..ed840aa3e 100644
--- a/modules/protocol/unreal32.cpp
+++ b/modules/protocol/unreal32.cpp
@@ -72,12 +72,12 @@ void unreal_cmd_netinfo(int ac, const char **av)
TKLEXT = Extended TKL we don't use it but best to have it
SJB64 = Base64 encoded time stamps
VL = Version Info
- NS = Config.Numeric Server
+ NS = Config->Numeric Server
*/
void unreal_cmd_capab()
{
- if (!Config.Numeric.empty())
+ if (!Config->Numeric.empty())
send_cmd("", "PROTOCTL NICKv2 VHP UMODE2 NICKIP TOKEN SJOIN SJOIN2 SJ3 NOQUIT TKLEXT VL");
else
send_cmd("", "PROTOCTL NICKv2 VHP UMODE2 NICKIP TOKEN SJOIN SJOIN2 SJ3 NOQUIT TKLEXT");
@@ -94,7 +94,7 @@ void unreal_cmd_chghost(const Anope::string &nick, const Anope::string &vhost)
{
if (nick.empty() || vhost.empty())
return;
- send_cmd(Config.ServerName, "AL %s %s", nick.c_str(), vhost.c_str());
+ send_cmd(Config->ServerName, "AL %s %s", nick.c_str(), vhost.c_str());
}
/* CHGIDENT */
@@ -102,7 +102,7 @@ void unreal_cmd_chgident(const Anope::string &nick, const Anope::string &vIdent)
{
if (nick.empty() || vIdent.empty())
return;
- send_cmd(Config.ServerName, "AZ %s %s", nick.c_str(), vIdent.c_str());
+ send_cmd(Config->ServerName, "AZ %s %s", nick.c_str(), vIdent.c_str());
}
class UnrealIRCdProto : public IRCDProto
@@ -115,7 +115,7 @@ class UnrealIRCdProto : public IRCDProto
void SendAkillDel(const XLine *x)
{
- send_cmd("", "BD - G %s %s %s", x->GetUser().c_str(), x->GetHost().c_str(), Config.s_OperServ.c_str());
+ send_cmd("", "BD - G %s %s %s", x->GetUser().c_str(), x->GetHost().c_str(), Config->s_OperServ.c_str());
}
void SendTopic(const BotInfo *whosets, const Channel *c, const Anope::string &whosetit, const Anope::string &topic)
@@ -143,7 +143,7 @@ class UnrealIRCdProto : public IRCDProto
void SendSVSKillInternal(const BotInfo *source, const User *user, const Anope::string &buf)
{
- send_cmd(source ? source->nick : Config.ServerName, "h %s :%s", user->nick.c_str(), buf.c_str());
+ send_cmd(source ? source->nick : Config->ServerName, "h %s :%s", user->nick.c_str(), buf.c_str());
}
/*
@@ -174,13 +174,13 @@ class UnrealIRCdProto : public IRCDProto
{
if (buf.empty())
return;
- send_cmd(bi ? bi->nick : Config.ServerName, "v %s %s", u->nick.c_str(), buf.c_str());
+ send_cmd(bi ? bi->nick : Config->ServerName, "v %s %s", u->nick.c_str(), buf.c_str());
}
void SendClientIntroduction(const Anope::string &nick, const Anope::string &user, const Anope::string &host, const Anope::string &real, const Anope::string &modes, const Anope::string &)
{
- EnforceQlinedNick(nick, Config.ServerName);
- send_cmd("", "& %s 1 %ld %s %s %s 0 %s %s%s :%s", nick.c_str(), static_cast<long>(time(NULL)), user.c_str(), host.c_str(), Config.ServerName.c_str(), modes.c_str(), host.c_str(), myIrcd->nickip ? " *" : "", real.c_str());
+ EnforceQlinedNick(nick, Config->ServerName);
+ send_cmd("", "& %s 1 %ld %s %s %s 0 %s %s%s :%s", nick.c_str(), static_cast<long>(time(NULL)), user.c_str(), host.c_str(), Config->ServerName.c_str(), modes.c_str(), host.c_str(), myIrcd->nickip ? " *" : "", real.c_str());
}
void SendKickInternal(const BotInfo *source, const Channel *chan, const User *user, const Anope::string &buf)
@@ -202,8 +202,8 @@ class UnrealIRCdProto : public IRCDProto
/* Unreal 3.2 actually sends some info about itself in the descript area */
void SendServer(const Server *server)
{
- if (!Config.Numeric.empty())
- send_cmd("", "SERVER %s %d :U0-*-%s %s", server->GetName().c_str(), server->GetHops(), Config.Numeric.c_str(), server->GetDescription().c_str());
+ if (!Config->Numeric.empty())
+ send_cmd("", "SERVER %s %d :U0-*-%s %s", server->GetName().c_str(), server->GetHops(), Config->Numeric.c_str(), server->GetDescription().c_str());
else
send_cmd("", "SERVER %s %d :%s", server->GetName().c_str(), server->GetHops(), server->GetDescription().c_str());
}
@@ -211,7 +211,7 @@ class UnrealIRCdProto : public IRCDProto
/* JOIN */
void SendJoin(const BotInfo *user, const Anope::string &channel, time_t chantime)
{
- send_cmd(Config.ServerName, "~ %ld %s :%s", static_cast<long>(chantime), channel.c_str(), user->nick.c_str());
+ send_cmd(Config->ServerName, "~ %ld %s :%s", static_cast<long>(chantime), channel.c_str(), user->nick.c_str());
}
/* unsqline
@@ -272,13 +272,13 @@ class UnrealIRCdProto : public IRCDProto
/* SVSHOLD - set */
void SendSVSHold(const Anope::string &nick)
{
- send_cmd("", "BD + Q H %s %s %ld %ld :Being held for registered user", nick.c_str(), Config.ServerName.c_str(), static_cast<long>(time(NULL) + Config.NSReleaseTimeout), static_cast<long>(time(NULL)));
+ send_cmd("", "BD + Q H %s %s %ld %ld :Being held for registered user", nick.c_str(), Config->ServerName.c_str(), static_cast<long>(time(NULL) + Config->NSReleaseTimeout), static_cast<long>(time(NULL)));
}
/* SVSHOLD - release */
void SendSVSHoldDel(const Anope::string &nick)
{
- send_cmd("", "BD - Q * %s %s", nick.c_str(), Config.ServerName.c_str());
+ send_cmd("", "BD - Q * %s %s", nick.c_str(), Config->ServerName.c_str());
}
/* UNSGLINE */
@@ -293,7 +293,7 @@ class UnrealIRCdProto : public IRCDProto
/* UNSZLINE */
void SendSZLineDel(const XLine *x)
{
- send_cmd("", "BD - Z * %s %s", x->Mask.c_str(), Config.s_OperServ.c_str());
+ send_cmd("", "BD - Z * %s %s", x->Mask.c_str(), Config->s_OperServ.c_str());
}
/* SZLINE */
@@ -324,9 +324,9 @@ class UnrealIRCdProto : public IRCDProto
void SendSVSModeChan(const Channel *c, const Anope::string &mode, const Anope::string &nick)
{
if (!nick.empty())
- send_cmd(Config.ServerName, "n %s %s %s", c->name.c_str(), mode.c_str(), nick.c_str());
+ send_cmd(Config->ServerName, "n %s %s %s", c->name.c_str(), mode.c_str(), nick.c_str());
else
- send_cmd(Config.ServerName, "n %s %s", c->name.c_str(), mode.c_str());
+ send_cmd(Config->ServerName, "n %s %s", c->name.c_str(), mode.c_str());
}
/* svsjoin
@@ -363,7 +363,7 @@ class UnrealIRCdProto : public IRCDProto
void SendEOB()
{
- send_cmd(Config.ServerName, "ES");
+ send_cmd(Config->ServerName, "ES");
}
bool IsNickValid(const Anope::string &nick)
@@ -560,7 +560,7 @@ int anope_event_ping(const Anope::string &source, int ac, const char **av)
{
if (ac < 1)
return MOD_CONT;
- ircdproto->SendPong(ac > 1 ? av[1] : Config.ServerName, av[0]);
+ ircdproto->SendPong(ac > 1 ? av[1] : Config->ServerName, av[0]);
return MOD_CONT;
}
@@ -932,7 +932,7 @@ int anope_event_server(const Anope::string &source, int ac, const char **av)
}
else
do_server(source, av[0], Anope::string(av[1]).is_number_only() ? convertTo<unsigned>(av[1]) : 0, av[2], "");
- ircdproto->SendPing(Config.ServerName, av[0]);
+ ircdproto->SendPing(Config->ServerName, av[0]);
return MOD_CONT;
}
diff --git a/modules/socketengines/m_socketengine_epoll.cpp b/modules/socketengines/m_socketengine_epoll.cpp
index 05978caf0..9fadb22a1 100644
--- a/modules/socketengines/m_socketengine_epoll.cpp
+++ b/modules/socketengines/m_socketengine_epoll.cpp
@@ -108,7 +108,7 @@ class SocketEngineEPoll : public SocketEngineBase
void Process()
{
- int total = epoll_wait(EngineHandle, events, max - 1, Config.ReadTimeout * 1000);
+ int total = epoll_wait(EngineHandle, events, max - 1, Config->ReadTimeout * 1000);
if (total == -1)
{
diff --git a/modules/socketengines/m_socketengine_select.cpp b/modules/socketengines/m_socketengine_select.cpp
index ae82345f6..72b851780 100644
--- a/modules/socketengines/m_socketengine_select.cpp
+++ b/modules/socketengines/m_socketengine_select.cpp
@@ -55,7 +55,7 @@ class SocketEngineSelect : public SocketEngineBase
{
fd_set rfdset = ReadFDs, wfdset = WriteFDs, efdset = ReadFDs;
timeval tval;
- tval.tv_sec = Config.ReadTimeout;
+ tval.tv_sec = Config->ReadTimeout;
tval.tv_usec = 0;
int sresult = select(MaxFD + 1, &rfdset, &wfdset, &efdset, &tval);
diff --git a/src/actions.cpp b/src/actions.cpp
index 17c0a2898..bdc5a041d 100644
--- a/src/actions.cpp
+++ b/src/actions.cpp
@@ -23,14 +23,14 @@ bool bad_password(User *u)
{
time_t now = time(NULL);
- if (!u || !Config.BadPassLimit)
+ if (!u || !Config->BadPassLimit)
return false;
- if (Config.BadPassTimeout > 0 && u->invalid_pw_time > 0 && u->invalid_pw_time < now - Config.BadPassTimeout)
+ if (Config->BadPassTimeout > 0 && u->invalid_pw_time > 0 && u->invalid_pw_time < now - Config->BadPassTimeout)
u->invalid_pw_count = 0;
++u->invalid_pw_count;
u->invalid_pw_time = now;
- if (u->invalid_pw_count >= Config.BadPassLimit)
+ if (u->invalid_pw_count >= Config->BadPassLimit)
{
kill_user("", u->nick, "Too many invalid passwords");
return true;
@@ -53,7 +53,7 @@ void kill_user(const Anope::string &source, const Anope::string &user, const Ano
if (user.empty())
return;
- Anope::string real_source = source.empty() ? Config.ServerName : source;
+ Anope::string real_source = source.empty() ? Config->ServerName : source;
Anope::string buf = real_source + " (" + reason + ")";
diff --git a/src/bots.cpp b/src/bots.cpp
index c07b358da..cb7a370c1 100644
--- a/src/bots.cpp
+++ b/src/bots.cpp
@@ -30,19 +30,19 @@ BotInfo::BotInfo(const Anope::string &nnick, const Anope::string &nuser, const A
this->chancount = 0;
this->lastmsg = this->created = time(NULL);
- if (!Config.s_ChanServ.empty() && nnick.equals_ci(Config.s_ChanServ))
+ if (!Config->s_ChanServ.empty() && nnick.equals_ci(Config->s_ChanServ))
ChanServ = this;
- else if (!Config.s_BotServ.empty() && nnick.equals_ci(Config.s_BotServ))
+ else if (!Config->s_BotServ.empty() && nnick.equals_ci(Config->s_BotServ))
BotServ = this;
- else if (!Config.s_HostServ.empty() && nnick.equals_ci(Config.s_HostServ))
+ else if (!Config->s_HostServ.empty() && nnick.equals_ci(Config->s_HostServ))
HostServ = this;
- else if (!Config.s_OperServ.empty() && nnick.equals_ci(Config.s_OperServ))
+ else if (!Config->s_OperServ.empty() && nnick.equals_ci(Config->s_OperServ))
OperServ = this;
- else if (!Config.s_MemoServ.empty() && nnick.equals_ci(Config.s_MemoServ))
+ else if (!Config->s_MemoServ.empty() && nnick.equals_ci(Config->s_MemoServ))
MemoServ = this;
- else if (!Config.s_NickServ.empty() && nnick.equals_ci(Config.s_NickServ))
+ else if (!Config->s_NickServ.empty() && nnick.equals_ci(Config->s_NickServ))
NickServ = this;
- else if (!Config.s_GlobalNoticer.empty() && nnick.equals_ci(Config.s_GlobalNoticer))
+ else if (!Config->s_GlobalNoticer.empty() && nnick.equals_ci(Config->s_GlobalNoticer))
Global = this;
BotListByNick[this->nick] = this;
@@ -94,7 +94,7 @@ void BotInfo::RejoinAll()
{
ChannelInfo *ci = it->second;
- if (ci->bi == this && ci->c && ci->c->users.size() >= Config.BSMinUsers)
+ if (ci->bi == this && ci->c && ci->c->users.size() >= Config->BSMinUsers)
this->Join(ci->c);
}
}
@@ -112,7 +112,7 @@ void BotInfo::Assign(User *u, ChannelInfo *ci)
++this->chancount;
ci->bi = this;
- if (ci->c && ci->c->users.size() >= Config.BSMinUsers)
+ if (ci->c && ci->c->users.size() >= Config->BSMinUsers)
this->Join(ci->c);
}
@@ -138,7 +138,7 @@ void BotInfo::UnAssign(User *u, ChannelInfo *ci)
void BotInfo::Join(Channel *c)
{
- if (Config.BSSmartJoin)
+ if (Config->BSSmartJoin)
{
/* We check for bans */
if (c->bans && c->bans->count)
diff --git a/src/botserv.cpp b/src/botserv.cpp
index 381223681..ee6f08f29 100644
--- a/src/botserv.cpp
+++ b/src/botserv.cpp
@@ -26,7 +26,7 @@ E void moduleAddBotServCmds();
void moduleAddBotServCmds()
{
- ModuleManager::LoadModuleList(Config.BotServCoreModules);
+ ModuleManager::LoadModuleList(Config->BotServCoreModules);
}
/*************************************************************************/
@@ -61,7 +61,7 @@ void get_botserv_stats(long *nrec, long *memuse)
void bs_init()
{
- if (!Config.s_BotServ.empty())
+ if (!Config->s_BotServ.empty())
moduleAddBotServCmds();
}
@@ -198,25 +198,25 @@ void botchanmsgs(User *u, ChannelInfo *ci, const Anope::string &buf)
{
BadWord *bw = ci->GetBadWord(i);
- if (bw->type == BW_ANY && ((Config.BSCaseSensitive && nbuf.find(bw->word) != Anope::string::npos) || (!Config.BSCaseSensitive && nbuf.find_ci(bw->word) != Anope::string::npos)))
+ if (bw->type == BW_ANY && ((Config->BSCaseSensitive && nbuf.find(bw->word) != Anope::string::npos) || (!Config->BSCaseSensitive && nbuf.find_ci(bw->word) != Anope::string::npos)))
mustkick = true;
else if (bw->type == BW_SINGLE)
{
size_t len = bw->word.length();
- if ((Config.BSCaseSensitive && bw->word.equals_cs(nbuf)) || (!Config.BSCaseSensitive && bw->word.equals_ci(nbuf)))
+ if ((Config->BSCaseSensitive && bw->word.equals_cs(nbuf)) || (!Config->BSCaseSensitive && bw->word.equals_ci(nbuf)))
mustkick = true;
- else if (nbuf.find(' ') == len && ((Config.BSCaseSensitive && bw->word.equals_cs(nbuf)) || (!Config.BSCaseSensitive && bw->word.equals_ci(nbuf))))
+ else if (nbuf.find(' ') == len && ((Config->BSCaseSensitive && bw->word.equals_cs(nbuf)) || (!Config->BSCaseSensitive && bw->word.equals_ci(nbuf))))
mustkick = true;
else
{
- if (nbuf.rfind(' ') == nbuf.length() - len - 1 && ((Config.BSCaseSensitive && nbuf.find(bw->word) == nbuf.length() - len) || (!Config.BSCaseSensitive && nbuf.find_ci(bw->word) == nbuf.length() - len)))
+ if (nbuf.rfind(' ') == nbuf.length() - len - 1 && ((Config->BSCaseSensitive && nbuf.find(bw->word) == nbuf.length() - len) || (!Config->BSCaseSensitive && nbuf.find_ci(bw->word) == nbuf.length() - len)))
mustkick = true;
else
{
Anope::string wordbuf = " " + bw->word + " ";
- if ((Config.BSCaseSensitive && nbuf.find(wordbuf) != Anope::string::npos) || (!Config.BSCaseSensitive && nbuf.find_ci(wordbuf) != Anope::string::npos))
+ if ((Config->BSCaseSensitive && nbuf.find(wordbuf) != Anope::string::npos) || (!Config->BSCaseSensitive && nbuf.find_ci(wordbuf) != Anope::string::npos))
mustkick = true;
}
}
@@ -225,13 +225,13 @@ void botchanmsgs(User *u, ChannelInfo *ci, const Anope::string &buf)
{
size_t len = bw->word.length();
- if ((Config.BSCaseSensitive && nbuf.substr(0, len).equals_cs(bw->word)) || (!Config.BSCaseSensitive && nbuf.substr(0, len).equals_ci(bw->word)))
+ if ((Config->BSCaseSensitive && nbuf.substr(0, len).equals_cs(bw->word)) || (!Config->BSCaseSensitive && nbuf.substr(0, len).equals_ci(bw->word)))
mustkick = true;
else
{
Anope::string wordbuf = " " + bw->word;
- if ((Config.BSCaseSensitive && nbuf.find(wordbuf) != Anope::string::npos) || (!Config.BSCaseSensitive && nbuf.find_ci(wordbuf) != Anope::string::npos))
+ if ((Config->BSCaseSensitive && nbuf.find(wordbuf) != Anope::string::npos) || (!Config->BSCaseSensitive && nbuf.find_ci(wordbuf) != Anope::string::npos))
mustkick = true;
}
}
@@ -239,13 +239,13 @@ void botchanmsgs(User *u, ChannelInfo *ci, const Anope::string &buf)
{
size_t len = bw->word.length();
- if ((Config.BSCaseSensitive && nbuf.substr(nbuf.length() - len).equals_cs(bw->word)) || (!Config.BSCaseSensitive && nbuf.substr(nbuf.length() - len).equals_ci(bw->word)))
+ if ((Config->BSCaseSensitive && nbuf.substr(nbuf.length() - len).equals_cs(bw->word)) || (!Config->BSCaseSensitive && nbuf.substr(nbuf.length() - len).equals_ci(bw->word)))
mustkick = true;
else
{
Anope::string wordbuf = bw->word + " ";
- if ((Config.BSCaseSensitive && nbuf.find(wordbuf) != Anope::string::npos) || (!Config.BSCaseSensitive && nbuf.find_ci(wordbuf) != Anope::string::npos))
+ if ((Config->BSCaseSensitive && nbuf.find(wordbuf) != Anope::string::npos) || (!Config->BSCaseSensitive && nbuf.find_ci(wordbuf) != Anope::string::npos))
mustkick = true;
}
}
@@ -253,7 +253,7 @@ void botchanmsgs(User *u, ChannelInfo *ci, const Anope::string &buf)
if (mustkick)
{
check_ban(ci, u, TTB_BADWORDS);
- if (Config.BSGentleBWReason)
+ if (Config->BSGentleBWReason)
bot_kick(ci, u, BOT_REASON_BADWORD_GENTLE);
else
bot_kick(ci, u, BOT_REASON_BADWORD, bw->word.c_str());
@@ -320,12 +320,12 @@ void botchanmsgs(User *u, ChannelInfo *ci, const Anope::string &buf)
return;
/* Fantaisist commands */
- if (ci->botflags.HasFlag(BS_FANTASY) && buf[0] == Config.BSFantasyCharacter[0] && !was_action)
+ if (ci->botflags.HasFlag(BS_FANTASY) && buf[0] == Config->BSFantasyCharacter[0] && !was_action)
{
spacesepstream sep(buf);
Anope::string token;
- if (sep.GetToken(token) && token[0] == Config.BSFantasyCharacter[0])
+ if (sep.GetToken(token) && token[0] == Config->BSFantasyCharacter[0])
{
/* Strip off the fantasy character */
token.erase(token.begin());
@@ -396,7 +396,7 @@ static BanData *get_ban_data(Channel *c, User *u)
for (bd = c->bd; bd; bd = next)
{
- if (now - bd->last_use > Config.BSKeepData)
+ if (now - bd->last_use > Config->BSKeepData)
{
if (bd->next)
bd->next->prev = bd->prev;
@@ -452,7 +452,7 @@ static UserData *get_user_data(Channel *c, User *u)
time_t now = time(NULL);
/* Checks whether data is obsolete */
- if (now - uc->ud.last_use > Config.BSKeepData)
+ if (now - uc->ud.last_use > Config->BSKeepData)
{
/* We should not free and realloc, but reset to 0
instead. */
diff --git a/src/channels.cpp b/src/channels.cpp
index 9392b70cd..a10a4e675 100644
--- a/src/channels.cpp
+++ b/src/channels.cpp
@@ -109,9 +109,9 @@ void Channel::JoinUser(User *user)
if (this->ci && check_access(user, this->ci, CA_MEMO) && this->ci->memos.memos.size() > 0)
{
if (this->ci->memos.memos.size() == 1)
- notice_lang(Config.s_MemoServ, user, MEMO_X_ONE_NOTICE, this->ci->memos.memos.size(), this->ci->name.c_str());
+ notice_lang(Config->s_MemoServ, user, MEMO_X_ONE_NOTICE, this->ci->memos.memos.size(), this->ci->name.c_str());
else
- notice_lang(Config.s_MemoServ, user, MEMO_X_MANY_NOTICE, this->ci->memos.memos.size(), this->ci->name.c_str());
+ notice_lang(Config->s_MemoServ, user, MEMO_X_MANY_NOTICE, this->ci->memos.memos.size(), this->ci->name.c_str());
}
/* Added channelname to entrymsg - 30.03.2004, Certus */
/* Also, don't send the entrymsg when bursting -GD */
@@ -119,7 +119,7 @@ void Channel::JoinUser(User *user)
user->SendMessage(whosends(this->ci)->nick, "[%s] %s", this->name.c_str(), this->ci->entry_message.c_str());
}
- if (!Config.s_BotServ.empty() && this->ci && this->ci->bi)
+ if (!Config->s_BotServ.empty() && this->ci && this->ci->bi)
{
/**
* We let the bot join even if it was an ignored user, as if we don't,
@@ -129,7 +129,7 @@ void Channel::JoinUser(User *user)
* But don't join the bot if the channel is persistant - Adam
* But join persistant channels when syncing with our uplink- DP
**/
- if ((!Me->IsSynced() || !this->ci->HasFlag(CI_PERSIST)) && this->users.size() >= Config.BSMinUsers && !this->FindUser(this->ci->bi))
+ if ((!Me->IsSynced() || !this->ci->HasFlag(CI_PERSIST)) && this->users.size() >= Config->BSMinUsers && !this->FindUser(this->ci->bi))
this->ci->bi->Join(this);
/* Only display the greet if the main uplink we're connected
* to has synced, or we'll get greet-floods when the net
@@ -193,7 +193,7 @@ void Channel::DeleteUser(User *user)
/* check for BSMinUsers and part the BotServ bot from the channel
* Use <= because the bot is included in this->users.size()
*/
- if (!Config.s_BotServ.empty() && this->ci && this->ci->bi && this->users.size() <= Config.BSMinUsers && this->FindUser(this->ci->bi))
+ if (!Config->s_BotServ.empty() && this->ci && this->ci->bi && this->users.size() <= Config->BSMinUsers && this->FindUser(this->ci->bi))
this->ci->bi->Part(this->ci->c);
else if (this->users.empty())
delete this;
@@ -278,7 +278,7 @@ void Channel::SetModeInternal(ChannelMode *cm, const Anope::string &param, bool
}
BotInfo *bi = NULL;
- if (!Config.s_BotServ.empty())
+ if (!Config->s_BotServ.empty())
bi = findbot(param);
User *u = bi ? bi : finduser(param);
@@ -404,7 +404,7 @@ void Channel::RemoveModeInternal(ChannelMode *cm, const Anope::string &param, bo
}
BotInfo *bi = NULL;
- if (!Config.s_BotServ.empty())
+ if (!Config->s_BotServ.empty())
bi = findbot(param);
User *u = bi ? bi : finduser(param);
@@ -460,7 +460,7 @@ void Channel::RemoveModeInternal(ChannelMode *cm, const Anope::string &param, bo
if (ci)
{
ci->UnsetFlag(CI_PERSIST);
- if (!Config.s_BotServ.empty() && ci->bi && this->FindUser(ci->bi))
+ if (!Config->s_BotServ.empty() && ci->bi && this->FindUser(ci->bi))
this->ci->bi->Part(this);
}
}
@@ -865,7 +865,7 @@ void ChanSetInternalModes(Channel *c, int ac, const char **av)
void Channel::KickInternal(const Anope::string &source, const Anope::string &nick, const Anope::string &reason)
{
BotInfo *bi = NULL;
- if (!Config.s_BotServ.empty() && this->ci)
+ if (!Config->s_BotServ.empty() && this->ci)
bi = findbot(nick);
User *user = bi ? bi : finduser(nick);
if (!user)
diff --git a/src/chanserv.cpp b/src/chanserv.cpp
index b0d6f4b16..03760b9b6 100644
--- a/src/chanserv.cpp
+++ b/src/chanserv.cpp
@@ -110,7 +110,7 @@ int levelinfo_maxwidth = 0;
void moduleAddChanServCmds()
{
- ModuleManager::LoadModuleList(Config.ChanServCoreModules);
+ ModuleManager::LoadModuleList(Config->ChanServCoreModules);
}
/*************************************************************************/
@@ -263,7 +263,7 @@ void check_modes(Channel *c)
if (c->server_modecount >= 3 && c->chanserv_modecount >= 3)
{
ircdproto->SendGlobops(NULL, "Warning: unable to set modes on channel %s. Are your servers' U:lines configured correctly?", c->name.c_str());
- Alog() << Config.s_ChanServ << ": Bouncy modes on channel " << c->name;
+ Alog() << Config->s_ChanServ << ": Bouncy modes on channel " << c->name;
c->bouncy_modes = 1;
return;
}
@@ -355,7 +355,7 @@ int check_valid_admin(User *user, Channel *chan, int servermode)
if (servermode && !check_access(user, chan->ci, CA_AUTOPROTECT))
{
- notice_lang(Config.s_ChanServ, user, CHAN_IS_REGISTERED, Config.s_ChanServ.c_str());
+ notice_lang(Config->s_ChanServ, user, CHAN_IS_REGISTERED, Config->s_ChanServ.c_str());
chan->RemoveMode(NULL, CMODE_PROTECT, user->nick);
return 0;
}
@@ -391,7 +391,7 @@ int check_valid_op(User *user, Channel *chan, int servermode)
if (servermode && !check_access(user, chan->ci, CA_AUTOOP))
{
- notice_lang(Config.s_ChanServ, user, CHAN_IS_REGISTERED, Config.s_ChanServ.c_str());
+ notice_lang(Config->s_ChanServ, user, CHAN_IS_REGISTERED, Config->s_ChanServ.c_str());
if (owner)
chan->RemoveMode(NULL, CMODE_OWNER, user->nick);
@@ -479,7 +479,7 @@ void restore_topic(const Anope::string &chan)
if (ircd->join2set && whosends(ci) == ChanServ)
{
ChanServ->Join(chan);
- c->SetMode(NULL, CMODE_OP, Config.s_ChanServ);
+ c->SetMode(NULL, CMODE_OP, Config->s_ChanServ);
}
ircdproto->SendTopic(whosends(ci), c, c->topic_setter, c->topic);
if (ircd->join2set && whosends(ci) == ChanServ)
@@ -513,7 +513,7 @@ int check_topiclock(Channel *c, time_t topic_time)
{
c->topic.clear();
/* Bot assigned & Symbiosis ON?, the bot will set the topic - doc */
- /* Altough whosends() also checks for Config.BSMinUsers -GD */
+ /* Altough whosends() also checks for Config->BSMinUsers -GD */
c->topic_setter = whosends(ci)->nick;
}
@@ -538,7 +538,7 @@ int check_topiclock(Channel *c, time_t topic_time)
if (ircd->join2set && whosends(ci) == ChanServ)
{
ChanServ->Join(c);
- c->SetMode(NULL, CMODE_OP, Config.s_ChanServ);
+ c->SetMode(NULL, CMODE_OP, Config->s_ChanServ);
}
ircdproto->SendTopic(whosends(ci), c, c->topic_setter, c->topic);
@@ -554,7 +554,7 @@ int check_topiclock(Channel *c, time_t topic_time)
void expire_chans()
{
- if (!Config.CSExpire)
+ if (!Config->CSExpire)
return;
time_t now = time(NULL);
@@ -564,7 +564,7 @@ void expire_chans()
ChannelInfo *ci = it->second;
++it;
- if (!ci->c && now - ci->last_used >= Config.CSExpire && !ci->HasFlag(CI_FORBIDDEN) && !ci->HasFlag(CI_NO_EXPIRE) && !ci->HasFlag(CI_SUSPENDED))
+ if (!ci->c && now - ci->last_used >= Config->CSExpire && !ci->HasFlag(CI_FORBIDDEN) && !ci->HasFlag(CI_NO_EXPIRE) && !ci->HasFlag(CI_SUSPENDED))
{
EventReturn MOD_RESULT;
FOREACH_RESULT(I_OnPreChanExpire, OnPreChanExpire(ci));
@@ -597,15 +597,15 @@ void cs_remove_nick(const NickCore *nc)
if (ci->successor)
{
NickCore *nc2 = ci->successor;
- if (!nc2->IsServicesOper() && Config.CSMaxReg && nc2->channelcount >= Config.CSMaxReg)
+ if (!nc2->IsServicesOper() && Config->CSMaxReg && nc2->channelcount >= Config->CSMaxReg)
{
- Alog() << Config.s_ChanServ << ": Successor (" << nc2->display << " ) of " << ci->name << " owns too many channels, deleting channel",
+ Alog() << Config->s_ChanServ << ": Successor (" << nc2->display << " ) of " << ci->name << " owns too many channels, deleting channel",
delete ci;
continue;
}
else
{
- Alog() << Config.s_ChanServ << ": Transferring foundership of " << ci->name << " from deleted nick " << nc->display << " to successor " << nc2->display;
+ Alog() << Config->s_ChanServ << ": Transferring foundership of " << ci->name << " from deleted nick " << nc->display << " to successor " << nc2->display;
ci->founder = nc2;
ci->successor = NULL;
++nc2->channelcount;
@@ -613,7 +613,7 @@ void cs_remove_nick(const NickCore *nc)
}
else
{
- Alog() << Config.s_ChanServ << ": Deleting channel " << ci->name << "owned by deleted nick " << nc->display;
+ Alog() << Config->s_ChanServ << ": Deleting channel " << ci->name << "owned by deleted nick " << nc->display;
if (ModeManager::FindChannelModeByName(CMODE_REGISTERED))
{
@@ -963,7 +963,7 @@ void stick_all(ChannelInfo *ci)
}
}
-ChanServTimer::ChanServTimer(Channel *chan) : Timer(Config.CSInhabit), c(chan)
+ChanServTimer::ChanServTimer(Channel *chan) : Timer(Config->CSInhabit), c(chan)
{
if (c->ci)
c->ci->SetFlag(CI_INHABIT);
diff --git a/src/commands.cpp b/src/commands.cpp
index 2647ea952..26ca76e65 100644
--- a/src/commands.cpp
+++ b/src/commands.cpp
@@ -57,7 +57,7 @@ void mod_run_cmd(BotInfo *bi, User *u, Command *c, const Anope::string &command,
// Command requires registered users only
if (!c->HasFlag(CFLAG_ALLOW_UNREGISTERED) && !u->IsIdentified())
{
- notice_lang(bi->nick, u, NICK_IDENTIFY_REQUIRED, Config.s_NickServ.c_str());
+ notice_lang(bi->nick, u, NICK_IDENTIFY_REQUIRED, Config->s_NickServ.c_str());
Alog() << "Access denied for unregistered user " << u->nick << " with service " << bi->nick << " and command " << command;
return;
}
@@ -164,7 +164,7 @@ void mod_help_cmd(BotInfo *bi, User *u, const Anope::string &cmd)
Anope::string subcommand = tokens.StreamEnd() ? "" : tokens.GetRemaining();
- if (!c || (Config.HidePrivilegedCommands && !c->permission.empty() && (!u->Account() || !u->Account()->HasCommand(c->permission))) || !c->OnHelp(u, subcommand))
+ if (!c || (Config->HidePrivilegedCommands && !c->permission.empty() && (!u->Account() || !u->Account()->HasCommand(c->permission))) || !c->OnHelp(u, subcommand))
notice_lang(bi->nick, u, NO_HELP_AVAILABLE, cmd.c_str());
else
{
diff --git a/src/config.cpp b/src/config.cpp
index 7853196ad..0dfc9702e 100644
--- a/src/config.cpp
+++ b/src/config.cpp
@@ -16,7 +16,7 @@
/*************************************************************************/
Anope::string services_conf = "services.conf"; // Services configuration file name
-ServerConfig Config;
+ServerConfig *Config = NULL;
static Anope::string Modules;
static Anope::string EncModules;
@@ -40,14 +40,319 @@ static Anope::string NSDefaults;
/*************************************************************************/
-ServerConfig::ServerConfig() : include_stack(), errstr(""), newconfig(), config_data()
+ServerConfig::ServerConfig() : errstr(""), config_data()
{
- this->ClearStack();
-}
+ this->Read();
-void ServerConfig::ClearStack()
-{
- include_stack.clear();
+ if (!temp_nsuserhost.empty())
+ {
+ size_t at = temp_nsuserhost.find('@');
+ if (at == Anope::string::npos)
+ {
+ this->NSEnforcerUser = temp_nsuserhost;
+ this->NSEnforcerHost = this->ServiceHost;
+ }
+ else
+ {
+ this->NSEnforcerUser = temp_nsuserhost.substr(0, at);
+ this->NSEnforcerHost = temp_nsuserhost.substr(at + 1);
+ }
+ }
+
+ if (NSDefaults.empty())
+ {
+ this->NSDefFlags.SetFlag(NI_SECURE);
+ this->NSDefFlags.SetFlag(NI_MEMO_SIGNON);
+ this->NSDefFlags.SetFlag(NI_MEMO_RECEIVE);
+ }
+ else if (!NSDefaults.equals_ci("none"))
+ {
+ spacesepstream options(NSDefaults);
+ Anope::string option;
+ while (options.GetToken(option))
+ {
+ if (option.equals_ci("kill"))
+ this->NSDefFlags.SetFlag(NI_KILLPROTECT);
+ else if (option.equals_ci("killquick"))
+ this->NSDefFlags.SetFlag(NI_KILL_QUICK);
+ else if (option.equals_ci("secure"))
+ this->NSDefFlags.SetFlag(NI_SECURE);
+ else if (option.equals_ci("private"))
+ this->NSDefFlags.SetFlag(NI_PRIVATE);
+ else if (option.equals_ci("msg"))
+ {
+ if (!this->UsePrivmsg)
+ Alog() << "msg in <nickserv:defaults> can only be used when UsePrivmsg is set";
+ else
+ this->NSDefFlags.SetFlag(NI_MSG);
+ }
+ else if (option.equals_ci("hideemail"))
+ this->NSDefFlags.SetFlag(NI_HIDE_EMAIL);
+ else if (option.equals_ci("hideusermask"))
+ this->NSDefFlags.SetFlag(NI_HIDE_MASK);
+ else if (option.equals_ci("hidequit"))
+ this->NSDefFlags.SetFlag(NI_HIDE_QUIT);
+ else if (option.equals_ci("memosignon"))
+ this->NSDefFlags.SetFlag(NI_MEMO_SIGNON);
+ else if (option.equals_ci("memoreceive"))
+ this->NSDefFlags.SetFlag(NI_MEMO_RECEIVE);
+ else if (option.equals_ci("autoop"))
+ this->NSDefFlags.SetFlag(NI_AUTOOP);
+ }
+ }
+
+ if ((this->NSDefLanguage = langlist[this->NSDefLanguage]) < 0)
+ this->NSDefLanguage = DEF_LANGUAGE;
+
+ if (this->CSDefBantype < 0 || this->CSDefBantype > 3)
+ {
+ throw ConfigException("Value of CSDefBantype must be between 0 and 3 included");
+ }
+
+ if (CSDefaults.empty())
+ {
+ this->CSDefFlags.SetFlag(CI_KEEPTOPIC);
+ this->CSDefFlags.SetFlag(CI_SECURE);
+ this->CSDefFlags.SetFlag(CI_SECUREFOUNDER);
+ this->CSDefFlags.SetFlag(CI_SIGNKICK);
+ }
+ else if (!CSDefaults.equals_ci("none"))
+ {
+ spacesepstream options(CSDefaults);
+ Anope::string option;
+ while (options.GetToken(option))
+ {
+ if (option.equals_ci("keeptopic"))
+ this->CSDefFlags.SetFlag(CI_KEEPTOPIC);
+ else if (option.equals_ci("topiclock"))
+ this->CSDefFlags.SetFlag(CI_TOPICLOCK);
+ else if (option.equals_ci("private"))
+ this->CSDefFlags.SetFlag(CI_PRIVATE);
+ else if (option.equals_ci("restricted"))
+ this->CSDefFlags.SetFlag(CI_RESTRICTED);
+ else if (option.equals_ci("secure"))
+ this->CSDefFlags.SetFlag(CI_SECURE);
+ else if (option.equals_ci("secureops"))
+ this->CSDefFlags.SetFlag(CI_SECUREOPS);
+ else if (option.equals_ci("securefounder"))
+ this->CSDefFlags.SetFlag(CI_SECUREFOUNDER);
+ else if (option.equals_ci("signkick"))
+ this->CSDefFlags.SetFlag(CI_SIGNKICK);
+ else if (option.equals_ci("signkicklevel"))
+ this->CSDefFlags.SetFlag(CI_SIGNKICK_LEVEL);
+ else if (option.equals_ci("opnotice"))
+ this->CSDefFlags.SetFlag(CI_OPNOTICE);
+ else if (option.equals_ci("xop"))
+ this->CSDefFlags.SetFlag(CI_XOP);
+ else if (option.equals_ci("peace"))
+ this->CSDefFlags.SetFlag(CI_PEACE);
+ else if (option.equals_ci("persist"))
+ this->CSDefFlags.SetFlag(CI_PERSIST);
+ }
+ }
+
+ if (!BSDefaults.empty())
+ {
+ spacesepstream options(BSDefaults);
+ Anope::string option;
+ while (options.GetToken(option))
+ {
+ if (option.equals_ci("dontkickops"))
+ this->BSDefFlags.SetFlag(BS_DONTKICKOPS);
+ else if (option.equals_ci("dontkickvoices"))
+ this->BSDefFlags.SetFlag(BS_DONTKICKVOICES);
+ else if (option.equals_ci("greet"))
+ this->BSDefFlags.SetFlag(BS_GREET);
+ else if (option.equals_ci("fantasy"))
+ this->BSDefFlags.SetFlag(BS_FANTASY);
+ else if (option.equals_ci("symbiosis"))
+ this->BSDefFlags.SetFlag(BS_SYMBIOSIS);
+ }
+ }
+
+ this->WallOper = this->WallBadOS = this->WallOSGlobal = this->WallOSMode = this->WallOSClearmodes = this->WallOSKick = this->WallOSAkill = this->WallOSSNLine = this->WallOSSQLine =
+ this->WallOSSZLine = this->WallOSNoOp = this->WallOSJupe = this->WallAkillExpire = this->WallSNLineExpire = this->WallSQLineExpire = this->WallSZLineExpire = this->WallExceptionExpire =
+ this->WallGetpass = this->WallSetpass = this->WallForbid = this->WallDrop = false;
+ if (!OSNotifications.empty())
+ {
+ spacesepstream notifications(OSNotifications);
+ Anope::string notice;
+ while (notifications.GetToken(notice))
+ {
+ if (notice.equals_ci("oper"))
+ this->WallOper = true;
+ else if (notice.equals_ci("bados"))
+ this->WallBadOS = true;
+ else if (notice.equals_ci("osglobal"))
+ this->WallOSGlobal = true;
+ else if (notice.equals_ci("osmode"))
+ this->WallOSMode = true;
+ else if (notice.equals_ci("osclearmodes"))
+ this->WallOSClearmodes = true;
+ else if (notice.equals_ci("oskick"))
+ this->WallOSKick = true;
+ else if (notice.equals_ci("osakill"))
+ this->WallOSAkill = true;
+ else if (notice.equals_ci("ossnline"))
+ this->WallOSSNLine = true;
+ else if (notice.equals_ci("ossqline"))
+ this->WallOSSQLine = true;
+ else if (notice.equals_ci("osszline"))
+ this->WallOSSZLine = true;
+ else if (notice.equals_ci("osnoop"))
+ this->WallOSNoOp = true;
+ else if (notice.equals_ci("osjupe"))
+ this->WallOSJupe = true;
+ else if (notice.equals_ci("akillexpire"))
+ this->WallAkillExpire = true;
+ else if (notice.equals_ci("snlineexpire"))
+ this->WallSNLineExpire = true;
+ else if (notice.equals_ci("sqlineexpire"))
+ this->WallSQLineExpire = true;
+ else if (notice.equals_ci("szlineexpire"))
+ this->WallSZLineExpire = true;
+ else if (notice.equals_ci("exceptionexpire"))
+ this->WallExceptionExpire = true;
+ else if (notice.equals_ci("getpass"))
+ this->WallGetpass = true;
+ else if (notice.equals_ci("setpass"))
+ this->WallSetpass = true;
+ else if (notice.equals_ci("forbid"))
+ this->WallForbid = true;
+ else if (notice.equals_ci("drop"))
+ this->WallDrop = true;
+ }
+ }
+
+ /* Ulines */
+ if (!UlineServers.empty())
+ {
+ this->Ulines.clear();
+
+ spacesepstream ulines(UlineServers);
+ Anope::string uline;
+ while (ulines.GetToken(uline))
+ this->Ulines.push_back(uline);
+ }
+
+ /* Modules Autoload building... :P */
+ this->ModulesAutoLoad = BuildStringList(Modules);
+ this->EncModuleList = BuildStringList(EncModules);
+ this->DBModuleList = BuildStringList(DBModules);
+ this->HostServCoreModules = BuildStringList(HostCoreModules);
+ this->MemoServCoreModules = BuildStringList(MemoCoreModules);
+ this->BotServCoreModules = BuildStringList(BotCoreModules);
+ this->OperServCoreModules = BuildStringList(OperCoreModules);
+ this->ChanServCoreModules = BuildStringList(ChanCoreModules);
+ this->NickServCoreModules = BuildStringList(NickCoreModules);
+
+ if (this->LimitSessions)
+ {
+ if (this->MaxSessionKill && !this->SessionAutoKillExpiry)
+ this->SessionAutoKillExpiry = 1800; /* 30 minutes */
+ }
+
+ if (!this->s_BotServ.empty())
+ {
+ if (this->BSFantasyCharacter.empty())
+ this->BSFantasyCharacter = "!";
+ if (this->BSFantasyCharacter.length() > 1)
+ printf("*** this->BSFantasyCharacter is more than 1 character long. Only the first\n*** character ('%c') will be used. The others will be ignored.\n", this->BSFantasyCharacter[0]);
+ }
+
+ /* Check the user keys */
+ if (this->UserKey1 == this->UserKey2 || this->UserKey1 == this->UserKey3 || this->UserKey3 == this->UserKey2)
+ Alog() << "Every UserKey must be different. It's for YOUR safety! Remember that!";
+
+ /**
+ * Check all DEFCON dependiencies...
+ **/
+ if (this->DefConLevel)
+ {
+ /* Build DefCon's */
+ DefCon.resize(6);
+ DefCon[5].reset();
+ for (unsigned int level = 1; level < 5; ++level)
+ {
+ DefCon[level] = 0;
+ Anope::string *levelDefinition = NULL;
+ switch (level)
+ {
+ case 1:
+ levelDefinition = &DefCon1;
+ break;
+ case 2:
+ levelDefinition = &DefCon2;
+ break;
+ case 3:
+ levelDefinition = &DefCon3;
+ break;
+ case 4:
+ levelDefinition = &DefCon4;
+ }
+ spacesepstream operations(*levelDefinition);
+ Anope::string operation;
+ while (operations.GetToken(operation))
+ {
+ if (operation.equals_ci("nonewchannels"))
+ AddDefCon(level, DEFCON_NO_NEW_CHANNELS);
+ else if (operation.equals_ci("nonewnicks"))
+ AddDefCon(level, DEFCON_NO_NEW_NICKS);
+ else if (operation.equals_ci("nomlockchanges"))
+ AddDefCon(level, DEFCON_NO_MLOCK_CHANGE);
+ else if (operation.equals_ci("forcechanmodes"))
+ AddDefCon(level, DEFCON_FORCE_CHAN_MODES);
+ else if (operation.equals_ci("reducedsessions"))
+ AddDefCon(level, DEFCON_REDUCE_SESSION);
+ else if (operation.equals_ci("nonewclients"))
+ AddDefCon(level, DEFCON_NO_NEW_CLIENTS);
+ else if (operation.equals_ci("operonly"))
+ AddDefCon(level, DEFCON_OPER_ONLY);
+ else if (operation.equals_ci("silentoperonly"))
+ AddDefCon(level, DEFCON_SILENT_OPER_ONLY);
+ else if (operation.equals_ci("akillnewclients"))
+ AddDefCon(level, DEFCON_AKILL_NEW_CLIENTS);
+ else if (operation.equals_ci("nonewmemos"))
+ AddDefCon(level, DEFCON_NO_NEW_MEMOS);
+ }
+ }
+
+ /* Check any defcon needed settings */
+ for (int defconCount = 1; defconCount <= 5; ++defconCount)
+ {
+ if (CheckDefCon(defconCount, DEFCON_REDUCE_SESSION))
+ {
+ if (!this->DefConSessionLimit)
+ {
+ throw ConfigException("this->DefConSessionLimit missing");
+ }
+ }
+ if (CheckDefCon(defconCount, DEFCON_AKILL_NEW_CLIENTS))
+ {
+ if (!this->DefConAKILL)
+ {
+ throw ConfigException("this->DefConAKILL missing");
+ }
+ if (this->DefConAkillReason.empty())
+ {
+ throw ConfigException("this->DefConAkillReason missing");
+ }
+ }
+ if (CheckDefCon(defconCount, DEFCON_FORCE_CHAN_MODES))
+ {
+ if (this->DefConChanModes.empty())
+ {
+ throw ConfigException("this->DefConChanModes missing");
+ }
+ }
+ }
+ }
+
+ SetDefaultMLock(this);
+
+ /* Disable the log channel if its defined in the conf, but not enabled */
+ if (this->LogChannel.empty() && LogChan)
+ LogChan = false;
}
bool ServerConfig::CheckOnce(const Anope::string &tag)
@@ -171,9 +476,9 @@ bool ValidateNotZero(ServerConfig *, const Anope::string &tag, const Anope::stri
return true;
}
-bool ValidateEmailReg(ServerConfig *, const Anope::string &tag, const Anope::string &value, ValueItem &data)
+bool ValidateEmailReg(ServerConfig *config, const Anope::string &tag, const Anope::string &value, ValueItem &data)
{
- if (Config.NSEmailReg)
+ if (config->NSEmailReg)
{
if (value.equals_ci("preregexpire"))
{
@@ -224,9 +529,9 @@ bool ValidateBantype(ServerConfig *, const Anope::string &, const Anope::string
return true;
}
-bool ValidateBotServ(ServerConfig *, const Anope::string &tag, const Anope::string &value, ValueItem &data)
+bool ValidateBotServ(ServerConfig *config, const Anope::string &tag, const Anope::string &value, ValueItem &data)
{
- if (!Config.s_BotServ.empty())
+ if (!config->s_BotServ.empty())
{
if (value.equals_ci("description"))
{
@@ -247,9 +552,9 @@ bool ValidateBotServ(ServerConfig *, const Anope::string &tag, const Anope::stri
return true;
}
-bool ValidateHostServ(ServerConfig *, const Anope::string &tag, const Anope::string &value, ValueItem &data)
+bool ValidateHostServ(ServerConfig *config, const Anope::string &tag, const Anope::string &value, ValueItem &data)
{
- if (!Config.s_HostServ.empty())
+ if (!config->s_HostServ.empty())
{
if (value.equals_ci("description"))
{
@@ -260,9 +565,9 @@ bool ValidateHostServ(ServerConfig *, const Anope::string &tag, const Anope::str
return true;
}
-bool ValidateLimitSessions(ServerConfig *, const Anope::string &tag, const Anope::string &value, ValueItem &data)
+bool ValidateLimitSessions(ServerConfig *config, const Anope::string &tag, const Anope::string &value, ValueItem &data)
{
- if (Config.LimitSessions)
+ if (config->LimitSessions)
{
if (value.equals_ci("maxsessionlimit") || value.equals_ci("exceptionexpiry"))
{
@@ -273,7 +578,7 @@ bool ValidateLimitSessions(ServerConfig *, const Anope::string &tag, const Anope
return true;
}
-bool ValidateDefCon(ServerConfig *, const Anope::string &tag, const Anope::string &value, ValueItem &data)
+bool ValidateDefCon(ServerConfig *config, const Anope::string &tag, const Anope::string &value, ValueItem &data)
{
if (value.equals_ci("defaultlevel"))
{
@@ -283,14 +588,14 @@ bool ValidateDefCon(ServerConfig *, const Anope::string &tag, const Anope::strin
if (level > 5)
throw ConfigException("The value for <defcon:defaultlevel> must be between 1 through 5 if you wish to use DefCon or 0 if you wish to disable it!");
}
- else if (Config.DefConLevel)
+ else if (config->DefConLevel)
{
if ((value.substr(0, 5).equals_ci("level") && isdigit(value[5])) || value.equals_ci("chanmodes") || value.equals_ci("akillreason"))
{
if (data.GetValue().empty())
throw ConfigException("The value for <" + tag + ":" + value + "> cannot be empty when DefCon is enabled!");
}
- else if (value.equals_ci("message") && Config.GlobalOnDefconMore)
+ else if (value.equals_ci("message") && config->GlobalOnDefconMore)
{
if (data.GetValue().empty())
throw ConfigException("The value for <defcon:message> cannot be empty when globalondefconmore is enabled!");
@@ -321,9 +626,9 @@ bool ValidateNickLen(ServerConfig *, const Anope::string &, const Anope::string
return true;
}
-bool ValidateMail(ServerConfig *, const Anope::string &tag, const Anope::string &value, ValueItem &data)
+bool ValidateMail(ServerConfig *config, const Anope::string &tag, const Anope::string &value, ValueItem &data)
{
- if (Config.UseMail)
+ if (config->UseMail)
{
if (value.equals_ci("sendmailpath") || value.equals_ci("sendfrom"))
{
@@ -334,88 +639,69 @@ bool ValidateMail(ServerConfig *, const Anope::string &tag, const Anope::string
return true;
}
-bool ValidateGlobalOnCycle(ServerConfig *, const Anope::string &tag, const Anope::string &value, ValueItem &data)
+bool ValidateGlobalOnCycle(ServerConfig *config, const Anope::string &tag, const Anope::string &value, ValueItem &data)
{
- if (Config.GlobalOnCycle)
+ if (config->GlobalOnCycle)
{
if (data.GetValue().empty())
{
Alog() << "<" << tag << ":" << value << "> was undefined, disabling <options:globaloncycle>";
- Config.GlobalOnCycle = false;
+ config->GlobalOnCycle = false;
}
}
return true;
}
-void ServerConfig::ReportConfigError(const Anope::string &errormessage, bool bail)
-{
- Alog() << "There were errors in your configuration file: " << errormessage;
- if (bail)
- {
- // TODO -- Need a way to stop loading in a safe way -- CyberBotX
- //ServerInstance->Exit(EXIT_STATUS_CONFIG);
- }
-}
-
-bool InitUplinks(ServerConfig *, const Anope::string &, bool bail)
+bool InitUplinks(ServerConfig *config, const Anope::string &)
{
- // If bail is false, we were reloading, don't clear anything
- if (!bail)
- return true;
- if (!Config.Uplinks.empty())
+ if (!config->Uplinks.empty())
{
- std::list<Uplink *>::iterator curr_uplink = Config.Uplinks.begin(), end_uplink = Config.Uplinks.end();
+ std::list<Uplink *>::iterator curr_uplink = config->Uplinks.begin(), end_uplink = config->Uplinks.end();
for (; curr_uplink != end_uplink; ++curr_uplink)
delete *curr_uplink;
}
- Config.Uplinks.clear();
+ config->Uplinks.clear();
return true;
}
-bool DoUplink(ServerConfig *conf, const Anope::string &, const Anope::string *, ValueList &values, int *, bool bail)
+bool DoUplink(ServerConfig *config, const Anope::string &, const Anope::string *, ValueList &values, int *)
{
- // If bail is false, we were reloading, don't even try to add another uplink
- if (!bail)
- return true;
// Validation variables
Anope::string host = values[0].GetValue(), password = values[3].GetValue();
int port = values[2].GetInteger();
bool ipv6 = values[1].GetBool();
ValueItem vi_host(host), vi_port(port), vi_password(password);
// Validate the host to make sure it is not empty
- if (!ValidateNotEmpty(conf, "uplink", "host", vi_host))
+ if (!ValidateNotEmpty(config, "uplink", "host", vi_host))
throw ConfigException("One or more values in your configuration file failed to validate. Please see your log for more information.");
// Validate the port to make sure it is a valid port
- if (!ValidatePort(conf, "uplink", "port", vi_port))
+ if (!ValidatePort(config, "uplink", "port", vi_port))
throw ConfigException("One or more values in your configuration file failed to validate. Please see your log for more information.");
// Validate the password to make sure it is not empty
- if (!ValidateNotEmpty(conf, "uplink", "password", vi_password))
+ if (!ValidateNotEmpty(config, "uplink", "password", vi_password))
throw ConfigException("One or more values in your configuration file failed to validate. Please see your log for more information.");
// If we get here, all the values are valid, we'll add it to the Uplinks list
- Config.Uplinks.push_back(new Uplink(host, port, password, ipv6));
+ config->Uplinks.push_back(new Uplink(host, port, password, ipv6));
return true;
}
-bool DoneUplinks(ServerConfig *, const Anope::string &, bool bail)
+bool DoneUplinks(ServerConfig *config, const Anope::string &)
{
- // If bail is false, we were reloading, ignore this check
- if (!bail)
- return true;
- if (Config.Uplinks.empty())
+ if (config->Uplinks.empty())
throw ConfigException("You must define at least one uplink block!");
return true;
}
-static bool InitOperTypes(ServerConfig *, const Anope::string &, bool)
+static bool InitOperTypes(ServerConfig *config, const Anope::string &)
{
- for (std::list<OperType *>::iterator it = Config.MyOperTypes.begin(), it_end = Config.MyOperTypes.end(); it != it_end; ++it)
+ for (std::list<OperType *>::iterator it = config->MyOperTypes.begin(), it_end = config->MyOperTypes.end(); it != it_end; ++it)
delete *it;
- Config.MyOperTypes.clear();
+ config->MyOperTypes.clear();
return true;
}
-static bool DoOperType(ServerConfig *conf, const Anope::string &, const Anope::string *, ValueList &values, int *, bool)
+static bool DoOperType(ServerConfig *config, const Anope::string &, const Anope::string *, ValueList &values, int *)
{
Anope::string name = values[0].GetValue();
Anope::string inherits = values[1].GetValue();
@@ -423,7 +709,7 @@ static bool DoOperType(ServerConfig *conf, const Anope::string &, const Anope::s
Anope::string privs = values[3].GetValue();
ValueItem vi(name);
- if (!ValidateNotEmpty(conf, "opertype", "name", vi))
+ if (!ValidateNotEmpty(config, "opertype", "name", vi))
throw ConfigException("One or more values in your configuration file failed to validate. Please see your log for more information.");
OperType *ot = new OperType(name);
@@ -443,7 +729,7 @@ static bool DoOperType(ServerConfig *conf, const Anope::string &, const Anope::s
/* Strip leading ' ' after , */
if (tok.length() > 1 && tok[0] == ' ')
tok.erase(tok.begin());
- for (std::list<OperType *>::iterator it = Config.MyOperTypes.begin(), it_end = Config.MyOperTypes.end(); it != it_end; ++it)
+ for (std::list<OperType *>::iterator it = config->MyOperTypes.begin(), it_end = config->MyOperTypes.end(); it != it_end; ++it)
{
if ((*it)->GetName().equals_ci(tok))
{
@@ -454,47 +740,47 @@ static bool DoOperType(ServerConfig *conf, const Anope::string &, const Anope::s
}
}
- Config.MyOperTypes.push_back(ot);
+ config->MyOperTypes.push_back(ot);
return true;
}
-static bool DoneOperTypes(ServerConfig *, const Anope::string &, bool)
+static bool DoneOperTypes(ServerConfig *, const Anope::string &)
{
return true;
}
/*************************************************************************/
-static bool InitOpers(ServerConfig *, const Anope::string &, bool)
+static bool InitOpers(ServerConfig *config, const Anope::string &)
{
for (nickcore_map::const_iterator it = NickCoreList.begin(), it_end = NickCoreList.end(); it != it_end; ++it)
it->second->ot = NULL;
- Config.Opers.clear();
+ config->Opers.clear();
return true;
}
-static bool DoOper(ServerConfig *conf, const Anope::string &, const Anope::string *, ValueList &values, int *, bool)
+static bool DoOper(ServerConfig *config, const Anope::string &, const Anope::string *, ValueList &values, int *)
{
Anope::string name = values[0].GetValue();
Anope::string type = values[1].GetValue();
ValueItem vi(name);
- if (!ValidateNotEmpty(conf, "oper", "name", vi))
+ if (!ValidateNotEmpty(config, "oper", "name", vi))
throw ConfigException("One or more values in your configuration file failed to validate. Please see your log for more information.");
ValueItem vi2(type);
- if (!ValidateNotEmpty(conf, "oper", "type", vi2))
+ if (!ValidateNotEmpty(config, "oper", "type", vi2))
throw ConfigException("One or more values in your configuration file failed to validate. Please see your log for more information.");
- Config.Opers.push_back(std::make_pair(name, type));
+ config->Opers.push_back(std::make_pair(name, type));
return true;
}
-static bool DoneOpers(ServerConfig *, const Anope::string &, bool)
+static bool DoneOpers(ServerConfig *config, const Anope::string &)
{
- for (std::list<std::pair<Anope::string, Anope::string> >::iterator it = Config.Opers.begin(), it_end = Config.Opers.end(); it != it_end; ++it)
+ for (std::list<std::pair<Anope::string, Anope::string> >::iterator it = config->Opers.begin(), it_end = config->Opers.end(); it != it_end; ++it)
{
Anope::string nick = it->first, type = it->second;
@@ -504,10 +790,9 @@ static bool DoneOpers(ServerConfig *, const Anope::string &, bool)
continue;
if (!na->nc)
- // Nick with no core (wtf?)
- abort();
+ throw CoreException("Nick with no core?");
- for (std::list<OperType *>::iterator tit = Config.MyOperTypes.begin(), tit_end = Config.MyOperTypes.end(); tit != tit_end; ++tit)
+ for (std::list<OperType *>::iterator tit = config->MyOperTypes.begin(), tit_end = config->MyOperTypes.end(); tit != tit_end; ++tit)
{
OperType *ot = *tit;
if (ot->GetName().equals_ci(type))
@@ -522,13 +807,13 @@ static bool DoneOpers(ServerConfig *, const Anope::string &, bool)
/*************************************************************************/
-bool InitModules(ServerConfig *, const Anope::string &, bool)
+bool InitModules(ServerConfig *, const Anope::string &)
{
Modules.clear();
return true;
}
-bool DoModule(ServerConfig *conf, const Anope::string &, const Anope::string *, ValueList &values, int *, bool)
+bool DoModule(ServerConfig *conf, const Anope::string &, const Anope::string *, ValueList &values, int *)
{
// First we validate that there was a name in the module block
Anope::string module = values[0].GetValue();
@@ -543,12 +828,12 @@ bool DoModule(ServerConfig *conf, const Anope::string &, const Anope::string *,
return true;
}
-bool DoneModules(ServerConfig *, const Anope::string &, bool)
+bool DoneModules(ServerConfig *, const Anope::string &)
{
return true;
}
-int ServerConfig::Read(bool bail)
+void ServerConfig::Read()
{
errstr.clear();
// These tags MUST occur and must ONLY occur once in the config file
@@ -608,164 +893,164 @@ int ServerConfig::Read(bool bail)
*
* We may need to add some other validation functions to handle certain things, we can handle that later.
* Any questions about these, w00t, feel free to ask. */
- {"serverinfo", "name", "", new ValueContainerString(&Config.ServerName), DT_HOSTNAME | DT_NORELOAD, ValidateNotEmpty},
- {"serverinfo", "description", "", new ValueContainerString(&Config.ServerDesc), DT_STRING | DT_NORELOAD, ValidateNotEmpty},
- {"serverinfo", "localhost", "", new ValueContainerString(&Config.LocalHost), DT_HOSTNAME | DT_NORELOAD, NoValidation},
- {"serverinfo", "type", "", new ValueContainerString(&Config.IRCDModule), DT_STRING | DT_NORELOAD, ValidateNotEmpty},
- {"serverinfo", "id", "", new ValueContainerString(&Config.Numeric), DT_NOSPACES | DT_NORELOAD, NoValidation},
- {"serverinfo", "ident", "", new ValueContainerString(&Config.ServiceUser), DT_STRING | DT_NORELOAD, ValidateNotEmpty},
- {"serverinfo", "hostname", "", new ValueContainerString(&Config.ServiceHost), DT_STRING | DT_NORELOAD, ValidateNotEmpty},
- {"serverinfo", "pid", "services.pid", new ValueContainerString(&Config.PIDFilename), DT_STRING | DT_NORELOAD, ValidateNotEmpty},
- {"serverinfo", "motd", "services.motd", new ValueContainerString(&Config.MOTDFilename), DT_STRING, ValidateNotEmpty},
- {"networkinfo", "logchannel", "", new ValueContainerString(&Config.LogChannel), DT_STRING, NoValidation},
- {"networkinfo", "logbot", "no", new ValueContainerBool(&Config.LogBot), DT_BOOLEAN, NoValidation},
- {"networkinfo", "networkname", "", new ValueContainerString(&Config.NetworkName), DT_STRING, ValidateNotEmpty},
- {"networkinfo", "nicklen", "0", new ValueContainerUInt(&Config.NickLen), DT_UINTEGER | DT_NORELOAD, ValidateNickLen},
- {"networkinfo", "userlen", "10", new ValueContainerUInt(&Config.UserLen), DT_UINTEGER | DT_NORELOAD, NoValidation},
- {"networkinfo", "hostlen", "64", new ValueContainerUInt(&Config.HostLen), DT_UINTEGER | DT_NORELOAD, NoValidation},
+ {"serverinfo", "name", "", new ValueContainerString(&this->ServerName), DT_HOSTNAME | DT_NORELOAD, ValidateNotEmpty},
+ {"serverinfo", "description", "", new ValueContainerString(&this->ServerDesc), DT_STRING | DT_NORELOAD, ValidateNotEmpty},
+ {"serverinfo", "localhost", "", new ValueContainerString(&this->LocalHost), DT_HOSTNAME | DT_NORELOAD, NoValidation},
+ {"serverinfo", "type", "", new ValueContainerString(&this->IRCDModule), DT_STRING | DT_NORELOAD, ValidateNotEmpty},
+ {"serverinfo", "id", "", new ValueContainerString(&this->Numeric), DT_NOSPACES | DT_NORELOAD, NoValidation},
+ {"serverinfo", "ident", "", new ValueContainerString(&this->ServiceUser), DT_STRING | DT_NORELOAD, ValidateNotEmpty},
+ {"serverinfo", "hostname", "", new ValueContainerString(&this->ServiceHost), DT_STRING | DT_NORELOAD, ValidateNotEmpty},
+ {"serverinfo", "pid", "services.pid", new ValueContainerString(&this->PIDFilename), DT_STRING | DT_NORELOAD, ValidateNotEmpty},
+ {"serverinfo", "motd", "services.motd", new ValueContainerString(&this->MOTDFilename), DT_STRING, ValidateNotEmpty},
+ {"networkinfo", "logchannel", "", new ValueContainerString(&this->LogChannel), DT_STRING, NoValidation},
+ {"networkinfo", "logbot", "no", new ValueContainerBool(&this->LogBot), DT_BOOLEAN, NoValidation},
+ {"networkinfo", "networkname", "", new ValueContainerString(&this->NetworkName), DT_STRING, ValidateNotEmpty},
+ {"networkinfo", "nicklen", "0", new ValueContainerUInt(&this->NickLen), DT_UINTEGER | DT_NORELOAD, ValidateNickLen},
+ {"networkinfo", "userlen", "10", new ValueContainerUInt(&this->UserLen), DT_UINTEGER | DT_NORELOAD, NoValidation},
+ {"networkinfo", "hostlen", "64", new ValueContainerUInt(&this->HostLen), DT_UINTEGER | DT_NORELOAD, NoValidation},
{"options", "encryption", "", new ValueContainerString(&EncModules), DT_STRING | DT_NORELOAD, ValidateNotEmpty},
- {"options", "passlen", "32", new ValueContainerUInt(&Config.PassLen), DT_UINTEGER | DT_NORELOAD, NoValidation},
+ {"options", "passlen", "32", new ValueContainerUInt(&this->PassLen), DT_UINTEGER | DT_NORELOAD, NoValidation},
{"options", "database", "", new ValueContainerString(&DBModules), DT_STRING | DT_NORELOAD, ValidateNotEmpty},
- {"options", "socketengine", "", new ValueContainerString(&Config.SocketEngine), DT_STRING | DT_NORELOAD, ValidateNotEmpty},
- {"options", "userkey1", "0", new ValueContainerLUInt(&Config.UserKey1), DT_LUINTEGER, NoValidation},
- {"options", "userkey2", "0", new ValueContainerLUInt(&Config.UserKey2), DT_LUINTEGER, NoValidation},
- {"options", "userkey3", "0", new ValueContainerLUInt(&Config.UserKey3), DT_LUINTEGER, NoValidation},
- {"options", "nobackupokay", "no", new ValueContainerBool(&Config.NoBackupOkay), DT_BOOLEAN, NoValidation},
- {"options", "strictpasswords", "no", new ValueContainerBool(&Config.StrictPasswords), DT_BOOLEAN, NoValidation},
- {"options", "badpasslimit", "0", new ValueContainerUInt(&Config.BadPassLimit), DT_UINTEGER, NoValidation},
- {"options", "badpasstimeout", "0", new ValueContainerTime(&Config.BadPassTimeout), DT_TIME, NoValidation},
- {"options", "updatetimeout", "0", new ValueContainerTime(&Config.UpdateTimeout), DT_TIME, ValidateNotZero},
- {"options", "expiretimeout", "0", new ValueContainerTime(&Config.ExpireTimeout), DT_TIME, ValidateNotZero},
- {"options", "readtimeout", "0", new ValueContainerTime(&Config.ReadTimeout), DT_TIME, ValidateNotZero},
- {"options", "warningtimeout", "0", new ValueContainerTime(&Config.WarningTimeout), DT_TIME, ValidateNotZero},
- {"options", "timeoutcheck", "0", new ValueContainerTime(&Config.TimeoutCheck), DT_TIME, NoValidation},
- {"options", "keeplogs", "0", new ValueContainerInt(&Config.KeepLogs), DT_INTEGER, NoValidation},
- {"options", "keepbackups", "0", new ValueContainerInt(&Config.KeepBackups), DT_INTEGER, NoValidation},
- {"options", "forceforbidreason", "no", new ValueContainerBool(&Config.ForceForbidReason), DT_BOOLEAN, NoValidation},
- {"options", "useprivmsg", "no", new ValueContainerBool(&Config.UsePrivmsg), DT_BOOLEAN, NoValidation},
- {"options", "usestrictprivmsg", "no", new ValueContainerBool(&Config.UseStrictPrivMsg), DT_BOOLEAN, NoValidation},
- {"options", "dumpcore", "yes", new ValueContainerBool(&Config.DumpCore), DT_BOOLEAN | DT_NORELOAD, NoValidation},
- {"options", "logusers", "no", new ValueContainerBool(&Config.LogUsers), DT_BOOLEAN, NoValidation},
- {"options", "hidestatso", "no", new ValueContainerBool(&Config.HideStatsO), DT_BOOLEAN, NoValidation},
- {"options", "globaloncycle", "no", new ValueContainerBool(&Config.GlobalOnCycle), DT_BOOLEAN, NoValidation},
- {"options", "globaloncycledown", "", new ValueContainerString(&Config.GlobalOnCycleMessage), DT_STRING, ValidateGlobalOnCycle},
- {"options", "globaloncycleup", "", new ValueContainerString(&Config.GlobalOnCycleUP), DT_STRING, ValidateGlobalOnCycle},
- {"options", "anonymousglobal", "no", new ValueContainerBool(&Config.AnonymousGlobal), DT_BOOLEAN, NoValidation},
- {"options", "nickregdelay", "0", new ValueContainerUInt(&Config.NickRegDelay), DT_UINTEGER, NoValidation},
- {"options", "restrictopernicks", "no", new ValueContainerBool(&Config.RestrictOperNicks), DT_BOOLEAN, NoValidation},
- {"options", "newscount", "3", new ValueContainerUInt(&Config.NewsCount), DT_UINTEGER, NoValidation},
+ {"options", "socketengine", "", new ValueContainerString(&this->SocketEngine), DT_STRING | DT_NORELOAD, ValidateNotEmpty},
+ {"options", "userkey1", "0", new ValueContainerLUInt(&this->UserKey1), DT_LUINTEGER, NoValidation},
+ {"options", "userkey2", "0", new ValueContainerLUInt(&this->UserKey2), DT_LUINTEGER, NoValidation},
+ {"options", "userkey3", "0", new ValueContainerLUInt(&this->UserKey3), DT_LUINTEGER, NoValidation},
+ {"options", "nobackupokay", "no", new ValueContainerBool(&this->NoBackupOkay), DT_BOOLEAN, NoValidation},
+ {"options", "strictpasswords", "no", new ValueContainerBool(&this->StrictPasswords), DT_BOOLEAN, NoValidation},
+ {"options", "badpasslimit", "0", new ValueContainerUInt(&this->BadPassLimit), DT_UINTEGER, NoValidation},
+ {"options", "badpasstimeout", "0", new ValueContainerTime(&this->BadPassTimeout), DT_TIME, NoValidation},
+ {"options", "updatetimeout", "0", new ValueContainerTime(&this->UpdateTimeout), DT_TIME, ValidateNotZero},
+ {"options", "expiretimeout", "0", new ValueContainerTime(&this->ExpireTimeout), DT_TIME, ValidateNotZero},
+ {"options", "readtimeout", "0", new ValueContainerTime(&this->ReadTimeout), DT_TIME, ValidateNotZero},
+ {"options", "warningtimeout", "0", new ValueContainerTime(&this->WarningTimeout), DT_TIME, ValidateNotZero},
+ {"options", "timeoutcheck", "0", new ValueContainerTime(&this->TimeoutCheck), DT_TIME, NoValidation},
+ {"options", "keeplogs", "0", new ValueContainerInt(&this->KeepLogs), DT_INTEGER, NoValidation},
+ {"options", "keepbackups", "0", new ValueContainerInt(&this->KeepBackups), DT_INTEGER, NoValidation},
+ {"options", "forceforbidreason", "no", new ValueContainerBool(&this->ForceForbidReason), DT_BOOLEAN, NoValidation},
+ {"options", "useprivmsg", "no", new ValueContainerBool(&this->UsePrivmsg), DT_BOOLEAN, NoValidation},
+ {"options", "usestrictprivmsg", "no", new ValueContainerBool(&this->UseStrictPrivMsg), DT_BOOLEAN, NoValidation},
+ {"options", "dumpcore", "yes", new ValueContainerBool(&this->DumpCore), DT_BOOLEAN | DT_NORELOAD, NoValidation},
+ {"options", "logusers", "no", new ValueContainerBool(&this->LogUsers), DT_BOOLEAN, NoValidation},
+ {"options", "hidestatso", "no", new ValueContainerBool(&this->HideStatsO), DT_BOOLEAN, NoValidation},
+ {"options", "globaloncycle", "no", new ValueContainerBool(&this->GlobalOnCycle), DT_BOOLEAN, NoValidation},
+ {"options", "globaloncycledown", "", new ValueContainerString(&this->GlobalOnCycleMessage), DT_STRING, ValidateGlobalOnCycle},
+ {"options", "globaloncycleup", "", new ValueContainerString(&this->GlobalOnCycleUP), DT_STRING, ValidateGlobalOnCycle},
+ {"options", "anonymousglobal", "no", new ValueContainerBool(&this->AnonymousGlobal), DT_BOOLEAN, NoValidation},
+ {"options", "nickregdelay", "0", new ValueContainerUInt(&this->NickRegDelay), DT_UINTEGER, NoValidation},
+ {"options", "restrictopernicks", "no", new ValueContainerBool(&this->RestrictOperNicks), DT_BOOLEAN, NoValidation},
+ {"options", "newscount", "3", new ValueContainerUInt(&this->NewsCount), DT_UINTEGER, NoValidation},
{"options", "ulineservers", "", new ValueContainerString(&UlineServers), DT_STRING, NoValidation},
{"options", "enablelogchannel", "no", new ValueContainerBool(&LogChan), DT_BOOLEAN, NoValidation},
- {"options", "mlock", "+nrt", new ValueContainerString(&Config.MLock), DT_STRING, NoValidation},
- {"options", "botmodes", "", new ValueContainerString(&Config.BotModes), DT_STRING, NoValidation},
- {"options", "maxretries", "10", new ValueContainerUInt(&Config.MaxRetries), DT_UINTEGER, NoValidation},
- {"options", "retrywait", "60", new ValueContainerInt(&Config.RetryWait), DT_INTEGER, ValidateNotZero},
- {"options", "hideprivilegedcommands", "no", new ValueContainerBool(&Config.HidePrivilegedCommands), DT_BOOLEAN, ValidateEmailReg},
- {"nickserv", "nick", "NickServ", new ValueContainerString(&Config.s_NickServ), DT_STRING | DT_NORELOAD, ValidateNotEmpty},
- {"nickserv", "description", "Nickname Registration Service", new ValueContainerString(&Config.desc_NickServ), DT_STRING | DT_NORELOAD, ValidateNotEmpty},
- {"nickserv", "emailregistration", "no", new ValueContainerBool(&Config.NSEmailReg), DT_BOOLEAN, NoValidation},
+ {"options", "mlock", "+nrt", new ValueContainerString(&this->MLock), DT_STRING, NoValidation},
+ {"options", "botmodes", "", new ValueContainerString(&this->BotModes), DT_STRING, NoValidation},
+ {"options", "maxretries", "10", new ValueContainerUInt(&this->MaxRetries), DT_UINTEGER, NoValidation},
+ {"options", "retrywait", "60", new ValueContainerInt(&this->RetryWait), DT_INTEGER, ValidateNotZero},
+ {"options", "hideprivilegedcommands", "no", new ValueContainerBool(&this->HidePrivilegedCommands), DT_BOOLEAN, NoValidation},
+ {"nickserv", "nick", "NickServ", new ValueContainerString(&this->s_NickServ), DT_STRING | DT_NORELOAD, ValidateNotEmpty},
+ {"nickserv", "description", "Nickname Registration Service", new ValueContainerString(&this->desc_NickServ), DT_STRING | DT_NORELOAD, ValidateNotEmpty},
+ {"nickserv", "emailregistration", "no", new ValueContainerBool(&this->NSEmailReg), DT_BOOLEAN, NoValidation},
{"nickserv", "modules", "", new ValueContainerString(&NickCoreModules), DT_STRING, NoValidation},
- {"nickserv", "forceemail", "no", new ValueContainerBool(&Config.NSForceEmail), DT_BOOLEAN, ValidateEmailReg},
+ {"nickserv", "forceemail", "no", new ValueContainerBool(&this->NSForceEmail), DT_BOOLEAN, ValidateEmailReg},
{"nickserv", "defaults", "secure memosignon memoreceive", new ValueContainerString(&NSDefaults), DT_STRING, NoValidation},
- {"nickserv", "defaultlanguage", "0", new ValueContainerUInt(&Config.NSDefLanguage), DT_UINTEGER, ValidateLanguage},
- {"nickserv", "regdelay", "0", new ValueContainerTime(&Config.NSRegDelay), DT_TIME, NoValidation},
- {"nickserv", "resenddelay", "0", new ValueContainerTime(&Config.NSResendDelay), DT_TIME, NoValidation},
- {"nickserv", "expire", "21d", new ValueContainerTime(&Config.NSExpire), DT_TIME, NoValidation},
- {"nickserv", "preregexpire", "0", new ValueContainerTime(&Config.NSRExpire), DT_TIME, ValidateEmailReg},
- {"nickserv", "maxaliases", "0", new ValueContainerInt(&Config.NSMaxAliases), DT_INTEGER, NoValidation},
- {"nickserv", "accessmax", "0", new ValueContainerUInt(&Config.NSAccessMax), DT_UINTEGER, ValidateNotZero},
+ {"nickserv", "defaultlanguage", "0", new ValueContainerUInt(&this->NSDefLanguage), DT_UINTEGER, ValidateLanguage},
+ {"nickserv", "regdelay", "0", new ValueContainerTime(&this->NSRegDelay), DT_TIME, NoValidation},
+ {"nickserv", "resenddelay", "0", new ValueContainerTime(&this->NSResendDelay), DT_TIME, NoValidation},
+ {"nickserv", "expire", "21d", new ValueContainerTime(&this->NSExpire), DT_TIME, NoValidation},
+ {"nickserv", "preregexpire", "0", new ValueContainerTime(&this->NSRExpire), DT_TIME, ValidateEmailReg},
+ {"nickserv", "maxaliases", "0", new ValueContainerInt(&this->NSMaxAliases), DT_INTEGER, NoValidation},
+ {"nickserv", "accessmax", "0", new ValueContainerUInt(&this->NSAccessMax), DT_UINTEGER, ValidateNotZero},
{"nickserv", "enforceruser", "", new ValueContainerString(&temp_nsuserhost), DT_STRING, ValidateNotEmpty},
- {"nickserv", "releasetimeout", "0", new ValueContainerTime(&Config.NSReleaseTimeout), DT_TIME, ValidateNotZero},
- {"nickserv", "allowkillimmed", "no", new ValueContainerBool(&Config.NSAllowKillImmed), DT_BOOLEAN | DT_NORELOAD, NoValidation},
- {"nickserv", "nogroupchange", "no", new ValueContainerBool(&Config.NSNoGroupChange), DT_BOOLEAN, NoValidation},
- {"nickserv", "listopersonly", "no", new ValueContainerBool(&Config.NSListOpersOnly), DT_BOOLEAN, NoValidation},
- {"nickserv", "listmax", "0", new ValueContainerUInt(&Config.NSListMax), DT_UINTEGER, ValidateNotZero},
- {"nickserv", "guestnickprefix", "", new ValueContainerString(&Config.NSGuestNickPrefix), DT_STRING, ValidateGuestPrefix},
- {"nickserv", "secureadmins", "no", new ValueContainerBool(&Config.NSSecureAdmins), DT_BOOLEAN, NoValidation},
- {"nickserv", "strictprivileges", "no", new ValueContainerBool(&Config.NSStrictPrivileges), DT_BOOLEAN, NoValidation},
- {"nickserv", "modeonid", "no", new ValueContainerBool(&Config.NSModeOnID), DT_BOOLEAN, NoValidation},
- {"nickserv", "addaccessonreg", "no", new ValueContainerBool(&Config.NSAddAccessOnReg), DT_BOOLEAN, NoValidation},
- {"mail", "usemail", "no", new ValueContainerBool(&Config.UseMail), DT_BOOLEAN, ValidateEmailReg},
- {"mail", "sendmailpath", "", new ValueContainerString(&Config.SendMailPath), DT_STRING, ValidateMail},
- {"mail", "sendfrom", "", new ValueContainerString(&Config.SendFrom), DT_STRING, ValidateMail},
- {"mail", "restrict", "no", new ValueContainerBool(&Config.RestrictMail), DT_BOOLEAN, NoValidation},
- {"mail", "delay", "0", new ValueContainerTime(&Config.MailDelay), DT_TIME, NoValidation},
- {"mail", "dontquoteaddresses", "no", new ValueContainerBool(&Config.DontQuoteAddresses), DT_BOOLEAN, NoValidation},
- {"chanserv", "nick", "ChanServ", new ValueContainerString(&Config.s_ChanServ), DT_STRING | DT_NORELOAD, ValidateNotEmpty},
- {"chanserv", "description", "Channel Registration Service", new ValueContainerString(&Config.desc_ChanServ), DT_STRING | DT_NORELOAD, ValidateNotEmpty},
+ {"nickserv", "releasetimeout", "0", new ValueContainerTime(&this->NSReleaseTimeout), DT_TIME, ValidateNotZero},
+ {"nickserv", "allowkillimmed", "no", new ValueContainerBool(&this->NSAllowKillImmed), DT_BOOLEAN | DT_NORELOAD, NoValidation},
+ {"nickserv", "nogroupchange", "no", new ValueContainerBool(&this->NSNoGroupChange), DT_BOOLEAN, NoValidation},
+ {"nickserv", "listopersonly", "no", new ValueContainerBool(&this->NSListOpersOnly), DT_BOOLEAN, NoValidation},
+ {"nickserv", "listmax", "0", new ValueContainerUInt(&this->NSListMax), DT_UINTEGER, ValidateNotZero},
+ {"nickserv", "guestnickprefix", "", new ValueContainerString(&this->NSGuestNickPrefix), DT_STRING, ValidateGuestPrefix},
+ {"nickserv", "secureadmins", "no", new ValueContainerBool(&this->NSSecureAdmins), DT_BOOLEAN, NoValidation},
+ {"nickserv", "strictprivileges", "no", new ValueContainerBool(&this->NSStrictPrivileges), DT_BOOLEAN, NoValidation},
+ {"nickserv", "modeonid", "no", new ValueContainerBool(&this->NSModeOnID), DT_BOOLEAN, NoValidation},
+ {"nickserv", "addaccessonreg", "no", new ValueContainerBool(&this->NSAddAccessOnReg), DT_BOOLEAN, NoValidation},
+ {"mail", "usemail", "no", new ValueContainerBool(&this->UseMail), DT_BOOLEAN, ValidateEmailReg},
+ {"mail", "sendmailpath", "", new ValueContainerString(&this->SendMailPath), DT_STRING, ValidateMail},
+ {"mail", "sendfrom", "", new ValueContainerString(&this->SendFrom), DT_STRING, ValidateMail},
+ {"mail", "restrict", "no", new ValueContainerBool(&this->RestrictMail), DT_BOOLEAN, NoValidation},
+ {"mail", "delay", "0", new ValueContainerTime(&this->MailDelay), DT_TIME, NoValidation},
+ {"mail", "dontquoteaddresses", "no", new ValueContainerBool(&this->DontQuoteAddresses), DT_BOOLEAN, NoValidation},
+ {"chanserv", "nick", "ChanServ", new ValueContainerString(&this->s_ChanServ), DT_STRING | DT_NORELOAD, ValidateNotEmpty},
+ {"chanserv", "description", "Channel Registration Service", new ValueContainerString(&this->desc_ChanServ), DT_STRING | DT_NORELOAD, ValidateNotEmpty},
{"chanserv", "modules", "", new ValueContainerString(&ChanCoreModules), DT_STRING, NoValidation},
{"chanserv", "defaults", "keeptopic secure securefounder signkick", new ValueContainerString(&CSDefaults), DT_STRING, NoValidation},
- {"chanserv", "maxregistered", "0", new ValueContainerUInt(&Config.CSMaxReg), DT_UINTEGER, NoValidation},
- {"chanserv", "expire", "14d", new ValueContainerTime(&Config.CSExpire), DT_TIME, NoValidation},
- {"chanserv", "defbantype", "2", new ValueContainerInt(&Config.CSDefBantype), DT_INTEGER, ValidateBantype},
- {"chanserv", "accessmax", "0", new ValueContainerUInt(&Config.CSAccessMax), DT_UINTEGER, ValidateNotZero},
- {"chanserv", "autokickmax", "0", new ValueContainerUInt(&Config.CSAutokickMax), DT_UINTEGER, ValidateNotZero},
- {"chanserv", "autokickreason", "User has been banned from the channel", new ValueContainerString(&Config.CSAutokickReason), DT_STRING, ValidateNotEmpty},
- {"chanserv", "inhabit", "0", new ValueContainerTime(&Config.CSInhabit), DT_TIME, ValidateNotZero},
- {"chanserv", "listopersonly", "no", new ValueContainerBool(&Config.CSListOpersOnly), DT_BOOLEAN, NoValidation},
- {"chanserv", "listmax", "0", new ValueContainerUInt(&Config.CSListMax), DT_UINTEGER, ValidateNotZero},
- {"chanserv", "opersonly", "no", new ValueContainerBool(&Config.CSOpersOnly), DT_BOOLEAN, NoValidation},
- {"memoserv", "nick", "MemoServ", new ValueContainerString(&Config.s_MemoServ), DT_STRING | DT_NORELOAD, ValidateNotEmpty},
- {"memoserv", "description", "Memo Service", new ValueContainerString(&Config.desc_MemoServ), DT_STRING | DT_NORELOAD, ValidateNotEmpty},
+ {"chanserv", "maxregistered", "0", new ValueContainerUInt(&this->CSMaxReg), DT_UINTEGER, NoValidation},
+ {"chanserv", "expire", "14d", new ValueContainerTime(&this->CSExpire), DT_TIME, NoValidation},
+ {"chanserv", "defbantype", "2", new ValueContainerInt(&this->CSDefBantype), DT_INTEGER, ValidateBantype},
+ {"chanserv", "accessmax", "0", new ValueContainerUInt(&this->CSAccessMax), DT_UINTEGER, ValidateNotZero},
+ {"chanserv", "autokickmax", "0", new ValueContainerUInt(&this->CSAutokickMax), DT_UINTEGER, ValidateNotZero},
+ {"chanserv", "autokickreason", "User has been banned from the channel", new ValueContainerString(&this->CSAutokickReason), DT_STRING, ValidateNotEmpty},
+ {"chanserv", "inhabit", "0", new ValueContainerTime(&this->CSInhabit), DT_TIME, ValidateNotZero},
+ {"chanserv", "listopersonly", "no", new ValueContainerBool(&this->CSListOpersOnly), DT_BOOLEAN, NoValidation},
+ {"chanserv", "listmax", "0", new ValueContainerUInt(&this->CSListMax), DT_UINTEGER, ValidateNotZero},
+ {"chanserv", "opersonly", "no", new ValueContainerBool(&this->CSOpersOnly), DT_BOOLEAN, NoValidation},
+ {"memoserv", "nick", "MemoServ", new ValueContainerString(&this->s_MemoServ), DT_STRING | DT_NORELOAD, ValidateNotEmpty},
+ {"memoserv", "description", "Memo Service", new ValueContainerString(&this->desc_MemoServ), DT_STRING | DT_NORELOAD, ValidateNotEmpty},
{"memoserv", "modules", "", new ValueContainerString(&MemoCoreModules), DT_STRING, NoValidation},
- {"memoserv", "maxmemos", "0", new ValueContainerUInt(&Config.MSMaxMemos), DT_UINTEGER, NoValidation},
- {"memoserv", "senddelay", "0", new ValueContainerTime(&Config.MSSendDelay), DT_TIME, NoValidation},
- {"memoserv", "notifyall", "no", new ValueContainerBool(&Config.MSNotifyAll), DT_BOOLEAN, NoValidation},
- {"memoserv", "memoreceipt", "0", new ValueContainerUInt(&Config.MSMemoReceipt), DT_UINTEGER, NoValidation},
- {"botserv", "nick", "", new ValueContainerString(&Config.s_BotServ), DT_STRING | DT_NORELOAD, NoValidation},
- {"botserv", "description", "Bot Service", new ValueContainerString(&Config.desc_BotServ), DT_STRING | DT_NORELOAD, ValidateBotServ},
+ {"memoserv", "maxmemos", "0", new ValueContainerUInt(&this->MSMaxMemos), DT_UINTEGER, NoValidation},
+ {"memoserv", "senddelay", "0", new ValueContainerTime(&this->MSSendDelay), DT_TIME, NoValidation},
+ {"memoserv", "notifyall", "no", new ValueContainerBool(&this->MSNotifyAll), DT_BOOLEAN, NoValidation},
+ {"memoserv", "memoreceipt", "0", new ValueContainerUInt(&this->MSMemoReceipt), DT_UINTEGER, NoValidation},
+ {"botserv", "nick", "", new ValueContainerString(&this->s_BotServ), DT_STRING | DT_NORELOAD, NoValidation},
+ {"botserv", "description", "Bot Service", new ValueContainerString(&this->desc_BotServ), DT_STRING | DT_NORELOAD, ValidateBotServ},
{"botserv", "modules", "", new ValueContainerString(&BotCoreModules), DT_STRING, NoValidation},
{"botserv", "defaults", "", new ValueContainerString(&BSDefaults), DT_STRING, NoValidation},
- {"botserv", "minusers", "0", new ValueContainerUInt(&Config.BSMinUsers), DT_UINTEGER, ValidateBotServ},
- {"botserv", "badwordsmax", "0", new ValueContainerUInt(&Config.BSBadWordsMax), DT_UINTEGER, ValidateBotServ},
- {"botserv", "keepdata", "0", new ValueContainerTime(&Config.BSKeepData), DT_TIME, ValidateBotServ},
- {"botserv", "smartjoin", "no", new ValueContainerBool(&Config.BSSmartJoin), DT_BOOLEAN, NoValidation},
- {"botserv", "gentlebadwordreason", "no", new ValueContainerBool(&Config.BSGentleBWReason), DT_BOOLEAN, NoValidation},
- {"botserv", "casesensitive", "no", new ValueContainerBool(&Config.BSCaseSensitive), DT_BOOLEAN, NoValidation},
- {"botserv", "fantasycharacter", "!", new ValueContainerString(&Config.BSFantasyCharacter), DT_STRING, NoValidation},
- {"hostserv", "nick", "", new ValueContainerString(&Config.s_HostServ), DT_STRING | DT_NORELOAD, NoValidation},
- {"hostserv", "description", "vHost Service", new ValueContainerString(&Config.desc_HostServ), DT_STRING | DT_NORELOAD, ValidateHostServ},
+ {"botserv", "minusers", "0", new ValueContainerUInt(&this->BSMinUsers), DT_UINTEGER, ValidateBotServ},
+ {"botserv", "badwordsmax", "0", new ValueContainerUInt(&this->BSBadWordsMax), DT_UINTEGER, ValidateBotServ},
+ {"botserv", "keepdata", "0", new ValueContainerTime(&this->BSKeepData), DT_TIME, ValidateBotServ},
+ {"botserv", "smartjoin", "no", new ValueContainerBool(&this->BSSmartJoin), DT_BOOLEAN, NoValidation},
+ {"botserv", "gentlebadwordreason", "no", new ValueContainerBool(&this->BSGentleBWReason), DT_BOOLEAN, NoValidation},
+ {"botserv", "casesensitive", "no", new ValueContainerBool(&this->BSCaseSensitive), DT_BOOLEAN, NoValidation},
+ {"botserv", "fantasycharacter", "!", new ValueContainerString(&this->BSFantasyCharacter), DT_STRING, NoValidation},
+ {"hostserv", "nick", "", new ValueContainerString(&this->s_HostServ), DT_STRING | DT_NORELOAD, NoValidation},
+ {"hostserv", "description", "vHost Service", new ValueContainerString(&this->desc_HostServ), DT_STRING | DT_NORELOAD, ValidateHostServ},
{"hostserv", "modules", "", new ValueContainerString(&HostCoreModules), DT_STRING, NoValidation},
- {"operserv", "nick", "OperServ", new ValueContainerString(&Config.s_OperServ), DT_STRING | DT_NORELOAD, ValidateNotEmpty},
- {"operserv", "description", "Operator Service", new ValueContainerString(&Config.desc_OperServ), DT_STRING | DT_NORELOAD, ValidateNotEmpty},
- {"operserv", "globalnick", "Global", new ValueContainerString(&Config.s_GlobalNoticer), DT_STRING | DT_NORELOAD, ValidateNotEmpty},
- {"operserv", "globaldescription", "Global Noticer", new ValueContainerString(&Config.desc_GlobalNoticer), DT_STRING | DT_NORELOAD, ValidateNotEmpty},
+ {"operserv", "nick", "OperServ", new ValueContainerString(&this->s_OperServ), DT_STRING | DT_NORELOAD, ValidateNotEmpty},
+ {"operserv", "description", "Operator Service", new ValueContainerString(&this->desc_OperServ), DT_STRING | DT_NORELOAD, ValidateNotEmpty},
+ {"operserv", "globalnick", "Global", new ValueContainerString(&this->s_GlobalNoticer), DT_STRING | DT_NORELOAD, ValidateNotEmpty},
+ {"operserv", "globaldescription", "Global Noticer", new ValueContainerString(&this->desc_GlobalNoticer), DT_STRING | DT_NORELOAD, ValidateNotEmpty},
{"operserv", "modules", "", new ValueContainerString(&OperCoreModules), DT_STRING, NoValidation},
- {"operserv", "superadmin", "no", new ValueContainerBool(&Config.SuperAdmin), DT_BOOLEAN, NoValidation},
- {"operserv", "logmaxusers", "no", new ValueContainerBool(&Config.LogMaxUsers), DT_BOOLEAN, NoValidation},
- {"operserv", "autokillexpiry", "0", new ValueContainerTime(&Config.AutokillExpiry), DT_TIME, ValidateNotZero},
- {"operserv", "chankillexpiry", "0", new ValueContainerTime(&Config.ChankillExpiry), DT_TIME, ValidateNotZero},
- {"operserv", "snlineexpiry", "0", new ValueContainerTime(&Config.SNLineExpiry), DT_TIME, ValidateNotZero},
- {"operserv", "sqlineexpiry", "0", new ValueContainerTime(&Config.SQLineExpiry), DT_TIME, ValidateNotZero},
- {"operserv", "szlineexpiry", "0", new ValueContainerTime(&Config.SZLineExpiry), DT_TIME, ValidateNotZero},
- {"operserv", "akillonadd", "no", new ValueContainerBool(&Config.AkillOnAdd), DT_BOOLEAN, NoValidation},
- {"operserv", "killonsnline", "no", new ValueContainerBool(&Config.KillonSNline), DT_BOOLEAN, NoValidation},
- {"operserv", "killonsqline", "no", new ValueContainerBool(&Config.KillonSQline), DT_BOOLEAN, NoValidation},
+ {"operserv", "superadmin", "no", new ValueContainerBool(&this->SuperAdmin), DT_BOOLEAN, NoValidation},
+ {"operserv", "logmaxusers", "no", new ValueContainerBool(&this->LogMaxUsers), DT_BOOLEAN, NoValidation},
+ {"operserv", "autokillexpiry", "0", new ValueContainerTime(&this->AutokillExpiry), DT_TIME, ValidateNotZero},
+ {"operserv", "chankillexpiry", "0", new ValueContainerTime(&this->ChankillExpiry), DT_TIME, ValidateNotZero},
+ {"operserv", "snlineexpiry", "0", new ValueContainerTime(&this->SNLineExpiry), DT_TIME, ValidateNotZero},
+ {"operserv", "sqlineexpiry", "0", new ValueContainerTime(&this->SQLineExpiry), DT_TIME, ValidateNotZero},
+ {"operserv", "szlineexpiry", "0", new ValueContainerTime(&this->SZLineExpiry), DT_TIME, ValidateNotZero},
+ {"operserv", "akillonadd", "no", new ValueContainerBool(&this->AkillOnAdd), DT_BOOLEAN, NoValidation},
+ {"operserv", "killonsnline", "no", new ValueContainerBool(&this->KillonSNline), DT_BOOLEAN, NoValidation},
+ {"operserv", "killonsqline", "no", new ValueContainerBool(&this->KillonSQline), DT_BOOLEAN, NoValidation},
{"operserv", "notifications", "", new ValueContainerString(&OSNotifications), DT_STRING, NoValidation},
- {"operserv", "limitsessions", "no", new ValueContainerBool(&Config.LimitSessions), DT_BOOLEAN, NoValidation},
- {"operserv", "defaultsessionlimit", "0", new ValueContainerUInt(&Config.DefSessionLimit), DT_UINTEGER, NoValidation},
- {"operserv", "maxsessionlimit", "0", new ValueContainerUInt(&Config.MaxSessionLimit), DT_UINTEGER, ValidateLimitSessions},
- {"operserv", "exceptionexpiry", "0", new ValueContainerTime(&Config.ExceptionExpiry), DT_TIME, ValidateLimitSessions},
- {"operserv", "sessionlimitexceeded", "", new ValueContainerString(&Config.SessionLimitExceeded), DT_STRING, NoValidation},
- {"operserv", "sessionlimitdetailsloc", "", new ValueContainerString(&Config.SessionLimitDetailsLoc), DT_STRING, NoValidation},
- {"operserv", "maxsessionkill", "0", new ValueContainerInt(&Config.MaxSessionKill), DT_INTEGER, NoValidation},
- {"operserv", "sessionautokillexpiry", "0", new ValueContainerTime(&Config.SessionAutoKillExpiry), DT_TIME, NoValidation},
- {"operserv", "addakiller", "no", new ValueContainerBool(&Config.AddAkiller), DT_BOOLEAN, NoValidation},
- {"operserv", "opersonly", "no", new ValueContainerBool(&Config.OSOpersOnly), DT_BOOLEAN, NoValidation},
+ {"operserv", "limitsessions", "no", new ValueContainerBool(&this->LimitSessions), DT_BOOLEAN, NoValidation},
+ {"operserv", "defaultsessionlimit", "0", new ValueContainerUInt(&this->DefSessionLimit), DT_UINTEGER, NoValidation},
+ {"operserv", "maxsessionlimit", "0", new ValueContainerUInt(&this->MaxSessionLimit), DT_UINTEGER, ValidateLimitSessions},
+ {"operserv", "exceptionexpiry", "0", new ValueContainerTime(&this->ExceptionExpiry), DT_TIME, ValidateLimitSessions},
+ {"operserv", "sessionlimitexceeded", "", new ValueContainerString(&this->SessionLimitExceeded), DT_STRING, NoValidation},
+ {"operserv", "sessionlimitdetailsloc", "", new ValueContainerString(&this->SessionLimitDetailsLoc), DT_STRING, NoValidation},
+ {"operserv", "maxsessionkill", "0", new ValueContainerInt(&this->MaxSessionKill), DT_INTEGER, NoValidation},
+ {"operserv", "sessionautokillexpiry", "0", new ValueContainerTime(&this->SessionAutoKillExpiry), DT_TIME, NoValidation},
+ {"operserv", "addakiller", "no", new ValueContainerBool(&this->AddAkiller), DT_BOOLEAN, NoValidation},
+ {"operserv", "opersonly", "no", new ValueContainerBool(&this->OSOpersOnly), DT_BOOLEAN, NoValidation},
{"defcon", "defaultlevel", "0", new ValueContainerInt(&DefConLevel), DT_INTEGER, ValidateDefCon},
{"defcon", "level4", "", new ValueContainerString(&DefCon4), DT_STRING, ValidateDefCon},
{"defcon", "level3", "", new ValueContainerString(&DefCon3), DT_STRING, ValidateDefCon},
{"defcon", "level2", "", new ValueContainerString(&DefCon2), DT_STRING, ValidateDefCon},
{"defcon", "level1", "", new ValueContainerString(&DefCon1), DT_STRING, ValidateDefCon},
- {"defcon", "sessionlimit", "0", new ValueContainerInt(&Config.DefConSessionLimit), DT_INTEGER, ValidateDefCon},
- {"defcon", "akillexpire", "0", new ValueContainerTime(&Config.DefConAKILL), DT_TIME, ValidateDefCon},
- {"defcon", "chanmodes", "", new ValueContainerString(&Config.DefConChanModes), DT_STRING, ValidateDefCon},
- {"defcon", "timeout", "0", new ValueContainerTime(&Config.DefConTimeOut), DT_TIME, NoValidation},
- {"defcon", "globalondefcon", "no", new ValueContainerBool(&Config.GlobalOnDefcon), DT_BOOLEAN, NoValidation},
- {"defcon", "globalondefconmore", "no", new ValueContainerBool(&Config.GlobalOnDefconMore), DT_BOOLEAN, NoValidation},
- {"defcon", "message", "", new ValueContainerString(&Config.DefconMessage), DT_STRING, ValidateDefCon},
- {"defcon", "offmessage", "", new ValueContainerString(&Config.DefConOffMessage), DT_STRING, NoValidation},
- {"defcon", "akillreason", "", new ValueContainerString(&Config.DefConAkillReason), DT_STRING, ValidateDefCon},
+ {"defcon", "sessionlimit", "0", new ValueContainerInt(&this->DefConSessionLimit), DT_INTEGER, ValidateDefCon},
+ {"defcon", "akillexpire", "0", new ValueContainerTime(&this->DefConAKILL), DT_TIME, ValidateDefCon},
+ {"defcon", "chanmodes", "", new ValueContainerString(&this->DefConChanModes), DT_STRING, ValidateDefCon},
+ {"defcon", "timeout", "0", new ValueContainerTime(&this->DefConTimeOut), DT_TIME, NoValidation},
+ {"defcon", "globalondefcon", "no", new ValueContainerBool(&this->GlobalOnDefcon), DT_BOOLEAN, NoValidation},
+ {"defcon", "globalondefconmore", "no", new ValueContainerBool(&this->GlobalOnDefconMore), DT_BOOLEAN, NoValidation},
+ {"defcon", "message", "", new ValueContainerString(&this->DefconMessage), DT_STRING, ValidateDefCon},
+ {"defcon", "offmessage", "", new ValueContainerString(&this->DefConOffMessage), DT_STRING, NoValidation},
+ {"defcon", "akillreason", "", new ValueContainerString(&this->DefConAkillReason), DT_STRING, ValidateDefCon},
{"", "", "", NULL, DT_NOTHING, NoValidation}
};
@@ -799,17 +1084,8 @@ int ServerConfig::Read(bool bail)
NULL, NULL, NULL}
};
- // Load and parse the config file, if there are any errors then explode
- // Make a copy here so if it fails then we can carry on running with an unaffected config
- newconfig.clear();
- if (LoadConf(newconfig, services_conf, errstr))
- // If we succeeded, set the config to the new one
- config_data = newconfig;
- else
- {
- ReportConfigError(errstr.str(), bail);
- return 0;
- }
+ if (!LoadConf(this->config_data, services_conf))
+ throw ConfigException(this->errstr.str());
/* This boolean is set to true when the Values array is completely iterated through, to avoid needing
* to do so inside the catch block to clean up the new'd values from the array. */
bool CheckedAllValues = false;
@@ -825,19 +1101,13 @@ int ServerConfig::Read(bool bail)
dt &= ~DT_ALLOW_NEWLINE;
dt &= ~DT_ALLOW_WILD;
dt &= ~DT_NORELOAD;
- // If the value is set to not allow reloading and we are reloading (bail will be false), skip the item
- if (noreload && !bail)
- {
- delete Values[Index].val;
- Values[Index].val = NULL;
- continue;
- }
- ConfValue(config_data, Values[Index].tag, Values[Index].value, Values[Index].default_value, 0, item, allow_newlines);
+ ConfigDataHash &hash = (noreload && Config ? Config->config_data : this->config_data);
+ ConfValue(hash, Values[Index].tag, Values[Index].value, Values[Index].default_value, 0, item, allow_newlines);
ValueItem vi(item);
if (!Values[Index].validation_function(this, Values[Index].tag, Values[Index].value, vi))
- throw ConfigException("One or more values in your configuration file failed to validate. Please see your ircd.log for more information.");
+ throw ConfigException("One or more values in your configuration file failed to validate. Please see your logfiles for more information.");
switch (dt)
{
@@ -935,7 +1205,7 @@ int ServerConfig::Read(bool bail)
* callbacks for these, a 'start', 'item' and 'end' callback. */
for (int Index = 0; !MultiValues[Index].tag.empty(); ++Index)
{
- MultiValues[Index].init_function(this, MultiValues[Index].tag, bail);
+ MultiValues[Index].init_function(this, MultiValues[Index].tag);
int number_of_tags = ConfValueEnum(config_data, MultiValues[Index].tag);
for (int tagnum = 0; tagnum < number_of_tags; ++tagnum)
{
@@ -948,15 +1218,14 @@ int ServerConfig::Read(bool bail)
dt &= ~DT_ALLOW_NEWLINE;
dt &= ~DT_ALLOW_WILD;
dt &= ~DT_NORELOAD;
- // If the value is set to not allow reloading and we are reloading (bail will be false), skip the item
- if (noreload && !bail)
- continue;
+
+ ConfigDataHash &hash = (noreload && Config ? Config->config_data : this->config_data);
switch (dt)
{
case DT_NOSPACES:
{
Anope::string item;
- if (ConfValue(config_data, MultiValues[Index].tag, MultiValues[Index].items[valuenum], MultiValues[Index].items_default[valuenum], tagnum, item, allow_newlines))
+ if (ConfValue(hash, MultiValues[Index].tag, MultiValues[Index].items[valuenum], MultiValues[Index].items_default[valuenum], tagnum, item, allow_newlines))
vl.push_back(ValueItem(item));
else
vl.push_back(ValueItem(""));
@@ -966,7 +1235,7 @@ int ServerConfig::Read(bool bail)
case DT_HOSTNAME:
{
Anope::string item;
- if (ConfValue(config_data, MultiValues[Index].tag, MultiValues[Index].items[valuenum], MultiValues[Index].items_default[valuenum], tagnum, item, allow_newlines))
+ if (ConfValue(hash, MultiValues[Index].tag, MultiValues[Index].items[valuenum], MultiValues[Index].items_default[valuenum], tagnum, item, allow_newlines))
vl.push_back(ValueItem(item));
else
vl.push_back(ValueItem(""));
@@ -976,7 +1245,7 @@ int ServerConfig::Read(bool bail)
case DT_IPADDRESS:
{
Anope::string item;
- if (ConfValue(config_data, MultiValues[Index].tag, MultiValues[Index].items[valuenum], MultiValues[Index].items_default[valuenum], tagnum, item, allow_newlines))
+ if (ConfValue(hash, MultiValues[Index].tag, MultiValues[Index].items[valuenum], MultiValues[Index].items_default[valuenum], tagnum, item, allow_newlines))
vl.push_back(ValueItem(item));
else
vl.push_back(ValueItem(""));
@@ -986,7 +1255,7 @@ int ServerConfig::Read(bool bail)
case DT_CHARPTR:
{
Anope::string item;
- if (ConfValue(config_data, MultiValues[Index].tag, MultiValues[Index].items[valuenum], MultiValues[Index].items_default[valuenum], tagnum, item, allow_newlines))
+ if (ConfValue(hash, MultiValues[Index].tag, MultiValues[Index].items[valuenum], MultiValues[Index].items_default[valuenum], tagnum, item, allow_newlines))
vl.push_back(ValueItem(item.c_str()));
else
vl.push_back(ValueItem(""));
@@ -995,7 +1264,7 @@ int ServerConfig::Read(bool bail)
case DT_CSSTRING:
{
Anope::string item;
- if (ConfValue(config_data, MultiValues[Index].tag, MultiValues[Index].items[valuenum], MultiValues[Index].items_default[valuenum], tagnum, item, allow_newlines))
+ if (ConfValue(hash, MultiValues[Index].tag, MultiValues[Index].items[valuenum], MultiValues[Index].items_default[valuenum], tagnum, item, allow_newlines))
vl.push_back(ValueItem(item));
else
vl.push_back(ValueItem(""));
@@ -1004,7 +1273,7 @@ int ServerConfig::Read(bool bail)
case DT_CISTRING:
{
Anope::string item;
- if (ConfValue(config_data, MultiValues[Index].tag, MultiValues[Index].items[valuenum], MultiValues[Index].items_default[valuenum], tagnum, item, allow_newlines))
+ if (ConfValue(hash, MultiValues[Index].tag, MultiValues[Index].items[valuenum], MultiValues[Index].items_default[valuenum], tagnum, item, allow_newlines))
vl.push_back(ValueItem(item));
else
vl.push_back(ValueItem(""));
@@ -1013,7 +1282,7 @@ int ServerConfig::Read(bool bail)
case DT_STRING:
{
Anope::string item;
- if (ConfValue(config_data, MultiValues[Index].tag, MultiValues[Index].items[valuenum], MultiValues[Index].items_default[valuenum], tagnum, item, allow_newlines))
+ if (ConfValue(hash, MultiValues[Index].tag, MultiValues[Index].items[valuenum], MultiValues[Index].items_default[valuenum], tagnum, item, allow_newlines))
vl.push_back(ValueItem(item));
else
vl.push_back(ValueItem(""));
@@ -1024,7 +1293,7 @@ int ServerConfig::Read(bool bail)
case DT_LUINTEGER:
{
int item = 0;
- if (ConfValueInteger(config_data, MultiValues[Index].tag, MultiValues[Index].items[valuenum], MultiValues[Index].items_default[valuenum], tagnum, item))
+ if (ConfValueInteger(hash, MultiValues[Index].tag, MultiValues[Index].items[valuenum], MultiValues[Index].items_default[valuenum], tagnum, item))
vl.push_back(ValueItem(item));
else
vl.push_back(ValueItem(0));
@@ -1033,7 +1302,7 @@ int ServerConfig::Read(bool bail)
case DT_TIME:
{
Anope::string item;
- if (ConfValue(config_data, MultiValues[Index].tag, MultiValues[Index].items[valuenum], MultiValues[Index].items_default[valuenum], tagnum, item, allow_newlines))
+ if (ConfValue(hash, MultiValues[Index].tag, MultiValues[Index].items[valuenum], MultiValues[Index].items_default[valuenum], tagnum, item, allow_newlines))
{
#ifdef _WIN32
long time = static_cast<long>(dotime(item));
@@ -1048,19 +1317,18 @@ int ServerConfig::Read(bool bail)
break;
case DT_BOOLEAN:
{
- bool item = ConfValueBool(config_data, MultiValues[Index].tag, MultiValues[Index].items[valuenum], MultiValues[Index].items_default[valuenum], tagnum);
+ bool item = ConfValueBool(hash, MultiValues[Index].tag, MultiValues[Index].items[valuenum], MultiValues[Index].items_default[valuenum], tagnum);
vl.push_back(ValueItem(item));
}
}
}
- MultiValues[Index].validation_function(this, MultiValues[Index].tag, MultiValues[Index].items, vl, MultiValues[Index].datatype, bail);
+ MultiValues[Index].validation_function(this, MultiValues[Index].tag, MultiValues[Index].items, vl, MultiValues[Index].datatype);
}
- MultiValues[Index].finish_function(this, MultiValues[Index].tag, bail);
+ MultiValues[Index].finish_function(this, MultiValues[Index].tag);
}
}
catch (const ConfigException &ce)
{
- ReportConfigError(ce.GetReason(), bail);
if (!CheckedAllValues)
{
for (int Index = 0; !Values[Index].tag.empty(); ++Index)
@@ -1069,17 +1337,15 @@ int ServerConfig::Read(bool bail)
delete Values[Index].val;
}
}
- return 0;
+ throw ConfigException(ce);
}
Alog(LOG_DEBUG) << "End config";
for (int Index = 0; !Once[Index].empty(); ++Index)
- if (!CheckOnce(Once[Index]))
- return 0;
+ CheckOnce(Once[Index]);
Alog() << "Done reading configuration file.";
- return 1;
}
-bool ServerConfig::LoadConf(ConfigDataHash &target, const Anope::string &filename, std::ostringstream &errorstream)
+bool ServerConfig::LoadConf(ConfigDataHash &target, const Anope::string &filename)
{
Anope::string line;
Anope::string section, wordbuffer, itemname;
@@ -1089,7 +1355,7 @@ bool ServerConfig::LoadConf(ConfigDataHash &target, const Anope::string &filenam
KeyValList sectiondata;
if (conf.fail())
{
- errorstream << "File " << filename << " could not be opened." << std::endl;
+ errstr << "File " << filename << " could not be opened." << std::endl;
return false;
}
Alog(LOG_DEBUG) << "Start to read conf " << filename;
@@ -1134,12 +1400,12 @@ bool ServerConfig::LoadConf(ConfigDataHash &target, const Anope::string &filenam
// Quotes are valid only in the value position
if (section.empty() || itemname.empty())
{
- errorstream << "Unexpected quoted string: " << filename << ":" << linenumber << std::endl;
+ errstr << "Unexpected quoted string: " << filename << ":" << linenumber << std::endl;
return false;
}
if (in_word || !wordbuffer.empty())
{
- errorstream << "Unexpected quoted string (prior unhandled words): " << filename << ":" << linenumber << std::endl;
+ errstr << "Unexpected quoted string (prior unhandled words): " << filename << ":" << linenumber << std::endl;
return false;
}
in_quote = in_word = true;
@@ -1149,12 +1415,12 @@ bool ServerConfig::LoadConf(ConfigDataHash &target, const Anope::string &filenam
{
if (section.empty())
{
- errorstream << "Config item outside of section (or stray '='): " << filename << ":" << linenumber << std::endl;
+ errstr << "Config item outside of section (or stray '='): " << filename << ":" << linenumber << std::endl;
return false;
}
if (!itemname.empty())
{
- errorstream << "Stray '=' sign or item without value: " << filename << ":" << linenumber << std::endl;
+ errstr << "Stray '=' sign or item without value: " << filename << ":" << linenumber << std::endl;
return false;
}
if (in_word)
@@ -1166,12 +1432,12 @@ bool ServerConfig::LoadConf(ConfigDataHash &target, const Anope::string &filenam
{
if (!section.empty())
{
- errorstream << "Section inside another section: " << filename << ":" << linenumber << std::endl;
+ errstr << "Section inside another section: " << filename << ":" << linenumber << std::endl;
return false;
}
if (wordbuffer.empty())
{
- errorstream << "Section without a name or unexpected '{': " << filename << ":" << linenumber << std::endl;
+ errstr << "Section without a name or unexpected '{': " << filename << ":" << linenumber << std::endl;
return false;
}
if (in_word)
@@ -1183,7 +1449,7 @@ bool ServerConfig::LoadConf(ConfigDataHash &target, const Anope::string &filenam
{
if (section.empty())
{
- errorstream << "Stray '}': " << filename << ":" << linenumber << std::endl;
+ errstr << "Stray '}': " << filename << ":" << linenumber << std::endl;
return false;
}
if (!wordbuffer.empty() || !itemname.empty())
@@ -1192,7 +1458,7 @@ bool ServerConfig::LoadConf(ConfigDataHash &target, const Anope::string &filenam
// but will not allow for anything else, such as: section { key = value; key = value }
if (!sectiondata.empty())
{
- errorstream << "Unexpected end of section: " << filename << ":" << linenumber << std::endl;
+ errstr << "Unexpected end of section: " << filename << ":" << linenumber << std::endl;
return false;
}
// this is the same as the below section for testing if itemname is non-empty after the loop, but done inside it to allow the above construct
@@ -1217,7 +1483,7 @@ bool ServerConfig::LoadConf(ConfigDataHash &target, const Anope::string &filenam
{
if (!in_word && !wordbuffer.empty())
{
- errorstream << "Unexpected word: " << filename << ":" << linenumber << std::endl;
+ errstr << "Unexpected word: " << filename << ":" << linenumber << std::endl;
return false;
}
wordbuffer += ch;
@@ -1235,7 +1501,7 @@ bool ServerConfig::LoadConf(ConfigDataHash &target, const Anope::string &filenam
{
if (wordbuffer.empty())
{
- errorstream << "Item without value: " << filename << ":" << linenumber << std::endl;
+ errstr << "Item without value: " << filename << ":" << linenumber << std::endl;
return false;
}
Alog(LOG_DEBUG) << "ln " << linenumber << " EOL: s='" << section << "' '" << itemname << "' set to '" << wordbuffer << "'";
@@ -1246,22 +1512,22 @@ bool ServerConfig::LoadConf(ConfigDataHash &target, const Anope::string &filenam
}
if (in_ml_comment)
{
- errorstream << "Unterminated multiline comment at end of file: " << filename << std::endl;
+ errstr << "Unterminated multiline comment at end of file: " << filename << std::endl;
return false;
}
if (in_quote)
{
- errorstream << "Unterminated quote at end of file: " << filename << std::endl;
+ errstr << "Unterminated quote at end of file: " << filename << std::endl;
return false;
}
if (!itemname.empty() || !wordbuffer.empty())
{
- errorstream << "Unexpected garbage at end of file: " << filename << std::endl;
+ errstr << "Unexpected garbage at end of file: " << filename << std::endl;
return false;
}
if (!section.empty())
{
- errorstream << "Unterminated section at end of file: " << filename << std::endl;
+ errstr << "Unterminated section at end of file: " << filename << std::endl;
return false;
}
return true;
@@ -1381,7 +1647,7 @@ bool ServerConfig::ConfValueBool(ConfigDataHash &target, const Anope::string &ta
return result.equals_ci("yes") || result.equals_ci("true") || result.equals_ci("1");
}
-int ServerConfig::ConfValueEnum(ConfigDataHash &target, const Anope::string &tag)
+int ServerConfig::ConfValueEnum(const ConfigDataHash &target, const Anope::string &tag)
{
return target.count(tag);
}
@@ -1476,377 +1742,4 @@ bool ValueItem::GetBool() const
return GetInteger() || v == "yes" || v == "true";
}
-/*************************************************************************/
-
-/* Print an error message to the log (and the console, if open). */
-
-void error(int linenum, const char *message, ...)
-{
- char buf[4096];
- va_list args;
-
- va_start(args, message);
- vsnprintf(buf, sizeof(buf), message, args);
- va_end(args);
-
- if (linenum)
- Alog() << services_conf << ":" << linenum << ": " << buf;
- else
- Alog() << services_conf << ": " << buf;
-
- if (!nofork && isatty(2))
- {
- if (linenum)
- fprintf(stderr, "%s:%d: %s\n", services_conf.c_str(), linenum, buf);
- else
- fprintf(stderr, "%s: %s\n", services_conf.c_str(), buf);
- }
-}
-
-/*************************************************************************/
-
-/* Read the entire configuration file. If an error occurs while reading
- * the file or a required directive is not found, print and log an
- * appropriate error message and return 0; otherwise, return 1.
- *
- * If reload is 1, will reload the configuration file.
- * --lara
- */
-
-int read_config(int reload)
-{
- int retval = 1;
- int defconCount = 0;
-
- retval = Config.Read(reload ? false : true);
- if (!retval)
- return 0; // Temporary until most of the below is modified to use the new parser -- CyberBotX
-
- if (!temp_nsuserhost.empty())
- {
- size_t at = temp_nsuserhost.find('@');
- if (at == Anope::string::npos)
- {
- Config.NSEnforcerUser = temp_nsuserhost;
- Config.NSEnforcerHost = Config.ServiceHost;
- }
- else
- {
- Config.NSEnforcerUser = temp_nsuserhost.substr(0, at);
- Config.NSEnforcerHost = temp_nsuserhost.substr(at + 1);
- }
- }
-
- if (NSDefaults.empty())
- {
- Config.NSDefFlags.SetFlag(NI_SECURE);
- Config.NSDefFlags.SetFlag(NI_MEMO_SIGNON);
- Config.NSDefFlags.SetFlag(NI_MEMO_RECEIVE);
- }
- else if (!NSDefaults.equals_ci("none"))
- {
- spacesepstream options(NSDefaults);
- Anope::string option;
- while (options.GetToken(option))
- {
- if (option.equals_ci("kill"))
- Config.NSDefFlags.SetFlag(NI_KILLPROTECT);
- else if (option.equals_ci("killquick"))
- Config.NSDefFlags.SetFlag(NI_KILL_QUICK);
- else if (option.equals_ci("secure"))
- Config.NSDefFlags.SetFlag(NI_SECURE);
- else if (option.equals_ci("private"))
- Config.NSDefFlags.SetFlag(NI_PRIVATE);
- else if (option.equals_ci("msg"))
- {
- if (!Config.UsePrivmsg)
- Alog() << "msg in <nickserv:defaults> can only be used when UsePrivmsg is set";
- else
- Config.NSDefFlags.SetFlag(NI_MSG);
- }
- else if (option.equals_ci("hideemail"))
- Config.NSDefFlags.SetFlag(NI_HIDE_EMAIL);
- else if (option.equals_ci("hideusermask"))
- Config.NSDefFlags.SetFlag(NI_HIDE_MASK);
- else if (option.equals_ci("hidequit"))
- Config.NSDefFlags.SetFlag(NI_HIDE_QUIT);
- else if (option.equals_ci("memosignon"))
- Config.NSDefFlags.SetFlag(NI_MEMO_SIGNON);
- else if (option.equals_ci("memoreceive"))
- Config.NSDefFlags.SetFlag(NI_MEMO_RECEIVE);
- else if (option.equals_ci("autoop"))
- Config.NSDefFlags.SetFlag(NI_AUTOOP);
- }
- }
-
- if (reload)
- {
- if ((Config.NSDefLanguage = langlist[Config.NSDefLanguage]) < 0)
- Config.NSDefLanguage = DEF_LANGUAGE;
- }
-
- if (Config.CSDefBantype < 0 || Config.CSDefBantype > 3)
- {
- error(0, "Value of CSDefBantype must be between 0 and 3 included");
- retval = 0;
- }
-
- if (CSDefaults.empty())
- {
- Config.CSDefFlags.SetFlag(CI_KEEPTOPIC);
- Config.CSDefFlags.SetFlag(CI_SECURE);
- Config.CSDefFlags.SetFlag(CI_SECUREFOUNDER);
- Config.CSDefFlags.SetFlag(CI_SIGNKICK);
- }
- else if (!CSDefaults.equals_ci("none"))
- {
- spacesepstream options(CSDefaults);
- Anope::string option;
- while (options.GetToken(option))
- {
- if (option.equals_ci("keeptopic"))
- Config.CSDefFlags.SetFlag(CI_KEEPTOPIC);
- else if (option.equals_ci("topiclock"))
- Config.CSDefFlags.SetFlag(CI_TOPICLOCK);
- else if (option.equals_ci("private"))
- Config.CSDefFlags.SetFlag(CI_PRIVATE);
- else if (option.equals_ci("restricted"))
- Config.CSDefFlags.SetFlag(CI_RESTRICTED);
- else if (option.equals_ci("secure"))
- Config.CSDefFlags.SetFlag(CI_SECURE);
- else if (option.equals_ci("secureops"))
- Config.CSDefFlags.SetFlag(CI_SECUREOPS);
- else if (option.equals_ci("securefounder"))
- Config.CSDefFlags.SetFlag(CI_SECUREFOUNDER);
- else if (option.equals_ci("signkick"))
- Config.CSDefFlags.SetFlag(CI_SIGNKICK);
- else if (option.equals_ci("signkicklevel"))
- Config.CSDefFlags.SetFlag(CI_SIGNKICK_LEVEL);
- else if (option.equals_ci("opnotice"))
- Config.CSDefFlags.SetFlag(CI_OPNOTICE);
- else if (option.equals_ci("xop"))
- Config.CSDefFlags.SetFlag(CI_XOP);
- else if (option.equals_ci("peace"))
- Config.CSDefFlags.SetFlag(CI_PEACE);
- else if (option.equals_ci("persist"))
- Config.CSDefFlags.SetFlag(CI_PERSIST);
- }
- }
-
- if (!BSDefaults.empty())
- {
- spacesepstream options(BSDefaults);
- Anope::string option;
- while (options.GetToken(option))
- {
- if (option.equals_ci("dontkickops"))
- Config.BSDefFlags.SetFlag(BS_DONTKICKOPS);
- else if (option.equals_ci("dontkickvoices"))
- Config.BSDefFlags.SetFlag(BS_DONTKICKVOICES);
- else if (option.equals_ci("greet"))
- Config.BSDefFlags.SetFlag(BS_GREET);
- else if (option.equals_ci("fantasy"))
- Config.BSDefFlags.SetFlag(BS_FANTASY);
- else if (option.equals_ci("symbiosis"))
- Config.BSDefFlags.SetFlag(BS_SYMBIOSIS);
- }
- }
- Config.WallOper = Config.WallBadOS = Config.WallOSGlobal = Config.WallOSMode = Config.WallOSClearmodes = Config.WallOSKick = Config.WallOSAkill = Config.WallOSSNLine = Config.WallOSSQLine =
- Config.WallOSSZLine = Config.WallOSNoOp = Config.WallOSJupe = Config.WallAkillExpire = Config.WallSNLineExpire = Config.WallSQLineExpire = Config.WallSZLineExpire = Config.WallExceptionExpire =
- Config.WallGetpass = Config.WallSetpass = Config.WallForbid = Config.WallDrop = false;
- if (!OSNotifications.empty())
- {
- spacesepstream notifications(OSNotifications);
- Anope::string notice;
- while (notifications.GetToken(notice))
- {
- if (notice.equals_ci("oper"))
- Config.WallOper = true;
- else if (notice.equals_ci("bados"))
- Config.WallBadOS = true;
- else if (notice.equals_ci("osglobal"))
- Config.WallOSGlobal = true;
- else if (notice.equals_ci("osmode"))
- Config.WallOSMode = true;
- else if (notice.equals_ci("osclearmodes"))
- Config.WallOSClearmodes = true;
- else if (notice.equals_ci("oskick"))
- Config.WallOSKick = true;
- else if (notice.equals_ci("osakill"))
- Config.WallOSAkill = true;
- else if (notice.equals_ci("ossnline"))
- Config.WallOSSNLine = true;
- else if (notice.equals_ci("ossqline"))
- Config.WallOSSQLine = true;
- else if (notice.equals_ci("osszline"))
- Config.WallOSSZLine = true;
- else if (notice.equals_ci("osnoop"))
- Config.WallOSNoOp = true;
- else if (notice.equals_ci("osjupe"))
- Config.WallOSJupe = true;
- else if (notice.equals_ci("akillexpire"))
- Config.WallAkillExpire = true;
- else if (notice.equals_ci("snlineexpire"))
- Config.WallSNLineExpire = true;
- else if (notice.equals_ci("sqlineexpire"))
- Config.WallSQLineExpire = true;
- else if (notice.equals_ci("szlineexpire"))
- Config.WallSZLineExpire = true;
- else if (notice.equals_ci("exceptionexpire"))
- Config.WallExceptionExpire = true;
- else if (notice.equals_ci("getpass"))
- Config.WallGetpass = true;
- else if (notice.equals_ci("setpass"))
- Config.WallSetpass = true;
- else if (notice.equals_ci("forbid"))
- Config.WallForbid = true;
- else if (notice.equals_ci("drop"))
- Config.WallDrop = true;
- }
- }
-
- /* Ulines */
- if (!UlineServers.empty())
- {
- Config.Ulines.clear();
-
- spacesepstream ulines(UlineServers);
- Anope::string uline;
- while (ulines.GetToken(uline))
- Config.Ulines.push_back(uline);
- }
-
- /* Modules Autoload building... :P */
- Config.ModulesAutoLoad = BuildStringList(Modules);
- Config.EncModuleList = BuildStringList(EncModules);
- Config.DBModuleList = BuildStringList(DBModules);
- Config.HostServCoreModules = BuildStringList(HostCoreModules);
- Config.MemoServCoreModules = BuildStringList(MemoCoreModules);
- Config.BotServCoreModules = BuildStringList(BotCoreModules);
- Config.OperServCoreModules = BuildStringList(OperCoreModules);
- Config.ChanServCoreModules = BuildStringList(ChanCoreModules);
- Config.NickServCoreModules = BuildStringList(NickCoreModules);
-
- if (Config.LimitSessions)
- {
- if (Config.MaxSessionKill && !Config.SessionAutoKillExpiry)
- Config.SessionAutoKillExpiry = 1800; /* 30 minutes */
- }
-
- if (!Config.s_BotServ.empty())
- {
- if (Config.BSFantasyCharacter.empty())
- Config.BSFantasyCharacter = "!";
- if (Config.BSFantasyCharacter.length() > 1)
- printf("*** Config.BSFantasyCharacter is more than 1 character long. Only the first\n*** character ('%c') will be used. The others will be ignored.\n", Config.BSFantasyCharacter[0]);
- }
-
- /* Check the user keys */
- if (Config.UserKey1 == Config.UserKey2 || Config.UserKey1 == Config.UserKey3 || Config.UserKey3 == Config.UserKey2)
- Alog() << "Every UserKey must be different. It's for YOUR safety! Remember that!";
-
- /**
- * Check all DEFCON dependiencies...
- **/
- if (Config.DefConLevel)
- {
- /* Build DefCon's */
- DefCon.resize(6);
- DefCon[5].reset();
- for (unsigned int level = 1; level < 5; ++level)
- {
- DefCon[level] = 0;
- Anope::string *levelDefinition = NULL;
- switch (level)
- {
- case 1:
- levelDefinition = &DefCon1;
- break;
- case 2:
- levelDefinition = &DefCon2;
- break;
- case 3:
- levelDefinition = &DefCon3;
- break;
- case 4:
- levelDefinition = &DefCon4;
- }
- spacesepstream operations(*levelDefinition);
- Anope::string operation;
- while (operations.GetToken(operation))
- {
- if (operation.equals_ci("nonewchannels"))
- AddDefCon(level, DEFCON_NO_NEW_CHANNELS);
- else if (operation.equals_ci("nonewnicks"))
- AddDefCon(level, DEFCON_NO_NEW_NICKS);
- else if (operation.equals_ci("nomlockchanges"))
- AddDefCon(level, DEFCON_NO_MLOCK_CHANGE);
- else if (operation.equals_ci("forcechanmodes"))
- AddDefCon(level, DEFCON_FORCE_CHAN_MODES);
- else if (operation.equals_ci("reducedsessions"))
- AddDefCon(level, DEFCON_REDUCE_SESSION);
- else if (operation.equals_ci("nonewclients"))
- AddDefCon(level, DEFCON_NO_NEW_CLIENTS);
- else if (operation.equals_ci("operonly"))
- AddDefCon(level, DEFCON_OPER_ONLY);
- else if (operation.equals_ci("silentoperonly"))
- AddDefCon(level, DEFCON_SILENT_OPER_ONLY);
- else if (operation.equals_ci("akillnewclients"))
- AddDefCon(level, DEFCON_AKILL_NEW_CLIENTS);
- else if (operation.equals_ci("nonewmemos"))
- AddDefCon(level, DEFCON_NO_NEW_MEMOS);
- }
- }
-
- /* Check any defcon needed settings */
- for (defconCount = 1; defconCount <= 5; ++defconCount)
- {
- if (CheckDefCon(defconCount, DEFCON_REDUCE_SESSION))
- {
- if (!Config.DefConSessionLimit)
- {
- error(0, "Config.DefConSessionLimit missing");
- retval = 0;
- }
- }
- if (CheckDefCon(defconCount, DEFCON_AKILL_NEW_CLIENTS))
- {
- if (!Config.DefConAKILL)
- {
- error(0, "Config.DefConAKILL missing");
- retval = 0;
- }
- if (Config.DefConAkillReason.empty())
- {
- error(0, "Config.DefConAkillReason missing");
- retval = 0;
- }
- }
- if (CheckDefCon(defconCount, DEFCON_FORCE_CHAN_MODES))
- {
- if (Config.DefConChanModes.empty())
- {
- error(0, "Config.DefConChanModes missing");
- retval = 0;
- }
- }
- }
- }
-
- SetDefaultMLock();
-
- /* Disable the log channel if its defined in the conf, but not enabled */
- if (Config.LogChannel.empty() && LogChan)
- LogChan = false;
-
- if (!retval)
- {
- printf("\n*** Support resources: Read through the services.conf self-contained \n*** documentation. Read the documentation files found in the 'docs' \n"
- "*** folder. Visit our portal located at http://www.anope.org/. Join \n*** our support channel on /server irc.anope.org channel #anope.\n\n");
- }
-
- return retval;
-}
-
-/*************************************************************************/
diff --git a/src/configreader.cpp b/src/configreader.cpp
index 6ba9453f7..90c999cf0 100644
--- a/src/configreader.cpp
+++ b/src/configreader.cpp
@@ -1,4 +1,16 @@
-/* +------------------------------------+
+/* Configuration file handling.
+ *
+ * (C) 2003-2010 Anope Team
+ * Contact us at team@anope.org
+ *
+ * Please read COPYING and README for further details.
+ *
+ * Based on the original code of Epona by Lara.
+ * Based on the original code of Services by Andy Church.
+ */
+
+/* Taken from:
+ * +------------------------------------+
* | Inspire Internet Relay Chat Daemon |
* +------------------------------------+
*
@@ -13,21 +25,16 @@
#include "services.h"
-ConfigReader::ConfigReader() : data(&Config.config_data), errorlog(new std::ostringstream(std::stringstream::in | std::stringstream::out)), privatehash(false), error(CONF_NO_ERROR)
+ConfigReader::ConfigReader() : error(CONF_NO_ERROR)
{
}
-ConfigReader::~ConfigReader()
+ConfigReader::ConfigReader(const Anope::string &filename) : error(CONF_NO_ERROR)
{
- if (this->errorlog)
- delete this->errorlog;
- if (this->privatehash)
- delete this->data;
}
-ConfigReader::ConfigReader(const Anope::string &filename) : data(new ConfigDataHash), errorlog(new std::ostringstream(std::stringstream::in | std::stringstream::out)), privatehash(true), error(CONF_NO_ERROR)
+ConfigReader::~ConfigReader()
{
- Config.ClearStack();
}
Anope::string ConfigReader::ReadValue(const Anope::string &tag, const Anope::string &name, const Anope::string &default_value, int index, bool allow_linefeeds)
@@ -35,7 +42,7 @@ Anope::string ConfigReader::ReadValue(const Anope::string &tag, const Anope::str
/* Don't need to strlcpy() tag and name anymore, ReadConf() takes const char* */
Anope::string result;
- if (!Config.ConfValue(*this->data, tag, name, default_value, index, result, allow_linefeeds))
+ if (!Config->ConfValue(Config->config_data, tag, name, default_value, index, result, allow_linefeeds))
this->error = CONF_VALUE_NOT_FOUND;
return result;
@@ -48,7 +55,7 @@ Anope::string ConfigReader::ReadValue(const Anope::string &tag, const Anope::str
bool ConfigReader::ReadFlag(const Anope::string &tag, const Anope::string &name, const Anope::string &default_value, int index)
{
- return Config.ConfValueBool(*this->data, tag, name, default_value, index);
+ return Config->ConfValueBool(Config->config_data, tag, name, default_value, index);
}
bool ConfigReader::ReadFlag(const Anope::string &tag, const Anope::string &name, int index)
@@ -60,7 +67,7 @@ int ConfigReader::ReadInteger(const Anope::string &tag, const Anope::string &nam
{
int result;
- if (!Config.ConfValueInteger(*this->data, tag, name, default_value, index, result))
+ if (!Config->ConfValueInteger(Config->config_data, tag, name, default_value, index, result))
{
this->error = CONF_VALUE_NOT_FOUND;
return 0;
@@ -87,19 +94,14 @@ long ConfigReader::GetError()
return olderr;
}
-void ConfigReader::DumpErrors(bool bail)
-{
- Config.ReportConfigError(this->errorlog->str(), bail);
-}
-
int ConfigReader::Enumerate(const Anope::string &tag) const
{
- return Config.ConfValueEnum(*this->data, tag);
+ return Config->ConfValueEnum(Config->config_data, tag);
}
int ConfigReader::EnumerateValues(const Anope::string &tag, int index)
{
- return Config.ConfVarEnum(*this->data, tag, index);
+ return Config->ConfVarEnum(Config->config_data, tag, index);
}
bool ConfigReader::Verify()
diff --git a/src/hostserv.cpp b/src/hostserv.cpp
index 86e0c5c85..31ff713f8 100644
--- a/src/hostserv.cpp
+++ b/src/hostserv.cpp
@@ -19,7 +19,7 @@ E void moduleAddHostServCmds();
void moduleAddHostServCmds()
{
- ModuleManager::LoadModuleList(Config.HostServCoreModules);
+ ModuleManager::LoadModuleList(Config->HostServCoreModules);
}
/*************************************************************************/
@@ -61,7 +61,7 @@ void get_hostserv_stats(long *nrec, long *memuse)
*/
void hostserv_init()
{
- if (!Config.s_HostServ.empty())
+ if (!Config->s_HostServ.empty())
moduleAddHostServCmds();
}
@@ -170,8 +170,8 @@ void do_on_id(User *u)
u->UpdateHost();
if (!na->hostinfo.GetIdent().empty())
- notice_lang(Config.s_HostServ, u, HOST_IDENT_ACTIVATED, na->hostinfo.GetIdent().c_str(), na->hostinfo.GetHost().c_str());
+ notice_lang(Config->s_HostServ, u, HOST_IDENT_ACTIVATED, na->hostinfo.GetIdent().c_str(), na->hostinfo.GetHost().c_str());
else
- notice_lang(Config.s_HostServ, u, HOST_ACTIVATED, na->hostinfo.GetHost().c_str());
+ notice_lang(Config->s_HostServ, u, HOST_ACTIVATED, na->hostinfo.GetHost().c_str());
}
}
diff --git a/src/init.cpp b/src/init.cpp
index e64a622d9..35407ec81 100644
--- a/src/init.cpp
+++ b/src/init.cpp
@@ -149,7 +149,7 @@ bool GetCommandLineArgument(const Anope::string &name, char shortname, Anope::st
static void remove_pidfile()
{
- remove(Config.PIDFilename.c_str());
+ remove(Config->PIDFilename.c_str());
}
/*************************************************************************/
@@ -160,7 +160,7 @@ static void write_pidfile()
{
FILE *pidfile;
- pidfile = fopen(Config.PIDFilename.c_str(), "w");
+ pidfile = fopen(Config->PIDFilename.c_str(), "w");
if (pidfile)
{
#ifdef _WIN32
@@ -172,7 +172,7 @@ static void write_pidfile()
atexit(remove_pidfile);
}
else
- log_perror("Warning: cannot write to PID file %s", Config.PIDFilename.c_str());
+ log_perror("Warning: cannot write to PID file %s", Config->PIDFilename.c_str());
}
/*************************************************************************/
@@ -311,15 +311,26 @@ int init_primary(int ac, char **av)
}
/* Read configuration file; exit if there are problems. */
- if (!read_config(0))
+ try
+ {
+ Config = new ServerConfig();
+ }
+ catch (const ConfigException &ex)
+ {
+ Alog(LOG_TERMINAL) << ex.GetReason();
+ Alog(LOG_TERMINAL) << "*** Support resources: Read through the services.conf self-contained";
+ Alog(LOG_TERMINAL) << "*** documentation. Read the documentation files found in the 'docs'";
+ Alog(LOG_TERMINAL) << "*** folder. Visit our portal located at http://www.anope.org/. Join";
+ Alog(LOG_TERMINAL) << "*** our support channel on /server irc.anope.org channel #anope.";
return -1;
+ }
/* Add IRCD Protocol Module; exit if there are errors */
if (protocol_module_init())
return -1;
/* Create me */
- Me = new Server(NULL, Config.ServerName, 0, Config.ServerDesc, Config.Numeric);
+ Me = new Server(NULL, Config->ServerName, 0, Config->ServerDesc, Config->Numeric);
/* First thing, add our core bots internally. Before modules are loaded and before the database is read
* This is used for modules adding commands and for the BotInfo* poiners in the command classes.
@@ -333,31 +344,31 @@ int init_primary(int ac, char **av)
* Note that it is important this is after loading the protocol module. The ircd struct must exist for
* the ts6_ functions
*/
- if (!Config.s_OperServ.empty())
- new BotInfo(Config.s_OperServ, Config.ServiceUser, Config.ServiceHost, Config.desc_OperServ);
- if (!Config.s_NickServ.empty())
- new BotInfo(Config.s_NickServ, Config.ServiceUser, Config.ServiceHost, Config.desc_NickServ);
- if (!Config.s_ChanServ.empty())
- new BotInfo(Config.s_ChanServ, Config.ServiceUser, Config.ServiceHost, Config.desc_ChanServ);
- if (!Config.s_HostServ.empty())
- new BotInfo(Config.s_HostServ, Config.ServiceUser, Config.ServiceHost, Config.desc_HostServ);
- if (!Config.s_MemoServ.empty())
- new BotInfo(Config.s_MemoServ, Config.ServiceUser, Config.ServiceHost, Config.desc_MemoServ);
- if (!Config.s_BotServ.empty())
- new BotInfo(Config.s_BotServ, Config.ServiceUser, Config.ServiceHost, Config.desc_BotServ);
- if (!Config.s_GlobalNoticer.empty())
- new BotInfo(Config.s_GlobalNoticer, Config.ServiceUser, Config.ServiceHost, Config.desc_GlobalNoticer);
+ if (!Config->s_OperServ.empty())
+ new BotInfo(Config->s_OperServ, Config->ServiceUser, Config->ServiceHost, Config->desc_OperServ);
+ if (!Config->s_NickServ.empty())
+ new BotInfo(Config->s_NickServ, Config->ServiceUser, Config->ServiceHost, Config->desc_NickServ);
+ if (!Config->s_ChanServ.empty())
+ new BotInfo(Config->s_ChanServ, Config->ServiceUser, Config->ServiceHost, Config->desc_ChanServ);
+ if (!Config->s_HostServ.empty())
+ new BotInfo(Config->s_HostServ, Config->ServiceUser, Config->ServiceHost, Config->desc_HostServ);
+ if (!Config->s_MemoServ.empty())
+ new BotInfo(Config->s_MemoServ, Config->ServiceUser, Config->ServiceHost, Config->desc_MemoServ);
+ if (!Config->s_BotServ.empty())
+ new BotInfo(Config->s_BotServ, Config->ServiceUser, Config->ServiceHost, Config->desc_BotServ);
+ if (!Config->s_GlobalNoticer.empty())
+ new BotInfo(Config->s_GlobalNoticer, Config->ServiceUser, Config->ServiceHost, Config->desc_GlobalNoticer);
/* Add Encryption Modules */
- ModuleManager::LoadModuleList(Config.EncModuleList);
+ ModuleManager::LoadModuleList(Config->EncModuleList);
/* Add Database Modules */
- ModuleManager::LoadModuleList(Config.DBModuleList);
+ ModuleManager::LoadModuleList(Config->DBModuleList);
/* Load the socket engine */
- if (ModuleManager::LoadModule(Config.SocketEngine, NULL))
+ if (ModuleManager::LoadModule(Config->SocketEngine, NULL))
{
- Alog(LOG_TERMINAL) << "Unable to load socket engine " << Config.SocketEngine;
+ Alog(LOG_TERMINAL) << "Unable to load socket engine " << Config->SocketEngine;
return -1;
}
@@ -448,7 +459,7 @@ int init_secondary(int ac, char **av)
/* load any custom modules */
if (!nothird)
- ModuleManager::LoadModuleList(Config.ModulesAutoLoad);
+ ModuleManager::LoadModuleList(Config->ModulesAutoLoad);
/* Initialize random number generator */
rand_init();
diff --git a/src/language.cpp b/src/language.cpp
index 6e9192756..32f96b461 100644
--- a/src/language.cpp
+++ b/src/language.cpp
@@ -168,7 +168,7 @@ void lang_sanitize()
{
len = strlen(langtexts[i][j]);
strscpy(tmp, langtexts[i][j], sizeof(tmp));
- if (Config.UseStrictPrivMsg)
+ if (Config->UseStrictPrivMsg)
strnrepl(tmp, sizeof(tmp), "%R", "/");
else
strnrepl(tmp, sizeof(tmp), "%R", "/msg ");
@@ -221,8 +221,8 @@ void lang_init()
/* Not what I intended to do, but these services are so archaïc
* that it's difficult to do more. */
- if ((Config.NSDefLanguage = langlist[Config.NSDefLanguage]) < 0)
- Config.NSDefLanguage = DEF_LANGUAGE;
+ if ((Config->NSDefLanguage = langlist[Config->NSDefLanguage]) < 0)
+ Config->NSDefLanguage = DEF_LANGUAGE;
if (!langtexts[DEF_LANGUAGE])
fatal("Unable to load default language");
@@ -247,7 +247,7 @@ void lang_init()
int strftime_lang(char *buf, int size, User *u, int format, struct tm *tm)
{
- int language = u && u->Account() ? u->Account()->language : Config.NSDefLanguage;
+ int language = u && u->Account() ? u->Account()->language : Config->NSDefLanguage;
char tmpbuf[BUFSIZE], buf2[BUFSIZE];
char *s;
int i, ret;
@@ -318,7 +318,7 @@ void syntax_error(const Anope::string &service, User *u, const Anope::string &co
const char *getstring(NickAlias *na, int index)
{
// Default to config
- int langidx = Config.NSDefLanguage;
+ int langidx = Config->NSDefLanguage;
// If they are registered (na->nc), and NOT forbidden
if (na && na->nc && !na->HasFlag(NS_FORBIDDEN))
@@ -330,7 +330,7 @@ const char *getstring(NickAlias *na, int index)
const char *getstring(const NickCore *nc, int index)
{
// Default to config
- int langidx = Config.NSDefLanguage;
+ int langidx = Config->NSDefLanguage;
if (nc)
langidx = nc->language;
@@ -346,7 +346,7 @@ const char *getstring(const User *u, int index)
const char *getstring(int index)
{
// Default to config
- int langidx = Config.NSDefLanguage;
+ int langidx = Config->NSDefLanguage;
return langtexts[langidx][index];
}
diff --git a/src/log.cpp b/src/log.cpp
index 9f5e05ebc..62fa29600 100644
--- a/src/log.cpp
+++ b/src/log.cpp
@@ -45,11 +45,11 @@ static void remove_log()
Anope::string name;
- if (!Config.KeepLogs)
+ if (!Config->KeepLogs)
return;
time(&t);
- t -= (60 * 60 * 24 * Config.KeepLogs);
+ t -= (60 * 60 * 24 * Config->KeepLogs);
tm = *localtime(&t);
/* removed if from here cause get_logchan is always 1 */
@@ -258,7 +258,7 @@ Alog::~Alog()
std::cout << tbuf << " " << buf.str() << std::endl;
else if (Level == LOG_TERMINAL) // XXX dont use this yet unless you know we're at terminal and not daemonized
std::cout << buf.str() << std::endl;
- if (!Config.LogChannel.empty() && LogChan && !debug && findchan(Config.LogChannel))
- ircdproto->SendPrivmsg(Global, Config.LogChannel, "%s", buf.str().c_str());
+ if (Config && !Config->LogChannel.empty() && LogChan && !debug && findchan(Config->LogChannel))
+ ircdproto->SendPrivmsg(Global, Config->LogChannel, "%s", buf.str().c_str());
errno = errno_save;
}
diff --git a/src/mail.cpp b/src/mail.cpp
index b5e2149f9..1cfdd6c09 100644
--- a/src/mail.cpp
+++ b/src/mail.cpp
@@ -11,13 +11,13 @@ MailThread::~MailThread()
void MailThread::Run()
{
- FILE *pipe = popen(Config.SendMailPath.c_str(), "w");
+ FILE *pipe = popen(Config->SendMailPath.c_str(), "w");
if (!pipe)
return;
- fprintf(pipe, "From: %s\n", Config.SendFrom.c_str());
- if (Config.DontQuoteAddresses)
+ fprintf(pipe, "From: %s\n", Config->SendFrom.c_str());
+ if (Config->DontQuoteAddresses)
fprintf(pipe, "To: %s <%s>\n", MailTo.c_str(), Addr.c_str());
else
fprintf(pipe, "To: \"%s\" <%s>\n", MailTo.c_str(), Addr.c_str());
@@ -37,9 +37,9 @@ bool Mail(User *u, NickRequest *nr, const Anope::string &service, const Anope::s
time_t t = time(NULL);
- if (!Config.UseMail)
+ if (!Config->UseMail)
notice_lang(service, u, MAIL_DISABLED);
- else if (t - u->lastmail < Config.MailDelay)
+ else if (t - u->lastmail < Config->MailDelay)
notice_lang(service, u, MAIL_DELAYED, t - u->lastmail);
else if (nr->email.empty())
notice_lang(service, u, MAIL_INVALID, nr->nick.c_str());
@@ -60,9 +60,9 @@ bool Mail(User *u, NickCore *nc, const Anope::string &service, const Anope::stri
time_t t = time(NULL);
- if (!Config.UseMail)
+ if (!Config->UseMail)
notice_lang(service, u, MAIL_DISABLED);
- else if (t - u->lastmail < Config.MailDelay)
+ else if (t - u->lastmail < Config->MailDelay)
notice_lang(service, u, MAIL_DELAYED, t - u->lastmail);
else if (nc->email.empty())
notice_lang(service, u, MAIL_INVALID, nc->display.c_str());
@@ -78,7 +78,7 @@ bool Mail(User *u, NickCore *nc, const Anope::string &service, const Anope::stri
bool Mail(NickCore *nc, const Anope::string &subject, const Anope::string &message)
{
- if (!Config.UseMail || !nc || nc->email.empty() || subject.empty() || message.empty())
+ if (!Config->UseMail || !nc || nc->email.empty() || subject.empty() || message.empty())
return false;
nc->lastmail = time(NULL);
diff --git a/src/main.cpp b/src/main.cpp
index 453dba91b..8132e9d1c 100644
--- a/src/main.cpp
+++ b/src/main.cpp
@@ -185,7 +185,7 @@ void do_restart_services()
if (!it->second->GetUID().empty())
UserListByUID.erase(it->second->GetUID());
}
- ircdproto->SendSquit(Config.ServerName, quitmsg);
+ ircdproto->SendSquit(Config->ServerName, quitmsg);
SocketEngine->Process();
delete UplinkSock;
close_log();
@@ -230,7 +230,7 @@ static void services_shutdown()
UserListByUID.erase(it->second->GetUID());
}
- ircdproto->SendSquit(Config.ServerName, quitmsg);
+ ircdproto->SendSquit(Config->ServerName, quitmsg);
while (!UserListByNick.empty())
delete UserListByNick.begin()->second;
@@ -268,13 +268,17 @@ void sighandler(int signum)
expire_all();
save_databases();
- if (!read_config(1))
+ try
{
- quitmsg = "Error Reading Configuration File (Received SIGHUP)";
- quitting = true;
+ ServerConfig *newconfig = new ServerConfig();
+ delete Config;
+ Config = newconfig;
+ FOREACH_MOD(I_OnReload, OnReload(true));
+ }
+ catch (const ConfigException &ex)
+ {
+ Alog() << "Error reloading configuration file: " << ex.GetReason();
}
-
- FOREACH_MOD(I_OnReload, OnReload(true));
return;
}
@@ -379,7 +383,7 @@ static bool Connect()
{
/* Connect to the remote server */
int servernum = 1;
- for (std::list<Uplink *>::iterator curr_uplink = Config.Uplinks.begin(), end_uplink = Config.Uplinks.end(); curr_uplink != end_uplink; ++curr_uplink, ++servernum)
+ for (std::list<Uplink *>::iterator curr_uplink = Config->Uplinks.begin(), end_uplink = Config->Uplinks.end(); curr_uplink != end_uplink; ++curr_uplink, ++servernum)
{
uplink_server = *curr_uplink;
@@ -394,7 +398,7 @@ static bool Connect()
try
{
- new UplinkSocket(uplink_server->host, uplink_server->port, Config.LocalHost, uplink_server->ipv6);
+ new UplinkSocket(uplink_server->host, uplink_server->port, Config->LocalHost, uplink_server->ipv6);
}
catch (const SocketException &ex)
{
@@ -479,7 +483,7 @@ int main(int ac, char **av, char **envp)
started = true;
#ifndef _WIN32
- if (Config.DumpCore)
+ if (Config->DumpCore)
{
rlimit rl;
if (getrlimit(RLIMIT_CORE, &rl) == -1)
@@ -495,8 +499,8 @@ int main(int ac, char **av, char **envp)
/* Set up timers */
time_t last_check = time(NULL);
- ExpireTimer expireTimer(Config.ExpireTimeout, last_check);
- UpdateTimer updateTimer(Config.UpdateTimeout, last_check);
+ ExpireTimer expireTimer(Config->ExpireTimeout, last_check);
+ UpdateTimer updateTimer(Config->UpdateTimeout, last_check);
/*** Main loop. ***/
while (!quitting)
@@ -523,7 +527,7 @@ int main(int ac, char **av, char **envp)
break;
}
- if (t - last_check >= Config.TimeoutCheck)
+ if (t - last_check >= Config->TimeoutCheck)
{
TimerManager::TickTimers(t);
last_check = t;
@@ -566,11 +570,11 @@ int main(int ac, char **av, char **envp)
Me->ClearLinks();
unsigned j = 0;
- for (; j < (Config.MaxRetries ? Config.MaxRetries : j + 1); ++j)
+ for (; j < (Config->MaxRetries ? Config->MaxRetries : j + 1); ++j)
{
- Alog() << "Disconnected from the server, retrying in " << Config.RetryWait << " seconds";
+ Alog() << "Disconnected from the server, retrying in " << Config->RetryWait << " seconds";
- sleep(Config.RetryWait);
+ sleep(Config->RetryWait);
if (Connect())
{
ircdproto->SendConnect();
@@ -578,7 +582,7 @@ int main(int ac, char **av, char **envp)
break;
}
}
- if (Config.MaxRetries && j == Config.MaxRetries)
+ if (Config->MaxRetries && j == Config->MaxRetries)
{
Alog() << "Max connection retry limit exceeded";
quitting = true;
diff --git a/src/memoserv.cpp b/src/memoserv.cpp
index 9a70b195e..0fcf0b6a3 100644
--- a/src/memoserv.cpp
+++ b/src/memoserv.cpp
@@ -22,7 +22,7 @@ static bool SendMemoMail(NickCore *nc, Memo *m);
void moduleAddMemoServCmds()
{
- ModuleManager::LoadModuleList(Config.MemoServCoreModules);
+ ModuleManager::LoadModuleList(Config->MemoServCoreModules);
}
/*************************************************************************/
@@ -66,9 +66,9 @@ void check_memos(User *u)
}
if (newcnt > 0)
{
- notice_lang(Config.s_MemoServ, u, newcnt == 1 ? MEMO_HAVE_NEW_MEMO : MEMO_HAVE_NEW_MEMOS, newcnt);
+ notice_lang(Config->s_MemoServ, u, newcnt == 1 ? MEMO_HAVE_NEW_MEMO : MEMO_HAVE_NEW_MEMOS, newcnt);
if (newcnt == 1 && (nc->memos.memos[i - 1]->HasFlag(MF_UNREAD)))
- notice_lang(Config.s_MemoServ, u, MEMO_TYPE_READ_LAST, Config.s_MemoServ.c_str());
+ notice_lang(Config->s_MemoServ, u, MEMO_TYPE_READ_LAST, Config->s_MemoServ.c_str());
else if (newcnt == 1)
{
for (i = 0; i < end; ++i)
@@ -76,17 +76,17 @@ void check_memos(User *u)
if (nc->memos.memos[i]->HasFlag(MF_UNREAD))
break;
}
- notice_lang(Config.s_MemoServ, u, MEMO_TYPE_READ_NUM, Config.s_MemoServ.c_str(), nc->memos.memos[i]->number);
+ notice_lang(Config->s_MemoServ, u, MEMO_TYPE_READ_NUM, Config->s_MemoServ.c_str(), nc->memos.memos[i]->number);
}
else
- notice_lang(Config.s_MemoServ, u, MEMO_TYPE_LIST_NEW, Config.s_MemoServ.c_str());
+ notice_lang(Config->s_MemoServ, u, MEMO_TYPE_LIST_NEW, Config->s_MemoServ.c_str());
}
if (nc->memos.memomax > 0 && nc->memos.memos.size() >= nc->memos.memomax)
{
if (nc->memos.memos.size() > nc->memos.memomax)
- notice_lang(Config.s_MemoServ, u, MEMO_OVER_LIMIT, nc->memos.memomax);
+ notice_lang(Config->s_MemoServ, u, MEMO_OVER_LIMIT, nc->memos.memomax);
else
- notice_lang(Config.s_MemoServ, u, MEMO_AT_LIMIT, nc->memos.memomax);
+ notice_lang(Config->s_MemoServ, u, MEMO_AT_LIMIT, nc->memos.memomax);
}
}
@@ -175,48 +175,48 @@ void memo_send(User *u, const Anope::string &name, const Anope::string &text, in
int is_servoper = u->Account() && u->Account()->IsServicesOper();
if (readonly)
- notice_lang(Config.s_MemoServ, u, MEMO_SEND_DISABLED);
+ notice_lang(Config->s_MemoServ, u, MEMO_SEND_DISABLED);
else if (text.empty())
{
if (!z)
- syntax_error(Config.s_MemoServ, u, "SEND", MEMO_SEND_SYNTAX);
+ syntax_error(Config->s_MemoServ, u, "SEND", MEMO_SEND_SYNTAX);
if (z == 3)
- syntax_error(Config.s_MemoServ, u, "RSEND", MEMO_RSEND_SYNTAX);
+ syntax_error(Config->s_MemoServ, u, "RSEND", MEMO_RSEND_SYNTAX);
}
else if (!u->IsIdentified() && !u->IsRecognized())
{
if (!z || z == 3)
- notice_lang(Config.s_MemoServ, u, NICK_IDENTIFY_REQUIRED, Config.s_NickServ.c_str());
+ notice_lang(Config->s_MemoServ, u, NICK_IDENTIFY_REQUIRED, Config->s_NickServ.c_str());
}
else if (!(mi = getmemoinfo(name, ischan, isforbid)))
{
if (!z || z == 3)
{
if (isforbid)
- notice_lang(Config.s_MemoServ, u, ischan ? CHAN_X_FORBIDDEN : NICK_X_FORBIDDEN, name.c_str());
+ notice_lang(Config->s_MemoServ, u, ischan ? CHAN_X_FORBIDDEN : NICK_X_FORBIDDEN, name.c_str());
else
- notice_lang(Config.s_MemoServ, u, ischan ? CHAN_X_NOT_REGISTERED : NICK_X_NOT_REGISTERED, name.c_str());
+ notice_lang(Config->s_MemoServ, u, ischan ? CHAN_X_NOT_REGISTERED : NICK_X_NOT_REGISTERED, name.c_str());
}
}
- else if (z != 2 && Config.MSSendDelay > 0 && u && u->lastmemosend + Config.MSSendDelay > now)
+ else if (z != 2 && Config->MSSendDelay > 0 && u && u->lastmemosend + Config->MSSendDelay > now)
{
u->lastmemosend = now;
if (!z)
- notice_lang(Config.s_MemoServ, u, MEMO_SEND_PLEASE_WAIT, Config.MSSendDelay);
+ notice_lang(Config->s_MemoServ, u, MEMO_SEND_PLEASE_WAIT, Config->MSSendDelay);
if (z == 3)
- notice_lang(Config.s_MemoServ, u, MEMO_RSEND_PLEASE_WAIT, Config.MSSendDelay);
+ notice_lang(Config->s_MemoServ, u, MEMO_RSEND_PLEASE_WAIT, Config->MSSendDelay);
}
else if (!mi->memomax && !is_servoper)
{
if (!z || z == 3)
- notice_lang(Config.s_MemoServ, u, MEMO_X_GETS_NO_MEMOS, name.c_str());
+ notice_lang(Config->s_MemoServ, u, MEMO_X_GETS_NO_MEMOS, name.c_str());
}
else if (mi->memomax > 0 && mi->memos.size() >= mi->memomax && !is_servoper)
{
if (!z || z == 3)
- notice_lang(Config.s_MemoServ, u, MEMO_X_HAS_TOO_MANY_MEMOS, name.c_str());
+ notice_lang(Config->s_MemoServ, u, MEMO_X_HAS_TOO_MANY_MEMOS, name.c_str());
}
else
{
@@ -245,14 +245,14 @@ void memo_send(User *u, const Anope::string &name, const Anope::string &text, in
if (z == 3)
m->SetFlag(MF_RECEIPT);
if (!z || z == 3)
- notice_lang(Config.s_MemoServ, u, MEMO_SENT, name.c_str());
+ notice_lang(Config->s_MemoServ, u, MEMO_SENT, name.c_str());
if (!ischan)
{
NickCore *nc = findnick(name)->nc;
FOREACH_MOD(I_OnMemoSend, OnMemoSend(u, nc, m));
- if (Config.MSNotifyAll)
+ if (Config->MSNotifyAll)
{
if (nc->HasFlag(NI_MEMO_RECEIVE) && !get_ignore(name))
{
@@ -261,13 +261,13 @@ void memo_send(User *u, const Anope::string &name, const Anope::string &text, in
NickAlias *na = *it;
User *user = finduser(na->nick);
if (user && user->IsIdentified())
- notice_lang(Config.s_MemoServ, user, MEMO_NEW_MEMO_ARRIVED, source.c_str(), Config.s_MemoServ.c_str(), m->number);
+ notice_lang(Config->s_MemoServ, user, MEMO_NEW_MEMO_ARRIVED, source.c_str(), Config->s_MemoServ.c_str(), m->number);
}
}
else
{
if ((u = finduser(name)) && u->IsIdentified() && nc->HasFlag(NI_MEMO_RECEIVE))
- notice_lang(Config.s_MemoServ, u, MEMO_NEW_MEMO_ARRIVED, source.c_str(), Config.s_MemoServ.c_str(), m->number);
+ notice_lang(Config->s_MemoServ, u, MEMO_NEW_MEMO_ARRIVED, source.c_str(), Config->s_MemoServ.c_str(), m->number);
} /* if (flags & MEMO_RECEIVE) */
}
/* if (MSNotifyAll) */
@@ -281,7 +281,7 @@ void memo_send(User *u, const Anope::string &name, const Anope::string &text, in
FOREACH_MOD(I_OnMemoSend, OnMemoSend(u, cs_findchan(name), m));
- if (Config.MSNotifyAll && (c = findchan(name)))
+ if (Config->MSNotifyAll && (c = findchan(name)))
{
for (CUserList::iterator it = c->users.begin(), it_end = c->users.end(); it != it_end; ++it)
{
@@ -290,7 +290,7 @@ void memo_send(User *u, const Anope::string &name, const Anope::string &text, in
if (check_access(cu->user, c->ci, CA_MEMO))
{
if (cu->user->Account() && cu->user->Account()->HasFlag(NI_MEMO_RECEIVE) && !get_ignore(cu->user->nick))
- notice_lang(Config.s_MemoServ, cu->user, MEMO_NEW_X_MEMO_ARRIVED, c->ci->name.c_str(), Config.s_MemoServ.c_str(), c->ci->name.c_str(), m->number);
+ notice_lang(Config->s_MemoServ, cu->user, MEMO_NEW_X_MEMO_ARRIVED, c->ci->name.c_str(), Config->s_MemoServ.c_str(), c->ci->name.c_str(), m->number);
}
}
} /* MSNotifyAll */
@@ -376,7 +376,7 @@ void rsend_notify(User *u, Memo *m, const Anope::string &chan)
/* Notify recepient of the memo that a notification has
been sent to the sender */
- notice_lang(Config.s_MemoServ, u, MEMO_RSEND_USER_NOTIFICATION, nc->display.c_str());
+ notice_lang(Config->s_MemoServ, u, MEMO_RSEND_USER_NOTIFICATION, nc->display.c_str());
}
/* Remove receipt flag from the original memo */
diff --git a/src/messages.cpp b/src/messages.cpp
index 0348eab4b..d40d06712 100644
--- a/src/messages.cpp
+++ b/src/messages.cpp
@@ -39,7 +39,7 @@ int m_kill(const Anope::string &nick, const Anope::string &msg)
BotInfo *bi;
/* Recover if someone kills us. */
- if (!Config.s_BotServ.empty() && (bi = findbot(nick)))
+ if (!Config->s_BotServ.empty() && (bi = findbot(nick)))
{
introduce_user(nick);
bi->RejoinAll();
@@ -62,7 +62,7 @@ int m_time(const Anope::string &source, int ac, const char **av)
struct tm *tm = localtime(t);
char buf[64];
strftime(buf, sizeof(buf), "%a %b %d %H:%M:%S %Y %Z", tm);
- ircdproto->SendNumeric(Config.ServerName, 391, source, "%s :%s", Config.ServerName.c_str(), buf);
+ ircdproto->SendNumeric(Config->ServerName, 391, source, "%s :%s", Config->ServerName.c_str(), buf);
return MOD_CONT;
}
@@ -73,21 +73,21 @@ int m_motd(const Anope::string &source)
if (source.empty())
return MOD_CONT;
- FILE *f = fopen(Config.MOTDFilename.c_str(), "r");
+ FILE *f = fopen(Config->MOTDFilename.c_str(), "r");
if (f)
{
- ircdproto->SendNumeric(Config.ServerName, 375, source, ":- %s Message of the Day", Config.ServerName.c_str());
+ ircdproto->SendNumeric(Config->ServerName, 375, source, ":- %s Message of the Day", Config->ServerName.c_str());
char buf[BUFSIZE];
while (fgets(buf, sizeof(buf), f))
{
buf[strlen(buf) - 1] = 0;
- ircdproto->SendNumeric(Config.ServerName, 372, source, ":- %s", buf);
+ ircdproto->SendNumeric(Config->ServerName, 372, source, ":- %s", buf);
}
fclose(f);
- ircdproto->SendNumeric(Config.ServerName, 376, source, ":End of /MOTD command.");
+ ircdproto->SendNumeric(Config->ServerName, 376, source, ":End of /MOTD command.");
}
else
- ircdproto->SendNumeric(Config.ServerName, 422, source, ":- MOTD file not found! Please contact your IRC administrator.");
+ ircdproto->SendNumeric(Config->ServerName, 422, source, ":- MOTD file not found! Please contact your IRC administrator.");
return MOD_CONT;
}
@@ -111,7 +111,7 @@ int m_privmsg(const Anope::string &source, const Anope::string &receiver, const
return MOD_CONT;
}
- if (receiver[0] == '#' && !Config.s_BotServ.empty())
+ if (receiver[0] == '#' && !Config->s_BotServ.empty())
{
ChannelInfo *ci = cs_findchan(receiver);
if (ci)
@@ -142,13 +142,13 @@ int m_privmsg(const Anope::string &source, const Anope::string &receiver, const
{
Anope::string servername(receiver.begin() + s + 1, receiver.end());
botname = botname.substr(0, s);
- if (!servername.equals_ci(Config.ServerName))
+ if (!servername.equals_ci(Config->ServerName))
return MOD_CONT;
}
- else if (Config.UseStrictPrivMsg)
+ else if (Config->UseStrictPrivMsg)
{
Alog(LOG_DEBUG) << "Ignored PRIVMSG without @ from " << source;
- notice_lang(receiver, u, INVALID_TARGET, receiver.c_str(), receiver.c_str(), Config.ServerName.c_str(), receiver.c_str());
+ notice_lang(receiver, u, INVALID_TARGET, receiver.c_str(), receiver.c_str(), Config->ServerName.c_str(), receiver.c_str());
return MOD_CONT;
}
@@ -167,36 +167,36 @@ int m_privmsg(const Anope::string &source, const Anope::string &receiver, const
}
else if (message.substr(0, 9).equals_ci("\1VERSION\1"))
{
- ircdproto->SendCTCP(bi, u->nick, "VERSION Anope-%s %s :%s - (%s) -- %s", Anope::Version().c_str(), Config.ServerName.c_str(), ircd->name, Config.EncModuleList.begin()->c_str(), Anope::Build().c_str());
+ ircdproto->SendCTCP(bi, u->nick, "VERSION Anope-%s %s :%s - (%s) -- %s", Anope::Version().c_str(), Config->ServerName.c_str(), ircd->name, Config->EncModuleList.begin()->c_str(), Anope::Build().c_str());
}
}
- else if (bi->nick.equals_ci(Config.s_NickServ) || bi->nick.equals_ci(Config.s_MemoServ) || (!Config.s_BotServ.empty() && bi->nick.equals_ci(Config.s_BotServ)))
+ else if (bi->nick.equals_ci(Config->s_NickServ) || bi->nick.equals_ci(Config->s_MemoServ) || (!Config->s_BotServ.empty() && bi->nick.equals_ci(Config->s_BotServ)))
mod_run_cmd(bi, u, message);
- else if (bi->nick.equals_ci(Config.s_ChanServ))
+ else if (bi->nick.equals_ci(Config->s_ChanServ))
{
- if (!is_oper(u) && Config.CSOpersOnly)
- notice_lang(Config.s_ChanServ, u, ACCESS_DENIED);
+ if (!is_oper(u) && Config->CSOpersOnly)
+ notice_lang(Config->s_ChanServ, u, ACCESS_DENIED);
else
mod_run_cmd(bi, u, message);
}
- else if (!Config.s_HostServ.empty() && bi->nick.equals_ci(Config.s_HostServ))
+ else if (!Config->s_HostServ.empty() && bi->nick.equals_ci(Config->s_HostServ))
{
if (!ircd->vhost)
- notice_lang(Config.s_HostServ, u, SERVICE_OFFLINE, Config.s_HostServ.c_str());
+ notice_lang(Config->s_HostServ, u, SERVICE_OFFLINE, Config->s_HostServ.c_str());
else
mod_run_cmd(bi, u, message);
}
- else if (bi->nick.equals_ci(Config.s_OperServ))
+ else if (bi->nick.equals_ci(Config->s_OperServ))
{
- if (!is_oper(u) && Config.OSOpersOnly)
+ if (!is_oper(u) && Config->OSOpersOnly)
{
- notice_lang(Config.s_OperServ, u, 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());
+ notice_lang(Config->s_OperServ, u, 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());
}
else
{
- Alog() << Config.s_OperServ << ": " << u->nick << ": " << message;
+ Alog() << Config->s_OperServ << ": " << u->nick << ": " << message;
mod_run_cmd(bi, u, message);
}
}
@@ -220,31 +220,31 @@ int m_stats(const Anope::string &source, int ac, const char **av)
case 'l':
if (u && is_oper(u))
{
- ircdproto->SendNumeric(Config.ServerName, 211, source, "Server SendBuf SentBytes SentMsgs RecvBuf RecvBytes RecvMsgs ConnTime");
- ircdproto->SendNumeric(Config.ServerName, 211, source, "%s %d %d %d %d %d %d %ld", uplink_server->host.c_str(), UplinkSock->WriteBufferLen(), TotalWritten, -1, UplinkSock->ReadBufferLen(), TotalRead, -1, time(NULL) - start_time);
+ ircdproto->SendNumeric(Config->ServerName, 211, source, "Server SendBuf SentBytes SentMsgs RecvBuf RecvBytes RecvMsgs ConnTime");
+ ircdproto->SendNumeric(Config->ServerName, 211, source, "%s %d %d %d %d %d %d %ld", uplink_server->host.c_str(), UplinkSock->WriteBufferLen(), TotalWritten, -1, UplinkSock->ReadBufferLen(), TotalRead, -1, time(NULL) - start_time);
}
- ircdproto->SendNumeric(Config.ServerName, 219, source, "%c :End of /STATS report.", *av[0] ? *av[0] : '*');
+ ircdproto->SendNumeric(Config->ServerName, 219, source, "%c :End of /STATS report.", *av[0] ? *av[0] : '*');
break;
case 'o':
case 'O':
/* Check whether the user is an operator */
- if (u && !is_oper(u) && Config.HideStatsO)
- ircdproto->SendNumeric(Config.ServerName, 219, source, "%c :End of /STATS report.", *av[0] ? *av[0] : '*');
+ if (u && !is_oper(u) && Config->HideStatsO)
+ ircdproto->SendNumeric(Config->ServerName, 219, source, "%c :End of /STATS report.", *av[0] ? *av[0] : '*');
else
{
std::list<std::pair<Anope::string, Anope::string> >::iterator it, it_end;
- for (it = Config.Opers.begin(), it_end = Config.Opers.end(); it != it_end; ++it)
+ for (it = Config->Opers.begin(), it_end = Config->Opers.end(); it != it_end; ++it)
{
Anope::string nick = it->first, type = it->second;
NickCore *nc = findcore(nick);
if (nc)
- ircdproto->SendNumeric(Config.ServerName, 243, source, "O * * %s %s 0", nick.c_str(), type.c_str());
+ ircdproto->SendNumeric(Config->ServerName, 243, source, "O * * %s %s 0", nick.c_str(), type.c_str());
}
- ircdproto->SendNumeric(Config.ServerName, 219, source, "%c :End of /STATS report.", *av[0] ? *av[0] : '*');
+ ircdproto->SendNumeric(Config->ServerName, 219, source, "%c :End of /STATS report.", *av[0] ? *av[0] : '*');
}
break;
@@ -252,14 +252,14 @@ int m_stats(const Anope::string &source, int ac, const char **av)
case 'u':
{
int uptime = time(NULL) - start_time;
- ircdproto->SendNumeric(Config.ServerName, 242, source, ":Services up %d day%s, %02d:%02d:%02d", uptime / 86400, uptime / 86400 == 1 ? "" : "s", (uptime / 3600) % 24, (uptime / 60) % 60, uptime % 60);
- ircdproto->SendNumeric(Config.ServerName, 250, source, ":Current users: %d (%d ops); maximum %d", usercnt, opcnt, maxusercnt);
- ircdproto->SendNumeric(Config.ServerName, 219, source, "%c :End of /STATS report.", *av[0] ? *av[0] : '*');
+ ircdproto->SendNumeric(Config->ServerName, 242, source, ":Services up %d day%s, %02d:%02d:%02d", uptime / 86400, uptime / 86400 == 1 ? "" : "s", (uptime / 3600) % 24, (uptime / 60) % 60, uptime % 60);
+ ircdproto->SendNumeric(Config->ServerName, 250, source, ":Current users: %d (%d ops); maximum %d", usercnt, opcnt, maxusercnt);
+ ircdproto->SendNumeric(Config->ServerName, 219, source, "%c :End of /STATS report.", *av[0] ? *av[0] : '*');
break;
} /* case 'u' */
default:
- ircdproto->SendNumeric(Config.ServerName, 219, source, "%c :End of /STATS report.", *av[0] ? *av[0] : '*');
+ ircdproto->SendNumeric(Config->ServerName, 219, source, "%c :End of /STATS report.", *av[0] ? *av[0] : '*');
}
return MOD_CONT;
}
@@ -269,7 +269,7 @@ int m_stats(const Anope::string &source, int ac, const char **av)
int m_version(const Anope::string &source, int ac, const char **av)
{
if (!source.empty())
- ircdproto->SendNumeric(Config.ServerName, 351, source, "Anope-%s %s :%s -(%s) -- %s", Anope::Version().c_str(), Config.ServerName.c_str(), ircd->name, Config.EncModuleList.begin()->c_str(), Anope::Build().c_str());
+ ircdproto->SendNumeric(Config->ServerName, 351, source, "Anope-%s %s :%s -(%s) -- %s", Anope::Version().c_str(), Config->ServerName.c_str(), ircd->name, Config->EncModuleList.begin()->c_str(), Anope::Build().c_str());
return MOD_CONT;
}
@@ -283,11 +283,11 @@ int m_whois(const Anope::string &source, const Anope::string &who)
BotInfo *bi = findbot(who);
if (bi)
{
- ircdproto->SendNumeric(Config.ServerName, 311, source, "%s %s %s * :%s", bi->nick.c_str(), bi->GetIdent().c_str(), bi->host.c_str(), bi->realname.c_str());
- ircdproto->SendNumeric(Config.ServerName, 307, source, "%s :is a registered nick", bi->nick.c_str());
- ircdproto->SendNumeric(Config.ServerName, 312, source, "%s %s :%s", bi->nick.c_str(), Config.ServerName.c_str(), Config.ServerDesc.c_str());
- ircdproto->SendNumeric(Config.ServerName, 317, source, "%s %ld %ld :seconds idle, signon time", bi->nick.c_str(), time(NULL) - bi->lastmsg, start_time);
- ircdproto->SendNumeric(Config.ServerName, 318, source, "%s :End of /WHOIS list.", who.c_str());
+ ircdproto->SendNumeric(Config->ServerName, 311, source, "%s %s %s * :%s", bi->nick.c_str(), bi->GetIdent().c_str(), bi->host.c_str(), bi->realname.c_str());
+ ircdproto->SendNumeric(Config->ServerName, 307, source, "%s :is a registered nick", bi->nick.c_str());
+ ircdproto->SendNumeric(Config->ServerName, 312, source, "%s %s :%s", bi->nick.c_str(), Config->ServerName.c_str(), Config->ServerDesc.c_str());
+ ircdproto->SendNumeric(Config->ServerName, 317, source, "%s %ld %ld :seconds idle, signon time", bi->nick.c_str(), time(NULL) - bi->lastmsg, start_time);
+ ircdproto->SendNumeric(Config->ServerName, 318, source, "%s :End of /WHOIS list.", who.c_str());
}
else if (!ircd->svshold && (na = findnick(who)) && na->HasFlag(NS_HELD))
{
@@ -295,12 +295,12 @@ int m_whois(const Anope::string &source, const Anope::string &who)
* We can't just say it doesn't exist here, even tho it does for
* other servers :) -GD
*/
- ircdproto->SendNumeric(Config.ServerName, 311, source, "%s %s %s * :Services Enforcer", na->nick.c_str(), Config.NSEnforcerUser.c_str(), Config.NSEnforcerHost.c_str());
- ircdproto->SendNumeric(Config.ServerName, 312, source, "%s %s :%s", na->nick.c_str(), Config.ServerName.c_str(), Config.ServerDesc.c_str());
- ircdproto->SendNumeric(Config.ServerName, 318, source, "%s :End of /WHOIS list.", who.c_str());
+ ircdproto->SendNumeric(Config->ServerName, 311, source, "%s %s %s * :Services Enforcer", na->nick.c_str(), Config->NSEnforcerUser.c_str(), Config->NSEnforcerHost.c_str());
+ ircdproto->SendNumeric(Config->ServerName, 312, source, "%s %s :%s", na->nick.c_str(), Config->ServerName.c_str(), Config->ServerDesc.c_str());
+ ircdproto->SendNumeric(Config->ServerName, 318, source, "%s :End of /WHOIS list.", who.c_str());
}
else
- ircdproto->SendNumeric(Config.ServerName, 401, source, "%s :No such service.", who.c_str());
+ ircdproto->SendNumeric(Config->ServerName, 401, source, "%s :No such service.", who.c_str());
}
return MOD_CONT;
}
diff --git a/src/misc.cpp b/src/misc.cpp
index 86e1c6717..42d56407b 100644
--- a/src/misc.cpp
+++ b/src/misc.cpp
@@ -411,7 +411,7 @@ bool doValidHost(const Anope::string &host, int type)
size_t len = host.length();
- if (len > Config.HostLen)
+ if (len > Config->HostLen)
return false;
size_t idx, sec_len = 0, dots = 1;
@@ -625,26 +625,26 @@ bool nickIsServices(const Anope::string &tempnick, bool bot)
if (at != Anope::string::npos)
{
Anope::string servername = nick.substr(at + 1);
- if (!servername.equals_ci(Config.ServerName))
+ if (!servername.equals_ci(Config->ServerName))
return false;
nick = nick.substr(0, at);
}
- if (!Config.s_NickServ.empty() && nick.equals_ci(Config.s_NickServ))
+ if (!Config->s_NickServ.empty() && nick.equals_ci(Config->s_NickServ))
return true;
- else if (!Config.s_ChanServ.empty() && nick.equals_ci(Config.s_ChanServ))
+ else if (!Config->s_ChanServ.empty() && nick.equals_ci(Config->s_ChanServ))
return true;
- else if (!Config.s_HostServ.empty() && nick.equals_ci(Config.s_HostServ))
+ else if (!Config->s_HostServ.empty() && nick.equals_ci(Config->s_HostServ))
return true;
- else if (!Config.s_MemoServ.empty() && nick.equals_ci(Config.s_MemoServ))
+ else if (!Config->s_MemoServ.empty() && nick.equals_ci(Config->s_MemoServ))
return true;
- else if (!Config.s_BotServ.empty() && nick.equals_ci(Config.s_BotServ))
+ else if (!Config->s_BotServ.empty() && nick.equals_ci(Config->s_BotServ))
return true;
- else if (!Config.s_OperServ.empty() && nick.equals_ci(Config.s_OperServ))
+ else if (!Config->s_OperServ.empty() && nick.equals_ci(Config->s_OperServ))
return true;
- else if (!Config.s_GlobalNoticer.empty() && nick.equals_ci(Config.s_GlobalNoticer))
+ else if (!Config->s_GlobalNoticer.empty() && nick.equals_ci(Config->s_GlobalNoticer))
return true;
- else if (!Config.s_BotServ.empty() && bot)
+ else if (!Config->s_BotServ.empty() && bot)
{
for (botinfo_map::const_iterator it = BotListByNick.begin(), it_end = BotListByNick.end(); it != it_end; ++it)
{
@@ -743,9 +743,9 @@ void rand_init()
*/
void add_entropy_userkeys()
{
- arc4_addrandom(&Config.UserKey1, sizeof(Config.UserKey1));
- arc4_addrandom(&Config.UserKey2, sizeof(Config.UserKey2));
- arc4_addrandom(&Config.UserKey3, sizeof(Config.UserKey3));
+ arc4_addrandom(&Config->UserKey1, sizeof(Config->UserKey1));
+ arc4_addrandom(&Config->UserKey2, sizeof(Config->UserKey2));
+ arc4_addrandom(&Config->UserKey3, sizeof(Config->UserKey3));
/* UserKey3 is also used in mysql_rand() */
}
diff --git a/src/modes.cpp b/src/modes.cpp
index 83e0cce56..624023e66 100644
--- a/src/modes.cpp
+++ b/src/modes.cpp
@@ -38,7 +38,7 @@ std::list<ChannelModeStatus *> BotModes;
/** Parse the mode string from the config file and set the default mlocked modes
*/
-void SetDefaultMLock()
+void SetDefaultMLock(ServerConfig *config)
{
DefMLockOn.ClearFlags();
DefMLockOff.ClearFlags();
@@ -46,7 +46,7 @@ void SetDefaultMLock()
Flags<ChannelModeName> *ptr = NULL;
Anope::string modes, param;
- spacesepstream sep(Config.MLock);
+ spacesepstream sep(config->MLock);
sep.GetToken(modes);
for (unsigned i = 0, end_mode = modes.length(); i < end_mode; ++i)
@@ -82,9 +82,9 @@ void SetDefaultMLock()
/* Set Bot Modes */
BotModes.clear();
- for (unsigned i = 0, end_mode = Config.BotModes.length(); i < end_mode; ++i)
+ for (unsigned i = 0, end_mode = config->BotModes.length(); i < end_mode; ++i)
{
- ChannelMode *cm = ModeManager::FindChannelModeByChar(Config.BotModes[i]);
+ ChannelMode *cm = ModeManager::FindChannelModeByChar(config->BotModes[i]);
if (cm && cm->Type == MODE_STATUS && std::find(BotModes.begin(), BotModes.end(), cm) == BotModes.end())
BotModes.push_back(debug_cast<ChannelModeStatus *>(cm));
@@ -266,7 +266,7 @@ void ChannelModeBan::AddMask(Channel *chan, const Anope::string &mask)
/* Check whether it matches a botserv bot after adding internally
* and parsing it through cidr support. ~ Viper */
- if (!Config.s_BotServ.empty() && Config.BSSmartJoin && chan->ci && chan->ci->bi && chan->FindUser(chan->ci->bi))
+ if (!Config->s_BotServ.empty() && Config->BSSmartJoin && chan->ci && chan->ci->bi && chan->FindUser(chan->ci->bi))
{
BotInfo *bi = chan->ci->bi;
@@ -634,7 +634,7 @@ bool ModeManager::AddChannelMode(ChannelMode *cm)
ModeManager::Modes.push_back(cm);
/* Apply this mode to the new default mlock if its used */
- SetDefaultMLock();
+ SetDefaultMLock(Config);
FOREACH_MOD(I_OnChannelModeAdd, OnChannelModeAdd(cm));
diff --git a/src/modulemanager.cpp b/src/modulemanager.cpp
index 8ab72eef5..b5f0d51f2 100644
--- a/src/modulemanager.cpp
+++ b/src/modulemanager.cpp
@@ -203,7 +203,7 @@ int ModuleManager::LoadModule(const Anope::string &modname, User *u)
if (u)
{
ircdproto->SendGlobops(OperServ, "%s loaded module %s", u->nick.c_str(), modname.c_str());
- notice_lang(Config.s_OperServ, u, OPER_MODULE_LOADED, modname.c_str());
+ notice_lang(Config->s_OperServ, u, OPER_MODULE_LOADED, modname.c_str());
/* If a user is loading this module, then the core databases have already been loaded
* so trigger the event manually
@@ -221,21 +221,21 @@ int ModuleManager::UnloadModule(Module *m, User *u)
if (!m || !m->handle)
{
if (u)
- notice_lang(Config.s_OperServ, u, OPER_MODULE_REMOVE_FAIL, m->name.c_str());
+ notice_lang(Config->s_OperServ, u, OPER_MODULE_REMOVE_FAIL, m->name.c_str());
return MOD_ERR_PARAMS;
}
if (m->GetPermanent() || m->type == PROTOCOL || m->type == ENCRYPTION || m->type == DATABASE)
{
if (u)
- notice_lang(Config.s_OperServ, u, OPER_MODULE_NO_UNLOAD);
+ notice_lang(Config->s_OperServ, u, OPER_MODULE_NO_UNLOAD);
return MOD_ERR_NOUNLOAD;
}
if (u)
{
ircdproto->SendGlobops(OperServ, "%s unloaded module %s", u->nick.c_str(), m->name.c_str());
- notice_lang(Config.s_OperServ, u, OPER_MODULE_UNLOADED, m->name.c_str());
+ notice_lang(Config->s_OperServ, u, OPER_MODULE_UNLOADED, m->name.c_str());
}
FOREACH_MOD(I_OnModuleUnload, OnModuleUnload(u, m));
diff --git a/src/modules.cpp b/src/modules.cpp
index c90410896..0a7d813c5 100644
--- a/src/modules.cpp
+++ b/src/modules.cpp
@@ -46,19 +46,19 @@ int protocol_module_init()
{
int ret = 0;
- Alog() << "Loading IRCD Protocol Module: [" << Config.IRCDModule << "]";
- ret = ModuleManager::LoadModule(Config.IRCDModule, NULL);
+ Alog() << "Loading IRCD Protocol Module: [" << Config->IRCDModule << "]";
+ ret = ModuleManager::LoadModule(Config->IRCDModule, NULL);
if (ret == MOD_ERR_OK)
{
- FindModule(Config.IRCDModule)->SetType(PROTOCOL);
+ FindModule(Config->IRCDModule)->SetType(PROTOCOL);
/* This is really NOT the correct place to do config checks, but
* as we only have the ircd struct filled here, we have to over
* here. -GD
*/
if (ircd->ts6)
{
- if (Config.Numeric.empty())
+ if (Config->Numeric.empty())
{
Alog() << "This IRCd protocol requires a server id to be set in Anope's configuration.";
ret = -1;
@@ -256,7 +256,7 @@ bool moduleMinVersion(int major, int minor, int patch, int build)
void Module::NoticeLang(const Anope::string &source, const User *u, int number, ...) const
{
/* Find the users lang, and use it if we can */
- int mlang = Config.NSDefLanguage;
+ int mlang = Config->NSDefLanguage;
if (u && u->Account())
mlang = u->Account()->language;
@@ -289,7 +289,7 @@ const char *Module::GetLangString(User *u, int number)
{
/* Find the users lang, and use it if we can */
- int mlang = Config.NSDefLanguage;
+ int mlang = Config->NSDefLanguage;
if (u && u->Account())
mlang = u->Account()->language;
diff --git a/src/nickalias.cpp b/src/nickalias.cpp
index de5682492..4eae63138 100644
--- a/src/nickalias.cpp
+++ b/src/nickalias.cpp
@@ -39,14 +39,14 @@ NickAlias::NickAlias(const Anope::string &nickname, NickCore *nickcore)
NickAliasList[this->nick] = this;
- for (std::list<std::pair<Anope::string, Anope::string> >::iterator it = Config.Opers.begin(), it_end = Config.Opers.end(); it != it_end; ++it)
+ for (std::list<std::pair<Anope::string, Anope::string> >::iterator it = Config->Opers.begin(), it_end = Config->Opers.end(); it != it_end; ++it)
{
if (this->nc->ot)
break;
if (!this->nick.equals_ci(it->first))
continue;
- for (std::list<OperType *>::iterator tit = Config.MyOperTypes.begin(), tit_end = Config.MyOperTypes.end(); tit != tit_end; ++tit)
+ for (std::list<OperType *>::iterator tit = Config->MyOperTypes.begin(), tit_end = Config->MyOperTypes.end(); tit != tit_end; ++tit)
{
OperType *ot = *tit;
@@ -135,8 +135,8 @@ void NickAlias::OnCancel(User *)
{
Anope::string uid = ircd->ts6 ? ts6_uid_retrieve() : "";
- ircdproto->SendClientIntroduction(this->nick, Config.NSEnforcerUser, Config.NSEnforcerHost, "Services Enforcer", "+", uid);
- new NickServRelease(this->nick, uid, Config.NSReleaseTimeout);
+ ircdproto->SendClientIntroduction(this->nick, Config->NSEnforcerUser, Config->NSEnforcerHost, "Services Enforcer", "+", uid);
+ new NickServRelease(this->nick, uid, Config->NSReleaseTimeout);
}
}
}
diff --git a/src/nickcore.cpp b/src/nickcore.cpp
index 6f9ff99c9..c75493b4a 100644
--- a/src/nickcore.cpp
+++ b/src/nickcore.cpp
@@ -17,7 +17,7 @@ NickCore::NickCore(const Anope::string &coredisplay)
/* Set default nick core flags */
for (size_t t = NI_BEGIN + 1; t != NI_END; ++t)
- if (Config.NSDefFlags.HasFlag(static_cast<NickCoreFlag>(t)))
+ if (Config->NSDefFlags.HasFlag(static_cast<NickCoreFlag>(t)))
this->SetFlag(static_cast<NickCoreFlag>(t));
NickCoreList[this->display] = this;
@@ -50,7 +50,7 @@ NickCore::~NickCore()
NickCoreList.erase(this->display);
/* Log .. */
- Alog() << Config.s_NickServ << ": deleting nickname group " << this->display;
+ Alog() << Config->s_NickServ << ": deleting nickname group " << this->display;
/* Clear access before deleting display name, we want to be able to use the display name in the clear access event */
this->ClearAccess();
diff --git a/src/nickserv.cpp b/src/nickserv.cpp
index 50eb67fed..11929ade7 100644
--- a/src/nickserv.cpp
+++ b/src/nickserv.cpp
@@ -76,7 +76,7 @@ void NickServRelease::Tick(time_t ctime)
/* *INDENT-OFF* */
void moduleAddNickServCmds()
{
- ModuleManager::LoadModuleList(Config.NickServCoreModules);
+ ModuleManager::LoadModuleList(Config->NickServCoreModules);
}
/* *INDENT-ON* */
/*************************************************************************/
@@ -166,7 +166,7 @@ int validate_user(User *u)
NickRequest *nr = findrequestnick(u->nick);
if (nr)
{
- notice_lang(Config.s_NickServ, u, NICK_IS_PREREG);
+ notice_lang(Config->s_NickServ, u, NICK_IS_PREREG);
return 0;
}
@@ -176,14 +176,14 @@ int validate_user(User *u)
if (na->HasFlag(NS_FORBIDDEN))
{
- notice_lang(Config.s_NickServ, u, NICK_MAY_NOT_BE_USED);
+ notice_lang(Config->s_NickServ, u, NICK_MAY_NOT_BE_USED);
u->Collide(na);
return 0;
}
if (na->nc->HasFlag(NI_SUSPENDED))
{
- notice_lang(Config.s_NickServ, u, NICK_X_SUSPENDED, u->nick.c_str());
+ notice_lang(Config->s_NickServ, u, NICK_X_SUSPENDED, u->nick.c_str());
u->Collide(na);
return 0;
}
@@ -203,26 +203,26 @@ int validate_user(User *u)
if (u->IsRecognized() || !na->nc->HasFlag(NI_KILL_IMMED))
{
if (na->nc->HasFlag(NI_SECURE))
- notice_lang(Config.s_NickServ, u, NICK_IS_SECURE, Config.s_NickServ.c_str());
+ notice_lang(Config->s_NickServ, u, NICK_IS_SECURE, Config->s_NickServ.c_str());
else
- notice_lang(Config.s_NickServ, u, NICK_IS_REGISTERED, Config.s_NickServ.c_str());
+ notice_lang(Config->s_NickServ, u, NICK_IS_REGISTERED, Config->s_NickServ.c_str());
}
if (na->nc->HasFlag(NI_KILLPROTECT) && !u->IsRecognized())
{
if (na->nc->HasFlag(NI_KILL_IMMED))
{
- notice_lang(Config.s_NickServ, u, FORCENICKCHANGE_NOW);
+ notice_lang(Config->s_NickServ, u, FORCENICKCHANGE_NOW);
u->Collide(na);
}
else if (na->nc->HasFlag(NI_KILL_QUICK))
{
- notice_lang(Config.s_NickServ, u, FORCENICKCHANGE_IN_20_SECONDS);
+ notice_lang(Config->s_NickServ, u, FORCENICKCHANGE_IN_20_SECONDS);
new NickServCollide(na->nick, 20);
}
else
{
- notice_lang(Config.s_NickServ, u, FORCENICKCHANGE_IN_1_MINUTE);
+ notice_lang(Config->s_NickServ, u, FORCENICKCHANGE_IN_1_MINUTE);
new NickServCollide(na->nick, 60);
}
}
@@ -253,7 +253,7 @@ void expire_nicks()
continue;
}
- if (Config.NSExpire && now - na->last_seen >= Config.NSExpire && !na->HasFlag(NS_FORBIDDEN) && !na->HasFlag(NS_NO_EXPIRE) && !na->nc->HasFlag(NI_SUSPENDED))
+ if (Config->NSExpire && now - na->last_seen >= Config->NSExpire && !na->HasFlag(NS_FORBIDDEN) && !na->HasFlag(NS_NO_EXPIRE) && !na->nc->HasFlag(NI_SUSPENDED))
{
EventReturn MOD_RESULT;
FOREACH_RESULT(I_OnPreNickExpire, OnPreNickExpire(na));
@@ -275,7 +275,7 @@ void expire_requests()
NickRequest *nr = it->second;
++it;
- if (Config.NSRExpire && now - nr->requested >= Config.NSRExpire)
+ if (Config->NSRExpire && now - nr->requested >= Config->NSRExpire)
{
Alog() << "Request for nick " << nr->nick << " expiring";
delete nr;
@@ -356,7 +356,7 @@ void change_core_display(NickCore *nc, const Anope::string &newdisplay)
{
/* Log ... */
FOREACH_MOD(I_OnChangeCoreDisplay, OnChangeCoreDisplay(nc, newdisplay));
- Alog() << Config.s_NickServ << ": changing " << nc->display << " nickname group display to " << newdisplay;
+ Alog() << Config->s_NickServ << ": changing " << nc->display << " nickname group display to " << newdisplay;
/* Remove the core from the list */
NickCoreList.erase(nc->display);
diff --git a/src/operserv.cpp b/src/operserv.cpp
index 0582e91ee..89e84a73e 100644
--- a/src/operserv.cpp
+++ b/src/operserv.cpp
@@ -28,7 +28,7 @@ XLineManager *SGLine, *SZLine, *SQLine, *SNLine;
void os_init()
{
- ModuleManager::LoadModuleList(Config.OperServCoreModules);
+ ModuleManager::LoadModuleList(Config->OperServCoreModules);
/* Yes, these are in this order for a reason. Most violent->least violent. */
XLineManager::RegisterXLineManager(SGLine = new SGLineManager());
@@ -71,8 +71,8 @@ void UnsetDefConParam(ChannelModeName Name)
*/
bool CheckDefCon(DefconLevel Level)
{
- if (Config.DefConLevel)
- return DefCon[Config.DefConLevel][Level];
+ if (Config->DefConLevel)
+ return DefCon[Config->DefConLevel][Level];
return false;
}
@@ -108,7 +108,7 @@ void server_global(const Server *s, const Anope::string &message)
{
/* Do not send the notice to ourselves our juped servers */
if (s != Me && !s->HasFlag(SERVER_JUPED))
- notice_server(Config.s_GlobalNoticer, s, "%s", message.c_str());
+ notice_server(Config->s_GlobalNoticer, s, "%s", message.c_str());
if (!s->GetLinks().empty())
{
@@ -126,7 +126,7 @@ void oper_global(const Anope::string &nick, const char *fmt, ...)
vsnprintf(msg, sizeof(msg), fmt, args);
va_end(args);
- if (!nick.empty() && !Config.AnonymousGlobal)
+ if (!nick.empty() && !Config->AnonymousGlobal)
{
Anope::string rmsg = "[" + nick + "] " + msg;
server_global(Me->GetLinks().front(), rmsg);
@@ -490,7 +490,7 @@ XLine *SGLineManager::Add(BotInfo *bi, User *u, const Anope::string &mask, time_
}
Anope::string realreason = reason;
- if (u && Config.AddAkiller)
+ if (u && Config->AddAkiller)
realreason = "[" + u->nick + "]" + reason;
XLine *x = new XLine(mask, u ? u->nick : "", expires, realreason);
@@ -505,7 +505,7 @@ XLine *SGLineManager::Add(BotInfo *bi, User *u, const Anope::string &mask, time_
this->AddXLine(x);
- if (Config.AkillOnAdd)
+ if (Config->AkillOnAdd)
ircdproto->SendAkill(x);
return x;
@@ -523,7 +523,7 @@ void SGLineManager::OnMatch(User *u, XLine *x)
void SGLineManager::OnExpire(XLine *x)
{
- if (Config.WallAkillExpire)
+ if (Config->WallAkillExpire)
ircdproto->SendGlobops(OperServ, "AKILL on %s has expired", x->Mask.c_str());
}
@@ -564,7 +564,7 @@ XLine *SNLineManager::Add(BotInfo *bi, User *u, const Anope::string &mask, time_
this->AddXLine(x);
- if (Config.KillonSNline && !ircd->sglineenforce)
+ if (Config->KillonSNline && !ircd->sglineenforce)
{
Anope::string rreason = "G-Lined: " + reason;
@@ -574,7 +574,7 @@ XLine *SNLineManager::Add(BotInfo *bi, User *u, const Anope::string &mask, time_
++it;
if (!is_oper(user) && Anope::Match(user->realname, x->Mask))
- kill_user(Config.ServerName, user->nick, rreason);
+ kill_user(Config->ServerName, user->nick, rreason);
}
}
@@ -591,12 +591,12 @@ void SNLineManager::OnMatch(User *u, XLine *x)
ircdproto->SendSGLine(x);
Anope::string reason = "G-Lined: " + x->Reason;
- kill_user(Config.s_OperServ, u->nick, reason);
+ kill_user(Config->s_OperServ, u->nick, reason);
}
void SNLineManager::OnExpire(XLine *x)
{
- if (Config.WallSNLineExpire)
+ if (Config->WallSNLineExpire)
ircdproto->SendGlobops(OperServ, "SNLINE on \2%s\2 has expired", x->Mask.c_str());
}
@@ -605,14 +605,14 @@ XLine *SQLineManager::Add(BotInfo *bi, User *u, const Anope::string &mask, time_
if (mask.find_first_not_of("*") == Anope::string::npos)
{
if (bi && u)
- notice_lang(Config.s_OperServ, u, USERHOST_MASK_TOO_WIDE, mask.c_str());
+ notice_lang(Config->s_OperServ, u, USERHOST_MASK_TOO_WIDE, mask.c_str());
return NULL;
}
if (mask[0] == '#' && !ircd->chansqline)
{
if (bi && u)
- notice_lang(Config.s_OperServ, u, OPER_SQLINE_CHANNELS_UNSUPPORTED);
+ notice_lang(Config->s_OperServ, u, OPER_SQLINE_CHANNELS_UNSUPPORTED);
return NULL;
}
@@ -644,7 +644,7 @@ XLine *SQLineManager::Add(BotInfo *bi, User *u, const Anope::string &mask, time_
this->AddXLine(x);
- if (Config.KillonSQline)
+ if (Config->KillonSQline)
{
Anope::string rreason = "Q-Lined: " + reason;
@@ -675,7 +675,7 @@ XLine *SQLineManager::Add(BotInfo *bi, User *u, const Anope::string &mask, time_
++it;
if (!is_oper(user) && Anope::Match(user->nick, x->Mask))
- kill_user(Config.ServerName, user->nick, rreason);
+ kill_user(Config->ServerName, user->nick, rreason);
}
}
}
@@ -695,12 +695,12 @@ void SQLineManager::OnMatch(User *u, XLine *x)
ircdproto->SendSQLine(x);
Anope::string reason = "Q-Lined: " + x->Reason;
- kill_user(Config.s_OperServ, u->nick, reason);
+ kill_user(Config->s_OperServ, u->nick, reason);
}
void SQLineManager::OnExpire(XLine *x)
{
- if (Config.WallSQLineExpire)
+ if (Config->WallSQLineExpire)
ircdproto->SendGlobops(OperServ, "SQLINE on \2%s\2 has expired", x->Mask.c_str());
}
@@ -724,13 +724,13 @@ XLine *SZLineManager::Add(BotInfo *bi, User *u, const Anope::string &mask, time_
{
if (mask.find('!') != Anope::string::npos || mask.find('@') != Anope::string::npos)
{
- notice_lang(Config.s_OperServ, u, OPER_SZLINE_ONLY_IPS);
+ notice_lang(Config->s_OperServ, u, OPER_SZLINE_ONLY_IPS);
return NULL;
}
if (mask.find_first_not_of("*?") == Anope::string::npos)
{
- notice_lang(Config.s_OperServ, u, USERHOST_MASK_TOO_WIDE, mask.c_str());
+ notice_lang(Config->s_OperServ, u, USERHOST_MASK_TOO_WIDE, mask.c_str());
return NULL;
}
@@ -779,6 +779,6 @@ void SZLineManager::OnMatch(User *u, XLine *x)
void SZLineManager::OnExpire(XLine *x)
{
- if (Config.WallSZLineExpire)
+ if (Config->WallSZLineExpire)
ircdproto->SendGlobops(OperServ, "SZLINE on \2%s\2 has expired", x->Mask.c_str());
}
diff --git a/src/protocol.cpp b/src/protocol.cpp
index 0ff642cf0..d0cfef071 100644
--- a/src/protocol.cpp
+++ b/src/protocol.cpp
@@ -2,7 +2,7 @@
void IRCDProto::SendMessageInternal(const BotInfo *bi, const Anope::string &dest, const Anope::string &buf)
{
- if (Config.NSDefFlags.HasFlag(NI_MSG))
+ if (Config->NSDefFlags.HasFlag(NI_MSG))
SendPrivmsgInternal(bi, dest, buf);
else
SendNoticeInternal(bi, dest, buf);
@@ -39,7 +39,7 @@ void IRCDProto::SendGlobopsInternal(const BotInfo *source, const Anope::string &
if (source)
send_cmd(ircd->ts6 ? source->GetUID() : source->nick, "GLOBOPS :%s", buf.c_str());
else
- send_cmd(Config.ServerName, "GLOBOPS :%s", buf.c_str());
+ send_cmd(Config->ServerName, "GLOBOPS :%s", buf.c_str());
}
void IRCDProto::SendCTCPInternal(const BotInfo *bi, const Anope::string &dest, const Anope::string &buf)
@@ -178,9 +178,9 @@ void IRCDProto::SendQuit(const BotInfo *bi, const char *fmt, ...)
void IRCDProto::SendPing(const Anope::string &servname, const Anope::string &who)
{
if (servname.empty())
- send_cmd(ircd->ts6 ? TS6SID : Config.ServerName, "PING %s", who.c_str());
+ send_cmd(ircd->ts6 ? TS6SID : Config->ServerName, "PING %s", who.c_str());
else
- send_cmd(ircd->ts6 ? TS6SID : Config.ServerName, "PING %s %s", servname.c_str(), who.c_str());
+ send_cmd(ircd->ts6 ? TS6SID : Config->ServerName, "PING %s %s", servname.c_str(), who.c_str());
}
/**
@@ -192,9 +192,9 @@ void IRCDProto::SendPing(const Anope::string &servname, const Anope::string &who
void IRCDProto::SendPong(const Anope::string &servname, const Anope::string &who)
{
if (servname.empty())
- send_cmd(ircd->ts6 ? TS6SID : Config.ServerName, "PONG %s", who.c_str());
+ send_cmd(ircd->ts6 ? TS6SID : Config->ServerName, "PONG %s", who.c_str());
else
- send_cmd(ircd->ts6 ? TS6SID : Config.ServerName, "PONG %s %s", servname.c_str(), who.c_str());
+ send_cmd(ircd->ts6 ? TS6SID : Config->ServerName, "PONG %s %s", servname.c_str(), who.c_str());
}
void IRCDProto::SendInvite(const BotInfo *bi, const Anope::string &chan, const Anope::string &nick)
diff --git a/src/regchannel.cpp b/src/regchannel.cpp
index 42ccad94e..d055a632b 100644
--- a/src/regchannel.cpp
+++ b/src/regchannel.cpp
@@ -39,16 +39,16 @@ ChannelInfo::ChannelInfo(const Anope::string &chname)
size_t t;
/* Set default channel flags */
for (t = CI_BEGIN + 1; t != CI_END; ++t)
- if (Config.CSDefFlags.HasFlag(static_cast<ChannelInfoFlag>(t)))
+ if (Config->CSDefFlags.HasFlag(static_cast<ChannelInfoFlag>(t)))
this->SetFlag(static_cast<ChannelInfoFlag>(t));
/* Set default bot flags */
for (t = BS_BEGIN + 1; t != BS_END; ++t)
- if (Config.BSDefFlags.HasFlag(static_cast<BotServFlag>(t)))
+ if (Config->BSDefFlags.HasFlag(static_cast<BotServFlag>(t)))
this->botflags.SetFlag(static_cast<BotServFlag>(t));
- this->bantype = Config.CSDefBantype;
- this->memos.memomax = Config.MSMaxMemos;
+ this->bantype = Config->CSDefBantype;
+ this->memos.memomax = Config->MSMaxMemos;
this->last_used = this->time_registered = time(NULL);
this->ttb = new int16[2 * TTB_SIZE];
@@ -586,7 +586,7 @@ bool ChannelInfo::CheckKick(User *user)
get_idealban(this, user, mask);
else
mask = autokick->mask;
- reason = autokick->reason.empty() ? Config.CSAutokickReason : autokick->reason;
+ reason = autokick->reason.empty() ? Config->CSAutokickReason : autokick->reason;
do_kick = true;
break;
}
diff --git a/src/send.cpp b/src/send.cpp
index a213d73d6..62f1b8ec5 100644
--- a/src/send.cpp
+++ b/src/send.cpp
@@ -73,7 +73,7 @@ void notice_server(const Anope::string &source, const Server *s, const char *fmt
va_start(args, fmt);
vsnprintf(buf, BUFSIZE - 1, fmt, args);
- if (Config.NSDefFlags.HasFlag(NI_MSG))
+ if (Config->NSDefFlags.HasFlag(NI_MSG))
ircdproto->SendGlobalPrivmsg(findbot(source), s, buf);
else
ircdproto->SendGlobalNotice(findbot(source), s, buf);
diff --git a/src/servers.cpp b/src/servers.cpp
index a029890f7..7668cebbf 100644
--- a/src/servers.cpp
+++ b/src/servers.cpp
@@ -75,7 +75,7 @@ Server::Server(Server *uplink, const Anope::string &name, unsigned hops, const A
/* And some IRCds needs Global joined in the logchan */
if (LogChan && ircd->join2msg)
- Global->Join(Config.LogChannel);
+ Global->Join(Config->LogChannel);
}
}
}
@@ -269,7 +269,7 @@ bool Server::IsSynced() const
*/
bool Server::IsULined() const
{
- for (std::list<Anope::string>::const_iterator it = Config.Ulines.begin(), it_end = Config.Ulines.end(); it != it_end; ++it)
+ for (std::list<Anope::string>::const_iterator it = Config->Ulines.begin(), it_end = Config->Ulines.end(); it != it_end; ++it)
if (it->equals_ci(this->GetName()))
return true;
return false;
@@ -341,8 +341,8 @@ void do_server(const Anope::string &source, const Anope::string &servername, uns
Server *newserver = new Server(s, servername, hops, descript, numeric);
/* Announce services being online. */
- if (Config.GlobalOnCycle && !Config.GlobalOnCycleUP.empty())
- notice_server(Config.s_GlobalNoticer, newserver, "%s", Config.GlobalOnCycleUP.c_str());
+ if (Config->GlobalOnCycle && !Config->GlobalOnCycleUP.empty())
+ notice_server(Config->s_GlobalNoticer, newserver, "%s", Config->GlobalOnCycleUP.c_str());
/* Let modules know about the connection */
FOREACH_MOD(I_OnNewServer, OnNewServer(newserver));
diff --git a/src/sessions.cpp b/src/sessions.cpp
index f765a9460..893a45858 100644
--- a/src/sessions.cpp
+++ b/src/sessions.cpp
@@ -117,14 +117,14 @@ int add_session(const Anope::string &nick, const Anope::string &host, const Anop
{
exception = find_hostip_exception(host, hostip);
- sessionlimit = exception ? exception->limit : Config.DefSessionLimit;
+ sessionlimit = exception ? exception->limit : Config->DefSessionLimit;
if (sessionlimit && session->count >= sessionlimit)
{
- if (!Config.SessionLimitExceeded.empty())
- ircdproto->SendMessage(OperServ, nick, Config.SessionLimitExceeded.c_str(), host.c_str());
- if (!Config.SessionLimitDetailsLoc.empty())
- ircdproto->SendMessage(OperServ, nick, "%s", Config.SessionLimitDetailsLoc.c_str());
+ if (!Config->SessionLimitExceeded.empty())
+ ircdproto->SendMessage(OperServ, nick, Config->SessionLimitExceeded.c_str(), host.c_str());
+ if (!Config->SessionLimitDetailsLoc.empty())
+ ircdproto->SendMessage(OperServ, nick, "%s", Config->SessionLimitDetailsLoc.c_str());
/* Previously on IRCds that send a QUIT (InspIRCD) when a user is killed, the session for a host was
* decremented in do_quit, which caused problems and fixed here
@@ -134,15 +134,15 @@ int add_session(const Anope::string &nick, const Anope::string &host, const Anop
* decremented in do_kill or in do_quit - Adam
*/
++session->count;
- kill_user(Config.s_OperServ, nick, "Session limit exceeded");
+ kill_user(Config->s_OperServ, nick, "Session limit exceeded");
++session->hits;
- if (Config.MaxSessionKill && session->hits >= Config.MaxSessionKill)
+ if (Config->MaxSessionKill && session->hits >= Config->MaxSessionKill)
{
Anope::string akillmask = "*@" + host;
- XLine *x = new XLine(akillmask, Config.s_OperServ, time(NULL) + Config.SessionAutoKillExpiry, "Session limit exceeded");
+ XLine *x = new XLine(akillmask, Config->s_OperServ, time(NULL) + Config->SessionAutoKillExpiry, "Session limit exceeded");
if (x)
- x->By = Config.s_OperServ;
+ x->By = Config->s_OperServ;
ircdproto->SendGlobops(OperServ, "Added a temporary AKILL for \2%s\2 due to excessive connections", akillmask.c_str());
}
return 0;
@@ -166,7 +166,7 @@ int add_session(const Anope::string &nick, const Anope::string &host, const Anop
void del_session(const Anope::string &host)
{
- if (!Config.LimitSessions)
+ if (!Config->LimitSessions)
{
Alog(LOG_DEBUG) << "del_session called when LimitSessions is disabled";
return;
@@ -222,7 +222,7 @@ void expire_exceptions()
if (!e->expires || e->expires > now)
continue;
- if (Config.WallExceptionExpire)
+ if (Config->WallExceptionExpire)
ircdproto->SendGlobops(OperServ, "Session limit exception for %s has expired.", e->mask.c_str());
delete e;
exceptions.erase(curr_it);
@@ -272,13 +272,13 @@ int exception_add(User *u, const Anope::string &mask, int limit, const Anope::st
{
e->limit = limit;
if (u)
- notice_lang(Config.s_OperServ, u, OPER_EXCEPTION_CHANGED, mask.c_str(), e->limit);
+ notice_lang(Config->s_OperServ, u, OPER_EXCEPTION_CHANGED, mask.c_str(), e->limit);
return -2;
}
else
{
if (u)
- notice_lang(Config.s_OperServ, u, OPER_EXCEPTION_EXISTS, mask.c_str());
+ notice_lang(Config->s_OperServ, u, OPER_EXCEPTION_EXISTS, mask.c_str());
return -1;
}
}
diff --git a/src/users.cpp b/src/users.cpp
index f78c505a9..75596124c 100644
--- a/src/users.cpp
+++ b/src/users.cpp
@@ -54,7 +54,7 @@ User::User(const Anope::string &snick, const Anope::string &suid)
{
maxusercnt = usercnt;
maxusertime = time(NULL);
- if (Config.LogMaxUsers)
+ if (Config->LogMaxUsers)
Alog() << "user: New maximum user count: "<< maxusercnt;
}
@@ -190,7 +190,7 @@ User::~User()
this->Logout();
- if (Config.LogUsers)
+ if (Config->LogUsers)
{
Anope::string srealname = normalizeBuffer(this->realname);
@@ -207,7 +207,7 @@ User::~User()
while (!this->chans.empty())
this->chans.front()->chan->DeleteUser(this);
- if (Config.LimitSessions && !this->server->IsULined())
+ if (Config->LimitSessions && !this->server->IsULined())
del_session(this->host);
UserListByNick.erase(this->nick);
@@ -244,7 +244,7 @@ void User::SendMessage(const Anope::string &source, const Anope::string &msg) co
* - The user is not registered and NSDefMsg is enabled
* - The user is registered and has set /ns set msg on
*/
- if (Config.UsePrivmsg && ((!this->nc && Config.NSDefFlags.HasFlag(NI_MSG)) || (this->nc && this->nc->HasFlag(NI_MSG))))
+ if (Config->UsePrivmsg && ((!this->nc && Config->NSDefFlags.HasFlag(NI_MSG)) || (this->nc && this->nc->HasFlag(NI_MSG))))
ircdproto->SendPrivmsg(findbot(source), this->nick, "%s", msg.c_str());
else
ircdproto->SendNotice(findbot(source), this->nick, "%s", msg.c_str());
@@ -317,14 +317,14 @@ void User::Collide(NickAlias *na)
do
{
- guestnick = Config.NSGuestNickPrefix + stringify(getrandom16());
+ guestnick = Config->NSGuestNickPrefix + stringify(getrandom16());
} while (finduser(guestnick));
- notice_lang(Config.s_NickServ, this, FORCENICKCHANGE_CHANGING, guestnick.c_str());
+ notice_lang(Config->s_NickServ, this, FORCENICKCHANGE_CHANGING, guestnick.c_str());
ircdproto->SendForceNickChange(this, guestnick, time(NULL));
}
else
- kill_user(Config.s_NickServ, this->nick, "Services nickname-enforcer kill");
+ kill_user(Config->s_NickServ, this->nick, "Services nickname-enforcer kill");
}
/** Check if the user should become identified because
@@ -726,7 +726,7 @@ User *do_nick(const Anope::string &source, const Anope::string &nick, const Anop
Server *serv = Server::Find(server);
- if (Config.LogUsers)
+ if (Config->LogUsers)
{
/**
* Ugly swap routine for Flop's bug :) XXX
@@ -770,7 +770,7 @@ User *do_nick(const Anope::string &source, const Anope::string &nick, const Anop
if (MOD_RESULT == EVENT_STOP)
return finduser(nick);
- if (Config.LimitSessions && !serv->IsULined())
+ if (Config->LimitSessions && !serv->IsULined())
add_session(nick, host, ipbuf);
XLineManager::CheckAll(user);
@@ -794,7 +794,7 @@ User *do_nick(const Anope::string &source, const Anope::string &nick, const Anop
user->isSuperAdmin = 0; /* Dont let people nick change and stay SuperAdmins */
Alog(LOG_DEBUG) << source << " changes nick to " << nick;
- if (Config.LogUsers)
+ if (Config->LogUsers)
{
Anope::string logrealname = normalizeBuffer(user->realname);
Alog() << "LOGUSERS: " << user->nick << " (" << user->GetIdent() << "@" << user->host << (ircd->vhost ? " => " : "") << (ircd->vhost ? user->GetDisplayedHost() : "") << ") (" << logrealname << ") changed nick to "
@@ -837,7 +837,7 @@ User *do_nick(const Anope::string &source, const Anope::string &nick, const Anop
user->UpdateHost();
do_on_id(user);
ircdproto->SetAutoIdentificationToken(user);
- Alog() << Config.s_NickServ << ": " << user->GetMask() << " automatically identified for group " << user->Account()->display;
+ Alog() << Config->s_NickServ << ": " << user->GetMask() << " automatically identified for group " << user->Account()->display;
}
if (ircd->sqline)
@@ -1084,7 +1084,7 @@ void UserSetInternalModes(User *user, int ac, const char **av)
if (add)
{
++opcnt;
- if (Config.WallOper)
+ if (Config->WallOper)
ircdproto->SendGlobops(OperServ, "\2%s\2 is now an IRC operator.", user->nick.c_str());
}
else