From a3912ad8aa274fca0b1a21d5b4f7427484046f20 Mon Sep 17 00:00:00 2001 From: brain Date: Mon, 20 Feb 2006 22:02:18 +0000 Subject: Fix for hide-ulines in /links git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@3265 e03df62e-2008-0410-955e-edbf42e46eb7 --- src/modules/m_spanningtree.cpp | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'src') diff --git a/src/modules/m_spanningtree.cpp b/src/modules/m_spanningtree.cpp index cbef34ff7..9397b6b59 100644 --- a/src/modules/m_spanningtree.cpp +++ b/src/modules/m_spanningtree.cpp @@ -2757,7 +2757,7 @@ class ModuleSpanningTree : public Module } for (unsigned int q = 0; q < Current->ChildCount(); q++) { - if ((HideULines) && (Srv->IsUlined(Current->GetName()))) + if ((HideULines) && (Srv->IsUlined(Current->GetChild(q)))) { if (*user->oper) { @@ -2769,6 +2769,9 @@ class ModuleSpanningTree : public Module ShowLinks(Current->GetChild(q),user,hops+1); } } + /* Don't display the line if its a uline, hide ulines is on, and the user isnt an oper */ + if ((HideULines) && (Srv->IsUlined(Current->GetName())) && (!*user->oper)) + return; WriteServ(user->fd,"364 %s %s %s :%d %s",user->nick,Current->GetName().c_str(),(FlatLinks && (!*user->oper)) ? Srv->GetServerName().c_str() : Parent.c_str(),(FlatLinks && (!*user->oper)) ? 0 : hops,Current->GetDesc().c_str()); } -- cgit v1.2.3