X-Git-Url: https://git.netwichtig.de/gitweb/?a=blobdiff_plain;f=src%2Fmodules%2Fm_anticaps.cpp;h=2c39dce98022c57d3d00a3f413d9c943e9a338cf;hb=d494fa6e094e85cd29235e995fb2b447d6e1f168;hp=0d224551fc86c145ffe3ff4ac74d5b85543dd443;hpb=aa692dc1039b63deef7886e914ec499abe7facaf;p=user%2Fhenk%2Fcode%2Finspircd.git diff --git a/src/modules/m_anticaps.cpp b/src/modules/m_anticaps.cpp index 0d224551f..2c39dce98 100644 --- a/src/modules/m_anticaps.cpp +++ b/src/modules/m_anticaps.cpp @@ -2,7 +2,7 @@ * InspIRCd -- Internet Relay Chat Daemon * * Copyright (C) 2019 Robby - * Copyright (C) 2018-2019 Sadie Powell + * Copyright (C) 2018-2020 Sadie Powell * * This file is part of InspIRCd. InspIRCd is free software: you can * redistribute it and/or modify it under the terms of the GNU General Public @@ -175,7 +175,7 @@ class ModuleAntiCaps : public Module void InformUser(Channel* channel, User* user, const std::string& message) { - user->WriteNumeric(ERR_CANNOTSENDTOCHAN, channel->name, message + " and was blocked."); + user->WriteNumeric(Numerics::CannotSendTo(channel, message + " and was blocked.")); } public: @@ -190,7 +190,7 @@ class ModuleAntiCaps : public Module ConfigTag* tag = ServerInstance->Config->ConfValue("anticaps"); uppercase.reset(); - const std::string upper = tag->getString("uppercase", "ABCDEFGHIJKLMNOPQRSTUVWXYZ"); + const std::string upper = tag->getString("uppercase", "ABCDEFGHIJKLMNOPQRSTUVWXYZ", 1); for (std::string::const_iterator iter = upper.begin(); iter != upper.end(); ++iter) uppercase.set(static_cast(*iter)); @@ -299,7 +299,7 @@ class ModuleAntiCaps : public Module Version GetVersion() CXX11_OVERRIDE { - return Version("Provides support for punishing users that send capitalised messages", VF_COMMON|VF_VENDOR); + return Version("Adds channel mode B (anticaps) which allows channels to block messages which are excessively capitalised.", VF_COMMON|VF_VENDOR); } };