summaryrefslogtreecommitdiff
path: root/src/servers.cpp
diff options
context:
space:
mode:
authorbrain <brain@e03df62e-2008-0410-955e-edbf42e46eb7>2003-01-26 23:53:03 +0000
committerbrain <brain@e03df62e-2008-0410-955e-edbf42e46eb7>2003-01-26 23:53:03 +0000
commitf81a2e12b09634cacd4ccf9da584c835ee71bf24 (patch)
tree7772d7719b6b369bd618eafb8f4b926d21192dcc /src/servers.cpp
parent767b12b0ab6a0d4ed5f7335b26d1c0f842d99543 (diff)
Modified documentation for base classes
Added base classes git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@151 e03df62e-2008-0410-955e-edbf42e46eb7
Diffstat (limited to 'src/servers.cpp')
-rw-r--r--src/servers.cpp23
1 files changed, 13 insertions, 10 deletions
diff --git a/src/servers.cpp b/src/servers.cpp
index 44bd2e0c3..c334b5c91 100644
--- a/src/servers.cpp
+++ b/src/servers.cpp
@@ -1,6 +1,10 @@
/*
$Log$
+Revision 1.2 2003/01/26 23:53:03 brain
+Modified documentation for base classes
+Added base classes
+
Revision 1.1 2003/01/26 20:15:03 brain
Added server classes for linking
@@ -11,6 +15,7 @@ Added server classes for linking
#include "servers.h"
#include "inspircd.h"
#include <stdio.h>
+#include <map.h>
serverrec::serverrec()
{
@@ -23,6 +28,7 @@ serverrec::serverrec()
hops_away = 1;
connected_at = time(NULL);
jupiter = false;
+ fd = 0;
}
@@ -41,22 +47,19 @@ serverrec::serverrec(char* n, int link_t, long ver, bool jupe)
hops_away = 1;
connected_at = time(NULL);
jupiter = jupe;
+ fd = 0;
}
void serverrec::AddLeaf(serverrec *child)
{
- leaf.push_back(child);
+ leaf[child->name] = child;
}
-void serverrec::DelLeaf(char* n)
+void serverrec::DelLeaf(string n)
{
- for (server_list::iterator i = leaf.begin(); i != leaf.end(); i++)
- {
- if (strcasecmp(n,i->name))
- {
- leaf.erase(i);
- return;
- }
- }
+ server_list::iterator i = leaf.find(n);
+
+ if (i != leaf.end())
+ leaf.erase(i);
}