diff options
| author | 2021-02-28 19:16:40 +0000 | |
|---|---|---|
| committer | 2021-02-28 19:16:40 +0000 | |
| commit | c22c7e5a99c8f913c12cad13977d7c56fa7ee8e4 (patch) | |
| tree | b044fa7ab25ac5cf769e5eb6dfa4dda85030794d /src/modules/m_alias.cpp | |
| parent | Merge branch 'insp3' into master. (diff) | |
| parent | Fix running configure on systems with old versions of Perl. (diff) | |
Merge branch 'insp3' into master.
Diffstat (limited to 'src/modules/m_alias.cpp')
| -rw-r--r-- | src/modules/m_alias.cpp | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/src/modules/m_alias.cpp b/src/modules/m_alias.cpp index f4d4ad680..12a6ba833 100644 --- a/src/modules/m_alias.cpp +++ b/src/modules/m_alias.cpp @@ -2,8 +2,8 @@ * InspIRCd -- Internet Relay Chat Daemon * * Copyright (C) 2018-2019 linuxdaemon <linuxdaemon.irc@gmail.com> - * Copyright (C) 2013-2016, 2018 Attila Molnar <attilamolnar@hush.com> - * Copyright (C) 2013, 2015-2019 Sadie Powell <sadie@witchery.services> + * Copyright (C) 2013-2015, 2018 Attila Molnar <attilamolnar@hush.com> + * Copyright (C) 2013, 2015-2019, 2021 Sadie Powell <sadie@witchery.services> * Copyright (C) 2012, 2019 Robby <robby@chatbelgie.be> * Copyright (C) 2009-2010 Daniel De Graaf <danieldg@inspircd.org> * Copyright (C) 2009 Matt Smith <dz@inspircd.org> @@ -279,17 +279,18 @@ class ModuleAlias : public Module if (!a.RequiredNick.empty()) { + int numeric = a.ServiceOnly ? ERR_NOSUCHSERVICE : ERR_NOSUCHNICK; User* u = ServerInstance->Users.FindNick(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.ServiceOnly) && (!u->server->IsService())) { 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; } } |
