diff options
author | Adam <Adam@anope.org> | 2014-12-05 17:27:08 -0500 |
---|---|---|
committer | Adam <Adam@anope.org> | 2014-12-05 17:27:08 -0500 |
commit | afffeb0a1d49c1ac8f06ac9850929a41a52cbc7e (patch) | |
tree | dc8bdbcc0ce4faf5b8e10bf071606d9870edf429 | |
parent | 4fc71bb22f77930885b11182ad34705d1160efc0 (diff) |
Update Kill() calls to pass source pointer instead of name
-rw-r--r-- | modules/commands/ns_recover.cpp | 2 | ||||
-rw-r--r-- | modules/commands/os_defcon.cpp | 4 | ||||
-rw-r--r-- | modules/commands/os_kill.cpp | 2 | ||||
-rw-r--r-- | modules/commands/os_noop.cpp | 4 | ||||
-rw-r--r-- | modules/commands/os_session.cpp | 2 | ||||
-rw-r--r-- | modules/commands/os_sxline.cpp | 4 | ||||
-rw-r--r-- | modules/pseudoclients/nickserv.cpp | 7 | ||||
-rw-r--r-- | src/messages.cpp | 2 | ||||
-rw-r--r-- | src/users.cpp | 2 |
9 files changed, 14 insertions, 15 deletions
diff --git a/modules/commands/ns_recover.cpp b/modules/commands/ns_recover.cpp index a412ad96a..b676ae5fd 100644 --- a/modules/commands/ns_recover.cpp +++ b/modules/commands/ns_recover.cpp @@ -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.")); diff --git a/modules/commands/os_defcon.cpp b/modules/commands/os_defcon.cpp index 71ee59b91..90cd877b7 100644 --- a/modules/commands/os_defcon.cpp +++ b/modules/commands/os_defcon.cpp @@ -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"); } } } diff --git a/modules/commands/os_kill.cpp b/modules/commands/os_kill.cpp index 23d78d459..718ccebde 100644 --- a/modules/commands/os_kill.cpp +++ b/modules/commands/os_kill.cpp @@ -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); } } diff --git a/modules/commands/os_noop.cpp b/modules/commands/os_noop.cpp index 560f68f27..e0645f1c2 100644 --- a/modules/commands/os_noop.cpp +++ b/modules/commands/os_noop.cpp @@ -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); } } }; diff --git a/modules/commands/os_session.cpp b/modules/commands/os_session.cpp index 6e21a77c7..4dd2954a0 100644 --- a/modules/commands/os_session.cpp +++ b/modules/commands/os_session.cpp @@ -727,7 +727,7 @@ class OSSession : public Module } else { - u->Kill(OperServ ? OperServ->nick : "", "Session limit exceeded"); + u->Kill(OperServ, "Session limit exceeded"); } } } diff --git a/modules/commands/os_sxline.cpp b/modules/commands/os_sxline.cpp index 6b05ad241..80b7c5586 100644 --- a/modules/commands/os_sxline.cpp +++ b/modules/commands/os_sxline.cpp @@ -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); } } diff --git a/modules/pseudoclients/nickserv.cpp b/modules/pseudoclients/nickserv.cpp index f43aa7b4a..c51a15360 100644 --- a/modules/pseudoclients/nickserv.cpp +++ b/modules/pseudoclients/nickserv.cpp @@ -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 diff --git a/src/messages.cpp b/src/messages.cpp index 1c48c6288..d40b11188 100644 --- a/src/messages.cpp +++ b/src/messages.cpp @@ -203,7 +203,7 @@ void Kill::Run(MessageSource &source, const std::vector<Anope::string> ¶ms) 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> ¶ms) diff --git a/src/users.cpp b/src/users.cpp index 2a04fca20..8ec13d8c0 100644 --- a/src/users.cpp +++ b/src/users.cpp @@ -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; } |