From 00b2cc9ce6b9e4d4869d986ada1cf64d22b95455 Mon Sep 17 00:00:00 2001 From: Adam Date: Thu, 24 Apr 2014 01:38:45 -0400 Subject: Require at least user@host format for akills. Fix XLine::GetHost() not returning anything if an xline only has a host --- src/xline.cpp | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) (limited to 'src') 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 -- cgit