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 1644 by michael, Tue Nov 6 22:20:16 2012 UTC vs.
Revision 1818 by michael, Fri Apr 12 11:02:33 2013 UTC

# Line 32 | Line 32
32   #include "fdlist.h"
33   #include "hash.h"
34   #include "irc_string.h"
35 #include "sprintf_irc.h"
35   #include "s_bsd.h"
36   #include "ircd.h"
37   #include "listener.h"
# Line 120 | Line 119 | unsigned int user_modes[256] =
119    UMODE_BOTS,         /* b */
120    UMODE_CCONN,        /* c */
121    UMODE_DEBUG,        /* d */
122 <  0,                  /* e */
122 >  UMODE_EXTERNAL,     /* e */
123    UMODE_FULL,         /* f */
124    UMODE_CALLERID,     /* g */
125    0,                  /* h */
# Line 139 | Line 138 | unsigned int user_modes[256] =
138    UMODE_UNAUTH,       /* u */
139    0,                  /* v */
140    UMODE_WALLOP,       /* w */
141 <  UMODE_EXTERNAL,     /* x */
141 >  0,                  /* x */
142    UMODE_SPY,          /* y */
143    UMODE_OPERWALL,     /* z      0x7A */
144    0,0,0,0,0,          /* 0x7B - 0x7F */
# Line 659 | Line 658 | valid_hostname(const char *hostname)
658      if (!IsHostChar(*p))
659        return 0;
660  
661 <  return 1;
661 >  return p - hostname <= HOSTLEN;
662   }
663  
664   /* valid_username()
# Line 847 | Line 846 | set_user_mode(struct Client *client_p, s
846      return;
847    }
848  
850  if (IsServer(source_p))
851  {
852     sendto_realops_flags(UMODE_ALL, L_ADMIN, SEND_NOTICE,
853                          "*** Mode for User %s from %s",
854                          parv[1], source_p->name);
855     return;
856  }
857
849    if (source_p != target_p)
850    {
851       sendto_one(source_p, form_str(ERR_USERSDONTMATCH),
# Line 1339 | Line 1330 | init_isupport(void)
1330    add_isupport("DEAF", "D", -1);
1331    add_isupport("KICKLEN", NULL, KICKLEN);
1332    add_isupport("MODES", NULL, MAXMODEPARAMS);
1342  add_isupport("NICKLEN", NULL, NICKLEN);
1333   #ifdef HALFOPS
1334    add_isupport("PREFIX", "(ohv)@%+", -1);
1335    add_isupport("STATUSMSG", "@%+", -1);
# Line 1347 | Line 1337 | init_isupport(void)
1337    add_isupport("PREFIX", "(ov)@+", -1);
1338    add_isupport("STATUSMSG", "@+", -1);
1339   #endif
1350  add_isupport("TOPICLEN", NULL, TOPICLEN);
1340   }
1341  
1342   /*
# Line 1382 | Line 1371 | add_isupport(const char *name, const cha
1371      dlinkAddTail(support, &support->node, &support_list);
1372    }
1373  
1374 <  DupString(support->name, name);
1374 >  support->name = xstrdup(name);
1375    if (options != NULL)
1376 <    DupString(support->options, options);
1376 >    support->options = xstrdup(options);
1377    support->number = n;
1378  
1379    rebuild_isupport_message_line();
# Line 1443 | Line 1432 | rebuild_isupport_message_line(void)
1432    {
1433      struct Isupport *support = ptr->data;
1434  
1435 <    p += (n = ircsprintf(p, "%s", support->name));
1435 >    p += (n = sprintf(p, "%s", support->name));
1436      len += n;
1437  
1438      if (support->options != NULL)
1439      {
1440 <      p += (n = ircsprintf(p, "=%s", support->options));
1440 >      p += (n = sprintf(p, "=%s", support->options));
1441        len += n;
1442      }
1443  
1444      if (support->number > 0)
1445      {
1446 <      p += (n = ircsprintf(p, "=%d", support->number));
1446 >      p += (n = sprintf(p, "=%d", support->number));
1447        len += n;
1448      }
1449  

Diff Legend

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