summaryrefslogtreecommitdiff
path: root/modules/commands/cs_akick.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/cs_akick.cpp
parent63c639e108a00d7dbb0d7ac9891684fc83a3b207 (diff)
Reworked live SQL support yet again
Diffstat (limited to 'modules/commands/cs_akick.cpp')
-rw-r--r--modules/commands/cs_akick.cpp17
1 files changed, 8 insertions, 9 deletions
diff --git a/modules/commands/cs_akick.cpp b/modules/commands/cs_akick.cpp
index beaa8ffd3..107f97584 100644
--- a/modules/commands/cs_akick.cpp
+++ b/modules/commands/cs_akick.cpp
@@ -54,9 +54,9 @@ class CommandCSAKick : public Command
Anope::string mask = params[2];
Anope::string reason = params.size() > 3 ? params[3] : "";
- NickAlias *na = findnick(mask);
+ const NickAlias *na = findnick(mask);
NickCore *nc = NULL;
- AutoKick *akick;
+ const AutoKick *akick;
if (!na)
{
@@ -113,7 +113,7 @@ class CommandCSAKick : public Command
/* Match against the lastusermask of all nickalias's with equal
* or higher access. - Viper */
- for (nickalias_map::const_iterator it = NickAliasList.begin(), it_end = NickAliasList.end(); it != it_end; ++it)
+ for (nickalias_map::const_iterator it = NickAliasList->begin(), it_end = NickAliasList->end(); it != it_end; ++it)
{
na = it->second;
@@ -166,7 +166,6 @@ class CommandCSAKick : public Command
User *u = source.u;
const Anope::string &mask = params[2];
- AutoKick *akick;
unsigned i, end;
if (!ci->GetAkickCount())
@@ -218,12 +217,12 @@ class CommandCSAKick : public Command
}
else
{
- NickAlias *na = findnick(mask);
- NickCore *nc = na ? na->nc : NULL;
+ const NickAlias *na = findnick(mask);
+ const NickCore *nc = na ? *na->nc : NULL;
for (i = 0, end = ci->GetAkickCount(); i < end; ++i)
{
- akick = ci->GetAkick(i);
+ const AutoKick *akick = ci->GetAkick(i);
if ((akick->HasFlag(AK_ISNICK) && akick->nc == nc) || (!akick->HasFlag(AK_ISNICK) && mask.equals_ci(akick->mask)))
break;
@@ -267,7 +266,7 @@ class CommandCSAKick : public Command
if (!number || number > ci->GetAkickCount())
return;
- AutoKick *akick = ci->GetAkick(number - 1);
+ const AutoKick *akick = ci->GetAkick(number - 1);
Anope::string timebuf, lastused;
if (akick->addtime)
@@ -296,7 +295,7 @@ class CommandCSAKick : public Command
{
for (unsigned i = 0, end = ci->GetAkickCount(); i < end; ++i)
{
- AutoKick *akick = ci->GetAkick(i);
+ const AutoKick *akick = ci->GetAkick(i);
if (!mask.empty())
{