]> git.netwichtig.de Git - user/henk/code/inspircd.git/blobdiff - src/modules/m_spanningtree/utils.cpp
Remove current time parameter of the Timer constructor
[user/henk/code/inspircd.git] / src / modules / m_spanningtree / utils.cpp
index fd51fb6b4c9d88802b9f340846e9836937f7ce7e..d6dccba14b2e481e2416f4ed45740e5fd3366294 100644 (file)
@@ -128,7 +128,7 @@ TreeServer* SpanningTreeUtilities::FindServerID(const std::string &id)
 SpanningTreeUtilities::SpanningTreeUtilities(ModuleSpanningTree* C)
        : Creator(C), TreeRoot(NULL)
 {
-       ServerInstance->Timers->AddTimer(&RefreshTimer);
+       ServerInstance->Timers.AddTimer(&RefreshTimer);
 }
 
 CullResult SpanningTreeUtilities::cull()
@@ -214,7 +214,9 @@ bool SpanningTreeUtilities::DoOneToOne(const CmdBuilder& params, const std::stri
 void SpanningTreeUtilities::DoOneToOne(const CmdBuilder& params, Server* server)
 {
        TreeServer* ts = static_cast<TreeServer*>(server);
-       ts->GetSocket()->WriteLine(params);
+       TreeSocket* sock = ts->GetSocket();
+       if (sock)
+               sock->WriteLine(params);
 }
 
 void SpanningTreeUtilities::RefreshIPCache()
@@ -259,7 +261,6 @@ void SpanningTreeUtilities::ReadConfiguration()
        HideULines = security->getBool("hideulines");
        AnnounceTSChange = options->getBool("announcets");
        AllowOptCommon = options->getBool("allowmismatch");
-       ChallengeResponse = !security->getBool("disablehmac");
        quiet_bursts = ServerInstance->Config->ConfValue("performance")->getBool("quietbursts");
        PingWarnTime = options->getInt("pingwarning");
        PingFreq = options->getInt("serverpingfreq");
@@ -301,8 +302,8 @@ void SpanningTreeUtilities::ReadConfiguration()
                if (L->Name.find('.') == std::string::npos)
                        throw ModuleException("The link name '"+assign(L->Name)+"' is invalid as it must contain at least one '.' character");
 
-               if (L->Name.length() > 64)
-                       throw ModuleException("The link name '"+assign(L->Name)+"' is invalid as it is longer than 64 characters");
+               if (L->Name.length() > ServerInstance->Config->Limits.MaxHost)
+                       throw ModuleException("The link name '"+assign(L->Name)+"' is invalid as it is longer than " + ConvToStr(ServerInstance->Config->Limits.MaxHost) + " characters");
 
                if (L->RecvPass.empty())
                        throw ModuleException("Invalid configuration for server '"+assign(L->Name)+"', recvpass not defined");
@@ -363,7 +364,7 @@ Link* SpanningTreeUtilities::FindLink(const std::string& name)
        for (std::vector<reference<Link> >::iterator i = LinkBlocks.begin(); i != LinkBlocks.end(); ++i)
        {
                Link* x = *i;
-               if (InspIRCd::Match(x->Name.c_str(), name.c_str()))
+               if (InspIRCd::Match(x->Name.c_str(), name.c_str(), rfc_case_insensitive_map))
                {
                        return x;
                }