summaryrefslogtreecommitdiff
path: root/src/xline.cpp
diff options
context:
space:
mode:
authorAdam <Adam@anope.org>2014-04-24 01:38:45 -0400
committerAdam <Adam@anope.org>2014-04-24 01:38:45 -0400
commit00b2cc9ce6b9e4d4869d986ada1cf64d22b95455 (patch)
treeb40f63b8f09e1369777c163a2c7cbf7ea13cc15f /src/xline.cpp
parentd52cc7bcbcf9b99a58eedc823418a91f85e8cab9 (diff)
Require at least user@host format for akills. Fix XLine::GetHost() not returning anything if an xline only has a host
Diffstat (limited to 'src/xline.cpp')
-rw-r--r--src/xline.cpp7
1 files changed, 6 insertions, 1 deletions
diff --git a/src/xline.cpp b/src/xline.cpp
index ea74ba8c7..6b3ba90f4 100644
--- a/src/xline.cpp
+++ b/src/xline.cpp
@@ -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