diff options
author | michael <michael@82007160-df01-0410-b94d-b575c5fd34c7> | 2013-01-24 19:26:51 +0000 |
---|---|---|
committer | michael <michael@82007160-df01-0410-b94d-b575c5fd34c7> | 2013-01-24 19:26:51 +0000 |
commit | c5f869f353a21a5ffd2d4f971402b9ebf38fb56c (patch) | |
tree | 92aaaefaa6bcc299cfa427b9142a953bc31ace89 /src/conf_class.c | |
parent | fb40d522d9d47eaf74f2953c04b39ccdcd676682 (diff) |
- Forward-port -r1774:
- Configuration parser now does support 'year' and 'month' units
- Add support for fake idle times to /whois. Known from csircd, this
adds min_idle, and max_idle configuration directives to class{} blocks
git-svn-id: svn://svn.ircd-hybrid.org/svnroot/ircd-hybrid/trunk@1783 82007160-df01-0410-b94d-b575c5fd34c7
Diffstat (limited to 'src/conf_class.c')
-rw-r--r-- | src/conf_class.c | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/src/conf_class.c b/src/conf_class.c index 91ca6df..b354292 100644 --- a/src/conf_class.c +++ b/src/conf_class.c @@ -79,6 +79,23 @@ class_init(void) (class_default = class_make())->name = xstrdup("default"); } +struct ClassItem * +get_class_ptr(const dlink_list *const list) +{ + const dlink_node *ptr = NULL; + + if ((ptr = list->head)) { + const struct MaskItem *conf = ptr->data; + + assert(conf->class); + assert(conf->type & (CONF_OPER | CONF_CLIENT | CONF_SERVER)); + + return conf->class; + } + + return class_default; +} + const char * get_client_class(const dlink_list *const list) { |