if (too_many || too_few)
continue;
- if ((pcnt && (!match(i->second->name, parameters[0])) || (*i->second->topic && !match(i->second->topic, parameters[0]))))
- continue;
+ if (pcnt)
+ {
+ if (!match(i->second->name, parameters[0]) && !match(i->second->topic, parameters[0]))
+ continue;
+ }
// if the channel is not private/secret, OR the user is on the channel anyway
bool n = i->second->HasUser(user);
- if ((i->second->modes[CM_PRIVATE]) && (!n))
+ if ((i->second->IsModeSet('p')) && (!n))
{
if (users)
user->WriteServ("322 %s *",user->nick,i->second->name);
}
else
{
- if (((!(i->second->modes[CM_PRIVATE])) && (!(i->second->modes[CM_SECRET]))) || (n))
+ if (((!(i->second->IsModeSet('p'))) && (!(i->second->IsModeSet('s')))) || (n))
{
long users = i->second->GetUserCounter();
if (users)
return CMD_SUCCESS;
}
+