summaryrefslogtreecommitdiff
path: root/src/core/ns_set.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/core/ns_set.c')
-rw-r--r--src/core/ns_set.c18
1 files changed, 3 insertions, 15 deletions
diff --git a/src/core/ns_set.c b/src/core/ns_set.c
index 79561af76..1325f6b32 100644
--- a/src/core/ns_set.c
+++ b/src/core/ns_set.c
@@ -27,21 +27,9 @@ class CommandNSSet : public Command
return MOD_CONT;
}
- int i;
- NickAlias *na;
-
- /* First check whether param is a valid nick of the group */
- for (i = 0; i < nc->aliases.count; ++i)
- {
- na = static_cast<NickAlias *>(nc->aliases.list[i]);
- if (na->nick == param)
- {
- param = na->nick; /* Because case may differ */
- break;
- }
- }
-
- if (i == nc->aliases.count)
+ NickAlias *na = findnick(param);
+
+ if (!na || na->nc != nc)
{
notice_lang(Config.s_NickServ, u, NICK_SET_DISPLAY_INVALID);
return MOD_CONT;