aboutsummaryrefslogtreecommitdiffstats
path: root/src/modules/m_permchannels.cpp
diff options
context:
space:
mode:
authorGravatar Peter Powell2019-03-25 13:23:50 +0000
committerGravatar Peter Powell2019-03-25 13:25:01 +0000
commit0b66cad1b04c104f3afb75cafd23faf4cb527a49 (patch)
treec78eac5a6c1a4f3f98cc08ad2b6a972f2b9c40f3 /src/modules/m_permchannels.cpp
parentAdd the User and Group options to the systemd service unit template file. (diff)
downloadinspircd++-0b66cad1b04c104f3afb75cafd23faf4cb527a49.tar.gz
inspircd++-0b66cad1b04c104f3afb75cafd23faf4cb527a49.tar.bz2
inspircd++-0b66cad1b04c104f3afb75cafd23faf4cb527a49.zip
m_permchannels: validate channel names properly.
Diffstat (limited to 'src/modules/m_permchannels.cpp')
-rw-r--r--src/modules/m_permchannels.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/modules/m_permchannels.cpp b/src/modules/m_permchannels.cpp
index a7be6df08..dc250e0d8 100644
--- a/src/modules/m_permchannels.cpp
+++ b/src/modules/m_permchannels.cpp
@@ -193,9 +193,9 @@ public:
std::string channel = tag->getString("channel");
std::string modes = tag->getString("modes");
- if ((channel.empty()) || (channel.length() > ServerInstance->Config->Limits.ChanMax))
+ if (!ServerInstance->IsChannel(channel))
{
- ServerInstance->Logs->Log(MODNAME, LOG_DEFAULT, "Ignoring permchannels tag with empty or too long channel name (\"" + channel + "\")");
+ ServerInstance->Logs->Log(MODNAME, LOG_DEFAULT, "Ignoring permchannels tag with invalid channel name (\"" + channel + "\")");
continue;
}