From a9682a795a548eee1db19f424f1cb1ef236538dd Mon Sep 17 00:00:00 2001 From: brain Date: Fri, 16 Apr 2004 14:16:13 +0000 Subject: Added some netsplit handling stuff (untested) git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@613 e03df62e-2008-0410-955e-edbf42e46eb7 --- src/connection.cpp | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'src/connection.cpp') diff --git a/src/connection.cpp b/src/connection.cpp index a4818cad7..a36e9a1df 100644 --- a/src/connection.cpp +++ b/src/connection.cpp @@ -323,6 +323,7 @@ void ircd_connector::SetDescriptor(int fd) bool connection::SendPacket(char *message, const char* host) { ircd_connector* cn = this->FindHost(host); + if (!strchr(message,'\n')) { strncat(message,"\n",MAXBUF); @@ -351,7 +352,10 @@ bool connection::SendPacket(char *message, const char* host) } } } - log(DEBUG,"ERROR: Main route to %s is down and there are no possible routes to this server!",host); + char buffer[MAXBUF]; + snprintf(buffer,MAXBUF,"& %s",host); + NetSendToAll(buffer); + log(DEBUG,"There are no routes to %s, we're gonna boot the server off!",host); return false; } -- cgit v1.3.1-10-gc9f91