diff options
author | Adam <Adam@anope.org> | 2013-08-12 14:36:49 -0400 |
---|---|---|
committer | Adam <Adam@anope.org> | 2013-08-12 14:36:49 -0400 |
commit | f15a9749f9afc23e32e029ac495a53d24ac281b8 (patch) | |
tree | 4114f9b3a676d458285014539122018deb88be37 /src/protocol.cpp | |
parent | f1956b039d3c7be38ad03fbb79be6a4eed440cf0 (diff) |
Use less strict valid ident checks on hybrid, unreal, and inspircd
Diffstat (limited to 'src/protocol.cpp')
-rw-r--r-- | src/protocol.cpp | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/src/protocol.cpp b/src/protocol.cpp index 9ece3b529..ba44ea708 100644 --- a/src/protocol.cpp +++ b/src/protocol.cpp @@ -326,16 +326,17 @@ bool IRCDProto::IsChannelValid(const Anope::string &chan) bool IRCDProto::IsIdentValid(const Anope::string &ident) { - if (ident.empty() || ident.length() > Config->GetBlock("networkinfo")->Get<unsigned>("chanlen")) + 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 == '-') - ; - else - return false; + continue; + + return false; } return true; |