summaryrefslogtreecommitdiff
path: root/modules/commands/ns_cert.cpp
diff options
context:
space:
mode:
authorAdam <Adam@anope.org>2012-04-23 05:08:26 -0400
committerAdam <Adam@anope.org>2012-04-23 05:08:26 -0400
commit573e49a7ead331219eb6f0d3ca9cf83e793a5c9c (patch)
treee145e04fa3d041cf92ce46da4ac790b63231059c /modules/commands/ns_cert.cpp
parent63c639e108a00d7dbb0d7ac9891684fc83a3b207 (diff)
Reworked live SQL support yet again
Diffstat (limited to 'modules/commands/ns_cert.cpp')
-rw-r--r--modules/commands/ns_cert.cpp16
1 files changed, 9 insertions, 7 deletions
diff --git a/modules/commands/ns_cert.cpp b/modules/commands/ns_cert.cpp
index 6ad106161..2117ed994 100644
--- a/modules/commands/ns_cert.cpp
+++ b/modules/commands/ns_cert.cpp
@@ -16,7 +16,7 @@
class CommandNSCert : public Command
{
private:
- void DoServAdminList(CommandSource &source, NickCore *nc)
+ void DoServAdminList(CommandSource &source, const NickCore *nc)
{
if (nc->cert.empty())
{
@@ -112,7 +112,7 @@ class CommandNSCert : public Command
return;
}
- void DoList(CommandSource &source, NickCore *nc)
+ void DoList(CommandSource &source, const NickCore *nc)
{
User *u = source.u;
@@ -154,18 +154,20 @@ class CommandNSCert : public Command
const Anope::string &cmd = params[0];
const Anope::string &mask = params.size() > 1 ? params[1] : "";
- NickAlias *na;
+ const NickAlias *na;
if (cmd.equals_ci("LIST") && u->IsServicesOper() && !mask.empty() && (na = findnick(mask)))
return this->DoServAdminList(source, na->nc);
+ NickCore *nc = u->Account();
+
if (u->Account()->HasFlag(NI_SUSPENDED))
source.Reply(NICK_X_SUSPENDED, u->Account()->display.c_str());
else if (cmd.equals_ci("ADD"))
- return this->DoAdd(source, u->Account(), mask);
+ return this->DoAdd(source, nc, mask);
else if (cmd.equals_ci("DEL"))
- return this->DoDel(source, u->Account(), mask);
+ return this->DoDel(source, nc, mask);
else if (cmd.equals_ci("LIST"))
- return this->DoList(source, u->Account());
+ return this->DoList(source, nc);
else
this->OnSyntaxError(source, cmd);
@@ -203,7 +205,7 @@ class NSCert : public Module
void DoAutoIdentify(User *u)
{
- BotInfo *bi = findbot(Config->NickServ);
+ const BotInfo *bi = findbot(Config->NickServ);
NickAlias *na = findnick(u->nick);
if (!bi || !na)
return;