From ba5a5b345cdfbc73c0faf9a6cb5fd8d96474ae41 Mon Sep 17 00:00:00 2001 From: brain Date: Sun, 10 Sep 2006 17:03:50 +0000 Subject: Move Spacify() into irc:: namespace as multiple modules use it now git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@5200 e03df62e-2008-0410-955e-edbf42e46eb7 --- src/hashcomp.cpp | 11 +++++++++++ 1 file changed, 11 insertions(+) (limited to 'src/hashcomp.cpp') diff --git a/src/hashcomp.cpp b/src/hashcomp.cpp index 682501f23..8d19d059a 100644 --- a/src/hashcomp.cpp +++ b/src/hashcomp.cpp @@ -298,3 +298,14 @@ std::string irc::hex(const unsigned char *raw, size_t rawsz) return buf; } +const char* irc::Spacify(char* n) +{ + static char x[MAXBUF]; + strlcpy(x,n,MAXBUF); + for (char* y = x; *y; y++) + if (*y == '_') + *y = ' '; + return x; +} + + -- cgit v1.2.3