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

Comparing ircd-hybrid-7.2/src/client.c (file contents):
Revision 1001 by michael, Mon Aug 17 19:19:16 2009 UTC vs.
Revision 1002 by michael, Sat Aug 29 22:48:40 2009 UTC

# Line 1261 | Line 1261 | del_all_accepts(struct Client *client_p)
1261      del_accept(ptr->data, client_p);
1262   }
1263  
1264 /* set_initial_nick()
1265 *
1266 * inputs
1267 * output
1268 * side effects -
1269 *
1270 * This function is only called to set up an initially registering
1271 * client.
1272 */
1273 void
1274 set_initial_nick(struct Client *client_p, struct Client *source_p,
1275                 const char *nick)
1276 {
1277 char buf[USERLEN + 1];
1278
1279  /* Client setting NICK the first time */
1280  
1281  /* This had to be copied here to avoid problems.. */
1282  source_p->tsinfo = CurrentTime;
1283  source_p->localClient->registration &= ~REG_NEED_NICK;
1284
1285  if (source_p->name[0])
1286    hash_del_client(source_p);
1287
1288  strlcpy(source_p->name, nick, sizeof(source_p->name));
1289  hash_add_client(source_p);
1290
1291  /* fd_desc is long enough */
1292  fd_note(&client_p->localClient->fd, "Nick: %s", nick);
1293  
1294  if (!source_p->localClient->registration)
1295  {
1296    strlcpy(buf, source_p->username, sizeof(buf));
1297
1298    /*
1299     * USER already received, now we have NICK.
1300     * *NOTE* For servers "NICK" *must* precede the
1301     * user message (giving USER before NICK is possible
1302     * only for local client connection!). register_user
1303     * may reject the client and call exit_client for it
1304     * --must test this and exit m_nick too!!!
1305     */
1306    register_local_user(client_p, source_p, nick, buf);
1307  }
1308 }
1309
1264   /* change_local_nick()
1265   *
1266   * inputs       - pointer to server

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines