diff options
author | brain <brain@e03df62e-2008-0410-955e-edbf42e46eb7> | 2007-05-09 23:42:06 +0000 |
---|---|---|
committer | brain <brain@e03df62e-2008-0410-955e-edbf42e46eb7> | 2007-05-09 23:42:06 +0000 |
commit | b8015b09dcf4b49ceb695b188a2172548378e1db (patch) | |
tree | 477cdcba16e6271fbf42325b5c9db4528c9115f4 | |
parent | 221cd997be917025266716ee98f04dafdc87307b (diff) |
Fix ping timeout ERROR not being generated when a server pings out, making the other end appear to be closed unexpectedly without reason.
Find and fix the 3 ping timeout messages for server to server that were using WriteOpers instead of snomask +l
git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@6933 e03df62e-2008-0410-955e-edbf42e46eb7
-rw-r--r-- | docs/inspircd.conf.example | 5 | ||||
-rw-r--r-- | src/modules/m_spanningtree/main.cpp | 1 | ||||
-rw-r--r-- | src/modules/m_spanningtree/treesocket1.cpp | 11 |
3 files changed, 12 insertions, 5 deletions
diff --git a/docs/inspircd.conf.example b/docs/inspircd.conf.example index 35d869948..46fc83e29 100644 --- a/docs/inspircd.conf.example +++ b/docs/inspircd.conf.example @@ -1690,6 +1690,11 @@ #<module name="m_redirect.so"> #-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-# +# Registered users only channel creation +# Allows only registered users and opers to create new channels. +#<module name="m_regonlycreate.so"> + +#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-# # Remove module: Adds the /REMOVE command which is a peaceful # alternative to /KICK #<module name="m_remove.so"> diff --git a/src/modules/m_spanningtree/main.cpp b/src/modules/m_spanningtree/main.cpp index 48b76b8a0..09574f15f 100644 --- a/src/modules/m_spanningtree/main.cpp +++ b/src/modules/m_spanningtree/main.cpp @@ -468,6 +468,7 @@ void ModuleSpanningTree::DoPingChecks(time_t curtime) { // they didnt answer, boot them ServerInstance->SNO->WriteToSnoMask('l',"Server \002%s\002 pinged out",serv->GetName().c_str()); + sock->SendError("Ping timeout"); sock->Squit(serv,"Ping timeout"); ServerInstance->SE->DelFd(sock); sock->Close(); diff --git a/src/modules/m_spanningtree/treesocket1.cpp b/src/modules/m_spanningtree/treesocket1.cpp index 76b7896a5..ddfc2f18e 100644 --- a/src/modules/m_spanningtree/treesocket1.cpp +++ b/src/modules/m_spanningtree/treesocket1.cpp @@ -394,8 +394,11 @@ std::string TreeSocket::ListDifference(const std::string &one, const std::string void TreeSocket::SendError(const std::string &errormessage) { + /* Display the error locally as well as sending it remotely */ this->WriteLine("ERROR :"+errormessage); this->Instance->SNO->WriteToSnoMask('l',"Sent \2ERROR\2 to "+this->InboundServerName+": "+errormessage); + /* One last attempt to make sure the error reaches its target */ + this->FlushWriteBuffer(); } bool TreeSocket::Capab(const std::deque<std::string> ¶ms) @@ -568,11 +571,11 @@ void TreeSocket::Squit(TreeServer* Current, const std::string &reason) Utils->DoOneToAllButSender(Current->GetParent()->GetName(),"SQUIT",params,Current->GetName()); if (Current->GetParent() == Utils->TreeRoot) { - this->Instance->WriteOpers("Server \002"+Current->GetName()+"\002 split: "+reason); + this->Instance->SNO->WriteToSnoMask('l',"Server \002"+Current->GetName()+"\002 split: "+reason); } else { - this->Instance->WriteOpers("Server \002"+Current->GetName()+"\002 split from server \002"+Current->GetParent()->GetName()+"\002 with reason: "+reason); + this->Instance->SNO->WriteToSnoMask('l',"Server \002"+Current->GetName()+"\002 split from server \002"+Current->GetParent()->GetName()+"\002 with reason: "+reason); } num_lost_servers = 0; num_lost_users = 0; @@ -581,12 +584,10 @@ void TreeSocket::Squit(TreeServer* Current, const std::string &reason) Current->Tidy(); Current->GetParent()->DelChild(Current); DELETE(Current); - this->Instance->WriteOpers("Netsplit complete, lost \002%d\002 users on \002%d\002 servers.", num_lost_users, num_lost_servers); + this->Instance->SNO->WriteToSnoMask('l',"Netsplit complete, lost \002%d\002 users on \002%d\002 servers.", num_lost_users, num_lost_servers); } else - { Instance->Log(DEFAULT,"Squit from unknown server"); - } } /** FMODE command - server mode with timestamp checks */ |