summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorbrain <brain@e03df62e-2008-0410-955e-edbf42e46eb7>2005-12-15 18:00:48 +0000
committerbrain <brain@e03df62e-2008-0410-955e-edbf42e46eb7>2005-12-15 18:00:48 +0000
commit46e4106613d70994ed7b6cb28de7a54e33df42e4 (patch)
treeebe3b5ac81613f55fc6f81e4f6f382eb17eb794c /src
parent3f0576ff9581569764297bf977aa47b8f0d857c9 (diff)
Removed inspircd_util.cpp, this was NEVER really used!
git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@2483 e03df62e-2008-0410-955e-edbf42e46eb7
Diffstat (limited to 'src')
-rw-r--r--src/inspircd_util.cpp101
1 files changed, 0 insertions, 101 deletions
diff --git a/src/inspircd_util.cpp b/src/inspircd_util.cpp
deleted file mode 100644
index 0636c614b..000000000
--- a/src/inspircd_util.cpp
+++ /dev/null
@@ -1,101 +0,0 @@
-/* +------------------------------------+
- * | Inspire Internet Relay Chat Daemon |
- * +------------------------------------+
- *
- * Inspire is copyright (C) 2002-2005 ChatSpike-Dev.
- * E-mail:
- * <brain@chatspike.net>
- * <Craig@chatspike.net>
- *
- * Written by Craig Edwards, Craig McLure, and others.
- * This program is free but copyrighted software; see
- * the file COPYING for details.
- *
- * ---------------------------------------------------
- */
-
-using namespace std;
-
-#include "inspircd_config.h"
-#include "inspircd.h"
-#include "inspircd_io.h"
-#include "inspircd_util.h"
-#include "inspstring.h"
-#include "helperfuncs.h"
-
-extern time_t TIME;
-
-char *SafeStrncpy (char *dest, const char *src, size_t size)
-{
- if (!dest)
- {
- dest = NULL;
- return (NULL);
- }
- else if (size < 1)
- {
- dest = NULL;
- return (NULL);
- }
-
- memset (dest, '\0', size);
- strlcpy (dest, src, size - 1);
-
- return (dest);
-}
-
-
-char *CleanIpAddr (char *cleanAddr, const char *dirtyAddr)
-{
- int count = 0, maxdot = 0, maxoctet = 0;
-
- memset (cleanAddr, '\0', MAXBUF);
- if(dirtyAddr == NULL)
- return(cleanAddr);
-
- for (count = 0; count < MAXBUF - 1; count++)
- {
- if (isdigit (dirtyAddr[count]))
- {
- if (++maxoctet > 3)
- {
- cleanAddr[count] = '\0';
- break;
- }
- cleanAddr[count] = dirtyAddr[count];
- }
- else if (dirtyAddr[count] == '.')
- {
- if (++maxdot > 3)
- {
- cleanAddr[count] = '\0';
- break;
- }
- maxoctet = 0;
- cleanAddr[count] = dirtyAddr[count];
- }
- else
- {
- cleanAddr[count] = '\0';
- break;
- }
- }
-
- return (cleanAddr);
-}
-
-char* CleanFilename(char* name)
-{
- char* p = name + strlen(name);
- while ((p != name) && (*p != '/'))
- p--;
- if ( p != name)
- {
- return ++p;
- }
- else
- {
- return p;
- }
-}
-