summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorbrain <brain@e03df62e-2008-0410-955e-edbf42e46eb7>2005-04-13 13:42:19 +0000
committerbrain <brain@e03df62e-2008-0410-955e-edbf42e46eb7>2005-04-13 13:42:19 +0000
commit3503fd00f2396454fe6676a3f57c323a4eaefb75 (patch)
treec3096972abfd2b2396e39c44d5d77867470aef8c /src
parent654ff4ae2f06704de2beb1050021c8196f693cb5 (diff)
Updated to support OnSendList
Fixed to allow server to server traffic again (DOH) git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@1074 e03df62e-2008-0410-955e-edbf42e46eb7
Diffstat (limited to 'src')
-rw-r--r--src/commands.cpp6
-rw-r--r--src/inspircd.cpp5
2 files changed, 9 insertions, 2 deletions
diff --git a/src/commands.cpp b/src/commands.cpp
index 94635e609..dc757c803 100644
--- a/src/commands.cpp
+++ b/src/commands.cpp
@@ -2759,6 +2759,10 @@ void handle_link_packet(char* udp_msg, char* tcp_host, serverrec *serv)
{
token = '*';
}
+ if (!strcmp(command,"PING"))
+ {
+ token = '*';
+ }
if (!strcmp(command,"NOTICE"))
{
snprintf(udp_msg,MAXBUF,"V %s %s",source,data);
@@ -3060,6 +3064,8 @@ void handle_link_packet(char* udp_msg, char* tcp_host, serverrec *serv)
char Link_Pass[1024];
char Link_SendPass[1024];
int LinkPort = 0;
+
+ log(DEBUG,"U-token linked server detected.");
// search for a corresponding <link> block in the config files
for (int i = 0; i < ConfValueEnum("link",&config_f); i++)
diff --git a/src/inspircd.cpp b/src/inspircd.cpp
index 27dfe9364..39fe13317 100644
--- a/src/inspircd.cpp
+++ b/src/inspircd.cpp
@@ -3758,8 +3758,6 @@ int InspIRCd(void)
// we only read time() once per iteration rather than tons of times!
TIME = time(NULL);
- //user_hash::iterator count2 = clientlist.begin();
-
// *FIX* Instead of closing sockets in kill_link when they receive the ERROR :blah line, we should queue
// them in a list, then reap the list every second or so.
if (((TIME % 5) == 0) && (!expire_run))
@@ -3803,6 +3801,7 @@ int InspIRCd(void)
// serverFds timevals went here
tvs.tv_usec = 7000L;
+ tvs.tv_sec = 0;
int servresult = select(32767, &serverfds, NULL, NULL, &tvs);
if (servresult > 0)
{
@@ -3838,6 +3837,7 @@ int InspIRCd(void)
{
char udp_msg[MAXBUF];
strlcpy(udp_msg,msgs[ctr].c_str(),MAXBUF);
+ log(DEBUG,"Processing: %s",udp_msg);
if (strlen(udp_msg)<1)
{
log(DEBUG,"Invalid string from %s [route%d]",tcp_host,x);
@@ -3859,6 +3859,7 @@ int InspIRCd(void)
std::string msg = udp_msg;
FOREACH_MOD OnPacketReceive(msg,tcp_host);
strlcpy(udp_msg,msg.c_str(),MAXBUF);
+ handle_link_packet(udp_msg, tcp_host, me[x]);
}
goto label;
}