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

Comparing ircd-hybrid-7.2/modules/m_whois.c (file contents):
Revision 93 by michael, Sat Oct 8 11:24:01 2005 UTC vs.
Revision 268 by adx, Mon Nov 14 11:02:39 2005 UTC

# Line 45 | Line 45
45   #include "modules.h"
46   #include "hook.h"
47  
48 + static time_t last_used = 0;
49 +
50   static void do_whois(struct Client *, int, char **);
51   static int single_whois(struct Client *, struct Client *);
52   static void whois_person(struct Client *, struct Client *);
# Line 97 | Line 99 | static void
99   m_whois(struct Client *client_p, struct Client *source_p,
100          int parc, char *parv[])
101   {
100  static time_t last_used = 0;
101
102    if (parc < 2 || EmptyString(parv[1]))
103    {
104      sendto_one(source_p, form_str(ERR_NONICKNAMEGIVEN),
# Line 203 | Line 203 | do_whois(struct Client *source_p, int pa
203      if ((target_p = find_client(nick)) != NULL)
204      {
205        if (IsServer(source_p->from))
206 <        client_burst_if_needed(source_p->from, target_p);
206 >        client_burst_if_needed(source_p->from, target_p);
207  
208        if (IsClient(target_p))
209        {
210 <        whois_person(source_p, target_p);
211 <        found = 1;
210 >        whois_person(source_p, target_p);
211 >        found = 1;
212        }
213      }
214      else if (!ServerInfo.hub && uplink && IsCapable(uplink, CAP_LL))
# Line 228 | Line 228 | do_whois(struct Client *source_p, int pa
228      if (!ServerInfo.hub && uplink && IsCapable(uplink, CAP_LL))
229        return;
230  
231 +    if (!IsOper(source_p))
232 +    {
233 +      if ((last_used + ConfigFileEntry.pace_wait_simple) > CurrentTime)
234 +      {
235 +        sendto_one(source_p, form_str(RPL_LOAD2HI),
236 +                   me.name, source_p->name);
237 +        return;
238 +      }
239 +      else
240 +        last_used = CurrentTime;
241 +  }
242 +
243      /* Oh-oh wilds is true so have to do it the hard expensive way */
244      if (MyClient(source_p))
245        found = global_whois(source_p, nick);

Diff Legend

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