summaryrefslogtreecommitdiff
path: root/src/inspircd_util.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/inspircd_util.cpp')
-rw-r--r--src/inspircd_util.cpp15
1 files changed, 14 insertions, 1 deletions
diff --git a/src/inspircd_util.cpp b/src/inspircd_util.cpp
index 0a3d966d3..29011eb9a 100644
--- a/src/inspircd_util.cpp
+++ b/src/inspircd_util.cpp
@@ -66,5 +66,18 @@ char *CleanIpAddr (char *cleanAddr, const char *dirtyAddr)
return (cleanAddr);
}
-
+char* CleanFilename(char* name)
+{
+ char* p = name + strlen(name);
+ while ((p != name) && (*p != '/'))
+ p--;
+ if ( p != name)
+ {
+ return ++p;
+ }
+ else
+ {
+ return p;
+ }
+}