summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorbrain <brain@e03df62e-2008-0410-955e-edbf42e46eb7>2005-05-24 04:55:22 +0000
committerbrain <brain@e03df62e-2008-0410-955e-edbf42e46eb7>2005-05-24 04:55:22 +0000
commit99f6f5c9f7227f09b457fcdb938f3b26a76a1eda (patch)
treeae38b8da95fef49050dc69331537b326771fd5d6 /src
parent0f4ead87d522272e93dc67a701311d6e68e34c12 (diff)
Fixed to not autoconnect servers we already have!
git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@1488 e03df62e-2008-0410-955e-edbf42e46eb7
Diffstat (limited to 'src')
-rw-r--r--src/inspircd.cpp22
1 files changed, 21 insertions, 1 deletions
diff --git a/src/inspircd.cpp b/src/inspircd.cpp
index b52044d2a..2ee4ca577 100644
--- a/src/inspircd.cpp
+++ b/src/inspircd.cpp
@@ -2517,6 +2517,26 @@ bool LoadModule(const char* filename)
return true;
}
+
+void GotServer(std::string name)
+{
+ for (int j = 0; j < 32; j++)
+ {
+ if (me[j] != NULL)
+ {
+ for (int k = 0; k < me[j]->connectors.size(); k++)
+ {
+ if (name == me[j]->connectors.GetServerName())
+ {
+ return true;
+ }
+ }
+ }
+ }
+ return false;
+}
+
+
int InspIRCd(char** argv, int argc)
{
struct sockaddr_in client,server;
@@ -2826,7 +2846,7 @@ int InspIRCd(char** argv, int argc)
char Link_ServerName[MAXBUF],Link_AConn[MAXBUF];
ConfValue("link","name",i,Link_ServerName,&config_f);
ConfValue("link","autoconnect",i,Link_AConn,&config_f);
- if (Link_AConn[0])
+ if (Link_AConn[0]) && (!GotServer(Link_ServerName))
{
autoconnects::iterator a = autoconns.find(Link_ServerName);
if (a != autoconns.end())