X-Git-Url: https://git.netwichtig.de/gitweb/?a=blobdiff_plain;f=src%2Fmodules%2Fm_nationalchars.cpp;h=7ee21b872b6016fd8d5715d45689a7be7e9a53c2;hb=3151d60c1ecc9462e4c335282ee6c31672f45111;hp=98b4b5fdce50e4177b8de9a338752c4581669ee5;hpb=33bf99090f7e3e8d3fa7f570c486f1f3d7670db9;p=user%2Fhenk%2Fcode%2Finspircd.git diff --git a/src/modules/m_nationalchars.cpp b/src/modules/m_nationalchars.cpp index 98b4b5fdc..7ee21b872 100644 --- a/src/modules/m_nationalchars.cpp +++ b/src/modules/m_nationalchars.cpp @@ -1,10 +1,16 @@ /* * InspIRCd -- Internet Relay Chat Daemon * - * Copyright (C) 2009 Daniel De Graaf - * Copyright (C) 2009 Dennis Friis - * Copyright (C) 2009 Craig Edwards + * Copyright (C) 2019 Matt Schatz + * Copyright (C) 2013, 2015, 2017, 2020 Sadie Powell + * Copyright (C) 2012-2016 Attila Molnar + * Copyright (C) 2012, 2019 Robby + * Copyright (C) 2011 jackmcbarn + * Copyright (C) 2009-2010 Daniel De Graaf + * Copyright (C) 2009 Uli Schlachter * Copyright (C) 2009 Robin Burchell + * Copyright (C) 2009 Dennis Friis + * Copyright (C) 2009 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 @@ -68,7 +74,7 @@ char utf8size(unsigned char * mb) /* Conditions added */ bool lwbNickHandler::Call(const std::string& nick) { - if (nick.empty()) + if (nick.empty() || isdigit(nick[0])) return false; const char* n = nick.c_str(); @@ -268,7 +274,7 @@ class ModuleNationalChars : public Module { ConfigTag* tag = ServerInstance->Config->ConfValue("nationalchars"); charset = tag->getString("file"); - std::string casemapping = tag->getString("casemapping", FileSystem::GetFileName(charset)); + std::string casemapping = tag->getString("casemapping", FileSystem::GetFileName(charset), 1); if (casemapping.find(' ') != std::string::npos) throw ModuleException(" must not contain any spaces!"); ServerInstance->Config->CaseMapping = casemapping; @@ -317,7 +323,7 @@ class ModuleNationalChars : public Module Version GetVersion() CXX11_OVERRIDE { - return Version("Provides an ability to have non-RFC1459 nicks & support for national CASEMAPPING", VF_VENDOR | VF_COMMON); + return Version("Allows the server administrator to define what characters are allowed in nicknames and channel names and how those characters should be compared in a case insensitive way.", VF_VENDOR | VF_COMMON); } /*make an array to check against it 8bit characters a bit faster. Whether allowed or uppercase (for your needs).*/