| 33 |
|
#include "hash.h" |
| 34 |
|
#include "irc_string.h" |
| 35 |
|
#include "ircd_defs.h" |
| 36 |
+ |
#include "s_misc.h" |
| 37 |
|
#include "conf.h" |
| 38 |
|
#include "conf_db.h" |
| 39 |
|
|
| 59 |
|
if (hash_find_resv(name)) |
| 60 |
|
return NULL; |
| 61 |
|
|
| 61 |
– |
if (strlen(reason) > REASONLEN) |
| 62 |
– |
reason[REASONLEN] = '\0'; |
| 63 |
– |
|
| 62 |
|
conf = conf_make(CONF_CRESV); |
| 63 |
< |
|
| 64 |
< |
DupString(conf->name, name); |
| 67 |
< |
DupString(conf->reason, reason); |
| 63 |
> |
conf->name = xstrdup(name); |
| 64 |
> |
conf->reason = xstrndup(reason, IRCD_MIN(strlen(reason), REASONLEN)); |
| 65 |
|
|
| 66 |
|
dlinkAdd(conf, &conf->node, &resv_channel_list); |
| 67 |
|
hash_add_resv(conf); |
| 88 |
|
if (find_matching_name_conf(CONF_NRESV, name, NULL, NULL, 0)) |
| 89 |
|
return NULL; |
| 90 |
|
|
| 94 |
– |
if (strlen(reason) > REASONLEN) |
| 95 |
– |
reason[REASONLEN] = '\0'; |
| 96 |
– |
|
| 91 |
|
conf = conf_make(CONF_NRESV); |
| 92 |
< |
|
| 93 |
< |
DupString(conf->name, name); |
| 100 |
< |
DupString(conf->reason, reason); |
| 92 |
> |
conf->name = xstrdup(name); |
| 93 |
> |
conf->reason = xstrndup(reason, IRCD_MIN(strlen(reason), REASONLEN)); |
| 94 |
|
|
| 95 |
|
return conf; |
| 96 |
|
} |