]> git.netwichtig.de Git - user/henk/code/inspircd.git/blobdiff - src/modules/m_spanningtree/main.cpp
m_permchannels Save channel TS, topic set time and set by information
[user/henk/code/inspircd.git] / src / modules / m_spanningtree / main.cpp
index e7892526e4a6027592209f90ebe657cffe64a57c..ce1792a02b6717a89a3939cafcb9b23fb57746f9 100644 (file)
@@ -271,8 +271,7 @@ void ModuleSpanningTree::ConnectServer(Link* x, Autoconnect* y)
                return;
        }
 
-       QueryType start_type = DNS_QUERY_A;
-       start_type = DNS_QUERY_AAAA;
+       QueryType start_type = DNS_QUERY_AAAA;
        if (strchr(x->IPAddr.c_str(),':'))
        {
                in6_addr n;
@@ -652,8 +651,7 @@ void ModuleSpanningTree::OnChangeName(User* user, const std::string &gecos)
 
 void ModuleSpanningTree::OnChangeIdent(User* user, const std::string &ident)
 {
-       // only occurs for local clients
-       if (user->registered != REG_ALL)
+       if ((user->registered != REG_ALL) || (!IS_LOCAL(user)))
                return;
 
        parameterlist params;
@@ -783,7 +781,7 @@ void ModuleSpanningTree::OnRehash(User* user)
                std::string msg = "Error in configuration: ";
                msg.append(e.GetReason());
                ServerInstance->SNO->WriteToSnoMask('l', msg);
-               if (!IS_LOCAL(user))
+               if (user && !IS_LOCAL(user))
                        ServerInstance->PI->SendSNONotice("L", msg);
        }
 }
@@ -817,6 +815,13 @@ void ModuleSpanningTree::OnUnloadModule(Module* mod)
                        sock->Close();
                }
        }
+
+       for (SpanningTreeUtilities::TimeoutList::const_iterator i = Utils->timeoutlist.begin(); i != Utils->timeoutlist.end(); ++i)
+       {
+               TreeSocket* sock = i->first;
+               if (sock->GetIOHook() == mod)
+                       sock->Close();
+       }
 }
 
 // note: the protocol does not allow direct umode +o except