]> jfr.im git - irc/rqf/shadowircd.git/blobdiff - modules/m_chghost.c
Add resv oper priv, enabled by default for compatibility.
[irc/rqf/shadowircd.git] / modules / m_chghost.c
index fcf87a8ed071f058eda3c4596a5a4ee81e85c396..f4778e013294da1d49757b5d52f2a7de22935c40 100644 (file)
@@ -48,7 +48,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: 1865 $");
+DECLARE_MODULE_AV1(chghost, NULL, NULL, chghost_clist, NULL, NULL, "$Revision: 3424 $");
 
 /* clean_host()
  *
@@ -60,6 +60,9 @@ static int
 clean_host(const char *host)
 {
        int len = 0;
+       
+       if (*host == '\0' || *host == ':')
+               return 0;
 
        for(; *host; host++)
        {
@@ -93,7 +96,7 @@ me_realhost(struct Client *client_p, struct Client *source_p,
                return 0;
 
        del_from_hostname_hash(source_p->orighost, source_p);
-       strlcpy(source_p->orighost, parv[1], HOSTLEN);
+       strlcpy(source_p->orighost, parv[1], sizeof source_p->orighost);
        if (irccmp(source_p->host, source_p->orighost))
                SetDynSpoof(source_p);
        else