]> git.netwichtig.de Git - user/henk/code/inspircd.git/blobdiff - src/modules/m_spanningtree/override_map.cpp
m_spanningtree Fix rare desync when a KILL crosses a message that has the killed...
[user/henk/code/inspircd.git] / src / modules / m_spanningtree / override_map.cpp
index 83d969b3ff4bb191cfbda0e2d677f285f83ee455..04fa4bcab31b53a61aaaab3b6b5e9abd3c25c102 100644 (file)
@@ -58,13 +58,14 @@ void ModuleSpanningTree::ShowMap(TreeServer* Current, User* user, int depth, int
        memset(myname, ' ', depth);
        int w = depth;
 
+       std::string servername = Current->GetName();
        if (IS_OPER(user))
        {
-               w += snprintf(myname + depth, 99 - depth, "%s (%s)", Current->GetName().c_str(), Current->GetID().c_str());
+               w += snprintf(myname + depth, 99 - depth, "%s (%s)", servername.c_str(), Current->GetID().c_str());
        }
        else
        {
-               w += snprintf(myname + depth, 99 - depth, "%s", Current->GetName().c_str());
+               w += snprintf(myname + depth, 99 - depth, "%s", servername.c_str());
        }
        memset(myname + w, ' ', 100 - w);
        if (w > maxnamew)
@@ -81,7 +82,7 @@ void ModuleSpanningTree::ShowMap(TreeServer* Current, User* user, int depth, int
                if (!IS_OPER(user)) {
                        if (child->Hidden)
                                continue;
-                       if ((Utils->HideULines) && (ServerInstance->ULine(child->GetName().c_str())))
+                       if ((Utils->HideULines) && (ServerInstance->ULine(child->GetName())))
                                continue;
                }
                ShowMap(child, user, depth, line, names, maxnamew, stats);