From 8f36f65f39c6ea843c388af398ed0bbfe84d1207 Mon Sep 17 00:00:00 2001 From: Adam Date: Fri, 9 Nov 2012 19:20:17 -0500 Subject: Made access del and xop del behave like access add/xop add by using a users mask if given an unregistered nick --- modules/commands/cs_access.cpp | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) (limited to 'modules/commands/cs_access.cpp') diff --git a/modules/commands/cs_access.cpp b/modules/commands/cs_access.cpp index 295321f8b..40414a336 100644 --- a/modules/commands/cs_access.cpp +++ b/modules/commands/cs_access.cpp @@ -186,7 +186,19 @@ class CommandCSAccess : public Command void DoDel(CommandSource &source, ChannelInfo *ci, const std::vector ¶ms) { - const Anope::string &mask = params[2]; + Anope::string mask = params[2]; + + 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 (!ci->GetAccessCount()) source.Reply(_("%s access list is empty."), ci->name.c_str()); -- cgit