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.cpp14
1 files changed, 13 insertions, 1 deletions
diff --git a/modules/commands/cs_xop.cpp b/modules/commands/cs_xop.cpp
index aa04b8d28..1fc3cbdf0 100644
--- a/modules/commands/cs_xop.cpp
+++ b/modules/commands/cs_xop.cpp
@@ -291,7 +291,7 @@ class XOPBase : public Command
void DoDel(CommandSource &source, ChannelInfo *ci, const std::vector<Anope::string> &params, XOPType level)
{
NickCore *nc = source.nc;
- const Anope::string &mask = params.size() > 2 ? params[2] : "";
+ Anope::string mask = params.size() > 2 ? params[2] : "";
if (mask.empty())
{
@@ -319,6 +319,18 @@ class XOPBase : public Command
const ChanAccess *highest = access.Highest();
bool override = false;
+ if (mask.find_first_of("!*@") == Anope::string::npos && !findnick(mask))
+ {
+ User *targ = finduser(mask);
+ if (targ != NULL)
+ mask = "*!*@" + targ->GetDisplayedHost();
+ else
+ {
+ source.Reply(NICK_X_NOT_REGISTERED, mask.c_str());
+ return;
+ }
+ }
+
if ((!mask.equals_ci(nc->display) && !access.HasPriv("ACCESS_CHANGE") && !access.Founder) || ((!highest || tmp_access >= *highest) && !access.Founder))
{
if (source.HasPriv("chanserv/access/modify"))