From: Valery Yatsko Date: Sun, 27 Jul 2008 10:43:49 +0000 (+0400) Subject: Variable aconf was used before its initialization - fixed X-Git-Tag: charybdis-3.1.0~160 X-Git-Url: https://jfr.im/git/irc/rqf/shadowircd.git/commitdiff_plain/1bf485532d3a568973b1dc5b32cb9cbd09e21e24?hp=38e0e40411dff6a16c493ddd6f92add49b872723 Variable aconf was used before its initialization - fixed --- diff --git a/modules/m_dline.c b/modules/m_dline.c index 213a045..e54bacf 100644 --- a/modules/m_dline.c +++ b/modules/m_dline.c @@ -263,16 +263,6 @@ apply_dline(struct Client *source_p, const char *dlhost, int tdline_time, char * return 0; } - /* Look for an oper reason */ - if((oper_reason = strchr(reason, '|')) != NULL) - { - *oper_reason = '\0'; - oper_reason++; - - if(!EmptyString(oper_reason)) - aconf->spasswd = rb_strdup(oper_reason); - } - if(ConfigFileEntry.non_redundant_klines) { if((aconf = find_dline((struct sockaddr *)&daddr, t)) != NULL) @@ -302,6 +292,16 @@ apply_dline(struct Client *source_p, const char *dlhost, int tdline_time, char * aconf->status = CONF_DLINE; aconf->host = rb_strdup(dlhost); + /* Look for an oper reason */ + if((oper_reason = strchr(reason, '|')) != NULL) + { + *oper_reason = '\0'; + oper_reason++; + + if(!EmptyString(oper_reason)) + aconf->spasswd = rb_strdup(oper_reason); + } + if(tdline_time > 0) { rb_snprintf(dlbuffer, sizeof(dlbuffer),