mirror of
https://github.com/inspircd/inspircd.git
synced 2025-03-09 10:39:02 -04:00
Let services know what format it should send extbans in.
This commit is contained in:
parent
78c4e562df
commit
95e36721d4
@ -356,10 +356,10 @@ void TreeSocket::SendCapabilities(int phase)
|
||||
{ "MAXUSER", ConvToStr(ServerInstance->Config->Limits.MaxUser) },
|
||||
};
|
||||
|
||||
ExtBan::ManagerRef extbanmgr(Utils->Creator);
|
||||
if (proto_version <= PROTO_INSPIRCD_3)
|
||||
{
|
||||
// 1205 HACK: Allow services to know what extbans exist.
|
||||
ExtBan::ManagerRef extbanmgr(Utils->Creator);
|
||||
if (extbanmgr)
|
||||
{
|
||||
std::string extbans;
|
||||
@ -386,6 +386,23 @@ void TreeSocket::SendCapabilities(int phase)
|
||||
std::string extbans;
|
||||
if (BuildExtBanList(extbans))
|
||||
WriteLine("CAPAB EXTBANS :" + extbans);
|
||||
|
||||
if (extbanmgr)
|
||||
{
|
||||
std::string& xbformat = capabilities["EXTBANFORMAT"];
|
||||
switch (extbanmgr->GetFormat())
|
||||
{
|
||||
case ExtBan::Format::ANY:
|
||||
xbformat = "any";
|
||||
break;
|
||||
case ExtBan::Format::NAME:
|
||||
xbformat = "name";
|
||||
break;
|
||||
case ExtBan::Format::LETTER:
|
||||
xbformat = "letter";
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// If SHA256 hashing support is available then send a challenge token.
|
||||
|
Loading…
x
Reference in New Issue
Block a user