From f28c467e95f68f7a1767ebb0bc6f6f12ae407f3a Mon Sep 17 00:00:00 2001 From: Sadie Powell Date: Sun, 5 Apr 2020 19:10:48 +0100 Subject: Send ERR_BANNEDFROMCHAN when a user can't create a restricted channel. Closes #1772. --- src/modules/m_restrictchans.cpp | 3 +++ 1 file changed, 3 insertions(+) (limited to 'src') diff --git a/src/modules/m_restrictchans.cpp b/src/modules/m_restrictchans.cpp index ae1091516..7bacda653 100644 --- a/src/modules/m_restrictchans.cpp +++ b/src/modules/m_restrictchans.cpp @@ -80,7 +80,10 @@ class ModuleRestrictChans : public Module { // channel does not yet exist (record is null, about to be created IF we were to allow it) if (!chan && !CanCreateChannel(user, cname)) + { + user->WriteNumeric(ERR_BANNEDFROMCHAN, cname, "You are not allowed to create new channels."); return MOD_RES_DENY; + } return MOD_RES_PASSTHRU; } -- cgit v1.2.3