summaryrefslogtreecommitdiff
path: root/src/modules
diff options
context:
space:
mode:
authorbrain <brain@e03df62e-2008-0410-955e-edbf42e46eb7>2005-11-27 16:39:48 +0000
committerbrain <brain@e03df62e-2008-0410-955e-edbf42e46eb7>2005-11-27 16:39:48 +0000
commit2dffa0a4632d5165c623e4d1e32d1b12f3558694 (patch)
tree56f127bdca321bec392745f4ebbb2522ab76d629 /src/modules
parent0dda9fb325a4d0053652f937ad06e44942357cc1 (diff)
Added proper administrativia notices to CONNECT and inbound connections
git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@1969 e03df62e-2008-0410-955e-edbf42e46eb7
Diffstat (limited to 'src/modules')
-rw-r--r--src/modules/m_spanningtree.cpp43
1 files changed, 40 insertions, 3 deletions
diff --git a/src/modules/m_spanningtree.cpp b/src/modules/m_spanningtree.cpp
index 71f3af876..8ec9e564e 100644
--- a/src/modules/m_spanningtree.cpp
+++ b/src/modules/m_spanningtree.cpp
@@ -66,6 +66,41 @@ class TreeServer
UserCount = OperCount = 0;
}
+ std::string GetName()
+ {
+ return this->ServerName;
+ }
+
+ std::string GetDesc()
+ {
+ return this->ServerDesc;
+ }
+
+ std::string GetVersion()
+ {
+ return this->VersionString;
+ }
+
+ int GetUserCount()
+ {
+ return this->UserCount;
+ }
+
+ int GetOperCount()
+ {
+ return this->OperCount;
+ }
+
+ TreeSocket* GetSocket()
+ {
+ return this->Socket;
+ }
+
+ TreeServer* GetParent()
+ {
+ return this->Parent;
+ }
+
void AddChild(TreeServer* Child)
{
Children.push_back(Child);
@@ -128,8 +163,8 @@ class TreeSocket : public InspSocket
this->LinkState = CONNECTING;
}
- TreeSocket(int newfd)
- : InspSocket(newfd)
+ TreeSocket(int newfd, char* ip)
+ : InspSocket(newfd, ip)
{
Srv->Log(DEBUG,"Associate new inbound");
this->LinkState = WAIT_AUTH_1;
@@ -139,6 +174,7 @@ class TreeSocket : public InspSocket
{
if (this->LinkState == CONNECTING)
{
+ Srv->SendOpers("*** Connection to "+myhost+"["+this->GetIP()+"] established.");
// we should send our details here.
// if the other side is satisfied, they send theirs.
// we do not need to change state here.
@@ -168,6 +204,7 @@ class TreeSocket : public InspSocket
void DoBurst(TreeServer* s)
{
log(DEBUG,"Beginning network burst");
+ Srv->SendOpers("*** Bursting to "+s->GetName()+".");
this->WriteLine("BURST");
this->WriteLine("ENDBURST");
}
@@ -420,7 +457,7 @@ class TreeSocket : public InspSocket
virtual int OnIncomingConnection(int newsock, char* ip)
{
- TreeSocket* s = new TreeSocket(newsock);
+ TreeSocket* s = new TreeSocket(newsock, ip);
Srv->AddSocket(s);
return true;
}