diff --git a/extensions/m_webirc.c b/extensions/m_webirc.c index 6b86ee4a..b61c4035 100644 --- a/extensions/m_webirc.c +++ b/extensions/m_webirc.c @@ -80,13 +80,6 @@ mr_webirc(struct MsgBuf *msgbuf_p, struct Client *client_p, struct Client *sourc const char *encr; struct rb_sockaddr_storage addr; - if ((!strchr(parv[4], '.') && !strchr(parv[4], ':')) || - strlen(parv[4]) >= sizeof(source_p->sockhost)) - { - sendto_one(source_p, "NOTICE * :Invalid IP"); - return; - } - aconf = find_address_conf(client_p->host, client_p->sockhost, IsGotId(client_p) ? client_p->username : "webirc", IsGotId(client_p) ? client_p->username : "webirc", @@ -125,15 +118,15 @@ mr_webirc(struct MsgBuf *msgbuf_p, struct Client *client_p, struct Client *sourc return; } + source_p->localClient->ip = addr; + + rb_inet_ntop_sock((struct sockaddr *)&source_p->localClient->ip, source_p->sockhost, sizeof(source_p->sockhost)); + if(strlen(parv[3]) <= HOSTLEN) rb_strlcpy(source_p->host, parv[3], sizeof(source_p->host)); else rb_strlcpy(source_p->host, source_p->sockhost, sizeof(source_p->host)); - source_p->localClient->ip = addr; - - rb_inet_ntop_sock((struct sockaddr *)&source_p->localClient->ip, source_p->sockhost, sizeof(source_p->sockhost)); - /* Check dlines now, klines will be checked on registration */ if((aconf = find_dline((struct sockaddr *)&source_p->localClient->ip, GET_SS_FAMILY(&source_p->localClient->ip))))