X-Git-Url: https://git.netwichtig.de/gitweb/?a=blobdiff_plain;f=src%2Fmodules%2Fm_blockcolor.cpp;h=25345506e5a517faae5273543584f4b26c973056;hb=85182d727c0d549b9cf6659ad36dec70fcf02278;hp=43d0826dd7138954b28f61acb66d5bc00008bcd9;hpb=35b70631f0532a5828b04a8e0c02092a285f331a;p=user%2Fhenk%2Fcode%2Finspircd.git diff --git a/src/modules/m_blockcolor.cpp b/src/modules/m_blockcolor.cpp index 43d0826dd..25345506e 100644 --- a/src/modules/m_blockcolor.cpp +++ b/src/modules/m_blockcolor.cpp @@ -55,17 +55,11 @@ class ModuleBlockColor : public Module { for (std::string::iterator i = details.text.begin(); i != details.text.end(); i++) { - switch (*i) + // Block all control codes except \001 for CTCP + if ((*i >= 0) && (*i < 32) && (*i != 1)) { - case 2: - case 3: - case 15: - case 21: - case 22: - case 31: - user->WriteNumeric(ERR_CANNOTSENDTOCHAN, c->name, "Can't send colors to channel (+c set)"); - return MOD_RES_DENY; - break; + user->WriteNumeric(ERR_CANNOTSENDTOCHAN, c->name, "Can't send colors to channel (+c is set)"); + return MOD_RES_DENY; } } }