X-Git-Url: https://git.netwichtig.de/gitweb/?a=blobdiff_plain;ds=sidebyside;f=src%2Fmodules%2Fm_chghost.cpp;h=1ce2856011552357f70ff52de5522e49bab65926;hb=7d597daf0483f3396aca61f1f6f927cf81214ea5;hp=1a73af209215f4fba2bb0365d8ed857f915ba009;hpb=aa692dc1039b63deef7886e914ec499abe7facaf;p=user%2Fhenk%2Fcode%2Finspircd.git diff --git a/src/modules/m_chghost.cpp b/src/modules/m_chghost.cpp index 1a73af209..1ce285601 100644 --- a/src/modules/m_chghost.cpp +++ b/src/modules/m_chghost.cpp @@ -1,7 +1,7 @@ /* * InspIRCd -- Internet Relay Chat Daemon * - * Copyright (C) 2013-2014, 2017-2018 Sadie Powell + * Copyright (C) 2013-2014, 2017-2018, 2020 Sadie Powell * Copyright (C) 2012-2014, 2016 Attila Molnar * Copyright (C) 2012, 2019 Robby * Copyright (C) 2009, 2012 Daniel De Graaf @@ -98,16 +98,17 @@ class ModuleChgHost : public Module void ReadConfig(ConfigStatus& status) CXX11_OVERRIDE { - std::string hmap = ServerInstance->Config->ConfValue("hostname")->getString("charmap", "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz.-_/0123456789"); + ConfigTag* tag = ServerInstance->Config->ConfValue("hostname"); + const std::string hmap = tag->getString("charmap", "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz.-_/0123456789", 1); cmd.hostmap.reset(); - for (std::string::iterator n = hmap.begin(); n != hmap.end(); n++) + for (std::string::const_iterator n = hmap.begin(); n != hmap.end(); n++) cmd.hostmap.set(static_cast(*n)); } Version GetVersion() CXX11_OVERRIDE { - return Version("Provides the CHGHOST command", VF_OPTCOMMON | VF_VENDOR); + return Version("Adds the /CHGHOST command which allows server operators to change the displayed hostname of a user.", VF_OPTCOMMON | VF_VENDOR); } };