]> git.netwichtig.de Git - user/henk/code/inspircd.git/blobdiff - src/modules/m_chghost.cpp
m_remove, m_services_account Don't check whether nicks are u-lined, checking the...
[user/henk/code/inspircd.git] / src / modules / m_chghost.cpp
index c5f9e5da5899961c0172d54ac6d266cb661accf2..b259bea8eda01604c46ce6eb94f9ae6ac42ce126 100644 (file)
@@ -51,7 +51,7 @@ class CommandChghost : public Command
                {
                        if (!hostmap[(unsigned char)*x])
                        {
-                               user->WriteServ("NOTICE "+std::string(user->nick)+" :*** CHGHOST: Invalid characters in hostname");
+                               user->WriteServ("NOTICE "+user->nick+" :*** CHGHOST: Invalid characters in hostname");
                                return CMD_FAILURE;
                        }
                }
@@ -69,7 +69,7 @@ class CommandChghost : public Command
                        if ((dest->ChangeDisplayedHost(parameters[1].c_str())) && (!ServerInstance->ULine(user->server)))
                        {
                                // fix by brain - ulines set hosts silently
-                               ServerInstance->SNO->WriteGlobalSno('a', std::string(user->nick)+" used CHGHOST to make the displayed host of "+dest->nick+" become "+dest->dhost);
+                               ServerInstance->SNO->WriteGlobalSno('a', user->nick+" used CHGHOST to make the displayed host of "+dest->nick+" become "+dest->dhost);
                        }
                }
 
@@ -102,11 +102,7 @@ class ModuleChgHost : public Module
 
        void OnRehash(User* user)
        {
-               ConfigReader Conf;
-               std::string hmap = Conf.ReadValue("hostname", "charmap", 0);
-
-               if (hmap.empty())
-                       hmap = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz.-_/0123456789";
+               std::string hmap = ServerInstance->Config->ConfValue("hostname")->getString("charmap", "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz.-_/0123456789");
 
                memset(hostmap, 0, sizeof(hostmap));
                for (std::string::iterator n = hmap.begin(); n != hmap.end(); n++)