summaryrefslogtreecommitdiff
path: root/modules/commands/cs_xop.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'modules/commands/cs_xop.cpp')
-rw-r--r--modules/commands/cs_xop.cpp11
1 files changed, 10 insertions, 1 deletions
diff --git a/modules/commands/cs_xop.cpp b/modules/commands/cs_xop.cpp
index 5ca488535..7935467c2 100644
--- a/modules/commands/cs_xop.cpp
+++ b/modules/commands/cs_xop.cpp
@@ -226,7 +226,16 @@ class XOPBase : public Command
}
if (mask.find_first_of("!*@") == Anope::string::npos && findnick(mask) == NULL)
- mask += "!*@*";
+ {
+ User *targ = finduser(mask);
+ if (targ != NULL)
+ mask = "*!*@" + targ->GetDisplayedHost();
+ else
+ {
+ source.Reply(NICK_X_NOT_REGISTERED, mask.c_str());
+ return;
+ }
+ }
for (unsigned i = 0; i < ci->GetAccessCount(); ++i)
{