X-Git-Url: https://jfr.im/git/irc/evilnet/x3.git/blobdiff_plain/2c00fbc2522a44891208fbc52f683968263415c8..8dc0685213ead3f8896c83cadc130143ccc4d181:/src/opserv.c diff --git a/src/opserv.c b/src/opserv.c index b74fc17..7f3e0cc 100644 --- a/src/opserv.c +++ b/src/opserv.c @@ -18,6 +18,7 @@ * Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA. */ +#include "config.h" #include "chanserv.h" #include "conf.h" #include "common.h" @@ -1399,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) { @@ -2808,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 = ""; @@ -5740,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) {