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 5798 by michael, Fri Apr 17 16:19:42 2015 UTC vs.
Revision 5810 by michael, Thu Apr 23 17:27:17 2015 UTC

# Line 319 | Line 319 | verify_access(struct Client *client_p)
319                               client_p->connection->password);
320    }
321  
322 <  if (conf)
323 <  {
324 <    if (IsConfClient(conf))
325 <    {
326 <      if (IsConfRedir(conf))
327 <      {
328 <        sendto_one_numeric(client_p, &me, RPL_REDIR,
329 <                           conf->name ? conf->name : "",
330 <                           conf->port);
331 <        return NOT_AUTHORIZED;
332 <      }
333 <
334 <      /* Thanks for spoof idea amm */
335 <      if (IsConfDoSpoofIp(conf))
336 <      {
337 <        if (IsConfSpoofNotice(conf))
338 <          sendto_realops_flags(UMODE_ALL, L_ADMIN, SEND_NOTICE, "%s spoofing: %s as %s",
339 <                               client_p->name, client_p->host, conf->name);
322 >  if (!conf)
323 >    return NOT_AUTHORIZED;
324  
325 <        strlcpy(client_p->host, conf->name, sizeof(client_p->host));
342 <      }
325 >  assert(IsConfClient(conf) || IsConfKill(conf));
326  
327 <      return attach_iline(client_p, conf);
327 >  if (IsConfClient(conf))
328 >  {
329 >    if (IsConfRedir(conf))
330 >    {
331 >      sendto_one_numeric(client_p, &me, RPL_REDIR,
332 >                         conf->name ? conf->name : "",
333 >                         conf->port);
334 >      return NOT_AUTHORIZED;
335      }
336 <    else if (IsConfKill(conf) || (ConfigGeneral.glines && IsConfGline(conf)))
336 >
337 >    if (IsConfDoSpoofIp(conf))
338      {
339 <      if (IsConfGline(conf))
340 <        sendto_one_notice(client_p, &me, ":*** G-lined");
339 >      if (IsConfSpoofNotice(conf))
340 >        sendto_realops_flags(UMODE_ALL, L_ADMIN, SEND_NOTICE, "%s spoofing: %s as %s",
341 >                             client_p->name, client_p->host, conf->name);
342  
343 <      sendto_one_notice(client_p, &me, ":*** Banned: %s", conf->reason);
352 <      return BANNED_CLIENT;
343 >      strlcpy(client_p->host, conf->name, sizeof(client_p->host));
344      }
345 +
346 +    return attach_iline(client_p, conf);
347    }
348  
349 <  return NOT_AUTHORIZED;
349 >  sendto_one_notice(client_p, &me, ":*** Banned: %s", conf->reason);
350 >  return BANNED_CLIENT;
351   }
352  
353   /* check_client()
# Line 840 | Line 834 | set_default_conf(void)
834    ConfigGeneral.away_time = 10;
835    ConfigGeneral.max_watch = WATCHSIZE_DEFAULT;
836    ConfigGeneral.cycle_on_host_change = 1;
837 <  ConfigGeneral.glines = 0;
838 <  ConfigGeneral.gline_time = 12 * 3600;
839 <  ConfigGeneral.gline_request_time = GLINE_REQUEST_EXPIRE_DEFAULT;
840 <  ConfigGeneral.gline_min_cidr = 16;
847 <  ConfigGeneral.gline_min_cidr6 = 48;
837 >  ConfigGeneral.dline_min_cidr = 16;
838 >  ConfigGeneral.dline_min_cidr6 = 48;
839 >  ConfigGeneral.kline_min_cidr = 16;
840 >  ConfigGeneral.kline_min_cidr6 = 48;
841    ConfigGeneral.invisible_on_connect = 1;
842    ConfigGeneral.tkline_expire_notices = 1;
843    ConfigGeneral.ignore_bogus_ts = 0;
# Line 1090 | Line 1083 | static const struct oper_privs
1083    { OPER_FLAG_ADMIN,          'A' },
1084    { OPER_FLAG_REMOTEBAN,      'B' },
1085    { OPER_FLAG_DIE,            'D' },
1093  { OPER_FLAG_GLINE,          'G' },
1086    { OPER_FLAG_REHASH,         'H' },
1087    { OPER_FLAG_KLINE,          'K' },
1088    { OPER_FLAG_KILL,           'N' },

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines