From 9f05ef623a0ac11d57d5cc2e41a66714264d80d3 Mon Sep 17 00:00:00 2001 From: brain Date: Thu, 15 Dec 2005 18:12:47 +0000 Subject: Re-introduced 3-line function CleanFilename git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@2486 e03df62e-2008-0410-955e-edbf42e46eb7 --- src/commands.cpp | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'src') diff --git a/src/commands.cpp b/src/commands.cpp index f6433e88a..88248e06a 100644 --- a/src/commands.cpp +++ b/src/commands.cpp @@ -91,6 +91,13 @@ extern userrec* fd_ref_table[65536]; extern serverstats* stats; +char* CleanFilename(char* name) +{ + char* p = name + strlen(name); + while ((p != name) && (*p != '/')) p--; + p != name ? return ++p : return p; +} + void handle_join(char **parameters, int pcnt, userrec *user) { chanrec* Ptr; -- cgit v1.2.3