X-Git-Url: https://git.netwichtig.de/gitweb/?a=blobdiff_plain;f=src%2Fmodules%2Fm_spanningtree%2Fcapab.cpp;h=dc48c87df43534d1af9c9c8dc55520225346ff4c;hb=a8b146419b2aae36da25b7202292528efd3158a9;hp=f4f1e1ace0337681977102d75a12e8aa2a672cdc;hpb=d349f981fbe70fb11e3db4c486f59749ffe74c2b;p=user%2Fhenk%2Fcode%2Finspircd.git diff --git a/src/modules/m_spanningtree/capab.cpp b/src/modules/m_spanningtree/capab.cpp index f4f1e1ace..dc48c87df 100644 --- a/src/modules/m_spanningtree/capab.cpp +++ b/src/modules/m_spanningtree/capab.cpp @@ -59,16 +59,18 @@ static std::string BuildModeList(ModeType type) { std::string mdesc = mh->name; mdesc.push_back('='); - if (mh->GetPrefix()) - mdesc.push_back(mh->GetPrefix()); - if (mh->GetModeChar()) - mdesc.push_back(mh->GetModeChar()); + PrefixMode* pm = mh->IsPrefixMode(); + if (pm) + { + if (pm->GetPrefix()) + mdesc.push_back(pm->GetPrefix()); + } + mdesc.push_back(mh->GetModeChar()); modes.push_back(mdesc); } } sort(modes.begin(), modes.end()); - irc::stringjoiner line(modes); - return line.GetJoined(); + return irc::stringjoiner(modes); } void TreeSocket::SendCapabilities(int phase) @@ -149,8 +151,8 @@ void TreeSocket::SendCapabilities(int phase) " MAXAWAY="+ConvToStr(ServerInstance->Config->Limits.MaxAway)+ extra+ " PREFIX="+ServerInstance->Modes->BuildPrefixes()+ - " CHANMODES="+ServerInstance->Modes->GiveModeList(MASK_CHANNEL)+ - " USERMODES="+ServerInstance->Modes->GiveModeList(MASK_USER) + " CHANMODES="+ServerInstance->Modes->GiveModeList(MODETYPE_CHANNEL)+ + " USERMODES="+ServerInstance->Modes->GiveModeList(MODETYPE_USER) ); this->WriteLine("CAPAB END"); @@ -281,7 +283,7 @@ bool TreeSocket::Capab(const parameterlist ¶ms) } else if (this->capab->CapKeys.find("CHANMODES") != this->capab->CapKeys.end()) { - if (this->capab->CapKeys.find("CHANMODES")->second != ServerInstance->Modes->GiveModeList(MASK_CHANNEL)) + if (this->capab->CapKeys.find("CHANMODES")->second != ServerInstance->Modes->GiveModeList(MODETYPE_CHANNEL)) reason = "One or more of the channel modes on the remote server are invalid on this server."; } @@ -303,7 +305,7 @@ bool TreeSocket::Capab(const parameterlist ¶ms) } else if (this->capab->CapKeys.find("USERMODES") != this->capab->CapKeys.end()) { - if (this->capab->CapKeys.find("USERMODES")->second != ServerInstance->Modes->GiveModeList(MASK_USER)) + if (this->capab->CapKeys.find("USERMODES")->second != ServerInstance->Modes->GiveModeList(MODETYPE_USER)) reason = "One or more of the user modes on the remote server are invalid on this server."; } @@ -385,4 +387,3 @@ bool TreeSocket::Capab(const parameterlist ¶ms) } return true; } -