ViewVC Help
View File | Revision Log | Show Annotations | View Changeset | Root Listing
root/svn/ircd-hybrid/branches/8.2.x/src/conf.c
(Generate patch)

Comparing ircd-hybrid/branches/8.2.x/src/conf.c (file contents):
Revision 7479 by michael, Wed Mar 16 08:53:26 2016 UTC vs.
Revision 7725 by michael, Mon Sep 26 14:59:44 2016 UTC

# Line 220 | Line 220 | attach_iline(struct Client *client_p, st
220    const struct ClassItem *const class = conf->class;
221    struct ip_entry *ip_found;
222    int a_limit_reached = 0;
223 <  unsigned int local = 0, global = 0, ident = 0;
223 >  unsigned int local = 0, global = 0;
224  
225    ip_found = ipcache_find_or_add_address(&client_p->connection->ip);
226    ip_found->count++;
227    AddFlag(client_p, FLAGS_IPHASH);
228  
229 <  userhost_count(client_p->username, client_p->host,
230 <                 &global, &local, &ident);
229 >  userhost_count(client_p->sockhost, &global, &local);
230  
231    /* XXX blah. go down checking the various silly limits
232     * setting a_limit_reached if any limit is reached.
# Line 237 | Line 236 | attach_iline(struct Client *client_p, st
236      a_limit_reached = 1;
237    else if (class->max_perip && ip_found->count > class->max_perip)
238      a_limit_reached = 1;
239 <  else if (class->max_local && local >= class->max_local)
239 >  else if (class->max_local && local >= class->max_local) /* XXX: redundant */
240      a_limit_reached = 1;
241    else if (class->max_global && global >= class->max_global)
242      a_limit_reached = 1;
244  else if (class->max_ident && ident >= class->max_ident &&
245           client_p->username[0] != '~')
246    a_limit_reached = 1;
243  
244    if (a_limit_reached)
245    {
# Line 367 | Line 363 | check_client(struct Client *source_p)
363        /* jdc - lists server name & port connections are on */
364        /*       a purely cosmetical change */
365        sendto_realops_flags(UMODE_UNAUTH, L_ALL, SEND_NOTICE,
366 <                           "Unauthorized client connection from %s [%s] on [%s/%u].",
366 >                           "Unauthorized client connection from %s on [%s/%u].",
367                             get_client_name(source_p, SHOW_IP),
372                           source_p->sockhost,
368                             source_p->connection->listener->name,
369                             source_p->connection->listener->port);
370        ilog(LOG_TYPE_IRCD, "Unauthorized client connection from %s on [%s/%u].",
# Line 484 | Line 479 | attach_connect_block(struct Client *clie
479    {
480      struct MaskItem *conf = node->data;
481  
482 <    if (match(conf->name, name) || match(conf->host, host))
482 >    if (irccmp(conf->name, name) ||
483 >        irccmp(conf->host, host))
484        continue;
485  
486      attach_conf(client_p, conf);
# Line 755 | Line 751 | void
751   conf_rehash(int sig)
752   {
753    if (sig)
754 +  {
755      sendto_realops_flags(UMODE_SERVNOTICE, L_ALL, SEND_NOTICE,
756                           "Got signal SIGHUP, reloading configuration file(s)");
757 +    ilog(LOG_TYPE_IRCD, "Got signal SIGHUP, reloading configuration file(s)");
758 +  }
759  
760    restart_resolver();
761  
# Line 1182 | Line 1181 | conf_add_class_to_conf(struct MaskItem *
1181   void
1182   yyerror(const char *msg)
1183   {
1185  char newlinebuf[IRCD_BUFSIZE];
1186
1184    if (conf_parser_ctx.pass != 1)
1185      return;
1186  
1187 <  strip_tabs(newlinebuf, linebuf, sizeof(newlinebuf));
1187 >  char *p = stripws(linebuf);
1188    sendto_realops_flags(UMODE_SERVNOTICE, L_ADMIN, SEND_NOTICE,
1189                         "\"%s\", line %u: %s: %s",
1190 <                       conffilebuf, lineno + 1, msg, newlinebuf);
1190 >                       conffilebuf, lineno + 1, msg, p);
1191    ilog(LOG_TYPE_IRCD, "\"%s\", line %u: %s: %s",
1192 <       conffilebuf, lineno + 1, msg, newlinebuf);
1192 >       conffilebuf, lineno + 1, msg, p);
1193   }
1194  
1195   void
1196   conf_error_report(const char *msg)
1197   {
1198 <  char newlinebuf[IRCD_BUFSIZE];
1202 <
1203 <  strip_tabs(newlinebuf, linebuf, sizeof(newlinebuf));
1198 >  char *p = stripws(linebuf);
1199    sendto_realops_flags(UMODE_SERVNOTICE, L_ADMIN, SEND_NOTICE,
1200                         "\"%s\", line %u: %s: %s",
1201 <                       conffilebuf, lineno + 1, msg, newlinebuf);
1201 >                       conffilebuf, lineno + 1, msg, linebuf);
1202    ilog(LOG_TYPE_IRCD, "\"%s\", line %u: %s: %s",
1203 <       conffilebuf, lineno + 1, msg, newlinebuf);
1203 >       conffilebuf, lineno + 1, msg, linebuf);
1204   }
1205  
1206   /*

Comparing ircd-hybrid/branches/8.2.x/src/conf.c (property svn:keywords):
Revision 7479 by michael, Wed Mar 16 08:53:26 2016 UTC vs.
Revision 7725 by michael, Mon Sep 26 14:59:44 2016 UTC

# Line 1 | Line 1
1 < Id Revision
1 > Id

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines