summaryrefslogtreecommitdiffstats
path: root/ircxmpp.c
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--ircxmpp.c10
1 files changed, 6 insertions, 4 deletions
diff --git a/ircxmpp.c b/ircxmpp.c
index aa23b8d..73ebc81 100644
--- a/ircxmpp.c
+++ b/ircxmpp.c
@@ -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",