| 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 *); |
| 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), |
| 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)) |
| 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); |