diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/InspIRCd.layout | 20 | ||||
-rw-r--r-- | src/connection.cpp | 2 | ||||
-rw-r--r-- | src/inspircd.cpp | 19 |
3 files changed, 27 insertions, 14 deletions
diff --git a/src/InspIRCd.layout b/src/InspIRCd.layout index 75c5ead94..646a6f90b 100644 --- a/src/InspIRCd.layout +++ b/src/InspIRCd.layout @@ -13,9 +13,9 @@ LeftChar=1 [Editor_1] Open=1 Top=1 -CursorCol=19 -CursorRow=6468 -TopLine=6435 +CursorCol=41 +CursorRow=7039 +TopLine=7007 LeftChar=1 [Editor_2] @@ -99,7 +99,7 @@ TopLine=1 LeftChar=1 [Editor_12] -Open=0 +Open=1 Top=0 CursorCol=12 CursorRow=104 @@ -109,9 +109,9 @@ LeftChar=1 [Editor_13] Open=1 Top=0 -CursorCol=77 -CursorRow=122 -TopLine=47 +CursorCol=14 +CursorRow=73 +TopLine=29 LeftChar=1 [Editor_14] @@ -197,9 +197,9 @@ LeftChar=1 [Editor_24] Open=1 Top=0 -CursorCol=3 -CursorRow=301 -TopLine=257 +CursorCol=38 +CursorRow=219 +TopLine=216 LeftChar=1 [Editor_25] Open=1 diff --git a/src/connection.cpp b/src/connection.cpp index e2eaebfa7..40d28996b 100644 --- a/src/connection.cpp +++ b/src/connection.cpp @@ -216,7 +216,7 @@ bool connection::MeshCookie(char* targethost, int port, long cookie, char* serve return false; } -bool connection::AddIncoming(int fd,char* targethost, int sourceport) +bool connection::AddIncoming(int fd, char* targethost, int sourceport) { char connect[MAXBUF]; diff --git a/src/inspircd.cpp b/src/inspircd.cpp index ca587b58d..b3bd8fdd7 100644 --- a/src/inspircd.cpp +++ b/src/inspircd.cpp @@ -6377,6 +6377,7 @@ void handle_b(char token,char* params,serverrec* source,serverrec* reply, char* void handle_plus(char token,char* params,serverrec* source,serverrec* reply, char* udp_host) { // %s %s %d %d + // + test3.chatspike.net 7010 -2016508415 char* servername = strtok(params," "); char* ipaddr = strtok(NULL," "); char* ipport = strtok(NULL," "); @@ -6441,6 +6442,7 @@ void handle_J(char token,char* params,serverrec* source,serverrec* reply, char* } } + void process_restricted_commands(char token,char* params,serverrec* source,serverrec* reply, char* udp_host,char* ipaddr,int port) { long authcookie = rand()*rand(); @@ -6460,6 +6462,7 @@ void process_restricted_commands(char token,char* params,serverrec* source,serve snprintf(buffer,MAXBUF,"~ %d",authcookie); source->SendPacket(buffer,udp_host); // tell all the other servers to use this authcookie to connect back again + // got '+ test3.chatspike.net 7010 -2016508415' from test.chatspike.net snprintf(buffer,MAXBUF,"+ %s %s %d %d",udp_host,ipaddr,port,authcookie); NetSendToAllExcept(udp_host,buffer); break; @@ -7023,11 +7026,20 @@ int InspIRCd(void) { if (FD_ISSET (me[x]->fd, &serverfds)) { - char remotehost[MAXBUF]; + char remotehost[MAXBUF],resolved[MAXBUF]; + length = sizeof (client); incomingSockfd = accept (me[x]->fd, (sockaddr *) &client, &length); - strncpy (remotehost,(char *) inet_ntoa (client.sin_addr),MAXBUF); + strncpy(remotehost,(char *)inet_ntoa(client.sin_addr),MAXBUF); + if(CleanAndResolve(resolved, remotehost) != TRUE) + { + strncpy(resolved,remotehost,MAXBUF); + } + log(DEBUG," "); + log(DEBUG," "); + log(DEBUG,"Resolved: '%s'",resolved); + log(DEBUG," "); // add to this connections ircd_connector vector - me[x]->AddIncoming(incomingSockfd,remotehost,ntohs(client.sin_port)); + me[x]->AddIncoming(incomingSockfd,resolved,ntohs(client.sin_port)); } } } @@ -7250,6 +7262,7 @@ int InspIRCd(void) { if (FD_ISSET (openSockfd[count], &selectFds)) { + length = sizeof (client); incomingSockfd = accept (openSockfd[count], (struct sockaddr *) &client, &length); address_cache::iterator iter = IP.find(client.sin_addr); |