* ---------------------------------------------------
*/
+#include "inspircd.h"
#include "users.h"
#include "inspircd.h"
#include "commands/cmd_list.h"
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);