summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorbrain <brain@e03df62e-2008-0410-955e-edbf42e46eb7>2008-03-30 02:39:38 +0000
committerbrain <brain@e03df62e-2008-0410-955e-edbf42e46eb7>2008-03-30 02:39:38 +0000
commitbca70575cb3d58127f80d92a388b60b5f5ed2fde (patch)
tree8c9bc3c182ce4bf37b2b4ca86f4f30d1b80481ef /src
parent1e7813c42284a6b0f7bdc41d6c05fbca246f895f (diff)
The bug we fixed for bug #506 may still occur in trunk if a module adjusts the nick and prefix output in the same way via OnNamesListItem, so we really should apply a similar fix here too
git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@9216 e03df62e-2008-0410-955e-edbf42e46eb7
Diffstat (limited to 'src')
-rw-r--r--src/channels.cpp14
1 files changed, 8 insertions, 6 deletions
diff --git a/src/channels.cpp b/src/channels.cpp
index ebd317e1d..15288ef09 100644
--- a/src/channels.cpp
+++ b/src/channels.cpp
@@ -895,12 +895,7 @@ void Channel::UserList(User *user, CUList *ulist)
continue;
}
- size_t ptrlen = snprintf(ptr, MAXBUF, "%s%s ", prefixlist.c_str(), nick.c_str());
-
- curlen += ptrlen;
- ptr += ptrlen;
-
- numusers++;
+ size_t ptrlen = 0;
if (curlen > (480-NICKMAX))
{
@@ -914,6 +909,13 @@ void Channel::UserList(User *user, CUList *ulist)
ptrlen = 0;
numusers = 0;
}
+
+ ptrlen = snprintf(ptr, MAXBUF, "%s%s ", prefixlist.c_str(), nick.c_str());
+
+ curlen += ptrlen;
+ ptr += ptrlen;
+
+ numusers++;
}
/* if whats left in the list isnt empty, send it */