44 |
|
|
45 |
|
/*! \brief SVSNICK command handler (called by services) |
46 |
|
* |
47 |
– |
* \param client_p Pointer to allocated Client struct with physical connection |
48 |
– |
* to this server, i.e. with an open socket connected. |
47 |
|
* \param source_p Pointer to allocated Client struct from which the message |
48 |
|
* originally comes from. This can be a local or remote client. |
49 |
|
* \param parc Integer holding the number of supplied arguments. |
56 |
|
* - parv[3] = timestamp |
57 |
|
*/ |
58 |
|
static int |
59 |
< |
ms_svsnick(struct Client *client_p, struct Client *source_p, |
62 |
< |
int parc, char *parv[]) |
59 |
> |
ms_svsnick(struct Client *source_p, int parc, char *parv[]) |
60 |
|
{ |
61 |
|
struct Client *target_p = NULL, *exists_p = NULL; |
62 |
|
|
63 |
|
if (!HasFlag(source_p, FLAGS_SERVICE) || !valid_nickname(parv[2], 1)) |
64 |
|
return 0; |
65 |
|
|
66 |
< |
if (hunt_server(client_p, source_p, ":%s SVSNICK %s %s :%s", |
66 |
> |
if (hunt_server(source_p, ":%s SVSNICK %s %s :%s", |
67 |
|
1, parc, parv) != HUNTED_ISME) |
68 |
|
return 0; |
69 |
|
|
70 |
< |
if ((target_p = find_person(client_p, parv[1])) == NULL) |
70 |
> |
if ((target_p = find_person(source_p, parv[1])) == NULL) |
71 |
|
return 0; |
72 |
|
|
73 |
|
assert(MyClient(target_p)); |