diff options
author | Anton Luka Šijanec <anton@sijanec.eu> | 2022-05-08 02:10:56 +0200 |
---|---|---|
committer | Anton Luka Šijanec <anton@sijanec.eu> | 2022-05-08 02:10:56 +0200 |
commit | daab1adc5e6f546ad9298e52c213a367d1174982 (patch) | |
tree | 91ef6cf315566e27a553012d6309d89d616b2e51 /ircxmpp.c | |
parent | 0.0.8 (diff) | |
download | ircxmpp-daab1adc5e6f546ad9298e52c213a367d1174982.tar ircxmpp-daab1adc5e6f546ad9298e52c213a367d1174982.tar.gz ircxmpp-daab1adc5e6f546ad9298e52c213a367d1174982.tar.bz2 ircxmpp-daab1adc5e6f546ad9298e52c213a367d1174982.tar.lz ircxmpp-daab1adc5e6f546ad9298e52c213a367d1174982.tar.xz ircxmpp-daab1adc5e6f546ad9298e52c213a367d1174982.tar.zst ircxmpp-daab1adc5e6f546ad9298e52c213a367d1174982.zip |
Diffstat (limited to 'ircxmpp.c')
-rw-r--r-- | ircxmpp.c | 10 |
1 files changed, 6 insertions, 4 deletions
@@ -482,10 +482,12 @@ static int irc_run_once_control (struct ircxmpp * ircxmpp) { /* returns nonzero LOG(ircxmpp, IRCXMPP_INFO, "CONNECTING control %s!ircxmpp@host", b); free(ircxmpp->ircnick); ircxmpp->ircnick = strdup(b); - char domain[512+strlen(ircxmpp->domain)]; - strcpy(domain, "čžš .. invalid domain so that we get our IP address as irchost .."); - strcat(domain, ircxmpp->domain); - ircxmpp->domain_setter(ircxmpp->domain_setter_userdata, domain); + if (ircxmpp->domain) { + char domain[512+strlen(ircxmpp->domain)]; + strcpy(domain, "čžš .. invalid domain so that we get our IP address as irchost .."); + strcat(domain, ircxmpp->domain); + ircxmpp->domain_setter(ircxmpp->domain_setter_userdata, domain); + } if (irc_connect(ircxmpp->irc, ircxmpp->hostname, ircxmpp->port, NULL, b, "ircxmpp", "http git.sijanec.eu/sijanec/ircxmpp")) { LOG(ircxmpp, IRCXMPP_ERROR, "control could not connect: %s", |