1
0
mirror of https://github.com/anope/anope.git synced 2026-07-03 07:13:14 +02:00

Use less strict valid ident checks on hybrid, unreal, and inspircd

This commit is contained in:
Adam
2013-08-12 14:36:49 -04:00
parent f1956b039d
commit f15a9749f9
7 changed files with 73 additions and 4 deletions
+21
View File
@@ -376,6 +376,27 @@ class UnrealIRCdProto : public IRCDProto
bi->Join(c);
}
}
bool IsIdentValid(const Anope::string &ident) anope_override
{
if (ident.empty() || ident.length() > Config->GetBlock("networkinfo")->Get<unsigned>("userlen"))
return false;
for (unsigned i = 0; i < ident.length(); ++i)
{
const char &c = ident[i];
if ((c >= 'A' && c <= 'Z') || (c >= 'a' && c <= 'z') || (c >= '0' && c <= '9') || c == '.' || c == '-')
continue;
if (c == '-' || c == '.' || c == '_')
continue;
return false;
}
return true;
}
};
class UnrealExtBan : public ChannelModeList