From f15a9749f9afc23e32e029ac495a53d24ac281b8 Mon Sep 17 00:00:00 2001 From: Adam Date: Mon, 12 Aug 2013 14:36:49 -0400 Subject: Use less strict valid ident checks on hybrid, unreal, and inspircd --- src/protocol.cpp | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) (limited to 'src/protocol.cpp') 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("chanlen")) + if (ident.empty() || ident.length() > Config->GetBlock("networkinfo")->Get("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; -- cgit