summaryrefslogtreecommitdiff
path: root/src/helperfuncs.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/helperfuncs.cpp')
-rw-r--r--src/helperfuncs.cpp24
1 files changed, 24 insertions, 0 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);