]> git.netwichtig.de Git - user/henk/code/inspircd.git/blobdiff - src/modules/m_spanningtree/netburst.cpp
Add DYING link state, push error messages on link, and only limit recvq on unauthenti...
[user/henk/code/inspircd.git] / src / modules / m_spanningtree / netburst.cpp
index b8d8c93ee9076b1352febaad3db3aa0e0d9cfff0..4a894f78a1335af3d17a09e2096137a320c151af 100644 (file)
@@ -2,7 +2,7 @@
  *       | Inspire Internet Relay Chat Daemon |
  *       +------------------------------------+
  *
- *  InspIRCd: (C) 2002-2009 InspIRCd Development Team
+ *  InspIRCd: (C) 2002-2010 InspIRCd Development Team
  * See: http://wiki.inspircd.org/Credits
  *
  * This program is free but copyrighted software; see
@@ -19,9 +19,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 +31,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 +100,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)
                {
@@ -220,14 +217,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 = Extensible::GetItem(i->first);
-                       std::string value;
-                       if (item)
-                               value = item->serialize(FORMAT_NETWORK, c->second, i->second);
+                       ExtensionItem* item = i->first;
+                       std::string value = item->serialize(FORMAT_NETWORK, c->second, i->second);
                        if (!value.empty())
-                               Utils->Creator->ProtoSendMetaData(this, c->second, i->first, value);
+                               Utils->Creator->ProtoSendMetaData(this, c->second, item->name, value);
                }
 
                FOREACH_MOD(I_OnSyncChannel,OnSyncChannel(c->second,Utils->Creator,this));
@@ -261,7 +256,7 @@ void TreeSocket::SendUsers(TreeServer* Current)
                                this->WriteLine(data);
                                if (IS_OPER(u->second))
                                {
-                                       snprintf(data,MAXBUF,":%s OPERTYPE %s", u->second->uuid.c_str(), u->second->oper.c_str());
+                                       snprintf(data,MAXBUF,":%s OPERTYPE %s", u->second->uuid.c_str(), u->second->oper->name.c_str());
                                        this->WriteLine(data);
                                }
                                if (IS_AWAY(u->second))
@@ -271,14 +266,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 = Extensible::GetItem(i->first);
-                               std::string value;
-                               if (item)
-                                       value = item->serialize(FORMAT_NETWORK, u->second, i->second);
+                               ExtensionItem* item = i->first;
+                               std::string value = item->serialize(FORMAT_NETWORK, u->second, i->second);
                                if (!value.empty())
-                                       Utils->Creator->ProtoSendMetaData(this, u->second, i->first, value);
+                                       Utils->Creator->ProtoSendMetaData(this, u->second, item->name, value);
                        }
 
                        FOREACH_MOD(I_OnSyncUser,OnSyncUser(u->second,Utils->Creator,this));