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 1309 by michael, Sun Mar 25 11:24:18 2012 UTC vs.
Revision 1569 by michael, Tue Oct 16 18:46:53 2012 UTC

# Line 44 | 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,
51                         "ADMIN requested by %s (%s@%s) [%s]",
52                         source_p->name, source_p->username,
53                         source_p->host, source_p->servptr->name);
54  
55 –  me_name = ID_or_name(&me, source_p->from);
56 –  nick = ID_or_name(source_p, source_p->from);
57 –
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 68 | Line 66 | do_admin(struct Client *source_p)
66                 me_name, nick, AdminInfo.email);
67   }
68  
71 – /*! \brief ADMIN command handler (called by unregistered,
72 – *         locally connected clients)
73 – *
74 – * \param client_p Pointer to allocated Client struct with physical connection
75 – *                 to this server, i.e. with an open socket connected.
76 – * \param source_p Pointer to allocated Client struct from which the message
77 – *                 originally comes from.  This can be a local or remote client.
78 – * \param parc     Integer holding the number of supplied arguments.
79 – * \param parv     Argument vector where parv[0] .. parv[parc-1] are non-NULL
80 – *                 pointers.
81 – * \note Valid arguments for this command are:
82 – *      - parv[0] = sender prefix
83 – */
84 – static void
85 – mr_admin(struct Client *client_p, struct Client *source_p,
86 –         int parc, char *parv[])
87 – {
88 –  static time_t last_used = 0;
89 –
90 –  ClearCap(client_p, CAP_TS6);
91 –
92 –  if ((last_used + ConfigFileEntry.pace_wait_simple) > CurrentTime)
93 –  {
94 –    sendto_one(source_p, form_str(RPL_LOAD2HI),
95 –               me.name, EmptyString(parv[0]) ? "*" : parv[0]);
96 –    return;
97 –  }
98 –
99 –  last_used = CurrentTime;
100 –
101 –  do_admin(source_p);
102 – }
103 –
69   /*! \brief NICK command handler (called by already registered,
70   *         locally connected clients)
71   *
# Line 165 | 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)