X-Git-Url: https://jfr.im/git/irc/evilnet/x3.git/blobdiff_plain/8de34abdbe21c8401bf35781ca13d66f6c14e018..4b8ccfeb5cff79382167d1d7d6c765870ed1a5cd:/src/opserv.c diff --git a/src/opserv.c b/src/opserv.c index 33482e2..7f3e0cc 100644 --- a/src/opserv.c +++ b/src/opserv.c @@ -1400,8 +1400,10 @@ opserv_svsjoin(struct userNode *target, UNUSED_ARG(char *src_handle), UNUSED_ARG return; /* channel is invite only */ } - if (channel->members.used >= channel->limit) { - return; /* channel is invite on */ + if (channel->limit > 0) { + if (channel->members.used >= channel->limit) { + return; /* channel is invite on */ + } } if (*channel->key) { @@ -2809,7 +2811,7 @@ opserv_notice_handler(struct userNode *user, struct userNode *bot, char *text, U if(text[0] == '\001') { text++; cmd = mysep(&text, " "); - if(!irccasecmp(cmd, "VERSION")) { + if(cmd && !irccasecmp(cmd, "VERSION")) { char *version = mysep(&text, "\n"); if(!version) version = ""; @@ -5741,8 +5743,10 @@ trace_svsjoin_func(struct userNode *match, void *extra) return 1; /* channel is invite only */ } - if (channel->members.used >= channel->limit) { - return 1; /* channel is invite on */ + if (channel->limit > 0) { + if (channel->members.used >= channel->limit) { + return 1; /* channel is invite on */ + } } if (*channel->key) {