summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--docs/inspircd.conf.example5
-rw-r--r--src/modules/m_spanningtree/main.cpp1
-rw-r--r--src/modules/m_spanningtree/treesocket1.cpp11
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> &params)
@@ -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 */