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

Comparing ircd-hybrid-7.3/src/s_user.c (file contents):
Revision 1113 by michael, Sat Dec 18 22:44:10 2010 UTC vs.
Revision 1115 by michael, Tue Dec 21 14:42:54 2010 UTC

# Line 281 | Line 281 | show_isupport(struct Client *source_p)
281   void
282   register_local_user(struct Client *source_p)
283   {
284 +  const char *id = NULL;
285    const struct AccessItem *aconf = NULL;
286    dlink_node *ptr = NULL;
287    dlink_node *m = NULL;
# Line 416 | Line 417 | register_local_user(struct Client *sourc
417    if (check_xline(source_p))
418      return;
419  
420 <  if (me.id[0])
421 <  {
421 <    const char *id = NULL;
422 <
423 <    while (hash_find_id((id = uid_get())) != NULL)
424 <      ;
420 >  while (hash_find_id((id = uid_get())) != NULL)
421 >    ;
422  
423 <    strlcpy(source_p->id, id, sizeof(source_p->id));
424 <    hash_add_id(source_p);
428 <  }
423 >  strlcpy(source_p->id, id, sizeof(source_p->id));
424 >  hash_add_id(source_p);
425  
426    sendto_realops_flags(UMODE_CCONN, L_ALL,
427                         "Client connecting: %s (%s@%s) [%s] {%s} [%s]",
# Line 815 | Line 811 | set_user_mode(struct Client *client_p, s
811       return;
812    }
813  
814 <  if (source_p != target_p || target_p->from != source_p->from)
814 >  if (source_p != target_p)
815    {
816       sendto_one(source_p, form_str(ERR_USERSDONTMATCH),
817                  me.name, source_p->name);
# Line 1090 | Line 1086 | user_welcome(struct Client *source_p)
1086  
1087    if (ConfigFileEntry.short_motd)
1088    {
1089 <    sendto_one(source_p, "NOTICE %s :*** Notice -- motd was last changed at %s",
1090 <               source_p->name, ConfigFileEntry.motd.lastChangedDate);
1089 >    sendto_one(source_p, ":%s NOTICE %s :*** Notice -- motd was last changed at %s",
1090 >               me.name, source_p->name, ConfigFileEntry.motd.lastChangedDate);
1091      sendto_one(source_p,
1092 <               "NOTICE %s :*** Notice -- Please read the motd if you haven't "
1093 <               "read it", source_p->name);
1092 >               ":%s NOTICE %s :*** Notice -- Please read the motd if you haven't "
1093 >               "read it", me.name, source_p->name);
1094      sendto_one(source_p, form_str(RPL_MOTDSTART),
1095                 me.name, source_p->name, me.name);
1096      sendto_one(source_p, form_str(RPL_MOTD),
# Line 1213 | Line 1209 | static char new_uid[TOTALSIDUID + 1];
1209   int
1210   valid_sid(const char *sid)
1211   {
1216
1212    if (strlen(sid) == IRC_MAXSID)
1213      if (IsDigit(*sid))
1214        if (IsAlNum(*(sid + 1)) && IsAlNum(*(sid + 2)))
# Line 1238 | Line 1233 | init_uid(void)
1233  
1234    memset(new_uid, 0, sizeof(new_uid));
1235  
1236 <  if (ServerInfo.sid != NULL)
1242 <  {
1236 >  if (!EmptyString(ServerInfo.sid))
1237      strlcpy(new_uid, ServerInfo.sid, sizeof(new_uid));
1244    strlcpy(me.id, ServerInfo.sid, sizeof(me.id));
1245
1246    hash_add_id(&me);
1247  }
1238  
1239 <  for (i = 0; i < IRC_MAXSID; i++)
1239 >  for (i = 0; i < IRC_MAXSID; ++i)
1240      if (new_uid[i] == '\0')
1241        new_uid[i] = 'A';
1242  

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines