summaryrefslogtreecommitdiff
path: root/src/modules
diff options
context:
space:
mode:
authorSadie Powell <sadie@witchery.services>2021-02-18 04:10:14 +0000
committerSadie Powell <sadie@witchery.services>2021-02-18 04:10:14 +0000
commit67215adc97f70b86300833ce891b47ba8fadd92c (patch)
treed0c595f076dc3de3c5a4e45b9844f56673ef0b48 /src/modules
parentfa0256cc807bbc6ee825d2cea2ec1adde6913fe3 (diff)
Fix the numeric sent when a U-lined alias target is not online.
Diffstat (limited to 'src/modules')
-rw-r--r--src/modules/m_alias.cpp5
1 files changed, 3 insertions, 2 deletions
diff --git a/src/modules/m_alias.cpp b/src/modules/m_alias.cpp
index df7add05c..478bfb3d9 100644
--- a/src/modules/m_alias.cpp
+++ b/src/modules/m_alias.cpp
@@ -286,17 +286,18 @@ class ModuleAlias : public Module
if (!a->RequiredNick.empty())
{
+ int numeric = a->ULineOnly ? ERR_NOSUCHSERVICE : ERR_NOSUCHNICK;
User* u = ServerInstance->FindNickOnly(a->RequiredNick);
if (!u)
{
- user->WriteNumeric(ERR_NOSUCHNICK, a->RequiredNick, "is currently unavailable. Please try again later.");
+ user->WriteNumeric(numeric, a->RequiredNick, "is currently unavailable. Please try again later.");
return 1;
}
if ((a->ULineOnly) && (!u->server->IsULine()))
{
ServerInstance->SNO->WriteToSnoMask('a', "NOTICE -- Service "+a->RequiredNick+" required by alias "+a->AliasedCommand+" is not on a U-lined server, possibly underhanded antics detected!");
- user->WriteNumeric(ERR_NOSUCHNICK, a->RequiredNick, "is not a network service! Please inform a server operator as soon as possible.");
+ user->WriteNumeric(numeric, a->RequiredNick, "is not a network service! Please inform a server operator as soon as possible.");
return 1;
}
}