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

Comparing ircd-hybrid-7.3/modules/m_admin.c (file contents):
Revision 1121 by michael, Sun Jan 9 11:03:03 2011 UTC vs.
Revision 1144 by michael, Tue Jul 26 19:33:54 2011 UTC

# Line 34 | Line 34
34   #include "send.h"
35   #include "msg.h"
36   #include "parse.h"
37 #include "hook.h"
37   #include "modules.h"
38   #include "irc_string.h"
39  
# Line 48 | Line 47 | struct Message admin_msgtab = {
47    {mr_admin, m_admin, ms_admin, m_ignore, ms_admin, m_ignore}
48   };
49  
51 static struct Callback *admin_cb;
50   const char *_version = "$Revision$";
51  
54 static void *
55 va_admin(va_list args)
56 {
57  do_admin(va_arg(args, struct Client *));
58  return NULL;
59 }
60
52   void
53   _modinit(void)
54   {
64  admin_cb = register_callback("doing_admin", va_admin);
55    mod_add_cmd(&admin_msgtab);
56   }
57  
# Line 69 | Line 59 | void
59   _moddeinit(void)
60   {
61    mod_del_cmd(&admin_msgtab);
72  uninstall_hook(admin_cb, va_admin);
62   }
63  
64   /*! \brief ADMIN command handler (called by unregistered,
# Line 102 | Line 91 | mr_admin(struct Client *client_p, struct
91  
92    last_used = CurrentTime;
93  
94 <  execute_callback(admin_cb, source_p, parc, parv);
94 >  do_admin(source_p);
95   }
96  
97   /*! \brief NICK command handler (called by already registered,
# Line 139 | Line 128 | m_admin(struct Client *client_p, struct
128                      parc, parv) != HUNTED_ISME)
129        return;
130  
131 <  execute_callback(admin_cb, source_p, parc, parv);
131 >  do_admin(source_p);
132   }
133  
134   /*! \brief ADMIN command handler (called by operators and
# Line 160 | Line 149 | static void
149   ms_admin(struct Client *client_p, struct Client *source_p,
150           int parc, char *parv[])
151   {
152 <  if (hunt_server(client_p, source_p, ":%s ADMIN :%s", 1, parc, parv)
153 <                  != HUNTED_ISME)
152 >  if (hunt_server(client_p, source_p, ":%s ADMIN :%s", 1,
153 >                  parc, parv) != HUNTED_ISME)
154      return;
155  
156    if (IsClient(source_p))
157 <    execute_callback(admin_cb, source_p, parc, parv);
157 >    do_admin(source_p);
158   }
159  
160   /*! \brief Sends administrative information about this server.
# Line 178 | Line 167 | do_admin(struct Client *source_p)
167    const char *me_name;
168    const char *nick;
169  
170 +  sendto_realops_flags(UMODE_SPY, L_ALL,
171 +                       "ADMIN requested by %s (%s@%s) [%s]",
172 +                       source_p->name, source_p->username,
173 +                       source_p->host, source_p->servptr->name);
174 +
175    me_name = ID_or_name(&me, source_p->from);
176    nick = ID_or_name(source_p, source_p->from);
177  

Diff Legend

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