mirror of
https://github.com/anope/anope.git
synced 2026-06-12 18:54:47 +02:00
Use ProtocolException instead of setting Quitting manually.
This commit is contained in:
@@ -1768,11 +1768,7 @@ struct IRCDMessageSave final
|
||||
if (targ->server == Me && (bi = dynamic_cast<BotInfo *>(targ)))
|
||||
{
|
||||
if (last_collide == Anope::CurTime)
|
||||
{
|
||||
Anope::QuitReason = "Nick collision fight on " + targ->nick;
|
||||
Anope::Quitting = true;
|
||||
return;
|
||||
}
|
||||
throw ProtocolException("Nick collision fight on " + targ->nick);
|
||||
|
||||
IRCD->SendKill(Me, targ->nick, "Nick collision");
|
||||
IRCD->SendNickChange(targ, targ->nick);
|
||||
|
||||
+2
-5
@@ -208,11 +208,8 @@ void Kill::Run(MessageSource &source, const std::vector<Anope::string> ¶ms,
|
||||
static time_t last_time = 0;
|
||||
|
||||
if (last_time == Anope::CurTime)
|
||||
{
|
||||
Anope::QuitReason = "Kill loop detected. Is Anope U:Lined?";
|
||||
Anope::Quitting = true;
|
||||
return;
|
||||
}
|
||||
throw ProtocolException("Kill loop detected. Is Anope U:Lined?");
|
||||
|
||||
last_time = Anope::CurTime;
|
||||
|
||||
bi->OnKill();
|
||||
|
||||
Reference in New Issue
Block a user