fix: /ban messages for self/mod bans (#4164)

This commit is contained in:
nerix
2022-11-19 14:34:07 +01:00
committed by GitHub
parent 9f5477c433
commit 9fba0bd4ab
4 changed files with 23 additions and 4 deletions
+13 -2
View File
@@ -2658,8 +2658,19 @@ void CommandController::initialize(Settings &, Paths &paths)
case Error::TargetBanned: {
// Equivalent IRC error
errorMessage = QString("%1 is already banned in this channel.")
.arg(userDisplayName);
errorMessage += QString("%1 is already banned in this channel.")
.arg(userDisplayName);
}
break;
case Error::CannotBanUser: {
// We can't provide the identical error as in IRC,
// because we don't have enough information about the user.
// The messages from IRC are formatted like this:
// "You cannot {op} moderator {mod} unless you are the owner of this channel."
// "You cannot {op} the broadcaster."
errorMessage += QString("You cannot %1 %2.")
.arg(operation, userDisplayName);
}
break;