diff options
author | michael <michael@82007160-df01-0410-b94d-b575c5fd34c7> | 2013-06-04 12:19:20 +0000 |
---|---|---|
committer | michael <michael@82007160-df01-0410-b94d-b575c5fd34c7> | 2013-06-04 12:19:20 +0000 |
commit | 769dbfa3f3d3a2f84b42ee96b4eaae9d4178759b (patch) | |
tree | c6a10e3c68506e5f1052c744c5c561653941fcc3 | |
parent | 966226823c39b8952f8db398cf5cc1081746ef4a (diff) |
- Style correcions/white-space changes
git-svn-id: svn://svn.ircd-hybrid.org/svnroot/ircd-hybrid/branches/8.1.x@2183 82007160-df01-0410-b94d-b575c5fd34c7
-rw-r--r-- | src/client.c | 78 | ||||
-rw-r--r-- | src/conf.c | 183 | ||||
-rw-r--r-- | src/parse.c | 6 | ||||
-rw-r--r-- | src/s_serv.c | 77 |
4 files changed, 172 insertions, 172 deletions
diff --git a/src/client.c b/src/client.c index 7e9bef3..0f51ddf 100644 --- a/src/client.c +++ b/src/client.c @@ -265,14 +265,14 @@ check_pings_list(dlink_list *list) { if (!IsPingSent(client_p)) { - /* - * if we havent PINGed the connection and we havent - * heard from it in a while, PING it to make sure - * it is still alive. - */ - SetPingSent(client_p); - client_p->localClient->lasttime = CurrentTime - ping; - sendto_one(client_p, "PING :%s", ID_or_name(&me, client_p)); + /* + * if we havent PINGed the connection and we havent + * heard from it in a while, PING it to make sure + * it is still alive. + */ + SetPingSent(client_p); + client_p->localClient->lasttime = CurrentTime - ping; + sendto_one(client_p, "PING :%s", ID_or_name(&me, client_p)); } else { @@ -283,16 +283,16 @@ check_pings_list(dlink_list *list) * and it has a ping time, then close its connection. */ if (IsServer(client_p) || IsHandshake(client_p)) - { - sendto_realops_flags(UMODE_ALL, L_ADMIN, SEND_NOTICE, - "No response from %s, closing link", - get_client_name(client_p, HIDE_IP)); - sendto_realops_flags(UMODE_ALL, L_OPER, SEND_NOTICE, - "No response from %s, closing link", - get_client_name(client_p, MASK_IP)); - ilog(LOG_TYPE_IRCD, "No response from %s, closing link", - get_client_name(client_p, HIDE_IP)); - } + { + sendto_realops_flags(UMODE_ALL, L_ADMIN, SEND_NOTICE, + "No response from %s, closing link", + get_client_name(client_p, HIDE_IP)); + sendto_realops_flags(UMODE_ALL, L_OPER, SEND_NOTICE, + "No response from %s, closing link", + get_client_name(client_p, MASK_IP)); + ilog(LOG_TYPE_IRCD, "No response from %s, closing link", + get_client_name(client_p, HIDE_IP)); + } snprintf(scratch, sizeof(scratch), "Ping timeout: %d seconds", (int)(CurrentTime - client_p->localClient->lasttime)); @@ -354,7 +354,7 @@ check_conf_klines(void) client_p->localClient->aftype)) != NULL) { if (conf->type == CONF_EXEMPT) - continue; + continue; ban_them(client_p, conf); continue; /* and go examine next fd/client_p */ @@ -425,7 +425,7 @@ check_conf_klines(void) static void ban_them(struct Client *client_p, struct MaskItem *conf) { - const char *user_reason = NULL; /* What is sent to user */ + const char *user_reason = NULL; /* What is sent to user */ const char *type_string = NULL; const char dline_string[] = "D-line"; const char kline_string[] = "K-line"; @@ -459,7 +459,7 @@ ban_them(struct Client *client_p, struct MaskItem *conf) if (IsClient(client_p)) sendto_one(client_p, form_str(ERR_YOUREBANNEDCREEP), - me.name, client_p->name, user_reason); + me.name, client_p->name, user_reason); exit_client(client_p, &me, user_reason); } @@ -539,8 +539,8 @@ find_chasing(struct Client *client_p, struct Client *source_p, const char *user, return NULL; if ((who = get_history(user, - (time_t)ConfigFileEntry.kill_chase_time_limit)) - == NULL) + (time_t)ConfigFileEntry.kill_chase_time_limit)) + == NULL) { sendto_one(source_p, form_str(ERR_NOSUCHNICK), me.name, source_p->name, user); @@ -866,11 +866,11 @@ exit_client(struct Client *source_p, struct Client *from, const char *comment) sendto_realops_flags(UMODE_CCONN_FULL, L_ALL, SEND_NOTICE, "CLIEXIT: %s %s %s %s 0 %s", source_p->name, - source_p->username, - source_p->host, + source_p->username, + source_p->host, ConfigFileEntry.hide_spoof_ips && IsIPSpoof(source_p) ? "255.255.255.255" : source_p->sockhost, - comment); + comment); ilog(LOG_TYPE_USER, "%s (%3u:%02u:%02u): %s!%s@%s %llu/%llu", myctime(source_p->localClient->firsttime), (unsigned int)(on_for / 3600), (unsigned int)((on_for % 3600)/60), (unsigned int)(on_for % 60), @@ -894,7 +894,7 @@ exit_client(struct Client *source_p, struct Client *from, const char *comment) { /* for them, we are exiting the network */ sendto_one(source_p, ":%s SQUIT %s :%s", - ID_or_name(from, source_p), me.name, comment); + ID_or_name(from, source_p), me.name, comment); } sendto_one(source_p, "ERROR :Closing Link: %s (%s)", @@ -1021,31 +1021,31 @@ dead_link_on_read(struct Client *client_p, int error) { /* Admins get the real IP */ sendto_realops_flags(UMODE_ALL, L_ADMIN, SEND_NOTICE, - "Server %s closed the connection", - get_client_name(client_p, SHOW_IP)); + "Server %s closed the connection", + get_client_name(client_p, SHOW_IP)); /* Opers get a masked IP */ sendto_realops_flags(UMODE_ALL, L_OPER, SEND_NOTICE, - "Server %s closed the connection", - get_client_name(client_p, MASK_IP)); + "Server %s closed the connection", + get_client_name(client_p, MASK_IP)); ilog(LOG_TYPE_IRCD, "Server %s closed the connection", - get_client_name(client_p, SHOW_IP)); + get_client_name(client_p, SHOW_IP)); } else { report_error(L_ADMIN, "Lost connection to %s: %s", - get_client_name(client_p, SHOW_IP), current_error); + get_client_name(client_p, SHOW_IP), current_error); report_error(L_OPER, "Lost connection to %s: %s", - get_client_name(client_p, MASK_IP), current_error); + get_client_name(client_p, MASK_IP), current_error); } sendto_realops_flags(UMODE_ALL, L_ALL, SEND_NOTICE, - "%s had been connected for %d day%s, %2d:%02d:%02d", - client_p->name, connected/86400, - (connected/86400 == 1) ? "" : "s", - (connected % 86400) / 3600, (connected % 3600) / 60, - connected % 60); + "%s had been connected for %d day%s, %2d:%02d:%02d", + client_p->name, connected/86400, + (connected/86400 == 1) ? "" : "s", + (connected % 86400) / 3600, (connected % 3600) / 60, + connected % 60); } if (error == 0) @@ -244,10 +244,10 @@ check_client(struct Client *source_p) case TOO_MANY: sendto_realops_flags(UMODE_FULL, L_ALL, SEND_NOTICE, "Too many on IP for %s (%s).", - get_client_name(source_p, SHOW_IP), - source_p->sockhost); + get_client_name(source_p, SHOW_IP), + source_p->sockhost); ilog(LOG_TYPE_IRCD, "Too many connections on IP from %s.", - get_client_name(source_p, SHOW_IP)); + get_client_name(source_p, SHOW_IP)); ++ServerStats.is_ref; exit_client(source_p, &me, "No more connections allowed on that IP"); break; @@ -255,13 +255,13 @@ check_client(struct Client *source_p) case I_LINE_FULL: sendto_realops_flags(UMODE_FULL, L_ALL, SEND_NOTICE, "auth{} block is full for %s (%s).", - get_client_name(source_p, SHOW_IP), - source_p->sockhost); + get_client_name(source_p, SHOW_IP), + source_p->sockhost); ilog(LOG_TYPE_IRCD, "Too many connections from %s.", - get_client_name(source_p, SHOW_IP)); + get_client_name(source_p, SHOW_IP)); ++ServerStats.is_ref; exit_client(source_p, &me, - "No more connections allowed in your connection class"); + "No more connections allowed in your connection class"); break; case NOT_AUTHORIZED: @@ -269,16 +269,16 @@ check_client(struct Client *source_p) /* jdc - lists server name & port connections are on */ /* a purely cosmetical change */ sendto_realops_flags(UMODE_UNAUTH, L_ALL, SEND_NOTICE, - "Unauthorized client connection from %s [%s] on [%s/%u].", - get_client_name(source_p, SHOW_IP), - source_p->sockhost, - source_p->localClient->listener->name, - source_p->localClient->listener->port); + "Unauthorized client connection from %s [%s] on [%s/%u].", + get_client_name(source_p, SHOW_IP), + source_p->sockhost, + source_p->localClient->listener->name, + source_p->localClient->listener->port); ilog(LOG_TYPE_IRCD, - "Unauthorized client connection from %s on [%s/%u].", - get_client_name(source_p, SHOW_IP), - source_p->localClient->listener->name, - source_p->localClient->listener->port); + "Unauthorized client connection from %s on [%s/%u].", + get_client_name(source_p, SHOW_IP), + source_p->localClient->listener->name, + source_p->localClient->listener->port); exit_client(source_p, &me, "You are not authorized to use this server"); break; @@ -311,17 +311,17 @@ verify_access(struct Client *client_p) if (IsGotId(client_p)) { conf = find_address_conf(client_p->host, client_p->username, - &client_p->localClient->ip, - client_p->localClient->aftype, + &client_p->localClient->ip, + client_p->localClient->aftype, client_p->localClient->passwd); } else { - strlcpy(non_ident+1, client_p->username, sizeof(non_ident)-1); + strlcpy(non_ident + 1, client_p->username, sizeof(non_ident) - 1); conf = find_address_conf(client_p->host,non_ident, - &client_p->localClient->ip, - client_p->localClient->aftype, - client_p->localClient->passwd); + &client_p->localClient->ip, + client_p->localClient->aftype, + client_p->localClient->passwd); } if (conf != NULL) @@ -334,11 +334,11 @@ verify_access(struct Client *client_p) me.name, client_p->name, conf->name ? conf->name : "", conf->port); - return(NOT_AUTHORIZED); + return NOT_AUTHORIZED; } if (IsConfDoIdentd(conf)) - SetNeedId(client_p); + SetNeedId(client_p); /* Thanks for spoof idea amm */ if (IsConfDoSpoofIp(conf)) @@ -351,7 +351,7 @@ verify_access(struct Client *client_p) AddFlag(client_p, FLAGS_IP_SPOOFING | FLAGS_AUTH_SPOOF); } - return(attach_iline(client_p, conf)); + return attach_iline(client_p, conf); } else if (IsConfKill(conf) || (ConfigFileEntry.glines && IsConfGline(conf))) { @@ -360,11 +360,11 @@ verify_access(struct Client *client_p) client_p->name); sendto_one(client_p, ":%s NOTICE %s :*** Banned: %s", me.name, client_p->name, conf->reason); - return(BANNED_CLIENT); + return BANNED_CLIENT; } } - return(NOT_AUTHORIZED); + return NOT_AUTHORIZED; } /* attach_iline() @@ -534,12 +534,12 @@ remove_one_ip(struct irc_ssaddr *ip_in) if (ptr->count > 0) ptr->count--; if (ptr->count == 0 && - (CurrentTime-ptr->last_attempt) >= ConfigFileEntry.throttle_time) + (CurrentTime-ptr->last_attempt) >= ConfigFileEntry.throttle_time) { if (last_ptr != NULL) - last_ptr->next = ptr->next; + last_ptr->next = ptr->next; else - ip_hash_table[hash_index] = ptr->next; + ip_hash_table[hash_index] = ptr->next; mp_pool_release(ptr); ip_entries_count--; @@ -868,17 +868,17 @@ find_matching_name_conf(enum maskitem_type type, const char *name, const char *u conf = ptr->data; if (EmptyString(conf->name)) - continue; + continue; if ((name != NULL) && !match(conf->name, name)) { - if ((user == NULL && (host == NULL))) - return conf; - if ((conf->flags & flags) != flags) + if ((user == NULL && (host == NULL))) + return conf; + if ((conf->flags & flags) != flags) continue; - if (EmptyString(conf->user) || EmptyString(conf->host)) - return conf; - if (!match(conf->user, user) && !match(conf->host, host)) - return conf; + if (EmptyString(conf->user) || EmptyString(conf->host)) + return conf; + if (!match(conf->user, user) && !match(conf->host, host)) + return conf; } } break; @@ -930,16 +930,16 @@ find_exact_name_conf(enum maskitem_type type, const struct Client *who, const ch conf = ptr->data; if (EmptyString(conf->name)) - continue; + continue; if (irccmp(conf->name, name) == 0) { - if ((user == NULL && (host == NULL))) - return (conf); - if (EmptyString(conf->user) || EmptyString(conf->host)) - return (conf); - if (!match(conf->user, user) && !match(conf->host, host)) - return (conf); + if ((user == NULL && (host == NULL))) + return conf; + if (EmptyString(conf->user) || EmptyString(conf->host)) + return conf; + if (!match(conf->user, user) && !match(conf->host, host)) + return conf; } } break; @@ -996,26 +996,26 @@ find_exact_name_conf(enum maskitem_type type, const struct Client *who, const ch conf = ptr->data; if (EmptyString(conf->name)) - continue; + continue; if (name == NULL) { - if (EmptyString(conf->host)) - continue; - if (irccmp(conf->host, host) == 0) - return(conf); + if (EmptyString(conf->host)) + continue; + if (irccmp(conf->host, host) == 0) + return conf; } else if (irccmp(conf->name, name) == 0) - { - return (conf); - } + return conf; } + break; default: break; } - return(NULL); + + return NULL; } /* rehash() @@ -1201,7 +1201,7 @@ read_conf(FILE *file) set_default_conf(); /* Set default values prior to conf parsing */ conf_parser_ctx.pass = 1; - yyparse(); /* pick up the classes first */ + yyparse(); /* pick up the classes first */ rewind(file); @@ -1437,9 +1437,9 @@ get_oper_name(const struct Client *client_p) if (IsConfOperator(conf)) { - snprintf(buffer, sizeof(buffer), "%s!%s@%s{%s}", client_p->name, + snprintf(buffer, sizeof(buffer), "%s!%s@%s{%s}", client_p->name, client_p->username, client_p->host, conf->name); - return buffer; + return buffer; } } @@ -1450,7 +1450,7 @@ get_oper_name(const struct Client *client_p) } snprintf(buffer, sizeof(buffer), "%s!%s@%s{%s}", client_p->name, - client_p->username, client_p->host, client_p->servptr->name); + client_p->username, client_p->host, client_p->servptr->name); return buffer; } @@ -1489,8 +1489,8 @@ read_conf_files(int cold) else { sendto_realops_flags(UMODE_ALL, L_ALL, SEND_NOTICE, - "Unable to read configuration file '%s': %s", - filename, strerror(errno)); + "Unable to read configuration file '%s': %s", + filename, strerror(errno)); return; } } @@ -1561,7 +1561,7 @@ clear_out_old_conf(void) if (conf->type == CONF_SERVER || conf->type == CONF_OPER) { if (!conf->ref_count) - conf_free(conf); + conf_free(conf); } else if (conf->type == CONF_XLINE) { @@ -1646,12 +1646,12 @@ conf_add_class_to_conf(struct MaskItem *conf, const char *class_name) if (conf->type == CONF_CLIENT) sendto_realops_flags(UMODE_ALL, L_ALL, SEND_NOTICE, - "Warning *** Defaulting to default class for %s@%s", - conf->user, conf->host); + "Warning *** Defaulting to default class for %s@%s", + conf->user, conf->host); else sendto_realops_flags(UMODE_ALL, L_ALL, SEND_NOTICE, - "Warning *** Defaulting to default class for %s", - conf->name); + "Warning *** Defaulting to default class for %s", + conf->name); } else conf->class = class_find(class_name, 1); @@ -1660,12 +1660,12 @@ conf_add_class_to_conf(struct MaskItem *conf, const char *class_name) { if (conf->type == CONF_CLIENT) sendto_realops_flags(UMODE_ALL, L_ALL, SEND_NOTICE, - "Warning *** Defaulting to default class for %s@%s", - conf->user, conf->host); + "Warning *** Defaulting to default class for %s@%s", + conf->user, conf->host); else sendto_realops_flags(UMODE_ALL, L_ALL, SEND_NOTICE, - "Warning *** Defaulting to default class for %s", - conf->name); + "Warning *** Defaulting to default class for %s", + conf->name); conf->class = class_default; } } @@ -1726,7 +1726,7 @@ valid_tkline(const char *p, int minutes) return 0; result *= 10; - result += ((*p) & 0xF); + result += (*p & 0xF); } /* @@ -1870,9 +1870,9 @@ valid_wild_card(struct Client *source_p, int warn, int count, ...) */ int parse_aline(const char *cmd, struct Client *source_p, - int parc, char **parv, - int parse_flags, char **up_p, char **h_p, time_t *tkline_time, - char **target_server, char **reason) + int parc, char **parv, + int parse_flags, char **up_p, char **h_p, time_t *tkline_time, + char **target_server, char **reason) { int found_tkline_time=0; static char def_reason[] = "No Reason"; @@ -1894,7 +1894,7 @@ parse_aline(const char *cmd, struct Client *source_p, else { sendto_one(source_p, ":%s NOTICE %s :temp_line not supported by %s", - me.name, source_p->name, cmd); + me.name, source_p->name, cmd); return -1; } } @@ -1929,9 +1929,9 @@ parse_aline(const char *cmd, struct Client *source_p, if (target_server == NULL) { - sendto_one(source_p, ":%s NOTICE %s :ON server not supported by %s", - me.name, source_p->name, cmd); - return -1; + sendto_one(source_p, ":%s NOTICE %s :ON server not supported by %s", + me.name, source_p->name, cmd); + return -1; } if (!HasOFlag(source_p, OPER_FLAG_REMOTEBAN)) @@ -1943,9 +1943,9 @@ parse_aline(const char *cmd, struct Client *source_p, if (parc == 0 || EmptyString(*parv)) { - sendto_one(source_p, form_str(ERR_NEEDMOREPARAMS), - me.name, source_p->name, cmd); - return -1; + sendto_one(source_p, form_str(ERR_NEEDMOREPARAMS), + me.name, source_p->name, cmd); + return -1; } *target_server = *parv; @@ -1958,7 +1958,7 @@ parse_aline(const char *cmd, struct Client *source_p, * caller probably NULL'd it first, but no harm to do it again -db */ if (target_server != NULL) - *target_server = NULL; + *target_server = NULL; } } @@ -1984,7 +1984,7 @@ parse_aline(const char *cmd, struct Client *source_p, { *reason = *parv; if (!valid_comment(source_p, *reason, 1)) - return -1; + return -1; } else *reason = def_reason; @@ -2023,18 +2023,19 @@ find_user_host(struct Client *source_p, char *user_host_or_nick, { *(hostp++) = '\0'; /* short and squat */ if (*user_host_or_nick) - strlcpy(luser, user_host_or_nick, USERLEN*4 + 1); /* here is my user */ + strlcpy(luser, user_host_or_nick, USERLEN*4 + 1); /* here is my user */ else - strcpy(luser, "*"); + strcpy(luser, "*"); + if (*hostp) - strlcpy(lhost, hostp, HOSTLEN + 1); /* here is my host */ + strlcpy(lhost, hostp, HOSTLEN + 1); /* here is my host */ else - strcpy(lhost, "*"); + strcpy(lhost, "*"); } else { luser[0] = '*'; /* no @ found, assume its *@somehost */ - luser[1] = '\0'; + luser[1] = '\0'; strlcpy(lhost, user_host_or_nick, HOSTLEN*4 + 1); } @@ -2051,9 +2052,9 @@ find_user_host(struct Client *source_p, char *user_host_or_nick, if (IsExemptKline(target_p)) { if (!IsServer(source_p)) - sendto_one(source_p, - ":%s NOTICE %s :%s is E-lined", - me.name, source_p->name, target_p->name); + sendto_one(source_p, + ":%s NOTICE %s :%s is E-lined", + me.name, source_p->name, target_p->name); return 0; } @@ -2147,7 +2148,7 @@ cluster_a_line(struct Client *source_p, const char *command, if (conf->flags & cluster_type) sendto_match_servs(source_p, conf->name, CAP_CLUSTER|capab, - "%s %s %s", command, conf->name, buffer); + "%s %s %s", command, conf->name, buffer); } } diff --git a/src/parse.c b/src/parse.c index 019d861..e4f9405 100644 --- a/src/parse.c +++ b/src/parse.c @@ -69,7 +69,7 @@ * Diane Bruce (Dianora), June 6 2003 */ -#define MAXPTRLEN 32 +#define MAXPTRLEN 32 /* Must be a power of 2, and * larger than 26 [a-z]|[A-Z] * its used to allocate the set @@ -89,8 +89,8 @@ struct MessageTree { int links; /* Count of all pointers (including msg) at this node - * used as reference count for deletion of _this_ node. - */ + * used as reference count for deletion of _this_ node. + */ struct Message *msg; struct MessageTree *pointers[MAXPTRLEN]; }; diff --git a/src/s_serv.c b/src/s_serv.c index 2606204..066bb6b 100644 --- a/src/s_serv.c +++ b/src/s_serv.c @@ -186,7 +186,7 @@ hunt_server(struct Client *client_p, struct Client *source_p, const char *comman { sendto_one(source_p, form_str(ERR_NOSUCHSERVER), me.name, source_p->name, parv[server]); - return(HUNTED_NOSUCH); + return HUNTED_NOSUCH; } } else @@ -391,7 +391,7 @@ check_server(const char *name, struct Client *client_p) } if (server_conf == NULL) - return(error); + return error; attach_conf(client_p, server_conf); @@ -421,7 +421,7 @@ check_server(const char *name, struct Client *client_p) } } - return(0); + return 0; } /* add_capability() @@ -1184,46 +1184,45 @@ serv_connect(struct MaskItem *conf, struct Client *by) #ifdef IPV6 case AF_INET6: { - struct irc_ssaddr ipn; - struct sockaddr_in6 *v6; - struct sockaddr_in6 *v6conf; - - memset(&ipn, 0, sizeof(struct irc_ssaddr)); - v6conf = (struct sockaddr_in6 *)&conf->bind; - v6 = (struct sockaddr_in6 *)&ipn; - - if (memcmp(&v6conf->sin6_addr, &v6->sin6_addr, - sizeof(struct in6_addr)) != 0) - { - memcpy(&ipn, &conf->bind, sizeof(struct irc_ssaddr)); - ipn.ss.ss_family = AF_INET6; - ipn.ss_port = 0; - comm_connect_tcp(&client_p->localClient->fd, - conf->host, conf->port, - (struct sockaddr *)&ipn, ipn.ss_len, - serv_connect_callback, client_p, - conf->aftype, CONNECTTIMEOUT); - } - else if (ServerInfo.specific_ipv6_vhost) + struct irc_ssaddr ipn; + struct sockaddr_in6 *v6; + struct sockaddr_in6 *v6conf; + + memset(&ipn, 0, sizeof(struct irc_ssaddr)); + v6conf = (struct sockaddr_in6 *)&conf->bind; + v6 = (struct sockaddr_in6 *)&ipn; + + if (memcmp(&v6conf->sin6_addr, &v6->sin6_addr, sizeof(struct in6_addr)) != 0) + { + memcpy(&ipn, &conf->bind, sizeof(struct irc_ssaddr)); + ipn.ss.ss_family = AF_INET6; + ipn.ss_port = 0; + comm_connect_tcp(&client_p->localClient->fd, + conf->host, conf->port, + (struct sockaddr *)&ipn, ipn.ss_len, + serv_connect_callback, client_p, + conf->aftype, CONNECTTIMEOUT); + } + else if (ServerInfo.specific_ipv6_vhost) { - memcpy(&ipn, &ServerInfo.ip6, sizeof(struct irc_ssaddr)); - ipn.ss.ss_family = AF_INET6; - ipn.ss_port = 0; - comm_connect_tcp(&client_p->localClient->fd, - conf->host, conf->port, - (struct sockaddr *)&ipn, ipn.ss_len, - serv_connect_callback, client_p, - conf->aftype, CONNECTTIMEOUT); - } - else - comm_connect_tcp(&client_p->localClient->fd, - conf->host, conf->port, - NULL, 0, serv_connect_callback, client_p, - conf->aftype, CONNECTTIMEOUT); + memcpy(&ipn, &ServerInfo.ip6, sizeof(struct irc_ssaddr)); + ipn.ss.ss_family = AF_INET6; + ipn.ss_port = 0; + comm_connect_tcp(&client_p->localClient->fd, + conf->host, conf->port, + (struct sockaddr *)&ipn, ipn.ss_len, + serv_connect_callback, client_p, + conf->aftype, CONNECTTIMEOUT); + } + else + comm_connect_tcp(&client_p->localClient->fd, + conf->host, conf->port, + NULL, 0, serv_connect_callback, client_p, + conf->aftype, CONNECTTIMEOUT); } #endif } - return (1); + return 1; } #ifdef HAVE_LIBCRYPTO |