169 |
|
* side effects - Does whois |
170 |
|
*/ |
171 |
|
static void |
172 |
< |
do_whois(struct Client *source_p, int parc, char *parv[]) |
172 |
> |
do_whois(struct Client *source_p, const char *name) |
173 |
|
{ |
174 |
|
struct Client *target_p = NULL; |
175 |
– |
char *nick = parv[1]; |
176 |
– |
char *p = NULL; |
175 |
|
|
176 |
< |
if ((p = strchr(nick, ',')) != NULL) |
179 |
< |
*p = '\0'; |
180 |
< |
if (*nick == '\0') |
181 |
< |
return; |
182 |
< |
|
183 |
< |
if ((target_p = hash_find_client(nick)) && IsClient(target_p)) |
176 |
> |
if ((target_p = hash_find_client(name)) && IsClient(target_p)) |
177 |
|
whois_person(source_p, target_p); |
178 |
< |
else if (!IsDigit(*nick)) |
178 |
> |
else if (!IsDigit(*name)) |
179 |
|
sendto_one(source_p, form_str(ERR_NOSUCHNICK), |
180 |
< |
me.name, source_p->name, nick); |
180 |
> |
me.name, source_p->name, name); |
181 |
|
|
182 |
|
sendto_one(source_p, form_str(RPL_ENDOFWHOIS), |
183 |
< |
me.name, source_p->name, nick); |
183 |
> |
me.name, source_p->name, name); |
184 |
|
} |
185 |
|
|
186 |
|
/* |
228 |
|
parv[1] = parv[2]; |
229 |
|
} |
230 |
|
|
231 |
< |
do_whois(source_p, parc, parv); |
231 |
> |
do_whois(source_p, parv[1]); |
232 |
|
} |
233 |
|
|
234 |
|
/* |
256 |
|
parv[1] = parv[2]; |
257 |
|
} |
258 |
|
|
259 |
< |
do_whois(source_p, parc, parv); |
259 |
> |
do_whois(source_p, parv[1]); |
260 |
|
} |
261 |
|
|
262 |
|
static struct Message whois_msgtab = { |