diff options
author | brain <brain@e03df62e-2008-0410-955e-edbf42e46eb7> | 2004-04-16 14:16:13 +0000 |
---|---|---|
committer | brain <brain@e03df62e-2008-0410-955e-edbf42e46eb7> | 2004-04-16 14:16:13 +0000 |
commit | a9682a795a548eee1db19f424f1cb1ef236538dd (patch) | |
tree | c6d6416ef03c15f4a1ae20b155e706cd7b2d3316 /src/connection.cpp | |
parent | 0dbcc361f24e1106cf233afd0f46c99f8f2d4d0c (diff) |
Added some netsplit handling stuff (untested)
git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@613 e03df62e-2008-0410-955e-edbf42e46eb7
Diffstat (limited to 'src/connection.cpp')
-rw-r--r-- | src/connection.cpp | 6 |
1 files changed, 5 insertions, 1 deletions
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; } |