1
0
mirror of https://github.com/anope/anope.git synced 2026-07-02 04:46:39 +02:00

Update Kill() calls to pass source pointer instead of name

This commit is contained in:
Adam
2014-12-05 17:27:08 -05:00
parent 4fc71bb22f
commit afffeb0a1d
9 changed files with 14 additions and 15 deletions
+1 -1
View File
@@ -72,7 +72,7 @@ class NSRecoverRequest : public IdentifyRequest
source.GetNick().c_str(), source.GetNick().c_str());
Anope::string buf = source.command.upper() + " command used by " + source.GetNick();
u->Kill(source.service->nick, buf);
u->Kill(*source.service, buf);
source.Reply(_("Ghost with your nick has been killed."));
+2 -2
View File
@@ -499,7 +499,7 @@ class OSDefcon : public Module
if (DConfig.Check(DEFCON_NO_NEW_CLIENTS) || DConfig.Check(DEFCON_AKILL_NEW_CLIENTS))
{
u->Kill(OperServ ? OperServ->nick : "", DConfig.akillreason);
u->Kill(OperServ, DConfig.akillreason);
return;
}
@@ -530,7 +530,7 @@ class OSDefcon : public Module
}
else
{
u->Kill(OperServ ? OperServ->nick : "", "Defcon session limit exceeded");
u->Kill(OperServ, "Defcon session limit exceeded");
}
}
}
+1 -1
View File
@@ -37,7 +37,7 @@ class CommandOSKill : public Command
if (Config->GetModule("operserv")->Get<bool>("addakiller"))
reason = "(" + source.GetNick() + ") " + reason;
Log(LOG_ADMIN, source, this) << "on " << u2->nick << " for " << reason;
u2->Kill(source.service->nick, reason);
u2->Kill(*source.service, reason);
}
}
+2 -2
View File
@@ -47,7 +47,7 @@ class CommandOSNOOP : public Command
User *u2 = it->second;
if (u2->server == s && u2->HasMode("OPER"))
u2->Kill(source.service->nick, reason);
u2->Kill(*source.service, reason);
}
}
else if (cmd.equals_ci("REVOKE"))
@@ -92,7 +92,7 @@ class OSNOOP : public Module
{
Anope::string reason = "NOOP command used by " + *setter;
BotInfo *OperServ = Config->GetClient("OperServ");
u->Kill(OperServ ? OperServ->nick : "", reason);
u->Kill(OperServ, reason);
}
}
};
+1 -1
View File
@@ -727,7 +727,7 @@ class OSSession : public Module
}
else
{
u->Kill(OperServ ? OperServ->nick : "", "Session limit exceeded");
u->Kill(OperServ, "Session limit exceeded");
}
}
}
+2 -2
View File
@@ -399,7 +399,7 @@ class CommandOSSNLine : public CommandOSSXLineBase
User *user = it->second;
if (!user->HasMode("OPER") && user->server != Me && this->xlm()->Check(user, x))
user->Kill(Me->GetName(), rreason);
user->Kill(Me, rreason);
}
this->xlm()->Send(NULL, x);
@@ -631,7 +631,7 @@ class CommandOSSQLine : public CommandOSSXLineBase
User *user = it->second;
if (!user->HasMode("OPER") && user->server != Me && this->xlm()->Check(user, x))
user->Kill(Me->GetName(), rreason);
user->Kill(Me, rreason);
}
}
+3 -4
View File
@@ -243,16 +243,15 @@ class NickServCore : public Module, public NickServService
while (User::Find(guestnick) && i++ < 10);
if (i == 11)
u->Kill(NickServ ? NickServ->nick : "", "Services nickname-enforcer kill");
u->Kill(*NickServ, "Services nickname-enforcer kill");
else
{
if (NickServ)
u->SendMessage(NickServ, _("Your nickname is now being changed to \002%s\002"), guestnick.c_str());
u->SendMessage(*NickServ, _("Your nickname is now being changed to \002%s\002"), guestnick.c_str());
IRCD->SendForceNickChange(u, guestnick, Anope::CurTime);
}
}
else
u->Kill(NickServ ? NickServ->nick : "", "Services nickname-enforcer kill");
u->Kill(*NickServ, "Services nickname-enforcer kill");
}
void Release(NickAlias *na) anope_override
+1 -1
View File
@@ -203,7 +203,7 @@ void Kill::Run(MessageSource &source, const std::vector<Anope::string> &params)
bi->OnKill();
}
else
u->KillInternal(source.GetSource(), params[1]);
u->KillInternal(source, params[1]);
}
void Message::Mode::Run(MessageSource &source, const std::vector<Anope::string> &params)
+1 -1
View File
@@ -805,7 +805,7 @@ bool User::BadPassword()
this->invalid_pw_time = Anope::CurTime;
if (this->invalid_pw_count >= Config->GetBlock("options")->Get<int>("badpasslimit"))
{
this->Kill(Me->GetName(), "Too many invalid passwords");
this->Kill(Me, "Too many invalid passwords");
return true;
}