/[svn]/ircd-hybrid-7.2/src/ircd_parser.y
ViewVC logotype

Diff of /ircd-hybrid-7.2/src/ircd_parser.y

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 1008 by michael, Mon Aug 31 23:07:43 2009 UTC revision 1009 by michael, Sun Sep 13 15:02:30 2009 UTC
# Line 28  Line 28 
28  #include <sys/types.h>  #include <sys/types.h>
29  #include <string.h>  #include <string.h>
30    
31    #include "config.h"
32    #ifdef HAVE_LIBPCRE
33    #include <pcre.h>
34    #endif
35  #include "stdinc.h"  #include "stdinc.h"
36  #include "ircd.h"  #include "ircd.h"
37  #include "tools.h"  #include "tools.h"
# Line 36  Line 40 
40  #include "event.h"  #include "event.h"
41  #include "s_log.h"  #include "s_log.h"
42  #include "client.h"     /* for UMODE_ALL only */  #include "client.h"     /* for UMODE_ALL only */
 #include "pcre.h"  
43  #include "irc_string.h"  #include "irc_string.h"
44  #include "irc_getaddrinfo.h"  #include "irc_getaddrinfo.h"
45  #include "sprintf_irc.h"  #include "sprintf_irc.h"
# Line 2917  kill_entry: KILL Line 2920  kill_entry: KILL
2920      {      {
2921        if (regex_ban)        if (regex_ban)
2922        {        {
2923          pcre *exp_user = NULL;  #ifdef HAVE_LIBPCRE
2924          pcre *exp_host = NULL;          void *exp_user = NULL;
2925            void *exp_host = NULL;
2926          const char *errptr = NULL;          const char *errptr = NULL;
2927    
2928          if (!(exp_user = ircd_pcre_compile(userbuf, &errptr)) ||          if (!(exp_user = ircd_pcre_compile(userbuf, &errptr)) ||
# Line 2940  kill_entry: KILL Line 2944  kill_entry: KILL
2944            DupString(yy_aconf->reason, reasonbuf);            DupString(yy_aconf->reason, reasonbuf);
2945          else          else
2946            DupString(yy_aconf->reason, "No reason");            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        else
2953        {        {
# Line 3081  gecos_entry: GECOS Line 3089  gecos_entry: GECOS
3089      {      {
3090        if (regex_ban)        if (regex_ban)
3091        {        {
3092          pcre *exp_p = NULL;  #ifdef HAVE_LIBPCRE
3093            void *exp_p = NULL;
3094          const char *errptr = NULL;          const char *errptr = NULL;
3095    
3096          if (!(exp_p = ircd_pcre_compile(gecos_name, &errptr)))          if (!(exp_p = ircd_pcre_compile(gecos_name, &errptr)))
# Line 3093  gecos_entry: GECOS Line 3102  gecos_entry: GECOS
3102    
3103          yy_conf = make_conf_item(RXLINE_TYPE);          yy_conf = make_conf_item(RXLINE_TYPE);
3104          yy_conf->regexpname = exp_p;          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        else
3111          yy_conf = make_conf_item(XLINE_TYPE);          yy_conf = make_conf_item(XLINE_TYPE);

Legend:
Removed from v.1008  
changed lines
  Added in v.1009

svnadmin@ircd-hybrid.org
ViewVC Help
Powered by ViewVC 1.1.26