-/* +------------------------------------+
- * | 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"
#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
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 */
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)
{
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");
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));
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))
}
}
- 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));