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

Comparing ircd-hybrid-8/modules/m_trace.c (file contents):
Revision 1178 by michael, Mon Aug 15 08:11:31 2011 UTC vs.
Revision 1219 by michael, Sun Sep 18 09:02:38 2011 UTC

# Line 182 | Line 182 | ms_trace(struct Client *client_p, struct
182    if (hunt_server(client_p, source_p, ":%s TRACE %s :%s", 2, parc, parv))
183      return;
184  
185 <  if (IsOper(source_p))
185 >  if (HasUMode(source_p, UMODE_OPER))
186      mo_trace(client_p, source_p, parc, parv);
187   }
188  
# Line 230 | Line 230 | do_actual_trace(struct Client *source_p,
230    dow = wilds || doall;
231  
232    set_time();
233 <  if (!IsOper(source_p) || !dow) /* non-oper traces must be full nicks */
233 >  if (!HasUMode(source_p, UMODE_OPER) || !dow) /* non-oper traces must be full nicks */
234                                /* lets also do this for opers tracing nicks */
235    {
236      const char *name;
# Line 243 | Line 243 | do_actual_trace(struct Client *source_p,
243        name = get_client_name(target_p, HIDE_IP);
244        class_name = get_client_class(target_p);
245  
246 <      if (IsOper(target_p))
246 >      if (HasUMode(target_p, UMODE_OPER))
247        {
248          sendto_one(source_p, form_str(RPL_TRACEOPERATOR),
249                     from, to, class_name, name,
# Line 271 | Line 271 | do_actual_trace(struct Client *source_p,
271    {
272      target_p = ptr->data;
273  
274 <    if (IsInvisible(target_p) && dow &&
275 <        !(MyConnect(source_p) && IsOper(source_p)) &&
276 <        !IsOper(target_p) && (target_p != source_p))
274 >    if (HasUMode(target_p, UMODE_INVISIBLE) && dow &&
275 >        !(MyConnect(source_p) && HasUMode(source_p, UMODE_OPER)) &&
276 >        !HasUMode(target_p, UMODE_OPER) && (target_p != source_p))
277        continue;
278      if (!doall && wilds && !match(tname, target_p->name))
279        continue;
# Line 356 | Line 356 | report_this_status(struct Client *source
356      case STAT_CONNECTING:
357        sendto_one(source_p, form_str(RPL_TRACECONNECTING),
358                   from, to, class_name,
359 <                 IsOperAdmin(source_p) ? name : target_p->name);
359 >                 HasUMode(source_p, UMODE_ADMIN) ? name : target_p->name);
360        break;
361      case STAT_HANDSHAKE:
362        sendto_one(source_p, form_str(RPL_TRACEHANDSHAKE),
363                   from, to, class_name,
364 <                 IsOperAdmin(source_p) ? name : target_p->name);
364 >                 HasUMode(source_p, UMODE_ADMIN) ? name : target_p->name);
365        break;
366      case STAT_ME:
367        break;
# Line 376 | Line 376 | report_this_status(struct Client *source
376         * Only opers see users if there is a wildcard
377         * but anyone can see all the opers.
378         */
379 <      if ((IsOper(source_p) &&
380 <           (MyClient(source_p) || !(dow && IsInvisible(target_p))))
381 <          || !dow || IsOper(target_p))
379 >      if ((HasUMode(source_p, UMODE_OPER) &&
380 >           (MyClient(source_p) || !(dow && HasUMode(target_p, UMODE_INVISIBLE))))
381 >          || !dow || HasUMode(target_p, UMODE_OPER))
382          {
383 <          if (IsAdmin(target_p) && !ConfigFileEntry.hide_spoof_ips)
383 >          if (HasUMode(target_p, UMODE_ADMIN) && !ConfigFileEntry.hide_spoof_ips)
384              sendto_one(source_p, form_str(RPL_TRACEOPERATOR),
385                         from, to, class_name, name,
386 <                       IsOperAdmin(source_p) ? target_p->sockhost : "255.255.255.255",
386 >                       HasUMode(source_p, UMODE_ADMIN) ? target_p->sockhost : "255.255.255.255",
387                         CurrentTime - target_p->lasttime,
388                         CurrentTime - target_p->localClient->last_privmsg);
389                        
390 <          else if (IsOper(target_p))
390 >          else if (HasUMode(target_p, UMODE_OPER))
391            {
392              if (ConfigFileEntry.hide_spoof_ips)
393                sendto_one(source_p, form_str(RPL_TRACEOPERATOR),
# Line 406 | Line 406 | report_this_status(struct Client *source
406            else
407            {
408              const char *format_str=NULL;
409 <            if (IsOper(source_p) && IsCaptured(target_p))
409 >            if (HasUMode(source_p, UMODE_OPER) && IsCaptured(target_p))
410                format_str = form_str(RPL_TRACECAPTURED);
411              else
412                format_str = form_str(RPL_TRACEUSER);
# Line 434 | Line 434 | report_this_status(struct Client *source
434  
435        trace_get_dependent(&servers, &clients, target_p);
436  
437 <      if (!IsOperAdmin(source_p))
437 >      if (!HasUMode(source_p, UMODE_ADMIN))
438          name = get_client_name(target_p, MASK_IP);
439  
440        sendto_one(source_p, form_str(RPL_TRACESERVER),

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines