diff options
Diffstat (limited to 'src/modules')
-rw-r--r-- | src/modules/m_spanningtree/main.cpp | 12 | ||||
-rw-r--r-- | src/modules/m_spanningtree/treesocket1.cpp | 6 |
2 files changed, 15 insertions, 3 deletions
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::deque<std::stri time_t age = ConvToInt(params[0]); const char* tempnick = params[1].c_str(); + std::string empty; cmd_validation valid[] = { {"Nickname", 1, NICKMAX}, {"Hostname", 2, 64}, {"Displayed hostname", 3, 64}, {"Ident", 4, IDENTMAX}, {"GECOS", 7, MAXGECOS}, {"", 0, 0} }; @@ -975,11 +976,14 @@ bool TreeSocket::IntroduceClient(const std::string &source, std::deque<std::stri for (std::string::iterator v = params[5].begin(); v != params[5].end(); v++) { - _new->modes[(*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 */ |