summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorbrain <brain@e03df62e-2008-0410-955e-edbf42e46eb7>2006-03-09 00:04:39 +0000
committerbrain <brain@e03df62e-2008-0410-955e-edbf42e46eb7>2006-03-09 00:04:39 +0000
commite68c10bb71182fc190eda5b4a305dce97eaa1be2 (patch)
tree36deea7dbf4696f601bbf4b2c403d24fe5ba644f
parentcdf14e8f5e9824052601acc6d35c3f7567942a8f (diff)
Speedup of list
git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@3566 e03df62e-2008-0410-955e-edbf42e46eb7
-rw-r--r--src/cmd_list.cpp5
1 files changed, 3 insertions, 2 deletions
diff --git a/src/cmd_list.cpp b/src/cmd_list.cpp
index 7b17cfa77..2f588e861 100644
--- a/src/cmd_list.cpp
+++ b/src/cmd_list.cpp
@@ -46,9 +46,10 @@ void cmd_list::Handle (char **parameters, int pcnt, userrec *user)
for (chan_hash::const_iterator i = chanlist.begin(); i != chanlist.end(); i++)
{
// if the channel is not private/secret, OR the user is on the channel anyway
- if (((!(i->second->binarymodes & CM_PRIVATE)) && (!(i->second->binarymodes & CM_SECRET))) || (i->second->HasUser(user)))
+ bool n = i->second->HasUser(user);
+ if (((!(i->second->binarymodes & CM_PRIVATE)) && (!(i->second->binarymodes & CM_SECRET))) || (n))
{
- WriteServ(user->fd,"322 %s %s %d :[+%s] %s",user->nick,i->second->name,usercount_i(i->second),chanmodes(i->second,i->second->HasUser(user)),i->second->topic);
+ WriteServ(user->fd,"322 %s %s %d :[+%s] %s",user->nick,i->second->name,usercount_i(i->second),chanmodes(i->second,n),i->second->topic);
}
}
WriteServ(user->fd,"323 %s :End of channel list.",user->nick);