Improve the restrictchans error message.

This commit is contained in:
Sadie Powell 2024-10-07 14:16:09 +01:00
parent a2296c9141
commit 127ab6bffc

View File

@ -83,7 +83,8 @@ public:
// channel does not yet exist (record is null, about to be created IF we were to allow it)
if (!override && !chan && !CanCreateChannel(user, cname))
{
user->WriteNumeric(ERR_RESTRICTED, cname, "You are not allowed to create new channels.");
const auto* reason = allowregistered ? "logged into an account" : "a server operator";
user->WriteNumeric(ERR_RESTRICTED, cname, INSP_FORMAT("You must be {} to create new channels.", reason));
return MOD_RES_DENY;
}