| 1 |
|
/* |
| 2 |
|
* ircd-hybrid: an advanced, lightweight Internet Relay Chat Daemon (ircd) |
| 3 |
|
* |
| 4 |
< |
* Copyright (c) 2013-2016 ircd-hybrid development team |
| 4 |
> |
* Copyright (c) 2013-2020 ircd-hybrid development team |
| 5 |
|
* |
| 6 |
|
* This program is free software; you can redistribute it and/or modify |
| 7 |
|
* it under the terms of the GNU General Public License as published by |
| 44 |
|
* - parv[0] = command |
| 45 |
|
* - parv[1] = certificate fingerprint |
| 46 |
|
*/ |
| 47 |
< |
static int |
| 47 |
> |
static void |
| 48 |
|
ms_certfp(struct Client *source_p, int parc, char *parv[]) |
| 49 |
|
{ |
| 50 |
|
if (!IsClient(source_p)) |
| 51 |
< |
return 0; |
| 51 |
> |
return; |
| 52 |
|
|
| 53 |
< |
MyFree(source_p->certfp); |
| 53 |
> |
xfree(source_p->certfp); |
| 54 |
|
source_p->certfp = xstrdup(parv[1]); |
| 55 |
|
|
| 56 |
|
sendto_server(source_p, 0, 0, ":%s CERTFP %s", |
| 57 |
|
source_p->id, source_p->certfp); |
| 58 |
– |
return 0; |
| 58 |
|
} |
| 59 |
|
|
| 60 |
|
static struct Message certfp_msgtab = |
| 61 |
|
{ |
| 62 |
|
.cmd = "CERTFP", |
| 63 |
< |
.args_min = 2, |
| 64 |
< |
.args_max = MAXPARA, |
| 65 |
< |
.handlers[UNREGISTERED_HANDLER] = m_ignore, |
| 66 |
< |
.handlers[CLIENT_HANDLER] = m_ignore, |
| 67 |
< |
.handlers[SERVER_HANDLER] = ms_certfp, |
| 69 |
< |
.handlers[ENCAP_HANDLER] = m_ignore, |
| 70 |
< |
.handlers[OPER_HANDLER] = m_ignore |
| 63 |
> |
.handlers[UNREGISTERED_HANDLER] = { .handler = m_ignore }, |
| 64 |
> |
.handlers[CLIENT_HANDLER] = { .handler = m_ignore }, |
| 65 |
> |
.handlers[SERVER_HANDLER] = { .handler = ms_certfp, .args_min = 2 }, |
| 66 |
> |
.handlers[ENCAP_HANDLER] = { .handler = m_ignore }, |
| 67 |
> |
.handlers[OPER_HANDLER] = { .handler = m_ignore } |
| 68 |
|
}; |
| 69 |
|
|
| 70 |
|
static void |