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

Comparing ircd-hybrid-7.2/src/client.c (file contents):
Revision 498 by michael, Wed Mar 1 19:30:58 2006 UTC vs.
Revision 650 by michael, Thu Jun 8 07:00:17 2006 UTC

# Line 122 | Line 122 | make_client(struct Client *from)
122      client_p->since = client_p->lasttime = client_p->firsttime = CurrentTime;
123  
124      client_p->localClient = BlockHeapAlloc(lclient_heap);
125 +    client_p->localClient->registration = REG_INIT;
126      /* as good a place as any... */
127      dlinkAdd(client_p, make_dlink_node(), &unknown_list);
128    }
# Line 316 | Line 317 | check_pings_list(dlink_list *list)
317              ilog(L_NOTICE, "No response from %s, closing link",
318                   get_client_name(client_p, HIDE_IP));
319            }
320 +
321            ircsprintf(scratch, "Ping timeout: %d seconds",
322                       (int)(CurrentTime - client_p->lasttime));
321
323            exit_client(client_p, &me, scratch);
324          }
325          else if (!IsPingWarning(client_p) && pingwarn > 0 &&
# Line 362 | Line 363 | check_unknowns_list(void)
363      if (client_p->localClient->reject_delay > 0)
364      {
365        if (client_p->localClient->reject_delay <= CurrentTime)
366 <        exit_client(client_p, &me, "Rejected");
366 >        exit_client(client_p, &me, "Rejected");
367        continue;
368      }
369  
370 <    /* Check UNKNOWN connections - if they have been in this state
370 >    /*
371 >     * Check UNKNOWN connections - if they have been in this state
372       * for > 30s, close them.
373       */
374 <    if (client_p->firsttime ? ((CurrentTime - client_p->firsttime) > 30) : 0)
375 <      exit_client(client_p, &me, "Connection timed out");
374 >    if (IsAuthFinished(client_p) && (CurrentTime - client_p->firsttime) > 30)
375 >      exit_client(client_p, &me, "Registration timed out");
376    }
377   }
378  
# Line 1135 | Line 1137 | dead_link_on_read(struct Client *client_
1137      }
1138      else
1139      {
1140 <      report_error(L_ADMIN, "Lost connection to %s: %d",
1140 >      report_error(L_ADMIN, "Lost connection to %s: %s",
1141                     get_client_name(client_p, SHOW_IP), current_error);
1142 <      report_error(L_OPER, "Lost connection to %s: %d",
1142 >      report_error(L_OPER, "Lost connection to %s: %s",
1143                     get_client_name(client_p, MASK_IP), current_error);
1144      }
1145  
# Line 1337 | Line 1339 | set_initial_nick(struct Client *client_p
1339    
1340    /* This had to be copied here to avoid problems.. */
1341    source_p->tsinfo = CurrentTime;
1342 +  source_p->localClient->registration &= ~REG_NEED_NICK;
1343  
1344    if (source_p->name[0])
1345      hash_del_client(source_p);
# Line 1350 | Line 1353 | set_initial_nick(struct Client *client_p
1353    /* They have the nick they want now.. */
1354    client_p->llname[0] = '\0';
1355  
1356 <  if (source_p->flags & FLAGS_GOTUSER)
1356 >  if (!source_p->localClient->registration)
1357    {
1358      strlcpy(buf, source_p->username, sizeof(buf));
1359  

Diff Legend

Removed lines
+ Added lines
< Changed lines (old)
> Changed lines (new)