aboutsummaryrefslogtreecommitdiffstats
path: root/src/modules/m_namesx.cpp
diff options
context:
space:
mode:
authorGravatar brain2008-03-29 14:58:46 +0000
committerGravatar brain2008-03-29 14:58:46 +0000
commit3df02f388c4d9c61d0e75dbcf0a091cd0ce2fb06 (patch)
tree9b55c784ca1a3ec1674e806962cde9f958d7c8b8 /src/modules/m_namesx.cpp
parentDon't desync when trying to remotely set swhois on a user who already has one (diff)
Fix for bug #506 reported by Skip
git-svn-id: http://svn.inspircd.org/repository/branches/1_1_stable@9202 e03df62e-2008-0410-955e-edbf42e46eb7
Diffstat (limited to 'src/modules/m_namesx.cpp')
-rw-r--r--src/modules/m_namesx.cpp7
1 files changed, 5 insertions, 2 deletions
diff --git a/src/modules/m_namesx.cpp b/src/modules/m_namesx.cpp
index 8478c0a49..4118d2101 100644
--- a/src/modules/m_namesx.cpp
+++ b/src/modules/m_namesx.cpp
@@ -97,11 +97,12 @@ class ModuleNamesX : public Module
size_t ptrlen = snprintf(ptr, MAXBUF, "%s%s ", Ptr->GetAllPrefixChars(i->first), i->second.c_str());
/* OnUserList can change this - reset it back to normal */
- i->second = i->first->nick;
curlen += ptrlen;
ptr += ptrlen;
numusers++;
- if (curlen > (480-NICKMAX))
+
+ /* Fix for bug #506 reported by Skip, often seen by w00t :p */
+ if (curlen > (480-i->second.length()))
{
/* list overflowed into multiple numerics */
user->WriteServ(std::string(list));
@@ -111,6 +112,8 @@ class ModuleNamesX : public Module
ptrlen = 0;
numusers = 0;
}
+
+ i->second = i->first->nick;
}
/* if whats left in the list isnt empty, send it */
if (numusers)