]> git.netwichtig.de Git - user/henk/code/inspircd.git/blobdiff - src/modules/m_spanningtree/netburst.cpp
m_spanningtree Specify the uuid of the remote user when sending server NOTICE/PRIVMSG...
[user/henk/code/inspircd.git] / src / modules / m_spanningtree / netburst.cpp
index 82b6c2b685e1268f83ce68af8c09ee8f727a882c..b1b55c986d699a116c5e9dd87610e394d8c9b427 100644 (file)
@@ -1,16 +1,24 @@
-/*       +------------------------------------+
- *       | Inspire Internet Relay Chat Daemon |
- *       +------------------------------------+
+/*
+ * InspIRCd -- Internet Relay Chat Daemon
  *
- *  InspIRCd: (C) 2002-2009 InspIRCd Development Team
- * See: http://wiki.inspircd.org/Credits
+ *   Copyright (C) 2009 Daniel De Graaf <danieldg@inspircd.org>
+ *   Copyright (C) 2008 Robin Burchell <robin+git@viroteck.net>
+ *   Copyright (C) 2008 Craig Edwards <craigedwards@brainbox.cc>
  *
- * 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 <http://www.gnu.org/licenses/>.
  */
 
+
 #include "inspircd.h"
 #include "xline.h"
 
@@ -19,9 +27,6 @@
 #include "utils.h"
 #include "main.h"
 
-/* $ModDep: m_spanningtree/utils.h m_spanningtree/treeserver.h m_spanningtree/treesocket.h */
-
-
 /** This function is called when we want to send a netburst to a local
  * server. There is a set order we must do this, because for example
  * users require their servers to exist, and channels require their
@@ -34,8 +39,8 @@ void TreeSocket::DoBurst(TreeServer* s)
        std::string endburst = ":" + ServerInstance->Config->GetSID() + " ENDBURST";
        ServerInstance->SNO->WriteToSnoMask('l',"Bursting to \2%s\2 (Authentication: %s%s).",
                name.c_str(),
-               this->auth_fingerprint ? "SSL Fingerprint and " : "",
-               this->auth_challenge ? "challenge-response" : "plaintext password");
+               capab->auth_fingerprint ? "SSL Fingerprint and " : "",
+               capab->auth_challenge ? "challenge-response" : "plaintext password");
        this->CleanNegotiationInfo();
        this->WriteLine(burst);
        /* send our version string */
@@ -103,7 +108,7 @@ void TreeSocket::SendFJoins(TreeServer* Current, Channel* c)
        for (UserMembCIter i = ulist->begin(); i != ulist->end(); i++)
        {
                size_t ptrlen = 0;
-               std::string modestr = ServerInstance->Modes->ModeString(i->first, c, false);
+               std::string modestr = i->second->modes;
 
                if ((curlen + modestr.length() + i->first->uuid.length() + 4) > 480)
                {
@@ -147,7 +152,7 @@ void TreeSocket::SendFJoins(TreeServer* Current, Channel* c)
                        params.append(" ").append(b->data);
                        linesize += size;
                }
-               if ((params.length() >= ServerInstance->Config->Limits.MaxModes) || (currsize > 350))
+               if ((modes.length() >= ServerInstance->Config->Limits.MaxModes) || (currsize > 350))
                {
                        /* Wrap at MAXMODES */
                        buffer.append(":").append(ServerInstance->Config->GetSID()).append(" FMODE ").append(c->name).append(" ").append(ConvToStr(c->age)).append(" +").append(modes).append(params).append("\r\n");
@@ -220,12 +225,12 @@ void TreeSocket::SendChannelModes(TreeServer* Current)
                        this->WriteLine(data);
                }
 
-               for(ExtensibleStore::const_iterator i = c->second->GetExtList().begin(); i != c->second->GetExtList().end(); i++)
+               for(Extensible::ExtensibleStore::const_iterator i = c->second->GetExtList().begin(); i != c->second->GetExtList().end(); i++)
                {
                        ExtensionItem* item = i->first;
                        std::string value = item->serialize(FORMAT_NETWORK, c->second, i->second);
                        if (!value.empty())
-                               Utils->Creator->ProtoSendMetaData(this, c->second, item->key, value);
+                               Utils->Creator->ProtoSendMetaData(this, c->second, item->name, value);
                }
 
                FOREACH_MOD(I_OnSyncChannel,OnSyncChannel(c->second,Utils->Creator,this));
@@ -269,12 +274,12 @@ void TreeSocket::SendUsers(TreeServer* Current)
                                }
                        }
 
-                       for(ExtensibleStore::const_iterator i = u->second->GetExtList().begin(); i != u->second->GetExtList().end(); i++)
+                       for(Extensible::ExtensibleStore::const_iterator i = u->second->GetExtList().begin(); i != u->second->GetExtList().end(); i++)
                        {
                                ExtensionItem* item = i->first;
                                std::string value = item->serialize(FORMAT_NETWORK, u->second, i->second);
                                if (!value.empty())
-                                       Utils->Creator->ProtoSendMetaData(this, u->second, item->key, value);
+                                       Utils->Creator->ProtoSendMetaData(this, u->second, item->name, value);
                        }
 
                        FOREACH_MOD(I_OnSyncUser,OnSyncUser(u->second,Utils->Creator,this));