1
0
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:
Adam
2014-04-24 01:38:45 -04:00
parent d52cc7bcbc
commit 00b2cc9ce6
2 changed files with 11 additions and 1 deletions
+5
View File
@@ -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
View File
@@ -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