]> git.netwichtig.de Git - user/henk/code/inspircd.git/blobdiff - src/modules/m_tline.cpp
Attach to events and register services in init()
[user/henk/code/inspircd.git] / src / modules / m_tline.cpp
index aca95c0a1439168d91c1160e7115a936fd2a81d8..a51776527c50d9c346cd7d2803e418f922c53d16 100644 (file)
@@ -49,7 +49,7 @@ class CommandTline : public Command
                        }
                        else
                        {
-                               std::string host = std::string(u->second->ident) + "@" + u->second->GetIPString();
+                               std::string host = u->second->ident + "@" + u->second->GetIPString();
                                if (InspIRCd::MatchCIDR(host, parameters[0]))
                                {
                                        n_matched++;
@@ -73,9 +73,12 @@ class ModuleTLine : public Module
        ModuleTLine()
                : cmd(this)
        {
-               ServerInstance->AddCommand(&cmd);
        }
 
+       void init()
+       {
+               ServerInstance->AddCommand(&cmd);
+       }
 
        virtual ~ModuleTLine()
        {