| 40 |
|
|
| 41 |
|
/*! \brief SVSMODE command handler (called by services) |
| 42 |
|
* |
| 43 |
– |
* \param client_p Pointer to allocated Client struct with physical connection |
| 44 |
– |
* to this server, i.e. with an open socket connected. |
| 43 |
|
* \param source_p Pointer to allocated Client struct from which the message |
| 44 |
|
* originally comes from. This can be a local or remote client. |
| 45 |
|
* \param parc Integer holding the number of supplied arguments. |
| 53 |
|
* - parv[4] = optional argument (services id) |
| 54 |
|
*/ |
| 55 |
|
static int |
| 56 |
< |
ms_svsmode(struct Client *client_p, struct Client *source_p, |
| 59 |
< |
int parc, char *parv[]) |
| 56 |
> |
ms_svsmode(struct Client *source_p, int parc, char *parv[]) |
| 57 |
|
{ |
| 58 |
|
struct Client *target_p = NULL; |
| 59 |
|
int what = MODE_ADD; |
| 76 |
|
extarg = (parc > 3) ? parv[3] : NULL; |
| 77 |
|
} |
| 78 |
|
|
| 79 |
< |
if ((target_p = find_person(client_p, parv[1])) == NULL) |
| 79 |
> |
if ((target_p = find_person(source_p, parv[1])) == NULL) |
| 80 |
|
return 0; |
| 81 |
|
|
| 82 |
|
if (ts && (ts != target_p->tsinfo)) |
| 159 |
|
} |
| 160 |
|
|
| 161 |
|
if (extarg) |
| 162 |
< |
sendto_server(client_p, NOCAPS, NOCAPS, ":%s SVSMODE %s %lu %s %s", |
| 162 |
> |
sendto_server(source_p, NOCAPS, NOCAPS, ":%s SVSMODE %s %lu %s %s", |
| 163 |
|
ID(source_p), |
| 164 |
|
ID(target_p), (unsigned long)target_p->tsinfo, modes, extarg); |
| 165 |
|
else |
| 166 |
< |
sendto_server(client_p, NOCAPS, NOCAPS, ":%s SVSMODE %s %lu %s", |
| 166 |
> |
sendto_server(source_p, NOCAPS, NOCAPS, ":%s SVSMODE %s %lu %s", |
| 167 |
|
ID(source_p), |
| 168 |
|
ID(target_p), (unsigned long)target_p->tsinfo, modes); |
| 169 |
|
|