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

Comparing ircd-hybrid-7.2/src/s_user.c (file contents):
Revision 591 by michael, Mon May 8 18:40:00 2006 UTC vs.
Revision 592 by michael, Thu May 11 12:43:02 2006 UTC

# Line 67 | Line 67 | static char umode_buffer[IRCD_BUFSIZE];
67   static void user_welcome(struct Client *);
68   static void report_and_set_user_flags(struct Client *, const struct AccessItem *);
69   static int check_xline(struct Client *);
70 static int check_regexp_xline(struct Client *);
70   static void introduce_client(struct Client *, struct Client *);
71   static void *uid_get(va_list);
72  
# Line 418 | Line 417 | register_local_user(struct Client *clien
417  
418    assert(source_p == client_p);
419  
420 <  /* end of valid user name check */
422 <  if (check_xline(source_p) || check_regexp_xline(source_p))
420 >  if (check_xline(source_p))
421      return;
422  
423    if (IsDead(client_p))
# Line 1210 | Line 1208 | user_welcome(struct Client *source_p)
1208   static int
1209   check_xline(struct Client *source_p)
1210   {
1211 <  struct ConfItem *conf;
1212 <  struct MatchItem *xconf;
1215 <  const char *reason;
1211 >  struct ConfItem *conf = NULL;
1212 >  const char *reason = NULL;
1213  
1214 <  if ((conf = find_matching_name_conf(XLINE_TYPE, source_p->info,
1215 <                                      NULL, NULL, 0)) != NULL)
1214 >  if ((conf = find_matching_name_conf(XLINE_TYPE, source_p->info, NULL, NULL, 0)) ||
1215 >      (conf = find_matching_name_conf(RXLINE_TYPE, source_p->info, NULL, NULL, 0)))
1216    {
1217 <    xconf = map_to_conf(conf);
1218 <    xconf->count++;
1217 >    struct MatchItem *reg = map_to_conf(conf);
1218 >
1219 >    ++reg->count;
1220  
1221 <    if (xconf->reason != NULL)
1222 <      reason = xconf->reason;
1221 >    if (reg->reason != NULL)
1222 >      reason = reg->reason;
1223      else
1224        reason = "No Reason";
1225  
# Line 1231 | Line 1229 | check_xline(struct Client *source_p)
1229                           get_client_name(source_p, HIDE_IP),
1230                           source_p->sockhost);
1231  
1232 <    ServerStats->is_ref++;      
1232 >    ServerStats->is_ref++;
1233      if (REJECT_HOLD_TIME > 0)
1234      {
1235        sendto_one(source_p, ":%s NOTICE %s :Bad user info",
# Line 1244 | Line 1242 | check_xline(struct Client *source_p)
1242      return 1;
1243    }
1244  
1247  return 0;
1248 }
1249
1250 static int
1251 check_regexp_xline(struct Client *source_p)
1252 {
1253  struct ConfItem *conf = NULL;
1254  const char *reason = NULL;
1255
1256  if ((conf = find_matching_name_conf(RXLINE_TYPE, source_p->info, NULL, NULL, 0)))
1257  {
1258    struct MatchItem *reg = map_to_conf(conf);
1259
1260    ++reg->count;
1261
1262    if (reg->reason != NULL)
1263      reason = reg->reason;
1264    else
1265      reason = "No Reason";
1266
1267    sendto_realops_flags(UMODE_REJ, L_ALL,
1268                         "X-line (REGEX) Rejecting [%s] [%s], user %s [%s]",
1269                         source_p->info, reason,
1270                         get_client_name(source_p, HIDE_IP),
1271                         source_p->sockhost);
1272
1273    ServerStats->is_ref++;
1274    exit_client(source_p, &me, "Bad user info");
1275    return 1;
1276  }
1277
1245    return 0;
1246   }
1247  

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines