Allow also using a prefix chat in autoop and exemptchanops.

This commit is contained in:
Sadie Powell 2023-04-21 13:01:13 +01:00
parent f0962e0b34
commit e4bbe486c1
2 changed files with 12 additions and 2 deletions

View File

@ -45,7 +45,12 @@ public:
static PrefixMode* FindMode(const std::string& mid)
{
if (mid.length() == 1)
return ServerInstance->Modes.FindPrefixMode(mid[0]);
{
PrefixMode* pm = ServerInstance->Modes.FindPrefixMode(mid[0]);
if (!pm)
pm = ServerInstance->Modes.FindPrefix(mid[0]);
return pm;
}
ModeHandler* mh = ServerInstance->Modes.FindMode(mid, MODETYPE_CHANNEL);
return mh ? mh->IsPrefixMode() : nullptr;

View File

@ -44,7 +44,12 @@ public:
static PrefixMode* FindMode(const std::string& pmode)
{
if (pmode.length() == 1)
return ServerInstance->Modes.FindPrefixMode(pmode[0]);
{
PrefixMode* pm = ServerInstance->Modes.FindPrefixMode(pmode[0]);
if (!pm)
pm = ServerInstance->Modes.FindPrefix(pmode[0]);
return pm;
}
ModeHandler* mh = ServerInstance->Modes.FindMode(pmode, MODETYPE_CHANNEL);
return mh ? mh->IsPrefixMode() : nullptr;