summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorbrain <brain@e03df62e-2008-0410-955e-edbf42e46eb7>2006-03-02 17:51:09 +0000
committerbrain <brain@e03df62e-2008-0410-955e-edbf42e46eb7>2006-03-02 17:51:09 +0000
commit2166d5e63c28a520536a9b3c5379e388fb17bc57 (patch)
tree995ad53cc3118b1c126bf6d1fa6cd5aa2e5aa12c /src
parent66a5aabdbd5e5eb75c158f4447b1c5c89b96ad55 (diff)
Slight optimization here
git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@3434 e03df62e-2008-0410-955e-edbf42e46eb7
Diffstat (limited to 'src')
-rw-r--r--src/users.cpp9
1 files changed, 6 insertions, 3 deletions
diff --git a/src/users.cpp b/src/users.cpp
index 11147298f..90c1ddcf9 100644
--- a/src/users.cpp
+++ b/src/users.cpp
@@ -283,9 +283,12 @@ bool userrec::HasPermission(std::string &command)
bool userrec::AddBuffer(std::string a)
{
std::string b = "";
- for (unsigned int i = 0; i < a.length(); i++)
- if ((a[i] != '\r') && (a[i] != '\0') && (a[i] != 7))
- b = b + a[i];
+ char* n = (char*)a.c_str();
+ for (char* i = n; *i; i++)
+ {
+ if ((*i != '\r') && (*i != '\0') && (*i != 7))
+ b = b + *i;
+ }
std::stringstream stream(recvq);
stream << b;
recvq = stream.str();