ViewVC Help
View File | Revision Log | Show Annotations | View Changeset | Root Listing
root/svn/ircd-hybrid/trunk/src/conf_parser.y
(Generate patch)

Comparing ircd-hybrid-7.2/src/ircd_parser.y (file contents):
Revision 1005 by michael, Mon Aug 31 23:07:43 2009 UTC vs.
Revision 1009 by michael, Sun Sep 13 15:02:30 2009 UTC

# Line 28 | Line 28
28   #include <sys/types.h>
29   #include <string.h>
30  
31 + #include "config.h"
32 + #ifdef HAVE_LIBPCRE
33 + #include <pcre.h>
34 + #endif
35   #include "stdinc.h"
36   #include "ircd.h"
37   #include "tools.h"
# Line 36 | Line 40
40   #include "event.h"
41   #include "s_log.h"
42   #include "client.h"     /* for UMODE_ALL only */
39 #include "pcre.h"
43   #include "irc_string.h"
44   #include "irc_getaddrinfo.h"
45   #include "sprintf_irc.h"
# Line 2917 | Line 2920 | kill_entry: KILL
2920      {
2921        if (regex_ban)
2922        {
2923 <        pcre *exp_user = NULL;
2924 <        pcre *exp_host = NULL;
2923 > #ifdef HAVE_LIBPCRE
2924 >        void *exp_user = NULL;
2925 >        void *exp_host = NULL;
2926          const char *errptr = NULL;
2927  
2928          if (!(exp_user = ircd_pcre_compile(userbuf, &errptr)) ||
# Line 2940 | Line 2944 | kill_entry: KILL
2944            DupString(yy_aconf->reason, reasonbuf);
2945          else
2946            DupString(yy_aconf->reason, "No reason");
2947 + #else
2948 +        ilog(L_ERROR, "Failed to add regular expression based K-Line: no PCRE support");
2949 +        break;
2950 + #endif
2951        }
2952        else
2953        {
# Line 3081 | Line 3089 | gecos_entry: GECOS
3089      {
3090        if (regex_ban)
3091        {
3092 <        pcre *exp_p = NULL;
3092 > #ifdef HAVE_LIBPCRE
3093 >        void *exp_p = NULL;
3094          const char *errptr = NULL;
3095  
3096          if (!(exp_p = ircd_pcre_compile(gecos_name, &errptr)))
# Line 3093 | Line 3102 | gecos_entry: GECOS
3102  
3103          yy_conf = make_conf_item(RXLINE_TYPE);
3104          yy_conf->regexpname = exp_p;
3105 + #else
3106 +        ilog(L_ERROR, "Failed to add regular expression based X-Line: no PCRE support");
3107 +        break;
3108 + #endif
3109        }
3110        else
3111          yy_conf = make_conf_item(XLINE_TYPE);

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines