diff options
author | brain <brain@e03df62e-2008-0410-955e-edbf42e46eb7> | 2004-04-15 10:54:53 +0000 |
---|---|---|
committer | brain <brain@e03df62e-2008-0410-955e-edbf42e46eb7> | 2004-04-15 10:54:53 +0000 |
commit | 25067fb1e64507d4ab5c119a959476d9ee507f3f (patch) | |
tree | ed8c93003c572d407de8ee92cac01063640a33d6 /src/inspircd.cpp | |
parent | b6eb7e06110fb64f31fac30cfb1d8385146ace7b (diff) |
Various mesh maintainance fixes
git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@600 e03df62e-2008-0410-955e-edbf42e46eb7
Diffstat (limited to 'src/inspircd.cpp')
-rw-r--r-- | src/inspircd.cpp | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/src/inspircd.cpp b/src/inspircd.cpp index 0d97b8c43..b5558ed27 100644 --- a/src/inspircd.cpp +++ b/src/inspircd.cpp @@ -6440,6 +6440,7 @@ void handle_J(char token,char* params,serverrec* source,serverrec* reply, char* void process_restricted_commands(char token,char* params,serverrec* source,serverrec* reply, char* udp_host,char* ipaddr,int port) { long authcookie = rand()*rand(); + char buffer[MAXBUF]; switch(token) { @@ -6450,10 +6451,10 @@ void process_restricted_commands(char token,char* params,serverrec* source,serve WriteOpers("Server %s is starting netburst.",udp_host); // now broadcast this new servers address out to all servers that are linked to us, // except the newcomer. They'll all attempt to connect back to it. - char buffer[MAXBUF]; + // give the server its authcookie. snprintf(buffer,MAXBUF,"~ %d",authcookie); - NetSendToOne(udp_host,buffer); + serv->SendPacket(data,udp_host); // tell all the other servers to use this authcookie to connect back again snprintf(buffer,MAXBUF,"+ %s %s %d %d",udp_host,ipaddr,port,authcookie); NetSendToAllExcept(udp_host,buffer); @@ -6464,7 +6465,7 @@ void process_restricted_commands(char token,char* params,serverrec* source,serve // without user or password, using it. case '~': auth_cookies.push_back(atoi(params)); - log(DEBUG,"Stored auth cookie, will permit servers with auth-cookie %d",atoi(params)); + log(DEBUG,"*** Stored auth cookie, will permit servers with auth-cookie %d",atoi(params)); break; // connect back to a server using an authcookie case '+': @@ -7025,7 +7026,7 @@ int InspIRCd(void) // during a netburst, send all data to all other linked servers if ((nb_start>0) && (udp_msg[0] != 'Y') && (udp_msg[0] != 'X') && (udp_msg[0] != 'F')) { - NetSendToAllExcept(udp_msg,udp_host); + NetSendToAllExcept(udp_host,udp_msg); } FOREACH_MOD OnPacketReceive(udp_msg); handle_link_packet(udp_msg, udp_host, me[x]); |