X-Git-Url: https://git.netwichtig.de/gitweb/?a=blobdiff_plain;f=src%2Fmodules%2Fm_spanningtree%2Foverride_map.cpp;h=04fa4bcab31b53a61aaaab3b6b5e9abd3c25c102;hb=ee5e5aa77574a8e2cf9d142ccecf76de1fe72eb6;hp=8e3db116966b466b35fe8d761a0d101bfc1f8b23;hpb=2aeca99c6381ae7c8a2b98310accd96ad0d7f369;p=user%2Fhenk%2Fcode%2Finspircd.git diff --git a/src/modules/m_spanningtree/override_map.cpp b/src/modules/m_spanningtree/override_map.cpp index 8e3db1169..04fa4bcab 100644 --- a/src/modules/m_spanningtree/override_map.cpp +++ b/src/modules/m_spanningtree/override_map.cpp @@ -1,16 +1,24 @@ -/* +------------------------------------+ - * | Inspire Internet Relay Chat Daemon | - * +------------------------------------+ +/* + * InspIRCd -- Internet Relay Chat Daemon * - * InspIRCd: (C) 2002-2010 InspIRCd Development Team - * See: http://wiki.inspircd.org/Credits + * Copyright (C) 2009 Daniel De Graaf + * Copyright (C) 2007-2008 Craig Edwards + * Copyright (C) 2008 Robin Burchell * - * This program is free but copyrighted software; see - * the file COPYING for details. + * This file is part of InspIRCd. InspIRCd is free software: you can + * redistribute it and/or modify it under the terms of the GNU General Public + * License as published by the Free Software Foundation, version 2. * - * --------------------------------------------------- + * This program is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS + * FOR A PARTICULAR PURPOSE. See the GNU General Public License for more + * details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . */ + /* $ModDesc: Provides a spanning tree server link protocol */ #include "inspircd.h" @@ -50,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) @@ -73,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);