summaryrefslogtreecommitdiff
path: root/src/users.cpp
diff options
context:
space:
mode:
authorbrain <brain@e03df62e-2008-0410-955e-edbf42e46eb7>2006-02-07 18:26:38 +0000
committerbrain <brain@e03df62e-2008-0410-955e-edbf42e46eb7>2006-02-07 18:26:38 +0000
commitdba88edc767697f9c2a9de3c4c2fbaea6cc35f3e (patch)
tree74122d2f9666219c8b4bd047604711f5a2772fa5 /src/users.cpp
parentdaff96bf568a51de4e4ec460240e093c43b11ff3 (diff)
Experimental improved string handling in server links
git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@3127 e03df62e-2008-0410-955e-edbf42e46eb7
Diffstat (limited to 'src/users.cpp')
-rw-r--r--src/users.cpp5
1 files changed, 3 insertions, 2 deletions
diff --git a/src/users.cpp b/src/users.cpp
index 7513fa273..8c3ad4969 100644
--- a/src/users.cpp
+++ b/src/users.cpp
@@ -276,7 +276,8 @@ bool userrec::AddBuffer(std::string a)
bool userrec::BufferIsReady()
{
- for (unsigned int i = 0; i < recvq.length(); i++)
+ unsigned int t = recvq.length();
+ for (unsigned int i = 0; i < t; i++)
if (recvq[i] == '\n')
return true;
return false;
@@ -293,7 +294,7 @@ std::string userrec::GetBuffer()
return "";
char* line = (char*)recvq.c_str();
std::string ret = "";
- while ((*line != '\n') && (strlen(line)))
+ while ((*line != '\n') && (*line))
{
ret = ret + *line;
line++;