diff options
author | Peter Powell <petpow@saberuk.com> | 2019-03-25 13:23:50 +0000 |
---|---|---|
committer | Peter Powell <petpow@saberuk.com> | 2019-03-25 13:25:01 +0000 |
commit | 0b66cad1b04c104f3afb75cafd23faf4cb527a49 (patch) | |
tree | c78eac5a6c1a4f3f98cc08ad2b6a972f2b9c40f3 /src | |
parent | 94ce90c588b7d919102a91d3e0f6df4188ae417b (diff) |
m_permchannels: validate channel names properly.
Diffstat (limited to 'src')
-rw-r--r-- | src/modules/m_permchannels.cpp | 4 |
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; } |