diff options
| author | 2024-06-03 19:50:01 +0100 | |
|---|---|---|
| committer | 2024-06-03 19:50:01 +0100 | |
| commit | 1c014f7283429a604b180b893b496ad3be53ba61 (patch) | |
| tree | 9bca5ac104ea32b46f8fd481d507b00719364541 /src/mode.cpp | |
| parent | Update irctest. (diff) | |
Send an error when a user tries to give a status rank to a non-member.
Closes #2097.
Diffstat (limited to 'src/mode.cpp')
| -rw-r--r-- | src/mode.cpp | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/src/mode.cpp b/src/mode.cpp index 294059dfc..c12edede5 100644 --- a/src/mode.cpp +++ b/src/mode.cpp @@ -212,7 +212,10 @@ ModeAction PrefixMode::OnModeChange(User* source, User*, Channel* chan, std::str Membership* memb = chan->GetUser(target); if (!memb) + { + source->WriteNumeric(ERR_USERNOTINCHANNEL, target->nick, chan->name, "They are not on that channel"); return MODEACTION_DENY; + } parameter = target->nick; return (memb->SetPrefix(this, adding) ? MODEACTION_ALLOW : MODEACTION_DENY); |
