diff --git a/mbtask/taskibc.c b/mbtask/taskibc.c index ef9be4f2..f1a28bea 100644 --- a/mbtask/taskibc.c +++ b/mbtask/taskibc.c @@ -605,6 +605,7 @@ void check_servers(void) char *errmsg, scfgfn[PATH_MAX]; FILE *fp; ncs_list *tnsl, **tmp; + srv_list *srv; int j, inlist, Remove; int a1, a2, a3, a4; struct servent *se; @@ -636,6 +637,13 @@ void check_servers(void) inlist = TRUE; } } + for (srv = servers; srv; srv = srv->next) { + if (strcmp(srv->server, ibcsrv.server) == 0) { + inlist = TRUE; + Syslog('+', "IBC: can't add new configured server %s: already connected via %s", + ibcsrv.server, srv->router); + } + } if (!inlist ) { fill_ncslist(&ncsl, ibcsrv.server, ibcsrv.myname, ibcsrv.passwd, ibcsrv.Dyndns); srvchg = TRUE;