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 1243 by michael, Fri Sep 30 10:47:53 2011 UTC vs.
Revision 1559 by michael, Sun Oct 14 01:38:28 2012 UTC

# Line 38 | Line 38
38   #include "listener.h"
39   #include "motd.h"
40   #include "numeric.h"
41 < #include "s_conf.h"
42 < #include "s_log.h"
41 > #include "conf.h"
42 > #include "log.h"
43   #include "s_serv.h"
44   #include "send.h"
45   #include "supported.h"
# Line 95 | Line 95 | unsigned int user_modes[256] =
95    0,                  /* E */
96    0,                  /* F */
97    UMODE_SOFTCALLERID, /* G */
98 <  0,                  /* H */
98 >  UMODE_HIDDEN,       /* H */
99    0,                  /* I */
100    0,                  /* J */
101    0,                  /* K */
# Line 597 | Line 597 | introduce_client(struct Client *source_p
597      if (IsCapable(server, CAP_SVS))
598      {
599        if (IsCapable(server, CAP_TS6) && HasID(source_p))
600 <        sendto_one(server, ":%s UID %s %d %lu %s %s %s %s %s %lu :%s",
600 >        sendto_one(server, ":%s UID %s %d %lu %s %s %s %s %s %s :%s",
601                     source_p->servptr->id,
602                     source_p->name, source_p->hopcount+1,
603                     (unsigned long)source_p->tsinfo,
604                     ubuf, source_p->username, source_p->host,
605                     (MyClient(source_p) && IsIPSpoof(source_p)) ?
606                     "0" : source_p->sockhost, source_p->id,
607 <                   (unsigned long)source_p->servicestamp,
607 >                   source_p->svid,
608                     source_p->info);
609        else
610 <        sendto_one(server, "NICK %s %d %lu %s %s %s %s %lu :%s",
610 >        sendto_one(server, "NICK %s %d %lu %s %s %s %s %s :%s",
611                     source_p->name, source_p->hopcount+1,
612                     (unsigned long)source_p->tsinfo,
613                     ubuf, source_p->username, source_p->host,
614 <                   source_p->servptr->name, (unsigned long)source_p->servicestamp,
614 >                   source_p->servptr->name, source_p->svid,
615                     source_p->info);
616  
617      }
# Line 728 | Line 728 | valid_nickname(const char *nickname, con
728      if (!IsNickChar(*p))
729        return 0;
730  
731 <  return p - nickname <= (NICKLEN - 1);
731 >  return p - nickname <= NICKLEN;
732   }
733  
734   /* report_and_set_user_flags()
# Line 972 | Line 972 | set_user_mode(struct Client *client_p, s
972    }
973  
974    if (MyConnect(source_p) && HasUMode(source_p, UMODE_ADMIN) &&
975 <      !HasOFlag(source_p, OPER_FLAG_HIDDEN_ADMIN|OPER_FLAG_ADMIN))
975 >      !HasOFlag(source_p, OPER_FLAG_ADMIN))
976    {
977      sendto_one(source_p, ":%s NOTICE %s :*** You have no admin flag;",
978                 me.name, source_p->name);
# Line 1069 | Line 1069 | send_umode_out(struct Client *client_p,
1069    char buf[IRCD_BUFSIZE] = { '\0' };
1070    dlink_node *ptr = NULL;
1071  
1072 <  send_umode(NULL, source_p, old, HasOFlag(source_p, OPER_FLAG_HIDDEN_ADMIN) ?
1073 <             SEND_UMODES & ~UMODE_ADMIN : SEND_UMODES, buf);
1072 >  send_umode(NULL, source_p, old, SEND_UMODES, buf);
1073  
1074    if (buf[0])
1075    {
# Line 1177 | Line 1176 | check_xline(struct Client *source_p)
1176                           source_p->sockhost);
1177  
1178      ++ServerStats.is_ref;
1179 <    if (REJECT_HOLD_TIME > 0)
1181 <    {
1182 <      sendto_one(source_p, ":%s NOTICE %s :Bad user info",
1183 <                 me.name, source_p->name);
1184 <      source_p->localClient->reject_delay = CurrentTime + REJECT_HOLD_TIME;
1185 <      SetCaptured(source_p);
1186 <    }
1187 <    else
1188 <      exit_client(source_p, &me, "Bad user info");
1179 >    exit_client(source_p, &me, "Bad user info");
1180      return 1;
1181    }
1182  
# Line 1203 | Line 1194 | check_xline(struct Client *source_p)
1194   void
1195   oper_up(struct Client *source_p)
1196   {
1197 <  unsigned int old = source_p->umodes;
1207 <  const char *operprivs = "";
1197 >  const unsigned int old = source_p->umodes;
1198    const struct AccessItem *oconf = NULL;
1199  
1200    assert(source_p->localClient->confs.head);
# Line 1226 | Line 1216 | oper_up(struct Client *source_p)
1216    assert(dlinkFind(&oper_list, source_p) == NULL);
1217    dlinkAdd(source_p, make_dlink_node(), &oper_list);
1218  
1229  operprivs = oper_privs_as_string(oconf->port);
1230
1219    AddOFlag(source_p, oconf->port);
1220  
1221 <  if (HasOFlag(source_p, OPER_FLAG_HIDDEN_ADMIN|OPER_FLAG_ADMIN))
1221 >  if (HasOFlag(source_p, OPER_FLAG_ADMIN))
1222      AddUMode(source_p, UMODE_ADMIN);
1223    if (!HasOFlag(source_p, OPER_FLAG_N))
1224      DelUMode(source_p, UMODE_NCHANGE);
1225  
1226 <  sendto_realops_flags(UMODE_ALL, L_ALL, "%s (%s@%s) is now an operator",
1227 <                       source_p->name, source_p->username, source_p->host);
1226 >  sendto_realops_flags(UMODE_ALL, L_ALL, "%s is now an operator",
1227 >                       get_oper_name(source_p));
1228    send_umode_out(source_p, source_p, old);
1229    sendto_one(source_p, form_str(RPL_YOUREOPER), me.name, source_p->name);
1242  sendto_one(source_p, ":%s NOTICE %s :*** Oper privs are %s",
1243             me.name, source_p->name, operprivs);
1244  send_message_file(source_p, &ConfigFileEntry.opermotd);
1230   }
1231  
1232   static char new_uid[TOTALSIDUID + 1];     /* allow for \0 */
# Line 1355 | Line 1340 | init_isupport(void)
1340    add_isupport("DEAF", "D", -1);
1341    add_isupport("KICKLEN", NULL, KICKLEN);
1342    add_isupport("MODES", NULL, MAXMODEPARAMS);
1343 <  add_isupport("NICKLEN", NULL, NICKLEN-1);
1343 >  add_isupport("NICKLEN", NULL, NICKLEN);
1344   #ifdef HALFOPS
1345    add_isupport("PREFIX", "(ohv)@%+", -1);
1346    add_isupport("STATUSMSG", "@%+", -1);

Diff Legend

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