From b2f7888b7ac0e72041ceea7dd9e7e6d4c46dcb5c Mon Sep 17 00:00:00 2001 From: brain Date: Wed, 18 Jul 2007 18:03:21 +0000 Subject: Ive tidied up the mode count stuff, but i still cant duplicate negative invisible counts. :( git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@7474 e03df62e-2008-0410-955e-edbf42e46eb7 --- src/modules/m_spanningtree/main.cpp | 12 ++++++++++-- src/modules/m_spanningtree/treesocket1.cpp | 6 +++++- 2 files changed, 15 insertions(+), 3 deletions(-) (limited to 'src/modules/m_spanningtree') diff --git a/src/modules/m_spanningtree/main.cpp b/src/modules/m_spanningtree/main.cpp index 1cc18dae6..9a678dc5b 100644 --- a/src/modules/m_spanningtree/main.cpp +++ b/src/modules/m_spanningtree/main.cpp @@ -137,13 +137,20 @@ void ModuleSpanningTree::HandleLusers(const char** parameters, int pcnt, userrec } } } - user->WriteServ("251 %s :There are %d users and %d invisible on %d servers",user->nick,n_users-ServerInstance->InvisibleUserCount(),ServerInstance->InvisibleUserCount(),ulined_count ? this->CountServs() - ulined_count : this->CountServs()); + user->WriteServ("251 %s :There are %d users and %d invisible on %d servers",user->nick, + n_users-ServerInstance->InvisibleUserCount(), + ServerInstance->InvisibleUserCount(), + ulined_count ? this->CountServs() - ulined_count : this->CountServs()); + if (ServerInstance->OperCount()) user->WriteServ("252 %s %d :operator(s) online",user->nick,ServerInstance->OperCount()); + if (ServerInstance->UnregisteredUserCount()) user->WriteServ("253 %s %d :unknown connections",user->nick,ServerInstance->UnregisteredUserCount()); + if (ServerInstance->ChannelCount()) user->WriteServ("254 %s %d :channels formed",user->nick,ServerInstance->ChannelCount()); + user->WriteServ("255 %s :I have %d clients and %d servers",user->nick,ServerInstance->LocalUserCount(),ulined_local_count ? this->CountLocalServs() - ulined_local_count : this->CountLocalServs()); user->WriteServ("265 %s :Current Local Users: %d Max: %d",user->nick,ServerInstance->LocalUserCount(),max_local); user->WriteServ("266 %s :Current Global Users: %d Max: %d",user->nick,n_users,max_global); @@ -487,7 +494,8 @@ void ModuleSpanningTree::DoPingChecks(time_t curtime) /* they didnt answer, boot them */ sock->SendError("Ping timeout"); sock->Squit(serv,"Ping timeout"); - /*** XXX SOCKET CULL ***/ + ServerInstance->SE->DelFd(sock); + sock->Close(); return; } } diff --git a/src/modules/m_spanningtree/treesocket1.cpp b/src/modules/m_spanningtree/treesocket1.cpp index a907bb440..4d960cf8a 100644 --- a/src/modules/m_spanningtree/treesocket1.cpp +++ b/src/modules/m_spanningtree/treesocket1.cpp @@ -918,6 +918,7 @@ bool TreeSocket::IntroduceClient(const std::string &source, std::dequemodes[(*v)-65] = 1; /* For each mode thats set, increase counter */ ModeHandler* mh = Instance->Modes->FindMode(*v, MODETYPE_USER); if (mh) + { + mh->OnModeChange(_new, _new, NULL, empty, true); + _new->SetMode(*v, true); mh->ChangeCount(1); + } } /* now we've done with modes processing, put the + back for remote servers */ -- cgit v1.2.3