diff options
| author | 2017-12-19 14:15:30 -0800 | |
|---|---|---|
| committer | 2017-12-22 00:35:09 -0800 | |
| commit | 026c579e4cac7d4545b3c8c3a0d690c8509dc713 (patch) | |
| tree | d92941491ef510a9ec8ff317a9002429ae96a33e /src/modules/m_remove.cpp | |
| parent | Rename <security:hidewhois> to <security:hideserver>. (diff) | |
| download | inspircd++-026c579e4cac7d4545b3c8c3a0d690c8509dc713.tar.gz inspircd++-026c579e4cac7d4545b3c8c3a0d690c8509dc713.tar.bz2 inspircd++-026c579e4cac7d4545b3c8c3a0d690c8509dc713.zip | |
Fixed misc. instances of ERR_NOSUCHNICK instead of channel numerics
Per #1122
Diffstat (limited to 'src/modules/m_remove.cpp')
| -rw-r--r-- | src/modules/m_remove.cpp | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/src/modules/m_remove.cpp b/src/modules/m_remove.cpp index dfe624702..0d816cc41 100644 --- a/src/modules/m_remove.cpp +++ b/src/modules/m_remove.cpp @@ -74,9 +74,14 @@ class RemoveBase : public Command channel = ServerInstance->FindChan(channame); /* Fix by brain - someone needs to learn to validate their input! */ - if ((!target) || (target->registered != REG_ALL) || (!channel)) + if (!channel) { - user->WriteNumeric(Numerics::NoSuchNick(channel ? username.c_str() : channame.c_str())); + user->WriteNumeric(Numerics::NoSuchChannel(channame)); + return CMD_FAILURE; + } + if ((!target) || (target->registered != REG_ALL)) + { + user->WriteNumeric(Numerics::NoSuchNick(username)); return CMD_FAILURE; } |
