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-8/modules/m_admin.c (file contents), Revision 1230 by michael, Thu Sep 22 19:41:19 2011 UTC vs.
ircd-hybrid/trunk/modules/m_admin.c (file contents), Revision 1618 by michael, Tue Oct 30 21:04:38 2012 UTC

# Line 25 | Line 25
25   */
26  
27   #include "stdinc.h"
28 – #include "handlers.h"
28   #include "client.h"
29   #include "ircd.h"
30   #include "numeric.h"
31 < #include "s_conf.h"
31 > #include "conf.h"
32   #include "s_serv.h"
33   #include "send.h"
35 – #include "msg.h"
34   #include "parse.h"
35   #include "modules.h"
36   #include "irc_string.h"
# Line 46 | Line 44
44   static void
45   do_admin(struct Client *source_p)
46   {
47 <  const char *me_name;
48 <  const char *nick;
47 >  const char *me_name = ID_or_name(&me, source_p->from);
48 >  const char *nick = ID_or_name(source_p, source_p->from);
49  
50 <  sendto_realops_flags(UMODE_SPY, L_ALL,
50 >  sendto_realops_flags(UMODE_SPY, L_ALL, SEND_NOTICE,
51                         "ADMIN requested by %s (%s@%s) [%s]",
52                         source_p->name, source_p->username,
53                         source_p->host, source_p->servptr->name);
54  
57 –  me_name = ID_or_name(&me, source_p->from);
58 –  nick = ID_or_name(source_p, source_p->from);
59 –
55    sendto_one(source_p, form_str(RPL_ADMINME),
56               me_name, nick, me.name);
57 +
58    if (AdminInfo.name != NULL)
59      sendto_one(source_p, form_str(RPL_ADMINLOC1),
60                 me_name, nick, AdminInfo.name);
# Line 70 | Line 66 | do_admin(struct Client *source_p)
66                 me_name, nick, AdminInfo.email);
67   }
68  
73 – /*! \brief ADMIN command handler (called by unregistered,
74 – *         locally connected clients)
75 – *
76 – * \param client_p Pointer to allocated Client struct with physical connection
77 – *                 to this server, i.e. with an open socket connected.
78 – * \param source_p Pointer to allocated Client struct from which the message
79 – *                 originally comes from.  This can be a local or remote client.
80 – * \param parc     Integer holding the number of supplied arguments.
81 – * \param parv     Argument vector where parv[0] .. parv[parc-1] are non-NULL
82 – *                 pointers.
83 – * \note Valid arguments for this command are:
84 – *      - parv[0] = sender prefix
85 – */
86 – static void
87 – mr_admin(struct Client *client_p, struct Client *source_p,
88 –         int parc, char *parv[])
89 – {
90 –  static time_t last_used = 0;
91 –
92 –  ClearCap(client_p, CAP_TS6);
93 –
94 –  if ((last_used + ConfigFileEntry.pace_wait_simple) > CurrentTime)
95 –  {
96 –    sendto_one(source_p, form_str(RPL_LOAD2HI),
97 –               me.name, EmptyString(parv[0]) ? "*" : parv[0]);
98 –    return;
99 –  }
100 –
101 –  last_used = CurrentTime;
102 –
103 –  do_admin(source_p);
104 – }
105 –
69   /*! \brief NICK command handler (called by already registered,
70   *         locally connected clients)
71   *
# Line 167 | Line 130 | ms_admin(struct Client *client_p, struct
130   }
131  
132   static struct Message admin_msgtab = {
133 <  "ADMIN", 0, 0, 0, MAXPARA, MFLG_SLOW | MFLG_UNREG, 0,
134 <  {mr_admin, m_admin, ms_admin, m_ignore, ms_admin, m_ignore}
133 >  "ADMIN", 0, 0, 0, MAXPARA, MFLG_SLOW, 0,
134 >  { m_unregistered, m_admin, ms_admin, m_ignore, ms_admin, m_ignore }
135   };
136  
137   static void

Diff Legend

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