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-8/src/s_user.c (file contents):
Revision 1158 by michael, Wed Aug 10 19:46:00 2011 UTC vs.
Revision 1176 by michael, Sun Aug 14 11:24:24 2011 UTC

# Line 106 | Line 106 | unsigned int user_modes[256] =
106    0,                  /* O */
107    0,                  /* P */
108    0,                  /* Q */
109 <  0,                  /* R */
109 >  UMODE_REGONLY,      /* R */
110    0,                  /* S */
111    0,                  /* T */
112    0,                  /* U */
# Line 309 | Line 309 | register_local_user(struct Client *sourc
309        return;
310    }
311  
312 <  source_p->localClient->last = CurrentTime;
312 >  source_p->localClient->last_privmsg = CurrentTime;
313    /* Straight up the maximum rate of flooding... */
314    source_p->localClient->allow_read = MAX_FLOOD_BURST;
315  
# Line 508 | Line 508 | register_remote_user(struct Client *sour
508    /*
509     * coming from another server, take the servers word for it
510     */
511 <  source_p->servptr = find_server(server);
511 >  source_p->servptr = hash_find_server(server);
512  
513    /* Super GhostDetect:
514     * If we can't find the server the user is supposed to be on,
# Line 542 | Line 542 | register_remote_user(struct Client *sour
542      return;
543    }
544  
545 +  /*
546 +   * If the nick has been introduced by a services server,
547 +   * make it a service as well.
548 +   */
549 +  if (IsService(source_p->servptr))
550 +    SetService(source_p);
551 +
552    /* Increment our total user count here */
553    if (++Count.total > Count.max_tot)
554      Count.max_tot = Count.total;
# Line 676 | Line 683 | valid_username(const char *username)
683    return 1;
684   }
685  
686 + /* clean_nick_name()
687 + *
688 + * input        - nickname
689 + *              - whether it's a local nick (1) or remote (0)
690 + * output       - none
691 + * side effects - walks through the nickname, returning 0 if erroneous
692 + */
693 + int
694 + valid_nickname(const char *nickname, const int local)
695 + {
696 +  const char *p = nickname;
697 +  assert(nickname && *nickname);
698 +
699 +  /* nicks can't start with a digit or - or be 0 length */
700 +  /* This closer duplicates behaviour of hybrid-6 */
701 +  if (*p == '-' || (IsDigit(*p) && local) || *p == '\0')
702 +    return 0;
703 +
704 +  for (; *p; ++p)
705 +    if (!IsNickChar(*p))
706 +      return 0;
707 +
708 +  return p - nickname <= (NICKLEN - 1);
709 + }
710 +
711   /* report_and_set_user_flags()
712   *
713   * inputs       - pointer to source_p
# Line 730 | Line 762 | report_and_set_user_flags(struct Client
762                 me.name,source_p->name);
763    }
764  
733  /* If this user is exempt from idle time outs */
734  if (IsConfIdlelined(aconf))
735  {
736    SetIdlelined(source_p);
737    sendto_one(source_p,
738               ":%s NOTICE %s :*** You are exempt from idle limits. congrats.",
739               me.name, source_p->name);
740  }
741
765    if (IsConfCanFlood(aconf))
766    {
767      SetCanFlood(source_p);

Diff Legend

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