/[svn]/ircd-hybrid-8/modules/m_etrace.c
ViewVC logotype

Diff of /ircd-hybrid-8/modules/m_etrace.c

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 1121 by michael, Sun Jan 9 11:03:03 2011 UTC revision 1144 by michael, Tue Jul 26 19:33:54 2011 UTC
# Line 42  Line 42 
42  #include "s_conf.h"  #include "s_conf.h"
43    
44    
45  static void do_etrace(struct Client *, int, char **);  static void do_etrace(struct Client *, int, char *[]);
46  static void mo_etrace(struct Client *, struct Client *, int, char *[]);  static void mo_etrace(struct Client *, struct Client *, int, char *[]);
47    
48  struct Message etrace_msgtab = {  struct Message etrace_msgtab = {
# Line 51  struct Message etrace_msgtab = { Line 51  struct Message etrace_msgtab = {
51  };  };
52    
53  const char *_version = "$Revision$";  const char *_version = "$Revision$";
 static struct Callback *etrace_cb;  
   
 static void *  
 va_etrace(va_list args)  
 {  
   struct Client *source_p = va_arg(args, struct Client *);  
   int parc = va_arg(args, int);  
   char **parv = va_arg(args, char **);  
   
   do_etrace(source_p, parc, parv);  
   return NULL;  
 }  
54    
55  void  void
56  _modinit(void)  _modinit(void)
57  {  {
   etrace_cb = register_callback("doing_etrace", va_etrace);  
58    mod_add_cmd(&etrace_msgtab);    mod_add_cmd(&etrace_msgtab);
59  }  }
60    
# Line 75  void Line 62  void
62  _moddeinit(void)  _moddeinit(void)
63  {  {
64    mod_del_cmd(&etrace_msgtab);    mod_del_cmd(&etrace_msgtab);
   uninstall_hook(etrace_cb, va_etrace);  
65  }  }
66    
67  static void report_this_status(struct Client *, struct Client *, int);  static void report_this_status(struct Client *, struct Client *, int);
# Line 84  static void report_this_status(struct Cl Line 70  static void report_this_status(struct Cl
70   * do_etrace()   * do_etrace()
71   */   */
72  static void  static void
73  do_etrace(struct Client *source_p, int parc, char **parv)  do_etrace(struct Client *source_p, int parc, char *parv[])
74  {  {
75    const char *tname = NULL;    const char *tname = NULL;
76    struct Client *target_p = NULL;    struct Client *target_p = NULL;
# Line 93  do_etrace(struct Client *source_p, int p Line 79  do_etrace(struct Client *source_p, int p
79    int full_etrace = 0;    int full_etrace = 0;
80    dlink_node *ptr;    dlink_node *ptr;
81    
82      sendto_realops_flags(UMODE_SPY, L_ALL,
83                           "ETRACE requested by %s (%s@%s) [%s]",
84                           source_p->name, source_p->username,
85                           source_p->host, source_p->servptr->name);
86    
87    if (parc > 1)    if (parc > 1)
88    {    {
89      if (irccmp(parv[1], "-full") == 0)      if (irccmp(parv[1], "-full") == 0)
# Line 158  static void Line 149  static void
149  mo_etrace(struct Client *client_p, struct Client *source_p,  mo_etrace(struct Client *client_p, struct Client *source_p,
150            int parc, char *parv[])            int parc, char *parv[])
151  {  {
152    execute_callback(etrace_cb, source_p, parc, parv);    do_etrace(source_p, parc, parv);
153  }  }
154    
155  /* report_this_status()  /* report_this_status()

Legend:
Removed from v.1121  
changed lines
  Added in v.1144

svnadmin@ircd-hybrid.org
ViewVC Help
Powered by ViewVC 1.1.28