X-Git-Url: https://git.netwichtig.de/gitweb/?a=blobdiff_plain;ds=sidebyside;f=src%2Fmodules%2Fm_spanningtree%2Fmain.cpp;h=c7e55c66cf3259e784969b03c4b4e956f74675db;hb=36899e44eec416f5cd74cfe2d61baa984963dbe0;hp=8bc3bfd9cb573b14170e163f6b75267fcede2263;hpb=b7716ed57704b2b2bcc665a590aecc8f02de631d;p=user%2Fhenk%2Fcode%2Finspircd.git diff --git a/src/modules/m_spanningtree/main.cpp b/src/modules/m_spanningtree/main.cpp index 8bc3bfd9c..c7e55c66c 100644 --- a/src/modules/m_spanningtree/main.cpp +++ b/src/modules/m_spanningtree/main.cpp @@ -136,7 +136,7 @@ void ModuleSpanningTree::ShowLinks(TreeServer* Current, User* user, int hops) InspIRCd::Format("%d %s", (((Utils->FlatLinks) && (!user->IsOper())) ? 0 : hops), Current->GetDesc().c_str())); } -void ModuleSpanningTree::HandleLinks(const std::vector& parameters, User* user) +void ModuleSpanningTree::HandleLinks(const CommandBase::Params& parameters, User* user) { ShowLinks(Utils->TreeRoot,user,0); user->WriteNumeric(RPL_ENDOFLINKS, '*', "End of /LINKS list."); @@ -203,12 +203,14 @@ void ModuleSpanningTree::ConnectServer(Link* x, Autoconnect* y) return; } +#ifndef _WIN32 if (x->IPAddr.find('/') != std::string::npos) { struct stat sb; if (stat(x->IPAddr.c_str(), &sb) == -1 || !S_ISSOCK(sb.st_mode)) ipvalid = false; } +#endif if (x->IPAddr.find(':') != std::string::npos) { in6_addr n; @@ -303,7 +305,7 @@ void ModuleSpanningTree::DoConnectTimeout(time_t curtime) } } -ModResult ModuleSpanningTree::HandleVersion(const std::vector& parameters, User* user) +ModResult ModuleSpanningTree::HandleVersion(const CommandBase::Params& parameters, User* user) { // We've already confirmed that !parameters.empty(), so this is safe TreeServer* found = Utils->FindServerMask(parameters[0]); @@ -330,7 +332,7 @@ ModResult ModuleSpanningTree::HandleVersion(const std::vector& para return MOD_RES_DENY; } -ModResult ModuleSpanningTree::HandleConnect(const std::vector& parameters, User* user) +ModResult ModuleSpanningTree::HandleConnect(const CommandBase::Params& parameters, User* user) { for (std::vector >::iterator i = Utils->LinkBlocks.begin(); i < Utils->LinkBlocks.end(); i++) { @@ -491,12 +493,12 @@ void ModuleSpanningTree::OnChangeHost(User* user, const std::string &newhost) CmdBuilder(user, "FHOST").push(newhost).Broadcast(); } -void ModuleSpanningTree::OnChangeName(User* user, const std::string &gecos) +void ModuleSpanningTree::OnChangeRealName(User* user, const std::string& real) { if (user->registered != REG_ALL || !IS_LOCAL(user)) return; - CmdBuilder(user, "FNAME").push_last(gecos).Broadcast(); + CmdBuilder(user, "FNAME").push_last(real).Broadcast(); } void ModuleSpanningTree::OnChangeIdent(User* user, const std::string &ident)