* IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
* POSSIBILITY OF SUCH DAMAGE.
*
- * $Id: s_newconf.c 1747 2006-07-25 21:22:45Z jilles $
+ * $Id: s_newconf.c 3508 2007-06-04 16:04:49Z jilles $
*/
#include "stdinc.h"
get_oper_name(source_p), name, newval);
}
else
- sendto_one(source_p, ":%s NOTICE %s :Can't find %s",
- me.name, source_p->name, name);
+ sendto_one_notice(source_p, ":Can't find %s", name);
}
struct ConfItem *
const char *p;
char tmpch;
int nonwild = 0;
+ int wild = 0;
/* check the string for minimum number of nonwildcard chars */
p = data;
/* found an escape, p points to the char after it, so skip
* that and move on.
*/
- if(tmpch == '\\')
+ if(tmpch == '\\' && *p)
{
p++;
+ if(++nonwild >= ConfigFileEntry.min_nonwildcard_simple)
+ return 1;
}
else if(!IsMWildChar(tmpch))
{
if(++nonwild >= ConfigFileEntry.min_nonwildcard_simple)
return 1;
}
+ else
+ wild++;
}
- return 0;
+ /* strings without wilds are also ok */
+ return wild == 0;
}
time_t