summaryrefslogtreecommitdiff
path: root/src/helperfuncs.cpp
diff options
context:
space:
mode:
authorbrain <brain@e03df62e-2008-0410-955e-edbf42e46eb7>2006-03-09 14:13:16 +0000
committerbrain <brain@e03df62e-2008-0410-955e-edbf42e46eb7>2006-03-09 14:13:16 +0000
commit368022378b7618bad9e785ab5e5d3d57e6c5369f (patch)
tree00775b03bfc3eb70f90717e0646eb2c4c9257572 /src/helperfuncs.cpp
parentd4d14b2a9cdbb7984c1ff73557493b96f9bcb31c (diff)
Modes the wrong way around
git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@3590 e03df62e-2008-0410-955e-edbf42e46eb7
Diffstat (limited to 'src/helperfuncs.cpp')
-rw-r--r--src/helperfuncs.cpp12
1 files changed, 6 insertions, 6 deletions
diff --git a/src/helperfuncs.cpp b/src/helperfuncs.cpp
index a02d19702..7e9f72913 100644
--- a/src/helperfuncs.cpp
+++ b/src/helperfuncs.cpp
@@ -1324,8 +1324,8 @@ void userlist(userrec *user,chanrec *c)
char list[MAXBUF];
size_t dlen = snprintf(list,MAXBUF,"353 %s = %s :", user->nick, c->name);
- int n = 0;
- char* ptr = list + dlen;
+ int numusers = 0;
+ char* ptr = list + dlen - 1;
CUList *ulist= c->GetUsers();
@@ -1351,7 +1351,7 @@ void userlist(userrec *user,chanrec *c)
for (char* t = i->second->nick; *t; t++)
*ptr++ = *t;
*ptr++ = ' ';
- n++;
+ numusers++;
if ((ptr - list) > (480-NICKMAX))
{
@@ -1359,14 +1359,14 @@ void userlist(userrec *user,chanrec *c)
*--ptr = 0;
WriteServ_NoFormat(user->fd,list);
dlen = snprintf(list,MAXBUF,"353 %s = %s :", user->nick, c->name);
- ptr = list + dlen;
- n = 0;
+ ptr = list + dlen - 1;
+ numusers = 0;
}
}
*--ptr = 0;
/* if whats left in the list isnt empty, send it */
- if (n)
+ if (numusers)
{
WriteServ_NoFormat(user->fd,list);
}