+
+ if (checkrestrictions) {
+ if (trace_check_bans(match, channel) == 1) {
+ return 1; /* found on lamer list */
+ }
+
+ if (channel->modes & MODE_INVITEONLY) {
+ return 1; /* channel is invite only */
+ }
+
+ if (channel->limit > 0) {
+ if (channel->members.used >= channel->limit) {
+ return 1; /* channel is invite on */
+ }
+ }
+
+ if (*channel->key) {
+ return 1; /* channel is password protected */
+ }
+ }
+