summaryrefslogtreecommitdiff
path: root/modules/extra/ns_set_misc.cpp
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/ns_set_misc.cpp
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/ns_set_misc.cpp')
-rw-r--r--modules/extra/ns_set_misc.cpp12
1 files changed, 6 insertions, 6 deletions
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());
}
}