diff options
author | Sadie Powell <sadie@witchery.services> | 2023-10-12 19:09:44 +0100 |
---|---|---|
committer | Sadie Powell <sadie@witchery.services> | 2023-10-12 19:09:44 +0100 |
commit | 69a0f3bec2cfed1436385a41fe73b2a95f5bf64a (patch) | |
tree | a0f8a0074565ff24cc6876196e4b7e390f6add93 /modules | |
parent | 6119586920efb0fbafbaef73c13fd7afb2aa60e7 (diff) |
Fix removing entries by an alias in chanserv/access and chanserv/xop.
Diffstat (limited to 'modules')
-rw-r--r-- | modules/commands/cs_access.cpp | 7 | ||||
-rw-r--r-- | modules/commands/cs_xop.cpp | 7 |
2 files changed, 12 insertions, 2 deletions
diff --git a/modules/commands/cs_access.cpp b/modules/commands/cs_access.cpp index 1a6c93514..cab343057 100644 --- a/modules/commands/cs_access.cpp +++ b/modules/commands/cs_access.cpp @@ -229,7 +229,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) diff --git a/modules/commands/cs_xop.cpp b/modules/commands/cs_xop.cpp index 33b2f564e..e2a1994e8 100644 --- a/modules/commands/cs_xop.cpp +++ b/modules/commands/cs_xop.cpp @@ -246,7 +246,12 @@ class CommandCSXOP : public Command const ChanAccess *highest = access.Highest(); bool override = false; - 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) |