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

Comparing ircd-hybrid/trunk/src/s_user.c (file contents):
Revision 2289 by michael, Wed Jun 19 10:32:20 2013 UTC vs.
Revision 2314 by michael, Fri Jun 21 12:50:33 2013 UTC

# Line 287 | Line 287 | register_local_user(struct Client *sourc
287  
288    if (ConfigFileEntry.ping_cookie)
289    {
290 <    if (!IsPingSent(source_p) && source_p->localClient->random_ping == 0)
290 >    if (!IsPingSent(source_p) && !source_p->localClient->random_ping)
291      {
292        do
293          source_p->localClient->random_ping = genrand_int32();
# Line 310 | Line 310 | register_local_user(struct Client *sourc
310    if (!check_client(source_p))
311      return;
312  
313 <  if (valid_hostname(source_p->host) == 0)
313 >  if (!valid_hostname(source_p->host))
314    {
315      sendto_one(source_p, ":%s NOTICE %s :*** Notice -- You have an illegal "
316                 "character in your hostname", me.name, source_p->name);
# Line 393 | Line 393 | register_local_user(struct Client *sourc
393    }
394  
395    /* valid user name check */
396 <  if (valid_username(source_p->username, 1) == 0)
396 >  if (!valid_username(source_p->username, 1))
397    {
398      char tmpstr2[IRCD_BUFSIZE];
399  
# Line 430 | Line 430 | register_local_user(struct Client *sourc
430      ++Count.invisi;
431    }
432  
433 <  if ((++Count.local) > Count.max_loc)
433 >  if (++Count.local > Count.max_loc)
434    {
435      Count.max_loc = Count.local;
436  
# Line 761 | Line 761 | report_and_set_user_flags(struct Client
761                 me.name, source_p->name);
762    }
763  
764 <  /* The else here is to make sure that G line exempt users
764 >  /*
765 >   * The else here is to make sure that G line exempt users
766     * do not get noticed twice.
767     */
768    else if (IsConfExemptGline(conf))
# Line 834 | Line 835 | set_user_mode(struct Client *client_p, s
835      m = buf;
836      *m++ = '+';
837  
838 <    for (i = 0; i < 128; i++)
838 >    for (i = 0; i < 128; ++i)
839        if (HasUMode(source_p, user_modes[i]))
840          *m++ = (char)i;
841      *m = '\0';
# Line 848 | Line 849 | set_user_mode(struct Client *client_p, s
849    setflags = source_p->umodes;
850  
851    /* parse mode change string(s) */
852 <  for (p = &parv[2]; p && *p; p++)
852 >  for (p = &parv[2]; p && *p; ++p)
853    {
854 <    for (m = *p; *m; m++)
854 >    for (m = *p; *m; ++m)
855      {
856        switch (*m)
857        {
# Line 882 | Line 883 | set_user_mode(struct Client *client_p, s
883  
884              if (MyConnect(source_p))
885              {
886 <              dlink_node *dm;
886 >              dlink_node *dm = NULL;
887  
888                detach_conf(source_p, CONF_OPER);
889                ClrOFlag(source_p);
# Line 914 | Line 915 | set_user_mode(struct Client *client_p, s
915                  DelUMode(source_p, flag);
916              }
917            }
918 <          else
919 <          {
919 <            if (MyConnect(source_p))
920 <              badflag = 1;
921 <          }
918 >          else if (MyConnect(source_p))
919 >            badflag = 1;
920  
921            break;
922        }
# Line 973 | Line 971 | send_umode(struct Client *client_p, stru
971     * build a string in umode_buf to represent the change in the user's
972     * mode between the new (source_p->umodes) and 'old'.
973     */
974 <  for (i = 0; i < 128; i++)
974 >  for (i = 0; i < 128; ++i)
975    {
976      flag = user_modes[i];
977      if (!flag)
# Line 1293 | Line 1291 | init_uid(void)
1291        new_uid[i] = 'A';
1292  
1293    /* NOTE: if IRC_MAXUID != 6, this will have to be rewritten */
1296  /* Yes nenolod, I have known it was off by one ever since I wrote it
1297   * But *JUST* for you, though, it really doesn't look as *pretty*
1298   * -Dianora
1299   */
1294    memcpy(new_uid + IRC_MAXSID, "AAAAA@", IRC_MAXUID);
1295   }
1296  

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines