From 1536c5cf60dd183fb5c98651decde381a91ada44 Mon Sep 17 00:00:00 2001 From: Adam Date: Sat, 18 Feb 2012 17:21:55 -0500 Subject: Add users hostmask to access lists not nick when access add is used on a non registered user --- modules/commands/cs_flags.cpp | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) (limited to 'modules/commands/cs_flags.cpp') diff --git a/modules/commands/cs_flags.cpp b/modules/commands/cs_flags.cpp index f5dc7fe1c..1dd10bbb6 100644 --- a/modules/commands/cs_flags.cpp +++ b/modules/commands/cs_flags.cpp @@ -89,7 +89,16 @@ class CommandCSFlags : public Command AccessGroup u_access = ci->AccessFor(u); 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; + } + } ChanAccess *current = NULL; std::set current_flags; -- cgit