summaryrefslogtreecommitdiff
path: root/modules
diff options
context:
space:
mode:
Diffstat (limited to 'modules')
-rw-r--r--modules/operserv/sxline.cpp14
1 files changed, 8 insertions, 6 deletions
diff --git a/modules/operserv/sxline.cpp b/modules/operserv/sxline.cpp
index d461728a5..581599229 100644
--- a/modules/operserv/sxline.cpp
+++ b/modules/operserv/sxline.cpp
@@ -307,14 +307,15 @@ class CommandOSSNLine : public CommandOSSXLineBase
if (Config->GetModule("operserv")->Get<bool>("addakiller", "yes") && !source.GetNick().empty())
reason = "[" + source.GetNick() + "] " + reason;
- if (!this->xlm()->CanAdd(source, mask, expires, reason))
- return;
- else if (mask.find_first_not_of("/.*?") == Anope::string::npos)
+ if (mask.find_first_not_of("/.*?") == Anope::string::npos)
{
source.Reply(_("\002{0}\002 coverage is too wide; please use a more specific mask."), mask);
return;
}
+ if (!this->xlm()->CanAdd(source, mask, expires, reason))
+ return;
+
XLine *x = Serialize::New<XLine *>();
x->SetMask(mask);
x->SetBy(source.GetNick());
@@ -518,14 +519,15 @@ class CommandOSSQLine : public CommandOSSXLineBase
if (Config->GetModule("operserv")->Get<bool>("addakiller", "yes") && !source.GetNick().empty())
reason = "[" + source.GetNick() + "] " + reason;
- if (!this->sqlines->CanAdd(source, mask, expires, reason))
- return;
- else if (mask.find_first_not_of("./?*") == Anope::string::npos)
+ if (mask.find_first_not_of("./?*") == Anope::string::npos)
{
source.Reply(_("\002{0}\002 coverage is too wide; please use a more specific mask."), mask);
return;
}
+ if (!this->sqlines->CanAdd(source, mask, expires, reason))
+ return;
+
XLine *x = Serialize::New<XLine *>();
x->SetMask(mask);
x->SetBy(source.GetNick());