88 |
if ((target_p = hash_find_server(parv[1]))) |
if ((target_p = hash_find_server(parv[1]))) |
89 |
{ |
{ |
90 |
sendto_one(source_p, |
sendto_one(source_p, |
91 |
":%s NOTICE %s :Connect: Server %s already exists from %s.", |
":%s NOTICE %s :Connect: Server %s already exists from %s.", |
92 |
me.name, source_p->name, parv[1], target_p->from->name); |
me.name, source_p->name, parv[1], target_p->from->name); |
93 |
return; |
return; |
94 |
} |
} |
107 |
} |
} |
108 |
} |
} |
109 |
|
|
110 |
/* Get port number from user, if given. If not specified, |
/* |
111 |
|
* Get port number from user, if given. If not specified, |
112 |
* use the default form configuration structure. If missing |
* use the default form configuration structure. If missing |
113 |
* from there, then use the precompiled default. |
* from there, then use the precompiled default. |
114 |
*/ |
*/ |
145 |
|
|
146 |
conf->port = port; |
conf->port = port; |
147 |
|
|
148 |
/* at this point we should be calling connect_server with a valid |
/* |
149 |
|
* at this point we should be calling connect_server with a valid |
150 |
* C:line and a valid port in the C:line |
* C:line and a valid port in the C:line |
151 |
*/ |
*/ |
152 |
if (serv_connect(conf, source_p)) |
if (serv_connect(conf, source_p)) |
165 |
me.name, source_p->name, conf->name, conf->port); |
me.name, source_p->name, conf->name, conf->port); |
166 |
} |
} |
167 |
|
|
168 |
/* client is either connecting with all the data it needs or has been |
/* |
169 |
|
* Client is either connecting with all the data it needs or has been |
170 |
* destroyed |
* destroyed |
171 |
*/ |
*/ |
172 |
conf->port = tmpport; |
conf->port = tmpport; |
192 |
struct MaskItem *conf = NULL; |
struct MaskItem *conf = NULL; |
193 |
const struct Client *target_p = NULL; |
const struct Client *target_p = NULL; |
194 |
|
|
195 |
if (hunt_server(client_p, source_p, |
if (hunt_server(client_p, source_p, ":%s CONNECT %s %s :%s", |
196 |
":%s CONNECT %s %s :%s", 3, parc, parv) != HUNTED_ISME) |
3, parc, parv) != HUNTED_ISME) |
197 |
return; |
return; |
198 |
|
|
199 |
if (EmptyString(parv[1])) |
if (EmptyString(parv[1])) |
206 |
if ((target_p = hash_find_server(parv[1]))) |
if ((target_p = hash_find_server(parv[1]))) |
207 |
{ |
{ |
208 |
sendto_one(source_p, |
sendto_one(source_p, |
209 |
":%s NOTICE %s :Connect: Server %s already exists from %s.", |
":%s NOTICE %s :Connect: Server %s already exists from %s.", |
210 |
me.name, source_p->name, parv[1], target_p->from->name); |
me.name, source_p->name, parv[1], target_p->from->name); |
211 |
return; |
return; |
212 |
} |
} |
225 |
} |
} |
226 |
} |
} |
227 |
|
|
228 |
/* Get port number from user, if given. If not specified, |
/* |
229 |
|
* Get port number from user, if given. If not specified, |
230 |
* use the default form configuration structure. If missing |
* use the default form configuration structure. If missing |
231 |
* from there, then use the precompiled default. |
* from there, then use the precompiled default. |
232 |
*/ |
*/ |
236 |
{ |
{ |
237 |
port = atoi(parv[2]); |
port = atoi(parv[2]); |
238 |
|
|
239 |
/* if someone sends port 0, and we have a config port.. use it */ |
/* |
240 |
|
* if someone sends port 0, and we have a config port.. use it |
241 |
|
*/ |
242 |
if (port == 0 && conf->port) |
if (port == 0 && conf->port) |
243 |
port = conf->port; |
port = conf->port; |
244 |
else if (port <= 0) |
else if (port <= 0) |