summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/commands/cmd_map.cpp7
-rw-r--r--src/modules/m_spanningtree/override_map.cpp11
2 files changed, 17 insertions, 1 deletions
diff --git a/src/commands/cmd_map.cpp b/src/commands/cmd_map.cpp
index edc8aa124..b6846954a 100644
--- a/src/commands/cmd_map.cpp
+++ b/src/commands/cmd_map.cpp
@@ -35,6 +35,13 @@ CmdResult CommandMap::Handle (const std::vector<std::string>&, User *user)
// as with /LUSERS this does nothing without a linking
// module to override its behaviour and display something
// better.
+
+ if (IS_OPER(user))
+ {
+ user->WriteNumeric(006, "%s :%s [%s]", user->nick.c_str(), ServerInstance->Config->ServerName, ServerInstance->Config->GetSID().c_str());
+ user->WriteNumeric(007, "%s :End of /MAP", user->nick.c_str());
+ return CMD_SUCCESS;
+ }
user->WriteNumeric(006, "%s :%s",user->nick.c_str(),ServerInstance->Config->ServerName);
user->WriteNumeric(007, "%s :End of /MAP",user->nick.c_str());
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;