]> git.netwichtig.de Git - user/henk/code/inspircd.git/commitdiff
Remote map only works for opers. Fix problem where only part of the map is shown...
authorbrain <brain@e03df62e-2008-0410-955e-edbf42e46eb7>
Sun, 6 Apr 2008 21:50:03 +0000 (21:50 +0000)
committerbrain <brain@e03df62e-2008-0410-955e-edbf42e46eb7>
Sun, 6 Apr 2008 21:50:03 +0000 (21:50 +0000)
git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@9390 e03df62e-2008-0410-955e-edbf42e46eb7

src/modules/m_spanningtree/override_map.cpp

index 7963b45da85dd720e22da87af3581b2ebe9406e1..495b810f7f966528325bd7c303b23b052f332bd6 100644 (file)
@@ -92,16 +92,16 @@ void ModuleSpanningTree::ShowMap(TreeServer* Current, User* user, int depth, cha
                        ServerInstance->Logs->Log("map",DEBUG,"Hidden? %d HideULines? %d GetName %s", Current->GetChild(q)->Hidden, Utils->HideULines, Current->GetChild(q)->GetName().c_str());
                        if ((Current->GetChild(q)->Hidden) || ((Utils->HideULines) && (ServerInstance->ULine(Current->GetChild(q)->GetName().c_str()))))
                        {
-                               if (*user->oper)
+                               if (*user->oper || !IS_LOCAL(user))
                                {
-                                       ShowMap(Current->GetChild(q),user,(Utils->FlatLinks && (!*user->oper)) ? depth : depth+2,matrix,totusers,totservers);
+                                       ShowMap(Current->GetChild(q),user,(Utils->FlatLinks && (!*user->oper || !IS_LOCAL(user))) ? depth : depth+2,matrix,totusers,totservers);
                                        ServerInstance->Logs->Log("map",DEBUG,"Show to oper");
                                }
                                ServerInstance->Logs->Log("map",DEBUG,"Fall through");
                        }
                        else
                        {
-                               ShowMap(Current->GetChild(q),user,(Utils->FlatLinks && (!*user->oper)) ? depth : depth+2,matrix,totusers,totservers);
+                               ShowMap(Current->GetChild(q),user,(Utils->FlatLinks && (!*user->oper || !IS_LOCAL(user))) ? depth : depth+2,matrix,totusers,totservers);
                                ServerInstance->Logs->Log("map",DEBUG,"Show to non oper");
                        }
                }
@@ -121,7 +121,7 @@ void ModuleSpanningTree::ShowMap(TreeServer* Current, User* user, int depth, cha
 int ModuleSpanningTree::HandleMap(const char* const* parameters, int pcnt, User* user)
 {
        ServerInstance->Logs->Log("map",DEBUG,"HandleMap");
-       if (pcnt > 0)
+       if ((pcnt > 0) && (IS_OPER(user)))
        {
                ServerInstance->Logs->Log("remotemap", DEBUG, "remote map request for %s", parameters[0]);