mirror of
https://github.com/anope/anope.git
synced 2026-07-04 21:13:12 +02:00
Require at least user@host format for akills. Fix XLine::GetHost() not returning anything if an xline only has a host
This commit is contained in:
@@ -160,6 +160,11 @@ class CommandOSAKill : public Command
|
||||
source.Reply(USERHOST_MASK_TOO_WIDE, mask.c_str());
|
||||
return;
|
||||
}
|
||||
else if (mask.find('@') == Anope::string::npos)
|
||||
{
|
||||
source.Reply(BAD_USERHOST_MASK);
|
||||
return;
|
||||
}
|
||||
|
||||
if (Config->GetModule("operserv")->Get<bool>("addakiller", "yes") && !source.GetNick().empty())
|
||||
reason = "[" + source.GetNick() + "] " + reason;
|
||||
|
||||
+6
-1
@@ -103,7 +103,12 @@ Anope::string XLine::GetHost() const
|
||||
return this->mask.substr(host_t + 1);
|
||||
}
|
||||
else
|
||||
return "";
|
||||
{
|
||||
if (real_t != Anope::string::npos)
|
||||
return this->mask.substr(0, real_t);
|
||||
else
|
||||
return this->mask;
|
||||
}
|
||||
}
|
||||
|
||||
Anope::string XLine::GetReal() const
|
||||
|
||||
Reference in New Issue
Block a user