- allowchans.clear();
- ConfigTagList tags = ServerInstance->Config->ConfTags("allowchannel");
- for(ConfigIter i = tags.first; i != tags.second; ++i)
+ const AccountExtItem* accountext = GetAccountExtItem();
+ if (allowregistered && accountext && accountext->get(user))
+ return true;
+
+ if (user->HasPrivPermission("channels/restricted-create"))
+ return true;
+
+ for (AllowChans::const_iterator it = allowchans.begin(), it_end = allowchans.end(); it != it_end; ++it)