Reduce clean_nick() code duplication further.

Side effect: hurt and monitor now allow nicks starting with a digit.
This commit is contained in:
Jilles Tjoelker 2015-12-13 00:22:21 +01:00
parent e1fda0d81e
commit 2d28539c68
7 changed files with 42 additions and 91 deletions

View file

@ -311,7 +311,7 @@ mo_heal(struct Client *client_p, struct Client *source_p,
return 0;
}
if (is_valid_nick(parv[1]))
if (clean_nick(parv[1], 0))
{
target_p = find_named_person(parv[1]);
if (target_p == NULL)
@ -363,7 +363,7 @@ me_heal(struct Client *client_p, struct Client *source_p,
if (parc < 2)
return 0;
if (is_valid_nick(parv[1]))
if (clean_nick(parv[1], 0))
{
target_p = find_person(parv[1]);
if (target_p != NULL && MyConnect(target_p))