aboutsummaryrefslogtreecommitdiffstats
path: root/src/modules/m_restrictchans.cpp
diff options
context:
space:
mode:
authorGravatar Sadie Powell2020-04-05 19:10:48 +0100
committerGravatar Sadie Powell2020-04-05 19:10:48 +0100
commitf28c467e95f68f7a1767ebb0bc6f6f12ae407f3a (patch)
treeef53d929a3b6edb3eb4b72c9d19cb6ae7983edbe /src/modules/m_restrictchans.cpp
parentVendor the optional-lite library. (diff)
downloadinspircd++-f28c467e95f68f7a1767ebb0bc6f6f12ae407f3a.tar.gz
inspircd++-f28c467e95f68f7a1767ebb0bc6f6f12ae407f3a.tar.bz2
inspircd++-f28c467e95f68f7a1767ebb0bc6f6f12ae407f3a.zip
Send ERR_BANNEDFROMCHAN when a user can't create a restricted channel.
Closes #1772.
Diffstat (limited to 'src/modules/m_restrictchans.cpp')
-rw-r--r--src/modules/m_restrictchans.cpp3
1 files changed, 3 insertions, 0 deletions
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;
}