- if (!i->second->IsModeSet('i'))
- SendWhoLine(user, initial, NULL, i->second, whoresults);
+ if (!user->SharesChannelWith(i->second))
+ {
+ if (usingwildcards && (i->second->IsModeSet('i')) && (!IS_OPER(user)))
+ continue;
+ }
+
+ SendWhoLine(user, initial, NULL, i->second, whoresults);