mirror of
https://github.com/anope/anope.git
synced 2026-07-09 03:03:14 +02:00
Made access del and xop del behave like access add/xop add by using a users mask if given an unregistered nick
This commit is contained in:
@@ -186,7 +186,19 @@ class CommandCSAccess : public Command
|
||||
|
||||
void DoDel(CommandSource &source, ChannelInfo *ci, const std::vector<Anope::string> ¶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());
|
||||
|
||||
Reference in New Issue
Block a user