* along with this program; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307
* USA
* along with this program; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307
* USA
-static int mo_connect(struct Client *, struct Client *, int, const char **);
-static int ms_connect(struct Client *, struct Client *, int, const char **);
+static void mo_connect(struct MsgBuf *, struct Client *, struct Client *, int, const char **);
+static void ms_connect(struct MsgBuf *, struct Client *, struct Client *, int, const char **);
{mg_unreg, mg_not_oper, {ms_connect, 4}, {ms_connect, 4}, mg_ignore, {mo_connect, 2}}
};
mapi_clist_av1 connect_clist[] = { &connect_msgtab, NULL };
{mg_unreg, mg_not_oper, {ms_connect, 4}, {ms_connect, 4}, mg_ignore, {mo_connect, 2}}
};
mapi_clist_av1 connect_clist[] = { &connect_msgtab, NULL };
-DECLARE_MODULE_AV1(connect, NULL, NULL, connect_clist, NULL, NULL, "$Revision: 3161 $");
+
+DECLARE_MODULE_AV2(connect, NULL, NULL, connect_clist, NULL, NULL, NULL, NULL, connect_desc);
-static int
-mo_connect(struct Client *client_p, struct Client *source_p, int parc, const char *parv[])
+static void
+mo_connect(struct MsgBuf *msgbuf_p, struct Client *client_p, struct Client *source_p, int parc, const char *parv[])
{
sendto_one(source_p, form_str(ERR_NOPRIVS),
me.name, source_p->name, "remote");
{
sendto_one(source_p, form_str(ERR_NOPRIVS),
me.name, source_p->name, "remote");
}
if(hunt_server(client_p, source_p, ":%s CONNECT %s %s :%s", 3, parc, parv) != HUNTED_ISME)
}
if(hunt_server(client_p, source_p, ":%s CONNECT %s %s :%s", 3, parc, parv) != HUNTED_ISME)
- sendto_one_notice(source_p, ":Connect: Server %s already exists from %s.", parv[1],
+ sendto_one_notice(source_p, ":Connect: Server %s already exists from %s.", parv[1],
if((server_p = find_server_conf(parv[1])) == NULL)
{
sendto_one_notice(source_p, ":Connect: Host %s not listed in ircd.conf", parv[1]);
if((server_p = find_server_conf(parv[1])) == NULL)
{
sendto_one_notice(source_p, ":Connect: Host %s not listed in ircd.conf", parv[1]);
* use the default form configuration structure. If missing
* from there, then use the precompiled default.
*/
* use the default form configuration structure. If missing
* from there, then use the precompiled default.
*/
- if((port = atoi(parv[2])) <= 0)
- {
- sendto_one_notice(source_p, ":Connect: Illegal port number");
- return 0;
- }
- }
- else if(port <= 0 && (port = PORTNUM) <= 0)
- {
- sendto_one_notice(source_p, ":Connect: missing port number");
- return 0;
+ sendto_one_notice(source_p, ":Connect: illegal port number");
+ return;
- ilog(L_SERVER, "CONNECT From %s : %s %s", parv[0], parv[1], parc > 2 ? parv[2] : "");
+ ilog(L_SERVER, "CONNECT From %s : %s %s", source_p->name, parv[1], parc > 2 ? parv[2] : "");
/*
* at this point we should be calling connect_server with a valid
* C:line and a valid port in the C:line
*/
if(serv_connect(server_p, source_p))
{
/*
* at this point we should be calling connect_server with a valid
* C:line and a valid port in the C:line
*/
if(serv_connect(server_p, source_p))
{
-#ifndef HIDE_SERVERS_IPS
- sendto_one_notice(source_p, ":*** Connecting to %s[%s].%d",
- server_p->host, server_p->name, server_p->port);
-#else
sendto_one_notice(source_p, ":*** Connecting to %s.%d",
server_p->name, server_p->port);
sendto_one_notice(source_p, ":*** Connecting to %s.%d",
server_p->name, server_p->port);
-static int
-ms_connect(struct Client *client_p, struct Client *source_p, int parc, const char *parv[])
+static void
+ms_connect(struct MsgBuf *msgbuf_p, struct Client *client_p, struct Client *source_p, int parc, const char *parv[])
struct Client *target_p;
if(hunt_server(client_p, source_p, ":%s CONNECT %s %s :%s", 3, parc, parv) != HUNTED_ISME)
struct Client *target_p;
if(hunt_server(client_p, source_p, ":%s CONNECT %s %s :%s", 3, parc, parv) != HUNTED_ISME)
if((target_p = find_server(NULL, parv[1])))
{
sendto_one_notice(source_p, ":Connect: Server %s already exists from %s.",
parv[1], target_p->from->name);
if((target_p = find_server(NULL, parv[1])))
{
sendto_one_notice(source_p, ":Connect: Server %s already exists from %s.",
parv[1], target_p->from->name);
}
/*
* Notify all operators about remote connect requests
*/
sendto_wallops_flags(UMODE_WALLOP, &me,
}
/*
* Notify all operators about remote connect requests
*/
sendto_wallops_flags(UMODE_WALLOP, &me,
parv[1], port, source_p->name);
sendto_server(NULL, NULL, CAP_TS6, NOCAPS,
":%s WALLOPS :Remote CONNECT %s %d from %s",
me.id, parv[1], port, source_p->name);
parv[1], port, source_p->name);
sendto_server(NULL, NULL, CAP_TS6, NOCAPS,
":%s WALLOPS :Remote CONNECT %s %d from %s",
me.id, parv[1], port, source_p->name);
- sendto_server(NULL, NULL, NOCAPS, CAP_TS6,
- ":%s WALLOPS :Remote CONNECT %s %d from %s",
- me.name, parv[1], port, source_p->name);
ilog(L_SERVER, "CONNECT From %s : %s %d", source_p->name, parv[1], port);
ilog(L_SERVER, "CONNECT From %s : %s %d", source_p->name, parv[1], port);