]> git.netwichtig.de Git - user/henk/code/inspircd.git/blobdiff - src/modules/m_remove.cpp
m_remove, m_services_account Don't check whether nicks are u-lined, checking the...
[user/henk/code/inspircd.git] / src / modules / m_remove.cpp
index b84a906eb44112bfc292a3fa09f773a60b1f4e88..ae583315ac93efb2fc6b195a8ea8a33a94df7eeb 100644 (file)
@@ -88,7 +88,8 @@ class RemoveBase : public Command
 
                hasnokicks = (ServerInstance->Modules->Find("m_nokicks.so") && channel->IsModeSet('Q'));
 
-               if((ServerInstance->ULine(target->server) || ServerInstance->ULine(target->nick.c_str()))){
+               if (ServerInstance->ULine(target->server))
+               {
                        user->WriteNumeric(482, "%s %s :Only a u-line may remove a u-line from a channel.", user->nick.c_str(), channame);
                        return CMD_FAILURE;
                }
@@ -117,7 +118,7 @@ class RemoveBase : public Command
                                }
 
                                /* Build up the part reason string. */
-                               reason = std::string("Removed by ") + user->nick + ": " + reasonparam;
+                               reason = "Removed by " + user->nick + ": " + reasonparam;
 
                                channel->WriteChannelWithServ(ServerInstance->Config->ServerName.c_str(), "NOTICE %s :%s removed %s from the channel", channel->name.c_str(), user->nick.c_str(), target->nick.c_str());
                                target->WriteServ("NOTICE %s :*** %s removed you from %s with the message: %s", target->nick.c_str(), user->nick.c_str(), channel->name.c_str(), reasonparam.c_str());
@@ -219,8 +220,7 @@ class ModuleRemove : public Module
 
        virtual void OnRehash(User* user)
        {
-               ConfigReader conf;
-               supportnokicks = conf.ReadFlag("remove", "supportnokicks", 0);
+               supportnokicks = ServerInstance->Config->ConfValue("remove")->getBool("supportnokicks");
        }
 
        virtual ~ModuleRemove()