From aaf5226111f515f4baa68e95ea6a1db740828ac3 Mon Sep 17 00:00:00 2001 From: brain Date: Wed, 8 Mar 2006 23:16:18 +0000 Subject: Removed has_channel(userrec*,chanrec*), the new preferred way of doing it is channel->HasUser(userrec) Yeah its the other way around to the old way, but somehow, seems less backwards to me (its also faster) git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@3560 e03df62e-2008-0410-955e-edbf42e46eb7 --- src/helperfuncs.cpp | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) (limited to 'src/helperfuncs.cpp') diff --git a/src/helperfuncs.cpp b/src/helperfuncs.cpp index c313b5456..2a929f3b2 100644 --- a/src/helperfuncs.cpp +++ b/src/helperfuncs.cpp @@ -1348,9 +1348,14 @@ void userlist(userrec *user,chanrec *c) CUList *ulist= c->GetUsers(); + /* Improvement by Brain - this doesnt change in value, so why was it inside + * the loop? + */ + bool has_user = c->HasUser(user,c); + for (CUList::iterator i = ulist->begin(); i != ulist->end(); i++) { - if ((!has_channel(user,c)) && (strchr(i->second->modes,'i'))) + if ((!n) && (strchr(i->second->modes,'i'))) { /* * user is +i, and source not on the channel, does not show -- cgit v1.3.1-10-gc9f91