/[svn]/ircd-hybrid/src/s_user.c
ViewVC logotype

Diff of /ircd-hybrid/src/s_user.c

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 576 by michael, Tue Mar 21 19:06:29 2006 UTC revision 577 by michael, Mon May 1 12:27:59 2006 UTC
# Line 399  register_local_user(struct Client *sourc Line 399  register_local_user(struct Client *sourc
399    if (check_xline(source_p) || check_regexp_xline(source_p))    if (check_xline(source_p) || check_regexp_xline(source_p))
400      return;      return;
401    
402    if (source_p->id[0] == '\0' && me.id[0])    if (me.id[0] != '\0')
403    {    {
404      char *id = (char *) execute_callback(uid_get_cb, source_p);      const char *id = execute_callback(uid_get_cb, source_p);
405    
406      while (hash_find_id(id) != NULL)      while (hash_find_id(id) != NULL)
407        id = uid_get(NULL);        id = uid_get(NULL);
408    
# Line 1239  init_uid(void) Line 1240  init_uid(void)
1240      if (new_uid[i] == '\0')      if (new_uid[i] == '\0')
1241        new_uid[i] = 'A';        new_uid[i] = 'A';
1242    
1243    /* XXX if IRC_MAXUID != 6, this will have to be rewritten */    /* NOTE: if IRC_MAXUID != 6, this will have to be rewritten */
1244    /* Yes nenolod, I have known it was off by one ever since I wrote it    /* Yes nenolod, I have known it was off by one ever since I wrote it
1245     * But *JUST* for you, though, it really doesn't look as *pretty*     * But *JUST* for you, though, it really doesn't look as *pretty*
1246     * -Dianora     * -Dianora
1247     */     */
1248    memcpy(new_uid+IRC_MAXSID, "AAAAA@", IRC_MAXUID);    memcpy(new_uid + IRC_MAXSID, "AAAAA@", IRC_MAXUID);
1249  }  }
1250    
1251  /*  /*
# Line 1257  init_uid(void) Line 1258  init_uid(void)
1258  void *  void *
1259  uid_get(va_list args)  uid_get(va_list args)
1260  {  {
1261    add_one_to_uid(TOTALSIDUID-1);    /* index from 0 */    add_one_to_uid(TOTALSIDUID - 1);    /* index from 0 */
1262    return ((void *) new_uid);    return new_uid;
1263  }  }
1264    
1265  /*  /*
# Line 1285  add_one_to_uid(int i) Line 1286  add_one_to_uid(int i)
1286    }    }
1287    else    else
1288    {    {
1289      /* XXX if IRC_MAXUID != 6, this will have to be rewritten */      /* NOTE: if IRC_MAXUID != 6, this will have to be rewritten */
1290      if (new_uid[i] == 'Z')      if (new_uid[i] == 'Z')
1291        memcpy(new_uid+IRC_MAXSID, "AAAAAA", IRC_MAXUID);        memcpy(new_uid+IRC_MAXSID, "AAAAAA", IRC_MAXUID);
1292      else      else
# Line 1338  add_isupport(const char *name, const cha Line 1339  add_isupport(const char *name, const cha
1339    DLINK_FOREACH(ptr, support_list.head)    DLINK_FOREACH(ptr, support_list.head)
1340    {    {
1341      support = ptr->data;      support = ptr->data;
1342    
1343      if (irccmp(support->name, name) == 0)      if (irccmp(support->name, name) == 0)
1344      {      {
1345        MyFree(support->name);        MyFree(support->name);

Legend:
Removed from v.576  
changed lines
  Added in v.577

svnadmin@ircd-hybrid.org
ViewVC Help
Powered by ViewVC 1.1.28