Update of /cvsroot/srvx/services/src
In directory usw-pr-cvs1:/tmp/cvs-serv21676/src
Modified Files:
proto-p10.c proto.h
Log Message:
Always use the 'J10' protocol when introducing self, and support ircu 2.10.11's AsLL round-trip pings.
Index: proto-p10.c
===================================================================
RCS file: /cvsroot/srvx/services/src/proto-p10.c,v
retrieving revision 1.10
retrieving revision 1.11
diff -C2 -r1.10 -r1.11
*** proto-p10.c 5 Aug 2002 03:22:19 -0000 1.10
--- proto-p10.c 6 Aug 2002 16:12:07 -0000 1.11
***************
*** 245,250 ****
if (srv == self) {
/* The +s, ignored by Run's ircu, means "service" to Undernet's ircu */
! putsock("%s %s %d %li %li %c10 %s%s +s :%s",
! CMD_SERVER, srv->name, srv->hops+1, srv->boot, srv->link, (srv->self_burst ? 'J' : 'P'), srv->numeric, extranum, srv->description);
} else {
putsock("%s %s %s %d %li %li %c10 %s%s +s :%s",
--- 245,250 ----
if (srv == self) {
/* The +s, ignored by Run's ircu, means "service" to Undernet's ircu */
! putsock("%s %s %d %li %li J10 %s%s +s :%s",
! CMD_SERVER, srv->name, srv->hops+1, srv->boot, srv->link, srv->numeric, extranum, srv->description);
} else {
putsock("%s %s %s %d %li %li %c10 %s%s +s :%s",
***************
*** 357,363 ****
void
! irc_pong(const char *data)
{
! putsock("%s %s %s :%s", self->numeric, CMD_PONG, self->name, data);
}
--- 357,363 ----
void
! irc_pong(const char *who, const char *data)
{
! putsock("%s %s %s :%s", self->numeric, CMD_PONG, who, data);
}
***************
*** 687,692 ****
static CMD_FUNC(cmd_ping)
{
! (void)argc;(void)argv;
! irc_pong(origin);
timeq_del(0, timed_send_ping, 0, TIMEQ_IGNORE_WHEN|TIMEQ_IGNORE_DATA);
timeq_del(0, timed_ping_timeout, 0, TIMEQ_IGNORE_WHEN|TIMEQ_IGNORE_DATA);
--- 687,698 ----
static CMD_FUNC(cmd_ping)
{
! if(argc > 3)
! {
! irc_pong(argv[2], argv[1]);
! }
! else
! {
! irc_pong(self->name, origin);
! }
timeq_del(0, timed_send_ping, 0, TIMEQ_IGNORE_WHEN|TIMEQ_IGNORE_DATA);
timeq_del(0, timed_ping_timeout, 0, TIMEQ_IGNORE_WHEN|TIMEQ_IGNORE_DATA);
Index: proto.h
===================================================================
RCS file: /cvsroot/srvx/services/src/proto.h,v
retrieving revision 1.56
retrieving revision 1.57
diff -C2 -r1.56 -r1.57
*** proto.h 4 Aug 2002 21:12:57 -0000 1.56
--- proto.h 6 Aug 2002 16:12:07 -0000 1.57
***************
*** 121,125 ****
void irc_introduce(const char *passwd);
void irc_ping(const char *something);
! void irc_pong(const char *data);
void irc_quit(struct userNode *user, const char *message);
void irc_squit(struct server *srv, const char *message, const char *service_message);
--- 121,125 ----
void irc_introduce(const char *passwd);
void irc_ping(const char *something);
! void irc_pong(const char *who, const char *data);
void irc_quit(struct userNode *user, const char *message);
void irc_squit(struct server *srv, const char *message, const char *service_message);
|