From: pk910 Date: Mon, 15 Jul 2013 19:41:30 +0000 (+0200) Subject: fixed dynamic devnull class handling X-Git-Url: http://git.pk910.de/?p=srvx.git;a=commitdiff_plain;h=91aeb5684130fc8d5322af1eca7be2e2f3d1e928 fixed dynamic devnull class handling --- diff --git a/src/mod-hostserv.c b/src/mod-hostserv.c index 0b05e0e..24de72d 100644 --- a/src/mod-hostserv.c +++ b/src/mod-hostserv.c @@ -1296,7 +1296,7 @@ struct devnull_class hostserv_get_user_priv(struct handle_info *hi) { th.maxchan = devc->maxchan; if(DEVNULL_HAS_PRIV(devc, MAXSENDQ) && (!DEVNULL_HAS_PRIV(&th, MAXSENDQ) || th.maxsendq < devc->maxsendq)) th.maxsendq = devc->maxsendq; - th.modes |= devc->maxsendq; + th.modes |= devc->modes; if(!th.name) th.name = devc->name; } diff --git a/src/opserv.c b/src/opserv.c index dddf23b..ccede74 100644 --- a/src/opserv.c +++ b/src/opserv.c @@ -4762,6 +4762,17 @@ struct devnull_class devnull_user_get_class(struct handle_info *hi) { struct devnull_class th; memset(&th, 0, sizeof(th)); + if(devnull_check_priv_func) { + struct devnull_class ext_class = ((struct devnull_class (*)(struct handle_info *))devnull_check_priv_func)(hi); + th.modes |= ext_class.modes; + if(ext_class.name) + th.name = ext_class.name; + if(DEVNULL_HAS_PRIV(&th, CHANLIMIT)) + th.maxchan = ext_class.maxchan; + if(DEVNULL_HAS_PRIV(&th, MAXSENDQ)) + th.maxsendq = ext_class.maxsendq; + } + if(hi->devnull_id) { struct devnull_class *thp; if((thp = devnull_find_id(hi->devnull_id))) {