summaryrefslogtreecommitdiff
path: root/src/channels.cpp
diff options
context:
space:
mode:
authorAttila Molnar <attilamolnar@hush.com>2014-04-07 13:40:51 +0200
committerAttila Molnar <attilamolnar@hush.com>2014-04-07 13:40:51 +0200
commitf71e6bf9cb41811f18864f5d4eecb26e29d03f25 (patch)
tree88586e73f7ff864081b8831a88637680267b7201 /src/channels.cpp
parentce78080782c261aed2c0314bc8c66babc1369be2 (diff)
parent493ff75f1f89a7ede2800eff0368740fbaf02aa4 (diff)
Merge insp20
Diffstat (limited to 'src/channels.cpp')
-rw-r--r--src/channels.cpp3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/channels.cpp b/src/channels.cpp
index c2060b90e..4555deb96 100644
--- a/src/channels.cpp
+++ b/src/channels.cpp
@@ -648,6 +648,7 @@ void Channel::UserList(User *user)
*/
bool has_user = this->HasUser(user);
+ const size_t maxlen = ServerInstance->Config->Limits.MaxLine - 10 - ServerInstance->Config->ServerName.size();
std::string prefixlist;
std::string nick;
for (UserMembIter i = userlist.begin(); i != userlist.end(); ++i)
@@ -675,7 +676,7 @@ void Channel::UserList(User *user)
if (nick.empty())
continue;
- if (list.size() + prefixlist.length() + nick.length() + 1 > 480)
+ if (list.size() + prefixlist.length() + nick.length() + 1 > maxlen)
{
/* list overflowed into multiple numerics */
user->WriteNumeric(RPL_NAMREPLY, list);