summaryrefslogtreecommitdiff
path: root/modules/extra
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 /modules/extra
parent2575008baa5c9d0ca789680da1a3b81dc74786f7 (diff)
Rewrote the config reader to better handle invalid configs.
This prevents Anope from exploding when /os reload has errors.
Diffstat (limited to 'modules/extra')
-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
9 files changed, 100 insertions, 100 deletions
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());
}
}