diff options
-rw-r--r-- | src/helperfuncs.cpp | 24 | ||||
-rw-r--r-- | src/inspircd.cpp | 20 |
2 files changed, 24 insertions, 20 deletions
diff --git a/src/helperfuncs.cpp b/src/helperfuncs.cpp index 3f0b5ff0c..6e5f616bd 100644 --- a/src/helperfuncs.cpp +++ b/src/helperfuncs.cpp @@ -405,6 +405,30 @@ bool InspIRCd::IsNick(const char* n) return (p < NICKMAX - 1); } + +bool InspIRCd::IsIdent(const char* n) +{ + if (!n || !*n) + return false; + + for (char* i = (char*)n; *i; i++) + { + if ((*i >= 'A') && (*i <= '}')) + { + continue; + } + + if (((*i >= '0') && (*i <= '9')) || (*i == '-') || (*i == '.')) + { + continue; + } + + return false; + } + + return true; +} + void InspIRCd::OpenLog(char** argv, int argc) { Config->MyDir = ServerConfig::GetFullProgDir(argv,argc); diff --git a/src/inspircd.cpp b/src/inspircd.cpp index c78f44f46..808234518 100644 --- a/src/inspircd.cpp +++ b/src/inspircd.cpp @@ -918,26 +918,6 @@ void InspIRCd::DoOneIteration(bool process_module_sockets) SocketCull.clear(); } -bool InspIRCd::IsIdent(const char* n) -{ - if (!n || !*n) - return false; - - for (char* i = (char*)n; *i; i++) - { - if ((*i >= 'A') && (*i <= '}')) - { - continue; - } - if (((*i >= '0') && (*i <= '9')) || (*i == '-') || (*i == '.')) - { - continue; - } - return false; - } - return true; -} - int InspIRCd::Run() { while (true) |