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 1309 by michael, Sun Mar 25 11:24:18 2012 UTC vs.
ircd-hybrid/trunk/src/s_user.c (file contents), Revision 1618 by michael, Tue Oct 30 21:04:38 2012 UTC

# Line 390 | Line 390 | register_local_user(struct Client *sourc
390    if ((Count.local >= ServerInfo.max_clients + MAX_BUFFER) ||
391        (Count.local >= ServerInfo.max_clients && !IsExemptLimits(source_p)))
392    {
393 <    sendto_realops_flags(UMODE_FULL, L_ALL,
393 >    sendto_realops_flags(UMODE_FULL, L_ALL, SEND_NOTICE,
394                           "Too many clients, rejecting %s[%s].",
395                           source_p->name, source_p->host);
396      ++ServerStats.is_ref;
# Line 403 | Line 403 | register_local_user(struct Client *sourc
403    {
404      char tmpstr2[IRCD_BUFSIZE];
405  
406 <    sendto_realops_flags(UMODE_REJ, L_ALL, "Invalid username: %s (%s@%s)",
406 >    sendto_realops_flags(UMODE_REJ, L_ALL, SEND_NOTICE,
407 >                         "Invalid username: %s (%s@%s)",
408                           source_p->name, source_p->username, source_p->host);
409      ++ServerStats.is_ref;
410      snprintf(tmpstr2, sizeof(tmpstr2), "Invalid username [%s]",
# Line 421 | Line 422 | register_local_user(struct Client *sourc
422    strlcpy(source_p->id, id, sizeof(source_p->id));
423    hash_add_id(source_p);
424  
425 <  sendto_realops_flags(UMODE_CCONN, L_ALL,
425 >  sendto_realops_flags(UMODE_CCONN, L_ALL, SEND_NOTICE,
426                         "Client connecting: %s (%s@%s) [%s] {%s} [%s] <%s>",
427                         source_p->name, source_p->username, source_p->host,
428                         ConfigFileEntry.hide_spoof_ips && IsIPSpoof(source_p) ?
# Line 429 | Line 430 | register_local_user(struct Client *sourc
430                         get_client_class(source_p),
431                         source_p->info, source_p->id);
432  
433 <  sendto_realops_flags(UMODE_CCONN_FULL, L_ALL,
433 >  sendto_realops_flags(UMODE_CCONN_FULL, L_ALL, SEND_NOTICE,
434                         "CLICONN %s %s %s %s %s %s %s 0 %s",
435                         source_p->name, source_p->username, source_p->host,
436                         ConfigFileEntry.hide_spoof_ips && IsIPSpoof(source_p) ?
# Line 453 | Line 454 | register_local_user(struct Client *sourc
454      Count.max_loc = Count.local;
455  
456      if (!(Count.max_loc % 10))
457 <      sendto_realops_flags(UMODE_ALL, L_ALL, "New Max Local Clients: %d",
457 >      sendto_realops_flags(UMODE_ALL, L_ALL, SEND_NOTICE,
458 >                           "New Max Local Clients: %d",
459                             Count.max_loc);
460    }
461  
# Line 509 | Line 511 | register_remote_user(struct Client *sour
511     */
512    source_p->servptr = hash_find_server(server);
513  
514 <  /* Super GhostDetect:
514 >  /*
515 >   * Super GhostDetect:
516     * If we can't find the server the user is supposed to be on,
517     * then simply blow the user away.        -Taner
518     */
519    if (source_p->servptr == NULL)
520    {
521 <    sendto_realops_flags(UMODE_ALL, L_ALL,
521 >    sendto_realops_flags(UMODE_ALL, L_ALL, SEND_NOTICE,
522                           "No server %s for user %s[%s@%s] from %s",
523                           server, source_p->name, source_p->username,
524                           source_p->host, source_p->from->name);
# Line 528 | Line 531 | register_remote_user(struct Client *sour
531  
532    if ((target_p = source_p->servptr) && target_p->from != source_p->from)
533    {
534 <    sendto_realops_flags(UMODE_DEBUG, L_ALL,
534 >    sendto_realops_flags(UMODE_DEBUG, L_ALL, SEND_NOTICE,
535                           "Bad User [%s] :%s USER %s@%s %s, != %s[%s]",
536                           source_p->from->name, source_p->name, source_p->username,
537                           source_p->host, source_p->servptr->name,
# Line 597 | Line 600 | introduce_client(struct Client *source_p
600      if (IsCapable(server, CAP_SVS))
601      {
602        if (IsCapable(server, CAP_TS6) && HasID(source_p))
603 <        sendto_one(server, ":%s UID %s %d %lu %s %s %s %s %s %lu :%s",
603 >        sendto_one(server, ":%s UID %s %d %lu %s %s %s %s %s %s :%s",
604                     source_p->servptr->id,
605                     source_p->name, source_p->hopcount+1,
606                     (unsigned long)source_p->tsinfo,
607                     ubuf, source_p->username, source_p->host,
608                     (MyClient(source_p) && IsIPSpoof(source_p)) ?
609                     "0" : source_p->sockhost, source_p->id,
610 <                   (unsigned long)source_p->servicestamp,
610 >                   source_p->svid,
611                     source_p->info);
612        else
613 <        sendto_one(server, "NICK %s %d %lu %s %s %s %s %lu :%s",
613 >        sendto_one(server, "NICK %s %d %lu %s %s %s %s %s :%s",
614                     source_p->name, source_p->hopcount+1,
615                     (unsigned long)source_p->tsinfo,
616                     ubuf, source_p->username, source_p->host,
617 <                   source_p->servptr->name, (unsigned long)source_p->servicestamp,
617 >                   source_p->servptr->name, source_p->svid,
618                     source_p->info);
619  
620      }
# Line 728 | Line 731 | valid_nickname(const char *nickname, con
731      if (!IsNickChar(*p))
732        return 0;
733  
734 <  return p - nickname <= (NICKLEN - 1);
734 >  return p - nickname <= NICKLEN;
735   }
736  
737   /* report_and_set_user_flags()
# Line 848 | Line 851 | set_user_mode(struct Client *client_p, s
851  
852    if (IsServer(source_p))
853    {
854 <     sendto_realops_flags(UMODE_ALL, L_ADMIN, "*** Mode for User %s from %s",
854 >     sendto_realops_flags(UMODE_ALL, L_ADMIN, SEND_NOTICE,
855 >                          "*** Mode for User %s from %s",
856                            parv[1], source_p->name);
857       return;
858    }
# Line 1169 | Line 1173 | check_xline(struct Client *source_p)
1173      else
1174        reason = "No Reason";
1175  
1176 <    sendto_realops_flags(UMODE_REJ, L_ALL,
1176 >    sendto_realops_flags(UMODE_REJ, L_ALL, SEND_NOTICE,
1177                           "X-line Rejecting [%s] [%s], user %s [%s]",
1178                           source_p->info, reason,
1179                           get_client_name(source_p, HIDE_IP),
1180                           source_p->sockhost);
1181  
1182      ++ServerStats.is_ref;
1183 <    if (REJECT_HOLD_TIME > 0)
1180 <    {
1181 <      sendto_one(source_p, ":%s NOTICE %s :Bad user info",
1182 <                 me.name, source_p->name);
1183 <      source_p->localClient->reject_delay = CurrentTime + REJECT_HOLD_TIME;
1184 <      SetCaptured(source_p);
1185 <    }
1186 <    else
1187 <      exit_client(source_p, &me, "Bad user info");
1183 >    exit_client(source_p, &me, "Bad user info");
1184      return 1;
1185    }
1186  
# Line 1202 | Line 1198 | check_xline(struct Client *source_p)
1198   void
1199   oper_up(struct Client *source_p)
1200   {
1201 <  unsigned int old = source_p->umodes;
1206 <  const char *operprivs = "";
1201 >  const unsigned int old = source_p->umodes;
1202    const struct AccessItem *oconf = NULL;
1203  
1204    assert(source_p->localClient->confs.head);
# Line 1225 | Line 1220 | oper_up(struct Client *source_p)
1220    assert(dlinkFind(&oper_list, source_p) == NULL);
1221    dlinkAdd(source_p, make_dlink_node(), &oper_list);
1222  
1228  operprivs = oper_privs_as_string(oconf->port);
1229
1223    AddOFlag(source_p, oconf->port);
1224  
1225    if (HasOFlag(source_p, OPER_FLAG_ADMIN))
# Line 1234 | Line 1227 | oper_up(struct Client *source_p)
1227    if (!HasOFlag(source_p, OPER_FLAG_N))
1228      DelUMode(source_p, UMODE_NCHANGE);
1229  
1230 <  sendto_realops_flags(UMODE_ALL, L_ALL, "%s (%s@%s) is now an operator",
1231 <                       source_p->name, source_p->username, source_p->host);
1230 >  sendto_realops_flags(UMODE_ALL, L_ALL, SEND_NOTICE, "%s is now an operator",
1231 >                       get_oper_name(source_p));
1232    send_umode_out(source_p, source_p, old);
1233    sendto_one(source_p, form_str(RPL_YOUREOPER), me.name, source_p->name);
1241  sendto_one(source_p, ":%s NOTICE %s :*** Oper privs are %s",
1242             me.name, source_p->name, operprivs);
1243  send_message_file(source_p, &ConfigFileEntry.opermotd);
1234   }
1235  
1236   static char new_uid[TOTALSIDUID + 1];     /* allow for \0 */
# Line 1354 | Line 1344 | init_isupport(void)
1344    add_isupport("DEAF", "D", -1);
1345    add_isupport("KICKLEN", NULL, KICKLEN);
1346    add_isupport("MODES", NULL, MAXMODEPARAMS);
1347 <  add_isupport("NICKLEN", NULL, NICKLEN-1);
1347 >  add_isupport("NICKLEN", NULL, NICKLEN);
1348   #ifdef HALFOPS
1349    add_isupport("PREFIX", "(ohv)@%+", -1);
1350    add_isupport("STATUSMSG", "@%+", -1);

Diff Legend

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