X-Git-Url: https://jfr.im/git/irc/rqf/shadowircd.git/blobdiff_plain/14e23b0e1e595ef97e15f90c74749e7345f6abd7..90a3c35b295b07ebe3793bf5d3b882c3c1a5dc7c:/modules/m_chghost.c diff --git a/modules/m_chghost.c b/modules/m_chghost.c index fbb9022..f805cbb 100644 --- a/modules/m_chghost.c +++ b/modules/m_chghost.c @@ -10,7 +10,6 @@ */ #include "stdinc.h" -#include "tools.h" #include "send.h" #include "channel.h" #include "client.h" @@ -18,7 +17,6 @@ #include "config.h" #include "ircd.h" #include "numeric.h" -#include "memory.h" #include "s_conf.h" #include "s_newconf.h" #include "s_serv.h" @@ -48,7 +46,7 @@ struct Message chghost_msgtab = { mapi_clist_av1 chghost_clist[] = { &chghost_msgtab, &realhost_msgtab, NULL }; -DECLARE_MODULE_AV1(chghost, NULL, NULL, chghost_clist, NULL, NULL, "$Revision: 3227 $"); +DECLARE_MODULE_AV1(chghost, NULL, NULL, chghost_clist, NULL, NULL, "$Revision: 3424 $"); /* clean_host() * @@ -60,6 +58,9 @@ static int clean_host(const char *host) { int len = 0; + + if (*host == '\0' || *host == ':') + return 0; for(; *host; host++) { @@ -237,7 +238,8 @@ mo_chghost(struct Client *client_p, struct Client *source_p, NOCAPS, CAP_TS6, ":%s ENCAP * CHGHOST %s :%s", source_p->name, target_p->name, parv[2]); #else - sendto_one_notice(source_p, ":CHGHOST is disabled"); + sendto_one_numeric(source_p, ERR_DISABLED, form_str(ERR_DISABLED), + "CHGHOST"); #endif return 0;