summaryrefslogtreecommitdiff
path: root/modules/commands/ns_cert.cpp
diff options
context:
space:
mode:
authorAdam <Adam@anope.org>2013-05-05 01:55:04 -0400
committerAdam <Adam@anope.org>2013-05-05 01:55:04 -0400
commit1d0bb9b26b7ad58ab0bf979ac046f4511b3bf12b (patch)
tree4486f0784bdf050fd7eb225c0cb9df352ce1f45a /modules/commands/ns_cert.cpp
parent781defb7076ddfddf723ca08cd0a518b6657b64f (diff)
Rework the config file reader to be much more flexible and move many configuration directives to the actual modules they are used in.
Diffstat (limited to 'modules/commands/ns_cert.cpp')
-rw-r--r--modules/commands/ns_cert.cpp10
1 files changed, 6 insertions, 4 deletions
diff --git a/modules/commands/ns_cert.cpp b/modules/commands/ns_cert.cpp
index 1191aaa9b..71836481a 100644
--- a/modules/commands/ns_cert.cpp
+++ b/modules/commands/ns_cert.cpp
@@ -13,6 +13,8 @@
#include "module.h"
+static unsigned accessmax;
+
class CommandNSCert : public Command
{
private:
@@ -54,9 +56,9 @@ class CommandNSCert : public Command
void DoAdd(CommandSource &source, NickCore *nc, const Anope::string &mask)
{
- if (nc->cert.size() >= Config->NSAccessMax)
+ if (nc->cert.size() >= Config->GetModule(this->owner)->Get<unsigned>("accessmax"))
{
- source.Reply(_("Sorry, you can only have %d certificate entries for a nickname."), Config->NSAccessMax);
+ source.Reply(_("Sorry, you can only have %d certificate entries for a nickname."), Config->GetModule(this->owner)->Get<unsigned>("accessmax"));
return;
}
@@ -179,7 +181,7 @@ class CommandNSCert : public Command
"If you connect to IRC and provide a client certificate with a\n"
"matching fingerprint in the cert list, your nick will be\n"
"automatically identified to %s.\n"
- " \n"), Config->NickServ.c_str(), Config->NickServ.c_str());
+ " \n"), NickServ ? NickServ->nick.c_str() : source.service->nick.c_str());
source.Reply(_("Examples:\n"
" \n"
" \002CERT ADD <fingerprint>\002\n"
@@ -191,7 +193,7 @@ class CommandNSCert : public Command
" Reverses the previous command.\n"
" \n"
" \002CERT LIST\002\n"
- " Displays the current certificate list."), Config->NickServ.c_str());
+ " Displays the current certificate list."));
return true;
}
};