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/trunk/src/user.c (file contents):
Revision 3567 by michael, Fri May 16 14:52:50 2014 UTC vs.
Revision 4020 by michael, Fri Jun 20 16:17:27 2014 UTC

# Line 127 | Line 127 | const unsigned int user_modes[256] =
127    UMODE_WALLOP,       /* w */
128    UMODE_HIDDENHOST,   /* x */
129    UMODE_SPY,          /* y */
130 <  UMODE_OPERWALL,     /* z      0x7A */
130 >  0,                  /* z      0x7A */
131    0,0,0,0,0,          /* 0x7B - 0x7F */
132  
133    /* 0x80 */ 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, /* 0x8F */
# Line 175 | Line 175 | show_lusers(struct Client *source_p)
175    if (dlink_list_length(&unknown_list))
176      sendto_one_numeric(source_p, &me, RPL_LUSERUNKNOWN, dlink_list_length(&unknown_list));
177  
178 <  if (dlink_list_length(&global_channel_list))
179 <    sendto_one_numeric(source_p, &me, RPL_LUSERCHANNELS, dlink_list_length(&global_channel_list));
178 >  if (dlink_list_length(&channel_list))
179 >    sendto_one_numeric(source_p, &me, RPL_LUSERCHANNELS, dlink_list_length(&channel_list));
180  
181    if (!ConfigServerHide.hide_servers || HasUMode(source_p, UMODE_OPER))
182    {
# Line 286 | Line 286 | introduce_client(struct Client *source_p
286    char ubuf[IRCD_BUFSIZE] = "";
287  
288    if (MyClient(source_p))
289 <    send_umode(source_p, source_p, 0, SEND_UMODES, ubuf);
289 >    send_umode(source_p, source_p, 0, ubuf);
290    else
291 <    send_umode(NULL, source_p, 0, SEND_UMODES, ubuf);
291 >    send_umode(NULL, source_p, 0, ubuf);
292  
293    watch_check_hash(source_p, RPL_LOGON);
294  
# Line 722 | Line 722 | valid_hostname(const char *hostname)
722   int
723   valid_username(const char *username, const int local)
724   {
725 <  int dots      = 0;
725 >  unsigned int dots = 0;
726    const char *p = username;
727  
728    assert(p);
# Line 742 | Line 742 | valid_username(const char *username, con
742    {
743      while (*++p)
744      {
745 <      if ((*p == '.') && ConfigFileEntry.dots_in_ident)
745 >      if (*p == '.' && ConfigFileEntry.dots_in_ident)
746        {
747          if (++dots > ConfigFileEntry.dots_in_ident)
748            return 0;
# Line 760 | Line 760 | valid_username(const char *username, con
760          return 0;
761    }
762  
763 <  return  p - username <= USERLEN;;
763 >  return p - username <= USERLEN;
764   }
765  
766   /* clean_nick_name()
# Line 803 | Line 803 | valid_nickname(const char *nickname, con
803   */
804   void
805   send_umode(struct Client *client_p, struct Client *source_p,
806 <           unsigned int old, unsigned int sendmask, char *umode_buf)
806 >           unsigned int old, char *umode_buf)
807   {
808    char *m = umode_buf;
809    int what = 0;
# Line 819 | Line 819 | send_umode(struct Client *client_p, stru
819      if (!flag)
820        continue;
821  
822    if (MyClient(source_p) && !(flag & sendmask))
823      continue;
824
822      if ((flag & old) && !HasUMode(source_p, flag))
823      {
824        if (what == MODE_DEL)
# Line 866 | Line 863 | send_umode_out(struct Client *client_p,
863   {
864    char buf[IRCD_BUFSIZE] = "";
865  
866 <  send_umode(NULL, source_p, old, SEND_UMODES, buf);
866 >  send_umode(NULL, source_p, old, buf);
867  
868    if (buf[0])
869      sendto_server(source_p, NOCAPS, NOCAPS, ":%s MODE %s :%s",
870                    source_p->id, source_p->id, buf);
871  
872    if (client_p && MyClient(client_p))
873 <    send_umode(client_p, source_p, old, 0xffffffff, buf);
873 >    send_umode(client_p, source_p, old, buf);
874   }
875  
876   void
# Line 1050 | Line 1047 | init_uid(void)
1047   *                note this is a recursive function
1048   */
1049   static void
1050 < add_one_to_uid(int i)
1050 > add_one_to_uid(unsigned int i)
1051   {
1052    if (i != IRC_MAXSID)  /* Not reached server SID portion yet? */
1053    {
# Line 1059 | Line 1056 | add_one_to_uid(int i)
1056      else if (new_uid[i] == '9')
1057      {
1058        new_uid[i] = 'A';
1059 <      add_one_to_uid(i-1);
1059 >      add_one_to_uid(i - 1);
1060      }
1061      else
1062        ++new_uid[i];
# Line 1103 | Line 1100 | init_isupport(void)
1100    add_isupport("DEAF", "D", -1);
1101    add_isupport("KICKLEN", NULL, KICKLEN);
1102    add_isupport("MODES", NULL, MAXMODEPARAMS);
1106 #ifdef HALFOPS
1103    add_isupport("PREFIX", "(ohv)@%+", -1);
1104    add_isupport("STATUSMSG", "@%+", -1);
1109 #else
1110  add_isupport("PREFIX", "(ov)@+", -1);
1111  add_isupport("STATUSMSG", "@+", -1);
1112 #endif
1105    add_isupport("EXCEPTS", "e", -1);
1106    add_isupport("INVEX", "I", -1);
1107   }
# Line 1127 | Line 1119 | void
1119   add_isupport(const char *name, const char *options, int n)
1120   {
1121    dlink_node *ptr;
1122 <  struct Isupport *support;
1122 >  struct Isupport *support = NULL;
1123  
1124    DLINK_FOREACH(ptr, support_list.head)
1125    {

Diff Legend

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