summaryrefslogtreecommitdiff
path: root/modules/commands/cs_access.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'modules/commands/cs_access.cpp')
-rw-r--r--modules/commands/cs_access.cpp7
1 files changed, 6 insertions, 1 deletions
diff --git a/modules/commands/cs_access.cpp b/modules/commands/cs_access.cpp
index f1d132963..7a37c5434 100644
--- a/modules/commands/cs_access.cpp
+++ b/modules/commands/cs_access.cpp
@@ -230,7 +230,12 @@ class CommandCSAccess : public Command
{
Anope::string mask = params[2];
- if (!isdigit(mask[0]) && mask.find_first_of("#!*@") == Anope::string::npos && !NickAlias::Find(mask))
+ const NickAlias *na = NickAlias::Find(mask);
+ if (na && na->nc)
+ {
+ mask = na->nc->display;
+ }
+ else if (!isdigit(mask[0]) && mask.find_first_of("#!*@") == Anope::string::npos)
{
User *targ = User::Find(mask, true);
if (targ != NULL)