X-Git-Url: https://git.netwichtig.de/gitweb/?a=blobdiff_plain;f=src%2Fmodules%2Fm_chghost.cpp;h=d8f306699c1ae27a394926157c81682e278082a6;hb=80e81e3b81b779901fd9d67f8ae030ee30c0bcec;hp=6e498a8be1c0442d76435ca52bdec42d54ff36b6;hpb=77730fd5f09f8fc193205654c8bba84d34365670;p=user%2Fhenk%2Fcode%2Finspircd.git diff --git a/src/modules/m_chghost.cpp b/src/modules/m_chghost.cpp index 6e498a8be..d8f306699 100644 --- a/src/modules/m_chghost.cpp +++ b/src/modules/m_chghost.cpp @@ -1,9 +1,13 @@ /* * InspIRCd -- Internet Relay Chat Daemon * - * Copyright (C) 2007 Dennis Friis - * Copyright (C) 2007 Robin Burchell - * Copyright (C) 2004-2006 Craig Edwards + * 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 + * Copyright (C) 2007-2008 Robin Burchell + * Copyright (C) 2007, 2009 Dennis Friis + * Copyright (C) 2004-2006 Craig Edwards * * 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 @@ -33,7 +37,7 @@ class CommandChghost : public Command { allow_empty_last_param = false; flags_needed = 'o'; - syntax = " "; + syntax = " "; TRANSLATE2(TR_NICK, TR_TEXT); } @@ -94,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 support for 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); } };