aboutsummaryrefslogtreecommitdiffstats
path: root/src/modules/m_spanningtree
diff options
context:
space:
mode:
authorGravatar danieldg2009-09-17 23:50:43 +0000
committerGravatar danieldg2009-09-17 23:50:43 +0000
commit682808a251c56edc2f3fb6fff490f051e360f8bb (patch)
tree51d0fb5b6dae52ee33ec561c368eb0364245a5b3 /src/modules/m_spanningtree
parentPrevent fake users from quitting (diff)
downloadinspircd++-682808a251c56edc2f3fb6fff490f051e360f8bb.tar.gz
inspircd++-682808a251c56edc2f3fb6fff490f051e360f8bb.tar.bz2
inspircd++-682808a251c56edc2f3fb6fff490f051e360f8bb.zip
Remove SID from /map for non-opers, and add it to non-spanningtree for opers [dKingston]
git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@11745 e03df62e-2008-0410-955e-edbf42e46eb7
Diffstat (limited to 'src/modules/m_spanningtree')
-rw-r--r--src/modules/m_spanningtree/override_map.cpp11
1 files changed, 10 insertions, 1 deletions
diff --git a/src/modules/m_spanningtree/override_map.cpp b/src/modules/m_spanningtree/override_map.cpp
index 518c0e16a..147445c0c 100644
--- a/src/modules/m_spanningtree/override_map.cpp
+++ b/src/modules/m_spanningtree/override_map.cpp
@@ -48,7 +48,16 @@ void ModuleSpanningTree::ShowMap(TreeServer* Current, User* user, int depth, int
char* myname = names + 100 * line;
char* mystat = stats + 50 * line;
memset(myname, ' ', depth);
- int w = depth + snprintf(myname + depth, 99 - depth, "%s (%s)", Current->GetName().c_str(), Current->GetID().c_str());
+ int w = depth;
+
+ if (IS_OPER(user))
+ {
+ w += snprintf(myname + depth, 99 - depth, "%s (%s)", Current->GetName().c_str(), Current->GetID().c_str());
+ }
+ else
+ {
+ w += snprintf(myname + depth, 99 - depth, "%s", Current->GetName().c_str());
+ }
memset(myname + w, ' ', 100 - w);
if (w > maxnamew)
maxnamew = w;