aboutsummaryrefslogtreecommitdiff
path: root/src/helperfuncs.cpp
diff options
context:
space:
mode:
authorGravatar brain2006-03-06 00:29:02 +0000
committerGravatar brain2006-03-06 00:29:02 +0000
commiteb067467de6777c010dbbca716f27a3f550107ce (patch)
treea6584f027ebf43267888fa9519e2078cbe115c69 /src/helperfuncs.cpp
parentTidied up ProcessLine, instead of a ton of strlens use a tiny bit of char* vo... (diff)
Mode-code rewrite. Might act weird, needs proper testing (that is what svn builds are for, after all)
git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@3474 e03df62e-2008-0410-955e-edbf42e46eb7
Diffstat (limited to 'src/helperfuncs.cpp')
-rw-r--r--src/helperfuncs.cpp15
1 files changed, 15 insertions, 0 deletions
diff --git a/src/helperfuncs.cpp b/src/helperfuncs.cpp
index cf795e697..1581e3b26 100644
--- a/src/helperfuncs.cpp
+++ b/src/helperfuncs.cpp
@@ -1591,3 +1591,18 @@ inline int charlcat(char* x,char y,int z)
return v;
}
+bool charremove(char* mp, char remove)
+{
+ char* mptr = mp;
+ bool shift_down = false;
+ while (*mptr)
+ {
+ if (*mptr == remove)
+ shift_down = true;
+ if (shift_down)
+ *mptr = *(mptr+1);
+ *mptr++;
+ }
+ return shift_down;
+}
+